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

Lisp. Lisp is the only language

Name: Anonymous 2011-01-31 10:29

Why there are other programming languages besides Lisp? With Lisp's macro system you can create any language you need ever. Small, big, finely tuned for your task. Supporting other languages means opposing progress and delaying the inevitable future. There should be only one language and myriad languages at the same time. The one language is Lisp.

Name: Anonymous 2011-02-02 12:51

>>120
From today, start programming in BASIC, not even Visual Basic, just BASIC. It is Turing-complete, it's just a tool,
I never said anything about touring-completeness. I did however specifically worded my statement as "to write a program that has certain form and does certain things. I say that having closures allows you to do anything you can do with macros, in a more or less similar fashion".

how does I branched without something to branch with now
Obviously, when you are rolling out your own if, you roll out your own :t, :f, and comparison operators. Or you can demand the existence of a much simpler construct, like in FORTH if is implemented in terms of conditional jump basically.

The important thing is that you have to perform O(1) work, so to speak, to do that once, and then use it with almost no cruft through the rest of your code. You can't do that in BASIC.

Because Lisp programs are lists, C++ programs are not strings. '(1 2 3) is a shorthand for (quote (1 2 3)).
Why does that matter? You keep pointing out some differences that I honestly consider superficial, without even trying to explain why these are important. Yes, when I write return eval('lambda x: {}'.format(n)) simple string substitution happens instead of symbol substitution in AST. Why the fuck should I care? It's the "how", the result is the same.

If you want to deal with dynamic code generation/modification in a more safe manner, no problem, the compiler is there, the decompiler is there, the sky is the limit. Here, look at the Python goto module: http://entrian.com/goto/download.html

Here, take a look of what we call ``in Lisp DSL''
MY EYES.
I value my sanity too much.
If I got the idea right, it's a variation on Ocaml pipes (though with some crazy shit that I'm afraid of).
Go look at LINQ syntax, then at the code it's translated into by the compiler.

Sure, it's nice to have a nice list comprehension syntax. It could be even nicer to be able to implement one yourself. However it only saves you a couple of characters per term when compared to raw combinator chaining. from x in lst where x > 0 select x * 2 is nice, but not that much nicer than lst.Where(x => x > 0).Select(x => x * 2).

There are much more interesting and difficult problems in programming than applying minor changes to syntax. If you boast of the ability to apply minor changes to syntax as if it was an intellectually liberating mind opener, then, uh, yo'ure either inexperienced or retarded.

Name: sage 2011-02-02 12:57

>>119
[quote]
I say that having closures allows you to do anything you can do with macros, in a more or less similar fashion.
[/quote]

:p that made me laugh, if you aren't just trolling, then I suggest you go learn up on lisp macros...

Name: Anonymous 2011-02-02 13:01

>>113
You are concerned about indentation because you are not a programmer.
You are an idiot.
Yeah, okay.

Name: Anonymous 2011-02-02 13:21

>>121
I never said anything about touring-completeness. I did however specifically worded my statement as "to write a program that has certain form and does certain things. I say that having closures allows you to do anything you can do with macros, in a more or less similar fashion".
I say that being Turing-complete allows you to do anything you can do with another Turing-complete language, {b in a more or less similiar fashion}.

You can't do that in BASIC.
You can't do that in C.

Why does that matter?
Because the code is data if and only if the code {i is} data.

You keep pointing out some differences that I honestly consider superficial, without even trying to explain why these are important.
I already explained it many times, the code must be data to be called data, the data must be code to be called code.
The generated code must be evaluable in the current scope, because I want a program that writes a program to modify itself, not a program that writes a program that does something, that would be just stupid.

Yes, when I write return eval('lambda x: {}'.format(n)) simple string substitution happens instead of symbol substitution in AST.
But your data is not code and your code is not data. You can't do (write '(my configuration list) my-configuration-file), then (read my-configuration-file) and return the same list.

Why the fuck should I care? It's the "how", the result is the same.
Not the same, read above.

Here, look at the Python goto module: http://entrian.com/goto/download.html
Now implement multiline lambdas, without writing 100M LoC.

MY EYES.
We all know that the DSL's syntax is terrible{spoiler.i !}, but it's a good example of {i macros}.

It could be even nicer to be able to implement one yourself.
(define-syntax (lc stx)
  (syntax-case stx ()
    ((~ expr (a b c) . r)
     #'(map (lambda (a) (~ expr . r))
            (filter (lambda (x) (c x)) b)))
    ((~ expr (a b) . r)
     #'(map (lambda (a) (~ expr . r)) b))
    ((~ expr) #'expr)))

(lc (+ b c)
    (b '(1 2 3 4 5 6) even?)
    (c '(1 3 5)))

(define-syntax (lc2 stx)
  (syntax-case stx (for in when select)
    ((lc for var in xs when p r ...)
     #'(map (lambda (var) (lc r ...)) (filter p xs)))
    ((lc for var in xs r ...)
     #'(map (lambda (var) (lc r ...)) xs))
    ((lc select b) #'b)))

(lc2
 for b in '(1 2 3 4 5 6) when even?
 for c in '(1 3 5)
 select (+ b c))
[code]

but not that much nicer than lst.Where(x => x > 0).Select(x => x * 2).
[code](map (lambda (b c) (+ b c)) (filter even? '(1 2 3 4 5 6)) '(1 3 5)))


There are much more interesting and difficult problems in programming than applying minor changes to syntax.

(defmonadfn >>= (m x f)
  #:apply #'((monad-base-bind m) f x)
  #:id #'(monad-base-bind m))
(defmonadfn >> (m f g)
  #:apply #'(>>= m f (λ (_) g))
  #:id #'(λ (f g) (>> m f g)))
(defmonadfn return (m x)
  #:apply #'((monad-base-return m) x)
  #:id #'(monad-base-return m))
(defmonadfn mplus (m x y)
  #:apply #'((monad-plus-mplus m) x y)
  #:id #'(monad-plus-mplus m))
(defmonadfn mzero (m)
  #:apply #'(mzero (current-monad))
  #:id #'(monad-plus-mzero m))
(defmonadfn m-lift (m n f)
  #:apply
  (let* ((xs (map gensym (make-list (syntax->datum #'n) 'x)))
         (zipxs (map (λ (x y) (list x (list #'return y))) xs xs)))
    #`(lambda #,xs
        (do-monad m #,zipxs
          (f #,@xs))))
  #:id #f)


minor changes to syntax
Read above.

Name: Anonymous 2011-02-02 13:22

>>124
Forgot to compile the Sexpcode, fuck that.

Name: VIPPER 2011-02-02 13:30

I have seen alot, but this takes the cake.

Name: Anonymous 2011-02-02 13:32

>>126
alot
fagg...
VIPPER
...ot.

Name: Anonymous 2011-02-02 13:33

>>125
onsubmit="javascript: compile(textarea);"

Name: VIPPER 2011-02-02 13:34

>>127
Why dont you go back toHAXING MY ANUS! ^_^

Name: Anonymous 2011-02-02 13:35

I just found /prog/ for the first time today. Boner achieved.

Name: VIPPER 2011-02-02 13:37

>>130
I just found /prog/
Maybe you find /b/ a more suitable place for you.

Name: Anonymous 2011-02-02 13:38

>>128
It currently doesn't escape {s in code tags, so it would just fuck the code up.

I prefer my C-x s or M-C-x s to compile only the selected region.

Name: Anonymous 2011-02-02 13:39

>>131
Fuck off, ``VIPPER''.

Name: Anonymous 2011-02-02 13:40

>>131
What makes you say that? I was looking for a place where I could discuss the procedural generation of trees in Unity 3... This board seems like a great place for me.

Name: Anonymous 2011-02-02 13:45

>>134
Don't listen to VIPPER.

Name: VIPPER 2011-02-02 13:46

>>135

Do listen to VIPPER.

Name: Anonymous 2011-02-02 13:52

>>136
Why don't you want me here?


I have to rewrite my request about trees since I've lost it & it relied in part on a picture I made to explain itself...

Name: Anonymous 2011-02-02 14:06

>>124
Wow more Lithp faggotry. code=data is a fucking terrible idea, at least in its current most quoted embodiment (((Lithp))). Fuck you and your shitty sea of parentheses. It's been 40 years since that language was invented and nobody came up with a standardized better syntax that would maintain the so-called code=data principle. Guess why?

Name: Fuck off, !Ep8pui8Vw2 2011-02-02 14:07

>>131,136
Fuck off, you cock sucking ``VIPPAR''.

Name: Anonymous 2011-02-02 14:10

>>137
We don't actually discuss programming here.  We just discuss what boards everyone should go to.

Name: Anonymous 2011-02-02 14:12

>>138
Can't admit you lost? Bash the language!
Faggot.

Name: Anonymous 2011-02-02 14:12

>>140
{spoiler /prog/} - Board dispatching center.

Name: VIPPER 2011-02-02 14:12

>>137
We dislike new people here. Try /lounge/.

Name: Anonymous 2011-02-02 14:14

>>138
It's been 40 years since that language was invented and nobody came up with a standardized better syntax that would maintain the so-called code=data principle. Guess why?
Because S-expression already work perfectly?

Name: Anonymous 2011-02-02 14:25

>>140

Hmmm, I see.

I shall lurk for now, this is pretty lulzy to read.

Name: Anonymous 2011-02-02 14:29

>>145
We do not ``lulz'', ``epic win'', etc.

Name: VIPPER 2011-02-02 14:34

lulzy
I shall lurk for now
And not just a bit.

Name: Anonymous 2011-02-02 14:35

>>145
Please ensure that all of your posts are saged!

Name: Anonymous 2011-02-02 14:37

>>>147

( ≖‿≖)  D
( ≖‿≖ )   I
(≖‿≖ )  C
(‿≖   )   K
(≖   )   
(     )   T
(     )   O
(   ≖)   W
(  ≖‿)   E
( ≖‿≖)  R

I'm pretty sure that he'll enjoy being stuffed into anuses of clueless toddlers. ( ≖‿≖)

( ≖‿≖)  R
(  ≖‿)   E
(   ≖)   W
(     )   O
(     )   T
(≖   )   
(‿≖   )   K
(≖‿≖ )  C
( ≖‿≖ )   I
( ≖‿≖)  D

Name: Anonymous 2011-02-02 14:40


( ≖‿≖)  D
( ≖‿≖ )   I
(≖‿≖ )  C
(‿≖   )   K
(≖   )   
(     )   T
(     )   O
(   ≖)   W
(  ≖‿)   E
( ≖‿≖)  R

Name: Anonymous 2011-02-02 14:54

( ≖‿≖)
( ≖‿≖ )
(≖‿≖ )
(‿≖  )
(≖   )
(   )
(   )
(   ≖)
(  ≖‿)
( ≖‿≖)
( ≖‿≖ )
(≖‿≖ )
(‿≖  )
(≖   )
(   )
(   )
(   ≖)
(  ≖‿)
( ≖‿≖)

( ≖‿≖ )
(≖‿≖ )
(‿≖  )
(≖   )
(   )
(   )
(   ≖)
(  ≖‿)
( ≖‿≖)

Name: Anonymous 2011-02-02 15:03

( ≖‿≖)  D
( ≖‿≖ )   I
(≖‿≖ )  C
(‿≖   )   K
(≖   )   
(     )   T
(     )   O
(   ≖)   W
(  ≖‿)   E
( ≖‿≖)  R

I'm pretty sure that he'll enjoy being stuffed into anuses of clueless toddlers. ( ≖‿≖)

( ≖‿≖)  R
(  ≖‿)   E
(   ≖)   W
(     )   O
(     )   T
(≖   )   
(‿≖   )   K
(≖‿≖ )  C
( ≖‿≖ )   I
( ≖‿≖)  D

Name: Anonymous 2011-02-02 16:22

>>124
I say that being Turing-complete allows you to do anything you can do with another Turing-complete language, {b in a more or less similiar fashion}.
and immediately...
You can't do that in BASIC.
You can't do that in C.
You must have the memory of a chicken, to contradict yourself so hard so soon.

Touring completeness is completely meaningless when discussing differences between programming languages. They all are, and the DSLs which aren't are so fucking different that no sane person would go as far as decided to include them in the comparison.

Mentioning touring completeness only marks you as a sophomore who just learned of the concept and plugs it anywhere he can. Or as an intellectually challenged individual who continues to do so long after he should have realized its limitations.

I repeat, there's an informal but a much more useful metric for comparing the expressive power of different languages. In this metric C and BASIC are far below any language which has proper anonymous functions, and those are pretty damn close to languages which have compile-time transformations, like Lisp. Which, in turn, are somewhat below languages which have unrestricted compile-time transformations, like Forth, but not that far below, compared to the level where having anonymous functions brings you.

Oh, back to your remark about C, I want to point out that I was talking about the languages developed in the past twenty years, C falls short by almost twenty years as well, C++ -- by ten years.

I already explained it many times, the code must be data to be called data, the data must be code to be called code.
The generated code must be evaluable in the current scope, because I want a program that writes a program to modify itself, not a program that writes a program that does something, that would be just stupid.
And I already explained that this objection is no more meaningful than an objection to Haskell's conses on the grounds that you have to make a new cons if you want it modified. It doesn't mean that Haskell's conses are somehow inferior, because nobody cares about such minute details, except for the people who can't see the computation behind the trees.

But your data is not code and your code is not data. You can't do (write '(my configuration list) my-configuration-file), then (read my-configuration-file) and return the same list.
Obviously I can serialize a list into a file and then deserialize it back. Not needing to "import pickle" to use the serializer is not a benefit you mention in a thoughtful discussion.
Also, it has nothing to do with the "code as data" thing. What you probably wanted to say is that I can't dump some code into a file and then import that file. Which I obviously can.

Now implement multiline lambdas, without writing 100M LoC.
You don't know shit about what you're talking about. Python's lambdas are multiline. Just enclose the expression in, wait for it, wait for it, parentheses. What they are not, is allowing statements, and, as it happens, I've recently added about 15 LOC to my "void.py" file, which provide me with all expressions I need, wrapped in functions. With lambdas you can do that.

but not that much nicer than lst.Where(x => x > 0).Select(x => x * 2).
[code](map (lambda (b c) (+ b c)) (filter even? '(1 2 3 4 5 6)) '(1 3 5)))
Your point is? You seem to be quite confused and just latching on any bait you imagine to see. I never said that Lisp is less powerful than C#, there's no need to translate every bit of C# code I show into Lisp. I don't care if your dick is small. However I'd like to point out that Lisp notation is retarded, in C# the flow of data matches the flow of code, in Lisp you get function names progressively more separated from their important arguments. Go make the DSL to fix that, then make all your imaginary friends use it.

There are much more interesting and difficult problems in programming than applying minor changes to syntax.
defmonadfn
HAHAHAHAHA, well, HAHAHA, oh, small minds and shit... HAHAHAHAHAHA.

Name: DICK TOWER 2011-02-02 16:22

(   )
(   ≖)
(  ≖‿)
( ≖‿≖)
( ≖‿≖ )
(≖‿≖ )
(‿≖  )
(≖   )
(   )

Name: Anonymous 2011-02-02 17:10

>>153
I was talking about the languages developed in the past twenty years
But Lisp is 52 years old, now! (Also, Java: 1995)

Also, it has nothing to do with the "code as data" thing.
You can't load and...
What you probably wanted to say is that I can't dump some code into a file and then import that file. Which I obviously can.
...  then transform the code, or use it as data.
But on this you've won.

You don't know shit about what you're talking about
But you said you could do anything Lisp does and better~ :(

I've recently added about 15 LOC to my "void.py" file, which provide me with all expressions I need, wrapped in functions.
So, you need to define named function to defined proper anonymous functions? Yeah, that makes sense.

Python's lambdas are multiline.
expr1 and expr2 and expr3 and expr4 doesn't count as multiline, a (logical) ``line'' in Python is (expr|stmt)[\n;]
In a language full of statements, having lambdas that can't use them is pointless.

HAHAHAHAHA, well, HAHAHA, oh, small minds and shit... HAHAHAHAHAHA.
You might prefer

  (define-syntax >implying
    (syntax-rules (is called with and)
      ((>implying proc is called)
       (proc))
      ((>implying proc is called with var)
       (curry proc var))
      ((>implying proc is called with vars ... and var)
       (curry proc vars ... var))))

It will remind you from where you came, after all.

By the way, show something Lisp can't do, now.
You know, just for fun.

Name: sage !ccqXAQxUxI!rGxutZjWR7LZWNO 2011-02-02 17:10

sage

Name: Anonymous 2011-02-02 17:46

But you said you could do anything Lisp does and better~ :(
Nope. I could do anything Lisp does not much worse, and then some things that I actually want to do, much better.

expr1 and expr2 and expr3 and expr4 doesn't count as multiline, a (logical) ``line'' in Python is (expr|stmt)[\n;]
In a language full of statements, having lambdas that can't use them is pointless.
You don't understand. Again, the chicken memory of yours is to blame, I'm getting a suspicion regarding your preferred Scheme dialect.

I can have as long lambdas as I want, split into separate lines and indented any way I want, as long as they are enclosed in parentheses. That part about necessary parentheses, it doesn't bother you too much, I presume?

Now there's a problem -- normally, I use statements in Python, like, the "for" statement, or the "while" statement, or the "raise" statement, and so on.

Well, as it happens, all my looping needs are completely satisfied with list comprehensions, and for things like "raise" I can define a "raise_" function which does exactly that. I have to do it once and then just import my "void.py" which contains everything I need. I'm OK with having to do it with a named function, because I have to do it once.

You might prefer
Nope, I don't prefer you pointlessly showing off in any fashion. too lisp; didn't read.

By the way, show something Lisp can't do, now.
Not looking like an oatmeal with fingernail clippings mixed in, in a commonly accepted fashion?

It can't. So I prefer to use languages which allow me to do everything Lisp can do with not much overhead, and then do the things I want without looking like the proverbial oatmeal, e.g. much much better.

PS: I want to point out that we quite digressed from my original point, which was not about why I don't use Lisp, but about the peculiar property of the vast majority of the Lisp advocates: they tend to praise mundane, simple features that are already included in VisualBasic.NET™, as true mind openers. And then, in more private circumstances, complain that it's these features that are too hard for the rabble to understand, and that's why Lisp is unpopular. Unlike VisualBasic.NET™. And that this enigmatic tendency might have something to do with the fact that Lisp is so unpopular that it's less popular than Haskell. Namely, that the Lisp community consists mostly of mentally retarded people, and that is a push off of a kind.

Name: Anonymous 2011-02-02 18:00

>>157
You don't understand. Again, the chicken memory of yours is to blame, I'm getting a suspicion regarding your preferred Scheme dialect.
Scheme doesn't restrict lambdas, I don't have to do any and/begin tricks.
Here it's 23:52PM, ````sorry'''' for my ``chicken memory''.

I can have as long lambdas as I want, split into separate lines and indented any way I want, as long as they are enclosed in parentheses. That part about necessary parentheses, it doesn't bother you too much, I presume?
What bothers me is to not being able to do x = ???;something.set(x);somethingelse.set(x)

Now there's a problem -- normally, I use statements in Python, like, the "for" statement, or the "while" statement, or the "raise" statement, and so on.
It's too soon to say ``yeah, you finally get it.''

Well, as it happens, all my looping needs are completely satisfied with list comprehensions,
Look at me, I'm fighting against my tool! I need to do what my hammer want me to do!

and for things like "raise" I can define a "raise_" function which does exactly that.
See above.

I have to do it once and then just import my "void.py" which contains everything I need. I'm OK with having to do it with a named function, because I have to do it once.
See above.

Nope, I don't prefer you pointlessly showing off in any fashion. too lisp; didn't read.
Too faggot; didn't read.

Not looking like an oatmeal with fingernail clippings mixed in, in a commonly accepted fashion?
It can.

It can't.
Hello, #I reader macro, standard even on Lisp Machines!

So I prefer to use languages which allow me to do everything Lisp can do with not much overhead
Too uninformed; didn't read.

and then do the things I want without looking like the proverbial oatmeal
Why, hello there, Larry.

e.g. much much better.
That's just an example, it doesn't have to be real (n.b.: it doesn't)

PS: I want to point out that we quite digressed from my original point, which was not about why I don't use Lisp, but about the peculiar property of the vast majority of the Lisp advocates: they tend to praise mundane, simple features that are already included in VisualBasic.NET™, as true mind openers.
VBNET enforces Lisp-style of doing things.

And then, in more private circumstances, complain that it's these features that are too hard for the rabble to understand, and that's why Lisp is unpopular.
I even said it's simple.

Unlike VisualBasic.NET™.
I just said it's braindead. It is.

And that this enigmatic tendency might have something to do with the fact that Lisp is so unpopular that it's less popular than Haskell.
We're comparing sepples to dead dogs, now.

Namely, that the Lisp community consists mostly of mentally retarded people, and that is a push off of a kind.
QED. Oh, wait.

Name: Anonymous 2011-02-02 18:20

>>158
That's pretty limp, especially considering how much ass Lisp standard libraries tend to suck.

Name: Anonymous 2011-02-02 18:33

>>159
You are now aware of the FFI.

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