Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Just Another Godel, Escher, Bach hacker

by FoxtrotUniform (Prior)
on Jun 25, 2004 at 19:31 UTC ( #369727=obfuscated: print w/replies, xml ) Need Help??

What this obfu lacks in artistic merit (that's supposed to be a Möbius strip), I think it makes up in technique and name. I got the idea from a Haskell assignment (egads! Posting homework to the monastery?), and I think the main concept is mildly clever. I'd love to talk about it, but I don't want to spoil the surprise!

#! /usr/bin/perl -w use strict; sub godel{my ($f,$a,$l)=@_;return $a unless @$l;my$x=shift @$l;&$f( $x,&godel($f,$a,$l));}my @M=split '', "Just another ";my @I =split '' +, "Perl hacker,"; my @U =reverse @M; su +b escher{my ($l,$m) =@_;sub{$l= pop @ +U if @U;$l.&$m();} } unshift@U, split ' +' ,"pool egnarts";my$bach=&godel(\&escher,&godel(\&escher,sub{return"\n" +} ,\@I),\@M);print &$bach(); ### Inspired by Douglas Hofstadter's _GEB_

Tested on Perl 5.6.1, Linux 2.4.18.

F o x t r o t U n i f o r m
Found a typo in this node? /msg me
% man 3 strfry

Replies are listed 'Best First'.
Re: Just Another Godel, Escher, Bach hacker
by diotalevi (Canon) on Jun 25, 2004 at 20:10 UTC

    Nice. Reading this was like comfort food.

    There's a spoiler in the readmore.

      Nice summary! (readmore is spoily)

        So if perl were Haskell, what else would you have here?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://369727]
Approved by injunjoel
Front-paged by tye
[Corion]: Once more, I'm looking for a sane client-side framework, but I guess these don't exist. Everything I look at either uses a weirdo home-grown templating language (like Angular in all its incarnations) or uses weirdo Javascript incarnations (like ...
[Corion]: ... Inferno.js, which uses ES2015) or uses some horrible amount of Javascript infrastructure before you can even render a single file.
[Corion]: I'd really like to create a dynamic frontend for my Google Keep clone, but so far, all the templating solutions seem to bring their own template language or require me to hand-code everything in (their own flavour of) Javascript. I'd like something ...
[Corion]: ... that can use templates from the HTML (via <script language="text/ template">... my template ...</script> and otherwise gets out of my way. But it seems that is not how the Javascript world is, currently :-/
[Corion]: I guess my question is, has anybody worked with React, Ember, Angular (v2, v4, v.whatever) or any other JS client-side dynamic rendering/virtual DOM thingie and found a simple, single-file solution like jQuery?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-03-27 19:03 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (321 votes). Check out past polls.