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

Pages: 1-4041-

Ruby

Name: Anonymous 2011-03-14 6:23

Is Ruby an acceptable Lisp? It has everything you need except macros.

Name: Anonymous 2011-03-14 6:24

ALTRUISM

Name: Anonymous 2011-03-14 6:33

It's probably close enough, except with a whole lot of syntactic sugar mess, but why would you use it when you have Lisp?

Name: Anonymous 2011-03-14 6:34

>>3
Libraries?

Name: Anonymous 2011-03-14 6:35

>>4
If by "libraries" you mean "socks and sandals at the same time," then yes.

Name: Altruist 2011-03-14 6:36

seriously, just use racket !!! ruby is japanese !
also: planet racket has all the libraries you want
it's THE BEST

Name: Anonymous 2011-03-14 6:43

>>6
Planet Racket is an unmaintained mess of obsolete or half-finished random hacks. If you want to suggest a scheme library archive, at least use Chicken's Eggs for that.

Name: Anonymous 2011-03-14 7:04

>>4
I don't know about you, but I never had any trouble finding lisp libraries. I was able to find multiple implementations of just about everything I needed. I can't say that all the libraries are well maintained (popular ones are), but if you're hacking lisp, you might as well do some maintenance on the code if you need it.

Name: Anonymous 2011-03-14 7:21

>>1
Does it have nice, concise syntax for partial application? No.
Does it have functions as first class citizens? No.
Do you have to wrap any code you might want to pass to a function in a lambda expression? Yes.
Does it have the ugliest implementation of lambda expressions I have ever seen in any language? Hell yes.
Does it have a nice multiple dispatch object system? No.
Does it have a nice community? No.
Is it slow as fuck? ...

It sure as hell doesn't have everything I need.

Name: Anonymous 2011-03-14 7:32

Is Ruby an acceptable Lisp?
Only if you also consider newlisp to be an acceptable lisp. Ok, that's a bit harsh to ruby

Name: Anonymous 2011-03-14 7:52

>>9
Does it have the ugliest implementation of lambda expressions I have ever seen in any language? Hell yes.
No, that's Python.

Name: Anonymous 2011-03-14 8:06

>>11
What's so bad about FIOC lambdas? Sure, they can only be one expression but you can always just define a normal function and pass that. Something you couldn't do in ruby.
The only way you can assign a function to a variable in ruby is with a proc/lambda and then you have to call it like
foo[x] or foo.call(x)
as opposed to the
foo(x) or foo x
of a normal function or the
yield x
of blocks. WTF

Name: Anonymous 2011-03-14 8:09

>>9
nice, concise syntax for partial application
I don't remember that in Lisp. Does it really have it?

Name: Anonymous 2011-03-14 8:12

>>12
They suck as much as Ruby's block.

>>13
HE MENA HASKAL

Name: Anonymous 2011-03-14 8:33

>>13
Who said lisp had that? I'm arguing against ruby, not for lisp.

Name: Anonymous 2011-03-14 8:46

>>13
Not by default, but with a 4-8 line function you kind of get that (or just use one of the dozen utility libraries, most have it implemented).

Name: Anonymous 2011-03-14 8:47

>>13
Now it does.

(module lithp racket/base
  (require (for-syntax racket/base))
  (provide #%module-begin #%datum quote
           #%plain-lambda define-values λ
           define #%app #%top)
 
  (define-syntax (#%app stx)
    (syntax-case stx ()
      ((#%app f x) #'(#%plain-app f x))
      ((#%app f x y ...) #'(#%app (#%app f x) y ...))))
  (define-syntax (λ stx)
    (syntax-case stx ()
      ((λ (x) . b)
       #'(#%plain-lambda (x) . b))
      ((λ (x y ...) . b)
       #'(#%plain-lambda (x) (λ (y ...) . b)))))
  (define-syntax (define stx)
    (syntax-case stx ()
      ((define (f x ...) . b)
       #'(define f (λ (x ...) . b)))
      ((define x y)
       #'(define-values (x) y)))))

Name: Anonymous 2011-03-14 9:15

Ruby is about as much of a Lisp as Python is, which is not very.

Incidentally,
from functools import *
import operator

product = partial(reduce, operator.mul)
product(range(1, 10))
# 362880

product_sort = partial(sorted, key=product)
product_sort([[3]*3, [2]*2, [1]])
# [[1], [2, 2], [3, 3, 3]]

Name: Anonymous 2011-03-14 9:45

>>17

(                       
  (        (                      ))
  (        #%             #%          
           #%      lambda               λ
                  #%    #%   )
 
  (              (#%       )
    (                ()
      ((#%       ) #'(#%             ))
      ((#%          ...) #'(#%    (#%       )   ...))))
  (              (λ    )
    (                ()
      ((λ ( ) .  )
       #'(#%      lambda ( ) .  ))
      ((λ (    ...) .  )
       #'(#%      lambda ( ) (λ (  ...) .  )))))
  (              (          )
    (                ()
      ((       (    ...) .  )
       #'(         (λ (  ...) .  )))
      ((          )
       #'(              ( )  )))))

lol lisp

Name: Anonymous 2011-03-14 9:54

>>19
#        <         >
#        <       >
#        <        >

#

    *           (      *       )
{
             ;
         = (    )        ;
           ("                                    ",   );
                 (    );
}

         (        ,      *    [])
{
            _         [           ];
           ;
           ;
        ( = ;  <   _       ;  ++){
                ("                              ",  );
             =        _      (&       [ ],    ,          , (     *)  );
             (  ) {
                      ("
                       ",   );
                    (- );
          }
     }
            _     (    );
}

LOL C

Name: Anonymous 2011-03-14 10:01

>>1
Ruby is no better than Haskell. It has similiarly awful syntax and a messy type-system. In an "acceptable Lisp" everything should be a list. Check REFAL, which much more acceptable, than Ruby.

Name: Anonymous 2011-03-14 10:10

In Ruby, due to its handling of === equality, the statement can be used to test for variable’s class:

case input
when Array: puts 'input is an Array!'
when Hash:  puts 'input is a Hash!'
end

Name: Anonymous 2011-03-14 10:12

Ruby also returns a value that can be assigned to a variable, and doesn’t actually require the case to have any parameters (acting a bit like an else if statement):

catfood = case
          when cat.age <= 1: junior
          when cat.age > 10: senior
          else               normal
          end

Name: Anonymous 2011-03-14 10:15

>>22
input.{array? -> say "input is an Array!"
      ;hash?  -> say "input is a Hash!"}

>>23

catfood =: cat.age.{?<=1 -> junior
                   ;?>10 -> senior
                   ; _   -> mormal}

Name: Anonymous 2011-03-14 10:46

>>24
semicolons at the beginning of next case/statement on next line.
Your DSL might be powerful, but your code is DISGUSTING AS FUCK.

Name: Anonymous 2011-03-14 10:49

>>25

catfood =: cat.age.{?<=1 -> junior; ?>10 -> senior; _ -> normal}

Name: Anonymous 2011-03-14 10:55


int xs [] =
  {1
  ,2
  ,3
  ,4}

Name: Anonymous 2011-03-14 10:57

>>21
In an "acceptable Lisp" everything should be a list.
Clojure is not a Lisp and I'm totally ok with it!

Name: Anonymous 2011-03-14 11:03

>>28
CONS-pairs are legacy. Modern lists should be atomic.

Name: Anonymous 2011-03-14 11:06

>>28
By his criteria there is no acceptable lisp.
>>29
Modern lists should be binary trees

Name: Anonymous 2011-03-14 11:14

OP here

Name: Anonymous 2011-03-14 11:22

>>29,30
Modern lists should be VIPPERSZippers

Name: Anonymous 2011-03-14 11:46

I like the fact everything is an expression in Ruby.

It's a pretty cool feature.

The Japanese are great innovators.

Name: Anonymous 2011-03-14 11:59

>>33
Indeed, I can't believe that no one ever did this before ruby

Name: Anonymous 2011-03-14 12:19

inb4 raging autistic lispfags

Name: LISPPER 2011-03-14 12:21

>>33,34
RAGE RAGE RAGE MAD MAD MAD

Name: Anonymous 2011-03-14 12:21

>>33-37
SPAWHBTC

Name: Anonymous 2011-03-14 12:22

in after raging lisptic autismfags

Name: Anonymous 2011-03-14 12:34

http://www.youtube.com/watch?v=qO_DPG4gepA

OMG!!!11 Japanese invented miniskirts!!!!1

Name: Anonymous 2011-03-14 12:36

Japan is the prolific country in the world!

Name: Anonymous 2011-03-14 12:36

>>39
sluts

Name: Anonymous 2011-03-14 13:08

>>39
JEWSAPANESE DID MINISKIRTS!!!

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