6 ms·
Show HN: Chicken chicken chicken – chicken chicken programming language
- pwg 13y agoExcept that the name "chicken" is already taken: google search: "chicken programming language" returns: #1 Chicken (scheme implementation) http://en.wikipedia.org/wiki/Chicken_%28scheme_implementation%29 http://en.wikipedia.org/wiki/Chicken_%28scheme_implementatio... #2 CHICKEN Scheme http://www.call-cc.org/ http://www.call-cc.org/
- merlincorey 13y agoI 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.
- James_Duval 13y agoIt looks fantastic, just the kind of thing I'm looking for - I know Racket rather than Scheme, though, how different are the two languages?
- ibrow 13y agoI read quite a good interview with Chicken Scheme's author a few months ago. Here's the link which might be of interest: http://spin.atomicobject.com/2013/05/02/chicken-scheme-part-1/ http://spin.atomicobject.com/2013/05/02/chicken-scheme-part-...
- pmelendez 13y agoIt 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
- jwr 13y agoWhy would you call it "esoteric"? Eh, programmers these days.
- jwdunne 13y agoI 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!
- torso 13y agoI 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.
- ricardobeat 13y agoChicken chicken chickens, chicken? Chicken.
- joezhou 13y agochicken chicken.. chicken chi-chi-chicken, kenchicken?
- lawl 13y ago> 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
- chuable 13y agoChicken, chicken chicken, chicken chicken chicken; Chicken chicken chicken chicken. /Chicken (CHICKEN: Chicken chicken chicken chicken!)
- deleted 13y ago[deleted]
- fredley 13y ago--Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken? --Chicken?
- obviouslygreen 13y agoSyntax error Example usage: chicken -chicken --chicken chicken > chicken
- daliusd 13y agoYes, it feels like missed possibility to name language Malkovich. For those who don't have idea: http://www.youtube.com/watch?v=lIpev8JXJHQ http://www.youtube.com/watch?v=lIpev8JXJHQ
- skriticos2 13y agoI love how even the JS implementation contains almost only the word chicken repeatedly.
- mistercow 13y agoI'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.
- h4pless 13y agoI like the Chicken he threw in after the return for good measure. Just didn't have enough chicken without it.
- ars 13y agoI wonder if he became a vegetarian after managing to write this. And I bet he has chicken dreams.
- torso 13y agoI have more nightmares about what will pass as valid JavaScript. About being vegetarian: see the BBQ instruction. :-)
- Cthulhu_ 13y agohodor?
- Fantattitude 13y agoI laughed so much ahahahahahah, thank you dude.
- JohnLBevan 13y agohttp://www.youtube.com/watch?v=oYm6aMMcFu8 http://www.youtube.com/watch?v=oYm6aMMcFu8
- dodgrile 13y agothe word 'chicken' has now lost all meaning.
- alemhnan 13y agohttp://en.wikipedia.org/wiki/Semantic_satiation http://en.wikipedia.org/wiki/Semantic_satiation
- josscrowcroft 13y agoAhh! This has been happening to me since childhood and I never knew it was a documented psychological phenomenon. Thanks.
- Schiphol 13y agocool :) But isn't the EOL character a second meaningful symbol in your language?
- girvo 13y agoThe source code, combined with my utter lack of sleep in the last 24 hours, caused me to giggle uncontrollably.
- DanWaterworth 13y agoWhen can we expect an LLVM backend?
- ashishb4u 13y agocan someone elaborate the cat program?
- vacri 13y agooutput = input
- razorsese 13y agoThat documentation
- brudgers 13y agoGreat prototype. To scale, you will need to implement egg.
- jpreiland 13y agoBut then he would run the risk of confusing future programmers "Now, which comes first..."
- brudgers 13y agoWhat matters more is which ships first.
- obviouslygreen 13y agoFurthermore, 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).
- kabdib 13y agoNot really. Cue the patent trolls! Um, I mean patent chickens, of course.
- perfunctory 13y agoThe paper actually reminds some blog posts about Ruby or Smalltalk. Just replace the word chicken with the word object.
- bnegreve 13y agoError messages are very clear and understandable which is definitely a plus. For example: Error on line 1: expected 'chicken'
- trumbitta2 13y agoIt would be awesome if someone would implement the Hodor programming language, next.
- cpdean 13y agoI'm waiting for the buffalo buffalo port.
- isawczuk 13y agoWrite 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.
- lelf 13y agohttps://metacpan.org/module/Acme::Python https://metacpan.org/module/Acme::Python
- paulkoer 13y agoI have to ask: What does this Acme stand for?
- arbuge 13y agoChicken! Chicken chicken? //Chicken chicken chicken chicken (chicken = 0; chicken++; chicken = chicken/0){ chicken; }
- h4pless 13y agochicken = 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 chicken [Edit: Add chicken chicken interpretation]
- delinka 13y ago"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...
- mAritz 13y agoThe deadfish program sadly stops working after it has run once. I tried debugging it, thankfully the javascript code isn't minified. I still failed.
- ctdonath 13y agoI think we have a winner for the next IOCCC (International Obfuscated Chicken Coding Contest).
- DanWaterworth 13y agoThat sounds like a difficult competition, how could you make it more obfuscated? You could implement a BF interpreter.
- baggers 13y agoDo check out the presentation (http://youtu.be/yL_-1d9OSdk 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
- nater 13y agoOnce again showing the eerie prescience of The Parking Lot is Full? http://www.belligerati.net/archives/chicken.gif http://www.belligerati.net/archives/chicken.gif (Original link to 1996 comic on the PLIF archive is broken, regrettably)
- angersock 13y agoNote 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.
- sethammons 13y agoIf 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
- codereflection 13y agoI dare say that Brainfuck has a worthy challenger in the category of driving one insane.
- ISL 13y agoAt least chicken chicken lacks the active hostility of INTERCAL.
- GhotiFish 13y agochickens was also a valid token.
- dysinger 13y agoBoo for reusing Chicken scheme's name.
- joelg236 13y ago> Error on line 97: expected 'chicken' That's hilarious.
- superpatosainz 13y agoSteveBallmer#: A language whose only symbol is "developers".
- maddddddddddddd 13y ago"It inspired me to create a programming language with only a single valid symbol"... let me know when you do that... your current implementation also uses whitespace characters such as space and newline as symbols.
- mcwhittemore 13y agoIf 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-js-work http://stackoverflow.com/questions/17414435/how-does-chicken...
- mcwhittemore 13y agoseems 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-chicken-js-work http://codereview.stackexchange.com/questions/28015/how-does...
- torso 13y agoThere 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.
- gordatron 13y agoAfter about 3 seconds of looking at the source code for the VM I began wondering if chicken was spelt correctly..