Signed Char Lotte
nickdrozd.github.io
nickdrozd.github.io
BTW, in the spirit of art that uses two mediums with one source, there's this thing ‘oscilloscope music’: as far as I understand, the same signal goes to the speakers and the display, so it likely doesn't get more raw than that. Though, most of it is abstract shapes.
E.g.:
It was a lot of fun, and I recommend the experience. You get to figure out control flow (if you've never written a program in anything lower level than C, as I hadn't, you'll need to figure out control flow with just jumps; there are no procedure calls or looping though there's "if"), and then there's some room for creativity in choosing the character names and scene descriptions.
Probably my all time favourite C fragment.
goto hell; doIt() or die screaming
as literal code. $ perl -E 'use strict; use warnings; sub screaming { "SCREAM" } sub doIt { 0 } doIt or die screaming'
SCREAM at -e line 1.
Hell, we can go full English if we want: $ perl -E 'use strict; use warnings; sub screaming {"SCREAM"} sub it {0} sub do {0} do it or die screaming'
SCREAM at -e line 1.
For those following along that aren't quite as familiar with Perl, that's a statement "do it or die screaming" which is all completely valid, strict and well defined Perl. When not a one-liner, it would be: use strict;
use warnings;
sub screaming {"SCREAM"}
sub it {0}
sub do {0}
do it or die screamingThere seem to be about 77 different ways that can happen and 573 different ways to fix it, and if you do the wrong one, then everything's screwed for everyone, and the history log is useless or obliterated; there's no undo.
If you haven't flogged it enough, you can try to reflog it, but really the only safe thing to do is kill the clone, birth a new clone, and start over.
Since its "hiring day"; I'll ask: If you were interviewing someone and they listed an IOCCC win, would you count that as a plus? would you have to go look at the entry first?
And turned around: if you've won (or even submitted an entry) to IOCCC, would you mention it when applying for work?
Two caveats:
- A lot of this knowledge might be kind of useless (for example, how to create unreachable code which nevertheless compiles), but I expect it would be difficult to demonstrate equally thorough understanding of the syntax of a language using exercises or looking at previous work (which ideally uses the minimum of sophistication to achieve the necessary functionality).
- It proves mastery of the syntax, but not of idioms, security, maintainability, speed, or any other metric relevant for production code. These might be correlated, but I'd rather see/present some examples of these as well to be sure.
Your question has another angle: why would I care to work for an employer who looked down on my IOCCC win? It acts as a filter both ways.
gcc -w 1990/tbr.c
1990/tbr.c: In function ‘main’:
1990/tbr.c:7:50: error: void value not ignored as it ought to be
7 | e(-8) ,gets (1+( c=q) )|| exit (0); r(0,0)
| ^~~~~~~~~~~~~
1990/tbr.c: In function ‘e’:
1990/tbr.c:22:43: error: void value not ignored as it ought to be
22 | 3 ;}e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||exit(1):
| ^~~~~~~
Similar for clang. I'm sure there is an easy fix, but I don't know what it is.The program in question, if anyone is wondering, was the 1990 winner of IOCCC "Best Utility" award. Source is here:
https://www.ioccc.org/1990/tbr.c
The authors explain in rot13: "Guvf cebtenz vf n ehqvzragnel furyy." clang -std=c89 -Wno-implicit-function-declaration -fno-builtin tbr.c
Compilers are fussier (with good reason!) than they used to be.[1] https://mame.github.io/ioccc-ja-spoilers/patches/1990-tbr.pa...
But there's a catch. Second kind of engineer is not only better, but also much more desirable and highly paid, so may be it's an indicator that you should check whether your salary range is high enough and your tasks are challenging enough for someone like that. For some (if not most) roles, 9-to-5, grunt work engineer that just closes tickets and doesn't write new languages in his spare time is really the best fit.
I also failed an interview (or rather was not offered a job) at one of the FANGs, and I thought I did good enough on the interview portion, but it was the only interview where I didn't have the opportunity to drop some obscure trivia.
I ended up doing some readability related work at my current job because of (in spite of) my IOCCC experience.
Yes, but typically as a passing mention. In that way it causes no harm for those who don't know IOCCC and gives me a plus for who know it.
Code should be written to be understood by humans first and foremost. The person who can understand such deliberate garbage clearly and explain it well to those who don't understand, well, those people are the perfect human debuggers, in my opinion.
"If new true friend not protected for explicit private union, break case and try using this".
All C++98 keywords, here.
https://www.reddit.com/r/ProgrammerHumor/comments/4qw691/dr_...
for//ever
(;;){
Then I realized that Civilization II was created by, well, programmers. Though I couldn't say who wrote the dialogue.
/** @brief Construct a String equal to "true" or "false"
depending on the
value of @a x. */
inline String::String(bool x) {
// bool_data equals "false\0true\0"
assign_memo(bool_data + (-x & 6), 5 - x, 0);
}
Source: https://github.com/kohler/click/blob/6fa978f0188bd0b8a266f65...Context: This is the source code of the Click Modular Router, a system for implementing packet processing logic with a graph-like DSL. Both primitives, and certain complex logic, are implemented in C++; however, as this has to be able to run as a Linux kernel module or in userspace or as a BSD kernel module, it can't use the C++ standard library, and do has its own stdlib.
Plus cache locality.
wouldn't (x * 6) get the same result?
I doubt this string conversion code is ever on the hot path for packet processing, but Click is in general written like everything is.
Exercises
...
2. Modify “signed char lotte” so as to include more C keywords.
Lots of analysis but the article stops short of analyzing how the core logic works.
Note in the example he gave on the line '$./charlotte 5'. This is the only line that starts with a prompt ($).
from the original
> for (get = !get; !out; (char)*lie & 0xD0 - !not)
get = !get
That's a toggle.It is curious to me how when a programmer does something beautiful and creative, it is (rightly) revered by other programmers, such as this example.
On the other hand, if someone who is not a programmer but is an artist or a writer, dabbles in programming, it is often met with derision and extreme nitpicking by programmers.
In other words, there seems to be a bit of a double-standard, where in one's own discipline one is able to appreciate creativity and art, but if someone else uses dabs of one's discipline in theirs, one can no longer see the artistic merit and can only fixate on the technical limitations.
Comparing apples to apples, if the programmer dabbled in artmaking or writing, I'm confident they would get a similar reaction from accomplished artists or writers.
There are many, many, MANY examples of programmers attempting to write, and I'll stick a pin in this to say most of it is not good--if not truly bad--and in both disciplines the number of people who take the difference in expertise as an altruistic teaching opportunity are very few indeed.
Fwiw, this week I've been reading 'All Creatures Great and Small,' an autobiographical classic by a veterinary surgeon, and quite wonderfully written...
https://en.m.wikipedia.org/wiki/James_Herriot
And let's also remember that JM Coetzee, novel laureate in literature, began his career as a programmer.
https://en.m.wikipedia.org/wiki/J._M._Coetzee
And Ted Chiang was a writer of software documentation, before becoming known for his sci fi stories.
Yes, this is in-line with what I was, perhaps poorly, trying to articulate. The programmer dabbling in art may get a poor reaction from accomplished artists, much like the artist dabbling in programming may get a poor reaction from programmers.
But that same programmer who is dabbling in art may also get a good reaction from programmers, while that same artist dabbling in programming may also get a good reaction from other artists.
It's precisely that distinction between celebrating those who are in-discipline or in-group and deriding those are out out-discipline or in the out-group is what I am musing about.
When an amateur announces they've created fine art and even dares put it up for auction at ridiculous prices, true artists complain. A lot.
When you architect a building, architects complain about all the things you did wrong. There's even a popular blog making fun of McMansions.
When you build a car in your garage, true car engineers will tell you it's dumb and you missed a whole bunch of important things.
But those are not the folks who are great at their craft. Those are the gatekeepers afraid of newcomers. The greats encourage new entrants because they know the pie can only get bigger.
On the other hand, if someone from another discipline uses your discipline as an element in theirs, those from whose discipline that element was taken from seem typically unable to appreciate the broader work of art, instead only fixating on how the materials from their discipline have not been used properly. Case in point: if for example a contemporary artist incorporates some programming in their art installation.
It's the difference between a thing and something intended to evoke that thing, which often comes off as a lazy caricature. If you can't see past the surface level, it evokes what is intended. If you can see past it, but you also see the intent, it's like a charade that falls apart. You know that if you were trying to evoke that same idea, you'd do it a different way that would still evoke the intended thing at the surface level, and additionally evoking the intended feeling in people who understand the subject matter being used.
In the case of OP, imagine if it were just poetry with indentation and parentheses and semicolons in places that make it look like code, maybe with some jquery mixed in with fortran and excel functions. If they mixed jquery with fortran and excel to juxtapose them or something, that's one thing. If they do it because "well that looks like code to me" it's another thing.
I think it really is a feeling similar to being lazily caricatured that drives people to criticize. It fails to evoke the thing the artist intends it to evoke to people who see below the surface.
(didn't mean to rant. you just got me thinking "out loud" and rambling)
https://www.computerworld.com/article/2467812/polyglot-progr...
That said, I'm a programmer who took digital media art installation courses in school and I didn't find it to be that different from programming, just with different results/goals. https://cycling74.com/products/max isn't a toy programming environment any more than https://www.ableton.com/en/ is a toy environment or https://origami.design/ is a toy environment. They just have different goals, and perhaps different standards of quality?
In such writing, the challenge is to construct beautiful texts despite of artificial constraints.
They wouldn’t understand the constraints, so they wouldn’t be able to understand why nicer texts wouldn’t satisfy them.
When a wizard from a different house uses your magic, you gotta defend your holy right and exclusivity.
When one of your wizards uses another’s magic, that’s fantastic! No threat to your tribe and might even make it better.
I've honestly never seen this happen and have no idea what kind of person would react this way.
> I've honestly never seen this happen and have no idea what kind of person would react this way.
Take a look at some HN user responses to when the Google Will Eat Itself art project was posted here [1].
[1] https://news.ycombinator.com/from?site=gwei.org
A couple choice examples of the kind of behavior I am talking about:
> I'm pretty sure it would be trivial to write a program that automatically generates modern "art" exhibit descriptions like this one.
> I'm not sure what's worse, the fact that this is a stupid idea - or the background
And so on...
Got lost in a train of thought but I hope you understand what I'm trying to say.
> It took me four years to paint like Raphael, but a lifetime to paint like a child
So you could ask why Picassos stylized paintings are revered, but kindergarteners works are not