Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Chicken chicken chicken – chicken chicken programming language (torso.me)
147 points by torso on July 1, 2013 | hide | past | favorite | 71 comments

Except that the name "chicken" is already taken:

google search: "chicken programming language" returns:

#1 Chicken (scheme implementation) http://en.wikipedia.org/wiki/Chicken_%28scheme_implementatio...

#2 CHICKEN Scheme http://www.call-cc.org/

I don't think this language is called 'chicken' but rather 'chicken chicken', which is a bit confusing. I expected some kind of extension language built on top of chicken scheme but no, just no scheme and way more chicken.

It might be funny to also have a 2 symbol language called 'duck duck goose' where statements are terminated by 'goose' or something. I can't see any confusion between that and, say, duck duck go either!

I was also dismayed to find out that rather than being a mainstream post about my favorite little scheme... I'm greeted by an esoteric language of the same name.

It looks fantastic, just the kind of thing I'm looking for - I know Racket rather than Scheme, though, how different are the two languages?

I read quite a good interview with Chicken Scheme's author a few months ago. Here's the link which might be of interest:


It depends on how you use Racket, since it is actually a family of languages, but if you use R5RS I would say it should be really easy to port apps between them. And the community is great so I don't think you would have problem picking it up

Why would you call it "esoteric"? Eh, programmers these days.

I haven't decided on a name. Not sure it even needs one. "Chicken" would be a bad name though, as there obviously isn't enough chicken in it.

Error messages are very clear and understandable which is definitely a plus. For example:

    Error on line 1: expected 'chicken'


Expected, chicken :

Found, chicken

That's got to be the funniest error message I've read

You should try Python.

Note that in testing, you'll want to use the semi-minified version of this language, "cock".

For production, the fully-minified "hen" is naturally preferred.

EDIT: There is a lua implementation available also: 'pollo.

"BBQ: Chars the topmost group of chickens into the corresponding ASCII code. ASCII stands for American Standard Chicken for Information Interchange."

Dude thought of everything...

Do check out the presentation (http://youtu.be/yL_-1d9OSdk) as he goes into a fairy bit of detail on the motivations and implementation of the project. Fairly moving actually

I love how even the JS implementation contains almost only the word chicken repeatedly.

I've never been so amused by source code as I was reading that. I particularly enjoyed how he used spaces after dots and question marks, making it read like punctuation.

I like the Chicken he threw in after the return for good measure. Just didn't have enough chicken without it.

My JavaScript is a bit fuzzy, but I think those last two lines actually parse as `return chicken.Chicken;`, so the last Chicken is actually significant.

You're totally right. I was reading it like a sentence. My bad.

Once again showing the eerie prescience of The Parking Lot is Full? http://www.belligerati.net/archives/chicken.gif

(Original link to 1996 comic on the PLIF archive is broken, regrettably)

I'm waiting for the buffalo buffalo port.

Great prototype. To scale, you will need to implement egg.

But then he would run the risk of confusing future programmers

"Now, which comes first..."

What matters more is which ships first.

Furthermore, when this is implemented in ObjectiveC, the Apple app store will require all chicken-chicken-based apps to be fully cooked (and all eggs hard boiled).

Not really. Cue the patent trolls!

Um, I mean patent chickens, of course.

If this person was REALLY good, they would have changed the word to 'duck' and used 'goose' as the semi-colon. duck duck duck duck goose

The paper actually reminds some blog posts about Ruby or Smalltalk. Just replace the word chicken with the word object.

cool :) But isn't the EOL character a second meaningful symbol in your language?

Chicken chicken chickens, chicken? Chicken.

Yes, it feels like missed possibility to name language Malkovich.

For those who don't have idea: http://www.youtube.com/watch?v=lIpev8JXJHQ

--Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken?

Syntax error Example usage: chicken -chicken --chicken chicken > chicken

chicken chicken.. chicken chi-chi-chicken, kenchicken?

> chicken chicken

Chicken chicken, chicken chicken. Chicken chicken chicken chicken: "Chicken". Chicken chicken chicken chicken chicken chicken Chicken chicken.

"Chicken chicken chicken" [1]

Chicken chicken, chicken chicken!

[1] Chicken

Chicken, chicken chicken, chicken chicken chicken; Chicken chicken chicken chicken. /Chicken

(CHICKEN: Chicken chicken chicken chicken!)

The source code, combined with my utter lack of sleep in the last 24 hours, caused me to giggle uncontrollably.

Chicken! Chicken chicken?

//Chicken chicken chicken

chicken (chicken = 0; chicken++; chicken = chicken/0){



chicken = 0 and chicken = chicken/0 are both declarative which will break your chicken loop. Also, anything divided by 0 is undefined. Try:

chicken(chicken = 0; chicken < chicken/chicken; chicken++){

  chicken chicken;

Which in pure chicken chicken would be:

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken

chicken chicken chicken


[Edit: Add chicken chicken interpretation]

the word 'chicken' has now lost all meaning.

Ahh! This has been happening to me since childhood and I never knew it was a documented psychological phenomenon. Thanks.

When can we expect an LLVM backend?

I think we have a winner for the next IOCCC (International Obfuscated Chicken Coding Contest).

That sounds like a difficult competition, how could you make it more obfuscated? You could implement a BF interpreter.

I have to ask: What does this Acme stand for?

It doesn't stand for anything - it's the company that Wile E. Coyote orders wacky equipment from in the cartoons in order to defeat the Road Runner. It's the namespace in CPAN for joke modules.

Thank you, I had been wondering about that every now and then.


I laughed so much ahahahahahah, thank you dude.

If Torbjörn Söderstedt would like to explain how chicken.js works - there is now an open stackoverflow question: http://stackoverflow.com/questions/17414435/how-does-chicken...

There are four statements: 1. Initialization 2. Read next character or bytecode 3. Conditional, first leg is parsing and second intepretation. 4. Return

When parsing, the function will call itself recursively as chicken(linenumber, 0). When interpreting, it calls itself as chicken(undefined, undefined). With the second parameter 0 or undefined, the initialization code will not run again. With the first parameter undefined, it will run the interpreter instead of the parser. (It is important that the line number is non-zero.)

This is where the implementation gets a bit ugly. There's no way of preventing the interpreter from running. That means the error message must form valid bytecode. It does this by setting the stack pointer to -1 and returning an array of length two. The interpretation starts at index 2, which will be read as undefined and thus interpreted as the axe instruction (halting the program). sp will have been increased to 0 by the initialization and thus points to the error message at index 0 in the array, which will be returned as the result. (The second value in the array is unused, and was only inserted to avoid using a parenthesis.)

That should hopefully clear up the big picture. Some small notes:

Comparing input and code during initialization should always be false. When negated, it produces the value 0.

The value after && that follows the comparison with "n" is always true. It was just a way to avoid a parenthesis.

CHICKEN ++- CHICKEN produces -1. The side effect isn't used.

seems stackoverflow though this question was too fowl for them and asked me to push it over to codereview -> http://codereview.stackexchange.com/questions/28015/how-does...

I dare say that Brainfuck has a worthy challenger in the category of driving one insane.

At least chicken chicken lacks the active hostility of INTERCAL.

> Error on line 97: expected 'chicken'

That's hilarious.

Write compiler in chicken lang and call it egg.

Then you will solve unsolved puzzle what was first compiler or programming language. or if you will: chicken or egg.

The deadfish program sadly stops working after it has run once.

I tried debugging it, thankfully the javascript code isn't minified. I still failed.

After about 3 seconds of looking at the source code for the VM I began wondering if chicken was spelt correctly..

It would be awesome if someone would implement the Hodor programming language, next.

I wonder if he became a vegetarian after managing to write this.

And I bet he has chicken dreams.

I have more nightmares about what will pass as valid JavaScript.

About being vegetarian: see the BBQ instruction. :-)

SteveBallmer#: A language whose only symbol is "developers".

That documentation

can someone elaborate the cat program?

output = input

chickens was also a valid token.

Boo for reusing Chicken scheme's name.

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