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

Pages: 1-4041-

Symta documentation

Name: Anonymous 2012-11-10 17:18

I don't know who the hell the in Symta guy is or why he's hiding the documentation these days, but here's an old Symta version that still has a lot of relevant documentation and example code.

http://symtadev.blogspot.be/

I haven't tried it out yet, because I'm too lazy to install the required emacs packages. Maybe someone should look into it? I'll post some of the included files here, for the lazy.

Name: README.txt 2012-11-10 17:19

First of all, make sure followin packages are present:
 cffi, babel, trivial-shell and trivial-garbage

Here is how I myself run Symta:
 - emacs
 - Alt-X slime
 - (require :symta)
 - ($eval "read|eval|say|loop")
 - To exit just Ctrl-C Ctrl-B

Quick Reference
------------------
  Note: functions don't change their arguments
  Case matters: variable names must start with uppercase letter
                function names must start with lowercase letter
------------------
"Hello, World" // string
say "Hello, World" // prints "Hello World" on screen
'say // unevaluated symbol
[1 2 3] // list of 1 2 3
[2+3 2-3 2*3 2/3 ~3] // usual sum, subtraction, product, quotient and negation
[A==B A<B A>B A<=B A>=B] // comparisons
[1 @[2 3] 4 @[5 6]] // list splicing
#(1 $@[] 4 $@[5 6]) // quasiquoted version
[A=123 B=456] // associative list of sorted pairs (associative map)
Map.A // returns value associated with key "A" (shorthand for Map."A")
Map.(A) // same, but A is variable.
L,N // element N-th element of list `L`. If `N` is negative, then from end
Condition |> then // if/then from
Condition |> Then :: Else // if/then/else form
[20++(rand 10)] // list of 20 times random values
A<B |> A :: B // returns smalles value of A and B
sort !List // sorts `List`
sort !List // sorts `List` and saves back value into it
[10%3 10%%3] // remainder and truncating devision
fold ?+?? [1..50] // sums numbers from 1 to 100
map ?^2 [1..50] // squares all numbers in list
fold {A B -> A+B} [1..50] // same as fold ?+?? [1..50], but with explicit body
{1->1; N->N*(r N-1)} // factorial: `r` is default name for current lambda
do A B C // evaluates A, B, and C, returns C
do `+` // treats operator `+` as normal symbol
`'` A+B // quoted expression
f A B -> A+B // definition of function `f`, that adds its arguments
f A B=3 -> A+B // same but `B` is keyword; invoked like "f 2 B=7" or "f 2"
V -> 123 // global variable definition
A:123 // variable binding
A:1 B:2 A+B // declares local variables, then adds them
[(Y:(X:2+3)+4)+5 X Y] // more advanced example of local variables
A=:123 // changes value of previously declared variable
#(&A &B &A &C) // with auto-gensyms
1 | `+` 2 | `*` 4 | say  // conveyor
[1..10] | ['start @? 'end] // another conveyor
[\a..\z] | {[_ @Middle _]->Middle} // pattern matching
all od? Xs; any odd? Xs // every, some from CL
X,f // shorthand for (f X)

/* Multi
   Line
   Comment */

// `f` calls `g` with its argument, binds value returned by
// `g` to `X` and returns `X`, if value returned by g is true
f X:!g -> X
// Example:
while stream,{x:!readLine->x,writeLine}

More Examples
------------------------
prime? N -> all N%?!=0 [2..N/2]
length [X@Xs] -> 1+Xs,length
flatten [@Xs] -> mapc flatten Xs;  X->[X]
foldr f [X@Xs] -> foldr f Xs | f X
sign neg?   ->   ~1
    ; 0     ->    0
    ;pos?   ->    1
    ; X     -> error "sign: parameter $X is unsupported"
[1..10],{[_ X @Xs]->X+Xs,r} // sum even numbers
ordered? [A B @Xs] -> A<=B && ordered [B@Xs]; [_]->y
_all P [N++P] ->
_any P [@_ P @_] ->
_keep P [@_ X:P @Xs] -> [X @(keep P Xs)]
_strip P [@S P @E]->[@S @(r P E)]; _ X->X
reverse [X@Xs] -> [@Xs,rev X]
subseq From Size Str -> drop From Str | take Size
subseq From Size [From++_ Xs:_:Size++_ @_] -> Xs
pal []; [_]; [X @Xs X]->Xs,pal // Palindrome
fib N -> fold {[a b] _->[b a+b]} [[0 1] 1..N] | ?,0 // fibonacci number
"/fs/home/user/names.txt"|flines|sort // sort lines in names.txt

Name: init 2012-11-10 17:19

m:with @Xs X -> $X $@Xs

_ X -> y
_? X -> ptrEq _ X

error X -> cl error (`sq-to-str` (prn X))
abort -> cl abort
tag X -> cl `get-type` X

bound? X -> cl boundp X

prn X -> cl prn X

pp X -> say X p=n

load X -> cl `$load` X
dasm X -> do (cl disassemble X) n

_rng A B -> cl `as-list` (`gen-rng` A B)
_dup N X -> cl dup N X

immediate? X -> cl immediate? X
m:_replica N X -> $@X,{immediate? -> #(_dup $N $X)
                      ;_          -> #(_dup $N n | map &A~>$X)}

// not beginning with, like ^ in regexps (use with pattern matcher)
m:nb X -> fn (&L) (lhd &L) != $X

symbolDowncase X -> X|asStr|downcase|asSym
symbolUpcase X -> X|asStr|upcase|asSym
sconc a b -> conc a b | asStr

rev [X@Xs] -> [@Xs,rev X]
safeMap f Xs -> Xs|[X@Xs]~>[X,f @Xs,r]
mapc f Xs -> map f Xs | fold conc // mappend from CL
keep P Xs -> fold {A B -> B==P |> [@A B] :: A} [[]@Xs]
strip P Xs -> fold {A B -> B!=P |> [@A B] :: A} [[]@Xs]
filter f Xs -> fold {A B -> f B |> [@A It] :: A} [[]@Xs]

subst Src Dst L -> map {(Src)->Dst; X->X} L

m:if @Body -> $@Body,{#($@T Then $@A Else $@B) -> #(_if $T $A $B)
                     ;#($@T Then $@A         ) -> #(_if $T $A n )
                     ;#($T       $A       $B ) -> #(_if $T $A $B)
                     ;#($T       $A          ) -> #(_if $T $A n )
                     ;Default                  -> error "if: syntax error"}


//tableJoin A B by=?,0 ->
//  fold {R X->(T:X,by keep ?,by==T B) | map [X ?] | conc R} [[]@A]

// Take initial elements for which `p` is true
takeInit P [@Xs @(nb P)] -> Xs

//insert `sep` between elements of a list `l`
//Usage: infix '+ '(a b c)
//Example: map ?,asInt,asHex "LISP" | infix " " | fold sconc
//TODO: add flag to create "'(+ A (+ B C))" like lists
infix Sep L -> fold {Xs X -> [@Xs Sep X]} [(take 1 L) @L,ltl]

// break list into piles of `n` items
grp N [@Xs] -> [(take N Xs) @(drop N Xs | grp N)]

/* Example1: unfold {1->n; X->[X-1 1]} 7
   Example2: qsort Xs -> Xs |
               unfold {[X]    -> X
                      ;[X@Xs] -> [(keep ?<X Xs) [X] (keep ?>X Xs)]} */
unfold f O -> f O | {[]->[O]; Xs -> mapc (unfold f ?) Xs}

// counts the number of ones in the bit representation of an integer
// use it to calculate size of bitmasks
bitCount X -> cl logcount X

// bit-length of an integer:  2^(log 2 ? | ceil)
bitLen X -> cl `integer-length` X

// inverts `bits` bits in `value` (bitwise not)
inv Bits Value -> cl logxor (ash 1 Bits)-1 Value

exp X -> cl exp X
log Base X -> cl log X Base
sin X -> cl sin X
cos X -> cl cos X
tan X -> cl tan X
asin X -> cl asin X
acos X -> cl acos X
atan X -> cl atan X

sum S -> fold `+` [0@S]
prod S -> fold `*` [1@S]
avg Xs -> Xs,sum/Xs,len
abs X -> num? X |> cl abs X :: sqrt X*X
norm V -> V/V,abs
transpose V -> N:0 [V,lhd,len++(map (do I:N !N+1 ?,I) V)]

rand X:y? -> num? X |> cl random X :: cl ind X (random (len X))
randRng S E -> (abs E+1-S),rand+S

// convert list to set (an ordered list that doesn't have duplicated elements)
uniq L -> L,sort,{[@A X X @B]->[@A @[X @B],r]; E->E}

// set operations
union A B -> A,{[X@Xs]-> fnd X B |>    Xs,r  :: [x@Xs,r]; _->B}
isect A B -> A,{[X@Xs]-> fnd X B |> [X@Xs,r] ::    Xs,r}
diff A B -> union (strip (fnd ? B) A) (strip (fnd ? A) B)
subsets [X@Xs] -> R:(subsets Xs||[[]]) [@R @(map [X @?] R)]


m:ldb Pos Size Value -> with $Pos $Size $Value {P S V -> cl ldb (byte S P) V}

maximize p [M@Xs]
 -> Score:M,p fe {X -> (S:X,p) > Score |> do M=:X Score=:S} Xs
 -> M

minimize p [M@Xs]
 -> Score:M,p fe {X -> (S:X,p) < Score |> do M=:X Score=:S} Xs
 -> M

m:while Test @Expr -> {-> $Test |> do $expr (r)}
m:until Test @Expr -> while (n? $Test) $@Expr
m:loop Expr -> {:&r -> do $Expr (&r)}

// Usage: times i:10 say i
m:times Head @Expr ->
  $@(do C:Head,{#(`:` $C $N)->C; _->gensym}
        N:Head,{#(`:` $C $N)->N; X->X     }
        #(&E:$N 0,{:&R (&E); $C -> do $Expr (&R $C+1)}))

// for (I:0; I<6; !I+1) say I
m:for #($@V; $@C; $@I) @Body ->
          do $@V (cl progn (while (and $@(map ['`!` ?] C))
                             !$Body $@(map ['`!` ?] I)))
     ; X 'on Xs @Body -> fe {$X->$@Body} $Xs

// these will generate list of ascending/descending numbers
asc Start -> seq Start (asc Start+1)
dsc Start -> seq Start (dsc Start-1)

rep X -> 0,{N -> seq X,(I:(N<X,len) |> N::0) (r I+1)}

seqMap f L -> seq L,lhd,f (seqMap f L,ltl)
seqConc A B -> A |> seq A,lhd (seqConc A,ltl B) :: b
seqAdd A B -> seq A,lhd+B,lhd (seqAdd A,ltl B,ltl)


words S -> split \Space S
lines S -> split \Newline S
flines Name -> fget Name | split \Newline,asInt | map utf8

// maps values in sorted list
bmap f Xs -> map X~>[X,0 X,1,f] Xs

cnt Xs -> I:~1 map [!I+1 ?] Xs
zip A B -> map [? ??] A B

m:lpop L -> do &R:(lhd $L) (ltl !$L) &R


GParsers -> []
setSizeof Name Size -> GParsers.(Name) =: Size
getParserInputSize Name -> GParsers.(Name)

sizeof T:typename? -> T,getParserInputSize
      ;#(`++` $L $T) -> S:T,sizeof S && S,int? && L,int? |> S*L :: #(`*` $S $L)


// stuff for `++` matcher (we cant use `++` before these funs get defined)
_matchArrayFNS N S F Xs
 -> Xs,len%S == 0 && Xs,len/S == N |> (all y? Xs:(grp S Xs | map ?==F) |> [Xs])

_matchArrayFS S F Xs
 -> Xs,len%S == 0 |> (all y? Xs:(grp S Xs | map ?==F) |> [Xs])

_matchArrayFN N f Xs -> with N [] Xs
  {N Ys [Y:@f @Xs] -> r N-1 [@Ys Y] Xs
  ;0 Ys []         -> [Ys]}

_matchArrayF f Xs -> with [] Xs
  {Ys [Y:@f @Xs] -> r [@Ys Y] Xs
  ;Ys []         -> [Ys]}

_matchDups Xs -> Xs,len==0 || all Xs,lhd Xs,ltl |> [Xs]

parseInt [Xs:_++!digit?] -> asBase 10 Xs


// FIXME: allow byte order choice
m:defBasicType Sz ->
  $@(do SS:[Sz++(gensym)]
        #(do (setSizeof '$"s$Sz",asSym $Sz)
             (setSizeof '$"s$Sz",asSym $Sz)
             ($"s$Sz",asSym X ->
                V:($"u$Sz",asSym X)
                (and V $(1<<(Sz*8-1))) == 0
                |> V :: ~(and (inv $(Sz*8) V-1) $(1<<(Sz*8)-1)))
             ($"u$Sz",asSym [$@SS] ->
               $(map ['`<<` ? ??*8] SS [0..Sz-1] | fold ['`+` ? ??]))
             ($"as_s$Sz",asSym V ->
                X:(V<0 |> and (inv $(Sz*8) ~V-1) $(1<<(Sz*8)-1) :: V)
                $([0..Sz-1] | map N~>#(`%` X>>$(N*8) 256) | #[$@?]))
             ($"as_u$Sz",asSym V ->  $"as_s$Sz",asSym V)
             ))

defBasicType 1
defBasicType 2
defBasicType 4
defBasicType 8

prnU1 X -> "$(X|asHex|fmt  ~2 0)"
prnU2 X -> "$(X|asHex|fmt  ~4 0)"
prnU4 X -> "$(X|asHex|fmt  ~8 0)"
prnU8 X -> "$(X|asHex|fmt ~16 0)"


// read|eval|say|loop

Name: init (with code tags) 2012-11-10 17:20

m:with @Xs X -> $X $@Xs

_ X -> y
_? X -> ptrEq _ X

error X -> cl error (`sq-to-str` (prn X))
abort -> cl abort
tag X -> cl `get-type` X

bound? X -> cl boundp X

prn X -> cl prn X

pp X -> say X p=n

load X -> cl `$load` X
dasm X -> do (cl disassemble X) n

_rng A B -> cl `as-list` (`gen-rng` A B)
_dup N X -> cl dup N X

immediate? X -> cl immediate? X
m:_replica N X -> $@X,{immediate? -> #(_dup $N $X)
                      ;_          -> #(_dup $N n | map &A~>$X)}

// not beginning with, like ^ in regexps (use with pattern matcher)
m:nb X -> fn (&L) (lhd &L) != $X

symbolDowncase X -> X|asStr|downcase|asSym
symbolUpcase X -> X|asStr|upcase|asSym
sconc a b -> conc a b | asStr

rev [X@Xs] -> [@Xs,rev X]
safeMap f Xs -> Xs|[X@Xs]~>[X,f @Xs,r]
mapc f Xs -> map f Xs | fold conc // mappend from CL
keep P Xs -> fold {A B -> B==P |> [@A B] :: A} [[]@Xs]
strip P Xs -> fold {A B -> B!=P |> [@A B] :: A} [[]@Xs]
filter f Xs -> fold {A B -> f B |> [@A It] :: A} [[]@Xs]

subst Src Dst L -> map {(Src)->Dst; X->X} L

m:if @Body -> $@Body,{#($@T Then $@A Else $@B) -> #(_if $T $A $B)
                     ;#($@T Then $@A         ) -> #(_if $T $A n )
                     ;#($T       $A       $B ) -> #(_if $T $A $B)
                     ;#($T       $A          ) -> #(_if $T $A n )
                     ;Default                  -> error "if: syntax error"}


//tableJoin A B by=?,0 ->
//  fold {R X->(T:X,by keep ?,by==T B) | map [X ?] | conc R} [[]@A]

// Take initial elements for which `p` is true
takeInit P [@Xs @(nb P)] -> Xs

//insert `sep` between elements of a list `l`
//Usage: infix '+ '(a b c)
//Example: map ?,asInt,asHex "LISP" | infix " " | fold sconc
//TODO: add flag to create "'(+ A (+ B C))" like lists
infix Sep L -> fold {Xs X -> [@Xs Sep X]} [(take 1 L) @L,ltl]

// break list into piles of `n` items
grp N [@Xs] -> [(take N Xs) @(drop N Xs | grp N)]

/* Example1: unfold {1->n; X->[X-1 1]} 7
   Example2: qsort Xs -> Xs |
               unfold {[X]    -> X
                      ;[X@Xs] -> [(keep ?<X Xs) [X] (keep ?>X Xs)]} */
unfold f O -> f O | {[]->[O]; Xs -> mapc (unfold f ?) Xs}

// counts the number of ones in the bit representation of an integer
// use it to calculate size of bitmasks
bitCount X -> cl logcount X

// bit-length of an integer:  2^(log 2 ? | ceil)
bitLen X -> cl `integer-length` X

// inverts `bits` bits in `value` (bitwise not)
inv Bits Value -> cl logxor (ash 1 Bits)-1 Value

exp X -> cl exp X
log Base X -> cl log X Base
sin X -> cl sin X
cos X -> cl cos X
tan X -> cl tan X
asin X -> cl asin X
acos X -> cl acos X
atan X -> cl atan X

sum S -> fold `+` [0@S]
prod S -> fold `*` [1@S]
avg Xs -> Xs,sum/Xs,len
abs X -> num? X |> cl abs X :: sqrt X*X
norm V -> V/V,abs
transpose V -> N:0 [V,lhd,len++(map (do I:N !N+1 ?,I) V)]

rand X:y? -> num? X |> cl random X :: cl ind X (random (len X))
randRng S E -> (abs E+1-S),rand+S

// convert list to set (an ordered list that doesn't have duplicated elements)
uniq L -> L,sort,{[@A X X @B]->[@A @[X @B],r]; E->E}

// set operations
union A B -> A,{[X@Xs]-> fnd X B |>    Xs,r  :: [x@Xs,r]; _->B}
isect A B -> A,{[X@Xs]-> fnd X B |> [X@Xs,r] ::    Xs,r}
diff A B -> union (strip (fnd ? B) A) (strip (fnd ? A) B)
subsets [X@Xs] -> R:(subsets Xs||[[]]) [@R @(map [X @?] R)]


m:ldb Pos Size Value -> with $Pos $Size $Value {P S V -> cl ldb (byte S P) V}

maximize p [M@Xs]
 -> Score:M,p fe {X -> (S:X,p) > Score |> do M=:X Score=:S} Xs
 -> M

minimize p [M@Xs]
 -> Score:M,p fe {X -> (S:X,p) < Score |> do M=:X Score=:S} Xs
 -> M

m:while Test @Expr -> {-> $Test |> do $expr (r)}
m:until Test @Expr -> while (n? $Test) $@Expr
m:loop Expr -> {:&r -> do $Expr (&r)}

// Usage: times i:10 say i
m:times Head @Expr ->
  $@(do C:Head,{#(`:` $C $N)->C; _->gensym}
        N:Head,{#(`:` $C $N)->N; X->X     }
        #(&E:$N 0,{:&R (&E); $C -> do $Expr (&R $C+1)}))

// for (I:0; I<6; !I+1) say I
m:for #($@V; $@C; $@I) @Body ->
          do $@V (cl progn (while (and $@(map ['`!` ?] C))
                             !$Body $@(map ['`!` ?] I)))
     ; X 'on Xs @Body -> fe {$X->$@Body} $Xs

// these will generate list of ascending/descending numbers
asc Start -> seq Start (asc Start+1)
dsc Start -> seq Start (dsc Start-1)

rep X -> 0,{N -> seq X,(I:(N<X,len) |> N::0) (r I+1)}

seqMap f L -> seq L,lhd,f (seqMap f L,ltl)
seqConc A B -> A |> seq A,lhd (seqConc A,ltl B) :: b
seqAdd A B -> seq A,lhd+B,lhd (seqAdd A,ltl B,ltl)


words S -> split \Space S
lines S -> split \Newline S
flines Name -> fget Name | split \Newline,asInt | map utf8

// maps values in sorted list
bmap f Xs -> map X~>[X,0 X,1,f] Xs

cnt Xs -> I:~1 map [!I+1 ?] Xs
zip A B -> map [? ??] A B

m:lpop L -> do &R:(lhd $L) (ltl !$L) &R


GParsers -> []
setSizeof Name Size -> GParsers.(Name) =: Size
getParserInputSize Name -> GParsers.(Name)

sizeof T:typename? -> T,getParserInputSize
      ;#(`++` $L $T) -> S:T,sizeof S && S,int? && L,int? |> S*L :: #(`*` $S $L)


// stuff for `++` matcher (we cant use `++` before these funs get defined)
_matchArrayFNS N S F Xs
 -> Xs,len%S == 0 && Xs,len/S == N |> (all y? Xs:(grp S Xs | map ?==F) |> [Xs])

_matchArrayFS S F Xs
 -> Xs,len%S == 0 |> (all y? Xs:(grp S Xs | map ?==F) |> [Xs])

_matchArrayFN N f Xs -> with N [] Xs
  {N Ys [Y:@f @Xs] -> r N-1 [@Ys Y] Xs
  ;0 Ys []         -> [Ys]}

_matchArrayF f Xs -> with [] Xs
  {Ys [Y:@f @Xs] -> r [@Ys Y] Xs
  ;Ys []         -> [Ys]}

_matchDups Xs -> Xs,len==0 || all Xs,lhd Xs,ltl |> [Xs]

parseInt [Xs:_++!digit?] -> asBase 10 Xs


// FIXME: allow byte order choice
m:defBasicType Sz ->
  $@(do SS:[Sz++(gensym)]
        #(do (setSizeof '$"s$Sz",asSym $Sz)
             (setSizeof '$"s$Sz",asSym $Sz)
             ($"s$Sz",asSym X ->
                V:($"u$Sz",asSym X)
                (and V $(1<<(Sz*8-1))) == 0
                |> V :: ~(and (inv $(Sz*8) V-1) $(1<<(Sz*8)-1)))
             ($"u$Sz",asSym [$@SS] ->
               $(map ['`<<` ? ??*8] SS [0..Sz-1] | fold ['`+` ? ??]))
             ($"as_s$Sz",asSym V ->
                X:(V<0 |> and (inv $(Sz*8) ~V-1) $(1<<(Sz*8)-1) :: V)
                $([0..Sz-1] | map N~>#(`%` X>>$(N*8) 256) | #[$@?]))
             ($"as_u$Sz",asSym V ->  $"as_s$Sz",asSym V)
             ))

defBasicType 1
defBasicType 2
defBasicType 4
defBasicType 8

prnU1 X -> "$(X|asHex|fmt  ~2 0)"
prnU2 X -> "$(X|asHex|fmt  ~4 0)"
prnU4 X -> "$(X|asHex|fmt  ~8 0)"
prnU8 X -> "$(X|asHex|fmt ~16 0)"


// read|eval|say|loop

Name: Anonymous 2012-11-10 17:21

>>1
here's an old Symta version
Everybody knows, it was posted here.

I haven't tried it out yet
Nobody ever did.

I'm too lazy to install the required emacs packages
Everybody is.

Maybe someone should look into it?
Nobody will.

Name: symta.asd 2012-11-10 17:23

(defpackage :symta-system
  (:use :cl :asdf))

(in-package :symta-system)

(eval-when (:load-toplevel :execute)
  (asdf:operate 'asdf:load-op '#:cffi-grovel))

(defsystem :symta
  :name "symta"
  :description "Symta Lisp-system"
  :license "MIT"
  :author "snv"
  :version "0.1"
  :depends-on (:cffi :babel :trivial-shell :trivial-garbage
               :sdl :sdl-image :sdl-mixer)
  :components
  ((:module "symta" :serial t
    :components
      ((:file "host")       ; hosting system specifc routines
       (:file "util")       ; implementation helpers
       (cffi-grovel:grovel-file "png-grovel")
       (:file "gfx")        ; graphics routines
       ;;(:file "audio")      ; audio routines
       (:file "root")       ; root definitions
       (:file "tree")       ; list base structure
       (:file "list")       ; list advance structures
       (:file "pkg")        ; package system
       (:file "io-root")    ; io-root definitions
       (:file "io-printer") ; list pretty printing routines
       (:file "io-reader")  ; list input routines
       (:file "eval")       ; list evaluation macros
       (:file "matcher")    ; list matching macros
       (:file "defs")       ; built-in functions
       (:file "init")       ; rest of base library and environment
       )))
  )

Name: Anonymous 2012-11-10 17:29


FUCKING
FINALLY

hey symta guy
stop ignoring every single fucking reply you get and start answering our questions fagshit

Name: Anonymous 2012-11-10 17:39

significant whitespace
UNA PALABRA:
THE FORCED MINIFICATION OF THE CODE
LANGUAGE OVER

Name: Anonymous 2012-11-10 18:35

im also too lazy to try it out, but wanna know if it's real.

Name: Anonymous 2012-11-10 22:47

I wanted to try it out but then it wouldn't work on my gold plated Apple computer so I gave up!

Name: Anonymous 2012-11-11 1:54

Dubs documentation
Read it.

Name: Anonymous 2012-11-11 2:04

>>11
Consider them read.

Name: Anonymous 2012-11-11 6:53

Have you tried Symta, today?

Name: Anonymous 2012-11-20 20:43

أزاح

Name: Anonymous 2012-11-20 21:17

Have you documented your toy language today?

Name: Anonymous 2012-11-20 21:27

>>15
What's wrong with toy languages? It certainly is more fun than WOOOing in a party full of neurotypicals.

Name: Anonymous 2012-11-20 21:33

>>16
Autism is not a ``thing'' on /prog/. It never was and it'll never be, no matter how many "so ronery :(" and "social anxiety [part II]" threads people create, believing mistakenly that this is /jp/.

Also, paedophilia isn't autism.

And I bet you are self-diagnosed

Name: Anonymous 2012-11-20 21:37

>>17
Actual autists don't feel loneliness or have social anxiety, as far as I know.

I'm not an autist, but I was diagnosed with schizoid personality disorder a couple of years ago.

Name: >>18 2012-11-20 21:38

>>17
I forgot to say I'm not a pedophile either. Well, it's true that I like my trains and trucks young and well lubricated.

Name: Anonymous 2012-11-20 21:57

>>18,19
Oh, yeah, silly me, I thought it was the self-proclaimed autist from the other day, sorry.

I would go on about my disorders here, but let's keep this a Symta thread

Name: Anonymous 2012-11-20 22:40

HEY SYMTA GUY

WOULD YOU MIND PUTTING THIS ON QUICKLISP

OR SOMETHING

Name: Anonymous 2012-11-20 23:18

>>18
+1 Insightful

Name: Anonymous 2012-11-20 23:47

>>21
+1 in Symta

Name: Anonymous 2012-11-21 0:07

There's a quicklisp for you and a quicklisp for me.
 The trumpet of programming newws.

Name: Anonymous 2012-11-21 0:11

i fucking hate quicklisp, shit breaks all the time, and that's after getting it to work, which is rare as fuck.

gdi

Name: Anonymous 2012-11-21 2:53

I stole at least 10 of his ideas for my shit toy language.

Name: Anonymous 2012-11-21 2:53

I stole at least 10 of his ideas for my shit toy language.

Name: Anonymous 2012-11-21 5:04

>>2
It is too old and rotten. Throw it away.

Name: Anonymous 2012-11-21 5:06

>>26>>27
He himself has stolen ideas from http://en.wikipedia.org/wiki/Refal

Name: Anonymous 2012-11-21 5:07

It looks as horrible as Haskell. I couldn't possibly learn this.

Name: Anonymous 2012-11-21 5:16

>>30
Newer version became more readable.


//Before:
fib N -> fold {[a b] _->[b a+b]} [[0 1] 1..N] | ?,0

//Now:
fib N = f [0 1] <[A B] _=[B A+B]> N,rng | ?,0

Name: Anonymous 2012-11-21 5:21

>>31
It still looks like Haskell and Perl's love child.

Name: Anonymous 2012-11-21 5:25

Name: Anonymous 2012-11-21 5:30

>>31
When the hell did a new version come out?

Name: Anonymous 2012-11-21 5:43

>>34
Unsure. I started Symta for my own amusement. Never designed anything for external consumption. Although I'll probably publish my png/gif decoding library, so you wont need C/C++ bindings to libpng.

I also have other misc projects, like http://www.old-games.ru/forum/showthread.php?t=53707

Name: Anonymous 2012-11-21 5:53

>>35
Say, you might as well know that your SDL and PNG dependencies are broken on OS X except under very specific setups. For example, your code looks for "libSDL_image" as a framework, whereas it's distributed as just "SDL_image." Also, I had to change the DYLD_LIBRARY_PATH so it could find libpng in /usr/X11. Seems to work okay though.

Do you have more thorough explanations of the different syntactic features?

Name: Anonymous 2012-11-21 5:55

>>35
There are probably lots of gems in your mess. The problem is that nobody has the kind of time it takes to dig them. Try to write some nice documentation and you will get 5 friendly readers from here.

Name: Anonymous 2012-11-21 5:59

>>35
Holy fucking shit, Symta's Ahmed replied.

Holy, fucking, shit.

Name: Anonymous 2012-11-21 6:18

ARE YOU STOP BULLY AHMED PIG SCHLOMO DOG MONKEY???

Name: Anonymous 2012-11-21 7:23

I guess this was meant to be posted here (not the author)

Here are (my) PNG routines, part of greater framework...

(defun png-load (s)
  (setf s (png-parse s))
  (let* ((g nil)
         (c 0)
         (IHDR (gethash "IHDR" s))
         (IDAT (gethash "IDAT" s))
         (PLTE (gethash "PLTE" s))
         (tRNS (gethash "tRNS" s)))
    (unless IHDR (gfx-load-error "Missing IHDR"))
    (unless IDAT (gfx-load-error "Missing IDAT"))
    (deser IHDR ((width     msb 4)
                 (height    msb 4)
                 (depth     1) ; depth of color channel in bits: 1 2 4 8 16
                 (type      1)
                 (enc       1)
                 (filter    1)
                 (interlace 1))
      (unless (= enc 0) (gfx-load-error "Unsupported encoding (~a)" enc))
      (unless (= filter 0) (gfx-load-error "Unsupported filter method (~a)" filter))

      (setf c (case type
                (0 1) ; grayscale
                (2 3) ; truecolor
                (3 1) ; indexed
                (4 4) ; grayscale with alpha
                (6 4) ; truecolor with alpha
                (otherwise (gfx-load-error "Invalid color type (~d)" type))))

      (case depth
        ((1 2 4) (when (/= c 1)
                   (gfx-load-error "Invalid color type (~a) for depth ~a" type depth)))
        (8)
        (otherwise (gfx-load-error "Unsupported channel-depth (~a)" depth)))

      (setf g (gfx width height :c c))
      (png-defilter g (zlib:unpack IDAT) depth)
      (case interlace
        (0 ) ; no interlace
        (1 (gfx-load-error "Interlaced PNGs are not supported")) ;(png-deinterlace-adam7 g))
        (otherwise (gfx-load-error "Invalid interlace type (~d)" interlace)))
      (when (= c 1)
        (let ((m (if PLTE
                     (u1-u4 3 PLTE)
                     (sc u4 (loop as i below 256 collect (rgb i i i))))))
          (when tRNS (times i (length tRNS)
                       (w/rgb (r g b) (aref m i)
                         (setf (aref m i) (rgb r g b (- #xFF (aref tRNS i)))))))
          (setf (gfx-m g) m)))
      g)))


(defun png-make (g)
  (bind-struct gfx g (w h c d m)
    (let* ((o (%new))
           (d  (cond ((= c 4) (colors-to-bytes (r g b a) (r g b (u- #xFF a)) d))
                     ((= c 3) (colors-to-bytes (r g b) (r g b) d))
                     (t (u4-u1 1 d)))))
      (ser o (magic arr 1 +png-header+))
      (png-chunk o "IHDR"
        (ser t
          (width  msb 4 w)
          (height msb 4 h)
          (depth     1 8)
          (type 1 (case c
                    (1 3) ; indexed
                    (3 2) ; truecolor
                    (4 6) ; truecolor with alpha
                    (otherwise (error "png-create: cant save this image type"))
                    ))
          (enc       1 0) ; compression: 0=zlib
          (filter    1 0) ; pre-compression-filter: 0=default
          (interlace 1 0)))
      (when (= c 1)
        (png-chunk o "PLTE" (u4-u1 3 m))
        (let ((tRNS (vec 256 u1))
              (emit nil))
          (times i 256
            (w/rgb (_ _ _ a) (aref m i)
              (setf (aref tRNS i) (u- #xFF a))
              (when (/= a 0) (setf emit t))))
          (when emit (png-chunk o "tRNS" tRNS))))
      (png-chunk o "IDAT" (zlib:pack (png-filter w h c d)))
      (png-chunk o "IEND" #())
      (%crop o)
      )))

Name: Anonymous 2012-11-21 10:10

>>40
Thank you, sir.

Name: Anonymous 2012-11-21 10:26

Why was the name chosen after that "Xynta" meme? Just "because"?

Name: Anonymous 2012-11-21 16:47

where else do you post, symta author? with what nicks?

Name: Anonymous 2012-11-21 17:01

symta author are you the same as the ``subjective idealist''?
is it true you are unemployed and live with your mom?

Name: Anonymous 2012-11-21 17:11

Is it true that Ahmed was killed in a precision bombing?

Name: Anonymous 2012-11-21 18:45

>>45
You better hope not.

Name: Anonymous 2012-11-21 23:13

JEWS did Ahmed, never forget.

Name: Anonymous 2012-11-22 1:51

bump for symta

Name: Anonymous 2012-11-22 6:45

SYMTA MY ANUS

Name: Anonymous 2012-11-22 9:38

>>49

I see what you did there.

sinta(probably same pronunciation) is portuguese for "feel"

Name: Anonymous 2012-11-22 10:04

>>50
Stress in ``Symta'' is placed on the last vowel because it is derived from the word ``symbolic'' and the Russian word хуита [hui'ta].

Name: Anonymous 2012-11-22 11:33

>>51
Damn it, Ahmed.

Name: Anonymous 2012-11-22 11:40

>>52
The symta [sym-TAH] guy is Russian, and Ahmed is not a Russian name.

Name: Anonymous 2012-11-22 12:23

>>44
is it true you are unemployed and live with your mom?
like most anons here

Name: Anonymous 2012-11-22 12:37

>>53
Russia is muslims.

Name: Anonymous 2012-11-22 12:54

>>53
You can't actually believe that Ahmed is Ahmed's name.

Name: Anonymous 2012-11-22 12:59

>>56
No. His actual name is Goldman.

Name: Anonymous 2012-11-22 13:36

>>53,55-57
Russia is Jews. Muslims are Jews.

Name: Anonymous 2012-11-22 14:28

>>58
And then everybody was a Jew.

Name: Anonymous 2012-11-22 14:35

I love Jews.

Name: Anonymous 2012-11-22 15:33

>>59
I must fight the jews! — cried Ahmed.
The radio cracked:
— No, Ahmed, you are the jews.
And then Ahmed was a Goldman

Name: Anonymous 2012-11-22 20:58

Noooo, let the Goldman alone.
She'll probably be my PhD advisor.

Name: Anonymous 2012-11-22 23:04

>>44
symta author are you the same as the ``subjective idealist''?
what is wrong with subjective idealism?

Name: Anonymous 2012-11-22 23:09

The homomorphism which maps my sperm to your mother's face is surjective.

Name: Anonymous 2012-11-22 23:12

>>63
it was just a question fucktard.

Name: Anonymous 2012-11-23 4:18

>>61
LOL XDDD EGIN WING RO

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