←2011-06-23 2011-06-24 2011-06-25→ ↑2011 ↑all
00:27:13 -!- augur has quit (Remote host closed the connection).
00:36:00 -!- FireFly has quit (Remote host closed the connection).
00:51:38 -!- oerjan has quit (Quit: Good night).
00:53:30 -!- Vorpal has quit (Ping timeout: 260 seconds).
01:52:00 -!- zzo38 has quit (Remote host closed the connection).
02:00:43 <tswett> You know, I wonder whether there are any compilers that are computable bijections.
02:01:22 <tswett> Is there a program that compiles Unlambda to Brainfuck, such that every possible Brainfuck program is given by exactly one Unlambda program?
02:01:52 <Patashu> Sure, just insert a nonce or hash at the end
02:01:58 <Patashu> </notexpectedanswer>
02:02:32 <tswett> Computable bijective compilers obviously exist in some cases (like compiling a language to itself), so perhaps they exist in call cases. At least, languages that can be compiled to and fro at all.
02:03:13 <newsham> how do you figure it will be a unique mapping?
02:03:15 <tswett> Patashu: yes, but will that make it so that every possible Brainfuck program is given by at least one Unlambda program?
02:03:33 <Patashu> hrm...
02:03:41 <tswett> newsham: what do you mean? The question is whether it's possible to make it a unique mapping or not.
02:03:43 <newsham> for(;;) { }, while(1) { }; ... /*comment*/ /* comment */
02:03:46 <Patashu> every possible brainfuck program as in every combination of valid syntactical symbols or every possible turing machine it could be?
02:03:57 <newsham> bijection implies 1:1 mapping.
02:03:59 <tswett> Patashu: the former.
02:04:23 <newsham> even C <-> C isnt 1:1
02:04:40 <tswett> newsham: well, you can simply compile each C program to itself. Voila, one-to-one mapping.
02:05:09 <CakeProphet> hey I think they have a program called cat for that.
02:05:32 <Patashu> has anyone ever made a C interpreter?
02:05:42 <newsham> do you want to discount changes in syntax? ie. doI have to translate each comment properly? whiespace and indentation?
02:06:00 <newsham> patashu: many people have. or do you means specifically in this room?
02:06:09 <tswett> newsham: the bijection only needs to preserve program behavior. It can add or remove comments ad libitum.
02:06:44 <Patashu> ah, so there is one
02:06:51 <newsham> tswett: can I use comments in the bijection? ie. can I translate for(;;) in C to while(true) { /*for*/ in java?
02:07:04 <newsham> so that I know who to map it back to C later?
02:07:13 <tswett> If uncomputable mappings were allowed, this would be pretty easy. We're given an Unlambda program. Enumerate all Unlambda programs that behave the same way, and suppose this is the nth. Enumerate all Brainfuck programs that also behave that way; output the nth.
02:07:17 <tswett> newsham: yes, that's allowed.
02:07:44 <Sgeo> Futurama
02:08:01 <newsham> so basically I just have to compile from one language to another language, and capture the original program in comments.
02:08:34 <tswett> newsham: well, it must be a bijection. That means that (supposing you're translating from Unlambda to Brainfuck) every Brainfuck program must be possible to produce somehow.
02:08:43 <newsham> so basically: translate = compile to exe, and write a virtual machine that interprets exes
02:10:01 <newsham> i'm skeptical.
02:10:37 <tswett> Well, yes, there's a reason it's a question rather than a statement. :)
02:10:48 <newsham> ok, for example, I dont think you'll find a bijection between C and python, because of how comments and whitespace are handled differently in the two languages
02:11:15 <tswett> Well, it's easy to, say, strip out all the comments and whitespace, and then encode them back in once you're done.
02:11:31 <newsham> no, because I can encode comments in different ways
02:11:43 <newsham> I can encode // comment and /* comment */ in C
02:11:47 <newsham> but not in python
02:12:21 -!- augur has joined.
02:13:02 <tswett> When you strip out all the comments and whitespace, just turn all the information that you just got into an integer.
02:13:23 <newsham> tswett: ok, say you do that for every possible C program comment.
02:13:33 <newsham> now, whats the bijection from every possible python program?
02:14:05 <newsham> remember: I might have a python comment that has an integer in it
02:14:12 <tswett> Given a program with no comments or excess whitespace, there are countably many ways to add comments and whitespace to it. This is the same for C and for Python. Therefore, it must be possible to encode all the comments and whitespace as an integer, and to decode that integer to produce comments and whitespace.
02:14:33 <tswett> So, take your C comments and whitespace, turn them into an integer, and turn that integer into Python comments and whitespace.
02:14:53 <newsham> where are you outputting this integer?
02:14:58 <newsham> into a comment?
02:15:01 <Patashu> It's just an ennumeration
02:15:13 <newsham> this is a bijection, the data has to be encoded in the output
02:15:37 <newsham> if you take all the comments from my C program and encode it into the number "42" as a comment in the python program
02:15:43 <newsham> now what happens when you reverse map that program?
02:15:43 <tswett> newsham: the integer becomes represented by all of the whitespace and comments in the resulting Python code. Every possible combination of whitespace and comments in Python corresponds to exactly one integer.
02:16:30 -!- augur has quit (Remote host closed the connection).
02:17:36 <newsham> now when I translate a python program with the comment "42" in it, it goes back to a C program with lots of textual comments?
02:17:55 <newsham> but when I translate a python program with the comment "42!" in it it goes back to a C program with just a single integer in its comments?
02:19:24 <tswett> A C program whose comments are represented by the number 42 doesn't become a Python program with the comment "42" in it. It becomes a Python program whose comments are represented by the number 42.
02:19:50 <newsham> where are you encoding that number in the python program?
02:20:06 <newsham> you have f :: C -> Py, and g :: Py -> C
02:20:16 <newsham> so the 42 has to be somewhere in the Py.
02:20:41 <tswett> You have f :: C -> Integer and g :: Py -> Integer. Then, to get C -> Py and Py -> C, you take g^-1 . f and f^-1 . g.
02:22:35 <newsham> wait.. you're assuming you have functions that enumerate both C and Py programs that have the same functionality :)
02:23:01 <newsham> I call shenanigans
02:23:16 <Patashu> how else are you going to do it?
02:24:19 <newsham> patashu: you just shifted the problem.. let me restate my original question in your new shifted problem. give me f and g for C and python comments.
02:24:27 <newsham> you cant do it.
02:25:06 <newsham> actually.. wait.. you prob can do it for comments alone.
02:25:43 <newsham> but thats because you avoid the constraint that they have to run the same way.
02:25:48 <newsham> so any enumeration of comments works.
02:27:57 <newsham> ok, how about this. whats the bijection between SKI calc with C++ comments and SKI calc with python comments.
02:28:15 <newsham> hmm that might be too easy too
02:28:36 <newsham> ok, i'm getting more convinced that your approach can work when ther is a bijection
02:29:23 <newsham> i think an interesting test case would be SKI with c++ comments to lambda calc with python comments.
02:29:39 <newsham> (ignore whitespace, but deal with variable renaming)
02:30:07 <newsham> the comments in one program has to encode for the comments+variablenames in the other program
02:30:52 <newsham> and also has to encode for the choice of which type of comments are used
02:31:19 * Sgeo watches Futurama fail at math
02:32:59 <pikhq> That's probably intentional.
02:33:51 <newsham> some kinda rendering error?
02:37:25 <CakeProphet> why not just ignore comments and insignificant whitespace, since they have no semantic effect?
02:37:37 <tswett> newsham: yeah, doing comments is the easy part.
02:37:46 <tswett> CakeProphet: you might as well, I guess.
02:40:23 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
03:01:10 -!- BeholdMyGlory has quit (Remote host closed the connection).
03:04:13 -!- augur has joined.
03:16:18 -!- copumpkin has joined.
03:17:21 -!- Sgeo has quit (Ping timeout: 250 seconds).
03:18:59 -!- pumpkin has joined.
03:18:59 -!- pumpkin has quit (Changing host).
03:18:59 -!- pumpkin has joined.
03:20:49 -!- copumpkin has quit (Ping timeout: 250 seconds).
03:23:14 -!- Sgeo has joined.
03:23:44 <Sgeo> TF2 is free forever now
03:25:29 <CakeProphet> oh nice.
03:25:49 <CakeProphet> I might go download it then.
03:30:06 -!- pumpkin has quit (Ping timeout: 252 seconds).
03:30:40 -!- copumpkin has joined.
03:30:40 -!- copumpkin has quit (Changing host).
03:30:40 -!- copumpkin has joined.
03:43:04 -!- azaq23 has quit (Ping timeout: 260 seconds).
03:44:28 <pikhq> TIL about Perl "bless".
03:45:05 <pikhq> CakeProphet: How do you continue to be coherent? Surely your brain has a giant tumor by now?
03:45:21 <Sgeo> pikhq, what?
03:46:47 <pikhq> Excuse me, I have to be incoherent for a bit, that is just too terrible.
03:48:30 <Sgeo> What is? Perl's bless?
03:48:33 * Sgeo googles
03:51:22 <CakeProphet> TIL?
03:51:27 <CakeProphet> oh
03:52:02 <CakeProphet> pikhq: wait I thought you had experience with Perl already? You should have already learned about bless. :P
03:52:15 <pikhq> DIE DIE DIE DIE DIE
03:52:26 <CakeProphet> but yeah, Perl's OO is pretty stupid, not going to lie.
03:52:37 <pikhq> MURDER THE MAN WHO BROUGHT THIS INTO THE WORLD
03:54:05 <CakeProphet> That's why I've never made a class in Perl.
03:54:08 <CakeProphet> no point..
03:54:51 <CakeProphet> the only reason I would make a class in Perl is if I were designing a CPAN package that was intended to be subclassed.
03:57:23 -!- myndzi has quit (Ping timeout: 264 seconds).
03:58:45 -!- myndzi has joined.
03:59:32 -!- azaq23 has joined.
04:01:27 <CakeProphet> pikhq: I usually just program imperitively/procedurally in Perl.
04:02:18 <CakeProphet> since the OO stuff was just kind of thrown in Perl 5 simply for the sake of having it, and doesn't really integrate into the language very well.
04:04:07 <CakeProphet> like, look at how shitty inheritance is:
04:04:26 <CakeProphet> package Bot::RoleBot; our @ISA = qw(Bot::BasicBot);
04:04:43 <monqy> :'(
04:04:46 <CakeProphet> inheritance = set this magic method resolution list
04:05:16 <CakeProphet> oh, for those who don't know: qw(a b c) = ('a', 'b', 'c')
04:05:22 <monqy> gross
04:06:11 <CakeProphet> I love qw because it allows me to be incredibly lazy. :D
04:06:24 * pikhq cuts off CakeProphet's arms
04:06:49 <monqy> doesn't ruby have those things too? gross.
04:07:06 <CakeProphet> not sure, actually. I know Ruby has q and qq.
04:07:16 <monqy> they're all the same to me
04:07:57 <monqy> i.e. meaningless language-defiling syntactic sugar that should not exist
04:08:06 <CakeProphet> q and qq are good ideas, believe it or not. Because it allows you to avoid escaping quotes within strings.
04:09:14 <CakeProphet> q{I can't believe how easy it's to type English's sentences and stuff.}
04:09:30 <CakeProphet> only comes up occasionally though.
04:09:48 <CakeProphet> like when you're trying to nest 20 strings within one another and evaling them all off... you know, it happens.
04:10:02 <monqy> no
04:10:03 <monqy> it doesn't
04:10:04 <monqy> ever
04:10:04 <monqy> happen
04:10:09 <CakeProphet> check the #esoteric logs. :P
04:10:18 <monqy> someone is a bad person
04:10:39 <CakeProphet> if you search for something like q{q[q( you'll probably find it
04:11:06 <CakeProphet> or q!q@q#q$q%
04:11:08 <CakeProphet> :)
04:11:49 <CakeProphet> monqy: don't tell me you're against sugar in principle. That would be silly.
04:12:08 <CakeProphet> I'm guessing it's just this particular form of it?
04:12:28 <monqy> I prefer providing a more general extensible interface like macros
04:12:42 <monqy> but in some cases e.g. string literals it can be a necessary evil
04:13:26 <CakeProphet> but you don't think it's a good idea to allow overriding the delimiter so that you can avoid ugly \'s?
04:14:22 <monqy> I'm sure you'd be able to do it well enough with a macro if your macro system is cool????
04:14:31 <CakeProphet> yeah I guess so.
04:14:32 <monqy> also: why would you want to do it, provided your code is sane
04:14:50 <pikhq> monqy: Well, in Tcl it makes a *little* bit of sense I guess.
04:15:07 <Lymee> eval q|some code goes here|
04:15:07 <Lymee> etc.
04:15:20 <pikhq> monqy: Seeing as you typically do metaprogramming based on constructing strings.
04:15:38 <CakeProphet> it usually comes up when you're dealing with strings that contain code. Or for example, when you're executing a shell command you can use qx instead of `
04:16:07 <monqy> I try to keep my code out of strings
04:16:27 <monqy> put them in lists/symbols if necessary but
04:16:46 <monqy> where by lists I mean nested lists representing a syntax tree
04:16:55 <monqy> strings is quite icky to me
04:17:14 <pikhq> In Tcl, a list is just a particular form of string, so...
04:17:14 <CakeProphet> well then you're weird. :P
04:17:54 <monqy> strings are so unstructured
04:18:03 <CakeProphet> how so?
04:18:17 <pikhq> (specifically, a string that possesses structure, like you would expect of a list)
04:18:25 <monqy> for one they're serial
04:18:54 <CakeProphet> ah I see what you're saying. Well yes, when you need structure you can use lists/trees. strings are quite fine for what they're intended for.
04:19:42 <CakeProphet> strings just represent an unparsed form of a structure. for example, a parser can't just magically form a parse tree from a file, it needs to read it as a string first.
04:20:56 <monqy> well parse it before treating it as code please
04:21:39 <CakeProphet> quines are another example of where q comes in handy.
04:23:16 <CakeProphet> here you're not concerned with the code itself, simply the string of the source code. That's a somewhat common case of where string literals are used. Not just in handling source code to be executed, but also in handling code to be manipulated/generated/output
04:25:03 <CakeProphet> a script that outputs HTML source, for example, will probably contain some string literals containing double quotes.
04:26:02 <Patashu> no way guys I'd rather do this ////////'foo////////'
04:26:24 <CakeProphet> s'/'\'
04:26:28 <Patashu> oops
04:26:34 <Patashu> wait
04:26:35 <CakeProphet> (see what I did there? :P )
04:26:38 <Patashu> what kind of s notation is that
04:26:43 <CakeProphet> Perl's...
04:27:04 <CakeProphet> you can use any delimeter you want. I used ', which also signifies that there's no interpolation. Thus I didn't have to worry about escaping things.
04:27:16 <CakeProphet> in much the same way that a ' string literal works.
04:27:21 <Patashu> wow, neat
04:29:26 <CakeProphet> that's typically when s''' is used, when you have literal backslashes. I see s{}{} used when there are forward slashes.
04:29:49 <CakeProphet> but you can even do s#stuff#here#, and Perl won't parse the # as beginning a comment.
04:30:21 <CakeProphet> but that's a stupid delimiter. don't ever do that. :P
04:41:03 <CakeProphet> Perl's actually not illegible if write neat code. Obviously the best way for me to support this point is to show you some abusive code I wrote a few days ago.
04:41:07 <CakeProphet> *you write
04:41:18 <CakeProphet> $msg .= "$_ commands: ".join (', ', map {$seen{$_}=1;$_} @{$cats{$_}}).' ' for sort {$b cmp $a} keys %cats;
04:41:21 <CakeProphet> see? beautiful.
04:41:53 <coppro> perl 6?
04:41:57 <CakeProphet> no, 5
04:41:57 <coppro> wait no
04:42:03 <coppro> perl 5 has methods on strings?
04:42:10 <CakeProphet> no that's string concatenation.
04:42:16 <coppro> oh
04:42:19 <CakeProphet> too much Python, coppro? :P
04:42:21 <coppro> usually I see it with spaces
04:42:22 <coppro> yep
04:42:29 <coppro> used to "a" . "b"
04:42:31 <coppro> not "a"."b"
04:42:40 <coppro> of course, in Perl 6, those probably have different semantics
04:43:00 <CakeProphet> I have no clue actually. I have no read Perl 6 specs, but I do know that . is a method accessor thing.
04:43:06 <CakeProphet> dunno what string concatenation looks like.
04:43:29 <CakeProphet> I guess a space there wouldn't hurt.
04:43:41 <coppro> ~
04:44:12 <CakeProphet> ~?
04:44:29 <coppro> concatenation in perl 6
04:45:21 <CakeProphet> ah. I wouldn't expect that to mean concatenation, but you shouldn't really expect symbols to mean something without knowing what they mean.
04:45:42 <coppro> I do like Perl 6's approach to unary functions on $_
04:45:49 <coppro> unary .
04:46:13 <CakeProphet> so a unary . signifies that $_ is being used?
04:46:20 <coppro> yeah
04:46:21 <coppro> .print
04:46:24 <coppro> err
04:46:25 <coppro> .print;
04:46:29 <CakeProphet> that's not bad, I suppose.
04:46:42 <coppro> explicit, but quick
04:46:54 <CakeProphet> to me, Perl 6 seems very esoteric.
04:47:11 <CakeProphet> more so than Perl 5, anyways.
04:47:57 <coppro> indeed
04:48:09 <coppro> my favorite feature is *
04:48:31 <CakeProphet> what is that.
04:48:40 <coppro> whatever
04:48:51 <pikhq> Perl 6: because Perl needs monads.
04:48:59 <pikhq> :P
04:49:20 <coppro> what
04:49:50 <CakeProphet> honestly, I kind of prefer that Perl devs focused on improving Perl 5 without adding radically new semantics/syntax everywhere.
04:50:04 <CakeProphet> +would
04:50:04 <pikhq> I seem to recall that a monadic API got snuck in there somewhere, because of Pugs.
04:50:30 <pikhq> (Pugs being a Perl 6 interpreter written in Haskell.)
04:53:45 <CakeProphet> I know there is something slightly wrong with me when I am okay with @ and % changing to $ when subscripted.
04:54:20 <CakeProphet> I believe that remove that in Perl 6 though.
04:55:15 <coppro> Whatever is awesome
04:55:22 <coppro> it can be used to create closures
04:55:28 <CakeProphet> what does it do?
04:55:47 <coppro> or passed as an argument to Whatever-aware functions that will have special behavior
04:55:58 <coppro> *+2 creates a unary closure that adds two
04:56:12 <CakeProphet> ah okay.
04:56:17 <CakeProphet> that is indeed quite awesome.
04:56:30 <coppro> but it does other things
04:56:39 <CakeProphet> well, oh course, this is Perl after all. :P
04:56:43 <coppro> sort *, [] is default sort
04:56:53 <coppro> for example
04:57:00 <CakeProphet> can't just write sort []?
04:57:16 <coppro> no, because sort takes two arguments
04:57:29 <CakeProphet> ..oh right.
04:57:39 <CakeProphet> there is no @_ anymore.
04:59:18 <coppro> you also use whatever for unbounded ranges, etc.
04:59:32 <coppro> basically it means "I don't care"
05:01:10 <Patashu> Someone needs to write a flogscript manual
05:01:48 <coppro> ooh, another one
05:02:01 <coppro> it's also used for a black hole in tuple assignment
05:04:19 <Patashu> if($c=='F)') { //flow-control-fumble
05:04:20 <Patashu> best operator
05:04:22 <CakeProphet> ah, that's what undef is for in Perl 5. Except it's lists and not tuples.
05:04:27 <Patashu> throw, catch, fumble :)
05:05:07 <CakeProphet> so is there no eq in Perl 6? or is using == incorrectly intentional there?
05:07:16 <Patashu> haha, extchars
05:08:50 <coppro> CakeProphet: it's lists in Perl 6
05:24:40 <CakeProphet> are IRC nicks case insensitive?
05:25:07 <CakeProphet> nevermind. I answered my own question with /whois :P
05:26:52 <CakeProphet> my ($self, $body) = (shift, shift->{body});
05:26:59 <CakeProphet> this line kind of reads like a poem about dancing.
05:27:52 <CakeProphet> a very bad one.
05:32:25 -!- pikhq_ has joined.
05:35:11 -!- pikhq has quit (Ping timeout: 264 seconds).
05:57:01 -!- copumpkin has quit (Ping timeout: 240 seconds).
05:57:26 -!- copumpkin has joined.
06:01:09 <pikhq_> So. Split-brain patient, one half is theist, one half atheist. What happens if, say, the theistic claims are true, and have the standard "through belief you shall be saved" bit going on?
06:01:33 <Sgeo> Can that happen?
06:01:41 <Sgeo> Split-brain working like that?
06:01:47 <pikhq_> Yes, that is how split brain works.
06:02:28 <pikhq_> By cutting the corpus callosum, you get two seperate minds.
06:03:22 <pikhq_> This specific case has actually happened, BTW.
06:03:59 <Sgeo> Wait, how do you tell what the right side of the brain is? I thought only the left could speak?
06:04:26 <Sgeo> Hmm, also, just a guess: Right theist, left atheist?
06:04:31 <pikhq_> The right side still has motor control and is capable of understanding language to an extent.
06:07:45 <CakeProphet> the functions of the brain are not strictly localized to certain hemispheres.
06:07:57 <CakeProphet> though each hemisphere is specialized towards functions.
06:09:05 <pikhq_> By cutting the corpus callosum, though, you end up getting pretty much two seperate brains in the same body.
06:09:41 <CakeProphet> yes. I believe only one is in use at a given time?
06:09:50 <Patashu> That is a really interesting thought experiment
06:09:58 <Patashu> I need to use that one sometime
06:10:03 <pikhq_> CakeProphet: No, both function simultaneously.
06:10:11 <Sgeo> CakeProphet, if there's no connection, how would they know to take turns?
06:10:28 <CakeProphet> I had never heard of each hemisphere developing different beliefs
06:10:33 <CakeProphet> Sgeo: shush.
06:11:02 <CakeProphet> message passing queues over quantum entanglement, duh.
06:11:19 <Sgeo> You can't pass messages with quantum entanglement.
06:11:24 <CakeProphet> ... -_-
06:11:29 <Sgeo> At least, as far as I know
06:11:29 <pikhq_> Sgeo: It's actually only seperating the cerebral cortex into two.
06:11:36 <Sgeo> pikhq_, ah.
06:11:59 <pikhq_> So, you get rather a *lot* of seperation between them, but not actually complete seperation.
07:04:39 <CakeProphet> I do wish Perl's dereference operators used () instead of {}
07:04:54 <CakeProphet> @{$cats{$_}} is just kind of gross looking.
07:04:55 <lambdabot> Unknown command, try @list
07:48:55 <pikhq_> http://i.imgur.com/MmQAb.png What. The. Fuck.
07:49:04 <pikhq_> This is not right not right not right.
07:50:00 -!- monqy has quit (Quit: hello).
07:50:55 <olsner> lithium (assuming that's from back when 7-up had lithium) is probably good for kids
07:52:00 <pikhq_> That's totally 50s graphic design, so *just* after they got rid of the lithium.
07:52:10 <pikhq_> (they removed the lithium citrate in 1950.)
07:55:01 <pikhq_> Well, there's a chance that was 40s.
07:55:08 <pikhq_> So it would have lithium.
07:55:27 <pikhq_> Ah, found the publication date of the pamphlet it's from.
07:55:29 <pikhq_> 1953.
07:57:02 <Sgeo> I think the point is just that it gets kids to drink it
07:58:50 * Sgeo goes to make a rules table for his own reversible GoL
07:58:55 <Sgeo> Because I think Paul's is crap
07:59:36 <pikhq_> Much easier way to do that.
07:59:44 <pikhq_> "It drinks the milk or else it gets the hose again!"
07:59:47 <pikhq_> </psychopath>
07:59:54 -!- choochter has joined.
07:59:59 <Sgeo> Or, alternatively, I set up ReversibleLife wrong
08:00:11 <Sgeo> Yep, got it working now
08:01:27 <Sgeo> E seems to have done it the same way I have too
08:01:55 <Sgeo> Assigning same numbers and all
08:03:11 <Sgeo> Dangit it looks boring and unlikely to kickstart life
08:07:03 -!- azaq23 has quit (Quit: Leaving.).
08:11:44 <Sgeo> Is there a way in Golly to make the world a torus?
08:12:06 <Sgeo> In theory, that would let me actually observe the world shrinking back down
08:12:33 <Sgeo> It _has_ to be possible for the mass of a reversible CA to shrink, I think
08:12:46 <Sgeo> Well, hmm, not has to be... well, actually, not sure
08:12:55 <Sgeo> But reversibility should be no hinderance
08:14:25 -!- Vorpal has joined.
08:14:36 <Patashu> try using MCell
08:14:39 <Sgeo> The GoL glider sort of becomes a dangit I forgot what it's called
08:16:22 <Sgeo> Or I could just find the Golly documentation
08:16:30 <Sgeo> Just added :T20,20 to the rule name
08:17:04 <coppro> Sgeo: I believe so
08:17:39 <Sgeo> Ok, time is not behaving cyclically like I expected
08:17:49 <Sgeo> Does being on a torus just break reversibility period?
08:18:14 <coppro> uh, why would it?
08:18:51 <coppro> also one can trivially show that any reversible automaton in finite space is cyclic
08:19:27 <Sgeo> No idea, but time should be cyclic, returning to the starting configuration. Otherwise, you'd get two states, one traced back to the initial state, and one not
08:19:36 <coppro> more to the point
08:19:40 <coppro> you have a finite state space
08:19:45 <coppro> a generation is a bijective operation
08:20:10 <Sgeo> coppro, should it or should it not eventually return to the starting state?
08:20:14 <Sgeo> If it's on a torus
08:20:18 <coppro> it should
08:20:25 <coppro> if it is reversible, that is
08:20:27 <Patashu> a torus just means you're making the bijection differently
08:20:30 <Patashu> right?
08:20:47 <coppro> Patashu: A torus means finite space, that's the key
08:20:57 <coppro> The generation function in an infinite space is not necessarily bijective
08:20:58 <Sgeo> Maybe I'm just not being patient enough
08:21:13 <coppro> Sgeo: there are 2^cells possibilities
08:21:18 <coppro> it may take a while
08:21:38 * Sgeo makes it a 10x10 torus
08:21:49 <coppro> still 2^100 possibilities
08:22:02 <Patashu> that would be a pretty effective CA to enumerate through every possible state
08:22:45 <coppro> true
08:23:04 <coppro> Sgeo: you need more math
08:23:18 <Sgeo> I think I'm seeing it
08:23:22 <Sgeo> But just keep missing it
08:24:20 * Sgeo makes a 5x5, and a line across the universe, and it's much more visible now
08:24:45 <coppro> Sgeo: why won't you accept a proof
08:24:51 <coppro> which you came up wiht
08:24:52 <coppro> *with
08:25:18 <Sgeo> I just wanted to see a demonstration in action, is all
08:28:46 <coppro> k here's an example
08:29:11 <coppro> my CA has state space {1, 0}. Generation function is 1 => 0, 0 => 1
08:29:15 <coppro> run for two generations
08:29:41 -!- cheater__ has quit (Ping timeout: 255 seconds).
08:40:32 <Sgeo> http://necsi.edu/postdocs/sayama/sdsr/movies/evol-emr.html
08:43:42 * Sgeo tries random fill with evoloop
08:44:03 <Sgeo> Probably won't be effective unless I make a very large random fill though, and that would take a whiel
08:45:35 -!- cheater__ has joined.
08:49:14 <Sgeo> Ok, this is too slow for my tastes
08:55:04 <CakeProphet> > let genericFib a b = a : b : zipWith (+) (genericFib a b) (tail $ genericFib a b) in genericFib 2 2
08:55:08 <lambdabot> mueval-core: Time limit exceeded
08:55:25 <CakeProphet> > let genericFib a b = a : b : zipWith (+) (genericFib a b) (tail $ genericFib a b) in genericFib 2 2
08:55:30 <lambdabot> mueval-core: Time limit exceeded
08:55:33 <CakeProphet> ...?
08:55:52 <Deewiant> > let genericFib a b = let fibs = a : b : zipWith (+) fibs (tail fibs) in fibs in take 10 $ genericFib 2 2
08:55:53 <lambdabot> [2,2,4,6,10,16,26,42,68,110]
08:56:09 <Deewiant> > let genericFib a b = let fibs = a : b : zipWith (+) fibs (tail fibs) in fibs in genericFib 2 2
08:56:10 <lambdabot> [2,2,4,6,10,16,26,42,68,110,178,288,466,754,1220,1974,3194,5168,8362,13530,...
08:56:14 -!- cheater__ has quit (Ping timeout: 255 seconds).
08:56:37 <CakeProphet> not sure I understand what happened.
08:57:01 <Deewiant> > let genericFib a b = a : b : zipWith (+) (genericFib a b) (tail $ genericFib a b) in genericFib 2 2
08:57:05 <lambdabot> mueval-core: Time limit exceeded
08:57:06 <Deewiant> > let genericFib a b = a : b : zipWith (+) (genericFib a b) (tail $ genericFib a b) in take 10 $ genericFib 2 2
08:57:07 <lambdabot> [2,2,4,6,10,16,26,42,68,110]
08:57:35 <Deewiant> It's just too slow without the sharing
08:57:44 <CakeProphet> I guess that's it.
08:58:04 <CakeProphet> seems like there could be a way to optimize situations like that to be equivalent.
08:58:11 <Deewiant> Doing it in GHCi, your version is really slow
08:58:19 <CakeProphet> ah
08:58:34 <Deewiant> take 30 takes 1.51 seconds
08:58:44 <Deewiant> Versus 0.01
08:58:58 <CakeProphet> would they be equivalent when compiled?
08:59:03 <Deewiant> No
08:59:12 <Deewiant> GHC doesn't do that kind of transformation
08:59:14 <Deewiant> It can introduce space leaks
09:00:48 <Deewiant> http://www.haskell.org/haskellwiki/Performance/GHC#Common_subexpressions
09:09:44 -!- cheater__ has joined.
09:32:11 * Sgeo discovers Golly's Pattern Info feature
09:56:14 <CakeProphet> !msg
09:57:50 <CakeProphet> !sh echo "Your bot needs better documentation, Gregor" > /dev/null
09:58:04 <Patashu> lol
09:58:22 <CakeProphet> This is proper complaint procedure according to !info
10:02:50 -!- cheater__ has quit (Ping timeout: 255 seconds).
10:42:23 -!- jcp has quit (Ping timeout: 264 seconds).
10:44:35 -!- Phantom_Hoover has joined.
10:48:04 -!- jcp has joined.
10:55:27 <CakeProphet> corewars is a fairly interesting thing.
11:05:58 -!- azaq23 has joined.
11:12:56 <CakeProphet> What property of an algorithm causes it to diverge on infinite data?
11:13:11 <Phantom_Hoover> Pretty sure that's undecidable.
11:13:44 <CakeProphet> I suppose that would involving the halting problem.
11:13:50 <CakeProphet> *involve
11:14:35 <Patashu> reminds me of http://www.xamuel.com/guessability/
11:14:46 <Patashu> though that's not what you want
11:16:53 <Phantom_Hoover> Seen on the SimplyNoise testimonial box: "My girlfriend and I use SimplyNoise every night."
11:26:32 <Vorpal> ^_^
11:28:16 <Phantom_Hoover> Vorpal, I don't even want to think about why you did that, given your established predilections.
11:31:59 <CakeProphet> > foldl1 (flip seq) [1..100]
11:32:01 <lambdabot> 1
11:32:51 <CakeProphet> > foldl1 (flip seq) [1..]
11:32:58 <lambdabot> mueval: ExitFailure 1
11:32:59 <lambdabot> mueval-core: Time limit exceeded
11:33:07 <CakeProphet> efficient computing of the number 1.
11:33:18 <CakeProphet> it's a thesis I'm working on.
11:33:44 <Patashu> @src seq
11:33:45 <lambdabot> Source not found. My pet ferret can type better than you!
11:33:48 <Patashu> :(
11:33:49 <Patashu> what's seq
11:33:54 <Vorpal> Phantom_Hoover, what? Oh wrong tab -_-
11:34:03 <Vorpal> not intended for this channel at all
11:37:42 <CakeProphet> Patashu: the first argument is forced to be strict, and then the second argument is returned.
11:37:56 <CakeProphet> it's the strictness primitive of Haskell (GHC? I don't know if it's portable)
11:38:00 <Patashu> aaah
11:38:23 <CakeProphet> it's commonly used in infix form.
11:38:28 <Patashu> so you apply flip seq to 1 and 2, you make 2 strict and return 1
11:38:32 <Patashu> then you apply it to 1 and 3 etc
11:38:34 <Patashu> ok
11:38:42 <CakeProphet> yes, it's a complete waste of time. :P
11:38:49 <Patashu> hehe
11:40:17 <CakeProphet> there's also "bang patterns", which lets you prepend a ! in front of a pattern to signify that it is strict. This can be more readable than using seq to force strictness.
11:40:22 <CakeProphet> it's a GHC extension.
11:45:03 <CakeProphet> when used correctly, it can dramatically speed up code. When used incorrectly, it can do absolutely nothing and make your code less pretty. In the worst case, it can hurt performance due to boxing/unboxing.
11:45:38 <Patashu> will GHC make something strict if it thinks it will help?
11:45:45 <Patashu> obviously not in every case but sometimes
11:46:01 <CakeProphet> yes
11:46:20 <CakeProphet> well, not if it thinks it will help, if it can and there's no reason not to.
11:47:29 <CakeProphet> if an expression is always evaluated by a function, then there's no reason to create the extra overhead of lazy evaluation.
11:48:42 <CakeProphet> though I think you need the -O flag for strictness analysis.
11:55:02 -!- FireFly has joined.
12:10:38 -!- Phantom_Hoover has quit (Ping timeout: 255 seconds).
12:33:17 -!- Phantom_Hoover has joined.
13:16:50 -!- azaq23 has quit (Quit: Leaving.).
13:17:16 <Phantom_Hoover> Whoa, you can roast eggs.
13:24:00 <Vorpal> Phantom_Hoover, oh, how?
13:24:17 <Vorpal> just in an oven?
13:27:57 -!- cheater__ has joined.
13:39:33 -!- BeholdMyGlory has joined.
14:21:01 -!- augur has quit (Remote host closed the connection).
14:32:49 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
14:56:31 -!- copumpkin has joined.
14:57:01 -!- augur has joined.
15:00:22 -!- Patashu has quit (Quit: MSN: Patashu@hotmail.com , Gmail: Patashu0@gmail.com , AIM: Patashu0 , YIM: patashu2 .).
15:32:51 -!- pikhq has joined.
15:33:17 -!- pikhq_ has quit (Ping timeout: 276 seconds).
15:44:23 -!- cheater__ has quit (Ping timeout: 255 seconds).
15:50:57 -!- derrik has joined.
15:51:27 -!- derrik has left.
16:01:10 -!- yiyus has quit (Remote host closed the connection).
16:37:28 -!- yiyus has joined.
16:53:59 <Vorpal> hm, in C, how does __LINE__ behave in an #if? And what if you had #if __LINE__ == 10 .... #elif __LINE__ == 10 ....
16:54:52 <Vorpal> hm works correctly
17:17:55 -!- pikhq has quit (Ping timeout: 252 seconds).
17:18:03 -!- pikhq has joined.
17:50:04 -!- zzo38 has joined.
17:51:32 <zzo38> If the rule against auras being creatures was not there, you could make a card like: Enchant permanent. This card is unblockable if attacking the player controlling enchanted permanent while that permanent is tapped.
17:57:16 <Lymee> You usually try to not make super-confusing cards.
17:59:50 <zzo38> Make up the card: All creatures are also planeswalkers until end of turn.
18:00:12 <zzo38> (I called it "Wrath of Gosh")
18:04:12 -!- choochter has quit (Quit: lang may yer lum reek..).
19:12:18 -!- oerjan has joined.
19:16:54 <pikhq> Ctrl-Q must die.
19:17:03 -!- augur has quit (Remote host closed the connection).
19:19:30 -!- CakeProphet has quit (Ping timeout: 276 seconds).
19:20:54 -!- CakeProphet has joined.
19:20:54 -!- CakeProphet has quit (Changing host).
19:20:54 -!- CakeProphet has joined.
19:36:23 <zzo38> pikhq: Elaborate? Context? etc?
19:44:49 <pikhq> zzo38: Q is right next to W. Q quits Firefox. W closes the current tab.
19:47:36 <pikhq> Because somehow, a hotkey *distinct* from Alt-F4 to close the program is helpful.
19:48:31 <Vorpal> pikhq, wild guess: legacy reasons. On classical Mac OS (which Netscape Navigator existed for) Cmd-q was the normal way to exit applications.
19:49:15 <pikhq> Then WHY STICK THE CLOSE TAB SHORTCUT ADJACENT TO IT
19:53:33 -!- elliott_ has joined.
19:53:37 <elliott_> q
19:55:56 <oerjan> elliott_: i am sorry, but pikhq has just banned q
19:58:34 <elliott_> pikhq will die
19:58:51 <elliott_> 19:48:31: <Vorpal> pikhq, wild guess: legacy reasons. On classical Mac OS (which Netscape Navigator existed for) Cmd-q was the normal way to exit applications.
19:58:54 <elliott_> also OS X
20:00:52 <Vorpal> elliott_, right
20:01:06 <elliott_> oerjan: hey, I need a very angry soundbite about using non-alphabetical symbols for variables in mathematics
20:01:08 <elliott_> oerjan: please provivde
20:01:21 <Vorpal> <pikhq> Then WHY STICK THE CLOSE TAB SHORTCUT ADJACENT TO IT <-- also legacy reasons, Cmd-w was also close window (and probably is on OS X)
20:01:54 <Vorpal> elliott_, you mean like 5 = 4.12?
20:01:55 <zzo38> pikhq: Possibly because of different window managers or something
20:01:55 <Vorpal> ;)
20:02:17 <Vorpal> (yes I know of that esolang)
20:02:33 <oerjan> how fortuitous
20:03:15 <oerjan> elliott_: what non-alphabetical symbols
20:03:31 <zzo38> elliott_: Do you not have microphone or angry computer speech?
20:03:37 <elliott_> oerjan: it's irrelevant
20:04:16 <oerjan> elliott_: um i mean i don't think that is very common
20:04:31 <zzo38> Still I would like to know what non-alphabetical symbols you mean and which ones specifically
20:04:34 <elliott_> oerjan: of course it isn't
20:04:43 <zzo38> Even if it is not relevant for such a sound.
20:05:55 <zzo38> (TeX allows you to use any symbol for variables in mathematics by using \mathord prefix)
20:10:24 <elliott_> 04:02:18: <CakeProphet> since the OO stuff was just kind of thrown in Perl 5 simply for the sake of having it, and doesn't really integrate into the language very well.
20:10:24 <elliott_> have you ever used Moose?
20:10:25 <elliott_> CakeProphet:
20:11:53 <oerjan> nah, my sister tried but got bitten by it
20:12:47 <oerjan> (note: joke might work better if i actually had a sister)
20:12:56 <elliott_> 04:19:42: <CakeProphet> strings just represent an unparsed form of a structure. for example, a parser can't just magically form a parse tree from a file, it needs to read it as a string first.
20:12:56 <elliott_> this is only necessary because filesystems store everything as strings
20:13:38 -!- zzo38 has left.
20:14:40 <oerjan> synchronistically, http://rjlipton.wordpress.com/2010/04/19/a-post-on-post/#comment-12208
20:15:20 <pikhq> elliott_: Gotta love that good ol' UNIX style.
20:15:25 <elliott_> 04:49:50: <CakeProphet> honestly, I kind of prefer that Perl devs focused on improving Perl 5 without adding radically new semantics/syntax everywhere.
20:15:25 <elliott_> you realise perl six came about because that became way too difficult?
20:15:56 <elliott_> Quantum Systems Engineering
20:15:56 <elliott_> In Service of Regenerative Medicine
20:15:59 <elliott_> this john sidles person looks fun
20:16:25 <elliott_> 04:50:30: <pikhq> (Pugs being a Perl 6 interpreter written in Haskell.)
20:16:29 <elliott_> pikhq: pugs is incredibly out of date and no longer maintained
20:17:14 <pikhq> elliott_: Yes, I realise.
20:17:16 -!- augur has joined.
20:17:23 <oerjan> elliott_: yes he does :P
20:18:39 <elliott_> oerjan: ?
20:18:43 <elliott_> oh
20:18:44 <elliott_> john sidles
20:18:47 <oerjan> yeah
20:19:35 <oerjan> always with a different perspective on the discussions
20:22:50 <elliott_> 11:40:22: <CakeProphet> it's a GHC extension.
20:22:56 <elliott_> um isn't it in haskell twenty ten
20:23:16 * elliott_ maintains heavy scepticism over CakeProphet's explanations of the intimate workings of the GHC optimiser
20:26:31 <oerjan> elliott_: i don't find it (but pattern guards are)
20:26:57 <elliott_> hmm, http://hackage.haskell.org/trac/haskell-prime/wiki/BangPatterns
20:27:38 <elliott_> To recover Haskell 98 semantics for a pattern binding, use a tilde:
20:27:38 <elliott_> let ~(x,y) = e in b
20:27:50 <elliott_> heh, BangPatterns violates ninetyeight?
20:27:54 -!- CakeProphet has quit (Ping timeout: 255 seconds).
20:28:23 -!- CakeProphet has joined.
20:28:23 -!- CakeProphet has quit (Changing host).
20:28:23 -!- CakeProphet has joined.
20:29:03 <elliott_> 21:46:01: <Phantom_Hoover> I like it when people use "borealis" in random names.
20:29:05 <elliott_> sexy borealis
20:30:12 <oerjan> elliott_: well ! would be a new keyboard, presumably (although it's already used in data declarations)
20:30:20 <oerjan> >_<
20:30:25 <oerjan> *keyword
20:30:33 <elliott_> for me it _would_ be a new keyboard :D
20:30:35 <elliott_> `addquote <olsner> as always in sweden everything goes to a fixed pattern: thursday is queueing at systembolaget to get beer and schnaps, friday is pickled herring, schnaps and dancing the frog dance around the phallos, saturday is dedicated to being hung over
20:30:36 <oerjan> BAD FINGERS
20:30:39 <HackEgo> 467) <olsner> as always in sweden everything goes to a fixed pattern: thursday is queueing at systembolaget to get beer and schnaps, friday is pickled herring, schnaps and dancing the frog dance around the phallos, saturday is dedicated to being hung over
20:30:42 <elliott_> <oerjan> elliott_: well ! would be a new keyboard, presumably (although it's already used in data declarations)
20:30:44 <elliott_> oerjan: no, as in
20:30:46 <elliott_> <elliott_> To recover Haskell 98 semantics for a pattern binding, use a tilde:
20:30:46 <elliott_> <elliott_> let ~(x,y) = e in b
20:31:12 <elliott_> 22:22:49: <Sgeo> Did comex just call Java a fine language?
20:31:12 <elliott_> 22:23:02: <Sgeo> By pointing to a comment that called it a fine language, I mean
20:31:12 <elliott_> "Do I have to stop idolising him?!?!?!"
20:31:27 <oerjan> elliott_: oh that would be with the strict default suggestion i guess, that's not part of ! patterns alone is it
20:32:21 -!- zzo38 has joined.
20:32:59 <oerjan> elliott_: anyway haskell 2010 only got the parts of prime they managed to agree upon, obviously
20:33:13 <elliott_> oerjan: right
20:33:18 <elliott_> oerjan: they should just standardise GHC :P
20:33:33 <oerjan> but it's a moving target...
20:34:12 <elliott_> oerjan: it's the _only_ target :P
20:34:23 <elliott_> are there even any other compilers that work any more, apart from jhc?
20:34:29 <elliott_> or interpreters, even, every other project is dead
20:34:43 <elliott_> oh there might be that UHC thing
20:34:45 <elliott_> oh, and LHC
20:34:47 <elliott_> but that's it
20:34:52 <oerjan> oh ! cannot be a keyword because it's already an array operator
20:35:25 <oerjan> elliott_: by moving, i mean they cannot standardize on ghc's features until _ghc_ has had them settle down
20:35:30 <elliott_> comex: people who reply to your tweets are really retarded, my condolences
20:35:38 <elliott_> oerjan: here's the spec: Implementations must act identically to GHC.
20:35:52 <oerjan> ok joking, got it
20:36:38 <elliott_> oerjan: you didn't realise? :D
20:37:02 <oerjan> elliott_: until your spec i was assuming there was _some_ kernel of seriousness in there
20:37:25 <elliott_> well, I am serious that there are basically no other viable implementations any more, unfortunately
20:38:29 <zzo38> That won't work very well but maybe do something similar to what I was proposing with C, but do it differently in a way which is suitable for Haskell, instead.
20:39:20 <oerjan> elliott_: there is just too much in ghc for anyone else to reimplement most of it, by now...
20:39:50 <elliott_> oerjan: I'm not sure _that_ is true
20:40:00 <elliott_> oerjan: it's still simpler than C++
20:40:18 <elliott_> and C++ ninety-eight takes about ten years to write a compiler for; C++0x I have no clue
20:40:46 <oerjan> well i am guessing C++ wouldn't have had more than one implementation either if the community size was the same as haskell's
20:41:03 <zzo38> And what I was proposing with C, is I mentioned list of things, which is a superset of C89 but a subset of GNU89. So maybe something similar idea with Haskell.
20:46:16 <elliott_> http://esolangs.org/wiki/Meta_Turing-complete
20:46:17 <elliott_> FUCK OFF TEHZ
20:46:18 <elliott_> JESUS CHRIST
20:46:23 <elliott_> THE WIKI IS NOT YOUR PERSONAL CRAP GROUND
20:46:41 <zzo38> (Also a subset of the features that Clang supports in GNU89 mode)
20:48:25 * elliott_ creates [[Talk:Meta Turing-complete]]
20:50:33 <elliott_> http://esolangs.org/wiki/Brainmaker
20:50:38 <elliott_> oerjan: how much do you love bf extensions
20:50:38 <Lymee> Uh...
20:50:40 <Lymee> Wait.
20:50:46 <Lymee> Isn't that term identical in meaning to "Turing complete"
20:51:16 <elliott_> heh, yes, tehz has the definition wrong
20:51:36 <zzo38> elliott_: Then explain that on the Talk page.
20:51:51 <elliott_> zzo38: i just did
20:51:54 <elliott_> i just realised
20:52:26 -!- CakeProphet has quit (Ping timeout: 240 seconds).
20:54:25 -!- monqy has joined.
20:55:37 <elliott_> hi monqy, tehz made another article
20:56:38 <monqy> oh great
20:57:13 <monqy> Brainmaker, eh?
20:57:20 * oerjan sidles away carefully
20:57:21 <monqy> let me guess it's a brainfuck ripoff
20:58:39 <monqy> ...tehz...:9
20:58:40 <monqy> :(
21:01:34 -!- FireFly has quit (Quit: swatted to death).
21:01:44 <elliott_> monqy: nope
21:01:46 <elliott_> well yes
21:01:49 <elliott_> but the one newer than that
21:01:54 <elliott_> Meta Turing-complete
21:01:57 <monqy> oh jeez another
21:02:00 <monqy> Meta Turing-complete
21:02:03 <elliott_> which he deliberately un-hyphenised from the alpaca article when he created it for some reason
21:02:08 <elliott_> see the talk page :P
21:03:27 <oerjan> i never meta turing. he died before i was born.
21:04:33 -!- calamari has joined.
21:04:43 <monqy> the article is confusing
21:05:25 <monqy> Some super-Turing-complete languages are able to do anything (see Compute/IO), so they are super fully meta Turing-complete.
21:05:28 <elliott_> `addquote <oerjan> i never meta turing. he died before i was born.
21:05:29 <HackEgo> 468) <oerjan> i never meta turing. he died before i was born.
21:06:37 <monqy> Infix notation is one of the 4 possible ways to describe a program. It is not as powerful as the others, so people usually add parenthesis, which makes it a combined notation (Infix-Surround).
21:07:21 <oerjan> fun fun super meta turing-complete
21:07:40 <monqy> super duper meta cool turing-complete
21:12:00 -!- calamari has quit (Quit: Leaving).
21:13:46 <elliott_> oerjan: hmm, if you added a term "value ::? Type" (where Type is constant in the source ofc) to Haskell, of type Bool, would that cause any inconsistency or impurity?
21:13:47 <elliott_> e.g.
21:13:53 <elliott_> isInt :: a -> Bool
21:13:58 <elliott_> isInt x = x ::? Int
21:14:19 <elliott_> (x ::? (Num a) => a would only be true if x was of type "forall a. (Num a) => a", I think)
21:14:38 <elliott_> i.e. I'm not sure isNum :: a -> Bool; isNum x = x ::? (Num a) => a would do what you expected...
21:16:01 <oerjan> elliott_: it would break parametricity
21:16:36 <Sgeo> "Currently, no one has even bothered looking into how to make an interpreter, so this are none. If you are less lazy than the other people reading this article, please make an interpreter, because I am too lazy."
21:16:40 <elliott_> oerjan: oh, duh
21:16:41 <monqy> are there any typeclass extensions that would allow doing something like that
21:16:46 <elliott_> oerjan: hmm, but anything else?
21:16:50 <elliott_> monqy: no afaik
21:17:03 <elliott_> i think the ghc devs would notice breaking parametricity :P
21:18:15 <oerjan> elliott_: it would require an implementation that didn't delete types, naturally
21:18:48 <elliott_> oerjan: well duh, I mean as far as the language itself
21:19:37 <oerjan> elliott_: i doubt it would be _impossible_...
21:20:26 <oerjan> iiuc there is a fusion rule which depends on parametricity
21:21:47 <elliott_> <oerjan> elliott_: i doubt it would be _impossible_...
21:21:48 <elliott_> ?
21:21:56 <elliott_> oerjan: dude, I am just asking if it would break the _language_
21:22:01 <elliott_> i don't care about implementation
21:22:18 <oerjan> elliott_: there's probably some extension which would break :P
21:22:53 <oerjan> i mean newtype deriving is already broken because of other parts that aren't parametric
21:23:24 <elliott_> what other parts?
21:24:05 <oerjan> gadts and type families
21:24:26 <oerjan> you can make unsafeCoerce by mixing them
21:24:40 <elliott_> oerjan: really??
21:24:45 <elliott_> do you have an example?
21:24:47 <elliott_> that sounds cool
21:24:51 <elliott_> is it just like
21:24:54 <oerjan> lemme look it up
21:25:00 <elliott_> data Foo a where lol :: b -> Foo a
21:31:28 <oerjan> hm it's http://hackage.haskell.org/trac/ghc/ticket/1496 but i'm not sure there's an explicit unsafeCoerce construction
21:32:17 <oerjan> well i guess the example converts between Int and Double
21:33:14 <elliott_> I bet http://hackage.haskell.org/package/eq would let you do horrible things with that
21:33:16 <oerjan> last i heard they were going to introduce new kinds to fix this
21:33:46 <elliott_> ooh, wait
21:33:55 <elliott_> I think you can actually do unsafeCoerce with just eq
21:36:58 <elliott_> http://sprunge.us/DYOQ -- but it's actually not unsafe...
21:36:58 <elliott_> it's == undefiend
21:36:59 <elliott_> undefined
21:36:59 <elliott_> so oh well
21:37:00 <elliott_> oerjan: dammit, the GHC devs thought of this
21:37:01 <elliott_> data a := b where
21:37:02 <elliott_> Refl :: a := a
21:37:02 <elliott_> coerce :: a := b -> a -> b
21:37:03 <elliott_> coerce Refl a = a
21:37:03 <elliott_> typechecks
21:37:04 <elliott_> coerce :: a := b -> a -> b
21:37:04 <elliott_> coerce ~Refl a = a
21:37:05 <elliott_> doesn't
21:37:29 <oerjan> wat
21:37:48 <elliott_> oerjan: because "coerce undefined a" == _|_ in the first version
21:37:48 <oerjan> how can a lazy pattern match change typing
21:37:56 <elliott_> oerjan: because GADTs do
21:38:05 <elliott_> remember, bringing a GADT constructor into scope can change types
21:38:09 <oerjan> oh
21:38:10 <elliott_> that's the whole point of pattern-matching on a GADT
21:38:16 <elliott_> if you make it irrefutable, you can pass in _|_
21:38:20 <elliott_> and introduce a type-system inconsistency
21:38:31 <elliott_> very clever for GHC catching that
21:38:32 <oerjan> heh
21:38:35 <elliott_> [asterisk]of GHC for
21:44:12 -!- CakeProphet has joined.
21:44:12 -!- CakeProphet has quit (Changing host).
21:44:12 -!- CakeProphet has joined.
21:47:14 -!- elliott_ has quit (Remote host closed the connection).
21:47:50 -!- elliott has joined.
21:50:54 <elliott> oerjan: "You cannot use atomically inside an unsafePerformIO or unsafeInterleaveIO. Any attempt to do so will result in a runtime error. (Reason: allowing this would effectively allow a transaction inside a transaction, depending on exactly when the thunk is evaluated.)"
21:50:54 <lambdabot> elliott: You have 3 new messages. '/msg lambdabot @messages' to read them.
21:51:00 <elliott> oerjan: hard to articulate how much that scares me
21:51:12 <elliott> (that it's common enough that they had to check for it, and that unsafePerformIO /can/ be detected)
21:53:45 <pikhq> elliott: Judging from Google, before they tested for it doing that would segfault.
21:54:08 <elliott> but how do they test for it :D
21:54:22 <pikhq> Also, they're not testing for unsafePerformIO or unsafeInterleaveIO, they're testing to see if there's a transaction within a transaction.
21:54:30 <elliott> ah
21:55:14 -!- CakeProphet has quit (Ping timeout: 240 seconds).
21:55:18 <pikhq> And the message is there because they got annoyed by people asking on the mailing list about it.
21:55:19 <oerjan> um that would not seem to be implied by "Any attempt to do so will result in a runtime error."
21:57:02 <oerjan> i guess they could make unsafePerformIO and unsafeInterleaveIO set up a fake transaction automatically if it _wasn't_ inside one
21:57:18 -!- CakeProphet has joined.
21:57:20 <oerjan> but that sounds inefficient :P
21:57:27 <elliott> huh, GLUT is unmaintained?
21:57:43 <elliott> anyway btw i think pikhq is wrong
21:57:50 <oerjan> elliott: what, it's in the platform?
21:57:53 <elliott> newTVarIO :: a -> IO (TVar a)
21:57:54 <elliott> IO version of newTVar. This is useful for creating top-level TVars using System.IO.Unsafe.unsafePerformIO, because using atomically inside System.IO.Unsafe.unsafePerformIO isn't possible.
21:57:56 <elliott> oerjan: no, in general
21:58:02 <elliott> oerjan: not the haskell lib
21:58:06 <elliott> GLUT itself
21:58:17 <elliott> also it's not open source...
21:58:24 <elliott> oh wait
21:58:28 <elliott> there are maintained forks :)
21:58:30 <elliott> well, not forks
21:58:33 <elliott> reimplementations i guess
21:59:32 -!- CakeProp1et has joined.
22:01:35 <elliott> hey pikhq how do you link to glut :q
22:02:06 -!- CakeProp2et has joined.
22:03:01 -!- CakeProphet has quit (Ping timeout: 258 seconds).
22:05:15 -!- CakeProp1et has quit (Ping timeout: 276 seconds).
22:07:58 -!- CakeProp2et has quit (Ping timeout: 246 seconds).
22:09:50 -!- CakeProphet has joined.
22:09:55 -!- CakeProphet has quit (Changing host).
22:09:55 -!- CakeProphet has joined.
22:10:54 -!- clog has quit (Ping timeout: 276 seconds).
22:10:59 -!- clog has joined.
22:11:18 <Sgeo> Ok, that's awesome
22:11:25 * Sgeo wonders how golly-ticker.rle was made
22:15:19 -!- CakeProphet has quit (Ping timeout: 246 seconds).
22:17:21 -!- CakeProphet has joined.
22:23:06 -!- CakeProphet has quit (Ping timeout: 250 seconds).
22:24:52 -!- CakeProphet has joined.
22:24:56 -!- CakeProphet has quit (Changing host).
22:24:57 -!- CakeProphet has joined.
22:25:27 -!- iconmaster has joined.
22:30:36 <Phantom_Hoover> * Sgeo wonders how golly-ticker.rle was made
22:30:37 -!- CakeProphet has quit (Ping timeout: 258 seconds).
22:30:59 <Phantom_Hoover> Glider → glider, LWSS converter, some reflectors.
22:31:09 <Phantom_Hoover> Not terribly complex.
22:31:57 <Sgeo> How much would I have to learn before I could make my own tickers?
22:32:08 <Sgeo> Fact that I have to ask is probably a bad sign
22:32:11 <Phantom_Hoover> ...next to none?
22:32:20 <Phantom_Hoover> You just change the pattern of gliders in the loops.
22:37:24 -!- CakeProphet has joined.
22:37:24 -!- CakeProphet has quit (Changing host).
22:37:24 -!- CakeProphet has joined.
22:40:57 -!- copumpkin has quit (Quit: Computer has gone to sleep.).
22:45:03 <elliott> http://esolangs.org/wiki/Rand.Next%28%29
22:45:07 <elliott> neither turing-complete nor a language; discuss
22:45:57 -!- CakeProphet has quit (Ping timeout: 258 seconds).
22:46:38 <monqy> rand.Next() is esoteric and created by user Checkmate.
22:47:02 <monqy> I think I'm missing the point
22:47:04 <monqy> is it art?
22:48:39 <elliott> it's shit
22:48:51 <oerjan> an excrement language
22:50:26 <monqy> today is a good day for bad things
22:50:58 <oerjan> so basically, today is the day when the concept of turing-completeness dies a horrible, messy death?
22:51:50 <oerjan> well it _is_ the end times. after the rapture and all.
22:52:48 -!- CakeProphet has joined.
22:52:48 -!- CakeProphet has quit (Changing host).
22:52:48 -!- CakeProphet has joined.
22:52:50 <elliott> oerjan: can you delete that and the meta turing completeness page
22:52:51 <elliott> thanks
22:53:16 <monqy> leave infix notation page for hilarity
22:54:23 <oerjan> elliott: IN UNIVERSO ALTERNATIVO, OERJAN PAGINAS DELET
22:54:37 <Sgeo> Maybe Hutton32 might be easier for my brain to understand?
22:54:37 <elliott> `addquote <elliott> oerjan: can you delete that and the meta turing completeness page <elliott> thanks <oerjan> elliott: IN UNIVERSO ALTERNATIVO, OERJAN PAGINAS DELET
22:54:39 <HackEgo> 469) <elliott> oerjan: can you delete that and the meta turing completeness page <elliott> thanks <oerjan> elliott: IN UNIVERSO ALTERNATIVO, OERJAN PAGINAS DELET
22:54:55 <elliott> `quote asdf
22:54:56 <HackEgo> No output.
22:56:24 -!- cheater__ has joined.
22:56:32 * oerjan was worried he'd got the conjugation wrong there
22:56:48 <elliott> horrific
22:58:37 <Sgeo> elliott, was I ever as bad as Checkmate or the Meta-turing-complete person?
22:59:06 <oerjan> DON'T ANSWER THAT
22:59:49 <elliott> i was avoiding it
22:59:54 <elliott> :D
23:00:00 <oerjan> good, good
23:00:16 <Sgeo> :(
23:03:58 -!- CakeProphet has quit (Ping timeout: 258 seconds).
23:04:23 -!- CakeProphet has joined.
23:04:23 -!- CakeProphet has quit (Changing host).
23:04:24 -!- CakeProphet has joined.
23:05:14 <oerjan> Sgeo: i hope you _do_ realize no one could make a non-snarky response to that kind of question...
23:05:41 <newsham> not even turing?
23:06:54 <oerjan> NOT EVEN TURING
23:07:16 <newsham> happy 99th
23:18:58 <elliott> I wish GHC had idiom brackets
23:19:08 <elliott> Hmm, you could actually do [i| ... |] with Template Haskell
23:19:16 <elliott> applicative-quoters library: Quasiquoters for idiom brackets and an applicative do-notation
23:19:18 <elliott> Success?
23:19:29 <elliott> Hehe, it uses i too
23:19:31 <elliott> http://hackage.haskell.org/packages/archive/applicative-quoters/0.1.0.1/doc/html/src/Control-Applicative-QQ-Idiom.html#i
23:23:57 -!- CakeProphet has quit (Ping timeout: 240 seconds).
23:26:08 -!- CakeProphet has joined.
23:26:08 -!- CakeProphet has quit (Changing host).
23:26:08 -!- CakeProphet has joined.
23:34:42 <CakeProphet> !perl print grep // (1,2,3)
23:34:43 <EgoBot> Not enough arguments for grep at /tmp/input.22143 line 1, near "// ("
23:34:46 <CakeProphet> !perl print grep //, (1,2,3)
23:34:46 <EgoBot> 123
23:34:54 <CakeProphet> !perl print grep /\Q\E/, (1,2,3)
23:34:55 <EgoBot> 123
23:36:15 <oerjan> > foldr shows "" [1,2,3]
23:36:16 <lambdabot> "123"
23:38:37 <elliott> i have this doubt that oerjan knows about TH
23:39:14 <oerjan> i know _about_ TH, i just don't _know_ TH
23:39:19 <elliott> :D
23:40:00 <Phantom_Hoover> <Sgeo> Maybe Hutton32 might be easier for my brain to understand?
23:40:04 <oerjan> > iterate((shows.length<*>(:).head).group)"1"
23:40:05 <Phantom_Hoover> As opposed to...?
23:40:05 <lambdabot> Couldn't match expected type `GHC.Base.String'
23:40:05 <lambdabot> against inferred typ...
23:40:08 <oerjan> ff
23:40:15 <CakeProphet> !perl print (my ($a, $b) = (1,$a))
23:40:15 <EgoBot> 1
23:40:23 <CakeProphet> yeah, didn't think that would work.
23:40:29 <Phantom_Hoover> I don't understand how the 32-cell VN CAs work.
23:40:32 <Phantom_Hoover> They're deep magic.
23:40:41 <elliott> oh, maybe you need haskell-src-meta
23:41:43 <oerjan> > iterate(($"").(shows.length<*>(:).head).group)"1"
23:41:45 <lambdabot> Couldn't match expected type `[GHC.Types.Char] -> b'
23:41:45 <lambdabot> against inferr...
23:41:47 <oerjan> ff
23:42:05 <monqy> CakeProphet: unification or just lucky evaluation order?
23:42:20 <oerjan> > (shows.length<*>(:).head).group)"1"
23:42:21 <lambdabot> <no location info>: parse error on input `)'
23:42:26 <monqy> lucky scoping too or something?
23:42:26 <CakeProphet> I was hoping for lucky evaluation order. :)
23:42:30 <oerjan> > ((shows.length<*>(:).head).group)"1"
23:42:31 <lambdabot> Couldn't match expected type `GHC.Base.String'
23:42:32 <lambdabot> against inferred typ...
23:43:11 <oerjan> oh hm
23:44:27 <CakeProphet> I think this is the most obscene thing I've written in Perl so far: http://pastebin.com/XPcjXL4p
23:44:43 <oerjan> > ((shows.length<*>(:).head)<=<group)"1"
23:44:44 <lambdabot> Couldn't match expected type `GHC.Base.String'
23:44:44 <lambdabot> against inferred typ...
23:44:53 <CakeProphet> it's actually not too bad. Just slightly abusive with map and grep
23:45:01 <CakeProphet> and $_'s
23:45:02 <monqy> !perl my ($a, $b) = (1, $a); print $b
23:45:04 <monqy> !perl my ($a, $b) = (1, $a); print $a
23:45:05 <EgoBot> 1
23:45:14 <monqy> nice silent failure, perl
23:45:31 <CakeProphet> monqy: oh it works fine as an expression, it's just the expression doesn't work like that.
23:45:41 <CakeProphet> it will return (1,undef) from the assignment
23:45:53 <CakeProphet> instead of (1,1), which is what I was going to see if it did.
23:46:08 <CakeProphet> with use strict you would get an actual error of some kind I believe.
23:48:03 -!- azaq23 has joined.
23:48:11 <oerjan> > let (a,b) = (1,a) in (a,b)
23:48:12 <lambdabot> (1,1)
23:49:04 <elliott> oerjan: reminds me of tying the knot
23:49:11 <oerjan> yeah
23:49:27 <monqy> let (a, b) = (1, a : b) in (a, b)
23:49:29 <monqy> oops
23:49:31 <monqy> > let (a, b) = (1, a : b) in (a, b)
23:49:32 <lambdabot> (1,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
23:49:47 <monqy> mm
23:50:25 <monqy> I imagine there's some hideous way to do that in perl too
23:50:33 <CakeProphet> no not really.
23:50:42 <CakeProphet> well, yes. it's just too hideous to be obvious.
23:51:53 <CakeProphet> you would have to force laziness, with a number of possible methods.
23:53:06 <CakeProphet> oh hey I just realized something I could do to make adding commands to my bot a cleaner process.
23:53:17 <Sgeo> Phantom_Hoover, as opposed to that golly ticker thig
23:53:19 <Sgeo> thing
23:53:27 <elliott> i like how everyone in #haskell thinks augur was just really creepy to a random person for no reason
23:53:42 <Phantom_Hoover> Sgeo, the Golly ticker isn't very complex at all, like I keep telling you.
23:54:00 <Sgeo> elliott, I wasn't in there, what happened?
23:54:06 <elliott> Sgeo: rocks fell and everyone died
23:54:09 <augur> elliott: creepy? whos acting like im creepy
23:54:12 <augur> noone thats who!
23:54:57 <CakeProphet> one nice thing about Perl that it has in common with Haskell is that it's fairly trivial to define your own control structures.
23:58:29 <CakeProphet> sub with($&) {open my $f, shift; shift->($f); close $f}
23:58:52 <CakeProphet> with '>file.txt' {...}
23:59:00 <elliott> that involves using prototypes though.
23:59:06 <CakeProphet> ...yes it does.
23:59:17 <monqy> mmm delicious perl
23:59:38 <CakeProphet> actually for alphanumeric strings you can use =>, so then...
23:59:46 <CakeProphet> add_cmd help => {...}
23:59:56 <elliott> that produces a warning.
←2011-06-23 2011-06-24 2011-06-25→ ↑2011 ↑all