Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 5y ago · link · parent

You can use "if constexpr" for that.

comment 5y ago · link · parent

That's just because you view them in less. I usually view them in emacs, so links work just fine for me.

comment 5y ago · link · parent

I do. The DE's printer settings rarely work. CUPS on the other hand always has some way of successfully configuring a printer.

And whatever its problems are, not being an Electron app is not one of them.

comment 5y ago · link · parent

> I have not seen many applications that take daemon + local browser approach. What are the examples?

Jupyter Notebooks.

comment 5y ago · link · parent

> Why did Chez and Racket embrace R6RS, a standard widely rejected by the rest of the Scheme community?

Why wouldn't they? The usual rationale for rejecting R6RS is that it's somehow "too big". But Racket already has a library whose size blows R6RS out of the water. So this rationale is irrelevant in this context. Also, Chez Scheme is an implementation detail. R6RS is only one of many languages that you may use through Racket.

And what is this "Scheme community" that rejected R6RS? It's always been my impression that it was rejected by authors of toy implementations. Is there actually any data on what portion of people who use Scheme (as opposed to write another implementation of it) reject R6RS?

comment 6y ago · link · parent

> Nope, as proven by performance tests,

> https://github.com/ixy-languages/ixy-languages

This shows latency, not memory consumption, as far as I can tell.

> If the language supports value types, e.g. D, and there is still memory overhead versus RC, then fire the developers or they better learn to use the language features available on their plate.

Memory overhead of certain types of garbage collectors (notably generational ones) is well-known and it's specified relative to the size of the heap that they manage. Using value types is of course a valid point, regarding how you should use the language, but it doesn't change the overhead of the GC, it just keeps the heap it manages smaller. If the overhead was counted against the total memory use of a program, then we wouldn't be talking about the overhead of the garbage collector, but more about how much the garbage collector is actually used. Note that I'm not arguing against tracing GCs, only trying to keep it factual.

comment 6y ago · link · parent

> A subset of designated initializers is supported in C++20.

Took them only 21 years... And this standard being so recent, most projects won't have that for years to come.

comment 6y ago · link · parent

C supports variable-length arrays since C99[1][2]. Alas, Lisp Machines preceded C99.

[1]: https://en.wikipedia.org/wiki/Variable-length_array#C99

[2]: https://en.cppreference.com/w/c/language/array

comment 6y ago · link · parent

> Indexing files makes searching later faster.

It's been my experience that Windows search is anything but fast. On Linux on the other hand, the speed of find(1) was never an issue. There is really nothing to speed up (and in so doing increase median load).

comment 6y ago · link · parent

Low input latency irritates you? That's a new one.

comment 6y ago · link · parent

If anything, that would be inverted. But anyway, just as linear algebra is just one tool in a mathematician's arsenal, ownership semantics are just one tool in a Rust programmer's arsenal.

comment 6y ago · link · parent

> Maybe you are just concerned with Go, but there are similar instances in Java, Swift, Rust and maybe others too. Every big company sponsored language is like that.

How is that true about Rust? Mozilla fired people working on Rust. Now there's a foundation and from the looks of it there are lots of contributions from individual contributors coming through GitHub.

comment 6y ago · link · parent

I failed to find an example of a practical problem in the article. What I did find was a load of circling around the subject from a distant philosophical perspective, all boiling down to essentially "you know what, there exist problems that ownership semantics aren't suitable for" (but using lots of wisely-sounding language), forgetting to present the problems.

The article also suffers from the syndrome of taking a feature of a language and pretending that everything has to be seen through the lens of that feature. Well, newsflash: ownership semantics apply to only some things in Rust. They apply to values and bindings. But they don't apply to e.g. indices. I can take as create as many i's, where i=5, all referring to the same Vec, which later are going to be used to mutate the Vec, as I like, and Rust won't stop me. Similarly, there is Rc and Arc.

It also included one of those "wise" thoughts along the lines of "You know what? The true nature of computers/economy/life/love is..." - one of the templates of meaningless sentences. In this case it was "however virtually all computers are fundamentally mutable things". Hmm... Did we suddenly forget about pipelining, instruction ordering, caching, instruction-level parallelism, C/C++'s problems with memory aliasing? C is not a low-level language[1].

[1]: https://queue.acm.org/detail.cfm?id=3212479

If we were to write a statement analogous to the one advocated for in the article, but talking about mathematics instead, it could be "the fatal flaw of mathematics is that a lot of it is about reducing problems to linear algebra". How ridiculous does that sound?

comment 6y ago · link · parent

> Copyleft is a great way of assuring freedom. MySQL is an excellent example on how non-copyleft open licenses may give you freedom in practice but end meaning the end of a product. QT is going the same road.

Both MySQL and Qt are licensed under GPL/LGPL, unless you pay for a commercial license. So, if anything, they are examples of copyleft licensing.

comment 6y ago · link · parent

2. Good to know. I needed to do a "sudo apt install libpolyml-dev", because otherwise it wouldn't link.

3. Thanks for the tip! That will save me a world of pain.

comment 6y ago · link · parent

I've recently picked it up, reading "ML for the working programmer". The language is fairly simple, everything just fits. However:

1. Both Vim and Emacs are horribly annoying with their automatic indentation for SML. There is a lot of fighting against the editor in this department. In Emacs e.g. you have to delete whitespace all the time, because otherwise you'd have top-level function definitions shifted 80 characters to the right.

2. I've used Poly/ML and SML/NJ so far. Both of them are purely interactive, meaning I can't just compile a program into ELF and ship it somewhere else without the compiler. That makes it a no-go for me for real-world use.

3. The interactive modes of Poly/ML and SML/NJ don't support readline shortcuts. They are the most cumbersome REPLs I've ever used.

4. Inline type declarations (as opposed to Haskell-style type declarations on a separate line) are very noisy - they make reading the code harder. Omitting them (which is the rule in SML in practice) leads to hard-to-decipher compilation errors when you write a new piece of code and you made an error somewhere which confused the type-inference about your intentions. Suddenly forgetting about a word or a set of parentheses in one function results in errors in another perfectly-good function. It's the horror of C++ templates all over again.

comment 6y ago · link · parent

std::optional is like Rust's Option. But even then, without compile-time pattern-matching you leave the error to be checked at runtime, which defeats the purpose of this type. On top of that, it wouldn't be C++ if there wasn't some UB involved.

comment 6y ago · link · parent

If the author is reading this: would you consider providing an Atom feed for your blog? I'm sure a lot of people here would love to subscribe.

comment 6y ago · link · parent

If science is about having equations and maths in it, then wait until you hear about astrology.

comment 6y ago · link · parent

CLI or not, it's centralized/siloed all the same. I'm sticking to Git.

comment 6y ago · link · parent

Casey Muratori showcased a new model of a programming interview here: https://www.youtube.com/watch?v=cfyWvJdsDRI

It shows to the interviewer how a given person works in a programming job, how they researched solutions to the problems they were faced with in the past etc.; as opposed to the usual exercises that have nothing to do with the job and won't really show you how well they will perform.

It's also less confrontational which should put the interviewee at more ease.

1
5152535455