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

Pages: 1-

symta tutorial plz

Name: Anonymous 2012-12-22 19:24

i really want to learn symta, but the "tutorial" stolen from arc's tutorial is a piece of shit.
plz explain it from the beginning in a way that can be understood without previous knowledge of lisp. thank you!

Name: Anonymous 2012-12-22 21:59

i'll start:

numbers evaluate to themselves:

symta> 100
100

Name: Anonymous 2012-12-22 22:02

Consider this a petition to Ahmed to get his shit together and write some actual documentation.

Name: Anonymous 2012-12-22 23:27

we conjure the spirits of the computer with our spells

Name: Anonymous 2012-12-23 2:04

Just learn Lisp and then you'll have a good foundation.

Name: Anonymous 2012-12-23 4:40

I wouldn't mind a symta-mode for Emacs.

Name: Anonymous 2012-12-23 6:25

>>4
We clojure the spirits of the computer with our spells.

Name: Anonymous 2012-12-23 7:59

>>2
I'd like self evaluating numbers. Like (100 2 3) evaluated to 100, then I wouldn't have to spend so much time writing case analysis.

Name: Anonymous 2012-12-23 10:00

>>8
They'd evaluate into Church numeral functions, of course.

Name: Anonymous 2012-12-23 11:10

>>9
There are still things that aren't Church encoded?

Name: Anonymous 2012-12-23 15:27

lisp is very confusing, i couldn't learn it.

Name: Anonymous 2012-12-23 15:33

>>11
defun a shit

Name: Anonymous 2012-12-23 16:06

>>8
instance Num a => Num (b -> a) where
  fromIntegral = const . fromIntegral

Name: Anonymous 2012-12-23 16:33

>>13
You mena fromInteger.
And yes, I didn't think of it, it's like defining __call__ for int, terrible and marvelous at the same time!

Name: Anonymous 2012-12-23 18:17

>>13-14
Great, now define one that evaluates to a list so we can write 1 3 5 7 instead of [1, 3, 5, 7].

Name: Anonymous 2012-12-23 20:15

I still feel like this whole symta thing is an elaborate troll that got out of hand

Name: Anonymous 2012-12-23 22:45

>>13
instance Show (x -> a)
instance Eq (x -> a)

instance (Num a, Eq a) => Num (x -> a) where
    fromInteger = const . fromInteger
    f + g = liftM2 (+) f g
    f * g = liftM2 (*) f g
    f - g = liftM2 (-) f g
    negate = (negate .)
    abs = (abs .)
    signum = (signum .)

instance (Eq a, Fractional a) => Fractional (x -> a) where
    f / g = liftM2 (/) f g
    recip = (recip .)
    fromRational = const . fromRational


average = sum / genericLength

Name: Anonymous 2012-12-24 9:52

>>16
It is, and it did.  This guy trolled the shit out of a number of boards, [code]\prog\[/code] included.

Name: Anonymous 2013-12-30 21:16

anus
anus

Name: Anonymous 2013-12-30 21:17

anus
> anus

Name: Anonymous 2013-12-30 21:18

anus
anus

anus

Name: Anonymous 2013-12-30 21:22

Name: Anonymous 2013-12-30 21:27

anus
> anus

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