HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dmit

6,552 karmajoined vor 15 Jahren

Submissions

Handsum: An LQIP Image File Format

nigeltao.github.io
2 points·by dmit·vor 3 Tagen·0 comments

How do we prevent Bitrot?

notgull.net
3 points·by dmit·vor 20 Tagen·0 comments

The Joy of Numbered Streets

humantransit.org
62 points·by dmit·vor 4 Monaten·39 comments

Pipelined Relational Query Language, Pronounced "Prequel"

prql-lang.org
66 points·by dmit·vor 5 Monaten·58 comments

repgrep – Interactive Find/Replace

github.com
2 points·by dmit·vor 5 Monaten·0 comments

Nannou – A creative coding framework for Rust

github.com
59 points·by dmit·vor 5 Monaten·19 comments

comments

dmit
·vor 25 Tagen·discuss
> Imitation is the greatest form of flattery

"... that mediocrity can pay to greatness" is the rest of the quote.
dmit
·letzten Monat·discuss
Apologies, I meant your comment pre-edit(s).
dmit
·letzten Monat·discuss
.....Did you just complain about Rust's "lower adoption" compared to C++, immediately following it by "Zig, on the other hand :eyes_emoji:"
dmit
·letzten Monat·discuss
> 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.
dmit
·letzten Monat·discuss
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.
dmit
·letzten Monat·discuss
I foresee a pjmlp comment in your near future. :)
dmit
·letzten Monat·discuss
> 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".
dmit
·vor 2 Monaten·discuss
> no, JavaScript is not a perfect language

Such a brave stance against a claim literally nobody has ever staked.
dmit
·vor 2 Monaten·discuss
> 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.
dmit
·vor 2 Monaten·discuss
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.
dmit
·vor 2 Monaten·discuss
> 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?
dmit
·vor 2 Monaten·discuss
> When you pay taxes you have no say in the bombs acquired with that and where they are dropped.

Vote in elections, local and general.
dmit
·vor 4 Monaten·discuss
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.
dmit
·vor 4 Monaten·discuss
I once witnessed a local admonish another (younger) local for exactly that at a bar. He replied with a bratty "Not my fault they're using crappy chopsticks..."
dmit
·vor 4 Monaten·discuss
For future readers: throwaway27448's comment used to say something completely different, featuring the r-slur, and then immediately edited.
dmit
·vor 4 Monaten·discuss
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.
dmit
·vor 4 Monaten·discuss
> 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? :)
dmit
·vor 4 Monaten·discuss


  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. :)
dmit
·vor 4 Monaten·discuss
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.
dmit
·vor 5 Monaten·discuss
Alt opinion: syntax is the least important part of a programming language. I can't wait for the day someone invents one where it's defined entirely as an AST (with the S standing for Semantic). Just bring your own weird syntax.

I guess Unison is the closest to this platonic ideal right now? https://github.com/unisonweb/unison/issues/499