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

Pages: 1-

Great tutorial, or greatest tutorial?

Name: Anonymous 2010-08-28 9:35

http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
This must be the greatest tutorial available to people keen to learn both HASKALL and SICP's protagonist SCHEME !!!!!!!

Name: Anonymous 2010-08-28 10:32

This was tricky when I first tried it because I didn't understand the magic of monads. I considered monads an arcane art to be studied at a future date. After acquiring proper comprehension, I returned to this tutorial and became enlightened.

Name: Anonymous 2010-08-28 12:41

No hygienic macros and no continuations, then why the hell does it take 2 days?

Name: Anonymous 2010-08-28 13:29

<Riastradh> klutometis, yes, I've seen <http://jonathan.tang.name/files/scheme_in_48/tutorial/overview.html>;, and I think it's a great way to give a completely bogus characterization of Scheme implemented in very badly written Haskell, and my response is <http://mumble.net/~campbell/tmp/Scheme.hs>;.

Name: Anonymous 2010-08-28 14:39

Scheme interpreter in Haskell, oh the lulz

Name: Anonymous 2010-08-28 14:45

>>5
I'm not sure I see the "lulz", Scheme's been implemented in basically everything, why not Haskell?

Name: Anonymous 2010-08-28 15:19

Scheme is a Lisp, Lisps are implemented in Lisp with only the most primitive functions being part of the compiler. Any Lisp not written is Lisp is like writing a C compiler in Smalltalk

Name: Anonymous 2010-08-28 15:43

So is this any good or not? I know some Haskell and want to learn Scheme, so I thought that this would be perfect. After reading >>4 I'm not so sure, has anybody else read through it?

Name: Anonymous 2010-08-28 15:48

>>7
Lisps are implemented in Lisp with only the most primitive functions being part of the compiler.
I'm sure it's convenient for you to think that, but in many cases it's simply not true.
Any Lisp not written is Lisp is like writing a C compiler in Smalltalk
And what is the meaning of this atrocious analogy?

Name: Anonymous 2010-08-28 16:01

>>8
I had a lengthy post here, but then I re-read your posts, and it seems that you just want a SICP.

Name: Anonymous 2010-08-28 16:10

And what is the meaning of this atrocious analogy?

this meaning is that all Lisps are made up of cons cells, you take away that abstraction and you have a meaningless Lisp

a type inferred Lisp restricts how cons cells are interpreted

Name: Anonymous 2010-08-28 16:17

>>11
In other words, you have absolutely no idea what you are talking about

Name: Anonymous 2010-08-28 16:23

.

Name: Anonymous 2010-08-28 16:37

>>12
right, I wish you luck with your Haskell/Scheme compiler, Im sure it will do you well

Name: Anonymous 2010-08-28 16:51

>>14
Since you are clearly too retarded to understand your own thoughts, let me be crystal clear. There is nothing written that says a Lisp must be written in Lisp, barring a few primitives. That is but one implementation strategy, and is used by Emacs, Scheme48 and others. Another implementation strategy, is that you can implement the entire standard in a lower level language like C, which, I believe, is how Guile is implemented. As long as the implementation meets the standard, one can safely call it a Lisp/Scheme/whatever.
You have not given a reason why it should be a bad implementation strategy to write a C compiler in Smalltalk, because the same thing applies. If it meets the standard, it's C, and who gives a fuck how its implemented.
Thirdly, have you ever implemented an interpreter in Haskell, it's not hard to do sexps, you make a Sexp datatype and have there be a constructor for numbers, strings, characters, ... and boom, it fucking works.
So please explain to me, how do you justify any of your retarded statements.

Name: Anonymous 2010-08-28 17:00

>>11
I'm pretty sure you can model a dynamic language in Haskell.
Lisps are usually not untyped, instead you have all your usual types and the types are tagged. You can easily describe all the Lisp datatypes in ML or Haskell. The idea is that you use a statically typed language as a meta-language, but the language its interpreting (or compiling) has of course different rules than the host language.

And no, Lisps aren't made of ``cons cells'', cons cells are just a very useful abstraction for a 2 valued structure which can hold any 2 objects (the car and the cdr), and are typically used to implement linked lists (chained cons cells with a nil or '() object to end the list - also known as a proper list), however besides linked lists, you tend to have a variety of other objects such as strings, classes, instances, arrays, characters, numbers(bignums, fixnums, complex, rational, etc) structures, conditions, hashtables, functions, pathnames, streams and so on (however, at the low-level you usually just have your integers, arrays and structures/instances, which themselves get reduced to tagged buffers or just plain data (ints or buffers). here's a listing of possible implementations: functions - structures containing a code buffer and other metadata. numbers - fixnums or buffers. strings - arrays of chars. chars - tagged integers. instances - structures. classes - instances of metaobjects. structures - tagged arrays. arrays - tagged buffers (bytes). hashtables - structures or instances. conditions - instances. pathnames - instances/strings. streams - structures of instances. cons - structure or something more optimized. fixnum - just native integers or tagged integers. bignum - buffers, and so on...). If I think about possible internal implementations, I don't really see what trouble you would have implementing it in Haskell ( I don't really know that much Haskell, but I know ML).
It should also be noted that Lisps without cons cells are perfectly possible, but the standard library would suffer somewhat and a different representation for linked lists would be needed, also certain nice tricks would just not be possible. The language however could exist just fine without cons cells, even though it wouldn't really be a classical Lisp. Frankly, I don't see that much point in replacing them as I think they make a lot of things much easier and in some usage scenarios, even faster, however a Lisp based on arrays instead of cons cells might be slightly interesting albeit also weird.

Name: Anonymous 2010-08-28 19:44

>>16
A lisp based on arrays
Fuck it, just use lua.

Name: Anonymous 2010-08-28 22:36

goddamit lua why do you make me declare my variables local and default to global?  every other language figured out lexical scoping like a billionty-five years ago

Lua is the worst Lisp evar

Name: Anonymous 2010-08-29 0:59

Bump to get the fucking Reddit thread off the goddamn front page.

Name: Anonymous 2010-08-29 3:20

>>18
every other language figured out lexical scoping like a billionty-five years ago

my $fuckyou = "faggot";

Name: Anonymous 2010-08-29 3:55

>>18
Undeclared variables defaulting to globals is kinda bad, but it's easy to turn off using metatables.

Name: Anonymous 2010-08-29 5:44

>>18
Actually they didn't. Most scripting languages aren't actually lexically scoped.

Name: Anonymous 2010-08-29 7:23

so, has anybody actually read the tutorial in question and is therefore able to give advice whether it is worth reading or should be disregarded?

Name: Anonymous 2010-08-29 8:54

>>23
No, but I'd say disregard it. You don't get anywhere if you try to walk in two directions at once.

Name: Anonymous 2010-08-29 11:08

>>23
I've read it. It's good if you know both Haskell and Scheme and want to see a practical application of Parsec. But if you want to learn Scheme just grab a SICP.

Name: Anonymous 2010-08-29 12:01

>>18
The lua source is not so big. Change it yourself and enjoy.

Name: Anonymous 2010-08-29 14:03


                 _    _             __  __   ______   _   _                                         
                | |  | |           |  \/  | |  ____| | \ | |     /\                                 
                | |  | |           | \  / | | |__    |  \| |    /  \                                
                | |  | |           | |\/| | |  __|   | . ` |   / /\ \                               
                | |__| |           | |  | | | |____  | |\  |  / ____ \                              
                 \____/            |_|  |_| |______| |_| \_| /_/    \_\                             
                                                                                                    
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQWWWWWWWWm##BWW#8SvawQWWQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQWZZ##ZZZZZXX22nnnnvvI?YdQQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQWmm#ZXZXXXXSnnvvvvonvli|IWQQQQQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQW##XSSSS2onnvvvvIvoovv|+++?HQWQQQQ
QQQQQQQQQQQQQQQQQQQQQQQQQQQQWWWmWWWWWWWWQQQQQQQQQQQQQQQQQQQQQQQQQWWX2oooo1llli|lillvvvvi|=:-:+{3WWQQ
QQQQQQQQQQQQQQQQQQQQQQQQQW#m####XX2X22oSX#WWWQQQQQQQQQQQQQQQQDX$W#nnn1vnli||+===-:=+i||l|=:.  =||VQW
QQQQQQQQQQQQQQQQQQQQQQQW###mZXXon1vvv2XZ#ZXZZ#mQQQQQQQQQQQQQAom#Xlliilvvlli==:. ...:==|||=:.   +v%3Q
QQQQQQQQQQQQQQQQQQQQQW#ZXSXSXYIllIvnoXXX#Z##mBWQQQQQQQWWWQQ#XW##e>+=|lvvli|+=:.. . ..;====;     -<l3
QQQQQQQQQQQQQQQQQQWWXX11no1Iilvlivvnoom#mWmmmQWQQQQQW##WWQEnW#B}--.;+iIvl|+=;.     . .;===;.     =|v
QQQQQQQQQQQQQQQQBXZn1lIvIiiii%||llvvmm#m#####WWQQQQW#Z#WWDvWXW}-. ..=|llii||=; .     :=+=||%v>.  -=I
QQQQQQQQQQQQQQW#1o1vlili|i||%=|i|ivXXX#U#ZZXmWQQQWm##X#mWoXX#Z>..  :aqgwo2lisi;.    .<vviilvY*i. .|>
QQQQQQQQQQQQQWGvvll||||=||||=+|=|ioSXZXXSSomQQQQWmm#XX#BGevv3Xz;=  vWWZYY}<vIns:  ..:i|++~-  ..  :|>
QQQQQQQQQQQQQZnli||=||=|+|===+==|vo#ZXS22S#WWQQWWW#XXXmWli<i3#hii. 3X(:/   -+l|..  :||: .        =|:
QQQQQQQQQQQQ#n}||+=;====;:::===|inZZXn2oXXXWBQWWWm#X2mWZii<i3Zmvn= -I:-     :iIsa>=vov:          |+.
QQQQQQQQQQQB2I||=:::=:::.:.:::=|i2XS1oXZXoX##Q#WWW#oX@1eii|IvX#ZXc  <i=,  . _vumQmqmmXa=___;.   .=| 
QQQQQQQQQW#oi|||=:::::.:.:.:.:=|vno1vXZonvommWQWQWXoW|<1=i|iivXXXc. -+1XuwosumQQWQWWW#Xov|i=    :== 
QQQQQQQQQWWhi|=:::=;:::=:::-:=|ilvnlnXnnwXZ#$WQQW#XXk>ic+i|i|lvXo1=   =vXmm##BBWWWWm#X2l|+|=   .;=` 
WWWWWBWW##XS>=;;=;;====::;:;:+||lIlinnomWS1oQWQQW#XX2s%l|Illi||Ioov=. :{Xm##ZmmW#USX1o1vi|+=  .;==  
mmmZZ#####Xn>=;;;:=++=.::=:=+|||i|||nq##X1ld#WWQB#XnhoiiivliI|+=nXov;  =3##X##m#ol+|lvnvv|==  .===  
XX#SXXXXZXqh>=;::==:::==:; :==||+||<dXZ21sdG#mQW#Xom#Silii><i||=v3mv|  .)XSX##ZXn|=:={2oivi=. .=== .
SX#X#ZXXX$mos==.==:::===: .:-=+==|=io*llvndnmWW##2XmZXXvIi=:|:=ii3mz+   +lvXX#21l=:::=+Ivvi>   =||..
1nClv211XX#Ssi;=|===|==;  .: :;=;==i||vXoSodZm#Z2d#X2XXes|==l:=vnmmX|   .<lvmZXc==:. .. -~<|:  -|=|.
1n2vvooooXZ2s=-=====|+=.:.:: ...:;=:in11nnXX#ZXoXZ21nnnzvivi|.<vXW#e=    =ldmmX}--:. .    :Ii.  ==:|
oXZXXXXX###mz====+.||+::=;:..   ::=<vlv1ndZm#2oXXXvInlvXsnvii=|I3WX1;    <vQWWQc  - .     :i|...;=;<
211vn1vnnoXmoi===+.=||:===..   ..:<><nvo#Z#m#oXSonvivvoXo2vvvvvnd#1v;    =vWWW#X;.        =i|=.:.:=<
ilivvlsvvXmmZs>=|===+|=:+;;.. .  .=ivnXSXXXmZnn2nnvInXZXenlvvInn3Sli;    -vWWWmXv;       .||ina...:<
iivvvlvIXZQW#1:+=-+=|+i;=;:.     :=<lnvXXnd#Xnn2o2nlnXolliiIliiil1||=     3#mW#X1=-..   .:||uQQ:::=<
liiivIvnqmW#Xl<%:.==|=|;.::... ...-|{Iv#XomUXodo22nin2ol>|+l||=++|++=;.    )UXXYl|==- -:,=iwQQW.%==|
l|lvvlvdUXSSeii> ==+>=+:=::.   .:.;=<|nXSo#Z2nXX22n|nnnI|==|=|====+=|=;.     ~^--     .<nnmWQQQ=S>|+
=iii|llvI{dSv=i` -.=`==+- .   .:.::=<lnSoZSe2nXXnXo|IloI=:;+==::::==+=:. .           :=il2XS$WW(nn||
|i|<%+<%v|vol==: ..:.=-`     ....;===|InnlIiooZ2vZXil|ni==:;=-.:.:+=+> .            .-:<nmXwuvIil1==
|=|%i+|=|<nl> .- .:..:    .. :..:=-.;=Iii++vnXXnvZ2Ii|v>=; :: .: ==|+;...            .:|nQmQWWmuuaii
==|i>={*}*I{> .  : :...: =: ..::: ..;<i+`:<vo2vInZnv|iv==.    . ..==== . ..          .:<dmQQWWmmmXXX
|||||=<>=iI%` .  : :..=;.= ..::.  . =+=:._vionvvX2ii=ii::.        ..-- . .         . .=idWQQWWWmm###
|++=+|=>:=v>:;     : :== : . +;.   --:.=|vIoonvo2ii>=||..         :: ._..           ..<n#QQQWWmBm##Z
<=|i%=i|iuci|:.     ..-. . . :i;.    .ivvivoonnnn=v=|==:..       .:. =..        .   .:vmmQQWWWWBm##X
|v1vavnI11*!*+=.  . ..      .:+==:.  :<vvonn1vlli=I+|-;.:        .- .=:.         ...:<X#WWQQQWmmm##Z
. -.::;===+++|+=     ....  .:==+|+=. :<vIlvviiiisi><| =..        . ..=:.    .  :..-::i<2X##WmWmm##ZZ
.......:::::=:;=:   .. .:::;::;:==vc -===|I>=ivil<:<|.::.   .     . ::. .  .  .  ..=v,="{vvYXX###XZX
   . .  .:...-.;+ .   ..=;:+===;;={p:.;;=%=.%Ill>===i::-. . ..   .  .:. - . . .:.:.:.""ns."+<I*1no2X
     . .. .. ..;=.    :::..- ..:-=3"`  ;|:=%lll>==>.|`: : :    . .   ::  .:.-..:::;     -?a,:^<i||{l
        - :.  -=;       :=. .-:.-.     ===Iii|++=+:==.     . ..;..    -  ::  ..;::.        "4a, -~|-
      .      .  .       .-:=          .+=|>|=|=;= =: .    .   .;..        .. .-::... .     .  "1a   
           .    -.          `        .=|+=|||===.=;:         .=;;.        . ..=:. .             -?s,

Name: Anonymous 2010-08-29 16:09

>>27
Go away.

Name: Anonymous 2010-08-29 16:31

>>28
Go away, "homosexual".

Name: Anonymous 2010-08-29 17:28

>>27
Aw, Haskell's so cute.

Name: Anonymous 2010-08-29 17:37

>>30
Also dead.

Name: Anonymous 2010-08-29 18:45

>>31
I know that. Although I guess I should have said that he was cute.

Name: Anonymous 2010-08-30 3:48

>>32
Haskell is a he?

Name: Anonymous 2010-08-30 12:33

>>33
Actually, I have no idea.

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