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

Pages: 1-4041-8081-

Replacing C/C++ with LISP.

Name: Anonymous 2013-08-01 2:32

Consider the following way to use Common Lisp in place of C/C++, without any custom reader macros:

(to main int:arg char:argv
  ! printf "Hello, World!"
  ! return 0
  )


I.e. packages take role of builtin types and structs, also containing definition for overloadable `+` and `-` and template generics, so a compiler could be implemented without much fuzz, using already present Common Lisp framework.

It would also look much clearer than standard C/C++:
int main(int argc, char **argv) {
  printf ("Hello, World!");
  return 0;
}

Name: Anonymous 2013-08-01 2:35

>>1
to main int:arg char:''argv
self fix.

the quotes would be usable for pointers and dereferencing, because low level code doesn't work with sexps.

Name: Anonymous 2013-08-01 2:41

Consider this:
http://is.gd/zd4I9p

Name: Anonymous 2013-08-01 2:54

>>1
bigloo has type signatures like that. I think defmethod style signatures are better, since you can write lisp style macros that expand to them.

Name: Anonymous 2013-08-01 2:59

>>4
defmethod style signatures are better, since you can write lisp style macros that expand to them.
typename:varname dont impede macros. Moreover, they provide strong typing with (intern varname "typename") being constructor, while symbol-package and symbol-string are accessors.

Name: Anonymous 2013-08-01 3:08

>>5
The power of lisp macros comes from every element of its syntax being parsable as a tree data structure. If this syntax sugar was allowed, how would macros expand to it, and would you be able to pass the variable:type form as arguments to macros that expanded to function definitions?

Name: >>6 2013-08-01 3:14

and more importantly, would macros be able to inspect the variable:type form using accessor methods?

Name: Anonymous 2013-08-01 3:18

And because compiler knows types, we can reuse function application for array indexing, so a[i][j] would be (a i j). '=' would be declaration and ':=' (pascal style) setf. Resulting code would be no less readable than the original C/C++ version:
(to 'char:basename 'char:name
  ! long:i = - (strlen name) 1
  ! while (and (!= (name i) #\/) (> i 0))
     dec i
  ! when (== i 0) return ""
  ! name i := 0
  ! return name
  )


char *basename( char *name ) {
   long i;

   for( i = strlen( name ) - 1; (name[ i ] != '/') && (i > 0); i-- );

   if( i == 0 )
      return "";
   else {
      name[ i ] = 0;
      return name;
   }
}

Name: Anonymous 2013-08-01 3:19

>>6>>7
by using symbol-name and symbol-package.

Name: Anonymous 2013-08-01 3:22

>>8
It would be also nice to add string constructor sugar, which would automagically expand "point = ([x],[y])" into `sprintf tmpbuf "point = (%d,%d)" x y`. It would save so many keystrokes!

Name: Anonymous 2013-08-01 3:59

hey nikita, you are so smart. would you like to lose your virginity to me? i'm a girl btw <3 :3

Name: Anonymous 2013-08-01 4:22

>>11
I'm not smart and I'm not gay.

Name: Anonymous 2013-08-01 4:27

>>12
you wont know until you try it ;)

Name: Anonymous 2013-08-01 5:17

>>12
have you ever masturbated with a finger up your ass? It feels glorious.

Name: Anonymous 2013-08-01 5:17

>>12
i'm not smart
Of course, you are an irrational nutter who hates Jews.

Name: Anonymous 2013-08-01 5:30

Of course, you are an irrational number who hates Roots.

Name: Anonymous 2013-08-01 5:36

>>14
>finger up your ass
disgusting, enjoy your finger full of poops

[spoiler]how can i use quotes [i]please!?[i][/spoiler]

Name: Anonymous 2013-08-01 5:38

>>17
feels very good, you should try it at least once.

Name: Anonymous 2013-08-01 5:41

>>18
maybe i will try some day with condom on my finger

Name: Anonymous 2013-08-01 6:32

>>19
the orgasm is much more intense. do it now, i recommend it.

Name: Anonymous 2013-08-01 6:49

>>17
You must reach satori first. You also need to be circumcized

Name: Anonymous 2013-08-01 6:51

>>21
You must reach satori first
i did

You also need to be circumcized
i am

Name: Anonymous 2013-08-01 6:56

check 'em

Name: Anonymous 2013-08-01 6:56

>>22
o.O

Name: Anonymous 2013-08-01 6:57

Jewified dicks have so little feeling you have to stick fingers up your ass.

Name: Anonymous 2013-08-01 7:13

>>25
I am not jew

Name: Anonymous 2013-08-01 7:45

>>7
typename:varname transparently solves major compiler micromanagement problem with well known tools, so that all type info would be available to user and READ would refuse to accept undefined types, while still allowing forward declarations.

Name: Anonymous 2013-08-01 8:02

Accessing struct fields could also be done with apply notation: (file buffer length) instead of file.buffer.length

Name: Anonymous 2013-08-01 9:23

ACCESS MY ANUS

Name: SuperGoy3015 2013-08-01 11:18

JEWS

Name: SuperGoy3015 2013-08-01 11:20

JEWS

Name: SuperGoy3015 2013-08-01 11:41

JEWS

Name: SuperGoy3015 2013-08-01 11:41

JEWS

Name: SuperGoy3015 2013-08-01 11:41

JEWS

Name: SuperGoy3015 2013-08-01 11:42

JEWS

Name: /prog/ police 2013-08-01 11:46

JEWS

Name: /prog/ police 2013-08-01 11:46

JEWS

Name: ANDRU 2013-08-01 11:52



    PENIS ARE HARD

Name: Anonymous 2013-08-01 15:03

My code doesnt compile!

  failed AVER: (NULL CURRENT)
This is probably a bug in SBCL itself. (Alternatively, SBCL
might have been corrupted by bad user code, e.g. by an undefined
Lisp operation like (FMAKUNBOUND 'COMPILE), or by stray pointers
from alien code or from unsafe Lisp code; or there might be a
bug in the OS or hardware that SBCL is running on.) If it seems
to be a bug in SBCL itself, the maintainers would like to know
about it. Bug reports are welcome on the SBCL mailing lists,
which you can find at <http://sbcl.sourceforge.net/>;.
   [Condition of type SB-INT:BUG]

Name: Anonymous 2013-08-01 15:34

>>39
That is some crazy bug. It fails on (match 123 ((= x (not (x ! oddp x))) (list 'hello x)))

but it works when I macroexapand it to:

(LET ((G996 123))
  (BLOCK G997
    (TAGBODY
      (LET ((X G996))
        (LET ((G999 G996))
          (BLOCK G1000
            (TAGBODY
              (LET ((X G999))
                (IF (ODDP X)
                    (RETURN-FROM G1000 (PROGN (GO G998)))
                    (GO G1002)))
             G1002
              (RETURN-FROM G1000
                (PROGN (RETURN-FROM G997 (PROGN (LIST 'HELLO X)))))
             G1001))))
     G998)))

Name: Anonymous 2013-08-01 15:38

>>40
And did your penis get hard when debugging that code?

Name: Anonymous 2013-08-01 15:51

>>41
I'm not a SBCL maintainer and dont have SBCL source code, so I wont debug it.

Name: Anonymous 2013-08-01 16:00

Replacing C with a shitty slower language that won't bring you any job
Why?

Name: Anonymous 2013-08-01 16:02

>>43
Quoting something that hasn't been said, like a true /g/tard.

Why?

Name: Anonymous 2013-08-01 16:02

Anyway, here is how my match compares to http://common-lisp.net/project/cl-match/doc/clmatch-api.htm

;; my (geared towards succinctness)
(defun flatten (x)
  (match x ((x . xs) (append (flatten x) (flatten xs)))
           ((x ! and x (atom x)) (list x))))


;; clmatch
(defun flatten (x)
  (match x ((type atom) (list x))
           ((list car) (flatten car)) ;only one element
           ((cons car cdr) (append (flatten car)
                                   (flatten cdr)))))



cl-match for some reason doesn't support NOT and requires declaring guards outside using defpattern, instead of calling them inline with (x ! guardp x)

Name: Anonymous 2013-08-01 22:41

>>43
Lisp:

(to compile-builtin xs ! match xs
  (("fn" args . body) (compile-fn args body))
  (("if" test then else) (compile-if test then else))
  (("quote" x) (compile-quote x))
  (("set" place value) (compile-set place value))
  (("goto" label) (compile-goto label))
  (other (bad "builtin {xs}")))


C/C++:

asm *compile_builtin(expr *xs) {
  expr *xs, *args, *body;
  if (is_string(expr_head(expr)) && string_equal(expr_head(expr), "fn")) {
    xs = expr_tail(expr);
    if (list_end(xs)) error("invalid fn form");
    args = expr_head(expr);
    body = expr_tail(expr);
    if (list_end(xs)) error("invalid fn form");
    return compile_fn(args, body);
  }
  ...
}

Name: Anonymous 2013-08-02 7:39


All hail the tetracyts!

   ▲   
  ▲ ▲  
 ▲ ▲ ▲ 
▲ ▲ ▲ ▲

Name: Anonymous 2013-08-02 11:06

how did you learn so much on your own, without going to school, nikita?

Name: Anonymous 2013-08-02 11:07

>>48
I have too much free time.

Name: Anonymous 2013-08-02 11:10

>>49
well that was fast! which books have you liked the most? give me a list at least somewhat complete of books you recommend.

Name: Anonymous 2013-08-02 11:59

>>50
Karl Marx - Capital
Niccolo Machiavelli - The Prince
George Berkeley - The Principles Of Human Knowledge
L. Ron Hubbard - Selected Works
H.S. Warren Jr. - Hacker's Delight
Comparison of LRU, ARC and others.pdf.7z
Composable Memory Transactions.pdf.7z
EWD595 - On-the-fly garbage collection.pdf.7z
Fast Multiprocessor Memory Allocation and Garbage Collection (HPL-2000-165).pdf.7z
Garbage Collection Bibliography.html
Incremental Collection of Mature Objects (Hudson, Moss - 1992).pdf.7z
Incremental Garbage Collection I.pdf.7z
Incremental Garbage Collection II.pdf.7z
Incremental Mature Garbage Collection (Grarup, Seligmann - 1993).ps.gz
M.C. Lowry - A New Approach to The Train Algorithm For Distributed Garbage Collection.pdf.7z
Memory Management Algorithms and Implementation in C C++(SOURCE CODE).rar
Memory Management Algorithms and Implementation in C C++.pdf.7z
Parallel Garbage Collection.ps
Region-Based Memory Management (ic97).pdf.7z
concurrent_gc.pdf.7z
Artificial Intelligence, A Modern Approach 2.pdf.7z
David Hume - An Enquiry Concerning Human Understanding.pdf
Image Parsing via Stochastic Scene Grammar.pdf
Inexact Graph Matching Using Estimation of Distribution Algorithms.pdf.7z
Laura Zager - graph-similiarity.pdf.7z
Machine Learning In Automated Text Categorization (Acm 2002).pdf.7z
Mit Press - Words Without Meaning.pdf.7z
Neural Networks - Methodology and Applications_G. Dreyfus (Springer 2005 509s).pdf.7z
PyramidPrinciple_1.zip.7z
Symbolic-vs-Connectionist.7z
bk-trees.txt.7z
chaining.txt.7z
color-names.jpg.7z
field-theory.jpg.7z
genetical-algorithms-helloworld.html.7z
image-classificator-NIPS2012_0534.pdf
pattern-matching.7z
phonetic-symbols.png.7z
self-similiarity.pdf.7z
shortest-path-algorithm.html.7z
spaun-supplimentary.pdf
spaun.pdf
spaun.zip
cifuentes93methodology.pdf.7z
cifuentes94decompilation.pdf.7z
cifuentes94reverse.pdf.7z
cifuentes95decompilation.pdf.7z
cifuentes95environment.pdf.7z
cifuentes96structuring.pdf.7z
cifuentes97interprocedural.pdf.7z
decompilation_thesis.ps.gz
Reconstructing Control Flow from Predicated Assembly Code (dkbd_scopes03).ps.gz
linkers and loaders.pdf

Name: Anonymous 2013-08-02 12:02

>>51
lol wut.

Name: Anonymous 2013-08-02 12:27

>>51
GC is shit, Nikita.

Name: Anonymous 2013-08-02 12:39

>>51
wtf.

Name: Anonymous 2013-08-02 12:44

>>51
very incomplete and shitty list.

where are these:

ANSI Common Lisp - Paul Graham.djvu
The Elements - Euclid.pdf
Juliette - Marquis de Sade.pdf

Name: Anonymous 2013-08-02 12:46

Common Lisp
Shalom!

Name: Anonymous 2013-08-02 12:48

laughing_nikita.jpg

Name: Anonymous 2013-08-02 12:51

>>57
LLLLLLEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELLLLLL

MUH IMAGES
MUH /G/ENTOO
MUH LE IMAGES IN TEXT FORM POST XDDDDDDDDDDDDDDDDDDDDDDDD

MY FACE WHEN LE /G/ENTOO IMAGE FACE
XDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

LE /G/ROSKI /G/ CULTURE OF LEEEEELS AND IMAGES X-DDDDDD

Name: Anonymous 2013-08-02 12:57

Daily reminder Nikita is a pedophile.

Name: Anonymous 2013-08-02 14:38

Which garbage collector is optimal for collecting the jews?

Name: Nikita !Ip2edo5TLk 2013-08-02 14:41

>>60
me.

Name: Anonymous 2013-08-02 14:43

Ip2edo

Name: nigger !qfRe8HP5L6 2013-08-02 14:43

x

Name: Anonymous 2013-08-02 16:19

Ahaha, I am dying. Ahahaha, King of ISRAEL:

King of Israel !Ip2edo5TLk Sat Dec 08 2012 21:27:45 No.20429145 Report
Quoted By: >>20429707 >>20429898 >>20440714 >>20445198
>>20417053

You have much to learn, young one.

Reference:http://archive.foolz.us/vg/thread/20339207/

Name: Anonymous 2013-08-02 16:22

I really begin to think you are a Jew. Are you Jewish Nikita?

King of Israel !Ip2edo5TLk Thu Dec 06 2012 20:43:58 No.20275325 Report
Quoted By: >>20276716
Shalom, loyal subjects.

http://archive.foolz.us/vg/thread/19967623/

Name: Anonymous 2013-08-02 16:27

>>64-65
What the fuck makes you think he's the real Nikita? Please go the fuck back to the ima/g/eboards with your stupid ``le tripcode humor''.

Name: Anonymous 2013-08-02 16:29

>>66

Because he has a obsession with jews and israel. Sometimes it just is that obvious.

Name: Anonymous 2013-08-02 16:32

>>66

yOU HAVE MUCH TO LEARN, YOUNG ONE XD

Name: Anonymous 2013-08-02 16:32

>>67
Since when is Nikita the only one with an obsession with Jews and Israel?

Isn't /g/ a better place for braindead retards like you?

Name: Anonymous 2013-08-02 16:49

>>69

yOU HAVE MUCH TO LEARN, YOUNG ONE XD

Name: Anonymous 2013-08-02 16:49

>>69

Hi Delicate Flower!11001010!!!)0010!

Name: Anonymous 2013-08-02 17:03

>>71
Nikita would say "Shalom, hymie!" instead of "Nikita isn't the only suicide raghead obsessed with Jews".

Name: Anonymous 2013-08-02 17:12

>>72
That sounds reasonable. And it happened before, where someone had a much more clever tripcode N1KiTAada4 or something.

Name: Anonymous 2013-08-02 17:14

>>72

I think we all owe Nikita an apology. Especially lelcunt, because he is retard.

Name: Anonymous 2013-08-02 17:24

>>74
Why the fuck does lelcunt owe Nikita anything? I don't think Nikita even knows lelcunt exists, and it's not like Nikita is acting like a /g/tard.

Name: Anonymous 2013-08-02 18:00

>>75
>implying lelcunt is not a /g/tard
LEL.jpg

Name: Nikiketa !Ip2edo5TLk 2013-08-03 2:06

Shalom, my loyal subjects!

Name: Anonymous 2013-08-03 2:13

>>73
That is because Nikita doesnt use tripcode and doesnt sage.

Name: Nikita !Ip2edo5TLk 2013-08-03 2:18

guys guys i was just joking. of course i am not nikita, and the tripcode i used was shalom!.

Name: Anonymous 2013-08-03 2:18

>>79
also, i am not the guy who had posted in that other board with the same tripcode, that was merely a coincidence.

Name: Ariel Shalom 2013-08-03 22:10

>>79
shalom!

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