Hmmm! some nice stuff there besides the "hnwatch" itself:
- it's apparently written in "FASM" assembler, which is BSD-licensed (according to Wikipedia), cross-platform, self-hosting (?), Intel-syntax (my preferred camp), and also has an experimental "g" version supporting output targetting JVM, AVR & other fancy stuff (customizable via "macroinstructions"): http://www.flatassembler.net/download.php
- IIUC, this "hnwatch" page is at the same time kinda delicate & non-pushy advertisement for the author's (authors'?) multipurpose ASM library named "HeavyThing" (i.e. kinda custom "stdlib"): https://2ton.com.au/HeavyThing/ (which seems to be required to build "hnwatch"? It wasn't clear to me initially) - worth some more highlight, I believe.
As a sideways wishful-thinking comment regarding the highlighter used for showcasing the hnwatch sources: I'd much prefer if syntax was not highlighted (i.e. the eye-piercing blue '[' & ']'), but instead the "call" instructions would, as well as "jmp" and variants (with a different colour), user symbols (different colour again) including especially labels (another colour please). Also, if there were somewhat more comments in the sources. Also, in https://2ton.com.au/library_as_html/hnwatch/textify.inc.html, the highlighter seems to have gone awry.
update: edited heavily to hopefully better express my positive attitude; in the Interwebs, no one can see you smile
Curious as to what your intention is by pointing out my investment in years of profit-free GPLv3 development, and that somehow that is tied to the BSD license of the compiler's creator.
Care to elaborate on a better method? I miss Turbo Assembler, which is in part what brought fasm into existence.
"Advertisement" for GPLv3 sources?
I am not ashamed to openly admit my company would love more contract work, consider what I have contributed for free the "world's most expensive curriculum vitae". I'm interested to hear what other open source decision makers have to say about this, but 2 Ton Digital as a Software resource has made me bupkiss.
More the point, when someone wants something that requires a higher-than-average level of skill, we get business. The community as a whole gets to benefit because I keep turning it loose with no strings attached. Isn't that the way it is supposed to work?
Hmh; I think there might have been kinda misunderstanding (?) - I'll edit my comment to change "interesting" to "nice", hopefully this way it will better express my original intent.
In other words, big thanks for making me aware of the FASM! Not sure if I'll ever use it, but totally worth remembering for future, just in case. Or, who knows; maybe for some hobby AVRing I hope to do it'd be actually easier than the whole AVR-GCC stuff?
Your use of the word "apart" right at the beginning is likely to be a cause of confusion. Clearly, in this context, you mean it in the "as well as" sense, but I initially read it in the "instead of" sense, and I think most other English-as-1st-language speakers would do the same. Qualifying it e.g. "quite apart from..." can avoid the misunderstanding.
Coming back around, my automated syntax highlighter for sources doesn't like HTML entities, and the source_as_html you reference is indeed broken, but only for the HTML/browser case. Tah for the positive attitude, most of my sources "as HTML" are syntax highlighted to be pleasantish. My terminals are all syntax-highlight-free (vim: syntax off) and greenscreen like the olden day monochrome monitors :) The primary reason all of my code isn't on github is only because their syntax highlighting doesn't cover fasm/x86_64 assembler. It is on my todolist for someday when I am bored :)
If you want to run it: docker run -it agonzalezro/hnwatch
I don't know why but hnwatch doesn't look like working ATM. I've tried in a Linux box (without docker) and I have the same problem with the tty, it's just loading 4 news and no comments or similar.
I noticed that the API from firebaseio has been really lagging since I turned this loose, not sure what is up, the code for the retrievals is pure REST though, nothing hardcore or nonstandard.
I attempted to call the 1 (844) 843-3473 number on the firebaseio.com site, I suspect it may be before their waking hours though.. my hnwatch now is not behaving at all like it was earlier though, and the only difference is that I released it here :-/
outside curios request related to this submission, I have always configured webservers to return "400 Bad Requests" on HTTP/1.1 requests that lack a Host: header.
Still, every interaction I have had with HN this year always results in lots of hosts getting said results, and while this one is going, the most offensive host: 207.226.141.203 (dns: 207-226-141-203.static.pccwglobal.net) .. 1800 requests and counting from that host... ??
Hmmm. I wonder if someone can write a hacker news comment that'll cause remote code execution on those running this...[1] I would have no idea how easy protecting buffer overflows is in assembly but I'm guessing it's harder than C.
Ha! Great question, one that I get asked semi-frequently. 1) Because unlike many, I can, 2) Because contrary to popular belief, it is not difficult. :)
Does rather limit the audience though - my main VM is ARM, my main machine is OSX and consequently I can't use this on either. Which is a shame because I'd really like to.
my main desktop is also Mac OS X, I run vmware fusion + linux hosts when necessary, but all of my server infrastructure is linux anyway :-) linux kernel makes assembler so much easier than OS X and of course all of my library is catered for server-side infrastructure.
again FWIW, I am the co-founder of a proper Australian registered business, I appreciate your concern. In an isolated environment, run it with strace -o nasties.txt or something similar. I assure you personally that the only outbound connects this thing does is to your locally defined DNS and firebaseio per the HN API, and is not terribly unpleasant to any host CPU (near as I can tell anyway, and that was before I enabled the 150 item limit on the main page indices).
Admittedly I am no webguy, the webpage for it was very much an afterthought, was just happy to release it... I'll see if I can get the boss to edit the content before my next deploy :)
This is awesome, the sshtalk mentioned above looks great too, although trying to brute force a room name isn't working out for me.
I found a few of the key bindings by accident, trying to scroll with j. I considered making something like this a long while ago, but definitely not in asm, this is impressive.
I may have to poke at the code a bit and see if I can add/change a couple things :)
FWIW, I intentionally didn't implement a "/list" feature for it, as it was originally designed to be an in-house sorta ephemeral chat thing... not many requests for a public "IRC-style" ssh chat server, if there is by all means adding the feature for a "/list" wouldn't take long
I was just poking around to see how it works. I love the idea, but I doubt I could convince enough people to join that wouldn't already have the room name to justify the effort of adding a /list.
WYSIWYG sadly, hnwatch grabs the ID list to fetch from the SSE direct from firebaseio (and thus the public API). It was working a treat (and accurately reproducing everything from HN web-proper) prior to my releasing this... IDK what the proper course of action is from here... :-/
Yeah I spent a very interesting day chatting to heaps of people, haha, wasn't even logged in until just then :) glad it is appreciated. I can't handle too many chats all-at-once, but am logged into it now :)
Edit: meant to include the origin of my day's sshtalk fun: https://news.ycombinator.com/item?id=9716459
Awesome work! Unfortunately I too am only seeing the first 4 lines of HN. Also, when I press Enter on a selection, it doesn't show comments. I love the idea of this and I hope to see its development continue!
You could /almost/ have this with newsbeauter and lynx, except that the RSS feed doesn't include points or comment number and lynx doesn't indent comments, so all comments appear at the same thread level which is somewhat confusing.
I use this in my elinks hooks.pl to indent hn comments.
use strict;
use warnings;
use Encode;
use Mojo::DOM;
sub pre_format_html_hook {
my $url = shift;
my $html = Mojo::DOM->new(decode_utf8(shift));
if ($url =~ 'news\.ycombinator\.com') {
$html->find('img[src="s.gif"]')->each(sub { my $e = shift;
my $w = $e->attr('width');
my $ns = ' ' x ( $w / 10 );
$e->replace($ns); });
}
return $html;
}
- it's apparently written in "FASM" assembler, which is BSD-licensed (according to Wikipedia), cross-platform, self-hosting (?), Intel-syntax (my preferred camp), and also has an experimental "g" version supporting output targetting JVM, AVR & other fancy stuff (customizable via "macroinstructions"): http://www.flatassembler.net/download.php
- IIUC, this "hnwatch" page is at the same time kinda delicate & non-pushy advertisement for the author's (authors'?) multipurpose ASM library named "HeavyThing" (i.e. kinda custom "stdlib"): https://2ton.com.au/HeavyThing/ (which seems to be required to build "hnwatch"? It wasn't clear to me initially) - worth some more highlight, I believe.
As a sideways wishful-thinking comment regarding the highlighter used for showcasing the hnwatch sources: I'd much prefer if syntax was not highlighted (i.e. the eye-piercing blue '[' & ']'), but instead the "call" instructions would, as well as "jmp" and variants (with a different colour), user symbols (different colour again) including especially labels (another colour please). Also, if there were somewhat more comments in the sources. Also, in https://2ton.com.au/library_as_html/hnwatch/textify.inc.html, the highlighter seems to have gone awry.
update: edited heavily to hopefully better express my positive attitude; in the Interwebs, no one can see you smile