99 Smiley's ahead :)

Started by newdep, April 26, 2005, 01:39:32 AM

Previous topic - Next topic

newdep

Target: 99 newlisp expressions that evaluate to a smiley



Please add yours to the list ;-)



Greetings, Norman.



---



## elegant

((0(fn :->)0)1)



## readable

(reverse {)-:})



## Lispy

(lambda :-)  



## Shorter

;-)



## Shortest ;)

;)



## Silent

c:newlisp -c :-)



## Illigal

c:newlisp -e "(last (main-args))" :-)



## Nose

(sym(join(map string(flat(0(fn (:)(o)({)})))))))



## Too simple

(sym {:-)})



## Odd

(sym (5(setq $0(string((cons'(sym :-))2)))))
-- (define? (Cornflakes))

newdep

#1
## Stringway

(1(string(flat(fn :-()))))
-- (define? (Cornflakes))

newdep

#2
## (not (happy))

(append ":" (reverse(2 2(encrypt "smiley" "65"))))
-- (define? (Cornflakes))

Lutz

#3
## a long one with a deeper meaning

(join (map char (map (fn (c) (- c 66)) (map char (explode "|ok")))))

pjot

#4
## Eazy

":-)"



## Less eazy

(first '(":-)"))



## Boring

(last '(":-)"))



## Also boring

(nth 1 '(":-)"))

pjot

#5
## Last one and now going back to business

(join (list ":" "-" ")"))

newdep

#6
You? Business?? at  5 past 5 ;-)
-- (define? (Cornflakes))

pjot

#7
Take care, you are only 2 desks away... ;-)

Lutz

#8
## for the mathmatician

(join (reverse (map char (factor 2419))))



## beaten up mathmatician

(join (reverse (map char (factor 113693))))

rickyboy

#9
How about a more circuitous way:



((fn(v w)(v w((fn(v w x y z)(v w(x -(z w w)(z w y))))cons(dup"c"3)map")6:"unpack)))apply'pack)



--Ricky
(λx. x x) (λx. x x)

newdep

#10
## HistoricSmile

(495 3(get-url "http://www-2.cs.cmu.edu/~sef/sefSmiley.htm">http://www-2.cs.cmu.edu/~sef/sefSmiley.htm"))
-- (define? (Cornflakes))

newdep

#11
## Glasses

(sym(1 3(string(list(sym(append(reverse(string (~ 7)))))))))
-- (define? (Cornflakes))

rickyboy

#12
Very cool, Norman!  If I use that but remove the 'append' call, I get the same thing.



Thanks for making these submissions -- although it seems a time-waster, you've actually been teaching me some points of newLISP programming!  For instance, I never really paid attention much to string slicing until reading your entries prompted me to.  --Ricky
(λx. x x) (λx. x x)

newdep

#13
Haha..yes its a 100% timewaster indeed ;-)

I just wanted to see how far one would get trying to create smiley's

in newlisp without the direct use of characters..  So it possible ;-)



But indeed the string 'rest function is great, Lutz introduced it in the last

release and one gets very addicted with it...



I think ill quit now targeting the 99 :-)



Ooo btw... the append is indeed a leftover from another one ;-)

Should not be in there..



Regards, Norman.
-- (define? (Cornflakes))

Excalibor

#14
OK, lame, but...



(silent (dolist (i '(: - ")")) (print i)))


Still lame, but funnier ;-)



(define-macro (:- x) (silent (print (string ":-" (first (args))))))
(:- ")")


laters!

dvd



PS- any way to get the macro to eval itself, so I can write ":- )" on the repl and it gets evaluated? maybe I'm asking too much...