HN user

okaleniuk

1,653 karma

I do https://wordsandbuttons.online and wrote https://www.manning.com/books/geometry-for-programmers

Posts88
Comments297
View on HN
wordsandbuttons.online 1y ago

Why learn about the golden-section search

okaleniuk
2pts0
wordsandbuttons.online 2y ago

A smooth and sharp image interpolation you probably haven't heard of

okaleniuk
102pts50
thenewstack.io 2y ago

Ukrainian Coder's New Programming Language: One Big Data Structure

okaleniuk
11pts1
wordsandbuttons.online 2y ago

Rational Interpolation

okaleniuk
1pts0
github.com 2y ago

Show HN: The Namingless Programming Language

okaleniuk
6pts2
wordsandbuttons.online 2y ago

Homogeneous coordinates as a mathematical investment in programming

okaleniuk
1pts0
wordsandbuttons.online 2y ago

Either your estimates suck or your job does

okaleniuk
1pts0
wordsandbuttons.online 3y ago

Static typing isn’t free. Where do you think the C++ angry mob comes from?

okaleniuk
5pts0
hackernoon.com 3y ago

Making Reliable Distributed Systems in the Absence of Erlang

okaleniuk
1pts0
hackernoon.com 3y ago

Learning from machine learning: green tests are not good news

okaleniuk
2pts0
github.com 3y ago

Show HN: A readable macroassembler for .NET that no one asked for

okaleniuk
67pts12
wordsandbuttons.online 3y ago

SymPy makes math fun again

okaleniuk
323pts87
github.com 3y ago

Show HN: Hierarchical task/bug tracker with colors that visualizes your project

okaleniuk
2pts0
wordsandbuttons.online 5y ago

Can you tell an assembly language when you see one?

okaleniuk
68pts53
wordsandbuttons.online 5y ago

Redundant Stories about Redundancy

okaleniuk
12pts3
wordsandbuttons.online 5y ago

What can we learn from sexaplication on nuclear power plants?

okaleniuk
1pts2
wordsandbuttons.online 5y ago

Challenge your performance intuition with C++ sine

okaleniuk
1pts0
wordsandbuttons.online 5y ago

Complex Numbers and Conformal Mapping

okaleniuk
1pts0
wordsandbuttons.online 5y ago

You don't have to learn assembly to read disassembly

okaleniuk
1pts0
okaleniuk.medium.com 5y ago

What will die out sooner C++ or C++ programmers?

okaleniuk
1pts0
wordsandbuttons.online 5y ago

SymPy makes math fun again

okaleniuk
2pts0
wordsandbuttons.online 5y ago

Programmer's Guide to Linear Equations

okaleniuk
2pts0
wordsandbuttons.online 5y ago

Yet another floating-point tutorial

okaleniuk
2pts0
wordsandbuttons.online 5y ago

Lagrange polynomial as a gateway drug to basis splines

okaleniuk
2pts0
wordsandbuttons.online 5y ago

Trippy Polynomials in Arctangent Scale

okaleniuk
2pts0
wordsandbuttons.online 5y ago

Partial order and non-Boolean logic

okaleniuk
58pts9
medium.com 5y ago

Words and Buttons Online is now three years old

okaleniuk
1pts0
wordsandbuttons.online 5y ago

Yet another alternative to floating-point numbers

okaleniuk
33pts24
medium.com 5y ago

The Motorbike C++ Exercise

okaleniuk
2pts0
medium.com 5y ago

What if I am terribly wrong about C++?

okaleniuk
1pts0

I'm exploring triply periodic but non-minimal surfaces. https://codeberg.org/okaleniuk/faitps

Triply periodic minimal surfaces are the golden standard in thermal management, acoustics, and even medical applications. But minimality itself doesn't contribute much to practicality. We use them because they are simply studied better than the non-minimal surfaces.

So I'm studying the non-minimals. They are much more governable, what I link to is a demo of a surface builder with two levels of control. Next, they are conjugatable including conjugations with different period of self (that will be the following paper), they generalize nicely to non-periodic or partially periodic surfaces, and they work in other space configurations. E. g. I'm now playing with bi-periodic curves that cover the 2D space with self-replicating hexagons.

If all that I'm experimenting on today in 2D will turn out well in 3D too, we'll have a whole new direction in implicit modeling.

Classics!

There is a different take on Lisp in Python - fakelisp. It's literally Lisp in Python, not an interpreter, but a syntax sugar library that allows embedding Lisp snippets into valid Python.

https://codeberg.org/okaleniuk/fakelisp

    from fakelisp import *

    # And now you can start mixing Python and LISP
    X = (BEGIN
        (SET (F) (LAMBDA (X)
            (IF (EQ (X) (1))
                (1)
                (MUL (X) (F (SUB (X) (1)))))))

        (LIST (F (4)) (42)))

    # Back to Python any time
    print "x: ", str(X)

This is one of the most unexpected ecranisations ever. The book is great on its own, but I would never assumed it could become a film. The topic itself is a bit heavy, and I somehow assumed that most of the people pan Szablovski interviewed at one point or another are already dead. This is going to be a fascinating watch.

There should be a lesson for other communities but, unfortunately, there is none. StackOverflow used to be a fun and welcoming place in 2009. It became a toxic hellhole overtime

There are no obvious flows in the original design, and there were no endemic wrongdoings in the governance either. It just rotted slowly like any other community does. And nobody in the world knows how to keep communities from becoming toxic. There is simply no recipe. And that's why StackOverflow doesn't serve as a lesson either.

I'm working on a collection of stackable interactive slides for teaching numerical methods and operational research.

https://okaleniuk.codeberg.page/blackboard/

The idea here is, one can pick the slides they want and arrange them into a sequence right in the URL. This way, there is no registration, no user data collection, no persistent state even. You just pick the slides, teach your material, and move on.

It's very raw, I still want to add a convenient sequence constructor, a "blank" slide so you could display your own content in it, and a similar quiz page. But I already used some of the slides for teaching, students seem to like them.

Hopefully, I'll have the rest done by the beginning of the spring semester.

The most interesting thing in this whole picture is not AGI, it's how the collective intelligence works. CEOs claim the AGI is near because that's how they manipulate the public. But the public knows that it's only a manipulation. So how come the manipulation is still possible?

Fun fact, there were no commercials in the USSR. No TV advertisements as a genre, so nobody knew how to make these. And one of the first Soviet commercials I saw was already during perestroyka, and it was about Lada. It was 15 minutes long, and it featured a line (sorry, may be misremembering it a bit) "if your brand new car doesn't start, no worries! Just take a 10mm wrench, and tighten the battery bolts. See how easy it is!"

The Fiat 124 was actually a pretty good car for its era. Russians improved its suspension, refitted the engine, and messed up the hydraulics. Still, pretty good car for the 60s. And then, they continued to produce the same car with miniscule modifications until 2010s.

That's the problem with authoritarian regimes. You can buy a plant by a fiat (pun intended), but you can't make a decent car by a decree.

Is software an engineering discipline at all?

There are plenty of activities that are essential for engineering but not a sort of engineering themselves. Like writing documentation, or communicating requirements to your colleagues. Making instructions and operational procedures. Management. Accounting. Marketing. What makes making software an engineering discipline and making coffee not? Where is the line and why we presume we should be behind that line?

Well, yes, but after the 75 years, don't you think that "too young" argument is getting old? Nuclear energy, medical imaging, and the space part of aerospace are all younger than "software development". These are all mature industries highly codified, and they also all also encompass software development among other things. Could it be that software development isn't an engineering discipline at all but a supporting activity?

Writing isn't an engineering discipline. And all industries rely heavily on writing. Could it be that writing software is just writing for computers and as such could only by codified within another engineering discipline and not by its own?

Most of the startups actually plan to survive for more than 2 months. And it makes total sense to think about scalability, reliability, and performance while it's still possible to change your whole stack every other week. Not forgetting about other things such as securing your cash flow, growing your talent pool, protecting your IP, etc. Finding a good balance between multiple focii is exactly the job for a founder. Of course, it's a hard job, that's why we don't see many successful startups to begin with.

Yes, reliability comes from the same ground the scalability does, and yes people are mostly chasing the latest trend. One does not contradict the other.

Some safety critical real time systems have strict time predictability requirements. This means that the whole loop should pass in exactly X microsecond, not more not less. For this, all the programming should be pretty much branchless.

For instance, all the sorting algorithm turn to, effectively, bubble sort since without branches, you always go with the worst case - and the sorting complexity is always the O(n^2). But it's okay, since the algorithm becomes predictable. You just swap a conditional swap:

    if a < b then swap(a, b)
with arithmetic swap:
    c = (a+b)/2
    d = |a-b|/2
    a = c + d 
    b = c - d
and that's it.

Engineers believe in definitions. By definition, philosophy is not a scientific discipline, because as soon as a discipline becomes scientific it... stops being philosophy.

As Alexander Pyatigorsky famously wrote, "the value of philosophy is in that nobody needs it".

Sure!

I'm not saying that philosophy is bad. Maybe making software just never meant to become an engineering discipline. I mean making clothes, laws, and music isn't. And it's fine.

But engineering does imply some rule-following.

Our infrastructural team keeps about 2 MSLOC building on several compilers and running on several architectures. They report a new compiler bug every 2-3 years.

It's not about accounts, it's more about engagement. I still have my Facebook account, and I actually used it two years ago to fund my gym trainer and tell him I couldn't come.

Social media is a reality one can't simply ignore completely. One can complicatedly ignore it though to some level of success. For me, the minimal rules are: don't write on reddit, don't read on linkedin. Don't touch anything else. The orange site is ok-ish.

I use IDE at work but rarely at home.

My design is usually very simple, I don't have to keep a lot of things in mind to begin with. For instance, https://wordsandbuttons.online/ is about 100KSLOC now, but since it's inherently flat, no dependencies, no third parties, I can manage it with a Vim or a gedit with none of the IDE features. My implementation is always in the same file as the call.

I suppose, IDE makes writing harder code easier, which results in tons of saved time, but it also makes writing harder code easier, which results in tons of hard code.

I tried that in Geometry for Programmers https://www.manning.com/books/geometry-for-programmers

I needed a short chapter on calculus so I go on and explain Bezier curves and splines, but I couldn't afford a full introduction. So, I only explained how differentiation works and gave a few examples. The rest was delegated to SymPy.

Funny thing. There are errors in differentiation formulas in the final edition of the book. Some final edits went wrong or something. Anyway, so far, we had exactly 1 (one) complaint about that.

Apparently, programmers don't care about formulas if the code is already there.

I once wrote a game with no graphics or sound. It was a maze game: you were supposed to lead a mouse cursor through an invisible maze by touch. If you drive your cursor into a wall, it stops. You start at the bottom, and if you manage all the way to the top - you win.

Well, it's not completely useless. If you're extremely bored at work and don't want to draw attention, this could be your time waster of choice.

Yes but the amount of devotion is orthogonal to the language per se.

You can use Numba that uses the same LLVM clang does and write all the computation kernels yourself instead of using what Numpy provides. The only difference there would be JIT vs AOT compilation.

Or you can use Codon, that uses the same LLVM clang does and then there will be no difference at all.

Language is just an interface for a compiler.

We used to rewrite Python code in C++ "for performance". We stopped when the equivalent rewritten version appeared 3 times slower than the original.

The very notion of "fast and slow languages" is nonsense. A language is just an interface for a compiler, translator, or interpreter of some sort. A language is only steer wheel and pedals, not the whole car, so the whole arguments which one is faster is stupid.

In our case, AOT compilation backfired. We used (contractually had to) support older architectures and our Eigen built with meager SSE2 support couldn't possibly outrun Numpy built with AVX-512.

So we stopped rewriting. And then Numba (built on the same LLVM as clang) came up. And then not one but several AOT Python compilers. And now JIT compiler is in the standard Python.