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

Pages: 1-4041-

Common Lisp

Name: Anonymous 2011-03-02 8:20

* (nth 1 '(1 2 3 4))

2
* (elt "1234" 1)

#\2


Explain this bullshit. argument order

Name: Anonymous 2011-03-02 8:27

>>1
The argument order is not consistent.

Name: Anonymous 2011-03-02 9:17

>>1

butt sort this shit

Name: Anonymous 2011-03-02 9:18

>>2
identifying_wood.jpg

Name: Anonymous 2011-03-02 10:00

>>2
Autistic RAGE. I cant stand such things in my language! Fuck.

Name: Anonymous 2011-03-02 10:07

>>5
You forgot your VIPPER.

Name: Anonymous 2011-03-02 10:17

>>5
Use Racket

Name: Anonymous 2011-03-02 10:35

aref, elt, nth, char, schar, first, second, rest, car, cdr, cadr, caddr...

Name: Anonymous 2011-03-02 10:51

>>8
Common Lisp has FUNCTIONS FOR EVERYTHING.

Name: Anonymous 2011-03-02 11:09

>>8
Seriously... Consider also the LOOP macro. Who thought pulling this all into the language was a good idea? Common Lisp is goddamn bloat, it's worse than C++.

Name: Anonymous 2011-03-02 12:01

>>10
But Common Lisp has macros. C/C++ doesnt, neither Scheme/Racket.

Name: Anonymous 2011-03-02 12:02

Scheme doesn't have macros
Let's not start this stupid argument again.

Name: Anonymous 2011-03-02 12:07

>>12
But it doesnt. syntax-case is some BNF-parser crap, not defmacro.

Name: Anonymous 2011-03-02 12:55

>>10
it's worse than C++.
In bloat, yes. In useless bloat, hell no.

>>13
Fuck off.

Name: Anonymous 2011-03-02 13:10

>>13
You're an idiot. DEFINE-SYNTAX is basically DEFMACRO with the provision that you can get and insert contexts into identifiers so that hygiene can be preserved, which you would know if you had ever used it. Like DEFMACRO it binds an arbitrary syntax transformer, and there is no requirement that you use either SYNTAX-RULES or SYNTAX-CASE.

some BNF-parser crap
It's just a pattern matcher, like I said, you don't have to use it.
not defmacro
(define-syntax define-macro
  (lambda (incoming)
    (syntax-case incoming ()
      ((_ (?name ?arg ...) ?form ...)
       (syntax
        (define-macro ?name (lambda (?arg ...) ?form ...))))
      ((_ ?name ?func)
       (syntax
        (define-syntax ?name
          (lambda (x)
            (syntax-case x ()
              ((kwd . rest)
               (datum->syntax #'kwd (apply ?func (cdr (syntax->datum
x)))))))))))))


When it comes down to it, you have decided before the fact that anything that does not come prepackaged as DEFMACRO isn't a macro, which is a stupid and arbitrary definition, and one that does not reflect well upon you. At least the other CL user who argued this point made an effort.

Name: Anonymous 2011-03-02 13:22

x)))))))))))))

Name: Anonymous 2011-03-02 14:01

>>15
It can be shorter. And better.

(define-syntax (define-macro stx)
  (syntax-case stx ()
    ((~ (n . a) . f) #'(~ n (lambda a . f)))
    ((~ n f)
     #'(define-syntax (n stx)
         (syntax-case stx ()
           ((k . r) #`#,(apply f (syntax->datum #'r))))))))


Now it accepts ``rest'' args and has less parentheses for the joy of faggots like >>16 or >>16.

Name: Anonymous 2011-03-02 14:03

#'r))))))))

Name: Anonymous 2011-03-02 14:21

>>18
So what? In >>16 there really were too much parens.

Name: Anonymous 2011-03-02 14:58

I wonder if w could have language like Lisp but with functions not in form (function arg1 arg1) but in known from C form function(arg1 arg2) ?

I read about math prove, that those syntaxes are equivalent and one can be transformed to other and viceversa, do you know it's name?

Name: Anonymous 2011-03-02 15:04

>>20
(halts? (loop while (hibt?)))
#f)

Name: Anonymous 2011-03-02 16:01

>>20
define(fact(x)
  let(loop (x(x) r(1))
      if(zero?(x) 1
         loop(sub1(x) *(x r)))))

λ(λ)λ(λ)λ(λ)λ(λ)


PIG DISGUSTING

Name: Anonymous 2011-03-02 16:04

>>22
No, wait, the car must always be outside:

define(fact(x)
  let(loop x(x)(r(1))
   if(zero?(x) 1
      loop(sub1(x) *(x r)))))

Name: Anonymous 2011-03-02 21:29

I think Lisp would have a lot more adepts if its current users didn't throw autistic hissy fits when seeing people who close their final parens on multiple lines.

Name: Anonymous 2011-03-02 22:00

>>15
>insert contexts into identifiers so that hygiene can be preserved,
Hygiene is an autistic crap. Normal people dont need it.

>It's just a pattern matcher, like I said, you don't have to use it.
Pattern matcher IS a PARSER. I dont see much difference between REGEXPs and YACCs. Both have some overly-compilcated declarative semantics, like haskell, that never works as I want it to work.

>(define-syntax define-macro
it doesnt work

$ mzscheme
Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
(define-syntax define-macro
  (lambda (incoming)
    (syntax-case incoming ()
      ((_ (?name ?arg ...) ?form ...)
       (syntax
        (define-macro ?name (lambda (?arg ...) ?form ...))))
      ((_ ?name ?func)
       (syntax
        (define-syntax ?name
          (lambda (x)
            (syntax-case x ()
              ((kwd . rest)
               (datum->syntax #'kwd (apply ?func (cdr (syntax->datum
x)))))))))))))
(define-macro aif (cond then else)
  `(let ((it ,cond))
     (if it ,then ,else)))
stdin::423: define-macro: bad syntax in: (define-macro aif (cond then else) (quasiquote (let ((it (unquote cond))) (if it (unquote then) (unquote else)))))

Name: Anonymous 2011-03-02 22:14

>>20
equivalent
They arent. f(a b) is ambiguous. x+f(a b) equals x+(f(a b)) or x+f (a b)?

Name: Anonymous 2011-03-02 22:19

>>17
(~ (n . a) . f) #'(~ #`#, ->
Ken Iverson would be proud.

Name: Anonymous 2011-03-02 22:29

>>25
Hygiene is an autistic crap. Normal people dont need it.
Sigh, I suppose you don't use gensyms, packages, or rely on the fact that the value slot of a symbol is different to the function slot? That CL uses a series of hacks instead of one mechanism doesn't detract from the fact that it is there, and it is used. Secondly, if you don't think that reliable abstractions have any merit, then I wouldn't trust you to write any code.

Use (define-macro (aif cond then else) ...), I mean Jeez it's macro-by-example.


I'm arguing with the same guy from the naming thread aren't I? *sigh*

Name: Anonymous 2011-03-02 22:53

>>28
Still doesnt work.

Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
(define-syntax (define-macro stx)
  (syntax-case stx ()
    ((~ (n . a) . f) #'(~ n (lambda a . f)))
    ((~ n f)
     #'(define-syntax (n stx)
         (syntax-case stx ()
           ((k . r) #`#,(apply f (syntax->datum #'r))))))))
(define-macro (aif cond then else)
  `(let ((it ,cond))
     (if it ,then ,else)))
(aif 123 it nil)
reference to undefined identifier: syntax->datum
   

Name: Anonymous 2011-03-02 22:58

>>28
I suppose you don't use gensyms, packages
I use gensyms when I need them.

one mechanism
I heard exactly the same shit from Haskell apologists. And before it already some christfags lied to me how "one mechanism" of believing in single God makes society "reliable".

reliable abstractions
I'm not mathematician and not a religious person in general, so I dont believe in "abstractions".

Name: Anonymous 2011-03-02 23:04

>>29
If you use an old version then it is likely that those functions are still called SYNTAX-OBJECT->DATUM and DATUM->SYNTAX-OBJECT as they were in the original (92?) paper. It works fine in a modern version of racket.

Name: Anonymous 2011-03-02 23:08

>>30
This post is an absurdity.

Name: Anonymous 2011-03-02 23:10

>>32
check email field

Name: Anonymous 2011-03-02 23:12

>>31
Who is bloated now?

>>32
No. It's you, who is absurdity. "Abstract" absurdity.

Name: Anonymous 2011-03-02 23:16

>>33
It should have been obvious immediately, but I fear I am out of practice. /prog/s shitty spells do that to me

Name: Anonymous 2011-03-02 23:19

This thread proves, that Scheme/Racket is even more bloated than CL. And you've to reinvent the wheel and write your own defmacro, just to start banging code.

Name: Anonymous 2011-03-02 23:20

>>36
3/10, not inflammatory enough

Name: Anonymous 2011-03-02 23:25

>>37
Because I'm right and there is no trolling.

Name: Anonymous 2011-03-03 1:46

>>31-32,34,37
Stop being trolled by low-quality trolls, please. He's probably the ``in Lisp'' guy.

Name: Anonymous 2011-03-03 2:04

>>39
there is no trolling.

Name: Anonymous 2011-03-03 2:21

>>31
If you use an old version then it is likely that those functions are still called SYNTAX-OBJECT->DATUM and DATUM->SYNTAX-OBJECT as they were in the original (92?) paper. It works fine in a modern version of racket.
It still wont work. Because Scheme/Racket doesnt have packages, expanded macros would reference local copies of symbols, not the symbols from macro's package. Scheme is fucked-up beyond repair.

Name: Anonymous 2011-03-03 2:24

>>41
Because Racket doesnt have packages
IHBT

Name: Anonymous 2011-03-03 2:25

>>41
Scheme is fucked-up beyond repair.
And, honestly, Racket doesn't even try repairing. It just adds more useless crap, like call-by-name and static typing, on top of existing pile.

Name: Anonymous 2011-03-03 2:26

>>42
Then why macro in (let ((car ...)) (macro)) macro would reference local copy of `car`?

Name: Anonymous 2011-03-03 2:38

>>44
Lexical scope. IHBTC

Name: Anonymous 2011-03-03 2:48

>>45
poor excuse

Name: THE MOST FUCKING NGGER MATURE 2011-03-03 2:50

teH EMMACRO IN MA WOULD REFRECNE cOPY OF MY CAR BECZUAE THIS ISSSSSSSS IREELEVANT IN giveign ME BACK THE PASSWRD

I AM THE MOST FUCKING NGGER MATURE

Name: Anonymous 2011-03-03 2:51

>>47
Please, stop being trolled so easily.

Name: Anonymous 2011-03-03 2:51

Name: Anonymous 2011-03-03 2:51

>>47
stop spamming

Name: Anonymous 2011-03-03 2:52

BITCH FUCK SHITS!YOU NIGGER NAZI ASSES! YOU CAN FUCK HELL! BAN YU ALL! YOU GET BANNED! YOU GAVE OUT MY PASSWORD!I AM THE MOST FUCKING NGGER MATURE! GIVE ME BACK THE PASSWRD!

ASKFHSed?Gsdfghsdfkhgbafgbhbgfhbfs fukk sex you nigger cock pussy! i fuck yhou you have satan you canada ass whovdoesn't beleive in Christ! I HOPE YOU ALL GET RAPES!

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