HNHacker News
TopNewBestAskShowJobs

okaleniuk

1,667 karma · joined October 3, 2017

I do https://wordsandbuttons.online and wrote https://www.manning.com/books/geometry-for-programmers
submissionscomments
okaleniuk··on Ask HN: Math books that made you significantly better at math?
Calculus on Manifolds by Spivak. Brilliant. And relatively thin too.
okaleniuk··on Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
I heard that very argument about GCC. C++ without __attribute__ is not practical for embedded development therefore C++ for PLCs is what GCC does. And yet, the general consensus now is that C++ is ISO/IEC 14882, and what GCC does is just an implementation.

With Python, you don't even have to go "alternative" to use LLVM compiler infrastructure. You can use CPython + Numba and compile your kernels for both CPU and GPGPU on the go. Which is very practical.

Which is ironic, to compile a CUDA kernel in C++, you would have to use an alternative NVidia implementation of the language.

okaleniuk··on Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
I literally posted the links to the AOT Python compiler and to the C++ interpreter.
okaleniuk··on Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
Good point! However, you bring in a common misconception I'm fighting with within my company for a long time. Python is not an interpreted language. There is no such thing as an "interpreted language", a language is just a set or rules and keywords. Everything you can fit into Backus–Naur form is already a language even if it doesn't have any implementation nor compiler neither interpreter.

Just as a piece of evidence, there are interpreted C++ (http://www.artificialworlds.net/wiki/IGCC/IGCC) and AOT Python (https://github.com/exaloop/codon) implementations.

okaleniuk··on LearnCPP: Website devoted to teaching you how to program in C++
Because we live in a free society and smoking is a proper right. It is unhealthy and largely outdated habit but if you want to light a cigarette, you can.

Programming in C++ is also an outdated habit. There are better languages, better technologies, and there are generally better ways to create software than writing code, compiling the code, replacing std::abs with abs (real issue, these are different functions) and recompiling the code again. But writing in a horrible language is a proper right as well. People write in Brainfuck for fun and good for them!

Jack Rusher sums up what better programming looks like in his Strange Loop talk https://www.youtube.com/watch?v=8Ab3ArE8W3s

okaleniuk··on LearnCPP: Website devoted to teaching you how to program in C++
Rust is essentially C++ done right. It isn't as aggravating as C++ but it is the same technology essentially. It doesn't bring anything new to the table. It's yet another LLVM frontend.

We need to look into something far more fascinating like http://www.spiral.net/ Something that creates value a mere compiler, which is a technology from the 50s, can not.

okaleniuk··on LearnCPP: Website devoted to teaching you how to program in C++
Proper use of the language is what https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines is for. Before that, there were HICPP, JSF, MISRA, ISO/IEC TR 24772, NUREG 6463 etc.

I have been writing in C++ for most of my professional career, I wrote company-wide guidelines, I still teach and consult. I absolutely agree that C++ is not going anywhere anytime soon. That being said, so is smoking. We can't just tell people not to smoke anymore, we live in a free society. But we really shouldn't drag more people in.

okaleniuk··on This is the year of the RSS reader?
Is managing email really an unsolved problem? I mean, every email client has already way too many "organizing thingies": folders, filters, bookmarks, categories, labels, stars, flags, and archives. What value RSS brings alone except from being different and therefore having its separate tab in a client?
okaleniuk··on Mastodon's federation model encourages specific instances with peculiar rules
What you describe is, of course, possible. You can create a personal fidonet/usenet-like echo conference with nothing more than a bunch of e-mail redirection rules. But people don't want that. I checked.

There is no such thing as an "intellectual need". All the needs are fundamentally emotional. Mastodon addresses the identity need, it creates the sense of a community, and, as all the social media, it grants both cheap entertainment and immediate gratitude for conformity. It is a good "social network", it's just what we call a phenomena of "social network" is essentially shit.

okaleniuk··on Ask HN: Where would you feel proud to work?
I work for Materialise. It's a Belgium-based AM company with a strong presence in the health sector. It is not too famous, not too big, not that rapidly growing either, but it does produce a net positive effect on society while staying financially healthy for over 30 years.
okaleniuk··on Ask HN: How did you stop drinking?
I bought a motorcycle.

It's almost impossible to stay sober with all the social pressure. In our culture, every event has to have alcohol in it. Every occasion is a drinking occasion. Which is fine, except that I already drank my share for life and now just prefer enjoying life in other ways. So now I show up in full gear, put my helmet on display and have a nice evening without any nudging and questioning.

okaleniuk··on Most books don't sell only a dozen copies
My first self-published book sold maybe half a dozen copies, and there even was one refund. The reason is simple. It is a bad book.

The next one sold none. Which is expected since I made it openly available from my site. It hit about half a million downloads in the first year. Alas, most of them were from one IP somewhere in Czechia so I guess someone's spider got stuck in the web. But real people downloaded it too, about 12 000 copies. I even got a positive review from John D. Cook of which I'm extremely proud https://www.johndcook.com/blog/2020/04/24/programming-langua...

I'm now working on Geometry for Programming book for Manning https://www.manning.com/books/geometry-for-programmers. This would be my first collaboration with a publisher and so far it looks like it will become a moderate success. The early access sales are good, the reviews are encouraging. Even though, I would expect first year sales to be in thousands, maybe even low tens if we're lucky but no more. Definitely not enough to live of.

So while the post doesn't reveal any specific statistics, it does agree with my experience. Most books might indeed sell in very low numbers but they are not really published and maybe not even really books. If you're working with a well established publisher, you will get some moderate sales numbers guaranteed, and a even small chance to go big.

okaleniuk··on The value of owning more books than you can read (2018)
You can look things up surprisingly easy in the books you've read. I guess, this has something to do with physical experiences you had with them. I use my own library as a memory extender regularly.

But unread books are useless for this purpose unless they are dictionaries or references. And surely there is no point in keeping them in your own home. A proper place to keep unread books is a public library.

okaleniuk··on Please Stop Using Grey Text
Good point. This would have been a nice feature though. To transfer the desktop scheme into browser I mean.
okaleniuk··on Please Stop Using Grey Text
Also, why don't we let users decide which contrast works best for them?

My https://wordsandbuttons.online/ uses default browser colors for anything other than interactive illustrations. For those, I just don't know how to make user choice work with the graphics they show since the graphics is always different from picture to picture, so I impose slightly tinted background as part of the palette.

okaleniuk··on Please Stop Using Grey Text
Jan Tschichold, a famous typographer and book designer speaks against black on white. He says that the book paper should not be artificially whitened since too much contrast hurts readability just as too little.
okaleniuk··on Benchmarking the oksh shell, or, let's look at a lot of C compilers
I love that CompCert is now a thing. Does it perform well compile-time-wise?
okaleniuk··on Ask HN: What excites you today (technologically speaking)?
Photonic computing and the return of Fortran. These are two separate things but to some degree they're both boosted by the rise of heterogeneous computing.
okaleniuk··on How to Read Shader Assembly
It's even more fun with CUDA. You have PTX assembly and CUDA binary assembly which are completely different.

But it still pays to peek into disassembly every now and then. For instance, one time I got to shorten a kernel runtime by switching an index type from size_t to uint32_t. Apparently, 64-bit integer division wasn't supported directly by the target architecture and instead of some kind of IDIV, there was a 100-lines function embedded and called on every division.

Just downcasting an index before pushing it to the kernel made the whole thing considerably faster. But I wouldn't know I should have done this if not for the disassembly.

okaleniuk··on What can we learn from sexaplication on nuclear power plants?
Using 6 components instead of 1.
okaleniuk··on Ask HN: How do you stop screwing around and focus?
It all comes with age.

If you're under 30, you shouldn't be worried too much. We've all been like this.

I got my math education in a tramway since it was the only distraction free place and I had to be there anyway.

okaleniuk··on I don't want to do front-end anymore
It's even easier to go with good old JavaScript now than back in 2007 because of all the tooling. We have profilers right in the browsers now. How cool is that!
okaleniuk··on C Template Library
Ok, you can take away my C++ now :-) Seriously though, nicely done!
okaleniuk··on Vanilla-todo: A case study on viable techniques for vanilla web development
I love it! It's definitely an exercise worth taking. Nice transfer size, and I'm happy to see that the code is quite maintainable.

I do my wordsandbuttons.online in similar spirit: no dependencies, and all the pages are kept below 64KB. However, as the code base grows, I'm starting to employ scripts to do the grunt work for me. So while I don't have dependencies per se, code patterns become dependency it its own right.

okaleniuk··on What Is the Small Web?
I guess, my https://wordsandbuttons.online/ qualifies as a small web site. However, it was built in a very contradictory manner. I would like to challenge this: "It must be done in a manner that does not require any technical know-how whatsoever".

It doesn't take too much technical know-how to build a site. Basic HTML+CSS+JS is enough really. Writing, editing, visual design, UI design, - it all requires way too much expertise in comparison. You have to be a creative let's say 80% of the time and technical for about 20%. Reducing the last 20% only wins you 20% of the effort. But! by concentrating the technical expertise in your own head you get another level of freedom as a creative person too.

I was writing on Livejournal, habrahabr, Codrspace, and Medium before I went stand-alone. And the main reason was not ideological but rather practical. I wanted to make interactive illustrations, quizzes, and puzzles for my pages. I wanted very specific very custom things no platform would provide.

And that's why I went small web. Small web but full tech. I enjoy my creative freedom by employing let it be modest technical expertise but exactly in a way I want to employ it. And I think, investing into technical skills to get creative freedom is well worth it.

okaleniuk··on Can we do better than our C compiler?
Yes, GCC intermediates are quite nice. Lispy and readable. And indeed, you can take a look at every stage. But LLVM intermediate code is basically just another assembly language. And as for MSVC, I'm not sure if it's even accessible. So it's not always an option.

Disassembly is either way our end result so unless you're looking for something particular, it makes sense to browse that first just to check that the compiler gets your intention just right.

okaleniuk··on Can we do better than our C compiler?
It's not that people do better than compilers, it's just compilers often do badly. That's why checking disassembly in tight spots is the integral procedure in our team. Compilers and people together by definition do not worse than compilers alone.

Also, this is an odd choice of program to compare. Compilers often do suboptimal on superscalarisation, inlining, or simplifying control flow. In this example, there is not enough space to go wrong nor for a compiler neither for a programmer.

okaleniuk··on We Can Do Better Than SQL
But that doesn't contradict my point. The mathematical basis matters, sure, but the language on top of it (exactly because it derives from the math anyway) is mostly irrelevant.

I don't really care if I have to write SELECT or \forall or σ as long as they all have the same meaning. But I'd prefer to use SELECT because I already spent time learning how to work this way.

SQL as a language is fine. There is no real need to reinvent SQL unless you're going to reinvent the math behind it too.

okaleniuk··on Rob Pike's Rules of Programming (1989)
Just yesterday I removed an obsolete doxygen tag from some 300 files and my Visual Studio went catatonic.

Well, I suspect it's not about Studio per se but rather the git integration but still. Someone avoided a "fancy algorithm" and wasted both my time and the product reputation with a "small n" workaround. Because, git is about small commits right?

I'd like to restate the first rule as "You can't tell where a program is going to spend its life".

okaleniuk··on We Can Do Better Than SQL
For instance, we choose Riak+LevelDB some 8 years ago as our data store. It doesn't support SQL but it's fast and easily scalable. And free. I'm not sure if we could achieve the same speed and fault tolerance with any SQL solution available at that point. So the deal is, you give up your time invested in learning SQL and get some advantages in return. This is reasonable.

But if it's only about language, no additional perks, then it just isn't worth investing your time.

If continue the parallel with programming languages, there are tons of C-killers nobody knows about. I think, roughly every third programmer in the world tried to write more ergonomical C at some point in their live. And there is Rust. Which is not about ergonomics really but about memory safety combined with comparable performance. No more buffer overflows, no more Heartbleed. People see what they are trading their time on Earth for and the language is getting traction because of that.

This is, of course, only my personal opinion but languages are just thin interfaces over technologies.

← PreviousPage 7 of 11Next →