News for hackers. Stuff that matters.

chkas

Re:Show HN: Avoiding "if" makes Quicksort faster on Thursday May 07, 2026 @10:40AM (#48050055)
That should give the same result.
Re:Show HN: Avoiding "if" makes Quicksort faster on Thursday May 07, 2026 @10:39AM (#48050037)
You can take a look at this - it's fast even without vector operations, as long as you avoid the branches that are often predicted incorrectly.

https://easylang.online/blog/branchless

Re:RSA and Python on Saturday March 28, 2026 @04:12PM (#47557793)
I made a similar tutorial for RSA and DH in Easylang—a learning and teaching programming language I developed myself. What makes things a bit difficult is that Easylang doesn't support big numbers.

https://easylang.online/apps/tut_publk.html

Re:Mandelbrot Set Explorer on Sunday March 16, 2025 @04:27AM (#43377604)
This is mine in my programming language: https://easylang.online/apps/mandelbrot.html?v=hn1
The physics in the simulation was faulty, that should be better now. Of course there are less collisions in 3D than in 2D. And this catapulting of stars is also an artifact in the discrete computer simulation

https://tiki.li/run/#cod=fVPRbuMgEHznK0aqdGodxSW5S0+uSl/zEVF...

Did some experimenting with gravity, not sure how far the physics is correct, but looks okay

https://tiki.li/run/#cod=dVLbbuIwEH33Vxyp0gqKGhIktKVqeO1HIB5...

@design choices: The graphic primitives built into the language - this is not useful for a general purpose language - but in beginner language this is an important motivating factor.
The aim is to offer beginners a simple and interesting entry into programming. IMO there is an unoccupied niche for this between Scratch and Python. In the days of home computer BASIC, it was easier to learn programming - you switched on the computer and with a few lines of BASIC code you could magically create a nice sine wave on the screen. Nowadays, beginners are often overwhelmed by all the complexity.
It shouldn't be that complicated. I tried it once with gravity and without limits on the edges. The cluster of stars moved around in 2d space and stars were repeatedly catapulted out, which then disappeared. Maybe you need a super gravity (black hole) in the center to keep it stable.
Hello author here. I'm a little surprised to see this on the front page of Hacker News. This is just a simple demo for my educational programming language Easylang. You can easily edit the code and increase the particle count for example. In the IDE you can then create a link with the code embedded in the URL.

https://tiki.li/run/#cod=dVLNbsIwDL7nKT5p0gRDdEGMA9PYM+yO0FT...

Another programming environment for kids with its own simple programming language: https://easylang.online/ide/
Re:The Physics of Colliding Balls on Monday September 30, 2024 @04:30PM (#41701753)
I have programmed a small simulation of colliding balls in 2D.

https://easylang.online/show/#cod=jVPbbptAEH3frzhSpMqJFYppI0...

Not Logo - but BASIC.
Maybe a help window where you can select commands like "background" would be helpful.
Thanks for the suggestion - my native language is not English.
First JavaScript, now WebAssembly - the world keeps on moving.
Python is very powerful and can therefore be quite complicated and has some pitfalls for beginners.
If you need more colors, you can use "color3 r g b", where the values range from 0 to 1.
Re:AES-GCM and breaking it on nonce reuse on Wednesday June 12, 2024 @12:37PM (#40660068)
I find the article a little confusing. IMHO the point is that you must NEVER reuse an XOR key sequence for stream cipher encryption. With RC4, this meant that you could never use the same key. With modern stream ciphers there is the nonce for this - the CTR mode of a block cipher is also a stream cipher. (GCM mode is just an extension of CTR mode for authentication).

I've put together a little online demo tutorial (in my teaching and learning programming language).

https://easylang.online/apps/tut_cipher.html?v=2405e

Older »