HNHacker News
TopNewBestAskShowJobs

fjfaase

2,265 karma · joined March 20, 2017

Software engineer with more than 30 years experience writing software in mostly C++. Interest in parsers, interpreters and combinatorics problems.

* https://www.iwriteiam.nl/ * https://github.com/FransFaase * https://fjfaase.at.hn

submissionscomments
fjfaase··on WikiMapped – 1.3M geolocated Wikipedia articles on an interactive world map
I corrected the location for https://en.wikipedia.org/wiki/Museum_Ensched%C3%A9 to the address mentioned in the article. It was placed somewhere in the city of Enschede.
fjfaase··on Does your DSL little language need operator precedence?
Just a single function per level is sufficient for implementing both right and left association. I do not see the problem.
fjfaase··on WikiMapped – 1.3M geolocated Wikipedia articles on an interactive world map
How to correct errors? I found some museum with the name that matches a city (but not exactly) to be placed in that city while it is in a city at the other side of the country. I guess some AI has been used.

Also some markers refer to areas and they are just placed at the center of that area. The marker for a country just placed in some random field.

fjfaase··on Tell HN: I know I dislike a developer
I dislike developers who make needless refractions such as changing the names of methods or moving parts of the code to different files all because then they understand it beter in that case.
fjfaase··on Scientists found a protein that drives brain aging – and how to stop it
In mouse by artificially increasing it. I guess there are lots of proteins that do this when at higher than normal levels.

This says nothing about the effects of artificially reducing levels in humans.

fjfaase··on Maze Algorithms (1997)
Interesting idea, but the problem is that being connected and being non-cyclic (properties you want for a perfect maze where you can reach every location and where there is exactly one route between every two locations) are global conditions that are difficult to implement with function collapse algorithm that are local.
fjfaase··on Maze Algorithms (1997)
I maze that grows in one direction can be generated with Eller's or the Sidewinder algorithms (as also mentioned by the user John Tromp in one of the other replies).
fjfaase··on Maze Algorithms (1997)
Great idea. However it is infinite in one direction. Could be made infinite in two directions (I guess) by extending along a diagonal line that get long with each step. Probably could also make it infinite in all directions with a square that gets extended with each step. However, that would mean that if one walks away from the origin, the maze has to be generated in all directions. For practical applications it would be nice to only generate the part of the maze that is 'visible' from a certain point of view (either from the top or while walking inside the maze up to a certain distance).
fjfaase··on Maze Algorithms (1997)
Please explain how to deal with slightly overlapping tiles and still create a maze that has no cycles and locations that cannot be reached from any other location. These are properties that go tiles.

I do know of an algorithm with 'nesting' that generate mazes but results in very long walls and thus does not feel random.

fjfaase··on Maze Algorithms (1997)
Are there also algorithms for (incremental) generation of infinite mazes?
fjfaase··on Trump signature to appear on US currency, ending 165-year tradition
Another sign that the USA is changing into an autocracy?
fjfaase··on Daily Bible Verses Prayers
Is there option to select another source, such as the quran, middle earth lore, buddism, athetist philoshopers or seculare wisdom quotes?

I am now ashamed that I once was deluded to consider myself a christian while science has sofar not shown anything beyond the standard model.

fjfaase··on Should a conscious AI be given Human rights?
If one could prove that human like consciousness can be reproduced by electronic components (probably not possible), it means there is nothing 'super natural' about it and that humans should have the same rights as these kind of machines.
fjfaase··on Warfare in Dune, Part II: The Fremen Jihad
I think Frank Herbert was not interested in how the Jihad could work out, but just used it in his plot. The science in Dune does not work. (One example are the stillsuits.) He is not a 'hard' S.F. author, but more of a political and psychology author. It is that what makes this story stand out.
fjfaase··on The No World Order: Meir Kahane, Netanyahu, Trump, and the War Beyond Iran
We are returning to the pre WW2 world order and it is not due to some influential 'prophets' and leaders, but because history teaches us that we do not learn from history. The relative peace we experienced in the past 80 years was a response to WW2. Maybe only after another WW will there be a time of peace, of World Order again.
fjfaase··on Writing my own text editor, and daily-driving it
I use my own editor too. I modified an existing editor to my own needs. But I do use VSC as well for multi file projects. My editor can load images as well and has a scripting language to manipulate images. I primarily use it to edit my website, which is a static website in bare HTML. It also has some 'browser' functions in the sense that F5 opens a link including jumping to an anker if there is one in the link. It does have colour coding for HTML that also checks for matching tags.
fjfaase··on Put the zip code first
The Dutch zipcode and the house number are unique. So, to mail something to the Netherlands anywhere from the world, it is enough to write something like: NL 1072CT 4.
fjfaase··on The United States and Israel have launched a major attack on Iran
Germany is one of the most pro-Israel countries and known for using excessive police voilance against pro-Palestina protestors and strongly denies that there is a genocide going on in Gaza.
fjfaase··on Build Your Own Forth Interpreter
In the past years, I developed a forth like language as an intermediate language for a C compiler. For debuging purposes, I also implemented a memory safe interpreter, besides a compiler that generates assembly output.

See my profile for link to my github repositories and look under MES-replacement for stack_c

fjfaase··on Find where your face appears online
I got the message: "face search is not available in your region", when I wanted to upload an image. I live in the Netherlands.
fjfaase··on Trunk Based Development
Working without branches, except for releases, is the most effective way of working, using rebase instead of merge to get a single line of commits. Even release branches can be avoided with continuous deployment.
fjfaase··on Diffs
It needs bun to install. Could not find how to install bun. I wonder if bun is free, because its website looks to fancy for a free tool.
fjfaase··on Why Modern Chinese Is Just 'English with Hanzi'
I remember seeing a sketch on a (Chinese) new years eve TV show in the mid nineteens, showing regional differences in language use between two partners during the night where one had to make use of the toilet. It started with one that used long sentences and ended with regional one where the whole coversation consisted of four sentences of one word: Who? Me. What? Pee.
fjfaase··on Tiny C Compiler
A good idea that I had not thought about.

defined is a pre-processor 'keyword' that only is used in conditions after #if and #elif. Elsewhere it is ignored by the pre-processor. You could argue that it is not a real keyword. But lets see what happens when you define it as a define with: '#define defined 1'.

The function main can be defined with two or three parameters. The third contains the environment. You can also get the environment with 'argv + (argc + 1)'.

fjfaase··on Tiny C Compiler
Yes, you are right that a post-increment in a switch statement is no differently than elsewhere. The goal I had set was to implement a small easy to read C compiler. For that reason I tried to implement it as a single pass compiler that would generate code on the fly. The target was a small stack based language, which did support variable scoping and gotos, but not a switch. My first attempt was to implement the switch statement with chained if-statements where the switch expression would be evaluate over and over again. This only works if the switch expression did not have side effects and that the 'default' case would always come at the end. But that did not work, so I had to come up with another solution, a solution that would only evaluate the switch expression once. I decided to store the value on the stack and duplicate the value whenever needed for comparison. But that would require the value to be popped once a case was selected. A goto jumping from one case to another should land after the location where the value is popped, otherwise it would corrupt the stack. I fear that this solution does not work correctly when a case occurs within a for, while, do-loop, or if-statement. cases may occur everywhere in the enclosed code. This is sometimes used to emulate co-routines or generator functions.

Did you know that C has a keyword that is only a keyword in some places and that there is a function that can have two or three parameters?

fjfaase··on Tiny C Compiler
The code of TCC (0.9.26) is kind hard to compile, I have discovered in the past year, while developing a minimal C compiler to compile the TCC sources [1]. For that reason, I have concluded that TCC is its own test set. It uses the constant 0x80000000, which is an edge case for if you want to print it as a signed integer only using 32-bit operators. There is a switch statement with an post-increment operator in the switch expression. There are also switch statements with fall throughs and with goto statements in the cases. It uses the ## operator where the result is the name of a macro. Just to name a few.

[1] https://github.com/FransFaase/MES-replacement

fjfaase··on Joedb, the Journal-Only Embedded Database
If you have reliable file locking you can implement a journal-only with multiple users without needing a server. You have to take care of write errors and deal with partial writes, which can be tricky with a binary format. A long time ago, I implemented one based on XML. Some non-Windows file-severs (citrix?) did not have reliable file locking, causing corrupted files.
fjfaase··on The largest number representable in 64 bits
Maybe not as big before the processor dies. The numbers that are talked about are unimaginably large, far larger than the number of atoms in the visible universe.
fjfaase··on One developer used Claude to build a memory-safe extension of C
I understand that he is working on C++ according to blog post.
fjfaase··on Show HN: A small programming language where everything is pass-by-value
I have implemented similar behavior in some of my projects. For one, I also have also implemented 'cursors' that point to some part of a value bound to a variable and allow you to change that part of the value of the variable. I have used this to implement program transformations on abstract parse (syntax) trees [1]. I also have implemented a dictionary based on a tree where only part of the tree is modified that needs to be modified [2]. I have also started working on a language that is based on this, but also attempts to add references with defined behavior [3].

[1] https://github.com/FransFaase/IParse/?tab=readme-ov-file#mar...

[2] https://www.iwriteiam.nl/D1801.html#7

[3] https://github.com/FransFaase/DataLang

← PreviousPage 2 of 31Next →