Earlier quoted context omitted.
lovely. it's 2022 and I see unknown-glyph-boxes on my up to date smartphone... I love the use of mathematical glyphs in math code, too, much more readable, _if_ it's readable. sigh.
The problem is (apparently) no monospace version of the /ʃ/ character, which renders fine in non-monospaced fonts (on Android).
Ask HN: What's the best source code you've read?
221–230 of 271 posts
Re: Ask HN: What's the best source code you've read?
#222It’s a very simple code-base in many ways. At the time it was 10k lines of mostly short pure functions.
The code examples were also really nice and explained a lot about how to work with SVG.
I owe some Thanks to Mike Bostok and his fellow developers.
Re: Ask HN: What's the best source code you've read?
#223Earlier quoted context omitted.
I have shared this with Tanj. I had the privilege to work with him in Microsoft!
Awesome!! Would it be possible to release this bit of the library, if not the whole thing (for any definition you like of "whole thing") à la Movie Maker ( https://twitter.com/foone/status/1511808848729804803 )? More specifically there are two components to this question - it being OK for the code to be released, and the code itself being available to be released :). I'm specifically asking after the former; if noone…
Some sites probably also have versions for download without the registration requirement
Re: Ask HN: What's the best source code you've read?
#224Earlier quoted context omitted.
Using Unicode symbols wisely in mathematical code is a godsend. I regularly use Julia, which favors this style, and find that this feature improves the readability of code enormously.
How do you then type these characters? google, copy, paste? Or is there a better workflow?
Of course, this only works if your editor supports this and you are using a language similar to Julia. But there are two more general methods that are applicable everywhere. The first was mentioned by db48x: I have customized my Xmodmap file so that greek letters and a few typographic characters I use often can be typed using AltGr combinations. (Unfortunately, this is much more complicated if you use Windows.)
Secondly, I heavily use Espanso [1], so that I can easily type complicated letters/sequences (e.g., my email address) for which it would be too overkill to assign an AltGr keybinding.
Finally, in Emacs and Kitty (my terminal emulator) there is a keybinding that asks for the name of an Unicode symbol and enters it. (In Emacs it's C-x 8 , in Kitty Shift+Ctrl+u.)
From the point of view of my workflow, the problem of quickly typing Unicode characters is completely solved.
Re: Ask HN: What's the best source code you've read?
#225Postgres code is very good, redis as well. Some of the core parts of Linux also totally worth learning from. I also remember how Qt UI code and docs were a revelation after the nightmare of win32 and related frameworks. Bellard's original Tinycc was very entertaining and took a while to digest. Most old and well-maintained projects are worth learning from. Apart from some local tips and tricks what is more important…
Re: Ask HN: What's the best source code you've read?
#226Re: Ask HN: What's the best source code you've read?
#227Earlier quoted context omitted.
Speaking anecdotally, I have nothing but issues with LSP. It's a pain to use, a pain to configure, gives sub-par results and is usually wraps with extra "features" that change how code gets edited between different languages (I know this is less LSP's fault). Not to dismiss the mountain of work people have put into it, but it feels very hacked together and clunky rather than a shining achievement.
Case in point, Microsoft develops an editor (VSCode) and LSP so that N*M language integrations wouldn't be necessary. But in the development of their language (TypeScript), LSP support is not a priority (in part because LSP is inadequate in its current form): https://github.com/microsoft/TypeScript/issues/39459
Re: Ask HN: What's the best source code you've read?
#228Earlier quoted context omitted.
Using Unicode symbols wisely in mathematical code is a godsend. I regularly use Julia, which favors this style, and find that this feature improves the readability of code enormously.
How do you then type these characters? google, copy, paste? Or is there a better workflow?
Re: Ask HN: What's the best source code you've read?
#229Earlier quoted context omitted.
> I can't emphasize enough that this notion is only a side point in the story and not a main aspect of the plot Is it sprinkled throughout the story, or a mostly uninterrupted block of text? As in: is there an easily findable chunk of the book one could read for that idea alone? If so and you could provide a few keywords or a direct quote, I’d be interested in grabbing the book to read that.
I just went and glanced over the text by searching a pdf for a few key terms - no, it's really just sprinkled. The idea doesn't get much attention and is mostly mentioned in passing.
One funny detail I remember is a throw–away line where someone rapidly keys in “a column of text”. If you’re paying attention you can combine that with names like Pham, Vinh, Nau, and Qung Ho, the rarity of the red–headed gene, and the descriptions of some traders from the far end of human space you can reconstruct how things went after Humanity reached the stars.
Re: Ask HN: What's the best source code you've read?
#230It’s not the best, far from it, but it was fascinating to me so I will share. I used to work for a large newspaper. Engineering wasn’t the focus of the business, it was only a means to an end, it was just something they needed to have a competitive website. As a result, the churn rate was very high. But more interesting there was also a very high return rate. Engineers would come and go and return and leave again all…