Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Check out my new DSL!

Name: Anonymous 2008-08-19 15:18

class SExp
  def initialize &block
    yield
  end
end

SExp.new {
  puts "IM IN A BLOCK"
  puts "IM LEAVING THIS BLOCK"
  puts "PEACE OUT!"

  SExp.new {
    puts "IM IN A NEW BLOCK NOW!"

    SExp.new {
      puts "IT'S JUST LIKE THE ALGORITHMIC LANGUAGE SCHEME"

      SExp.new {
        puts "HMA MEME FAN"
      }
    }
  }
}


It allows you to write your programs in Ruby just as if you were writing them in a SEXP based language like LISP or Scheme.

What do you guys think, will this be useful?

Name: HMA MEME FAN 2008-08-19 15:20

Hmm, this really is great. I'm upgrading all my Ruby applications to use it! Thanks!

HMA MEME FAN

Name: Anonymous 2008-08-19 15:34

This is fucking stupid.

Name: Anonymous 2008-08-19 15:41

I don't understand it.

Name: JavaScript Fan 2008-08-19 16:10

globals = [
  '*' : function(x, y) { return x * y; }
];

Array.prototype.eval = function() {
  if(this.length <= 0) throw "[].eval()";
  var f = this[0];
  if(typeof(f) !== 'function') //For names not allowed in JS
    f = globals[f];
  if(!f)
    throw "What the fuck is " + f + "?";
  args = this.slice(1);
  for(var i = 0; i < args.length; ++i)
    if(args[i] instanceof Array)
      args[i] = args[i].eval();
  return f.apply(null, args);
}

display = alert;
function car(cons) { return cons.car }
function cdr(cons) { return cons.cdr }
function cons(first, second) { return { car: first, cdr: second } }

[display, ['*', 5, [car, [cons, 4, 4]]]].eval();
loeb = [ /*fuck it, I'm going to watch a film*/ ]


I'd do it in Ruby but JavaScript allows whitespace in between list elements, whereas I don't think Ruby does. As, Ruby is SLOW AS FUCK, but that's not really a problem.

Name: Anonymous 2008-08-19 16:11

Ignore the obvious error that * expects only 2 arguments, that's obviously trivial to solve in JS.

Name: Anonymous 2008-08-19 16:38

>>5
This is beautiful.

Name: Anonymous 2008-08-19 16:45

>>7
Are you fucking demented?

Name: Anonymous 2008-08-19 16:54

>>8
If you are the Sussman, you can judge me. If, as I suspect, you are not the Sussman, your opinion does not matter. You are unscientific and ultimately destructive.

Name: Anonymous 2008-08-19 18:15

>>9
If you are the Sussman, you can judge >>8. If, as I suspect, you are not the Sussman, your opinion does not matter.

Name: The Sussman 2008-08-19 18:28

>>10
I am The Sussman, what's it to you?

Name: Anonymous 2008-08-19 18:31

Were >>9 the Sussman, I suspect that he would more than "suspect" that >>8 is not the Sussman. However, that is not the case, as I suspect I am the Sussman.

Name: Anonymous 2008-08-19 18:35

>>12
Considering the fact that only three people post here on /prog/ (You, Me, and The Sussman), and the fact that I am in fact The Sussman, then we are all The Sussman. This makes sense because Sussmans travel in packs.

Name: Anonymous 2008-08-19 19:04

I don't know if I'm The Sussman, but I've been known to copulate with Julie Sussman from time to time.

Name: Anonymous 2008-08-19 21:12

>>11-14
Nice to meet you, fellow Sussmen!

Name: Anonymous 2008-08-19 21:13

I'm the real Sussman.

Name: Anonymous 2008-08-19 21:18

I thought The Sussman was a dog1, just like the late Haskell.


---------------
1 - "This may surprise you, but I think my dog is the Sussman".
Please provide a reference to the pasta if you do have one.

Name: Anonymous 2008-08-19 22:24

Name: Anonymous 2008-08-19 23:05

>>17
I am Heron of Alexandria. I have a large beard and I create mathematical formulas. If you don't repost this comment on 10 other pages, I will use my primitive steam engine to induce mold in your walls.

Name: Anonymous 2008-08-20 0:17

>>19
I loled very hard

Name: Anonymous 2008-08-20 1:41

>>20
Don't encourage him/yourself.

Name: Anonymous 2009-03-06 12:56


More than than a text stream with   embedded brainfuck commands   to make it   look easy n.

Name: Anonymous 2011-02-16 9:04

>>1
The ``in Lisp'' guy.

Name: Anonymous 2011-02-16 9:53

In Scheme, my other sexp is a sex?.

Name: Anonymous 2011-02-16 10:09

>>24
If you understand this post you are an EXPERT autist.

Name: Anonymous 2011-02-16 10:16

>>25
;_;

Name: Anonymous 2011-02-16 10:47

>>25
;_;

Name: Anonymous 2011-02-16 11:17

>>25
;_;

Don't change these.
Name: Email:
Entire Thread Thread List