←2010-12-18 2010-12-19 2010-12-20→ ↑2010 ↑all
00:00:51 <elliott> j-invariant: I'm more interested in "more formal" programming at this point than outright proofs, since I don't think those are practical at this point.
00:00:58 <elliott> basically Haskell's type system is insufficiently fancy :P
00:02:38 <elliott> j-invariant: what do you think of automatic differentiation?
00:02:53 <zzo38> Can we make a computer proof system based on Typographical Number Theory?
00:05:02 <j-invariant> I don't think so
00:06:36 <j-invariant> elliott: looks good
00:07:13 <Phantom_Hoover> What's the missing essential thing?
00:07:25 <elliott> http://blog.sigfpe.com/2005/07/automatic-differentiation.html <-- i read this a while ago
00:09:20 <elliott> but I can't figure out what the formula for addition is :(
00:09:51 <j-invariant> (a+a'd)*(b+b'd) = ab+(ab'+a'b)d ?
00:10:05 <j-invariant> oh that's multiplication
00:10:17 <elliott> j-invariant: yeah :P
00:10:33 <j-invariant> if it's a ring then (a+a'd)+(b+b'd)=(a+b)+(a'+b')d
00:10:42 <elliott> I'll try it out
00:11:09 <elliott> hmm st is the standard name for standard-part
00:11:14 <elliott> but what's the standard name for infinitesimal-part?
00:11:18 <elliott> in non-standard analysis
00:11:19 <elliott> is there one?
00:11:37 <j-invariant> elliott: look here wikipedia gives an implementation in terms of 2x2 matrices http://en.wikipedia.org/wiki/Dual_numbers
00:11:58 <elliott> interesting
00:16:01 -!- oerjan has quit (Quit: Reboot).
00:16:05 <elliott> j-invariant: it works!
00:17:00 <j-invariant> cool, what does it do?
00:17:05 <elliott> j-invariant: http://hpaste.org/42405/automatic_differentiation
00:17:13 <elliott> j-invariant: it can calculate the derivative of x^2 :P
00:17:22 <elliott> j-invariant: needs abs and signum, and more numeric type instances, to be useful
00:17:26 <elliott> j-invariant: but both (sq' 5) and (sq' 1.5) work
00:17:28 <elliott> and rationals should too
00:17:57 <elliott> j-invariant: for my next trick: implement symbolic numbers (a numeric type, plus names like "x"), do "Dual (Symbolic t)", and get symbolic differentiation out of it (this apparently actually works!)
00:19:28 <j-invariant> impressive
00:20:17 <pikhq> Japanese pizza continues to disturbe me.
00:20:21 <pikhq> THE MAYO! THE MAYO!
00:21:40 -!- oerjan has joined.
00:22:01 <elliott> j-invariant: i guess symbolic differentiation is what happens when you don't think to compute :)
00:22:43 -!- Mathnerd314 has joined.
00:23:16 <pikhq> elliott: Automatic differentiation? Niceness.
00:23:29 <elliott> *Main> x+y+3
00:23:29 <elliott> ((x) + (y)) + (3)
00:23:32 <elliott> good enough :P
00:23:51 <j-invariant> heh
00:23:57 <pikhq> Though perhaps limited in use. I mean, one can just do it numerically for most relevant cases. :P
00:24:28 <elliott> *Main> sq' x
00:24:28 <elliott> ((x) * (1)) + ((1) * (x))
00:24:30 <j-invariant> it's no fun writing a program that omits brackets
00:24:33 <elliott> j-invariant: Okay, so it's ugly, but CHECK THAT SHIT OUT.
00:24:43 <elliott> I did /not/ change the differentiation code at all.
00:24:48 <elliott> I just called it with a new numeric type.
00:25:09 <elliott> All it needs is a symbolic simplification function and it's an actual symbolic differentiator.
00:25:13 <j-invariant> elliott: why does it seem like you get something for nothing?
00:25:37 <elliott> j-invariant: I'm not sure ... I think it's because duals are basically infinitesimals
00:25:53 <elliott> just implemented in the same way as Q is implemented on top of Z, or C on top of R
00:26:05 <elliott> pikhq: the thing is, this differentiation is *precise*, and has no more overhead or complexity than using, say, complex numbers
00:26:15 <elliott> (of course there is overhead when using the symbolic types, but this does precise numeric differentiation too!)
00:26:24 <elliott> brb
00:27:24 <pikhq> elliott: Very very nice.
00:27:28 <j-invariant> elliott: what happens if you dualize dual numbers?
00:27:55 <elliott> ill try in a minute
00:33:21 <pikhq> elliott: BTW, that is totally awesome. Really truely awesome.
00:33:24 <pikhq> God I love mathematics.
00:34:21 <coppro> I want to do my matrix math in Haskell
00:35:14 -!- Phantom_Hoover has quit (Remote host closed the connection).
00:37:49 <j-invariant> matrix math in Haskell
00:37:52 <j-invariant> oops
00:38:20 <zzo38> coppro: Did you write a program for matrix math in Haskell?
00:50:37 <zzo38> Would you like to TeXnicard contest?
00:52:34 <coppro> zzo38: I did not
00:53:05 <zzo38> coppro: Did you find someone else's program to make matrix math in Haskell?
00:55:13 -!- sebbu has quit (Read error: Connection reset by peer).
00:55:27 <coppro> zzo38: no
00:55:40 -!- sebbu has joined.
01:00:41 <zzo38> <[:]ra+s2s1[Al1rl2xY]xD>
01:05:46 <zzo38> What do you think might be the best way to implement the "English" feature of TeXnicard? (It is the feature to change word forms and change numbers to words, and it is meant to work also with languages other than English, too.)
01:06:32 <elliott> j-invariant: i think it does nothing, just like complicating (technical term!) complex numbers
01:07:22 <elliott> j-invariant: (a+a'd)+(b+b'd)d [
01:07:24 <elliott> erm
01:07:29 <elliott> j-invariant: (a+a'd)+(b+b'd)d = ...simplify it yourself i'm too lazy to :P
01:09:54 <elliott> *Main> sq' x
01:09:54 <elliott> (x + x)
01:09:57 <elliott> does more simplifications now
01:10:39 <elliott> pikhq: another advantage of this method --
01:10:46 <elliott> pikhq: numeric differentiation of a function f requires 2 calls to f
01:10:56 <zzo38> How do you represent "b is a power of ten" in TNT?
01:10:58 <elliott> pikhq: automatic differentiation of a function f is not only more precise, but only requires 1 call
01:11:05 <elliott> pikhq: (to f extended to the duals)
01:11:19 -!- Mathnerd314 has quit (Ping timeout: 264 seconds).
01:11:28 <elliott> pikhq: so if f takes seven hours to compute (don't laugh -- automatic differentiation is used to differentiate whole physics simulations!), automatic differentiation is *much* faster!
01:12:20 <olsner> couldn't you make it data Dual t = Dual t (Dual t) to get all the nth-derivatives too?
01:12:37 <elliott> olsner: you could also do that just by iterating deriv :P
01:12:44 <elliott> deriv :: (Num t) => (Dual t -> Dual t) -> (t -> t)
01:12:45 <elliott> deriv f x = nf (f (Dual x 1))
01:12:55 <elliott> well, sort of
01:12:57 <elliott> chop off the nf part
01:13:02 <elliott> nf :: Dual t -> t
01:13:02 <elliott> nf (Dual _ x') = x'
01:13:17 <elliott> olsner: hmm or maybe not
01:13:29 <elliott> olsner: hmm i think you can do it with normal dual
01:13:41 <elliott> olsner: since Dual t (Dual t) ~ Dual (Dual t) (Dual t), with the first one being (Dual n 0)
01:13:47 <elliott> olsner: and Dual t already includes Dual (Dual t)
01:13:58 <elliott> olsner: what would the argument look like for "Dual t (Dual t)"?
01:14:01 <elliott> deriv f x = nf (f (Dual x 1))
01:14:04 <elliott> would it be
01:14:10 <elliott> deriv2 f x = nf (f (Dual x (Dual 0 1)))?
01:14:13 <elliott> having trouble visualising it
01:15:12 -!- Mathnerd314 has joined.
01:15:17 -!- zzo38 has quit (Quit: Do not write below this line. Place stamp here. You must be present to win. No purchase necessary.).
01:15:59 <elliott> hey j-invariant what would the second argument be :P
01:16:10 <j-invariant> to what?
01:16:32 <elliott> j-invariant: given data Dual2 t = Dual2 t (Dual2 t)
01:16:42 <elliott> j-invariant: what's the equivalent of "deriv f x = nf (f (Dual x 1))" but to do a second derivative
01:16:48 <elliott> nf just accesses the second field btw
01:16:49 <j-invariant> oh this is the full taylor series?
01:16:59 <elliott> deriv2 f x = nf2 (f (Dual2 x (Dual2 0 1)))?
01:17:02 <elliott> I'm really not sure
01:17:02 -!- zzo38 has joined.
01:17:05 <elliott> or is it (Dual2 1 1) there?
01:17:11 <zzo38> Hay! I told you not to write below this line!
01:17:12 -!- zzo38 has left (?).
01:17:18 <elliott> I VIOLATE YOUR RULES
01:17:31 <olsner> the second argument would probably still just be '1', relying on polymorphism to create the right Dual version of 1
01:18:01 <elliott> olsner: that would turn out to be (Dual 1 0)
01:18:05 <elliott> for a second derivative
01:18:09 <elliott> olsner: erm or first
01:18:13 <elliott> olsner: but what would a second be?
01:18:16 <elliott> you've really confused me dude :D
01:18:32 <Vorpal> Deewiant, down?
01:18:40 <Deewiant> Nah, just laggy
01:18:54 <j-invariant> elliott: I mean it's Dual2 f (Dual2 f' (Dual2 f'' (Dual2 f''' ...)))?
01:19:05 -!- Sgeo has joined.
01:19:09 <elliott> j-invariant: wow would that actually work?
01:19:18 <olsner> I think the only difference might be in the use of the nf function, let's say you make it nf 0 (Dual2 x _) = x; nf n (Dual2 _ x') = nf (n-1) x'
01:19:21 <elliott> j-invariant: except, the problem here is that f is a function not a number to start with :P
01:19:23 <j-invariant> I thought that's what you were going for
01:19:33 <elliott> j-invariant: that sounds cool, but actually I am just trying to do second derivative :-)
01:19:35 <elliott> f''(x)
01:19:46 <elliott> f'(x) = nf f(x + 1d)
01:19:48 <elliott> f''(x) = ?
01:20:27 <Vorpal> Deewiant, very much down I think
01:20:30 <Vorpal> I timed out
01:20:32 <olsner> (that is, nf n is the nth-derivative, with n=0 being the value itself)
01:20:55 <elliott> olsner: heh
01:21:20 <Deewiant> Vorpal: Now I did too
01:21:25 <Sgeo> Shockingly, if I force myself not to IRC, I'll find something else to do
01:21:31 * Sgeo glares at the Braid demo menacingly
01:21:48 <Deewiant> Vorpal: Oh well, I've had enough for today anyway
01:21:50 * Mathnerd314 <3 Braid so much that he can't play it
01:21:51 <Sgeo> Anyways, going to try going back on my meds tomorrow
01:21:57 <fizzie> http://p.zem.fi/ovya -- that just makes no sense at all, zlib uncompress() and java.util.zip.Inflate are supposed to do the same thing, as far as I can determine.
01:22:02 <Vorpal> Deewiant, up
01:22:03 <Sgeo> Today, I'll still try to do something
01:22:07 <Vorpal> Deewiant, and I will hand you the resource
01:22:14 <Deewiant> Fine
01:22:23 <Sgeo> Mathnerd314, as in, don't trust yourself to quit?
01:22:58 <Mathnerd314> Sgeo: no, I watched a playthrough online, in such excruciating detail that there's no point in playing it
01:23:05 <Vorpal> still sending me chunks, slowly
01:23:15 <olsner> data Dual2 t = Dual2 t (Dual2 t) is incidentally just an infinite list of t's
01:23:27 <elliott> olsner: indeed it is
01:23:32 <Sgeo> I'm sort of watching a blind LP, but only up to the point that I solved already
01:23:34 <elliott> olsner: i still don't understand how it works though
01:23:42 <Vorpal> Deewiant, close to down though
01:23:48 <Deewiant> Yep
01:24:07 <Sgeo> World 4's Hunt is fun
01:24:19 <elliott> olsner: wait, all this is pointless
01:24:21 <elliott> we have second derivatives already
01:24:24 <elliott> sq'' :: (Num t) => t -> t
01:24:25 <elliott> sq'' = deriv (deriv sq)
01:24:30 <elliott> *Main> sq'' x
01:24:30 <elliott> 2
01:24:41 <elliott> *Main> sq'' 1.0
01:24:41 <elliott> 2.0
01:25:02 <Vorpal> Deewiant, likely down again
01:25:13 <Deewiant> Down-ish
01:25:51 -!- metalman has joined.
01:26:03 -!- metalman has left (?).
01:26:09 <Vorpal> downish indeed
01:26:13 <elliott> why doesn't everyone differentiate this way
01:26:14 <elliott> it's perfect
01:27:16 <Sgeo> What's deriv's type and definition?
01:27:22 <elliott> deriv :: (Num t) => (Dual t -> Dual t) -> (t -> t)
01:27:22 <elliott> deriv f x = nf (f (Dual x 1))
01:27:26 <Mathnerd314> elliott: what about sin x?
01:27:39 <elliott> olsner: it seems that writing nderiv which takes the number of derivs as a param is impossible in haskell
01:27:41 <elliott> due to the stupid type system
01:27:57 <Mathnerd314> probably just need type-level naturals
01:28:01 <elliott> Mathnerd314: well i'd have to implement sin over dual numbers because IIRC it's in the relevant typeclass, Real or something
01:28:03 <Sgeo> pikhq just mentioned something about Dual numbers on FB
01:28:05 <elliott> so right now it can't do that.
01:28:13 <Sgeo> I'm still clueless
01:28:14 <elliott> Sgeo: well he noticed me talking about them. so
01:28:21 <olsner> elliott: I think you can do that with polymorphic recursion or what they call it
01:28:31 <Sgeo> epsilon^2 = 0
01:28:34 <elliott> Sgeo: no.
01:28:44 <elliott> Sgeo: dual number is a + bd for a and b, d is just like i, you can think of it conceptually as d^2 = 0
01:28:56 <elliott> Sgeo: (a+a'd) + (b+b'd) = (a+b)+(a'+b')d
01:29:09 <elliott> Sgeo: (a+a'd) * (b+b'd) = ab + (ab'+a'b)d
01:29:10 <Sgeo> AIIIEEEEEEEEE
01:29:19 <elliott> Sgeo: say f* is the obvious extension of f to the dual numbers
01:29:28 <elliott> Sgeo: then f'(x) = nf f*(x+1d)
01:29:35 <elliott> where nf(a+a'd) = a'
01:29:35 <Mathnerd314> elliott: I'm betting you can also think of it as a Taylor series.
01:29:41 <elliott> Sgeo: what the hell is AIIIEEEEEEEEE about that
01:29:47 <elliott> too many letters/!
01:29:48 <elliott> *?!
01:29:50 <elliott> it's trivial
01:29:52 <Sgeo> d^2=0 where d=/=0?
01:30:01 <elliott> Sgeo: i said you can think about it CONCEPTUALLY
01:30:40 <elliott> d^2 = d*2
01:30:44 <elliott> d = (0 + 1d), obviously
01:30:52 <elliott> by applying the rule for multiplication we find the result is (0+0d) = 0
01:31:05 <elliott> but the important thing is that d is /not/ a real, it's a dual
01:31:19 <elliott> just like there is no real number whose square is -1
01:31:42 -!- FireFly has quit (Quit: swatted to death).
01:31:54 <Sgeo> So d is just a nonzero number, that when squared, is 0. Why do you keep yelling "CONCEPTUALLY"
01:31:58 <Sgeo> And nonreal
01:32:21 <elliott> Sgeo: CONCEPTUALLY because otherwise you'll go crazy.
01:32:30 <j-invariant> it's odd that d^2=0 does not imply that d=0
01:32:32 <Sgeo> It's just another dimension
01:32:34 <elliott> anyway we have
01:32:36 <elliott> f(x) = x^2
01:32:37 <elliott> ergo
01:32:38 <elliott> f(x) = x*x
01:32:41 <elliott> and we want to work out f'(x)
01:32:49 <elliott> well, extend it to the duals
01:32:56 <elliott> f*(a+a'd) = (a+a'd) * (a+a'd)
01:33:00 <elliott> ergo
01:33:15 <elliott> f*(a+a'd) = aa + (aa'+a'a)d
01:33:16 <elliott> ergo
01:33:18 <Sgeo> I'll wiki it later
01:33:28 <elliott> f*(a+a'd) = a^2 + (aa')^2d
01:33:37 <elliott> now let's say we feed it (x+1d) for real x
01:33:55 <elliott> er wait i made a mistake
01:33:59 <elliott> <elliott> f*(a+a'd) = aa + (aa'+a'a)d
01:34:00 <elliott> ergo
01:34:07 <elliott> f*(a+a'd) = a^2 + (2aa')d
01:34:10 <elliott> now let's say we feed it (x+1d) for real x
01:34:20 <elliott> f*(x+1d) = x^2 + (2*1*x)d
01:34:20 <elliott> i.e.
01:34:25 <elliott> f*(x+1d) = x^2 + (2x)d
01:34:33 <elliott> now let's say we take the unreal (infinitesimal part of this)
01:34:42 <elliott> nf f*(x+1d) = 2x
01:34:46 <elliott> so, basically, for any function f
01:34:52 <elliott> f'(x) = nf f*(x + 1d)
01:35:01 <elliott> Sgeo: you don't need to wiki it, i just explained it in the simplest terms possible
01:35:05 <elliott> and actually the WP article does not include this
01:35:15 <Sgeo> I'll reread clog later
01:36:13 <elliott> olsner: hm I think you are right
01:36:16 <elliott> olsner: that the existing Dual holds us back
01:36:19 <elliott> because each deriv has a different type
01:36:28 <elliott> we need Dual t, Dual (Dual t), Dual (Dual (Dual t)), etc.
01:36:31 <elliott> i'll try Dual2
01:38:09 <elliott> (Dual a a') * (Dual b b') = Dual (a*b) ((a*b')+(a'*b))
01:38:13 <elliott> olsner: *regrettably* I can't see how this can work
01:38:20 <elliott> olsner: (Dual here is Dual2 now, data Dual t = Dual t (Dual t))
01:38:25 <ais523> fizzie: you know fungot's anti-spam features?
01:38:37 <ais523> could you turn them off in PM? spamming isn't an issue there, and it'd make it harder to test things
01:38:51 <elliott> olsner: also, how would one define d?
01:38:54 <elliott> oh wait nm
01:39:35 <elliott> olsner: any ideas wrt *?
01:40:26 <elliott> olsner: second derivatives do work like this though ... but I'm not sure these are dual numbers any more
01:40:32 <elliott> also, they don't have a nice prettyprinting :)
01:40:40 <elliott> olsner: what we really want is (Dual n t) for every nat n
01:40:50 <elliott> olsner: then nderiv could just dependent-type it up
01:40:57 <elliott> j-invariant: think this would be worth doing in Coq? :p
01:41:50 <fizzie> ais523: Isn't the only anti-spamming measure related to the chatting feature? Or do you want to somehow "test" that?
01:42:31 <elliott> olsner: well actually, you can do type-level nats in haskell
01:42:34 <elliott> olsner: am i insane enough to try
01:42:40 <olsner> elliott: of course you are
01:42:47 <oerjan> fungot fungot fungot
01:42:47 <fungot> oerjan: contestmaster without eir consent. if
01:43:04 <elliott> olsner: you do realise that Nth derivatives worked like this, just not Nth being parameterisable? :D
01:43:15 <fizzie> Sounds agoran.
01:43:47 <fizzie> I can turn them off in PM in theory, but not very fast, certainly not today.
01:44:41 <j-invariant> elliott: do you have a theory of calculus?
01:45:43 <elliott> j-invariant: in what sense?
01:45:49 <Sgeo> What is e^epsilon?/
01:45:52 <j-invariant> to specify the dual numbers
01:46:38 <elliott> j-invariant: sorry, I'm not understanding :/
01:46:50 <olsner> elliott: yeah, I just disregarded that immediately because N wasn't parameterisable :)
01:47:32 <elliott> olsner: http://sprunge.us/BWGX now get me a generic dN that works for all Dual types
01:47:35 <elliott> (protip: type classes)
01:47:47 <j-invariant> elliott: well something that says the 'd' part is the derivative
01:48:33 <elliott> j-invariant: I don't really have any formal backing to it other than "it works", no :)
01:48:40 <elliott> j-invariant: d is a bit of a misnomer here -- it's actually \epsilon really
01:48:48 <j-invariant> no point then
01:48:53 <elliott> j-invariant: why not?
01:49:04 <j-invariant> well you wouldn't get anything new from it would you?
01:49:15 <elliott> j-invariant: perhaps not ... but it sure is interesting
01:49:21 <elliott> and I think a theory can develop organically around it perhaps
01:49:50 <elliott> j-invariant: nf (f*(x + \epsilon)) -- I can imagine this is a theorem of non-standard analysis
01:49:53 <elliott> although I suppose I can't really be sure
01:49:59 <elliott> actually it might not be, since multiplication is different here
01:50:07 <elliott> olsner: actually hmm it's more fromInteger I want
01:51:34 <elliott> ALWAYS A GOOD SIGN
01:52:36 <Mathnerd314> elliott: my favorite is NoImplicitPrelude
01:52:44 <elliott> WHAT COULD POSSIBLY GO WRONG
01:53:40 <olsner> hmm, I'm doing this wrong somehow, all my nth-derivaties end up the same as the first derivative
01:55:09 <elliott> Vorpal: Notch is playing Minecraft on a live stream.
01:55:13 <elliott> Vorpal: For some reason, it is Indev.
01:55:33 -!- tswett has joined.
01:55:38 <tswett> Hei
01:55:49 <oerjan> God kveld
01:56:11 <elliott> tswett: vordin
01:56:13 <tswett> oerjan, the closest language I know to yours is English. :P
01:56:24 <tswett> Is it Norwegian?
01:56:28 <tswett> elliott: I don't know what that language is.
01:56:38 <elliott> tswett: Vordkïp.
01:56:39 <oerjan> tswett: yes, as is "Hei"
01:56:43 <tswett> That word resembles "morning", but I imagine it's a coincidence.
01:57:00 <tswett> "Hei" is Norwegian? It's also Finnish, unless I've been steered horribly wrong.
01:57:08 <oerjan> could be
01:57:22 <oerjan> translatefromto fi en hei
01:57:38 <tswett> echo How are you feeling today, HackBot?
01:57:40 <HackEgo> How are you feeling today, HackBot?
01:57:40 <HackEgo> hey
01:57:49 <olsner> it's also in english, but spelled 'hey'
01:57:53 <tswett> Translations in a mere twenty seconds!
01:57:56 <elliott> "Ooh and a pig! Hello piggy! [kills the pig]" --Notch, playing -- for some reason -- an old vrsion of Minecraft.
01:57:58 <elliott> *version
01:58:01 <tswett> olsner: you have a point, there!
01:58:05 <elliott> oerjan: translatefromto X en = translatefrom X
01:58:23 <elliott> we're anglocentrists :P
01:58:26 <oerjan> run ls bin/trans*
01:58:27 <HackEgo> bin/translate \ bin/translatefromto \ bin/translateto
01:58:37 <oerjan> elliott: YOU SO WRONG
01:58:37 <tswett> So, let's see how intuitive Finnish is. Can I just look in a dictionary and construct valid sentences?
01:59:18 <elliott> oerjan: hm so I am
01:59:27 <oerjan> fizzie: YOUR EXPERTISE IS NEEDED
01:59:30 <olsner> tswett: does *any* language allow you to do that?
01:59:30 <elliott> tswett: isn't finnish meant to be incredibly difficult to learn :D
02:00:12 <tswett> olsner: English, if you already know English. :P
02:00:18 <elliott> oh it's an old recording, not live
02:00:27 <oerjan> olsner: _maybe_ esperanto?
02:01:02 <tswett> Si tú hace él con español, tú no vas a ir horriblemente incorrecto.
02:01:05 <fizzie> I don't think that will work, but I can comment on validity if you like.
02:01:29 <olsner> elliott: in (Dual x 1), doesn't that need to do something special for higher derivatives?
02:01:45 <j-invariant> 1 = Dual 1 0 ?
02:01:50 <tswett> Minun kalani kutistuu.
02:01:52 <olsner> j-invariant: yes
02:01:54 <tswett> There, did I get it right?
02:01:58 <elliott> olsner: quite possibly!
02:02:00 <elliott> Could not deduce (Num (Dual n Integer))
02:02:00 <elliott> from the context (Foo (S n), Num (Dual n t), TN n)
02:02:03 <elliott> j-invariant: haskell is STUPID
02:02:07 <elliott> it can't unify t==Integer :D
02:02:09 <j-invariant> dndn
02:02:12 <j-invariant> hehe
02:02:16 <elliott> class (TN n) => Foo n where
02:02:16 <elliott> d :: Dual n Integer
02:02:16 <elliott> instance Foo Z where
02:02:16 <elliott> d = Dual0 0 1
02:02:16 <elliott> instance (Num (Dual n Integer), TN n) => Foo (S n) where
02:02:17 <elliott> d = DualN 0 1
02:02:19 <elliott> this is working I think!
02:02:26 <elliott> but, it's Integer-only
02:02:30 <elliott> so i'll have to fix that
02:02:35 <olsner> more fromInteger? :)
02:02:46 <elliott> oh sweet, it stack overflows
02:02:53 <elliott> like a boss
02:03:05 <elliott> wait, how ...
02:04:56 <elliott> instance (Num t) => Num (Dual Z t) where
02:04:56 <elliott> fromInteger n = Dual0 (fromInteger n) 0
02:04:58 <elliott> instance (TN n, Num t, Num (Dual n t)) => Num (Dual (S n) t) where
02:04:58 <elliott> fromInteger n = DualN (fromInteger n) 0
02:05:04 <elliott> i suppose that this definition may be defective...
02:05:06 <Sgeo> God hates fractions!
02:05:07 <fizzie> tswett: Yes, that is valid. "My fish is getting smaller."
02:05:46 <fizzie> Though the "minun" part is not especially necessary, the suffix is enough.
02:05:49 <elliott> olsner: how is this not halting.
02:06:14 <elliott> *Main> :set -XFlexibleContexts
02:06:15 <elliott> *Main> d :: (Foo Z) => Dual Z Integer
02:06:15 <elliott> *** Exception: stack overflow
02:06:15 <elliott> *Main>
02:07:27 <elliott> oh it's my show
02:08:31 <elliott> *Main> d :: (Foo Z) => Dual Z Integer
02:08:31 <elliott> (0 + 1*d)
02:08:39 <elliott> d :: Dual (S Z) Integer
02:08:40 <elliott> (0 + (1 + 0*d)*d)
02:08:41 <elliott> JOY!
02:08:56 <elliott> ugh
02:09:01 <elliott> olsner: I have to write all my definitions twice
02:09:04 <elliott> data Dual n t where
02:09:04 <elliott> Dual0 :: t -> t -> Dual Z t
02:09:04 <elliott> DualN :: (TN n) => t -> Dual n t -> Dual (S n) t
02:09:05 <elliott> because of this
02:09:08 <Sgeo> Factor!
02:09:09 <elliott> has to be two separate Num instances
02:09:10 <elliott> any ideas?
02:09:14 <elliott> Sgeo: what.
02:09:16 <j-invariant> why don't you make Dual0 trivial?
02:09:23 <j-invariant> like the identity function
02:09:36 <Sgeo> elliott, you shouted out the name of some concatenative language
02:09:41 <Sgeo> So I did the same =P
02:10:05 <elliott> j-invariant: yeah i will
02:10:13 <elliott> then first-order stuff is (Dual 1 t)
02:11:07 <elliott> j-invariant: hypothesis: any sufficiently complicated Haskell program contains an ad hoc, informally-specific, bug-ridden, slow implementation of half of Agda
02:11:21 <j-invariant> or at least a good chunc of Peano Arithmetic
02:11:28 <elliott> :)
02:11:31 <j-invariant> ..in the type system
02:11:31 <elliott> in the type system, that is.
02:11:32 <elliott> ha
02:11:33 <j-invariant> lol
02:12:29 <elliott> j-invariant: wait if Dual0 is identity, what's d :: Dual 0 t
02:12:32 <elliott> 0?
02:12:34 <elliott> I think so, yeah, 0
02:12:37 <elliott> zeroth derivative
02:12:43 <elliott> Could not deduce (Eq (Dual n t))
02:12:43 <elliott> from the context (S n ~ S n2, TN n2)
02:12:47 <elliott> that little ~ is the sign meaning "you're fucked"
02:13:09 <elliott> ok it's working
02:13:14 <Sgeo> Can duals be used to integrate?
02:13:24 <Sgeo> Although that doesn't really make much sense, but whatever
02:14:23 <oerjan> oleg probably does that
02:14:25 <elliott> Sgeo: i... maybe
02:15:33 <elliott> i mean integrals are sort of f^(-1) :P
02:15:48 <elliott> as in f^(2) = second derivative
02:15:54 <coppro> yeah
02:16:03 <fizzie> Vorpal: I in fact looked at the disassembled asm, and Notch *has* that bug there. He allocates a (xsize*ysize*zsize*5)/2 byte[] (that's the size of the uncompressed data) and then calls Deflater.deflate() on that byte array to compress the chunk update. If it won't all fit, it will just get truncated.
02:16:11 <fizzie> s/asm/bytecode/
02:17:03 <elliott> *Main> d :: Dual (S (S Z)) Double
02:17:03 <elliott> (0.0 + (1.0 + 0.0*d)*d)
02:17:04 <elliott> ^_^
02:17:22 <elliott> j-invariant: this is actually working! just, hideously
02:17:39 -!- cal153 has quit.
02:18:04 <Sgeo> But if derivatives with duals just gives a number, what number could make sense for integrals, given that you always have a constant
02:18:08 <Sgeo> arbitrary constant
02:19:06 <fizzie> I have no idea how to communicate the bug there, posting on the getsatisfaction.com site sounds pretty much useless.
02:19:53 <elliott> olsner: wait what is the nf signature for this?
02:20:15 <elliott> fizzie: Notch "says" he's fixing getsatisfaction bugs but I doubt he's smart enough to understand your incisive analysis.
02:20:43 <elliott> Sgeo: erm well actually derivatives with duals give duals
02:20:46 <elliott> we just ignore the standard part
02:21:43 <fizzie> elliott: Yes, and the "common problems" list is 78 pages of 20 items (so >1500 items), and they get sorted by voting order, and that sort of a "problem" is probably rather unlikely to get any votes at all.
02:22:02 <elliott> fizzie: Tweet him?
02:22:08 <elliott> fizzie: Admittedly it might take several tweets
02:22:10 <elliott> *tweets.
02:22:28 <fizzie> If I can describe the issue in 140 chars, I'll consider that.
02:23:27 <elliott> fizzie: Bug: You allocate (xsz*ysz*5)/2 byte[] for compressed chunk data; if it's bigger, it gets truncated
02:23:38 <fizzie> Yes, something like that could work.
02:23:43 <elliott> fizzie: Bug: You allocate (xsz*ysz*5)/2 byte[] for compressed SMP chunk data; if it's bigger, it gets truncated
02:23:46 <elliott> That's better.
02:23:53 <elliott> (Perhaps noting client vs. server might help, too...)
02:23:57 <fizzie> Seeing actual code in there might make him look at it.
02:24:32 <oerjan> fizzie: not zsz?
02:24:43 -!- chickenzilla has joined.
02:24:45 <fizzie> "@notch SMP server bug: byte[x*y*z*5/2] for Deflater.deflate() in some cases not large enough, causes truncated messages"
02:24:48 <fizzie> That's just 120 chars.
02:25:05 <fizzie> I can't be sure of his variable names since it's obfuscacated.
02:25:19 <tswett> See, I know Finnish grammar. :P
02:25:37 <tswett> Vocabulary is all I need now!
02:25:59 <fizzie> tswett: Try something with more suffixes. Like "Also for a coffee drinker" in a single word. (That's one of our stock examples for justifying our statistical-morphemes based language models.)
02:26:26 -!- elliott has set topic: Also for a coffee drinker | http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
02:26:30 <elliott> All so, for a coffee drinker.
02:26:35 <tswett> I have to wonder if linguists first saw that every word has initial stress in Finnish, and then concluded that everything without a stressed syllable must not be a word.
02:26:49 <elliott> Also, for... a coffee drinker?
02:26:59 -!- cal153 has joined.
02:27:03 <tswett> Also, fora cough, ye drinker.
02:27:16 <oerjan> Alsof, or a coffee drinker?
02:27:45 <elliott> Al Sofor: a coffee drinker?
02:27:56 <elliott> David slowed slightly as his ears, also for a coffee drinker, sped up.
02:28:11 <tswett> Don't forget the "his pace".
02:28:16 -!- cal153 has quit (Client Quit).
02:28:22 <elliott> tswett: Oh yeah, that makes the sentence /much/ more meaningful :P
02:28:47 <oerjan> aerodynamic ear propulsion
02:29:17 <elliott> j-invariant: wait what _is_ the type of nf?
02:29:20 <elliott> class (TN n, Num t) => DualFuncs n t where
02:29:20 <elliott> d :: Dual n t
02:29:20 <elliott> st :: Dual n t -> t
02:29:23 -!- cal153 has joined.
02:29:25 <elliott> oh!
02:29:31 <elliott> nf :: Dual (S n) t -> Dual n t
02:29:37 <elliott> now let's see if Haskell will accept that (doubtful!)
02:30:30 <elliott> it can even go out of the typeclass
02:30:44 <elliott> oh, so can st
02:31:10 <tswett> Whelp. There's only one way to learn Finnish.
02:31:21 <elliott> and d for that matter
02:31:23 <elliott> tswett: what way is that?
02:31:25 <pikhq> Be born in Finland?
02:31:27 <oerjan> yep, you have to get into the sauna
02:31:36 <tswett> I've forgotten it.
02:31:39 <oerjan> and drink plenty
02:32:36 <elliott> (DualS a a') * (DualS b b') = DualS (a*b) ((a*b')+(a'*b))
02:32:42 <elliott> I still can't figure out how to make this work.
02:32:43 <elliott> olsner: any ideas?
02:32:47 <elliott> data Dual n t where
02:32:47 <elliott> DualZ :: t -> Dual Z t
02:32:48 <elliott> DualS :: (TN n) => t -> Dual n t -> Dual (S n) t
02:32:52 <elliott> TN just means Type Natural
02:33:01 <elliott> it bawls about infinite types
02:33:30 <elliott> I mean I think in the latter sum
02:33:36 <elliott> we need to cast a and b to DualSes
02:33:36 <pikhq> fizzie: 「コヒー飲み者の為にも」 *could* be considered a single word. Though it's really hard to say, because the notion of "word" in Japanese is rather... Vague.
02:33:39 <elliott> but is this even possible?
02:33:59 <pikhq> (kohînomimononotamenimo)
02:34:30 <pikhq> Erm, コーヒー, not コヒー.
02:34:39 <pikhq> s/kohî/kôhî/
02:34:46 <elliott> or add an instance declaration for (Num (Dual n t))
02:34:47 <elliott> >_<
02:35:26 <tswett> Here we go.
02:35:31 <fizzie> elliott: Incidentally, if I tweet like that, he'll probably just "fix" it by removing the "/2" from it... but I guess it's better than nothing. (Also Java Inflater doesn't seem to export zlib compressBound() function that'd give him an actual upper bound to use.)
02:35:48 <tswett> The only way to learn Finnish is via the Conversational Finnish course from the Foreign Service Institute.
02:35:55 <elliott> fizzie: wait, does he actually just assume compression will always halve the data?
02:36:08 <pikhq> tswett: I'm highly inclined to say "bullshit" on that.
02:36:20 <tswett> Okay, there may be other ways.
02:36:23 <elliott> olsner: guess what?
02:36:25 <tswett> But this is the only way I've found.
02:36:27 <elliott> olsner: IncoherentInstances
02:36:32 <fizzie> elliott: No, that's the uncompressed size. It' s 2.5 bytes per block. (Some data is stored as nybbles.)
02:36:35 <elliott> LOL DOESN'T EVEN WORK
02:36:39 <Sgeo> elliott, please tell me that you're talking about someone other than Notch
02:36:48 <pikhq> tswett: Though I suspect their courses are pretty close to the only *actual courses* that will get you competence in the language, surely not the only way.
02:36:50 <elliott> Sgeo: no, i'm not, why
02:37:08 <Sgeo> I'm going to assume then that someone is misunderstanding someone
02:37:14 <pikhq> (seriously, most language courses are absolutely, positively terrible, and actually no better than a freaking phrasebook)
02:38:02 <fizzie> Sgeo: Well, he *is* assuming that the compressed output it always <= than the uncompressed.
02:38:40 <elliott> No instance for (Num (Dual n t))
02:38:40 <Sgeo> Hmm... naive, but I can imagine not realizing that that's not always the case unless casually mentioned
02:39:01 <elliott> olsner: I think this is one of those cases where Haskell just doesn't want to play.
02:39:14 <tswett> Yeah, when I searched for 'learn finnish', every single Google result was useless.
02:39:34 <tswett> And I even looked through all 2.7 million of them.
02:39:38 <Sgeo> <spam>
02:39:41 <Sgeo> Soon holidays
02:39:51 <Sgeo> Hmm.. Isn't Soon ***SPOILER***
02:40:04 <Sgeo> Wait, it's not a spoiler. He's dead
02:40:15 <olsner> elliott: yeah, abusing the type system will usually end up like that...
02:40:32 <Sgeo> Also, isn't Azure City kind of ***SPOILER***
02:40:53 <oerjan> elliott: maybe you need a type class for what "n" is there
02:40:55 <elliott> Sgeo: What.
02:41:02 <pikhq> tswett: s/finnish/any language ever/ and you'll have similar results.
02:41:04 <elliott> oerjan: I do; it's TN
02:41:05 <Sgeo> elliott, lame OOTS references
02:41:06 <elliott> oerjan: type natural
02:41:14 <olsner> and my Dual2 version is working perfectly except it doesn't produce the right derivatives
02:41:22 <elliott> oerjan: it's just that, even though every constructor for Dual satisfies (TN n)
02:41:31 <elliott> oerjan: haskell doesn't realise this implies that Dual n t implies TN n
02:41:33 <tswett> pikhq: huh, I guess I haven't tried that with very many languages.
02:41:40 <elliott> oerjan: so because i use something that must be polymorphic over all duals in this case
02:41:45 <elliott> oerjan: it says "hey!! you don't have instances for this"
02:41:52 <elliott> oerjan: even though I have instances for the Z and (TN n) => (S n) case
02:42:06 <elliott> because GADTs can't have typeclass constraints on the actual type, just the constructors :(
02:42:12 <pikhq> tswett: The issue is that most people have this crazy idea that memorising phrases will eventually create fluency.
02:42:26 <pikhq> Or that memorising grammar rules will do the same.
02:42:36 <oerjan> hm
02:42:51 <elliott> oerjan: wanna try and fix it? :D
02:43:16 <tswett> Weird.
02:43:45 <pikhq> Yeah, it works about as well as memorising multiplication tables produces competence at mathematics.
02:44:43 <elliott> tswett: Um, Ctrl+S?
02:44:46 <elliott> Right click link save as?
02:44:47 <elliott> tswett: wget?
02:45:42 <tswett> Ctrl+S is disabled. There is no link. The only computer I have access to is running Windows.
02:46:15 <Sgeo> tswett, data: url?
02:46:23 <Sgeo> Probably my favorite thing to do
02:46:25 <Sgeo> >.>
02:47:14 <elliott> Sgeo: Why is that your... favourite thing to do?
02:47:23 <elliott> tswett: Why is Ctrl+S disabled, and how?
02:47:48 <Sgeo> elliott, seems easier than installing wget etc
02:47:56 <tswett> I guess Chrome doesn't let you Ctrl+S something that hasn't loaded.
02:48:16 <Sgeo> Recently did that to help a girl download some sound file for use in her presentation
02:48:16 <tswett> Sgeo: you can use a data: URL to do that?
02:48:50 <Sgeo> There, you have a link
02:49:56 <elliott> oerjan: basically the issue is
02:49:59 <elliott> instance (Num t) => Num (Dual Z t) where
02:49:59 <elliott> instance (TN n, Num t, Num (Dual n t)) => Num (Dual (S n) t) where
02:50:09 <elliott> oerjan: do not, together, constitute an instance for (Num (Dual n t)) in Haskell's mind
02:50:25 <elliott> oerjan: because, even though every constructor of Dual has (TN n) in effect, this constraint is not on the type itself (and cannot be)
02:51:00 <Sgeo> elliott, use .... my mind is blank trying to come up with a sufficiently similar dynamically-typed language
02:51:20 <elliott> Sgeo: there is absolutely no call for a dynamically-typed language here; it is merely that the type system is too weak
02:51:44 <elliott> when your logic can't prove a given statement (and you really want to prove it), you don't switch to an inconsistent logic (which a freely typed language is), you switch to a more powerful one
02:52:31 <Sgeo> I really want to prove 1=2 >.>
02:53:13 <elliott> Sgeo: Why.
02:53:47 <Sgeo> Because I was trying to be somewhat funny, and also a power powerful, consistent logic would not help there, yet an inconsistent one would
02:55:04 <olsner> elliott: I think I found the missing magic now: http://hpaste.org/paste/42405/automatic_differentiation#p42407
02:55:19 <elliott> data Dual t = Dual t (Dual t)
02:55:20 <elliott> olsner: fail
02:55:25 <elliott> olsner: this makes Shows completely unreadable
02:55:32 <elliott> olsner: I'm trying to do it the proper way -- a hierarchy of Dual types
02:55:39 <elliott> i.e. length-parameterised lists
02:56:10 <elliott> olsner: that does look cool though
02:56:15 <elliott> olsner: it's just, Show will be so ugly :/
02:56:16 <olsner> elliott: sure, Show always gives an infinite result :)
02:56:29 <elliott> olsner: any ideas around that? other than not using Deriv directly
02:56:39 <Sgeo> Bank of America blocks WikiLeaks. WikiLeaks claims to have dirt on Bank of America
02:56:41 <Sgeo> This is fun
02:57:08 <elliott> Sgeo: *claimed to, ages ago
02:57:12 <elliott> well, _implied_
02:57:27 <elliott> olsner: i mean your solution is more elegant obviously
02:57:32 <elliott> olsner: it's just, :(
02:57:36 <elliott> olsner: I want my hierarchy :P
02:57:42 <elliott> j-invariant: any opinions?
02:58:59 <tswett> Sgeo: ah, how useful.
02:59:19 <olsner> elliott: Eq is a bit interesting too
02:59:32 <elliott> olsner: oh. indeed. that is quite a problem.
02:59:39 <elliott> olsner: e.g. consider piecewise functions.
03:01:13 <elliott> olsner: do you know coq?
03:01:58 <olsner> nope, never used it, only heard of it
03:02:21 <elliott> olsner: well I'm going to have a stab at it in Coq :P
03:02:29 <olsner> good luck :D
03:02:54 <elliott> Inductive Dual T : nat -> Type :=
03:02:54 <elliott> | dualZ : T -> Dual T 0
03:02:54 <elliott> | dualS : forall n, T -> Dual T n -> Dual T (S n).
03:02:54 <elliott> Implicit Arguments dualS [n].
03:02:57 <elliott> olsner: it's not difficult!
03:03:00 <elliott> and those are /real/ naturals
03:03:03 <elliott> as in, "42" works there
03:03:51 <olsner> probably much better suited for what you were trying to do than haskell
03:04:10 <elliott> olsner: yeah, but at the same time less -- instead of simple things like floats, you get constructive reals and other craziness :-)
03:04:27 <olsner> anyway, time for bed now that I've made the code output all the derivatives
03:04:30 <elliott> olsner: I think my original solution is the most elegant right now ... but yours is really nice
03:04:33 <elliott> if not for the infinite shows and no eq
03:04:38 <elliott> ugh, no eq is the worst part
03:04:45 <elliott> olsner: could you add, like, a list terminator?
03:04:54 <elliott> olsner: and then have one d for each possible length
03:05:01 <elliott> olsner: that way if you didn't use infinite lists it'd all come out finite
03:06:04 <elliott> lawl i think i've just kept olsner up for the next ten hours
03:07:30 <olsner> list terminators are ugly, but maybe it's possible to detect at which point all remaining derivatives will be 0
03:08:09 <elliott> olsner: ugly, but not as ugly as that show output, man
03:08:12 <olsner> or do something like use the longest list length of the two inputs to + and *, then let deriv construct a suitable length for what you asked it to do
03:08:56 <olsner> but it's like ... an ugly workaround for not having infinite memory and time available
03:09:39 <olsner> I'd rather just remove show and eq and say that duals are not showable and not comparable :)
03:13:06 <elliott> olsner: you need comparable
03:13:13 <elliott> olsner: foo n | n < 0 = bonk | otherwise = burp
03:13:23 <elliott> olsner: perfectly well-defined on reals, so it should be on duals
03:16:06 -!- augur has joined.
03:18:54 -!- augur_ has joined.
03:19:32 -!- augur has quit (Read error: Connection reset by peer).
03:23:14 -!- bsmntbombdood has joined.
03:25:14 <elliott> olsner: wtf @ the Integral restriction
03:25:18 <elliott> olsner: that makes it useless for actual differentiation :(
03:29:39 * pikhq has achieved the bad ending!
03:29:50 <elliott> j-invariant: *Main> sq' x
03:29:50 <elliott> (x * 2)
03:29:50 <elliott> *Main> sq'' x
03:29:50 <elliott> 2
03:29:54 <elliott> pikhq: Congraturation!
03:29:58 <elliott> pikhq: Now behold ^
03:30:07 <pikhq> elliott: :D :D
03:31:09 <elliott> *Main> deriv 500 sq x
03:31:09 <elliott> 0
03:31:12 <Sgeo> Integral retriction?
03:31:15 <Sgeo> pikhq, what game?
03:31:16 <elliott> Sgeo: now fixed.
03:32:39 <pikhq> Sgeo: Shin Megami Tensei: Persona 3 FES (The Journey). （ペルソナ３FES『Episode Yourself』）
03:33:21 <j-invariant> cool
03:33:39 <elliott> j-invariant: haha great Dual can't be a Real because toRational has to return ... a rational
03:33:43 <elliott> and obviously duals have no rational expression
03:33:54 <elliott> class (Real a, Enum a) => Integral a where
03:33:57 <elliott> so I can't do Integral.
03:34:01 <elliott> Solution: FAKE REAL INSTANCE
03:34:28 <pikhq> elliott: Well, Real is a really abused class already.
03:34:32 <Sgeo> You can't do integrals because duals aren't reals?
03:34:41 * Sgeo huhs
03:34:45 <Sgeo> As in, WTF
03:34:46 <oerjan> well that you cannot do Integral is even more obvious. that's not _supposed_ to work for fractional classes.
03:34:51 <elliott> Sgeo: it is not what you think it is
03:34:54 <elliott> oerjan: well yes.
03:35:05 <Sgeo> Oh, Integral as in.. right
03:35:09 <elliott> j-invariant: wait what is the rule for *division*?
03:35:18 <elliott> of duals
03:35:33 <elliott> oh wikipedia has it
03:35:33 <elliott> sort of
03:36:06 <elliott> ugh
03:36:15 <elliott> hmm
03:36:20 <j-invariant> I always just do (f(x))^-1 and use the d x^n = n x^(n-1) rule
03:39:01 <elliott> instance (Fractional t) => Fractional (Dual t) where
03:39:01 <elliott> (Dual a a') / (Dual b b')
03:39:01 <elliott> | b == 0 = Dual (a'/b') 0
03:39:01 <elliott> | otherwise = Dual (a/b) (((b*a')-(a*b')) / (c*c))
03:39:03 <elliott> such hideousness
03:39:27 <elliott> erm c is b there
03:39:37 <elliott> ugh needs more conversion
03:40:28 <pikhq> And now to have the end song stuck in my head for a bit.
03:42:14 <pikhq> elliott: Life ceased to exist!
03:42:20 <elliott> pikhq: Seriously? :P
03:42:24 <pikhq> Yes, seriously.
03:42:34 <elliott> pikhq: Well, you sure didn't win the game.
03:42:44 <elliott> Why is it giving you an ending song? :P
03:42:52 <pikhq> Cause it ended.
03:43:01 <pikhq> You could even go to a new game+ after that.
03:43:16 <pikhq> Granted, it's *maybe* 5 hours from the good ending. Sooo...
03:43:38 <pikhq> (more if you're a completionist)
03:45:30 -!- augur_ has changed nick to augur.
03:47:08 <elliott> j-invariant: oh god I have to implement Floating ... actually I have no idea why I'm blaming you
03:47:11 <elliott> but still
03:47:17 <elliott> what the fuck is the square root of (a+a'd)???
03:48:32 <elliott> oerjan: actually since there's (Real a, Fractional a) => RealFrac a I beg to differ; clearly there /are/ Real Fractionals
03:49:07 <oerjan> elliott: i was speaking about Integral
03:49:13 <elliott> oerjan: oh right :D
03:50:26 <elliott> oerjan: wanna write sqrt and sin and cos for dual numbers/?!?!?! or uh just tell me how to i guess
03:52:28 <oerjan> i have no idea but i _am_ expecting this to either break down or become horribly complicated (essentially encapsulating _all_ the derivatives) at about this point
03:53:08 <oerjan> as you are leaving simple ring operations behind
03:54:36 <elliott> oerjan: perhaps -- but, then, this is used widely in practice
03:54:41 <elliott> oerjan: i'm not implementing some random idea I had :)
03:54:53 <elliott> combining this with symbolic numbers is _fun_:
03:54:54 <elliott> *Main> deriv 1 x5 x
03:54:54 <elliott> (((x * x) * (x * x)) + ((((x * x) * (x * 2)) + ((x * 2) * (x * x))) * x))
03:55:02 <elliott> (that actually simplifies to the right thing though)
03:55:08 <elliott> (x5 is \x -> x^5)
03:55:13 <oerjan> ok
03:56:26 -!- __s has joined.
03:57:28 <__s> Does it count as a JIT if it compiles into an alternative format? As in, can there be AST JITs?
03:57:35 <elliott> *Main> deriv 1 x5 x
03:57:35 <elliott> (((x ^ 2) ^ 2) + ((((x ^ 2) * (x * 2)) + ((x * 2) * (x ^ 2))) * x))
03:57:38 <elliott> that's (slightly) better
03:57:45 <elliott> __s: I don't understand your question.
03:57:52 <__s> I wrote a befunge JIT
03:58:01 <__s> But it doesn't do machine code
03:58:28 <__s> Instead, it builds an AST. It seems to be fast enough though, outpaces my last interpreter on adder, primegen, mandelbrot
03:58:55 <__s> And my last interpreter was nearing 4x any other interpreters I could find
03:59:07 <elliott> __s: erm, does it support p and g?
03:59:10 <__s> Yes
03:59:13 <elliott> and yes, that still counts as a JIT
03:59:23 <__s> At p, it rebuilds if it isn't dead code or a nop
03:59:25 <elliott> __s: I bet it's slower than fizzie's jitfunge :-) (that did Befunge-98 too ... "sort of")
03:59:29 <elliott> __s: (and did native code)
03:59:33 <elliott> __s: but very impressive!
03:59:36 <elliott> is your code available?
03:59:38 <__s> LLVM?
03:59:40 <__s> Yes
04:00:01 <__s> https://github.com/serprex/Befunge
04:00:38 <__s> Don't mind the commit message, I haven't coded for the past week and I'd fallen into depression so I'm riding a bit of a coding high right now
04:01:55 <__s> I figure next step is to add an optimization pass on the ast, include some special case opcodes. Constant propagation should be very useful with how befunge programs are written
04:02:27 <pikhq> __s: It compiles just in time, making it a JIT.
04:03:06 <oerjan> next: a JTL compiler
04:03:41 <__s> So it's just that normally a JIT needs to generate machine code to pay for the cost of a JIT?
04:03:49 <pikhq> oerjan: Well, math on the duals is very *similar* to math on the complex numbers...
04:03:59 <pikhq> __s: Yeah.
04:04:12 <__s> I figure static interpreters bolted on top of dynamic would otherwise appear on platforms that don't allow machine code generation
04:06:08 <elliott> <oerjan> next: a JTL compiler
04:06:11 <elliott> oerjan: CLC-INTERCAL has one of those.
04:06:20 <elliott> oerjan: named very similarly to your pun IIRC
04:07:33 <oerjan> it _would_ make sense to have that in INTERCAL
04:10:01 <elliott> oerjan: my method /cannot/ yet differentiate (1/x), it seems :D
04:10:35 <elliott> oh, division is just plain broken
04:10:39 <pikhq> elliott: It'd be surprising if it could, actually.
04:10:50 <elliott> pikhq: not *really*
04:11:01 <elliott> aha the issue is that I have no subtraction I think :D
04:11:05 <pikhq> I'm *really* not sure how you could get ln(x) out of that easily.
04:11:23 <oerjan> um ln(x) is the integral
04:11:25 <elliott> pikhq: thankfully I don't have to! because last i checked the derivative of 1/x doesn't involve logarithms
04:11:35 <elliott> this snark is unwarranted though -- I just made the same mistake in another conversation!
04:11:53 <pikhq> oerjan: GAAAH
04:12:00 <pikhq> oerjan: And to think, I got an A in calc I.
04:12:11 <elliott> pikhq: I got an A in addition
04:12:38 <oerjan> elliott: never take fourier analysis, ok?
04:13:57 <elliott> oerjan: :<
04:14:01 <elliott> oerjan: i don't like you
04:14:20 * oerjan wonders if elliott was wooshed there
04:16:27 <j-invariant> to find the integral of log you can use parts on 1 * log(x)
04:17:23 <elliott> oerjan: most likely
04:46:40 <elliott> Vorpal: http://i.imgur.com/fOopp.jpg
04:48:23 -!- TLUL has joined.
04:51:36 -!- __s has left (?).
04:55:49 -!- jcp has quit (Quit: Later).
05:04:29 <elliott> oerjan: hm is the signum of 24 - 145d (1 + 0d) or (1 - 1d)?
05:05:57 <oerjan> i'd say the first
05:06:29 <oerjan> since a small adjustment has no effect on a real signum that isn't close to 0
05:06:48 <elliott> oerjan: but (1-1d) ~= 1 :)
05:06:55 <elliott> but right, yeah, you are of course correct
05:07:01 <elliott> I didn't even realise 'cuz I'm dumb
05:07:35 <elliott> *Main> deriv 1 recip 3
05:07:35 <elliott> -0.1111111111111111
05:07:36 <oerjan> this is also the case for nonstandard reals
05:07:39 <elliott> oerjan: great success.
05:07:55 <elliott> oerjan: right well these are almost hyperreals really :
05:07:56 <elliott> :)
05:08:00 <elliott> which is why I borrowed the st name
05:08:08 <elliott> erm
05:08:10 <elliott> not hyperreals
05:08:12 <elliott> non-standard reals
05:08:30 <oerjan> i'm not sure of the terminology there myself
05:08:46 <elliott> oerjan: hm what's |a+bd|? I think it's just |a|+bd
05:08:48 <elliott> but am not sure
05:08:58 <elliott> e.g., |0-1d| would = 0-1d
05:09:02 <elliott> which is, of course, <0
05:09:11 <elliott> but having it = 0+1d seems very silly... or does it?
05:09:17 <elliott> wait, |-d| of course = d
05:09:23 <elliott> so |a+a'd| = |a|+|a'|d
05:09:29 <elliott> right?
05:09:39 <oerjan> um not quite
05:09:43 <elliott> oerjan: hm right...
05:09:50 <oerjan> if a and a' have the same sign, it is
05:09:56 <elliott> oerjan: right...
05:10:41 <oerjan> basically it's |x|= x if x > 0 and -x if x < 0 and d makes no difference for comparison with 0
05:11:06 <elliott> oerjan: yeah
05:11:10 <elliott> I'll just use comparisons
05:11:18 <oerjan> (unless the large part is 0)
05:13:09 <elliott> hmph, I think this introduces an (Ord t) dependency on my Num instance
05:13:14 <elliott> since abs has to do a comparison
05:13:15 <elliott> oh no wait
05:13:22 <elliott> I can use signum, can't I?
05:14:08 <oerjan> probably since you only need to compare to 0
05:16:35 <elliott> instance (Ord t) => Ord (Dual t) where
05:16:35 <elliott> compare (Dual a a') (Dual b b') =
05:16:35 <elliott> case compare a b of
05:16:35 <elliott> EQ -> compare a' b'
05:16:35 <elliott> x -> x
05:16:41 <elliott> why does this think it needs (Num t) in the head?
05:17:54 <elliott> I can't figure it out
05:18:17 <oerjan> do you have a Num requirement on Dual itself somehow?
05:18:54 <elliott> data Dual t = Dual t (Dual t) | Zero
05:18:55 <elliott> nope
05:18:58 <elliott> OH
05:19:00 <elliott> instance (Num t) => Eq (Dual t) where
05:19:04 <elliott> no idea how that go tthere
05:19:15 <elliott> oh
05:19:16 <elliott> because of 0
05:19:51 * oerjan doesn't see why you need 0 to compare for equality
05:19:56 <elliott> Dual a b == Zero = a == 0 && b == Zero
05:19:56 <elliott> Zero == Dual a b = a == 0 && b == Zero
05:20:09 <elliott> oerjan: so apparently, my code thinks the derivative of abs is 1
05:20:30 <oerjan> only for x > 0, hopefully
05:21:34 <elliott> oerjan: oh wait, that's the actual derivative, isn't it
05:21:45 <elliott> correction: my code computes the derivative of abs PERFECTLY
05:21:48 * pikhq comes to an odd realisation...
05:21:53 <elliott> pikhq: what
05:21:59 <oerjan> "only for x > 0, hopefully"
05:22:05 <pikhq> Technically, almost all of this game is optional.
05:22:09 <elliott> oerjan: indeed.
05:22:22 <pikhq> There are 7 mandatory fights. Total.
05:22:34 <pikhq> Literally everything else can be skipped.
05:22:36 <elliott> pikhq: Play it skipping everything that isn't vital. I dare you.
05:23:27 <pikhq> elliott: Well, the boss fights would be *insanely* hard.
05:23:42 <pikhq> elliott: Except that on a new game plus, you keep your levels and personæ.
05:24:32 <pikhq> So you could have the infinity plus one sword and be able to one-shot everything but the optional boss.
05:25:33 <pikhq> Still. Damn. This game has a lot of room for speedrunning.
05:25:35 <elliott> *Main> deriv 1 abs x
05:25:35 <elliott> *** Exception: /home/elliott/code/adiff/diff.hs:(51,4)-(58,11): Non-exhaustive patterns in case
05:25:39 <elliott> TIL: Breaking laws breaks laws.
05:25:47 <elliott> *Main> signum x
05:25:47 <elliott> (signum x)
05:25:52 <elliott> I suppose that things might, hypothetically, not like that.
05:26:01 <pikhq> Because you can skip everything but 7 bosses and cutscenes.
05:26:34 <elliott> pikhq: Insanely hard -- but there'd only be 7 of them.
05:26:45 <elliott> pikhq: So go for it. From the start. If you absolutely NEED to get some kind of weapon, get the one you can get without doing anything.
05:26:49 <elliott> And BEAT THE FUCKING BOSSES.
05:27:01 <elliott> pikhq: And put it on YouTube.
05:27:05 <pikhq> Probably impossible without really fucking up the RNG.
05:27:25 <pikhq> But with a new game plus, entirely possible, and I could start right now.
05:28:22 <Sgeo> Why am I: Awake. Not having eaten yet. And having done absolutely no work whatsoever?
05:28:52 <elliott> Sgeo: Because you don't like sleeping, you don't like eating, and you don't like working.
05:28:54 <hagb4rd> vacation?
05:29:04 <hagb4rd> drugs?
05:29:19 <Sgeo> I'm going to go back on my meds tomorrow
05:29:33 <elliott> HAPPY MEDS
05:29:41 <pikhq> elliott: Seriously though, this is already a fairly hard game. And it's one of the easiest games from Atlus.
05:29:46 -!- jcp has joined.
05:30:04 <elliott> pikhq: I'm sorry, but if you don't start from scratch and do the bare minimum to complete the game, we can't be friends any more.
05:30:24 <pikhq> I'm strongly suspecting that grinding is mandatory without TASing.
05:30:36 <Sgeo> pikhq, what game?
05:30:52 <pikhq> Simply because you aren't getting any persona other than freaking Orpheus if you do that...
05:31:02 <elliott> pikhq: OK then. Complete the game doing it normally, but make sure you finish *only* with the infinity plus one sword. Nothing else.
05:31:10 <elliott> pikhq: Then new game plus and do the 7 boss fights and nothing else.
05:31:21 <pikhq> (which is like playing Pokémon with just the starter, *never leveling*)
05:31:38 <pikhq> (almost exactly, in fact.)
05:31:43 <elliott> I want to beat Pokémon with an unlevelled starter now :P
05:31:48 <Sgeo> I don't see a game name in scrollback
05:31:51 <elliott> GOOOOOOOO PIDGEY!
05:31:54 <pikhq> Sgeo: Persona 3.
05:31:55 <elliott> (I know that's not a starter. But shut up.)
05:31:59 <Sgeo> Ah
05:32:24 <pikhq> elliott: By comparison, starting a new game plus now would be like playing Pokémon with only a level 100 Mewtwo.
05:32:33 <pikhq> And then only doing the gym battles.
05:32:40 <tswett> Kansansatu, karhu, pala, suu, kettu, -pa, viimein, pohjoinen, päästä, juusto pääsi suusta...
05:32:44 <elliott> pikhq: No, because you have non-infinity+1-sword items.
05:32:48 <elliott> pikhq: Discard them now and do the 7 boss fights.
05:32:53 <tswett> I'm speaking Finnish, see? :P
05:33:41 <tswett> Now to stuff all these words into my brain!
05:34:13 <pikhq> elliott: On a new game plus you merely keep your cash, the items equipped, and your persona compendium. Which basically lets you *purchase* any persona you previously had.
05:34:19 <pikhq> elliott: Oh, and levels. Can't forget that.
05:34:25 <elliott> pikhq: Do not purchase anything.
05:34:40 <pikhq> elliott: Except the persona needed.
05:34:43 <elliott> pikhq: No.
05:34:46 <elliott> pikhq: Do not buy that either.
05:34:49 <elliott> pikhq: (Can you avoid doing so?)
05:34:57 <pikhq> elliott: No, this is actually impossible.
05:35:09 <elliott> pikhq: Buy the cheapest Persona possible.
05:35:12 <elliott> Discard the rest of the cash.
05:35:15 <pikhq> elliott: Orpheus.
05:35:17 <elliott> pikhq: Enter first battle. Continue until the last boss is completed.
05:35:23 <elliott> pikhq: It should be fine, since you have that magical sword. Good luck :P
05:35:25 <pikhq> elliott: Unleveled starter...
05:35:30 <elliott> pikhq: ...with magic sword.
05:35:41 <pikhq> elliott: "Infinity plus one sword" is a trope name. It's actually *referring* to the persona.
05:35:55 <elliott> pikhq: I know it was a trope name ... but aww, I hoped it was a real sword.
05:36:02 <pikhq> Sadly, one of the bosses is immune to physical attacks.
05:36:13 <pikhq> So having the best *sword* in the game won't get you all the way through.
05:36:16 <elliott> pikhq: OK. Start game. Purchase persona. Discard all other cash and items. Boss fights.
05:36:24 <elliott> pikhq: And that doesn't matter; you can just do that one tediously and impossibly, surely?
05:36:34 <pikhq> elliott: Null. Physical.
05:36:38 <pikhq> elliott: You. Cannot. Hurt. It.
05:36:44 <elliott> pikhq: Then how is it killed? :p
05:36:49 <pikhq> elliott: Magic.
05:36:58 <elliott> pikhq: How do you obtain the relevant magic?
05:37:03 <pikhq> elliott: Persona.
05:37:13 <elliott> pikhq: Including the infinity+1 one?
05:37:38 <pikhq> The infinity+1 one can one-shot everything but a single optional boss that appears only in a new game plus.
05:37:49 <elliott> pikhq: Skip the boss.
05:38:23 <elliott> pikhq: No?
05:39:07 <elliott> pikhq: No?
05:39:07 -!- evincar has joined.
05:39:11 <elliott> hi evincar
05:39:16 <evincar> Hey elliott.
05:39:34 <evincar> What's the project and/or topic?
05:39:39 <pikhq> And anyways, this game is almost impossibly difficult if you can't do things like "healing" or "more than a few points of damage".
05:39:57 <elliott> pikhq: BUT IT CAN ONE-SHOT THEM.
05:40:02 <elliott> evincar: Various! I'm about to embed myself.
05:40:07 <pikhq> elliott: With one-shotting, yes, it's really easy.
05:40:09 <elliott> I've done some automatic differentiation code. It's fun.
05:40:11 <elliott> pikhq: So go do it.
05:40:21 <pikhq> But good ending!
05:40:42 <evincar> elliott: Into...what, exactly?
05:40:45 <pikhq> And technically I don't have the infinity-plus-one sword! Just the next-closest thing!
05:40:49 <elliott> evincar: Bed, duh.
05:41:04 <elliott> pikhq: Replay it. Make sure you finish with only the infinity-plus-one.
05:41:05 <evincar> elliott: Oh, you mean embedden. :P
05:41:14 <elliott> pikhq: New game plus. Discard all other items. One-shot boss fights.
05:41:17 <elliott> The end.
05:41:41 <pikhq> That will probably be a bit tedious, but easily doable.
05:41:47 <elliott> pikhq: Go do it.
05:41:55 <elliott> pikhq: YouTube the whole new game plus.
05:42:05 <elliott> evincar: Right now I'm ordering pikhq to do silly things with a game I've never played.
05:42:17 <pikhq> BTW, you should play this game.
05:42:35 <evincar> elliott: Oh, be nice.
05:43:18 <elliott> evincar: But this is nice!
05:43:28 <elliott> pikhq: I would ... except I have no PlayStation N, and Wikipedia suggested etc.
05:43:31 <elliott> (For some N.)
05:43:33 <evincar> I'm considering the terrible idea of creating a font authoring system.
05:43:34 <pikhq> 2.
05:43:38 <evincar> It's terrible because it's big, not because it's bad.
05:43:41 <pikhq> Which is like $99. 05:45:32 * tswett enters 31 cards into his flash card program so he can stuff them into his brain. 05:45:44 <elliott> evincar: What, isn't FontForge painful enough? 05:45:54 <elliott> pikhq: Fine, buy it for my Christmas present. 05:46:03 <pikhq> elliott: No income! 05:46:13 <evincar> elliott: No, less like FontForge/Fontographer/whateverthefontingfontsoftware and more like Metafont, but less like TeX. 05:46:14 <elliott> pikhq: YOU'RE NOT BUYING ME A PRESENT?! 05:46:46 <elliott> pikhq: What kind of hardware do you need to emulate a PS2? 05:46:54 <evincar> Also, I just realised I have the June 1957 issue of MAD, which contains an article by Donald Knuth. 05:46:56 <pikhq> Uh, quite good? 05:47:13 <elliott> pikhq: Approx. specs? 05:47:19 <elliott> evincar: Awesome! The system of measurements? 05:47:23 <evincar> "The Potrzebie System of Weights and Measures" 05:47:29 <pikhq> evincar: :) 05:47:30 <elliott> <3 05:48:06 <elliott> Wow, I cannot pronounce Potrzebie. 05:48:16 <elliott> pikhq: Approx. specs? :p 05:48:39 <pikhq> elliott: Uh. 05:48:44 <pikhq> elliott: 4 core, really good GPU? 05:49:11 <evincar> elliott: I pronounce it according to the Polish pronunciation, since, y'know, family's Polish and all... 05:49:29 <elliott> evincar: What /is/ the Polish pronunciation of that? 05:49:33 <evincar> "Pot-sheb-yeh" is all I can do for you without IPA or SAMPA. 05:49:39 <elliott> evincar: BOORING 05:49:46 <elliott> Potterzebie, but without the te. 05:49:59 <oerjan> the sh is voiced, no? 05:50:01 <elliott> IMPOSSZEBIE 05:50:17 <elliott> pikhq: So my new laptop won't do it. :( 05:50:25 <evincar> oerjan: Depends on your accent, but it usually isn't, I don't think. 05:50:30 <oerjan> oh 05:51:23 <elliott> pikhq: (2.13 GHz modern Core 2 Duo, 4 GiB RAM, high-end integrated graphics (GeForce 230M 256MB)) 05:51:44 <elliott> pikhq: Oh, the PS2 is the Emotion Engine bullshit. 05:51:52 <elliott> pikhq: With, like, seventy processors ... 05:51:53 <pikhq> Yuh. 05:52:11 <elliott> pikhq: Hmm. I could hook the PlayStation up to the laptop display, though, couldn't I? 05:52:17 <elliott> (It's a stupid Mini DisplayPort thing, but I can adapter.) 05:52:23 <elliott> pikhq: (I have no TV in my room right now ...) 05:52:26 <pikhq> Probably. 05:52:29 <elliott> (TODO: Fix that. Some day.) 05:52:36 <elliott> pikhq: Oh, do the recent PS2 models have digital out? 05:52:39 <elliott> Or just analogue? 05:52:45 <elliott> I don't like me no analogue vidyas. 05:52:50 <pikhq> PS3 does. 05:53:08 <elliott> pikhq: PS3 can't play PS1 games and is expensive. 05:53:09 <pikhq> Older ones, like mine, are backwards compatible. 05:53:14 <pikhq> All of them play PS1 games. 05:53:25 <elliott> pikhq: Oh, it's PS1 but not PS2. Right. 05:53:32 <pikhq> No, this one is PS2. 05:53:37 <elliott> Yes. I know. 05:53:41 <elliott> pikhq: PS3 is incredibly ugly anyway, pre-Slim; the PS2 design has always been really nice IMO. 05:53:43 <pikhq> Erm. Yeah. 05:53:48 <elliott> And Slim and after is no-PS2, right? 05:53:55 <elliott> So yeah, I kinda want an actual PS2. 05:53:59 <pikhq> Yeah. 05:54:01 <coppro> elliott: just download a ps2 emulator 05:54:14 <elliott> coppro: I think we've established that my hardware is not up to that. 05:54:37 <elliott> coppro: Or? 05:55:31 <elliott> pikhq: Today on "Names Wikipedia Likes To Use For Being More 'Neutral' Or Technically Correct That Nonetheless Confuse Just About Every Fucking Person Who Sees Them": 05:55:35 <elliott> pikhq: http://en.wikipedia.org/wiki/Corrugated_fiberboard (Cardboard) 05:55:48 <elliott> pikhq: http://en.wikipedia.org/wiki/Fixed-wing_aircraft (Aeroplane/Airplane) 05:56:00 <elliott> pikhq: http://en.wikipedia.org/wiki/Association_football (Football/English football/soccer) 05:56:11 <elliott> It wouldn't be so bad, if they didn't make EVERY LINK use that terminology too. 05:56:23 <coppro> elliott: that one is required too 05:56:29 <coppro> s/too/ 05:56:33 <elliott> coppro: ? 05:56:50 <coppro> elliott: "football" is a page about all football games generally 05:56:53 <elliott> coppro: As a Brit, I would /vastly/ prefer Soccer to the current name. 05:57:03 <elliott> ("Soccer" was invented by an Englishman, anyway.) 05:57:12 <elliott> coppro: Nobody says "association football". 05:57:15 <evincar> Hmm. I may have to say I *had* that MAD issue, as I can't seem to find it at the moment. It may have been in such poor condition that it got thrown away without my realising it. But I know I've read it, and it was an original printing. 05:57:16 <elliott> Nobody says "corrugated fiberboard". 05:57:18 <augur> elliott: JS? 05:57:29 <elliott> NOBODY says "fixed-wing aircraft" apart from maybe people who already know what they are in /detail/. 05:57:32 <pikhq> elliott: At least, nobody says "association football" in the past century. 05:57:37 <elliott> augur: what about JS? 05:57:41 <elliott> pikhq: Indeed. 05:57:46 <augur> elliott: are you skilled in it? 05:57:51 <pikhq> elliott: "Soccer" *is* a contraction of that, after all. 05:58:00 <augur> i know what a fixed-wing aircraft is :| 05:58:04 <augur> not that i'd say it, but 05:58:06 <elliott> Yes, but nobody says that. 05:58:13 <elliott> augur: I know all about its horrible, horrible corners and I can write code in it. 05:58:14 <augur> rotating-wing aircraft! 05:58:23 <elliott> It is a horrible language, and I would like to avoid doing so whenever possible. 05:58:23 <elliott> Why? 05:58:25 <augur> elliott: and video games? do you play them? 05:58:34 <elliott> augur: Uh, on occasion, yes. 05:58:37 <augur> scifi? 05:58:49 <elliott> augur: Sure, why not. 05:58:57 <augur> would you like to make a game with me? 05:59:08 <elliott> augur: Um. Does it involve coding JavaScript? 05:59:15 <augur> or C# 05:59:20 <elliott> augur: Why C#. 05:59:23 <augur> unity3d 05:59:48 <Sgeo> I'm C#-enabled 05:59:55 <elliott> augur: I refuse to work on anything Sgeo works on. 06:00:02 <elliott> augur: Would there be a server-side part? :p 06:00:15 <augur> elliott: possibly, but preferably not 06:00:16 <elliott> Unity looks like it doesn't have real JS, just "UnityScript", anyway. 06:00:21 <augur> this is true 06:00:25 <Sgeo> elliott, you've worked on PSOX 06:00:28 <elliott> augur: There's also Boo, which is python and thus horrible. 06:00:31 <Sgeo> Mostly deleting stuff, but still 06:00:36 <elliott> Sgeo: Only to try and de-shittify it (which didn't work). 06:00:51 <elliott> augur: Are you /sure/ there's not a server-side part that I could lovingly craft in Haskell? 06:00:53 <Sgeo> Removing its sandboxing mechanisms is "de-shittifying it"? 06:00:56 <elliott> Sgeo: Yes. 06:00:59 <augur> elliott: im sure :( 06:01:01 <augur> oh haskell 06:01:03 <elliott> augur: In fact, why don't you just use OpenGL and the whole thing can be in Haskell. :p 06:01:05 <augur> my dearest haskell 06:01:20 <augur> elliott: because unity is a nice little cross-platform engine 06:01:31 <Sgeo> F#! 06:01:35 <elliott> augur: It's also closed-source, which -- being a fag -- makes me want to stay well away from it. 06:01:42 <evincar> elliott: He's right, you know. Unity is alright. 06:01:43 <augur> yeah well. 06:01:47 <elliott> (Note: Fag justification possibly flimsy.) 06:01:58 <augur> elliott: you're also a homosexual. 06:01:59 <evincar> Sgeo: I spit on .NET. 06:02:01 <elliott> Oh and it looks like its UI does its own widgets, ew. (See, even flimsier.) 06:02:14 -!- sebbu2 has joined. 06:02:15 <augur> i think you can dick around with UI stuff 06:02:17 <Sgeo> elliott, just like The GIMP! 06:02:19 <augur> im not sure. 06:02:26 <Sgeo> [in the past][I think] 06:02:40 <elliott> Sgeo: Um, the GIMP invented GTK+ because /there were no toolkits/. 06:03:04 <augur> so does anyone want to work on a scifi videogame? 06:03:14 <elliott> augur: So in conclusion, I'll work on your Unity-based, UnityScript-or-C game if it's actually OpenGL-based and Haskell. Hell, I demand a change from sci-fi to fantasy and from video game to drinking game while I'm at it. 06:03:25 <augur> lol 06:03:40 <elliott> augur: No but seriously, you should do it in OpenGL and Haskell. 06:03:40 <Sgeo> I can learn UnityScript >.> 06:03:57 * Sgeo has weird... things with these sorts of languages 06:04:05 <elliott> augur: Sgeo wants to be part of your project solely for the "reputation" and "fame" it will bring. 06:04:05 -!- pingveno has quit (Ping timeout: 240 seconds). 06:04:16 <augur> Sgeo: i already have a rough idea of how i want the game to go, and i have a bit of code already, i just want someone to work with 06:04:32 <oerjan> elliott: an opengl drinking game in Haskell? sounds like the thing. 06:04:32 <evincar> elliott: Functional programming languages have never seemed particularly well-suited to game development, in my mind. 06:04:36 <elliott> augur: You really don't want to work with Sgeo. (I am doing a service to Sgeo here as well as you :P) 06:04:39 <elliott> evincar: FRP. 06:04:50 <elliott> evincar: The only reason they seem unsuited is because the default IO monad model is _broken_. 06:05:04 <elliott> evincar: There is a functional way to do effects, FRP; it's sort of like event-based programming, but purely functional. 06:05:22 <Sgeo> elliott, I'm assuming augur is not an idiot. And you don't think I'm an idiot, do you? 06:05:33 <elliott> Sgeo: I refuse to comment. 06:05:34 <evincar> elliott: Let me guess. The state of the program is a function of the current moment and all events that have happened up to the current moment? 06:05:38 <elliott> evincar: No. 06:05:43 <elliott> evincar: That's the shitty, non-functional model. 06:05:48 <evincar> elliott: Well, that's what it ought to be. ;P 06:05:53 <evincar> Haha... 06:05:55 -!- sebbu has quit (Ping timeout: 264 seconds). 06:05:56 <elliott> evincar: No, that's just the State monad, faked as a function. 06:06:01 <Sgeo> elliott, you once defended me when Vorpal made a comment... 06:06:03 <elliott> In fact it's the IO monad faked as the State monad faked as a function. 06:06:15 <oerjan> Sgeo: we'll consider that question once you've done your homework... >:) 06:06:16 <elliott> evincar: Seriously -- there are ways to do games elegantly and functionally, and if I wasn't about to go to bed I'd be happy to explain. 06:06:17 -!- pingveno has joined. 06:06:20 <evincar> The only place that'd work is in something like Flash, methinks... 06:06:26 <elliott> oerjan: Kick ban him! Given into temptation! 06:06:27 <evincar> ...that is, what I said. 06:06:40 * pikhq waits for Death 06:06:47 <oerjan> elliott: he clearly stated that he procrastinated just fine without the channel 06:07:01 <elliott> oerjan: yes, but he can procrastinate without irritating me :) 06:07:15 <elliott> bah humbug! 06:07:21 <evincar> elliott: Well, another time, perhaps. I don't doubt it, I just find that it's easier for me to use an imperative style for realtime apps and leave declarative for editors and stuff like that. 06:07:27 <elliott> and a sodding rubbish christmas to you lot, too! 06:07:34 <evincar> G'night? 06:07:45 <elliott> evincar: Were I to explain it to you you'd be converted, but MY BODY NEEDS TO GO UNCONSCIOUS GOD DAMMIT. 06:07:54 <evincar> s/?/./ 06:07:55 <Sgeo> elliott, night, and happy <insert generic but still not applcable wishes here> 06:08:01 -!- elliott has quit (Quit: so long, fuckers). 06:08:46 <Sgeo> elliot, feel free to explain it to me when you're back, I'd love to learn 06:09:25 <evincar> Sgeo: You got "so long, fuckers"ed. 06:09:51 * Sgeo wishes he was a ... *gets slapped* 06:10:34 -!- j-invariant has quit (Quit: leaving). 06:11:18 <augur> elliott is so hilarious 06:13:41 <evincar> A character, certainly. 06:14:53 <Sgeo> U+ED? 06:15:03 <Sgeo> (the only letters in his name that are hex numerals) 06:16:08 <evincar> Nah, I'm pretty sure he lives far into the private-use area. 06:16:13 <oerjan> omg he is secretly ed! 06:17:04 <tswett> Words stuffed. That took about ninety seconds per word. Now let's see if I can understand any of this story whatsoever. 06:19:00 <tswett> "Karhulla oli juustonpala suussa." Something to do with a bit of cheese and a mouth. 06:19:21 <tswett> A bear, a bit of cheese, and a mouth. 06:19:23 <oerjan> translate Karhulla oli juustonpala suussa. 06:19:29 <HackEgo> Bear was a piece of cheese in your mouth. 06:19:39 <tswett> I'm sure that's exactly what it means. 06:20:07 <tswett> Okay. -lla denotes the adessive case, which means... either in or on, lemme see. 06:20:15 <oerjan> translate Karhulla 06:20:18 <HackEgo> Karhulla 06:20:24 <tswett> On. 06:20:25 <oerjan> translatefromto fi en Karhulla 06:20:26 <HackEgo> Bear 06:20:34 <tswett> Now, "oli"... some form of "olla". 06:20:38 <oerjan> translatefromto fi en oli 06:20:45 <HackEgo> was 06:20:51 <oerjan> translatefromto fi en juustonpala 06:20:54 <HackEgo> a piece of cheese 06:20:54 <tswett> Third-person singular indicative past. "Was". 06:21:08 <oerjan> translatefromto fi en suussa 06:21:09 <HackEgo> mouth 06:21:20 <tswett> I think "juusto" is "cheese"; who knows what the "n" is all about. "Pala" is "bit". 06:21:27 <oerjan> The bear had a piece of cheese in its mouth, perhaps? 06:21:37 <tswett> Finally, -ssa is "in". 06:21:47 <tswett> So. "On the bear was a cheese-bit in the mouth." 06:22:01 <tswett> Or, more idiomatically, "The bear had a piece of cheese in its mouth." 06:22:11 <oerjan> yay 06:22:18 <Gregor> translateto en a piece of cheese 06:22:19 <HackEgo> a piece of cheese 06:22:24 <Gregor> Err 06:22:27 <Gregor> translateto fi a piece of cheese 06:22:29 <HackEgo> pala juustoa 06:22:48 <tswett> Gregor, your bot's translations into English are truly brilliant. 06:22:54 <oerjan> translateto no a piece of cheese 06:22:56 <HackEgo> et stykke ost 06:23:04 <tswett> The phrase "a piece of cheese" captures every nuance of the phrase "a piece of cheese". 06:23:23 <tswett> Okay. Next sentence... 06:23:32 <oerjan> tswett: oh i don't know, it's a bit imprecise 06:23:51 <oerjan> i mean, what was the cheese's motivation? 06:24:05 <tswett> "Kettu pyysi sitä monta kertaa, mutta karhu ei sitä ketulle antanut." 06:24:30 <tswett> Well, "kettu" means "fox". So... something about a fox. "Karhu" is still "bear". I think "mutta" might be "but". 06:24:37 <tswett> translate "Kettu pyysi sitä monta kertaa, mutta karhu ei sitä ketulle antanut. 06:24:39 <HackEgo> &quot;Fox asked for it many times, but the bear does it gives the fox. 06:24:52 <Gregor> tswett: It's just Google. 06:25:10 <tswett> Gregor, your bot's invocations of Google are truly brilliant. 06:25:25 <oerjan> apart from the missing ei -> not, that was pretty understandable... 06:25:36 <tswett> Indeed. 06:25:47 <tswett> Well, I don't recognize any of the other words, so I'm just going to move on to the next sentence. 06:26:29 <tswett> "Kettu kysyi viimein: 'Tiedätkö mistä nyt tuuli käy?'" 06:26:49 <tswett> The fox does something finally: "Something something something something something?" 06:26:56 <tswett> translate Kettu kysyi viimein: 'Tiedätkö mistä nyt tuuli käy?' 06:28:30 <oerjan> echo ping 06:29:14 <tswett> Gregor: the source-of-fun has stopped yielding fun! Labor in order to make us feel better! 06:29:34 -!- hagb4rd has quit (Quit: hagb4rd). 06:29:46 <HackEgo> No output. 06:30:22 <tswett> Oh, I'm just going to use a google. 06:30:30 <oerjan> http://i.imgur.com/a4yhf.jpg 06:30:33 <tswett> El zorro finalmente preguntó: "¿Sabe usted donde el viento es ahora?" 06:30:50 <oerjan> echo ping 06:30:53 * tswett changes the output language. 06:30:54 <tswett> The fox finally asked: "Do you know where the wind is now?" 06:31:36 <tswett> So, I can read a lot of this, but not most of it. 06:32:30 <HackEgo> ping 06:33:57 <HackEgo> No output. 06:34:05 <tswett> echo ping 19 38 59 (resonance mode, damping at level 7) 06:34:14 <HackEgo> ping 19 38 59 (resonance mode, damping at level 7) 06:37:13 -!- hagb4rd has joined. 06:42:27 -!- evincar has quit (Quit: Sleep?). 06:57:32 -!- church1 has quit (Ping timeout: 272 seconds). 07:07:02 <Sgeo> What is 0/epsilon? 07:12:56 <Sgeo> So, I want to find f'(5) where f(x) = x^2 07:14:05 <Sgeo> (5+eps)^2 = 25 + 2*5*eps + eps^2 07:14:13 <Sgeo> = 25 + 10eps 07:14:28 <Sgeo> - 25 = 10eps 07:14:32 <Sgeo> /eps = 10 07:14:37 <Sgeo> Correct result, awesome 07:15:30 <Sgeo> I'd try it with e^x but don't know how to do n^eps, is it 0 or something weird like that? 07:15:53 <Sgeo> I can find out! 07:16:25 <oerjan> e^eps is probably 1+eps 07:17:24 <Sgeo> e^eps must equal something + eps... 07:17:34 <Sgeo> oerjan, why 1? 07:17:46 <oerjan> it has to be close to 1 because eps is close to 0 07:18:44 <oerjan> more generally, i find the approximation e^x ~ 1+x for small x is useful for head estimates... 07:20:12 <Sgeo> Now, for the dual part of eps^eps 07:20:42 <Sgeo> (1+eps)^(1+eps) = something + 0eps 07:20:42 -!- TLUL has quit (Read error: Connection reset by peer). 07:20:45 <Sgeo> o.O 07:21:00 <Sgeo> Did I screw that up? Yes I did I think 07:21:06 <Sgeo> I think I forgot the derivative of x^x 07:21:45 <Sgeo> something + eps 07:22:04 <oerjan> x^x + x^x * ln x 07:23:43 <oerjan> i am assuming that f(x + y*eps) = f(x) + y*f'(x)*eps for f a function differentiable at x 07:24:08 <Sgeo> That's what Wiki says I think 07:25:18 -!- TLUL has joined. 07:44:00 -!- hagb4rd has quit (Quit: hagb4rd). 07:49:25 -!- hagb4rd has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:36:55 -!- Sgeo has quit (Read error: Connection reset by peer). 08:43:08 -!- pingveno has quit (Ping timeout: 260 seconds). 08:45:03 -!- pingveno has joined. 08:49:48 -!- oerjan has quit (Quit: Good night). 09:54:06 -!- MigoMipo has joined. 10:18:45 -!- ais523 has quit (Remote host closed the connection). 10:23:53 -!- Phantom_Hoover has joined. 11:09:36 -!- hagb4rd has quit (Ping timeout: 272 seconds). 11:56:24 -!- TLUL has quit (Quit: *disappears in a puff of orange smoke*). 12:07:09 -!- Zuu has quit (K-Lined). 12:11:06 <Vorpal> <elliott> Vorpal: http://i.imgur.com/fOopp.jpg <-- what the hell is that? 12:18:55 -!- FireFly has joined. 12:18:55 -!- FireFly has quit (Changing host). 12:18:55 -!- FireFly has joined. 12:50:33 -!- hagb4rd has joined. 13:09:59 <Phantom_Hoover> Vorpal, some kind of hyperdungeon? 13:16:38 <Ilari> Actually, I don't see any odd geometry in that... 13:16:55 * Phantom_Hoover swatpans Ilari --==\#/ 13:17:10 <Ilari> Ouch. 13:22:19 <Ilari> Based on blockiness, I guess its from minecraft... 13:32:35 <Vorpal> Phantom_Hoover, ? 13:32:40 <Vorpal> Phantom_Hoover, oh the image 13:32:42 <Vorpal> Phantom_Hoover, perhaps 13:33:10 <Vorpal> Phantom_Hoover, man made in large parts I suspect 13:33:12 <fizzie> The "shadowy" spots look abnormal. 13:36:29 <Vorpal> fizzie, same do the cages 13:36:58 <Vorpal> it must be man-made 13:37:20 <fizzie> Sure, but I mean "abnormal" in the sense of "not like the usual lighting rules". 13:37:46 <Vorpal> fizzie, indeed 13:38:25 <Vorpal> fizzie, it's the default texture pack I think 13:38:59 <fizzie> Could be, I haven't looked at that lately. :p 13:40:07 <Vorpal> fizzie, btw I'm handing out free records (subject to limited availability) 13:41:08 <fizzie> I'm going to log on soon(ishly) to test things. 13:44:04 <Vorpal> fizzie, to test what? 13:44:23 <fizzie> The "don't jump if blocked" best-effort test. 14:06:35 <Phantom_Hoover> I love the TV Tropes Troper Tales pages... 14:07:26 <Phantom_Hoover> I bet you thought Wolfram had the largest ego possible without collapsing under its own weight. 14:07:28 <Phantom_Hoover> You were wrong. 14:08:44 <Phantom_Hoover> Fortunately, Mary Sue has been cleansed of self-nominations. 14:11:00 <Phantom_Hoover> In other news, I finally worked out the relationship between differentiation and integration in my head, 3 years after learning calculus. 14:11:44 <Phantom_Hoover> I am now content with the world. 14:12:26 <Phantom_Hoover> http://tvtropes.org/pmwiki/pmwiki.php/TroperTales/EverybodyHatesMathematics 14:21:59 <Vorpal> wow 14:23:12 <olsner> Phantom_Hoover: hmm, what's the relation between integration and differentiation? 14:23:25 <Phantom_Hoover> olsner, seriously? 14:24:13 <Phantom_Hoover> The whole "int_a^bf(x)dx = F(a)-F(b)" bit? 14:24:24 <Phantom_Hoover> *F(b)-F(a) 14:24:38 <olsner> I mean, did you just realize what the words mean, or did you find a more profound relationship? 14:25:46 <Phantom_Hoover> I realised why it happens in the first place. 14:30:20 <Ilari> And since everybody hates matematics... It is easy to disinform using creative statistics... :-) 14:32:34 <olsner> Phantom_Hoover: it "happens"? I've always thought integration and differentiation was something you *did* rather than something that just happens 14:33:04 <Phantom_Hoover> olsner, "the reason differentiation and integration are inverses of each other", then. 14:38:46 <olsner> I never managed to learn the definition of integration, but for me integration means semi-intelligently guessing a function that has the correct derivative 14:39:28 <olsner> and then they're simply inverses by definition :) 14:49:04 <Phantom_Hoover> olsner, yes, but the other meaning of (definite) integration is the calculation of the area under a curve. 14:49:40 <Phantom_Hoover> Which has, on the face of it, absolutely nothing to do with gradients of curves at a point. 15:08:45 * Phantom_Hoover installs GNUstep with a feeling of self-hatred. 15:12:18 <olsner> cut wrist, install gnustep? 15:12:35 <Phantom_Hoover> Not just gnustep! 15:12:39 <Phantom_Hoover> gnustep-devel! 15:12:56 <Phantom_Hoover> ("dev" isn't fancy enough for the GNUstep people, apparently.) 15:16:53 <Phantom_Hoover> OTOH, Oolite is worth it. 15:23:49 <olsner> http://www.youtube.com/watch?v=D1sXuHnf_lo 15:29:56 <Quadrescence> i have some NeXTSTEP shit 15:29:59 <Quadrescence> anyone wanna buy it 15:39:25 <Phantom_Hoover> No. 15:40:24 <Phantom_Hoover> I'm only installing GNUstep because Oolite was originally written in Objective-C, and noöne could think of a better way to port it to other platforms. 15:41:01 <Quadrescence> well I still have two nextstep pizza boxes 15:41:06 <Quadrescence> and a megapixel monitor 15:41:12 <Quadrescence> and other BULLSHIT i want to get rid of 15:50:25 -!- elliott has joined. 15:54:19 <elliott> 07:29:56 <Quadrescence> i have some NeXTSTEP shit 15:54:19 <elliott> 07:29:59 <Quadrescence> anyone wanna buy it 15:54:20 <elliott> only a cube. 15:57:52 <Quadrescence> tru 15:57:57 <Quadrescence> every1 luvs the cube 15:58:04 <Quadrescence> but i only have slabs of shit 15:58:14 <elliott> Quadrescence: well do you have anything that can actually boot 15:59:05 <Quadrescence> yes 15:59:11 <Quadrescence> one of the slabs boots up fine 15:59:18 <Quadrescence> the other doesn't (idk why) 16:01:14 <elliott> hm what keyboard/mouse ports do they have, wikipedia doesn't say 16:13:23 -!- reiffert has quit (Ping timeout: 276 seconds). 16:13:28 -!- reiffert has joined. 16:15:46 -!- Gracenotes has quit (Remote host closed the connection). 16:19:17 -!- Gracenotes has joined. 16:25:45 <fizzie> Making a case more cubical than flat seems to be a surefire way of attracting people. 16:26:29 <fizzie> I have that SGI Indy slab ("Indigo without the 'go'", referring to the performance), and it's irrefutably more boring than the O2s, no matter that their hardware doesn't differ *that* much. 16:28:02 <fizzie> (The O2 is a sort of a rounded cubeish thing.) 16:28:46 <fizzie> (Admittedly it does also have many more megahurts too.) 16:33:59 -!- poiuy_qwert has joined. 16:35:36 -!- p_q has quit (Ping timeout: 265 seconds). 17:01:06 -!- sftp has quit (Read error: Operation timed out). 17:01:35 -!- sftp has joined. 17:01:43 -!- Sasha has joined. 17:16:00 -!- elliott_ has joined. 17:16:00 -!- elliott_ has quit (Client Quit). 17:16:05 <elliott> fizzie: ERROR: Permission to fis/mcmap.git denied to ehird. 17:16:06 <elliott> fizzie: Plzfix? 17:16:25 <elliott> fizzie: I think you pretty much have to add people individually as contributors :P 17:16:29 <elliott> I has two useful commits to push. 17:17:51 <Deewiant> Can't you make a pull request 17:18:16 <elliott> Deewiant: Yes, but fizzie said it was going to be public-push, and that sounds more fun than having my own repo. :p 17:20:20 <fizzie> Yes, I can add you as a collabomator there, soon. (What's the two things?) 17:21:08 <elliott> fizzie: //coords, which does some printin' of coordy actions (because F3 gets overwritten with graphs a lot), and I changed the "pure white" colour to in fact just use the terminal's default colours, so it works on lightbulb-y terminals too. 17:21:11 <elliott> (i.e. light-backgrounded) 17:21:18 <elliott> *backgrounded.) 17:23:00 <elliott> fizzie: Is it "easy" to inject chat packets? 17:23:05 <elliott> If so, I'll make //coords do that. 17:23:25 <elliott> (The colour code syntax would be nice, too; I know it involves that wavy S thing.) 17:25:53 <fizzie> Sure. 17:26:12 <fizzie> inject_to_client(packet_new(PACKET_CHAT, "foo")); will probably make 'foo' appear on the client. 17:26:23 <fizzie> (Just #include "common.h" and "protocol.h" for that.) 17:27:58 <fizzie> And the color code syntax is just §-in-UTF8 followed by a character out of [0-9a-f], the palette is also somewhere. 17:28:15 <fizzie> Or you can look at the color code decoding to map between palette and terminal colors. 17:29:13 <fizzie> UTF-8 in strings probably might not be quite safe, but you can use something like "foo \xc2\xa7dbar" to get bar in color d. 17:29:16 <elliott> fizzie: If I put the actual UTF-8 byte in the source, you'll hate me, won't you? 17:29:21 <elliott> Aww, see, see, you preempted me. 17:29:26 <fizzie> Yes, and it's not a byte, it's two. 17:29:30 <elliott> Yes, yes, yes. 17:29:33 <elliott> You PEDANT. 17:29:38 <elliott> fizzie: Oh man, I have to use sprintf. Isn't that great? 17:30:31 <elliott> I'll just make a 96-byte buffer; 's a power of two, and my envelope calculations tell me it'll work right up until Notch switches to 128-bit coordinates. 17:31:15 <fizzie> What should I write in the collaborator thing? Is it a github account name or what? Are you that "ehird" guy? 17:31:41 <elliott> fizzie: I may be that ehird guy, yes. 17:31:45 <elliott> And I think that's what you put in there, yes. 17:32:00 <elliott> I am also that alise guy, but I use that account even less than this one. 17:32:13 -!- Goosey has quit (Read error: Connection reset by peer). 17:32:22 <fizzie> Well, it's there. And ooh, it has a completion thing. 17:32:56 <elliott> So, wait, are packet_news garbage collected? 17:33:58 <fizzie> No, but when you hand a packet to inject_foo, the corresponding proxy thread will deallocate it when it has been injected. 17:34:11 <elliott> Ah. 17:34:21 <elliott> fizzie: What is your favourite colour? 17:34:36 <elliott> (I need to pick a colour for the mcmap chat messages that isn't red (hMod) or purple (COBOLSERVER 3000).) 17:34:51 <fizzie> Aw, I was going to go all purple. 17:35:10 <elliott> fizzie: I think ineiros would strike down upon thee. 17:35:36 <fizzie> The pink is quite sexy too, but I guess that's rather close to purple. 17:35:54 -!- j-invariant has joined. 17:36:25 <elliott> Is yellow used for anything? 17:36:32 <elliott> Hmm, yes, it is, but I forget what. 17:36:37 <elliott> Is that the "main" server messages? 17:36:45 <fizzie> I vaguely recall seeing yellow somewhere, but not sure where. 17:36:49 <j-invariant> any luck with the differentatiation 17:36:53 <elliott> I'll go with cyan. 17:37:02 <fizzie> Right, the "left the game" "joined the game" messages are in yellow. 17:37:08 <elliott> j-invariant: well, yep; it works properly, for Nth derivatives, parameterisable N, and finite shows 17:37:28 <elliott> j-invariant: basically I added a new constructor Zero that is, semantically, identical to (fix (Dual 0))... but of course all the operations on it terminate strictly and the like 17:37:34 <elliott> and it can be printed more simply 17:38:18 <elliott> fizzie: So I want colour 11. So... \xc2\xa7b? 17:38:32 <fizzie> Sounds right. 17:40:59 -!- chickenzilla has left (?). 17:47:47 <elliott> fizzie: Pushing now. 17:47:54 <elliott> fizzie: (You will probably *really* want to rewrite cmd_say.) 17:48:12 <elliott> fizzie: There you go. 17:48:30 <elliott> fizzie: Three lovely commits; commands now give output to chat, too, in cyan, and //coords works. 17:48:33 <Phantom_Hoover> elliott, got Oolite working; may not play MC for several days. 17:48:35 <elliott> To print your current coordinates. 17:48:44 <elliott> fizzie: Also shows white as the terminal's default colour. 17:48:45 <elliott> Such happy. 17:50:13 <elliott> fizzie: Interestingly, (0,0) isn't the spawn; it's three chunks that were presumably the original spawn, then a biome disconinuity. 17:50:21 <elliott> I guess the spawn was changed right away for whatever reason. 17:56:32 <fizzie> Yeah, I f3'd the spawn a while ago. 17:56:46 <fizzie> Maybe they moved it when starting the game, who knows. 18:01:32 -!- radams976 has joined. 18:02:10 <elliott> radams976: hi 18:03:15 -!- radams976 has quit (Client Quit). 18:03:25 <Phantom_Hoover> Don't byte the noobs! 18:05:08 <olsner> but we can still nibble them, can't we? 18:05:15 <Phantom_Hoover> Yes. 18:10:42 <j-invariant> nybble? 18:11:27 <Vorpal> <Ilari> And since everybody hates matematics... It is easy to disinform using creative statistics... :-) <-- only almost all, not all 18:12:39 <Vorpal> <Quadrescence> and a megapixel monitor <-- what 18:14:32 <elliott> What is "what" about that. 18:14:34 <elliott> Megapixel = 1M pixels. 18:14:52 <elliott> fizzie: I've pushed an incredibly important update; it is rather vital that everyone upgrades now. 18:14:59 <olsner> but where can you even find non-megapixel monitors nowadays? except on like mobile phones? 18:15:11 <Vorpal> <elliott> fizzie: Oh man, I have to use sprintf. Isn't that great? <-- sn 18:15:21 <elliott> Vorpal: Shut up. 18:15:21 <Quadrescence> Vorpal: it is the name of NeXT's monitor 18:15:37 <elliott> Vorpal: (There was no way it could overflow the buffer, as the variables in question are fixed-size.) 18:15:39 <elliott> (Integers.) 18:15:54 <Quadrescence> http://www.monitorworld.com/Monitors/next/megapixel.html 18:15:59 <Vorpal> Quadrescence, a 18:16:00 <Vorpal> ah* 18:16:35 <Vorpal> <elliott> fizzie: I've pushed an incredibly important update; it is rather vital that everyone upgrades now. <-- what is it? 18:16:45 <elliott> Vorpal: Vital. 18:16:47 <elliott> Also an update. 18:17:53 <Vorpal> elliott, no way 18:18:10 <elliott> Vorpal: No way what?! 18:18:15 <Vorpal> elliott, that it is vital 18:18:19 <elliott> Of course it is. 18:18:22 * Vorpal slaps test with a super-large, super-smelly, decaying digitally-enhanced reinforced IRC-grade trout 18:18:25 <Vorpal> huh 18:18:29 <Vorpal> I had that alias here 18:18:29 <elliott> See? 18:18:31 <Vorpal> wtf 18:18:33 <elliott> Vital. 18:18:34 <Vorpal> elliott, I wonder why 18:18:40 <Vorpal> I'll remove it from my cleint 18:18:41 <elliott> Vorpal: Because of the 90s. 18:18:45 <Vorpal> client* 18:19:01 <elliott> http://www.urbandictionary.com/define.php?term=trout-slap <-- Look, it even has pages of Urban Dictionary entries with lots of probably-not-ever-used-more-than-once sexual definitions. 18:19:05 <elliott> That's the mark of authenticity, that is. 18:19:13 <Vorpal> XD 18:20:17 -!- wareya has quit (Read error: Connection reset by peer). 18:20:35 -!- wareya has joined. 18:24:10 <olsner> "The only time a Singaporean is capable of forming a complete English sentence on IRC" :) 18:24:15 <elliott> haha 18:26:14 -!- j-invariant has quit (Quit: -). 18:38:05 -!- j-invariant has joined. 18:42:16 <Gregor> HEY GUYS I'm on a plane 18:44:44 <olsner> Gregor: have you had it with the snakes on it yet? 18:45:31 <Gregor> *sexual joke in poor taste* 18:47:35 <elliott> fizzie: I'm refactoring all the non-[CHAT] messages to use chat(); that okay with you? 18:47:40 <Vorpal> hippos in a helicopter at least rhymes. 18:47:49 <elliott> Well. 18:47:53 <elliott> Also apart from [PLAYER] appear/disappear. 18:47:57 <elliott> Because that would just be irritating. 18:48:13 <olsner> what is that thing you're working on anyway? 18:48:17 <elliott> Actually turns out I already did that. 18:48:22 <elliott> olsner: A Minecraft server proxy that does all kinds of fancy stuff. 18:48:28 <olsner> oh, nice 18:48:31 <olsner> I guess 18:48:34 <Vorpal> olsner, I assume you play mc 18:48:44 <elliott> "Assume"? 18:48:45 <elliott> On what grounds? 18:48:46 <Vorpal> (since almost everyone does) 18:48:49 <olsner> Vorpal: you can assume whatever you want :P 18:48:50 <elliott> That's ... not even false. 18:48:53 <Vorpal> elliott, a Swede. 18:48:54 <Vorpal> elliott, too 18:48:59 <elliott> ... 18:49:10 <Vorpal> elliott, like, more than half of the Swedes I know seem to have mc 18:49:45 <olsner> *more* than half? that implies you know more than two swedes! 18:49:51 <elliott> git push is so slow. 18:50:11 <Vorpal> elliott, blame git or github 18:50:19 <Vorpal> olsner, tens! 18:50:21 <elliott> I'll blame ssh. 18:50:28 <elliott> Since git pushes are usually very fast and GitHub's HTTP is very fast. 18:50:31 <Vorpal> elliott, ssh is fast in general 18:50:39 <olsner> it seems to imply that anyway, it depends on what it takes for you to think it "seems" like someone has mc 18:50:46 <elliott> I would like to see bzr push faster than this over ssh. Ha. 18:50:49 <olsner> specifically, on whether I "seem" to have mc 18:51:00 <Vorpal> olsner, you don't seem to have it 18:51:13 <Vorpal> olsner, seem was used in the sense of clothing 18:51:14 <elliott> olsner: LOL CONVERSING WITH VORPAL 18:51:37 <fizzie> What messages are those? 18:51:38 <Vorpal> (also to the north-left) 18:51:47 <fizzie> I don't think the map-mode changes make sense in the client stream really. 18:51:48 <elliott> fizzie: Mode setting ones, and nothing else at all. :p 18:51:54 <fizzie> Well, that's I guess a matter of opinion. 18:51:57 <olsner> elliott: what's so lol about that? 18:52:01 <elliott> fizzie: Oh. Well, I've already pushed it. You can revert if you want, it's just that I never look at the console. 18:52:09 <elliott> fizzie: (And I can easily imagine someone, e.g. redirecting it to a file.) 18:52:13 <elliott> olsner: <Vorpal> olsner, seem was used in the sense of clothing 18:52:32 <fizzie> I don't have a very strong opinion on it, so I guess I'll just let it be. 18:52:45 <olsner> oh, I missed that line, but that's spelled 'seam' afaik 18:52:52 <Vorpal> elliott, randomness 18:53:08 <elliott> olsner: it is, but it did helpfully derail the conversation without you getting an answer :) 18:53:28 <Gregor> FLOODTIME 18:53:29 <Gregor> * gamax92 has joined ##javascript 18:53:29 <Gregor> <gamax92> may i ask you a question 18:53:29 <Gregor> <Gregor> gamax92: First you have to check the schedule to see whether this is an Approved Questions Hour, then you have to file a question request at the web site in the /topic. 18:53:29 <Gregor> <gamax92> i dont have the question, my friend does 18:53:30 <fizzie> Meh, the cart-riding will need a more complicated thing. :/ 18:53:32 <Gregor> <Gregor> gamax92: Well then he'll have to fill out the question request form. 18:53:33 <Gregor> * gamax92 has left ##javascript 18:53:35 <Gregor> <Gregor> Am I a bad person? :P 18:53:39 -!- Sgeo has joined. 18:53:49 <elliott> Gregor: Yes, and that's why we love you. 18:54:21 <olsner> elliott: hmm, did I ask anything that wasn't answered? 18:54:30 <Gregor> :P 18:55:02 <elliott> olsner: well, OK, you didn't ask a question, but you implied one 18:55:08 <elliott> <olsner> it seems to imply that anyway, it depends on what it takes for you to think it "seems" like someone has mc <olsner> specifically, on whether I "seem" to have mc 18:55:19 <olsner> elliott: <Vorpal> olsner, you don't seem to have it 18:55:34 <elliott> olsner: <Vorpal> olsner, you don't seem to have it <Vorpal> olsner, seem was used in the sense of clothing 18:55:39 <elliott> olsner: this is one of the things that vorpal likes to call "jokes" 18:56:06 <elliott> fizzie: Can I add timestamps to the [CHAT]/[PLAYER] things? 18:57:03 <olsner> elliott: hmm, right, and that derailed something? 18:57:21 <elliott> olsner: yes, the minecart fell off the track. 18:57:22 <elliott> wait what? 18:57:56 <fizzie> elliott: You mean on-console? Why not. 18:58:34 <elliott> fizzie: I'm doing all my edits with vi without syntax highlighting or automatic indentation; can I have a hardcore prize? 18:58:47 <fizzie> I'm not sure there is a prize. 18:58:54 <elliott> fizzie: But I want a prize. 18:59:02 <olsner> now to find the right way to construct this PDPE 18:59:22 <elliott> fizzie: Can I conflict with math.h names? :p 19:02:02 <olsner> oh, this one from a week ago: <elliott> https://gist.github.com/657234#LID75 In which olsner manages to make me hate long mode. 19:02:12 <olsner> did you mean that specific line? what's wrong about it? 19:02:23 <elliott> olsner: MAGIC FLAGS AND BITS AND PGE AND WHAT 19:04:32 <olsner> mmkay, well paging involves flags, what's the big deal? :) 19:04:45 <elliott> olsner: DFFFF 19:05:34 <elliott> fizzie: You do realise that every time you call do_die, it's with "%s", msg, thus making the printf part of do_die rather useless? :p 19:05:52 <fizzie> That's not very true. 19:06:02 <fizzie> Or of it is, it wasn't when I wrote it. 19:06:04 <fizzie> There's the dief macro still. 19:06:09 <fizzie> It's not my fault if I don't use it. 19:06:22 <fizzie> (Because the instances have been changed to stopfs.) 19:06:27 <fizzie> (And I think those still use do_die.) 19:07:12 <elliott> fizzie: Oh, so you do. 19:07:12 <elliott> Darn. 19:07:34 <elliott> fizzie: (I want to make do_die use log(), but I can't, really, because it does two prints.) 19:07:49 <Vorpal> elliott, and? 19:07:53 <elliott> Vorpal: And what? 19:08:04 <elliott> Prediction: <Vorpal> ...logarithms... 19:08:07 <Vorpal> elliott, why is it an issues it uses 2 prints 19:08:12 <elliott> Because log() does one print. 19:08:23 <Vorpal> elliott, yes.... and? 19:08:29 <elliott> And it timestamps them. 19:08:35 <elliott> So I can't use log() in do_die(). 19:08:40 <fizzie> I do use math.h here and there, I'm not sure how I feel about the name-conflict. 19:08:44 <Vorpal> elliott, are they macros? 19:08:50 <elliott> Vorpal: ...??? 19:08:53 <elliott> fizzie: OK, I'll rename it. 19:09:06 <elliott> fizzie: printlog, probably. 19:09:09 <elliott> Or logprintf. 19:09:15 <Vorpal> elliott, do_log 19:09:16 <elliott> Or log_print :P 19:09:21 <elliott> do_ is a silley prefix. 19:09:24 <elliott> log_print is good. 19:09:27 <Vorpal> elliott, true 19:09:32 <Vorpal> elliott, log_format? 19:09:37 <Vorpal> log_fmt 19:09:41 <elliott> log_printf. 19:09:43 <fizzie> Yes, the do_ prefix is not visible to calling code. 19:09:45 <Vorpal> or that 19:09:47 <olsner> sounds like you want a va_list variant of log or something like that 19:09:52 <fizzie> It's just the underlying function for the die/dief/log/logf macros. 19:09:55 <elliott> olsner: not really, it's more involved than that 19:10:07 <elliott> olsner: I need a va_list variant that also takes /another/ format and two extra args for that one :P 19:10:35 <fizzie> olsner: Yes, the code in question does one vfprintf and one fprintf and expects them to be concatenated. 19:10:41 <fizzie> Anyway, you can just use a buffer there. 19:11:10 <olsner> vararg-macros perhaps? #define foo(fmt, ...) real_log_printf("%d" fmt, timestamp(), ##__VA_ARGS__) 19:11:13 <fizzie> s/log/stop/g 19:11:45 <olsner> I think the ## magic is an gcc-extension though, without that you'll have interesting issues when doing foo("bar") with no extra args 19:12:43 <olsner> what's the problem with doing two prints though? 19:14:08 <fizzie> olsner: The "print" adds the timestamp, so the calling code -- which does fprintf(stderr, "DIE: %s:%d: ", file, line); vfprintf(stderr, fmt, ap); -- would end up having those two things split in two separate timestamped lines. 19:14:12 <elliott> right 19:14:16 -!- pikhq has quit (Ping timeout: 276 seconds). 19:15:03 <fizzie> Incidentally, the ## gcc-onliness is why I have a die() macro and a dief() macro separately. (Though I already have nested functions and whatnot, so gcc-extensions aren't really much of an issue.) 19:15:48 <nooga> hey 19:15:57 <nooga> do you guys know some debuggers for DOS? 19:16:05 <olsner> there's DEBUG 19:16:10 <nooga> meh 19:16:32 <olsner> djgpp might include a gdb for dos 19:16:50 <nooga> i want to tap into one game's memory and check some stuff there 19:16:58 <olsner> that gdb probably only works with DPMI or dos4gw though 19:17:26 <fizzie> elliott: Have fun fixing conflicts with what I just pushed to github, though. 19:18:02 <fizzie> I also fixed the leak you had added in cmd_slap. 19:18:11 <hagb4rd> hell..this awesome footage make one's flesh creep 19:18:27 <Phantom_Hoover> Zuh? 19:18:29 <hagb4rd> --> http://www.youtube.com/watch?v=cJrtROuQFfk&list=PL408EDD9348488A28&index=11&playnext=4&fmt=18 19:18:33 <elliott> fizzie: If this were scapegoat ... 19:20:03 <fizzie> I sort of liked the "//goto: usage: //goto x z" over "usage: //goto x z", but whatevers. 19:20:33 <olsner> hagb4rd: koyaanisqatsi is boring 19:20:59 <elliott> fizzie: Really? It seemed like super-weird duplication to me. 19:21:06 <hagb4rd> is it? it's the final scene right 19:21:14 <fizzie> elliott: I'm super-weird like that. 19:21:36 <hagb4rd> guess you have to tune in someway.. or just be in the right mood 19:21:50 <elliott> fizzie: Guess how lucky I am? 19:21:56 <elliott> fizzie: That's right! I get to rewrite handle_chat! 19:22:07 <fizzie> Why's that? 19:22:12 <elliott> fizzie: log_print 19:23:07 <fizzie> Just use a glib string and g_string_append_printf/g_string_append/g_string_append_whatever instead of those separate prints. 19:23:08 <elliott> fizzie: Hmm, is there a "more efficient" way than str_join to build up a big ol' string incrementally in glib? 19:23:13 <elliott> See, look at that, you're so helpful. 19:24:07 <fizzie> GString *s = g_string_new(""); and so on; then at the end you do a "gchar *cstr = g_string_free(s, FALSE);" and it gets rid of the glib string structures but gives you the single c-string back. 19:24:22 <elliott> glib is so weird. 19:24:51 <elliott> (But, so I don't end up saying it in my head all the time when coding: LOLOLOL CONSTRUCT A NEW G-STRING ahem.) 19:25:16 <olsner> sounds like something stuffed with loads of dynamic allocations and indirection... how will you handle out-of-memory errors in log_print? :) 19:25:25 <fizzie> olsner: It's not "real" logging. 19:25:29 <elliott> I won't! Yaaaay. 19:25:35 <fizzie> olsner: It's just whatever ends up in the stdout of the program. 19:25:43 <elliott> But you can totally tee it to a file, man. 19:25:49 <Phantom_Hoover> hagb4rd, why does the rocket change a short way into that video? 19:25:59 <elliott> fizzie: http://library.gnome.org/devel/glib/stable/glib-String-Chunks.html This is probably better than a GString, but GStrings look more convenient. 19:26:05 <elliott> (LOLOLOLOL CONVENIENT G-STRING HAHA ahem.) 19:26:24 <hagb4rd> Phantom_Hoover? ..this is the challanger 19:26:35 * Phantom_Hoover laughs. 19:26:36 <fizzie> You're printing out silly text to the console, I'd really just go with the convenient choice. 19:26:41 <Phantom_Hoover> That is definitely not the Challenger. 19:27:12 <hagb4rd> you're right 19:27:30 <hagb4rd> it's not even a space shuttle 19:27:41 <Phantom_Hoover> For one thing, the Challenger disaster was 4 years after Koyaanisqatsi was released; for another, that rocket is clearly a Saturn V in the early bits of the video. 19:27:51 <Phantom_Hoover> It changes to something else after it takes off. 19:28:06 <hagb4rd> changes? 19:28:11 <hagb4rd> it blows up 19:28:31 <Phantom_Hoover> No, I mean the rocket that blows up is not a Saturn V. 19:28:45 <hagb4rd> yes.. changing some states.. you can say indeed 19:29:07 <hagb4rd> particle transformation matrix 19:30:47 <elliott> What. 19:33:48 <elliott> char stamp[23]; 19:33:48 <elliott> time_t now = time(NULL); 19:33:48 <elliott> struct tm *tm = localtime(&now); 19:33:48 <elliott> strftime(stamp, sizeof(stamp), "%FT%H:%M:%s%z", tm); 19:33:48 <elliott> printf("%s ", stamp); 19:33:48 <elliott> vprintf(fmt, ap); 19:33:50 <elliott> putchar('\n'); 19:34:01 <elliott> fizzie: Why is, instead of the timezone, it printing :? 19:34:06 <elliott> There's some garbage after the space but I think that's handle_chat. 19:34:17 <elliott> 2010-12-19T19:30:� [CHAT] 'Welcome to a322.org Minecraft server' 19:34:17 <elliott> 2010-12-19T19:30:�v�� [PLAYER] appear: fizzief 19:34:17 <elliott> 2010-12-19T19:30: [CHAT] <ehird> What's that? You think you fixed it? HAHAHAHA 19:34:20 <elliott> Ooh, no. 19:34:25 <elliott> The first two have corruption before the space. 19:34:29 <elliott> So /something/ is WRONG. 19:34:39 <hagb4rd> Phantom_Hoover, another question: can you tell me which rocket-part it is, focused by the cam in that epic falling sequence 19:35:11 <Phantom_Hoover> It's a thruster and the tattered remains of the hull above it. 19:35:49 <elliott> fizzie: How fast can fungot generate babble? 19:35:49 <fungot> elliott: a worker is any body of the rule defining a specific 19:35:51 <elliott> fizzie: The command-line version. 19:36:12 <fizzie> Not too fast. I can benchmark quickly. Depends also on the model. How so? 19:36:15 <Phantom_Hoover> A second-stage thruster, too, since the first stage has at least 3. 19:36:55 <hagb4rd> thats kind of precise :) thx 19:36:58 -!- Sasha has quit (Remote host closed the connection). 19:37:40 <elliott> fizzie: Turns out it doesn't matter! 19:38:01 <fizzie> The command-line version is a Perl script, though; one could whip up a trivial C version to be real fast. And it does the whole disk-reading-all-the-time (though I suppose disk cache will take care of that). 19:38:14 <fizzie> The Perl script is probably slower than the Befunge code. 19:39:00 <fizzie> 16 words per second with europarl. 19:40:24 <elliott> addquote <fizzie> The Perl script is probably slower than the Befunge code. 19:40:52 <HackEgo> 251) <fizzie> The Perl script is probably slower than the Befunge code. 19:41:13 <elliott> fizzie: Any ideas w/ my string corruption? 19:42:46 <fizzie> Not immediately. Pastebin the surroundings of the function too? 19:43:15 <elliott> fizzie: http://sprunge.us/ZBYY 19:43:21 <elliott> fizzie: Or do you mean the functions around it? 'cuz that would be weird. 19:43:41 <elliott> Aha... %s must be wrong. 19:43:49 <elliott> 2010-12-19T19:32:[corruption] 19:43:57 <hagb4rd> <elliott>fizzie: Why is, instead of the timezone, it printing :? <-- maybe timezone is not set? 19:43:59 <elliott> %s The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 19:43:59 <elliott> (UTC). (TZ) 19:44:01 -!- pikhq has joined. 19:44:02 <elliott> OK, that explains little, but I want %S. 19:44:04 <elliott> hagb4rd: no, it is 19:44:08 <hagb4rd> k 19:44:13 <fizzie> Yes, I managed to not notice that. 19:44:23 <elliott> Still, that corruption don't look like seconds to me. 19:44:55 <fizzie> I just read %H:%M, looked at your pasted examples, went "hours and minutes, okay" and didn't wonder about seconds. 19:45:07 <elliott> 2010-12-19T19:44:22+ [CHAT] 'Welcome to a322.org Minecraft server' 19:45:08 <elliott> 2010-12-19T19:44:22+  [PLAYER] appear: fizzief 19:45:09 <elliott> What. 19:45:19 <elliott> "+" doesn't rightlook. 19:45:36 <fizzie> It's the right character there to be the first-thing-of-timestamp. 19:45:41 <elliott> Indeed. 19:45:53 <elliott> Oh, I'm without enough space. 19:45:59 <elliott> fizzie: Still, I would like it if it appended Z for UTC. 19:46:08 <elliott> fizzie: In fact, perhaps it doesn't really need to put the timestamp there at all. 19:46:13 <elliott> fizzie: People know what timezone they're in, right? 19:46:18 <fizzie> Usually. 19:46:43 <fizzie> Or you could s/localtime/gmtime/, put a Z in there manually, and just say it logs in sensible-time instead of local-time. 19:46:44 -!- Sasha has joined. 19:47:01 <fizzie> Or, or, or! Timestamp in Internet time! 19:47:15 <elliott> <fizzie> Or you could s/localtime/gmtime/, put a Z in there manually, and just say it logs in sensible-time instead of local-time. 19:47:19 <elliott> If this were meant to be a useful log, sure. 19:47:27 <elliott> But actually it's just so that you can see general timestamps :P 19:47:53 <elliott> fizzie: In fact, I probably shouldn't bother logging dates. Nobody *really* wants to log this to a file. 19:48:13 <fizzie> Yes, %H:%M:%S or even [%H:%M:%S] could be okay. 19:48:31 <elliott> fizzie: There's already bra-kets around the [CHAT] and the like, so that would look weird. 19:48:36 <fizzie> I guess. 19:48:52 <fizzie> It's not a very serious matter, the formatting of this thing. 19:48:54 * elliott separates it out into a print_timestamp function to use in do_die. 19:48:57 <elliott> fizzie: YES IT IS 19:49:30 <fizzie> Did you already merge in my changes that add more plain printfs inside world.c? :p 19:50:25 <elliott> fizzie: Not yet! 19:50:37 <elliott> fizzie: BTW, I'm making DIEs go to stdout, since they're part of the "log". 19:50:39 <elliott> Is that okay? 19:51:02 -!- pikhq has quit (Ping timeout: 240 seconds). 19:52:05 <elliott> oh 19:53:46 <fizzie> Sure. 19:54:03 <Phantom_Hoover> elliott, why are you doing quantum physics in an MC mapping tool? 19:54:22 <elliott> Phantom_Hoover: Because. 19:54:49 <fizzie> Phantom_Hoover: It's not just a mapping tool, it's nowadays also a slapping tool. 19:55:01 <Phantom_Hoover> Goody! 19:55:40 -!- pikhq has joined. 19:55:59 <fizzie> java.io.IOException: Bad packet id 200 at gk.b(SourceFile:89) at jq.c(SourceFile:149) at jq.c(SourceFile:9) at pf.run(SourceFile:59) -- ooh, haven't seen that one before. 19:59:02 -!- ais523 has joined. 19:59:35 <elliott> elliott@dinky:~/code/mcmap$ ./mcmap -x 2 -s 300x a322.org:25566
19:59:35 <elliott> 19:58:53 [DIE] main.c:171: Invalid window size: 300x
19:59:43 <elliott> fizzie: I think I just unintentionally enterprisey'd your option parsing.
20:00:06 <elliott> fizzie: Sh... should I put it back? :p
20:00:48 -!- pikhq has quit (Ping timeout: 260 seconds).
20:01:07 <fizzie> What does "enterprisey'd" mean, exactly?
20:01:57 <elliott> elliott@dinky:~/code/mcmap$./mcmap -x 2 -s 300x a322.org:25566 20:01:58 <elliott> 19:58:53 [DIE] main.c:171: Invalid window size: 300x 20:01:59 <elliott> fizzie: That. 20:02:19 <fizzie> Oh, right. 20:02:26 <fizzie> Well, I don't mind. 20:02:30 <elliott> YAY ENTERPRISEY 20:02:30 <fizzie> It *is* a bit silly, though. 20:02:36 <elliott> fizzie: Yes, but, unified functions! 20:02:50 <elliott> fizzie: The alternative is die_due_to_user_error_f and die_due_to_code_error_f. :P 20:03:01 <elliott> Actually I think I've seen that line-number-in-user-error thing in some other big software package. Apache? 20:03:42 <elliott> print_log("[BAD] Unknown packet id: 0x%02x", t); 20:03:43 <elliott> It's bad. 20:03:56 <elliott> *log_print 20:04:07 <elliott> fizzie: Can I make a print_log function that prints the logarithm of a given number? :p 20:04:48 <fizzie> That could actually be a dief there. 20:04:55 <fizzie> Because it's actually going to die. 20:05:06 <elliott> fizzie: Oh, it is? Wonderful. 20:05:20 <fizzie> Feel free to make it a die instead of log+return 0. 20:05:26 <elliott> fizzie: "Dief" is such a wonderful word. 20:05:29 <elliott> It's so... Nazi. 20:05:30 <elliott> DIEF! 20:05:38 <elliott> I may be slightly mad. 20:05:56 <elliott> elliott@dinky:~/code/mcmap$ ./mcmap -x -y -s 300x300 a322.org:25566
20:05:56 <elliott> 20:05:14 [DIE] main.c:144: Option parsing failed: Cannot parse integer value '-y' for -x
20:06:04 <elliott> I think that the "Option parsing failed:" bit there is slightly redundant.
20:06:23 <fizzie> Those are directly from glib's option-parser, I guess.
20:06:33 <elliott> Indeed.
20:06:40 <fizzie> At least I can't recall writing such a thing.
20:06:42 <elliott> Now to pull in your changes.
20:06:48 <elliott> fizzie: You wrote "Option parsing failed:", though.
20:06:50 <elliott> Which is just silley.
20:06:52 <elliott> (Well, lowercase o.)
20:06:54 <fizzie> Oh, I did?
20:07:00 <elliott> Yes.
20:07:10 <elliott> Auto-merging main.c
20:07:10 <elliott> Auto-merging protocol.c
20:07:10 <elliott> Auto-merging world.c
20:07:10 <elliott> CONFLICT (content): Merge conflict in world.c
20:07:10 <elliott> Automatic merge failed; fix conflicts and then commit the result.
20:07:17 <elliott> fizzie: I think the merge went much more badly than git suggests.
20:07:28 <elliott> log_print("[PLAYER] appear: %s", name);
20:07:28 <elliott> =======
20:07:28 <elliott> if (name)
20:07:28 <elliott> {
20:07:29 <elliott> printf("[PLAYER] appear: %s\n", name);
20:07:31 <elliott> >>>>>>> dddd7178398e71bc67ef5aaa9312f0a40d8ed4b0
20:07:33 <elliott> Heh.
20:07:39 <fizzie> It's not much of a conflict there.
20:08:00 <elliott> Indeed.
20:08:15 <elliott> fizzie: "VEHICLE"? Heh.
20:08:20 <elliott> [TRANSPORTATION MECHANISM]
20:08:33 <fizzie> I originally wrote CART, but I think the same thing will apply to BOATs.
20:08:41 <elliott> fizzie: Anyway, apparently by "a bunch", you mean "three".
20:08:47 <elliott> Yes, a whole THREE printfs you added! Oh god!
20:08:55 <fizzie> Three's a... bunch.
20:09:22 <fizzie> They are more in the nature of debugging messages than actual sensible user messages, but, well.
20:09:28 <fizzie> Who wouldn't want to see some entity ids?
20:10:09 <fizzie> Vorpal: Coincidentally! I think I fixed the "red streaks" problem.
20:10:30 <elliott> fizzie: So, uh, I didn't get any debug messages.
20:10:33 <elliott> Oh, I think I forgot to make'.
20:10:41 <elliott> No, I didn't.
20:10:45 <elliott> 20:09:22 [CHAT] 'Welcome to a322.org Minecraft server'
20:10:45 <elliott> ^C[VEHICLE] Mounted 855718elliott@dinky:~/code/mcmap\$
20:10:46 <elliott> What.
20:10:57 <elliott> Oh.
20:10:59 <elliott> I forgot to loggify them.
20:12:21 <elliott> fizzie: Mind if I go all OCD and make everything have a four-char [XXXX]?
20:12:36 <fizzie> Nnnno, if you seriously don't have anything better to do. :p
20:13:08 <elliott> fizzie: It's Christmas, why would I have anything better to do? :)
20:13:23 <elliott> fizzie: I think I might make the die prefix [GAK!].
20:13:28 <elliott> That's four bytes, after all!
20:13:31 <elliott> Well, six.
20:14:45 <fizzie> Or DIEF, you seemed to like it.
20:15:33 <elliott> fizzie: So does your thing handle pig-riding?
20:15:54 <fizzie> I don't quite know.
20:15:59 <fizzie> I'm trying to test a boat now.
20:16:26 <elliott> 20:15:49 [DIED] main.c:147: Cannot parse integer value '-y' for -x
20:16:28 <elliott> SO DAMN ENTERPRISEY.
20:17:43 <elliott> fizzie: OK, pushed my enterprises.
20:17:59 <nooga> i don't believe that there's a way to run gdb under DOS
20:18:03 <nooga> in dosbox for example
20:18:10 <fizzie> I don't quite remember how to make a boat.
20:18:15 <elliott> nooga: djgpp
20:18:17 <elliott> no?
20:18:21 <elliott> fizzie: It's a U shape.
20:18:25 <elliott> fizzie: Bottom two rows.
20:18:27 <elliott> Sticks or wood, I forget.
20:18:42 <fizzie> Wood-U worked.
20:19:08 <fizzie> Oo, works.
20:19:55 * elliott considers making his Minecraft start-up script start mcmap.
20:19:56 <fizzie> [VEHICLE] mounted 867873
20:19:56 <fizzie> [VEHICLE] unmounted 867873 by destroying
20:20:07 <fizzie> (That was before your changes.)
20:20:33 <elliott> fizzie: You might want to remove the IDs and make it (to modify the message in mine) "[INFO] Mounted vehicle.", "[INFO] Dismounted vehicle by destroying.", etc.
20:20:45 <elliott> fizzie: (It's dismount, not unmount :P)
20:21:35 <fizzie> Dismounted the filesystem.
20:21:46 <elliott> fizzie: Blame Unix.
20:22:55 <fizzie> Pushed a memory leak fix for your handle_chat. :p
20:25:58 <elliott> fizzie: It's not my fault C sucks. :p
20:26:19 <elliott> fizzie: What would be really nice is if scaling scaled the little people indicators too... I know you already know of that, though.
20:27:16 -!- pikhq has joined.
20:28:50 <pikhq> So, my stepdad randomly decided to swap out routers.
20:29:06 <pikhq> His new router hands back 192.168.1.1 for every DHCP request.
20:29:08 <fizzie> Yeah, I should probably just buy a polygon-filler and draw the indicators with that.
20:29:38 <pikhq> Meaning there's several systems on the same network with the same IP address.
20:30:06 <elliott> pikhq: Completely randomly? :P
20:30:11 <elliott> pikhq: And: AWESOME.
20:30:17 <pikhq> Erm, sorry, 192.168.1.2, not 192.168.1.1.
20:30:21 <pikhq> But, yeah.
20:30:26 <pikhq> It just hands the same damned IP back.
20:30:27 <elliott> pikhq: Put OpenWRT on it.
20:30:28 <fizzie> It's the one-person router.
20:30:45 <pikhq> He stopped working on it because "works for me".
20:31:10 <pikhq> elliott: I'll probably do that to the old one.
20:32:00 <elliott> pikhq: Was there any reason to change the router? :P
20:32:08 <pikhq> elliott: None!
20:32:29 <elliott> fizzie: Do you really have to buy one? I mean, you just do one more/less pixel each time.
20:33:17 <fizzie> Well, the rectangles are already with FillRect.
20:33:27 <fizzie> The triangle-drawing is a bitmap though.
20:33:35 <pikhq> Whoo, the old one is currently supported by OpenWRT.
20:33:43 <fizzie> I guess eight-directional triangles I could just special-case instead of using a general-purpose polygon routine.
20:33:54 <fizzie> Well, I'll fix that at point X.
20:34:24 <elliott> fizzie: N-directional triangles would be fun too, though.
20:35:31 <fizzie> Yes, but I don't want to redraw the map all the time just when you move your head around.
20:35:44 <fizzie> (And it seems to send an awful amount of the player-look packets.)
20:35:49 <elliott> fizzie: You could just redraw the triangules.
20:36:02 <fizzie> The code is not clever enough to repaint only part of the background.
20:36:54 <elliott> fizzie: But it's enterprisey!
20:37:01 <fizzie> Away now.
20:37:18 <elliott> fizzie: ENTERPRISEY
20:37:41 <elliott> Vorpal: Major mcmap updates.
20:40:39 <nooga> meh
20:40:58 <nooga> gdb does not recognize this game as executable
20:41:06 <elliott> nooga: Well, djgpp is like, extended-only.
20:41:14 <elliott> nooga: Hmm ...
20:41:20 <elliott> nooga: gdb can do remote debugging via serial port.
20:41:24 <nooga> the game uses dos4gw i thinkk
20:41:27 <elliott> nooga: Perhaps you can convince a compiler to cross-compile for DOS with support for that?
20:41:30 <elliott> Also, djgpp has its own stuff.
20:41:34 <elliott> nooga: Oh, so you don't have the code.
20:41:36 <elliott> nooga: I think you're fucked.
20:41:41 <elliott> Try DOSEmu maybe? It might have gdb support.
20:41:51 <elliott> fizzie: I think mcmap should come with its own service manager, to restart mcmap if it ever dies.
20:43:56 <nooga> weeelll
20:44:01 <nooga> i tried using dosbox debugger
20:44:28 <nooga> but the game won't run properly when dosbox is in debug mode
20:46:46 <elliott> fizzie: What would you say little patches of black would be, in post-halloween terrain?
20:47:23 <Phantom_Hoover> Pumpkins, if you haven't mapped them.
20:47:25 <Phantom_Hoover> Reeds, too.
20:47:37 <elliott> Phantom_Hoover: Pumpkins have a mapping.
20:47:44 <Phantom_Hoover> Reeds, then?
20:47:48 <elliott> Phantom_Hoover: (You might want to "git pull && make"; there have been a lot of updates t'day.)
20:48:24 <Phantom_Hoover> elliott, on sabbatical due to getting Oolite back, remember?
20:48:33 <elliott> Phantom_Hoover: Psht.
20:48:34 <olsner> grr, bochs' debugger only displays the lower 32 bits of address space when you ask it to dump the page tables
20:48:47 <Phantom_Hoover> elliott, psht to you too, sir!
20:50:01 <elliott> olsner: Try remote gdb. :p
20:50:06 <elliott> (Note: Requires kernel support.)
20:50:13 <elliott> (I think.)
20:50:14 <olsner> since it seems I have made my current page table work maybe I won't bother, but it would be really nice if it could a) actually display all mapped pages, b) check for errors in the page tables and complain visibly
20:50:18 <elliott> (And a serial port driver.)
20:50:29 <olsner> hmm, how would kernel support be involved in asking bochs what it's emulating?
20:54:06 -!- Phantom_Hoover_ has joined.
20:54:17 <elliott> olsner: eh?
20:54:25 <elliott> olsner: remote gdb requires a serial driver, I mean
20:54:29 <elliott> and I think kernel support
20:55:17 -!- nooga has quit (Ping timeout: 245 seconds).
20:55:28 <olsner> surely that is not required to connect gdb to bochs
20:55:41 <elliott> olsner: You mean ... debug bochs itself?
20:55:50 <elliott> I mean debug your kernel as it runs in qemu/bochs (qemu has better support IIRC).
20:56:00 <olsner> no, I am talking about debugging the thing running in bochs
20:56:04 <elliott> Although, actually, bochs has all the support, right?
20:56:08 <elliott> Can't you just use bochs/gdb?
20:56:23 <olsner> I can, but gdb is useless for this debugging
20:57:02 -!- Phantom_Hoover has quit (Ping timeout: 240 seconds).
20:57:05 <elliott> olsner: can't you just do
20:57:08 <elliott> print (*locationofpagetables)
20:57:10 <elliott> or is it not that simple
20:57:41 <olsner> well, I already know what bytes the tables contain, what I'm interested in is what it's being interpreted as so that I can see what's wrong
20:58:18 <elliott> alright then
20:58:30 <elliott> fizzie: Hmm, it would be nice if your current (x,z) coordinates were in a corner of the mcmap window.
20:58:58 <fizzie> Why don't any of you file these things in the github?
20:59:27 <fizzie> Anyway, it would also be nice to have (optional) coordinate labels (say 100 block divisions) at the edge of the window too.
20:59:40 <elliott> fizzie: I'm a developer, dammit, USERS file bugs, not me!
20:59:59 <fizzie> Well, you can also implement that as you will, but you'd better do the text-drawing ELEGANTLY.
21:00:00 <pikhq> o.O'
21:00:02 <fizzie> SDL doesn't do text.
21:00:07 <elliott> fizzie: I'm not sure what you mean with coordinate labels, though?
21:00:14 <fizzie> Like maps have.
21:00:20 <elliott> fizzie: Also, I'd just use a TOTALLY SNAZZY BITMAP FONT that I would have JUST MADE UP AT THE TIME.
21:00:21 <elliott> And ah.
21:00:36 <pikhq> Japanese for "prostitution" is 売春. Literally, "selling youth".
21:00:46 <elliott> fizzie: But, um, SDL_ttf.
21:00:52 <elliott> pikhq: That's the japs for ya!
21:00:53 <fizzie> That's not part of SDL.
21:01:01 <elliott> fizzie: No, but you have it installed already. :p
21:01:10 <pikhq> Because a euphemism ceased to have non-euphemistic usage.
21:01:13 <elliott> (glib isn't part of SDL either.)
21:01:24 <fizzie> elliott: Not the development packages.
21:01:32 <elliott> fizzie: Well, that's your fault!
21:01:38 <elliott> fizzie: I think I had to install glib-dev. :p
21:08:51 -!- nooga has joined.
21:18:15 -!- nooga has quit (*.net *.split).
21:18:18 -!- FireFly has quit (*.net *.split).
21:18:21 -!- ineiros has quit (*.net *.split).
21:18:22 -!- jix has quit (*.net *.split).
21:18:34 -!- wareya has quit (*.net *.split).
21:18:37 -!- bsmntbombdood has quit (*.net *.split).
21:18:39 -!- rodgort has quit (*.net *.split).
21:18:41 -!- yiyus_ has quit (*.net *.split).
21:18:41 -!- fxkr has quit (*.net *.split).
21:18:43 -!- fungot has quit (*.net *.split).
21:18:44 -!- fizzie has quit (*.net *.split).
21:18:49 -!- Sasha has quit (*.net *.split).
21:18:52 -!- MigoMipo has quit (*.net *.split).
21:18:52 -!- pingveno has quit (*.net *.split).
21:18:54 -!- Leonidas has quit (*.net *.split).
21:18:55 -!- tswett has quit (*.net *.split).
21:18:57 -!- yiyus has quit (*.net *.split).
21:19:03 -!- sebbu2 has quit (*.net *.split).
21:19:09 -!- sshc has quit (*.net *.split).
21:19:11 -!- myndzi has quit (*.net *.split).
21:19:15 -!- lifthrasiir has quit (*.net *.split).
21:19:18 -!- j-invariant has quit (*.net *.split).
21:19:26 -!- Ilari_antrcomp has quit (*.net *.split).
21:19:26 -!- Ilari has quit (*.net *.split).
21:19:37 -!- mycroftiv has quit (*.net *.split).
21:19:48 -!- Slereah has quit (*.net *.split).
21:19:56 -!- Phantom_Hoover_ has quit (*.net *.split).
21:19:59 -!- Sgeo has quit (*.net *.split).
21:20:02 -!- elliott has quit (*.net *.split).
21:20:05 -!- hagb4rd has quit (*.net *.split).
21:20:25 -!- olsner has quit (*.net *.split).
21:20:31 -!- Mathnerd314 has quit (*.net *.split).
21:20:44 -!- quintopia has quit (*.net *.split).
21:20:50 -!- Vorpal has quit (*.net *.split).
21:20:54 -!- Gregor has quit (*.net *.split).
21:23:02 -!- nooga has joined.
21:23:02 -!- Phantom_Hoover_ has joined.
21:23:02 -!- Sasha has joined.
21:23:02 -!- Sgeo has joined.
21:23:02 -!- j-invariant has joined.
21:23:02 -!- wareya has joined.
21:23:02 -!- elliott has joined.
21:23:02 -!- hagb4rd has joined.
21:23:02 -!- FireFly has joined.
21:23:02 -!- MigoMipo has joined.
21:23:02 -!- pingveno has joined.
21:23:02 -!- sebbu2 has joined.
21:23:02 -!- bsmntbombdood has joined.
21:23:02 -!- tswett has joined.
21:23:02 -!- Mathnerd314 has joined.
21:23:02 -!- quintopia has joined.
21:23:02 -!- rodgort has joined.
21:23:02 -!- Leonidas has joined.
21:23:02 -!- jix has joined.
21:23:02 -!- ineiros has joined.
21:23:02 -!- yiyus_ has joined.
21:23:02 -!- Slereah has joined.
21:23:02 -!- yiyus has joined.
21:23:02 -!- fxkr has joined.
21:23:02 -!- Ilari_antrcomp has joined.
21:23:02 -!- fungot has joined.
21:23:02 -!- Ilari has joined.
21:23:02 -!- fizzie has joined.
21:23:02 -!- Vorpal has joined.
21:23:02 -!- sshc has joined.
21:23:02 -!- lifthrasiir has joined.
21:23:02 -!- myndzi has joined.
21:23:02 -!- mycroftiv has joined.
21:23:02 -!- olsner has joined.
21:23:02 -!- Gregor has joined.
21:24:04 <fizzie> elliott: I like it, it prevents me from leaving any warnings around.
21:24:05 <Sgeo> Dear clog: I love you forever. Please don't die again.
21:24:07 -!- Gracenotes has quit (Ping timeout: 240 seconds).
21:24:38 -!- pikhq has quit (Excess Flood).
21:25:01 -!- pikhq has joined.
21:27:37 -!- oerjan has joined.
21:29:00 <elliott> fizzie: So how do you feel about the wonderful wonderful GPLv2?
21:32:57 <fizzie> I don't feel very strongly about licenses, as long as they are something sensible. GLfunge is GPLv2, I think.
21:32:59 <elliott> fizzie: Oh, I'll just bundle https://github.com/antirez/linenoise for simplicity. It can probably do the same things as this.
21:33:05 <elliott> (editline sucks ass, it turns out.)
21:35:00 <fizzie> I'm not sure I'd go to the trouble of bloating that thing with a real line-editing library (even one that says "20k lines of code" as if twenty whole thousand lines is somehow small), but then again, I'm not the one doing it.
21:35:22 <fizzie> The line-editing will be something like ten times the size of mcmap itself, though.
21:35:32 <fizzie> wc -l *.c *.h => 2433.
21:35:52 <elliott> fizzie:
21:35:52 <elliott> * line editing lib needs to be 20,000 lines of C code.
21:35:53 <elliott> erm
21:35:55 <elliott> /* linenoise.h -- guerrilla line editing library against the idea that a
21:35:56 <elliott> * line editing lib needs to be 20,000 lines of C code.
21:36:04 <elliott> fizzie: It's just from the guy who made Redis; I found it when googlign.
21:36:05 <elliott> *googling.
21:36:10 <elliott> fizzie: There's a good chance it does what editline doesn't.
21:36:15 <elliott> So, *shrug*.
21:36:25 <elliott> Although it is actually 21k lines. :p
21:36:36 <elliott> fizzie: But anyway, you're "meant" to just include it in your program.
21:36:38 <elliott> (And hey, Android uses it.)
21:36:41 <fizzie> Okay, it is a bit more reasonably sized.
21:37:36 <elliott> fizzie: What, 21k is more reasonable than 20k?
21:38:10 <elliott> fizzie: You can just place leaves like that?
21:38:13 <elliott> fizzie: Dude, let us place bedrock.
21:38:22 <fizzie> I'd rather you didn't.
21:38:32 <fizzie> Since it's not possible to actually get rid of it.
21:38:48 <elliott> fizzie: You - so boring.
21:39:56 <ais523> hmm, I'm planning to put unobtanium in one of my computer games
21:40:06 <ais523> the theory being that it's completely indestructable or movable by any means whatsoever
21:40:07 <fizzie> If I'm looking at the right https://github.com/antirez/linenoise then linenoise.c is 599 lines (544 sloc), and linenoise.h is 56 lines (50 sloc); so if there isn't a lot more code hidden somewhere, it does look more reasonably-sized.
21:40:21 <elliott> Oh, indeed, it is. I wonder how I miscounted.
21:40:21 <ais523> thus, it's completely useless; it has a bunch of highly useful properties, but there's no way to actually obtain the stuff to use it yourself
21:40:27 <elliott> ais523: that's bedrock :P
21:40:44 <elliott> ais523: (bedrock is useful because you can build indestructable buildings out of it; so making it non-unobtainium would make it uselessium)
21:40:50 <ais523> yep, I thought there might be an equivalent
21:40:53 <elliott> fizzie: Can I replace mcmap with a shell script that starts mcmap.real under ledit? :p
21:40:55 <ais523> *it might be an equivalent
21:41:06 <fizzie> You can do that at home.
21:41:12 <ais523> it's just that unobtainum is a hilarious name for it, as it's normally used as a placeholder name for incredibly valuable fictional materials
21:41:15 <elliott> Right, but not in polite company.
21:41:31 <elliott> fizzie: I'd use ncurses, but that would screw up >file.
21:42:40 <elliott> fizzie: I think I'll try the actual readline.
21:42:48 <elliott> And TAINT THE CODE.
21:44:33 <augur> elliott!
21:44:34 <fizzie> If you *want*, you could add some #ifdefs that let the taint-fearing user disable that bit.
21:44:40 * augur taints elliott's code
21:44:52 <elliott> fizzie: It is the FSF's considered opinion that that does not prevent the STD from spreading.
21:44:59 <elliott> Unfortunately, they are probably right.
21:46:27 <Phantom_Hoover_> elliott, the whole clisp thing is rather more complex than "he made it readline-compatible".
21:46:40 <fizzie> Well, you could create a fork in github. (Though would a person then be allowed to contribute same code to both projects?)
21:46:45 <elliott> Phantom_Hoover_: I know how complex it is.
21:46:48 <Sgeo> taint, as in, forced to use GPL?
21:47:09 <elliott> fizzie: I think I might just include readline and force you to GPL it, because it, unlike all the other libraries, does not mess up when other input comes along.
21:47:34 <elliott> fizzie: (Perhaps one day someone will write a better line-reader and we can round up all 2 contributors to get them to agree to a license change.)
21:47:36 <elliott> :p
21:48:03 <fizzie> Well, if you make it work with readline, that's all right for me.
21:52:20 <elliott> Ooh, silly-todo: Option to rl_ding() when someone mentions your name. :-)
21:52:56 -!- BRASIL has joined.
21:53:28 <Phantom_Hoover_> BRASIL
21:55:07 <oerjan> SAMBA!
21:55:29 <hagb4rd> olé
21:57:12 <Deewiant> elliott: Is rlwrap or equivalent not an option
21:57:14 * oerjan vaguely suspects hagb4rd of confusing spanish and portuguese
21:57:32 <elliott> Deewiant: Sort of, but it's nicer to have it directly in there (and fizzie won't let me turn mcmap into a shell script.)
21:57:43 <fizzie> But you can do that at home already!
21:57:56 <Deewiant> I'd just let people turn it into a shell script
21:58:09 <fizzie> Or make your own startup script start mcmap within some sort of readline-wrapper and minecraft.
21:58:30 <fizzie> I just don't want the "main" branch to require some arbitrary readline-wrappers to run.
21:58:54 <elliott> fizzie: Right. Thus building it in :P
21:59:01 <Deewiant> You don't need to require it
21:59:13 <elliott> Anyway I'd have to do, like, 99% of the work anyway if I was using fread etc.
21:59:15 <Deewiant> Make a script that checks for the existence of rlwrap/whatever in some preferred order and picks the first it finds
21:59:19 <elliott> In fact more, since readline() handles allocation for me.
21:59:21 <elliott> So nyah.
22:01:47 * oerjan does a whois and now vaguely suspects hagb4rd of being a native spanish speaker
22:02:04 <hagb4rd> nope.. right you are
22:02:49 -!- BRASIL has left (?).
22:03:57 <fizzie> elliott: Or you could use glib's "read a line with automagic allocations" function, and the wrapper you prefer.
22:04:20 <elliott> fizzie: "I'm fizzie look at me I'm fizzie." SORRY FIZZIE I'VE ALREADY WRITTEN THE READLINE CODE AND JUST NEED TO HANDLE SIGNALS
22:04:20 <Deewiant> elliott: You could use glib!
22:04:22 <fizzie> (But I don't mind the readline dependency either, so whatever makes you happy.)
22:04:24 <elliott> I wish it didn't have to be this way.
22:04:29 <elliott> But it is.
22:04:32 <elliott> Deewiant: Yeah, using glib is ALWAYS fun
22:04:45 <hagb4rd> i'd like to learn more languages.. i love spanish, and as far as i know at least written are spanish and port. very similar
22:04:47 <fizzie> "Just need to handle signals" doesn't sound very nice either.
22:06:13 <hagb4rd> but it sounds very differently @oerjan
22:06:31 <oerjan> hagb4rd: yeah it's just that i think olé is very stereotypically just spanish. however i _did_ have to look it up to check it isn't in portuguese :D
22:06:37 <elliott> <fizzie> "Just need to handle signals" doesn't sound very nice either.
22:06:43 <elliott> fizzie: readline is /meant/ to do it, it just isn't doing it properly :D
22:06:50 <Deewiant> editline?
22:07:10 <fizzie> I hope you're not sullying my oh-so-pristine utility with ugly and hacky workarounds.
22:07:18 <oerjan> <- doesn't _actually_ know either of them
22:08:16 <elliott> fizzie: Absolutely not!
22:08:23 <elliott> Deewiant: Editline fucks up when someone else talks.
22:08:24 <elliott> Long story.
22:08:34 <elliott> Also it didn't handle signals either, so shut up and let me fix this bug :P
22:10:21 <elliott> 22:09:41 [DIED] main.c:81: proxy thread (server -> client) write failed
22:10:27 <elliott> fizzie: That... should that happen?
22:10:35 <elliott> char *line = readline("> ");
22:10:35 <elliott> inject_to_server(packet_new(PACKET_TO_ANY, PACKET_CHAT, line));
22:10:35 <elliott> free(line);
22:10:55 <fizzie> Well, it happens if you get disconnected for any reason.
22:14:14 <elliott> fizzie: Oh -- it was "Chat message too long."
22:14:16 <elliott> fizzie: What's the max length?
22:14:29 <fizzie> About a hundred bytes.
22:14:44 <fizzie> 103 or something, IIRC.
22:15:17 <fizzie> Possibly s/bytes/characters, not entirely sure on that.
22:15:38 <fizzie> (It needs to be in UTF-8.)
22:16:05 <elliott> > /playerlist
22:16:05 <elliott> 22:15:22 [CHAT] Player list (1/10): ehird
22:16:08 <elliott> fizzie: Booyah.
22:16:18 <elliott> Now just a bit of signal-handling and WE'RE DONE
22:16:35 <elliott> OK, so it also segfaults on ^D despite resetting the terminal correctly; I've no idea why.
22:16:49 <fizzie> /who is an alias for that.
22:16:56 <elliott> Oh, it is? Thanks.
22:17:14 <hagb4rd> do you guys like electro music?.. in case you
22:17:22 <elliott> fizzie: It's probably thread-related issues, I bet.
22:17:30 <hagb4rd> aer in need of a little distraction --> http://www.youtube.com/watch?v=3qCFSYAgbAI&list=PL408EDD9348488A28&index=33&playnext=5&fmt=18
22:17:43 <hagb4rd> in case ..sry
22:18:07 <elliott> fizzie: Heh, //coords doesn't work on the console for obvious reasons.
22:18:13 <elliott> fizzie: Nor //goto. But "whatever", I say.
22:18:23 <elliott> fizzie: (Unless you have a generic send_chat_to_server_maybe function somewhere?)
22:19:21 <fizzie> No, I don't. You could check for // and call cmd_parse instead of inject_to_server if you like.
22:19:53 * oerjan wonders why you double /'s in minecraft...
22:20:05 <fizzie> The interface for cmd_parse is a bit strange, it'd be something like cmd_parse(line+2, strlen(line)-2);
22:20:12 <elliott> oerjan: you don't, it's mcmap's command syntax
22:20:18 <oerjan> ah
22:20:21 <elliott> oerjan: since /foo are server commands, we decided to play it safe
22:20:31 <elliott> oerjan: (since we intercept the chat packets)
22:20:38 <oerjan> makes sense
22:21:07 <fizzie> As long as the server doesn't start to implement any // commands.
22:21:28 <elliott> fizzie: I am happy to slit Notch's throat in that case.
22:22:19 -!- MigoMipo has quit (Read error: Connection reset by peer).
22:24:46 <elliott> Function: void rl_free (void *mem)
22:24:46 <elliott> Deallocate the memory pointed to by mem. mem must have been allocated by malloc.
22:24:47 <elliott> Useful!
22:29:13 <elliott> fizzie: Does glib have any special signal-handler functions?
22:32:42 <fizzie> I don't recall having used any.
22:34:45 <fizzie> The underlying threads are pthreads (at least that'd be my assumption), and those have signal masks if you want to mess with which thread handles signals, but I'm not sure if glib's threading side exposes that.
22:34:55 <fizzie> It's a bit platform-specific weirdness.
22:35:06 <fizzie> Signals and threads don't tend to be a happy combination.
22:36:26 -!- zeotrope has joined.
22:37:53 <elliott> fizzie: Yeah ... I just want these signal handlers to execute, in, like, "every thread".
22:39:43 <fizzie> As far as I know, you can't do *that* in a plain pthreads thing. With luck you can just make sure it executes in one particular thread.
22:40:16 <elliott> fizzie: So "just do the readline in another thread" was your way of saying "ha ha". :p
22:40:38 <fizzie> I didn't really know readline dabbles with signals.
22:41:17 <fizzie> In retrospect I guess it has to for the terminal-caused ones, but anyhow.
22:41:18 <elliott> Function: int rl_set_signals (void)
22:41:19 <elliott> Install Readline's signal handler for SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, SIGTTOU, and SIGWINCH, depending on the values of rl_catch_signals and rl_catch_sigwinch.
22:41:23 <elliott> fizzie: How else do you think it resets the terminal?
22:41:26 <elliott> I suppose I could use an atexit...
22:42:07 -!- nooga has quit (Ping timeout: 265 seconds).
22:42:19 -!- Sgeo_ has joined.
22:42:44 <elliott> An alternate interface is available to plain readline(). Some applications need to interleave keyboard I/O with file, device, or window system I/O, typically by using a main loop to select() on various file descriptors. To accomodate this need, readline can also be invoked as a callback' function from an event loop. There are functions available to make this easy.
22:42:48 <elliott> fizzie: WHY DIDN'T YOU SAY SO
22:43:02 -!- Sgeo has quit (Ping timeout: 240 seconds).
22:43:29 -!- nooga has joined.
22:44:05 <elliott> Probably not.
22:44:07 <fizzie> Given that you can'd do "wait for SDL events" and "select() on a fd" simultaneously.
22:44:48 <fizzie> Also, I think I'll be sleeping now.
22:46:35 <fizzie> I think hooking to atexit is where SDL does it's emergency cleanup too.
22:46:51 <fizzie> Though actually I'm not quite sure.
22:47:48 <fizzie> It might also install signal handlers of its own, because if the SDL_Init is before the blockinmg "wait-for-connections" call, you can't interrupt it with ^C any more.
22:49:39 <fizzie> Are you entirely sure you don't want to do the input-line handlinmg cleanly in another process?-)
22:49:50 <elliott> fizzie: Was that your lag or mine?
22:50:06 <fizzie> Which lag?
22:50:45 <elliott> fizzie: Tons of messages came in at once.
22:50:52 <elliott> Seems 'twas mine.
22:50:58 <fizzie> Could even have been freenode's
22:51:57 <elliott> fizzie: Dude.
22:52:04 <elliott> fizzie: That is the first time you have ever not terminated a sentence properly.
22:53:18 <oerjan> SURELY WE ARE IN THE END TIMES
22:54:16 <fizzie> I tried my very best, but my fingers betrayed me.
22:54:54 <elliott> fizzie: Do you guys not have heating in Finland?
22:55:19 <fizzie> Technically I'm already asleep, so I'll just blame the dream-fizzie.
22:55:53 <Phantom_Hoover_> elliott, I don't have heating in Scotland!
22:55:54 <fizzie> And no, we just cuddle with polar bears when it gets too cold.
22:56:16 <elliott> fizzie: AWWWWWbrb moving to Finland
23:04:03 * Sgeo_ growls at being unable to block blocks of IPs larger than /16 in MediaWiki
23:04:41 * Sgeo_ wants to block a /0 block
23:05:50 <elliott> Sgeo_: Um, you do realise you mean a /1, right?
23:06:12 <Sgeo_> Does /1 include every single IP address?
23:06:33 <elliott> Sgeo_: It's 1/1 of the address space, so you work it out.
23:07:51 <Sgeo_> http://www.mediawiki.org/wiki/Help:Range_blocks
23:07:59 <Sgeo_> That suggests that /1 is half of the address space
23:08:17 <Sgeo_> Wait, do IPs greater than 127. exist?
23:08:24 <Sgeo_> Yes they do
23:08:26 <oerjan> ELLIOTT IS TEH WRONG
23:08:42 <elliott> Oh, indeed ...
23:08:59 <elliott> Sgeo_: Anyway, it's not "a" /0 block, it's "the" /0 block.
23:11:04 * Sgeo_ WTFs at a spambot talking about a "lethal dose"
23:11:10 <Sgeo_> Way to bring in the customers there
23:11:30 <oerjan> lethal dose of spam
23:15:08 <elliott> oerjan: Read as sperm. What.
23:15:11 <Sgeo_> http://wikisuperosity.com/index.php?title=Special:RecentChanges
23:15:18 <olsner> "Disclaimer: [it's slow], because it's written in python. Eventually I'll rewrite it an C and it'll be very, very fast."
23:15:27 <elliott> olsner: haha
23:15:33 <elliott> olsner: what's that about
23:15:49 <oerjan> elliott: your brain actually managed to invent something worse than a lethal dose of spam. congratulations.
23:15:56 <olsner> elliott: about that "redo" thing someone posted on progit (make killer)
23:16:06 <elliott> [[Superosity is the greatest comic in existence. There are many comics in existence that have earned genius-level Comic Quotient's (CQ) for short periods of time. Calvin and Hobbes demonstrated that a CQ of 145 was possible by combining beautiful artwork, kinetic humor, and philosophically balanced characters with a semi-episodic story structure. Jim Davis, the creator of Garfield, once earned a CQ of 136 for a six month period in the late 1980s
23:16:06 <elliott> and has consistently held himself in the mid 120's by applying a consistently minimalistic banality. Scott Adams, creator of Dilbert, holds the honor of maintaining 128 for more than six years in a row. Family Circus, on the other hand, continues to exist in syndication despite a CQ below 80.
23:16:06 <elliott> Superosity however, holds the distinction of having achieved an average CQ of 193 over the last ten years. This places it approximately five and a half standard deviations away from the average mainstream comic. This singular fact would appear to be mysterious if not for the concomitant fact that creator Chris Crosby is truly a creative genius of the type that Greek Myths would be written about (and by) if this were presently a Greek World.]]
23:16:13 <elliott> Sgeo_: Why does this wiki exist, and how can I stop it existing.
23:16:32 <elliott> olsner: oh, it's chris2's!
23:17:45 <Sgeo_> elliott, wait, you found genuine content that wasn't touched?
23:17:54 <elliott> Sgeo_: That is not genuine content, that is a pile of shit.
23:18:03 <elliott> fizzie: [[mcmap: ../../src/xcb_io.c:249: process_responses: Assertion (((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed.]]
23:18:09 <elliott> fizzie: I AM TOTALLY CLOSE TO WORKING THIS OUT
23:18:24 <olsner> elliott: who's that?
23:18:41 <elliott> olsner: he invented tumblelogs and did a bunch of other things too
23:18:46 <elliott> (w/ http://anarchaia.org/)
23:19:13 <elliott> olsner: oh -- he did not write the program
23:19:15 <elliott> just posted the reddit link
23:19:20 -!- Phantom_Hoover_ has quit (Remote host closed the connection).
23:20:20 * Sgeo_ ponders making a Python script that will autoblock every IP
23:20:52 <elliott> Sgeo_: You could just disable editing.
23:20:55 <elliott> Or protect every page.
23:21:21 <Sgeo_> elliott, I think I'd need access to server-side config stuff to disable editing?
23:21:36 <elliott> Vorpal: fizzie: https://github.com/fis/mcmap; now with chatting support. (I accidentally called it readline in the commit message, oh well.)
23:21:51 <elliott> Vorpal: Doesn't handle // commands because of internal structure, but it's fully readline-enabled.
23:22:02 <elliott> I think that redirecting output to a file now doesn't work for some reason, however; I'll fix it later.
23:22:11 <elliott> Sgeo_: Probably. If the rest of the pages are like that then spam is an improvement.
23:22:47 -!- j-invariant has quit (Quit: leaving).
23:25:24 <Sgeo_> elliott, genuine content:
23:25:26 <Sgeo_> http://wikisuperosity.com/index.php?title=List_of_Superosity_Characters
23:26:54 <Sgeo_> Even more: http://wikisuperosity.com/index.php?title=Boardy
23:32:16 <Sgeo_> You can never accuse me of not having esoteric taste
23:32:27 <Sgeo_> Hmm, eccentric might be a better word
23:34:57 <fizzie> elliott: I'm pleasantly surprised at how small the commit is. I was expecting something quite a lot more horrible. (Yes, yes, I'm still asleep.)
23:35:12 <elliott> fizzie: Yes, well, they do call me the God Of Code.
23:35:24 <elliott> fizzie: (Really, though, the only bug was ^D and ^C handling, which required thought more than anything else.)
23:35:49 <elliott> fizzie: (Readline thankfully does the right thing if you \r before printing, \n after, and then force it to redraw the line.)
23:36:07 <elliott> fizzie: Re: redirecting to a file -- but now it has industry-standard timestamping!
23:36:46 <elliott> fizzie: BTW, hypothetically, it might be nice if snow-covered things just got tinted.
23:36:52 <elliott> fizzie: Rather than, you know, becoming invisible in a sea of snow.
23:37:12 <fizzie> elliott: It doesn't quite do completely the right thing.
23:37:23 <fizzie> If you write an input line that's longer than the offending input, the trailing bits are left.
23:37:48 <fizzie> You probably need a \r<clear-to-end-of-line>[new output]\n instead of just \r[new output]\n.
23:38:06 <elliott> fizzie: Very well then. (I should probably get a global set up for is_doing_readline_stuff to separate all this out.)
23:38:12 <fizzie> 01:23:21 [CHAT] Player list (2/10): ehird, fizziefjoi jojoi joi jjoisdfjoisdaof josadf joasdf joosajifd
23:38:12 <fizzie> 01:23:35 [CHAT] <ehird> Hello there, asleep-ghost.joi jojoi joi jjoisdfjoisdaof josadf joasdf joosajifd
23:38:15 <elliott> fizzie: (And also that'd let you disable readline at compile time, for all the embedded system uses.
23:38:22 <elliott> uses.)
23:38:24 <elliott> *uses.)
23:38:37 <elliott> fizzie: Vorpal apparently runs mcmap on another machine to the one he connects on for no apparent reason.
23:38:45 <elliott> fizzie: Perhaps we should OPTOMIZE(tm) for LATENCY.
23:38:48 <fizzie> I thought he had quasi-sensible reasons.
23:39:01 <elliott> fizzie: "Um, uh, RAM something this, full screen that."
23:39:01 <fizzie> Anyway, it tries to be low-latency, though not very hard.
23:39:20 <elliott> fizzie: It seems that he has a machine with not much RAM and a good GPU, and lots of RAM and a crap GPU.
23:39:22 <fizzie> Mainly what it does is "forward the packet immediately after reading it".
23:39:23 <elliott> One may speculate freely.
23:39:43 <elliott> fizzie: Tomorrow, I might see about saving the map state to a file.
23:40:07 <fizzie> Anyway re clean-end-of-line, I don't mind if you just do \x1b[K instead of actually using the proper sequences from terminfo.
23:40:08 <elliott> Also giving reeds a colour. They need one.
23:40:12 <elliott> fizzie: Oh, of course.
23:40:20 <fizzie> Given that it already does colors with hardcoded escapes.
23:40:26 <elliott> I was thinking printing spaces or something; I'm kinda dumb.
23:40:30 <Sgeo_> Wow, the meds are really helping me focus on anything but homework
23:42:38 <oerjan> Sgeo_: *facepalm*
23:44:11 <fizzie> At some point you could add auto-wrapping (maybe even try it dumbly at spaces/hyphens when it looks okay) to forcibly conform the 100-char limit. Just in case one pastes in something and forgets to think about it.
23:44:17 <fizzie> But now really honestly gone.
23:44:20 -!- reiffert has left (?).
23:45:24 -!- FireFly has quit (Quit: swatted to death).
23:48:09 <elliott> oerjan: I think you should ban Sgeo_.
23:48:22 <elliott> oerjan: his request was, after all, in spirit eternal: if I give in to the temptation to IRC instead of homeworking, ban me.
23:48:25 <elliott> therefore you must
23:48:45 <Sgeo_> elliott, why do you hate me so>
23:48:46 <Sgeo_> ?
23:48:56 <elliott> I hate everyone equally.
23:48:59 <elliott> You just get special treatment.
23:50:08 -!- hagb4rd has quit (Quit: hagb4rd).
23:52:36 <Sgeo_> elliott, what do you think of BitCoins?
23:53:11 -!- cheater99 has joined.
23:56:58 -!- cheater99 has quit (Read error: Connection reset by peer).
←2010-12-18 2010-12-19 2010-12-20→ ↑2010 ↑all