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
923 karma · joined February 28, 2021
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)
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
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...
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.
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).
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/
I'm more of a ctrl-e/ctrl-y guy myself, so I didn't feel a need to implement these commands right away.
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.
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.)
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.)
echo 'sleep 0.01' >> ~/.bashrc # or ~/.bash_profileIf 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.
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.
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!
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...
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.
As I understand it, recent controversial changes to tzdb effectively removed data for some timezones pre-1970. This email [3] seems to give a rough summary of what this means.
I'm unsure when this change was made, but it seems like in the past month or so there have been calls to revert this change [4], discussions of a fork [5], and calls to replace the TZ coordinator [6].
As a result of Samoa abolishing Daylight Savings Time [7], there is a need to release an updated version of tzdb. The linked proposal is suggesting releasing two new versions, one with and without the recent change, effectively an officially sanctioned (temporary) fork until the issue can be fully resolved.
I don't have any insight into what's going on beyond reading some of the emails on the mailing list and a couple of posts on Twitter, so if anyone wants to step in and provide more detail (and/or correct me), go ahead!
[1]: https://mm.icann.org/pipermail/tz/2021-September/thread.html
[2]: https://www.iana.org/time-zones
[3]: https://mm.icann.org/pipermail/tz/2021-September/030517.html
[4]: https://mm.icann.org/pipermail/tz/2021-June/030220.html
[5]: https://mm.icann.org/pipermail/tz/2021-September/030400.html
[6]: https://mm.icann.org/pipermail/tz/2021-September/030478.html
Each Sonobe unit functions as an edge in the underlying structure, so building a structure around an icosahedron, which has 20 faces and 30 edges, requires 30 units, and yields a stellated icosahedron with 60 faces and 90 edges.
You can also build a stellated octahedron from 12 pieces, and a stellated tetrahedron (which actually just appears as a cube) with 6 pieces, but that's just the beginning [4]!
[1]: Strictly speaking, it's not a true stellation, which is formed by extending the planes of faces until they intersect. [2]: https://en.wikipedia.org/wiki/Sonobe [3]: https://www.amherst.edu/media/view/290032/original/oragami.p... (instructions for folding; I believe the image uses the two-mountain folds variation on the first page) [4]: https://www.polypompholyx.com/2017/01/modularorigami/
Using Rust promises performance and stability, key features for the thousands of engineers that will be running Rome as a critical part of their workflow. The vast majority of those developers would prefer that the tool runs faster and has fewer errors over having a lower barrier to entry for contributing.
"Contributing" may also encompass the plugin/extensibility ecosystem around the tool, and can be closely tied to the underlying implementation language. This functionality has been integral to the growth of things like Babel and Webpack, but it seems in this case Rome is trying to replace much of that very ecosystem.
I there are some toolchains that may prioritize "barrier of entry to contributions" -- new languages, or niche communities for example -- but I don't think it's an appropriate priority for a toolchain for a massively popular established programming language with $4.5 million in funding [1].
Making this optimization for something like Option<u8> is, naturally, impossible.
(I assume you are aware of this and were implicitly referring to this optimization.)
I really appreciate this class of application that exposes more hardware functionality to the end user. Flux (which may or may not be a direct competitor) is another great example, as is Halide, the pro camera app for iPhones. They're certainly not flashy, but they can be great quality-of-life improvements.
And they're difficult to write! They require using APIs that are often woefully under-documented, and terribly difficult to debug. I wanted to write an app that would slowly lower your device's volume over time (so you could raise the volume for a song that you like, but then not accidentally spend the next 30 minutes with the volume super loud), and even doing simple things like listing audio devices and getting their names was endlessly frustrating.
Though this is presentation only, not editing.
(I made this.)
I realize that the majority of engineers will never need to use any of the more advanced topics taught in an algorithms class, but I hope you recognize the irony in this comment; the “trivial indexing” performed by Google is anything but, and, in fact, is only enabled by those very algorithms, implemented dozens of times, in multiple languages, with subtle variations and optimizations and under non-obvious reinterpretations, at every level of the stack.