00:01:22 oklopol: like... introspection of code behavior? 00:01:56 if this calls that, do this? 00:05:22 -!- RedDak has quit (Read error: 104 (Connection reset by peer)). 00:19:08 -!- tusho has quit. 00:47:43 Hmm. Question: should I cease my current "stuck in the mountains, not shaved for weeks" look and go back to my usual goatee? 00:48:33 CakeProphet: err 00:48:59 pikhq: inbetween 00:49:11 i just mean an object, when created, would get to know if it's only used in simple ways 00:49:19 as in...trim it up but don't shave it. 00:49:20 if that can be ensured 00:49:20 oklopol your girlfriend is interrogating me! :( 00:49:27 psygnisfive: i know 00:49:29 :p 00:49:33 hrrrr 00:49:55 pikhq: keep the current one 00:50:10 oklopol: hmmm... ah 00:50:18 not any language I know of. 00:50:26 -!- bwr has joined. 00:50:28 CakeProphet: But I like having a goatee. 00:50:28 i think that might be interesting. 00:50:44 :p 00:50:54 pikhq: trimming does not require the losing of a goatee. 00:50:55 and i always like languages hanging on the edge of being impossible to implement :D 00:51:09 oklopol: I could see it being impossible 00:51:14 it just wouldn't straightforward, you know. 00:51:17 CakeProphet: it is in general, yes 00:51:25 er... 00:51:27 *possible 00:51:29 ... 00:51:29 but in most cases the object would just get the "no idea how you're used" message 00:51:55 well, it depends on what kind of interpreter/compiler you have to. 00:52:00 if it's a single-pass interpreter, for example. 00:52:08 CakeProphet: You suggested trimming, but keeping my current look. Which means: trimmed full beard, not a goatee. :p 00:52:11 then, I think, you'd need to initialize it at that state. 00:52:42 CakeProphet: i'm not following you. 00:53:01 it would have to be compiled. 00:53:07 well not necessarily 00:53:10 but preferably 00:53:15 well... you can't know how an object is used at the point its created... so it would be impossible to give it anything but a don't know message. 00:53:17 until later. 00:53:23 for a single-pass interpreter, that is 00:53:31 right, yeah, that's not possible. 00:53:40 but it would most likely be compiled 00:53:49 if you compile... or do something inbetween... then you can analyze how it is used later... before its created at runtime. 00:53:51 yes 00:53:58 yep, that's the idea 00:54:09 i think i'll try adding that to straw 00:54:20 with that and the mutation stuff, it would actually be quite a unique piece of art. 00:55:07 no straw lesson will be given today, in case someone would've been interested 00:55:10 sorry! 00:55:18 ...why do I not have links to any of your language specs. 00:55:30 because i rarely spec them 00:56:05 perhaps i could spec straw up at least a bit. 00:58:13 is there a link to straw? 00:58:38 there is a link to one short example, but i'm afraid even that is a bit outdated 00:58:52 www.vjn.fi/oklopol/straw.txt 00:59:00 it's a lot more static nowadays 00:59:27 ah 00:59:47 but, one of the fun things is already there 01:00:08 what's that 01:00:33 basically, if you do "n = 1", you can add 1 to n so that n changes value by doing n._inc 01:00:38 n would be 2 after that 01:00:51 and if you did n.inc, you'd get n+1 without modifying n 01:01:05 ah 01:01:13 and the fun part is, you can just write the code to do either of these two, and you can immediately use both ways 01:01:53 compile-time checks for making sure methods without an underscore don't modify the program state 01:02:05 oh that's neat 01:02:27 yeah, but that's basically the tip of the iceberg, i have quite a lot of ideas for this one 01:02:50 been piling up the ideas too practical for esolangs into it :P 01:03:12 haha 01:04:12 i'll try to write the AverageKeeper class and see if i find a nice way to do the "optimization hints" 01:04:28 I have a affinity with languages that use their source code as their primary data structure. 01:04:42 like lisp? 01:04:49 bwr: lisp does not do that 01:04:52 ok 01:04:54 ...yeah 01:04:56 was going to say 01:05:00 what do you mean then 01:05:10 ...dupdog is a very bad example. 01:05:15 because it was not thought at all 01:05:15 say befunge without a stack, and just p/g 01:05:22 in case you know befunge 01:05:29 yea, i've used befunge 01:05:34 but i always used the stack 01:05:52 well p and g set/read a value to/from the program space 01:06:00 yea 01:06:02 i get it now 01:06:20 basically, that any conceptual memory and instruction pointers would exist in the same space 01:06:28 the von neumann structure i guess 01:06:29 dupdog literally just used the entire source code 01:06:30 as its state. 01:06:33 befunge is the one esolang i have done anything with :P it was fun 01:06:39 -!- garotosopa has joined. 01:06:52 I'd like something more structured though. 01:07:02 befunge is quite nice to program, yes 01:07:15 -!- garotosopa has left (?). 01:11:40 ...ahahaha... functional dupdog. 01:11:58 ggggggggggggggggggggggggg?(gggggggg?gggggggggggggggg?ggggggggggggg?) 01:13:02 hmmm... 01:13:10 well... if say 01:13:19 codehere(codethere) 01:13:32 if the instructions in codehere manipulated the code in codethere. 01:13:57 ... 01:14:00 I'm not sure what I'm thinking. 01:19:03 ...nah... not like that. 01:19:23 it'd be more like... 01:21:00 g > ee ee >> lo < ee < ee 01:21:14 the brackets tell you which instructions modify what. 01:21:31 are there any befunge compilers that actually compile? the only ones i've seen wrap the befunge in a C interpreter and then you compile it. 01:21:52 CakeProphet: that's weird 01:22:01 bwr: it's not really compilable 01:22:21 why not? 01:22:23 bwr, ...thank you. that is now my cue that I've found a decent idea. 01:22:23 because you have such immense control over the codespace as a 2d structure 01:23:06 that doesn't seem like that big of a problem 01:23:45 CakeProphet: i'll be interested to see how that works 01:24:20 well at the very least you need to have a compiler in the executable, and you have to have the source there too, in some form, as the code can be changed on the fly. 01:24:34 it also gives you the ability to have binary instructions... sort of. 01:24:51 a befunge program can read any byte in the source, so the source must actually exist at runtime. 01:25:08 right 01:26:01 like "this instruction does such and such if the source code being modified, source code A, contains more instructions than the source code that A modified, source code B" 01:26:19 ... 01:26:47 so your operands are also your operators. 01:26:56 i am confused 01:26:57 :P 01:27:11 It will have to be /just/ right. 01:27:16 otherwise it will be a mess. 01:27:21 well 01:27:25 it will be a bad mess 01:27:26 instead of a good mess. 01:27:28 ;) 01:27:45 like if make one instruction lt 01:27:51 and one instruction tl 01:27:58 and some other instructions that reverse words 01:28:06 then you have... something. 01:28:56 and something like la da la da > de do de do < 01:29:01 would be a self-modifying loop. 01:29:04 of some... sort. 01:30:45 * CakeProphet is trying to find the eureka moment... where it figures out how everything will become usable. 01:38:29 oklopollll 01:38:33 your girlfriend likes my voice :( 01:38:35 it frightens me 01:38:55 :) 01:39:00 she likes many voices 01:41:54 thank god 01:43:47 http://www.vjn.fi/pb/p565622232.txt straw is getting a bit more oklo :) 01:43:59 the rewriting syntax will probably change 01:44:04 at least somewhat 01:44:54 #calls {{ this.getavg( ?s ) }} is the interesting part, special keyword that kinda searches the code for a certain expression 01:45:31 so you'd get a list of calls to the method calculating the average 01:45:42 isn't conceptually all that pretty, but that's not my point anyway here 01:45:47 *not all 01:46:17 i should unify the syntax a bit though 01:46:30 all kinds of prefixes and brackets flying about 01:47:17 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 01:51:57 http://www.vjn.fi/pb/p464321425.txt dropped the highlevel rewriting, <<<...>>> is now simply a list of occurrances 01:52:24 except as a right-side of a substitution, where it is kinda highlevel again :) 01:53:42 actually @ "dotPrefixed.setvar = <<< this.?var = ?var >>>" the <<<...>>> notates a simple quoted piece of code 01:53:47 -!- cherez has joined. 01:53:50 so guess i should use a different bracket type 01:54:03 -!- cherez has quit (Client Quit). 01:54:23 basically i'm just defining here that you can use the syntax .var in a method's parameter list to set a field 01:56:43 *** separates the two tiers, kinda, if you have n tiers, where n!=1, the first two would be parsed, then the first one run, but all <<<...>>>'s referring to the second code 01:57:01 so you can define new syntax in an imperative fashion in the language itself 01:57:18 this is all a bit ugly in a language where syntax isn't initially simple 01:57:26 but i don't care 01:59:05 -!- cherez has joined. 02:51:24 oklopol: if only ASCII had more brackets. 02:51:44 heh 03:05:50 -!- oerjan has joined. 03:31:46 I don't even know where the curly brackets come from. 03:31:51 I mean, technically 03:32:06 They're supposed to enclose multiple lines :o 03:32:20 Where do those one line curly brackets come from? 03:35:28 mutation 03:35:43 onoes! 03:35:57 evolution in action 03:35:58 Wasn't it... INTELLIGENT DESIGN? 03:36:03 Or at least stupid design 03:36:12 sure it was, before the mutations started 03:37:47 ah it is all clear now. evolution is the work of satan. we were really supposed to all be happy single-celled bacteria 03:38:03 BACTERIAS? 03:38:06 ....why does everyone care about terseness 03:38:16 until 03:38:18 WHAT'S WRONG WITH AUTOREPLICATING RNA STRANDS? 03:38:20 they define an XML spec. 03:38:22 no, bacteria. the singular is bacterium. 03:38:47 what the fuck http://www.youtube.com/watch?v=Cg1e77lRRjk&NR=1 03:38:49 those were just the prototype 03:39:13 9 squiggles 0?! 03:39:36 that fucking blew my mind 03:39:49 this girl seriously needs a timecube of her own 03:39:56 haha 03:39:59 rofl 03:39:59 This seems terribly stupid 03:40:04 it does. 03:40:14 Also her voices echo 03:40:16 ok i'm watching it 03:40:17 She must be God 03:40:20 -!- lilja has quit ("KVIrc 3.2.0 'Realia'"). 03:40:33 I can't understand anything she says 03:40:34 she might be just talking about vedic junk 03:40:35 so.. 03:40:46 SPEAK WITH ONLY ONE VOICE, CRAZY WOMAN 03:40:47 Slereah__: she could be just using the Royal We 03:40:53 what is this vedic i've been hearing for the past 5 minutes? 03:41:09 "dude, if you start at 1 and break a circle into 9 equal parts. 0 IS 9" 03:41:10 vedic == ancient indian, essentially 03:41:13 Wasn't there a story about Wiener and a squiggle? 03:41:45 Like he was with a collegue in front of a blackboard with just a squiggly line on it 03:41:47 DIGIT SUM LEVEL 03:41:48 lmfao 03:41:50 OSHI 03:42:09 yes, modulo 9, 9 is a lot like 0 03:42:11 And they were very absorbed by the reflection 03:42:26 And no one ever knew what it meants :o 03:42:41 Of course, it's hard to know with Wiener's anecdotes 03:42:57 i think i should devote my life to killing people who don't know the difference between a number and its base 10 representation. 03:43:10 the vedas are stupid 03:43:11 sorry 03:43:14 they just get me so fucking angry 03:43:14 but they are 03:43:15 :P 03:43:22 was wiener's famous dachshound involved? 03:43:51 oerjan : It could be! 03:43:57 Just tell that exact same story around you 03:44:01 And add the dog 03:44:06 That's how anecdotes work! 03:44:07 ah 03:44:32 i think i should do a sleep to now sleep. -> 03:44:50 that may be for the best 03:45:14 oklopol, is you near your girlfriend? 03:45:33 no 03:45:54 oh. nevermind then. 03:46:04 no do tell anyway 03:46:14 well its kind of pointless now. :P 03:47:18 yes but tell anyway 03:47:29 get off irc, dont be lame. go cuddle. 03:47:34 :P 03:47:43 obviously not relevant :P 03:47:49 :) 03:48:04 i can cuddle myself 03:48:15 pics or it didnt happen. 03:48:43 fresh batch coming soon just ya wait ::::) 03:48:49 :D 03:49:05 but seriously, i sleep now, and no, you will not be getting naked pictures tonight :P 03:49:06 -> 03:49:15 i dont want naked pictures 03:49:20 * oerjan is reminded of a dilbert cartoon where dilbert cuddles himself in front of camera to convince his mother he has a girlfriend 03:49:21 tho i wont refuse them :D 03:53:48 There was also an episode of Dilbert. 03:53:54 "Who'd like to hug?" 03:54:02 And then you see Asok hugging himself. 03:54:08 "Oh, you mean each other." 03:56:34 hahaha 04:01:33 lol, once again some old math problem i heard ages ago pops into my head just as i'm about to sleep, and i just solve it instantly 04:01:52 in case i recall that one problem correctly, would have to ask ihope 04:03:44 i think it was like, basically, you have a 2d tilemap, cell at x,y connected to those (x',y') with abs(x-x')==1 xor abs(y-y')==1 04:03:44 whats the problem? 04:03:49 and 04:03:50 err 04:03:57 o.o; 04:04:19 you have to find the biggest structure such that by removing a cell there are no connected structures of size n or bigger 04:04:54 i dont understand but ok :D 04:05:12 "2d tilemap, cell at x,y connected to those (x',y') with abs(x-x')==1 xor abs(y-y')==1" was a very weird explanation. 04:05:16 err 04:05:17 just 04:05:28 a 2d matrix, like. 04:05:40 so that nodes are connected to their four neighbors 04:05:50 ok 04:06:01 so a square graph like structure 04:06:13 well yeah i guess 04:06:15 so anyway 04:06:51 he was wondering whether the obvious solution, a cross of height and width 2n+1 04:06:54 was the optimal 04:07:09 well, it's clear we can only separate four structures with removing one node 04:07:09 im not sure what the problem is tho :D 04:07:15 oh? 04:07:16 well just 04:07:31 you have an initial connected structure 04:07:35 and one node is removed 04:07:46 how big is the structure? 04:07:49 such that there are no connected structures of size n or bigger anymore 04:07:58 the problem is to find the biggest such structure 04:08:08 ok. 04:08:14 and what are the restrictions?? 04:08:33 i mean, all we have i think so far is just a square grid and "maximize the size of this square grid" 04:08:42 you need to be able to split it into structures less than n in size by removing some node 04:08:57 i dont entirely follow. 04:09:01 but you need to sleep. bye. 04:09:02 :P 04:09:06 :| 04:09:11 i can't unless you get it 04:09:12 so 04:09:12 err 04:09:20 what's hard about it :P 04:09:21 i refuse to get it. go to sleep. 04:09:30 your explanation is whats hard, but thats ok. go to sleep. 04:10:10 the problem: for some n you need to find the largest connected structure such that there is a node whose removal will split the structure into structures less than n in size 04:10:32 algorithm is a function from an integer n to such a structure 04:10:45 err 04:10:48 and what determines what n is? and what determines the shape of the structure? etc 04:10:50 the algorithm we're looking for 04:11:02 psygnisfive: you need to find it for any given n 04:11:07 shape can be anything 04:11:13 do all nodes need to be connected to 4 other nodes? 04:11:26 no, just some structure consisting of nodes on a grid like this 04:12:16 ok, take an infinitely large square grid and remove two intersecting axes, and add a node that connects the four at the corners 04:12:24 that structure is infinitely large. 04:12:27 the problem: for all n you need to find the largest connected structure such that there is a node whose removal will split the structure into structures less than n in size 04:12:32 *connected structures 04:12:42 granted, the substructures are also i guess infinitely large 04:12:55 but it works for all squares that could form those corners 04:12:57 there is not largest 04:13:04 unless im misunderstanding the problem. 04:13:07 psygnisfive: so what do you remove to get it to split into structures less than n in size? 04:13:19 if you remove the middle cell, you get four infinite structures 04:13:25 yes i said that already :p 04:13:28 n need not be infinity, that's one of the trivial cases 04:13:30 but if you used four squares 04:13:34 or any square 04:13:35 or anything 04:13:39 there is no largest 04:13:47 but you do split it into structures smaller than the original one 04:13:49 -!- vollmond has joined. 04:13:51 but there is no largest 04:14:19 because obviously you can just add more nodes to any of the substructures so long as they dont connect the substructures 04:14:24 there is no largest such structure? there are multiple equally good structures in size. 04:14:31 but there can be no largest 04:14:36 err? 04:14:39 take four squares and connect them at the corner 04:14:40 well say n is 3 04:14:51 if n is three you have what sort of structure? 04:14:54 o-o-o? 04:14:57 you saying you can have the initial structure infinite? 04:14:58 where o is a node and - is a connection 04:14:58 ? 04:15:11 that's not the biggest you can do 04:15:27 well let me just make sure im getting this correct 04:15:32 9 is 04:15:51 if n is three, what is an example of such a structure 04:16:07 because i dont think im following 04:16:19 i need to see an example of possible structures 04:16:25 http://www.vjn.fi/pb/p333224163.txt 04:16:27 and a largest possible structure 04:16:34 this is the largest possible 04:16:39 how is that n = 0 04:16:41 er 04:16:42 n = 3 04:16:50 and how is that the largest 04:16:53 how do you define largest 04:16:55 because by removing the middle you get four structures of size 2 04:17:07 you define largest by the fact there is no larger one. 04:17:23 but what is largeness 04:17:26 the problem was just proving this, which is of course trivial 04:17:30 oh 04:17:33 number of nodes. 04:17:36 ok 04:18:01 trivial, but still scary when it just slams into your face when you're trying to sleep :P 04:18:18 so im not entirely sure i follow still but 04:18:29 what does the 3 do? 04:18:32 where does 3 come in? 04:18:42 its just some number? 04:18:50 the problem: for all n you need to find the largest connected structure such that there is a node whose removal will split the structure into structures less than n in size 04:18:55 n can be 3 too. 04:19:01 because it can be any integer 04:19:04 if thats the case then the largest structure will always be (n-1)*4+1 in size 04:19:12 yes 04:19:25 the problem was just proving that 04:19:28 .. 04:19:33 whats to prove? 04:19:41 err that there's no bigger one 04:19:45 the middle node divides the single node into at most four smaller nodes 04:19:51 er 04:19:53 four smaller structures 04:20:01 since no node can connect to more than 4 other nodes 04:20:11 thus the biggest would have 4 substructures as a result 04:20:21 since no substructure can have more than n nodes 04:20:27 it must have n-1 nodes 04:20:30 yes, the gist is simply that removing a node that can have at most 4 edges from it to others can only split the graph into 4 subgraphs 04:20:40 thus each of the four substructures has n-1 nodes 04:20:48 thus you have (n-1)*4 nodes 04:20:53 plus the node you remove at the center 04:20:58 the shape itself is irrelevant. 04:21:12 i dont see why this is an interesting problem 04:21:20 it's not 04:21:27 then why are you trying to solve it? :( 04:21:30 i can give you the other one i solved 04:21:31 err 04:21:34 youre confusing 04:21:35 i wasn't trying to solve it 04:21:36 go to sleep 04:21:43 because otherwise he won't be _able_ to sleep 04:21:51 you werent trying to but you did solve it? :P 04:21:52 i wasn't trying to solve it, i just solved it 04:21:54 -!- Corun has quit ("This computer has gone to sleep"). 04:21:55 go to sleep, oklopol :p 04:21:56 yeah 04:22:00 the other one is more interesting 04:22:02 basically 04:22:05 go to sleep. 04:22:07 also, after this mess i'm not sure if he will be able to anyhow 04:22:08 im not listening 04:22:17 you have an NxN matrix 04:22:21 oerjan: will you listen? 04:22:21 oh god 04:23:12 well sure, for me it's morning so i don't need to sleep... 04:23:13 so, at the topmost row of the matrix you have numbered nodes from 1 to N 04:23:42 right (in order?) 04:23:46 yes 04:23:48 at first 04:23:52 its morning for oklopol too! 04:23:55 he hasnt slept yet! 04:23:59 now, you take kinda steps towards the bottom 04:24:16 so that each of these numbers can move either left or right one step each time you go one row down 04:24:40 but, no two nodes with the adjacent numbers can be more than 1 column apart, ever 04:24:48 so you have kinda like a chain 04:24:55 now, the problem was jut 04:24:57 *just 04:25:09 you mean separated by more than one column? 04:25:11 oklopol, i presume you wrap? 04:25:13 to prove that there is no set of movements that makes this chain move away from the matric 04:25:15 *matrix 04:25:20 oh, right 04:25:36 you can move out of it just by moving one right from the right edge or the other way around 04:25:49 matrix was just an explanation of the form, not anything mathematical. 04:25:56 ok so.. 04:25:59 i dont follow again :D 04:26:00 oerjan: hmm 04:26:01 err 04:26:17 * oerjan doesn't either 04:26:31 well let's try again :) 04:26:39 can a number stay in place? 04:26:45 err, yes. 04:26:52 it can move right, left, or stay put 04:27:03 right 04:27:03 also 04:27:08 and all numbers move or stay simultaneously at each step 04:27:09 two can be on the same spot. 04:27:17 oh 04:27:24 just that you can't have adjacent numbers two apart 04:27:41 what do you mean adjacent numbers 04:27:41 otherwise everything can move freely, although at most one to either direction on each step 04:27:46 1 and 2 are 04:27:49 oh you mean ok 04:27:49 4 and 3 are 04:27:53 3 and 6 aren't 04:27:53 between rows 04:27:55 ya 04:28:00 no two neighboring numbers can different by more than 1 04:28:11 what is preventing you from eventually merging all numbers into one spot then? 04:28:11 ok so whats the goal now? 04:28:17 oerjan: nothing 04:28:20 but that doesn't solve it. 04:28:22 or does it? 04:28:29 oerjan: all numbers move simultaneously in each row 04:28:33 the goal is to get them all out of the matrix before the last row 04:28:34 right? 04:28:35 and then move them in tandem whereever you want 04:28:58 oerjan: there are only N rows 04:29:04 oh so you have a limited number of steps 04:29:04 ah so you mean move them all N to the left or right in less than N steps 04:29:15 err yes, NxN matrix 04:29:23 psygnisfive: yes exactly 04:29:32 so really the problem is this: 04:29:39 i see. 1 doesn't have time to leave right, N doesn't have time to leave left? 04:29:51 oerjan: no, they can leave at either end 04:29:56 move an object left or right by a total of N places in under N moves, moving only one place at a time 04:30:06 um then what's the problem? 04:30:08 in which case i dont think its possible 04:30:11 psygnisfive: err not exactly 04:30:17 move N left, move N and N-1 left, and so on 04:30:21 oklopol: thats what it amounts to tho. 04:30:25 if there wasn't the constraint that adjacent numbers need to be adjacent 04:30:27 if there is time enough 04:30:36 you could just move half out from the left, and half out the rightt 04:30:38 *right 04:30:57 but i thought you said the whole row had to move as one? 04:30:58 oklopol: what is preventing you from moving all left as fast as you can? 04:31:04 psygnisfive: no, i didn't 04:31:10 oerjan: you won't get the last one out 04:31:12 oh. well then. 04:31:21 i thought you had that restriction :p 04:31:27 if i didnt, then the solution is obvious. 04:31:30 psygnisfive: i do 04:31:32 oklopol: in other words, there isn't time for N to leave left, which i already asked 04:31:54 i thought you said there was 04:32:07 err i prolly misunderstood 04:32:20 then yes, the solution is plainly obvious 04:32:25 in other words, 1 _must_ leave leftwards, N _must_ leave rightwards. 04:32:32 the minimum number of steps is Ceiling(N/2) 04:32:39 psygnisfive: yes, true 04:32:40 do prove it 04:32:40 oerjan: yes 04:32:49 all movement is left one at a time 04:32:51 what? 04:32:55 or right 04:32:59 one space at a time 04:33:06 psygnisfive: you won't get the last one out 04:33:09 i know 04:33:11 but let me finish 04:33:16 okay 04:33:16 this implies at least _some_ adjecent numbers must leave in different places, a contradiction 04:33:22 *adjacent 04:33:26 oerjan: yes, that's it. 04:33:38 item m will take m steps to get out 04:33:44 that is, it gets out on row m+1 04:34:14 if you go in one direction 04:34:28 and N-m steps if you go in the other direction 04:34:56 maybe not N-m actually sorry 04:34:59 N-m+1 04:35:09 so item 1 gets out in 1 step, going left 04:35:19 and N steps going right 04:35:24 2 gets out in 2 steps going left 04:35:27 N-1 going right 04:35:28 and so on 04:36:13 psygnisfive: so far so good 04:36:43 for item N/2 and N/2+1 for an even N, the number of steps left for item N/2 is the same as the number of steps right for item N/2+1 04:37:21 -!- vollmond has quit (Nick collision from services.). 04:37:25 N-(N/2+1)+1 = N-N/2-1+1 = N/2 04:37:45 so for even N, after N/2, going left will increase the number of steps 04:37:48 oerjan: anyway that was, for some reason, confusing to me when i first heard it... although probably i was just not really familiar with the concept of "knowing, yet proving" 04:38:03 not confusing, but i didn't come up with a proof 04:38:16 for N/2 for odd N, it doesnt matter which direction you choose since its in the middle. 04:38:28 tho that explanation is painful and unnecessary. 04:38:58 psygnisfive: err was that the proof? 04:39:07 as much of a proof as im going to give. 04:39:16 err okay, i don't see a proof there 04:39:22 why not? 04:39:24 its clear. 04:39:50 it seems you've proved for all N, for any item in the toprow, there is a way to get it out in N-1 steps 04:39:58 no 04:40:07 i proved that its possible to get it out in Ceil(N/2) steps 04:40:08 :P 04:40:25 :| 04:40:33 for items < N/2, move left, for items > N/2 move right 04:40:42 err 04:40:44 they only need to make N/2 moves. 04:40:55 first of all you *cannot* solve that 04:41:02 what? 04:41:04 this is about proving it's impossible 04:41:26 the constraint that two adjacent numbers cannot be apart more than one column is there. 04:41:45 ok you need to go back and specify what that means i think 04:41:53 err 04:41:56 because your previous explanation permitted what i just said. 04:41:57 there cannot be a row 04:42:24 where there are two indices A and B such that |A-B|>1 and |array[A]-array[B]|=1 04:42:40 i dont know what that means. 04:42:44 okay 04:42:53 all adjacent numbers need to be at most one column apart 04:43:04 but what does adjacent mean in this context. 04:43:11 1 and 2 are adjacent 04:43:16 4 and 3 are adjacent 04:43:21 6 and 3 aren't adjacent 04:43:26 ok. i think i follow. 04:43:32 --> shower 04:43:39 and in that case, its not possible. 04:43:52 yeah, it's not, the point was to prove tat 04:43:52 *that 04:44:10 well that proof was part of the set up for the other longer one i did :P 04:44:25 err can you show it again? 04:44:34 for any item m 04:44:51 moving left will take m steps since its m from the edge 04:44:59 moving right will take N-m+1 steps 04:45:13 yes, duh 04:45:26 given that you cannot separate the items but more than 1 space 04:45:29 i like interrupting a long explanation like that, just continue :) 04:46:09 you cannot spread the items in any way that leaves a gap N in size between two items 04:46:16 meaning spreading them all apart will do no good 04:46:32 because atleast one will still be in the square 04:46:38 so spreading as a whole is useless 04:46:57 thus only moving them in the same direction is a way of getting them out of the square 04:47:12 and that means that it would take N steps for item N 04:47:30 which violates the constraint that it be done in yes, the gist is simply realizing to solve this you would need to get some adjacent numbers out the opposite ends leading to a contradiction, as oerjan said 04:48:41 i mean, its trivial to understand visually. 04:48:50 sure 04:49:01 putting it into maths is just grunt work. 04:49:09 take the end items 04:49:11 item 1, say 04:49:23 that will move, at most, N spaces left 04:49:36 meaning that with no spreading, item N will still be inside the square 04:49:44 with spreading, item N/2 will still be in the square 04:49:59 so theres no solution. 04:50:03 psygnisfive: i'd say the mathematical way to say it is quite simple 04:50:09 yes, but its grunt work 04:50:11 and pointless. 04:50:30 :P 04:50:32 sometimes formal proofs are unnecessary. 04:50:36 well that's one way to see it 04:50:41 especially for something like this. 04:51:01 the extreme possibilities cant solve it, and therefore no intermediate possibilities can. 04:51:08 no movement + no spreading = fail 04:51:14 full movement + no spreading = fail 04:51:18 no moving + spreading = fail 04:51:24 full movement + spread = fail 04:51:54 there's no difference between a formal proof and an intuitive one, except that the intuitive one can rely on construct that need not necessarily exist 04:52:04 but yeah, this one is trivial to see, and trivial to put to maths 04:52:07 that, and formal proofs are a bit more rigorous 04:52:32 but i dont see why this is an interesting problem. 04:52:50 this is more the grunt work exercise, in your terms, yes 04:53:01 go to sleep, oklopol. :P 04:53:08 perhaps i should, at some point 04:53:13 it's just i'm not at all tired 04:53:17 lame 04:53:21 so... it's a bit hard. 04:53:26 oh i bet it is 04:53:29 ;O 04:53:31 :P 04:55:21 gimme more pics of you :D 04:55:40 still don't have any :) 04:55:51 but you have a webcam! 04:55:52 also the only software i had for the webcam broke 04:55:57 hmm 04:55:57 lame 04:56:01 i have skype now, though 04:56:05 so i could take vid 04:56:10 ok :D 04:56:15 get on skype 04:56:15 :D 04:56:17 ... 04:56:26 ill take the vid :P 04:56:31 i'm on skype, but that's not gonna happen :P 04:56:32 actually i wont bother recording it 04:56:40 aww 04:56:41 :( 04:56:48 why not? 04:56:49 :( 04:56:58 mainly because i'm naked. 04:57:02 .. 04:57:06 VIDEO. 04:57:07 NOW. 04:58:01 :) 05:01:17 -!- poiuy_qwert has joined. 05:09:32 hey :( 05:09:34 that was mean! 05:09:36 tease. 05:09:37 >| 05:10:19 :D 05:10:39 ::pounce:: 05:11:18 lets make a truly queer language oklopol. 05:11:24 something thats really different. 05:11:32 not painfully hard or whatever 05:11:38 no funges or brainfucks or the like 05:11:47 something with a completely different perspective on computation 05:15:02 ...this has already been done. 05:15:09 but yes 05:15:14 it would be awesome to do it again. 05:15:45 sometimes, xkcd is ... weird. 05:15:56 that's one reason why we love it, i assume 05:16:00 hows it been done 05:16:09 i mean, i know it HAS, most new paradigms are like that 05:16:15 but i wanna know 05:16:23 because i like weird and different models of computation 05:16:57 psygnisfive: it was not a tease, i was actually going to show you my face on webcam. 05:17:04 lol 05:17:06 ok 05:17:12 it's just my computer crashed for 15 minutes 05:17:22 ouch 05:17:38 get a mac :D 05:18:04 -!- pikhq has quit ("leaving"). 05:18:15 for some reason this program i used to use the webcam with, or used once trying to check if it works, crashed when i retried it a while ago 05:18:21 crashing the whole computer for ages 05:18:51 :( 05:19:03 now, at first it seemed that if skyped does it also, then might be something @ my configurations, and vista's just taking its usual approach to that kinda thing 05:19:14 but actually 05:19:37 skype opened the fucking program that crashes this computer when opened the webcam feed with, just after i'd gotten it to quit 05:19:41 and the comp jammed again 05:19:42 so now 05:19:49 :O 05:19:55 get a mac :) 05:19:56 i don't know whether it's skype, or just trying to access the webcam 05:20:22 nah, i can do most things with my current set. 05:20:36 watch videos, irc and code 05:20:42 except jerk off on camera for me 05:20:44 i mean uh 05:20:52 right, that i can't do. 05:21:03 not sure if i can live with that, need to ponder the issue 05:21:06 -> 05:21:08 night 05:21:12 finally! 05:21:16 :) 05:21:22 ::kisscheek:: night 05:21:24 got pretty tired looking at the black screen 05:21:26 -> 05:21:45 oerjan, xkcd, weird, why? 05:22:31 today 05:22:41 looking 05:23:18 lmfao wtf XD 05:24:48 link! 05:24:49 ... 05:24:55 GO TO SLEEP 05:25:00 :( 05:25:00 http://xkcd.com/ 05:25:08 go have wet dreams about me. :X 05:30:30 -> 05:53:18 -!- oerjan has quit ("Omnibus"). 06:15:22 ...John Mayer is very very good. 06:15:33 I would not expect so much win from a pop type. 06:18:08 -!- olsner has joined. 06:19:21 -!- GreaseMonkey has joined. 07:31:05 -!- olsner has quit ("Leaving"). 07:54:17 anyway i doubt AnMaster knows even all european capitals, just scandinavia + the ones that are historically relevant 07:54:36 Madrid, Paris, Rome, Berlin, London, what more do you want? 07:55:10 Athens 07:55:23 Belgrade 07:55:34 Dublin 07:55:42 Lisabon 07:55:51 Moscow 07:56:21 and of course Oslo, Helsinki, Stockholm, Copenhagen 07:56:27 Reykjavik 07:56:54 Warsawa (or is it Warsaw in English?) 07:57:33 Hm Turkey, that would be Ankara 07:57:54 bb going to swim 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:07:06 You've pretty much left most of Eastern Europe out. There's at least Tallinn, Riga, Vilnius, Budapest, Prague, Bucharest. And that's very much not an exhaustive list. (Also at least Vienna, Bern missing in Western/Central Europe.) 08:23:54 -!- poiuy_qwert has quit. 08:36:49 -!- deveah has joined. 08:36:57 mornin dudes 08:44:53 -!- Slereah_ has joined. 08:52:11 AnMaster, fizzie: Now list all the state capitals of the US states and Canadian provinces :P 09:02:14 No idea about those. My knowledge of European geography is poor enough; of the other continents it's pretty much non-existent. 09:03:16 -!- Slereah__ has quit (Read error: 110 (Connection timed out)). 10:19:07 I can do a bit better in Asia I think 10:19:40 Seul (English spelling?), Tokyo, Bejing (again spelling, it is spelled "Peking" in Swedish...) 10:19:43 lets see... 10:20:03 Baghdad 10:20:22 New Delhi 10:20:36 Singapore, or is that part of China nowdays? 10:20:50 Taipei, would be Taiwan iirc 10:21:00 Lhasa... Tibet 10:21:37 Kuala Lumpur, Kathmandu, Islamabad 10:22:11 Beirut, Bangkok 10:22:54 Naypyidaw is Burma, not sure about spelling 10:23:04 can't do more 10:23:23 as for US and Canada 10:23:26 they are countries 10:24:14 Washington D.C. and Ottawa 10:24:19 Mexico City 10:24:29 that's all in North America iirc 10:24:48 South America.... hm 10:25:03 Brasilia, Buenos Aires, 10:25:17 Lima? 10:25:51 well I'm bad at south america 10:26:23 Africa... 10:26:47 Pretoria, Dakar, Dar es Salaam 10:27:07 Tripoli 10:27:21 Harare 10:27:48 Tunis? 10:27:58 not too good there either 10:28:12 for Oceania and Australia... 10:28:21 Wellington, Canberra 10:28:46 nop can't think of more there 10:29:48 GregorR, ^ 10:31:42 -!- tusho has joined. 10:33:32 AnMaster: Seoul 10:33:43 Peking is valid in English as well, the more common is Beijing 10:33:58 Deewiant, ah thanks 10:34:02 Warsaw in English 10:34:13 still I think I managed rather good 10:34:16 Singapore isn't part of China 10:34:33 compared to what most Americans manage about Europe 10:34:34 don't know about that Burma one 10:34:49 jesus christ AnMaster is still bitching about that? 10:35:00 tusho, no GregorR was 10:35:03 AnMaster, fizzie: Now list all the state capitals of the US states and Canadian provinces :P 10:35:10 not a lot I can do about that 10:35:27 Deewiant, about the Burma one, I remember it from the news about the protests in Burma last year 10:35:28 AnMaster: let's put it this way 10:35:34 otherwise I wouldn't have known it 10:35:42 knowledge about Sweden = isn't going to help anyone in the USA for shit 10:35:44 tusho, I listed lots of capitals 10:35:46 read the logs 10:35:51 from all over the world 10:36:03 knowledge about USA for Swedes = helpful because it's one of the most powerful countries in the world and certainly the most noticable 10:36:14 AnMaster: what's wrong with Sri Jayawardenapura-Kotte? ;) 10:36:29 puzzlet, eh? don't think I know what that one is 10:36:43 i've pasted that one from Wikipedia though 10:36:51 puzzlet, where is it located? 10:36:59 Sri Lanka 10:37:02 k 10:37:35 AnMaster: see? You don't care that you know nothing about Sri Lanka. 10:37:38 It's not relevant to you. 10:37:42 well yes I do care 10:37:46 I love knowledge 10:38:36 Well don't call out on americans for not knowing much about Sweden. It's the same. 10:51:18 http://en.wikipedia.org/wiki/Criticism_of_the_APL_programming_language 10:51:19 is longer than 10:51:22 http://en.wikipedia.org/wiki/APL 10:51:27 er 10:51:27 http://en.wikipedia.org/wiki/APL_(programming_language) 10:52:35 -!- GreaseMonkey has quit ("HydraIRC -> http://google.com <- Go find something better"). 11:19:56 what's that s/foo/bar thing? 11:22:00 deveah: regexps 11:22:14 what?! 11:22:19 deveah: look it up. 11:22:26 http://en.wikipedia.org/wiki/Regular_expression 11:25:36 and why s/foo/bar ? 11:25:49 why not "a regexp" ? 11:25:58 deveah: it's not just a regex 11:26:11 the gist is 11:26:12 s/from/to/ 11:26:24 and s is... 11:26:27 you find "from" from something someone said, usually the one doing the s thing, and replace it with "to" 11:26:45 so if i had typoed something to soemthnig there 11:26:49 i would do 11:27:01 s/soemthnig/something/ 11:27:11 oh 11:27:21 s/a/b/ and s/a/b are both used 11:28:04 a can be any regexp, so you can do more complex stuff inside it to match something other than just a simple string, assuming your listeners aren't monkeys 11:29:26 okay then 11:34:02 -!- deveah has left (?). 12:03:05 -!- Sgeo has joined. 12:05:20 -!- sebbu has quit (Read error: 113 (No route to host)). 12:10:18 -!- sebbu has joined. 12:17:27 * Sgeo might get his computer back today! 12:18:11 * tusho might spam the same message in all channels today! 12:23:52 -!- Slereah__ has joined. 12:27:49 -!- tusho has quit ("And then-"). 12:35:46 -!- Slereah_ has quit (Read error: 110 (Connection timed out)). 12:52:13 -!- Slereah_ has joined. 13:04:29 -!- tusho has joined. 13:10:26 -!- Corun has joined. 13:12:47 -!- Slereah__ has quit (Read error: 110 (Connection timed out)). 13:22:32 oklopol 13:22:39 how many hours of sleep have you had 13:48:23 psygnisfive: 72 13:48:45 :P 13:48:48 he hasnt :( 13:49:12 6 hours 13:49:14 not that bad 13:49:18 assuming he slept all of it 14:02:47 -!- Slereah__ has joined. 14:11:33 -!- Slereah_ has quit (Read error: 110 (Connection timed out)). 14:17:41 -!- Corun has quit ("This computer has gone to sleep"). 14:25:20 -!- Corun has joined. 14:38:16 -!- ais523 has joined. 14:38:44 hi tusho 14:38:50 fucking fuck. 14:38:53 :| 14:38:56 lol 14:40:58 WTF http://nethack.devnull.org/ why would a page give 400? 14:41:24 same reason all webpages would give a 400 error? 14:41:35 WTF why would a page give a 404 14:41:37 that's crazy! 14:41:40 http response codes?? 14:41:44 why would you use those?? 14:41:58 tusho, why is it giving 400 not 404? 14:42:07 Sgeo: Why is it giving 500 and not 404? 14:42:10 Because they're different errors. 14:42:44 But how is the browser trying to access it a 400? Isn't that for if I were to do ASDF instead of GET or somesuch thing? 14:43:04 The server thinks the browser's request was bad. 14:43:08 so? 14:43:23 It's a server problem. 14:44:19 -!- pikhq has joined. 14:47:26 -!- ais523 has quit ("restarting X"). 14:48:42 -!- ais523 has joined. 14:49:10 wb ais523 14:49:18 lol 15:12:11 ais523: seen the icfp entry in tex? 15:12:16 http://sdh33b.blogspot.com/2008/07/icfp-contest-2008.html 15:12:25 no, I haven't, but I knew it existed 15:14:04 -!- Corun has quit ("This computer has gone to sleep"). 15:17:43 * pikhq groans while listening to people behind me updating a Mac. . . 15:18:07 You'd *think* that 'It Just Works' package management would be taken advantage of by Apple. . . 15:18:26 what are they making noises about? 15:19:22 pikhq: I've never had any problems with upgrading macs. 15:19:37 not upgrading 15:19:39 updating 15:19:47 not even as bad as an upgrade! 15:19:49 "We have to update foo, then bar, then baz, then qux..." 15:20:03 weird. what software are they talking about> 15:20:04 -!- tusho has quit ("And then-"). 15:20:15 The OS, iTunes, Office, Firefox, etc. 15:20:29 the OS and iTunes updates are one click in software update 15:20:41 anything else is just software stuff external to it being a Mac. 15:20:51 Maybe I'm just spoiled by 'apt-get update&&apt-get upgrade' or 'emerge --sync&&emerge -avuDN world'. 15:21:01 uh 15:21:14 i dont know how those word, so i cant comment. 15:21:19 pikhq: it's even easier nowadays, you can do it from the GUI so you don't have to remember how apt-get works 15:21:36 i presume they update all apps that you have that are acquirable via apt-get? 15:21:45 psygnisfive: that's it 15:21:50 ah. 15:21:51 They update every single program on a Linux box from the command line (the first is for Debian or Ubuntu, the second is for Gentoo). 15:21:54 update lets you know which ones can be updated 15:21:57 upgrade does the update 15:22:10 convenient. 15:22:34 Hmm. Now, when was apt first written? '97? 15:22:36 pikhq: actually, you don't need the first for ubuntu at all, it does the apt-get update automatically in the background as it doesn't change anything, and gives you an icon to click on to do the apt-get update if it's needed 15:22:43 dont know how well it'd work on a mac, tho, given that mac apps are all Cocoa 15:23:01 ive used apt-get on my mac but only for nix programs that never fucking work. :P 15:23:32 thats one reason i do my best to avoid linux. as much as i like linux, you have to be torvalds to get the damn thing to work. 15:23:38 psygnisfive: not any more 15:23:44 dude even on ubuntu 15:23:49 Um, no. 15:23:53 well, I'm not Torvalds 15:23:54 and it works for me 15:23:59 I use the command line because I like it 15:24:05 ubuntu comes with no disk partitioner? what nonsense is this 15:24:05 but I've done things GUI-style without trouble too 15:24:07 ubuntu was the easiest os i've ever seen 15:24:13 and then to install a partitioner, forget it 15:24:14 psygnisfive: it has a disk partitioner in the install 15:24:22 ... But it *does* have a partitioner. 15:24:24 anything you wanna do, just ask here and write a line to the console :) 15:24:34 ais: i wasn't looking for one on the install 15:24:52 Gparted on Ubuntu, Qtparted on Kubuntu. 15:25:10 the ubuntu website provided instructions for installing gparted 15:25:14 Or, if you're willing to use the command line, fdisk. 15:25:16 instructions which /didnt work/ 15:25:31 Um. . . There shouldn't need to be instructions. 15:25:35 well there were 15:25:41 i didnt make the ubuntu site 15:25:42 "In the package manager: install gparted." 15:25:55 they were command line instructions, too. 15:26:02 *facepalm* 15:26:30 uh.. is google down? 15:26:34 i cant access google... 15:26:54 If Google is down, then I think we have bigger issues to worry about. 15:27:01 :p 15:27:02 Such as the nuking of California. 15:27:13 i cant access google :( 15:27:44 ok there we go 15:27:55 Google isn't down 15:28:02 The command line, in theory, is not that hard to use on Linux. . . 15:28:09 Especially for package installation. 15:28:38 i dont have a problem with the CL 15:28:40 far from it 15:28:45 To install gparted on Ubuntu from the command line, for example? : sudo apt-get install gparted 15:28:49 i have a problem with the shit that doesnt work 15:29:10 which in my experience seems to be every god damned thing that requires the CL 15:29:20 (installs, i mean, not apps to run) 15:29:33 I'm just trying through the GUI 15:29:37 Applications | Add/Remove 15:29:41 and I searched for "partition" 15:29:53 and "GNOME Partition Editor" was the only thing the search turned up 15:30:00 I could just click on it and click on install now, and it would work 15:30:14 i didnt even know you could add programs like that. :D 15:30:46 well, on Windows, Add/Remove only removes stuff 15:30:54 on Ubuntu, and many other Linux distros, it adds stuff too 15:31:01 and it has a pretty good range of things to add 15:31:09 ofc behind the scenes it just runs the relevant apt-gets 15:31:14 im used to just downloading apps from their makers website. 15:31:17 and gives you a pretty GUI for them 15:31:36 psygnisfive: the issue with that is you end up with about 20 different auto-updaters in your system tray; on Ubuntu there's only 1 15:31:53 indeed. 15:32:18 maybe ive been trying to install apps all wrong 15:32:33 i usually just follow the CL instructions on the netosphere 15:32:38 and it almost never works 15:32:42 especially for utilities and the like 15:32:51 -!- Corun has joined. 15:34:11 If it's not of the form 'sudo apt-get install package-name', then the CL instructions are shit. Of course, the GUI is fairly handy if you're not a command line guru. 15:34:55 its the same if i compile it myself too tho. 15:34:59 -!- tusho has joined. 15:35:01 psygnisfive: the command-line is normally harder if you're not used to it, but faster if you are 15:35:10 i tried installing gparted and i got some dependency errors 15:35:28 then i tried some other method, i forget what, and it worked no errors 15:35:31 ... Dependency *errors*? WTF?!? 15:35:35 yeah. 15:35:37 dependency errors. 15:35:40 i dont know dude. 15:35:47 i followed the instructions and it started installing JAVA. 15:35:49 normally that means it depends on things that you told it not to download 15:35:51 Whatever instructions you were using were shit. 15:35:51 o_o; 15:36:09 i think they were the instructions from the gparted people ;_; 15:36:22 well, i say "people" like there is such a thing 15:36:38 ais523: I am running a script that tries to find a self-hashing crc32 15:36:40 It starts with \0 15:36:42 Then: 15:36:46 Until x == crc32(x) 15:36:48 x = crc32(x) 15:36:54 what if that enters a loop? 15:36:55 Is this going to terminate in my lifetime? 15:37:05 ais: halting problem much? 15:37:14 well, at least CRC32's reverse-engineerable 15:37:14 psygnisfive: Uh, no. 15:37:16 i hope its bistable and never terminates. 15:37:18 It just depends on CRC32's definition 15:37:20 :P 15:37:26 so you'd just have to solve a degree-33 polynomial 15:37:28 We can make a pretty good guess. 15:37:36 ais523: I just wanted an intuition, sheesh 15:37:37 tusho: CRC32's a polynomial in base 2 15:37:37 ;_; 15:37:39 ::prays for bistability:: 15:37:42 well, using division 15:39:42 ais523: any intuitions? 15:39:54 it's been going for a while 15:40:10 tusho: it's very likely to end up in a loop, I think 15:42:33 humph 15:42:40 * tusho considers a good hashing function to find a self-hash in 15:43:04 -!- Dewio has joined. 15:45:02 brb 15:45:27 ais523, hi 15:45:32 hi AnMaster 15:45:45 ais523, updated yet? I'm working on a Def-BF implementation in C now 15:45:51 AnMaster: pushing write now 15:45:55 s/write/right/ 15:45:58 ok, updated 15:46:07 it will follow the standard. but... it will do it completely strange 15:46:12 although I haven't added all those warnings you wanted, or unwarninged my own code 15:46:13 as in virtual machine style 15:46:16 compiled though 15:46:52 ais523, if you were to parse a language like C, what would you use? I have no experience with flex or bison or such 15:46:56 so I would want to learn 15:47:05 AnMaster: I'd use flex/bison 15:47:12 or lex/yacc, the original versions of such 15:47:17 ais523, you use both at once? 15:47:25 AnMaster: flex and bison work together 15:47:30 although it's possible to use just one of them 15:47:34 flex tokenises the source 15:47:38 bison parses sequences of tokens 15:47:38 the language is rather simple really, brainfuck + a few instructions + functions 15:48:09 ais523, so how would a flex file look for, say, brainfuck? 15:48:19 it would be very simple for Brainfuck 15:48:28 just a list of the possible characters 15:48:31 and a token name for each one 15:48:52 and if you added blocks 15:49:16 AnMaster: well, lexing would still be simple, as both { and } (say) are tokens, you'd match the { to the } in the parser 15:49:21 the blocks use define: functionname[a, b, c, ...] [ bf code ] 15:49:31 yes [ not { 15:49:53 so it need to make a difference between what type of [ I assume? 15:50:38 well, if you're using [ for two different things depending on context, you parse them both into [ in the lex/flex code and let yacc/bison tell the contexts apart 15:50:44 ah 15:50:45 right 15:51:04 ais523, file endings for flex is .l isn't it? and what is it for bison? 15:51:09 .y 15:51:16 thanks 15:51:20 now to learn bison too 15:51:35 there's lexer.l and oil.y and parser.y in C-INTERCAL if you want something to look at 15:51:40 oil.y is a lot simpler than parser.y 15:51:41 -!- oklopol has quit (Read error: 113 (No route to host)). 15:51:43 -!- Corun has quit ("This computer has gone to sleep"). 15:51:46 ah 15:51:46 because OIL is a lot neater than INTERCAL syntax-wise 15:52:07 AnMaster: Well, I could hand you my lexer for Def-BF. . . I'd hand you my parser, but it doesn't work. 15:52:11 We have conflicts in the following files: 15:52:11 ./etc/cftoec.sh 15:52:11 Finished pulling and applying. 15:52:13 Shift/reduce conflicts galore. 15:52:16 -!- Dewio_ has joined. 15:52:20 what do I do now ais523? 15:52:25 I'm not that used to darcs 15:52:35 how do I make it throw away my version 15:52:37 and use yours 15:53:28 AnMaster: I haven't had a conflict before 15:53:33 I think you edit the file to be what you want 15:53:36 then call darcs resolve on it 15:53:39 ah 15:53:41 thanks 15:54:52 -!- Dewi has quit (Nick collision from services.). 15:54:56 -!- Dewio_ has changed nick to Dewi. 15:56:33 ais523, are flex regexes? 15:56:39 yes 15:56:53 although normally the regexness isn't used except in cases like [0-9]+ 15:56:55 so, say \[[-+]\] would match [-] and [+] 15:57:07 also first match selected I guess 15:57:08 yes, it would 15:57:12 AnMaster: longest match, I think 15:57:19 huh? 15:57:20 ok 15:57:40 ais523, yacc just wants numbers in in-data? 15:57:49 it wants token numbers 15:57:58 each of which can have some data carried along with it 15:57:58 and they are just defined somewhere? 15:58:08 in the %token at the top 15:58:18 basically you say %token followed by all your data 15:58:26 that's in the .y file? 15:58:29 s/data/tokens/ 15:58:29 AnMaster: yes 15:58:33 and it outputs a header file 15:58:37 giving a unique number to each token 15:58:40 hrrm there is oil.y but no oil.l? 15:58:49 AnMaster: yes, I did the lexing for OIL by hand, as it was simple 15:58:57 ah 15:58:58 you'll see the yylex function written, in C, at the bottom of that file 15:59:27 if a special brainfuck instruction take an argument how do you do then 15:59:28 say: 15:59:36 ? takes a hex number as a parameter 16:00:40 wow, ais523 is a walking yacc tutorial. 16:01:03 to which I'm very grateful 16:01:06 AnMaster: it would be %token SPECIALINSTRUCTION 16:01:10 to define the token in the yacc file 16:01:12 ah 16:01:18 then you'd have to make sure yylex passed it an int somehow 16:01:22 that's what %union is for 16:01:28 hm... 16:01:29 but it's slightly complicated 16:03:36 In general, parsers and lexers are complicated, even if you know what you're doing. 16:04:13 hrrm 16:04:29 I written simple parsers in bash and such 16:04:33 and in C 16:04:37 hand coded them 16:04:41 -!- Dewio has quit (Read error: 101 (Network is unreachable)). 16:04:55 pikhq: yep 16:05:18 ais523, say, if I expect the ? instruction to have a 64-bit value as a parameter, which is what I do 16:05:45 oh looking at lexer.l it seems you use \( \), just like regexes 16:05:45 ok 16:05:58 yes, that's how it works 16:06:05 and if you look at the { } block after it 16:06:05 Flex actually uses regexps. ;) 16:06:08 Parsec is pretty much the only simple parser. 16:06:17 it takes that value and atois it into a number 16:06:21 and sends it to yacc 16:07:07 thanks 16:12:12 WTF 16:12:15 LINERIDER REQUIRES SILVERLIGHT 16:12:17 NOW 16:12:36 oh dear 16:13:31 * pikhq mutters about Silverlight being the worst thing for mankind since mankind 16:13:32 :p 16:13:43 not quite, but it's pretty bad 16:13:51 LINERIDER WAS TOTALLY AWESOME 16:13:54 NOW THEY'RE REQUIRING SILVERLIGHT 16:13:54 FFFFFFFFF 16:14:03 YOU COULD HAVE DONE IT WITH FLASH TRIVIALLY YOU IDIOTS. 16:14:12 WHY DEPEND ON SOME SHIT THAT ONLY WORKS ON WINDOWS AND SUCKS EVEN THEN 16:14:12 >:| 16:14:15 -!- Ilari has quit (""Won't be back for a while...""). 16:14:57 ais523, an issue, seems like yyval stuff is 32-bit? 16:15:01 I need 64-bit 16:15:57 AnMaster: you can choose the type of the data you send 16:16:02 there's an int, always, for the token type 16:16:08 and data it carries along with it which can be any type 16:16:48 ?0x([0-9]+) { yylval.numval = atoll(yytext); return tok_pop; } 16:16:55 wait, need to \ the ? 16:17:24 AnMaster: you need to define yylval.numval, that's what the %union directive's for 16:17:28 apart from that, yes 16:17:30 ahh right 16:17:39 you can define it as long long, because that's what you want 16:18:16 hm so how do you bind them together 16:18:20 lexer and parser here 16:19:05 ah yes header 16:19:41 you can get yacc to generate the header file if you like 16:19:46 right 16:20:12 in fact that's what messed up oklopol's C-INTERCAL installation recently, I accidentally gave them the wrong yacc-generated header file and all the token numbers were wrong 16:23:34 ais523, what are {W} and {D}? 16:23:56 AnMaster: they're references to regexen defined earlier in the file 16:24:06 if you scroll up, you'll see their definitions 16:24:13 also I guess // comments would be like: //.*$ 16:24:16 to match then 16:24:18 them* 16:24:26 ah right 16:24:26 yes, I think so 16:24:28 maybe \/\/ 16:24:34 because I'm not sure which chars have to be escaped 16:24:43 safest to escape all the punctuation chars 16:25:10 hm... does it have to be a tab to separate the regex from the code processing it? 16:25:19 or does spaces work too 16:25:57 -!- Corun has joined. 16:27:08 AnMaster: any whitespace works 16:27:17 newlines too? 16:27:18 tabs are neater, though 16:27:20 this is a long match 16:27:21 AnMaster: I think so 16:27:50 -!- Slereah_ has joined. 16:29:20 ais523, you said longest match? but what if a short one should take precedence? 16:29:26 say, //.*$ 16:29:48 AnMaster: how could that be shorter than the thing that accidentally takes precedence over it? 16:29:54 the longest-match rule is good for keywords 16:29:58 multiline match? 16:30:02 if you end up violating it you're probably doing things wrong 16:30:11 AnMaster: a multiline match that // commenting should take precedence over? 16:30:28 ais523, a string beginning inside the // comment 16:30:31 say: 16:30:34 // "blah 16:30:38 blah "foo" 16:30:43 AnMaster: it's longest match from each particular point 16:30:48 ah right 16:33:50 pikhq, what is a valid variable name and function name in Def-BF? 16:34:09 [A-Za-z][A-Za-z0-9]* 16:34:10 or? 16:34:43 I'm saying [[:alpha:]_\-][[:alphanum:]]* 16:34:47 Erm. 16:34:56 [[:alpha:]_\-][[:alphanum:]_\-]* 16:35:14 ok 16:35:55 pikhq, import: is anything until end of line? 16:36:19 ais523, other question: 16:36:21 yylval.str = yytext; 16:36:25 or do I need to strdup() it? 16:36:35 not sure, I'd recommend strdup 16:36:38 AnMaster: I'd assume so. 16:36:49 I can't see why lex would be making deep copies itself 16:36:54 because normally you don't need them 16:37:04 only for identifiers do you need them 16:37:06 Though one may want to pester Rodger soon as he decides to /join #esoteric. 16:37:07 hm 16:37:14 and in professional compilers they tend to be hashed 16:37:17 He's currently on Freenode. 16:37:30 k 16:37:33 I'd start with strdup. 16:37:56 hm 16:37:58 how to parse: 16:38:00 If you find yourself wanting a hash map for usage later, then it's not too hard to move to from strdup. . . 16:38:17 define: functionname[var, var, var, ...] 16:38:24 can't do that in one single regex really 16:38:41 That's done in Yacc, not Lex, for starters. 16:38:45 ah thanks 16:38:58 so would doing something like: ^import:{W}(.+)$ { yylval.str = strdup(yytext); return tok_import; } 16:39:00 be wrong? 16:39:13 that might be OK 16:39:16 lex is for tokenising 16:39:22 so you don't use it to match brackets or anything like that 16:39:27 ah 16:39:34 basically you're there defining import to be outside the normal structure of the language 16:39:37 which may be what you want 16:40:01 well it will take a filename as parameter 16:40:02 Believe me, import: is a token. 16:40:09 -!- Slereah__ has quit (Read error: 110 (Connection timed out)). 16:40:18 So, that's probably valid. 16:40:24 pikhq, oh? but it will be resolved at compile time right? 16:40:45 Though I *think* that line will have yytext also including the "import:" string. 16:40:46 AnMaster: what do you mean by that? 16:40:54 *That* is probably not what you want. 16:41:02 pikhq: yes, I think so, there's a different directive to get the first () group IIRC 16:41:07 but it's a while since I messed with that particular syntax 16:41:18 hm 16:41:22 I recommend pulling up the flex manual. 16:41:26 (info flex) 16:41:32 yes, info flex is excellent 16:41:42 GNU's documentation generally is. 16:41:52 pikhq, I'm looking at it's website's doc 16:41:58 that crashes less than info 16:42:07 Same exact documentation. 16:42:11 yep 16:42:30 Just a different argument to infotex to make it output HTML instead of .info, after all. 16:42:44 -!- RodgerTheGreat has joined. 16:43:03 'sup everybody? 16:43:33 RodgerTheGreat, hi 16:43:44 in Def-BF how are the arguments to ? given? 16:43:54 RodgerTheGreat: AnMaster is the guy working on Def-BF (obviously). Enjoy. ;) 16:43:56 as ?0x123 or in decimal or? 16:44:09 AnMaster: that's something I omitted... hm 16:44:21 RodgerTheGreat, I'd assume hexdecimal for now 16:44:33 -!- Corun has quit ("This computer has gone to sleep"). 16:44:37 I think the original idea was to allow both 0x1234 and regular integer representations 16:45:01 having both would be convenient, but you can have just hex at the lowest level if you want 16:45:03 Since it might be a while before I actually get Def-BF sanely working, I'll end up following AnMaster's semantics for the most part. 16:45:05 RodgerTheGreat: anmaster's implementation is a VM in C, just FYI 16:45:14 not the to-the-metal one you were going to do, iirc 16:45:15 nifty 16:45:20 well will be 16:45:23 it will take a while 16:45:32 as I'm learning flex/bison at the same time 16:45:34 I don't have a problem with VMs 16:45:51 Hell, if his implementation is flexible enough, I'll just make an asm backend. 16:45:52 and if it makes it easier to develop while it builds interest, it's a good tradeoff 16:46:02 hah 16:46:30 as long as you don't code it in Ruby... :) 16:46:38 the pre-processor will strip all function information and such, and just generate the basic commands part 16:46:46 yup 16:46:56 that was the original intent 16:46:59 that's tire 1 and tire 2 16:47:19 as opposed to "tiers"? 16:47:27 -!- oklopol has joined. 16:47:29 typo 16:47:31 anyway 16:47:40 RodgerTheGreat, what about standard library? 16:47:48 hi oklopol 16:48:04 the second tier will generate one additional instruction, "use compiler implementation of this standard library function" 16:48:07 that's my idea at least 16:48:24 AnMaster: I intended for the standard library to be coded in the language whenever remotely possible 16:48:36 yes but the compiler could optimize some 16:48:56 some kind of external call (to C functions, for example, as pikhq has been thinking about) would be useful though, yes 16:50:22 I'd say, write the standard libs first, and then say somewhere in the spec that compilers may substitute their own implementations as long as they produce the same behavior 16:50:25 my apps will be called: dbc and dpp 16:50:30 the suite defc 16:50:36 cool 16:50:49 RodgerTheGreat: I'd also recommend differentiating between a hosted and freestanding implementation, as C does. 16:51:23 pikhq: explain what you mean by hosted in this case 16:51:23 (a hosted implementation is running on a working OS, with a stdlib. A freestanding implementation is on bare metal: no stdlib) 16:51:54 well, I figure at least initially we'll go with an entirely statically-linked scheme 16:52:02 so freestanding 16:52:22 as I imagine that's the implementation difference between those approaches 16:53:23 RodgerTheGreat: they're terms in the C standard, "hosted" means you're guaranteed to have all the standard library and main works as you expect, "freestanding" means that only a small amount of the stdlib need be there (for instance you might not have printf) and the calling conventions can be strange 16:53:39 ah 16:53:39 hi ais523 16:53:48 A freestanding implementation has barely anything. 16:54:30 GCC's freestanding mode, IIRC, just has a few builtin functions from math.h. 16:54:39 well, when I say "standard library", I tend to think of it like the Java API- it's a set of tools you're guaranteed to have in every implementation, thus the value of writing them in the language itself. 16:54:55 http://rafb.net/p/cq8ROs23.html 16:55:02 A systems programming language can't be that way. ;) 16:55:09 -!- lilja has joined. 16:55:41 pikhq: that isn't necessarily true. The standard library doesn't need to be huge and sprawling 16:55:46 Realistically, it *will* be running in environments without anything set up except maybe the BIOS. 16:56:17 And if it's starting up from 32-bit mode on an x86, it won't even have that. 16:57:03 I'm imagining the standard library as consisting of things like array manipulation, string stuff, complex math, possibly some simple data structures and a few I/O helper functions 16:57:29 Hmm. 16:57:31 I'm not saying it should come standard with an XML parser or something 16:57:39 with freestanding, you mostly just get things like limits.h and setjmp 16:57:42 nothing fancy like malloc 16:57:56 You're saying something closer to PEBBLE's standard macros, then. 16:58:09 I guess 17:01:33 but I hope it's clear that all of those things can be cleanly and portably implemented in Def-BF itself, so there's no reason for them not to be available at compile-time 17:02:43 RodgerTheGreat: You need malloc for string manip. 17:09:55 -!- Hiato has joined. 17:13:44 tusho, depends 17:13:57 AnMaster: OK, most of the time, for most operations. 17:14:03 memcpy(), strstr(), there are a few 17:14:28 tusho: you don't need malloc for string manipulation, just to make new strings 17:14:34 which you often want to do as a result of string manipulation 17:14:36 ais523: sometimes you do! 17:14:38 e.g. concat 17:14:41 in-place manipulation rarely needs malloc 17:14:52 tusho: even an in-place concat doesn't need malloc if you have the space beforehand 17:14:59 which you can do in many circumstances 17:15:06 tusho, what about passing pointers to pre-allocated buffers around 17:15:11 well yes these are all very valid 17:15:12 even so 17:15:25 RodgerTheGreat envisioned array manipulation and data structures 17:15:31 i'll bet you're gonna need malloc somewhere along the line for THEM 17:15:43 perhaps def-bf should have a two tier library, RodgerTheGreat, pikhq 17:15:49 tier one will run on even the bare metal 17:15:55 tier two requires things like malloc and other niceties 17:16:12 so you can use tier one to implement all the basics for an OS and then get tier two 17:19:47 hm is a recursive parser stupid or? 17:19:58 for [ ] 17:20:06 AnMaster: sometimes it's really easy to implement that way 17:20:18 yes it is here in the low level tier 17:20:28 but you could run into issues 17:20:31 if it is deep enough 17:21:35 in general I think we should be thinking about eventually making this self-hosting (which is important for it to become a serious systems programming language of any kind), so we shouldn't make use of things we don't know how to implement ourselves 17:22:13 um? 17:22:29 RodgerTheGreat, I don't plan to write a Def-BF compiler in Def-BF 17:22:50 I would be quite willing to, once I know a hell of a lot more about parsers. 17:23:01 I know *just* enough to use Yacc ATM. 17:23:02 AnMaster: well there are other people who know how to code 17:23:08 yeah, this is something pikhq and I have discussed 17:23:26 yacc is for noobs, parsers should be written manually :P 17:23:44 Once I know enough to hand-write, say, a recursive descent parser, then I'd be quite willing to implement Def-BF in Def-BF. 17:24:17 it's not as hard as you'd think 17:24:45 oklopol: agreed 17:24:48 oklopol: I actually wrote an LALR(1) parser in VBA once 17:24:52 well for now I will. parse it as hexdecimal 17:24:53 with 0x 17:24:54 back when I didn't have access to any decent programming languages 17:25:11 it takes time and can be a little tedious, but it isn't tremendously hard if the syntax is straightforward 17:25:14 i heard about parsing during my python time 17:25:49 and that is something i never invented myself 17:26:14 oklopol: I might just wait for the college class on it. 17:26:20 Key word: *might*. 17:26:27 that's one possibility 17:26:28 * tusho wants to see oklopol's Parserless Languge 17:26:31 *language 17:26:39 We'll see once I've got a Def-BF kernel running. ;) 17:26:39 tusho: i have lots 17:26:47 oklopol: but just about everything is a parser 17:26:49 e.g. a brainfuck parser 17:26:53 i have this one basic with operator precedence and all, without parsing 17:26:55 is still a parser 17:26:57 oklopol: uhhh 17:26:59 you still parse it 17:27:00 just strings and rewrite rules :)) 17:27:03 it's just mingled with the interpretation 17:27:06 still parsing 17:27:07 :) 17:27:09 tusho: what about MiniMAX? 17:27:11 err well yes, i read the strings. 17:27:16 but i don't use anything like lists 17:27:20 the version where you have to write the program in binary doesn't seem to need a parser 17:27:22 ais523: that's about as close to parserless as youc an get 17:27:24 you just blit the program into memory 17:27:31 tusho: well duh, that's not what i meant and you know it 17:27:50 -!- olsner has joined. 17:28:23 if you have "parsing" to mean that the interpreter reads your source before it executes it, then yes, everything needs to be parsed 17:28:43 except for a few languages where programs are empty, in which case it's not clear 17:29:21 i guess you could say i never had a separate parsing stage, jsut. 17:29:24 *just 17:30:53 oklopol: what if the program's just blitted into memory? 17:32:35 well then you're not really doing the interpreting yourself 17:32:45 i'd say the processor will still parse 17:32:50 err, well not the processor 17:32:58 that guy who gives it the shit to run 17:34:31 * oklopol shows extreme knowledge about hardware 17:34:54 o.o 17:35:04 oklopol! :D 17:39:20 yay what a nice recursive parser I made 17:39:24 for the low level part 17:39:30 pre-processes code already 17:42:09 -!- Corun has joined. 17:42:40 anyone have a nice java disassembler nearby? 17:51:39 -!- Slereah__ has joined. 18:05:38 -!- Slereah_ has quit (Read error: 110 (Connection timed out)). 18:05:50 -!- Slereah_ has joined. 18:16:36 lalala 18:16:45 dust in the wind = good song 18:16:54 actually, that should be a <- 18:17:03 since its obviously not a set, nor is it an identity 18:19:10 i don't like it 18:19:13 it's whiny 18:19:21 well, not the song, the singer is whiny. 18:19:26 the song is bitchy. 18:23:09 http://rafb.net/p/fdXBOV79.html 18:23:12 pikhq, ^ 18:23:13 RodgerTheGreat, ^ 18:23:31 some issues still 18:23:34 Sweet; you can parse Brainfuck. 18:23:35 ;p 18:23:37 Congratulations you implemented brainfuck. 18:23:37 hm 18:23:40 haha 18:23:42 very funny 18:23:43 yes 18:23:45 ++[>-[>><]<][[-]>+]?0x12Ab2+ 18:23:47 was the program 18:23:50 something doesn't work 18:23:56 AnMaster: You parsed all of it apart from the bit that wasn't brainfuck. 18:24:01 You can parse brainfuck! Awesome. 18:24:05 :p 18:24:11 In fact. 18:24:12 the node is there 18:24:14 You can't parse brainfuck. 18:24:16 It ends with a +. 18:24:21 yes... 18:26:24 tusho, oh the bug was in the tree dumping code 18:26:30 -!- Slereah__ has quit (Read error: 110 (Connection timed out)). 18:30:18 * pikhq will be sure to steal your parser. :p 18:30:40 Hmm. Out of curiosity, why are you having [-] as its own little bit of syntax? 18:31:40 pikhq: that's how e's optimising it 18:31:47 but that should be in the parser not the lexer really 18:32:27 It shouldn't be in the parser. 18:32:29 pikhq, to optimize 18:32:31 It should be in a seperate optimizer step. 18:32:35 and no it isn't in parser 18:32:36 That should be a transformation on the parsed tree. 18:32:36 So that [><-] can be optimized. 18:32:37 it is in optimizer 18:32:38 ... 18:32:42 Oh. 18:32:42 So that >< is eliminated 18:32:43 then [-] 18:32:52 i think that's called peephole optimization 18:33:03 I guess your optimization is just not yet done, then. 18:33:05 tusho, well the >< step isn't implemented yet 18:33:07 but it will be 18:33:14 maybe I should make a Brainfuck version of OIL... 18:33:16 currently the optimize step only handles [-] and [+] 18:33:26 ais523: nah, the compiler language is more expressive for this 18:33:31 it will handle renumbering and so on 18:33:32 since there's a lot of complex opts 18:33:37 that need a lot of computation and lookahead/behind 18:33:42 I suppose so 18:34:03 however the [-] is converted to a single new token in the optimize step 18:34:07 -!- Corun has quit ("This computer has gone to sleep"). 18:34:13 a "zero current cell" token 18:34:54 Convert that [-] to ?0x0. ;) 18:35:26 pikhq, well it is it's own value now, as I thought brainfukc 18:35:32 brainfuck* but that would work 18:36:29 also for most other things the param will be count of instruction 18:36:34 as in "add 4" 18:36:40 will also be done in optimizer 18:37:24 Fair 'nough. 18:37:36 now to write code emitter 18:37:41 Hmm. This makes me half-tempted to learn how to write a GCC frontend. 18:37:50 pikhq, GAH 18:38:03 ;p 18:38:34 oklopol whens your birthday 18:46:55 -!- ais523 has quit ("(1) DO COME FROM ".2~.2"~#1 WHILE :1 <- "'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1""). 18:52:57 -!- Corun has joined. 18:55:20 hm 18:55:23 code generation is hard 18:55:47 not if you use lisp :D 18:55:51 blergh 18:55:54 well I generate C 18:55:55 using C 18:56:00 oh. 18:56:01 ouch. 18:56:04 why is it hard?? 18:56:05 as in generate a C file 18:56:06 that is not hard. 18:56:17 psygnisfive, because it's first time I do it I guess 18:56:21 lol 18:56:28 i guess AnMaster can implement basic esolangs, and optimize things to hell 18:56:30 that'd explain cfunge 18:56:39 i mean, i guess its hard because C requires that you fuck with strings in nasty ways but 18:56:44 well we all live and learn 18:56:47 psygnisfive: still not that hard 18:56:55 psygnisfive, no string handling needed really 18:56:55 i mean a lot of the time you can just print it out as you go 18:56:56 i'd hate to have to manage strings in c 18:57:04 just trying to figure out how to generate code the best way 18:57:09 yes, print as you go is good. 18:57:10 AnMaster: fprintf. 18:57:18 tusho, yes of course... 18:57:20 but it wasn't that 18:57:21 and a switch around the type of the instruction in a main loop 18:57:22 you're done 18:57:26 it was how to use gotos and so 18:57:56 AnMaster: "don't" 18:58:04 tusho, eh? 18:58:11 the generated code will use gotos 18:58:16 why 18:58:16 it's the only sane way for jump 18:58:19 why? :( 18:58:24 gotos are evil! :( 18:58:25 i mean goto is fine in generated code 18:58:26 % jump to absolute address in code 18:58:26 : resume execution from previous address 18:58:27 look 18:58:28 but why do you need to use it 18:58:29 ah 18:58:30 okay then 18:58:31 tusho, exactly 18:58:32 it is 18:58:33 about 18:58:34 generated 18:58:35 code 18:58:36 not 18:58:37 yes 18:58:37 about 18:58:38 i 18:58:38 know 18:58:39 omg stop 18:58:39 that 18:58:40 but 18:58:41 the code I write by hand 18:58:41 the 18:58:42 point 18:58:42 is 18:58:43 most 18:58:45 of 18:58:47 the 18:58:49 time 18:58:51 you 18:58:53 can 18:58:53 tusho! >_ avoid 18:58:57 it 18:59:01 psygnisfive: blame AnMaster 18:59:05 yes loops will use while {} 18:59:12 someone should make a keyboard map that swaps space and return 18:59:29 yay! :D 18:59:37 i downloaded the Theory of Computation torrent 18:59:39 with like 18:59:41 20 books on ToC 18:59:43 who wants? :D 19:00:00 i 19:00:20 send i like virtual bookers 19:00:21 30 books actually 19:00:33 well that's a bit too much send like 29 of them 19:00:40 ;) 19:00:52 just take some bits of the torrent file and i think that'll do it 19:02:19 -!- cherez has quit ("Leaving."). 19:02:28 hahaha 19:02:31 actually it is 29 books 19:02:36 and one info file 19:02:37 hahahahaha 19:04:15 http://www.wellnowwhat.net/transfers/Theory%20of%20Computation.zip 19:04:18 not yet 19:04:23 give it 10 minutes 19:04:26 but thats where itll be 19:06:05 psygnisfive, how large? 19:06:09 and what does it contain 19:06:14 100ish meg 19:06:21 psygnisfive, https? 19:06:29 no 19:06:32 its just my web server 19:07:02 psygnisfive: AnMaster thinks that he's being spied on 19:07:04 downloading illegal material. 19:07:13 which is why I won't do it anyway 19:07:16 and he thinks that https would help 19:07:32 not that it would help much 19:07:43 Deewiant: I was leaving that bit of humour to the reader. 19:07:48 Subtlety and all that. 19:07:55 :-) 19:08:23 don't worry AnMaster 19:08:27 they're probably DIRTY PDFs 19:08:29 you couldn't read them anyway 19:09:08 I think... I will have to use setjmp 19:09:09 blergh 19:09:25 but it is the only possible way to do resume from jump 19:09:33 * tusho bets AnMaster's code generator handles indentation 19:09:51 tusho, um? what? 19:09:55 yes of course :P 19:10:02 at least now that you said it 19:10:04 * tusho groans 19:10:05 it didn't before 19:10:11 tusho, thanks for the idea 19:10:14 I'm grateful 19:10:22 AnMaster: are you planning on submitting -object code- to a C Beauty Contest or something 19:10:24 because you are batshit fucking insane 19:10:37 tusho, hahah 19:10:40 it was your idea 19:10:42 not mine 19:10:47 AnMaster: I was being sarcastic 19:10:50 I wouldn't have done it unless you mentioned it 19:10:54 but now I will have to 19:11:53 God gave man indent(1) for a purpose. 19:12:02 astyle > indent 19:12:06 or I could use the computed goto's of gcc 19:12:07 -!- Corun has quit ("This computer has gone to sleep"). 19:12:11 but I don't want to be gcc specific 19:13:44 pikhq: God gave us AnMaster so that we could say things like that and they would go straight from his ears to /dev/null, 19:13:50 Why God was so evil I will never know. 19:14:08 God is a BOFH. 19:14:09 tusho, actually I won't indent the code 19:14:13 And Jesus his PFY. 19:14:13 but you believed I would 19:14:15 amusing 19:14:25 but doesn't C-INTERCAL indent it's code? 19:14:28 iirc it does 19:14:34 AnMaster: It's not amusing. 19:14:38 It's something you would do. 19:14:40 tusho, what isn't? 19:14:48 tusho, C-INTERCAL does it 19:14:59 not fully, AnMaster 19:15:00 only basic 19:15:05 i.e. like 3 lines of code 19:15:06 indeed not fully 19:17:15 actually I will have to generate gcc specific code 19:17:18 using computed goto's 19:18:17 :/ 19:19:59 you never have to 19:20:00 AnMaster: use a switch 19:20:02 a big switch 19:20:03 around everything 19:20:10 int i = 0; 19:20:13 switch(i){...} 19:20:17 and at the top 19:20:17 top: 19:20:19 ah I see what you mean 19:20:21 then to 'goto var' 19:20:22 interesting idea 19:20:22 do 19:20:24 'i=var; goto top' 19:20:29 pretty standard stuff 19:20:35 and switch fallthrough makes it work elegantly 19:20:47 oh I can't do loops as while blocks I guess, I need to jump into them 19:21:09 tusho, yes I see what you mean 19:21:17 AnMaster: yes you can 19:21:17 however, loops won't be fun 19:21:19 switch is freeform 19:21:20 while (x) { 19:21:23 case 3: ... 19:21:24 case 4: ... 19:21:25 } 19:21:29 will go to the toplevel switch 19:21:38 oh yes.... forgot that C "feature" 19:21:45 that you can jump into other blocks 19:21:58 congrats, you're a duff-devicer ("one who abuses the freeform behaviour of switch in C"). 19:22:47 yes I know about duff's device 19:22:55 is there a reason for switch behaving the way it does? 19:23:27 so that noobs would fail and you could laugh at them? 19:24:22 lament: it's simpler to implement 19:24:29 and it allows for tricks like this 19:24:34 which was relevant in the 70s 19:24:41 lament: really 19:24:45 switch () { ... } is just a goto 19:24:48 and 'case x' a label 19:24:51 thus why it's case x: 19:24:54 not case (x) { ... } 19:25:07 tusho, most likely it is a goto into a jump table 19:25:18 which then points to the code bit in question 19:25:28 it is 19:25:40 so you can just do something like: JUMP_RELATIVE_PC variable 19:25:43 and then jump again 19:25:55 tusho: i don't buy that 19:26:02 lament: then don't 19:26:16 err isn't the reason just 19:26:28 case'0':case'1':case'2': etc 19:26:41 not that i know, just always assumed 19:26:44 oklopol 19:26:46 upload done 19:26:47 btw 19:26:48 psygnisfive 19:26:51 :o 19:27:03 psygnisfive: what upload? :D 19:27:09 the books! 19:27:21 where did you upload them? 19:27:30 the reason is that partly oklopol 19:27:30 the 19:27:33 case a: case b: case c: 19:27:34 .... 19:27:35 http://www.wellnowwhat.net/transfers/Theory%20of%20Computation.zip 19:27:36 case d: ... 19:27:37 etc 19:27:43 and the easiest way to do that? 19:27:46 as it is now. 19:29:34 reasons raisins, no one cares about reasons 19:29:40 psygnisfive: thanks 19:29:46 oklopol: always :) 19:39:02 -!- Corun has joined. 20:07:15 quiet. 20:18:37 loud. 20:19:25 yay it (partly) works 20:22:19 that's what she said 20:22:24 haha 20:23:20 sorry, it's just i've never used that so that it made even remotely sense. 20:23:29 lol 20:25:13 -!- kotrin has joined. 20:26:22 -!- kotrin has left (?). 20:38:45 well it generates a executable that compiles now 20:38:48 an* 20:38:55 doesn't work though :P 20:45:49 Whoo. 20:46:59 You know, AnMaster, Def-BF isn't exactly hard. 20:47:13 tusho, well I never generated C code before 20:47:22 Yeah because generating C is so hard 20:47:26 no 20:47:29 but it is new to me 20:48:32 i've generated c code manually, like a true codar 20:48:42 by pressing keys 20:48:45 well I coded in C... 20:48:58 tusho, but I admit this is my first compiler 20:49:00 oklopol P 20:49:00 :P 20:49:01 bow before me and shit, this stuff is bigger than ya. 20:49:03 as in compile to other language 20:49:08 manual code generation, wow 20:49:20 "bow before me and shit" 20:49:22 well done 20:49:25 hahah 20:49:26 :P 20:49:28 * tusho bows before oklopol 20:49:31 * tusho shits 20:49:31 well, you ARE into scat 20:49:38 pikhq, I figured out one extra instruction I need when optimizing, constant call 20:49:48 pikhq, if the instruction just before is a load constant 20:50:14 that's specific to Def-BF 20:55:57 constant call, it's the friend of the damned, press its buttons and you'll know its name... 20:58:20 did someone say scat? 20:58:53 -!- Corun has quit ("This computer has gone to sleep"). 20:58:59 lol 21:02:42 -!- Hiato has quit ("Leaving."). 21:03:03 I'm the Scatman....repeat after me 21:03:03 It's a scoobie oobie doobie scoobie doobie melody 21:03:05 I'm the Scatman....repeat after me 21:03:05 It's a scoobie oobie doobie scoobie doobie melody 21:03:20 it loses something when it's typed 21:03:27 well 21:03:41 the actual chorus @ the lyrics i copied from... 21:03:57 (Scatting) 21:03:59 I'm the Scatman 21:04:01 ah found it 21:04:01 (Scatting) 21:04:05 I'm the Scatman 21:04:09 (Scatting) 21:04:23 although i guess that's funnier. 21:04:45 i used to like that song 21:04:55 perhaps i still do, haven't heard it for ages 21:08:42 such a good song :O 21:08:51 it's catchy, I'll give it that 21:09:28 in the music video theres this boy thats hot 21:09:37 who really needs to sit on my cock 21:09:44 ... 21:09:59 if it rhymes it must be true. 21:10:33 oklopol: what if it's a slant rhyme? 21:10:48 whats a slant rhyme? 21:11:56 http://en.wikipedia.org/wiki/Slant_rhyme 21:12:09 oj 21:12:11 ok* 21:12:12 this 21:12:19 I will do just to irritate tusho 21:12:20 oh 21:12:22 same-coda 21:12:23 I will load the input file 21:12:29 using mmap() 21:12:34 just to make tusho go crazy 21:12:41 actually mmap is less work than reallocating a buffer all the time 21:12:50 tusho, that is another aspect 21:12:54 as opposed to same rime 21:18:12 -!- pikhq has left (?). 21:34:19 -!- Corun has joined. 21:37:31 RodgerTheGreat, what is the file extension for Def-BF? 21:37:51 there is no convention yet 21:37:55 I suggest .dbf 21:37:59 ok thanks 21:43:26 -!- atsampson has quit (Read error: 104 (Connection reset by peer)). 21:44:11 I have yet to implement input 21:44:14 apart from that it works 21:44:22 the low level part that is 21:44:31 oh wait call doesn't work completely 21:44:33 there is a bug there 21:44:36 will fix that tomorrow 21:44:48 RodgerTheGreat: .bf is befunge 21:44:52 may I suggest .defb 21:45:04 -!- atsampson has joined. 21:45:58 tusho, he said .dbf not .defbf 21:46:02 or .bf 21:46:24 yes 21:46:25 the point is 21:46:29 'bf' means befunge in file extensions 21:46:33 so .defb is better 21:46:37 or .dfb 21:46:44 fuckbrain? 21:46:54 .defbf would be acceptable also 21:47:04 well RodgerTheGreat decides 21:47:14 AnMaster: that's why I pinged RodgerTheGreat 21:47:15 not you 21:47:17 yes 21:47:31 $ ./dbc -o tmp/helloworld.c tmp/helloworld.b 21:47:31 File written to tmp/helloworld.c, to compile use: 21:47:31 gcc -std=c99 tmp/helloworld.c 21:47:37 .db 21:47:39 :) 21:47:42 data base? 21:47:43 RodgerTheGreat: conflicts with database 21:47:49 that's a common sqlite extension 21:47:50 for instance 21:47:54 RodgerTheGreat, call stack is broken 21:47:58 will redeign tomorrow 21:48:02 tusho: there are always conflicts 21:48:04 and reimplement optimizing 21:48:13 Deewiant: but .defb and .defbf are unlikely to. 21:48:14 jesus just pick something and stop pinging me 21:48:18 if you want one <= 4 chars, at least 21:48:56 .dfb 21:48:58 what about that? 21:49:12 RodgerTheGreat, btw: 21:49:18 sorry, it's a "Data Flask Data Formula File" 21:49:19 ==2443== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1) 21:49:19 ==2443== malloc/free: in use at exit: 0 bytes in 0 blocks. 21:49:19 ==2443== malloc/free: 114 allocs, 114 frees, 5,088 bytes allocated. 21:49:21 http://filext.com/file-extension/dfb 21:49:21 from compiler 21:49:30 Deewiant: .db is pretty conflicty though. 21:49:40 and bf means befunge in file extensions 21:49:41 to esolangers 21:49:42 sure, but on the other hand that makes it a good file extension in some cases 21:49:47 ==2559== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 5 from 1) 21:49:47 ==2559== malloc/free: in use at exit: 0 bytes in 0 blocks. 21:49:47 ==2559== malloc/free: 1 allocs, 1 frees, 65,536 bytes allocated. 21:49:50 from compiled app 21:49:53 in this case, though, I wouldn't go with it. 21:50:58 however 21:51:04 the file extension of brainfuck is .b 21:51:14 so dfb makes sense 21:51:22 why not .defb 21:51:22 I vote for .dfb 21:51:28 Deewiant, DOS! 21:51:30 ;P 21:51:34 at least ais would say that 21:51:45 8.3 remember? 21:51:48 he would, but you're not ais 21:51:49 * AnMaster shudders 21:51:57 and I'm asking you 21:52:00 why not .defb :-P 21:52:02 Deewiant, well I give same issue 21:52:06 why it could be a problem 21:52:11 and why would you care about DOS 21:52:15 as Def-BF is a system programming language 21:52:20 what if they port FreeDOS to it? 21:52:47 freeDOS supports beyond 8.3 doesn't it? 21:52:52 no clue 21:53:05 anyway I know a good extension 21:53:06 .d 21:53:12 no one would use that ;P 21:53:21 anything 1-char is taken many times over 21:53:29 anything 2-char is taken at least once 21:53:30 yeah guess so 21:53:36 most 3-chars are, too 21:53:53 Deewiant, sure .c is taken more than once? 21:53:58 I can't believe that 21:54:05 AnMaster: of course 21:54:07 oh, sure 21:54:08 wtf 21:54:09 http://filext.com/file-extension/c 21:54:13 that makes no sense 21:54:16 yes it does 21:54:17 8 times, or 7? 21:54:21 not all the world is C, AnMaster 21:54:37 actually, all the world is C. 21:54:38 7, turns out 21:54:52 well night 21:54:54 got to go 21:54:55 cya 21:55:02 ya 21:55:10 lament: not rly. 21:56:43 wait 21:56:45 about C 21:56:49 .c != .C 21:56:51 yet 21:56:54 it list both as same 21:57:00 Extension: C 21:57:00 Program and/or Extension Function [What's This?] Company [What's This?] 21:57:00 C/C++ Program File 21:57:14 Extension: C 21:57:14 Program and/or Extension Function [What's This?] Company [What's This?] 21:57:14 UNIX Compact File Achive 21:57:33 C file is .c 21:57:36 archive is .C 21:57:39 tusho, Deewiant ^ 21:57:41 that site is crap 21:57:45 anyway night really now 21:57:55 it's not crap 21:57:59 it's very useful 21:58:03 yeah, it's crap because it's case-insensitive 21:58:06 it's completely useless 21:58:10 might as well boycott it 21:58:17 Deewiant: just about everything should be case-insensitive really 21:58:21 filesystems, web servers 21:58:28 humans _don't_ distinguish things just based on their case 21:58:33 so it's really stupid 21:58:45 humans do, though 21:58:51 God vs god, for instance 21:58:56 names in general 21:59:15 Bill, bill, Ray, ray 21:59:29 depends on the language, of course 21:59:44 but most things are built with English in mind 22:01:08 Deewiant: 'God' vs 'god' is a ridiculous religious notion and requires explicit effort from humans. 22:01:17 It wouldn't happen if they weren't commanded to by 'God'. 22:01:41 I'm not sure I see your point 22:01:50 "I helped my uncle Jack off a horse" vs. "I helped my uncle jack off a horse" 22:01:58 ah yes, that's the good example :-) 22:02:41 yes 22:02:45 names are the exception 22:02:57 however, consider http://awesomefamily.org/Jack/ 22:02:58 vs 22:03:00 "God" is similar to a name 22:03:02 and we were talking file _names_ right ;-) 22:03:03 http://awesomefamily.org/jack/ 22:03:11 in English text, for names, it matters. 22:03:18 In filenames, I doubt it ever will. 22:03:37 that's why all sane operating systems are already case-insensitive :D 22:03:58 case-sensitivity but with case-insensitive matching might be a good middle ground 22:04:15 Deewiant: and that's exactly what Windows and OS X do. 22:04:17 e.g. Jack and jack are different but if you only have one, any case matches it 22:04:23 that's not what I meant 22:04:33 oh, i guess it's not 22:04:38 the way I see it you could still have both Jack and jack coexist 22:04:43 i thought you could have both Foo.txt and foo.txt but you can't :( 22:04:47 in Windows you can't, at least 22:04:50 nor OS X 22:04:51 don't know about OSX 22:04:56 lament: that is just confusing though 22:05:03 it leads to nothing but mistakes 22:05:12 sure 22:05:24 case-insensitive but case-preserving is basically the sane way to do this 22:05:35 yes, i believe so 22:05:36 In fact you can generalise it 22:05:45 matching-insensitive but creation-preserving 22:05:45 perhaps the biggest argument against case sensitivity is that it's just too difficult in general 22:05:49 in Windows you can't rename something changing only its case :-/ 22:05:49 although it works fine for English 22:05:52 that can apply to tons of stuff 22:05:59 Deewiant: that is a flaw, yes 22:06:02 same with os x's HFS 22:06:06 you have to go to another temp name 22:06:09 that is just a technical flaw 22:06:16 it works for me in OS X 22:06:29 lament: open up a terminal 22:06:30 try 22:06:33 mv foo.txt Foo.txt 22:06:43 yes, it works 22:06:44 mv is different 22:06:51 both with mv and in Finder 22:06:59 does it? 22:07:11 lament: 22:07:11 % mv test.txt Test.txt 22:07:11 mv: `test.txt' and `Test.txt' are the same file 22:07:14 I'm on tiger 22:07:17 maybe leopard fixed t 22:07:20 maybe. 22:07:28 or maybe lament's not on HFS? 22:07:40 HFS+ actually 22:07:43 but I assume he is 22:07:47 since he mentions case-insensitivty 22:07:52 also installing OS X on non-HFS stuff is a bitch 22:07:54 how do i see what the filesystem is? 22:07:59 lament: disk utility 22:08:38 "Format :Mac OS Extended (Journaled)" 22:08:43 hfs+ then 22:08:47 must be leopard 22:08:48 yay, then 22:09:05 haven't tried Vista in this regard, maybe they fixed that there, too ;-) 22:09:26 although I'm not hopeful ;-P 22:09:49 'hopeful' and vista, *g* 22:10:39 tusho: this is more of that subtlety you were telling me about. ;-) 22:10:59 Deewiant: it only applies to other people 22:11:09 the problem with case sensitivity is that it's too hard 22:11:15 unless you restrict yourself to English 22:24:29 -!- pikhq has joined. 22:24:31 yeah vista fixed it 22:25:52 well actually i think you've always been able to do it in explorer 22:27:08 no, not in XP 22:28:07 hmm, apparently I'm talking out of my ass and you can 22:28:15 I wonder what it was that didn't work then 22:28:23 I know something doesn't :-P 22:33:17 -!- Corun has quit ("This computer has gone to sleep"). 22:33:24 guys 22:33:28 would you live in a police state 22:33:28 if 22:33:29 wait for it 22:33:30 the police 22:33:31 were 22:33:32 NINJAS 22:33:33 i would 22:33:40 I wouldn't. 22:33:49 Because, properly speaking, that would be a ninja state. 22:33:50 :p 22:34:11 pikhq: No. 22:34:13 They'd be police. 22:34:14 But... 22:34:16 Ninja. 22:34:17 Police. 22:36:33 well life would be the exact same really 22:36:55 heh, god i love ninja jokes 22:37:05 ninja parade & ninja tea party ftw 22:37:16 oklopol: exact same ... except for ... 22:37:18 NINJA 22:37:19 POLICE 22:37:23 I wouldn't live in a police state, especially one where the cops can kill you without you ever noticing they're there 22:37:39 Deewiant: NINJAS. 22:37:44 NINJA POLICE STATE. 22:38:15 m/POLICE STATE/i <-- 1 22:38:37 hence police state, hence I wouldn't live there, given the choice. :-P 22:38:38 Deewiant: NINJAS. 22:38:40 GOD DAMNIT. 22:38:43 WHAT IS WRONG WITH YOU. 22:38:47 FUCKIN' NINJA POLICE. 22:38:48 STATE. 22:39:10 ninjas are cool only when they're not actively trying to mess with you 22:39:36 Deewiant: WRONG. 22:39:41 Ninjas are the DEFINITION OF COOL POLICE. 22:39:49 Therefore, Ninja police state = Cool police police state 22:40:19 no matter how cool that's still a police state. Sorry! ;-) 22:40:51 It's cool * -cool. 22:40:55 Or, -cool^2. 22:41:11 It's therefore worse than being just -cool (or, that is, uncool). 22:42:06 pikhq: But it's NINJA POLICE STATE 22:42:15 That's (cool*A(g64,g64))+-cool 22:42:20 meh, bad troll is bad 22:42:21 -!- Slereah__ has joined. 22:42:30 Slereah_: Would YOU live in a ninja police state? 22:42:35 A police state, but the police are NINJAS. 22:43:45 tusho: Times, not plus. :p 22:44:01 pikhq: No. Plus 22:54:48 -!- Slereah_ has quit (Read error: 110 (Connection timed out)). 22:55:11 -!- Slereah_ has joined. 23:01:59 -!- Judofyr has quit. 23:06:25 -!- Slereah__ has quit (Read error: 110 (Connection timed out)). 23:09:24 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 23:28:22 -!- Slereah__ has joined. 23:45:03 -!- Corun has joined. 23:47:27 -!- Slereah_ has quit (Read error: 110 (Connection timed out)). 23:47:39 -!- Slereah_ has joined. 23:48:57 Some days, I hate Gentoo. 23:49:09 "No disk space available". . . 23:49:21 When the partition in question is only 70% used. . . 23:50:20 If I get that error again, now that the disk is only 56% used, I'm kicking someone in the shin. 23:50:29 -!- Slereah__ has quit (Read error: 110 (Connection timed out)). 23:51:12 okay i sense there is something wrong, but i don't know what, because my train of thought got intercepted 23:51:12 ever happen to you? 23:51:43 Regularly. 23:56:16 the fun thing is i have no idea whether it's a seriously depressing thought, or something like "this is a bad name for this function" 23:56:21 it often takes ages to remember what it was 23:56:51 okay i think i got it 23:56:55 failed an oko on a channel, and kinda only half-noticed i did. 23:57:09 usually they're at least a little worse :) 23:58:38 oklopol: o 23:58:53 o 23:59:16 oko