00:09:32 -!- FireyFly has quit ("Reboot"). 00:11:58 fizzie: do you think I should write a simple math plotter thingy in qbasic, or will I go mad from the whole "parsing infix" thing? 00:12:08 09:51:34 my laptop is the brokenness now. :( 00:12:08 09:51:39 "was fun while it lasted". 00:12:10 09:52:08 although in retrospect ~1550eur was a bit much for a machine that worked for six days. 00:12:13 — 2004-09-23 00:12:41 I think that was the iBook. They (of course) warranty-replaced it. 00:13:28 ehird: Parsing infix isn't *that* bad. It is at least context-free... 00:13:49 pikhq: In QBasic. 00:14:17 Mooz, who used to be here around the beginning, wrote a really nice function-plotter, with a nice GUI and 3d-like buttons and everything, in QBasic. 00:14:35 11:58:08 mooz at least wrote a.. pretty advanced one, in qbasic. 00:14:35 operator parsing is simpler than general 00:14:40 Right after plotting discussion. 00:14:44 Kay, so that's slightly annoying. 00:14:48 Not hard, though. 00:14:49 ehird: Heh. Well, he did. 00:14:52 fizzie, if you're going to say something, think if I've already been on that trail ;-) 00:15:02 but my idea is basically a trivial input language, that is, 00:15:24 basic mathematical notation like sin(x) or whatever, then it'd prompt for a range for x, then you get a plot drawn in 10 minutes. 00:16:08 Oh, I also mentioned that it was a high-school exercise. (Although the exercise was just "plot polynomials", mooz's solution was the typical overkill one.) 00:16:32 2006-12-02:20:44:13 I remember longing for arrays when I coded in qbasic 00:16:33 they exist, dude. :P 00:16:43 What sort of coder *wouldn't* go for overkill (if time allows)? 00:16:59 I don't think I need to say anything any longer, since apparently I've already said it before. 00:17:09 2007-10-26:12:28:50 pset is the QBASIC name for the pixel-set function 00:17:10 no no no 00:17:16 it's POKE x+(y*w),col 00:17:18 slly. 00:17:24 fizzie: yeah you said so before 00:18:30 It's also (IIRC) faster, if you're plotting all pixels of the screen in a "for y = ... for x = ..." loop, to keep a incremented index p for the POKE and not recalculate x+(y*w) every time. Doesn't help for the generic pixel-setting case, of course. 00:19:01 I wonder how easy a voxel renderer would be in qbasic 00:19:01 so POKE is not arbitrary memory assignment? 00:19:07 oerjan: it is 00:19:07 It also might not be faster, since it's a whole basic statement to increment p. I did benchmark. 00:19:07 you do 00:19:09 oerjan: It... Is. 00:19:11 DEF SEG = &HA000 00:19:14 to get into graphics memory 00:19:20 so then all your POKEs are offsetted from the start of graphics memory 00:19:24 so POKE x+(y*w) works 00:19:26 oh 00:19:37 God, doing VGA from BASIC... 00:19:40 i wondered why you had no base offset 00:19:49 pikhq: What's odd about that? :P 00:19:53 The pointer taken by POKE is just the 16-bit intra-segment address. 00:19:55 x86 is silly. 00:19:56 I mean, it DID come with tons of drawing functions. 00:20:29 I still find it weird for a normal program to be doing anything to video memory. 00:20:33 aha so it's x86 specific 00:20:40 (and yes, I know that's how X does things) 00:21:07 DOS is x86 specific. 00:21:09 As far as I know. 00:21:12 oerjan: Yeah; x86 has the graphic memory mmaped at a few places... 00:22:29 ehird: Unless by "DOS" you mean "anything that was called a Disk Operating System". ;) 00:22:37 :P 00:22:45 ProDOS FTW. :p 00:22:49 Also, for full-screen thingies, LINE is really really fast. 00:22:53 On a x86 (but not a x86-64) Linux, you can cat /proc/iomem to see some of the mappings. 00:22:55 LINE (0,0)-(320,200),I,BF 00:22:58 fills the screen instantly 00:23:21 fizzie: I just did cat /proc/iomem on my x86_64 system. 00:23:26 fizzie: me too! 00:23:28 Seems to show all the mappings. 00:23:40 I wouldn't know what mappings there should be 00:23:51 My x86-64 system doesn't have those 000a0000 video-memory thingsies that there used to be. 00:24:04 Only my 32-bit thing shows them: 00:24:07 000a0000-000bffff : Video RAM area 00:24:07 000c0000-000cb3ff : Video ROM 00:24:07 000cc000-000cc7ff : Adapter ROM 00:24:21 00010000-0009cbff : System RAM 00:24:36 Oh, *those*. 00:24:45 I think that's what we were talking about. 00:24:49 ehird: fills the screen? wouldn't that be a rectangle rather than a line? 00:25:09 oerjan: That's the BF modifier. :p 00:25:17 oerjan: Thus "BF" 00:25:25 The B modifier draws a box instead of line, the BF modifier draws a filled box. 00:25:35 There's just CIRCLE, LINE and PSET, pretty much. 00:26:06 Oh, and PAINT, of course. Which does a flood-fill type of thing. 00:26:11 don't forget DRAW! 00:26:25 DRAW is very unsimple, though. 00:26:40 Yes, but, 00:26:43 enemy$ = "asd8uA(*EU*(UQ*(" 00:26:49 You can't beat it for defining sprites. 00:27:12 Sure, and it might even be reasonably fast, since it's not implemented in qbasic. 00:27:58 -!- bsmntbombdood has quit (Read error: 145 (Connection timed out)). 00:28:26 ■ To execute a DRAW command substring from a DRAW command string, use 00:28:26 the "X" command: 00:28:28 DRAW "X"+ VARPTR$(commandstring$) 00:28:30 ^ I don't get this 00:28:32 why not just 00:28:34 DRAW commandstring$ 00:29:09 If you want to refer from your "top-level" command string to sub-scripts, that's what X is for. 00:29:22 That particular example doesn't really make sense, though. 00:29:46 23:29 fizzie: If you want to refer from your "top-level" command string to sub-scripts, that's what X is for. 00:29:47 huh? 00:29:57 Just look at that other example. 00:30:11 Triangle$ = "..."; DRAW "C2 X" + VARPTR($Triangle) 00:30:15 DRAW "C2 X" + VARPTR$(Triangle$) 00:30:17 that could just be 00:30:21 DRAW "C2 " + Triangle$ 00:30:28 Yes, but then you'd be constructing a possibly really long string. 00:30:33 oh. 00:30:34 If you have a complicated Triangle$. 00:30:48 I'm not sure if it supports nested X, though. :p 00:31:39 wow, drawing a circle with DRAW is a pani in the arse 00:31:41 *pain 00:31:56 What I think is funny is that the X argument is a raw memory offset to the variable. 00:32:26 panis rectalis 00:33:35 ... rectal bread? 00:33:45 well, yes. 00:33:51 :DD 00:34:00 Is that what "PR" means in context of, you know, business stuff and so on? 00:34:18 obviously. 00:35:21 OMFG 00:35:22 fizzie: 00:35:25 I sighted the ehird fractal 00:35:26 http://www.advsys.net/ken/klab/labdemo2.png 00:35:32 16:30:54 I think I'm going to try porting this next: http://www.advsys.net/ken/klab/labdemo2.bas 00:35:32 16:31:19 it's supposed to look like this when it runs: http://www.advsys.net/ken/klab/labdemo2.png 00:35:35 16:31:47 I've done raytraced 2.5d before, but I've never tried texture-mapping 00:35:37 I'm famous IN THE PAST> 00:37:07 -!- Judofyr has quit (Remote closed the connection). 00:37:30 I don't get it 00:37:41 the squares 00:37:46 http://imgur.com/5ZN9A.png 00:38:01 It's a fractal that we've established predates me by a long way but I think it's mine :P 00:38:36 -!- bsmntbombdood has joined. 00:42:13 fizzie: http://www.advsys.net/ken/klab/labdemo2.bas 00:42:53 "CALL int86old" makes it, uh, not run. 00:42:53 oh 00:42:57 "unless you're stuck using qbasic" 00:42:57 :P 00:43:01 fractal squatting. the possibilities are endless. 00:43:37 Well, it runs. 00:43:40 Just... sloowly... 00:43:44 of course, xkcd already established that the internet is a hilbert curve. 00:43:45 As in, several seconds per key. 00:43:52 Yes, it's for quickbasic. (And even there it's not in the manual, because it's been sort-of-deprecated with the CALL INTERRUPT statement.) 00:44:19 Yes, well, ti works in qbasic. 00:44:22 If you comment that out. 00:44:26 It's as slow as imaginable, but. 00:44:37 Anyone have quickbasic? :P 00:44:46 I, somewhere. 00:44:57 I'm sure it's findable in the interwebs too, might even be faster that way. 00:45:09 qb4.5 is the version I've seen "everywhere". 00:45:24 It even uses POKEs and it's still slow 00:45:54 Oh, I think I might've found my copy. 00:46:02 At least there's qb.arj in this tarball. 00:46:15 There's also sbbasic.exe, I wonder what that does. 00:46:39 molasses basic. when you have too much time on your hands. 00:47:09 that exists, it's called qbasic 00:47:23 so it's an oxymoron? 00:47:32 qbasic != quickbasic 00:47:52 or wait, does that need to be contradictory from the words themselves? 00:48:01 A subset of QuickBASIC 4.5, named QBasic, was included with MS-DOS 5 and later versions, replacing the GW-BASIC included with previous versions of MS-DOS. Compared to QuickBASIC, QBasic is limited to an interpreter only, lacks a few functions, can only handle programs of a limited size, and lacks support for separate program modules. Since it lacks a compiler, it cannot be used to produce executable files, although its program source code can still be co 00:48:04 mpiled by a QuickBASIC 4.5, PDS 7.x or VBDOS 1.0 compiler, if available. 00:48:22 Oh, sbbasic is just some sound blaster drivers. :p 00:49:03 hm maybe that's actually irony 00:49:37 so q stands for "so slow we didn't have time to write it out"? 00:49:55 Yes, qb.arj had QuickBasic 4.5. 00:50:18 It's got a lot longer manual, btw; in multiple files and everything. 00:50:51 At least I think it was longer, not sure 00:51:20 And of course it has the Run/Make EXE file... option. 00:52:42 lament: 00:53:09 oh 00:53:10 hi 00:53:12 mm 00:53:18 haccordion 00:53:19 gimme :-P 00:53:57 lemme findit 00:55:48 http://filebin.ca/vcfm/haccordion.tar.gz 00:55:57 yaey 00:56:13 hey guys an unknown informant has just given me quickbasic if anyone wants it let me know. 00:57:06 wow 00:57:08 it really is quick 00:57:12 it runs my sierpinski program in <1sec 00:57:13 :P 00:59:36 hmm 00:59:38 Maybe they added some delay loops to qbasic so that people would be more inclined to buy. 00:59:45 on one hand I like qbasic because it's slow and you have to do crazy trix 00:59:51 on the other hand 00:59:54 this is acutally usable 01:00:35 Also, int86old doesn't work, fizzie 01:00:37 It's undefined 01:01:15 It might have a bit different syntax in qb45 than what the file expects. 01:01:17 Checking. 01:01:56 Dunno, http://support.microsoft.com/kb/57385 claims it's still in qb45. 01:02:29 maybe it needs UPPER CASE 01:02:42 Nope 01:04:02 Hmm. 01:04:07 It might need a library. 01:04:24 You should probably fix Options/Set Paths... anyway. 01:04:28 wtf, CALL INTERRUPT fails. 01:04:32 fizzie: aha 01:05:09 hm 01:05:57 How do you add a library, I wonder.. 01:06:03 Although it should load the default QB.QLB by default. Who knows. 01:06:06 ah 01:06:10 $INCLUDE:'QB.BI' 01:06:30 -!- Corun has quit (Read error: 110 (Connection timed out)). 01:06:51 that gives a syntax error >_< 01:07:28 Oh. 01:07:31 It's meant to go in a comment. 01:07:48 fizzie: Uh, you got BI.LIB? 01:08:03 err 01:08:04 QB.LIB 01:08:24 QB.LIB should be in the package. 01:08:38 Ah 01:08:39 So it is 01:08:43 No QB.BI, though. 01:10:05 -!- Corun has joined. 01:10:44 -!- neldoret1 has joined. 01:13:28 Yes, no. I'm not completely sure that is a complete set of qb45 files. 01:13:46 It probably has a rather colorful history before getting to me. 01:17:42 Hey. 01:17:51 Hey. 01:18:15 lament: what do I have to turn on again? 01:18:19 This msbasic-softlib thing, where I got the helpmake thing for .hlp decompilation, also has qb4crit.exe, which has qb.lib, int86old.asm, int86old.obj and something like that. 01:18:26 fizzie: I have qb.lib 01:18:33 just not qb.bi 01:18:35 It might be a better qb.lib, who knows. 01:18:46 And anyway int86old.obj. 01:19:54 lament: 01:19:57 % ./play_note 01:19:57 play_note: Prelude.(!!): index too large 01:20:25 ah wait 01:20:26 works now 01:21:28 Incidentally, what is QB.BI supposed to do? int86old definitely is somehow included in qb.lib, since strings shows a lot of related strings. 01:21:34 fizzie: header file 01:23:25 -!- kar8nga has quit (Read error: 110 (Connection timed out)). 01:23:30 Well, it's in http://neil.franklin.ch/Projects/Mandel/qb/qb.bi 01:23:38 It looks like just a couple of DECLARE SUB lines. 01:24:02 Incidentally, the directory sounds like a mandelbrot plotterer. 01:24:16 -!- neldoreth has quit (No route to host). 01:24:30 Have to sleepify now, though. 01:24:46 Brains.. 01:24:52 oh wait, that's zombify 01:25:28 lament: 01:25:30 it works 01:25:35 the only issue now is my suckitude at musak 01:25:41 * oerjan laments that it works 01:25:55 -!- BeholdMyGlory has quit (Read error: 104 (Connection reset by peer)). 01:25:55 woe us! 01:27:45 -!- Corun_ has joined. 01:31:50 -!- KingOfKarlsruhe has quit (Remote closed the connection). 01:32:25 ehird: now you just have to learn to play the accordion 01:32:39 lament: I see no resemblance on haccordion :P 01:32:40 oerjan, let's make an awful rhyming poem about fish and their use of intercal in an enterprise environment 01:32:58 i suppose we cod do that 01:32:59 ehird: same layout 01:33:19 lament: well, true 01:33:26 oerjan: these fish, see, they're very fat 01:33:54 are you trying to make a pun here? 01:34:12 oerjan: THAT WAS MY NEXT LINE ;_; 01:35:25 fishing lines need bait, you know 01:35:30 -!- Corun has quit (Connection timed out). 01:35:57 oerjan: and anyway, these fish used INTERCAL, so 01:37:45 i sense a lack of substance here. or perhaps the wrong substance, what are you smoking? 01:38:07 oerjan: are these part of the poem? they're not very rhymey. 01:38:26 or perhaps it's just because i'm not very good at english fish names 01:38:54 ghoti 01:39:32 i wish i shaw that coming 01:40:21 these fish were hummin 01:40:51 just for the halibut 01:41:11 for they had many butt. s. and used INTERCAL, 01:41:50 it was an eel-advised choice 01:42:01 and they turned to james joyce 01:42:18 but still they could not pronounce it 01:43:04 and thus, they used unary XOR to denounce it 01:43:26 and the eel was very XORry 01:43:50 for the damage it had caused; and they SELECTed some bits from its tears, 01:44:49 and STASHed them behind their ears 01:45:50 and fulfilled everybody's worst fears 01:45:54 and 01:45:56 ^U 01:45:56 ^U 01:45:57 I 01:45:58 ruined it 01:45:59 ^U 01:46:01 ^U 01:46:06 and said, "PLEASE DON'T GIVE UP", we're right behind you 01:47:18 it was all a red herring, mind you 01:47:30 and they rhymed you with you 01:48:57 quite insane, it seems, i find you 01:49:16 yeah, but, then, I climbed mount everest. 01:49:20 and then they destroyed the meter with glue 01:49:22 with the fishes, on dishes, and, 01:50:50 a seagull too 01:51:00 a 01:51:04 (named Jonathan) 01:51:10 a (named Jonathan) Jonathan 01:51:18 [ Ed: Please be less like Finnegan's Wake in future. ] 01:51:32 —uture–uture, Fish, INTERCAL, 01:51:41 and then they down the riverrun 01:51:53 alpyalpy 01:51:56 Alpy, what was that? 01:51:58 Oh, right, fish, 01:52:20 fishy fishy fishy fishy fishy fishy fish 01:52:35 And then they won the prize for the fishiest poetry in that decade 01:52:38 Then an explosion 01:53:08 Then an implosion 01:53:09 Wibby rollins 01:53:10 Wibby rollins 01:53:11 Wibby rollins 01:53:13 Wibby rollins 01:53:14 I hope you are writing this down 01:53:20 so we can burn it later 01:53:20 [oerjan: i have grep.] 01:53:29 Can we burn the entire channel? 01:53:38 the Fish sayd; "Byrn the wytch! Wemyst hafst only INTERCVL"; 01:54:33 Apparently we are smoking trout, all of us. 01:54:44 Trout? Well, I was on weed, but... 01:54:47 (^lie) 01:55:16 no, it's the unvarnished trout 01:56:03 oh, just go route 01:56:06 these IP addresses 01:56:18 I hope it will be a whale before we try something this stupid again 01:56:54 ehird: i hear VB is good for such stuff 01:57:09 gui vsual interface riverrun 01:57:50 The End. 01:58:12 except that was fake; 01:58:14 i the author lie 01:58:20 ~THE END~ 01:58:26 oh jesus 01:58:34 wut 01:58:35 whew 01:58:41 this code has been running for like 18 hours 01:58:59 i expected it to take like 1 hour 01:59:01 bsmntbombdood: oh, i thought you too were afraid that the poem would go on longer 01:59:21 ditto 01:59:24 :D 02:01:23 it was a bit short on rhyming, but i think we nailed the "awful" part. 02:01:52 fishherel 02:01:57 this puts us on the same level with the greats like e.e.cummings 02:02:22 i wish i saw that cummings 02:10:38 -!- [helloworld] has joined. 02:10:49 -!- [helloworld] has left (?). 02:30:29 -!- Corun_ has quit ("This computer has gone to sleep"). 02:48:21 -!- bsmntbombdood has quit (Connection timed out). 02:49:14 -!- bsmntbombdood has joined. 03:20:59 -!- neldoret1 has quit (Read error: 113 (No route to host)). 03:34:57 -!- GreaseMonkey has joined. 04:09:18 -!- judicaster has changed nick to comex. 05:02:56 -!- kerlo_ has joined. 05:03:21 -!- kerlo_ has quit (Client Quit). 05:23:09 -!- Sgeo has quit ("Leaving"). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:19:06 -!- oerjan has quit ("Good night"). 08:56:43 [ Ed: Please be less like Finnegan's Wake in future. ] <-- :DDDD 08:57:59 ehird and oerjan: that was very entertaining :D 09:00:56 about counting CPU cores... 09:01:38 I think that there are 11 cores in this house atm. Counting computers and mobile phones. ;D 09:03:41 did you count the microwave? 09:03:53 lament, we don't have one 09:04:18 lament, and our TV is too old to have a computer in it. It doesn't even support Text TV 09:04:32 -!- neldoreth has joined. 09:04:41 I guess the VCR has some computer in it though. 09:04:45 yeah 09:05:01 lament, what about fridge/freezer? 09:05:09 hopefully not 09:05:17 it should just be a simple thermostat 09:05:22 mhm 09:05:24 dishwasher? 09:05:34 washing machine? 09:05:37 no clue, possibly 09:06:00 both the dishwasher and the washing machine have digital time remaining displays 09:06:08 and are quite new 09:06:56 oh I forgot the ADSL modem. It runs on a MIPS. 09:07:15 some broadcom chipset thingy iirc 09:09:34 -!- GreaseMonkey has quit ("Quit: Quit: Quit: Quit: Quit: Quit: Quit: Quit: Quit: Quit"). 09:09:37 lament, my radio is sufficiently complex and with a menu system on the display, so I guess that is another CPU there... 09:10:22 oh and digital cameras. That adds another two CPUs at least (two digital cameras in this house) 09:10:54 lament, when you think about it, it is scary how many things contain CPUs... 09:11:13 when you think about it, it's scary how many things contain gears 09:11:44 oh right, my keyboard (as in keyboard/synth, not keyboard/qwerty) 09:12:00 actually perhaps even keyboard/qwerty 09:12:04 depending on the keyboard 09:12:16 lament, I doubt an old PS/2 keyboard has a computer built in 09:12:25 yeah, maybe not 09:12:42 i've read somewhere some keyboards actually have forth stuff on them 09:13:29 I also have one of those horrible ultra-slim usb keyboard, I guess it contains some more stuff, but a full blown CPU? 09:13:51 lament, to that I say: [citation needed] 09:14:09 to that, I say: [lmgify] 09:14:44 what does that mean? Google says: Did you mean: magnify Top 2 results shown 09:14:46 -!- Slereah has quit (Read error: 60 (Operation timed out)). 09:15:09 lament, ? 09:15:36 sorry, it's lmgtfy 09:16:06 -!- Slereah has joined. 09:16:19 oh I see 09:17:13 anyway, I suspect my usb joystick has some CPU built in. Considering it has a programmable "multi function display" at the base of the throttle 09:18:08 (btw: http://www.saitek.com/uk/prod/x52pro.htm) 10:07:54 -!- kar8nga has joined. 10:21:04 -!- sebbu has quit ("@+"). 10:52:29 -!- Jophish_ has joined. 11:01:56 -!- MigoMipo has joined. 11:11:01 -!- Jophish has quit (Success). 11:35:18 -!- KingOfKarlsruhe has joined. 11:53:49 -!- Judofyr has joined. 11:55:20 -!- Judofyr_ has joined. 12:01:48 -!- Mony has joined. 12:03:15 -!- Dewio has quit (Remote closed the connection). 12:03:24 -!- Dewi has joined. 12:11:21 -!- Judofyr has quit (Read error: 110 (Connection timed out)). 12:16:13 -!- Jophish_ has quit (Read error: 104 (Connection reset by peer)). 12:21:37 -!- k has joined. 12:21:59 -!- kar8nga has quit (Nick collision from services.). 12:22:02 -!- k has changed nick to kar8nga. 12:26:08 -!- sebbu has joined. 12:47:47 -!- MigoMipo has quit (Nick collision from services.). 12:52:11 -!- KingOfKarlsruhe has quit (Remote closed the connection). 13:14:37 -!- Corun has joined. 13:16:01 -!- kar8nga has quit (Read error: 110 (Connection timed out)). 13:19:16 -!- Asztal^_^ has joined. 13:22:00 -!- Asztal^_^ has changed nick to Asztal_. 13:22:03 -!- Hiato has joined. 13:35:13 -!- oklofok has joined. 13:35:17 hello. 13:35:33 -!- Azstal has quit (Read error: 110 (Connection timed out)). 13:42:19 http://www.vjn.fi/oklopol/music/ancoolone2.mid see what the lack of a working computer is doing to me 13:54:02 Criminal. 14:30:07 -!- tombom has joined. 14:34:52 -!- BeholdMyGlory has joined. 15:07:33 -!- tombom has quit ("Peace and Protection 4.22.2"). 15:21:21 -!- Corun has quit ("This computer has gone to sleep"). 15:22:14 -!- Corun has joined. 16:04:58 -!- BeholdMyGlory has quit (Remote closed the connection). 16:15:30 -!- Hiato1 has joined. 16:33:10 -!- Hiato has quit (Read error: 110 (Connection timed out)). 16:40:51 -!- FireyFly has joined. 16:43:48 -!- Corun has quit ("This computer has gone to sleep"). 16:47:02 -!- Corun has joined. 16:49:43 -!- BeholdMyGlory has joined. 16:59:15 -!- tombom has joined. 17:04:47 -!- ais523 has joined. 17:06:11 -!- kar8nga has joined. 17:44:18 hi ais523 17:44:33 hi 17:45:19 it is quite likely cfunge will gain some inline asm soon (with C fallbacks of course). I can't find any other way to make GCC generate what I want. 17:46:01 haha 17:47:13 -!- kar8nga has quit (Read error: 60 (Operation timed out)). 17:47:38 ais523, well issue is I have a lot of L2 cache misses when filling the static area with spaces at startup. With SSE there is a way around it, with the same effect as write-combining would have. 17:48:09 AnMaster: you're insane. But I don't consider that a bad thing 17:49:09 ais523, when I tried with __builtin_ia32_movntps() GCC instead generates stupid "lets load the data into the xmm register with the slower unaligned read instruction even though the compiler put .align 16 in the code to make it aligned" 17:50:11 well, gcc isn't perfect 17:50:14 how well does icc do on the same code? 17:50:16 ais523, anyway with -ftree-vectorize you get instead a "lets pollute cache". 17:50:33 ais523, well, I'm on AMD. But it decides to pollute cache too 17:50:58 well, hand-crafted asm can normally beat even the best compiler-generated asm in some cases 17:51:57 ais523, well at least when it is being as stupid as in this case. Now to figure out how to hide this for other compilers. Since most seems to define __GNUC__ these days (to be able to parse system headers...) 17:52:20 #if defined(__x86_64__) && defined(__GNUC__) && defined(__SSE__) && defined(__SSE2__) && !defined(__INTEL_COMPILER) 17:52:28 well that fixes it for the x86_64 variant 17:52:33 haven't written a 32-bit one yet 17:52:48 also no idea how clang will handle it. Clang defines __GNUC__ too 17:52:52 are you going to write an inline asm version for gcc-bf? 17:52:58 I must get less busy in RL so I can finish it 17:53:02 ais523, hah 17:53:22 ais523, icc fails on labels in inline asm for some reason 17:53:24 wonder why... 17:54:24 * pikhq wishes that non-GNU C compilers would not define __GNUC__. 17:54:35 * pikhq also wishes that system headers wouldn't require __GNUC__. 17:54:38 pikhq, same 17:54:43 http://paste.lisp.org/display/77071 btw 17:54:46 that is what I have atm 17:54:52 ais523, what do you think of it? 17:55:07 indention is off yes 17:55:24 I think it looks insanely platform-specific 17:55:31 and you're doing this just to fill memory with spaces? 17:55:36 ais523, I have fallbacks as you see 17:55:42 what if you put a load of literal spaces in the initialised read-write data section instead? 17:55:49 would that be faster or slower? 17:55:55 eh 17:56:03 ais523, I would get a very large binary 17:56:16 well, yes, but would that slow the program down? 17:56:18 I suppose it would 17:56:22 (gdb) print sizeof(static_space) 17:56:22 $1 = 2097152 17:56:27 that is quite large 17:56:44 Jebus. 17:56:56 what? 17:57:03 That is rather large. 17:57:09 AnMaster: typical C++ program size... 17:57:16 ais523, well cfunge is in C 17:57:25 and it is likely faster to do it this way than read it from disk 17:57:25 yes 17:57:30 but I mean 2MB isn't insanely large 17:57:35 but yes, reading it from disk might be slow 17:57:50 unless it's in disk cache, how slow is blitting the initialisation from disk cache to processor cahce? 17:57:53 *cache? 17:58:00 of course for optimal performance you should use a ram disk for cfunge 17:58:01 :D 17:58:05 * AnMaster runs 17:58:18 also, insane alternative: instead of storing fungespace as-is in memory, store everything with 32 subtracted from it 17:58:31 and allow for that whenever you do reads or writes 17:58:35 ais523, also no idea, but why would it need to go to CPU then? RAM-RAM DMA? 17:58:52 ais523, that would mess up the range... 17:58:59 + a few other things 17:59:08 well, yes, but all those problems can be dealt with 17:59:16 I'm wondering how costy the code for dealing with them would be 17:59:21 probably more than this 17:59:27 this way is rather fast actually 17:59:40 And then, you could have the fungespace stored in the uninitialised read-write data section. ;) 17:59:42 oh well, then, let's stick to inline asm for filling memory with spaces 18:00:15 and well -ftree-vectorize can be used on any platform and work on the C fallback loop. Which is still better than non-vectorised. 18:00:27 pikhq: you need at least a 66-bit CPU to fit all of fungespace in memory, assuming an 8-bit word length 18:00:32 in fact I would generally recommend using -ftree-vectorize for cfunge 18:00:38 in practice, probably 67-bit, to fit other things in there as well 18:00:47 and that's assuming 32-bit int, which on a 67-bit processor is unlikely 18:00:52 66-bit CPU? 18:01:08 AnMaster: there's nothing mathematically impossible about that, it would just be unusual 18:01:28 ais523, well yeah. if x87 uses 80-bit floats... Why not. 18:02:07 80 bits, aligned to 96 bits (x86) or 128 bits (x86_64) in memory 18:02:19 iirc 18:02:49 ais523, btw I ran into a weird issue with inline asm 18:03:05 : [space] "=m"(static_space) that expands to: static_space(%rip) 18:03:16 so I couldn't use it, since I needed to offset it by %rax 18:03:31 still had to list it as out var 18:03:42 ais523: I suspect PAE on x86_64 would barely suffice. ;) 18:04:00 pikhq: heh 18:04:35 pikhq, err. A 32-bit funge implementation would use a funge space that consists of 2^32 * 2^32 cells. Each cell is 32 bits 18:04:42 on the other hand, assuming 16-bit ints, you could probably fit the whole thing into memory on some 64-bit computers available nowadays 18:04:46 well not exactly 18:04:50 since it is signed 18:05:12 AnMaster: signed/unsigned makes no difference to the number of bits 18:05:21 they're just different ways to interpret bit patterns 18:05:23 ais523, well it makes to number of cells 18:05:26 iirc? 18:05:28 no it doesn't 18:05:31 hm 18:05:32 ok 18:05:36 think of indexing the cells in binary 18:05:37 then I misremembered 18:05:38 -!- sebbu2 has joined. 18:05:45 ais523, well ok. 18:05:51 that should make it pretty obvious that the number of cells is the same, signed or unsigned 18:06:06 the number is slightly smaller if you use one's complement or sign-magnitude, and don't include negative zero 18:06:08 but who does that nowadays? 18:06:13 pikhq, this is why you use sparse storage. Like a hash map or whatever. 18:06:23 ais523, hm 18:06:45 AnMaster: what happens if cfunge runs out of memory trying to store things in fungespace? 18:06:46 pikhq, cfunge does that. But also uses a static array for the most often accessed area 18:06:53 g/p reflects? 18:06:53 That is quite sane. 18:07:31 pikhq, now cfunge also supports 64-bit cells as a compile time option. that means a 4 MB static array. 18:07:34 ais523, hm... 18:07:53 array[sizeof(int)][sizeof(int)] is much nicer. 18:08:11 pikhq: don't you mean array[1< pikhq, I think array[x+y*FUNGESPACE_STATIC_X] is easier to read 18:08:31 s/int/size_t/ 18:08:39 and before anyone mentions * vs bitshifts 18:08:44 ;) 18:08:46 AnMaster: multiplicative addressing? why? 18:08:47 any compiler optimise it 18:09:01 array[x][y] comes to exactly the same thing and is easier to read 18:09:23 ais523, in array[x][y] are each column stored together or each row? 18:09:43 AnMaster: you get an array of arrays 18:09:45 ais523, that makes a huge difference in locality of reference 18:09:48 which are stored contiguously in memory 18:09:51 for common funge code 18:09:57 as for which is stored together, it depends on which way round you put the subscripts 18:09:58 1) file loading is line by line 18:10:00 which is clearly up to you 18:10:12 ais523, yes indeed 18:10:23 ais523, anyway I find the way I did easier to read. 18:10:44 ais523, + makes the code that initialises it easier to write 18:12:57 ais523, anyway about OOM. I don't know exactly 18:13:20 do you check malloc return? 18:13:24 or do you not do that for speed reasons? 18:13:32 ais523, well yes I do, but that is deep in the hash code library 18:14:08 and you can tell GCC you don't expect it to fail with __builtin_expect(), The linux kernel uses it a lot. So does this local feature branch of cfunge 18:14:22 Yes I'm probably insane 18:14:26 :) 18:14:36 ah, makes sense, a branch-predicted malloc 18:14:41 -!- Judofyr_ has quit (Remote closed the connection). 18:14:43 why don't you inline malloc for extra speed gains? 18:15:22 ais523, that would be highly unportable. Despite what you may think cfunge is mostly portable across C99+POSIX.1-2001 18:15:52 there are a few issues with the build system on OpenBSD, but I got that working by manually writing the gcc command line 18:15:55 AnMaster: surely there must be some more portable way of doing it? 18:16:22 ais523, well. Calling malloc()? 18:17:35 ais523, most time isn't spent in there anyway. Most time remaining now is spent on pushing strings on stack. But I have started working on a solution that avoids the char<->funge_cell translation, and reversed order (stack grows up in cfunge). 18:17:56 how does it work? 18:18:03 It turned out using reversed extra wide strings worked better in some code. 18:18:09 I can't fix all that way 18:18:12 but some cases. 18:18:32 also for certain STRN instructions you can skip popping/pushing at all 18:18:55 like the one for string length. Just scan on stack. 18:19:17 hi 18:19:37 http://www.vjn.fi/oklopol/music/ancoolone2.mid <- i like this 18:19:58 hi ehird 18:20:01 ais523, really when it comes to system time malloc() isn't much of an issue. Most libc allocates in chunks. And even then fork() and waitpid() is what takes most time in mycology. (for the PERL fingerprint) 18:20:06 when it comes to *system time* 18:20:13 AnMaster: you should allocate your own heap with mmap 18:20:21 it's trivial, overcomitting is universal 18:20:29 AnMaster: you should write your own faster version of perl 18:20:31 just allocate a shitload and it'll just about always work 18:20:38 ehird, well anonymous mmap() isn't portable 18:20:43 AnMaster: mmap /dev/zero 18:20:45 ehird: overcommitting isn't portable either 18:20:52 ais523: well, yes, but it works on most things 18:20:53 ehird, hm ok. 18:20:55 it will be very very slow in gcc-bf, for isntance 18:21:01 ais523: he can fallback 18:21:07 compile time option, say 18:21:14 because gcc-bf will go through and organise memory so that it can jump about in that, it takes ages 18:21:16 linux/bsd do overcommitting, probably solaris too 18:21:27 does Windows? 18:21:32 and those are pretty much the only widely used unixes, the rest can set -DNO_MMAP_HEAP or w/e 18:21:36 ais523: cfunge doesn't work on windows 18:21:45 ais523: Still doing stuff with GCC-bf? 18:21:51 Spiffy. 18:21:53 pikhq: it's on hold while I finish my degree 18:21:55 Ah. 18:21:56 btw I did some testing with prefetching cache lines in file loading. It resulted in a speedup on my old Pentium 3, but a slowdown on my Sempron 18:21:58 Fair enough. 18:21:58 but I still intend to finish it sometime 18:22:12 but yeah, with mmap you never have to allocate, just access memory and bam 18:22:17 = cut malloc() time out entirely 18:22:26 also, with mmapping /dev/zero, you get all 0s 18:22:30 so you can offset fungespace by 32 18:22:35 I think that is because AMD64 auto prefetches when you access several cache lines after each other. So the instructions are nops then basically 18:22:35 = no initialization needs to be done 18:22:38 it's already zeroed out 18:22:39 ehird/AnMaster: you might want to look into using sbrk if you never free memory 18:22:42 great, right? 18:22:43 Glibc malloc does mmaps when efficient. 18:22:44 -!- oerjan has joined. 18:22:45 although it plays badly with malloc on some systems 18:22:52 pikhq: right, but a huge overcommitted mmap is better 18:22:55 rather than many small malloc 18:22:56 s 18:23:04 hmm... what about using calloc not malloc if you want zeroed-out memory? 18:23:10 ais523: that just does a memset or whatever 18:23:13 ais523, I do free sometimes. Stuff like stacks are freed when that thread quits 18:23:13 so it still loops through 18:23:16 is calloc optimised to do the zeroing and allocating together? 18:23:17 mmapping /dev/zero will be faster 18:23:28 AnMaster: anyway, that offset + mmap heap I imagine would give a quite good performance increase 18:23:33 ehird: surely a sensible library would implement calloc in terms of mmapping /dev/zero? 18:23:35 ais523, also I realloc() sometimes. But profiling shows that isn't really a major overhead currently 18:23:42 ais523: why not read glibc sourc 18:23:42 e 18:23:46 ehird, hm where was it? 18:23:48 the offset bit 18:23:53 ehird: I don't have it on me 18:23:53 AnMaster: basically 18:23:59 * AnMaster looks at scrollback 18:24:02 AnMaster: overcommit mmap /dev/zero, then you have it already initialized 18:24:03 so 18:24:07 ais523, it is on the web. 18:24:07 0 = 32 18:24:08 1 = 33 18:24:11 -1 = 31 18:24:12 etc 18:24:16 then you have spaces as default 18:24:19 without ANY initialization 18:24:25 * AnMaster considers 18:24:26 = no inline asm, no initialization overhead, perfect 18:24:42 (with a fallback -DNO_MMAP_HEAP for non-overcommitting systems or ones that do it slowly) 18:24:50 ehird: I mentioned that a while back to AnMaster 18:24:51 ehird, so this would change the range of all the vaules? 18:24:53 the offset-by-32 thing 18:24:58 AnMaster: err, pretty much 18:25:00 ais523: yes 18:25:01 I got the idea from you 18:25:06 but combined it with mmapping /dev/zero 18:26:30 ehird, well the kernel sets static uninitialised vars to be 0. So I could equally well do offset on that instead. 18:26:51 AnMaster: you can't have a huge static var 18:26:59 have you ever tried to overcommit mmap? 18:27:08 I've allocated 5GB on this 2.5GB system, with half the memory full 18:27:09 it worked fine 18:27:14 ehird, No. But I tried a 128 MB static var in cfunge. 18:27:16 that's basically what I'm suggesting 18:27:27 get rid of malloc (apart from as fallback) 18:27:31 mmap a huge /dev/zero 18:27:34 and offset by 32 18:27:40 ais523: I suspect most calloc's are only a malloc+memset anyway 18:27:43 I'd bet money you'd get a good speed improvement 18:27:55 hm... deranged values... 18:28:10 incidentally, there was a big argument on comp.lang.c about what happened if you used calloc to allocate more than a SIZE_MAX of memory 18:28:13 ehird, hm. Worth trying indeed. 18:28:24 AnMaster: if you don't, I'll try and figure out cfunge and do it :P 18:28:37 it seems most implementations treat that case as UB, but they weren't sure whether that was allowed or not 18:28:55 And this speed improvement, would it help in anything except cfunge start-up time? 18:29:02 ehird, well I can't do it today, I'm checking profiling to try to work at the most problematic area. 18:29:28 ehird, but I will try it indeed. 18:29:40 fizzie: well, yes 18:29:43 he'd never call malloc 18:29:47 just reference the memory 18:29:48 ehird, however I think it may break the specs if you don't compensate 18:29:53 so it should be a pervasive improvement 18:29:54 AnMaster: hm? 18:29:54 the range I man 18:29:56 mean* 18:29:59 why 18:30:03 just +32 on every read 18:30:09 which is, conveniently, a bitshift 18:30:12 er, no it's not 18:30:13 :D 18:30:16 don't listen to me 18:30:17 but yeah 18:30:19 +32 on each read 18:30:21 -32 on write 18:30:23 = no initialization time 18:30:30 so that saves startup time, and the no-mallocing saves time all the way through 18:30:33 i case my rest 18:30:34 ehird, what about stack? 18:30:35 ehird: but you only initialise once 18:30:42 indeed 18:30:42 ais523: yes, that saves at startup only 18:30:44 and you access memory lots of times 18:30:50 so you're saving at startup to hurt more later on 18:30:54 err, I disagree 18:30:57 and you end up with an interp that's slower on very long programs 18:31:00 +32 and -32 take one cycle 18:31:07 ais523, well you could change the instruction dispatcher to work on the offset values 18:31:09 the averaged performance increase would be a gain 18:31:12 I am almost certain 18:31:16 90% 18:31:23 I _will_ bet money on it, if anyone wants 18:31:27 -!- sebbu has quit (Connection timed out). 18:31:50 not having to manually check whether memory needs to be malloc'ed should be a gain in a lot of places 18:31:58 exactly 18:32:10 ehird: I bet it would run an infinite loop more slowly 18:32:19 as in, each iteration took longer 18:32:23 ehird, well I don't really malloc the funge space currently. I don't need to. all but one access of mycology is inside the static area 18:32:25 ais523: see olsner 18:32:30 if you did anything interesting in the infinite loop at all 18:32:35 and that is true for most other programs too 18:32:35 AnMaster: Just hardcode mycology's output ffs 18:32:42 AnMaster: how do you handle Lahey-lines with no commands at all on them? 18:32:47 if you're optimizing beyond what you have, you're not going to get huge gains 18:32:53 I'm just trying to say the biggest gains in my opinion 18:33:11 ais523, well how would you end up on that? with threads that remove the < or whatever? 18:33:24 AnMaster: empty source file 18:33:25 that or a j instruction 18:33:36 ehird, empty source file is an infinite loop 18:33:36 (or is it x) 18:33:38 yes 18:33:50 AnMaster: I've seen it done with a row of ps before 18:33:59 where the stack was set up in advance to hold all the right information 18:34:07 but there are other ways, as suggested 18:34:39 ais523, the main thing to remember is that such a loop is not breakable even with multiple threads. Reason is that spaces take no ticks 18:34:51 Didn't we already discuss this earlier, though? 18:35:40 ais523, so it will loop in the "we have a space, search for next instruction" code 18:36:10 AnMaster: ah, ok 18:36:13 mine optimises it into a real infinite loop :) 18:36:19 hah 18:36:21 old joke 18:36:35 heh, CLC-INTERCAL optimises obvious infinite loops into a select instruction with infinite timeout 18:36:41 so it doesn't even use up CPU 18:37:34 ais523: what's your opinion on qbasic vs quickbasic 18:37:40 quickbasic is fast and fancy, I think that ruins it 18:38:00 Oh, and you can get an "empty" lahey-line simply by entering a line with only ;>#; at the > character, since ;; doesn't take up any ticks either. 18:38:10 ehird: I've never seen quickbasic 18:38:25 fizzie: wow, that does work 18:38:26 ais523: it's qbasic without the restrictions 18:38:27 and it can compile 18:38:30 and it's a lot faster 18:38:34 and it has a bigger manual 18:38:34 ehird, anyway what I do malloc mostly is stacks and stack-stacks. And strings in certain fingerprints 18:38:35 and more functions 18:38:49 which I think spoils it 18:39:25 And the quickbasic manual isn't decompilable with the helpmake.exe tool; it spews out a rather corrupted file and hangs up. (At least that's what it did in dosbox.) 18:39:25 for instance, my 7-second qbasic graphical sierpinski runs in less than 1 second in quickbasic 18:39:49 do you have a legal copy of quickbasic? 18:40:11 Illegal, from fizzie. 18:40:15 Well. 18:40:17 Probably illegal. 18:40:33 and this channel is publicly logged? :P 18:40:39 ehird: You weren't supposed to reveal it's from me! It was all very hush-hush! (Although I may have behaved suspiciously enough.) 18:40:39 olsner: yes 18:40:41 * oerjan puts handcuffs on fizzie O====O 18:40:42 hi clog! hi cmeme! 18:40:54 cmeme isn't here 18:40:55 he died. 18:40:58 err... cmeme? 18:41:03 ais523: cmeme = ircbrowse.com 18:41:08 hasn't been here for many months 18:41:08 yes, I know 18:41:10 oh 18:41:20 I have to go now, anyway 18:41:21 Well, that's still one logger. 18:41:23 olsner: I would like to see one person enforcing QuickBasic's copyright 18:41:29 -!- ais523 has quit ("mibbit.com: this is a rubbish quit message"). 18:41:58 * oerjan enforces copyright on ehird with the saucepan ===\___/ 18:42:04 ehird, just did a test on mycology: malloc() was called 532 times, realloc() 288 times and free 529() times. And that mismatch between free and malloc is due to long lived arrays that in SOCK, FILE and REFC. You can't free them before exit anyway due to the way the fingerprints are defined. 18:42:14 so not a real leak 18:42:19 "Recently, a set of TCP/IP routines for QuickBASIC 4.x and 7.1 has revitalized some interest in the software." Heh. 18:42:21 right, that 532 could become 0 :-) 18:42:39 ehird, well none of those malloc() calls were for funge space 18:42:41 it's a matter of principle, I believe QB was the in-the-day equivalent of a Visual Studio license, so you should be paying millions in damages for violating the precious copyright 18:42:54 heh 18:43:02 ehird, and the other ones doesn't need to be initialised. 18:43:47 ehird, so trying with offset on static array should be quite interesting. Oh another thing. Too large static area is bad for performance. Locality of reference. 18:44:02 Yes I noticed this in profiling 18:44:46 Also seems that FreeBASIC has added OOP-style stuff to the TYPE command. 18:45:00 same would go for mmap() unless you encode the coordinate as some sort of space filling fractal that puts close areas in the same cacheline (as well as page) 18:45:18 hm that sounds interesting 18:45:18 ... 18:45:38 need very low overhead to calculate too 18:46:02 ehird, what do you think of that idea? 18:46:05 :D 18:46:24 er 18:46:26 I dun geddit 18:46:27 a cache line is typically 64 bytes on x86 18:46:46 ehird, Do you remember xkcd's map over ip addresses? 18:46:50 Yes. 18:47:22 That doesn't look like you can calculate the linear index from cartesian co-ordinates easily :( 18:47:24 ehird, do you remember how the mapping between ips and points on the map was done? 18:47:41 well now that was 1D -> 2D 18:47:42 no 18:47:52 http://en.wikipedia.org/wiki/Space-filling_curve 18:47:59 ehird, using a space filling fractal that put close ips close to each other 18:48:23 Asztal_, indeed. Don't remember what exact variant 18:48:32 Looks like a Hilbert curve. 18:48:33 anyway. What about a mapping the other way? 18:48:41 2D -> 1D 18:49:13 is it possible to do such a thing O(1)? 18:49:32 almost nothing is possible O(1) 18:49:50 oerjan, well true. :( 18:49:58 there are infinitely many digits both in and out 18:50:05 O(n), possibly 18:50:20 Alternatively, from a practical point of view, almost everything is just O(1) with a big constant if you're doing it on a real computator. 18:50:32 oerjan, where n is what? Number of positions? Number of bits in address? 18:50:50 the latter 18:50:54 hm 18:51:14 practicality is so impractical 18:51:26 well Maybe. 18:51:40 i expect with some grouping, the result at one position depends only on the previous ones 18:51:40 but that wasn't a very practical comment :P 18:51:58 (more high-level) 18:51:58 oerjan, well if you want to do random lookup, and not start from the start of the curve 18:52:05 brb phone :( 18:54:23 Wow, that's one trippy mandelbrot. 18:56:52 AnMaster: Actually, wikipedia seems to have more info on how http://en.wikipedia.org/wiki/Z-order_(curve) can be used like this. 18:59:26 in particular "The resulting ordering can equivalently be described as the order would get from a depth-first traversal of a quadtree;" 18:59:38 Notably, calculating the z-order coordinate from x, y is just a single application of the INTERCAL mingle operator. 18:59:54 Of course your silly C might lack the always-useful $ operator. 19:05:00 Curiously, that one bit-hacks page at http://www.cs.utk.edu/~vose/c-stuff/bithacks.html seems to have a couple of bit-interleaving tricks. 19:05:57 you can do $ really fast with two lookup tables and bitshifts, right? 19:06:59 There's one lookup table approach, yes. There's also yet another of those 64-bit multiplications, if you happen to have a fast 64-bit multiplier. 19:07:22 They always look so silly. 19:07:34 via the IWC forum: http://www.sciforums.com/vacuum-pockets-and-safety-nazis-t-41446.html 19:07:38 for a 32-bit int you can trivially generate two 65536-sized lookup tables 19:07:41 then just 19:07:54 tab[n&65535] 19:07:54 and 19:07:58 tab2[n< err 19:08:00 >>blah 19:08:01 or whatever 19:08:18 oerjan: nice linkjack. 19:08:19 not. 19:08:34 http://groups.google.com/group/rec.arts.sf.written/msg/073bea1aa44c9396 19:08:37 huh? 19:09:08 you linked to an ugly, ad-filled page, on a forum, where someone had minimally copied and pasted the original post from google groups 19:09:14 as opposed to linking ot the archived message directly 19:09:34 it was the link posted on the iwc forum 19:10:02 I also linked to the google-groups URL three days ago; someone hasn't been diligently logreading! 19:10:03 i was watching out only for safety nazis, not link nazis, sorry 19:10:30 * oerjan goes on a murderous swatting spree -----### 19:10:47 * ehird bites off oerjan's head 19:10:48 om nom 19:10:56 -!- Corun_ has joined. 19:11:10 would you like fries with that? 19:12:13 Loeb's Theorem as a Scheme description: "A function which, when given code evaluating to (a function which, when giving code evaluating to P, returns P), returns code evaluating to P." 19:12:15 * ehird implements 19:12:24 also, i didn't know that it was ad filled. my brain filters are reasonably resistant to anything not actually revolting. 19:13:17 (define (loeb box) 19:13:17 `((eval box) '(loeb ,box))) 19:13:21 ski__: I wrote loeb. 19:14:18 er wait 19:14:23 (define (loeb box) 19:14:23 `((eval box) '(loeb ',box))) 19:14:33 i don't get it 19:14:37 (define (loeb box) 19:14:37 `(,(eval box) '(loeb ',box))) 19:14:38 there 19:14:45 bsmntbombdood: "A function which, when given code evaluating to (a function which, when giving code evaluating to P, returns P), returns code evaluating to P." 19:14:47 in modal logic: 19:14:51 []([]P -> P) -> []P 19:14:55 in blah: 19:14:58 what's the point 19:15:06 "If it is provable that (if P is provable then P), then P is provable" 19:15:17 bsmntbombdood: A nice introduction: http://yudkowsky.net/rational/lobs-theorem 19:15:44 will not stand for that scribd shit 19:15:49 not my fault. 19:16:08 scribd? 19:16:37 click the damn link 19:16:58 oerjan: scribd invented that stupid embedded pdf web app bloat fail 19:17:49 -!- Judofyr has joined. 19:18:32 oh, wait 19:18:34 (define (loeb box) 19:18:34 `(,box '(loeb ',box))) 19:18:35 there 19:18:46 (loeb is basically the fixed point operator for boxed code, in a way) 19:19:18 -!- Corun has quit (Connection timed out). 19:19:21 #;3> (eval (loeb '(lambda (x) 2))) 19:19:21 2 19:19:25 It passes the Very Silly Test. 19:19:52 Cool, (eval (loeb '(lambda (x) x))) behaves like ```sii``sii 19:22:18 -!- calamari has joined. 19:23:18 http://julianstahnke.com/read/sound_picture/ 19:23:36 ... 19:37:32 AnMaster: you there? 19:39:10 back 19:39:12 ehird, now yes 19:39:17 heh 19:39:18 * AnMaster reads scrollback 19:40:32 There's one lookup table approach, yes. There's also yet another of those 64-bit multiplications, if you happen to have a fast 64-bit multiplier. <-- interesting 19:41:17 AnMaster: how much chance to you think I have to beat cfunge speed in haskell? :D 19:41:59 ehird, unknown. It depends on what you do. If fizzie finishes his jitfunge he will beat cfunge at single-threaded apps 19:42:12 I fail to see how his approach would work with threads though 19:42:12 interpreting 19:42:39 (The 64-bit multiplication interleaves only 16 bits at a time, though.) 19:42:42 ehird, then it depends on how you do it. cfunge isn't perfect. It is just the fastest one currently around. 19:42:55 fizzie, how do you plan to implement t in jitfunge? 19:43:02 AnMaster: cfunge is near c speed, isn't it? 19:43:20 ehird, hahahaha 19:43:26 very funny 19:43:31 well, it sure is fast... 19:43:44 ehird, c as speed of light? Yes very funny joke 19:43:51 ~ 19:44:09 I don't really have a plan there; I don't see any sensible way of doing synchronous threads with jitfunge without it being completely brainless. 19:44:14 AnMaster: >_< 19:44:17 C speed. 19:44:40 ehird, oh, I thought you planned to trap me there by claiming you meant c as in speed of light 19:44:46 if I read it as the language 19:45:17 ehird, anyway you could write a C program that did the same output but was faster. Like that compile to shell script in ick 19:45:30 yes, but 19:45:34 without stupid corner cases 19:46:15 ehird, and since I do implement funge threads I can't merge instructions either. So >:#,_ can't be translated to "output string from stack" 19:46:28 since some other thread could potentially change it while it was executing 19:46:32 At the very least it'd need some explicit synchronization just about everywhere. It sounds rather painful to implement. Of course I *could* run things-with-no-observable-side-effects somewhat concurrently. 19:46:34 yes but 19:46:35 and I have to keep them synched 19:46:37 answer my question 19:46:40 without bullshit corner cases 19:46:41 synced* 19:46:42 like you always do 19:46:51 doesn't cfunge compete with C on speed? 19:46:54 as in, 2-4x slower than C 19:47:40 ehird, hm. There are some issues that are hard to avoid with befunge interpretation. Like locality of reference. But my goal was never to get as fast as native C code 19:47:52 AAAAAAAAAAAGH 19:47:52 my goal was "beat all those other interpreters" 19:47:56 -!- Slereah_ has joined. 19:47:58 Why can't you just answer my freaking question 19:48:09 and later on: "how fast can I make this?" 19:48:15 ehird, well I wish I could. It isn't easy 19:48:18 ehird: it's classified information 19:48:27 ehird, and I don't know the answer exactly 19:48:33 AnMaster: just answer roughly 19:48:43 does cfunge compete (2-4x slower) than C in common cases? 19:48:44 I doubt there are very well-comparable benchmarks that would've been implemented both in C and in Befunge. 19:48:56 fizzie: i'm not asking for a formal comparison 19:49:08 ehird, I can't answer since I haven't measured compared to the equivalent program in pure C. 19:49:16 fizzie, indeed 19:49:20 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 19:49:25 But you need some code that does the same thing in both languages to give any sort of sensible answer. 19:49:34 anyway, with C you can optimise control flow 19:49:36 and so on 19:49:41 unoptimized C 19:50:07 ehird, as produced by GCC? with -O0? Ok that isn't fair. Bash could possibly beat that in some cases... 19:50:11 well almost 19:50:13 -O2 19:50:27 you always do this, nitpick nitpick corner case corner case one level lower of abstraction... 19:50:42 ehird, -O2 is rather well optimised. And befunge is hard top optimise. And as fizzie said: " I doubt there are very well-comparable benchmarks that would've been implemented both in C and in Befunge." 19:50:51 now I have an idea though 19:50:56 it is called threaded code 19:51:02 ehird: No, seriously, it's not a very simple question, since no-one does any "common cases" with Befunge. 19:51:03 this could be interesting for befunge 19:51:08 do some of the language shootout tests :) 19:51:21 you can probably beat Ruby :D 19:51:26 AnMaster: threaded code would not be a good improvement for befunge, afaik. 19:51:36 Asztal_: oh, it'd almost certainly beat all/most of the interpreted languages 19:51:47 ehird, well I never tried it. Just got the idea today. But why would it not be very good? 19:52:00 You could handle the updating pointer quite easily probably 19:52:02 Because threaded code works for... Forth. 19:52:25 ehird, and for erlang. The Erlang VM uses threaded bytecode iirc. 19:52:56 well unless you compile with HIPE to get native code. 19:54:04 Erlang's bytecode is UNCOMFORTABLY PARALLEL. 19:54:37 ehird, hm. Only because that is how it has been written 19:54:52 and the language is designed to make it easy 19:55:03 -!- oerjan has quit ("leaving"). 19:57:29 -!- Slereah has quit (Read error: 110 (Connection timed out)). 19:58:33 There's one lookup table approach, yes. There's also yet another of those 64-bit multiplications, if you happen to have a fast 64-bit multiplier. <-- any links to more info on this? 19:58:55 Well, it's on that page whose URL was just few lines earlier. 19:59:09 It does interleave just 16 bits with the 64-bit multiplication, though. 19:59:23 ah right 19:59:35 And I don't want to guess anything about execution speed vs. the lookup-table-based versions. 20:00:01 fizzie, of course. That is what profiling test cases is for 20:00:09 as well as profiling real program 20:00:38 and cache/branch simulation with cachegrind and callgrind. As well as real profiling those with oprofile 20:00:41 and so on ;P 20:02:10 -!- Corun_ has quit ("This computer has gone to sleep"). 20:05:27 fizzie, those bit hacks are for shorts it seems. I operate on larger numbers though 20:05:35 but maybe just for the static area 20:05:41 which is currently 1024*1024 20:06:03 And you can do your larger numbers in small pieces. I did say "just 16 bits". 20:06:27 the 64-bit one is for 8 bit numbers though 20:06:56 Oh, right; it was a 16-bit result. 20:07:02 yep 20:07:27 Yes, it's probably because there are 8 bytes you can fit in a 64-bit integer, and you need all 8 different bit positions there. 20:07:37 geez, QBasic is crazy slow. 20:07:40 probably 20:07:40 i mean how can you do anything 20:07:53 fizzie, if you could do this with SSE.. Hm! 20:08:27 however the overhead of SSE setup is rather large. It is only useful for a large number of similar operations after each other 20:08:46 ehird, implement a fast funge in qbasic? 20:08:51 no :| 20:09:20 ehird, still a simple befunge93 would be nice. I don't think anyone done that..? 20:09:34 I have a feeling I might have. 20:09:40 haha 20:09:40 Not sure. 20:10:02 sure I can do funge93 20:10:02 I tend to do a befunge 93 interpreter in most languages I come across, but I might not have revisited basic. 20:10:12 DIM fs(80, 24) 20:10:24 hey, what's hello world again? 20:10:31 befunge? 20:10:38 -93 20:10:47 025*"!dlrow ,olleH">:#,_@ 20:10:52 tankz 20:10:52 indeed 20:11:01 fizzie, err the 0 isn't needed 20:11:03 You can omit the initial 0 if you want to test stack underflow handling simultaneously. 20:11:05 fuck, I can't backspace. 20:11:11 er 20:11:12 i mean 20:11:13 i can't \ 20:11:23 ehird, can't what? 20:11:26 write a \ ? 20:11:34 how can that be hard 20:11:37 Yes, I did mention I always put the 0 there. It's more robust that way. :p 20:11:43 AnMaster: keyboard mappin'. 20:11:47 fizzie, more breaking 20:12:03 ehird, mycology has a befunge 93 section. It is fairly complete. Just remember to test mycorand.bf too 20:12:18 ehird, you wrote a \ just above there... 20:12:21 More robust; you don't run out of the string. I always tend to keep a lot of results on the stack that the print loop would cheerfully pop out. 20:12:30 AnMaster: It's dosbox's keyboard mappings. 20:12:30 -!- KingOfKarlsruhe has joined. 20:12:33 oh 20:12:33 Those can be pretty tricky. 20:12:33 IN DOSBOX 20:12:34 gr 20:12:37 that's silly then 20:12:48 why not read like normal programs 20:12:53 not 20:12:54 that 20:12:55 simple 20:12:58 oh? 20:13:36 if you read scancodes sure. But why do it? Why not just do input like any other program? that *works* with your keymap 20:13:45 ... 20:13:46 I don't see why it isn't simple 20:13:59 * ehird facepalm. 20:14:04 why? 20:14:27 something SDL could help you handle this properly. 20:14:31 or whatever you want 20:14:34 FWIW I also don't see why they do it in a strange way 20:14:50 I assume there is a reason other than their ignorance 20:15:00 Deewiant, leetness? 20:15:07 It's not leet if it doesn't work 20:15:11 well true 20:15:23 Deewiant, yes it is. That is what leet is all about. 20:15:42 Doing things the hard way is cool, but if you're not actually doing what you're supposed to be doing it's lame 20:16:00 leet == saying stuff like "haxxxx11011oneone!!!" and not knowing how to program 20:16:15 script kiddies, and such 20:16:17 mostly 20:16:30 Deewiant, yes. But if it works it isn't leet 20:16:34 Well yeah, nowadays 20:16:37 if it works it is just cool 20:16:49 19:16 AnMaster: leet == saying stuff like "haxxxx11011oneone!!!" and not knowing how to program 20:16:55 I don't think that has ever been considered leet, ever 20:17:02 Damn late 90s and 00s messing up the meaning of 'leet' and all that 20:17:09 But, y'know, talking out of your ass works fine for most people. 20:17:12 ehird, except by those doing it. 20:17:30 ehird, anyway my point is leet lost it's original meaning 20:17:32 have you even -seen- anyone who claimed to be leet sincerely? 20:17:37 like hacker lost it's meaning 20:17:39 if not, stfu, because you're wrong 20:17:45 ehird, yes and they all spoke like that... 20:18:00 I just claim the word lost it's original meaning 20:18:27 hacker today isn't the same thing as it originally was either 20:19:02 Deewiant: I am guessing it's some sort of "we want the low-level keyboard access DOS does to work as much as possible the way it would without a real operating system in-between", but that's a bit strange reason. I'd prefer that they'd read input on the X keysym level or something, and then just have a mapping from those into keyboard scancodes so you could make it look to DOS like your keyboard was US, fi, or whatever. 20:19:39 fizzie, good idea. 20:19:39 hrm, is befunge-93 stack limited to 0-255? 20:19:41 fizzie: That's not really a good reason, since they can do exactly what you said and it'd work much better. 20:19:53 Deewiant: and be less portable 20:19:55 ehird, um signed I think? 20:19:58 ehird: How's that 20:20:00 most dosbox users are on windows 20:20:09 They'd read Windows keyboard events there. 20:20:19 -!- Hiato1 has quit ("Leaving."). 20:20:21 It's not like they don't have to write platform-specific input-handling now, too. 20:20:24 AnMaster: So, LONG. 20:20:36 ehird, not sure about 93. Check the spec 20:20:44 Yeah, except, the spec is shit. 20:20:48 Disclaimer: I've never really figured out how dos keymapping works. I vaguely remember "KEYB SU" being needed somewhere to get Finnish layout. 20:20:52 http://catseye.tc/projects/befunge93/doc/befunge93.html 20:21:05 And the Befunge 93 stack tends to be whatever the most comfortable integer size is. 20:21:21 In a QBasic implementation, you could maybe use a 16-bit integer stack. 20:21:23 keyb su,,C:\WINDOWS\COMMAND\KEYBOARD.SYS 20:21:27 su? 20:21:35 "Suomi", which is fi:Finland. 20:21:37 ah 20:21:43 Er, I mean, fi:Suomi is en:Finland. 20:21:44 DIM fs(24) AS STRING * 80 20:21:59 fizzie: I propose the ; operator for such uses. 20:22:01 ehird: 25? 20:22:06 "Suomi", which is fi;Finland. 20:22:19 Syntax: lang;word-in-language-in-which-we-are-speaking 20:22:27 Needs the context of a quoted word in [lang] to make sense. 20:22:48 "X" is Y;Z "Y:X is en:Z" 20:22:57 Dewi: er, yes. 20:23:04 Deewiant: 20:23:05 wait, why 20:23:06 I think it makes more sense for the language annotation to annotate the language of the word it appears with 20:23:08 ehird, so you escape any ; in the string then? 20:23:21 ehird: 83 20:23:23 ehird, 25*80 not 24*80 20:23:24 abnthe same problem with is :; there are no words with ; and : in them in any language assigned an ISO code. 20:23:29 er 20:23:30 ehird: It's 80x25 so either your language has weird syntax or one of those numbers is wrong 20:23:32 AnMaster: the same problem with is :; there are no words with ; and : in them in any language assigned an ISO code. 20:23:41 olsner: this is convenient in some cases, like fizzie's 20:23:47 ehird, well C;true; 20:23:55 C is not an ISO language code. 20:23:59 well ok 20:24:05 and true is not a C-defined symbol 20:24:17 ehird, #include 20:24:21 yes it is 20:24:22 you didn't say that. 20:24:28 I think "fi;Suomi, which is Finland" makes more sense 20:24:34 en:I en:can en:add en:that en:prefix en:to en:all en:my en:words en:to en:make en:it en:unambiguous, en:if en:you en:want. 20:24:35 ehird, well ok 20:24:52 fizzie, was that an English : or a Finnish : ? 20:24:54 en:Really, en:it's en:no en:problem en:for en:me. 20:25:02 DIM stkbase AS long 20:25:02 stk$ = VARPTR$(stkbase) 20:25:04 Fun fun. 20:25:05 fizzie: en:"you could also annotate sentences" 20:25:28 Although, well, more useful: 20:25:32 stk = VARPTR(stkbase) 20:25:36 (Then use poke and peek, naturally.) 20:25:40 olsner, en:that en:means en:more en:decoding en:processing 20:25:46 Hey, you could use that to write to video memory from fungespace. Maybe. 20:25:47 and I'd say the current medium has an implicit en: annotation for all utterances 20:26:01 en:since en:you en:need en:to en:expand en:it en:then 20:26:06 ehird: You need to also use VARSEG() and DEF SEG if you want to do that; not all basic variables need to be in the same segment. 20:26:16 ah right 20:26:19 Since QBasic can handle that whopping 160 kilobytes of user data. 20:26:42 DIM stkbase AS long 20:26:42 DEF SEG = VARSEG(stkbase) 20:26:43 stk = VARPTR(stkbase) 20:26:45 ehird, wait what? Encoding different funge instructions as colours on the screen? 20:26:46 Wall ah. 20:26:48 wow 20:26:50 that would be cool 20:26:56 AnMaster: no, that isn't what I was doing, but that would be possible 20:27:00 fairly trivial even 20:27:03 fizzie: 160kb? that's not a very even number... 20:27:05 I was going to add P and G 20:27:09 ehird, except that is int 20:27:11 olsner: That's what the help file says. 20:27:11 which are POKE/PEEK 20:27:14 AnMaster: not in -93. 20:27:20 ehm, 2*64+(1/2)*64 or something? 20:27:30 ehird, oh right. Funge space is byte and stack is signed int? 20:27:32 right? 20:27:48 Yes. 20:28:04 "* 20:28:06 Befunge-93 defines signed 32-bit stack cells and unsigned 8-bit Funge-Space cells." 20:28:09 ehird: Incidentally, if you just "DEF SEG = &HB800" and use POKE/PEEK to do all funge-space access (just remember to do a *2 to all coordinates) you get a real-time view of the funge space, and don't need a separate array for it in the code. 20:28:17 Deewiant, I was just copying that... 20:28:19 HB800? 20:28:21 Huh? 20:28:26 &HA000, no? 20:28:32 ehird: The text mode display memory starts at 0xB8000. 20:28:38 Oh, right. 20:28:52 Well, thing is, i'd kind of like to have fungeprograms drawing circles, y'know? 20:28:59 I guess that's unrealistic what with the immense speed of QBasic. 20:29:29 ehird, for EOF on input I suggest reflect. it is undef in 93, but reflect in 98 20:29:41 There is no EOF in QBasic. 20:29:45 so that forward compatibility is useful. 20:29:51 AFAIK. 20:29:52 ehird, what happens at end of file then? 20:29:58 There is no way to trigger that. 20:30:04 ehird, DOS has pipes... 20:30:12 Yes. 20:30:15 There's an EOF() function. 20:30:18 Right 20:30:23 but that's not for text input 20:30:25 keyboard, I mean 20:30:42 ehird, pipe and keyboard are different? 20:30:51 You seem surprised. 20:30:56 dos has pipes? 20:31:02 if you press ctrl-z, don't you get an EOF sent to the program? 20:31:12 bsmntbombdood: Yes, they're not really though. 20:31:14 bsmntbombdood: Yes, but they're run in sequence 20:31:14 It's not a(b()) 20:31:20 it's x = force(a()); b(x) 20:31:25 It's exactly a(b()) in a strict language 20:31:29 lame 20:31:30 well yes. 20:31:34 Sorry, 'call-by-value' 20:31:37 Ctrl-Z is the common way of indicating EOF; I'm not really sure on what level it happens. 20:31:37 yes|foo? 20:31:42 or, it's foo > tmp; bar < tmp 20:31:44 bsmntbombdood: it actually does this 20:31:46 yes > tmp; foo < tmp 20:31:53 you didn't like all that free disk space anyway 20:32:00 ehird: yes doesn't finish 20:32:08 ehird: Does it actually write it to disk and not memory? 20:32:08 yes., 20:32:13 bsmntbombdood: so it hangs. 20:32:14 Deewiant: yes 20:32:17 Heh 20:32:19 Didn't know that 20:32:38 after all, who has much ram? certainly not I. To fit anything of importance we must utilize our Hard Disk Storage Device 20:32:49 Ctrl-Z is the common way of indicating EOF; I'm not really sure on what level it happens. <-- under dos you mean? 20:32:50 And besides, why implement an extra command when it can elegantly isomorph to onest another? 20:32:54 AnMaster: Yes. 20:33:01 AnMaster: no, QNX> 20:33:02 right. on *nix it is ctrl-d and ctrl-z is suspend 20:33:22 ehird, well I was just trying to make sure he wasn't talking about "in general" 20:33:33 AnMaster: "*nix it is ctrl-d and ctrl-z is suspend" thanks, we didn't know 20:33:56 i know that ^C sends a SIGINT 20:34:01 Anyway, you could have those P/G work on the A000 video memory segment, and p/g (plus code-fetch and everything else) on B800, and a single new opcode to toggle the display mode between the mode 13h video and the fancy dynamic 80x25 text-mode view of funge-space. 20:34:04 ehird, you know. Not everyone here use OS X or Linux 20:34:08 some use. you know. Windows 20:34:09 ... 20:34:38 Heh, QBasic's manual advocates DO...LOOP over WHILE...WEND. 20:34:52 oh, why? 20:34:57 ehird, why? Because WEND sounds silly? 20:35:01 olsner: It's more fleximatron! 20:35:08 Also, DO...LOOP doubles as a do/while and a while! 20:35:14 Some befunge programs look pretty interesting when you watch the funge-space when they're running. Mooz's floating-point division, for example, which does the manual "long division" teached-in-school done-on-pen-and-paper thing. 20:35:14 Possibilities end not! 20:35:15 err? 20:35:43 fizzie, and with qbasic it would be slow enough to read! 20:35:53 I always pronounced WEND as "vänd" (sv:turn) 20:36:23 Don't befunge-93 programs usually use more stack than fs? 20:37:01 Yes, the DO...LOOP syntax is: either DO [{WHILE | UNTIL} condition] ... LOOP or DO ... LOOP [{WHILE | UNTIL} condition]. It's pretty silly. 20:37:02 olsner, :D 20:37:26 fizzie: you should be able to do 20:37:32 DO WHILE FOO ... LOOP UNTIL FOO 20:37:35 er 20:37:36 I learnt basic before really understanding that english was a separate language 20:37:37 DO WHILE FOO ... LOOP UNTIL BAR 20:37:42 Yes, I agree. 20:37:50 ehird, what would the semantics for it be? 20:37:56 exit when either is true? 20:37:57 it won't enter unless FOO, but if you have FOO, you get to go one turn having BAR! Although be careful not to lose your FOO... 20:38:03 AnMaster: Well, it'd be: 20:38:09 ah 20:38:10 do { if (!foo) break; ... } while (bar); 20:38:12 You can do "DO ... LOOP" for an infinite loop without needing a conditional, though. 20:38:13 yes you said it the line after 20:38:29 er wait 20:38:31 do { if (!foo) break; ... } while (!bar); 20:38:31 ofc 20:39:14 ehird, or if (!foo) goto thedayafter; do { ... } while (!bar); thedayafter: 20:39:20 why are we talking about basic? 20:39:26 bsmntbombdood: fuck you that's a terrible question 20:39:31 a better one would be for every other situation 20:39:34 not why? 20:39:34 "why are we not talking about basic?" 20:39:37 why basic? 20:39:40 I wonder too 20:39:49 Also the funnyness: END [{DEF | FUNCTION | IF | SELECT | SUB | TYPE}] ends all those block-style syntactic elements; "If no argument is supplied, END ends the program and closes all files." 20:39:55 BASIC is hardly BASIC. BASIC is most advanced programming in universe. 20:39:57 fizzie: :D 20:40:10 I think QBasic warns you about unterminated blocks, though, so you can't do it too easily by accident. 20:40:28 but how does this interact with out of order execution 20:40:34 I mean poking video memory 20:40:38 what about memory barriers? 20:41:06 sure I realise DOS didn't have to deal with that originally 20:41:11 but when run on modern hardware 20:41:13 how does it work 20:41:25 considering you can still run DOS on a modern computer. 20:41:31 It runs in the VM86 mode, I would guess that handles it somehow. 20:41:32 with all those fancy features 20:41:48 fizzie, lets say I boot a bios flash floppy 20:41:53 on a modern x86_64 20:42:05 what about then 20:42:12 I captured a wonderful video of my "Slowerpinski" program running. 20:42:14 Now you can enjoy, too: 20:42:22 ehird, youtube? 20:42:26 AnMaster: it never goes into protected mode 20:42:36 also, no, screencast.com, I've been trying out this Jing software thingymabob. 20:42:41 ehird, is cache disabled then? 20:42:46 It's kind of bad, for one I didn't write it, I intend to replace it with something of my own design. 20:42:53 But you'll need Flash. Unfortunately. 20:42:58 forget it then 20:43:02 Still, what a small price to pay for the magic of slowerpinski. 20:43:04 http://screencast.com/t/REP0xECE 20:43:05 for youtube there is an easy workaround 20:43:32 Another nice statement is SYSTEM, which you might assume runs a DOS command; but no: "SYSTEM: Closes all open files and returns control to the operating system." 20:43:33 ehird, I'll wait until you provide it in an open accessible format 20:43:47 AnMaster: I don't actually give a damn whether you watch it or not, surprisingly. 20:43:48 Fhehe 20:43:49 hehe* 20:44:15 Maybe fizzie has Flash. :P 20:44:26 I did watch it, and it was faster than I thought. 20:44:39 I guess it's that cycles: max thing. 20:44:47 Actually, that doesn't speed it up much. 20:44:59 It's probably the fancy-shmancy AND algorithm. 20:45:12 Still, pretty effing slow. 20:46:01 AnMaster: If you know of a good screen capture program that will work on OS X, let me select a portion of the screen to capture, record audio from the microphone _and_ computer, and can upload to a siteamabob at a click, do let me know. 20:46:21 Wait, there was audio? 20:46:23 ehird, how did you capture that one you linked? 20:46:34 fizzie: Mostly my mouse clicking and me breathing, but yes 20:46:38 AnMaster: Using Jing. 20:46:50 ehird, and it can't record to anything else? 20:46:58 If you buy it you can encode to H.264 20:47:15 ehird, this is a lot easier on linux you know ;P 20:47:15 anyway, I clicked the Jing menubar, clicked Capture, selected the piece of screen, and clicked record. Then I clicked stop when I was done, and it automatically uploaded it and gave me the link. 20:47:16 Oh. Well, if it wasn't anything more spectacular than that, I'll not bother locating headphones. 20:47:17 for once 20:47:22 AnMaster: it's easy on OS X, too 20:47:26 oh? 20:47:28 but I want to automate the upload 20:47:34 because i'm a lazy fuck. 20:47:36 ehird, -_- 20:47:47 fizzie: I could make it play music depending on the sierpinskiness of the segment it's doing. 20:47:57 sierpinskiness 20:47:59 .. 20:48:02 Yes. 20:48:03 never heard that before 20:48:09 how is it defined? 20:48:13 How close to 0 the &ing of the pixels are. :P 20:49:33 Hmm, how do you make PLAY play in the background, I wonderous. 20:50:07 Also, AnMaster, the video is just FLV. 20:50:11 So is YouTube 20:50:15 If you can play youtube you can play this 20:50:27 ehird, I looked at the source but couldn't find the text "flv" anywhere in it 20:50:33 I'll take a look. 20:50:34 so I don't know what url to extract 20:50:53 ehird, but yes if I have an url I can play flv 20:51:25 Anyone happenstance to have a network sniffer? :P 20:51:44 ehird, well I have wireshark of course. But doesn't help much with no flash 20:51:55 How can you play FLV without flash? Standalone decoder? 20:52:01 ehird, mplayer works 20:52:30 Is wireshark available for OS X? 20:52:36 no idea. Google? 20:52:43 kay 20:52:49 there is tcpdump too. And again no idea if it is for OS X 20:53:21 tcpdump is pre-installed on OS X 20:53:24 at least in Leopard 20:53:29 http://content.screencast.com/users/ehird/folders/Jing/media/a0341831-4bb6-4769-a6e0-b8517e43e2d8/00000006.swf is the actual SWF (without their swfplayer.swf thingy), if that's any help. I'll wireshark it up. 20:53:58 ehird, the swf doesn't help unless it is actually flv with a different name 20:54:09 I was just linking for interestual purposes. 20:54:26 brb, need to clean glasses 20:54:43 wireshark is 100mb wtf. 20:55:03 oh fuuuck, wireshark uses x11 20:55:12 so it just boots up x11 and loads a gtk clusterfuck 20:55:13 wonderful 20:57:41 Yikesers, lots of shit here. 20:59:00 Okay, um, it's not going ove HTTP. 20:59:59 Aha. 21:00:39 AnMaster: 21:00:40 46 57 53 56:46 GM T....FWS 21:00:41 0160 08 f4 92 19 00 f8 00 00 00 00 00 07 8c 80 00 00 ........ ........ 21:00:43 0170 00 00 00 15 ea 00 00 0a 96 00 7f 0b 04 00 00 00 ........ ........ 21:00:45 0180 0a 1a 9d 08 3f 03 16 00 00 00 96 11 00 00 63 73 ....?... ......cs 21:00:47 0190 4d 6f 76 69 65 46 50 53 00 07 0a 00 00 00 1d 00 MovieFPS ........ 21:00:49 01a0 3f af 0f 00 00 00 54 65 63 68 53 6d 69 74 68 20 ?.....Te chSmith 21:00:51 01b0 4a 69 6e 67 00 3f 09 be a7 04 00 de 05 05 05 03 Jing.?.. ........ 21:00:53 01c0 31 02 78 da ac bd 57 73 24 c9 92 a5 f9 9f 2e 29 1.x...Ws $......) 21:00:54 MovieFPS? 21:00:57 Is that a FLV file? 21:00:59 *an 21:02:05 AnMaster: as far as I can tell, it's http://content.screencast.com/users/ehird/folders/Jing/media/a0341831-4bb6-4769-a6e0-b8517e43e2d8/00000006.swf 21:03:45 http://content.screencast.com/users/ehird/folders/Jing/media/a0341831-4bb6-4769-a6e0-b8517e43e2d8/00000006.swf is 1.6MB, so probably it is embedded inside that 21:03:58 Right then, he can maybe just launch an FLV decoder on that. 21:07:30 Probably not, my VLC won't play it (but Media Player Classic seems to know enough about SWF format to play it) 21:07:59 Asztal_: mplayer? 21:08:29 no, a windows thing (http://sourceforge.net/projects/guliverkli/) 21:08:34 I know 21:08:37 I mean, does it work with mplayer 21:08:40 back 21:08:46 AnMaster: try running over 21:08:48 http://content.screencast.com/users/ehird/folders/Jing/media/a0341831-4bb6-4769-a6e0-b8517e43e2d8/00000006.swf 21:08:52 with mplayer 21:08:54 a sec 21:08:56 right 21:09:11 idoes it work? 21:09:13 *does 21:09:18 downloading it 21:09:39 no 21:09:44 :( 21:11:09 so it just boots up x11 and loads a gtk clusterfuck <-- yes and? 21:11:12 get more ram 21:11:16 if you have issues with it 21:11:17 what has ram got to do with it 21:11:28 ehird, why would x11 be an issue otherwise 21:11:33 * ehird facepalm 21:11:38 it looks like crap? 21:11:40 stop this thread of conversation before I throw myself out of a window 21:11:46 please don't encourage him Judofyr 21:11:49 well not under OS X iirc 21:11:58 I mean I ran Gimp under X11 on OS X once 21:12:02 it looked semi-native 21:12:07 * Judofyr goes coding some shit 21:12:58 ehird, you aren't used to hard conditions simply. You have to learn not to break down just because some program uses Motif 21:13:07 ehird: stop being so emo over dependencies 21:13:17 it's not dependencies I have an issue with. 21:13:17 and GTK is nothing compared to Motif 21:13:27 ehird, would you prefer if it uses Motif? 21:13:42 do you remember when I said I'd throw myself out of a window if you didn't stop this thread of conversation? 21:13:52 ehird, yes. I'm waiting. 21:13:54 ;P 21:13:56 bye-bye 21:14:02 nah 21:14:19 AnMaster: fucking great, now you made him go kill himself 21:14:37 olsner, Oh I thought he said throw himself out of windows 21:15:06 -!- ehird has changed nick to ehirdghost. 21:15:11 wooooh 21:15:14 booooh 21:15:19 anmaster i curse uponst thou 21:15:23 you shalt only use windowths 21:15:25 ehirdghost, nice a ghost. Don't cross the streams! 21:15:26 till the end of your days! 21:15:41 -!- oklofok has quit (Read error: 110 (Connection timed out)). 21:15:43 ln -s startx windowths 21:15:46 issue solved 21:15:49 you are not compliant? I see 21:15:52 * ehirdghost rips out AnMaster's brain. 21:15:52 there is no such thing as "windowths" 21:15:58 I shall keepth it until thoust complieth. 21:15:59 ehirdghost, doesn't work. 21:16:02 tinfoil 21:16:11 I went under it. 21:16:17 ehirdghost, tin suite 21:16:20 in fact 21:16:31 Evidence plox. 21:16:46 ehirdghost, evidence of you being a ghost plox. 21:17:11 i jumped out a fucking window 21:17:15 what more do you want, dickhead 21:17:16 :| 21:17:21 shall I go and slit my throat too 21:17:23 ehirdghost, autopsy? 21:17:25 or maybe poison myself 21:17:31 death certificate? 21:17:32 AnMaster: ghosts have no body, dumbo. 21:17:40 and i just died a minute ago. 21:17:46 ehirdghost, well the dead body would have to have a body 21:17:48 I mean duh 21:17:55 no 21:18:03 when you're a ghost it evaporates into your spiritual telekine 21:18:20 ehirdghost, evidence please? 21:18:26 you're a doo doo head 21:19:00 shall I go and slit my throat too <-- how? 21:19:09 I mean you have no body you said 21:19:24 there is a logical flaw there 21:19:30 my ghostular throat. 21:19:40 I'd metadie. 21:19:51 ehirdghost, would you become a ghost of a ghost? 21:19:59 No. 21:20:03 oh? 21:20:10 what then? 21:20:23 Fool. 21:20:33 you would become a fool? 21:20:52 that's nothing new ;P 21:21:06 Mere mortals may not dabble in the artistrechnitionry of ghostular beings. 21:21:18 ehirdghost, well, In the name of science! 21:21:31 No match for ghostular sciencemafindatron. 21:21:53 indeed not. Because it isn't called that 21:22:05 try post mortal research 21:22:05 If you don't shut up I'll make sure you're reincarnated as a dungbeetle. 21:22:44 ehirdghost, belief in ghost is mutually exclusive with belief in reincarnation I think 21:22:48 ghosts* 21:22:58 God has a random number generator, AnMaster. 21:23:04 Sometimes it returns 2 and you get to decide yourself. 21:23:08 ehirdghost, I don't believe in god. 21:23:16 And I'm sure you didn't believe in ghosts either, but look at me. 21:23:50 Anyway, God does indeed not play dice. That's way old fashioned. 21:24:04 ehirdghost, I still don't. Just an optical illusion. Or a result of your subconscious when you are under a lot of stress. 21:24:04 He has infinite infinite-core infinity machines. 21:24:15 ghosts that is 21:24:15 AnMaster: Then you will look very silly in the logs. 21:24:25 You talking to some "ehirdghost" character that isn't there. 21:24:31 ehirdghost, well that is because I believe you are faking this. 21:24:41 Tut, tut. 21:24:44 You know. Like an actor playing Hamlet's father. 21:25:05 though not as well obviously 21:32:45 man 21:33:25 i smoked pot for the first time last night, and it reconfirmed my belief that i should be a linguist. 21:33:36 ... what? 21:33:51 pot tends to do that. 21:33:57 well 21:34:04 it did it in an unexpected way 21:34:09 pot makes you believe you should be a linguist? 21:34:27 all throughout i was essentially incapacitated. couldnt focus long enough to really do anything coherent 21:34:29 I finally beat the computer at cheese 21:34:49 lament, :D 21:34:54 typo for chess I hope? 21:34:56 had difficulty moving about without kind of being stumbly 21:34:57 etc 21:34:58 but but 21:35:18 psygnisfive, did it make you want to not do it again? 21:35:22 no 21:35:26 oh :( 21:35:31 a friend said something that was linguistically interesting and i couldn't stop myself from rushing over to my notebook and writing it down 21:35:51 actually the difficulty of standing the feeling was i think in part due to the setting 21:35:55 20:35 AnMaster: oh :( 21:35:56 psygnisfive: did you listen to music at all? 21:35:59 why do you hate people having fun, AnMaster 21:36:00 no 21:36:03 i WANTED to 21:36:11 listen to music, it might make you want to become a musician :) 21:36:13 i wanted to just curl up into a ball and listen to music and melt away 21:36:20 oh i already want to lament :P 21:36:42 but instead i had to lay there and listen to my two companions as they watched some silly movie 21:36:44 ehirdghost, I hate drugs. I _used_ to know someone who died due to an overdose of heroine... 21:36:57 heroin 21:37:03 AnMaster: umm, people are stupid 21:37:05 lament, typo 21:37:13 why is that the drugs's fault 21:37:16 you could die from an overdose of heroine too. 21:37:20 it's just like any addiction 21:37:23 if wonderwoman sat on your face until you suffocated 21:37:31 psygnisfive: an interesting mental image. 21:37:35 best way to die 21:37:37 ehirdghost, I do not wish to speak about it. And fucking read what I said. 21:37:42 * Judofyr wants to die from programming... 21:37:59 AnMaster: I read what you said, thank you very much. I also answered coherently and I believe rebutted your arguments. 21:38:20 I think you're letting emotions get in the way of rational reasoning. 21:38:21 ehirdghost, have any close friend to you died from an overdose of a drug? 21:38:41 No; but if they had, I wouldn't start hating drugs, because that's a stupid and irrational thing to do in response to that. 21:39:13 ehirdghost, Well then I can see why you don't understand. I have nothing more to discuss with you. 21:39:32 I don't understand many irrational things. 21:39:37 I'm addicted to weed a little 21:40:02 i don't see myself doing heroin though 21:40:03 AnMaster & ehirdghost: you two sounds like an old couple :-) 21:40:05 Funny, though, how you should get on a rational high horse ("I don't believe in god", "I don't believe in ghosts, just an illusion") right before claiming a wonderful non-sequitur 21:40:12 lament, as long as you can stay on top of it... 21:40:15 Judofyr: Tell me about it. 21:40:36 Judofyr, I'm not sure what that is supposed to mean... 21:40:47 my addiction to caffeine is more obvious 21:42:25 I'm going to do drugs and jump out a window now, simultaneously, I mean, er, brb -> 21:42:43 you do that. 21:46:33 -!- kar8nga has joined. 21:50:38 -!- Mony has quit ("Quit"). 21:52:33 fizzie, there? 21:52:42 I just found something useful for you in jitfunge 21:56:03 http://rafb.net/p/KOu0WM19.html <-- ehird: do not repaste, that is copyrighted material :/ For log readers: Please see "Software Optimization Guide for AMD64 Processors" revision 3.06, section 5.15 21:56:25 fizzie, ^ 22:02:39 The instructions they mention are SSE-only, though. And it'll be a while before I get to the optimizationary stage with jitfunge, you may need to remind me about that later. 22:03:03 fizzie, using conditional move should be another nice way to speed things up in certain cases. 22:03:12 fizzie, if I remember... 22:03:21 That I already do to some extent. 22:03:28 oh? nice 22:03:36 Well, I think I do. 22:04:34 Okay, there is one single place where I emit a CMOVcc instruction. But still. 22:05:07 -!- bsmntbombdood has quit (Read error: 113 (No route to host)). 22:05:22 The code generated by jitfunge is pretty sucky. 22:05:29 ok 22:05:32 -!- bsmntbombdood has joined. 22:05:56 And my register allocator is borderline sucky, it doesn't even handle spilling correctly IIRC. Which is quite a lose, given how register-starved x86-32 is. 22:06:02 fizzie, and yes I know they are SSE only. But you could fall back on non-SSE, either at runtime or compile time 22:06:38 fizzie, writing a good register allocator is hard iirc 22:06:43 and making it fast is even harder 22:06:56 Yes, but mine is so far from good it's a bit embarrassing. 22:07:07 go fix it then? 22:07:27 There's a lot more I have to fix; but I'll get to it, some day. 22:07:40 fizzie, or use llvm for backend 22:07:51 it has a good register allocator 22:08:51 It's not like I haven't been thinking about that. But I have a feeling I'd lose the otherwise pretty spiffy automagic stack-underflow check, since it requires pretty low-level control on what kind of instructions can be emitted to access the stack. 22:09:08 ah 22:09:09 ok 22:09:54 fizzie, which way does your stack grow? 22:10:37 -!- KingOfKarlsruhe has quit (Remote closed the connection). 22:10:53 Up, currently; didn't you ask this some time ago? And mostly it grows up for the "more likely to have free space for extending the stack that way" reason, even though it probably doesn't really matter, and anyway there's the attempt to place it into middle of the wilderness of virtual addresses so that there'd be room both ways. 22:11:11 maybe I did but forgot 22:11:29 fizzie, it does matter if you will implement fast STRN 22:11:32 I'll have to think about the llvm thing. Currently the jitfunge code is pretty convoluted; maybe if I cleaned it up a bit so that there'd be a clean-ish-er interface between code generation and the rest of the code, I could even experiment better. 22:11:32 or such 22:11:47 fizzie, because you will end up like me, with slow reversing string 22:11:53 and for y too, to push environment 22:11:57 more slow string reversion 22:12:00 reversing* 22:12:13 and yes I grow up for ease of growing too 22:12:15 realloc() 22:12:39 fizzie, or just steal the register allocator of llvm 22:12:50 it works with 1024 virtual registers iirc 22:13:40 I have a rather non-fast approach to all dynamic uppercase instructions, at the very least there's a full all-funge-values-from-registers-to-stack flush plus a couple of setup instructions to store the stack pointer in edi (or whatever I kept it in) to the global stack-top variable. 22:13:58 Since you never know what the instruction might end up doing. 22:14:45 well true 22:15:03 fizzie, you will likely need to do such flushes for the core too for some things 22:15:06 like i and o 22:15:29 fizzie, some fingerprint instructions could be implemented as "compile inline" 22:15:44 especially FPSP, FIXP and FPDP would be good targets for that 22:15:48 very short generally 22:15:57 Yes, I generate flush+function-call for all fingerprint instructions and core IO operations. Although that's partially because there's a C++ class you can implement to specify what kind of IO the interpreter does. 22:16:11 -!- Sgeo has joined. 22:16:18 fizzie, have you read the C++ FQA? 22:16:29 why not use a template to specialize it while you are at it! 22:16:35 Yes. 22:16:59 fizzie, why C++? Why not C? 22:17:17 Actually that part is reasonably FQA-compatible. FQA answer: "If you want to be able to work with many different implementations selected at run time, abstract base class is the way to go." 22:17:41 fizzie, I don't remember that one. But ok 22:18:13 I've ask myself the "why C++, why not C" question many times. 22:18:29 did you reach any answer? 22:18:37 But, you know, it was the C++ period; there is no rational answer. 22:18:50 fizzie, another thing: don't put a branch instruction across a 16 byte boundary. 22:18:55 if possible 22:19:17 Er, well, I'm sure I could align those; what's the reason? 22:19:33 fizzie, branch prediction works better on many CPUs that way 22:19:49 also aligning is not recommended, better reorder instructions if possible 22:20:32 Given my current code-generation strategy, that's not exactly trivial. But sure. 22:21:35 fizzie, well the overhead of the nops would be larger than the gain if you have too many nops. IIRC someone said that: 1 byte alignment > branch over boundary > huge alignment 22:21:42 or was it 2? Well anwyay 22:21:46 anyway* 22:22:14 fizzie, both the AMD and Intel optimizing guides are good and interesting reads. 22:22:18 Gah, where is asiekierka when I need him 22:22:25 some advice is general. Some is CPU specific 22:22:30 some even contradict. 22:22:34 but usually not 22:23:18 I do that full stack-flush for pretty much every 'p' instruction (except those with constant and small x/y arguments) too, since the 'p' might end up invalidating the currently-being-executed trace. Although I guess I could do some of the cleanup only in case the instruction actually did something like that; it was just simpler to flag 'p' as a flush-stack-before instruction. 22:23:19 fizzie, I just got a crazy idea... 22:23:59 fizzie, Concurrent JIT 22:24:12 Pretty much all "advanced" optimilization things boil down to the fact that I don't have any sensible intermediate representation for code; that's why the llvm assembly would make sense. 22:24:13 one core runs the code, another compiles and optimises 22:24:27 Deewiant: Do elaborate what you need him for, btw. 22:24:35 fizzie: DOBELA. 22:24:44 Deewiant, have you gone insane? 22:25:01 Not any more than previously, I don't think 22:25:16 Oh, the 99 % TC language. 22:25:43 I guess what's meant by that is "most likely, but not proven"? 22:25:53 Guess so, it was just amusingly expressed. 22:26:02 which one was it? 22:26:07 was it the bully automaton? 22:26:43 Deewiant, fizzie: http://paste.lisp.org/display/77084 <-- Have I gone insane? 22:26:51 well ais suggested so 22:26:56 don't remember if you saw it 22:27:08 also that syntax highlighting sucks 22:27:13 can't highlight C99 comments 22:27:18 AnMaster: GCC creates worse code? 22:27:27 I did take a peek. It is rather... verbose. 22:27:27 Deewiant, yes. 22:27:40 But whatever floats your funge-boat, I guess. 22:27:42 fizzie, I have two level of fallbacks 22:27:53 fizzie, that would be FPSP? 22:28:05 Groan. 22:28:05 -!- BeholdMyGlory has quit (Remote closed the connection). 22:32:43 tumtitum 22:35:50 fizzie, how do you spill registers? 22:36:45 AMD suggests adjusting stack pointer and using MOV rather than pushing. Or out of order execution won't work properly 22:38:01 -!- Corun has joined. 22:38:19 I don't. 22:38:33 http://pastie.org/417121 I am breaking the law no more than AnMaster 22:38:33 fizzie, you said you did for p? 22:38:34 "it doesn't even handle spilling correctly", like I said. 22:38:46 Oh, well, that. I don't count that. 22:38:53 I, uh, though that the microcode RISC compiler made PUSH do just that? 22:39:15 I do use MOV, because the funge-stack pointer is not in ESP. 22:39:59 pikhq, I just mentioned what AMD said in AMD64 Architecture Programmer’s Manual Volume 1: Application Programming 22:40:14 section 3.10.9 22:40:14 Incidentally... if I'm in a leaf function (or at least a part where there's no calls), can I pretty much do whatever I want with ebp/esp (assuming I don't care for things like gdb stack-trace in case of a crash) without having to worry about things breaking if, say, an interrupt occurs? 22:40:38 ehirdghost, that url times out 22:40:41 *shrug* 22:40:44 Not for me. 22:40:49 get a better isp 22:41:23 ehirdghost, fine, I will just refer to the section in the future, never paste it 22:41:25 :) 22:41:30 or paste in msg 22:41:35 a lot better for log readers 22:41:37 Yes, and I'm sure everyone else will ask for a link. 22:41:37 AnMaster: Hmm. Curious. 22:41:50 I should read that some time. 22:41:50 I think there are architectures/environments where you're contractually obliged to keep some amount of space free and accessible via a stack-pointery registers for emergency register-shadowing, for example. 22:41:59 pikhq, fun bed time reading ;) 22:42:03 * pikhq has been meaning to learn long mode assembly. 22:42:11 pikhq, there are 5 volumes btw. 22:42:15 I know a precious little about x86 low-level details for a JIT-writer. 22:42:39 Big deal? 22:42:57 I read voraciously. 22:43:33 1: Application programming 2: System programming 3: General purpose and System Instruction reference 4: 128-bit media instructions 5: 64-bit media instructions and x87 instructions 22:44:08 Should prove interesting. 22:44:29 Probably not the best thing for a n00b to assembly to read, but I already know assembly, so... 22:44:49 (real mode and 32-bit protected mode, x86. Whooo.) 22:44:50 pikhq, each is a pdf of around 300-500 pages 22:45:02 Glee. 22:45:21 pikhq, the AMD64 Optimization guide is a separate 384 pages pdf btw. 22:45:28 Double-glee. 22:45:38 pikhq, the index works well. 22:45:44 Then, I will know more about x86-64 than any one man has any right knowing. :p 22:45:51 I can usually find what I want quite quickly 22:46:04 (I am, of course, at this point mostly joking) 22:46:15 pikhq, the type is quite large 22:46:25 ;P 22:46:32 Probably good reference material, though. 22:47:11 pikhq, On a more serious note: the Intel docs tend to be much more densely written. And about as many pages. And harder to find what you want in. 22:47:17 Just a fair warning. 22:47:29 (if that is correct English) 22:47:30 % ghci -package dph-par uncomfortably-parallel.hs +RTS -N2 -g2 -RTS 22:47:42 ehirdghost, what does uncomfortably-parallel.hs do? 22:47:48 AnMaster: it has two functions 22:47:52 oh? 22:47:57 doubleP, which parallely doubles a paralelly array of ints 22:47:58 Yeah, I had heard that AMD made somewhat more useful docs. 22:48:05 and big, which is a parallely array of 1000000000 ints 22:48:20 heh 22:48:24 dph-par is the multicore data parallel haskell package 22:48:29 +RTS -N2 -g2 -RTS means 22:48:35 "make the runtime use 2 threads, and use 2 threads for GC" 22:48:41 hmm wait 22:48:45 it should be cores+1 right? 22:48:50 ehirdghost, Hm. I hope that compiles into some threads running SSE instructions over it. 22:48:54 +RTS -N3 -g3 -RTS 22:48:56 if yes it should be very fast 22:49:01 AnMaster: I didn't enable vectorization 22:49:07 because it fails on my code; need to look into that 22:49:19 ehirdghost, well you could gain a 4x speed up from vectorization 22:49:21 also wth 22:50:22 : memory allocation failed (requested 4000317440 bytes) 22:50:24 Bollocks. 22:50:28 * ehirdghost chops a zero 22:50:57 So, uh... do I need to have a sensible stack frame setup (ebp/esp) if I don't call anyone? I mean, I guess in a modern sort of operating system an interrupt actually does something context-switch-like to get a different stack? 22:51:16 Hmm, come on ghc, use that cpu up, you're meant to be using 2 threads. 22:51:41 Guess my code isn't uncomfortably vectorizable en- 22:51:41 Oh. 22:51:44 182% CPU usage. 22:51:49 Er, I think that's the garbage collector. 22:52:42 So anyway, here's the code. 22:52:47 {-# LANGUAGE PArr, ParallelListComp #-} 22:52:47 {-# OPTIONS -Odph #-} 22:52:48 import qualified Data.Array.Parallel.Prelude as P 22:52:50 import qualified Data.Array.Parallel.Prelude.Int as PI 22:52:52 doubleP :: [:PI.Int:] -> [:PI.Int:] 22:52:54 doubleP xs = [: x PI.* 2 | x <- xs :] 22:52:56 big :: [:PI.Int:] 22:52:58 big = P.replicateP 100000000 42 22:53:00 adding -fvectorise to OPTIONS will make the vectoriser die with an evil error message. 22:53:03 Have fun. 22:53:04 wow 22:53:06 just wow 22:53:09 What 22:53:15 P.S. "doubleP big `seq` ()"; you don't want to print _that_ out. 22:53:15 I ate a bit of garlic flavoured bread 22:53:20 Wow. 22:53:21 Amazing. 22:53:24 then a bit of choclate 22:53:25 err 22:53:33 Unbelievable. 22:53:33 chocolate* 22:53:37 and the mix 22:53:42 was very tastey 22:53:44 tasty* 22:53:47 just wow 22:53:47 and then you exploded 22:53:56 ehirdghost, no, I haven't yet 22:54:00 3...2...1... 22:54:02 I'm not sure whether I mentioned this already, but QBasic kind-of reminds me of MATLAB; the actual operations aren't necessarily slow (MATLAB's pretty fast at inverting a matrix, for example) but all code-flow including interpreted MATLAB script, like a for loop or something, is slow as anything. 22:54:05 Hey, now you're a ghost like me. 22:54:05 still here 22:54:10 wrongf 22:54:14 wrong* 22:54:30 http://www.richardsimoes.com/gravity.html A fun game. Bring a canvas-supporting fastish JSy browser. 22:54:33 And a mouse. 22:54:35 So, uh... do I need to have a sensible stack frame setup (ebp/esp) if I don't call anyone? I mean, I guess in a modern sort of operating system an interrupt actually does something context-switch-like to get a different stack? 22:54:39 well not on x86_64 22:54:48 And a nack for being a star. 22:54:50 you can use 128 bytes beyond the stack pointer there 22:54:57 fizzie, which is nice. 22:55:18 from man gcc: 22:55:19 -mno-red-zone 22:55:19 Do not use a so called red zone for x86-64 code. The red zone is mandated by the x86-64 ABI, it is a 128-byte area beyond the location of the stack pointer that 22:55:19 will not be modified by signal or interrupt handlers and therefore can be used for temporary data without adjusting the stack pointer. The flag -mno-red-zone dis‐ 22:55:19 ables this red zone. 22:55:42 iirc it doesn't/didn't work properly with the linux kernel 22:56:07 I seem to recall Linux caring about the ABI. 22:56:09 fizzie, and I think you could run into issues with *signal* handlers if you didn't do this properly 22:56:17 pikhq, hm? 22:56:29 Just saying "Yeah, probably not." 22:57:03 Right, there are signal handlers too. I just would like to have ESP point at the Funge stack. 22:57:08 pikhq, did you just disagree or agree with me? 22:57:20 Agree. 22:57:23 ok 22:57:33 In about as vague a way as possible. 22:58:06 pikhq, I think the gcc man page used to say that this option was for the linux kernel. But since it doesn't any more in the version I have here I guess the linux kernel now supports it. 22:58:34 Eh. 22:58:39 does anyone know why ld(1) is so slow? 22:58:47 i mean seriously it takes seconds to link a trivial program 22:58:55 ehirdghost, I know why. 22:58:57 bad design. 22:59:06 that's got to be some _really_ bad design 22:59:12 ehirdghost, I remember reading a blog post by the initial ld author 22:59:17 if this is binutils ld 22:59:24 bsd 22:59:35 well, er 22:59:36 binutils has ELF support more or less bolted in afterwards. 22:59:36 no 22:59:37 custom 22:59:39 had* 22:59:44 Darwin ld 22:59:44 -!- Corun has quit ("Leaving"). 22:59:45 for Mach-O 22:59:46 ehirdghost, then I don't know. 22:59:55 it's like this on every platform 22:59:56 Binutils ld... Wasn't that mostly designed for the sake of flexibility, and not being even remotely speedy? 23:00:23 pikhq, well that too. It interprets a linker script to find out how to link 23:00:31 there is a new linker under development 23:00:33 called "gold" 23:00:41 yes, by google 23:00:42 *sigh* 23:00:42 it is written in C++ 23:00:45 does it work for mach-o? 23:00:48 That's hackers for ya. 23:00:48 pikhq: why sigh/ 23:00:50 ehirdghost, not google iirc 23:00:53 er, no 23:00:55 gold is by google 23:01:06 Gold is a linker for ELF files. It was added to binutils March, 2008[1][2], and first released in binutils version 2.19. Gold was developed by Ian Lance Taylor of Google[3]. 23:01:11 it stands for GOogle LD 23:01:16 http://google-opensource.blogspot.com/2008/04/gold-google-releases-new-and-improved.html 23:01:23 ehirdghost, err I remember reading original binutils ld author worked on it 23:01:29 maybe he works at google. 23:01:29 maybe he works for google 23:01:32 yeah 23:02:07 "Ian Lance Taylor" 23:04:05 -!- kar8nga has quit (Read error: 104 (Connection reset by peer)). 23:10:30 * bsmntbombdood reads 23:12:12 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)). 23:12:25 -!- tombom has quit ("Peace and Protection 4.22.2"). 23:15:10 bah, boring 23:15:20 it's simply a list of micro-optimizations 23:16:31 yow, new freshmeat.net 23:20:19 ehirdghost, which was/is best old or new look? 23:20:30 both are ugly 23:20:38 the newer is slightly easier to read, but has more cruft. 23:21:26 why a white box beside the logo? 23:21:42 what's freshmeat? 23:22:04 that's like asking "what is sourceforge" 23:22:20 http://freshmeat.net/about 23:23:03 borign 23:23:12 why did you ask then 23:23:32 it's simply a list of micro-optimizations <-- what is? 23:23:46 the amd64 optimization guide 23:24:02 AnMaster: white box beside the logo? 23:24:03 Excuse me what 23:24:11 bsmntbombdood, well yes. The reference docs are more interesting 23:24:14 "use 64 bit operations instead of 32 bit operation when 64 bits are needed" 23:24:16 no fucking shit? 23:24:34 AnMaster: link 23:24:37 bsmntbombdood, some are like that yes. Some are more interesting. Check the SSE stuff. 23:24:44 bsmntbombdood, a sec 23:24:47 ehirdghost, what? 23:25:01 22:21 AnMaster: why a white box beside the logo? 23:25:03 I see no white box 23:25:03 ehirdghost, see the logo at the top? 23:25:06 Yes 23:25:16 ehirdghost, see the huge box to the right of it? 23:25:19 for me it is white 23:25:26 Oh. 23:25:28 There are ads there, for me. 23:25:33 Since I don't block them. 23:25:37 ehirdghost, oh ok 23:25:42 how can you live with ads. 23:25:49 I don't notice them. 23:26:08 And some sites's layouts go a bit unbalanced-looking without them filling space, so. 23:26:58 bsmntbombdood, this is part 1 of 5 http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24592.pdf 23:27:27 bsmntbombdood, for links to all: http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html 23:27:37 -!- GregorR has quit (Read error: 110 (Connection timed out)). 23:27:47 i requested all the intel x86 docs once 23:27:53 that was funny 23:27:55 bsmntbombdood, oh? 23:27:59 they are sitting in my closet somewhere 23:28:15 bsmntbombdood, I think they are available as pdfs nowdays 23:28:17 it's like 8 volumes 3" thick 23:28:25 bsmntbombdood, also what did it cost you? 23:28:30 nothing 23:28:39 huh 23:28:57 they send them out free 23:30:23 they can't sell any processors if no one develops for them 23:30:28 ok 23:30:45 bsmntbombdood, I prefer pdf. Comes with Ctrl-F to speed up searching 23:32:00 I prefer hypertext that's displayed how I want, with a plaintext open markup language behind it that I can copy and paste from; instead of a closed-world NowYourMonitorCanBeAnInflexiblePieceOfPaper propreitary format that doesn't let me view it how i want it. 23:32:01 > 23:32:31 ehirdghost, Um I can view it how I want it 23:32:53 ehirdghost, if your pdf viewer follows the copy protection stuff replace it 23:32:55 You can change a PDF's font? Get rid of the irritating two-column format? Run sed over it? 23:32:57 with an more open one 23:33:05 I'd like to know how. 23:33:05 ehirdghost, pdf2edit 23:33:25 well: pdf2ps | ps2edit 23:33:37 ps2ascii ps2eps ps2epsi ps2frag ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr ps2pk ps2ps ps2ps2 23:33:39 have those 23:33:42 and pdf2dsc pdf2ps 23:33:46 Go on then, I'll give you a tex rendered PDF; you change the font to something more respectable, let me resize the window to resize the text (instead of just zooming), make it two columns and flush left, ... 23:33:57 If you can do it in <2mins I'll be impressed. 23:34:05 ... More respectable? 23:34:16 You mean it comes more respectable than Computer Modern? 23:34:16 ehirdghost, well ok you are right about that bit. But I prefer pdf over xps 23:34:18 pikhq: That was a joke. 23:34:28 Good, good. 23:34:33 pikhq, no it doesn't. CM > * 23:34:43 Computer Modern doesn't really work too well on a screen IME. 23:34:49 Too many curly parts. 23:34:55 Yeah, it's very much a print font. 23:35:10 I requested Zilog's Z80 databook once, in a physical format; and it was actually pretty useful when writing some TI-86 code. I gave it away as a gift, though. 23:35:12 it's much easier to read dead trees 23:35:27 Wonderful on dead trees, though. 23:35:37 Most of the book was just timing diagrams, though. 23:35:43 i love computer modern 23:35:59 I find screen reading as easy as book reading, but that's for a justified book with a good serif font with sufficiently bold text, and a sans-serif or lightweight serif screen font that's sufficiently light and ragged right 23:36:03 So, very different requirements. 23:36:26 I can't even find Intel documentation any moer 23:36:27 more* 23:36:29 where is it 23:37:12 http://www.intel.com/software/products/documentation/vlin/mergedprojects/analyzer_ec/mergedprojects/reference_olh/reference_hh/intel_s_software_developer_s_manuals.htm has links. 23:37:25 hard to find 23:37:40 ehirdghost: Yeah; different fonts for different purposes. 23:37:50 The developer.intel.com search should find 'em with the right keywords, like "architecture" and "manual". 23:38:02 I prefer adjusted margins on screen 23:38:11 fizzie, was trying on intel.com... 23:38:12 http://developer.intel.com/products/processor/manuals/index.htm 23:38:17 see "order a printed copy" 23:38:20 http://www.intel.com/products/processor/manuals/ also looks like a good list. 23:38:23 Yes. 23:38:43 I wish that web browsers would do justified text rendering, though... 23:38:54 I was thinking of their optimization guide thingy 23:39:02 tex's justification algorithm is so complicated 23:39:07 yes 23:39:10 Intel® 64 and IA-32 Architectures Optimization Reference Manual is on that page. 23:39:19 bsmntbombdood: and also awesome. 23:39:20 try the package microtype to get even better results 23:39:25 work best with pdftex 23:39:29 or luatex 23:39:34 works* 23:39:36 I love XeTeX 23:39:53 ehirdghost, no idea if it supports micro-typography 23:40:00 Yes 23:40:05 ehirdghost, like optically straight margins? 23:40:07 Yes 23:40:10 It's all about that kind of stuff 23:40:20 ehirdghost, how do you turn it on? 23:40:21 for it 23:40:28 Same way as normal 23:40:30 I believe 23:40:36 ehirdghost, which is? 23:40:47 for pdftex you use the package microtype. And docs says it only works for pdftex 23:40:48 I gather that microtype is basically a set of improvements on TeX's justification algorithm. 23:40:48 Erm, the microtype package thang? 23:40:49 -!- oerjan has joined. 23:41:03 pikhq, kerning too + a few other things 23:41:09 hmmm 23:41:09 http://www.tug.org/pipermail/xetex/2004-October/001206.html 23:41:11 that's from 2004 though 23:41:12 also 23:41:15 xetex has kerning and stuff 23:41:20 built in 23:41:21 Ah. Improvements on its kerning, also... 23:41:34 http://nitens.org/taraborelli/latex 23:41:38 that was made with xetex 23:41:44 so, very typographically sound 23:41:59 ehirdghost, http://www.ctan.org/get/macros/latex/contrib/microtype/microtype.pdf 23:42:04 that is what I'm talking about 23:42:09 I am aware. 23:42:31 ehirdghost, can it do those things? 23:42:42 I think so. 23:42:49 The whole point of XeTeX was to improve the fonty stuff. 23:42:55 And Unicode support 23:43:08 And Opentype instead of METAFONT. 23:43:11 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=XeTeX 23:43:15 ehirdghost, well what about the optically straight margins bit 23:43:19 that in particular 23:43:37 I think so 23:43:40 I'm no expert, but I think so 23:44:49 ehirdghost, also how does xetex work on non-OSX? 23:44:59 How does it not? 23:45:01 the mail you linked talks about quartz 23:45:04 http://www.tug.org/pipermail/xetex/2004-October/001206.html 23:45:08 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex_linux 23:45:08 which iirc is OS X specific 23:45:20 XeTeX is part TeX Live. 23:45:30 Part of, rather. 23:45:32 pikhq, I know. I have it installed 23:45:44 I was just trying to make sense of how 23:45:50 Same damned way. 23:46:08 pikhq, not the quartz bit obviously 23:46:19 different code on different platforms WHAT 23:46:22 as the page ehirdghost linked mentioned 23:46:23 Impossible 23:46:54 ehirdghost, depends on how much needs to be ported 23:46:59 and what can be the same 23:47:19 FreeType, I suspect, is used instead of Quartz for font rendering. 23:47:20 -!- Slereah has joined. 23:47:33 No. OpenType. 23:47:43 ehirdghost: OpenType is a font *format*. 23:47:47 err right 23:47:49 sorr 23:47:49 misread 23:47:58 I like METAFONT 23:48:01 what is wrong with it? 23:48:02 FreeType is the Linux implementation of an OpenType renderer. 23:48:10 AnMaster, it doesn't do Unicode. 23:48:18 And OpenType is, iirc, more featureful. 23:48:20 And more widely supported. 23:48:24 And more fonts are available in it. 23:48:28 pikhq, I included some Swedish text encoded as UTF-8 with no issues 23:48:28 Yeah. 23:48:36 to pdftex yesterday 23:48:45 used Latin Modern I think 23:48:58 don't remember what font format that is 23:49:16 i never metaf *hit by falling anvil* 23:49:23 PDFTeX uses TrueType and Type 1 fonts. 23:49:44 "XeTeX on Linux depends on an extended version of the DVIPDFMx driver by Shunsaku Hirata and Jin-Hwan Cho to generate PDF output"; that's what it does on Linux, instead of Quartz. 23:50:03 Fair enough. 23:50:13 Of course, I don't know what that driver does. 23:50:15 fizzie: Stop reading! You're not allowed to. You have to ask questions of people who don't know the answer. 23:50:19 Probably part of TeXLive's dvi2pdf. 23:50:28 ehirdghost, I read it. 23:50:31 as the page ehirdghost linked mentioned 23:50:37 just pikhq didn't 23:50:45 Yes, you read it, that's why you asked me straight after. 23:50:55 ehirdghost, ? 23:51:20 ehirdghost, what are you talking about? 23:51:55 ehirdghost, I didn't ask you after. 23:51:56 ... 23:52:07 sure you did 23:52:08 ehirdghost, also how does xetex work on non-OSX? 23:52:09 How does it not? 23:52:09 the mail you linked talks about quartz 23:52:09 http://www.tug.org/pipermail/xetex/2004-October/001206.html 23:52:10 you kept asking what it used instead of quartz 23:52:11 which iirc is OS X specific 23:52:14 http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=xetex_linux 23:52:24 after that I didn't ask 23:52:37 ehirdghost, what line after that? 23:52:44 ff 23:53:01 ehirdghost, does that mean you admit you were wrong? 23:53:09 no, it means i can't be bothered to continue 23:56:08 Speaking of web browsers and text layout, there's the horrible thing called sIFR; http://www.mikeindustries.com/blog/sifr/ -- the "How it works" explains a very nice method of using up spare CPU cycles. 23:56:28 Oh yes; I hate those things. 23:56:59 "Actionscript inside of each Flash file then draws that text in your chosen typeface at a 6 point size and scales it up until it fits snugly inside the Flash movie. " 23:57:00 Hahaahaha 23:57:05 Best algorithm ever 23:57:28 * oerjan swats straight through ehirdghost -----### FOR SCIENCE! 23:57:34 -!- Slereah_ has quit (Read error: 110 (Connection timed out)). 23:57:37 I felt nothing. 23:57:51 The visual representation is just an astral equiprojection of my statis, you know. 23:58:00 * oerjan repeats the experiment for statistical significance -----### 23:58:09 La la la la. 23:58:32 Like the statistical saying goes: "With a large enough N, all bugs are shallow." Or something like that, anyway. 23:59:17 well, there is some probability that it says that