< 1179447036 0 :NOT-ehird`!unknown@unknown.invalid QUIT : < 1179447211 0 :jix__!n=jix@dyndsl-085-016-236-176.ewe-ip-backbone.de JOIN :#esoteric < 1179447699 0 :jix!unknown@unknown.invalid QUIT :Read error: 110 (Connection timed out) < 1179447976 0 :sebbu!unknown@unknown.invalid QUIT :"@+" < 1179449319 0 :Rugxulo!i=icechat5@adsl-065-013-115-246.sip.mob.bellsouth.net JOIN :#esoteric < 1179449336 0 :Rugxulo!unknown@unknown.invalid QUIT :Remote closed the connection < 1179450213 0 :crathman!unknown@unknown.invalid QUIT :Read error: 113 (No route to host) < 1179451368 0 :jix__!unknown@unknown.invalid QUIT :"Bitte waehlen Sie eine Beerdigungnachricht" < 1179452153 0 :calamari!n=calamari@ip72-200-73-175.tc.ph.cox.net JOIN :#esoteric < 1179452928 0 :Sgeo!n=Sgeo@ool-18bf68ca.dyn.optonline.net JOIN :#esoteric < 1179454871 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :hey! this one isn't too bad! http://tones.wolfram.com/id/G8fuTDyewoJcfgFql3KixKw9NU9n11RdNXsQWz7ot0j15YYZ6 < 1179454918 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :except for the use of some crappy format < 1179454936 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :hm < 1179455537 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :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!" < 1179455547 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :The closest it got after 1000 iterations was "HMMMMMMMMMMM!" < 1179455568 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :(PS I don't have a fegging clue how to do this) < 1179455594 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Step one: realise that P'' is a formally defined Brainfuck. < 1179455597 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Step two: voila. < 1179455655 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Well, it has no I/O < 1179455669 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :True, true. < 1179455670 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :If I had given it I/O, I would've said Brainfuck. < 1179455693 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :What I fail to see is why it's *quite* so hard. < 1179455693 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :didn't someone do that with malbolge? < 1179455725 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Pikhq: My mutations were purely "add something random" and "remove something random" < 1179455746 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :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. . . < 1179455827 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :if i am guessing correctly that the program needs to put "Hello, world!" on the tape then the brainfuck version will not apply directly < 1179455853 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: It's a matter of changing a current genetic algorithm slightly. < 1179455854 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Yuh. < 1179455861 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :And besides, the goal was to WRITE THIS MYSELF. < 1179455862 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :nope. < 1179455884 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :the current genetical algorithm is very tied to the use of a fixed set of cells < 1179455894 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :"ELLLLLLLLLLL!?" :) < 1179455921 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :For some reason this seems really inclined to repeat the second character a lot. < 1179455925 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Change it to replace . with an appropriate loop to copy it into a cell. < 1179455927 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :it essentially does not attempt to do _instructions_ randomly. < 1179455930 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :hehehe, somone on c.l.forth made a blanket statement that addrtesses are never negative... < 1179455953 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :... needles(s) to say, he got corrected with dozens of examples. < 1179455957 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :hm, i suppose that _could_ work < 1179456008 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :what's your fitness function? < 1179456029 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :you need a better program-mutator... < 1179456048 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :int fit(char *s) {return 1;} < 1179456167 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :data Prog = Seq Prog Prog | Loop Prog | Lam | R < 1179456179 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :You're such a LamR. < 1179456180 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :directly from the Wikipedia article. < 1179456200 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :then, you mutate the program by fiddling with the tree < 1179456234 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :i understood the conversation for a minute there < 1179456291 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :Also, tree-surgery makes for a good way to mate programs together. < 1179456336 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :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). < 1179456368 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :The main one being that the explicit tree structures help you avoid syntax errors. < 1179457251 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Closest so far: "???????wor??!" < 1179457288 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :given the nature of BF, perhaps it is an idea to let fitness be based on initial segment < 1179457308 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :? < 1179457323 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :hm, that actually makes more sense for . output < 1179457335 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Oh, I see what you mean. < 1179457342 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :It would give earlier letters a higher precedence. < 1179457356 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :right < 1179457396 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :basically anything that fouls up the beginning is likely to foul up the rest too < 1179457398 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :"?????, wor??" < 1179457419 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :I'm testing different measurements for fitness. < 1179457424 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :That one was with diff^0.75 < 1179457441 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :LOL < 1179457447 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :With diff^0.9: < 1179457449 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :"HOOOOOOOOOOO!" < 1179457535 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :lol < 1179457581 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :I'm going to run ^0.75 for 100000 iterations instead of the 10000 I was just running. < 1179457595 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :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? < 1179457618 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: give them a bonus for not being as slow as molasses, too. < 1179457744 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Haw < 1179457860 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :After 30000 iterations: "H7NNNNNNNNNN!" < 1179457866 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :but that bonus makes ++++>++++>++++++> like programs win by default < 1179457922 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: Compared to really, *really* weird loops, that's not bad. < 1179457940 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Have I mentioned I don't have a fegging clue what I'm doing? < 1179457946 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i think so < 1179457965 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :what language are you working in? < 1179457968 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: can you past som of the code here? < 1179457970 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i suggest trying SimonRC's suggestion < 1179457976 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :bsmntbombdood: D < 1179457980 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Yeah. Why're you not working on Plof (I keed, I keed)? :p < 1179457986 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :I suggest doing what oerjan just said < 1179458004 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :Pikhq: IKEA? :-P < 1179458004 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :i suggest avoid a horrible recursion here < 1179458013 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :*avoiding < 1179458035 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :oerjan: I see only a few recursions. < 1179458062 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Darn, it seems to have stabilized at 40000 iterations and isn't really getting better now. < 1179458076 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :you have probably hit a local optimum < 1179458091 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :(simon-rc-agrees (oerjan-suggests (simon-rc-suggests '(Mark letter by leter)))) < 1179458102 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :OK, OK < 1179458107 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :any minor change just makes things worse < 1179458134 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: also: use my new datastructure. < 1179458218 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :ACTION should try and get PlofBrainfuck to work. . . < 1179458249 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :SimonRC: ? < 1179458437 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :02:41:48 < SimonRC> data Prog = Seq Prog Prog | Loop Prog | Lam | R < 1179458448 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :I assume you are using strings ATM. < 1179458564 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Hrm. < 1179458622 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :I'm not so sure how to randomize that :) < 1179458775 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :You just need some operations: spilt a Loop, join Loops, transpose Seq, re-arrange Seq, mutate, splicing, etc. < 1179458786 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :and insert and delete, fo course < 1179458820 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: it's trivial in any language with algebraic datatypes. < 1179458869 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :OTOH, you could write 10 classes to do the same thing in an OO language, and claim they were all necessary. < 1179458880 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :(OO is great for generating work.) < 1179458885 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :ACTION goes to bed < 1179458886 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :lol < 1179458931 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :" 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 < 1179459044 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :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. < 1179459049 0 :SimonRC!unknown@unknown.invalid PRIVMSG #esoteric :ACTION goes to bed < 1179459143 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :"He?l?, eo?od!" < 1179459149 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :I slowed the mutation :) < 1179459855 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :close < 1179460824 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :ARGH < 1179460837 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :I had set a tick limit of 1000 on my P'' interpreter and forgotten about it :( < 1179460856 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :So actually, it works quite well. < 1179462354 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :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. < 1179463576 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Should I try something ridiculous now? :P < 1179463595 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Such as ... Idonno ... a brainfuck spam classifier X-P < 1179463629 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :PlofBrainfuck, so I don't have to get my attempt to work. :p < 1179463634 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :lol < 1179463716 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :I need a problem that can be solved with an algorithm, but isn't totally discrete. < 1179463793 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :discrete? < 1179463802 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :you mean continuous? < 1179463824 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :No, I mean that I need an algorithm that is NOT discrete. < 1179463827 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :e.g. IS continuous. < 1179463836 0 :oerjan!unknown@unknown.invalid PRIVMSG #esoteric :linear programming perhaps? < 1179464339 0 :digital_me!n=digital@wikipedia/Digitalme JOIN :#esoteric < 1179465925 0 :Sgeo!unknown@unknown.invalid QUIT :Read error: 104 (Connection reset by peer) < 1179466567 0 :calamari!unknown@unknown.invalid QUIT :"Leaving" < 1179466689 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: bf_txtgen? < 1179466698 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :isn't that exactly what it does? < 1179466747 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Why don't people in #esoteric understand the concept of writing it yourself for the sake of writing it yourself X_X < 1179466837 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :GregorR: We're also inherently lazy. < 1179466850 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric ::p < 1179468094 0 :digital_me!unknown@unknown.invalid QUIT :Read error: 110 (Connection timed out) < 1179471393 0 :oerjan!unknown@unknown.invalid QUIT :"leaving" < 1179475199 0 :clog!unknown@unknown.invalid QUIT :ended < 1179475200 0 :clog!unknown@unknown.invalid JOIN :#esoteric < 1179476695 0 :sanxiyn!n=tinuviel@211.104.100.240 JOIN :#esoteric < 1179476766 0 :mightnare!n=mike@s230165.ppp.asahi-net.or.jp JOIN :#esoteric < 1179477865 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :My attempt with something more similar to SimonRC's suggested tree isn't going well :P < 1179477880 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Heywait ... I forgot about loops X-D < 1179477892 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :So I'm just evolving simple mathematical expressions. < 1179477966 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :garbage collection for brainfuck < 1179477978 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :.........................................? < 1179478024 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Also, it gets caught in local optima way to easily :( < 1179478030 0 :sanxiyn!unknown@unknown.invalid PRIVMSG #esoteric :bsmntbombdood: Eh, what does that do? < 1179478038 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :well, this bf interpreter i was writing allocated memory in blocks, and the blocks never get freed, so... < 1179478043 0 :GregorR!unknown@unknown.invalid PRIVMSG #esoteric :Its equation for the hypotenuse of a triangle: x+.5*y X_X < 1179478087 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :you can move the pointer into a block, never come back, but the block stays allocated < 1179478186 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :you'd need some detailed code analysis to figure out when it was safe to deallocate a block < 1179478245 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :it might not be possible without actually executing it < 1179478402 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :anyway, bedtime < 1179481703 0 :sanxiyn!unknown@unknown.invalid QUIT :"전 이만 갑니다." < 1179487345 0 :mightnare!unknown@unknown.invalid QUIT :"Ex-Chat" < 1179487983 0 :jix!n=jix@dyndsl-085-016-236-176.ewe-ip-backbone.de JOIN :#esoteric < 1179490406 0 :jix__!n=jix@dyndsl-091-096-057-070.ewe-ip-backbone.de JOIN :#esoteric < 1179490959 0 :jix!unknown@unknown.invalid QUIT :Read error: 113 (No route to host) < 1179491597 0 :jix__!unknown@unknown.invalid NICK :jix < 1179494691 0 :ihope_!n=ihope@c-71-205-100-59.hsd1.mi.comcast.net JOIN :#esoteric < 1179495767 0 :ihope!unknown@unknown.invalid QUIT :Read error: 110 (Connection timed out) < 1179496412 0 :Pikhq!unknown@unknown.invalid QUIT :Read error: 110 (Connection timed out) < 1179496467 0 :Pikhq!n=pikhq@c-75-70-43-34.hsd1.co.comcast.net JOIN :#esoteric < 1179498749 0 :ihope_!unknown@unknown.invalid QUIT :Read error: 110 (Connection timed out) < 1179500594 0 :NOT-ehird`!n=ehird@user-54457988.lns6-c11.dsl.pol.co.uk JOIN :#esoteric < 1179501608 0 :crathman!n=chatzill@216.140.54.104 JOIN :#esoteric < 1179502095 0 :crathman!unknown@unknown.invalid QUIT :"ChatZilla 0.9.78.1 [Firefox 2.0.0.3/2007030919]" < 1179506776 0 :sebbu!n=sebbu@ADijon-152-1-76-35.w83-203.abo.wanadoo.fr JOIN :#esoteric < 1179508990 0 :NOT-ehird`!unknown@unknown.invalid QUIT :Remote closed the connection < 1179509095 0 :digital_me!n=digital@wikipedia/Digitalme JOIN :#esoteric < 1179514595 0 :sebbu2!n=sebbu@ADijon-152-1-26-124.w83-194.abo.wanadoo.fr JOIN :#esoteric < 1179515760 0 :sebbu!unknown@unknown.invalid QUIT :Read error: 110 (Connection timed out) < 1179522954 0 :ihope_!n=ihope@c-71-205-100-59.hsd1.mi.comcast.net JOIN :#esoteric < 1179522959 0 :ihope_!unknown@unknown.invalid NICK :ihope < 1179526271 0 :Figs!n=Figs@rrcs-66-91-147-253.west.biz.rr.com JOIN :#esoteric < 1179526275 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :Hello < 1179526361 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :what would you consider to be the defining parts of a function? < 1179526634 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :what? < 1179526648 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :like, return values, sequences of commands, etc < 1179526707 0 :bsmntbombdood!unknown@unknown.invalid PRIVMSG #esoteric :formals, code? < 1179526744 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :like, what makes a function a function, as opposed to, say, a firetruck < 1179527201 0 :lament!unknown@unknown.invalid PRIVMSG #esoteric :Figs: have you never done math? < 1179527215 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :I have done math, lament < 1179527236 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :I'm just trying to think about the building blocks of functions < 1179527337 0 :lament!unknown@unknown.invalid PRIVMSG #esoteric :not sure what those are. < 1179527510 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :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. < 1179527552 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :O.o < 1179527563 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :If (x,y) is in the set, f(x) = y. < 1179527587 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :The domain is the set of all x, the image is the set of all y. < 1179527599 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Unless you want to get into impure functions, which I don't really like. < 1179527633 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :That is, there's not much theoretical reason to combine the "impure" part with the "function" part < 1179527698 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :hmm < 1179527701 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :An impure nullary function is either simply an atomic action or an atomic action paired with an impure unary function. < 1179527714 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :That is, a pure unary function that produces an inpure nullary function. < 1179527729 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :would be neat if we had a 'dirty' keyword and a 'clean' keyword as compiler hints :P < 1179527755 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :void dirty function x() { outside_data +=6; } < 1179527780 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :You remind me of some of my ideas. < 1179527803 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :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. < 1179527820 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :mmm < 1179527844 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :My idea was pretty much to have monads and do-notation all over. < 1179527860 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :I don't know what a monad is < 1179527870 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :having never really studied functional languages in depth... < 1179527899 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :A monad is something that seems really complicated until it clicks and you don't know why you didn't see it before. < 1179527920 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :most things seem to be like that < 1179527936 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :isn't a closure sort of like a functor? < 1179527954 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :A functor in the "object representing a function" sense? < 1179527956 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Yup. < 1179527964 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :yeah < 1179527986 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ACTION has a primarily C++ background, for reference < 1179527987 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Now, essentially, a monad is just what I described with that "impure nullary function" stuff. < 1179528018 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :what do you mean 'nullary function'? < 1179528023 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :*by < 1179528031 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :A function that takes no arguments. < 1179528035 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok < 1179528045 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :Figs: There is a "dirty" and "clean" keyword. . . < 1179528061 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :It's called something different, but, IIRC, it was added by C99 (and C++). < 1179528062 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :effectively, an action with no parameters < 1179528068 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Yup. < 1179528073 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :(if I'm wrong, it sure as hell *is* in GNU C) < 1179528084 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric ::P cool < 1179528092 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :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. < 1179528121 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :The actual monad here is IO. < 1179528144 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Defining a monad requires two things: a "return" function and a ">>=" (or "bind") function. < 1179528187 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :so, you're binding a variable to a nullary function that's impure? < 1179528207 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :or am I missing it still? < 1179528208 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Mm, that's not really what bind does. Just a minute here... < 1179528222 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :In the IO monad, return represents an action that performs no interaction and returns its result--return 3, for example. < 1179528267 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok < 1179528270 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :(In Haskell, "calling" a function is denoted like "foo bar" instead of "foo(bar)".) < 1179528298 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ah < 1179528301 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Bind is a little more complicated. One... sort of tripping point is that one of its arguments is another function. < 1179528319 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :A functor, I suppose. < 1179528365 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :>>= is an infix operator, so applying it is written like "foo >>= bar". < 1179528398 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok < 1179528409 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :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. < 1179528412 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :I have no trouble with passing functions to functions -- std::for_each for example ;) < 1179528451 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :One... problem, I suppose, is that monads need not represent actions. < 1179528474 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :that does make it a bit more confusing < 1179528493 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :The list monad, for example: the return function produces a one-element list in this case, and >>=... well. < 1179528500 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :so, effectively here, what you're doing is bar(foo()) < 1179528504 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :? < 1179528511 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Yup, essentially. < 1179528513 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :but it's stored < 1179528515 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :? < 1179528535 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :What's stored? < 1179528541 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :guess not :P < 1179528542 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok < 1179528549 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :but it could be, yes? < 1179528567 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :foo >>= bar does represent bar(foo()), except that foo >>= bar, like all actions here, is treated as a value. < 1179528577 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :newfunction = bar(foo()) <-- pseudo-code < 1179528583 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :So if you have a variable somewhere, you can store foo >>= bar in it. < 1179528586 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Just like that, yes. < 1179528595 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok < 1179528604 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :so where's the monad? < 1179528637 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :The monad itself is IO, the thing you put before a type to say "an action producing something of this type". < 1179528679 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :so effectively, < 1179528726 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :function N = F(G); < 1179528732 0 :Pikhq!unknown@unknown.invalid PRIVMSG #esoteric :And the whole purpose of this is to allow for easy observance of side effects, I assume? < 1179528740 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :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. < 1179528750 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Pikhq: something like that. < 1179528760 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Figs: hmm? < 1179528783 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ihope: it'd be like the function bit? < 1179528816 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok, < 1179528819 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :that makes sense < 1179528825 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Figs: well, what does "function N = F(G);" mean? < 1179528865 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :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 < 1179528892 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Nope, I'm just sending plain old messages to the channel. < 1179528904 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :huh < 1179528905 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok < 1179528911 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :Figs: this is a test < 1179528912 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ahh < 1179528914 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok < 1179528924 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :it's just trying to get my attn ;) < 1179528968 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :well, I meant it as pseudo code for a function object return that returns an integer when you call it < 1179528992 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :the action being the composition of G in F < 1179528999 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ie, F(G()) < 1179529074 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :is that right? < 1179529118 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :or, for you other example in a pseudo-C++ like language < 1179529192 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Well, what's F(G()), then? < 1179529233 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :function > N = lambda_function(array x) {for each in x, put x,x+2 in y then return y} < 1179529252 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :if you could do "lambda_function() {}" < 1179529259 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :in a C++ like language < 1179529310 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :it'd be interesting to build lambda functions around prototypical objects :P < 1179529333 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Now, that looks right. < 1179529335 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :(ie, objects where I can change the object's members on the fly) < 1179529355 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok, I already knew what monads are then, just not the word < 1179529386 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :why "monad" though? < 1179529402 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Dunno. What else might they be called? < 1179529414 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :function objects? < 1179529455 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Well, there are other kinds of monads entirely. < 1179529456 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :fonctjects! :D muahahah < 1179529459 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :oh < 1179529463 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Continuation monads, for example. < 1179529474 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ehh... < 1179529479 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :I don't like continuations < 1179529500 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :they confuse me :P < 1179529510 0 :ihope!unknown@unknown.invalid PRIVMSG #esoteric :Confusing indeed. < 1179529526 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :hmm, I should write a prototype object system in C++ < 1179529529 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :that'd be neat < 1179529557 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :maybe I'll do that once I finish my regex system < 1179529576 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :I need to add so many things to it still to make it useful :P < 1179529580 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :*sigh* < 1179529615 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :What do you think about SQL style syntax for prototype objects? < 1179529630 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :brb, I'll clarify in a minute < 1179529676 0 :Pikhq!unknown@unknown.invalid QUIT :"Leaving." < 1179529737 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :back < 1179529740 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :ok, so like < 1179529747 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :if you think about it < 1179529755 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :prototype objects are essentially tables < 1179529861 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :there are labels, type data, and pointers < 1179529923 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :actually, it might make more sense to modify it < 1179529941 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :nevermind < 1179530014 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :hey < 1179530019 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :are there any regex experts here? < 1179530027 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :I have a weird question < 1179530088 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :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? < 1179530181 0 :puzzlet!unknown@unknown.invalid QUIT :Read error: 104 (Connection reset by peer) < 1179530217 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :probably wouldn't need to, would I? < 1179530222 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :hmmm < 1179530239 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :yeah < 1179530254 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :it wouldn't make sense if a capture is in one part of a branch for example, but not another < 1179530258 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :so only on a sequence < 1179530307 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :as a part < 1179530311 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :to match a pattern < 1179530328 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :so like mmm < 1179530353 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :subpattern[0] >> 'abc' >> captured[0] < 1179530534 0 :Figs!unknown@unknown.invalid PRIVMSG #esoteric :g2g < 1179530535 0 :Figs!unknown@unknown.invalid QUIT :"Goodbye World" < 1179530987 0 :puzzlet!n=puzzlet@122.46.188.21 JOIN :#esoteric < 1179531629 0 :alex-4!n=alex@c-67-168-103-144.hsd1.wa.comcast.net JOIN :#esoteric < 1179532194 0 :ihope_!n=ihope@c-71-205-100-59.hsd1.mi.comcast.net JOIN :#esoteric < 1179532258 0 :ihope_!unknown@unknown.invalid QUIT :Read error: 104 (Connection reset by peer) < 1179532646 0 :ihope!unknown@unknown.invalid QUIT :Read error: 60 (Operation timed out)