You can fix that bug...
But it requires changing the shell, not the script
A developer going by the name Spydon has done something very silly: the tattoo he requested of some code contains an error. Spydon details his problem here at Stack Overflow, where he explains “A few months ago I tattooed a fork bomb on my arm and I skipped the whitespace because I think it looks nicer without it. But to my …
"...Chinese scripts that fail to translate that some people have done" I think you mean MOST have done. When people get Chinese tatoos, they seem to just choose two to four words, but in chinese this comes across as gibberish. Chinese people find the use of chinese characters in tattoos by Caucasians quite puzzling.
This post has been deleted by its author
"No more puzzling than the habit of Japanese businesses to choose a random English word and print it all over their products in big letters."
Or the habit of Japanese musicians to include random English words or phrases in their songs!
As an example; Angela Aki's 'This Love', which was used as one of the ending themes to the Anime Blood+.
I believe that, in some cases at least, some of this stems from laziness... when theres a perfectly good word or phrase available in English for an item or concept, they just adopt that rather than making up their own.
>>Or the habit of Japanese musicians to include random English words or phrases in their songs!
Which is true, and riotously funny when its done poorly.
I don't know if you've ever seen the anime Soul Eater, but the 2nd opening song, "Paper Moon" by Tomoko Kawase has a line that goes "Don't Scary". First time I heard it I was like Huh? WTF? Maybe the subtitles are wrong, but upon listening closer, that's exactly what she's singing.
Apparently the Japanese use English phrases that don't make much sense (if any) in their music, in their advertising and in the gamut of their designs, from clothes to shop windows, purely for stylistic purposes. So next time you Brits want to get on the US for mangling the English language (which admittedly, we do. Frequently.) keep in mind there's a culture twenty times worse about it.
This post has been deleted by its author
There's another error, : (colon) is a special shell builtin, you can't override them with a function.
See: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01
FreeBSD's /bin/sh even gives an error:
$ :() { }
Syntax error: Cannot override a special builtin with a function
Sorry :-(
Technically white spaces are significant in any and all programming language I've met. Their level of significance, on the other hand, does vary. Depending on where they are they can be quite the bummer in Python for example, and not so much in Lisp.This has the interesting side-effects of making almost any python script instantly human-readable on anything able to display plain text, while your average C program requires a specialised piece of software for humans to make sense out of it (a bit like that last sentence, then...).
It's also great for spacebar vendors.
Technically white spaces are significant in any and all programming language I've met.
Perhaps you've never met Algol68? I think I'm right in saying that no whitespace (not spaces, not tabs, not newlines) is significant in Algol68 sourcecode unless it is within a quoted string or character literal or a format literal.
Mine's the one with the Revised Report in the pocket ... I'll learn to read it some day!
> I think I'm righ
AFAICT you still need spaces to separate words don't you? The real test is, can you either strip all white spaces or randomly add some, without modifying the way the program runs? It is far from impossible to define a language in which whitespaces are insignificant; there may be one or several out there, too. I just haven't met one yet. AFAIK even the likes of BrainFuck and SegFaultProg will usually dislike the "random insertion" test.
AFAIK even the likes of BrainFuck and SegFaultProg will usually dislike the "random insertion" test.
ETA comes closer; the only whitespace that's significant is EOL. Spaces, tabs, etc are completely ignored.
I believe all whitespace of whatever sort is irrelevant in Unlambda, unless you use whitespace characters to name functions via the dot operator. Since Unlambda dispenses with baroque excesses like keywords and multiple-character names, it doesn't need to worry about word delimiters.
When all you have is unary application and combinators, everything looks like a Curried function...
I worked on an Algol68C compiler long ago, and have a disturbing memory of a single awkward situation where a space was needed. I hope I am wrong. It was so long ago...
By the way, FORTRAN was supposed to be simple too, but I wrote a helloworld type program with one character per card (using continuation flag thingy), and it didn't compile with a particular compiler. How dumb is that?
Nerd tatoos of a programming language that uses significant whitespace, obv, but of the options you give, I'm a sucker for nerd T-Shirts so I'm comfortable with the idea of being daubed in witty geek slogans or jokes that require a knowledge of higher maths to understand, that make everyone who isn't a nerd hate me on sight.
Programming languages with shitty syntax, however, can fuck right off.
My brother and some acquaintances went for a Chinese meal in Soho, London a few years back. During the meal the waiting staff took it in turns to come and look at one of my brother's acquaintances and then rapidly depart sniggering. Eventually even the kitchen staff had come to look and laugh. The subject of their amusement asked a waiter what the hell was so funny, and was asked if he knew what the Chinese characters tattooed on his arm meant. He replied that it was supposed to say "strength and courage", but the waiter informed him that the nearest English translation was "nunnery".
Turns out that the tattoo had been done in a place run by an ex-school friend of mine who is now a biker (and once worked as a security contractor in Iraq which he openly admits was for the opportunity to shoot at people). When my brother's acquaintance went to complain he was directed to a sign that said they took no responsibility for mistakes in tattoos containing non-English text. Knowing my ex-school friend I'd suspect he knew exactly what he was writing on the schmuck.
> Couldn't people look up the correct words on Google Translate before they get inked?
Pretty sure Chinese doesn't work that way, seems to me as if context changes meaning. Also Chinese is clearly difficult to read even for the Chinese; try getting a native Chinese speaker to translate something for you some time. I've once seen two native Chinese PhD's argue about what a Chinese newspaper article actually read, they couldn't even broadly agree on the general gist of the article.
Why the **** didn't someone write that before the ****** who put that stuff about doge memes put that stuff about doge memes on and stole most of my bloody morning?
OH shit. And half my afternoon!
And I haven't got time to copy the damn thing now!
Shit shit shit!!!!!
Oh hang on. That's like a bomb like too, innit?
OK that'll do.
Ta!
Um, I think you have a minor error in the last paragraph, here:
"if we get some good 'uns – and the wearers agree to publication –".
Wasn't there recently a court decision that the creator of the ink, not the wearer, owns the "intellectual" property rights? Some actor cheese-ball with a pseudo-Maori tattoo on his face lost the case? Has to get the creator's permission for product tie-ins to the tattoo? Oh well, I don't think anyone responsible for a real howler would want to claim their rights, anyway...
Not quite the same situation here is it, where's the tie-in, where's the marketing angle? Actually it's the photographer who would own the copyright on the tattoo images in question. While there are exceptions for usage in reporting news and the like, it's just common decency to get somebody's permission before splattering her or his photo all over the web. It seems reasonable that they'd seek the wearer's permission. The question as to whether they should seek the photographer's permission is apposite, but the consent of the original tattoo artist is neither here nor there.
find out how it works
You'll have to excuse the formatting, as the Reg still can't tell its ass from its elbow when it comes to preformatted text. Good thing no one ever wants to post code in the comments here, on an IT site.
:(){:|:&};:
becomes:
:(){...}
Define a shell function named ":", with the body inside the curly brackets.
:|:
Fork two instances of the shell, each running ":". The first instance's stdout is input side of a pipe, and output side of that pipe is second instance's stdin, but this is largely irrelevant.
&
Start those two instances in the background.
;
Another command follows.
:
Execute the shell function we just defined.
So the final ":" tells the current shell to execute the function. The function tells the shell to fork twice, each child shell executing the function. In the child processes, the function tells the shell to fork twice...
Replace ":" throughout with a meaningful name, such as "forkbomb", and it is clearer.
I haven't bothered trying it, but it seems on casual inspection that putting the pipeline in the background is unnecessary. Perhaps I'm missing something.
Somebody needs to explain to the unmarked WHY a person would need to write anything permanently on his or her body. One guy I worked with had his kids' names on his forearm.....seriously? Did he think he would forget? And programming languages that are amazing cutting edge one day are obsolete the next (COBOL, anyone?) C. M. Kornbluth's "The Marching Morons" is here....