Better HN
topnewbestaskshowjobs
Log inSign up

LessDmesg

45 karma · joined Oct 12, 2019 (7y ago) · 233 submissions

Submissions

comment 6y ago · link · parent

C++ templates are not the gold standard of generics. In fact, they are a glorified text substitution system, totally broken and flawed.

Generics are still absolutely necessary for ANY serious programming language. They are required by the DRY principle. Algorithms must not need be repeatedly implemented for every new data structure. To say that generics are astronaut is simply unprofessional.

comment 6y ago · link · parent

5000 sq "feet" is about 450 sq meters (for those that use real measurement units)

comment 6y ago · link · parent

George VI didn't have access to millions of books at the palm of his hand, George VI couldn't get a Chevy or a flight to Tokyo, he couldn't get decent anesthesia or a quality tooth implant, and George VI couldn't play a video game for all his wealth. So no, George VI could only dream of the riches you command in your day.

No, narrow distribution of wealth IS controversible. All of the "super-rich" are mostly rich in terms of investment and assets, not actual money (i.e. wages). Jeff Bezos can't get all the hundreds of billions $$ that are attributed to him, they're not on his bank account: instead, they're paying wages to all the employees of his successful company as well as driving down costs for Amazon's customers.

And that's where you're most wrong: wealth does get shared, especially in the realms of technology. Computers, smartphones, the internet, combustion engines, electric cars, airplanes, hydroelectric and nuclear and solar energy etc. are all now accessible to the widest swathes of humanity. The rich might hold most of the worlds superyachts, but smaller yachts are much more widespread, and the vast majority of humanity can get a ship or a plane ride. What was once not affordable to a single person on Earth is now affordable by over 50% of adult population. There's no reason to believe fusion energy will be any less so.

comment 6y ago · link · parent

An average person today with e.g. a car, a shower and a smartphone with internet access is already richer than any of the kings of the past. Retirement plans also didn't exist or were not widespread. Dentistry and birthcare were either charlatanic or inaccesible etc. So no, wealth isn't "hoarded by a small percent of the population", we really are, the vast majority of us, richer than ever in history of man.

comment 6y ago · link · parent

It's still C all the way down, even in 2019. Amazing how far crappy, badly thought out, ubiquitous, low entry barrier languages can go. More than 40 years of memory errors, out of bounds errors, broken metaprogramming, undefined behavior, lack of error handling, type safety, abstractions and intelligent design in general, all served under the clunky syntax sauce. And it still powers our world. Worse is better, indeed.

comment 6y ago · link · parent

OpenRC

comment 6y ago · link · parent

> just provide a single binary

Just provide a single source and get on with your day. It's Linux after all. No need for huge monolithic binary piles of crap from Poettering to start your system.

comment 6y ago · link · parent

I'm a Gentoo user and your problems with "systemd" look quaint to me. I mean I've heard about such a thing as "systemd" that turns Linux into Lindows, but I've no idea why anyone would use it when an awesome Linux (a real one, not Lindows) is within reach...

comment 6y ago · link · parent

Yes, that's the typical explanation, but no, the images are most definitely loaded, thanks.

comment 6y ago · link · parent

It would be much easier without the moving target of new Javascript features that browsers have to keep up with. With a real, mature, nonbroken language there would be no need to add new features every year. Someone said that Python is badly suited for the web because not event-oriented, whatever that means. Well, JS didn't have async/await until recently, and there's still lots of code that uses promises, yet even promises aren't supported by ancient browsers. It would have been so much easier to use a language that had ironed its sophomore mistakes somewhere on the desktop, before the web limelight. Instead, they created an all-new "web language" to ensure decades of volatility and reinventing the wheel for all the world wide web...

comment 6y ago · link · parent

Thanks, I appreciate it as I go on to the third day of trying to find why Javascript cannot get the correct width of an image but only under some circumstances unconnected to the JS code.

comment 6y ago · link · parent

The state of Javascript in 2019 is that it should be deprecated. I have never had more problems, undefined behavior, mysterious errors and malfunctions, dependency hell and generally shitty syntax as when dealing with Javascript. God, please, just destroy this language. The web needs something different, something not broken and flawed.

comment 6y ago · link · parent

No, because these languages aren't broken and don't need a new ECMAscript standard every year (none of which can fix JS anyway because it's fundamentally wrong and unfixable). Other languages don't have a bunch of busybodies adding useless features to a broken language without any hope that all browsers ever will fully support it.

comment 6y ago · link · parent

Yes, the names are important for "interop" reasons and yes, historically they mattered because the temperament was different and C# was totally different from Db. And yes, not all modern music is based on the 12-note equal temp. But for a beginner, I would advocate avoiding them and thinking in terms of semi-tones as I've described. It's simpler, and it's the way guitars and pianos and DAWs and whatnot work, so it's a good way of thinking for a beginner. I know for sure I didn't appreciate being bombarded with names like "augmented fourth" or "diminished seventh" when "+6“ or "+9" would make more sense in terms of piano keys/frets that beginners usually have in front of them.

comment 6y ago · link · parent

Here's how I approach it: forget about all the historic naming like "perfect fifths" and just think in terms of the modern 12-note equal temperament. Every note is a number, e.g. 440 Herz = 69, the standard guitar tuning has strings from 40 to 64, etc. Every interval is an integer, up an octave is +12, major chord is a triple of {x, x+4, x+7}, minor seventh chord is {x, x+3, x+7, x+10} etc.

Then, as a the second game-changer, learn the circle of fifths. Start with a note like C, and keep adding +7 to it. You'll get FCGDAEBF#C#G#D#A# - note how the sharped notes repeat the pattern of the nonsharped ones, easy to remember. The "keys" and "modes" stuff is just intervals of seven consecutive notes on the circle. Say you choose FCGDAEB, that's one key, then every mode is to be found by choosing one note out of those seven, and hopping over one note until you play all seven once: e.g. FGABCDE is one mode (Lydian afair), EFGABCD is another one etc. The "major" and "minor" keys are just different names for two of those seven modes. Pentatonic scales are those same modes with some notes omitted. Blues and harmonic minor scales are those same modes with some notes inserted. Overall modes, not keys or chords are the key to actually composing music intelligently, so learn them and learn to play them.

This should give you a good start in practical music theory.

comment 6y ago · link · parent

This is hard to believe, as in this thread and everywhere, the only software used to tout Forth is low-level stuff. Even if Forth was able to be squeezed into a high-level language, it doesn't seem to have any advantage, or, in fact any differences from existing ones. What would a high-level Forth bring to the table that Java or e.g. Clojure don't have?

comment 6y ago · link · parent

This can work, but it's incredibly tedious and not worth the trouble. Writing in Forth is like writing in pure CIL or JVM bytecode (they're both stack machines like Forth). Sure, you can do it, but if it was so rewarding, people wouldn't be using Java or C#.

comment 6y ago · link · parent

Curious: what kind of new control structures do you miss in other languages?

comment 6y ago · link · parent

I'd like that too, but it's not going to work with the web dev populace. They're used to a dynamically-typed sandbox and won't switch to a full statically typed language.

comment 6y ago · link · parent

For one thing, not being broken. Python doesn't have ("1"+1) and similar design flaws, Python doesn't need a new ECMAscript standard every year, Python has figured out modules and classes much earlier, and frankly, Python is what Javascript is only becoming after years of improvement. Really, I don't understand why we and the browser maintainers have to put up with a broken, insane language when there is a similar but much more mature and "done right" one. And as far as ecosystem, Python can kick Javascript's ass if not in quantity (though it's close) then in quality of its userbase for sure. And Python has been used onе the backend much more than JS, so it makes much more sense to unify the language and just use Python for the front-end.

comment 6y ago · link · parent

What would you prefer then, Lua, with its 1-based arrays? Python is a mature, universal, versatile, insanely popular dynamic language with a nice syntax. It fits the bill perfectly.

comment 6y ago · link · parent

Now if only we get a good web-oriented Python with a WASM backend, we'll finally be able to throw Javascript where it belongs: into the dustbin of history.

comment 6y ago · link · parent

Sberbank is also behind recent Nginx extortion raids.

comment 6y ago · link · parent

Interesting. Could you give an example of such a memory lifetime bug in C# and why C++ is impervious to it?

comment 6y ago · link · parent

...which is manual work with no guarantees of correctness.

comment 6y ago · link · parent

Reference counting is not better, it's a poor man's GC. Reference counting means: 1) instruction pollution from all the refcount updates and their synchronization 2) circular references, ie memory leaks 3) too much time spent freeing memory (whereas a generational GC spends time on live objects only) 4) memory fragmentation and hence slow allocation (whereas in a normal GC allocation is just O(1)

comment 6y ago · link · parent

Energy is the ability to perform work. It doesn't have to be a velocity. A boulder on the hillside is energetic because it can fall down, thereby performing work on whatever it falls on.

comment 6y ago · link · parent

Restoring the full sequence is going to be like putting together a paper book that's been through a shredder.

And if you're thinking about cloning a dinosaur, that's even harder because you'd need to recreate exactly the same environment as in that specie's egg, otherwise the embryo won't survive to hatching. Not impossible, but extremely hard.

1
45678