Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

9,663 karma · joined Jun 14, 2010 (16y ago) · 1,502 submissions

Submissions

comment 3y ago · link · parent

> Marx’s claim is that there are functional relations between technology and social structure, so that you can’t just combine them any old way. Marx was, in this regard, certainly right, hence the sociological naiveté that lies at the heart of Dune. Feudalism with energy weapons makes no sense – a feudal society could not produce energy weapons, and energy weapons would undermine feudal social relations.

This doesn’t do justice to the world building of Dune. Technology is very limited. Computers are banned (for good reasons), and using those energy weapons is also forbidden in most situations. Thus, combat is once again dominated by the kind of melee encounters that were also historically the domain of a trained warrior caste. All of this is explored in detail in the later books, which maybe the author hasn’t read? If anything, Dune deeply affirms that society mirrors technology rather than creating a simple “naive feudal sci-fi” world as claimed here.

I haven’t read much past that yet since the article is very wordy, and it’s hard to be motivated to push forward once you stop being convinced that the author has a point.

comment 3y ago · link · parent

> OS threads have a large pre-allocated stack, which increases per-thread memory overhead.

It should be noted that AFAIK on all modern operating systems, only one page of the stack is actually allocated on thread creation, and the rest is merely reserved address space that will be allocated on demand.

That doesn't make this point wrong: 4 KB is still a lot more than the couple of bytes a future might need. And setting up the page table is part of what makes spawning threads so expensive.

comment 3y ago · link · parent

> Personally, I think Haskell is approximately stuck in a local maximum, which can only be escaped by embracing dependent types

To give a counter point, there seem to be lots of small wins that aren't taken, possibly in part because people seem to wait for the big ideas.

Take partial functions like head: You can do what Haskell and Java do and throw an exception. Or you can have dependent types and statically prevent the function from being applied to an empty list. But the obvious and easy solution in the current language would be to return Maybe, which isn't done because there's a feeling that it's not a big enough step to be worth the effort, and dependent types will eventually solve this anyway.

comment 3y ago · link · parent

Many of these address "paper cuts". Individually, they aren't huge issues. But lots of small annoyances can easily add up and make a language not fun to use, and especially punishing for beginners. That's why some language communities prioritize fixing such paper cut problems. The Haskell community mostly doesn't seem to.

Another minor thing that happens to annoy me very much is how everything about Haskell's syntax and standard conventions is so diff-unfriendly.

To see what I mean, I picked the first "official" example I could find. Here are a few lines of code from the one of the examples in the Haskell playground (https://play.haskell.org/ -- it seems to pick a random one each time you load it):

    data Visitor
      = Member Profile
      | NonMember (Maybe T.Text)
      deriving Show

    data Profile =
      Profile
        { name :: T.Text
        , birthday :: Time.Day
        } deriving Show
You see Haskell code like this all the time, and the (IMO old-fashioned) lack of an optional trailing comma practically forces you into something like this. But just imagine inserting another variant to Visitor before Member, or removing the name field from Profile!

A more practically minded language might allow a syntax like this:

    data Visitor =
      | Member Profile
      | NonMember (Maybe T.Text)
      deriving Show

    data Profile = Profile {
        name :: T.Text,
        birthday :: Time.Day,
    } deriving Show
Bamm, each line is identical, editing is easy, diffs are clean. TypeScript, for example, has something like this for union types. Haskell unfortunately doesn't.

comment 3y ago · link · parent

Yeah, listing {AND, NOT} was a mistake — you’re right, you do need a constant.

My problem with p 🡑 ¬p ≡ 1 is simply that you need some (arbitrary) value p from somewhere. It’s not 1, it’s a unary function that returns 1. That just bothers me.

comment 3y ago · link · parent

It's a matter of definitions, but it always bothered me that functional completeness is defined so that it only requires the ability to produce any non-nullary function, not any function including nullary ones. That is, the set { NAND } is considered functionally complete, even though it can only produce a function that maps any input x to TRUE, and can't produce the value TRUE itself. As soon as you care about constants, which I think you should, { NAND, FALSE } or whatever isn't any more magical than { AND, NOT } or { XOR, TRUE }.

comment 3y ago · link · parent

That's more of a diary than an article -- jargony, disorganized, running in circles, very hard to follow. But the information might be important regardless. There's a strong implication that NIST with help of the NSA intentionally standardized on a weak algorithm.

We all know that's possible.

But can someone who follows some of this stuff more closely explain what the play would be? I always assumed that weakening public cryptography in such a way is a risky bet, because you can't be sure that an attacker doesn't independently find out what you know. You can keep a secret backdoor key (that was the accusation when they released Dual_EC_DRBG), but you can't really hide mathematical results.

Why would they be willing to risk that here?

comment 3y ago · link · parent

That Wikipedia section is uncharacteristically bad. It doesn’t even define or explain the notation, it’s just some examples and a long quote. I’m sure that there was more to it than that.

comment 3y ago · link · parent

Perhaps “As a large language model, I’m unable to…”?

comment 3y ago · link · parent

The ethics discussion in the neighboring threads aside, this approach has some nasty surprises, and I think it's borderline deceptive that they aren't mentioned more prominently.

It's not that rare that my REPL sessions e.g. in Node are

> perform expensive computation

... result ...

> transform result

... transformed result ...

With this approach, the REPL slows down quadratically with session length, and any expensive command at the beginning is executed over and over again.

Also, better don't do any file I/O and then continue the session unless you're prepared for the consequences.

comment 3y ago · link · parent

I noticed how prominently Apple advertised their recycled plastic watch bands and whatnot at their last announcement. That's great and all, but the thing that rubbed me the wrong way is that some of those products were made to look recycled, like the watch bands with the little color flakes, where the speaker implied that these flakes have random because they are the original color of the recycled plastic.

I have two issue with that.

First, someone would have to work very hard convince me that recycled plastic or not, those flakes aren't specifically tinted to look exactly the way Apple wants them to.

Second, and that's the important one, as soon as recycling becomes a fashion statement, the question about effectiveness begins to evaporate. Or more accurately, impossible to bring up without giving off the impression that one is against improving the environment. As soon as the important part becomes that things "look recycled", that's what the market will deliver, whether the thing is actually recycled in a way that provides benefit or not.

And who knows if the environmentally best recycling methods won't soon actually produce something that looks "cleaner" and thus looks "worse for the environment" than some faux recycled bullshit product.

comment 3y ago · link · parent

Just take a look at the official Rust logo: a rusty metal gearwheel. I think they moved away from the “fungus” meaning of the name years ago.

comment 3y ago · link · parent

Somehow I doubt it. If that were the case, we'd see a lot more effort to make the iPads true productivity devices, and a lot less effort to modernize Mac hardware.

comment 3y ago · link · parent

Yeah, block scoping is one of those "weird CS ideas" that I'm sure at some point early in Python's design was deemed too complicated for the intended audience, but is also quite a natural way to prevent some human errors. JavaScript made the same mistake and later fixed it (let/const).

comment 3y ago · link · parent

> It is still that type of model

“That type of model” are called transformers, not “like an LLM but small”. The fact that you didn’t know that doesn’t make it wrong.

comment 3y ago · link · parent

> It's a small, fairly dumb LLM.

I have no idea whether you really don’t know what “LLM” stands for or are just trolling. Not calling it an LLM actually is more honest marketing precisely because it’s small, and “transformer-based model” is a precise technical description that everybody with even superficial knowledge of the field understood immediately.

And I’m actually onboard with most of your other examples. I’d include “all-day battery life” as another empty marketing term that doesn’t really say much.

comment 3y ago · link · parent

And interesting test. I didn’t see a mention of the temperature setting used. Temperature controls the probability to pick a token that isn’t the top prediction, which leads to more creative/less robotic results.

For actual input prediction, you probably want the temperature to be zero. But even a model as good as GPT-3 becomes very boring and repetitive with those settings.

comment 3y ago · link · parent

Harder than getting it out of a lightning port? Because that's not too easy either.

comment 3y ago · link · parent

They all have the same coach that tells them it looks energetic.

They also all have the same script writer, and they all *emphasize* *words* in the *same* *powerful* *exciting* *way*.

I'm old enough to remember that Apple presentations, while being clearly marketing exercises, used to be a lot more organic and flowing.

comment 3y ago · link · parent

I think mindset plays a role as well. Back in the day, there was a restraint on adding features, at least when they would make the logic more complicated for only a tiny or imagined benefit. Part of that was memory/storage limitations. But I think the pursuit of an abstract idea of elegance was equally important. After all, these systems were primarily written for other computer people.

This idea is completely gone from the world of software engineering. Systems become overloaded with the implementation of every crappy idea under the sun -- if a PM in a fever dream can think of it, and an overworked dev can hack it together, it goes in.

comment 3y ago · link · parent

I'm responding to a comment that claims all lifetime issues are solved by RAII.

My argument was that for efficient code, you need to pass references or pointers, which means you do need to care about lifetimes.

And your argument is that's not true because we now have std::string_view? You do realize that it's just a pointer and a length, right? And that this means you need to consider how long the string_view is valid etc., just as carefully as you would for any other pointer?

comment 3y ago · link · parent

You have two choices.

Either you write code with good performance, which means that functions do take references and pointers sometimes, in which case you do have all of the usual lifetime issues. This is the proper way to use C++, and it's perfectly workable, but it's by no means automatic. That's the reality that my comment was referencing.

Or you live in a fantasy land where RAII solves everything, which leads to code where everything is copied all the time. I've lived in a codebase like this. It's the mindset that famously caused Chrome to allocate 25K individual strings for every key press: https://groups.google.com/a/chromium.org/g/chromium-dev/c/EU...

comment 3y ago · link · parent

I believe so, yes. I think it's somewhat likely that mathematically minded people would come up with that idea independently -- it's essentially Platonism taken to its logical conclusion.

For reference: https://en.wikipedia.org/wiki/Mathematical_universe_hypothes...

comment 3y ago · link · parent

I agree that memory management can't be solved locally. The situation in C++, where every library or API you use has a different cleanup convention, that you need to carefully read about in the documentation to even properly review a pull request, is proof of that.

I disagree that this criticism applies to Rust. For 99% of the cases, the idiomatic combination of borrow checking, Box and Arc gets back to a unified, global, compiler-enforced convention. I agree that there's a non-trivial initial skill hurdle, one that I also struggled with, but you only have to climb that once. I don't see that there's a limit to program complexity with these mechanisms.

comment 3y ago · link · parent

You also grew out of an immortal cell. Are you a form of cancer?

comment 3y ago · link · parent

Many regular events are scheduled "indefinitely" into the future. Do you really think that when the US changed its DST rules a couple of years back, any of the regularly scheduled weekly meetings were happening according to the old rules?

comment 3y ago · link · parent

> You want three pieces of information, a date, a location and a local time. Note that I do not think you actually want a time zone, what if you are not in London and that place gets moved into another timezone?

Theoretical arguments are nice, but in the real world, meetings are regularly scheduled were one or all people aren't physically at the location, say the company's headquarters, but the local time zone and its DST shifts are obviously still respected.

comment 3y ago · link · parent

> You may make production use of the Licensed Work, provided such use does not include offering the Licensed Work to third parties on a hosted or embedded basis which is competitive with HashiCorp's products.

> A “competitive offering” is a product that is sold to third parties, including through paid support arrangements, that significantly overlaps the capabilities of a HashiCorp commercial product.

We all get what they're trying to do. The bad thing is that this isn't only overly broad, but a moving target. I looked at HashiCorp's product page, and they're building up a wide portfolio of IaaS tools. Those are such fundamental tools that even if you're not a cloud provider at all, you're likely to have an overlap in "capabilities" at some point. IMO, IANAL and all that, that's a significant business risk for anyone using Terraform, for any purpose.

comment 3y ago · link · parent

The problem likely isn't what the compiler produces given the semantics of a piece of code, but rather what you'd do with data structures and memory layout if you'd target the 6502 directly.
1
121314
51