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

Pages: 1-

Scheme sucks

Name: Anonymous 2011-01-28 10:46

because HAS NO MACROS.

Name: Anonymous 2011-01-28 10:49

0/10

Name: Anonymous 2011-01-28 10:50

0/0

Name: Anonymous 2011-01-28 10:52

Scheme isnt a true LISP. Just a usual crappy language for teaching CS, like Algol, Pascal, ML and Haskell. Nobody writes serious software in Scheme.

Name: Anonymous 2011-01-28 10:53

>>2>>3
Stop butthurting.

Name: Anonymous 2011-01-28 10:57

>>4
Scheme isnt a true LISP.
U MENA LISP[1]!
Algol
Enjoy yo'ure unrespect to you'r grandfather language, ``Generic C Programmer''

[1] http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptable-lisp.html

Name: Anonymous 2011-01-28 11:00

Scheme even uses static typing and call-by-name (#lazy keyword). So Scheme is definetely not a LISP.

Name: Anonymous 2011-01-28 11:06

IHSBT

Name: Anonymous 2011-01-28 11:09

Static Typing:
http://download.plt-scheme.org/doc/4.2.5/html/ts-guide/index.html

call-by-name:
pre.plt-scheme.org/docs/pdf/lazy.pdf

Name: Doctor Racket !RACKET/.HY 2011-01-28 11:15

Name: Doctor Racket !RACKET/.HY 2011-01-28 11:16

>>10
Lazy Racket is not call-by-name, it just has normal-order valuation. F-exprs are call-by-name AFAIK.

Name: Anonymous 2011-01-28 11:22

>>11
lazy/call-by-need = call-by-name
Haskell is call-by-name, just like Algol. And as we all remember Algol failed because it was static-typed and call by name. So is Scheme and Haskell.

Name: Anonymous 2011-01-28 11:25

>>10
I prefer not to discern one sort of shit from another. It is just all shit, you know.

Name: Anonymous 2011-01-28 11:27

Name: Anonymous 2011-01-28 11:30

>>9,12
Please educate yourself about reduction order and stop trolling.  You can start here:
http://en.wikipedia.org/wiki/Evaluation_strategy

>>11
Why is it called ``lazy'' then?  Just to conform to the latest fad?

Name: Anonymous 2011-01-28 11:32

>>15
>Why is it called ``lazy'' then?  Just to conform to the latest fad?
http://en.wikipedia.org/wiki/Call-by-name#Non-strict_evaluation
all the same shit to me.

Name: " 2011-01-28 11:54

Macro in LISP.

(defmacro aif (cond then else)
  `(let ((it ,cond))
     (if it ,then ,else)))


Macro in Scheme/Racket.

#lang racket
(require racket/stxparam)
 
(define-syntax-parameter it (λ (stx) (raise-syntax-error 'anaphora "missed context" stx)))
 
(define-syntax-rule (aif cond then else)
  (let ([temp cond])
    (syntax-parameterize ([it (make-rename-transformer #`temp)])
                         (if temp then else))))

Name: Anonymous 2011-01-28 11:56

LISP (DSL)

len [x@xs] -> 1+xs.len

Scheme/Racket:

(define len 
  (@
   `(,x . ,(app (@ (? (@ `() -> #t
                         x -> #f)
                      x) -> 1
                   (? (@ (app len x) -> (> x 0)) x) -> (add1 (len x)))                   
                l)) -> l))

Name: Anonymous 2011-01-28 11:57

>>18

#lang racket
(require syntax/parse)
 
(define-syntax (@ stx)
 
  (define equations `()) 
  (define eqs `())
 
  (define (process expr)
    (syntax-parse expr
                  [(name1:id (~datum :) name2:id)
                   (begin
                     (set! eqs (cons (list #`name1 #`name2) eqs))
                     #`name1)]
                  [((~datum :) name:id)
                   (with-syntax ([sym (gensym)])
                     (set! eqs (cons (list #`sym #`name) eqs))
                     #`(unquote sym))]
                  [(a ...) (map process (syntax->list #`(a ...)))]
                  [a #`a]))
 
  (define-syntax-class no->
    (pattern (~not (~datum ->)))) 
 
  (define-splicing-syntax-class patt->expr
    (pattern (~seq p:no-> ... (~datum ->) e:expr)
 
             #:attr cut-:
             (begin0
               (map process (syntax->list #`(p ...)))
               (set! equations (cons eqs equations))
               (set! eqs `()))))
 
  (syntax-parse stx
    [(@ pe:patt->expr ...)
     (with-syntax ([((new-patt ...) ...) (attribute pe.cut-:)]
                   [eqs (reverse equations)])
     #`(lambda arg (match-all-form eqs arg ((pe.e new-patt ...) ...))))]))
 
(define len 
  (@
   `(,x . ,(app (@ (? (@ `() -> #t
                         x -> #f)
                      x) -> 1
                   (? (@ (app len x) -> (> x 0)) x) -> (add1 (len x)))                   
                l)) -> l))

Name: Anonymous 2011-01-28 12:01

this thread made me grin

Name: Anonymous 2011-01-28 12:03

LISP (DSL)

find x [@xs m:@x @ys] -> m


Scheme/Racket

#lang racket
(require syntax/parse)
(define-syntax (find stx)
  (syntax-case stx ()
    [(_ (patt ...) expr) #`(begin (define-splicing-syntax-class my-class
                              (pattern (~seq patt ...)))
                            (syntax-parse expr
                                          [(a (... ...) q:my-class b (... ...)) #`q]
                                          [_ #f]))]))
 
(find (W o r l d) #`(H e l l o   W o r l d))

Name: Doctor Racket !RACKET/.HY 2011-01-28 12:11

>>12-16
It delays it evaluation. It's normal-order evaluation.

>>17
(define-syntax (aif stx)
  (syntax-case stx ()
    ((~ p t f)
     (with-syntax ((it (datum->syntax stx 'it)))
       #'(let ((it p))
           (if it t f))))))


>>18
(define len length) or >>19

Name: Doctor Racket !RACKET/.HY 2011-01-28 12:16

>>22
*its

Name: Anonymous 2011-01-28 12:17

>>22
(define len length)
(define length len)
right?

Name: Anonymous 2011-01-28 12:17

>>22
call-by-name delays its evaluation

Name: Anonymous 2011-01-28 12:18

>>16
all the same shit to me.
Because you're a fucking moron.

Name: Anonymous 2011-01-28 12:19

Name: Doctor Racket !RACKET/.HY 2011-01-28 12:22

Name: Anonymous 2011-01-28 12:26

>>28
No.
Your resistance only makes my penis harder.

Name: Anonymous 2011-01-28 12:28

>>1
mailto:noko

Name: sage 2011-01-28 13:03

sage

Name: Anonymous 2011-01-28 13:08

>>31
mailto:noko

Name: Anonymous 2011-01-28 13:19

<--- check em

Name: Anonymous 2011-01-28 14:30

>>33
Go back to /b/.

Name: Fuck off, !Ep8pui8Vw2 2011-01-28 14:37

>>34
Fuck off, ``faggot''.

Name: Back to /b/, !uaVa00FkCs 2011-01-28 15:22

>>35
Back to /b/, ``please''.

Name: Anonymous 2011-01-28 16:44

>>35
Stop defending shitposting.

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