HNHacker News
TopNewBestAskShowJobs

the-smug-one

841 karma · joined August 10, 2020

Not actually smug, at least not on purpose.
submissionscomments
the-smug-one··on Switching from C++ to Rust
struct List {}; struct Cons : public List { Cons(int v, List* nxt); int v; List* nxt; }; struct Nil : public List {};

This is how you'd do it in Java.

the-smug-one··on “Here's the number I used to win the lottery“ –Entrepreneurs giving advice
The album in general holds up well, good stuff.
the-smug-one··on 90% of Kidnappings in São Paulo result from dates on Tinder and similar apps
You're on HN. You're probably rich relative to the would-be robbers in Brazil.
the-smug-one··on Daniel Stenberg and the home of curl in Stockholm, Sweden
Isn't that just one side of the coin? The other being hardware compatibility.
the-smug-one··on “Clean” code, horrible performance
I don't see how the code snippets presented are less maintainable.
the-smug-one··on The Philosophy of Computer Science
>computational systems

It doesn't say computers. Untyped lambda calculus is a computational system. You've just misinterpreted the text.

the-smug-one··on Plant-based meat is turning out to be a flop
Haha, do you believe that olive oil isn't made on a large ("industrial") scale? Or lard, or tallow, for that matter. Man, this is just more FUD, scientists aren't arguing about this, shitty fitness influencers are. But hey, I do hope that you live to 90 or above, cool goal. I just hope you don't waste too much time listening to Joe Rogan. I'm not gonna waste more of my precious (and I guess to you very short) life on this. For science based fitness advice I like Stronger by Science, but I've also heard that Barbell Medicine is good.

Cheers.

the-smug-one··on Thonny – Python IDE for beginners
Awesome, the debugger is exactly what I believe a beginner needs. And the variable -> value lie which can then be extended to variable -> address -> value, EXCELLENT! This is literally how I teach programming. I'm not a teacher, though, just got friends who want to learn.
the-smug-one··on Major standard library changes in Go 1.20
OK, do you intend to say why?
the-smug-one··on Anthropology in Ruins?
I don't buy the way you're constructing your argument! You're saying that both party A and party B wants to "abuse the science for political or commercial ends". But the political ends of party B is to prevent the destruction of their native lands, including the historical artifacts within that land, by party A. One of these is defensive, only abusing the system to prevent destructive abuse, and one is offensive.

>Let's just fight abuse of the science.

We'd all love this, I think. But what about before that? I don't think it's in our interests to not use the rules to our advantage before a new ruleset (that's non-abusive) has been put in place.

the-smug-one··on John Carmack Leaves Meta
> It is possible that they don't speak English as a first language

This is more of a fun side note: It's more likely that they're a native speaker. People who learn English as a second language generally don't make the their/there mix up.

the-smug-one··on After 20 years the Dwarf Fortress devs have to get used to being millionaires
Do you also experience mouse input lag? My input is constantly dropped. Test drawing ("free-hand" mode) a line of mining quickly. Are any squares missing?
the-smug-one··on What comes up when you flush
>You pee on a metal sheet? Fascinating. Does nobody wear shorts in Sweden? ;-)

Average bar urinal: https://www.sweppomn.se/wp-content/uploads/2020/02/14800038_...

Also yes, we do wear shorts, that's how no one sees that we've peed on our own legs :-).

the-smug-one··on What comes up when you flush
I seriously have no clue whether you guys are being sarcastic, do you actually not close the lid before flushing? Also, public toilets with lids is the majority of cases in Sweden. And peeing on a metal sheet also releases particles, so who cares about the urinal.
the-smug-one··on GIMP Turns 27
"Øyvind Kolås raises funds for his work on GEGL, GIMP’s new sophisticated image processing core. This work is crucial to implement features such as non-destructive editing in GIMP, including features known as adjustment layers and layer effects in similar software. Øyvind is the GEGL maintainer and its primary developer who has been working on it since mid-2000s. "
the-smug-one··on Emacs Lisp shorthands as namespacing system
Right-click -> Show source
the-smug-one··on The Rune Programming Language
So there's also reveal() primitive for revealing secrets, as shown by the code for msqrt(). OK, Rune gives you a library for computing stuff in CT, but how do I implement something independent of these things and show that they are CT? Do I still need to rely on FM techniques such as relational symbolic execution? Can I jump into a "constant" mode with a special typing system or something that lets me do this without having to run a more costly verification?
the-smug-one··on UK government ban for Chinese Hikvision CCTV cameras
Or they're companies which are located in a country where the state can and do put heavy pressure on the companies with no real recourse for the companies. It's not really strange to me that we'd prevent Hikvision cameras from being used in any sensitive context.
the-smug-one··on UK government ban for Chinese Hikvision CCTV cameras
Or you just buy Axis which are produced in Sweden, Thailand or on Czech republic[0] and don't worry too much: https://www.axis.com/

[0] https://ipvm.com/reports/axis-china

the-smug-one··on Valve Introduces Proton Next
I'm sure GOG would care if they had more resources. Valve's push into Linux is because Microsoft is making a big push towards there being a single walled garden store: Microsoft's. Valve is doing this ultimately to benefit themselves. That's of course the case with GOG too, but GOG has very little money to put into any sort of Linux push so they have to lean on Valve's investments.
the-smug-one··on Warren Buffet and Charlie Munger on crypto in 2018
Google term: central bank digital currency

For example, Sweden: https://www.riksbank.se/sv/betalningar--kontanter/e-krona/

the-smug-one··on Fred Brooks has died
The why should be clear from the domain that you're working within. A line of comment should count as something like 10 lines of code, if you're reading a comment then you're treading into real complexity. If you're in a code base where that isn't true, then is the comment really necessary?

Fairly hot take from me, life is more ambiguous than that :-).

the-smug-one··on .io Domains Considered Harmful
It would've been good if the article brought up the real consequences of buying an .io domain, outside of pure optics for those who are in the know. Supporting ethos, I guess?
the-smug-one··on Barilla passive cooker
Where's the energy loss from the kettle that's not present in your proposed method? Legit asking, I don't see it. Just heat radiating from the body of the kettle for longer cuz of longer time to make it boil?
the-smug-one··on Gross domestic product is a misleading measure of national success (2014)
To be dim-witted just means stupid, hasn't got to do with wit.
the-smug-one··on Stop Writing Dead Programs
All of those are dynamic properties of one running system, what if I pass in a different set of starting state to it? Will it allocate more objects then? Are any of the methods unused? Well, maybe it is now, but maybe we'll redefine a method at runtime to call the previously unused method.

> As a sibling comment points out, by definition a live system can do everything a dead system can and more.

"Can do" is not the same as "we can say about", see my response to sibling.

the-smug-one··on Stop Writing Dead Programs
> Well categorically yes because an alive program has every capability a dead one has, including the ability to mimic “dead” one.

No, they do not. What they are lacking isn't in what they can or cannot execute, it's what we can say about them. If your PL has eval, then you don't know if foo is ever called or not, for example.

I'm not interested in talking about the currently running instance of a program, but all possible running instances of it.

the-smug-one··on Stop Writing Dead Programs
Why can't our programs be dead but our tools alive? Having a static and full world view allows your tools to do a lot more. An alive and very dynamic program allows you to run fine-grained strands of control flow, a dead and static one allows you to run coarse but large amounts of strands of control flow. Let me ask more complex queries, don't give me this hand-rolled LSP crap.

Here are some things that I've done/found out manually that I want my IDE to do for me:

1. General inter-procedural analysis queries: - Does anyone pass in null? - Is X set in each path that can be taken? - Take a theory, for example numerical ranges, what can you tell me about this function? - Is this probably a hot function? - Are any of these sum type ctrs unused?

2. Show me counter-examples of things I believe about the code, don't force me to find them myself.

3. Predictable, but non-standard (not pre-rolled by IDE), refactoring. I had to grep and do an Emacs macro that went through the list of matches, one execution at a time. Why can't the IDE record my actions, show me the AST transformation that I did, and let me apply them for some qualifying criteria across the whole codebase?

4. Let me apply semantically equivalent code refactorings within a function by picking cost-based heuristics. For example, "flatten indentation levels".

5. Do coarse-grained semantic analysis for me, "are these the same on a type-level? OK, now apply this theory, still the same? Aah, I'm about to go for lunch, just run the whole analysis".

6. Let me save any thing I've done, so that I can use it in the future

Something like that, that'd be great. I have 128GB of RAM and like 64 CPU cores and I'm using my brain on this 1M+LoC codebase while they sit idle. Lazy bums, I tell ya!

the-smug-one··on Stop Writing Dead Programs
Are you talking about this? https://youtu.be/8Ab3ArE8W3s?t=2190

It's not inserting images into the code. It's a structured editor presenting an alternative view of the code. It's just code. That's all there is to this. Man, frustrating.

the-smug-one··on Sweden’s incoming cabinet says new nuclear reactors will be built
If anything's good about renewables is that they can be quite small scaled. I think it's cool that I can be an energy producer just with my roof, plus decentralized generation = better security.
← PreviousPage 6 of 11Next →