5 ms·
Since I wrote this article, my colleagues and friends have chipped in with even more absurd examples. How about some Pascal? https://github.com/jaxxstorm/pulum
by jaxxstorm 4y ago
Since I wrote this article, my colleagues and friends have chipped in with even more absurd examples.
How about some Pascal? https://github.com/jaxxstorm/pulumi-examples/pull/96 https://github.com/jaxxstorm/pulumi-examples/pull/96
Or maybe Emacs Lisp is more your flavour? https://github.com/jaxxstorm/pulumi-examples/pull/95 https://github.com/jaxxstorm/pulumi-examples/pull/95
Or the pièce de résistance: Brainfuck: https://github.com/jaxxstorm/pulumi-examples/pull/97 https://github.com/jaxxstorm/pulumi-examples/pull/97
- lukeramsden 4y agoI'm assuming there's some sort of transpiler to brainfuck? I just cannot stomach the idea that that was written by hand somehow....
- rrdharan 4y agohttps://en.wikipedia.org/wiki/Brainfuck https://en.wikipedia.org/wiki/Brainfuck > Although Brainfuck programs, especially complicated ones, are difficult to write, it is quite trivial to write an interpreter for Brainfuck in a more typical language such as C due to its simplicity. There even exist Brainfuck interpreters written in the Brainfuck language itself.
- shpongled 4y agoThe parent comment was about a transpiler targeting brainfuck, not an interpreter. Writing a brainfuck interpreter (or compiler to x86/etc) is indeed trivial... writing a compiler targeting brainfuck is another beast entirely.
- rrdharan 4y agoYou're right of course. Although I guess some do exist: https://github.com/arthaud/c2bf https://github.com/arthaud/c2bf https://github.com/felko/bfpy https://github.com/felko/bfpy
- retrac 4y agoUsual strategy is to use a macro assembler and lots of macros to build up some civilized things like stacks and subroutines. But there are also several high level (ish) languages that have compilers to BF. https://esolangs.org/wiki/Brainfuck_code_generation https://esolangs.org/wiki/Brainfuck_code_generation
- outworlder 4y agoThe ELisp version is quite nice.
- _Algernon_ 4y agoTIL that the language I learned to program in (Pascal) is absurd.
- SkinTaco 4y agoHow's it feel, old man :)
- cultofmetatron 4y agoit occupied a similar niche as go (easy to learn, fast to compile, easy to deploy) honestly its a shame it fell by the wayside.
- mst 4y agoPascal seems somewhat absurd for this particular purpose but that does not at all mean it is, itself, absurd. Though I learned on BBC BASIC so my idea of what counts as absurd as a first language may, of course, be questionable :D
- zitterbewegung 4y agoWhy is Emacs lisp absurd ? It’s an editor that is widely popular .
- alimov 4y agoMaybe “unexpected” would be a good substitute for absurd.
- donio 4y agoIt's not even that. There are several k8s packages on MELPA and they are meant for real use rather than a blog joke.
- gunfighthacksaw 4y agoDynamic scoping. Not saying it’s without utility, but to the mainstream: pants on head bonkers.
- donio 4y agoEmacs has supported lexical binding for almost a decade now and all the elisp files in Emacs itself use it. Most modern packages do too.
- kazinator 4y agoBash "local" variables (advanced feature not even in the POSIX shell standard) are dynamically scoped. Head on bonkers boots embedded systems and servers, coordinates builds, ...
- donio 4y agoAnd JSON support in Emacs is not some obscure feature these days, it's heavily relied on by many popular packages.
- kazinator 4y agoMoreover, the specific example looks great.
- mst 4y agoAs my contribution, how about some sugar that DSLifies your perl implementation (should produce the exact same output as your Pulumi.pl on any perl from the last N years, tested on perl5 v24 as I wrote it): http://hermit1.scsys.co.uk/~matthewt/pulumi http://hermit1.scsys.co.uk/~matthewt/pulumi (for anybody uninterested in my perl stupidity, please skip to the 'use Pulumi;' line which is the start of the actual user written code - everything before that would in a sensible world be a library but I wanted to present the example as a single file so chose violence ;)