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

Pages: 1-4041-

Monadic cond in LISP

Name: Anonymous 2011-02-08 17:34

I'll now post code written with some obscure macros whose implementation will never be released.


(define-macro mcond
  #:keyword (else =>)
  (macro-case
   (() #f)
   (((t) (e . r) ...) (>> failure-m t (mcond (e . r) ...)))
   (((else . t)) (begin . t))
   (((p => f) (e . r) ...) (>> failure-m (>>= maybe-m p f) (mcond (e . r) ...)))
   (((p . t) (e . r) ...) (>> failure-m (>> maybe-m p (begin . t)) (~ (e . r) ...)))))

Name: Anonymous 2011-02-08 17:38

>>1
obscure macros whose implementation will never be released.
Are you Patrick Collision?

Name: Anonymous 2011-02-08 17:46

>>2
moar like Patrick Autism

Name: VIPPER 2011-02-08 17:54

>>2
His name is ``the "fucking" ginger''.

Name: Anonymous 2011-02-08 18:55

>>1
Looks like shit. No wonder Haskell loses even to Ruby.

Name: Anonymous 2011-02-08 19:07

>>5
Because at least Ruby is alive.

Name: Anonymous 2011-02-08 21:16

>>6
AT LEAST RUBY IS MY ANUS!

Name: Anonymous 2011-02-09 14:55

BITE MY PENIS

Name: Anonymous 2011-02-09 16:45

>>2
He's probably that ``in LISP'' bastard. I would never post partial code snippets without providing a full implementation as posting such code is meaningless - code must be both for humans to read and computers to interpret, if one of those cannot be done, the code is more or less meaningless.

Name: Anonymous 2011-02-09 16:54

>>10
Sorry, but I havent found SBCL hosting yet. Besides, implementation without corresponding documentation would be of no use.

Name: Anonymous 2011-02-09 16:58

And for what purpose do you need code anyway? Most people here already hate this DSL.

Name: Anonymous 2011-02-09 16:59

>>11
Why do you need SBCL hosting? I've got Emacs+SLIME+Paredit+... and SBCL/ClozureCL/ECL/CLISP/LispWorks/AllegroCL/CormanCL installed locally and could easily test any of your code provided it works at all, unless you don't want others to see your implementation for whatever reason(you want to sell it, or you're ashamed of the code or something)

Name: Anonymous 2011-02-09 17:03

>>13
No real reason except to make sense of whenever you post code written in it.

Name: Anonymous 2011-02-09 17:03

>>14
I'm ashamed of using PHP for hosting and I dont want to betray my ideals.

Name: Anonymous 2011-02-09 17:04

>>15
As if you really care, poor nyasha.

Name: Anonymous 2011-02-09 17:05

>>16
This is the stupidest reason ever. You're already POSTING in a board written in PHP. If you use the WWW at all, a very large number of sites are coded in it. It doesn't matter to me if I like PHP or not (I don't), however what is on the server-side does not concern me most of the time as the server runs the code, not my computer.

Name: Anonymous 2011-02-09 17:13

>>18
If you use the WWW at all, a very large number of sites are coded in it.
I see this as a problem. You just arent free to choose language for web development. If you want to make anonymous imageboard in Lisp, you will have troubles finding hosting.

Name: Anonymous 2011-02-09 17:19

>>20
Just get a dedicated server, you can probably get one for 25-50$ a month, and much cheaper if you get a VPS. You'll have a lot more freedom than you'll ever get with shared hostings.

Name: Anonymous 2011-02-09 17:26

>>21
This is too much for a NEET person, who wants to publish just a few kbytes of data.

Name: Anonymous 2011-02-09 17:29

>>23
it doesnt allow me to post zip achives.

Name: Anonymous 2011-02-09 17:36

>>24
Just use any of the hundreds of the free filesharing services, some don't use PHP for their interface, and besides, for most it's not even clear what runs underneath, after all, it's server-side software. In most cases it's either Apache, nginx or some custom httpd.

If you want to paste zips on services which only allow pasting text, just use base64, uuencode or similar.

All I keep hearing from you is excuses, I believe you just don't want to post your code as it either doesn't exist or you have some other reason you don't want it posted (ashamed or want to sell it, ...)

Name: Anonymous 2011-02-09 17:38

Apache/nginx/httpd are PHP servers, they used maninly with PHP, sometimes Python and Perl - other two inferior languages.

Name: Anonymous 2011-02-09 17:39

>>25
If you want to paste zips on services which only allow pasting text, just use base64, uuencode or similar.
This is just stupid and would get you banned by server admins.

Name: Anonymous 2011-02-09 17:41

>>25
or want to sell it
You cant sell language. Try selling english or spanish.

Name: Anonymous 2011-02-09 17:44

>>30
Wow! Never thought it is that big!

Name: Anonymous 2011-02-09 17:44

>>27
Also uuencode is not written in Lisp.
>You could write your own in Lisp.
But then the recipients would be able to read it with a non-Lisp uudecode.

Name: Anonymous 2011-02-09 17:47

>>29
Okey. I'll start by posting this for-loop source

// for {i:0 i<6 !i+1} say i
m:for ['blk v c i] @body ->
  do $@v (cl progn (while (and $@(map ['`!` ?] c))
                     !$body $@(map ['`!` ?] i)))

Name: Anonymous 2011-02-09 17:49

>>33
Single-handedly writting browser from scratch would be a formidable task even for seasoned Lisp-hacker.

Name: Anonymous 2011-02-09 17:51

>>34

e:m:if @body -> $@body.{#($t then $a else $b) -> #(_if $t $a $b)
                       ;#($t then $a        ) -> #(_if $t $a no)
                       ;#($t      $a      $b) -> #(_if $t $a $b)
                       ;#($t      $a        ) -> #(_if $t $a no)
                       ;default               -> error "if: syntax error"}

Name: Anonymous 2011-02-09 17:52

>>36

e:`^` base power -> cl expt base power
e:exp x -> cl exp x
e:sqrt x -> cl sqrt x
e:log base x -> cl log x base
e:sin x -> cl sin x
e:cos x -> cl cos x
e:tan x -> cl tan x
e:asin x -> cl asin x
e:acos x -> cl acos x
e:atan x -> cl atan x

Name: Anonymous 2011-02-09 17:52

>>37

e:rev [x@xs] -> [@xs.rev x]
e:map f xs -> xs.{:r [x@xs]->[x.f @xs.r]}
e:keep p xs -> fold {a b -> b.p.{ye?->[@a b];_->a}} [[]@xs]
e:strip p xs -> fold {a b -> b.p.not.{ye?->[@a b];_->a}} [[]@xs]
e:subst src dst l -> map {!src->dst; x->x} l

Name: Anonymous 2011-02-09 18:00


e:sum s -> fold `+` [0@s]
e:prod s -> fold `*` [1@s]
e:avg xs -> xs.sum/xs.len
e:abs x -> x.{num? -> cl abs x; _ -> sqrt x*x}
e:norm v -> v/v.abs
e:transpose v -> n:0 [v.lhd.len++(map n:+1 v)]

Name: Anonymous 2011-02-09 18:07

>>40
premature optimizer detected.

Name: Anonymous 2011-02-09 18:13

>>42
What're these 4 Gbytes of memory for, if not for stack?

Name: Anonymous 2011-02-09 18:19

>>44
We should replace stack with heap then.

Name: Anonymous 2011-02-09 18:25

>>46
Use memory defragmentation, Luke. Even Windows 95 did it.

Name: Anonymous 2011-02-09 18:45

>>48
So defragmentation would be faster. Copying garbage collector already do some form of defrag.

Name: Anonymous 2011-02-09 18:56

>>50
Whats wrong?

Name: Anonymous 2011-02-09 22:00

>>51
Your dna. But it's ok, keep dreaming that your DSL actually exist: every autistic boy needs imaginary friends, even if just LISP

Name: Anonymous 2011-02-10 0:03

>>52
back to anus, plz

Name: Anonymous 2011-02-10 0:32

>>53
Wait, what? You seriously telling someone on /prog/ to
back to anus,

Is it your first day here? Telling someone here gb2anus is like telling swimming fish to swim: it makes no sense. Because /prog/ IS /anus/

IHBTH

Name: Anonymous 2011-02-10 1:11

>>54
And then MILKRIKS4k was an /prog/.

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