5 ms·
Show HN: Hnwatch – Linux x64 terminal-based real-time HN watcher/reader
- dimitar 11y agoWhy choose assembly for this?
- 2ton_jeff 11y agoHa! 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. :)
- calgoo 11y agoTypo on Status Bar Counters: waits 30 secodns secodns does sound cool :P Maybe a new project in the future?
- 2ton_jeff 11y agoAdmittedly 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 :)
- zimpenfish 11y agoDoes 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.
- 2ton_jeff 11y agomy 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.
- oneeyedpigeon 11y agoYeah, my only easy option is to run this on our live web server. Hmmm, conflicted ...
- 2ton_jeff 11y agoagain 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).
- dimitar 11y agoI love your ssh "site" - ssh 2ton.com.au I like the idea of using the talk command
- 2ton_jeff 11y agoYeah 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 https://news.ycombinator.com/item?id=9716459
- pantalaimon 11y agoIs there a list of active rooms somewhere?
- 2ton_jeff 11y agoSee prior comment about the intentional omission of "/list" functionality
- pantalaimon 11y agoWell I'd also take just one active room ;)
- simcop2387 11y agoI'm gonna idle in 'chat' and see what happens.
- fascinated 11y agolynx
- jrcii 11y agoYou 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.
- profsnuggles 11y agoI 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; }
- Tiksi 11y agoThis 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 :)
- 2ton_jeff 11y agoFWIW, 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
- Tiksi 11y agoI 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.
- agonzalezro 11y agoI made a docker image for this: https://github.com/agonzalezro/docker-hnwatch https://github.com/agonzalezro/docker-hnwatch 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.
- 2ton_jeff 11y agoI 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.
- jonathonf 11y agoDude, use alpine (~5MB) rather than ubuntu (~190MB) for the base image!
- agonzalezro 11y agoDone. Awesome image! Thanks for sharing :)
- 2ton_jeff 11y agowow really bad now, my program is mostly useless without firebaseio... should I ring them?
- 2ton_jeff 11y agoI 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 :-/
- harel 11y agoIf you listen closely, you can hear me clapping. Well done.
- akavel 11y agoHmmm! 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 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/ 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 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
- 2ton_jeff 11y agoNice to meet you, too. 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?
- UserRights 11y agois anybody using their rwasa webserver in production?
- jonathonf 11y agoI've just migrated a set of Docker containers on one host from jessie+nginx to alpine+rwasa. Looking good so far.
- andy_ppp 11y agoHmmm. 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. [1] consider this a challenge...
- 2ton_jeff 11y agooutside 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... ??
- Karlozkiller 11y agoI really don't get this to work as I feel it should. Initially I get like 4 articles showing up, sometimes two articles have the same pos-value. The list of articles then continues to be populated very slowly (I'm up to 12 now after a minute or so maybe?). I've tried it on two different networks, one of them being 100/100mbit/s fiberoptics. Am I missing something?
- 2ton_jeff 11y agoWYSIWYG 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... :-/
- jpstory 11y agoAwesome 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!
- daveloyall 11y agoThe HTML rendering of the source code at https://2ton.com.au/library_as_html/hnwatch/textify.inc.html https://2ton.com.au/library_as_html/hnwatch/textify.inc.html is broken due to the inclusion of markup delimiter type characters in the source.
- rttlesnke 11y agoI'm getting this on scrolling: http://i.imgur.com/UnTepmd.png http://i.imgur.com/UnTepmd.png
- Torgo 11y agoPretty cool. I do however get a coredump resizing the terminal window: Ubuntu 14.04LTS, tmux, hnwatch
- jonathonf 11y agoFeature request: page up and down keys. :)