Hacker Newsnew | past | comments | ask | show | jobs | submit | larusso's commentslogin

Error handling in rust is the number one frustration. I rewrote my errors multiple time. I used error_chain which looked good on paper but was just as broken as thiserror and anyhow. The missing piece is already the fact that no one really defines how to write good and meaningful error types for the different audiences. Even the article described some cases that are highly implementation specific. I will take a look at this other crate the author showed though. The thiserror crate makes it too easy to just foreward errors with the #from / #source implementations. I played around with a helper crate that tries to add a context method to each generated error types. But this as well is optional and also adds tons of overhead.

The fun part is that now you need to bind against swift and objective-c for success on Apple systems. They no longer provide obj-c frameworks for all the new things. So you have to double hop and deal with both or deal with it on a framework by framework level. Talking from a Unity background here where the interop with obj-c is kinda smooth due to the c# -> c marshaling. But swift needs a bit more work.

With a caveat, Metal is written in a mix of Objective-C and C++, with Swift bindings.

Thus you can do anything Metal with Objective-C and zero Swift.

Also, writing drivers, even in userspace is still mostly C++.

Going on a tangent, even if Swift isn't everywhere still, I would like that Microsoft would be half as serious as Apple, regarding .NET use on Windows, however they aren't even serious with C++.


“It’s not a bug it’s a feature!”

Just the first thing that popped into my head reading the reasoning. I think it makes a lot of sense to do it like this. Especially for a product which is cross platform that emulates / replaces other known products and on top has extensive configuration options. I also switched over from kitty a couple of weeks back and really like it.


I still have my old BluRay collection which I build up from the mid 2000. This already was the replacement of the DVDs I had before. They still sit in the shelve because I don’t know what else to do with the space. Same goes for books etc. I mean I really like the covers etc and the fact one has a physical token. But I simply have too much of it in my house already. And replacing the stuff yet again feels useless. I also like the feeling that if I wanted I could simply let go. Before someone asks: The unit the BluRays are located is a TV unit. And getting rid of them would mean I have an empty shelve. They also cover the cable / power cord mess behind it a bit. So removing is actually not a solution. I would either need a replacement to put there as a cover or get rid of the TV unit shelve thing :). Typical 1st world problem that is.

About 15 years ago I got rid of almost all of my physical media. I was moving a lot at the time (I've moved 13 times over the last 20 years, several times to different cities) and I had hundreds of CDs, DVDs and books.. It was literally a quarter of my boxes every time I moved..

So I sold and donated all of it, kept what had special value, and re-acquired a lot of it digitally.

I still think I made the right decision, although every now and then I miss something specific and regret it, but I get over it pretty fast.


I also moved many times in the past. Once CD-quality settled, I gifted my vinyls to a thrift store. (The 'art' was immaterial.)

20 years ago, I ripped all of my CDs into 192K MP3s (perfect enough for my ears) using an online metadata service. Getting rid of the 'jewel cases' (and eventually all of their non-CD content) but retaining the CDs (4 Logic cases worth, 3 sq. feet) saved a ton of room.

For backup I archived the thousands of MP3s onto an 80GB Seagate which I organized by genre, then stored in a shoebox. 12 years later I copied the Seagate to two more HDs. It worked fine (but gave-up-the-ghost later that year).

I've relied on those files since. Unlike several dead self-burned CD-Rs, the manu'd CDs (I never use) seem to have remained healthy in the cases at room temp.


I did the same as you about 20 years ago. And about three years ago, I started reinvesting in physical ownership again for my music and movies. For me this started from a desire to reduce my reliance on major tech companies, especially licensed content like media. But since moving in that direction, I've found it very rewarding to curate a collection reflective of my evolving taste, and find I treat my time with a spinning record or blu-ray I had to insert with more focus and attention.

I don't share the anecdote to suggest in any way that you or anyone else would feel the same.


Moving that many times is enough to make a person give up interest in all physical possessions, not just media.

You're not wrong.. At one point I could fit all my worldly possessions in a cargo van. It actually felt pretty nice, although I wouldn't want that to be the case at this point in my life.

The only "cheat" was a half-dozen boxes of childhood keepsakes in my parents' basement - that are now in my basement. ;-)


Maybe some of the old beliefs regarding startup time etc are no longer valid. Maybe the programming model isn’t as verbose as it used to be. But I don’t want to distribute a 200MB+ binary. I have colleagues who tell me that c# scripting is so awesome. One only needs .NET installed or use AOT or whatever. Sorry but Go and Rust and good forgive a python script is smaller and mostly easier to read and write then most stuff I seen other languages shoehorning into. I have nothing against Java but it isn’t the right hammer for this problem. At least for me. And I wish people wouldn’t constantly strive for the single language for every problem mindset. Yes in a Java shop it might make more sense to write cli tools and scripts also in Java. But that doesn’t mean it is the most effective toolchain in the long run.

Using modules and jlink your Java image would be much smaller than 200mb. Full desktop apps with ui’s can get down to 30mb.

I’m confused by your disregard of C# AOT. It produces binaries as small as go or rust. 1.1 MB for hello world on linux.


The problem is that packaged Java CLI utilities will also take 20MB+. The minimum size is still much too big for that class of programs. Also, AoT compilation was an absolute pain last I tried it, it's a big change for an ecosystem that was always designed as modular and dynamic. I love Java, but for CLI apps I'll take Rust whenever possible.

But it takes ages to compile. Or at least that was my experience with .NET9 a few years back.

On WSL/Fedora 43, building hello world:

    > time dotnet publish
    Restore complete (0.4s)
      dn-hw net10.0 linux-x64 succeeded (2.4s) → bin/Release/net10.0/linux-x64/publish/

    Build succeeded in 3.1s

    real    0m3.571s
    user    0m2.784s
    sys     0m0.673s

    > time go build main.go

    real    0m3.309s
    user    0m8.864s
    sys     0m1.741s

Obviously I don't know how that translates to a non-trivial application.

Are you really a developer, because it sounds like you're conflating or confusing language technologies?

This ship sailed a long time ago.

Our Go CLI tools are like 100MB+ and often we bundle them in containers that are in the GB+ territory. Nobody cares or at least has cared enough to tell us to minimize stuff.


My SSD would like a word with you :) I don’t say every app needs to be in the kb range. But it is strange that applications for the terminal eat up multiple megabytes. I see the reason when this is statically linked though and one needs stuff like open ssl etc.

When ever I hear and see Mono Game I think back at the time I decided to dig a bit into XNA. I was a huge Xbox 360 fan and liked the idea of the indie platform they tried to setup. At the time the decision moving from Flash was either XNA in c# or Unity. Back then Unity used JS as a scripting engine. I wanted nothing to do with that. I also thought that MS is a saver bet. Well XNA is dead but the legacy lives on in parts in MonoGame. Unity well, would have been a better choice. But in end I had to work with Unity anyways be it not as a game developer implementing game logic.

As many, I got into programming as young boy thank to video games.

I remember one year, someone bought me an old book on game development. It was a book using DirectX 3.0. To this day, that was probably the most intimidating programming books I’ve ever read. I remember hearing about XNA at the time and it just made so much more sense to me.

I’ve tried a few times to get back into game development, but I don’t like most big engines. The opinionation of them doesn’t square with how my non-game dev mind wants to model things, and I’m too retarded for the math/physics involved in rolling your own engine.

I did briefly toy with monogame though during a period where I was unemployed. It certainly had me the most comfortable as someone who’s career prior had been enterprise .Net crap.

At this point though, game dev seems extremely tedious. I have much more interest in game design. I’ve considered picking up genetic coding just to try it out for that purpose.


I tried taking the train to Prague this year for my birthday. I’m from Berlin so taking the train made sense on paper. I could have taken the car but I thought that it might be more relaxing to just sit for the 4h or so it takes.

In Dresden we were told that they had issues with the power lines on the Czechia side and had to leave the train. It was still an hour to the border but seemed to be the best place to dump all the people and let them go the merry way the rest of the journey. The basic service was a printed paper directly out of the connection lookup system. No info if this connection is actually the best or makes sense since other travelers will be also on route. We had to switch trains 2 more times and arrived in Prague at around Midnight. Let’s say I really don’t want to take the train anywhere at the moment. Sidestory. Check the current state of the S-Bahn Service (run by DB) in Berlin. One wonder why they bother to announce issues with the system day in and out. They could just switch over and announce when stuff is running smoothly instead.


I setup my TV (LG OLED CX) with filmmaker mode in all relevant places and turned off a lot of nubs based on HDTVs [1] recommendations. LG has definitely better ways of tuning the picture just right than my old Samsung had. For this TV I had to manual calibrate the settings.

The interesting thing when turning on filmmaker mode is the feeling of too warm and dark colors. It will go away when the eyes get used to it. But it then lets the image pop when it’s meant to pop etc. I also turned off this auto brightness [2] feature that is supposed to guard the panel from burn it but just fails in prolonged dark scenes like in Netflix Ozark.

[1] https://youtu.be/uGFt746TJu0?si=iCOVk3_3FCUAX-ye [2] https://youtu.be/E5qXj-vpX5Q?si=HkGXFQPyo6aN7T72


Is that the same project shown in Die Hard 3? Where the truck driver enumerates the progress etc?


I agree. The example with Nicotine intake having a somewhat positive effect on the children feels too wild at the money. Think of all the kids of the 60th and 70th. They must be immune to most toxins ;). Yes I take this example to the extreme. I also feel that this could maybe contradict what we learned from evolution theory. Why would it take so long for a given treat to establish itself. Maybe I mix too much into one bag after reading this one article.


>I also feel that this could maybe contradict what we learned from evolution theory.

It doesn't, but the article doesn't go into this detail, so people unfamiliar with the field wouldn't understand why. The keyword is epigenetics. I.e. how certain genes become activated or deactivated through behaviour and/or environmental influences. But the DNA sequence itself remains unaltered. So no evolution necessary. There are basically a bunch of molecules than sit on top of your DNA that regulate gene expression. They don't just tell a cell to behave like a skin cell or a brain cell, they also regulate the entire cellular metabolism. The discovery that male sperm can also transmit this epigenetic information to offspring is relatively new, but now that we know that, it makes total sense that these gene-expression-modifying behaviours in fathers could affect their children. After all, they simply get to start with a good (or bad) bunch of epigenetic markers. They will not persist across many generations though, so it has no real long term effect on evolution. It may even be an evolved mechanism that allows organisms to respond to environmental changes on timeframes that would be prohibited by evolution.


Not all epigenetics is regulation of gene expression. The article says "these molecules transmit traits to offspring and that they can regulate embryonic development after fertilization" -- that's from the reporter, but I don't have faith that "transmit traits" is at all accurate--it certainly isn't true in the way that genes express traits. And then they quote an actual epigeneticist saying “We just don’t have really any understanding of how RNAs can do this, and that’s the hand-wavy part”


>that's from the reporter, but I don't have faith that "transmit traits" is at all accurate

It is pretty accurate, even if we don't understand all details yet. Here's a review article of the current research that's not from a popsci journalist: https://www.nature.com/articles/s41467-023-37820-2


That does not in the least address my concern. Again, "it certainly isn't true in the way that genes express traits".


You may be confused by the terminology, but that is literally what the word "phenotype" in the linked article means. Just in science-lingo.


> ”They will not persist across many generations though”

Why not? Is there some tempering mechanism on epigenetic transfer? I could imagine that some sperm-conferred epigenetic markers could continue down the male descendants unbroken.


If I understand both correctly, a better answer to your question than sibling post is that yes, that could be imagined, but your dichotomy is not mutually exclusive, and the process described here is much more related to variable conditions of the environment and the parents’ health at the time of conception rather than to the replicable genetic structures.


Because chromosomes in nuclei reproduce via very sophisticated and highly regulated processes; random epigenetic molecules do not.


Makes me wonder about how the two interact in the human phenomenon of generational oscillations


Speaking mostly from personal experience here, if a kid gets a suped-up liver from their dad's smoking habits, cool. But how many kids fathers stopped smoking when the kid was born? My point, the father's smoking habits may have passed down a strong liver but his continued use damaged the child's lungs and possibly more.

These mechanisms of epigenetic inheritance or whatever need much more study. It is far too early to draw any conclusions other than we need to keep researching.


If true, I suppose there is also a opportunity cost involved. Meaning selecting for better coping with nicotine, does not help selecting for smarter offspring and maybe even preventing that. So it might be somewhat positive but at a cost unknown.

Also there are the very known costs of nicotine damaging sperms, or of course being in literal smoke as a child (or adult) and deal with those real effects.


> They must be immune to most toxins ;)

Allergies and cancer are way up.

There’s multiple causes behind those, this is almost certainly one.


  >Think of all the kids of the 60th and 70th. They must be immune to most toxins ;).
60th and 70th what?? :)

But seriously though, "immune" is a humorous exaggeration, but I'm not sure we have data to rule out the idea that this cohort has increased tolerance to some environmental toxins.

So it's possible the level of harm we see today is already "post-" this protective effect, if any.


  > 60th and 70th what?? :)
GP means that from the 1960s to the 1970s many people in his part of the world were deliberately putting "toxins" in their bodies.

He means that the hippie generation and disco generation took a lot of drugs.


I figured, just a joke playing off their typo (hence the smiley).

There were plenty of non-"drug" toxins people were exposed to where levels peaked around that time — leaded gasoline, early food contact plastics with unsafe additives, pesticides that are now banned, etc. But thanks Nancy Reagan. ;)


Humans put toxins into their bodies for the entire history of humankind.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: