←2007-05-17 2007-05-18 2007-05-19→ ↑2007 ↑all
00:10:36 -!- NOT-ehird` has quit.
00:13:31 -!- jix__ has joined.
00:21:39 -!- jix has quit (Read error: 110 (Connection timed out)).
00:26:16 -!- sebbu has quit ("@+").
00:48:39 -!- Rugxulo has joined.
00:48:56 -!- Rugxulo has quit (Remote closed the connection).
01:03:33 -!- crathman has quit (Read error: 113 (No route to host)).
01:22:48 -!- jix__ has quit ("Bitte waehlen Sie eine Beerdigungnachricht").
01:35:53 -!- calamari has joined.
01:48:48 -!- Sgeo has joined.
02:21:11 <SimonRC> hey! this one isn't too bad! http://tones.wolfram.com/id/G8fuTDyewoJcfgFql3KixKw9NU9n11RdNXsQWz7ot0j15YYZ6
02:21:58 <bsmntbombdood> except for the use of some crappy format
02:22:16 <SimonRC> hm
02:32:17 <GregorR> Just for giggles, I wrote a program to use (attempt to) use genetic algorithms to generate a P'' program that will produce the text "Hello, world!"
02:32:27 <GregorR> The closest it got after 1000 iterations was "HMMMMMMMMMMM!"
02:32:48 <GregorR> (PS I don't have a fegging clue how to do this)
02:33:14 <Pikhq> Step one: realise that P'' is a formally defined Brainfuck.
02:33:17 <Pikhq> Step two: voila.
02:34:15 <GregorR> Well, it has no I/O
02:34:29 <Pikhq> True, true.
02:34:30 <GregorR> If I had given it I/O, I would've said Brainfuck.
02:34:53 <Pikhq> What I fail to see is why it's *quite* so hard.
02:34:53 <bsmntbombdood> didn't someone do that with malbolge?
02:35:25 <GregorR> Pikhq: My mutations were purely "add something random" and "remove something random"
02:35:46 <Pikhq> Realising, of course, that you've already *got* a genetic algorithm for such generation in your HD; it's just a matter of patching it to not do I/O. . .
02:37:07 <oerjan> if i am guessing correctly that the program needs to put "Hello, world!" on the tape then the brainfuck version will not apply directly
02:37:33 <Pikhq> oerjan: It's a matter of changing a current genetic algorithm slightly.
02:37:34 <GregorR> Yuh.
02:37:41 <GregorR> And besides, the goal was to WRITE THIS MYSELF.
02:37:42 <oerjan> nope.
02:38:04 <oerjan> the current genetical algorithm is very tied to the use of a fixed set of cells
02:38:14 <GregorR> "ELLLLLLLLLLL!?" :)
02:38:41 <GregorR> For some reason this seems really inclined to repeat the second character a lot.
02:38:45 <Pikhq> Change it to replace . with an appropriate loop to copy it into a cell.
02:38:47 <oerjan> it essentially does not attempt to do _instructions_ randomly.
02:38:50 <SimonRC> hehehe, somone on c.l.forth made a blanket statement that addrtesses are never negative...
02:39:13 <SimonRC> ... needles(s) to say, he got corrected with dozens of examples.
02:39:17 <oerjan> hm, i suppose that _could_ work
02:40:08 <bsmntbombdood> what's your fitness function?
02:40:29 <SimonRC> you need a better program-mutator...
02:40:48 <Pikhq> int fit(char *s) {return 1;}
02:42:47 <SimonRC> data Prog = Seq Prog Prog | Loop Prog | Lam | R
02:42:59 <ihope> You're such a LamR.
02:43:00 <SimonRC> directly from the Wikipedia article.
02:43:20 <SimonRC> then, you mutate the program by fiddling with the tree
02:43:54 <bsmntbombdood> i understood the conversation for a minute there
02:44:51 <SimonRC> Also, tree-surgery makes for a good way to mate programs together.
02:45:36 <SimonRC> I recall all this from a breif mention of the advantages of LISP for exvolving computer programs in the book Artificial Life (a good book).
02:46:08 <SimonRC> The main one being that the explicit tree structures help you avoid syntax errors.
03:00:51 <GregorR> Closest so far: "???????wor??!"
03:01:28 <oerjan> given the nature of BF, perhaps it is an idea to let fitness be based on initial segment
03:01:48 <GregorR> ?
03:02:03 <oerjan> hm, that actually makes more sense for . output
03:02:15 <GregorR> Oh, I see what you mean.
03:02:22 <GregorR> It would give earlier letters a higher precedence.
03:02:36 <oerjan> right
03:03:16 <oerjan> basically anything that fouls up the beginning is likely to foul up the rest too
03:03:18 <GregorR> "?????, wor??"
03:03:39 <GregorR> I'm testing different measurements for fitness.
03:03:44 <GregorR> That one was with diff^0.75
03:04:01 <GregorR> LOL
03:04:07 <GregorR> With diff^0.9:
03:04:09 <GregorR> "HOOOOOOOOOOO!"
03:05:35 <SimonRC> lol
03:06:21 <GregorR> I'm going to run ^0.75 for 100000 iterations instead of the 10000 I was just running.
03:06:35 <SimonRC> how about you just mark it on the first letter, then, once most programs are getting the first letter right, you kill off all the ones that don't, and start marking on second letter, etc?
03:06:58 <SimonRC> GregorR: give them a bonus for not being as slow as molasses, too.
03:09:04 <GregorR> Haw
03:11:00 <GregorR> After 30000 iterations: "H7NNNNNNNNNN!"
03:11:06 <oerjan> but that bonus makes ++++>++++>++++++> like programs win by default
03:12:02 <Pikhq> oerjan: Compared to really, *really* weird loops, that's not bad.
03:12:20 <GregorR> Have I mentioned I don't have a fegging clue what I'm doing?
03:12:26 <oerjan> i think so
03:12:45 <bsmntbombdood> what language are you working in?
03:12:48 <SimonRC> GregorR: can you past som of the code here?
03:12:50 <oerjan> i suggest trying SimonRC's suggestion
03:12:56 <GregorR> bsmntbombdood: D
03:13:00 <Pikhq> Yeah. Why're you not working on Plof (I keed, I keed)? :p
03:13:06 <SimonRC> I suggest doing what oerjan just said
03:13:24 <SimonRC> Pikhq: IKEA? :-P
03:13:24 <oerjan> i suggest avoid a horrible recursion here
03:13:33 <oerjan> *avoiding
03:13:55 <Pikhq> oerjan: I see only a few recursions.
03:14:22 <GregorR> Darn, it seems to have stabilized at 40000 iterations and isn't really getting better now.
03:14:36 <oerjan> you have probably hit a local optimum
03:14:51 <Pikhq> (simon-rc-agrees (oerjan-suggests (simon-rc-suggests '(Mark letter by leter))))
03:15:02 <GregorR> OK, OK
03:15:07 <oerjan> any minor change just makes things worse
03:15:34 <SimonRC> GregorR: also: use my new datastructure.
03:16:58 * Pikhq should try and get PlofBrainfuck to work. . .
03:17:29 <GregorR> SimonRC: ?
03:20:37 <SimonRC> 02:41:48 < SimonRC> data Prog = Seq Prog Prog | Loop Prog | Lam | R
03:20:48 <SimonRC> I assume you are using strings ATM.
03:22:44 <GregorR> Hrm.
03:23:42 <GregorR> I'm not so sure how to randomize that :)
03:26:15 <SimonRC> You just need some operations: spilt a Loop, join Loops, transpose Seq, re-arrange Seq, mutate, splicing, etc.
03:26:26 <SimonRC> and insert and delete, fo course
03:27:00 <SimonRC> GregorR: it's trivial in any language with algebraic datatypes.
03:27:49 <SimonRC> OTOH, you could write 10 classes to do the same thing in an OO language, and claim they were all necessary.
03:28:00 <SimonRC> (OO is great for generating work.)
03:28:05 * SimonRC goes to bed
03:28:06 <GregorR> lol
03:28:51 <SimonRC> " Object-oriented programming generates a lot of what looks like work. Back in the days of fanfold, there was a type of programmer who would only put five or ten lines of code on a page, preceded by twenty lines of elaborately formatted comments. Object-oriented programming is like crack for these people: it lets you incorporate all this scaffolding right into your source code. Something that a Lisp hacker might handle by pushing a symbol onto a list beco
03:30:44 <SimonRC> OO gives a fantastic productivity improvement over procedural languages in the same way that Soviet Communism gave a fantastic productivity improvement over the preceding feudalism.
03:30:49 * SimonRC goes to bed
03:32:23 <GregorR> "He?l?, eo?od!"
03:32:29 <GregorR> I slowed the mutation :)
03:44:15 <bsmntbombdood> close
04:00:24 <GregorR> ARGH
04:00:37 <GregorR> I had set a tick limit of 1000 on my P'' interpreter and forgotten about it :(
04:00:56 <GregorR> So actually, it works quite well.
04:25:54 <GregorR> I can't seem to find a way to balance it properly such that it prefers shorter programs ... I think the main problem is that most loops it produces are endless, and it shies away from programs that take the entire time provided.
04:46:16 <GregorR> Should I try something ridiculous now? :P
04:46:35 <GregorR> Such as ... Idonno ... a brainfuck spam classifier X-P
04:47:09 <Pikhq> PlofBrainfuck, so I don't have to get my attempt to work. :p
04:47:14 <GregorR> lol
04:48:36 <GregorR> I need a problem that can be solved with an algorithm, but isn't totally discrete.
04:49:53 <oerjan> discrete?
04:50:02 <oerjan> you mean continuous?
04:50:24 <GregorR> No, I mean that I need an algorithm that is NOT discrete.
04:50:27 <GregorR> e.g. IS continuous.
04:50:36 <oerjan> linear programming perhaps?
04:58:59 -!- digital_me has joined.
05:25:25 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)).
05:36:07 -!- calamari has quit ("Leaving").
05:38:09 <bsmntbombdood> GregorR: bf_txtgen?
05:38:18 <bsmntbombdood> isn't that exactly what it does?
05:39:07 <GregorR> Why don't people in #esoteric understand the concept of writing it yourself for the sake of writing it yourself X_X
05:40:37 <Pikhq> GregorR: We're also inherently lazy.
05:40:50 <Pikhq> :p
06:01:34 -!- digital_me has quit (Read error: 110 (Connection timed out)).
06:56:33 -!- oerjan has quit ("leaving").
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:24:55 -!- sanxiyn has joined.
08:26:06 -!- mightnare has joined.
08:44:25 <GregorR> My attempt with something more similar to SimonRC's suggested tree isn't going well :P
08:44:40 <GregorR> Heywait ... I forgot about loops X-D
08:44:52 <GregorR> So I'm just evolving simple mathematical expressions.
08:46:06 <bsmntbombdood> garbage collection for brainfuck
08:46:18 <GregorR> .........................................?
08:47:04 <GregorR> Also, it gets caught in local optima way to easily :(
08:47:10 <sanxiyn> bsmntbombdood: Eh, what does that do?
08:47:18 <bsmntbombdood> well, this bf interpreter i was writing allocated memory in blocks, and the blocks never get freed, so...
08:47:23 <GregorR> Its equation for the hypotenuse of a triangle: x+.5*y X_X
08:48:07 <bsmntbombdood> you can move the pointer into a block, never come back, but the block stays allocated
08:49:46 <bsmntbombdood> you'd need some detailed code analysis to figure out when it was safe to deallocate a block
08:50:45 <bsmntbombdood> it might not be possible without actually executing it
08:53:22 <bsmntbombdood> anyway, bedtime
09:48:23 -!- sanxiyn has quit ("전 이만 갑니다.").
11:22:25 -!- mightnare has quit ("Ex-Chat").
11:33:03 -!- jix has joined.
12:13:26 -!- jix__ has joined.
12:22:39 -!- jix has quit (Read error: 113 (No route to host)).
12:33:17 -!- jix__ has changed nick to jix.
13:24:51 -!- ihope_ has joined.
13:42:47 -!- ihope has quit (Read error: 110 (Connection timed out)).
13:53:32 -!- Pikhq has quit (Read error: 110 (Connection timed out)).
13:54:27 -!- Pikhq has joined.
14:32:29 -!- ihope_ has quit (Read error: 110 (Connection timed out)).
15:03:14 -!- NOT-ehird` has joined.
15:20:08 -!- crathman has joined.
15:28:15 -!- crathman has quit ("ChatZilla 0.9.78.1 [Firefox 2.0.0.3/2007030919]").
16:46:16 -!- sebbu has joined.
17:23:10 -!- NOT-ehird` has quit (Remote closed the connection).
17:24:55 -!- digital_me has joined.
18:56:35 -!- sebbu2 has joined.
19:16:00 -!- sebbu has quit (Read error: 110 (Connection timed out)).
21:15:54 -!- ihope_ has joined.
21:15:59 -!- ihope_ has changed nick to ihope.
22:11:11 -!- Figs has joined.
22:11:15 <Figs> Hello
22:12:41 <Figs> what would you consider to be the defining parts of a function?
22:17:14 <bsmntbombdood> what?
22:17:28 <Figs> like, return values, sequences of commands, etc
22:18:27 <bsmntbombdood> formals, code?
22:19:04 <Figs> like, what makes a function a function, as opposed to, say, a firetruck
22:26:41 <lament> Figs: have you never done math?
22:26:55 <Figs> I have done math, lament
22:27:16 <Figs> I'm just trying to think about the building blocks of functions
22:28:57 <lament> not sure what those are.
22:31:50 <ihope> A function is a set of ordered pairs such that there are no two ordered pairs (x,y) and (x,z) in the set such that x != z.
22:32:32 <Figs> O.o
22:32:43 <ihope> If (x,y) is in the set, f(x) = y.
22:33:07 <ihope> The domain is the set of all x, the image is the set of all y.
22:33:19 <ihope> Unless you want to get into impure functions, which I don't really like.
22:33:53 <ihope> That is, there's not much theoretical reason to combine the "impure" part with the "function" part
22:34:58 <Figs> hmm
22:35:01 <ihope> An impure nullary function is either simply an atomic action or an atomic action paired with an impure unary function.
22:35:14 <ihope> That is, a pure unary function that produces an inpure nullary function.
22:35:29 <Figs> would be neat if we had a 'dirty' keyword and a 'clean' keyword as compiler hints :P
22:35:55 <Figs> void dirty function x() { outside_data +=6; }
22:36:20 <ihope> You remind me of some of my ideas.
22:36:43 <ihope> Now, if it's the pair, then it runs the atomic action, then passes its result into the function and runs the result from that.
22:37:00 <Figs> mmm
22:37:24 <ihope> My idea was pretty much to have monads and do-notation all over.
22:37:40 <Figs> I don't know what a monad is
22:37:50 <Figs> having never really studied functional languages in depth...
22:38:19 <ihope> A monad is something that seems really complicated until it clicks and you don't know why you didn't see it before.
22:38:40 <Figs> most things seem to be like that
22:38:56 <Figs> isn't a closure sort of like a functor?
22:39:14 <ihope> A functor in the "object representing a function" sense?
22:39:16 <ihope> Yup.
22:39:24 <Figs> yeah
22:39:46 * Figs has a primarily C++ background, for reference
22:39:47 <ihope> Now, essentially, a monad is just what I described with that "impure nullary function" stuff.
22:40:18 <Figs> what do you mean 'nullary function'?
22:40:23 <Figs> *by
22:40:31 <ihope> A function that takes no arguments.
22:40:35 <Figs> ok
22:40:45 <Pikhq> Figs: There is a "dirty" and "clean" keyword. . .
22:41:01 <Pikhq> It's called something different, but, IIRC, it was added by C99 (and C++).
22:41:02 <Figs> effectively, an action with no parameters
22:41:08 <ihope> Yup.
22:41:13 <Pikhq> (if I'm wrong, it sure as hell *is* in GNU C)
22:41:24 <Figs> :P cool
22:41:32 <ihope> A monadic type is a certain sort of type containing a type: in Haskell, for example, an I/O action that produces an integer is denoted IO Integer, as an integer is denoted Integer.
22:42:01 <ihope> The actual monad here is IO.
22:42:24 <ihope> Defining a monad requires two things: a "return" function and a ">>=" (or "bind") function.
22:43:07 <Figs> so, you're binding a variable to a nullary function that's impure?
22:43:27 <Figs> or am I missing it still?
22:43:28 <ihope> Mm, that's not really what bind does. Just a minute here...
22:43:42 <ihope> In the IO monad, return represents an action that performs no interaction and returns its result--return 3, for example.
22:44:27 <Figs> ok
22:44:30 <ihope> (In Haskell, "calling" a function is denoted like "foo bar" instead of "foo(bar)".)
22:44:58 <Figs> ah
22:45:01 <ihope> Bind is a little more complicated. One... sort of tripping point is that one of its arguments is another function.
22:45:19 <ihope> A functor, I suppose.
22:46:05 <ihope> >>= is an infix operator, so applying it is written like "foo >>= bar".
22:46:38 <Figs> ok
22:46:49 <ihope> The action foo >>= bar first runs the action foo, then applies the function bar to the result. The result from bar is another action, which is then run.
22:46:52 <Figs> I have no trouble with passing functions to functions -- std::for_each for example ;)
22:47:31 <ihope> One... problem, I suppose, is that monads need not represent actions.
22:47:54 <Figs> that does make it a bit more confusing
22:48:13 <ihope> The list monad, for example: the return function produces a one-element list in this case, and >>=... well.
22:48:20 <Figs> so, effectively here, what you're doing is bar(foo())
22:48:24 <Figs> ?
22:48:31 <ihope> Yup, essentially.
22:48:33 <Figs> but it's stored
22:48:35 <Figs> ?
22:48:55 <ihope> What's stored?
22:49:01 <Figs> guess not :P
22:49:02 <Figs> ok
22:49:09 <Figs> but it could be, yes?
22:49:27 <ihope> foo >>= bar does represent bar(foo()), except that foo >>= bar, like all actions here, is treated as a value.
22:49:37 <Figs> newfunction = bar(foo()) <-- pseudo-code
22:49:43 <ihope> So if you have a variable somewhere, you can store foo >>= bar in it.
22:49:46 <ihope> Just like that, yes.
22:49:55 <Figs> ok
22:50:04 <Figs> so where's the monad?
22:50:37 <ihope> The monad itself is IO, the thing you put before a type to say "an action producing something of this type".
22:51:19 <Figs> so effectively,
22:52:06 <Figs> function<integer> N = F(G);
22:52:12 <Pikhq> And the whole purpose of this is to allow for easy observance of side effects, I assume?
22:52:20 <ihope> Now, to illustrate the >>= function for lists, take [1,2,3] >>= (\x -> [x, x+2]). ("\x -> [x, x+2]" is a function that takes x and returns [x, x+2]: we're essentially defining a function on the fly here.) The result is [1,3,2,4,3,5]: it takes each element of [1,2,3], puts it through the function, and collects all the elements in a single list.
22:52:30 <ihope> Pikhq: something like that.
22:52:40 <ihope> Figs: hmm?
22:53:03 <Figs> ihope: it'd be like the function<integer> bit?
22:53:36 <Figs> ok,
22:53:39 <Figs> that makes sense
22:53:45 <ihope> Figs: well, what does "function<integer> N = F(G);" mean?
22:54:25 <Figs> ihope, are you "noticing" me? I'm in a different client than I usually use, so I am not sure why you're writing in red
22:54:52 <ihope> Nope, I'm just sending plain old messages to the channel.
22:55:04 <Figs> huh
22:55:05 <Figs> ok
22:55:11 <Figs> Figs: this is a test
22:55:12 <Figs> ahh
22:55:14 <Figs> ok
22:55:24 <Figs> it's just trying to get my attn ;)
22:56:08 <Figs> well, I meant it as pseudo code for a function object return that returns an integer when you call it
22:56:32 <Figs> the action being the composition of G in F
22:56:39 <Figs> ie, F(G())
22:57:54 <Figs> is that right?
22:58:38 <Figs> or, for you other example in a pseudo-C++ like language
22:59:52 <ihope> Well, what's F(G()), then?
23:00:33 <Figs> function<array<integers> > N = lambda_function(array<integers> x) {for each in x, put x,x+2 in y then return y}
23:00:52 <Figs> if you could do "lambda_function() {}"
23:00:59 <Figs> in a C++ like language
23:01:50 <Figs> it'd be interesting to build lambda functions around prototypical objects :P
23:02:13 <ihope> Now, that looks right.
23:02:15 <Figs> (ie, objects where I can change the object's members on the fly)
23:02:35 <Figs> ok, I already knew what monads are then, just not the word
23:03:06 <Figs> why "monad" though?
23:03:22 <ihope> Dunno. What else might they be called?
23:03:34 <Figs> function objects?
23:04:15 <ihope> Well, there are other kinds of monads entirely.
23:04:16 <Figs> fonctjects! :D muahahah
23:04:19 <Figs> oh
23:04:23 <ihope> Continuation monads, for example.
23:04:34 <Figs> ehh...
23:04:39 <Figs> I don't like continuations
23:05:00 <Figs> they confuse me :P
23:05:10 <ihope> Confusing indeed.
23:05:26 <Figs> hmm, I should write a prototype object system in C++
23:05:29 <Figs> that'd be neat
23:05:57 <Figs> maybe I'll do that once I finish my regex system
23:06:16 <Figs> I need to add so many things to it still to make it useful :P
23:06:20 <Figs> *sigh*
23:06:55 <Figs> What do you think about SQL style syntax for prototype objects?
23:07:10 <Figs> brb, I'll clarify in a minute
23:07:56 -!- Pikhq has quit ("Leaving.").
23:08:57 <Figs> back
23:09:00 <Figs> ok, so like
23:09:07 <Figs> if you think about it
23:09:15 <Figs> prototype objects are essentially tables
23:11:01 <Figs> there are labels, type data, and pointers
23:12:03 <Figs> actually, it might make more sense to modify it
23:12:21 <Figs> nevermind
23:13:34 <Figs> hey
23:13:39 <Figs> are there any regex experts here?
23:13:47 <Figs> I have a weird question
23:14:48 <Figs> if I were to allow the combination of patterns with captures(can't remember the right word, but it's like \1, \2, etc), how should I refer to captures in lower levels, or should I really need to?
23:16:21 -!- puzzlet has quit (Read error: 104 (Connection reset by peer)).
23:16:57 <Figs> probably wouldn't need to, would I?
23:17:02 <Figs> hmmm
23:17:19 <Figs> yeah
23:17:34 <Figs> it wouldn't make sense if a capture is in one part of a branch for example, but not another
23:17:38 <Figs> so only on a sequence
23:18:27 <Figs> as a part
23:18:31 <Figs> to match a pattern
23:18:48 <Figs> so like mmm
23:19:13 <Figs> subpattern[0] >> 'abc' >> captured[0]
23:22:14 <Figs> g2g
23:22:15 -!- Figs has quit ("Goodbye World").
23:29:47 -!- puzzlet has joined.
23:40:29 -!- alex-4 has joined.
23:49:54 -!- ihope_ has joined.
23:50:58 -!- ihope_ has quit (Read error: 104 (Connection reset by peer)).
23:57:26 -!- ihope has quit (Read error: 60 (Operation timed out)).
←2007-05-17 2007-05-18 2007-05-19→ ↑2007 ↑all