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