Hacker News new | past | comments | ask | show | jobs | submit | mellonaut's comments login

The last program on the examples page⁰ truly is amazing:

A guy (called Piet!) saw an artwork that reminded him of Piet (the lang) and tried executing it¹.

> It ran! [...] This is probably the first time in history that a graphic artist has painted a functionally workable computer program by accident.

[0]: https://www.dangermouse.net/esoteric/piet/samples.html [1]: https://gitlab.fabcity.hamburg/hofalab/piet-get-together


If you relax the "functionally" condition enough, it has been already shown that most paint splatters (including art pieces) are actually valid Perl [1].

[1] https://www.mcmillen.dev/sigbovik/


I think the issue in this case is that the Perl programs were "really" created by OCR hallucinations, not graphic artists. Piet, on the other hand, is really executing the painting itself.


I think in both cases some amount of interpretation was required:

- for Perl, OCR to a character set

- for Piet, manual “convert[ion] into a clean image file using close colours from the Piet palette”


For the second case, is there an argument that this process was unambiguous and objective in terms of a fairly wide range of metrics over color spaces?

I don't actually have much idea of how far, numerically, colors vary due to different illumination, or due to different digitization processes.


In this case, the Piet palette uses about 8 different colors and 3 different "steps" of luminance, so it seems hard to mess it up too much even if it's based more on a human understanding of colors then a mathematic one (orange -> orange, light blue -> light blue, dark blue -> dark blue, white -> white, etc).

It's also interesting to note that, for Piet, the colors themselves don't have any particular meaning, the instructions are encoded by the differentials between one color and the "next" color in the program direction, with blocks of continuous colors encoding noops. So moving from red to light red is a [0,-1] change, (no hue, 1 step lightness), and moving from blue to dark red is a change of [4,1] (4 steps of hue, 1 step of darkness). So the exact colors don't matter too much


and yet, I can write a line of Perl today that I will not remember how/why it does what it does tomorrow. I don't know if this says more about me or the language other than I don't do it enough any more. However, the fact that paint splatters are better than I am is just proof that it is not the language for me


> Piet J. (yes, that's his real name) was browsing art in a small gallery and saw a work which reminded him of a Piet program. He spoke to the artist, who claimed to know nothing about the language. Piet took a photo of the artwork (left), converted it into a clean image file using close colours from the Piet palette (right), and tried running it.

> It ran! The code executes an infinite loop which reads in ASCII characters and prints out the corresponding numerical ASCII values.

Get out of town. Get right out of town.


I did enjoy the one which computes π;

> Naturally, a more accurate value can be obtained by using a bigger program.

I think that's a first for me.


Isn't there an obfuscated C or Perl competition program that also estimates pi by measuring its own code in some way?

Edit: Oh yes, it's "westley" from 1988: https://www.ioccc.org/years-spoiler.html#1988_westley


I made a JavaScript port, that might be easier to decipher if you are more familiar with js than C: https://quaxio.com/pi.html


Do you mind me asking, what does the last calculation do: pi=(pi * 100 | 0 ) / 100;

EDIT: Ah, nvm. It's truncating the result to 2 decimal places.


|0

There are just too many ways in JS to say Math.floor


https://www.cise.ufl.edu/~manuel/obfuscate/pi.c

If I remember correctly, this program also calculates pi more precisely the larger the circle.


That's originally westley.c from IOCCC 1988. As that site says:

> Unless otherwise indicated, the code comes from the International Obfuscated C code contest.


Sadly, that depends on a discrepency between npiet and the current Piet spec:

> The interpreter now begins sliding from its current white codel, in the new direction of the DP, until it either enters a coloured block or encounters another restriction.

The npiet interpreter, instead, rewinds its position to the last colored codel upon peeking through whitespace. One of these days, I intend to add that behavior as an option to the lexer in my Piet compiler[1], but I haven't bothered yet.

Following the spec, the program is a trivial nonhalting loop because the extreme corners of almost all blocks are white-adjacent. Writing complex Piet programs to target multiple interpreters and compilers is quite the challenge, as they've all got subtly different undocumented interpretations of the spec. I think that the output of my Piet backend is more or less interpreter-agnostic, but I've only dug into the details of three or four other interpreters.

[1] https://github.com/boothby/repiet/


I wonder what the chances are that a simple painting like this (a few large rectangular blocks) is a valid program. From skimming the documentation, I tend to think even that every such image would run without error, given that "Any operations which cannot be performed (such as popping values when not enough are on the stack) are simply ignored, and processing continues with the next command."

However, another question is how many of such random images would actually do something "meaningful".


> It ran! [...] This is probably the first time in history that a graphic artist has painted a functionally workable computer program by accident.

I think this truly deserves a CS Ig Nobel Prize, if there were one, for making people laugh and then making people think.


> This is probably the first time in history that a graphic artist has painted a functionally workable computer program by accident

While impressive organically, it sounds easy when targeted; we could design a programming language where an image of Mona Lisa prints "hello world" - and claim a similar feat.

Perhaps the reverse is more interesting - programmers accidentally wrote a language that could treat real world abstract art as valid input.


> Perhaps the reverse is more interesting - programmers accidentally wrote a language that could treat real world abstract art as valid input.

Isn't that what happened here?


That’s what I’m saying.

I.e. that “programmers accidentally wrote a language that could treat real world abstract art as valid input” - and to me it’s more interesting than what grand-grandparent is describing.


Not just valid, but does a not-nonsense task.

I think in this case, there is a coincidence on both sides? Like, the language or the painting could have been different such that the painting would run, but what it would do wouldn't be a recognizable task.


Was it an accident though? Seems like they were targeting the same style of art so of course some would become valid input


update: actually we have perl, https://www.mcmillen.dev/sigbovik/


I just read that ... incredible. I mean the language itself is just bizarre, but that story tops everything.


Thanks! That's a nice resource, some of those I did not yet know about


If you install Libredirect and head to the settings, you can use the Esmailelbob instances for lots of services. I suggest such instances because these are the ones which worked better.


within 15min of you posting this, hitler has become the #1 ranked thing on the leaderboard


It's not Tetris but it's not Not Tetris¹

¹) https://stabyourself.net/nottetris2


It's safe to assume this page assumes some prior knowledge of Tauri[0] and Vue[1], which would answer your question :)

[0] https://tauri.app [1] https://vuejs.org


What an incredible feeling of self-agency and power it must be to be able to say “I am not dumb” after being called a dumb mute by everybody all your life. Amazing.


At the time "dumb" mostly meant "not being able to speak" (mute); so she's saying "I can talk" and not "I'm not an idiot".

Kind of an interesting example how language changes.


Ironically, "idiot" had a specific medical meaning as well. It basically meant "infantile".


NASA apparently builds in onion cutting features in all of their space robots, after Opportunity’s “my battery is getting low and it’s getting dark”.



Oh wow I coincidentally posted something about the same XKCD strip in my reply to the person above, but have never come across these versions before, thank you!


This has to be some PR guy writing these, the tweet strings surely aren’t being sent from the lander itself.


With the last electrons in his batteries, the last few watts - the lander finally got a stable connection back, could then create a chatgpt3 account and use the API to express his last wishes on Twitter.


5 minutes later the account is banned for having posted location data on the rover.


Though I completely agree with you on a rational basis (the first string being coined by someone who is not even in NASA¹), for some reason anthropomorphising space robots² gives me a weirdly positive feeling.

¹ https://www.snopes.com/fact-check/opportunity-rovers-final-w... ² https://xkcd.com/695/


> anthropomorphising space robots² gives me a weirdly positive feeling.

That’s why they do it; that’s how they get you :)


I am in no way affiliated with them, but if you want a great alternative for the creative suite that HAS pantone support¹, definitely try out the Affinity counterparts: https://affinity.serif.com/

1. https://twitter.com/affinitybyserif/status/15859336521015992...


I decided to go cold turkey a few months ago, cancelled my Adobe CC subscription, uninstalled and went with Affinity Designer+Photo (they had a 50% off offer on).

To be honest, it’s hard! Every time I open the apps the muscle memory isn’t there, everything takes longer.

I didn’t used CC often enough any more to justify the subscription. But 20 years of knowledge and experience (at times I was using it every day) doesn’t translate as quickly to another app when you are only using it once a month.

The Affinity products are good, they just aren’t exactly the same as the Adobe equivalents.

I’m committed to not going back though.


I have Affinity Photo and suffer the same problems. I was never a Photoshop expert, nor a designer (I know its fallen out of fashion for web design), but I had been using it for 20 years.

I struggle and get frustrated with affinity photo (why are there multiple types of pixel layer??), even if it is good software, because to me - wrongly, of course - photoshop is de facto _how_ a photo editor should work. I'm sure I'll adjust with time. But I use photo editors less than ever, so it's very slow going.

But, I can't really complain for the price I paid, and no subscription necessary. A lot of respect for Affinity in that regard. It's a business model that is becoming increasingly rare.


This is true. They are a rival creative suite, and not a clone. For some things you will need to adjust your mental model, for which their in-house video tutorial series¹ are quite nice. For other things such as studio layout and keybindings you can either try to make them as close to Adobe as possible, or invest some time adapting to the new situation.

1. https://affinity.serif.com/en-gb/learn/


What stops you from using the older Adobe products that are available for legal free downloads?


Certainly on the Mac, compatibility issues stop you from even installing older versions (installer is 32bit), then I think there were other issues with certain functions.


Also Corel Graphics Suite. Still available on physical media with a perpetual license.


I am in no way shape or form affiliated with them other than an extremely satisfied user.

I know Hacker News loves not having to rent their software, and I thought you might appreciate the fact that there are full fledged, cross platform replacements for Adobe Photoshop, Illustrator and InDesign. No subscription necessary, just a simple one time purchase per app. Even the iPadOS¹ apps (two of which are ready, the third is in the works) are not crippled, unlike many of their counterparts.

Unfortunately there are no plans of the apps coming to linux², but I have heard reports of people getting it to work using bottles³.

Oh, and re: another recent HN front-page post⁴, yes all apps have Pantone support⁵ ;-) (and from my experience importing AI and PS files works quite reliably)

---

1. https://apps.apple.com/gb/app/affinity-designer/id1274090551...

2. https://forum.affinity.serif.com/index.php?/topic/98932-faq-...

3. https://forum.affinity.serif.com/index.php?/topic/166159-aff...

4. https://news.ycombinator.com/item?id=33369951

5. https://twitter.com/affinitybyserif/status/15859336521015992...


In this case I don’t think it’s as bad as you make it look. Comments are hidden by repo owners because they are off-topic. They might be considered similar to HN [DEAD] comments, which (correct me if I’m wrong) also require an account with showdead on to be viewed.


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

Search: