HN user

otabdeveloper2

71 karma
Posts0
Comments234
View on HN
No posts found.

The phrase 'undefined behavior' only makes sense in the context of an ISO standard.

For any particular combination of compiler, OS and computer architecture there are no 'undefined behaviors'; you only care about the concept if you want portability to a different compiler/OS/architecture.

So the idea that C++ sucks because of 'undefined behavior', so let's use some random language without an ISO standard or any portability guarantees at all is completely and utterly insane.

The original post was about 'projects', not code snippets.

If you've done any serious (large, long, multi-team) projects in a dynamically-typed language, you know how quickly they turn into a big ball of mud where you're spending more time refactoring your refactorings than writing useful code.

C++ has a standard that's too long and hard to understand, so let's use a language without any standard whatsoever instead!

Good lord, if that's the kind of human capital that's involved in making next-generation languages, then I have no doubt what will still be used to write serious software in 2080.

(Hint: not Rust.)

Open UI 6 years ago

Untold amounts of human effort are exhausted globally every day on rebuilding identical components for web apps. This should not be the case. The UI community should standardize namings and structures for common components.

Yeah, they're called 'HTML forms'.

If you want a standards-compliant, accessible UI that works everywhere then just use them.

If you want some godawful 'SPA' with UI elements that 'communicate your corporate style', then no amount of standardization will help here.

python is very expressive, hence the code base have way less numbers of lines than in C++

This doesn't match reality. In reality, many Python projects have way more lines of code than equivalent C++ projects. Probably because of the 'expressiveness' you cite; you can't really showcase your love of coding and job security though artificial complexity without 'expressive' bells and whistles. (This is the idea that lead to languages like Go, I'm pretty sure.)

That said, C++ is plenty 'expressive' itself.

Very experienced programmers switched to Rust because it makes it possible to build large scale industrial programs both efficient and reliable.

This never happens in the real world; not unless the 'very experienced' bit is experience only in languages like PHP or Python.

...which then turned out to work fine in every other browser if they just pretended to be Chrome through the user agent.

Which is probably why Google wants to phase out the user agent.

For sure whatever Google invents to replace it will not be so easily circumvented.

It's pretty much irrelevant what people feel emotionally about Rust.

The real-world fact is that Rust is, as of March 2020 at least, an entry-level systems programming language. It's used as a stepping stone by former PHP/Python/Go programmers, who are very intimidated by C++, to get into performance-oriented coding.

Nobody actually writing embedded or sensitive code (airplanes, nuclear power stations, etc.) is doing it in Rust.

The problem with GC isn't the "spikey 1%", it's the fact that GC implies the "everything is a pointer to an object" programming model, which in turn fragments your memory and destroys your cache.

Performance-oriented code implies everything is on the stack and/or packed into large arrays, at which point you don't need a GC after all.

I never think about optimizing code until I really really need to.

The point of 'really really need to' has long been passed and you didn't notice it.

(Unless you use an entry-level $200 notebook for development, which you probably don't.)

In other words, please please eat your own dogfood. Your users aren't browsing your 'amazing websites' with a development notebook.

It targets its own niche (embedded, realtime, correctness-oriented).

I don't know of anyone who actually uses Rust in that niche.

Everyone who uses Rust is using it because of "C++ is hard, let's go shopping instead" syndrome.

I.e., at this point it's a language for beginners to ease themselves into programming without training wheels and eventually graduate to real big boy programming languages.

Certain features (NSS, iconv) will not work.

If you're the kind of person who wants static linking then you really don't want these features.

The real problem is that statically linked programs under Linux don't (didn't?) support VDSO, which means that syscalls like gettimeofday() are suddenly orders of magnitude slower.

In the end, we had to do a kind of pseudo-static linking - link everything static except glibc.

No such thing as "RPC Protocol", there's a huge insurmountable gulf between "I want my Python and Javascript services to pass ad-hoc messages between themselves" and "I want to send C++ structs over the network with typesafety and minimal overhead".

There's a much better alternative outside of AWS for everything that AWS provides.

As far as I can tell, AWS exists to optimize accounting and inter-departmental friction, and not to solve any technical problem.

...all kinds insane, undebuggable programs purely at compile-time ... in the most terrible purely functional language imaginable

It's a clean, minimal, purely functional Lisp-like language. Nothing 'insane' or 'undebuggable' about it.

(Well, maybe if you're the kind of person who only ever coded Qt-style OOP C++98 in your life you might be shocked, but for the rest of us there is nothing surprising or special about C++ templates.)

Old CSS, New CSS 6 years ago

In cases when the content wasn't semantically a table, you had a dilemma.

If you have text that's laid out with a fixed number of columns and a dynamic number of rows, than what you have is exactly a table.

Absolutely no reason to get your underwear in a bunch in a rage of hipster semantic pseudo-purity just because it's not literally a table of Excel figures.