Better HN
topnewbestaskshowjobs
Log inSign up

MathMonkeyMan

2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions

Submissions

comment 3y ago · link · parent

A lot of celebrated software began as a guy in a room, and later was adopted by others because they thought it could solve their problems. The software never would have existed in the first place were it not for the lone person in the room.

unix, linux, git, perl, python, c++, javascript, clojure, grep, winamp, ...

If software is constrained to resemble the communication structure of the organization that produced it, well then programmer politics are _boring_, while an individual's mind is _novel_.

comment 3y ago · link · parent

What bothers me about CMake is that I don't know how to use it and I can't find anybody who actually does.

Seems like CMake configurations just kind of "happen" by trial and error, perhaps starting with a configuration copied from another project. It's not a language, it's a thing that you hack on to get the job done.

Another gripe is often when I look up "how to do X in CMake," the docs refer me to a feature that is more recent than the CMake packaged in common distros and for which there are few (no?) real world examples.

If somebody has a more constructivist approach to CMake, I'd like to try it.

comment 3y ago · link · parent

Suppose you're a big company with a ton of C++ code. You're never going to rewrite it all. It wouldn't even be a good idea.

If only there were a way to write new code in a new language, mostly unconstrained by the long history of C++, but let the two languages share a toolchain, and maintain a logical interface compatibility layer. Not just linking the same ABI, but compatible types, functions, meta-functions (templates), etc.

Then you could implement all of the features and static checks of your dreams, and modify the language and its implementation to make those features/checks more powerful and easy to implement.

My guess is that's the idea. If you weren't a huge company with zillions invested in countless lines of C++, you wouldn't need to consider this. And, regardless, it's a neat idea.

comment 3y ago · link · parent

4. No carry-ons. I wonder if there's anything useful that could be done with the space.

comment 3y ago · link · parent

I never thought of it as a class dig.

Factory line worker, why aren't you a manager yet? It's your fault we think less of you, see?

comment 3y ago · link · parent

> I understand your point if you are speaking in literal terms about just simple cons cells, but in practical Lisp/Scheme code, you don’t really rely on just the basics to do things.

Agreed.

> So what about streams? Functions? Closures? Call/cc structures?

Those are interesting examples. They are all data structures in a sense (especially streams and closures), but to me they are more like functions than data (yes, yes, functions are values, blah, blah). Call/cc is a reification of execution control; thinking of it in terms of data stretches my brain.

comment 3y ago · link · parent

Marx thought that technology would ultimately make production so cheap that laborers would rise up, but that hasn't quite happened.

comment 3y ago · link · parent

This feels like a good point, but then again I skimmed after the first few paragraphs of the article. Does that say something about me, or is it really just bullshit? (no offense to the author)

comment 3y ago · link · parent

Not enough, but it helps.

comment 3y ago · link · parent

It'd be nice if we had system-level "lightweight threads." The explanation I've heard before is that "user space knows more about the program." So people write clever runtimes that do kernel-like task scheduling multiplexed over CPUs, in user space.

I can buy that. Think about a system thread. It's pretty much its own process that shares an address space with others. Its interface is syscalls and memory. A user thread (coroutine, goroutine, greenlet, whatever) is... whatever you want it to be. It can be small and special-purpose.

comment 3y ago · link · parent

I haven't read much about them, but it looks like they can be driven by any event-loopy thing. It's not like creating a coroutine creates a thread.

https://en.cppreference.com/w/cpp/language/coroutines

comment 3y ago · link · parent

You can get paid more, or the value can be passed on to shareholders. Depends.

comment 3y ago · link · parent

This speaks to the "labor" argument made above. More efficiency means harder work, but it must also be less work, unless we are trying to extract more from workers.

OTOH, it might not be so bad to extract more from workers. More money and all.

comment 3y ago · link · parent

> This is also a case where consumers say they want one thing, but their behavior is a different matter. For example, pretty much everyone says they prefer the full price to be shown up front in search result pages. But, as someone who is privy to a ton of A/B testing in this area, the opposite nearly always results in higher conversion, where there is a lower up-front price and fees are only tacked on during checkout.

I'll restate what at least one other commenter pointed out. If I, a consumer, say "I want transparent pricing," and then given transparent pricing I'm less likely to buy your product, that doesn't mean I was mistaken. It means the truth is that I don't want to buy your product, and you would have to lie to me in order to make a purchase more likely.

comment 3y ago · link · parent

"Stock." Finance? Well, "eater.com". Ben Eater? Maybe about electronics. Ah, chicken stock.

comment 3y ago · link · parent

That's a good point. Browsers are desktop environments with a built-in application runtime. Maybe it's the "Inner-platform effect."

It's an interesting idea to pull bits of the browser back into the system, or alternatively to write a desktop environment that's also a web browser (ChromeOS?).

A former coworker used Plan9 at a previous job, and he said it was cool how you could draw a rectangle on part of a terminal, and pipe that text (as it changes) to another process. Maybe rethinking GUI (and web in particular) from a unixy/plan9y perspective is a worthwhile exercise.

I grew up on Windows, and then there was the browser, and now everything is just the browser.

comment 3y ago · link · parent

Scheme has a shorthand for (cons a b) that's just (a . b), and (cons a (cons b c)) as (a b . c)

Racket, a scheme-based language, extended the syntax so that any symbol appearing between two periods and not at the end of a list gets moved to the head of the list, so (a . b . c) becomes (b a c), which some people use so that (a . + . b) becomes (+ a b).

The D syntax you describe is what schemes call the "threading macro," or the thrush combinator in non-macro contexts.

comment 3y ago · link · parent

Sure, my thinking is that a cons cell can build singly linked lists and node-based binary trees. Some data structures are based only on those, but most involve an array of some kind. In scheme, for example, it's the combination of cons (i.e. lists and trees) and vector (i.e. arrays) that allows for arbitrary data structures. It's very constraining to have only the lists.

- array: not a singly-linked list.

- hash table: often an array of singly-linked lists, so not a list.

- red-black or AVL tree: can be built with cons cells.

- doubly-linked list: not a singly-linked list

- double-ended queue: array of double-ended queues, so not a list. Could also be implemented as a doubly-linked list.

comment 3y ago · link · parent

I say "I don't know" when I'm reasonably confident that the other guy doesn't know, and that neither of us is going to look into it. It's sort of like "next question."

comment 3y ago · link · parent

They're implied to be implementations of the similarly named interfaces.

comment 3y ago · link · parent

With macros, someone can write an infix sublanguage for you to use in those mathy bits of code.

Probably better just to get used to prefix notation, though. Just pretend everything is a function call.

comment 3y ago · link · parent

Almost anything but a list

comment 3y ago · link · parent

You don't have to fire them. Some will quit because fuck that, and others will cave under the pressure and acquiesce or quit later. And maybe you can fire them, I don't know.

comment 3y ago · link · parent

Some people have harder teeth genetically. Probably also diet matters. And habits that alter salivation.

comment 3y ago · link · parent

What other uses does mineralized enamel have, aside from resisting attack by plaques? Honest question.

comment 3y ago · link · parent

Told it to remain cheerful.

comment 3y ago · link · parent

Does a lack of qualification necessarily imply "all"?

comment 3y ago · link · parent

I didn't read the whole paper, but a lot of it looks like that.

comment 3y ago · link · parent

It's compact and nag-free.

comment 3y ago · link · parent

If I -best -top -2023 with an adblocker, I often get zero results. It's incredible.
1
303132
38