HN user

NanoCoaster

88 karma
Posts0
Comments52
View on HN
No posts found.

Hi, thanks for answering :)

Collection expressions made the language more coherent. Instead of 7 different ways of doing things (some of which were genuinely not efficient), we gave one uniform way of doing it.

I see your point on this. My dislike comes from a mixture of "I don't like how it looks" and "this language already has tons of features".

In terms of looks, I wish it could be more coherent with existing syntax.

List<int> = new {1, 2, 3} and List<int> = {1, 2, 3} are obviously taken up by anonymous types and blocks themselves. Would something like

List<int> = new(capacity: 10)[1, 2, 3]

have been possible? It feels like a combination of target-typed new and the initialization syntax. It involves the "new" keyword, which everybody already associates with constructor calls. It's short. Obviously, I don't know if this even works, maybe there's a parsing issue there (aren't those the most annoying issues in language design haha).

they found it understandable

Kind of in my experience. Me and the people I've shown this to can easily remember it, but we all agree that it doesn't look like obvious syntax to them. Those two things are quite different to me. Contrast this to something like target-typed new, which immediately made sense to the same people. One might argue that that's fine enough and maybe it is, but I think, the less I have to remember about a language's syntax, the better. I'm going to have to remember many many other things anyway, better keep my memory free for the details of SynchronizationContext and async flow :)

I'm obviously aware that you get tons of bikeshedding comments like this all the time, so I'm sure you've gone through this. But to me, this invented syntax would have been fine. I just don't like the one that actually got in.

Now, the necessity on the other hand: May just be the company I'm working at, but my personal experience has never been that this is a big issue. Sure, it's nice to not have to fall back to explicit initialization a few more times. But personally, this doesn't pass my threshold of "painful enough to warrant additional syntax".

That's the core of my issue: Most, maybe all, of the new features in the language are fine to me in isolation. I may bikeshed about the explicit syntax (see: this thread). But my main issue is that the sum of complexity in the language and the issues beginners have when learning it are steadily increasing. I see this all the time at work.

As you said, this is definitely subjective. And in the end, language design is a very subjective process and maybe C# just won't be for me in the long run. But I wish it would, because at its core I like it, and .NET, a lot. Which is why I will continue to speak for my (subjective) viewpoint.

Well, this turned into a bit of an incoherent rant. I appreciate you exposing yourself to the HN acid pit ;)

AFAIK it was a much more down-to-earth thing. The implementation of computation expressions in F# compiled down to lots of function objects that were not very GC-friendly. Or something like that. To be honest, I never looked that deeply at it :)

Looking at it, the MS docs contain something about this exact topic, so maybe it's better nowadays: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...

Sadly, I haven't used F# for years at this point so I can't speak to the current state.

No, this is just a constructor call, it's purely syntax sugar for the new() way of doing it.

I'm also not sure that something not being intuitive or natural is necessarily a bad thing in of itself. You state it as if it's so, but you haven't demonstrated that this way of defining a list is worse.

I would argue that a language having more features, without the feature being helpful, is a bad thing in itself. If the syntax isn't necessary or very convenient in many cases, it shouldn't exist. The syntax being natural (which, absolutely, is a very subjective thing) just makes it less of an issue, I'd say.

Every new syntax added to the language adds cognitive overhead to readers of code. But also, it adds possible interactions with other language features that may be added in the future. Now, the example I brought up doesn't really concern the second point, I'll concede that. But unions? That is a big concept to add to a language that already has decades of existing conventions and tons of other features. How will they interact with generics? Nullable reference types? And, just as importantly: How will they interact with any other features that might be added at some point that we don't even know about?

I'm not against adding syntax sugar. For example, I quite like primary constructors, which is another relatively new C# feature. I think it's a bit annoying that they were kind of added in a roundabout way, by first adding records and then adding primary constructors to classes, but this time they don't define properties but fields...but in the end, it's a nice convenience feature when using constructor injection. Which, whatever one may feel about this, is pretty common in C# code.

But the thing is: If every single feature that's nice for a few use cases gets added to a language, the language will explode. The best example for this is C++. C# is definitely not that bad, far from it, but my point is that I want it to stay that way :)

I guess I overdramatized the situation a bit :) It's a passionate topic for me; as somebody who has been using C# at work for 10 years now, I'm just not happy with the direction the language has been taking.

You're right, it's not impossible and in general it's not among the hardest languages to teach. But I would argue, it is heading that way.

There are already so many ways to do things in C#. For example, try explaining the difference between fields and properties; sounds easy, but making it really stick is quite a challenge. And that's one of the simplest cases (and a feature I'm 100% in favor of).

And you will have to explain it at some point, because real codebases contain these features so at some point, it'll need to be taught. Learning a language doesn't stop when you can write a simple application, it continues up until at least you're comfortable with most of its features and their practical use. The quicker one can get people to that point, the easier the language is to teach, I'd argue.

One might also argue that learning never really stops, but that's beside the point :)

In general, my issue isn't any specific feature. C# has many features that are non-trivial to learn but still great: value types, generics, expression trees. Source generators are relatively new and I like them! I like most of the things they're doing in the standard library or the runtime. Spans everywhere is a nice improvement, most new APIs are sensible and nice to use and the runtime just keeps getting faster every release. Great. It's more the pure C# language side I have an issue with.

But every language has a budget of innovation and cognitive load that you can expect people to deal with, and C# is not using its budget very wisely in my opinion.

Haha, yeah, maybe :)

I would've loved an F# that found a way to improve on the performance issues, especially when using computation expressions. That and, either, a deeper integration of .NETs native OOP subtyping, or some form of OCaml-like module system, would have been enough to make it an almost perfect language for my tastes.

Obviously, these are big, and maybe impossible, issues. But Microsoft as a whole never really dedicated enough resources to find out. I feel for the people still working on it, their work is definitely appreciated :)

I'm 100% on board with the [] syntax. I'm not on board with adding the syntax for passing arguments to the constructor within that syntax.

I agree that = [] is perfectly fine syntax. But I would definitely argue that:

[with(capacity: values.Length * 2), ..

is non-intuitive and unnecessary. What other language is there that has this syntax? Alternatively, is this a natural way of writing this? I wouldn't say so.

My main language in my free time is Rust, a few years ago it was F#. So, I'm absolutely open to other syntax ideas. But I feel that there has to be a direction, things have to work together to make a language feel coherent.

Another example would be Clojure, which I started learning a few months ago (before we all got swept up in AI FOMO :D). Clojure as a language feels very coherent, very logical. I'm still a beginner, but every time I learn something about it, it just makes sense. It feels as if I could have guessed that it works this way. I don't get that feeling at all in many of the new features of C#.

The example you point out is the advanced case, someone only needs in a very specific case. It does not have a lot todo with learning the language.

I disagree. When learning the language, you're going to have to read other people's code and understand it. It's the same basic principle, but, I'd argue, much worse in C++. Yes, in theory, you don't have to understand SFINAE and template metaprogramming and (now) concepts and all those things. You could just work in a subset of C++ that doesn't use those things. But in practice, you're always going to have issues if you don't.

Absolutely agree. Modern C# language design feels very much lacking in vision or direction. It's mostly a bunch of shiny-looking language features being bolted on, all in ways that make the language massively more complex.

Just look at this feature: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...

Was this needed? Was this necessary? It's reusing an existing keyword, fine. It's not hard to understand. But it adds a new syntax to a language that's already filled to the brim, just to save a few keystrokes?

Try teaching someone C# nowadays. Completely impossible. Really, I wish they would've given F# just a tenth of the love that C# got over the years. It has issues but it could've been so much more.

Oof, that's disappointing to hear. Thanks though, that's actually quite interesting.

I'm also thinking of keeping an android phone purely for auth purposes, separate from my main one. The world's most overengineered (and probably also less safe) Yubikey.

If you read French

Let's see how far my five years of French at school will get me. I'm not getting my hopes up ;)

Will eIDAS be the only way to identify yourself in cases where it's needed, or will we be able to user other mechanisms like the german ID card stuff or an entirely separate alternative?

Or to put it another way, is a smartphone required? If not, that would already clear up a lot of issues, I think.

EDIT: Whoops, just saw the answer to another comment asking precisely this. So it's not a requirement. Good. Is there a legal framework that ensures that this remains the case? Otherwise, I fear it will become a de facto requirement over time.

I'm not sure either. I've looked at this other document: https://bmi.usercontent.opencode.de/eudi-wallet/eidas-2.0-ar...

It seems to imply that the already existing way of authenticating via eID, which is the auth chip present on our ID cards, will still work, if I read it correctly? I understand OP's link to refer to a new, alternative system, that can be used without the ID card.

But take this with a grain of salt, I'm not very well informed about the whole topic.

Because there are other factors at play. No-till is mostly about sustainability of farming. Humans often don't optimize for the most sustainable option but for the option that's most profitable (or perceived to be most profitable) _right now_.

Tilling and using crazy amounts of mineral fertilizer definitely improves yields. But it will, in the long term, also kill agriculture to a large extent if we're not careful. We're not talking about highly speculative outcomes here: The data is pretty clear and everyone with even a large pot and some soil can run the same experiment at home and come to the same conclusions.

Farmers need to survive, they need to earn money, they will obviously optimize for short-term yield. We shouldn't judge them for this, but we _should_ find ways to solve the issue, ideally together with farmers.

Oh, great to see this on HN! I found Filmulator a few years ago and used it for most of my raw photography (which, admittedly, isn't a lot) and found it amazing. Exactly what I wanted. Streamlined, easy to get into, fun. And I really like the way my pictures come out at the end. Thank you for your work :)

Sizing chaos 5 months ago

Reality is that most women buy based on looks and not practicality. I really had not heard before your comment any women complaining about small pockets.

I've had the exact opposite experience. I've heard this complaint many, many times, and for good reason because it really is laughable.

Reality is that most women buy based on looks and not practicality.

Well, it's a tradeoff, isn't it? As a man, I also wear a (fake) leather jacket that has some fake pockets and I complain about them, because they're dumb and unnecessary. Still like the look of it, which is why I bought it, because it's not a -huge- issue.

To put it another way, why couldn't you have both? Why not have good-looking clothes that also have proper pockets? That's the really ridiculous part about it.

Also, there's a third variable you didn't factor in at all: Comfort. It's not enough to produce clothes that look good, they need to fit as well...which is exactly what the article is about.

So now you need to find clothes that are at least mostly comfortable, look at least okay to you and have proper pockets. And that is the point where you're really going to have a hard time in women's clothing and that's why a lot of the time, women will take the more comfortable, better-looking option. 2 out of 3 at least. But the fact remains that the pockets are completely idiotic.

People have lost faith in us.

That's a very powerful way to sum up what I've been feeling for a while.

People did lose faith, and to be honest, I can't really blame them. From a layman's perspective, it's not obvious that there's a distinction between "Big Tech" and other so-called "providers of services" (the term itself feels kind of icky) in the internet. Throw the "Tech Bro" term in there and things get even more difficult.

I'm guessing a lot of people never really knew about forums, chat communities and other things like that existing outside of the big social media companies' mostly-walled gardens. Maybe they heard some scary things about 4chan, well, that'll help.

To many of them, it's the little man vs. the big tech companies that skirted regulations for way too long. That there's a possible third party (or rather, category) involved is not obvious from the outside.

There's a difference between web technologies and "the web" as an amorphous philosophical construct. Web technologies, as you stated, are obviously doing just fine. I'd argue the latter isn't. To be more specific, the latter as it was envisioned (in a way that I, and I speculate, GP also still subscribe to) 20+ years ago.

Minecraft modding is also unofficial (you still don't have code or an API, you have to decompile! you do have datapacks but those can't do shit compared to proper modding)

Not quite, I'm working on a Minecraft mod via Fabric at this time and you actually do just write code. You may want to decompile to look at the original code, but that takes one command, because people have already set up scripts to do all that. They also automatically apply source code mappings which give a lot of the decompiled code proper variable & function names.

Obviously, it's not official support and you're doing weird aspect oriented programming with what they call mixins, and its sorta hacky. But there's an API, it's just not made by Mojang. Which, honestly, may be a good thing lol

Even if you can theoretically modify many things, most users won't go and whip out a development environment on a whim, they'll just give up

Yeah, absolutely. I was more talking about the state of modding and availability of mods in general, from a mod user perspective so to speak.

But I agree 100%. I'm fine with the ceremony, but the more people can get into modding easily, the better. To that point, I remember buying Crysis, poking around in the game file for fun and finding that they shipped the whole Cryengine level editor with the game and, what's really crazy, you were able to open the actual level files of the actual game with it.

That was mind-blowing to me. You could look at all the -horribly unmaintainable- visual scripts that defined enemy behavior - and change them. You could change the terrain. You could add the damn tornado they put in the game, which wasn't just a scripted sequence but actually hurled stuff around physically. And then you could...just play it, with your changes, right there.

Out of that grew a small, but fun modding scene with people building custom campaigns or just pretty-looking levels to walk around in (Strange Island, my beloved), considering the graphics of Crysis at the time. Also, my love of programming and tinkering with software pretty much started with this discovery :)

It's not quite the same as what you're describing, as they obviously didn't include the source for the engine itself, but I think it's still comparable to an extent.

So yeah, I'm with you on that. Do you have anything to share regarding your project? Sounds pretty interesting to me.

long gone are the days of games with actual modding support

I'll disagree here. Kerbal Space Program, Rimworld, Minecraft all have gigantic modding communities, just to name a few. There's many, many games like that. In the case of Rimworld, it's official support and in the case of Minecraft it might as well be at this point.

where you had a dll src with the game

Agree :) But I don't see how that pertains to moddability in practice. In many cases, the existence of standardized modding APIs instead of everybody just poking around in the game's source is actually an upside, as it makes interoperability much easier.

I also agree with the malware side, at least for the time being. At some point, we'll probably have to deal with this and I don't mind starting the technical side now, but I don't subscribe to the idea that mods are riddled with malware.

Matrix v1.15 1 year ago

There's cinny, which is a pretty polished Matrix client that is very, uh, inspired by Discord in its look, that might soon add voice rooms: https://github.com/cinnyapp/cinny/pull/2335

I played around with this implementation and it's looking pretty good. Not there yet, obviously, but we're in the ballpark I'd say. Obviously, there's lots more to Discord than just voice rooms and a similar-enough UI. But we're slowly getting there.

Not a question, just wanted to say I'm a big fan of your blog and have been binge-reading it in recent times. I really enjoy the way you explain concepts like transistor types, digital logic and chip design in a way that even somebody like me, who's still pretty new to this low-level look at hardware, can understand. I also appreciate that you sometimes use the same intro or explanations in multiple blog articles, so readers can just pick up whatever they're most interested in and don't have to go through everything that came before.

Ah, I do have a question: Any chance of an article about the Gameboy CPU someday in the future? :)

I'm writing an emulator for it at the moment and find it to be quite an interesting chip from this perspective - such a weird crossover between a 8008 and Z80 (if I remember correctly).

Fancy. Think I'm gonna go with a traditional bridge for my usecase, but this looks pretty cool. Maybe I have some other uses for it for other applications.

Thank you :)

I always assumed that the VPN connection is shared by many HTB users, so it seemed like a good idea to be a bit paranoid about the trustworthyness of a VM that is reachable by lots of users that may want to mess around. Maybe I was wrong about that assumption :D

Anyway, apart from this possibly impractical usecase, it just seems like an interesting problem.

I'll just go with a standard bridge + ip/nftables setup then. Thanks for the input.

If you don't mind, I have a specific question regarding this setup. I've been looking into getting into pentesting, mostly for fun. I decided on messing around with HackTheBox as a starting point. Seeing as you need to connect to their VPN, it seems like a good idea to me to separate this activity from my personal network.

Which networking setup do you use for your pentesting VM? Ideally, I'd want a setup where the VM can access the internet (and therefore the HTB VPN), but not anything inside my local network. But I don't quite know how I could achieve that, at least in a way where I'd trust it to be reliable. Maybe the whole idea's a bit too paranoid to be practical in general, I don't know, so I'd love an expert opinion on this :)

Usually, I'd be using QEMU, but I'd be fine with using VirtualBox for this case if it includes something that makes this easier.

Definitely recommend Turing Complete. I've been playing it off and on over the last few weeks, just finished the first working CPU. It includes small hints and solutions for most levels, so if you get stuck, you'll always have a way forward. The interesting thing is, for a lot of levels, you can just google the component you're trying to build and use actual logic diagrams as guidance.

The game makes the whole topic a bit easier to grok with its visuals and the ability to step through your circuits when they're running. So, great fun. But beware, if you've been bitten by Factorio addiction, you might be in danger of missing a lot of sleep :)

Also, as some other comments mentioned, I highly recommend the Zachtronics games. Exapunks is amazing. But they're quite different, they're more like puzzle games about programming.

I don't know what parts of western Europe you're talking about, but in Germany, cyclists absolutely make left turns all the time. Also, drivers are taught about this in driving school, so they will (or should at least) expect cyclists to be there.

For the record, I personally prefer crossing twice as well. But I'll disagree with "western Europe".

Alternatively, just let people mod their games as they please.

I see your point and you're not wrong, but people have different priorities and playing video games is a hugely subjective experience anyway. Yes, adding a sentence or two about how the game may not look and feel as intended could be a nice idea. But it's not _wrong_ to change it, if that's what you prefer.

I've played Morrowind vanilla and with loads of mods (including graphical improvements) and I honestly liked the modded one better. Just personal preference.

My experience with the Germans not wanting to speak German with you while you stumble over everything, is simply that they want to exercise their own English, and its just not as fun for them to wait for your marble-mouthed nonsense to parse. ;)

As a German, my reason for switching to English quickly was always along the lines of "oh no, they're struggling to communicate with me! I feel bad. Let's make it easier for everyone and switch to English".

This applies especially when talking to English native speakers, but, weirdly enough, also for others - I feel better when I also have to suffer by talking in a non-native language. Doesn't really make sense, I know :)

I've talked to other Germans about this a few times and many of them agreed that this was their way of thinking in these situations.

I get that this behavior can come across as condescending and I absolutely understand the frustration about it when trying to exercise one's German skills. So nowadays, when this happens (which is quite rare anyway), I try to just stick to German.

I'm a bit puzzled why people would learn German out of all languages anyway, apart from living here obviously, so I'm always happy when someone does.

Also, I obviously can't speak for the whole German population and sadly there's definitely some xenophobia to be found wherever you look.