HNHacker News
TopNewBestAskShowJobs

benibela

963 karma · joined March 28, 2013

Personal website: https://www.benibela.de/index_en.html

Open-Source projects:

LaTeX-Editor: https://www.texstudio.org/

Command-line JSON/XML/HTML processor: https://www.videlibri.de/xidel.html

submissionscomments
benibela··on Lean4 helped Terence Tao discover a small bug in his recent paper
I got stuck solving a polynomial equation system for years

Perhaps I should try sending him a mail

benibela··on The human body has 1.8T cells dedicated to defending it
We old people watched the "Once upon a time Life" anime for that
benibela··on Was Rust Worth It?
>First, this is a controlled panic, not a segmentation fault.

But a segmentation fault is also controlled

>Your use of "exception" suggests you're thinking about it in Java terms however, and Java is equivalent here.

No, I am thinking in Delphi terms. It is overspecialized to Windows userspace. Windows gives an Access Violation, and that can be caught, and Delphi throws it as exception

>Second, you can only encounter this in explicit circumstances, when you have an Option<T>. Wheras in languages with a null type, any variable can be null implicitly, regardless of it's type.

Delphi has both nullable types and null-safe types

benibela··on Was Rust Worth It?
Well, it is what I remembered

I do not have Windows 98 anymore. But I still have Delphi 4 installed under Wine, so I just tried it out.

Just showing a messagebox from windows gives 16k

Using the sysutils unit though, puts it at over 40k. And with classes, it becomes 57k. Not sure what they pull in. sysutils contains number/datetime parsing and formatting, and exception handling. classes has basic containers and object oriented file handling.

benibela··on Was Rust Worth It?
Still someone might call unwrap on an Option and then run into some kind of null pointer exception
benibela··on Was Rust Worth It?
I was making Windows 98 apps with Delphi 4, and they were 350 KB large

And I was upset that they were so big. Sometimes I used UPX. Or I kicked out all Delphi GUI libraries, and created the GUI with the Win32 API calls directly. I got 50 KB Hello Worlds.

benibela··on Windows NT on 600MHz machine opens apps instantly. What happened?
>An intra-thread COM call is just a virtual function call - no extra overhead.

There was a time when a virtual function call was a lot of overhead

Even having a VMT is overhead.

Sometimes the COM interface is implemented as actual interface, where the implementing class is derived from another class and the interface. (in C++ the interface is just another class with multiple inheritance, but other languages have designed interfaces). Then the class even needs to have two VMTs.

Multiple VMTs have even more overhead. And with multiple VMTs, it is not just a method call. In the functions, this always points to the first VMT. But when a function from the VMT is called, the pointer points to that VMT. So the compiler creates a wrapper function, that adjusts this and calls the actual function.

when methods from the later VMTs are called , this points (non-virtual thunk)

benibela··on Water so pure it will kill you
When I was in elementary school, there was some water drinking challenge

And the teachers warned against it, and someone told about a child dying from drinking just one liter of tapwater

benibela··on Water so pure it will kill you
It might have been the food?
benibela··on Fq: Jq for Binary Formats
There is XPath 3.1
benibela··on Inner workings revealed for “Predator,” Android malware that exploited 5 0-days
But the browser could run any kind of javascript code
benibela··on New F-Droid repository format for faster and smaller updates
JSON

Looks like they switched from downloading the entire JSON on updates to downloading a patch

benibela··on How to get a heart attack while using JEB decompiler (2022)
When I debug gui/gtk2 programs, gdb manages to sometimes freeze my entire desktop

I have to kill gdb from outside the X server to do anything else

benibela··on 2000 Years of Matrix Multiplication
Graphs can be abstracted as matrices

It is often forgotten, but can make some algorithms faster

benibela··on OpenSSH Pre-Auth Double Free – Writeup and Proof-of-Concept
>It's not really a matter of "insisting". Suppose you start writing an open SSH tool for BSD in 1999. What language do you choose?

Pascal?

benibela··on Tiny radioactive capsule lost in Australian outback found
Or you could use a metaldetector?
benibela··on Neuropsychiatric researchers rethink what depression might be
Pet theory: It is a protection from negative emotions

Someone experiences too much sadness and other negative emotions, so the brain tries to stop the negative emotions by shutting down all emotion processing. Then you do not feel so many negative emotions anymore, but also no more positive emotions. You just do not feel anything. Since motivation comes from emotions, you also lose all motivation to do stuff

benibela··on Perplexity.ai prompt leakage
That is extremely funny
benibela··on Perplexity.ai prompt leakage
Would it know that it is a language model if there was not a prompt like "Present yourself as a language model" ?
benibela··on Semantic Linefeeds (2012)
Or write everything in one line

It is annoying when you search for two words and they are not found, because they are on different lines

We just need better diff/merge tools that can handle text without line breaks. wdiff is installed everywhere for in-line diffs, but no one seems to maintain it. There have been patches sitting around for years: https://savannah.gnu.org/patch/?group=wdiff

benibela··on 🥺: the best sudo replacement
>They wrote it in 1980 for unix; what exactly would you like them to have used?

Pascal

benibela··on The Art of LaTeX: Common mistakes and advice for typesetting proofs
Or HTML syntax will become legacy

People are write something like Kotlin html dsl

benibela··on Mercedes is the first automaker to offer Level 3 self-driving in the US
Or the Red Alert from Star Trek
benibela··on A guided intro to the Free Pascal language
But Pascal strings and arrays are much safer than C++'s

C++ does not have bound checking on [].

And people write std::string& as return type or new/delete std::string, or use iterators, and that is all unsafe. Pascal does not have anything like that

benibela··on A guided intro to the Free Pascal language
Strings and arrays are memory safe with automated reference counting

And they have bounds checking, which makes it almost impossible to get buffer overflows

There is an FPC-LLVM variant. Then it uses LLVM to do all the optimizations

benibela··on Running Windows 7 on a 5 MHz CPU with 128MB of RAM
I wrote an Android app. Around 100000 lines of Pascal (+50% more in dependencies) and 10000 lines of Kotlin.

It takes four times 10 seconds to compile the Pascal code to multiple platforms and like 4 minutes to run gradle and compile the Kotlin code.

I do not know why it would be so slow

benibela··on Linux's strcmp() for the m68k has always been broken
I might have seen my 32-bit program crash from that. Either that or there was yet another bug in memmove/memcpy. I did not investigate it.
benibela··on Linux's strcmp() for the m68k has always been broken
I cross compile my side-project program from 64 to 32-bit and then I noticed, it would crash when testing after updating linux

The stacktrace said the crash came from SSE memcpy. I did not bother investigating it, since I have no users anyways.

I had an really old CPU (like i5-520m). Perhaps the code required some SSE feature, it did not have

That was libc. I also use Pascal, which has its own memcpy implementation. A while ago, they discovered it does not handle alignment correctly. (like it would adjust by 4-i when it should have adjusted by i) I thought that is what I get when using Pascal rather than a more commonly used language, but apparently nothing works

benibela··on What happened to the first cryogenically frozen humans?
I always confuse Ted William with Tad William. The Otherland novel had a great path to immortality
benibela··on What happened to the first cryogenically frozen humans?
Max Planck said that science advances one funeral at a time
← PreviousPage 2 of 34Next →