2,861 karma · joined January 27, 2011
I count myself among the skeptics of V. Mostly because in the initial communications about it, some of the claims were hard to believe. For example, they used to claim that V was memory safe without GC, but also without borrow checker, and it was never explained how they achieved such thing. Now I see that they claim that the language is very similar to Go, so I assume that they went with a GC. That's really cool, I actually think that GCs are a massive boon for language ergonomics. But there remain some unexplained topics, for example, how is that they achieve being "free of data races" [1]. It's nice to see a new language in the area and I hope the language succeed. But I'll continue to be skeptical until I see proper explanation of some of their claims.
There is a new tool or workflow trying to replace or complement an old one. This new tool tries to solve many different complex problems that the old tool, usually designed decades ago, doesn't solve well in this the current world. To do so, obviously, some sort of compromise is required, the new tool won't do certain things that the old tool used to do, but in exchange of that it will do a lot of new things that many users really want. However this small crowd is really pissed by this, without understanding that there is no holly grail solution and some sort of compromise is always required. Additionally, as it's natural with any new technology, the very first incarnations of the new technology are not very mature and there is a lot to polish, a lot of tooling missing, and a chicken and egg problem of not enough users to drive its take off. And the small crowd will use all this as much as they can to try to prevent the world from moving on.
However, as time passes, the new tool starts becoming more mature, the obvious shortcomings get fixed, and all the new possibilities that the tool enables start to really shine. And while the initial compromise will always remain, the majority of users realize that the tradeoff was worth it.
This has happened with Systemd, it's starting to happen with Wayland, and I believe it will happen with Flatpak was well. We'll see.
The only feature that I'm seriously missing is Chrome's profile management. I use this a lot to have completely separate browsing experience between Work and Personal stuff. Separate history, separate cookies, separate extensions. In Chrome this works like a charm. It always remember my open tabs on each profile and it allows me to customize the windows of each profile to easily distinguish them. Firefox does have profiles, but the user experience is miles behind. I also tried the Multi-Account Containers extension, but it's not very good either.
After seeing the direction that Google is trying to take with WEI and similar stuff, I'm really looking forward to move 100% to Firefox.
On the other hand, Kotlin already committed to a colored function approach, and it will likely remain. Java on the other hand, will not need that, which is nice.
If that's true, then what about a social experiment: If you are a solo founder, you get all your profits for yourself. But if you have employees, you have to share your profits with your employees. If employees don't produce any value, easy, fire them all, you get everything. But if they do, share your profits fairly.
I'm curious to see how many solo billionaires will appear. My estimated guess: zero.
How semiconductor works: https://youtu.be/33vbFFFn04k
How a transistor works: https://youtu.be/DXvAlwMAxiA
We understand that software projects need telemetry to improve, but that's no excuse to sneakily steal information about us.
Well done Gnome!
> If your “dread” of C comes from fear of memory management, then Odin is probably not for you, and dare I say, maybe systems programming is not for you.
I have to say that my dread of C definitely comes manual memory management. The awkward syntax and compilation model I can tolerate. But having your program expose critical security vulnerabilities because you forgot a weird edge case while managing a pointer is really worrying. For simple programs is not that complicated, but for complex multi threaded ones it becomes really hard. And the fact that event the most expert programmers make these mistakes, leaves me not much hope.
So perhaps systems programming is not for me? But what exactly is systems programming? Is it developing OS kernels, writing drivers and embedded microcontroller systems? Or is it more.
I'm not very interested in writing any of those. But I do want to write programs that are fast and run as fast as C or C++, and I want a language which allows good control of resources and has minimal overhead. Sometimes these programs are multi-threaded and quite complex, so I want memory and type safety and I want tools to crate abstractions to tame complexity a little bit. Is all this out of the systems programming definition?
Most cross platform frameworks won't really look 100% native. The only exception I know is wxWidgets, which provides an abstraction layer over the native toolkits. It's written in C++ but there are bindings for Python, Ruby and other languages. But even using this, apps might not feel truly native. There is more to nativeness than looks. It's also about subtle conventions and ways to do things. You only achieve this when you use a native framework and pay a lot of attention to the HIG guidelines of the OS.
My personal (and perhaps a bit unpopular) opinion is that native looking is a bit overrated. And it's mostly macOS users who look for this. Linux and Windows users already get a lot of diversity in their looks and feel because there is no single framework for those OSes.
More important than native looking is to have a GUI that is fast, efficient and accesible. The best option that provides this in a cross platform way is QT. Java Swing and JavaFX are also good options.
The most productive tool to have cross platform GUIs right now is Electron. That's just a fact. And it's the reason why so many modern products are using it. But as we all know, there is a price in efficiency.
There are a bunch of new projects in the works to improve cross platform GUI for modern languages. JetPack Compose Desktop, Flutter, Slint and many more. But these are not yet fully mature.
Initially I also used focus mode and different kinds of blocking apps to try to control my addiction. I configured them to block HN, reddit, lichess, twitter, youtube, etc, allowing me to use them only a few minutes at the end of the day and during the weekends. This approach didn't work so well. It worked fine for a few days but then the abstinence syndrome kicks in and I inevitably ended up "temporarily" disabling the blocks just to get that precious shot of dopamine before starting to work. Additionally, I was still wasting almost all my weekends and holidays consuming garbage.
So I got this idea, what if I tweak the approach a little bit: Instead of blocking the apps during "productive" time, what if I block them during leisure time, i.e at the end of the day and during the weekends. The thing with media consumption addiction is that it leaves me feeling that I don't have time to do anything. I neglect a lot of my personal tasks and goals. Work is something that I have to do somehow, after all I need a salary. Doing apartment chores, reading that book I bought or learning a new skill is something that can always wait. And it's during leisure time that I should be doing those things. So I decided to block media consumption during the weekends and try to do something more meaningful in that time. It's easier to deal with the abstinence syndrome, because the activities can be fun as well, they also produce (more slowly) dopamine, just that they are more meaningful to me. It's easier to skip silly but addictive YouTube videos to work on an interesting programming project than it is to skip it for a boring task at work. And there is also this feeling that it's only for a short time, I can get the dopamine shot later and that somehow tricks my brain. And then on Monday I already feel much better, and without feeling the need to consume that much media.
At some point I tried Windows+WSL but that was a complete disaster.
A couple of years ago I decided to try Fedora+Gnome+Wayland. It is an outstanding experience. Everything is smooth, the UI is beautiful. Now with PipeWire and Libadwaita things are getting even better. After some stagnation, the Linux desktop is gaining momentum again.
There are a lot of hate comments for Gnome in this post. My advice for those reading is: Try it for yourself! Most of the haters haven't used Gnome since 2004. Just try it!
So I end up doing the same thing the author was doing: just use <script> tags. If I need a library I try to download a minified version of it and put it in a script tag. This is usually good enough for me as I typically use JS for very small things. “pretend it’s 2005”. It works and if something breaks I know how to solve it.
For the kind of JS projects that I work on, learning the tooling can easily take 3X the time I need to write the project itself. I know that there are several meta-tools that will automatically configure all other tools for you, but I really dislike them. They usually end up downloading half of the entire internet, and when you move an inch from their preferred defaults everything becomes a nightmare.
Esbuild seems like the perfect tool for people like me. It's simple, fast and it allows me to import things in JS! I'm definitely going to look at it next time I'm writing some frontend code.
So if you have some server and you want to handle hundreds of thousands of concurrent requests, and each requests takes a few hundred milliseconds and most of this time is waiting for I/O (e.g, waiting for other micro services to reply), then using Async IO you could do this in one single box. Yo probably won't be able to do that with a typical balanced process pool such ash uwsgi or gunicorn.
I used to think that this is not that bad, after all, I'm consuming actually good content, not silly stuff like in those other networks. But then I was shocked to see how much time I'm actually spending on these networks. This is easy to see in the "Digital Wellbeing" section of modern phones. It was hours, several each day.
I was having trouble keeping up with my chores or exercising. I blamed work. I work the whole week and then in the weekend I want to rest, not to do chores. So I was falling behind. It took me a while to realize that the actual problem is that I'm spending so much time on social media. It's consuming all my free time. I don't watch TV anymore, I rarely watch movies or read books. Most of my free time is being devoured by social media.
The key word here is "addiction". It doesn't matter if you think that the content you consume is actually valuable. These are short doses of dopamine that make you feel good for a very short time and leave you wanting more. You start with a nice video of a guy building an 8 bit computer from scratch and you end up watching a girl watching dogs. And you keep scrolling because you want more dopamine. And if there is nothing more, you switch to Twitter or Reddit. And all these sites are being constantly optimized to keep you on the dopamine rush for as long as possible.
I used to think that the content I was consuming was actually good and valuable. And some of it is, but it was much less that I thought. One day I realized that I can barely remember anything that I have consumed on social media a week ago. Forget about a month ago or a year ago. It's because most of this content is so unimportant that it doesn't stick in my brain. Other slower sources of dopamine aren't like this. A good movie or book leave you with something to remember. Social media rarely does.
I now understood that I have an addiction to social media. I have yet to overcome it though (after all, I'm here on HN). But at least I know that I have a problem.
https://stallman.org/articles/on-hacking.html
If you read that, and then remember that this site is called "Hacker News", perhaps that will illustrate things.
Now, I completely understand if some third-party program developed twenty years ago looks inconsistently. I even understand if some recent third party tool also looks inconsistently. But here we're talking about the software that is shipped with Windows and it's created by Microsoft directly. These are examples from Edge, Explorer, Settings, etc. This is more than having a low priority for consistency, this is Microsoft not even considering the possibility of consistency.
I have not tried Windows 11. But I'm baffled to find that in Windows 10, Microsoft still ships parts of its own UI that are not high-dpi ready. They seem to have zero problem showing dialogs with scaled pixelated text.
My girlfriend recently decided that she wants to learn programming. Given that she already knows some HTML and CSS, I thought JavaScript was the best option as her very first language, as she could apply what she learns easily. So I decided to teach her programming with JS.
In these lessons I've been teaching her how to do basic input and output using `alert`, `prompt` and `confirm`. I know these are almost never used in professional projects, but for beginners these are very practical. They are easy to use and you can test everything in the browser without having to deal with all the overwhelming complexity of the usual JS toolchains. It's so sad that they are going away :( This definitely would make JS a bit less appealing for the complete beginner.
This book has been a life saver during the pandemic, not only the world situation but I personally was a bit disappointed with my career. I was inspired by one of your posts where you mention that you were writing every single day for four years. I decided to use the same approach and I started reading the book and coding a bit every single day. I was able to finish it completely and I wrote two implementations of Lox. I just ordered a paper copy, from the PDF sample it seems it looks gorgeous!
Thank you very much for such a great contribution to the world!
The logarithmic approach is harder to reason about, prone to bugs (as proven by this post). I'm baffled at the fact that tons of people considered it a more elegant solution! It's completely the opposite!
One classic example is Perl. One of the killer aspects of Perl is that it allowed you to write in just one line or two what in other languages would take dozens of lines and boiler plate. Writing Perl is actually really nice. You could go from idea to working code extremely fast. And that's why Perl became super popular two decades ago. However, maintaining a 100K LoC Perl website written by a lot of different people over 20 years, it's definitely not a nice experience.
I know this is going to upset a lot of people, but another extreme example is Lisp. I think I've never seen any language as expressive as Lisp. Once you grasp it, writing Lisp is really really nice. However, reading a complex Lisp program using a ton of macros and a lot of higher order functions could be really hard. In my experience some of the hardest code to read that I have ever encountered has been written in Lisp. And if reading is hard, I don't even want to talk about debugging. But okay, Lisp never really became super popular, so let's ignore it for now.
One more modern example: Kotlin. Kotlin's main improvements over Java are mostly on writability. Semantically, these languages are very similar. That's kind of intentional, as one of the goals of Kotlin is maintaining a very good interoperability with Java. However, Kotlin is nicer to write than Java. Java is verbose, Kotlin is succinct. Kotlin adds a lot of syntax and features to make you write the same things that you would express in Java but in a much shorter way. Writing Kotlin is so much nicer than writing Java, I'm sure of that.
I recently started working on a large Kotlin code base, and I can say that reading Kotlin is harder than reading Java. It turns out that verbosity is not a problem when actually reading code. And having few ways of expressing things actually makes code easier to read.
Languages with a lot of features and different ways of doing things are easily abused. You can still write readable code in them, but it requires a lot more discipline. It's so tempting to use that obscure language feature to make your code so succinct!
Python is a language that always put emphasis on readability. The developers of the language are famous for rejecting a lot of ideas to be added to the language. Even though Python is almost as old as Perl, so far, it has escaped from becoming a brown language and it's still loved. Who knows if it will remain like that.
Another language that seems very serious about this is Go. I know that there are a lot of Go haters here on HN, but you have to admit that Go designers put more emphasis on readability than writability. I predict that Go will escape from becoming a brown language.