←2008-01-14 2008-01-15 2008-01-16→ ↑2008 ↑all
00:04:19 -!- CoffeeMaker has joined.
00:04:19 * CoffeeMaker is making a decaf espresso orange juice with an infinite number of sugars in a bathtub with a goat in it for this channel
00:04:24 * CoffeeMaker spills the channel's coffee into a Magnetic Laser Device
00:04:24 * CoffeeMaker gives everyone in this channel a magnetic decaf espresso orange juice with an infinite number of sugars in a bathtub with a goat in it which is emitting lots of blue light and a barely audible hum
00:04:27 -!- CoffeeMaker has left (?).
00:04:31 <ehird`> okay.
00:04:33 <immibis> !!!
00:04:39 <ehird`> immibis: you did this.
00:04:47 <faxlore> Internet
00:08:14 <immibis> faxlore: ?
00:09:38 <faxlore> re: CoffeeMaker
00:10:46 <ehird`> Behold: I have made lisp an esolang.
00:10:47 <ehird`> (def acc [{++ _}])
00:10:57 <ehird`> Paul Graham would be proud of my, er, 'terseness'.
00:11:06 <faxlore> lol
00:11:41 <ehird`> (def acc [{++ _}]) -> (def acc (lambda (_) {++ _})) -> (def acc (lambda (_) (lambda a (apply ++ (cons _ a)))
00:11:57 <ehird`> ergo, acc is roughly: (def acc (lambda (n) (lambda (x) (++ n x))))
00:12:05 <pikhq> :-O
00:12:12 <ehird`> {..} is partial application, and [...] a lambda with _ meaning 'the next argument'
00:12:42 <ehird`> [+ _ _] is a + that only takes two arguments ;)
00:12:47 <oklokok> couldn't you just add implicit lambdas + *currying*?
00:12:58 <ehird`> oklokok: 0-arg functions, var-arg functions
00:13:07 <oklokok> that's a minority.
00:13:10 <ehird`> 0-args can be replaced with thunks, va-arg is more problematic
00:13:11 <ehird`> and no
00:13:15 <ehird`> va-args are very common in lisp land.
00:13:31 <faxlore> +infix...
00:13:39 <oklokok> just have [] currying then
00:13:41 <oklokok> *be
00:13:42 <oklokok> i mean
00:13:51 <ehird`> Hmm, I could possibly replace (def acc [{++ _}]) with (= acc [{++ _}]), but then i couldn't use = for setf like crazy-Arc does.
00:13:54 <oklokok> asdf.
00:13:59 <faxlore> and drop tose paranthesis
00:14:03 <ehird`> (def acc [{++ _}]) seems like the best blend of obfuscation and readability to me ;)
00:14:08 <faxlore> ;p
00:14:10 <ehird`> compare to the scheme:
00:14:11 <ehird`> (def acc [{++ _}])
00:14:24 <ehird`> (define (acc n) (lambda (x) (set! n (+ n x)) n))
00:14:32 <ehird`> or the Common Lisp:
00:14:43 <ehird`> (defun acc (n) (lambda (x) (incf n x)))
00:14:49 <ehird`> or even the Arc:
00:14:56 <ehird`> (def acc (n) [++ n _])
00:16:57 <oklokok> ehird`: anyway, if non currying is common, why not have two separate function applications, [] and (), where the other curries, and the other one gives the args, and actually calls, currying is COOL
00:17:05 <oklokok> it's AWESOME i tells ya.
00:17:11 <ehird`> oklokok: that's basically what i have.
00:17:13 <ehird`> except it's {}
00:17:17 <ehird`> and [] is lambda shorthand.
00:18:09 <oklokok> right.
00:18:18 <ehird`> faxlore: my lisp is crazy because . can be the car of a list :D
00:18:21 <oklokok> except it's not exactly the same in the usage above
00:18:22 <ehird`> (. a b c ...) is compose
00:18:33 <faxlore> :O
00:20:52 <ehird`> (def id [_])
00:21:04 <ehird`> it looks like a mini-DSL embedded that can embed the toplevel, heh
00:23:11 <ehird`> faxlore: show me something that uses a lot of currying, composition, etc. and looks kinda ugly/large in normal lisp
00:23:15 <ehird`> and i'll CONCISIFY IT :D
00:26:33 <faxlore> with multiple-value-bind use?
00:27:27 <faxlore> ah!
00:27:34 <faxlore> cartesian-product
00:27:56 <faxlore> variadic
00:27:58 <ehird`> faxlore: show me your definition, i'll show you your definition short.
00:28:17 <faxlore> (defun cartesian-product (&rest lists)
00:28:17 <faxlore> (if (endp lists) '(())
00:28:17 <faxlore> (apply #'append
00:28:17 <faxlore> (mapcar #'(lambda (head) (mapcar #'(lambda (tail) (cons head tail))
00:28:17 <faxlore> (apply #'cartesian-product (rest lists))))
00:28:17 <faxlore> (first lists)))))
00:31:04 <ehird`> faxlore: okies, translation
00:31:36 <ehird`> faxlore: by the way, shall i memoize it?
00:31:43 <ehird`> as simple as changing 'def' to 'defmemo' :)
00:31:49 <oklokok> I HAVE IT IN MY NEW LANGUAGE CARTESIAN-LOL: IT'S THE C FUNCTION "C"
00:32:02 <faxlore> hahaha
00:32:02 <oklokok> i'll do some sleeping now ->
00:32:16 <ehird`> faxlore: endp == {eq ()}?
00:32:19 <ehird`> wait, no
00:32:23 <ehird`> {eq (())}?
00:32:25 <ehird`> eck, i dunno
00:32:26 <ehird`> :D
00:33:13 <faxlore> {≡∅}
00:33:21 <ehird`> faxlore: clarify endp and i'll translate it :P
00:33:49 <faxlore> endp = null?
00:34:09 <ehird`> okay
00:34:17 <ehird`> nilp, then
00:36:26 <ehird`> um faxlore
00:36:33 <ehird`> do you meant to discard the mapcar in the lambda?
00:36:33 <ehird`> ;)
00:36:37 <ehird`> i think you need to balance your parens
00:36:59 <faxlore> * Now talking on #'(lambda
00:37:05 <faxlore> oops
00:37:34 <ehird`> haha
00:37:44 <ehird`> i think put it in a pastebin once you clarify it ;)
00:39:10 <faxlore> CL-USER> (cartesian-product '(a x) '(1 2 3))
00:39:11 <faxlore> ((A 1) (A 2) (A 3) (X 1) (X 2) (X 3))
00:39:30 <faxlore> works for me...
00:39:49 <ehird`> ok, maybe i read wrong
00:39:57 <ehird`> ah i see.
00:40:34 <faxlore> http://rafb.net/p/2Lk59U92.txt
00:41:31 <faxlore> (cons head tail) becomes `(,h . ,t)?
00:42:41 <ehird`> faxlore: http://rafb.net/p/OGdGWT60.txt
00:42:52 <ehird`> and naw
00:42:56 <ehird`> far more concise than that :-)
00:43:10 <ehird`> while still havinga reasonable theoretical basis!
00:43:13 <ehird`> hooray for [] and {}
00:44:23 <ehird`> faxlore: if i wanted i could make it more concise. but this way it's readable
00:44:29 <faxlore> make it shortec :P
00:45:00 <ehird`> faxlore: why, it's readable, a lot less ugly than the CL and a lot shorter
00:45:00 <ehird`> :D
00:45:56 * faxlore personally think, not less ugly
00:46:16 <ehird`> in CL you have loads of non-functional mess with #' and weird stuff like (&rest ...)
00:46:19 <ehird`> and arcane names
00:46:48 <faxlore> oh, it is pesonal style
00:46:52 <ehird`> faxlore: however... for shortness... I shall get out my secret weapon: EXTRACT
00:47:02 <ehird`> extract is a pattern-matching let, thing.
00:47:23 <ehird`> (extract ((a . b) p) ...) is (let ((a (car p)) (b (cdr p))) ...)
00:47:26 <ehird`> and similar stuff
00:47:32 <faxlore> none of the #' is required
00:47:44 <ehird`> yeah well, comment on extract :P
00:47:55 <oklokok> i've always wanted pattern matching in scheme
00:48:09 <ehird`> oklokok: not quite scheme her, more like a blend of common lisp and scheme
00:48:12 <ehird`> more on the side of scheme though
00:48:15 <oklokok> indeed.
00:48:37 <faxlore> This is a good use of macros
00:48:39 <oklokok> that was a positive comment because of "comment on extract".
00:48:57 <ehird`> faxlore: yep EXTRACT is a macro
00:49:38 <ehird`> well
00:49:42 <ehird`> macro or special form
00:49:56 <ehird`> since an implementation might not want to go to the trouble of writing such a huge thing as a macro ;)
00:50:29 <faxlore> emacs with dvorak ;_;
00:50:31 <ehird`> faxlore: care to give me any other reducing-targets? :D
00:50:52 * faxlore goes to look
00:52:01 -!- Hypercaffeinated has joined.
00:52:02 * Hypercaffeinated is making a smack in a head with a full carton of milk for this channel
00:52:02 * Hypercaffeinated gives everyone in this channel a smack in a head with a full carton of milk
00:52:02 -!- Hypercaffeinated has left (?).
00:52:54 -!- Corun has quit ("This computer has gone to sleep").
00:53:08 <ehird`> stop it immibis
00:53:16 <immibis> ok
00:55:49 <ehird`> faxlore: ... :P
01:01:47 <ehird`> faxlore: ping
01:03:21 <faxlore> Excuse my typing so slow, dvorak in difficult
01:05:47 <ehird`> heh
01:05:57 <ehird`> paredit will help you in typing out a function ;)
01:06:22 <faxlore> Love paredit!
01:06:35 <ehird`> me too although it has its flaws
01:11:10 <ehird`> faxlore: obviously Concise Lisp will come with its own emacs-alike written in Concise Lisp ;)
01:12:46 <faxlore> AAA!
01:13:01 <ihope> I can type faster on Dvorak than some people can at all.
01:14:44 <ihope> (I wonder if a Dvorak wave is spreading across the Internet right now.)
01:15:45 <oklokok> you cannot get dvoraks anywhere
01:15:50 <oklokok> in here.
01:15:54 <ehird`> rearrange your keys.
01:16:03 <ehird`> faxlore: AAA what.
01:16:10 <oklokok> doesn't sounds like something i would do.
01:16:13 <oklokok> *sound
01:16:24 <faxlore> "emacs-alike written in Concise Lisp"
01:17:48 <ehird`> WHAT'S WRONG WITH THAT FAXLORE :(
01:18:24 <faxlore> MAD!!!
01:18:34 <faxlore> + good
01:19:45 <ehird`> :D
01:20:04 <ehird`> faxlore: every buffer can act as a listener
01:20:07 <ehird`> with a seperate namespace
01:20:25 <ehird`> so basically it's a REPL but with files and loads of refactoring stuff and a debugger built right in to the file itself and AAAAAAAAAAAAAAAAAAAAAAAA
01:21:04 <faxlore> hahah
01:22:06 <ehird`> faxlore: also you can modify the ENTIRE EDITOR in itself
01:22:15 <ehird`> in its whole, complete, entirity.
01:24:04 <ehird`> faxlore: PLEASE BE ASTONISHED.
01:24:27 <faxlore> AAAAA!!!!!
01:25:38 <ehird`> great
01:26:01 <ehird`> faxlore: For example.
01:26:23 <ehird`> where 'edit' is to be substituted for the editors name and thus package name:
01:28:08 <ehird`> faxlore: http://rafb.net/p/GL1Wpg49.txt
01:28:34 <ehird`> (in-package X) is 'global' and thus works basically like common lisp's in-package
01:28:42 <ehird`> but (in-package X FORMS...) is local to that form
01:28:49 <faxlore> :D
01:29:03 <ehird`> ergo: my definition is extremely pretty and elegant and shows how awesome both the language and editor will be
01:29:05 <ehird`> agree/disagree
01:29:35 -!- sebbu has quit ("@+").
01:31:27 <ehird`> faxlore: http://rafb.net/p/tuLeKI45.txt overriding insert-brace (which will be bound to (, {, [, etc. by default)
01:31:44 <ehird`> ofc there'll probably be a more featureful equivilent by default, but hey, it's a good example.
01:32:14 <faxlore> Cool :D
01:33:03 <ehird`> faxlore: this thing started off esoteric but already i'm liking it more than scheme or common lisp :P
01:33:11 <ehird`> just looks nice.
01:33:30 <faxlore> hehe, hopes it works well
01:34:59 <ehird`> faxlore: i might add an implicit EXTRACT to parameter lists
01:35:09 <ehird`> (def revpair ((a . b)) (cons b a))
01:36:07 <ehird`> faxlore: bit of a problem if you want to handle nil as well though
01:37:07 -!- faxlore has quit ("If there are any aliens, time travellers or espers here, come join me!").
01:38:02 -!- faxlore has joined.
01:38:21 <ehird`> wb faxlore :P
01:38:36 * faxlore has trouble with a new keyboard layout..
01:38:41 <ehird`> heh
01:39:11 <ehird`> faxlore: I think EXTRACT might become my LOOP: crazy big language embedded in Lisp
01:39:25 <faxlore> Yay!
01:39:30 <faxlore> LOOP is -awesome-
01:39:35 <ehird`> i hate you :P
01:39:44 <faxlore> I love LOOP and FORMAT...
01:40:08 <faxlore> A lot of people.. use iterate
01:40:12 <faxlore> but I think they missed some good things
01:40:23 <faxlore> (in the dark corners of loop)
01:40:26 <ehird`> (def silly (lst) (extract (((first rest... last)) lst)) (cons last (append rest (list first)))))
01:40:39 <ehird`> (silly '(1 2 3 4)) => (4 2 3 1)
01:40:49 <ehird`> (silly '(1)) => error
01:40:54 <ehird`> (silly '(1 2)) => (2 1)
01:41:07 <ehird`> (silly '(1 2 3 4 5 6)) => (6 2 3 4 5 1)
01:44:05 <ehird`> faxlore: Unfortunately extract is not turing-complete. Yet. :-)
01:50:51 <ehird`> faxlore: Pingify
01:52:23 <ehird`> faxlore: By the way, (def 1+ {+ 1}) actually defines as a function, as opposed to (= 1+ {+ 1}) or whatever.I haven't decided if there's any signifigance to this or even whether it will stay like that, though, because atm functions and variables share the namespace (i.e. Lisp-1)
01:53:22 * faxlore nod.. thats a hard choice
01:53:41 <ehird`> faxlore: I think it's more elegant since it resembles the Lambda-calculus more and allows for higher-order functions to be much more elegant
01:53:48 <ehird`> and I personally don't mind typing lst instead of list ;)
01:54:06 <ehird`> actually it'd be confusing to have a param named list anyway even in CL
01:54:31 <ehird`> faxlore: An interesting thing I have is the generic lookup function !
01:54:42 <ehird`> (! lst i) -> lst element i, zero-based
01:54:51 <ehird`> (! ary i) -> array element i, also zero-based
01:54:59 <ehird`> (! ht "blah") -> hash table element "blah"
01:55:45 <ehird`> name borrowed from haskell's infix operator !, obviously
01:55:57 -!- immibis has left (?).
01:56:48 <ehird`> faxlore: COMMENT OR DIE! :P
01:57:38 * faxlore takes time! yd.f t.fo ap. bry ,d.p. yd.f odrgne x.!
01:57:58 <ehird`> hehe, i'll wait for your comments :P juist send em in one big message
01:59:29 <faxlore> I woiuld debate that Lisp-1/2 is orthogonal to ST Lambda-calculus axis
01:59:43 <ehird`> faxlore: sure, i guess, but hey.
02:00:45 <faxlore> generic lookup's great... Hopes it is extensible
02:01:19 <ehird`> faxlore: extensible in what way
02:02:13 -!- ihope has quit (Read error: 110 (Connection timed out)).
02:02:14 * faxlore defines a new type... wishing to use ! on it
02:03:55 <ehird`> oh of course.
02:04:03 <ehird`> i think all functions will be generic
02:04:24 <ehird`> and the (def func (args) ...) being shorthand for it
02:04:41 <ehird`> well, it would be shorthand for something which would be optimized away to be non-generic until new terms are added
02:04:53 <ehird`> faxlore: a generic setter would be nice too but i don't really like setf
02:05:00 <ehird`> (setf (car x) y) just doesn't rub well with me
02:05:02 <ehird`> however,
02:05:13 <ehird`> (setter-thing ht "blah" "xyzzy") does.
02:05:25 <ehird`> (setter-thing lst 1 'abc) too
02:05:40 <ehird`> can't think of a good name though
02:05:45 <ehird`> well, = might work..
02:05:53 <ehird`> (= lst 3 "hello")
02:05:58 <ehird`> (= ht "xyzzy" "plugh")
02:06:01 <ehird`> hmm, i guess so..
02:06:29 <ehird`> faxlore: the thing with lisp-1ness is that it goes hand in hand with [..] and {..}
02:06:41 <faxlore> You seem much more a schemer than lisper/CLer :p
02:06:53 <ehird`> you want to be able to construct one of those things and return them first-class
02:07:06 <ehird`> faxlore: i guess so though i do accept scheme has its flaws and CL has a lot of good things
02:07:11 <ehird`> faxlore: what specifically make syou say that?
02:08:03 <faxlore> Of course, they are both incredibly well designed
02:09:05 <faxlore> terniary =.... bad
02:09:08 <ehird`> I guess I like the idea of Scheme with extra practicality added more than Common Lisp's based-on-practicality-and-featureness
02:09:15 <ehird`> faxlore: yeah i'd agree with that =
02:09:34 <ehird`> haskell has no direct setter equiv to ! but that's because they're immutable
02:09:54 <ehird`> set! of course has scheme destructive-marker implications
02:10:03 <ehird`> !set is incredibly ugly ;)
02:10:07 <EgoBot> Huh?
02:10:37 <faxlore> beause off not liking setf
02:10:54 <ehird`> oh, well setf just seemed a bit silly to me
02:11:09 <faxlore> Perl6 has it as well, I think
02:11:18 <faxlore> (defineable lvalues)
02:11:34 <ehird`> you can /kind of/ pretend to yourself that you're setting what a function will return... but it'll never be transparent, it'll always shine through and really it doesn't gain much in readability (and arguably impacts on it)
02:15:48 <ehird`> faxlore: i'm wondering whether i should just make it even crazier by adding a scheme-like (delay X) but with no force
02:15:54 <ehird`> it's implicit, like haskell's lazy evaluation
02:16:02 <ehird`> one way road to BUGS BUGS BUGS! :D
02:16:36 <faxlore> too strong haskell influence
02:16:49 <ehird`> faxlore: i know. but funny.
02:16:53 <faxlore> lav
02:17:12 <ehird`> faxlore: hmm, it occurs to me i've got something like CLOS built in but without the classes or objects ;)
02:17:14 <faxlore> lazy scoping?
02:17:37 <ehird`> that is, you can define structures and they become regular first-class types like 'pair' or 'integer'
02:17:43 <ehird`> and therefore generic functions can dispatch on them
02:17:45 <faxlore> have you read AMOP?
02:17:54 <ehird`> no MOP, obviously :)
02:19:31 -!- faxlore has quit ("If there are any aliens, time travellers or espers here, come join me!").
02:20:44 -!- faxlore has joined.
02:21:12 <ehird`> faxlore: personally i say 'thank god' to the going of the MOP
02:21:17 <ehird`> but i'm biased, ofc ;)
02:21:34 <ehird`> however:
02:21:43 <faxlore> huh? "going of the MOP"
02:21:54 <ehird`> (type-of my-structure) => #<type 'type'>
02:22:03 <ehird`> (type-of type-type) #<type 'type'>
02:22:08 <ehird`> (last line: most confusing evar)
02:22:19 <ehird`> so, i guess you could extend type in some crazy way
02:22:22 <ehird`> and get a pseudo-mop
02:23:30 <faxlore> is that Type : Type I see!
02:23:41 <ehird`> something like that, yeah.
02:23:44 <faxlore> absurd!
02:23:49 <ehird`> heh
02:23:49 <faxlore> :P
02:23:49 <ehird`> why
02:23:51 <ehird`> :P
02:24:34 <ehird`> a type is-a type.
02:24:43 <ehird`> thus their type is also a type.
02:24:53 <ehird`> but their type is 'type', so (type-of type-type) => type-type
02:24:55 <faxlore> (girards paradox, if you take curry howard srs)
02:26:09 <ehird`> oh dear, paradoxes
02:26:14 <ehird`> but Smalltalk does it and Smalltalk isn't insane! :P
02:26:22 <faxlore> yeah, it's not relevant :P
02:26:36 <ehird`> damn you :P
02:26:39 <faxlore> just attempting Type theory puns when there is an opportunity..
02:26:46 <ehird`> haha
02:27:06 <faxlore> hey I wrote a type and term inferrence thingyjigs in haskell for the simply types lambda cal
02:27:20 <ehird`> I think [{++ _}] might be the first 'does something non-trivial' function in Lisp with no parentheses
02:27:21 <ehird`> :P
02:28:47 <ehird`> Hmm, how to parse [{++ _}]... First I need to come up with a name for _-advances-to-next-param lambdas :P
02:29:08 <ehird`> {...} can be (apply-partial ...)
02:31:40 <ehird`> nameless-lambda i guess.
02:31:47 <ehird`> (nameless-lambda (apply-partial ++ _))
02:31:50 <ehird`> Kind of ugly but eh.
02:32:05 <ehird`> nameless-lambda's definition will of course be epic :P
02:32:08 <faxlore> heheh nameless-lambda
02:32:54 <ehird`> Note: nameless-lambda is not the opposite of named-lambda. Unfortunately.
02:32:58 <ehird`> (Perl documentation reference!)
02:33:04 <faxlore> why not expand at parse time?
02:33:22 <ehird`> faxlore: because i'd have to do alpha-conversion of names
02:33:42 <faxlore> gensym!!
02:33:46 <ehird`> so (read) would become 2384972398479238472389472394 times more clever than it should be
02:33:48 <ehird`> faxlore: eh.
02:34:01 <ehird`> faxlore: i guess i just think read should be dumb
02:34:09 <ehird`> What if I want to read in a file with [...] and {...} in?
02:34:19 <faxlore> #;> (gensym)
02:34:19 <faxlore> |%%_LEKqa1Ql9|
02:34:22 <ehird`> OK, nameless-lambda and apply-partial would make the thing weird for names but you could do '{...} and '[...]
02:34:30 <ehird`> and i know what gensym is... what lisp impl is that? weird prompt
02:34:44 <faxlore> SISC
02:35:17 <ehird`> but that's Scheme! :P
02:35:24 <ehird`> I thought you were a lisper. :P
02:35:55 * faxlore still lot for language
02:36:06 <faxlore> lost*
02:36:18 <ehird`> faxlore: No you're not! Concise Lisp (which needs a name change)! :P
02:36:25 <faxlore> LOL
02:36:56 <faxlore> I like the name a bit
02:37:08 <ehird`> it's abbreviated to CL, that might be a problem :P
02:37:53 <faxlore> ahh true
02:40:50 <ehird`> Quote Lisp!
02:40:58 <ehird`> For the 'Lisp
02:41:00 <ehird`> err
02:41:12 <ehird`> For the (quote lisp) => lisp pun.
02:41:21 <ehird`> (i.e.,
02:41:31 <ehird`> "Quote Lisp is THE ONLY Lisp!". lame i know)
02:43:15 <ehird`> faxlore: I hope to get a good string library in with it... it's time for lisp to stop denying strings as Holy Things :P
02:44:15 <faxlore> strings as lists > strings as vectors
02:44:30 <ehird`> faxlore: ... right up until when you start doing serious work with them
02:44:44 <faxlore> serious work???
02:44:52 <ehird`> more than toy string manipulation programs.
02:45:00 <ehird`> faxlore: Oh yeah and you'll probably HATE this but lambda is being renamed to fn for exactly the same reasons that PG did it in Arc: lambda is a lot to type for something so commonly used (did Church write "lambda"? No! He wrote one symbol. Big difference.), so eh.
02:45:30 <faxlore> I deo hate that
02:45:52 <faxlore> call it lambda or λ
02:46:09 <faxlore> or ` or \
02:46:34 <ehird`> faxlore: ` is quasiquote
02:46:38 <faxlore> fn disgusts :P
02:46:41 <ehird`> \ escapes stuff, etc
02:46:49 <ehird`> unicode is... not plausible for that ;)
02:46:54 <faxlore> fun is fine
02:46:58 <ehird`> eh suggest something else..
02:47:03 <ehird`> lm?
02:47:05 <ehird`> ld?
02:47:28 <faxlore> (In ML.. Not lisps)
02:47:45 <ehird`> faxlore: as i say: suggest
02:47:46 <ehird`> ugh
02:47:50 <ehird`> reading PG's stuff on Arc:
02:47:51 <ehird`> - Polymorphism: (+ "foo" "bar") -> "foobar"
02:47:54 <ehird`> BAD WRONG NO.
02:48:08 <ehird`> + a commutative, whatever-the-word-is-for-ignoring-associativity operation
02:48:10 <ehird`> concatentation is NOT
02:48:53 <faxlore> Arc is not worth learning about... publicity stunt
02:49:03 <ehird`> yeah, i know
02:49:12 * faxlore think that's hypocritical nonsense.
02:49:13 <ehird`> but still... using + for that is evil
02:49:22 <faxlore> he uses = as something which does assignment
02:49:28 <faxlore> (unless that changed)
02:49:34 <ehird`> get yourself a concatentation operation and use that!
02:49:41 <ehird`> I hear we have one called 'append'...
02:52:25 <ehird`> faxlore: Oh yeah, and progn/begin is called 'do'
02:52:32 <ehird`> 'progn' - uhh, sure...
02:52:35 <ehird`> 'begin' - begin what?
02:52:40 <ehird`> 'do' - do these things.
02:54:41 * faxlore lol at 'progn' comment
02:54:55 <ehird`> :)
02:55:09 <ehird`> 'prog': To prod with prongs
02:55:16 <ehird`> 'n': abbreviation of "and"
02:55:22 <ehird`> Prod with prongs, AND: ...
02:56:24 <GreaseMonkey> heh
02:56:49 <ehird`> faxlore: I don't really like letrec (seems like a bit of a kludge to me) but I want mutually recursive functions to be easy to define. Hmm, hmm, hmm.
02:57:06 <faxlore> How can you say that about LETREC!!!!?
02:57:40 <ehird`> faxlore: heh :)
02:57:45 <faxlore> Let's see you derive generalied applicative order Y combinators faster than you can type 'letrec' !!
02:58:11 <ehird`> meep
02:58:12 <ehird`> :-)
02:58:22 <faxlore> :D
02:58:27 <ehird`> This is Heretical Lisp i'm aware :D
02:58:49 <ehird`> Heck, I'm even adding quite a few loop constructs, probably... But they expand into tail-recursive functions so that's OK
02:58:51 * faxlore can tell.. it will have much to stir deamons
02:58:54 <faxlore> much power*
02:59:22 <ehird`> :D
03:02:28 <ehird`> faxlore: I think I'll have something like haskell
03:02:29 <ehird`> 's maybe
03:02:34 <ehird`> except implicit Just
03:02:43 <ehird`> so you have a (nothing), which i might give a nicer name
03:02:51 <ehird`> note: NOT equivilent to 'unspecified'
03:02:57 <ehird`> it's a BadThing(TM)
03:03:07 <faxlore> (kang.o)
03:03:18 <faxlore> -_-
03:03:36 <faxlore> (values) ; :)
03:03:57 <ehird`> (values) is 'unspecified'
03:04:13 <ehird`> 'def' should return 'unspecified'. (if #f blah) should return 'unspecified'
03:04:49 <ehird`> 'something which is either: some values, or: fail/nothing' should use (fail) or (nothing) or whatever.
03:08:49 <ehird`> anyway
03:08:51 <ehird`> talk more tomorrow.
03:08:52 <ehird`> bye.
03:09:03 <faxlore> see ya
03:16:00 -!- Arrogant has joined.
03:51:40 -!- faxlore has left (?).
04:19:20 -!- Arrogant has quit ("Leaving").
04:21:51 -!- Merthsoft has joined.
04:22:09 -!- Merthsoft has left (?).
05:21:41 -!- calamari has joined.
05:23:46 -!- slereah_ has joined.
05:24:48 -!- slereah__ has quit (Read error: 104 (Connection reset by peer)).
05:25:46 -!- RodgerTheGreat has quit.
05:31:49 -!- calamari has left (?).
05:39:35 -!- Figs has joined.
05:41:17 <Figs> hello
05:44:44 <Figs> Does anyone know why I get weird warnings (ex, "no newline at end of file") when I include a file from within a function in C? (It has an extra newline at the end of the file...)
05:44:57 <Figs> I'm doing some weird stuff, so I figure it's better to ask here than in #C :)
05:45:10 <slereah_> I'm no C guy.
05:46:06 <Figs> I'm actually starting to like C again after learning about __func__
05:46:19 <slereah_> You're a lucky man
05:46:23 -!- slereah_ has changed nick to Slereah.
05:46:37 <Figs> Nah, I'm a nut case, I think.
05:47:01 <Slereah> Doesn't mean you're not lucky!
05:47:06 <Figs> :P
05:47:19 <Figs> So what's going on here these days?
05:47:27 <Figs> I haven't been around in a while...
05:48:44 <Slereah> Language creation, all that.
06:14:52 <Figs> bbl maybe
06:14:54 -!- Figs has left (?).
06:58:09 <oklokok> [05:02] <ehird`> 'def' should return 'unspecified'. (if #f blah) should return 'unspecified'
06:58:10 <oklokok> [05:03] <ehird`> 'something which is either: some values, or: fail/nothing' should use (fail) or (nothing) or whatever.
06:58:27 * oklokok thinks it's awesome to define 'undefined' :D
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:55:06 -!- GreaseMonkey has quit ("Hi Im a qit msg virus. Pls rplce ur old qit msg wit tis 1 & hlp me tk ovr th wrld of IRC. Man who run behind car get exhausted").
09:08:36 <AnMaster> hm, game of life is rather interesting, it is in a way multitasking
09:08:44 <AnMaster> and turing complete
10:30:59 <Slereah> Maybe I should try creating one.
10:33:15 <Slereah> I'm sure it will be less dry than that 2,3 machine I'm trying to understand
10:38:14 <Slereah> I should really work on that N->ZxZ function. I run in that problem when I try to make some 2D language.
11:19:55 <Slereah> Is there a big bestiary for the Conway game of life?
11:25:45 -!- slereah_ has joined.
11:28:58 -!- sebbu has joined.
11:34:53 * slereah_ is thinking of some convoluted way to make an I/O game of life
11:52:21 -!- Slereah has quit (Read error: 110 (Connection timed out)).
12:28:16 -!- ihope_ has joined.
12:28:17 -!- ihope_ has changed nick to ihope.
13:05:11 -!- jix has joined.
13:49:36 -!- Asztal has joined.
14:32:13 -!- SimonRC has quit (Remote closed the connection).
14:32:17 -!- SimonRC has joined.
15:38:31 -!- oerjan has joined.
15:39:53 <oerjan> <oklopol> i love highlighting oerjan.
15:40:14 <oerjan> you don't say.
15:42:01 <oerjan> (oh, and yes, i could tell you the three monad laws if you don't know them yet.)
15:43:11 -!- slereah_ has changed nick to slereah__.
15:45:37 <slereah__> What's a good symbol for a game of live cell?
15:45:39 <slereah__> #?
15:45:46 <slereah__> *f
15:45:53 <oerjan> live or dead?
15:46:10 <slereah__> Live.
15:46:14 <slereah__> Dead will be space.
15:46:48 <oerjan> something a bit symmetric...
15:47:20 <oerjan> although * is tempting.
15:47:34 <SimonRC> the blackes thing you can get your hands on
15:47:45 <slereah__> Racist.
15:47:52 <SimonRC> some of the "graphics" chars would be a better choice, surely?
15:48:07 <slereah__> Well, so far it's ASCII's.
15:48:23 -!- jix has quit (Nick collision from services.).
15:48:24 <slereah__> And run on the Kubuntu shell, so the whole screen is black.
15:48:33 -!- jix has joined.
15:49:08 <oerjan> s/blackes/unspaciest/
15:49:41 <oerjan> (that's almost unspeciesist)
15:49:46 <slereah__> That's why I thought of the #
15:49:58 <slereah__> It seems bulky enough
15:50:05 <slereah__> Although * is indeed tempting
15:50:12 <oerjan> what about actual ANSI color?
15:50:38 <slereah__> How do I do colors on the snake?
15:50:48 <oerjan> snake?
15:50:52 <slereah__> Python.
15:50:59 <slereah__> The penguin being Linux.
15:51:07 <oerjan> i assume it's a terminal thing
15:51:19 <oerjan> there was a wikipedia page
15:51:44 <slereah__> Exception handling makes me frown.
15:51:52 <oerjan> http://en.wikipedia.org/wiki/ANSI_escape_code
16:05:25 <slereah__> Aw hell.
16:05:38 <slereah__> do I need two grids for the game?
16:06:26 <oerjan> for game of life?
16:06:32 <slereah__> One to check the previous state and one to apply change to.
16:06:50 <slereah__> I fear what will happen otherwise
16:06:51 <oerjan> there is a way to do it with only a line of extra buffer
16:07:34 <oerjan> since you only need to look at the next and previous lines, you can discard older lines than that
16:08:03 <slereah__> Problem is, my grid isn't really a set of lines.
16:08:33 <slereah__> The square 123456789 is this :
16:08:34 <oerjan> on the other hand having two full grids may allow for more simultaneous updates i think
16:08:35 <slereah__> [[' ', ' ', '7', ' ', '4', ' ', '1', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', '8', ' ', '5', ' ', '2', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', '9', ' ', '6', ' ', '3', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ']]
16:09:16 <oerjan> um is this Conway's Game of Life or something slightly different?
16:09:22 <slereah__> It is.
16:09:41 <slereah__> But I recycled the Love Machine to have an infinite plane.
16:09:56 <oerjan> well as long as things are sorted by either x or y direction you still should be able to do things in one of those orders...
16:10:25 <slereah__> It's a list of list, both using a folding function to go in all directions
16:10:54 <oerjan> infinite in all directions?
16:10:58 <slereah__> Yes.
16:11:23 <slereah__> It's a simpler solution than finding a N-ZxZ mapping.
16:11:47 <oerjan> two-directionally infinite?
16:12:07 <slereah__> Well, I think. I haven't checked so far.
16:12:17 <slereah__> I'm still writing the checking-adjacent-cells
16:12:57 <oerjan> now this being python the list is not _actually_ infinite just potentially so, i assume
16:13:33 <slereah__> Well, I think most language don't allow infinite lists.
16:13:43 <oerjan> unless you are employing laziness somehow
16:14:19 <slereah__> But I'll use the same thing as the Love Machine 9000 - when there's moar cells required, in this case when a live cell appears at the edge, I'll just append some more cells around it
16:14:48 <oerjan> not a whole line of them...
16:15:08 <oerjan> gliders can be expensive that way
16:15:47 <slereah__> I'll start with a whole line, and see what I can do with it
16:16:13 <oerjan> ideally you want it to forget again regions where everything has died
16:16:15 <slereah__> Although it's actually a whole square, since it's all around the grid
16:17:06 -!- Corun has joined.
16:21:22 -!- ihope has quit ("ChatZilla 0.9.80 [Firefox 2.0.0.11/2007112718]").
16:23:10 -!- timotiis has joined.
16:40:24 -!- RodgerTheGreat has joined.
16:44:49 <ehird`> so now that people are alive and stuff
16:44:56 <ehird`> accumulator generator:
16:45:01 <ehird`> (def acc [{++ _}])
16:45:06 <ehird`> i challenge you to show me something shorter.
16:45:12 <oerjan> *ACK* *GARGLE* *THUMP*
16:45:18 <ehird`> oerjan: :D
16:45:38 <ehird`> oerjan: [...] is a lambda with _ meaning 'the next argument'
16:45:42 <RodgerTheGreat> howdy, folks
16:45:44 <ehird`> [_ _] is (lambda (x y) (x y))
16:45:49 <ehird`> {...} is currying
16:45:52 <ehird`> well
16:45:54 <ehird`> partial application.
16:46:34 <ehird`> i also have pattern matching :D
16:46:42 <ehird`> and cond and let lose most of their parens
16:46:47 <ehird`> (let (a 2 b 3) ...)
16:46:58 <ehird`> (cond (eq a b) "stuff" (eq b c) "blah")
16:47:03 <ehird`> it's Heretical Lisp!
16:48:05 -!- Corun has quit ("Haxsell!").
16:48:25 <ehird`> oh yeah and i'm planning making <a b c> be an error by default but definable
16:48:30 <ehird`> for basically one purpose
16:48:57 <ehird`> <div :id "AAAAAH" <strong "Evil HTML lisp sez:"> " 2 + 2 = " (+ 2 2)>
16:48:58 <ehird`> mwahahaha
16:56:42 <ehird`> yeah i'm crazy
16:58:20 <Asztal> reminds me slightly of markaby.
16:58:23 <Asztal> div.AAAAAH! { strong 'Evil HTML lisp sez'; text "2 + 2 = #{2+2}" }
16:58:44 <ehird`> markaby wasn't the first html generation tool you know
17:02:52 <ehird`> Asztal: did you read the stuff about [] and {}
17:03:01 <ehird`> if not, I challenge you: decipher (def acc [{++ _}])!
17:08:08 <Asztal> well.. you've already said what it was
17:08:18 <Asztal> am I supposed to decipher how it works?
17:08:37 <ehird`> eh, i guess, thouigh if you read that then it miught be easier
17:08:52 <ehird`> yeah, decipher how it works... ifyou know ruby give me ruby code that is 100% equiv. or something :P
17:08:57 <ehird`> its not that hard once you get the basic principles
17:10:50 -!- faxathisia has joined.
17:11:40 <ehird`> hello faxathisia
17:11:52 <faxathisia> Hiya
17:16:53 <ehird`> faxathisia: my lisp is even more heretiacl now
17:16:57 <ehird`> (let (a 2 b 3) ...)
17:17:02 <ehird`> (cond (eq a b) "stuff" (eq b c) "blah")
17:17:14 <ehird`> to be fair mccarthy *did* say he thought he got cond wrong: too many parens
17:17:40 <faxathisia> :o... I never heard that
17:17:45 <ehird`> yep
17:18:19 <ehird`> IMO let suffers from the same problem
17:18:36 <ehird`> the parens are simply not needed and make the code uglier
17:19:01 <faxathisia> Oh
17:19:14 <ehird`> oh what
17:19:42 <faxathisia> Y not just have all lets imlicitly letrecs
17:21:25 <ehird`> because, that's ridiculous.
17:21:56 <ehird`> > (letrec ((a a)) a)
17:22:02 <ehird`> -> some internal value
17:22:13 <ehird`> > (let ((a a)) a)
17:22:13 <ehird`> Error: unbound variable: a
17:22:17 <ehird`> (Chicken Scheme)
17:28:16 <ehird`> faxathisia: that's why
17:34:37 <SimonRC> ehird`: actually, both of those are just like arc
17:34:48 <SimonRC> I mean, your heresies
17:35:11 <ehird`> SimonRC: even if arc didn't do it, i would
17:35:21 <ehird`> it just happens to be a good idea outside of arc [which sucks[
17:35:28 <SimonRC> really, why?
17:35:33 <SimonRC> have you used arc?
17:36:09 <ehird`> 1. its mostly hype, not that much new 2. a lot of the new things are unneeded and: 3. impure and unclean, inelegant
17:36:38 <ehird`> it gains conciseness at the cost of readbility and purity.
17:37:54 <ehird`> also a bit of irony
17:38:00 <ehird`> they go on about how arc concentrates on web apps
17:38:09 <ehird`> and yet
17:38:10 <ehird`> "We're trying to make something for the long term in Arc, something that will be useful to people in, say, 100 years. (If that sounds crazy, remember that we're already up to 40.) "
17:38:24 <ehird`> i guess web apps will still be The Hot Thing in 100 years.
17:39:21 <slereah__> By then, the web will be nothing but robot porn.
17:40:25 -!- tesseracter has joined.
17:40:35 <ehird`> if it's even still in much use
17:40:41 <ehird`> it may be reduced to usenet-like status
17:42:11 <slereah__> It will be like in "Beneath a steel sky", nothing but cheap abstract 3D shapes and epic battles for datas!
17:42:16 <ehird`> SimonRC: I personally think my lisp is nicer-looking, has the possibility to be much more concise, and is just plain better
17:42:31 <ehird`> slereah__: we'll be in 4d by then. (Great game, btw.)
17:42:52 <tesseracter> wha? someone say something about 4D?
17:43:01 <ehird`> haha
17:43:03 <ehird`> good timing.
17:43:13 <slereah__> EX-TER-MI-NA-TION!
17:43:27 <tesseracter> (which game)
17:43:33 <slereah__> The ending was a little disappointing though
17:43:38 <slereah__> Beneath a steel sky
17:44:07 <slereah__> Where a man named after a beer brand battles the evil empire
17:44:09 <ehird`> never got to the end
17:44:11 <ehird`> heh.
17:44:20 <faxathisia> That game rules!
17:45:28 -!- slereah__ has changed nick to Slereah.
17:45:33 <Slereah> My game of life is currently a GAME OF DEATH :O
17:45:42 <ehird`> faxathisia: there's such a hive mind in #esoteric
17:46:04 <Slereah> I hate it when there's too much exceptions and list index.
17:46:05 <ehird`> the majority of the time we just agree with each other ;)
18:04:33 <Slereah> So far it works for all 4-cell combinaison!
18:06:43 <Slereah> *** transform thusly, is it okay? http://membres.lycos.fr/bewulf/Russell/Life.png
18:08:01 <Slereah> Hm. Doesn't seem to be.
18:08:17 <Slereah> It's supposed to rotate or something apparently
18:10:10 <Slereah> Seems to think that the three cells got 2, 4 and 2 neighbours.
18:10:12 <Slereah> Damn.
18:16:07 <ehird`> i want to write a noding system like everything2, except esoteric somehow
18:20:26 -!- ais523 has joined.
18:20:39 <oerjan> morethaneverything?
18:20:44 <ehird`> haha
18:20:49 <ehird`> i mean, technology wise
18:21:24 <ehird`> (although morethaneverything would not be a bad idea, it seems: see http://qntm.org/?e2code, telling of the horrible mess that apparently is the e2 code... all changes made live with no backup! yeek!)
18:26:04 <Slereah> "And, actually, the more you can avoid programming in C the more productive you will be."
18:26:05 <Slereah> Heh.
18:26:18 <ais523> depends on what you're writing
18:26:55 <Slereah> I guess so.
18:27:18 <Slereah> Maybe I should write the Love Machine 9000 on something efficient one day
18:27:29 <Slereah> But well.
18:29:06 <ais523> did you ever see Perligata?
18:29:34 <Slereah> No.
18:29:50 <ais523> it's basically an esoteric syntax for Perl based on Latin
18:30:11 <ais523> which shares the same property that it's usually possible to reorder the words in a statement and the new statement has the same meaning
18:31:53 <ais523> grr... I've been given a program to run which does something easily achievable by standard Unix tools
18:32:00 <ais523> but it's trying to sort a linked list using bubble sort
18:32:10 <ais523> which on the size of the data set I'm using is taking a while
18:32:49 <SimonRC> lol
18:33:02 * SimonRC recommends merge sort for linked lists
18:33:08 <oerjan> rewrite it in brainfuck. then you can say, "I rewrote the program in Brainfuck and it got 3 times faster." Maybe.
18:33:17 <ais523> so I've set it running and I'm racing it to try to beet it with a command line tool
18:33:21 <ais523> while typing on IRC at the same time
18:33:23 <SimonRC> It is O(n lg n), unlike quicksort on arrays
18:35:06 <ais523> beat it easily
18:35:21 <SimonRC> resulting commandline?
18:35:41 * ais523 tries to figure out how to copy-paste it
18:35:51 <SimonRC> select, middle-click?
18:36:16 <ais523> tr ' ' '(newline)' < (filename) | sed -e 's/^[^a-zA-Z0-9]+//; s/[^a-zA-Z0-9]+$//;' | sort | uniq -c | sort > (filename)
18:36:27 <ais523> it took a while because I was trying to deal with the newline
18:36:37 <SimonRC> ok
18:36:42 <SimonRC> \n would have worked, I think
18:36:48 <ais523> on tcsh?
18:36:58 <SimonRC> ew
18:37:00 <SimonRC> csh
18:37:09 <ais523> it's the default on this server
18:37:14 <SimonRC> what does it do?
18:37:27 <ais523> counts the frequencies of words in a file
18:37:37 <ais523> but with an unusual definition of word, hence the sedery
18:38:12 <ais523> oh, the original's finished now
18:38:21 <ehird`> SimonRC: "tcsh"/"it's the default on this server"/"what does it do?"
18:38:22 <ehird`> suck.
18:38:23 <ehird`> :)
18:38:32 <ehird`> and sometimes run programs too, apparently
18:38:54 <ais523> it's sort of like a version of sh modified to be 'user-friendly'
18:39:09 <ais523> so you can't do any more than a small number of redirections
18:39:20 <ais523> and you have to rm a file before you can pipe output to it, unless you're appending
18:39:25 <ehird`> i know what csh is
18:39:30 <ehird`> its not a sh derivative, much.
18:39:38 <ais523> sorry, when I said that the original program had ended, I was wrong
18:39:39 <ehird`> it is basically a u seless toy
18:39:50 <SimonRC> sort | uniq is often wrong. check out sort -u
18:39:57 <ais523> scratch that, it had ended after all
18:39:57 <ehird`> ais523: you are an INTERCAL programmer, right?
18:40:06 <ais523> SimonRC: I was using uniq for the line count
18:40:10 <ais523> ehird`: yes
18:40:20 <ais523> I'm the current C-INTERCAL upstream maintainer
18:40:21 <ehird`> ais523: how feasable would you say an INTERCAL self-compiler would be? :-)
18:40:22 <SimonRC> ah, ok
18:40:39 <ais523> ehird`: it depends on definition and which language extensions you allow
18:40:53 <ais523> the CLC-INTERCAL compiler is written in a set of extensions that are added to the language itself
18:40:58 <ais523> so it is a self-compiler, in some sense
18:41:09 <ehird`> ais523: hm, definition being something basically like C-INTERCAL. But written in INTERCAL, of course... well, it could compile to anything 'real' (C, native code, asm, ...)
18:41:18 <ais523> even though the commands used to write the compiler are entirely disjoint from the ones used to write programs
18:41:20 <ehird`> language extensions: I guess C-INTERCAL, since it's the most common afaik
18:41:35 <ais523> C-INTERCAL: 33 users. CLC-INTERCAL: 5 users.
18:41:42 <ais523> C-INTERCAL: 33 users. CLC-INTERCAL: 21 users, sorry
18:41:44 <ehird`> popular stuff ;)
18:41:47 <SimonRC> self-compiling INTERCAL would instantly wreck the passtime of proposing new INTERCAL extensions
18:41:50 <ais523> source: Debian popularity contest
18:41:57 <ehird`> SimonRC: why?
18:42:06 <ehird`> C-INTERCAL is incompatible with CLC-INTERCAL, right?
18:42:09 <SimonRC> because people CBA to implement them
18:42:12 <ais523> the same source says that 5 people actually use C-INTERCAL and 3 people use CLC-INTERCAL every now and then
18:42:14 <ehird`> i have seen 2 clc-intercal only programs, though, so...
18:42:25 <ais523> they are not completely incompatible, especially in the most recent versions
18:42:36 <ais523> but it is possible to write C-INTERCAL or CLC-INTERCAL-only programs
18:42:43 <ais523> by using language features that are in one but not the other
18:42:53 <ehird`> ais523: are there any overlapping features?
18:42:58 <ais523> lots
18:42:59 <ehird`> i'd say: most likely.
18:43:05 <ehird`> and duplication of that sort is, yeah.
18:43:07 <ais523> computed COME FROM, basic operand overloading, etc.
18:43:16 <ehird`> ais523: which would you say would be best as a 'pseudo standard'?
18:43:25 <ais523> see the C-INTERCAL documentation at intercal.freeshell.org
18:43:33 <ais523> it lists portability for all the constructs in C-INTERCAL
18:43:49 <ais523> the pseudo standard is likely just INTERCAL-72 + noncomputed COME FROM
18:43:58 <ais523> because most of the other features only exist in C- and CLC-INTERCAL
18:44:05 <ais523> not J-INTERCAL
18:44:07 * SimonRC likes the enabling and disabling of statements for communication of parallel processes
18:44:15 <ehird`> ais523: what fun
18:44:32 <SimonRC> I though COME FROM was in '72
18:44:35 <ais523> I spent ages writing that documentation, so it would be satisfying for me if lots of people read it
18:44:47 <ais523> SimonRC: no it wasn't, although as far as I could tell it was also invented in 1972
18:44:52 <ais523> it just wasn't added to INTERCAL until later
18:44:55 <ehird`> ais523: ok, to start with: a self-compiling, no-extensions INTERCAL compiler
18:45:04 <ehird`> that compiles to C, asm, native code, or some other similar 'real' target language.
18:45:12 <ehird`> feasability=
18:45:23 <ais523> without extensions a machine-translation from something like Brainfuck might be the best bet
18:45:34 <oerjan> ehird`: binary output is an extension :D
18:45:37 <ehird`> hmm, that was the kind of thing i was saying against, ais523
18:45:41 <ehird`> oerjan: OK fine with that :P
18:45:55 <ais523> it wouldn't be too bad trying to do it directly, though, apart from the expression syntax and the fact that you have to allow character I/O somehow
18:46:11 <ehird`> C-intercal presumably has a char IO extension
18:46:13 <ehird`> so i'd say that
18:46:25 <ehird`> wait, ESR maintained C-intercal at one point, didn't he?
18:46:28 <ais523> character I/O is different in C-INTERCAL and CLC-INTERCAL, but both have command-line switches to use the other's semantics
18:46:29 <ehird`> OK, CLC-Intercal! :P
18:46:32 <ais523> ehird`: yes
18:46:39 <ais523> it was C-INTERCAL
18:46:46 <ehird`> yes, that's what i meant
18:46:58 <ehird`> => OK, let's take the char I/O for CLC-Intercal then ;)
18:47:09 <ais523> Baudot is a pain to deal with
18:47:15 <ais523> but I think that was the point
18:47:24 <ais523> also, you have to know in advance how long the lines can be
18:47:32 <oerjan> bad dots?
18:47:39 <oerjan> or would that be braille
18:47:46 <ehird`> ais523: suggest a solution that fits neatly with my dislike of ESR and my dislike of THAT!
18:48:07 <ehird`> ;)
18:48:21 <ais523> well, you could use one of CLC-INTERCAL's multithreading extensions to trap the error
18:48:30 <ehird`> haha wow, that's evil
18:48:36 <ais523> I'm planning to implement much the same error-trapping method in C-INTERCAL at some point, by the way
18:48:56 <ais523> the way it works is that there's a variable * that holds the most recent error
18:49:09 <ais523> but an error kills the thread, so you have to receive it in some different thread
18:49:22 <ais523> but reading from * when there hasn't been an error causes an error, so to trap the error you need three threads
18:49:33 <ehird`> ais523: OK, assuming C-INTERCAL binary IO etc extensions, feasability=
18:49:40 <ehird`> (it must be able to compile itself still, obviously)
18:49:43 <ais523> one which contains the error you're trying to trap, one that errors out instantly to put a value in *, and one that does the trapping
18:49:51 <ehird`> not all the cintercal extensions presumably though
18:49:54 <ais523> feasability=reasonable but a lot of work
18:49:58 <ais523> mostly due to the expression syntax
18:50:28 <ais523> incidentally, I recently discovered an easy way for an INTERCAL program to tell which interpreter it's running under
18:50:50 <ehird`> how?
18:50:54 <ais523> IGNORE a variable, STASH it, change its value, RETRIEVE it, save that value, then change the variable to a new value to test if it's read only
18:51:26 <ais523> J-INTERCAL ignores the read-only flag on STASH or RETRIEVE, so the value STASHED is viewed twice
18:52:21 <ais523> sorry, I meant STASH a variable, change its value, IGNORE it, RETRIEVE it, save that value, then change the variable to a new value to test if it's read only
18:52:30 <ais523> so J-INTERCAL reads out the original value twice
18:52:37 <ais523> C-INTERCAL reads out the new value twice
18:52:47 <ehird`> and CLC?
18:52:58 <ais523> and CLC-INTERCAL reads out the new value, but the non-IGNOREd status is stashed along with the variable, so you get two different answers
18:53:14 <ehird`> ooooh, there's a unlambda-in-intercal...
18:53:15 <ehird`> what about...
18:53:18 <ehird`> INTERCAL IN UNLAMBDA
18:53:19 <ehird`> :D
18:53:37 <ais523> I can't think of a decent way to write an expression parser in that either
18:53:45 <ais523> there are some crazy corner cases
18:54:04 <ais523> one of which is specifically disallowed both by the INTERCAL-72 and C-INTERCAL documentation because it's such a pain to parse
18:54:15 <ais523> and therefore can be said to not be legal INTERCAL
18:54:27 <ehird`> which case is that?
18:54:53 <ais523> .1 <- ,3SUB",2SUB.1".2~.3"".4
18:55:02 <ehird`> ... nested quotes.
18:55:04 <ehird`> y/n
18:55:20 <ais523> to be precise, nested quotes interacting with nested multidimensional arrays
18:55:35 <ehird`> it has nested quotes even without N>1-d arrays?
18:55:36 <ais523> the problem is that .1 <- ,3SUB",2SUB.1".2 is a legal statement
18:55:37 <ehird`> bizzare
18:55:53 <ais523> but the second set of ears have a different meaning in the two statements
18:56:07 <ais523> and there could be any number of characters that need to be read before it could determine which is which
18:56:36 <ais523> come to think of it, .1 <- ,3SUB",2SUB.1".2~.3".5".4 is truly ambiguous
18:56:48 <ais523> but as it's not fully grouped with sparks and ears, it's illegal anyway
18:57:09 <ehird`> hmm:
18:57:21 <ais523> when arrays aren't involved, it's possible to tell a begin quote from an end quote by checking which side of it the operator is on
18:57:36 <ais523> but the multidimensional array syntax looks like DO .1 <- .3SUB#4#5#6#7
18:58:00 <ais523> no operators that might work to disambiguate
18:58:15 <ehird`> my abstraction eliminator will be interesting...
18:58:15 <ehird`> ``skk -> (\z. kz(kz)) -> (\z. z)
19:06:45 <ais523> I had an interesting Underload optimiser, before I deleted it by mistake
19:06:49 <ais523> but it would be easy to recreate
19:07:06 <ais523> if you translated sii from Unlambda to Underload using the translations on the wiki
19:07:15 <ais523> it came out with (^:)^:
19:07:23 <ais523> sorry, ```sii``sii
19:07:30 <ais523> transformed to (^:)^:
19:15:50 <ais523> the idea is that in most cases it doesn't matter whether evaluation is lazy or eager
19:16:29 <ais523> and so you can partially evaluate code before it gets duplicated later
19:16:36 <ais523> as long as you don't run S commands by mistake
19:25:26 <ehird`> ais523: by the way, my underload to C compiler is broken. i've started a rewrite, but eh
19:25:33 <ehird`> theoretically, its OK though, just a bug :-)
19:25:43 <ais523> in what way does the bug manifest?
19:26:00 <ehird`> i'm not entirely sure... take a look at the fibonacci program output
19:26:32 <ehird`> */*/**/*************(enough *s to break my terminal's display procedures...)SEGFAULT
19:26:57 <ais523> I wonder what goes wrong to cause that to happen?
19:27:09 <ais523> maybe a problem with *, or :?
19:27:39 <ehird`> yeah i'm not sure
19:27:57 <ehird`> originally dup was just pushing the same object instead of copying. but i fixed that, and it still happens
19:28:44 <ais523> could you paste the generated C somewhere so I could take a look?
19:34:35 <ehird`> ok.. it's highly ugly, written-quickly crap though
19:35:34 <ehird`> http://rafb.net/p/dXRULi17.html
19:36:19 <ehird`> the non-prewritten stuff starts at:
19:36:22 <ehird`> void ul_func_0(void);
19:36:27 <ehird`> and ends at
19:36:30 <ehird`> int main(void) {
19:38:15 <ehird`> ais523: side note: * can be made efficient in that by adding:
19:38:19 <ehird`> struct _ul_obj *last;
19:38:21 <ehird`> to ul_obj
19:38:32 <ehird`> and then going straight ot that in * and updating it
19:38:41 * ais523 is looking at the code right now
19:40:09 <ais523> the problem is that a : command isn't duplicating inner or cdr
19:40:24 <ais523> (it doesn't duplicate str either, but that isn't needed because the strings never change)
19:40:50 <ais523> to work properly you'd need to recursively duplicate TOS, not just its car
19:42:33 <ehird`> I shall fix
19:45:31 <ehird`> ais523: I can get rid of cdr, and jus thave last
19:45:37 <ehird`> since you can't do anything with them
19:45:38 <ehird`> they're immutable
19:45:39 <ehird`> right?
19:45:58 <ehird`> oh, no
19:46:01 <ehird`> ul_call needs it ofc
19:46:05 <ais523> without cdr you couldn't eval or print
19:46:17 <ehird`> yeah
19:46:22 <ehird`> ok, : will be slow
19:46:33 <ehird`> since it needs to copy all cdrs, right?
19:46:38 <ais523> I think so
19:46:48 <ais523> but a copy that isn't O(n) is impossible to achieve in general anyway
19:47:29 <ais523> unless copy-on-write semantics work, and they don't because of the possiblity of code like :(a)*~(b)*
19:47:52 <ais523> at least, copy-on-write wouldn't prevent the copy for ever so it wouldn't speed up the program
19:49:34 <ehird`> */*/**/***zsh: segmentation fault ./blah
19:50:08 * ehird` pastes
19:50:11 <SimonRC> htf does it segfault?
19:50:19 <ehird`> SimonRC: intelligently.
19:50:25 <SimonRC> huh?
19:50:37 <ehird`> :D
19:50:41 <ehird`> okies:
19:50:42 <ehird`> http://rafb.net/p/Wh5hpI14.html
19:50:49 <ehird`> probably have a dumb obvious error in ul_copy
19:52:50 <ais523> well, the return statement is obviously in the wrong place, but I don't see why that would affect the code because you never use the return value
19:53:02 <ehird`> ais523: yes i do
19:53:05 * SimonRC goes (food, bed, etc)
19:53:09 <ehird`> it->last = ul_copy(src->cdr, &it->cdr);
19:53:10 <ais523> no, you do use the return value; that's why you get the segfault
19:53:20 <ehird`> it returns the 'end' object
19:53:23 <ehird`> i.e. that which ->cdr = null
19:53:31 <ais523> only if !src->cdr
19:53:39 <ais523> because you put it inside the else part of that if by mistake
19:53:39 <ehird`> um yes
19:53:42 <ais523> rather than after the if
19:53:42 <ehird`> no
19:53:44 <ehird`> that's on purpose...
19:53:51 <ehird`> read the code
19:53:53 <ais523> why?
19:53:54 <ehird`> I assign to ->last
19:54:02 <ehird`> which wants to be the object without a cdr, because its' the object at the end
19:54:07 <ehird`> which is why i return when ->cdr == NULL
19:54:26 <ais523> well, returning garbage is normally bad form which gcc will warn you about
19:54:33 <ehird`> it isn't garbage
19:54:34 <ehird`> it retusn it
19:54:37 <ehird`> not it->cdr
19:55:01 <ais523> the function returns garbage if it doesn't reach a return statement
19:55:04 <ais523> like all functions in C do
19:55:33 * oerjan senses a d'oh approaching soon...
19:55:38 <ehird`> D'oh!
19:55:40 <ais523> say you have a list of three elements
19:55:55 <ais523> then last is set on the second element of the list not the first
19:56:12 <ais523> so if cdr isn't null, you want to return its last as the function's return value
19:56:24 <ehird`> if (src->cdr) { return (it->last = ul_copy(src->cdr, &it->cdr)); }
19:56:26 <ehird`> looks right to me
19:56:32 <ehird`> i did that before you said that heh
19:56:34 <ais523> and besides, shouldn't the last for a one-element list point to itself?
19:56:41 <ehird`> hmm
19:56:43 <ais523> otherwise you could never append to it
19:56:44 <ehird`> recursive structures + c scares me
19:56:46 <ehird`> and yeah, i can
19:56:49 <ehird`> i check for null in append
19:56:53 <ehird`> and set that, and cdr
19:57:11 <ehird`> wait
19:57:13 <ehird`> you're right
19:57:13 <ehird`> OK
19:57:49 <ais523> with those two corrections, hopefully it should work
19:58:23 <ehird`> % ./blah
19:58:24 <ehird`> *zsh: bus error ./blah
19:58:30 <ehird`> probably a trivial bug.
19:58:43 <ehird`> its in ul_concat() sez gdb
19:58:55 <ais523> so likely last being wrong, in that case
19:59:03 <ehird`> tmp = ul_pop(); tmp2 = ul_stack->top; tmp2->last->cdr = tmp; tmp2->last = tmp->last;
19:59:07 <ehird`> the bulk of ul_concat() ^^^
19:59:12 <ehird`> yeah, most likely
19:59:17 <ehird`> time to search for ->last uses
19:59:27 * ais523 has had similar problems trying to deal with the C-INTERCAL multithreader
19:59:32 <ais523> which uses similar sorts of lists
19:59:37 <ehird`> btw
19:59:49 <ehird`> if (src->cdr) { return (it->last = ul_copy(src->cdr, &it->cdr)); } else { it->last = it; it->cdr = NULL; return it; }
19:59:51 <ehird`> that's the new code
19:59:56 <ehird`> hmm, wait
19:59:57 <ehird`> i never set cdr
20:00:05 <ehird`> wait
20:00:06 <ehird`> Yes I Do.
20:00:37 <ehird`> 86tmp2->last->cdr = tmp;
20:00:39 <ehird`> that's the dying line
20:00:40 <ehird`> not suprising
20:00:50 <ehird`> (gdb) p tmp2->last
20:00:50 <ehird`> $2 = (struct _ul_obj *) 0x0
20:01:08 <ehird`> oh
20:01:08 <ehird`> duh
20:01:11 <ehird`> it's an 'inner'-val
20:01:19 <ehird`> which i dont set ->last on, oops
20:01:45 <ais523> I was about to say the same thing: line 26 in ul_push sets ->last to NULL rather than self
20:01:53 <ehird`> no
20:01:53 <ehird`> not that
20:01:56 <ehird`> that's fixed by now
20:01:57 <ehird`> but ul_wrap.
20:01:59 <ais523> because you special-cased taht
20:02:09 <ehird`> ais523: the fib program runs crazy fast
20:02:20 <ais523> is it working now?
20:02:38 <ehird`> the horiz scrollbar on my terminal goes to the smallest it can as soon as the program starts
20:03:07 <ais523> you could pipe it through head, I suppose
20:03:14 <ehird`> ais523: just saying, it's that fast
20:03:18 <ehird`> ais523: also head works on lines :P
20:03:27 <ehird`> ais523: oh yeah, and this is with just "gcc blah.c -o blah"
20:03:29 <ehird`> no optimization
20:03:29 <ais523> head has an option to work on chars instead
20:03:36 <ais523> and I'm not surprised by the speed
20:03:48 <ehird`> compiled with -O2 now, i'm going to pipe it to a file for approx 10 secs then wc -c it
20:04:01 <ehird`> shit.
20:04:02 <ehird`> zsh: segmentation fault ./blah > fibs
20:04:02 * ais523 will have to make another try to write the Unlambda -> Underload compiler
20:04:16 <ais523> out of memory or out of stack, maybe?
20:04:24 <ehird`> stack.
20:04:27 <ehird`> i just realised...
20:04:32 <ais523> most likely out of stack with recursive calling on a ridiculously long list
20:04:32 <ehird`> ul_call is tail-recursive.
20:04:33 <ehird`> but ->fp
20:04:35 <ehird`> can call ul_call
20:04:36 <ehird`> etc
20:04:43 <ehird`> and no, ul_call uses goto for ->cdr
20:04:51 <ehird`> afaics there is no solution...
20:04:57 <ehird`> you NEED to retain the stack
20:05:00 <ais523> I think it's more that ul_copy is unlikely to be tail-recursed by a C compiler
20:05:01 <ehird`> because it contains useful stuff.
20:05:14 <ehird`> ais523: ul_copy can't be tail-recursive
20:05:19 <ehird`> anyway
20:05:21 <ehird`> one way to settle this
20:05:22 <ehird`> GDB!
20:05:26 <ais523> oh, of course
20:05:41 <ais523> but the same code might be possible to write with a while loop if you made two passes
20:05:48 <ehird`> ais523: i guess
20:05:52 <ehird`> not nearly as fast though...
20:05:56 <ehird`> woah
20:05:57 <ehird`> ais523:
20:05:59 <ehird`> it was ul_copy
20:06:01 <ais523> recursing for inner, because that grows slower than cdr
20:06:08 <ehird`> i just typed 'bt' and for many seconds i've been getting ul_copy stack frames
20:06:11 <ais523> and using iteration for cdr
20:06:15 <ehird`> over and over and over and over and over and over and over..............
20:06:23 <ehird`> ais523: can i make both iterative?
20:06:32 <ehird`> over 40000 so far
20:06:33 <ehird`> sheesh
20:06:40 <ehird`> 50000
20:06:45 <ais523> there's probably some way, but I can't figure it out in my head in a few minutes
20:07:05 <ais523> and it would be inefficient without an uncdr link that pointed the other way
20:07:11 <ais523> no it wouldn't
20:07:20 <ais523> you could iterate once setting cdrs and finding out last
20:07:27 <ais523> and then iterate a second time setting last all along the list
20:07:43 <ais523> in fact, last doesn't matter except at the start of the list, so you'd only have to set it there
20:08:02 <ais523> doing inner recursively would be harder
20:08:39 <ehird`> ais523: 130998 frames of ul_copy
20:08:42 <ehird`> i think whatever it takse i need iterative
20:09:03 <ehird`> ais523: so if you think of a way to do both without recursing...
20:09:14 <ehird`> also ul_call without recursing would be nice... wait... i guess i could do TCO
20:09:20 <ehird`> ais523: are there many tail calls in unlambda?
20:09:34 <ehird`> and are they very literal: last command in (...) is ^?
20:09:35 <ais523> ```sii``sii is tail recursive
20:09:42 <ehird`> i mean in real programs liek the fibonacci
20:09:45 <ais523> and most loops work with the same principle
20:09:49 <ais523> and ^ is always the last command
20:09:50 <bsmntbombdood> EXTEREME TAIL RECURSION
20:09:54 <ais523> or almost always
20:10:03 <ehird`> err
20:10:05 <ehird`> UNDERLOAD
20:10:06 <ehird`> UNDERLOAD
20:10:21 <ais523> I write loops with (blah):^ normally
20:10:25 <ais523> and such loops are tail recursive
20:10:35 <ehird`> ais523: ((hi)S):^S
20:10:38 <ehird`> produces:
20:10:40 <ehird`> hi(hi)S
20:10:52 <ehird`> even fib has non-tail-call
20:10:53 <ehird`> two of them
20:10:54 <ehird`> (()(*))(~:^:S*a~^a~!~*~:(/)S^):^
20:11:09 <ais523> because the ^ is often used for non-looping purposes
20:11:20 <ehird`> ais523: if i just keep my own stack, it'll be little more efficient than a good interp
20:11:21 <ehird`> right?
20:11:24 <ais523> there it's used to split the top stack element from ((abc)(def)) to two elements (abc) and (def)
20:11:35 <ais523> and keeping your own stack is likely to be the only option in some cases
20:11:45 <ais523> because the original program may not be written in a tail-recursive way
20:11:48 <ehird`> but it won't even be fast
20:12:00 <ais523> of course, when the original programmer runs out of stack space, you can then blame it on them
20:12:03 <ehird`> it'll be about as good as a c interpreter..
20:12:22 <ais523> I think it's possible without maintaining your own function stack in most cases
20:13:16 <ehird`> ais523: but don't you agree about the speed thiing?
20:13:25 <ais523> speed is important
20:13:28 <ehird`> exactly
20:13:39 <ais523> and I think ul_eval will run out of stack long after ul_copy does
20:13:43 <ehird`> keeping my own stack will be bsically the same speed as a c interp
20:13:50 <ehird`> OK then
20:13:52 <ehird`> and its ul_call
20:13:56 <ehird`> no eval happens! :)
20:14:33 <ais523> if you have a pointer to the cdr of whatever you're calling, then you can append it to the thing you call rather than its original location and make ul_call tail-recursive that way
20:14:39 <ais523> I think, it's a little hard to work out the details
20:15:05 <ehird`> append will just set cdr though
20:15:28 <ais523> but you can't append to a program while it's running, so the problem never comes up
20:15:32 <ais523> I think
20:15:48 <ehird`> i don't really understand
20:15:56 <ehird`> anyway, there's a problem ais523
20:16:01 <ais523> what?
20:16:06 <ehird`> if i want to optimize tailcalls
20:16:09 <ehird`> i need to either:
20:16:11 <ehird`> 1. do stack smashing
20:16:17 <ehird`> 2. use goto labels and keep my own stack for non-tailcalls
20:16:19 <ehird`> neither is feasable
20:16:23 <ais523> setjmp!
20:16:24 <ehird`> don't you love C for not having tailcalls?
20:16:30 <ais523> sorry, I'm too much of a fan of setjmp
20:16:35 <ehird`> setjmp won't work for it
20:16:53 <ais523> actually, the usual way to tail-recurse in C is to goto the start of the function rather than calling it
20:17:02 <ais523> after setting all the args to the right values
20:17:17 <ais523> so instead of return myself(a1,b1,c1);
20:17:25 <ehird`> ais523: tail calls don't have to be to the same functions
20:17:27 <ehird`> that's TAIL RECURSION
20:17:30 <ais523> you do a=a1; b=b1; c=c1; goto myself_top
20:17:42 <ais523> I was giving a description of tail-recursion
20:17:45 <ais523> general tail-calls are harder
20:17:51 <ehird`> i have an idea, actually
20:17:58 <ehird`> have one dispatcher function, underload()
20:18:01 <ehird`> have it like this:
20:18:24 <ehird`> ok, il'l take an example program
20:18:27 <ehird`> (:^):^
20:18:29 <ehird`> that's:
20:18:31 <ehird`> in underload():
20:19:09 <ehird`> push(f1, ":^"); dup(); discard(); goto f1;
20:19:20 <ehird`> err
20:19:21 <ehird`> wait no
20:19:23 <ehird`> it's like this:
20:19:39 <ehird`> wait, wait
20:19:42 <ehird`> i'llw rite it in a file
20:19:43 <ehird`> then paste it.
20:20:05 <ais523> my earlier idea for preventing recursive stack usage in ul_call was to check if fp was ul_call in the o->fp(); line; if it was, instead of calling ul_call, you append o->cdr to the end of TOS, and then set o to TOS, after popping the TOS
20:20:33 <ais523> so that the return address is saved by the cdr pointer on the end of TOS, rather than on C's stack
20:20:37 <ais523> it should be just as fast, or faster
20:22:37 <ehird`> ais523: http://rafb.net/p/VwMkyk23.html
20:22:52 <ehird`> and, for normal calls, you can just do basically underload(tmp->label)
20:22:58 <ehird`> clever/not clever?
20:23:55 <ais523> that's the same technique C-INTERCAL uses, pretty much
20:24:04 <ais523> except that it maintains its own stack for normal calls
20:24:16 <ehird`> MINE IS BETTER! It uses the highly efficient C stack.
20:24:19 <ehird`> :D
20:24:26 <ais523> although I'm planning to make it use the real C stack for all calls at some point in the future
20:24:40 <ais523> so you can intersperse code that wasn't compiled from INTERCAL
20:24:51 <ais523> anyway, I should have gone half an hour ago
20:25:09 <ehird`> aww, bye then :)
20:25:10 <ais523> but I'll see if I can work out non-stack-gobbling versions of your C utility functions when I'm at home
20:25:21 <ehird`> OK
20:25:22 <ehird`> bye :)
20:25:23 <ais523> unless I have to do something else...
20:25:26 -!- ais523 has quit ("bye").
20:37:22 -!- RedDak has joined.
20:38:27 <ehird`> so now my Underload (...)s are no longer functions
20:38:29 <ehird`> what should i call them?
20:38:31 <ehird`> subprograms?
20:40:58 <oerjan> blimps
20:41:06 <ehird`> oerjan: i like it
20:41:55 <ehird`> oerjan: it's a good thing gcc can optimizes heavily.
20:41:58 <ehird`> *optimize
20:42:05 <ehird`> it'll make these programs Really Damn Fast(TM)
20:42:19 <ehird`> probably better than if i compiled them to machine code
20:47:15 <ehird`> oerjan: still, it'll always get slower over time
20:47:26 <ehird`> eventually taking years to perform one duplication.
20:47:44 <ehird`> unlike, say, an interp, where you can easily just concat the code and it's constant
21:32:59 <GregorR> <ehird`> what should i call them?
21:33:07 <GregorR> Depends on what they actually /do/ if they're not functions :P
21:33:36 <ehird`> ((ab)cd)ef
21:33:38 <ehird`> gets unrolled.
21:33:52 <ehird`> i.e. the nesting is removed and each was previously made into a function but now they're made into "case"s in switches
21:33:57 <ehird`> they're called 'blimps' now.
21:40:59 <ehird`> GregorR: my new compiler appears to work, apart from output with stuff wrapped by a
21:41:18 <ehird`> and, of course, dup is still recursive and could die without warning
21:42:09 <ehird`> it produces neatly indented C and you can either have checks & nice error messages, or no checks and no error messages and SPEED
21:42:41 <ehird`> oh dear
21:42:45 <ehird`> i can has memleak in (:^):^?
21:42:54 <ehird`> need more free()ing in the prelude methinks
21:43:18 <ehird`> hm, no
21:43:20 <ehird`> nothing i can do
21:43:22 <ehird`> its perfect
21:45:44 -!- jix has quit ("CommandQ").
21:46:05 <ehird`> ok, output works now
21:46:26 <ehird`> and it even does TCO!
21:47:57 <ehird`> actually, TCO of underload is trivial
21:48:07 <ehird`> since it'll ALWAYS be the last instruction in your () or program
21:48:20 <ehird`> Shit % ./quine
21:48:20 <ehird`> zsh: segmentation fault ./quine
21:48:30 <ehird`> err
21:48:32 <ehird`> actually a factorial
21:48:34 <ehird`> but i call it quine :P
21:48:42 <oerjan> o_O
21:48:55 <ehird`> oerjan: "runscheme unlambda.scm > quine.c" in history...
21:49:04 <ehird`> ah crap
21:49:18 <ehird`> another lovely mutuually-recursive functions
21:49:23 <ehird`> overloading the c stack
21:49:37 <ehird`> umm
21:49:42 <ehird`> over 85000
21:49:45 <ehird`> 90000
21:49:47 <ehird`> stack frames..
21:49:50 <ehird`> :|
21:50:16 <ehird`> Do I have a bug or does the factorial prog really curse tat much
21:50:37 * ehird` runs it in the JS interp and sees
21:50:43 <ehird`> well, there was an awful lot..
21:51:24 <ehird`> Yep, most definately.
21:51:29 <ehird`> A bug.
21:51:46 <ehird`> oerjan: My C is indented now. You must read it! :P
21:52:05 * oerjan runs away screaming
21:53:31 <ehird`> oerjan: http://rafb.net/p/ubHcrP65.html Have fun!
21:53:39 <ehird`> :D
21:54:06 <ehird`> there should be a trivial infinite loop, actually...
21:54:14 <ehird`> it's 1 and 5
21:54:19 <ehird`> they call each other until the stack runs out
21:54:28 <ehird`> Wait, WTF?
21:54:32 <ehird`> How can that happen?
21:54:59 <ehird`> oh
21:55:01 <ehird`> 0 and 5.
21:55:11 <ehird`> Weird, how can 5 call 0?
21:55:44 <oerjan> why is 6 afraid of 8?
21:55:49 <oerjan> er wait
21:55:55 <oerjan> of 7
21:56:12 <ehird`> groan
21:56:23 <ehird`> but seriously: 0 is the main program, and is never pushed to the stack
21:56:27 <ehird`> how does 5 call it?
21:58:09 <ehird`> oerjan: DOEST THOU KNOWEST?
21:58:17 <ehird`> oh duh
21:58:26 <ehird`> i totally don't handle one thing properly
21:58:27 <ehird`> cdr.
21:58:30 <ehird`> or inner.
22:01:04 -!- GreaseMonkey has joined.
22:03:00 <ehird`> yikes
22:03:05 <ehird`> i'll be inlining a lot of code with CALL
22:17:57 <ehird`> anyone know if 5a636f6c is some kind of magic number?
22:19:29 <ehird`> hmm
22:19:35 <ehird`> anyone alive? GregorR? oerjan?
22:19:39 <ehird`> oklokok?
22:19:59 <ehird`> could you run this: http://rafb.net/p/cpVqur31.html (just "gcc blah.c -o blah") and tell me if it segfaults or what?
22:20:05 <ehird`> and if it segfaults, the last number it prints out
22:22:39 <ehird`> anyone?! :P
22:22:41 <ehird`> GreaseMonkey?!
22:22:47 <ehird`> pikhq?
22:22:51 <ehird`> Slereah?
22:23:52 <GreaseMonkey> ehird`?
22:23:53 -!- RedDak has quit ("I'm quitting... Bye all").
22:24:09 <ehird`> GreaseMonkey: see my previous message
22:24:15 <ehird`> just before "and if it segfaults,"
22:25:27 <pikhq> No?
22:25:38 <ehird`> pikhq: No what
22:25:57 <GreaseMonkey> doesn't segfault here
22:26:19 <ehird`> ok
22:26:28 <ehird`> can you both copy the output, all of it, and paste that somewhere?
22:26:30 <ehird`> very curious..
22:28:24 <GreaseMonkey> http://rafb.net/p/t6PgUx72.html
22:29:13 <pikhq> 6044d0
22:29:21 <pikhq> No segfault.
22:29:36 <GreaseMonkey> ok, i run linux, i'm assuming pikhq runs windows
22:29:44 <GreaseMonkey> you can tell by the pointers
22:29:53 <pikhq> x86_64-pc-linux-gnu
22:29:58 <GreaseMonkey> wtf?
22:30:21 <ehird`> GreaseMonkey: hmm, but no actual output apart from that?
22:30:32 <GreaseMonkey> nope
22:30:39 <ehird`> no factorial output even?
22:30:40 <ehird`> hm
22:30:42 <ehird`> can you do:
22:30:45 <ehird`> compile it with -g
22:30:48 <ehird`> gdb it
22:30:51 <ehird`> start; cont
22:30:52 <ehird`> bt
22:30:57 <ehird`> and give me the first few lines of backtrace?
22:31:04 <GreaseMonkey> same output with g
22:31:12 <GreaseMonkey> actually, just a mo
22:31:24 -!- oerjan has quit ("Good night").
22:32:42 <GreaseMonkey> #0 _copy (src=0x804b008, dest=0xbfa170d4) at poop.c:65
22:32:46 <GreaseMonkey> #1 0x080487b0 in dup () at poop.c:91
22:32:46 <GreaseMonkey> #2 0x08048c1e in dispatch (o=0x804b058) at poop.c:223
22:32:46 <GreaseMonkey> #3 0x08048bd0 in dispatch (o=0x0) at poop.c:207
22:32:46 <GreaseMonkey> #4 0x08048e38 in main () at poop.c:303
22:33:00 <GreaseMonkey> (on the second _copy)
22:33:44 <ehird`> the second _copy?
22:33:50 <ehird`> explain! :P
22:33:52 <GreaseMonkey> well, second time it breaks
22:34:09 <GreaseMonkey> (i set a breakpoint on _copy)
22:34:14 <ehird`> oh
22:34:15 <ehird`> don't :P
22:34:21 <ehird`> $ gdb poop
22:34:24 <ehird`> > start; cont; bt
22:35:55 <GreaseMonkey> Program exited normally.
22:35:56 <GreaseMonkey> (gdb) bt
22:35:56 <GreaseMonkey> No stack.
22:36:06 <ehird`> ah, this is a good point ;)
22:36:22 <ehird`> hmm
22:36:32 <ehird`> if only it would fail so i could see what its doing :P
22:37:58 <ehird`> hello, VERSIONer GreaseMonkey ;)
22:38:05 <GreaseMonkey> OSX, huh?
22:38:09 <ehird`> OS X indeed
22:38:25 <GreaseMonkey> pOSiX
22:39:51 <ehird`> hehe
22:39:59 <ehird`> it's certified UNIX now!
22:52:47 <ehird`> GreaseMonkey: pikhq ping2
22:52:51 <ehird`> http://rafb.net/p/1qEvhC25.html
22:52:53 <ehird`> what about this?
22:53:02 <ehird`> for me the last thing it prints is "16", then bus error
22:53:04 <ehird`> (segfault)
22:56:18 <GreaseMonkey> 804cfc8
22:56:19 <GreaseMonkey> 0 ERROR -- ~ on stack of less than 2 elements
22:56:19 <GreaseMonkey> Program exited with code 01.
22:56:43 <ehird`> :| Wtf.
22:56:52 <GregorR> (I'll certify YOU as UNIX)
22:57:38 <ehird`> OK, on another topic...
22:57:51 <ehird`> Someone implement CRTL and also suggest a way I could add arbitary output to it elegantly!
22:57:54 <timotiis> speaking of macs, what do people think of the Macbook Air?
22:58:11 <ehird`> timotiis: flimsy, plastic-looking, far too expensive, only one usb port, no ethernet, no optical drive, ...
22:58:22 <ehird`> Right now you can't output any arbitary string in your program
22:58:23 <timotiis> ehird`: oh yeah. But damn slick
22:58:29 <ehird`> since you need to include your state in it too and parse it back
22:58:30 <ehird`> So yeah.
22:58:33 <Asztal> 4 hours battery life.
22:58:34 <ehird`> timotiis: No. It's kind of ugly.
22:58:50 <Asztal> wait, 5.
23:00:26 <timotiis> ehird`: I like the look, and I'm fairly impressed with the engineering. I was raised on macs though, so I probably have an ingrained bias
23:00:40 <ehird`> I'm a linux convert.
23:00:45 <timotiis> I've just ordered myself an Eee
23:00:52 <ehird`> For about a year now.
23:01:12 <ehird`> iMac, sept 06 model (I was obsoleted so quick! :P)
23:01:25 <timotiis> I've been linux only for myself for the last year or two (closer to two now), and macs before that
23:01:28 <ehird`> i probably don't take as much advantage of OS X as I could
23:01:40 <ehird`> but it's probably my first machine that wasn't behind when i bought it :-)
23:01:58 <ehird`> timotiis: from linux, not to
23:01:58 <timotiis> heh, this box here is hideously behind
23:02:17 <timotiis> ah, I went to linux from OS X
23:02:52 <timotiis> da, I just find it too inflexible, really. whaddya mean I can't totally change window managers in 10 minutes?
23:05:31 <ehird`> you can run X11 on OS X!
23:09:00 -!- tesseracter has quit ("Buh-Bye").
23:09:08 <ehird`> awkward silence
23:09:40 -!- timotiis has quit ("leaving").
23:21:08 <ehird`> I wonder if there's a window manager in 100 lines of C
23:33:19 <ehird`> anyone? ;)
23:34:35 <Asztal> take twm and strip all the newlines
23:34:50 <Asztal> (cheating, I know ;)
23:35:05 <ehird`> heh
23:35:11 <ehird`> xmonad is <500, but it's haskell
23:35:54 <ehird`> dwm is <2000...
23:36:59 <ehird`> oh yeah 9wm is pretty tiny too
23:37:57 <ehird`> ooh
23:38:04 <ehird`> there's a 58 lines-of-c one
23:38:39 <Asztal> I bet that's pretty minimal...
23:39:20 <ehird`> it has sloppy focus
23:39:50 <ehird`> its in debian
23:39:52 <ehird`> 'tinywm'
23:40:07 <ehird`> http://incise.org/index.cgi/TinyWM
23:40:18 <ehird`> there's a port to python, and lisp
23:41:15 <ehird`> haha tinywm is just a main()
23:42:25 <ehird`> i do wish there was a way to write WMs for os x though
23:43:30 <GregorR> Windows Medias?
23:43:46 <pikhq> Window managers.
23:43:57 <pikhq> And there is.
23:44:07 <pikhq> X.org runs on OS X. ;)
23:44:23 <pikhq> You can even get it to replace Aqua.
23:45:08 <ehird`> Duh, I know that.
23:45:19 <ehird`> I meant integrated with Aqua
23:45:20 <ehird`> non-X11
23:45:24 <pikhq> I know what you *actually* mean, though.
23:46:04 <pikhq> The answer to that, of course, is, "don't use nonfree software."
23:47:05 <ehird`> pikhq: You know what's more annoying than Mac zealots? Anti-mac zealots.
23:47:17 <pikhq> ehird`: I'm just anti-nonfree-software.
23:47:54 * ehird` should really write a page on this sometime so he can just link people to it instead of debating with them
23:48:37 * pikhq should just get a copy of "Free Software, Free Society" so he can just hand it to people instead of debating with them
23:49:12 <pikhq> Why will I not use Mac OS?
23:49:24 <pikhq> Actually, I will. . . The minute I have a source tarball in my hands.
23:49:34 <pikhq> Which is, knowing Apple, never.
23:50:07 <ehird`> pikhq: I find it odd that you say 'knowing Apple' while apparently disliking them.
23:50:15 <Asztal> I'm sure if you hand over enough cash...
23:50:15 <ehird`> Presumably, you wouldn't go researching them to death.
23:50:35 <pikhq> Apple is not known for handing over source tarballs with the GPL attached.
23:50:45 <ehird`> pikhq: I like how you added the 'GPL' clause there.
23:51:08 <ehird`> You're either with us, or against us, obviously, so the mostly-BSD stuff you get here: http://www.opensource.apple.com/ (yes, I know it's not full OS X, obviously) doesn't count
23:51:12 <pikhq> (I'd accept any free license, actually. BSD works, the current version of the APL works, etc.)
23:51:21 <ehird`> but i'm not interested in a debate
23:52:00 <pikhq> They produce damned good software (usually), but it's not free, so I won't use it.
23:52:56 <ehird`> pikhq: The rabid lack of reason and dogmatic assertations that involve being a free software zealot make the term 'religious' be something other than an exaggeration, I find...
23:55:02 <pikhq> Whatever.
23:55:15 * pikhq shall go off to make his computer obey him for a bit.
23:55:47 <ehird`> Funny, my computer's doing t hat too.
23:56:14 <pikhq> Really? I thought you wanted it to have user-replacable WMs?
23:56:33 <ehird`> that was mostly a joke, actually. I like the WM.
23:56:46 <pikhq> How would you go about replacing it if you wanted to, though?
23:56:48 <ehird`> Besides, any WM-programming I would do would be just as a toy, so X11 would be fine.
23:56:57 <ehird`> pikhq: Ah. It's obeying me, see, because I haven't told it to do that.
23:57:06 <pikhq> But it won't obey if you tell it to do that.
23:57:16 <ehird`> But I haven't told it to do that. Therefore it's obeying me. QED!
23:57:25 <pikhq> For now, maybe.
23:57:34 <ehird`> Also, what if X11 didn't let you do that? Would you go and hack up the source for weeks to get that running?
23:57:37 <ehird`> No, I doubt it.
23:57:44 <pikhq> No, but I'd be free to.
23:57:54 <pikhq> And I'd be free to ask someone else to do so.
23:58:07 <ehird`> funny, the debates are like ones with religious fundamentalists too...
23:58:09 <pikhq> I'd even be free to hire someone else to do so, if I were willing to part with the money needed for that.
23:58:10 <ehird`> anyway, whatever
23:58:12 <ehird`> :)
23:58:21 <ehird`> I could hire apple to do it too actually.
23:58:26 <ehird`> I'd need an awful lot of money, but I could
23:58:37 <pikhq> Actually, I have enough free time, I could probably hack up the source for weeks. . .
23:58:44 <pikhq> Keep in mind, I wrote PEBBLE in my free time. :p
23:59:11 <faxathisia> What's PEBBLE
23:59:24 <pikhq> The Practical Esoteric Brainfuck-Based Language, Eh?
23:59:37 <pikhq> http://pikhq.nonlogic.org/pebble.php
←2008-01-14 2008-01-15 2008-01-16→ ↑2008 ↑all