←2010-01-31 2010-02-01 2010-02-02→ ↑2010 ↑all
00:00:34 * MissPiggy wants to revamp education with computers as an integral part..
00:01:03 <MissPiggy> because I think it would be interesting, if you eliminate all computation by giving it to the machine -- to see what is left
00:01:28 <oklofok> our "applied mathematics" dep gives courses like that, theorems aren't proven, or at least you don't have to understand the proofs
00:01:47 <oklofok> which is sort of sad because stuff like probability theory is only found there
00:02:01 * MissPiggy doesn't know what 'understand' means anymore, either :(
00:02:25 <oklofok> for all intents and purposes, understand = memorize
00:02:47 <oklofok> well at least for this intent and purpose
00:03:17 * MissPiggy wants to write a sci-fi about it :P
00:03:27 <oklofok> err about what?
00:03:33 <oklofok> i should really continue reading...
00:03:35 <MissPiggy> computers
00:03:51 <olsner> hmm, this doesn't even seem to work :/
00:04:26 <oklofok> there's this part about singular cubes in the end i recall was pretty wacky, not sure i want to be reading it at 5 am
00:04:42 <MissPiggy> singular cubes = cube
00:04:49 <MissPiggy> pretty easy stuff if you ask me
00:04:57 <olsner> wait, it *did* work!
00:05:09 <oklofok> it's actually the image of a cube
00:05:29 <oklofok> f(C) where f is a continuous function
00:05:43 <oklofok> that's not exactly the wacky part
00:06:22 <oklofok> oh lol
00:06:28 <oklofok> sorry, idiot here
00:06:31 <oklofok> :P
00:07:04 <oklofok> forgot math terms usually also mean something in english
00:08:03 <MissPiggy> am I the only one who fantasizes about being ENCOURAGED to use a calculator to factor quadratics instead of doing pages and pages of it by hand?
00:08:33 <MissPiggy> why should it not be completely natural, when you learn a new algorithmic method of solving problems to program it in a re-useable way?
00:08:47 <coppro> I just use the quadratic formula; takes roughly as long
00:09:29 <MissPiggy> I don't care about the actual quadraitic, tat's just one example
00:09:46 <bsmntbombdood> i remember being in a class in middle school or so when the were trying to teach people to factor quadratics
00:10:16 <bsmntbombdood> they taught some kind of odd, non-deterministic method involving drawing shapes on paper
00:10:31 <oklofok> our exams rarely contain any computations that take more than half a minute even without a calculator... except for integrals
00:10:32 <MissPiggy> sounds cool
00:10:37 <MissPiggy> do you remember it?
00:10:40 <bsmntbombdood> wouldn't like me use the quadratic formula ^_^
00:11:23 <olsner> sweet, I even got the bijective de/encoding right, now all that's lacking is a weird language to plug in the middle of this
00:12:10 <oklofok> you could draw the shape of the curve and look at the picture to see where zeroes are
00:12:23 <oklofok> i suppose this was something cleverer
00:12:29 <MissPiggy> olsner what are you talking about?
00:12:32 <MissPiggy> I missed earlier
00:12:59 <oklofok> yeah what the FUCK are you talking about
00:16:00 <olsner> a program that reads stdin as a bijective base-256 number
00:16:11 <MissPiggy> bijective?
00:16:12 <olsner> then converts the number to base-pi, and back again
00:17:00 <bsmntbombdood> it doesn't make sense to have real bases
00:17:09 <olsner> hah! sure it does
00:17:13 <MissPiggy> why not?
00:17:46 <Sgeo> olsner, I thought input was base pi, and output was base e?
00:17:54 <Sgeo> Or something like that
00:18:02 <olsner> Sgeo: yeah, I just built it with output as base-pi to test that it's really working
00:18:23 <olsner> I don't really know yet how to convert directly from base-pi to base-e
00:18:48 <olsner> the burger is missing but I have the buns, so to speak
00:19:44 <oklofok> so how do you have a real base?
00:20:30 <olsner> basically, this: http://en.wikipedia.org/wiki/Non-integer_representation
00:20:55 <olsner> it's just pi^k instead of 10^k
00:21:17 <MissPiggy> bsmntbombdood: im fax
00:21:44 <olsner> that there has a greedy algorithm to generate the representation of any number in any base > 1
00:21:52 <bsmntbombdood> i suppose it works if your digits are reals too
00:22:02 <oklofok> "The numbers di are non-negative integers less than β."
00:22:11 <oklofok> this is really the only thing i wasn't sure about
00:22:23 <olsner> yeah, so base-pi has 0,1,2,3
00:22:39 <oklofok> bsmntbombdood: lol, yeah, that would be a pretty compact representation at least
00:22:55 <oklofok> like e = (e/pi)*pi
00:23:05 <oklofok> e in base pi
00:24:49 <oklofok> nice to know that works, for some reason i've never bumped into that
00:26:33 -!- MissPiggy has quit (Quit: MissPiggy).
00:27:37 <olsner> it's kind of messy since it doesn't add up to zero, but it seems that you don't need to bother with decimals to get the required precision
00:42:38 <pikhq> This is... Incredibly slow.
00:42:45 <pikhq> ./a.out `cat rot13.lazy` < ~/lazyk/lazier.scm 7.26s user 0.03s system 99% cpu 7.340 total
00:43:10 <pikhq> For comparison, the shipped interpreter:
00:43:10 <pikhq> ./a.out eg/rot13.lazy < lazier.scm 0.70s user 0.02s system 80% cpu 0.891 total
00:46:19 <Sgeo> pikhq, I believe olsner is looking for slowness?
00:51:25 <bsmntbombdood> http://www.maa.org/devlin/LockhartsLament.pdf
00:51:35 <Sgeo> readit
00:52:42 <oklofok> olsner: "add up to zero"? do you mean the representation of a natural number in base pi is infinite?
00:54:52 <olsner> oklofok: I suspect it might be, but I think you need a lot less than infinite to actually make it unambiguous after rounding
00:56:34 <oklofok> bsmntbombdood: sounds like the current state of mathematics
00:56:48 <oklofok> teaching of it, that is
00:56:51 <bsmntbombdood> oklofok: ...that's the point
00:57:05 <oklofok> mathematics in particular?
00:57:12 <oklofok> i haven't read all of it yet
00:58:45 <oklofok> i figured it might be about pretty much anything
00:59:04 <oklofok> but yeah maybe it could be just about math
01:00:20 <oklofok> okay i got on page two
01:00:21 <oklofok> ;)
01:08:35 <Sgeo> Is LogMeIn safe?
01:26:08 <madbr> bsmntbombdood: reading this, what I can think is... "ok but if mathematics were teached in a creative way, how would the teachers grade 150 different exams fairly"
01:26:09 -!- SimonRC has quit (Ping timeout: 265 seconds).
01:26:39 <bsmntbombdood> use a different method for evaluating performance, perhaps?
01:26:52 <bsmntbombdood> if exams are interfering with learning, there's obviously a problem
01:28:39 <madbr> like, this is kindof saying "they're not teaching creativity" and what I'm thinking is, "well, nobody teaches creativity"
01:28:41 <oklofok> give 'em a problem and give points for progress
01:32:17 * pikhq is amazed at what difference a few "foo = NULL;"s can do for memory usage.
01:33:44 <bsmntbombdood> poor garbage collection?
01:34:26 <pikhq> Garbage collectors can't collect things you still have references to.
01:34:31 <pikhq> Even if you're not using them again.
01:34:57 <pikhq> In this case, I was holding on to references before dethunking something.
01:35:08 <madbr> how about something like this: I'm writing a sound generator. I need a function that will generate a spectrum that is almost periodic, but where the phase and amplitude of harmonics vary with time
01:35:10 <pikhq> And a dethunk can take, well, any amount of time.
01:35:38 -!- SimonRC has joined.
01:36:05 <bsmntbombdood> i wonder if there are any garbage collectors that actually can infer that information
01:36:22 <pikhq> ML's apparently can.
01:36:29 <pikhq> As a side effect of its type system.
01:37:29 <oklofok> anyway a problem with making any subject better or more interesting to students is most people don't give a shit about anything. no matter how interesting it is, people don't want to hear it.
01:38:18 -!- Asztal has quit (Ping timeout: 240 seconds).
01:39:07 <pikhq> The biggest gain I got was making the dethunk function actually remove its closure... That's such a ridiculous source of memory leaks.
01:42:49 <olsner> hmm, it seems I have a lot to learn about precision
01:43:21 <olsner> worked fine for certain sizes of inputs that happened to make the program choose good numbers of bits to work with
01:43:37 <olsner> but failed to properly pi-encode "hello world"
02:12:33 <bsmntbombdood> hmmm
02:12:36 <madbr> working on a bignum system?
02:13:04 <bsmntbombdood> how do you compute, exactly, the representation of a pi-encoded number?
02:14:08 <pikhq> bsmntbombdood: Inaccurately.
02:15:50 <oklofok> bsmntbombdood: take the biggest power of pi that fits under it, and you get the first digit, then induction
02:16:12 <oklofok> well biggest power + biggest possible digit you can multiply it with
02:16:18 <bsmntbombdood> of course
02:16:45 <bsmntbombdood> but i don't know how to do that exactly
02:16:52 <madbr> then figure out at which digit to stop?
02:17:02 <oklofok> and it's enough to use as digits the natural numbers under the number being used as base.
02:17:20 <bsmntbombdood> any exponentiation/subtraction you are doing involves representations of pi, not pi
02:17:48 <oklofok> uh
02:18:03 <oklofok> so? we're still working with the actual number
02:19:09 <oklofok> say you have 21, you'd take pi^2 first, because that's the biggest power that fits under 21, it fits under it twice, so you take 21-2*pi^2, take the representation of that real in base pi, and you'll have the rest of the digits
02:19:30 <oklofok> so you get 2x.xxxxxxxx
02:19:36 <oklofok> x's continuing forever
02:19:47 <oklofok> (no idea what they are)
02:20:18 <oklofok> nothing about this involves "representations", although you'll need some to know what powers fit under what.
02:21:05 <bsmntbombdood> you can't exactly subtract 2*pi^2
02:21:12 <oklofok> you can't?
02:21:18 <oklofok> 21-2*pi^2 is a real number
02:21:54 <oklofok> we can represent it as a base pi number that contains only one whole digit, that is, its representation in base pi is of the form x.xxxxx
02:22:28 <bsmntbombdood> is 21-2*pi^2 equal to 3, 1.78, 1.2808, 1.268238, 1.2619555, 1.26082454, etc
02:23:03 <oklofok> are you saying you can't represent 21-2*pi^2 in base 10 using a finite number of digits?
02:23:12 <madbr> using base pi sounds weird
02:23:19 <oklofok> because that's completely true
02:23:32 <oklofok> you also can't represent it in a finite amount of bananas if bananas map in no way to real number.
02:23:33 <oklofok> s
02:24:05 <bsmntbombdood> you end up having to use an approximation of pi for all your calculations, is what i'm saying
02:24:16 <oklofok> who said anything about calculations?
02:24:45 <madbr> bsmntbombdood: you could store the operations, then evaluate just the number of digits you need
02:24:56 <oklofok> we are talking about the existence of the representation. pi has all sorts of algebraic properties, you can probably devise an algorithm for finding exact representations for numbers.
02:25:12 <oklofok> for a general real number that is obviously impossible
02:25:50 <bsmntbombdood> i understand that it exists, i am talking about an algorithm
02:25:59 <oklofok> oh
02:26:12 <oklofok> that's trickier
02:27:43 <oklofok> but yeah, approximate to some amount of digits. not exactly that interesting.
02:28:51 <madbr> well, pi can be done with, what, some polynomial series?
02:31:11 <oklofok> bsmntbombdood: an exact algorithm would be to just have the thing you are trying to represent in the form "21-2*pi^2". you start making approximations for pi to get the correct amount of pi^1's, say n, but then you'd continue with 21 - 2*pi^2 - n*pi, and use approximations to find the amount of 1's needed, etc.
02:33:55 <oklofok> (not actually an algorithm, but at least there's no error)
02:34:06 <oklofok> (i mean it might hang)
02:35:36 <oklofok> madbr: can't pi be done with pretty much anything
02:36:26 <madbr> you know better than be probably
02:37:00 <oklofok> i don't know anything about pi
02:37:27 <oklofok> i don't even know why it isn't algebraic
02:38:14 <oklofok> i hear it's like totally nontrivial
02:38:40 <oklofok> ...lol my gf will wake up soon, i should really start reading soon :P
02:39:19 <oklofok> (only 4:38, and i'm already reading about singular cubes, yay)
03:39:10 -!- jcp has quit (Quit: I will do anything (almost) for a new router.).
04:04:09 -!- puzzlet has joined.
04:20:00 -!- oklopol has joined.
04:21:30 -!- oklofok has quit (Ping timeout: 240 seconds).
05:24:47 -!- whtspc has joined.
05:31:02 -!- whtspc has quit (Ping timeout: 246 seconds).
05:59:40 -!- Pthing has joined.
06:08:35 -!- Ripley has joined.
06:25:45 -!- Ripley has left (?).
06:26:31 -!- oerjan has joined.
06:47:29 <Slereah> Hey
06:47:53 <oerjan> ho
06:47:59 <Slereah> I get a lot of Cannot send to channel for some reason on the other channels for some reason
06:48:02 <Slereah> What gives!
06:49:04 <oerjan> you don't seem to be registered. is it possible they only allow registered nicks to speak?
06:49:25 -!- madbr has quit (Quit: Radiateur).
06:50:18 <oerjan> they just changed ircd program, in case you haven't noticed, so some setup has changed
06:50:44 <Slereah> Weird
06:51:03 <oerjan> +R turned into some other quieting option, although i didn't have the impression it should change what happened in practice...
06:51:48 <Slereah> Yeah, but the channel I just tried talking doesn't have +R on
06:51:52 <Slereah> Or so it seems
06:51:58 <oerjan> +R doesn't exist any longer
06:52:05 <Slereah> And I can talk here just fine
06:52:08 <oerjan> it's +q something
06:52:29 <oerjan> well we've never silenced people here that i can remember...
06:52:32 <Slereah> It's just +cnt on ##physics
06:52:59 <oerjan> i'm not sure +q shows up by default, i think it's like a ban list
06:53:41 <oerjan> 07:52 0 - ##physics: ban $~a [by
06:53:42 <oerjan> JabberWalkie!~superdude@CPE0013d44814fd-CM001bd70964c4.cpe.net.cable.rogers.com, 121722 secs ago]
06:53:49 <oerjan> i think that might be the one
06:54:02 <oerjan> (found with /mode #physics +q)
06:54:09 <oerjan> *##physics
06:54:21 <Slereah> Well, let's try now
06:57:26 <Slereah> It works, thx
06:57:50 -!- tombom has joined.
07:03:29 -!- FireFly has joined.
07:08:40 -!- oerjan has quit (Quit: leaving).
07:39:44 -!- jcp has joined.
07:48:24 -!- FireFly has quit (Quit: Leaving).
07:50:47 -!- tombom has quit (Quit: Leaving).
07:52:27 -!- GreaseMonkey has joined.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:15:18 -!- puzzlet has quit (Changing host).
08:15:18 -!- puzzlet has joined.
08:22:15 <olsner> hm, I'm thinking: screw this precision game, let's just choose an "official" number of bits for pi and store everything exactly as rationals when working
08:23:26 <olsner> but it would be better to just figure out how to make this reliable, that'd teach me something too
09:13:11 -!- GreaseMonkey has quit (Quit: HydraIRC -> http://www.hydrairc.org <- Nobody cares enough to cybersquat it).
09:14:11 -!- fizzie has quit (Ping timeout: 260 seconds).
09:14:26 -!- Asztal has joined.
09:16:18 -!- fizzie has joined.
09:17:02 -!- mtve has joined.
09:27:44 -!- jcp has quit (Read error: Operation timed out).
09:39:59 -!- MigoMipo has joined.
09:56:01 -!- scarf has joined.
10:03:14 -!- MigoMipo has quit (Quit: Page closed).
10:23:19 -!- scarf has quit.
10:23:36 -!- scarf has joined.
10:53:53 -!- oklofok has joined.
10:56:25 -!- oklopol has quit (Ping timeout: 245 seconds).
10:58:23 -!- oklopol has joined.
11:00:53 -!- oklofok has quit (Ping timeout: 260 seconds).
11:20:32 -!- scarf has quit (Remote host closed the connection).
11:55:17 -!- Pthing has quit (Remote host closed the connection).
12:46:37 -!- MizardX has quit (Read error: Connection reset by peer).
12:47:26 -!- MizardX has joined.
12:51:45 -!- FireFly has joined.
12:54:56 -!- Pthing has joined.
13:01:20 -!- MigoMipo has joined.
13:19:33 -!- BeholdMyGlory has joined.
13:19:33 -!- BeholdMyGlory has quit (Changing host).
13:19:33 -!- BeholdMyGlory has joined.
13:27:56 -!- adam_d has joined.
13:51:33 -!- MizardX- has joined.
13:53:15 -!- MizardX has quit (Ping timeout: 260 seconds).
13:53:28 -!- MizardX- has changed nick to MizardX.
14:31:30 -!- MigoMipo has quit (Quit: Page closed).
14:54:33 -!- Pthing has quit (Remote host closed the connection).
14:56:24 -!- whtspc has joined.
14:57:45 -!- whtspc has left (?).
15:03:49 <AnMaster> Deewiant, what should 0j@ do? should it remain on j forever or should it reach the @ at some point?
15:05:30 <Deewiant> If 1j is like # then 0j is like z.
15:06:36 <AnMaster> Deewiant, hm does mycology test 0j?
15:06:43 <Deewiant> Beats me.
15:10:06 <AnMaster> Deewiant, so 0jv should take the down path then
15:10:21 <AnMaster> well strange, it looks like the code in cfunge does the wrong thing, but it does in fact do the right thing
15:12:06 <AnMaster> oh wait... now I see how it works
15:27:19 -!- cpressey has joined.
15:28:03 -!- coppro has quit (Quit: I am leaving. You are about to explode.).
15:33:18 <cheater> hi AnMaster
15:47:10 <AnMaster> hello
15:51:29 -!- oerjan has joined.
15:51:38 -!- whtspc_ has joined.
15:55:55 -!- whtspc_ has quit (Client Quit).
16:11:58 -!- oklofok has joined.
16:13:25 -!- oklopol has quit (Ping timeout: 264 seconds).
16:27:09 -!- Deewiant has quit (Ping timeout: 276 seconds).
16:30:06 -!- MissPiggy has joined.
16:31:38 -!- MissPiggy has quit (Client Quit).
16:33:30 -!- kar8nga has joined.
16:35:27 -!- Deewiant has joined.
16:43:42 -!- oerjan has quit (Quit: Scheduled downtime approaching).
16:44:00 -!- MizardX- has joined.
16:46:00 -!- MizardX has quit (Ping timeout: 276 seconds).
16:46:29 -!- MizardX- has changed nick to MizardX.
16:58:53 <Ilari> Ugh. This lib needs to call closure as callback, but the function to register callback doesn't take context. :-/ ... Well, I think this needs trampolines (yay, runtime code generation). :-)
17:06:04 <pikhq> Well, if you don't care about it being even vaguely reentrant, you could just use a global. :P
17:13:32 <Ilari> Unfortunately, that isn't an option there.
17:17:16 -!- uoryfon has joined.
17:20:51 -!- tombom has joined.
17:27:38 -!- uoryfon_ has joined.
17:31:18 -!- uoryfon has quit (Ping timeout: 252 seconds).
17:31:27 -!- uoryfon_ has changed nick to uoryfon.
17:32:43 -!- kar8nga has quit (Remote host closed the connection).
17:40:32 -!- jcp has joined.
17:47:45 -!- MizardX has quit (Ping timeout: 276 seconds).
17:51:17 -!- augur has quit (Ping timeout: 246 seconds).
17:54:34 -!- uoryfon_ has joined.
17:57:38 * cpressey suddenly wants to start a punk band called "sudo rm -rf /"
17:57:42 -!- uoryfon has quit (Ping timeout: 252 seconds).
17:57:43 -!- uoryfon_ has changed nick to uoryfon.
17:58:51 -!- kar8nga has joined.
17:59:38 -!- uoryfon_ has joined.
18:02:39 -!- uoryfon has quit (Ping timeout: 252 seconds).
18:02:39 -!- uoryfon_ has changed nick to uoryfon.
18:04:48 -!- uoryfon_ has joined.
18:08:09 -!- uoryfon has quit (Ping timeout: 252 seconds).
18:08:12 -!- uoryfon_ has changed nick to uoryfon.
18:09:48 -!- uoryfon has quit (Quit: Colloquy for iPhone - http://colloquy.mobi).
18:14:03 -!- jcp has changed nick to javawizard2539.
18:14:40 -!- javawizard2539 has changed nick to jcp.
18:26:40 -!- augur has joined.
18:29:06 -!- lifthrasiir has quit (Ping timeout: 240 seconds).
18:29:11 -!- lifthrasiir has joined.
18:53:52 -!- adam_d has quit (Ping timeout: 272 seconds).
18:59:16 -!- MissPiggy has joined.
18:59:18 -!- MissPiggy has quit (Changing host).
18:59:19 -!- MissPiggy has joined.
19:13:02 <MissPiggy> I think of a simple loop based language that you can write O(n^k) programs (for any fixed k)
19:13:30 -!- whtspc_ has joined.
19:19:46 <Ilari> Yeah, if one can only do fixed-count iteration, then one can only write algorithms that are in P.
19:20:16 <MissPiggy> every algorithm in P?
19:21:24 <Ilari> Actually, that's only if one can only iterate over collections. Number-based iteration allows algorithms not in P.
19:21:40 -!- uoryfon has joined.
19:21:44 <MissPiggy> oop
19:23:50 <Ilari> Actually, if one has number-based fixed iteration, one could do at least up to EXPTIME-complete.
19:25:43 <cpressey> I thought it was NEXPTIME
19:26:18 <Ilari> At least up to...
19:26:51 <Ilari> So might be some even bigger class...
19:27:17 <cpressey> Well, I don't remember where I heard that, and I don't know if I'm remembering it correctly.
19:29:41 -!- whtspc__ has joined.
19:29:45 <cpressey> At any rate, it contains every algorithm described as "feasible", which means... for "practical work" you don't need a Turing-complete computer. You only need TC if you want to write an interpreter :)
19:31:10 -!- whtspc__ has left (?).
19:32:11 <cpressey> s/computer/language/ to be a bit more precise.
19:38:09 -!- Slereah_ has joined.
19:38:50 -!- Slereah has quit (Ping timeout: 272 seconds).
19:40:05 -!- GreaseMonkey has joined.
19:47:02 -!- whtspc_ has quit (Read error: Connection reset by peer).
19:55:28 -!- uoryfon_ has joined.
19:57:40 -!- uoryfon has quit (Ping timeout: 245 seconds).
19:57:43 -!- uoryfon_ has changed nick to uoryfon.
20:06:00 -!- adam_d has joined.
20:06:24 -!- uoryfon_ has joined.
20:09:45 -!- uoryfon has quit (Ping timeout: 245 seconds).
20:09:47 -!- uoryfon_ has changed nick to uoryfon.
20:11:39 -!- uoryfon has quit (Quit: Colloquy for iPhone - http://colloquy.mobi).
20:11:42 <AnMaster> cpressey, so writing an interpreter isn't feasible then? ;P
20:14:50 -!- MigoMipo has joined.
20:14:52 -!- MigoMipo has quit (Excess Flood).
20:15:20 -!- MigoMipo has joined.
20:15:21 -!- MigoMipo has quit (Excess Flood).
20:20:50 <cpressey> AnMaster: Apparently not! I do like the distinction you can draw from it, though: "If I can prove my code halts, it's an algorithm. Otherwise, it's an interpreter."
20:26:28 <AnMaster> cpressey, you could have interpreters for sub-tc languages you know will always halt
20:26:55 <AnMaster> iirc ais/scarf designed one reversible always-halting language
20:27:03 <AnMaster> forgot the name of it
20:27:14 <uorygl> ais/scarf? Is that his name now?
20:27:35 <AnMaster> uorygl, he used scarf sometimes recently
20:28:04 <uorygl> Neat. Now I know who scarf is.
20:28:15 <AnMaster> hah
20:28:27 <AnMaster> hm 614 new mails
20:28:31 <AnMaster> most are probably spam
20:28:52 <AnMaster> actually no, it looks like there has been some huge debate on flightgear-devel list
20:30:02 <cpressey> AnMaster: well, if that'
20:30:44 <AnMaster> cpressey, ?
20:30:51 <cpressey> if that's an interpreter, then so is a program that solves the travelling salesman problem, is all I meant.
20:30:59 <AnMaster> cpressey, heh
20:31:03 <cpressey> Where the language there is weighted undirected graphs :)
20:31:26 <cpressey> Very, very sub-TC, you might say...
20:32:30 <cpressey> Now, back to fighting my favourite thing to ever come out of gnu: libtool.
20:32:37 * cpressey groans.
20:33:20 -!- jcp has quit (Quit: I will do anything (almost) for a new router.).
20:34:22 <cpressey> I wonder if the worlds of pain caused by shared libraries could have been avoided by just having OSes/filesystems that do hash consing.
20:35:45 <cpressey> Nah, probably not, b/c you have to rewrite all those pointers when you link statically, so the same library statically linked into two different files would look different in each. Ah well.
20:43:20 <AnMaster> cpressey, why are you using libtool?
20:43:45 <AnMaster> you can do shared libraries without libtool just fine
20:43:53 <AnMaster> cpressey, also how do you mean hash consing?
20:45:11 <cpressey> AnMaster: basically, every time you allocate a new piece of data, check to see if you already have an identical piece of data, and if so, just keep a reference to the existing data instead. The name comes from the research where the technique was developed in LISP.
20:45:41 <cpressey> as for why libtool... because i am stupidly trying to build some tools i need (subversion, right now) from source
20:46:13 <AnMaster> cpressey, like venti?
20:46:25 <AnMaster> (plan9 thing iirc)
20:46:33 <AnMaster> (yeah part of plan9 even)
20:47:13 <AnMaster> cpressey, they tend to just work after ./configure --prefix=$HOME/local/subversion && make && make install
20:48:18 <cpressey> Oh yes, it's very nice when they just work :) Darn thing keeps telling me it can't find expat, though.
20:48:35 <AnMaster> cpressey, so install expat
20:48:44 <AnMaster> sudo pacman -S expat
20:48:53 <AnMaster> or sudo apt-get install expat-dev or whatever
20:49:36 <pikhq> AnMaster: Building shared libraries without libtool is a pain to do portably.
20:49:38 <AnMaster> ah seems to be libexpat1-dev on ubuntu
20:49:48 <pikhq> ... Building anything *with* libtool is a pain, so I guess it evens out.
20:49:59 <AnMaster> pikhq, does it work on *bsd and linux easily without libtool?
20:50:23 <AnMaster> I don't really care about HP-UX, VMS and other obscure systems
20:50:30 <AnMaster> oh AIX too
20:50:30 <pikhq> AnMaster: It *works*, but people seem to suck at it.
20:50:41 <AnMaster> pikhq, isn't it just gcc -shared ?
20:50:45 <pikhq> (next person to build a shared library without -fPIC gets a kick to the balls)
20:50:56 <AnMaster> pikhq, well yes of course you use -fpic
20:50:58 <pikhq> AnMaster: Add -fPIC for fucks sake.
20:51:02 <AnMaster> also -fpic NOT -fPIC
20:51:15 <AnMaster> the lower case version is better on some platforms iirc
20:51:47 <pikhq> Yes, like DOS.
20:51:47 <pikhq> And DOS.
20:51:49 <pikhq> Also DOS.
20:52:01 <olsner> and sparc
20:52:45 <AnMaster> pikhq, what? -fpic vs. -fPIC?
20:52:46 <AnMaster> no
20:52:57 <pikhq> No, wait...
20:53:06 <AnMaster> it makes a difference only on SPARC, m68k and RS/6000 says man gcc
20:53:15 <pikhq> According to the man page, it only makes difference on m68k, PowerPC, and SPARC.
20:53:29 <olsner> haha
20:53:43 <AnMaster> pikhq, mine lists SPARC, m68k and RS/6000 under -fpic but m68, PowerPC and SPARC under -fPIC
20:53:45 <pikhq> -fpic makes a smaller offset table.
20:53:48 <AnMaster> whatever that is supposed to mean
20:53:56 <pikhq> If it's too small, it'll not compile.
20:54:01 <pikhq> -fPIC will always work.
20:54:04 <AnMaster> pikhq, it is faster though
20:54:09 <AnMaster> iirc
20:54:20 <pikhq> AnMaster: If your shared library is small enough.
20:54:22 <AnMaster> pikhq, and if you need such a large GOT you have too many functions
20:54:35 <AnMaster> divide it in more
20:54:50 <AnMaster> a library should follow the unix philosophy too
20:54:56 <AnMaster> (do one thing, do it well)
20:54:59 <pikhq> Anyways.
20:55:10 <olsner> on sparc the smaller table means single instructions can be used to load offsets into it, -fPIC generates double-instruction constant loading that can handle large offsets
20:55:12 <pikhq> Many build systems build shared libraries *without* using position-independent code.
20:55:30 <AnMaster> olsner, right
20:55:36 <pikhq> Because the x86 dynamic linker will manually relocate the library if it's not PIC.
20:55:37 <AnMaster> pikhq, that won't load
20:55:44 <AnMaster> on x86-64 iirc
20:55:46 <pikhq> It will on x86.
20:55:48 <pikhq> And *nowhere* else.
20:55:51 <AnMaster> pikhq, not on x86-64
20:56:00 <AnMaster> pretty sure about that
20:56:03 <pikhq> AnMaster: Yes. That's not x86.
20:56:11 <AnMaster> pikhq, well the difference is slight
20:56:18 <AnMaster> also x86-64 is the norm nowdyas
20:56:21 <AnMaster> days*
20:56:25 <AnMaster> for linux
20:56:31 <pikhq> The difference between the CPU architecture is slight.
20:56:38 <pikhq> The ABI is radically different.
20:56:44 <AnMaster> true
20:57:06 <AnMaster> where is the x86 abi
20:57:14 <AnMaster> I only read the amd64 abi
20:57:21 <pikhq> Undefined.
20:57:24 <pikhq> It's per-OS.
20:57:28 <pikhq> And often per-compiler.
20:57:32 <AnMaster> pikhq, well it must be documented for linux...
20:57:34 <AnMaster> somewhere
20:57:40 <pikhq> And if you're on Windows, give up now.
20:57:48 <AnMaster> pikhq, also Microsoft ignores the amd64 abi yes
20:58:02 <pikhq> Microsoft defines its own, yes.
20:58:13 <pikhq> Windows on x86 has 3 or 4 different calling conventions.
20:58:43 <pikhq> The Linux x86 ABI is defined in the LSB.
20:59:17 <AnMaster> I would like a nice, easy to use, 3D modeller, based on using boolean functions between primitives. Such as "intersection of this cube and (union of that cylinder and that sphere)". Anyone know such a thing?
20:59:45 <pikhq> Except for C++-specific details; those are from the IA64 ABI documentation for all GCC-supported architectures.
20:59:47 <AnMaster> this would in other words not be based on polygons (or it could be as well)
21:00:13 <AnMaster> pikhq, linux use different calling convetions on x86 too. regparam for example
21:00:19 -!- rodgort has quit (Quit: Coyote finally caught me).
21:00:28 <pikhq> AnMaster: regparam is very, very rarely used.
21:00:38 <AnMaster> cfunge uses regparam attribute on x86 to speed things up (there is a measurable difference)
21:00:53 <cpressey> AnMaster: thank you. libexpat1-dev worked. Why it worked and why plain 'expat' did not, I still have no good idea -- it's not like extra so's were installed (and that's what it was saying it couldn't find.)
21:01:06 <AnMaster> cpressey, plain expat is a program it says
21:01:17 <AnMaster> cpressey, "expat - XML parsing C library - example application"
21:01:22 <AnMaster> apt-get tells me that
21:01:27 <AnMaster> err
21:01:28 <AnMaster> apt-cache
21:02:04 <pikhq> Wheras on Windows, there's fastcall, stdcall, cdecl, safecall, and pascal calling conventions...
21:02:04 <cpressey> AnMaster: but expat installs /usr/lib/libexpat.so* ... which should be enough to link to, given that it didn't complain about headers.
21:02:07 -!- rodgort has joined.
21:02:23 <AnMaster> cpressey, well. maybe it needs *.la or *.a?
21:02:25 -!- rodgort has quit (Client Quit).
21:02:40 <pikhq> And those are just in use by Microsoft's compiler.
21:02:50 <AnMaster> cpressey, if you are doing subversion why not apt-get builddep subversion
21:02:53 <AnMaster> or was it builddeps
21:02:54 <AnMaster> ?
21:02:57 <AnMaster> something like that
21:03:00 <cpressey> AnMaster: well, libexpat.la appears to have been in my lib dir since Jan 19 as well
21:03:16 <cpressey> At any rate, it's built. best not to think any more about it, right? :)
21:03:19 <AnMaster> pikhq, delphi (which is pascal) used fastcall internally iirc
21:03:23 <pikhq> There's *also* the Borland fastcall and the GNU cdecl.
21:03:29 <AnMaster> or was it a modified fastcall?
21:03:32 <AnMaster> well probably
21:03:42 <AnMaster> pikhq, gnu uses it's own cdecl on windows?
21:03:53 <pikhq> AnMaster: The difference is in struct packing.
21:04:06 <AnMaster> <cpressey> At any rate, it's built. best not to think any more about it, right? :) <-- wrong. You always try to figure out *why* something unexpected happened
21:04:11 <AnMaster> pikhq, -_-
21:04:15 <pikhq> It packs its structs differently from Microsoft C.
21:04:15 -!- rodgort has joined.
21:04:23 <AnMaster> pikhq, that isn't calling convention!
21:04:26 <pikhq> With an attribute for Microsoft packing.
21:04:31 <AnMaster> struct packing is, well, ABI yes
21:04:36 <AnMaster> but not calling convention
21:04:38 <pikhq> Fine, fine, remove the GNU cdecl.
21:04:52 <pikhq> Borland still has its own fastcall.
21:05:06 <pikhq> (different registers are used)
21:05:12 <AnMaster> pikhq, anyway regparam with gcc isn't that rarely used. Let me grep cfunge sources for number of times it is used!
21:05:37 <pikhq> cfunge is the first thing I've heard of actually *using* it.
21:05:42 <cpressey> AnMaster: maybe my smiley should have been a ;-)
21:05:43 <AnMaster> pikhq, does MS still use fastcall?
21:05:49 <AnMaster> cpressey, maybe
21:05:53 <pikhq> Yes.
21:06:08 <AnMaster> pikhq, for what sort of functions
21:06:09 <pikhq> Random parts of Win32 use it.
21:06:13 <AnMaster> pikhq, also what about thiscall?
21:06:30 <pikhq> That's just a C++ implementation detail.
21:06:32 <AnMaster> ah
21:06:33 <pikhq> "First argument is this".
21:06:43 <AnMaster> s/C++/python/ ;P
21:06:54 <AnMaster> (except there it is explicit!)
21:07:00 <pikhq> Heheh.
21:07:42 <pikhq> Microsoft at least went sane on x86_64...
21:07:44 <AnMaster> how comes C++ needs it's own "different from C" ABI, while python manages fine with the C abi.
21:07:48 <pikhq> There is one calling convention.
21:07:48 <AnMaster> well yes I can see the reasons
21:07:50 <AnMaster> but still
21:07:52 <AnMaster> it makes you wonder
21:08:10 <AnMaster> pikhq, different from linux one though on x86_64
21:08:19 <AnMaster> pikhq, also doesn't syscalls use their own?
21:08:24 <AnMaster> on both linux and windows
21:08:26 <pikhq> Yes, but it's at least a *single* calling convention.
21:08:36 <pikhq> Syscalls must -- there's no way to just "call" them.
21:08:43 <AnMaster> pikhq, call gates?
21:08:50 <AnMaster> I have a vague memory of reading about that
21:08:58 <AnMaster> not sure how it worked
21:09:00 <pikhq> AnMaster: Even that requires some specific work on them.
21:09:38 <pikhq> The Linux call gate is linked in before the dynamic linker is started.
21:09:51 <pikhq> And the Linux call gate is at a specific address.
21:09:52 <AnMaster> true
21:09:56 <AnMaster> also no longer used
21:10:02 <AnMaster> it uses SYSCALL/SYSRET iirc?
21:10:07 <pikhq> ... No, the call gate is still used.
21:10:09 <AnMaster> or was it SYSENTER/SYSEXIT?
21:10:13 <pikhq> The call gate is a *recent thing*.
21:10:17 <AnMaster> pikhq, if you mean the vdso...
21:10:27 <pikhq> Yes, that's the call gate.
21:10:36 <AnMaster> pikhq, not the call gate in the meaning I used it
21:10:42 <AnMaster> http://en.wikipedia.org/wiki/Call_gate
21:10:52 <AnMaster> "Assuming a call gate has been set up already by the operating system kernel, code simply does a CALL FAR (LCALL in AT&T syntax) with the necessary segment selector (the offset field is ignored). "
21:11:09 <pikhq> Oh, that bloody thing.
21:11:24 <AnMaster> pikhq, so you know about it?
21:12:12 <pikhq> Linux doesn't use that.
21:12:22 <AnMaster> did I say it did?
21:12:27 <pikhq> No.
21:12:37 <pikhq> I'm saying it doesn't at all, though.
21:13:01 <Ilari> SYSENTER is quite funky. IIRC, it does not save address that called it.
21:13:10 <pikhq> Because it damned well doesn't help matters any.
21:13:19 <AnMaster> is it SYSCALL that is used then?
21:13:33 <pikhq> Linux's entry methods are an interrupt, syscall/sysret, or sysenter/sysexit.
21:13:37 <Ilari> So there can only be one SYSENTER in each VM space.
21:13:48 <pikhq> The Linux VDSO uses whichever one is the fastest.
21:13:48 <AnMaster> "It should be noted that call gates are more flexible than the SYSENTER/SYSEXIT and SYSCALL/SYSRET instructions since unlike the latter two, call gates allow for changing from an arbitrary privilege level to an arbitrary (albeit higher or equal) privilege level. The fast SYS* instruction only allow control transfers from ring 3->0 and vice versa. Upon comparing call gates to interrupts, call gates are
21:13:49 <AnMaster> significantly faster."
21:13:55 <cpressey> Interesting stuff.
21:14:32 <cpressey> I would think they would be a lot faster, especially for some access patterns (though maybe not ones that are frequently used in modern OSes)
21:14:53 <Ilari> And that SYSENTER is part of Linux-gate VDSO.
21:14:59 <AnMaster> cpressey, iirc virtualbox uses ring 2 a bit if there is no VT-d/whatever support
21:15:05 <AnMaster> or VT-x or whatever it was
21:15:12 <cpressey> Waiting for the next interrupt can be killer.
21:15:21 <pikhq> Ilari: Only if it's present.
21:15:26 <AnMaster> Ilari, even on x86-64?'
21:15:31 <AnMaster> s/'//
21:15:46 <AnMaster> I thought it used syscall exclusively on x86-64
21:16:21 -!- MissPiggy has quit (Read error: Connection reset by peer).
21:16:29 <AnMaster> basically AMD64 deprecated Intel's sysenter in the AMD64 specs
21:16:33 * AnMaster opens the file
21:17:01 <AnMaster> "6.1.2 SYSENTER and SYSEXIT (Legacy Mode Only)"
21:17:02 <Ilari> Well, if X64 has SYSCALL, its probably better than SYSENTER.
21:17:20 <AnMaster> " L i ke S Y S C A L L a n d S Y S R E T, S Y S E N T E R a n d
21:17:20 <AnMaster> SYSEXIT are low-latency system call and return instructions designed for use by system and
21:17:20 <AnMaster> application software implementing a flat-memory model. However, these instructions are illegal in
21:17:20 <AnMaster> long mode and result in an undefined opcode exception (#UD) if software attempts to use them.
21:17:20 <AnMaster> Software should use the SYSCALL and SYSRET instructions when running in long mode."
21:17:24 <AnMaster> yeargh
21:17:28 * AnMaster kills evince
21:17:37 <AnMaster> what the hell did it do there
21:17:47 <AnMaster> with that spacing
21:17:52 <pikhq> Ilari: Syscall and Sysenter do roughly the same thing.
21:18:02 <pikhq> One was created by Intel, the other by AMD.
21:18:20 <Ilari> pikhq: And presumably SYSCALL saves RIP...
21:18:46 <pikhq> Probably.
21:19:10 <AnMaster> doesn't linux map the clock in process memory for gettimeofday() and such
21:19:18 <AnMaster> it is iirc done in the vdso magic
21:19:41 <pikhq> Possibly.
21:23:05 -!- soupdragon has joined.
21:27:03 -!- soupdragon has quit (Client Quit).
21:50:08 -!- MissPiggy has joined.
22:07:33 -!- MissPiggy has quit (Quit: * I'm too lame to read BitchX.doc *).
22:16:01 -!- tombom has quit (Quit: Leaving).
22:19:58 -!- kar8nga has quit (Remote host closed the connection).
22:40:19 -!- coppro has joined.
22:40:52 -!- BeholdMyGlory has quit (Remote host closed the connection).
23:04:53 -!- adam_d has quit (Quit: Leaving).
23:16:03 -!- Leonidas has quit (Changing host).
23:16:03 -!- Leonidas has joined.
23:20:32 <olsner> hah, getting a newer gmp and compiling mpfr and gmp locally seems to have given around 20%
23:21:13 <olsner> optimizing while the program isn't even made correct <3
23:21:35 -!- coppro has quit (Quit: restarting the X CPU-Hoggin System).
23:22:18 -!- rodgort has quit (Quit: Coyote finally caught me).
23:22:38 -!- rodgort has joined.
23:22:52 -!- Leonidas has quit (Quit: Reconnecting).
23:22:52 -!- Leonidas has joined.
23:22:52 -!- Leonidas has quit (Changing host).
23:22:52 -!- Leonidas has joined.
23:23:16 -!- Leonidas has quit (Client Quit).
23:24:26 -!- coppro has joined.
23:25:39 -!- Leonidas_ has joined.
23:25:39 -!- Leonidas_ has quit (Changing host).
23:25:39 -!- Leonidas_ has joined.
23:25:56 -!- Leonidas_ has changed nick to Leonidas.
23:29:02 -!- augur has quit (Ping timeout: 265 seconds).
23:29:33 -!- GreaseMonkey has quit (*.net *.split).
23:32:44 -!- GreaseMonkey has joined.
23:39:09 -!- XRY has joined.
23:39:11 -!- XRY has quit (Read error: Connection reset by peer).
23:40:41 -!- XRY has joined.
23:40:46 -!- XRY has left (?).
23:41:38 -!- SimonRC has quit (Ping timeout: 246 seconds).
23:41:54 -!- XRY has joined.
23:41:59 -!- XRY has left (?).
23:43:23 -!- FireFly has quit (Quit: Leaving).
23:45:23 -!- XRY has joined.
23:45:28 -!- XRY has left (?).
23:47:15 -!- GreaseMonkey has quit (Quit: HydraIRC -> http://www.hydrairc.org <- Nobody cares enough to cybersquat it).
23:47:31 -!- GreaseMonkey has joined.
23:49:37 -!- XRY has joined.
23:49:46 -!- XRY has left (?).
23:51:58 -!- SimonRC has joined.
23:58:34 -!- mquin has joined.
23:58:45 -!- zzo38 has joined.
23:58:50 <zzo38> Finally, it works!
23:58:59 <zzo38> It works! The OASYS->TAVSYS works! It works! It {OUCH}
←2010-01-31 2010-02-01 2010-02-02→ ↑2010 ↑all