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

Pages: 1-

Hail to The King, Baby!

Name: Anonymous 2013-04-19 13:24

Holy cudders! Symta has came to Lisp. With just a few macros we turn your SBCL into a full featured Symta-grade enterprise system! Forget FIOC and Haskell! Try SIOC - Symta Indentation of Code now!

SYMTA> (
! say "Shalom, Jews!"
! i = 0
! n = 5
! while < i n
! ! say "sqrt of {i} is {sqrt i}"
! ! format t "square of {i} is {* i i}"
! ! incf i
! say "Happy Holocaust!"
)
Shalom, Jews!
sqrt of 0 is 0.0
square of 0 is 0sqrt of 1 is 1.0
square of 1 is 1sqrt of 2 is 1.4142135
square of 2 is 4sqrt of 3 is 1.7320508
square of 3 is 9sqrt of 4 is 2.0
square of 4 is 16Happy Holocaust!
NIL

SYMTA> (def f n ! if plusp n
                ! ! * n (f (- n 1))
                ! ! 1)
F
SYMTA> (f 10)
3628800
SYMTA>



Teh macros!

(defun say (&rest xs)
  (format t "~a~%"
    (with-output-to-string (o)
      (while xs
        (format o "~a" (pop xs))
        (when xs (format o " "))))))

;; LIOC = lisp indentation of code
(defun lioc (s xs)
  (let* ((p (or (position s xs)
                (return-from lioc
                  (if (and (consp xs)
                           (= (length xs) 1))
                      (cons 'progn xs)
                      xs))))
         (pref (subseq xs 0 p))
         (xs (subseq xs p (length xs)))
         (zs nil)
         )
    (while xs
      (pop xs)
      (let ((ys nil))
        (while (eql (car xs) s)
          (push (pop xs) ys))
        (while (and xs (not (eql (car xs) s)))
          (push (pop xs) ys))
        (let ((ys (nreverse ys)))
          (if (eql (car ys) s)
              (push (append (pop zs) ys) zs)
              (push ys zs)))))
    (setf xs `(lioc-prog ,@(mapcar (lambda (xs) (lioc s xs))
                                   (nreverse zs))))
    (when pref
      (case (car pref)
        (if (pop pref) (push 'lioc-if pref))
        (when (pop pref) (push 'lioc-when pref))
        (unless (pop pref) (push 'lioc-unless pref))
        (while (pop pref) (push 'lioc-while pref))
        (till (pop pref) (push 'lioc-till pref))
        )
      (setf xs `(,@pref ,xs))
      )
    xs))

(defmacro lioc-prog (&body xs)
  (labels ((shaded (xs)
             (when xs
               (let* ((x (pop xs))
                      (xs (shaded xs)))
                 (if (eql (second x) '=)
                     (let ((as (first x))
                           (body `(! ,@(cddr x))))
                       (if (consp as)
                           `((labels ((,(car as) ,(cdr as) ,body))
                               ,@xs))
                           `((let ((,as ,body))
                               ,@xs))))
                     `(,x ,@xs))))))
    `(progn ,@(shaded xs))))

(defmacro lioc-if (&body xs)
  (let ((head (butlast xs))
        (xs (car (last xs))))
    (unless (eql (car xs) 'lioc-prog)
      (error "lioc-if: invalid body"))
    `(if ,head ,@(cdr xs))))

(defmacro lioc-when (&body xs) `(when ,(butlast xs) ,(car (last xs))))
(defmacro lioc-unless (&body xs) `(when (not ,(butlast xs)) ,(car (last xs))))
(defmacro lioc-while (&body xs) `(while ,(butlast xs) ,(car (last xs))))
(defmacro lioc-till (&body xs) `(while (not ,(butlast xs)) ,(car (last xs))))

(defun lioc-expand-string (x)
  (let ((s (position #\{ x)))
    (unless s (return-from lioc-expand-string x))
    (let ((e (position #\} x)))
      (unless e (error "unterminated {"))
      `(concatenate 'string
         ,(subseq x 0 s)
         (format nil "~a" (! ,@(read-from-string (format nil "(~a)" (subseq x (+ s 1) e)))))
         ,(lioc-expand-string (subseq x (+ e 1) (length x)))))))

(defun lioc-expand-strings (x)
  (cond ((consp x) (mapcar #'lioc-expand-strings x))
        ((stringp x) (lioc-expand-string x))
        (t x)))

(defmacro ! (&body xs) (lioc '! (cons '! (lioc-expand-strings xs))))

(defmacro def (&body xs)
  (let ((p (position '! xs)))
    (unless p (error "def has no ! body"))
    `(defun ,(car xs) ,(cdr (subseq xs 0 p))
       ,(subseq xs p (length xs)))))

Name: Anonymous 2013-04-19 14:47

Conspirologists blame JEWS.
SWEJ blame nspirologists

Name: Anonymous 2013-04-19 15:30

Now with C/C++ like type declarations...

SYMTA> (
! int i = 1230000000000000000000000000000000000
! type-of i
)

; in: ! INT
;     (LET ((SYMTA::I
;            (SYMTA::!
;              1230000000000000000000000000000000000)))
;       (DECLARE (FIXNUM SYMTA::I))
;       (TYPE-OF SYMTA::I))
;
; caught WARNING:
;   Constant
;     1230000000000000000000000000000000000 conflicts with its asserted type
;     FIXNUM.
;   See also:
;     The SBCL Manual, Node "Handling of Types"
;
; compilation unit finished
;   caught 1 WARNING condition

Name: Anonymous 2013-04-19 16:41

>>3
C/C++
Suddenly, somewhere a Lambda is awoken, he is jostled and tense. THE STANDARD IS IN DANGER (OF NOT BEING READ)!

Name: Anonymous 2013-04-19 16:46

Symta's design is fucktarded.

Why are exclamation marks needed in between every statement. And there are too many operators. Any language that doesn't allow ascii files for source code isn't worth using.

Name: Anonymous 2013-04-19 16:46

>>4
But C++11 has lambdas!
YA AINT RED DA FUKKIN STANDARD!

Name: Anonymous 2013-04-19 16:57

>>5
Why are exclamation marks needed in between every statement.
- uniform look: no pointless agrument about coding style, where to put '{' or tab-vs-spaces
- '!' undelines the code structure
- '{' and '}' don't interfere with editing and don't consume sceen space
- no need for () in function calss and conditionals
- easies editing, indenting, highlight and navigation: now you can just mouse-click appropriate ! and move/delete/hide whole block.
- no need to think about closing { or putting ;
- gone errors like "if (x); {"
- independent of whitespace, so you can safely transefer code through IRC, email or webpost; while Python or Haskell get broken

Name: Anonymous 2013-04-19 17:06

Declaring trees became overly easy...

UnitTypes = tree
! human
! ! peasant = ..
! ! footman = ..
! orc
! ! peon = ...
! ! grunt = ...



No YAML crap required.

Name: Anonymous 2013-04-19 17:09

>>8

SYMTA> (
! UnitTypes = quote
! ! human
! ! ! peasant = dummy
! ! ! ! hit points = dummy
! ! ! ! strength = dummy
! ! ! footman = dummy
! ! orc
! ! ! peon = dummy
! ! ! grunt = dummy
! UnitTypes
)
(LIOC-PROG
  (HUMAN
   (LIOC-PROG
     (PEASANT = DUMMY
      (LIOC-PROG
        (HIT POINTS = DUMMY)
        (STRENGTH = DUMMY)))
     (FOOTMAN = DUMMY)))
  (ORC
   (LIOC-PROG
     (PEON = DUMMY)
     (GRUNT = DUMMY))))
SYMTA>

Name: Anonymous 2013-04-19 18:08

>>9
Dummy! It's not like I like you or anything!

Name: Anonymous 2013-04-19 18:18

What does quicksort looks like in Symta?

Name: Anonymous 2013-04-19 18:26

>>11

qsort [X@Xs] = [@qsort.(Xs keep < X) X @qsort.(Xs skip < X)]

Name: Anonymous 2013-04-19 18:30

>>11

fact 0 = 1
fact N = N*fact{N-1}

fact N = case N | 0 = 1
                | N = N*Me{N-1}

fact N = if N is 0 then 1 else N*fact{N-1}

fact N = | Fact: 1
         | while N > 0
         | | !Fact*N
         | | !N-1
         | Fact

map F Xs = case [] Xs | Ys [] = Ys
                      | Ys [X@Xs] = map [@Ys F{X}] Xs



cons CAR CDR | car = CAR
             | cdr = CDR

Name: Anonymous 2013-04-19 18:35

>>7
Rereading your code, symta is as bad as fioc. You are forcing identing through exclamation marks. Same shit, different brand. I expect more from you nikita. Now start over writing symta from the beginning. And this time use a non-jewish language underneath

Name: Anonymous 2013-04-19 18:40

>>14
Python's deficiency is that indentation is hidden, but Symta makes it visible. Only problem is that "! ! ! !" look too obese, but syntax highlighter can easily reduce it's contrast, making ! nicely blend with background.

Name: Anonymous 2013-04-19 18:40

>>12
Very similar to Erlang. I don't get the second and third `@' in @qsort.

Name: Anonymous 2013-04-19 18:44

>>15
Python's deficiency is that indentation is hidden
That's not python's deficiency. Python's deficiency is that the indentation is forced. That's why we call it the forced indentation of code. Your language is no better. It actually looks worse. Don't tell me that I have to get a special syntax highlighter specifically for your shitty language to let your stupid exclamation marks blend into the background better.

Until further notice, Symta shall be referred to as FIOC 2.0

Now rewrite Symta without a jewish language underneath

Name: Anonymous 2013-04-19 18:49

>>17
Python's deficiency is that the indentation is forced.
Forcing consistent coding style if a boon. The problem is that http://c2.com/cgi/wiki?SyntacticallySignificantWhitespaceConsideredHarmful

Your language is no better.
Symta doesn't really forces it, because ! is just a macro. You can still use (()))))))))).

Don't tell me that I have to get a special syntax highlighter specifically for your shitty language to let your stupid exclamation marks blend into the background better.
If you can't even configure your text editor, then you are a bad programmer.

Name: Anonymous 2013-04-19 18:53

Syntactically significant whitespace is fine. Just because it eliminates problems like if(expr); code;, doesn't mean shit.

So that snippet of code has a bug, big deal. Programmers deal with bugs and get better at them.

! is just a macro. You can still use (()))))))))).
So I get my choice of Shit A or Shit B?

No thanks.

Name: Anonymous 2013-04-19 19:22

>>19
So I get my choice of Shit A or Shit B?
Yes: Shit A = Python; Shit B = JavaScript

Name: Anonymous 2013-04-19 19:42

>>16
[@A B @C] is the same as `(,@A ,B ,@C) in Common Lisp.

Name: Anonymous 2013-04-19 19:45

Can you at least make a more Symta-like fork that doesn't have the macro names that rely pig disgusting english words, like the old Symta? And just keep the jewish one for yourself.

Name: Anonymous 2013-04-19 20:01

>>22
No. I still consider removing even infix notation, because it complicates reader and breaks indentation:

// prefix
* A
  (+ B C)
  D


// infix
A *
(B + C)
* D

// "readable "prefix
mul A
    (add B C)
    D

// "readable "infix
A mul
  (B add C)
mul D

Name: Anonymous 2013-04-21 10:41

Also plays nicely with HTML (http://cybertiggyr.com/lh/):

(
! html
! ! head title "I am titular"
! ! body
! ! ! h1 "Generating HTML with Lisp"
! ! ! p "This is a tutorial for new Lisp"
        " programmers, but not total"
        " beginners.  ..."
        ;; We can use Lisp to generate things
        ;; dynamically, like a numbered list of
        ;; colors.
        (apply #'ol
               (mapcar #'(lambda (color)
                           (li color))
                       '(red green yellow blue))))
)


macroexpands into:

(HTML (HEAD TITLE "I am titular")
 (BODY (H1 "Generating HTML with Lisp")
  (P "This is a tutorial for new Lisp" " programmers, but not total"
   " beginners.  ..."
   (APPLY #'OL
          (MAPCAR #'(LAMBDA (COLOR) (LI COLOR)) '(RED GREEN YELLOW BLUE))))))

Name: Anonymous 2013-04-21 17:08


(to /string
  ! case (/top-char)
  ! ! #\" (/next-char) (/read-string #\$ 0 nil #\")
  ! ! #\' (/next-char) (/read-string #\$ 0 nil #\')
  ! ! #\` (snd (/read-string nil 0 nil (/next-char)))
  ! ! otherwise :fail)

(to /list &key r-op
  ! opening = (/top-char)
  ! op = (or r-op
             (find-if (fn (x) (eq (char x 0) opening))
                      '("()" "[]" "<>"))
             (return-from /list (/string)))
  ! ending = aref op 1
  ! row = nil
  ! col = nil
  ! setf row /row
  ! setf col /col
  ! unless r-op
  ! ! /expect opening
  ! rec r xs nil
  ! ! try x (/expr) (! if eq (/top-char) ending
                     ! ! (/next-char)
                     ! ! error "{/src}:{row},{col}: unclosed `{opening}`"
                     ;;! (meta-set (ns-set nil "Src" (/location nil)) xs)
                     ! xs = coerce (nreverse xs) 'vector
                     ! unless string= op "()"
                     ! ! setf xs (vector op xs)
                     ! xs)
  ! ! ! r (cons x xs)
  )


(to /line
  ! r = (! rec r xs nil
         ! ! try x (/expr) (! if-bind it (/top-char) (/error "Unexpected `{it}`")
                            ! nreverse xs)
         ! ! ! push x xs
         ! ! ! (/skip-ws)
         ! ! ! if and (eq /last #\newline)
                      (not (eq (/top-char) #\=))
         ! ! ! ! nreverse xs
         ! ! ! ! r xs)
  ! coerce r 'vector)


(to hex-digit? x ! or (digit? x)
                      (find x "abcdefABCDEF"))

(to /num
  ! cond
  ! ! (digit? (/top-char))
  ! ! ! rec r i t
              ys nil
  ! ! ! ! y = (/top-char)
  ! ! ! ! cond
  ! ! ! ! ! (and (eql y #\.) i (digit? (second /in)))
  ! ! ! ! ! ! r nil (cons (/next-char) ys)
  ! ! ! ! ! (digit? y)
  ! ! ! ! ! ! r i (cons (/next-char) ys)
  ! ! ! ! ! t
  ! ! ! ! ! ! read-from-string (coerce (nreverse ys) 'string)
  ! ! (eq (/top-char) #\#)
  ! ! ! /expect #\#
  ! ! ! when eq (/top-char) #\{
  ! ! ! ! return-from /num (vector "#" (snd (/list)))
  ! ! ! when /sym-body? (/top-char)
  ! ! ! ! s = coerce (/take-prefix #'/sym-body?) 'string
  ! ! ! ! when hex-digit? (aref s 0)
  ! ! ! ! ! return-from /num (read-from-string (concatenate 'string "#x" s))
  ! ! ! ! when (string= s "yes") (return-from /num t)
  ! ! ! ! when (string= s "no") (return-from /num nil)
  ! ! ! ! /error "`#{s}` is unexpected"
  ! ! ! /error "`#{(/top-char)}` is unexpected"
  ! ! t :fail)

Name: Anonymous 2013-04-21 17:23

>>21
More like Pleb Lisp, amirite?

Name: Anonymous 2013-04-22 13:19

Nikita, you're going to get type 666 diabetes from all this jewish syntax sugar you're overdosing on.

Name: Anonymous 2013-04-22 15:34

>>27
Just a way to write SEXPs

! while <= i n
! ! setf factorial (* factorial i)
! ! incf i


That way you can sell Lisp to Python crowd.

Name: Anonymous 2013-04-22 20:02



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:09



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:14



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:19



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:24



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:28



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:34



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:39



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:45



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 20:49



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 21:03



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

Name: Anonymous 2013-04-22 21:09



Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop


Searching for legit Microsoft Product keys, Windows 8,7,Studio,Server etc.?

 Mail me at jeremiahgoldstein@hotmail.com

 25$ a pop

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