HN user

dmit

6,665 karma
Posts206
Comments319
View on HN
mmapped.blog 9d ago

Backtrack-Free Cursive

dmit
278pts126
nigeltao.github.io 14d ago

Handsum: An LQIP Image File Format

dmit
45pts9
notgull.net 1mo ago

How do we prevent Bitrot?

dmit
3pts0
humantransit.org 3mo ago

The Joy of Numbered Streets

dmit
62pts39
prql-lang.org 5mo ago

Pipelined Relational Query Language, Pronounced "Prequel"

dmit
66pts58
github.com 5mo ago

repgrep – Interactive Find/Replace

dmit
2pts0
github.com 5mo ago

Nannou – A creative coding framework for Rust

dmit
59pts19
kobzol.github.io 1y ago

Just write a test for it

dmit
72pts61
brooker.co.za 1y ago

One or Two? How Many Queues?

dmit
1pts0
danielchasehooper.com 1y ago

A new Sudoku layout with 81 uniquely shaped cells

dmit
188pts75
blog.felixge.de 3y ago

Waiting for go1.21: Execution Tracing with < 1% Overhead

dmit
12pts0
medium.com 3y ago

Data-driven performance optimization with Rust and Miri

dmit
88pts51
nickmcd.me 3y ago

Simulating Wind on Procedural Terrain Using Lattice Boltzmann Method

dmit
194pts21
fgiesen.wordpress.com 5y ago

Entropy coding in Oodle Data: the big picture

dmit
45pts3
apenwarr.ca 5y ago

Can I work for a bad company and still be a good person?

dmit
28pts24
www.youtube.com 6y ago

On Software Quality

dmit
2pts0
medium.com 6y ago

Strings in WebAssembly

dmit
70pts30
medium.com 6y ago

Strings in WebAssembly

dmit
1pts0
tylerxhobbs.com 6y ago

Flow Fields

dmit
99pts7
blog.nelhage.com 6y ago

Reflections on Software Performance

dmit
3pts0
medium.com 6y ago

Biogrid’s GPU-accelerated world simulation

dmit
129pts8
www.well-typed.com 6y ago

A Summer of Runtime Performance (Glasgow Haskell Compiler)

dmit
4pts0
blog.lse.epita.fr 6y ago

One device to drive them all (2016)

dmit
15pts1
pointersgonewild.com 6y ago

Zupiter: A Web-Based Modular Synthesizer

dmit
147pts25
ourmachinery.com 6y ago

Data Structures Part 3: Arrays of Arrays

dmit
155pts20
codingnest.com 6y ago

Modern SAT solvers: fast, neat and underused

dmit
237pts45
www.parsonsmatt.org 6y ago

Names do not transmit meaning

dmit
51pts41
github.com 7y ago

Mimalloc – A compact general-purpose allocator

dmit
356pts66
nohatcoder.dk 7y ago

Hash Levels

dmit
1pts0
www.youtube.com 7y ago

Preventing the Collapse of Civilization [video]

dmit
231pts116

.....Did you just complain about Rust's "lower adoption" compared to C++, immediately following it by "Zig, on the other hand :eyes_emoji:"

I don't think performance has got much to do with tinkering.

Yes, in general, but also there are cases when you realize you can, idk, parse a CSV file in 0.2 seconds instead of 200 seconds. That kind of improvement unlocks a new level of tinkering.

Have you ever thought "Ugh, this bit of Python code is running much slower than I expected on my computer. Wonder if anyone has written a native library for this"? That's probably the closest use case for someone who matches your description -- a language that is much more ergonomic, much more 'modern' feeling (in all the good ways), while still extremely compatible with C.

As for the language itself, it's going to be more verbose than your Python code. Cons: you'll have to spell out a lot of things that you thought were obvious assumptions. Pros: you will be able to look at a page of code and know with a great degree of certainty that there are no hidden gotchas. No monkey patching, no __init__. Basically, it just does what it says on the tin.

And finally, about the std lib and batteries: there's HTTP(S), compression algorithms, hash algorithms, RNG, I/O, the basic data structures you'd expect, JSON. Third-party libraries, if you choose not to vendor, are handled by including the repository url in a file (also automated by a CLI command), and then adding it to the build script (not automated). The `zig` command handles fetching and ensuring sanity, but otherwise assume a bit of elbow grease will need to be involved.

Zig's compilation times are already terrific

In my experience, this (for now) is mostly aspirational. It's obviously a major goal, and there are clear milestones outlined on how to achieve it, but in practice the initial compile of an empty project or the excruciating pause when you `direnv allow` and ZLS needs to be (re)built are not what I'd describe as "terrific".

Deno 2.8 2 months ago

no, JavaScript is not a perfect language

Such a brave stance against a claim literally nobody has ever staked.

Deno 2.8 2 months ago

Can someone explain why it sounds like there's such rapid growth of Bun?

In my case, when I start a little Typescript side project, instead of drowning in the sea of npm/yarn/berry/pnpm/bubble/vite/webpack/rollup/rolldown/rollout/swc/esbuild/teatime/etc I can just use one thing. And yes, only some of those are Pokémon moves and not actual tools from the JS/TS ecosystem.

Tigerbeetle is in the database business. They operate on an entire different level of correctness expectations compared to something like Bun. The correctness guarantees they provide come first and foremost from the design, architecture and rigorous testing, not from the language they use for the implementation.

So, hopefully, the tech people involved in choosing a database for their project understand that, and do their own correctness and performance testing before making a decision. As for the business people, the tigerbeetle.com landing page doesn't mention Zig at all, although it probably will come up when they "ask AI" for a comparison. So, yeah, probably some risk. Perhaps the LLM will also point out the Jepsen report on Tigerbeetle to offset it.

Zed 1.0 3 months ago

And I greatly respect the small binary/download size

The latest x86_64 Linux build is 136MB. (https://zed.dev/docs/linux#downloading-manually)

As for your list of grievances, they all seem to boil down to the respective LSPs not doing their job? Does Ctrl-Alt-l (lowercase L, not Shift+i) include the language's server in the context menu, and are there any errors reported for it if it does?

Hehe, why "probably"? It says "250 lines" right there in the subject. Surely one can skim the single file of code (https://github.com/ieviev/mini-gzip/blob/main/src/main.rs) and offer criticism that isn't based on hypotheticals?

Anyway, I skimmed the file for you this time, and basically you're either correct or wrong, depending on your definition of "error checking." The code handles error conditions by aborting the process. Seeing as it's a standalone CLI program and not a library meant for reuse, safely shutting down with a meaningful message sounds like fair game to me.

RISC-V Is Sloooow 4 months ago

For future readers: throwaway27448's comment used to say something completely different, featuring the r-slur, and then immediately edited.

What about when you have a long-running program. You can't both brag about NumPy, Django, and the machine learning library ecosystem while also promoting "It's great for when you just want to get the first 100 lines out as soon as possible!"

I am guessing that Python, like Ruby, is dynamic enough that it's impossible to detect all typos with a trivial double-pass interpreter, but still.

Wonder if there was ever a language that made the distinction between library code (meant to be used by others; mandates type checking [or other ways of ensuring API robustness]), and executables: go nuts, you're the leaf node on this compilation/evaluation graph; the only one you can hurt is you.

If I'm using one syntax, how do I tell you to fix a bug in your syntax?

How about "Hey, your Bean ain't sprouting"? :)

I'm sorry, I feel like I'm not communicating this properly. Um, have you ever discussed with someone a book or a TV show that was translated into your language? Did you have problems referring to the exact parts you liked or disliked? :)

  class Bean {
    private boolean sprouted;

    public void sprout() {
      this.sprouted = true;
      // ...
    }
  }
or
  data Bean = Dormant | Sprouted
  
  sprout :: Bean -> Bean
  sprout Dormant = Sprouted
  sprout Sprouted = -- aw, beans, we could have modeled
                    -- this state as impossible to construct,
                    -- but you chose runtime checks, so
                    -- here we are.
As for pointing to the source line, I think JavaScript people solved that one for us with source maps. Just because we download and execute a single 4Mb line of minified code, doesn't mean we can't tell which line of the original source caused the error. :)

No it won't? That's exactly the point -- each of those people will be viewing the code in their own preferred syntax. If there is semantic nuance in the writer's syntax, the reader will see it presented in the best way their preferred syntax's representation can provide.

Imagine all the hours saved that are currently spent on tired tabs vs spaces debates, or manicuring .prettierrc, etc etc. The color of the bike shed might matter (sometimes a lot) to some people, I know, but it's storing bikes away from the elements and thieves that is the goal, not obsessing over optimizing something that is demonstrably a subjective matter of taste.

A wrapper over what?? Bun includes the JavaScriptCore engine for JS evaluation, but it's so much more.

As for financial database concerns, if you're serious about including a project like that in your system, you have thorough correctness and performance testing stages before you commit to it. And once it passes the hurdles, at that point what difference does it make if it's written in a beta language, or a bunch of shell scripts in a trench coat, or whatever.

Bun v1.3.9 5 months ago

Going 1.0 was a requirement for cashing out, don't worry about it. And segfaults don't really even matter as long as you run the code in production with -OReleaseSafe and turn on ubsan, it's fiiiiineee