HNHacker News
TopNewBestAskShowJobs

gnuvince

2,803 karma · joined March 11, 2010

submissionscomments
gnuvince··on Stuxnet is embarrassing, not amazing (2011)
Yeah, the author of the article sounds like a teenager/young adult who seems unable to evaluate objects along multiple dimensions.
gnuvince··on Using LSP in Emacs and Debian
I also recently switch away from lsp-mode to eglot and I could not be happier. The setup was simpler than with lsp-mode and eglot doesn't make new things happen in my editor without me opting into them (e.g., lsp gives you a breadcrumb bar at the top of the window).

In general, I'm really enjoying the rise of high-quality packages that work with Emacs rather than providing their own thing. For instance I switched from Ivy to Vertico and it's nice that there's nothing to configure: any time Emacs prompts for input, Vertico is there. With Ivy, I had to do a few configurations to enable Ivy completion everywhere.

gnuvince··on Zig self hosted compiler is now capable of building itself
> way of programming that encourages *allocating many individual objects* on the heap

Quoting and bolding. I think this is the thing that I need to change most about my own style of programming.

gnuvince··on When to use generics
I agree with the importance of the memory layout of data structures, but I read the original article a bit differently from you and the person you are replying to.

A common approach to programming is to model the problem, almost to anthropomorphize the components of a system. In this style of programming, the organization of data structures isn't about how to lay out bytes in memory, but about a role needed in the resolution of a problem. I almost think of it as having a bunch of little actors that we want to arrange in a certain way in a scene, shout `.action()`, and have the work be done.

This is a style of programming that I was really into just a few years ago, but when I compared myself to other programmers that I really looked up too, I realized that they didn't engage in this type of programming theater. Their code _did_ have types, but it was to group data together, not to tell a story; it was very concrete and practical. And time and time again they produced better programs than I did, often in less time than me, and they avoided questions that would plague me for days (e.g., whose responsibility is it to do X?)

So what I understood from the article is to avoid creating types upon types upon types to model the conceptual problem, and rather write code (which certainly includes data structures) that handles the data of the problem.

gnuvince··on What’s new in Emacs 28.1?
I haven't used it myself, so I cannot speak for it, but straight.el [1] has functionality to freeze the version of packages.

[1] https://github.com/raxod502/straight.el

gnuvince··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
This article is such a good demonstration (IMO) that computers are really fast, but that we have gotten really bad at actually making reasonable use of them.
gnuvince··on Ask HN: What concepts have you never truly understood?
"Modern" devops (and kubernetes). It seems to me that people want to avoid human error and dependence by replacing human operators with complex networks of dozen of services, each of which can fail in isolation or in conjunction with others. How do we measure the costs and benefits of putting in all that extra complexity in our stacks, how do we ensure that the friction they cause will not be a greater detriment than the previous situation they aim to improve? Are we in a situation where the solutions to existing problems have so many problems themselves that they need solutions of their own, thus creating an infinite tower of ever more complex software?
gnuvince··on What makes writing more readable?
It's a bit funny to me that a reply about the value of short sentences starts with a sentence of 58 words (including the parenthetical).
gnuvince··on What makes writing more readable?
> full of garden path sentences

FYI, as a non-native English speaker, I have no idea what a "garden path sentence" means.

gnuvince··on What makes writing more readable?
It's an article about writing, which means I will plug this lecture again: https://www.youtube.com/watch?v=aFwVf5a3pZM

Short version: good writing is not about rules, it's about the function of the text, the readers, and what they value.

gnuvince··on Write Like You Code
My favorite writing lecture is this one: https://www.youtube.com/watch?v=aFwVf5a3pZM

The number one piece of advice: your writing can be clear and structured, but if it's not valuable it's useless and people will stop reading. If you want to write well, figure out who your readers are, figure out what they value, and give it to them.

gnuvince··on Write Like You Code
That quote is not by Knuth, it's from Abelson and Sussman: https://mitpress.mit.edu/sites/default/files/sicp/full-text/...

It's also a problematic quote, because it gives people the impression that they can just ignore that there's an actual computer running their code.

gnuvince··on Features of a dream programming language
Isn't it the opposite?
gnuvince··on SpeedCrunch
I've used Emacs Calc for >5 years and never knew about this, because I always do calculations in RPN.
gnuvince··on “Coding is basically just ifs and for loops.”
I really don't.
gnuvince··on “Coding is basically just ifs and for loops.”
In my twenties, I wanted to use all the cool PL techniques: meta-programming, reflection, monads, macros, type-level programming, etc. I'm getting older and now I want my programs to be 90–95% functions, arrays, structs, enums, and loops and only parsimoniously throw in more advanced language features.
gnuvince··on Data-Oriented Architecture (2020)
Well this is fun, now we have data-oriented design, data-oriented programming, and data-oriented architecture, and they mean three different things.
gnuvince··on Micro – a modern and intuitive terminal-based text editor
True. The scenario I was thinking of was `./configure && make && sudo make install` and iterating on all the missing dependencies that the configure script flags.
gnuvince··on Micro – a modern and intuitive terminal-based text editor
Single executable files are very nice because you don't need to run `apt install <14 dependencies>` to try a piece of software, you just try it and if you don't like it, you delete it without any cruft left on your system.

Go and Rust are two languages whose compilers produce statically-linked executables and they are growing in popularity, so you should expect to see more and more of these kinds of programs. And as these programs become more spread, I expect that other languages (either existing or new) will make it easier for developers to distribute their projects as single files.

gnuvince··on Idiomatic Clojure without sacrificing performance
Could you share an example program that does that?
gnuvince··on Ask HN: Why are relational DBs are the standard instead of graph-based DBs?
You can read this article by Michael Stonebraker about the evolution of database systems: https://people.cs.umass.edu/~yanlei/courses/CS691LL-f06/pape.... It's the first article in the Red Book[1].

[1] http://www.redbook.io/

gnuvince··on Patterns in Confusing Explanations
That's a good one, especially if using pronouns causes people to have to backtrack in their reading. Another pattern that personally annoys me is when people use "the former" and "the latter"; I'm forced to go back in the text to remember which one was mentioned first and which one was mentioned second.
gnuvince··on Benefits of Not Using an IDE
I conclude from your comment and the one above you that devs are average to flat out bad at software development.
gnuvince··on Data-oriented design or why you might shoot yourself in the foot with OOP (2009)
The compiler can automate some things (take a look at Zig's MultiArrayList for example), but ultimately the programmer must understand the data in their application, how it needs to be transformed, and how to lay it out to be processed efficiently by the hardware.

The compiler is a tool, you can set the field to help it do its job, but it's no magic wand, it cannot think and understand your application: only you can do that.

gnuvince··on Data-oriented design or why you might shoot yourself in the foot with OOP (2009)
> Oh and btw OOP can be cache friendly as well. Nobody forces one to organize internal data representation in any particular way.

This is part of the argument of the article, that although nothing forces you to, there is a culture that strongly suggests a way of doing things.

gnuvince··on Reflections on Performance (2020)
This article is chockful of things that I've been meaning to talk about.

> Performance is a feature

The software world is full of examples of programs that were dislodged by a faster competitor. Back in the hey-days of bittorrent, µtorrent quickly became the most popular client; git quickly established itself as the most dominant VCS in part thanks to its greater performance on common operations (git branch, git log, git commit) than the competition at the time; ack, silversurfer and ripgrep are the grepping tools of choice nowadays; Chrome's speed compared to Firefox and Internet Explorer made it explode in popularity and it's now the de facto standard for anything web-related.

> Performance changes how users use software

This one is really important. An example, from the list above, is git: with Subversion, I would rarely do branches, because that required a complete copy which could take minutes. Git takes less than a millisecond to create a new branch, and now everybody has switched to a model where any new code is written in a branch to be reviewed and merged when ready.

The tools ripgrep and fd-find (replacements for grep(1) and find(1)) are fast enough that I don't organize my directories very diligently. I put my PDFs in ~/Documents, my code in ~/Code, etc. and I use those tools to find the content I need without having to use a fine-grained directory structure.

> There’s a general observation here: attempts to add performance to a slow system often add complexity, in the form of complex caching, distributed systems, or additional bookkeeping for fine-grained incremental recomputation. These features add complexity and new classes of bugs, and also add overhead and make straight-line performance even worse, further increasing the problem.

This is something that has been bothering me for a while: if a program is slow, it's rare that we look at whether it's making reasonable use of the machine's resources (NB: not optimal use; reasonable use). Instead, we spin up three more EC2 instances, configure a load balancer, add a bunch of shell scripts to split the data, and hope that the new thing is fast enough. It usually isn't and as the article says, it's more complex and more fragile.

gnuvince··on Zig 0.8.0 Release Notes
> And, I've seen it in Rust as a "workaround" for the borrow checker, where that framing tends to make it feel like cheating or settling, which IMO is unfortunate since when people arrive at it for other reasons it seems to have a lot of other benefits!

Great point! I've been using Rust for 4–5 years now and putting objects in Vecs and using integers as "pointers" felt a lot like cheating (i.e., "I'm doing the wrong™ thing!"), but every time I tried to "fix" things to use references my code ended up uglier, harder to understand, and sometimes slower.

In time, I've learned that it's perfectly fine way to structure data. And as you point out, it makes it easier to work on a large structure structure itself rather than having to go through its individual components (e.g., you can manipulate all the nodes in a graph with a simple for loop rather than having to do a DFS/BFS traversal).

gnuvince··on It's probably time to stop recommending Clean Code (2020)
> The idea of code telling a story is that a unit of work should explain what it does through its use of well named variables, function/object names, and how data flows between function/objects.

Code telling a story is a fallacy that programmers keep telling themselves and which fails to die. Code doesn't tell stories, programmers do. Code can't explain why it exists; it can't tell you about the buggy API it relies on and which makes its implementation weird and not straight-forward; it can't say when it's no longer needed.

Good names are important, but it's false that having well-chosen function and arguments names will tell a programmer everything they need to know.

gnuvince··on Beej’s Guide to C Programming [pdf]
What does "modern" C imply? AFAIK, there are not very many new language features; is it about organizing code differently than what one would learn from K&R?
gnuvince··on Why I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun
Many organizations have independently converged on memory safety being responsible for roughly 70% of vulnerabilities. So yes, still relevant and still a problem for users.

https://alexgaynor.net/2020/may/27/science-on-memory-unsafet...

← PreviousPage 3 of 20Next →