Hacker Newsnew | past | comments | ask | show | jobs | submit | e-dant's commentslogin

Thought it was obfuscated C code, then I realized it’s a tree or something

Pretty sure it's a regex to match email address strings.

Thank you kind stranger for a wonderful laugh on Christmas!

Challenge issued.

I wouldn't be surprised if someone comes up with obfuscated C code that looks like a christmas tree and prints out wishes by the end of the day/season.

Merry Christmas!


I'll admit it does look a bit like an IOCCC [0] entry. Can someone please do it for us?

[0]: https://www.ioccc.org/


Let's ask an LLM as a test!

Gemini 3 Pro gave some rather unimpressive answers: https://gemini.google.com/share/3cbcbe1fd64c

ChatGPT did much better but I cannot paste it into this text box no matter how many times I try with different formatting to get the white space preserved. chatGPT also could not figure out how to format it for pasting here.

Try four leading spaces?

    Test, is this monospaced?
    012345678901234567890123456789

A screenshot and a link to the resulting JPG?

I did recently try to use an LLM to make a twinkling christmas tree quine in the style of qlobe. It didn’t get close, maybe next year!

Perl time

Exactly, looks like Perl code to me. :)

It’s tragic that having a language as flexible and unopinionated as Perl is admittedly terrible for novice programmers because Learning Perl is easily one of the greatest introductory programming books.

It's a red-green tree. Your task is to invert it in O(n) operations.

I thought it was unobfuscated perl code. Merry Christmas ya filthy animals.

This life is needlessly absurd.

Why does this even exist?

And yes, I get what mining is and I get what the blockchain does. I’m saying that proof of work is absurd.


Those datacenters are the moai of our time; if you step back, it's interesting to watch.

Now that's certainly a take.

Worse of all, many different coins have proved you can have different proofing methods and those could be applied to Bitcoin but core developers will pull any shenanigan to avoid this.

The authoritarian state of KYC/AML might be even more absurd to some.

Welcome to our cashless society. It’s naive to think no one would fight back.

It may have devolved to useless speculation and gambling for now, but the genie cannot be put back into the bottle very easily at this point.


well put

We stare at screens full of text and pictures every day. We had screens full of text and pictures 20 years ago. Yet somehow we have justified re-creating every single component multiple times over, spending hundreds of trillions of dollars, to get the same thing we had 20 years ago.

We've been able to talk to machines, have them understand that speech, and do work based on it, for decades. But we're all still typing into keyboards.

We've had devices which can track our eyes to move a mouse pointer for 37 years, but we all still use our hands/thumbs to move a mouse.

We had mobile devices which had dedicated keys for input which allowed us to input without looking, and we replaced those with mobile devices with no dedicated keys (so we have to look to provide input) and bodies made of glass so they would shatter when dropped and required additional plastic coverings to protect them. Even automobiles, where safety is a high priority, also adopted input devices which require looking away from the road.

Our world includes a government which is indented to be led via decisions from all the people, and could easily be overthrown by all the people, but only a select few people actually get to make decisions, and they don't have to listen to the people, and basically do whatever they want (wrt the other few people who get to make decisions).

Yes, life is needlessly absurd. It's best not to think about it unless you wanna end up in a padded room.


Very mundane explanations for all of these things -- you could basically make a similar argument about anything at anytime if you were to phrase it similarly.

I have more of a problem with poor governance than strong automation. The economy should provide us all food and shelter, beyond that, do what you love.

You never had a voice to lose


A masterclass in debugging


It disappoints me to see hardware compensate for the failures of software. We should have done better.


> It disappoints me to see hardware compensate for the failures of software. We should have done better.

I disagree. From a user's point of view, hardware-assisted memory safety is always beneficial. As a user of any software, you cannot verify that you are running a program that is free of memory access errors. This is true even when the software is written in Rust or an automatic memory-managed language.

I hope that one day I will be able to enable memory integrity enforcement for all processes running on my computers and servers, even those that were not designed for it. I would rather see a crash than expose my machine to possible security vulnerabilities due to memory access bugs.


I'm skeptical that you even can fully prevent exploitation of human error in software design. This just narrows one class of error.


How could we have done better without first knowing better?


We have know better for decades, that is why Multics has a higher security score than UNIX, C flaws versus PL/I are noted on DoD report.


It also helps that nobody uses multics, so nobody has bothered to exploit it


I can give other more recent examples, to prove the blindness of C community to security issues.

From which decade since C came to be, do you wish the example?


I'm certainly not defending C. I'm just saying multics is a horrible example.


It is one out of many since 1958, starting with JOVIAL, how the industry has been aware of the security flaws that C allows for, which WG14 has very little interest in fixing, including turning down Dennis Ritchie proposal for fat pointers in 1990.

Note that C authors were aware of many flaws, hence why in 1979 they designed lint, which C programmers were supposed to use as part of their workflow, and as mentioned above proposed fat pointers.

Also note that C authors eventually moved on, first creating Alef (granted failed experiment), then on Inferno, Limbo, finalising with Go.

Also Rust ideas are based on Cyclone, AT&T Research work on how to replace C.

It was needed the tipping point of amount money spent fixing CVEs, ransomware, for companies and government to start thinking this is no longer tolerable.


Rust isn't going to fix security vulnerabilities, either, though.

My point is focusing on the language is inherently missing the point, which is simply incorrect code.


You have a whole class of dumb and dangerous bugs completely wiped off, which not even a new/junior untrusted developer can introduce. That's not nothing.

Of course, not checking if a user has permissions to perform an operation is not something Rust or any language will protect you against, but come on it's almost 2026 and we still are talking about use after free...


I agree. The underlying hardware should be as simple as needed and thus be cheap and consume little power. Fixing bad software practices (like using an unsafe language) via hardware hacks is a terrible mistake.


> Fixing bad software practices (like using an unsafe language) via hardware hacks is a terrible mistake.

It's like saying airbags, seat belts (and other safety features) in cars are a terrible mistake because they just fix bad driving practices.


On the contrary, fixing pervasive and increasingly costly ecosystem issues in hardware is exactly the kind of innovation we need.


ARM and lots of non-x86 architectures often use a series of bootloaders to kick up ram, wake up parts of the hardware, blah blah, and read devicetree blobs to know what the hardware looks like


I don’t understand the fs url hyperlink to a child nutrition website.


docs.pyfilesystem.org looks like it has been taken over.

It seems to redirect to here:

https://www.nourishinteractive.com/nutrition-education-print...

Which appears to be a gaming site.


If there are as many typos in some code as are in the article, there would be a whole lot of segfaults, too


The comments here about you needing money or time to exercise are wrong, and missing the point:

It’s hard, and that’s why you do it. It’s also fun.

Get the fuck out there and run, climb, swim.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: