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

Pages: 1-

First-class (run-time) macros

Name: Anonymous 2012-11-10 9:22

Name: Anonymous 2012-11-10 10:05

1
Symta:

/-\|_|_/-\|-|

Scheme:

(define gensym (lambda params
                 (if (null? params)
                     (begin
                       (set! gensym-count (+ gensym-count 1))
                       (string->symbol (string-append
                                        "$"
                                        (number->string gensym-count))))
                     (begin
                       (set! gensym-count (+ gensym-count 1))
                       (string->symbol (string-append
                                        (car params)
                                        "$"
                                        (number->string gensym-count)))))))

Name: Anonymous 2012-11-10 12:55

>>2

symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off
symta documentation or fuck off

symta documentation or fuck off
symta documentation or fuck off

Name: Anonymous 2012-11-10 14:31

>>3
Symta is self-documenting.

Name: Anonymous 2012-11-10 14:50

>>2
You write Scheme like a retard.

Name: Anonymous 2012-11-10 14:56

>>3
Listen to Symta song: http://youtu.be/V9uOAyzQjsM

Name: Anonymous 2012-11-10 14:58

>>4
no

Name: Anonymous 2012-11-10 14:58

>>5
Matt Might wrote it, Bozo.

Name: Anonymous 2012-11-10 15:32

>>8
Matt Might have written it, but that doesn't not make it sub-optimal.

Name: Anonymous 2012-11-10 15:40

>>8
Matt Might have written it, but that doesn't not make it sub-optimal.

Name: Anonymous 2012-11-10 15:42

>>10
I only tapped [i]b[/b] accidentally, I didn't actually want to navigate back and resubmit my post!

Name: Anonymous 2012-11-10 15:50

>>9-11
Ridicule often cause cascading fails. Bravissimo!

Name: Anonymous 2012-11-11 12:28

Name: Anonymous 2012-11-11 15:04

Fexprs/first class macros are terrible. They can't do anything useful that isn't possible with regular macros. But they make local reasoning about code and compiling code hard.

Name: 2012-11-13 3:38

Name: Anonymous 2012-11-13 4:00

>>14
Not every Lisp needs to be compiled to machine code. A lot of Lisp are perfectly fine  as interpreters for 90% of their use cases. Use C for the heavy lifting.

Name: Anonymous 2012-11-13 13:47

/polecat kebabs/

Name: Anonymous 2012-11-13 18:29

>>16
Not every Lisp needs to be compiled to machine code. A lot of Lisp are perfectly fine  as interpreters for 90% of their use cases. Use C for the heavy lifting.
Lisp is supposed to be everything.

Name: Anonymous 2012-11-19 2:46

I'm split between Matt Might's mighty discovery and Kernel's oddball $vau crap, can anyone help?

Name: Anonymous 2012-11-19 3:00

But they make local reasoning about code and compiling code hard.
Factor has first class macros, and it doesn't have those problems.

Name: Anonymous 2012-11-19 3:14

>>19
You need to become insane in order to grok the latter. It's really not as bad as it sounds, and it's totally worth it.

Name: Anonymous 2012-11-19 10:37

>>19
It's basically fexprs, which is what macros are in newLISP

Name: Anonymous 2012-11-19 10:46

>>19
Aren't they equivalent?  The same way that there are many different bases to a vector space, perhaps there are many constructs that allow first-class access to the environment and macros.  Maybe Matt's mighty macros, plus lambda calculus, are exactly as powerful as $vau and wrap.

Name: Anonymous 2012-11-19 12:31

Name: Anonymous 2012-11-19 14:07

Name: Anonymous 2012-11-20 7:34

Name: Anonymous 2012-11-20 13:44

Name: Anonymous 2012-11-20 16:10

Name: Anonymous 2012-11-20 22:08

Name: Anonymous 2012-11-21 2:22

Name: Anonymous 2012-11-21 15:01

Name: Anonymous 2012-11-21 23:55

Name: Anonymous 2012-11-22 1:38

It seems to me as if Matt's macro construct is less disgusting and intrusive than Kernel's $vau. Since it doesn't manually manipulate the lexical environment of the ``caller'', it's probably easier to optimize (and reason about).

Name: Anonymous 2012-11-22 10:13

Name: Anonymous 2012-11-22 22:41

Name: Anonymous 2012-11-23 19:49

Fuck, this is driving me insane.  $vau + wrap are ugly as fuck, yet Matt's macro construct doesn't seem to have first-class environments per se.  Fuck.

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