frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Dotless Domains

https://lab.avl.la/dotless/
71•wibbily•1h ago•35 comments

Observations from people watching

https://skincontact.substack.com/p/21-observations-from-people-watching
110•jger15•5h ago•49 comments

Sierpiński Triangle? In My Bitwise and?

https://lcamtuf.substack.com/p/sierpinski-triangle-in-my-bitwise
108•guiambros•5h ago•31 comments

Fandom Sells Giant Bomb to Independent Creators

https://about.fandom.com/news/fandom-sells-giant-bomb-to-independent-creators
52•minimaxir•3h ago•7 comments

Show HN: Xenolab – Rasp Pi monitor for my pet carnivourus plants

https://github.com/blackrabbit17/xenolab
72•malux85•6h ago•22 comments

US vs. Google amicus curiae brief of Y Combinator in support of plaintiffs [pdf]

https://storage.courtlistener.com/recap/gov.uscourts.dcd.223205/gov.uscourts.dcd.223205.1300.1.pdf
335•dave1629•13h ago•599 comments

Ian Lance Taylor of the Go Team Leaves Google

https://www.airs.com/blog/archives/670
9•todsacerdoti•32m ago•1 comments

For $595, you get what nobody else can give you for twice the price (1982) [pdf]

https://s3data.computerhistory.org/brochures/commodore.commodore64.1982.102646264.pdf
139•indigodaddy•9h ago•88 comments

A critical look at MCP

https://raz.sh/blog/2025-05-02_a_critical_look_at_mcp
365•ablekh•12h ago•211 comments

Reverse engineering the 386 processor's prefetch queue circuitry

http://www.righto.com/2025/05/386-prefetch-circuitry-reverse-engineered.html
119•todsacerdoti•11h ago•39 comments

Pope Leo XIV: "AI poses new challenges re: human dignity, justice and labour"

https://www.vatican.va/content/leo-xiv/en/speeches/2025/may/documents/20250510-collegio-cardinalizio.html
171•90s_dev•8h ago•121 comments

Show HN: LoopMix128 – Fast C PRNG (.46ns), 2^128 Period, BigCrush/PractRand Pass

https://github.com/danielcota/LoopMix128
37•the_othernet•6h ago•19 comments

The History and Legacy of Visual Basic

https://retool.com/visual-basic
20•ibobev•4h ago•15 comments

The State of SSL Stacks

https://www.haproxy.com/blog/state-of-ssl-stacks
30•zdw•3d ago•7 comments

Strain gauge made out of PCB

https://github.com/vapetrov/PCB_strain_gauge
12•dr_coffee•3d ago•0 comments

Comparison of C/POSIX standard library implementations for Linux

https://www.etalabs.net/compare_libcs.html
92•smartmic•12h ago•31 comments

Embracer Games Archive is preserving 75000 video games and needs contributions

https://embracergamesarchive.com/
153•draugadrotten•16h ago•72 comments

Eagle Hunters of Kyrgyzstan

https://magazine.atavist.com/the-eagle-hunters-of-kyrgyzstan-world-nomad-games/
25•gmays•4d ago•8 comments

Adaptive Hashing

https://quotenil.com/adaptive-hashing.html
12•varjag•2d ago•4 comments

Arduino is at work to make bio-based PCBs

https://blog.arduino.cc/2025/04/22/arduino-is-at-work-to-make-bio-based-pcbs/
34•PaulHoule•2d ago•2 comments

How much information is in DNA?

https://dynomight.substack.com/p/dna
51•crescit_eundo•2d ago•50 comments

Adventures in Imbalanced Learning and Class Weight

http://andersource.dev/2025/05/05/imbalanced-learning.html
31•andersource•2d ago•4 comments

Show HN: Code Claude Code

https://github.com/RVCA212/codesys
98•sean_•12h ago•23 comments

Weave (YC W25) is hiring a founding engineer

https://www.ycombinator.com/companies/weave-3/jobs
1•adchurch•10h ago

Microsoft Teams will soon block screen capture during meetings

https://www.bleepingcomputer.com/news/microsoft/microsoft-teams-will-soon-block-screen-capture-during-meetings/
138•josephcsible•7h ago•202 comments

Intel: Winning and Losing

https://www.abortretry.fail/p/intel-winning-and-losing
81•rbanffy•16h ago•59 comments

Ireland given two months to implement hate speech laws or face action from EU

https://www.thejournal.ie/ireland-given-two-months-to-start-implementing-hate-speech-laws-6697853-May2025/
31•like_any_other•2h ago•33 comments

Not a three-year-old chimney sweep (2022)

https://fakehistoryhunter.net/2022/07/26/not-a-3-year-old-chimney-sweep/
103•nixass•20h ago•62 comments

React Three Ecosystem

https://www.react-three.org/
101•bpierre•14h ago•48 comments

Detect and crash Chromium bots

https://blog.castle.io/detect-and-crash-chromium-bots-with-one-weird-trick-bots-hate-it/
131•avastel•3d ago•38 comments
Open in hackernews

Sierpiński Triangle? In My Bitwise and?

https://lcamtuf.substack.com/p/sierpinski-triangle-in-my-bitwise
108•guiambros•5h ago

Comments

jcul•5h ago
I can't dismiss the cookie popup on this page. After rejecting or accepting cookies it reloads and reappears.

Apologies for a comment not related to the content, but it makes it difficult to read the article on mobile.

jcul•5h ago
Really interesting, and surprising article though!
IceDane•4h ago
Same problem here. Firefox on Android.
peterburkimsher•5h ago
Wolfram did a lot of research into cellular automata, and the Sierpinski Triangle kept showing up there too:

https://www.wolframscience.com/nks/

GuB-42•4h ago
This one in particular: https://en.wikipedia.org/wiki/Rule_90
jesuslop•5h ago
You get those also doing a Pascal triangle mod 2, so a xor. Is a zoom-out fractal as oposed to Mandelbrot set.
anthk•5h ago
True. pas.f in Forth

    : .r u.r ;
    : position  ( row -- )  cr  33 swap 2 *  - spaces  ;
    : pas ( 0 ... 0 -- 0 ... 0 )    0 >r begin
    over + >r  dup 0= until
    begin  r> dup while  dup 4 .r  repeat  ;
    : pass  ( -- )    0 1 0    18 0 ?do  dup position  >r  pas  r>  1+  loop      drop  ;
    : pax  ( 0 ... 0 -- )  drop begin 0= until ;
    : pascal  ( -- )  pass pax ;

    pascal
    cr
The same mod2:

    : .r u.r ;
    : position  ( row -- )  cr  33 swap 2 *  - spaces  ;
    : pas ( 0 ... 0 -- 0 ... 0 )    0 >r begin
     over + >r  dup 0= until
     begin  r> dup while  dup 2 mod 4 .r  repeat  ;
    : pass  ( -- )    0 1 0    18 0 ?do  dup position  >r  pas  r>  1+  loop     drop  ;
    : pax  ( 0 ... 0 -- )  drop begin 0= until ;
    : pascal  ( -- )  pass pax ;

    pascal
    cr
A Forth for people in a hurry:

     git clone https://github.com/howerj/subleq
     cd subleq
     sed -i 's,0 constant opt.control,1 constant opt.control,g' subleq.fth
     gmake subleq
     ./subleq subleq.dec < subleq.fth > new.dec
     ./subleq new.dec < pas.f
kragen•4h ago
Output from `cr pascal` in GForth:

                                    1
                                  1   1
                                1   0   1
                              1   1   1   1
                            1   0   0   0   1
                          1   1   0   0   1   1
                        1   0   1   0   1   0   1
                      1   1   1   1   1   1   1   1
                    1   0   0   0   0   0   0   0   1
                  1   1   0   0   0   0   0   0   1   1
                1   0   1   0   0   0   0   0   1   0   1
              1   1   1   1   0   0   0   0   1   1   1   1
            1   0   0   0   1   0   0   0   1   0   0   0   1
          1   1   0   0   1   1   0   0   1   1   0   0   1   1
        1   0   1   0   1   0   1   0   1   0   1   0   1   0   1
      1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
    1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1
   1   1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   1 ok
By changing `4 .r` to `bl + dup dup dup emit emit emit emit` I get this:

                                      !!!!
                                    !!!!!!!!
                                  !!!!    !!!!
                                !!!!!!!!!!!!!!!!
                              !!!!            !!!!
                            !!!!!!!!        !!!!!!!!
                          !!!!    !!!!    !!!!    !!!!
                        !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                      !!!!                            !!!!
                    !!!!!!!!                        !!!!!!!!
                  !!!!    !!!!                    !!!!    !!!!
                !!!!!!!!!!!!!!!!                !!!!!!!!!!!!!!!!
              !!!!            !!!!            !!!!            !!!!
            !!!!!!!!        !!!!!!!!        !!!!!!!!        !!!!!!!!
          !!!!    !!!!    !!!!    !!!!    !!!!    !!!!    !!!!    !!!!
        !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !!!!                                                            !!!!
    !!!!!!!!                                                        !!!!!!!! ok
But this is not using bitwise AND, just the Pascal's triangle approach. (Interestingly, you can reformulate that as a neighborhood-2 2-state 1-dimensional cellular automaton pretty easily; it occurs in a couple of different guises in Wolfram's catalog.)

Here's an ASCII-art version that uses AND as Michał describes:

    32 value size  : line cr size 0 do dup i and if bl else [char] # then dup emit emit loop drop ;
    : pasand size 0 do i line loop ;                                                           
Running `pasand` then yields this:

    ################################################################
    ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  
    ####    ####    ####    ####    ####    ####    ####    ####    
    ##      ##      ##      ##      ##      ##      ##      ##      
    ########        ########        ########        ########        
    ##  ##          ##  ##          ##  ##          ##  ##          
    ####            ####            ####            ####            
    ##              ##              ##              ##              
    ################                ################                
    ##  ##  ##  ##                  ##  ##  ##  ##                  
    ####    ####                    ####    ####                    
    ##      ##                      ##      ##                      
    ########                        ########                        
    ##  ##                          ##  ##                          
    ####                            ####                            
    ##                              ##                              
    ################################                                
    ##  ##  ##  ##  ##  ##  ##  ##                                  
    ####    ####    ####    ####                                    
    ##      ##      ##      ##                                      
    ########        ########                                        
    ##  ##          ##  ##                                          
    ####            ####                                            
    ##              ##                                              
    ################                                                
    ##  ##  ##  ##                                                  
    ####    ####                                                    
    ##      ##                                                      
    ########                                                        
    ##  ##                                                          
    ####                                                            
    ##                                                               ok
anthk•3h ago
Straight from the blog, too, from C to Forth:

   : sier cr 32 0 do 32 0 do i j and if ."   " else ." * " then loop cr loop ;
   sier

Output from eforth/subleq (with do...loop set in the config):

    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
    *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   
    * *     * *     * *     * *     * *     * *     * *     * *     
    *       *       *       *       *       *       *       *       
    * * * *         * * * *         * * * *         * * * *         
    *   *           *   *           *   *           *   *           
    * *             * *             * *             * *             
    *               *               *               *               
    * * * * * * * *                 * * * * * * * *                 
    *   *   *   *                   *   *   *   *                   
    * *     * *                     * *     * *                     
    *       *                       *       *                       
    * * * *                         * * * *                         
    *   *                           *   *                           
    * *                             * *                             
    *                               *                               
    * * * * * * * * * * * * * * * *                                 
    *   *   *   *   *   *   *   *                                   
    * *     * *     * *     * *                                     
    *       *       *       *                                       
    * * * *         * * * *                                         
    *   *           *   *                                           
    * *             * *                                             
    *               *                                               
    * * * * * * * *                                                 
    *   *   *   *                                                   
    * *     * *                                                     
    *       *                                                       
    * * * *                                                         
    *   *                                                           
    * *                                                             
    *                                                               
     ok
     ok
kragen•2h ago
That looks nicer than my version. But you should put the `cr` before the inner loop, not after it. That way you can remove the `cr` before the outer loop.
dvt•5h ago
Just a heads up, all (binary?) logical operators produce fractals. This is pretty well-known[1].

[1] https://icefractal.com/articles/bitwise-fractals/

wang_li•2h ago
The change rate in binary notation is fractal.
zX41ZdbW•4h ago
Sierpinski also sounds nice in music. Examples here: https://github.com/ClickHouse/NoiSQL
gjm11•4h ago
Here's a possibly-too-highbrow explanation to complement the nice simple one in the OP.

"As everyone knows", you get a Sierpinski triangle by taking the entries in Pascal's triangle mod 2. That is, taking binomial coefficients mod 2.

Now, here's a cute theorem about binomial coefficients and prime numbers: for any prime p, the number of powers of p dividing (n choose r) equals the number of carries when you write r and n-r in base p and add them up.

For instance, (16 choose 8) is a multiple of 9 but not of 27. 8 in base 3 is 22; when you add 22+22 in base 3, you have carries out of the units and threes digits.

OK. So, now, suppose you look at (x+y choose x) mod 2. This will be 1 exactly when no 2s divide it; i.e., when no carries occur when adding x and y in binary; i.e., when x and y never have 1-bits in the same place; i.e., when x AND y (bitwise) is zero.

And that's exactly what OP found!

tomrod•4h ago
I prefer mine au naturale 3-adic.

https://m.youtube.com/watch?v=tRaq4aYPzCc

Just kidding. This was a fun read.

kragen•4h ago
The 31-byte demo "Klappquadrat" by T$ is based on this phenomenon; I wrote a page about how it works a few years ago, including a working Python2 reimplementation with Numpy: http://canonical.org/~kragen/demo/klappquadrat.html

I should probably update that page to explain how to use objdump correctly to disassemble MS-DOG .COM files.

If you like making fractal patterns with bitwise arithmetic, you'll probably love http://canonical.org/~kragen/sw/dev3/trama. Especially if you like stack machines too. The page is entirely in Spanish (except for an epilepsy safety warning) but I suspect that's unlikely to be a problem in practice.

userbinator•3h ago
Sierpinski triangles are definitely a common sight in demoscene productions, to the point that they're acceptable in the smaller sizes, but others will think you're not good enough if that's all you do for a 64k or above entry.
marvinborner•4h ago
Very cool! This basically encodes a quad-tree of bits where every except one quadrant of each subquadrant recurses on the parent quad-tree.

The corresponding equivalent of functional programming would be Church bits in a functional quad-tree encoding \s.(s TL TR BL BR). Then, the Sierpinski triangle can be written as (Y \fs.(s f f f #f)), where #f is the Church bit \tf.f!

Rendering proof: https://lambda-screen.marvinborner.de/?term=ERoc0CrbYIA%3D

zabzonk•3h ago
I draw these with paper and pen when I am extremely bored in meetings.
susam•3h ago
I’d like to share some little demos here.

Bitwise XOR modulo T: https://susam.net/fxyt.html#XYxTN1srN255pTN1sqD

Bitwise AND modulo T: https://susam.net/fxyt.html#XYaTN1srN255pTN1sqN0

Bitwise OR modulo T: https://susam.net/fxyt.html#XYoTN1srN255pTN1sqDN0S

Where T is the time coordinate. Origin for X, Y coordinates is at the bottom left corner of the canvas.

You can pause the animation anytime by clicking the ‘■’ button and then step through the T coordinate using the ‘«’ and ‘»’ buttons.

kragen•2h ago
Gorgeous!
msarnoff•2h ago
Munching squares!
anyfoo•2h ago
Ah. Is that why LFSRs (linear feedback shift registers) and specifically PRBS generators (pseudo-random binary sequences) produce Sierpinski triangles as well?

PRBS sequences are well-known, well-used "pseudo-random" sequences that are, for example, used to (non-cryptographically!) scramble data links, or to just test them (Bit Error Rate).

I made my own PRBS generator, and was surprised that visualizing its output, it was full of Sierpinski triangles of various sizes.

Even fully knowing and honoring that they have no cryptographic properties, it didn't feel very "pseudo-random" to me.

modeless•2h ago
Try this one liner pasted into a Unix shell:

  cc -w -xc -std=c89 -<<<'main(c){int r;for(r=32;r;)printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}'&&./a.*
It used to be cooler back when compilers supported weird K&R style C by default. I got it under 100 characters back then, and the C part was just 73 characters. This version is a bit longer but works with modern clang. The 73-character K&R C version that you can still compile today with GCC is:

  main(c,r){for(r=32;r;)printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
Terr_•2h ago
Instructions unclear, machine rooted. :p
modeless•2h ago
Hey, at least it's not doing `curl | bash` like some people's installers do. It's only 109 characters, you can review that right? :-P
MaxGripe•1h ago
Sierpinski pirated it from Razor 1911 :)
lenerdenator•1h ago
It's more likely than you think.
ChuckMcM•1h ago
Y'all would really like https://www.gathering4gardner.org/ :-)

I tend to like lcamtuf's Electronics entries a bit better (I'm an EE after all) but I find he has a great way of explaining things.

msephton•1h ago
I first saw these sorts of bitwise logic patterns at https://twitter.com/aemkei/status/1378106731386040322 (2021)
fiforpg•28m ago
> the magic is the positional numeral system

— of course. In the same way the (standard) Cantor set consists of precisely those numbers from the interval [0,1] that can be represented using only 0 and 2 in their ternary expansion (repeated 2 is allowed, as in 1 = 0.2222...). If self-similar fractals can be conveniently represented in positional number systems, it is because the latter are self-similar.