00:01:45 [[If one extend slightly the syntax for gerunds, DIAL can be implemented 00:01:45 as: 00:01:46 PLEASE ABSTAIN FROM EVERYTHING EXCEPT COMING FROM + ANSWERING 00:01:49 WHILE REINSTATING THEM ]] 00:01:50 more literate than cobol 01:11:50 :D 01:12:00 night really (failed to sleep first) 04:24:03 -!- psygnisfive has joined. 06:56:33 -!- calamari has joined. 07:48:01 Does anyone know of any unicode characters other than eszet where the toUpper() or toLower() cannot be reversed? 07:48:20 (ie changing case twice returns you to a different codepoint) 07:48:42 (Unicode counts as an esolang right? :P) 07:49:50 it's scary reading the logs, fizzie is such a me. 07:50:28 what does eszet do when you change it twice? 07:50:54 ß uppercased is SS. 07:50:59 And SS lowercased is just ss. 07:51:19 Ligatures have similar behaviour. 07:51:31 Just look at the list in http://www.unicode.org/Public/3.2-Update/SpecialCasing-3.2.0.txt for all special-cased things. 07:54:46 Of course for all uppercase characters x, toLower(toUpper(x)) "returns" to a different codepoint, but I suppose that wasn't the question. 07:55:34 Actually http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt is a better link, since it's version 5.1.0 instead of 3.2.0. 07:56:07 It does not seem to be very much different. 07:57:30 hmph, god it's hard searching the logs based on remembering a topic. 07:57:48 should probably make a better searcher program 07:57:51 one that understands 07:58:06 Incidentally, what especially "you" I did in the logs this time? 07:58:27 you said something about not seeing a reason to make mistakes 07:58:41 it may have been a joke, but i'm pretty sure i've said the exact same line. 07:59:43 there was also some other one, but by then i may just have been looking for similarities sub...erconsciously. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:00:58 I seem to have been writing no-uppercase-at-the-beginning-of-sentences as late as 2004. 08:02:15 your style has actually changed a lot, while i see oklisms in both the old and the new fizzie, you're not always very *fizzie* in the backlogs. 08:02:31 this i cannot give examples of. 08:03:36 Yes, I don't recognize myself in 1990s-age logs (of other channels) at all. 08:04:05 anyway what i was searching the logs for is i remember once correcting an error of ehird's, and for some reason he just wouldn't admit he was wrong even though i clearly couldn't go on with my life without him admitting it. but maybe he did admit it then, or maybe i just imagined this, because i couldn't find it. 08:04:30 It is not trivial to write a regexp to match that. 08:04:46 indeed not, also i don't even use a regexp. 08:04:59 i just search for a string 08:05:08 Maybe you could graph ehird- and oklopol-densities over time, and look only at spots where those have noticeable peaks simultaneously. 08:05:27 yeah there will only be like 2-3 of those per day. 08:05:45 well 08:05:46 Yes, but I like graphs. 08:05:58 maybe like dialog densities 08:06:06 but 08:06:18 there was also oerjan or someone there, it was very spread out... 08:06:55 anyway i should probably start my readings ~> 08:11:27 fizzie: Yes, but I like graphs. <<< i like the good kind of graphs 08:33:28 -!- tombom has joined. 09:01:05 -!- calamari has quit ("Leaving"). 09:44:32 -!- oklopol has quit (Read error: 110 (Connection timed out)). 10:22:31 Yes, but I like graphs. <-- :D 10:25:49 Since it's been such a while after my last graph-drawing, here's a messy one of channel activity over the whole year 2008: http://zem.fi/~fis/esoteric-2008.png 10:26:17 fizzie, what is the scale? 10:26:26 Who knows. :p 10:26:45 fizzie, what is the gap with 0 activity in the beginning? 10:27:29 fizzie, oh and what app did you use to draw this? 10:27:33 Well, the Y axis is "number of lines over three consecutive days", with each X-axis pixel stepping the window start time by 8 hours; and the nicknames are ordered by total line-counts. 10:27:42 It's a custom Perl script with GD.pm, again. 10:27:47 ok 10:27:51 That's why there's no grid. :p 10:28:06 fizzie, btw, that interactive fungot browser thingy... what was the url now again? 10:28:07 AnMaster: here's a problem: you're modifying a global packages.scm; i never considered tic-tac-toe a game 10:28:11 Gap is in my logs, I probably again forgot to "/connect freenode", since I don't have it on automagically. 10:28:33 It was at http://zem.fi/~fis/fungot.html but I haven't continued the commentation, and the source might be a bit old. 10:28:33 fizzie: hi evoli. 10:28:40 ah 10:28:40 fungot: I'm not evoli. 10:28:41 fizzie: so should i waste time on irc" ( ircnet) 10:28:48 who is evoli? 10:29:14 Someone on #scheme. 10:29:23 mhm 10:29:32 fungot, I prefer if you spent your time in here 10:29:32 AnMaster: but decided not to bother u for this one 10:29:41 . 10:29:45 good 10:29:50 I gess 10:29:53 guess* 10:30:49 Uh... actually it seems that the source is current (since it's fetched with a xmlhttprequest-style ajaxy thing from fungot.b98.txt) but the syntax highlighting doesn't match it. :p 10:30:49 fizzie: dating advice? mzscheme? gambit? sisc? 10:31:11 fungot: Are you sure those things have to do with dating? 10:31:11 fizzie: i found on the net." this is a public forum 10:31:29 -!- Slereah_ has joined. 10:41:23 -!- Slereah has quit (Read error: 110 (Connection timed out)). 10:49:35 Oh, and here's the same thing as relative activities: http://zem.fi/~fis/esoteric-2008-r.png -- about the only clear thing in it is the ehird/tusho nickname-switcheroo. 11:03:00 -!- oklopol has joined. 11:40:28 -!- psygnisfive has quit ("Leaving..."). 12:43:05 -!- ais523 has joined. 12:50:39 okay enigma pack 3, level 46 was a fun, nontrivial puzzle 12:51:24 well okay it was kinda trivial after i familiarized myself with the concept of moving bricks, but it took me a while to get there 12:51:31 so yeah, enigma++ 12:53:03 * ais523 finds it interesting to see what oklopol sees and doesn't see as hard 12:53:48 well more interesting than hard, took me three attempts, and on the first one i just tried something at random 12:54:39 on the second i rationalized the beginning but took a few chances on intuition and failed 13:00:20 -!- FireFly has joined. 13:02:48 -!- Mony has joined. 13:03:56 plop 13:04:03 hi 13:07:21 Intuition: just say no. 13:08:17 yeah it's a pretty useless thing 13:35:57 10:25 fizzie: Since it's been such a while after my last graph-drawing, here's a messy one of channel activity over the whole year 2008: http://zem.fi/~fis/esoteric-2008.png 13:36:02 i like it 13:36:15 also, mine is kind of skewed since I say things in multiple lines. 13:36:18 08:05 fizzie: Maybe you could graph ehird- and oklopol-densities over time, and look only at spots where those have noticeable peaks simultaneously. 13:36:19 08:05 oklopol: yeah there will only be like 2-3 of those per day. 13:36:20 :D 13:36:35 10:49 fizzie: Oh, and here's the same thing as relative activities: http://zem.fi/~fis/esoteric-2008-r.png -- about the only clear thing in it is the ehird/tusho nickname-switcheroo. 13:36:39 tha's a lot of oklopol 13:36:58 that's pretty 13:37:22 I'm actually surprised how high "others" is 13:37:41 well, it has the peaks, prolly from when new people arrive 13:37:44 or asiekierka 13:37:53 * ais523 would like to see a smoothed version of the first graph 13:37:59 maybe with weekly moving averages 13:43:45 "Dan Bernstein awards $1,000 for a security hole discovered in djbdns -- its first in almost a decade!" 13:43:46 woah 13:43:52 he actually awarded it 13:43:53 djb++ 13:44:25 well, aparently there was a security hole in qmail that was discovered a while back that he didn't award for 13:44:34 because it only manifested on computers with at least 56GB of RAM 13:45:29 yes, well, that makes sense 13:45:36 this bug is one that can actually be exploited 14:10:37 i think that activity graph might be better if it also showed how much talk actually happened 14:10:52 also how's that a lot of oklopol, it's much more of everyone else 14:11:12 well maybe more than you'd've thought, but i don't see how that's an interesting observation :P 14:11:28 * oklopol mentions level 46 again 14:11:42 * oklopol goes back to his bookings -> 14:22:45 oklopol: want a challenge? try the Experimental set, "Impossible?" 14:23:04 ehird: I've done that one, it's easy 14:23:11 wut :D 14:23:17 there wasn't anything special about it IIRC 14:23:22 sure there is 14:23:22 AFAICT, it's unfinished 14:23:24 it's impossible 14:23:29 hi ais523 14:23:30 how did I not notice? 14:23:33 hi AnMaster 14:24:29 it's impossible <-- no, but you have to guess very luckily 14:25:07 I'm pretty sure I remember finding a magic wand on that level, which makes it trivial 14:25:20 ah, maybe there's a hidden wand somewhere that you can only obtain in the first few seconds 14:26:12 ais523: 14:26:17 you're thinking of Impultest 14:26:17 but as AnMaster mentions, it's clearly possible if you get to the corner oxyds before the bolders do and they happen to be the right colour 14:26:17 just finished it 14:26:47 yep, you need to get to the one in the top right corner quickly 14:26:59 and then you must get it correctly on the next block 14:27:02 after that: trivial 14:27:25 AnMaster: you actually get two tries, you can hit a block on your way to the corner oxyd 14:27:31 ais523, true 14:28:08 i'm not interested in puzzles that require dexterity or any kind of guesswork, and usually not ones that require exploring either, unless they happen to be fun for some reason, but a good puzzle will always be nicer anyway. 14:28:45 well, i love exploring concepts, like how something moves, but i don't like searching the level for information, or physically exploring large areas 14:29:46 well. i guess i just like to solve the things in my brain and not in the game. 14:35:03 -!- jix has joined. 14:37:31 What game is this about? ;o 14:37:53 it's basically a generic puzzle game 14:38:05 which can emulate most of the others as long as you flavour them as involving marbles 14:38:14 ais523: "Great minds" and so on; I actually did weekly averages before you mentioned them. http://zem.fi/~fis/esoteric-2008-smooth.png 14:38:36 so it has dexterity-based, speed-based, knowledge-based, intelligence-based, and patience-based puzzles 14:38:44 oklopol seems to like the intelligence-based ones best 14:39:14 fizzie: I'm basically the loudest person on average, then, if you discount AnMaster's 5 billion "Deewiant: boring thing about befunge" per day. 14:39:22 That matches my intuitive experience. :P 14:39:46 Does this game have a name? 14:39:55 FireFly: Enigma 14:40:07 http://www.nongnu.org/enigma/ 14:40:15 Ah 14:41:03 oklopol: try the microban levels 14:41:33 Hm 14:41:37 I recognize this game 14:41:44 I think I've played it before 14:41:47 pretty much everyone here does, somehow 14:43:55 it seems me and psygnisfive take turns being on top 14:44:00 hmm he isn't here 14:44:01 nm 14:44:04 *groan* 14:44:45 :) 14:45:04 microban 14:45:15 maybe at some point i will 14:50:18 Occasional visitors are more visible in other graphs. http://zem.fi/~fis/test.png has 2009 January (day-long windows, X-scale 1 hour per pixel, relative percentages of activity) and the fluxo invasion is very visible. 14:51:05 Flexo, not fluxo. Anyway. 14:51:23 A grid would be nice too. And some labels. 14:51:29 And a pony yo 14:52:23 who's flexo 14:52:24 :< 14:52:30 a german guy 14:58:05 Statistics are interesting 14:59:48 -!- BeholdMyGlory has joined. 15:00:12 -!- M0ny has joined. 15:02:52 Yes, we're certainly putting the ATTIC back in the stATisTICs. 15:06:50 We're putting the TITS back in staTIsTicS! 15:07:17 I didn't want to be rude. 15:07:43 (There are 23 women and 15 men in a conference. The women's cup sizes are: (etc). The men weight: (etc). How many tits are there?) 15:08:08 If I only do the cumulative-activity-thingamajick but not the normalization inherent in the relative-activity-thing, the flexo invasion loses prominence: http://zem.fi/~fis/test2.png 15:09:18 ... wtfbbq? 15:10:15 activity graph. 15:15:19 HOLY SHIT 15:15:21 * (del) (cur) 16:29, 22 September 2006 . . Tom Duff (Talk | contribs) . . 513×385 (10,841 bytes) (The output of a sample EXPLOR program.) 15:15:24 --esolangs wiki 15:15:28 Tom Duff. 15:15:34 who is he? 15:15:40 ais523: ... Duff's Device. 15:15:46 ah, wow 15:15:56 Also wrote Unix10/Plan9's "rc" shell 15:16:01 Not the same Tom Duff :P 15:16:15 GregorR: no, it is 15:16:18 http://esolangs.org/wiki/User:Tom_Duff 15:16:24 My wikipedia bio links to tom duff on wikipedia 15:16:52 -!- Mony has quit (Read error: 110 (Connection timed out)). 15:16:55 *snaps* 15:17:10 Was that your spine? 15:17:33 That's a godawful picture of him :P 15:17:38 Or at least, I sure hope it is :P 15:17:42 Evil Tom Duff 15:17:56 also, programmers aren't known for their beauty 15:18:01 "Your femur is broken." "Broken as in 'not functioning properly'?" "Broken as in, 'there are 2 smaller femurs where you used to have one.'" "Hmm, 2 femurs. Will this give me super powers?" "If you consider the ability to writhe in pain a super power, then yes." 15:18:03 does he have a beard? 15:18:07 Sorry, the 'snap' just reminded me. 15:18:09 ais523: no 15:18:12 that's how we can tell if duff's device will stay popular 15:18:18 as he doesn't, presumably it's falling out of fashion 15:18:27 I think it never got into fashion 15:18:33 well, exactly 15:18:56 GregorR: his favicon looks better http://www.tomduff.com/index.html 15:19:05 -!- Judofyr has joined. 15:19:17 "Sure. Here's a moderately recent picture of me sitting unshaven in my office scowling at my son, who was playing with the camera. At least I combed my hair. Do whatever you want with it. Tom Duff (talk) 05:53, 16 January 2008 (UTC) " 15:19:19 -talk:tom duff 15:21:22 -!- ais523 has quit (Read error: 104 (Connection reset by peer)). 15:21:32 -!- ais523 has joined. 15:21:44 wb me 15:21:54 Firefox 3 /added/ support for Gopher :P 15:21:57 That's weird :P 15:22:08 (Full support that is) 15:22:11 IT CANNOT COMPETE WITH VONKEROR 15:22:14 or sth 15:25:23 So, I've thought up some definitions for IO-complete. 15:26:02 I-complete: The program can, at its will, accept linear text input from the user and then use that text to modify its internal state with complete differentiation of all characters in the alphabet. 15:26:08 GregorR: does it do client-BF? 15:26:09 No? 15:26:15 then it doesn't have full support 15:26:26 O-complete: The program can, at its will, output linear text combined in any arbitrary way from its internal state. 15:26:28 Thoughts? 15:26:53 the usual definition is that it can produce any output that's a Turing-computable (or substitute other computational class here) function of its input 15:27:06 in other words, that its input -> output processing computational class is the same as the computational class of the lang as a whole 15:27:09 That doesn't handle interactive programs ala BF 15:27:24 does it have to? 15:27:26 I'm basically trying to define the set of languages that, to the user, are indistinguishable from BF. 15:27:29 ah, ok 15:27:41 which is basically the standard model with just stdin/stdout 15:27:45 We use "BF-complete" for that, I'd like to formalize the definitions 15:27:59 in that case, you need to change it to cumulative input -> cumulative output, and allow the program to produce output before all the input is read 15:28:11 Yes, but I've already said some definitions 15:28:18 I'm just wondering if they're any good 15:38:45 I wonder what lazy apl would be like 15:39:55 apart from awesome 15:49:09 Oh look, Eric Schmidt slams Twitter with no more than a vague idea what it is. 15:50:01 Hm, no. Just a bad headline. 15:51:47 -!- dbc has quit (Read error: 110 (Connection timed out)). 15:53:44 http://imgur.com/3US8K.png Uhhh... 15:57:44 -!- oerjan has joined. 16:03:33 hey ehird 16:03:38 hello. 16:04:28 hi 16:04:33 * ais523 is not ehird but says hi anyway 16:04:37 also, 'againt the wall' 16:04:42 was that intentional? :p 16:04:45 no idea 16:04:51 I'm not even sure if it was in the original proposal or not 16:04:54 yes. also, you want ##nomic or /msg 16:05:07 no, this is ##nomic 16:05:16 you're mistaken. 16:05:20 since ehird isn't in the other nomic channel 16:05:29 i'm sure everyone else will appreciate that. 16:05:31 -!- ehird has left (?). 16:05:47 hehehe 16:06:00 -!- ehird has joined. 16:07:31 ehird: but Wooble isn't an op here... 16:12:08 oh, is that the problem? 16:12:16 I thought e was just being a jerk 16:12:25 can we keep #esoteric to vaguely esoteric topics? 16:12:35 if you're trying to direct messages to me, IRC has a facility for that 16:12:57 -!- Hiato has joined. 16:12:57 at the moment, I'm trying to direct messges to ehird and ais523 16:13:04 as well as anyone else who is interested in nomic 16:13:09 IRC has a facility for that, too, but freenode blocks it 16:13:11 there's a channel for that 16:13:18 which one? 16:13:20 see, people join channels they want traffic to do with 16:13:23 and leave ones they don't 16:13:24 the syntax is /msg ehird,ais523 This is a message to send to two people 16:13:29 -!- Hiato1 has joined. 16:13:34 generally, disrespecting this choice leads to people ignoring you 16:13:34 [16:13] <-> ehird,comex> test 16:13:35 [16:13] [407] PRIVMSG Too many recipients. Only 1 processed 16:13:44 ehird: except you're ehird 16:13:52 so, if you want to continue to be able to direct messages at me, I'll take the same course of action 16:13:54 and generally overreact to things 16:13:57 if you keep doing this 16:14:10 comexk: you want to talk to me, you play by my rules. simple enough 16:14:10 ah well, i can just ignore you 16:14:34 that would solve both problems 16:14:34 ehird: why are you playing nomic if you don't want to talk about nomic? 16:14:48 who said I don't want to talk about nomic? I don't want to talk about nomic in irc in ##nomic. 16:14:57 Email me or something. Or use /msg. 16:15:08 -!- comexk has left (?). 16:15:20 How will I deal with this loss. 16:17:58 ais523, should I put up something following the same implementation in C but that is sane 16:18:14 i think that may be a violation of the spirit of Deadfish. Or not. 16:19:20 Agh, I ran into GreyKnight -again- 16:19:36 sure it's the same person? it's a fairly obvious nick... 16:20:04 relatively 16:20:13 well,. 16:20:14 not so much now. 16:20:21 oerjan: quite, though. 16:20:22 of course running into people on Agora, esolang and wikipedia isn't unheard of from before. 16:20:26 because it has information about his kilt. 16:20:37 I don't recall how I know he has a kilt from other sources 16:20:38 but I do 16:21:05 also, apparently he's a christian who has vowed, among other things, to "Refrain from cutting the hair on one's head". 16:21:07 go figure. 16:21:32 well, christians don't have do vow that AFAIK, but presumably there's nothing to stop them vowing that if they want to 16:21:36 huh 16:21:46 ais523: part of the nazirite vow, apparently 16:21:49 although that's a jewish thng 16:21:50 *thing 16:22:00 it is a good excuse to avoid cutting your head if you're a teen, I suppose 16:22:13 what a sikh thing to do 16:24:21 oerjan, hm ok 16:24:28 how does Deadfish behave on EOF? 16:24:47 i think there may be some bug there too... 16:29:30 and ais523, ihope (iirc), oerjan, everyone 16:29:45 the rumors of my adminhood are _still_ exaggerated 16:30:10 me and keymaker are the only Esolang admins who are active with admin work, IIRC 16:30:18 and we're only active with it when there's actual admin work to do 16:30:19 # (diff) (hist) . . Esolang:Community Portal‎; 19:18 . . (+9) . . Zzo38 (Talk | contribs) (tunes.org logs are now listed in descending order of date) 16:30:23 clever guy, my idea is indeed good. 16:30:23 which is nearly all cleaning up spam 16:30:32 even tho I stole it from #concatenative 16:30:32 and blocking the people responsible 16:30:50 or more likely the zombies responsible 16:30:59 Brains... 16:31:09 * oerjan is a responsible zombie. Oh wait. 16:31:16 ^bf ,[.,]!This may not be a good channel to take brains into 16:31:16 This may not be a good channel to take brains into 16:31:20 I had a sort-of-unique idea, based on INTERCAL and Forte. 16:31:24 ehird: yes? 16:31:36 Basically, it's all redefining language constructs. 16:31:47 clever 16:31:51 So, to terminate a loop, for instance, you change the loop end command into a nop. 16:31:53 Things like that. 16:31:57 And the whole language is based around that one operation. 16:32:21 that's how I normally terminate short loops in INTERCAL nowadays too, but your language would presumably go much further 16:32:35 yes 16:33:24 ais523: I'm trying to figure out how to have actual computation if all you can do is remap constructs... 16:33:49 -!- Hiato has quit (Connection timed out). 16:33:57 you may be able to use the constructs as a minsky machine 16:34:03 Don't do "jump to the next line." 16:34:09 Don't do "Don't do "jump to the next line."" 16:34:10 ais523: you need a nop then 16:34:17 Remove a copy of Don't do from the preceding line 16:34:27 10 goto 20 -> nop 20 ... 16:34:31 you need goto and nop there 16:34:36 that's two more non-swap primitives 16:34:42 yes 16:34:44 i want to bake the computation into the swapping, somehow 16:34:49 well, nop is easily represented by 0 commands 16:34:56 just replace a command with nothing 16:35:02 ah 16:35:02 yes 16:35:09 that might be a little hard to reverse, but I'm sure there's a way 16:35:23 as for goto, you need some way not to fall off the end of the program 16:35:24 then with one more operator: "current remapped value of" 16:35:26 we could do: 16:36:11 ^10;^20/.^20;stuff. 16:36:15 ^ is the current value of 16:36:19 on its own in a statement, does nothing 16:36:21 so we use it as line numbers 16:36:25 ehird: what about ///? 16:36:28 . is statement terminator, ; is subexpression terminator 16:36:29 your language is reminding me of that 16:36:35 problem is, it just cancels out the ^20 16:36:36 not the stuff 16:36:39 so: 16:36:52 ^10;[^20;?]/.^20;stuff. 16:36:59 erases the ^20 line 16:37:01 more spacious: 16:37:10 ^10; [^20; ?] / . 16:37:12 ^20; stuff. 16:37:28 pretty sure that's tc. 16:37:48 the RHS of / is evaluated ofc 16:38:41 ^10; [20;?] / ^[10;?]. 16:38:41 ^20. 16:38:44 I think that's an imnp 16:38:45 imp 16:38:46 not sure 16:38:48 hmm 16:38:50 no 16:38:53 you can't use ? in a [] ofc 16:41:13 He's not here, but I'm sure that message will find him eventually. 16:41:21 LIES 16:42:09 I forgot what I was doing. :( 16:42:19 Area-preserving affine transformations preserve both of these. 16:42:46 Hey! 16:42:50 what they do not preserve, however, are rectangles not aligned with the ellipse axes 16:43:08 What was I doing, ais523? 16:43:13 area-preserving affine transformations are rotations, reflections, translations, enlargements in one direction combined with an equal contraction in the other direction, shears... 16:43:19 and lots of others, I expect 16:43:26 ehird: inventing an INTERCAL/Forte hybrid 16:43:41 No, no, I lost interest in that about half way through and returned to my previous doings, which was X. 16:43:43 What is X? 16:44:00 you were discussing GreyKnight before that 16:44:23 oerjan: but those are trivial to enlarge. 16:44:35 So we can ignore those. 16:44:39 kerlo: they are? 16:44:53 Yes. Just rotate and enlarge them. 16:45:06 ais523: Yeah, well, I didn't actually tell this channel. 16:45:08 um no... 16:45:18 ehird: how am I meant to guess, then? 16:45:28 ais523: I find it likely that those are the only area-preserving affine transformations. 16:45:29 Telepathy. 16:45:39 sorry, I'm fresh out of floating eye corpses 16:46:00 kerlo: well, combinations of those are clearly also area-preserving affine transformations 16:46:02 you cannot rotate in an ellipse 16:46:39 you have to change into a circle first, which destroys rectangles 16:47:25 of course i find it unlikely that a largest rectangle would _not_ be aligned with the axes, but it needs proof 16:52:16 gcc -E $* 16:52:20 Pop quiz: Spot the fuck up. 16:53:26 something to do with quoting? 16:53:39 Nope, gcc will ignore non-.c files as "linker input" 16:53:55 KICK ASS OR WHAT?!?!? 16:54:24 that's fixable 16:54:24 -x c 16:54:33 I'm just doing /usr/bin/cpp -no-traditional-cpp $* 16:55:20 -x c is a nice trick to know anyway 16:55:38 * ais523 glares at paste.eso-std.org 16:55:50 wait, eso-std.org exists again? 16:56:25 WAIT WHAT THE FUCK, /usr/bin/cpp is a SHELL SCRIPT 16:56:28 that-is-not-right 16:56:32 # Transitional front end to CCCP to make it behave like (Reiser) CCP: 16:56:33 # specifies -traditional 16:56:34 # doesn't search gcc-include 16:56:36 # 16:56:38 # Copyright (c) 1990 The Regents of the University of California. 16:56:40 # All rights reserved. 16:56:43 hm apparently not 16:56:44 ha ha ha ha ha ha ha ha ha ha ha ha what the flying fck 16:56:45 *fuck 16:56:53 ais523: That's not right, is it. 16:57:32 *Something* has shat all over my /usr/bin/cpp, methinks. 16:57:57 ...nope, that's /Developer/usr/bin/cpp 16:58:11 ehird: they're trying to make it a killer app, i see 16:59:14 * oerjan is expecting bodily harm just about now 16:59:18 -!- ais523_ has joined. 16:59:27 oerjan: you can do whatever you want in an ellipse. 16:59:50 If you have a rectangle in an ellipse and their axes are aligned, that rectangle's corners do not all lie on the ellipse. 16:59:53 * oerjan swats kerlo -----### 16:59:58 #!/bin/sh 16:59:58 # apple's cpp is broken... 16:59:59 # Update 2009-03-04: FUCK YOU APPLE PIECES OF SHIT 17:00:02 The evolution of a file header. 17:00:18 It works now. How unexpected. 17:00:32 It's easy enough to rotate a rectangle such that its two corners remain on the ellipse; you just have to scale it at the same time. 17:00:40 kerlo: by aligned i mean simply in direction 17:01:11 -!- ais523 has quit (Nick collision from services.). 17:01:14 -!- ais523_ has changed nick to ais523. 17:02:03 Me too. 17:02:03 kerlo: while preserving area? 17:02:33 kerlo: oh wait you were missing a "not" 17:02:38 or so i think 17:02:59 Not while preserving area, no. 17:03:28 What I'm saying is that the biggest rectangle you can fit in an ellipse is aligne with the ellipse. 17:03:42 kerlo: needs proof 17:04:30 well clearly that's the beautiful answer you'd expect. 17:04:49 so why prove it and risk ruining it 17:04:53 Suppose you have a rectangle that is in an ellipse and not aligned with the ellipse. It is possible to rotate the rectangle so that it is aligned with the elipse; upon doing so, it will be possible to make the rectangle bigger while remaining in the ellipse. Contradiction. Q.E.D. 17:05:02 err 17:05:05 where's the proof :D 17:05:29 kerlo: it's the remaining in the ellipse part that needs some proof 17:06:06 You prove it, then. :-P 17:06:12 too lazy :D 17:06:20 oerjan: adding enough formality will prove anything. 17:06:34 kerlo: um, unwrap definitions and you'll probably have it directly 17:06:53 That's nice. 17:07:08 i am assuming it would require some length calculations or something 17:07:30 basically you calculate the expression of the rectangle's area and find the zero of the derivative, prolly. 17:08:00 and by that expression i mean f(x) : angle -> area 17:08:11 which may not be hard, but rather diminishes the elegance of transforming to a circle afterwards 17:08:31 well i have no idea about context, i just found kerlo's statement funny :P 17:08:37 and now i need to go do a shoppe! 17:09:02 oklopol: just don't get caught 17:09:58 onion rings! 17:10:01 !!! 17:10:02 -> 17:10:33 -!- ais523 has quit (Read error: 104 (Connection reset by peer)). 17:10:39 How do you trap overflow on x86? 17:10:47 when onion rings, don't answer 17:11:37 -!- ais523 has joined. 17:11:41 hi ais523 17:11:45 i don't suppose you would know: 17:11:46 How do you trap overflow on x86? 17:11:54 I don't know offhand 17:12:05 but based on my experiences of x86, I'd guess "with difficulty" 17:12:05 can you even do it? 17:19:26 I wonder how to allocate huge things (1gb) on the stack with alloca 17:19:38 probably you can't, is the stack that big? 17:20:03 i guess not. 17:20:24 wow, my malloc() returns surprisingly clean results. like 0x200000 17:21:42 ais523: is there any way to expand the stack? 17:21:47 depends on the OS 17:22:01 bsd 17:22:03 you need to map in more memory in the address space it expands into 17:22:13 and I don't know whether that's possible or not on BSD 17:22:15 nor how 17:22:23 hmm... are you working on that INTERCAL VM? 17:22:31 it sounds like it, based on what you're saying 17:22:31 not right now 17:24:04 Tom Duff. 17:24:19 he did quite a bit on the wiki on esolang history iirc 17:24:58 writing about pre-INTERCAL esolangs, IIRC 17:31:44 ais523: so, how do you do it in linux? 17:32:07 I don't know that either 17:32:11 :< 17:44:56 hm synchronicity 17:45:08 oerjan: itym coincidence 17:45:12 Grey Knight is on wp Did you Know 17:45:18 whatev 17:45:31 *knight 17:45:37 ha 17:46:08 -!- ais523 has quit (Read error: 60 (Operation timed out)). 17:48:07 oh and the third one is about broken femurs, which were _also_ mentioned in the channel logs today :D 17:48:39 -!- ais523 has joined. 17:49:04 "The first time I saw a program written in Forth, I thought the developer was just making up the language as he went along. Then I discovered that he was." 17:49:09 — reddit 17:49:15 haha 17:50:02 that would apply to any language suitable for DSELs... 17:50:03 ( http://www.reddit.com/r/programming/comments/8210z/forth_is_a_program_that_interfaces_keyboards_with/ ) 17:50:14 er, EDSL? 17:50:21 ESDLs 17:50:22 but no 17:50:23 forth is more fluid 17:50:24 same difference 17:50:32 you can't get rid of lisp's parentheses, but you can turn forth into anything 17:50:51 sure you can get rid of lisp's parentheses 17:50:58 not in r5rs. 17:50:59 (interpret-my-language "................................................") 17:51:05 that is not extending the language. 17:51:07 that's not embedded. 17:51:53 it's embedded in a sense, you could call stuff from the outer scope from in there 17:52:01 no, it's really not. 17:52:06 hm the french term would have LSD in it, i'm sure 17:53:25 Is there a sensible and generally accepted definition for what exactly a DSEL is anyway 17:53:49 your put lol 17:54:31 ehird: er? 17:54:43 I meant to say your butt lol. 17:54:46 -!- ais523 has quit (Read error: 60 (Operation timed out)). 17:55:09 -!- ais523 has joined. 17:56:04 ehird: ESDL gives all sorts of other meanings 17:56:17 i meant EDSL 17:56:44 oh that actually gives a hit 17:56:46 DSEL is a buzzword 17:57:04 although there are still other meanings 17:57:10 it means, "I'm too cool for things like OOP but I still want my own acronyms" 17:57:58 oh DSEL is also defined 17:58:28 ITCFTLOBISWMOA? 17:58:33 it's short for "acronym we cannot decide on the ordering of" 17:58:47 AWCDOTOO sounds interesting, actually 17:59:11 * ais523 wonders what language-specific embedded domains are 18:00:14 bah the french term for domain specific language is "Langage dédié" 18:00:46 clearly someone censored the s part 18:08:35 interesting 18:09:56 -!- jix_ has joined. 18:13:05 -!- M0ny has quit ("Quit"). 18:15:19 -!- ais523 has quit (Read error: 104 (Connection reset by peer)). 18:23:12 -!- jix has quit (Read error: 110 (Connection timed out)). 18:38:53 -!- jix_ has quit (Read error: 60 (Operation timed out)). 18:42:55 -!- jix has joined. 19:05:21 hi Deewiant 19:05:47 yello 19:05:52 hah 19:06:18 Deewiant, see the comments I made directed at you during the past few weeks but that you never responded to 19:06:38 there was nothing worth responding to :-P 19:06:46 yay, cfunge almost runs on BSD, or something 19:06:48 what should I say to that 19:10:20 -!- ais523 has joined. 19:11:46 FILE lacks a way to truncate files: yes, it does, complain to mike if you feel something should be done 19:11:57 nothing else, I guess 19:18:50 http://drplokta.livejournal.com/109267.html 19:18:52 -!- jix_ has joined. 19:33:10 -!- jix has quit (Read error: 113 (No route to host)). 19:42:36 -!- olsner has joined. 19:50:38 so! 19:50:41 I'm writing a Forth in JS. 19:50:48 Badly suited, you say? Quite so my good chap! 19:51:40 badly suited for forth, forsooth 19:52:36 ais523 did a lot of interpreters in JS, I imagine he'd like it 19:53:06 that's because JS is a good lang for quick throwaway programs that you can easily show to other people 19:53:11 most people have a JS interp on them 19:53:21 also, it's by far my favourite lang for programming in on public terminals 19:53:30 * oerjan picks his nose and pulls out a JS interp 19:54:07 'snot what you think, honestly 19:54:48 >_< 19:55:06 i blame picasso 19:59:31 * FireFly likes JS 19:59:58 -!- jix has joined. 20:01:30 hmm 20:01:50 * oerjan likes swatting FireFly -----### 20:01:58 * FireFly dislikes swatters 20:02:18 Is that a swat I see, or what? 20:02:26 * oerjan confuses FireFly by making a JS swatter 20:02:32 :| 20:02:51 -!- jix_ has quit (Read error: 145 (Connection timed out)). 20:06:38 -!- jix has quit (Read error: 60 (Operation timed out)). 20:07:29 hmm 20:07:37 how big should my stack/heap/dictionary be, I wonder. 20:07:46 well, return stack can be smaller than data stack 20:07:52 i onl yhave 64mb to work with here 20:08:04 dictionary will probably be tiny, let's say 5MB 20:08:05 why not more 20:08:14 Deewiant: you can't allocate too much with JS 20:08:16 it just fails silently 20:08:29 Surely that depends on your interpreter 20:08:33 well, duh 20:08:36 I'm running it in a browser 20:08:50 Ah, that'd explain it now wouldn't it :-P 20:08:57 Consider not doing so 20:09:12 no, that's the whole point 20:09:22 Okay, fine then 20:11:56 dictionary 8MB 20:11:57 return stack 8MB 20:11:58 data stack 16MB 20:12:00 heap 32MB 20:12:02 seems reasonable to me 20:15:03 -!- clog has quit (^C). 20:15:03 -!- clog has quit (ended). 20:15:14 -!- clog has joined. 20:15:14 -!- clog has joined. 20:15:21 ... clog just got ^C'd? 20:15:23 wtf bbq 20:15:29 nef is ALIVE?! 20:15:47 Should he be dead? 20:16:04 I haven't heard anything about him later than 2004 20:16:57 20:16 ehird: I was starting to think clog was running totally autonomously there for a few years ... 20:16:57 20:16 nef: it was 20:20:42 and he's offline again 20:20:45 *poof* 20:26:28 which channel was that 20:41:11 -!- Hiato1 has quit (Connection timed out). 20:57:23 lament: /mag 20:57:26 /msg 21:06:27 Grah, nul-terminated strings are so stupid. 21:08:14 a bit too granular 21:11:06 was that a pun 21:11:21 well, do you think it was groanular? 21:12:23 'Nantero built a functioning carbon nanotube memory prototype 10 GB (10 × 230 bytes) array in 2004." 21:12:26 why did nobody tell me about this 21:12:31 i want one, now 21:15:54 hmm 21:16:03 why is memory measured in bytes if you address words with it 21:16:05 that's just ridiculous. 21:17:50 -!- oerjan has quit ("The time travelers said we should try to delay ehird finding it out as long as possible"). 21:18:06 no seriously, maybe ais523 knows. 21:18:36 it's for advertising / comparison purpose 21:18:46 people doing that sort of thing use inappropriate units just because of inertia 21:18:52 if everyone's using units, so do you 21:18:55 mm 21:19:02 i just, stupidly, did this: 21:19:04 var mm = new Array(8388608); // 8MB 21:19:07 spot the bug 21:19:34 hmm... did you get the number wrong? 21:19:42 or are arrays not declared like that 21:19:46 wow, my javascript's got rusty 21:19:55 ais523: memory is an array of words 21:20:01 8388608 is 8MB measured in _bytes_ 21:20:05 aha 21:20:14 well, javascript arrays auto-extend anyway 21:20:23 yes, but in this case I'm trying to pre-allocate the whole heap 21:20:24 so the bug won't be noticeable except in making things slightly less efficient 21:20:26 ais523: and that -over- allocates 21:20:39 new Array(4194304) // this is correct 21:21:17 err, no 21:21:22 2097152 21:21:23 ofc 21:25:33 Well, it's not like we can know your word size here. 21:25:42 it's a VM 21:25:46 so 32-bit, so 4 bytes 21:26:34 I don't think "VM" implies "32-bit". 21:27:01 I know it doesn't! 21:27:08 * kerlo writes a 31-bit Subleq interpreter 21:28:06 fizzie: I mean 21:28:09 "your word size" 21:28:11 I control the word size 21:28:24 Yes, and we can't know what you control it to. 21:28:26 The "so" in 32-bit is still misplaced 21:28:57 -!- tombom has quit (Client Quit). 21:30:18 I think C would be a very appropriate language for a Subleq interpreter. 21:30:39 No, Forth. 21:30:57 All you do is allocate a chunk of memory and then use pointers. 21:31:04 -!- jix has joined. 21:31:07 Forth cuts out the allocation step. 21:32:36 Bonus: Let the Subleq programs refer to the locations of C functions, the stack, and so on. 21:32:55 Forth gives you that for free. 21:33:22 Is there anything Forth can't do? 21:35:16 kerlo: Make you toast. 21:35:32 But, yeah, if you just use @ and ! you get the native machine/Forth memory. 21:44:31 -!- atrapado has joined. 21:45:37 ' 21:48:57 heh, turns out that incredibly terrible fail of mine was 87.5 percent :P 21:49:20 oklopol: lol 21:49:30 oklopol: still angry about it? :P 21:50:52 how could i not be angry about having 3 out of 41 ppl get a better score than me! 21:51:14 87% would still count as 5/5 though right 21:51:54 i think so. 21:55:17 -!- jix has quit ("..."). 22:27:17 -!- comexk has joined. 22:27:46 So, anyone know how I can find out the CPU cache size and whether all my code will fit into it? 22:28:45 it'll be on the datasheet for processors, which you should be able to get from the manufacturer, most give them away free 22:28:56 comexk: are you optimizing Bayes? 22:28:58 I'm not sure if there's a way to work it out from the OS itself 22:29:31 not some embedded system, a nice big core 2 :p 22:29:41 what are you trying to do 22:29:56 you see, I got an assignment in java class to make a Morse Code translator as efficient as possible 22:30:09 erm, the whole JVM would have to fit into the cache, then 22:30:14 after I decided I couldn't make it fast enough in java, I used JNI to implement it in C 22:30:27 I suspect you'll get deducted marks for that... 22:30:32 hey, it's java 22:30:32 anyway 22:30:35 "as efficient as possible" is something you shouldn't say within range of an esoprogrammer 22:30:41 ais523: except that's what I mean 22:30:52 though I don't want to write it in assembly (and I doubt I would gain much from that) 22:30:54 comexk: is there any way to do Java with inline asm? 22:30:59 there's definitely no standard or sane way 22:31:03 but surely there must be some way 22:31:03 ais523: he's using JNI 22:31:05 actually, there is a standard and a sane way 22:31:08 that's just C<->Java interface 22:31:11 he's writing it in C 22:31:12 ah 22:31:13 then binding it to java 22:31:16 and claiming it's java 22:31:25 I thought he was writing in java and compiling to C, and claiming it was java 22:31:27 thus getting his answer marked as wrong... 22:32:05 naah 22:32:13 any sane grader will mark it correct 22:32:14 's what I would do 22:32:27 it can be called from a java class just like any java code 22:32:28 ANYWAY 22:32:29 don't care 22:32:31 did they state which java implementation had to be used? 22:32:32 I want to optimize the c 22:32:45 using gcj rather than the jvm should save you a lot of time if you write the code to be properly optimisable 22:32:48 "How can you optimize this Python application?" "I rewrote it all in C then bound the main to python, so now it looks like this: app.main()" 22:32:51 "Uh, no." 22:32:52 and only do things that translate easily into C 22:32:59 ehird: ever heard of cython? 22:33:12 comexk: considering I told you about cython... 22:33:15 plus, cython isn't python 22:33:16 ais523: really, it compiles to native code? 22:33:20 its an extension of python 22:33:22 ehird: point 22:33:26 I used it recently 22:33:29 comexk: yep 22:33:32 the native python MutableString implementation is hellslow 22:33:45 ais523: I'm using JNI because I want efficiency. That's that. 22:33:45 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 22:34:00 -!- oklopol has joined. 22:34:03 ...because it allocates a new string every time your string is modified 22:34:45 comexk: so use a list 22:34:59 ehird: and have a PyObject for every character in the string!? 22:35:08 why are you using python 22:35:10 naah, that was a perfect use case for Cython, which worked pretty well 22:35:10 just code it all in C 22:35:16 massive speed increase 22:35:23 as in, 20 minutes --> 20 seconds 22:35:30 (it used mutalestrings a lot) 22:35:34 if you're writing in python and want a speed increase, start by rewriting the python interpreter because it's a shit naive bytecode interpreter 22:35:47 ehird: good point, people do that, too bad nob ody's actually made a good python interpreter 22:35:58 although 20 seconds is with psyco.full() 22:36:05 but the code isn't optimized for speed 22:36:09 the python is fairly naive 22:36:17 python itself does not lend itself to efficiency 22:36:33 yeah, but you can, e.g., not create massive amounts of objects 22:36:57 if you want to write in a HLL and get blazing efficiency, i'd use Scheme + Stalin 22:37:19 In a number of tests it has outperformed hand-written C, sometimes by a considerable margin. 22:37:22 hmm 22:37:32 well 22:37:32 http://pastie.org/407681 22:37:33 or rather Ponzi, which would be like stalin without the huge limitations but I haven't written it yet. 22:37:44 tell me how that can be improved 22:37:46 comexk: that's not optimized! 22:37:48 use a lookup table 22:38:12 ehird: what would that do 22:38:18 be fast. 22:38:23 lookup table of what? 22:38:24 hashes? 22:38:29 that would be slower 22:38:33 no 22:38:33 listen 22:38:41 * comexk listens 22:38:42 comexk: key them by integers: a machine word can store 4 characters on a 32 bit machine 22:38:44 presumably because the Scheme programs are written better than the C-by-hand would be 22:38:51 you can actually do that 22:38:56 and compare them natively 22:39:01 with no overhead 22:39:07 hey, that's a good idea 22:39:09 lemme find the article showing how 22:39:24 forgot about that -_- 22:39:40 comexk: the binary if/else if thing is slow in practice because modern processors are really quite bad at jumps compared to everything else 22:39:50 comexk: http://www.stdlib.net/~colmmacc/2009/03/01/optimising-strlen/ 22:39:54 see "Method 4: word-wise checks" 22:39:57 and the glibc code it links to 22:40:08 from that, you should be able to make an insanely fast lookup table version 22:40:10 I've sen hellishly complex implementations of, say, memcpy 22:40:42 well, on some processors, the best known memcpy implementation in asm is duff's device and copying 4 or 8 bytes at a time 22:40:44 which is pretty complex 22:40:56 ais523: on ARM I've seen 22:41:02 first, try to use load multiple instructions to copy like 8 bytes at a time 22:41:05 then copy words 22:41:06 then copy bytes 22:41:09 haha 22:41:15 and I had to disassemb le the function and see what it did 22:41:17 :p 22:41:51 but yah, lookup table (nest them if you have keys longer than 4 bytes on 32-bit or 8 on 64-bit, ofc) of word-sized chunks of the string 22:41:53 == insanely fast 22:42:01 I don't know, are you sure that's faster? you'd have to check every combination linearly 22:42:06 err, no 22:42:08 what do you mean lookup table 22:42:09 lookup table 22:42:24 luckily, all morse code characters fit in 32 bits 22:42:24 but 22:42:32 comexk: a hash table, but indexed with machine words 22:42:34 not hashes 22:42:37 though that runs into endian issues 22:42:37 comexk: also, mayhaps operate on java Strings, not char* 22:42:45 to avoid the conversion overhead 22:43:32 ehird: are you sure a hash table with only 26 entries would be faster than branching? 22:43:47 not hash table 22:43:51 you're not running any hash functions 22:43:52 not hash table 22:43:54 I know 22:43:59 you're indexing on *((int *)str) 22:44:04 but that requires memory loads 22:44:10 doing it directly as in the pastie doesn't 22:44:15 comexk: processors are terrible at branching. 22:44:20 also, yours accesses memory 22:44:23 s[0], s[1], s[2], ... 22:44:28 at least this does one access 22:44:30 yours does tons 22:45:12 ehird: only as many as necessary, but I meant you would have to access the table from memory 22:45:23 store it as a constant, static array 22:45:27 then it'll go into the object file 22:45:31 that doesn't make it not memory... 22:45:52 comexk: a memory load on a bit of memory that was in cache anyway is really quite fast 22:46:11 so the well-known trick is to store your lookup table in the same bit of memory in the program that's running 22:46:25 you can do that by using inline asm for dat commands 22:46:49 ehird: what I'm suggesting is your method but slightly more insane, it's a special case of your method 22:46:54 that and casting bytes to ints limit me to i386 but that's okay I guess 22:47:04 ais523: yes, but I'd try mine first 22:47:05 then go to asm 22:47:06 it makes me nervous, since this is supposed to be portable java 22:47:15 comexk: you failed by doing it in C anyway 22:47:18 but I guess there could be a pure c fallback 22:47:18 also, you can be portable. 22:47:21 ehird: c is portable 22:47:23 ehird: endian 22:47:24 what's not portable about *((int*)s) 22:47:24 well, dat commands are relatively portable between architectures 22:47:30 ehird: endian 22:47:36 comexk: so, in you lookup table do 22:47:44 *((int*)".-.-") 22:47:47 instead of 3485783457345 22:47:52 (in the literal) 22:47:52 -!- atrapado has quit ("Abandonando"). 22:47:57 does that actually work? 22:48:02 why not 22:48:21 comexk: you'll probably have to nest the tables 22:48:27 since there are morse code patterns longer than 4 bytes, right? 22:48:42 no 22:48:46 oh 22:48:50 then that'll work fine 22:48:52 as I said, it's well suited for that 22:48:55 although 64-bit processors 22:49:04 only problem is that 22:49:07 what if you have 22:49:09 the longest morse code pattern is 5 dots+dashes 22:49:14 ais523: agh 22:49:16 ais523: really? which one 22:49:16 one off 22:49:20 comexk: 5 22:49:28 letters only. 22:49:34 but notice that a dot/dash needn't store an entire byte 22:49:53 but there is a problem with a lookup table 22:50:01 if your letter is E 22:50:03 you might have 22:50:05 ". --" 22:50:07 ". . " 22:50:09 ". .." 22:50:10 etc 22:50:21 comexk: well, you know the string length ,right? 22:50:24 it's a java String 22:50:28 so getting the length is O(1) 22:50:35 yes, but there are multiple letters 22:50:35 then, just do 22:50:37 separated by spaces 22:50:38 (>>4)<<4 22:50:43 or w/e 22:50:47 so you get 0s instead of the rest 22:50:48 before lookup 22:50:52 ehird: but some patterns are 4 characters 22:50:57 comexk: and? 22:51:09 so length has nothing to do with it 22:51:11 I have to find the space 22:51:21 but I'm doing that anyway 22:51:22 so fine 22:51:23 I'll do that 22:51:40 err 22:51:41 other thing is 22:51:46 if you find the space then there's no reason to do this 22:51:46 I'm doing a binary search, aren't I? 22:51:52 because that's inefficient 22:51:57 *((char *) is portable but they wouldn't be in order in a different endian 22:52:04 s/char/int/ 22:52:07 ehird:? 22:52:10 yeah 22:52:14 and that's why you don't put any endian-specific constants in 22:52:18 i don't think you "get" this 22:52:26 ehird: the idea would be to have it pre-sorted 22:52:35 so I don't have to go through the table linearly 22:52:48 I've written efficient morse decoders before 22:52:51 well, let's try it 22:53:04 the trick is to start with 1, and double every character you encounter, adding one if it's a dash not a dot 22:53:04 comexk: ... 22:53:07 there is no table 22:53:09 just an array 22:53:15 and use the total as an index into an array that retrieves your character 22:53:21 you calculate all the values in words for the dotdashes 22:53:26 then modulo them all 26 22:53:30 and store them in an array, without the key 22:53:34 just the value 22:53:43 ehird: what do you mean by "value" here? 22:53:54 the resulting letter 22:54:07 ehird: hmm? 22:54:12 like, static const char foo[] = "ZCBAFU..."; 22:54:17 my value might be very big, I can't have the _word_ as an index 22:54:30 yeah, and then I have another array of the words 22:54:42 ais523's suggestion might be faster 22:54:44 do you know what a word is 22:54:44 x_x 22:54:57 ehird: four bytes, or two bytes sometimes 22:55:03 or eight sometimes :p 22:55:10 i'm really starting to doubt you actually understand the algorithm I'm trying to explain 22:55:15 ehird: 22:55:22 comexk: 22:55:28 u32[] keys 22:55:30 char[] values 22:55:34 look up in keys, use the index into values 22:55:40 if that's not it, you're not explaining clearly enough 22:55:41 ... 22:55:43 fuck no. 22:55:54 then be clearer 22:55:57 damn, I just wasted like 15 minutes attempting to explain that. have fun 22:56:24 I don't think you know what you're talking about 22:56:41 remind me not to try and help you again 22:57:25 *sigh* 22:57:46 so hey, anyone want help that can understand english & technical terms and doesn't tell me I don't know what i'm talking about when they don't understand? 22:57:57 ehird: sure 22:58:05 excellent. how can I help you today. 22:58:50 ehird: Я буду играть на прослушивании в следующий вторник, как мне лучше подготовится? 22:58:55 yes. 22:59:12 if the question was, "are you fat?", no. 22:59:28 ah, nice 23:00:41 -!- Slereah_ has quit (Read error: 60 (Operation timed out)). 23:01:30 Hm 23:03:28 -!- Slereah has joined. 23:06:39 so ais523, what were you saying about inline data? 23:06:51 it depended on my idea. 23:06:54 which you've rejected 23:07:00 if so, I support your idea 23:07:09 I merely think you failed to explain it clearly 23:07:12 well, the idea's you have an array with the possible translations 23:07:20 a char array, probably 23:07:22 comexk: you know how a hash table works? 23:07:29 you work out a mathematical value from each dot-dash string 23:07:32 it's an array, where [hash%size] 23:07:34 is the value 23:07:36 now, do the same 23:07:39 but with 23:07:40 ehird: this is not exactly a hash table 23:07:44 ais523: i know 23:07:46 definitely you don't want %26 23:07:48 i'm explaining it to him 23:07:51 also, yes you do... 23:07:54 you don't want %anything, in fact, you want a perfect hash 23:07:54 otherwise your array is huge 23:07:57 no you don't, because you will have duplicates 23:07:59 ehird: 64 bytes? 23:07:59 it is perfect 23:08:01 however, I tested and %59 works 23:08:02 I wouldn't call that huge 23:08:06 well, fine 23:08:08 that isn't what i meant 23:08:20 comexk: dividing by 59 is rather slow on a modern computer compared to other operations, apart from jumps 23:08:35 ais523: really? so I would be better off with an evener number? 23:08:36 use >> 23:08:40 power of 2 23:08:53 the thing is 23:08:55 it's not a perfect hash 23:08:56 it's not a hash 23:09:02 it's the literal char data interpreted as a word 23:09:24 it is a hash, per the definition of hash, it's just that it's a hash that doesn't contain a modulo interpretation whereas most do 23:09:28 ehird: oh, I wasn't doing it like that 23:09:34 ais523: that's the whole idea 23:09:37 you skip the hashing step 23:09:40 and just do *((int*)s) 23:09:45 that's the whole key to why it's so fast 23:09:48 I was unrolled-looping over each character in the input 23:09:57 oh god unrolled 23:09:58 yeah, that's entirely missing the point 23:09:59 add, shift, add, shift, etc 23:10:04 that is different from your method 23:10:06 yeah, that's not what I'm doing 23:10:07 but it may be faster 23:10:07 *((int*)s) reduces it to one memory read 23:10:20 5 adds and 4 shifts is 9 memory reads not 1, I agree 23:10:28 on the other hand, I think 9 reads are faster than 1 integer divid 23:10:29 ehird: yeah, so I have an int corresponding to four bytes, and unique codes correspond to unique values 23:10:30 *divide 23:10:33 ehird: now what 23:10:35 ais523: yes, but not >> 23:10:43 heh, that's the trick 23:10:47 you don't do a <<= 1; 23:10:48 so (*((int*)s))>>foo 23:10:49 you do a += a; 23:10:52 and a will be in a register 23:10:56 that's a one-cycle instruction 23:11:05 how does that help moduloing it 23:11:13 we're trying to fit it into a non-huge table 23:11:14 you don't modulo, the numbers this way never end up more than 64 23:11:16 problem is, I can't modulo by a power of two because then it'll just depend on the first bytesish 23:11:19 so you just have a 64-element table 23:11:26 ais523: is that really faster than one modulo? 23:11:32 ais523: well, does it use the (int*)s trick? 23:11:36 ehird: no 23:11:38 -!- Judofyr has quit (Remote closed the connection). 23:11:39 it should 23:11:46 why? that would make the numbers much too large 23:11:51 i'm relatively certain (75%) it'd be faster 23:11:56 ais523: so reduce them 23:11:59 ais523: 23:12:02 if you preferred, you could use the int* trick then /multiply/ by a large number 23:12:03 is that faster than a single modulo? 23:12:07 maybe I can use a multiplication trick 23:12:10 ais523: ah, that'd be best 23:12:10 that shifted all the bits to the bottom end of the number 23:12:18 I think repeated addition on bits may still be faster 23:12:18 (*(int*)s)< I think some compilers will do that automatically 23:12:35 ehird: what will that achieve, you just get one of the bytes 23:12:37 gcc will if you happen to divide by a constant that can be converted by that 23:12:52 so I'll do a - a/b instead of a%b 23:13:01 but how do I get a constant I know can be converted by that, 23:13:09 (*(int*)s) 23:13:15 ehird: only if I have 4gb of memory 23:13:24 maybe what I'm saying would make more sense if you actually listened. 23:13:27 k 23:14:18 ehird: I just looked it up, on a pentium 3 a single 32-bit divide is 39 cycles, although you can run other commands in parallel with it; an addition is 1 but ties up all 4 ports, so you can't run things in parallel with it 23:14:22 let me try to find multiply 23:14:29 4 cycles 23:14:31 i said bitshift 23:14:32 not divide 23:14:32 ewwww, 39 cycles 23:14:37 well, multiplication beats division hollow, that's for one 23:14:39 because they're the sam damn thing on powers of 2 23:14:46 and I can tell you like hell it won't take 39 cycles 23:15:35 well, how does your bitshift work 23:15:41 to get things into the hash table order? 23:15:47 can you do that in a single bitshift? 23:16:02 also, a complication for both methods: - is different from -. is different from -- 23:16:06 so you need to handle EOF, somehow 23:16:10 ... 23:16:11 dude. 23:16:14 I covered that _an hour ago_ 23:16:15 ais523: so how do I manually find a constant to multiply by 23:16:22 am I fucking speaking in spanish or something?? 23:16:23 ehird: well, I didn't understand either 23:16:36 comexk: modular division 23:17:53 ais523: ? 23:18:18 comexk: basically, you know how if a * b = c, then c / b = a? 23:18:26 modular division is defined the same way, but with modulos involved 23:18:53 so modulo 11, for instance, 8 times 9 is 72 which is 6, so 6 divided by 9 is 8 23:19:07 it always works with prime modulos, but in this case the modulo is a power of 2 and so not prime 23:19:12 and the result is it /sometimes/ works, but not always 23:19:24 ais523: how do I calculate that other than brute force? :p 23:19:27 however, because we can mask away high bits, it's probably possible to find a situation that works 23:19:33 In what language? 23:19:46 FireFly: "Java" which is a thin wrapper around C 23:19:55 no, precomputed pls 23:20:14 comexk: I'm pretty sure there's a non-brute-force way to do it, I just can't remember what it is offhand 23:20:51 nearly all the modular divisions I've come across were simple enough to spot via pencil and paper 23:21:03 the only modular division I've come across is AAA :p 23:22:17 comexk: yep 23:22:22 and it's pretty confusing there 23:22:36 anyway, gcc can often optimise a division into a multiplication, so presumably it knows the algorithms for calculating these things 23:23:15 yeah but I can change my divisor depending on what's convenient 23:23:17 gcc odesn't know that 23:25:14 the trick I think is to write the code you mean, then keep tweaking it until gcc optimises it into something efficient 23:25:46 sounds boring 23:25:47 :p 23:25:58 well, I've done it before on a serious project 23:26:11 that was insanely time-critical, there were parts of it I was trying to get down to under 10 cycles 23:26:28 wait, so what am I trying to do 23:26:36 find the inverse of whatever i'm dividing by? 23:26:53 it's do to with wraparound 23:27:01 what form's the input in, anyway? 23:27:04 dots and dashes 23:27:36 yeah 23:27:37 you want some factor you can multiply by so that the bottom 4 bits of the resulting number depend on whether there were dots or dashes in the corresponding bytes 23:27:59 actually, because you have bytes not bits as input, it's more complicated than just a division 23:28:11 masking first would make things simpler, but waste a cycle 23:29:39 what's the ascii code for dot and for dash, anyway? 23:29:49 45, 46 23:29:53 dash = 45 23:29:55 and what's the input if you have a morse code less than 4 bytes long? That's the really tricky bit 23:29:55 dot = 46 23:30:01 ... 23:30:14 ais523: I explained all this before... 23:30:21 how does that work, anyway 23:30:25 oops, missende 23:30:26 g=ig wekk 23:30:27 *oh well 23:30:31 fine, I'll get gcc to do it -_- 23:30:37 -!- olsner has quit ("Leaving"). 23:31:06 ah, just checked scrollback 23:31:19 your plan seems to be to bitshift away the extra characters using your known string length 23:31:51 well, that's the -essence- of it... 23:33:29 hmm... what's the x86 bitshift operator called, I don't think I ever used it 23:33:45 note that bitshifting by a value that isn't constant is inefficient on many microprocessors, but I can't remember offhand if x86 is one of them 23:34:00 also, you can save yourself one shift by not shifting back and just using the data at the new position 23:34:29 isn't it "bsl" 23:34:43 well that's just too logical 23:35:08 no, it isn't 23:35:16 why isn't this working -_- 23:35:21 at least, that's not in this list of opcode timings 23:35:26 ais523: i meant, that would be too logical 23:35:37 for x86? I see what you mean 23:36:40 http://upload.wikimedia.org/wikipedia/commons/8/87/Prokudin-Gorskii-12.jpg that's some remarkable uality for 1915 23:36:52 ok, it seems it's a weird x86ism 23:36:55 the command's shl 23:36:56 by which I mean, holy shit that's amazing 23:37:02 ais523: SHift Left 23:37:05 and it takes 2 cycles even for a variable shift, but only if the shift amount is in register cl 23:37:16 the register cl thing is the x86ism I was talking about 23:38:09 y'know, the prof isn't even gonna test this code 23:38:15 I can almost guarantee it... 23:38:25 I care this much: 23:38:32 or he'll probably try and run it thru java... 23:38:33 :p 23:38:56 I like solving puzzles even useless ones 23:38:59 that's the point of the channel isn't it :p 23:39:04 yes P 23:39:05 :P 23:39:22 definitely 23:39:49 does anyone know how to tell if a particular floor tile has a particular type of item on it in Enigma scripting, by the way? 23:39:53 I decided to make an Enigma level 23:39:55 -!- FireFly has quit ("Later"). 23:40:00 doesn't it have docs? :P 23:40:04 yes 23:40:07 -!- BeholdMyGlory has quit (Remote closed the connection). 23:40:13 but I can't find a function that does that in the docs 23:40:21 nor any obvious way to simulate it with what's there 23:40:26 so it's a programming problem of its own 23:40:36 given a language which appears to be missing a feature, figure out how to simulate that feature 23:40:41 esolangers do that all the time... 23:48:32 * comexk looks at assembly 23:48:35 what the fuck is a calll doing in here 23:48:47 I guess it's used for speed somehow 23:49:24 well, there are no divide instructions 23:49:35 and a magic constant 23:49:43 so, although I don't really understand x86 I'm assuming it's using multiply magic 23:49:57 yet it's still not fast enough 23:50:10 a large magic constant for no apparent reason is nearly always gcc optimising a divide 23:50:25 here's my code: 23:50:26 http://pastie.org/407770 23:50:39 note the mask part, that looks slow but I don't know how to make it better 23:50:51 s2 = strchr(s2, ' '); 23:50:55 you're iterating through the string anyway 23:50:59 so all that magic is buying you approx. nil 23:51:13 ehird's idea was you could read the string length from java's internals 23:51:27 you can 23:51:29 it's not internals 23:51:31 it's just .length 23:51:33 trivial 23:51:38 pass it to your c function from the java side 23:51:46 yeah, i'll do that 23:51:57 ehird: what 23:51:59 it's not .length 23:52:04 spaces may be found anywhere in the string 23:52:13 ais523: ehird's idea was you could read the string length from java's internals 23:52:15 i was responding to that. 23:52:15 comexk: check to see what 1 << 32 is in gcc 23:52:24 ais523: ? 23:52:24 it's undefined behaviour in C itself 23:52:28 but I bet gcc defines it to something 23:52:31 how does that help? 23:52:32 you may be able to avoid the if that way 23:52:43 the mask would just be (1 << 32) - 1 23:52:48 which is 0xffffffff 23:52:51 if 1 << 32 is 0 23:53:02 so the if would become redundan 23:53:04 *redundan 23:53:07 *redundant 23:53:17 i.e. instead of the inside of the if not running, it runs and does nothing 23:53:20 no, it was screwing up without the if 23:53:26 ah, pity 23:53:36 probably bitshifting by 32 is undefined on x86 too... 23:54:03 actually 23:54:16 anyway, wouldn't that masking scheme confuse ..-. with .-.? 23:54:30 yeah 23:54:39 ais523: but the strchr is slow anyway... 23:54:41 ais523: hmm? 23:54:41 this is pointless 23:54:47 all it does is mask out any characters after the space 23:54:47 ehird 23:54:50 I HAVE to strchr 23:54:51 it defeats the point of the (int*) trick 23:54:55 I don't know where spaces are in the string beforehand 23:55:00 comexk: write your own strchr 23:55:03 that saves the int* as it goes along 23:55:16 uhh what would that get me? 23:55:19 other than a less optimized strchr 23:55:26 not duplicated work 23:55:30 well I'll use memchr to avoid the compare to zero 23:55:35 ehird: casting a pointer is not work 23:55:43 you don't understand. 23:56:17 actually, strchr is FASTER than memchr 23:56:31 ehird: it goes around and compares to a space, how do you intend I replicate that 23:56:49 make it operate on 4-byte chunks 23:56:51 using the int* trick 23:57:03 http://www.stdlib.net/~colmmacc/2009/03/01/optimising-strlen/ has a link to glibc's strlen which uses that trick 23:57:09 you can replicate it yourself 23:57:12 why? 23:57:14 not just use glibc's strchr 23:57:24 really I want a version that doesn't bother comparing to zero