923 karma · joined Feb 28, 2021 (5y ago) · 80 submissions
Projects:
- plaintextsports.com: Live scores, play-by-play and box scores, in plain text. No images, no ads, no tracking, and no loading. (Also twitter.com/PlainTextSports)
- jless: A command-line JSON viewer written in Rust. (jless.io)
comment 4y ago · link · parent
Not to discredit Wilfred (it looks like he's taken over the project as the maintainer), but, based on the historical contributions [1], it looks like it was originally developed by Max Brunsfeld, who also created Tree-sitter. [2]
[1]: https://github.com/Wilfred/difftastic/graphs/contributors
[2]: https://github.com/tree-sitter/tree-sitter
[3]: https://github.com/Wilfred/difftastic/commit/958033924a2dea7...
comment 4y ago · link · parent
I started building Plain Text Sports last year when I was watching an NFL playoff game in rural southwest Wisconsin. We had poor TV reception -- the image was going in-and-out -- and the local radio station was mostly static. I tried to check ESPN, but the loading bar was as frozen as the ground outside. I then had the idea for a website designed for the pure sports fan: no ads, no images, just scores, play-by-play and stats, with a simple information-dense display.
I initially added support for the NBA so I could follow my beloved Milwaukee Bucks. I posted it to /r/nba, got over 600 upvotes in a few hours, and got perma-banned for self-promotion. (I did a Show HN too, but it didn't take off. [1]) Over the following months I added NHL, MLB, NFL, college basketball and football, and added standings and team schedules so it could really be a one-stop-shop for my sporting needs. Just this past month I added MLS and NWSL (National Women's Soccer League). I plan on adding the WNBA and the Premier League later this year too.
Obviously I designed the site with minimalism and efficiency in mind, as a reaction to the bloated web we see today. We don't need heaps of JavaScript just to display a bit of text, nor do we need half-a-dozen sites tracking our "engagement", and our "retention". People just want to get the information they're looking for, as fast as possible. Technology shouldn't get in the way.
Despite the austere presentation, I'm really proud of the design of the site. As a commenter noted, it's not actually plain text, but does use some CSS and a tiny bit of JavaScript (sue me!). But there are a lot of small details that I put a lot of effort into: the game times on the front page automatically show up in your local time zone, and the boxes automatically expand to fit long time-zones. For the NBA, the raw play-by-play data I get is very granular. A steal, for example, is both a turnover by the offensive player, and a steal for the defensive player, but I combine those into a single event in the timeline. For the NFL, I draw an ASCII drawing of the field showing the progress of the most recent play [2]. When a team wins a championship, they get an ASCII trophy and a dedicated spot on the front-page for the next week. It's been really fun trying to figure out how to pack as much information as possible into a 45 column-wide display.
A streamer I watch on Twitch [3] who does marketing at Nvidia also had a competition amongst his viewers to make their own ads, and that led me down another rabbit hole of fun "plain-text" videos. [4][5][6].
Plain Text Sports also led to my next project. I get a lot of data from publicly accessible, but undocumented JSON APIs, and it was frustrating digging through giant JSON files trying to understand how certain situations were represented. That led me to build jless [7], a command-line JSON viewer, which made it to the front page last month.
[1]: Original Show HN: https://news.ycombinator.com/item?id=26310314
[2]: ASCII football field: https://twitter.com/CodeIsTheEnd/status/1436003783327293452
[3]: Atrioc, Nvidia marketing streamer: https://twitch.tv/atrioc
[4]: Never Miss Moment Ad: https://www.youtube.com/watch?v=9t1qY0vOJWc
[5]: Bucks Championship Run: https://www.youtube.com/watch?v=4WHcP4PTBHY
[6]: Wisconsin Sports Ad: https://www.youtube.com/watch?v=dLsm0MirOEg
[7]: jless, a command-line JSON viewer: https://jless.io
comment 4y ago · link · parent
I think of something like creating a good looking resume, which may include light graphic design elements like divider lines, and might not have a strictly linear layout and put some information in a sidebar. Making something look good in Word can be really frustrating, and require jiggering with margins and column layouts. It may fall apart when you try to add a new job. It's almost a joke that if you want a good looking resume, you should use LaTeX, but that's incredibly inaccessible. So many more people know basic HTML and CSS!
I think a lot of website builders (like Webflow [3] ?) expose a lot of underlying HTML/CSS, but I suspect they also support a lot more ad-hoc graphic design elements that can really make the underlying HTML document a total mess.
[1]: https://en.wikipedia.org/wiki/WYSIWYG
[2]: https://developer.mozilla.org/en-US/docs/Web/CSS/@media#prin...
[3]: https://webflow.com/
comment 4y ago · link · parent
I've used ANSI codes to invert colors (which works pretty well for highlighting), and dim colors, but those can't solve everything.
[1]: https://github.com/PaulJuliusMartinez/jless/issues/4 [2]: https://github.com/morhetz/gruvbox
comment 4y ago · link · parent
I guess I should explicitly say in the documentation that help would be appreciated in adding support for other package managers. I definitely want jless available through the most standard avenues.
[1]: https://github.com/Homebrew/homebrew-core/blob/master/Formul...
comment 4y ago · link · parent
Installing via Linux Homebrew is simply listed as an option because it's available as a Homebrew formula. And the option to install via cargo is also noted.
comment 4y ago · link · parent
But I was also pretty confident that I made something useful, and, in hindsight, I don't think I should have preemptively felt bad about using some "cheap" form of marketing to get people to see it. I have really conflicting thoughts about marketing and self-promotion from my experience trying to show people my other project, plaintextsports.com [1] (live sports scores in plain text with no ads or trackers so it loads instantly! I think the HN crowd would love it!). There's a weird line between marketing and advertising and self-promotion, where one is "ok", but the other is frowned upon. It's also a tale as old as time that the better marketed but technically inferior product wins out. (AC vs DC initially, Betamax vs VHS!) How much of success is being brazen enough to ignore those norms and shamelessly promote something? Should it be considered shameful to promote it in the first place?
In this case, being written in Rust is definitely a feature, as least when comparing tools! fx [2], a similar tool that made the front-page a couple months ago runs using Node, and I'm sure jless can handle bigger files and uses less memory (though admittedly I haven't actually verified this).
comment 4y ago · link · parent
The snake cube puzzle [1] is a puzzle where you have to fold up a string of 27 cubes, with fixed "turns" like the shapes in the OP, into a 3x3x3 grid.
The goal was not to find a solution to the puzzle, but to find the smallest 2d area the snake could fit into without folding against itself. It turned into a modeling problem (how do you represent the puzzle in code?) and a recursion problem (try all possible folds), but, uh, even with a physical puzzle to play with, it was a little too abstract
A commenter on the link below asked another question over 13 years ago: can the puzzle be folded into a plane without any holes? Obviously if you just lay out the puzzle from end to end it will be in a plane, and without any holes, so maybe the question should be: what is the smallest 2d area the snake can fit into without creating any holes?
[1]: https://mypuzzles.wordpress.com/2008/09/07/the-snake-cube/
comment 4y ago · link · parent
comment 4y ago · link · parent
I'm more of a ctrl-e/ctrl-y guy myself, so I didn't feel a need to implement these commands right away.
comment 4y ago · link · parent
This week I just wanted to get the project out there to see if people liked it, so I compiled stuff locally and manually uploaded them to the GitHub releases page. I'll spend some time over the next few weeks figuring out how to automate a lot of these things.
45.
Show HN: Jless, a command-line JSON viewer(pauljuliusmartinez.github.io ↗)
344 points · by CodeIsTheEnd · 4y ago · 84 comments
46.
Webhook.site – Test, process and transform HTTP requests and emails(webhook.site ↗)
3 points · by CodeIsTheEnd · 4y ago · discuss
comment 4y ago · link · parent
comment 4y ago · link · parent
The many iterations of TCP congestion control algorithms (Tahoe/Reno/NewReno/Vegas/BIC/CUBIC) all rely on pretty hard-and-fast rules for detecting congestion and anticipating certain failure conditions, but these are limited by our ability to parse patterns from complex emergent behavior and reduce those to rules that, at least on some level, "make sense".
This project, Remy, keeps track of three variables: - exponential-weighted moving average of interarrival time of acknowledgements - exponential-weighted moving average of time between sender timestamps - ratio between most recent round-trip-time (RTT) and the minimum RTT seen
From these three variables it generates an "action", which is really three parameters that are plugged into a simple rule to determine whether to send more packets. The three parameters are: - A multiple m of the current congestion window - An increment b (possibly negative) to the congestion window - A lower bound r > 0 on the time between sending segments
If the window isn't full, then the algorithm will send more packets, but not more frequently than r units of time. And Remy will occasionally update its action based on new data.
The key then is that Remy generates different actions for different input state variables, providing different behavior based on the observed state of the network in a way that's orders of magnitude more fine-grained than any human written algorithm. (I think these lookup tables are generated offline; not sure if they can be adjusted while running.)
51.
TCP Ex Machina: Computer-Generated Congestion Control (2013)(web.mit.edu ↗)
1 points · by CodeIsTheEnd · 4y ago · 1 comment
comment 5y ago · link · parent
It discusses a fascinating point about browser UI: when the browser displays something inside its chrome, where a malicious page could render arbitrary pixels, it must establish a visual bridge back to the "trusted zone" (the chrome), providing proof that is in fact trusted content.
(The author points out that new APIs allowing writing to the entire screen means it's hopeless and we're all doomed though.)
comment 5y ago · link · parent
If you have something that "unmounts" things as they scroll off the screen ("virtualized rendering" as the article calls it, a common feature for data grids), this is great tool for verifying that behavior.
comment 5y ago · link · parent
Also, for really maximizing utility, it'd be cool to add variations of the same font but with different line-heights. I definitely voted against some fonts because they appeared "squished", but maybe a bit bigger line-height would make me prefer it.
comment 5y ago · link · parent
1) I recently implemented truncating long lines for CLI tool and went with a hybrid approach using both graphemes and virtual columns -- I'd only truncate a line between graphemes, but when counting how much space was used up I would use virtual columns. In the case of something like , this means things tend to error on the "safe" side of truncating a line too early if the virtual column approach counts it as 4 columns wide rather than 2.
2) I wanted to test something with the scientist emoji and managed to crash Ruby's repl, irb, simply by pasting it into the repl and then backspacing over it. (It was clearly confused about the position of the cursor, and the stacktrace pointed to an error in a line_editor.rb file.) I was on Ruby 2.7.1, but it looks like it's been fixed in 3.0.0!
comment 5y ago · link · parent
When this streamer on Twitch tried to play it [1], the quality of his composited webcam would immediately drop as the compression algorithm focused on rendering the high-frequency dithering sections of the screen. As soon as he would aim the camera away from the fancy rendering (to the sky for instance, or the menu), the video quality would immediately improve. Really a fascinating clip.
[1]: https://imgur.com/S191sI0
Here's a thread of someone complaining about it on Reddit:
https://www.reddit.com/r/Twitch/comments/ls06j5/the_unstream...
comment 5y ago · link · parent
This is by far the most obvious example of "git doesn't understand programming languages", but it also seems like the most straightforward to fix.