code logs -> 2012 -> Tue, 17 Jan 2012< code.20120116.log - code.20120118.log >
--- Log opened Tue Jan 17 00:00:34 2012
00:29 eckse [eckse@Nightstar-182953fa.dsl.sentex.ca] has joined #code
00:49 SchoolPhox [8e684915@Nightstar-36f67fd0.mibbit.com] has quit [[NS] Quit: http://www.mibbit.com ajax IRC Client]
01:05
< maoranma>
I should get some custom in-ear monitors, with some really good SNR
01:06 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
01:41 McMartin [mcmartin@Nightstar-165d100a.pltn13.sbcglobal.net] has quit [[NS] Quit: updates]
01:44 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
02:06
<@Alek>
in-ear monitors?
02:06
<@Alek>
SNR?
02:06<~Vornicus> in-ear monitors: headphones of a particular type
02:06
< gnolam>
Signal to Noise Ratio.
02:06<~Vornicus> SNR: signal to noise ratio.
02:11
<@Alek>
mk
02:15 McMartin [mcmartin@Nightstar-165d100a.pltn13.sbcglobal.net] has joined #code
02:15 mode/#code [+ao McMartin McMartin] by ChanServ
02:16 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:18
< maoranma>
Actually, I meant single number rating
02:19
< maoranma>
For sound reduction of ambient noise
02:20
< maoranma>
I'm never sure which rating to use
02:21 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Ping timeout: 121 seconds]
03:01
< Rhamphoryncus>
Since a friend inflicted this video on me I'm now going to inflict it on the rest of you: http://www.youtube.com/watch?v=6Cf7IL_eZ38&hd=1
03:01
< Rhamphoryncus>
No, it's not a rickroll. It's a Corning glass PR video.
03:07 Kindamoody[zZz] is now known as Kindamoody
03:08 * Vornicus finds himself defining a class for piecewise function.
03:10 * Vornicus has never quite gotten this far in defining algebra in code before. This is getting kind of hairy.
03:11<~Vornicus> Well, more than kind of. Again I find myself wishing for static typing and signature dispatch.
03:11<&McMartin> wooo haskell/ML
03:12<&McMartin> (Seriously, dispatch mechanics are three-quarters of the reason half my hobby programmign is in one of those two languages)
03:13<~Vornicus> cuz now I'm trying to multiply a polynomial by a piecewise function, and then later I'll have to add two piecewise functions, and I've got numbers floating around in there too...
03:15<~Vornicus> Aaaand then later I need to multiply a whole bunch of piecewise functions by numbers, and then add all those up, and THEN I get to do calculus!
03:16
<@himi>
What language are you using?
03:16<~Vornicus> Python.
03:17<~Vornicus> (because the rest of the code is python.)
03:19
<@himi>
I guess that would make it hard to do this bit in ML
03:20<~Vornicus> A smidge.
03:20<&McMartin> Also, I still haven't found a good ML95 compiler
03:20<&McMartin> OCaml is the best ML compiler but it's the vastly inferior ML90 dialect
03:20
<@himi>
The SML compiler isn't good?
03:21
<@himi>
I thought there were a number of SML compilers that had caught up with or exceeded the OCaml compiler
03:22<&McMartin> Hm
03:22<&McMartin> That would be nice
03:23<&McMartin> I found when working with SML/NJ that the compilers were all very tied to inconvenient overhead, and I couldn't make binaries that could be easily redistroed
03:23
<@himi>
Hm
03:23<&McMartin> But I last looked in probably like 2004
03:23
<@himi>
No native code generation? Or they all relied on an extra library?
03:24<&McMartin> The former, for the ones I was looking at
03:24<&McMartin> Also, not very good FFIs so binding in fun stuff was hard to do.
03:24<~Vornicus> But now I've got like three extra types floating around, and they have all these detailed connections with other types, many of which are predefined, and then I kind of want to be able to turn certain kinds of things into others (Intervals are really sets and should produce same in some cases; Polynomials act like PiecewiseFunctions with only one piece, and on the other side Numbers are Polynomials)
03:24<&McMartin> I should probably re-look at it; as a basic language system, SML95 is damn close to my idea of an ideal language
03:25
<@himi>
How does SML95 differ from OCaml?
03:25
<@himi>
Well, from the non-objective bits of OCaml
03:26<&McMartin> himi: The syntax is almost entirely different.
03:26<&McMartin> The biggest thing OCaml lacks is the argument-dispatch syntax
03:27<&McMartin> You have to structure that like a switch statement, which is horrendously clunky
03:27<&McMartin> http://en.wikipedia.org/wiki/Standard_ML
03:27<&McMartin> Look at the two factorial definitions near the top; OCaml only supports the case-statement version, and it does other minor but annoying things like double-semicolon-to-end-statement.
03:28<&McMartin> The case statement version isn't so bad as written but once you start matching on multiple arguments if you want to do it without marshalling and remarshalling your arguments all the time it's *extremely* unwieldy
03:29<&McMartin> ML's algebraic datatypes, however, are something that has become idiomatic for me in C
03:29<&McMartin> Which marks my code rather significantly ;-)
03:30<&McMartin> Hmm. MLton was in its infancy when I last looked at it
03:30<&McMartin> This is Promising (tm)
03:33<&McMartin> Poly/ML also looks *extremely* promising
03:34<&McMartin> It has a pretty good-looking FFI
03:35
<@himi>
God, I've just realised how long it is since I touched any ML code
03:36
<@himi>
But yeah, I can see how that has advantages over OCaml
03:37<&McMartin> ML97 (not 95, sorry) is basically everything I like in Scheme along with about 90% of what I like in Haskell.
03:37<&McMartin> And polyml is in Fedora's core repos! \o/
03:38<&McMartin> OH RIGHT
03:38<&McMartin> That's the other thing about ML90 that is made of sadness
03:38<&McMartin> In OCaml, "2.5 + 3.7" is illegal, because "+" only works on ints.
03:38<&McMartin> In ML97, math operations are overloaded to work right as long as both args are int or both are real, so there's none of this "+." bullshit.
03:38<~Vornicus> whut
03:39
<@himi>
Yeah, I know /why/ that's the case, but it's a deep pain in the arse
03:39<&McMartin> Yeah, so, They Fixed That (tm).
03:39 * himi nods
03:39<&McMartin> But OCaml didn't take the patch, as it were
03:39
<@himi>
I think they'd already optimised things internally to the point where it was a bit too much of an issue to make that sort of change
03:40<&McMartin> Right
03:40
<@himi>
One disadvantage of being as sophisticated as they were back in the day
03:40<&McMartin> This is why I never used it as my casual repl the way I did Python or Haskell
03:40<&McMartin> The one thing I like that ML97 lacks is list comprehensions, and even there I might just be forgetting about 'em
03:41<&McMartin> On the other hand, anyone who's seen me when I get list comprehensions in my head probably is JUST FINE WITH ME NOT GETTING TO HAVE THEM.
03:41
<@himi>
heh
03:42 * Vornicus has made some epileptic fits in listcomps too.
03:42
<@himi>
Ooh, one of the features they list for MLton is that it can handle compiling /itself/
03:43<&McMartin> SML/NJ and OCaml both do that too, of course.
03:43<&McMartin> ML is intrinsically *really, really good* at writing compilers.
03:43<&McMartin> Since it started out as a theorem-prover languaeg.
03:43
<@himi>
Yeah, I was thinking something along the lines of 'damming yourself with faint praise' as far as serious compilers go
03:43<&McMartin> *language
03:44<&McMartin> Aha
03:44<&McMartin> PolyML apparently became a thing about a year after I gave up on ML~
03:49
<@himi>
Hey, have you run into a language/environment called Clojure?
03:49<&McMartin> I recognize the name but nothing else.
03:50
<@Namegduf>
Lisp on JVM?
03:50
<@Namegduf>
Or a Lisp-like?
03:50
<@Namegduf>
I remember because I was explicitly told when learning Lisp I was not allowed to pick that one.
03:50
<@himi>
Lisp variant on the JVM
03:50<~Vornicus> I heard of it, the name reminds me of http://en.wikipedia.org/wiki/Lejendary_Adventure
03:51 * himi was randomly looking through the Android app store and ran across an app implementing it on top of Davlik(sp?)
03:53<&McMartin> Dalvik
03:53<&McMartin> Namegduf: Gambit was pretty neat, Racket seems to be the one with All The Shinies though
03:53<&McMartin> Hm
03:54<&McMartin> Looks like actually the last bit of ML work I did was in 2007
03:54<&McMartin> I wonder how hard it would be to port it to MLton or Poly/ML
03:54<&McMartin> It's a Java classfile disassembler.
04:21<&McMartin> Also, woo
04:21 * McMartin still has his primer for SML97.
04:23<&McMartin> Also also, I see SDL bindings for MLton at least, which is my usual bar for "usable FFI"
04:23<&McMartin> And looking at Poly/ML's I can see how I could use the FFI to embed Lua
04:42 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
04:46 * ToxicFrog upreads
04:46
<@ToxicFrog>
Vornicus: time to learn Scala~
04:48
<@ToxicFrog>
(I realize this helps not at all with your current problem)
05:03 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
06:01 Janus [NSwebIRC@Nightstar-27138e8c.res.rr.com] has joined #code
06:04
< Janus>
aaaa how do time do?
06:08 * Janus is trying to make guages. That go up and down at a certain rate. That's easy. Then you throw in the milliseconds and everything explodes into time range checks and bah.
06:09
<@ToxicFrog>
parse error
06:12
< Janus>
Sorry. I am just fuming at the passage of time. It's actually kind of sad that I only now encountered it as a problem.
06:12
<@ToxicFrog>
I can't even figure out what you're trying to do or what problem you're having
06:13
< Janus>
Oh! Um! Let me rewind. (if time will let me)
06:16
< Janus>
If you have a number that is supposed to change from 2 to 5, over the coarse of 500 to 1000 milliseconds, how do... you... do ... ... *facedesk* Apparently, all I have to do is type it like that, and it becomes pretty obvious.
06:16
< Janus>
I guess... um. I just gotta do something that does that! Thanks!
06:17 * Janus barges out just as abruptly as he barged in. Leaves a huge mess in his wake
06:19 Kindamoody is now known as Kindamoody|out
06:27
<@ToxicFrog>
Ok then.
06:28
<@ToxicFrog>
(the general answer is "divide the total change in value by the time it's meant to happen over to get the rate of change, then adjust the value by (rate of change * dt) each timeslice")
06:37 Derakon is now known as Derakon[AFK]
06:42 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
07:06
<@ToxicFrog>
I have a wholly inexplicable urge to write a 2d version of KSP.
07:13 Kazriko [kazrikna@4CA975.462904.08E9A2.992A2D] has quit [Ping timeout: 121 seconds]
07:18 You're now known as TheWatcher
07:19 * jerith constructs Dutch translations to use in some tests.
07:22<&McMartin> That's pretty inexplicable all right
07:23
<@jerith>
I'm testing a thing for selecting a message variant.
07:25<&McMartin> That was actually at TF, but~
07:26
<@ToxicFrog>
McMartin: especially since by the time I get it anywhere near where KSP is now, KSP .14 (at least) will be out, with support for multiple simultaneous missions etc
07:26
<@jerith>
In the real world, this will probably be used to choose between replies suitable for SMS or HTTP or whatever.
07:26 eckse_ [eckse@Nightstar-58f66728.dsl.sentex.ca] has joined #code
07:27
<@jerith>
But for now I'm pleased with being able to be slightly rude about the Englishers in my alternate message set.
07:28
<@ToxicFrog>
(in related news, I am so stocked for KSP.14)
07:28
<@ToxicFrog>
(especially since stuff like space station connection modules are now possible)
07:30 eckse [eckse@Nightstar-182953fa.dsl.sentex.ca] has quit [Ping timeout: 121 seconds]
07:31 * TheWatcher eyes the .14 featues
07:31
<@TheWatcher>
... I guess I should probably pony up the cash for the preorder, then.
07:35 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
07:35
<@ToxicFrog>
I don't know if it's still $7 or if it's gone up to $10 now.
07:35
<@ToxicFrog>
But yeah.
07:36
< gnolam>
KSP?
07:40
<@ToxicFrog>
Yes.
07:43 Kazriko [kazrikna@4CA975.462904.08E9A2.992A2D] has joined #code
07:53 eckse_ [eckse@Nightstar-58f66728.dsl.sentex.ca] has quit [Client closed the connection]
07:53 eckse [eckse@Nightstar-58f66728.dsl.sentex.ca] has joined #code
07:55
<@TheWatcher>
TF: looks like it's $10
07:55
<@ToxicFrog>
Welp.
07:55
<@ToxicFrog>
It was $7 last week.
07:56
<@ToxicFrog>
I figure I've easily gotten $7 worth of entertainment just out of the free version, so
07:57 * Rhamphoryncus ponders the fairness of referring to a non-tail-recursive factorial function as "wrong" or "buggy"
07:59
< Rhamphoryncus>
It's tolerable for factorial in particular, but functions in general? It's non-scalable when a trivially scalable variant exists that's almost as easy to write (and just as easy in other languages)
08:01<&McMartin> Stoked, incidentally, not stocked.
08:01<&McMartin> Like a coal furnace.
08:04 You're now known as TheWatcher[afk]
08:09
<@ToxicFrog>
Yes, it was a typo
08:09 eckse [eckse@Nightstar-58f66728.dsl.sentex.ca] has quit [Connection reset by peer]
08:34
< gnolam>
http://www.phdcomics.com/comics.php?f=1461
09:11 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
09:32
< maoranma>
Uhg, I just expanded (x-5y)^7 by hand using Pascal's Triangle
09:35<&McMartin> Ow
09:39 Kazriko [kazrikna@4CA975.462904.08E9A2.992A2D] has quit [Ping timeout: 121 seconds]
09:39<&McMartin> Rhamphoryncus: Generally speaking, the goal is to *teach the concept of recursion* there.
09:40<&McMartin> It isn't actually a natural one.
09:40
< Rhamphoryncus>
Teaching it, with only an aside about it being wrong?
09:47 Kazriko [kazrikna@4CA975.462904.08E9A2.992A2D] has joined #code
10:02 gnolaptop [lenin@Nightstar-977d8364.eduroam.liu.se] has joined #code
10:05
< gnolaptop>
Explain to me why Thunderbird defaults to displaying e-mail folders with the scrollbars at the top, but with the mails sorted in ascending date order.
10:07
< gnolaptop>
(Mozilla. Making a mockery of usability since 2008.)
10:07
<@jerith>
gnolaptop: Because Thunderbird.
10:12 You're now known as TheWatcher
10:22 Janus [NSwebIRC@Nightstar-27138e8c.res.rr.com] has quit [[NS] Quit: GO! BWAAAH!]
10:34 * gnolaptop gnashes his teeth as he's once again reduced to editing obscure config files.
11:03 gnolaptop [lenin@Nightstar-977d8364.eduroam.liu.se] has quit [[NS] Quit: Lunch]
11:55 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Ping timeout: 121 seconds]
11:57
< AD[Shell]>
I'm looking for something like Google Reader - a newsfeed aggregator - that has some kind of interest filter (based on what I read or something). Any recommendations?
12:00 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
12:04 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Ping timeout: 121 seconds]
12:09 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
12:13 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has joined #code
12:14
< gnolaptop>
Whoa.
12:14
< gnolaptop>
The keyring manager finally works.
12:18
<@TheWatcher>
Egads!
12:22 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has quit [[NS] Quit: Trying to beat some sense into XFCE]
12:25 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has joined #code
12:25 maoranma [maoranma@Nightstar-411b03a4.pools.spcsdns.net] has quit [Ping timeout: 121 seconds]
12:25
< gnolaptop>
Qapla!
12:28
< gnolaptop>
(Whoever designed XFCE's keyboard shortcut manager should be taken out behind the barn and shot. It would be kindest that way.)
12:30
< gnolaptop>
(Seriously: there is no way to add shortcuts. You can only /change existing ones/.)
12:31
< gnolaptop>
Oh god. The professor just transformed into Steve Jobs.
12:33
< AD[Shell]>
Quick, do you have your Field Exorcism Kit handy?
12:34
< gnolaptop>
No. :-/
12:34
<@TheWatcher>
!
12:34
< gnolaptop>
What's the recommended exorcism procedure for Black Turtle Neck Possession?
12:37
< AD[Shell]>
Not quite sure, but I'm almost certain in involves flamethrowers.
13:04 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has quit [[NS] Quit: TEAAAAAAAAA]
13:12 Attilla_ [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
13:13 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Ping timeout: 121 seconds]
13:16 Attilla_ is now known as Attilla
13:22 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has joined #code
13:24 Attilla_ [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
13:24 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Ping timeout: 121 seconds]
13:26 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has quit [[NS] Quit: Bah, out of battery]
14:06 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has joined #code
14:20 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has quit [Ping timeout: 121 seconds]
14:21 Attilla_ [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Client closed the connection]
14:22 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
14:22 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Client closed the connection]
14:22 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
14:24 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has joined #code
14:31 gruber [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
14:31 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
14:31 gnolaptop [lenin@Nightstar-d19444af.eduroam.liu.se] has quit [[NS] Quit: Restarting XFCE again]
14:33 You're now known as TheWatcher[afk]
14:33 gnolam [lenin@Nightstar-d19444af.eduroam.liu.se] has joined #code
14:40 * Vornicus gets back to programming.
14:41
<@ToxicFrog>
Programming in #code?
14:41
<@ToxicFrog>
Madness!
14:41 gnolam [lenin@Nightstar-d19444af.eduroam.liu.se] has quit [Ping timeout: 121 seconds]
14:41
<@ToxicFrog>
Rhamphoryncus: the thing is, most people will already have seen a recursive definition of fib in math class.
14:42
<@ToxicFrog>
So it makes a handy function that they're already familiar with.
14:42 gnolam [lenin@Nightstar-d19444af.eduroam.liu.se] has joined #code
14:42
< Rhamphoryncus>
ToxicFrog: Which is exactly why it's so bad to not make a big point of how it's the wrong way to do it
14:43
<@ToxicFrog>
Then you can show them how it fails and that leads you into a discussion of how to translate recursive algorithms into iterative ones.
14:43<~Vornicus> And then another discussion on caching.
14:43
< Rhamphoryncus>
But it's never a big point. It's only an afterthought, to satisfy the pedants like me.
14:43<~Vornicus> And then... Closed Form.
14:47
<@ToxicFrog>
Rhamphoryncus: then that's an implementation problem.
14:48
<@ToxicFrog>
(all CS programs suck, news at 11)
14:48
< Rhamphoryncus>
heh
15:06 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Client closed the connection]
15:06 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has joined #code
15:20 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
15:20 mode/#code [+o PinkFreud] by ChanServ
15:20 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: leaving]
15:20 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
15:20 mode/#code [+o PinkFreud] by ChanServ
15:21 gnolam [lenin@Nightstar-d19444af.eduroam.liu.se] has quit [[NS] Quit: Gone gone \ the bigger they come \ the larger her hand \ 'til no one understands]
15:42 Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code
15:44<~Vornicus> maoranma: pascal's triangle is the easy way.
15:52<~Vornicus> he's not here
15:53 gruber is now known as gnolam
16:29 Alek [omegaboot@Nightstar-10752b3e.il.comcast.net] has quit [Ping timeout: 121 seconds]
16:59
< Stalker>
He fled!
17:11 * ToxicFrog ponders the relative merits of upgrading his (de)serializer to handle recursive data structures vs. never feeding it recursive data structures
17:14
< gnolam>
http://www.smbc-comics.com/index.php?db=comics&id=2494#comic
17:15<~Vornicus> whee, rules for interval union
17:21 EvilDarkLord is now known as Maze
17:23
< AD[Shell]>
gnolam: :D
17:33<~Vornicus> okay. If there is a single interval, then min(a.right,b.right) > max(a.left,b.left) ... OR those two are equal and either of the corresponding closed/open flags say closed.
17:39 AD[Shell] [abudhabi@Nightstar-d2500f5c.elitter.net] has quit [Ping timeout: 121 seconds]
17:41<~Vornicus> Which means I have to keep track of those flags too, jeez, this code sucks.
17:41 abudhabi [abudhabi@Nightstar-d2500f5c.elitter.net] has joined #code
17:41 abudhabi is now known as AD[Shell]
18:00 eckse [eckse@Nightstar-a1760f38.dsl.sentex.ca] has joined #code
18:01 Kindamoody|out is now known as Kindamoody
18:07 AD[Shell] [abudhabi@Nightstar-d2500f5c.elitter.net] has quit [Ping timeout: 121 seconds]
18:10 abudhabi [abudhabi@Nightstar-d2500f5c.elitter.net] has joined #code
18:11 abudhabi is now known as AD[Shell]
18:15
< Rhamphoryncus>
gnolam: what gets me is it's clearly done by an adult
18:16 maoranma [maoranma@Nightstar-a4035e8c.pools.spcsdns.net] has joined #code
18:17 Attilla [Obsolete@Nightstar-85c2e515.as43234.net] has quit [Ping timeout: 121 seconds]
18:22 Attilla [Obsolete@Nightstar-b9104aaa.threembb.co.uk] has joined #code
18:43 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
19:21
<@ToxicFrog>
fuck GUI programming forever
19:23
<@Tamber>
"It comes up in an xterm; that counts as a GUI, right?"
19:24<~Vornicus> Sometimes, I do crazy things.
19:24<~Vornicus> (left, left_end),(alt_left, alt_left_end) = sorted(((self.left, self.left_end), (other.left, other.left_end)))
19:30
<@ToxicFrog>
Tamber: sadly this project relies heavily on image display. xterm won't cut it.
19:31
<@ToxicFrog>
However, it seems to be a case of {has the features I need,API is not a complete nightmare,actually works on my target platforms}: pick two
19:33
<@Tamber>
Ah.
19:43 You're now known as TheWatcher
19:45
<@TheWatcher>
You get to pick two? Wow!~
19:48<&McMartin> wx, Qt, some wrappers of Gtk, and Swing all have two
19:48<&McMartin> Though *which* two for Swing depend, as the non-nightmarish parts of Swing are the parts that aren't portable~
19:51
<@ToxicFrog>
I may actually end up learning Qt for this
19:52
<@ToxicFrog>
Because the GTK library I was previously targeting no longer ships windows binaries, and to be honest, learning a new GUI library from scratch sounds like less work than building one myself.
19:54 Alek [omegaboot@Nightstar-10752b3e.il.comcast.net] has joined #code
19:54 mode/#code [+o Alek] by ChanServ
19:55
<@jerith>
ToxicFrog: HTML+CSS?
19:55
<@ToxicFrog>
jerith: um.
19:55
<@jerith>
Or does HTTP count as "nightmarish API"?
19:55
<@ToxicFrog>
The capabilities I'm looking for here are "blitting, scaling and rotation of bitmaps"
19:56
<@ToxicFrog>
And yes, it does.
19:56
<@TheWatcher>
jerith: even if http doesn't, portability even between browsers does ¬¬
19:56<&McMartin> TF: I know Qt can do the first two of those, but I'm not positive about the latter, espeically for arbitrary angles.
19:56<&McMartin> QPixmap would probably be the relevant class, though.
19:57
<@TheWatcher>
GtkGLArea no longer ships for windows, then?
19:57
<@jerith>
TheWatcher: You serve static non-JS pages and generate PNG or whatever server-side.
19:57
<@ToxicFrog>
jerith: it would also have to generate a usemap and a shitload of javascript, since the user needs to be able to frob these things, move them around, etc
19:57
<@TheWatcher>
even static pages have layout differences across browsers]
19:58
<@jerith>
ToxicFrog: Nah, those sound like features. You can drop them.~
19:58
<@TheWatcher>
(hell, in some cases between difference versions of the same fucking browser
19:58
<@TheWatcher>
)
19:58
<@ToxicFrog>
TheWatcher: gdk.cairo_create, actually.
19:58
<@ToxicFrog>
Anyways, Gtk and Cairo still support windows, luagnome does not.
19:58
<@TheWatcher>
blegh :(
20:00
<@jerith>
ToxicFrog: Embed Python in lua and use pygtk.
20:03
<@ToxicFrog>
McMartin: QPainter::rotate(), looks like
20:04
<@ToxicFrog>
Call rotate to adjust the coordinate system, blit, rotate back.
20:04
<@ToxicFrog>
Not too different from cairo.
20:05
<@ToxicFrog>
It even has save() and restore() <3
20:05<~Vornicus> this is Felt?
20:05
<@ToxicFrog>
Yes.
20:05
<@ToxicFrog>
I'm at the point in the rearchitecturing where I need a GUI again to test things.
20:12 * Vornicus needs to write more tests.
20:14
<@jerith>
Vornicus: Are you doing all this to differentiate splines?
20:15<~Vornicus> To do so analytically. Though I also have kind of wanted to do this sort of thing for a while!
20:17 Kindamoody is now known as Kindamoody[zZz]
20:48 * TheWatcher eyes this
20:49
<@TheWatcher>
This css :hover trick works fine in one of my webapps, but not the other. I think css hates me.
21:09 Vash [Vash@Nightstar-8697fea9.wlfrct.sbcglobal.net] has joined #code
21:09 mode/#code [+o Vash] by ChanServ
21:21 eckse [eckse@Nightstar-a1760f38.dsl.sentex.ca] has quit [Client closed the connection]
21:23 eckse [eckse@Nightstar-a1760f38.dsl.sentex.ca] has joined #code
21:27 eckse [eckse@Nightstar-a1760f38.dsl.sentex.ca] has quit [Connection reset by peer]
21:29 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
21:29 mode/#code [+o himi] by ChanServ
21:32
<@ToxicFrog>
oh god it hurts
21:32
<@ToxicFrog>
g++ has decided it needs all of my memory
21:32
<@ToxicFrog>
all of it
21:33
<@Namegduf>
Yeah, it'll do that.
21:35 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
21:41<&McMartin> It also wants one more CPU than you have.
21:41<&McMartin> (Can someone explain this heuristic to me?)
21:43 eckse [eckse@Nightstar-a1760f38.dsl.sentex.ca] has joined #code
21:44
<@TheWatcher>
I thought that was 'make' that did that?
21:44<&McMartin> Well, it doesn't *have* to be make doing the orchestration
21:44<&McMartin> I'm making g++ the agent here since it's the one being orchestrated, but yes, that's the thing I'm asking about
21:45 * McMartin would have figured that the optimum was one *less* than number-of-CPUs
21:46
<@Ling>
It's actually numbers of cores + number of CPUs
21:46
<@Ling>
Since it's expected that some cores won't be pegged.
21:46
<@Ling>
However, if yes, all cores are pretty much guaranteed to be pegged you should do one for each core.
21:55
<@jerith>
McMartin: I think it's expecting at least one process to be I/O-blocked at any given time.
21:55<&McMartin> Aha, that would make sens.
21:55
<@ToxicFrog>
Yeah, that
21:55<&McMartin> *sense
21:56
<@ToxicFrog>
And yeah, I'm pretty glad I didn
21:56
<@ToxicFrog>
't try a parallel make, because just one sent it 3GB into swap.
21:57<&McMartin> What are you compiling o_O
21:57
<@ToxicFrog>
lQt
21:57<&McMartin> Huh
21:57<&McMartin> I'm a bit surprised by that because IIRC Qt is pretty template-light
21:57<&McMartin> And I associate exploding RAM usage with templates
21:58<&McMartin> Qt does, however, takae fucking forever to build because it's about 3/4 of an OS
21:58
<@ToxicFrog>
Specifically, the bit where it went crazy was building the qtgui binding.
21:58
<@ToxicFrog>
The rest was pretty smooth.
21:58<&McMartin> Oh. That might do wackiness.
21:58
<@ToxicFrog>
And yeah, it's not building Qt, it's building lQt, which for all I know generates a dozen templates for every Qt class
21:58<&McMartin> (MOC and UIC are pretty nuts, and I can't decide whether or not they're awesome)
21:59
<@ToxicFrog>
(MOC and UIC?)
21:59<&McMartin> (Qt extends C++ with Objective-C style methods, which it calls "signals" and "slots" for messages and methods. MOC - the Meta Object Compiler - is responsible for making this work.)
21:59<&McMartin> (UIC is basically its CLI version of its version of Glade
22:08
<@ToxicFrog>
o.O
22:08
<@ToxicFrog>
How does one do a Gladealike in the command line?
22:09
<@jerith>
That sounds a bit like the Meta-Object Framework, which is one of the fine specifications from the organisation most in need of a Web Task Force.
22:09<&McMartin> TF: The designer, like Glade, is really a glorified XML editor.
22:09 Maze is now known as EvilDarkLord
22:09<&McMartin> uic takes XML input and generates C++ source code.
22:10<&McMartin> jerith: I am unfamiliar with the MOF, though I have had the distinct misfortune of having to work with GObject.
22:10 * ToxicFrog pokes QMainWindow with a stick
22:10<&McMartin> I think what it really boils down to is "Smalltalk OO semantics are strictly stronger than Simula ones, so it's a natural C++ extension"
22:11
<@jerith>
Ah, Meta-Object Facility.
22:11
<@ToxicFrog>
...actually, I'm not sure if it's the QMainWindow I should be poking, or the QGraphicsView
22:11
<@jerith>
http://en.wikipedia.org/wiki/Meta-Object_Facility
22:11<&McMartin> ... or QApplication?
22:12
<@ToxicFrog>
Well, the poking here is "I want your child widget to expand to take up the entire window"
22:12<&McMartin> Mm. Try putting an HBox in it and then putting just one widget in that?
22:12<&McMartin> I'm used to what you describe being the default until you stick springs in
22:12<&McMartin> But I'm also used to editing stuff other people made, not building from scratch, so I'm not as handy here.
22:12
<@jerith>
MOF exists because the OMG needed a language to define UML in.
22:13<&McMartin> ew
22:13<&McMartin> OK, that sounds different
22:14<&McMartin> TF: Do QGraphicsView classes auto-resize? Because that might also be the issue
22:15
<@ToxicFrog>
As far as I can tell nothing is auto-resizing; if I drag any widget into a QMainWindow or QFrame (including a layout manager), it takes on some default size and the position I dropped it at
22:15<&McMartin> ...ok, I'm not used to that behavior.
22:16<&McMartin> I don't see why QMainWindow would be different from QDialog this way though
22:17
<@ToxicFrog>
QDialog has the same behaviour.
22:17<&McMartin> Hm. What you describe sounds a lot like Absolute Layout.
22:17<&McMartin> Which is not the usual way to do things.
22:17<&McMartin> But I don't have a lot of experience with Designer.
22:17
<@ToxicFrog>
Ok, if I create a layout manager, and then drop stuff into that, it works as I expect
22:17
<@ToxicFrog>
But the layout manager itself is still being absolute at me
22:17<&McMartin> Hm
22:17<&McMartin> Well, put it at 0,0, I guess?
22:18
<@jerith>
"being absolute at me" <3
22:18<&McMartin> There might be some attribute you can throw in the window to give it a global layout manager, too, not sure
22:19 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Z?]
22:19
<@ToxicFrog>
My concern here is that if I put it at 0,0 and then size it to the window as displayed in Designer, it won't auto-resize when the user resizes the window.
22:19
<@ToxicFrog>
Also, QGraphicsScene both attracts and terrifies me.
22:19
<@ToxicFrog>
It looks like exactly what I need but I'm worried it will turn out to be lacking in some critical feature I need a month from now.
22:20<&McMartin> Hee
22:20
<@jerith>
ToxicFrog: This is pretty much guaranteed.
22:20 * McMartin pokes at the output of uic
22:21<&McMartin> There appears to be something called "QSizePolicy"
22:21
<@jerith>
For everything, not just QT.
22:23<&McMartin> TF: I'm not sure where it is in the designer, but there's a "size policy" thing somewhere that appears to dictate what to do regarding expansion.
22:23
<@ToxicFrog>
oh god what is this
22:23
<@ToxicFrog>
lqt vomits its types out all over the global namespace
22:27
<@jerith>
Isn't that what global namespaces are for?
22:27<&McMartin> What is "lqt"?
22:28
<@Namegduf>
Namespaces are for lesser libraries
22:28
<@Namegduf>
All the big ones ensure that no other may dethrone them
22:30<&McMartin> Does Lua have the filthy tricks you can pull in C++ where you force subfiles to be parsed in their own namespaces?
22:30
<@Ling>
Can't you do: namespace Qt { #include <Qt.h> };
22:30
<@Ling>
?
22:31<&McMartin> Well, you could in Qt, though you generally wouldn't need to (it does C-style "namespaces", being old)
22:31<&McMartin> lqt appears to be a Lua binding to it, and that's the one going berzerk, I suspect.
22:34<&McMartin> Ling: OK, now that I check, Qt has a Qt namespace for everything but classes, which are Q-prefixed because it predates standard C++
22:37
<@ToxicFrog>
McMartin: found it.
22:37
<@ToxicFrog>
You need to place a widget in the parent, then right-click the parent, layout, <choose layout type here>
22:38
<@ToxicFrog>
And yeah, lQt is a Lua binding for Qt.
22:39
<@ToxicFrog>
It looks like all the enums go in Qt.<EnumName>, but everything else just gets a global typename
22:39
<@ToxicFrog>
So QWidget is 'QWidget', not 'Qt.QWidget'
22:39
<@ToxicFrog>
Which is what the C++ library does, but that's no excuse >.<
22:39
<@Namegduf>
Would Qt.Widget be ideal?
22:40
<@ToxicFrog>
Qt.Widget is probably the most idiomatic, yeah
22:40
<@ToxicFrog>
But I'd settle for Qt.QWidget
22:41<&McMartin> Yeah, that's tracking the C++ thung, which it shouldn't have done.
22:41<&McMartin> *thing
22:41<&McMartin> (I'd say Qt::QWidget is ideal because then you can do a namespace import for basic stuff without stomping anything important, but)
22:42
<@Namegduf>
Yeah, but the namespace import is winning you a grand total of two characters in the case where a . is used.
22:42
<@Namegduf>
Qt.Widget is only two characters longer than QWidget
22:42
<@Namegduf>
Qt is a nice short namespace on its own.
22:43<&McMartin> Yeah
22:43<&McMartin> The issue here is Qt is old enough to predate actual C++ namespaces
22:43
<@Namegduf>
I understand, yeah.
22:43<&McMartin> So they only put the constants in the Qt namespace.
22:43<&McMartin> But lqt really has no excuse and gets to do it right.
22:44
<@ToxicFrog>
Now, lqt is mostly automatically generated, but I refuse to believe that there's no way to say "force things into this namespace" to the generator.
22:45<&McMartin> Especially when it's systematic, like "does this class name begin with 'Q'"
22:45
<@ToxicFrog>
Yeah.
22:45
<@ToxicFrog>
Now, I can write a wrapper that will fix this as the library is loaded.
22:46
<@ToxicFrog>
this is probably easier than fixing the library itself, especially since it means I don't need to build a windows or OSX version myself
22:46 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
22:46 mode/#code [+o himi] by ChanServ
22:47
<@ToxicFrog>
oh you are shitting me
22:47
<@ToxicFrog>
No, I can't do that, because it contains lines like this:
22:47
<@ToxicFrog>
lua_getfield(L, LUA_GLOBALSINDEX, "QObject")
22:50
<@ToxicFrog>
Oh god, dare I use QtGraphicsScene
22:52<&McMartin> =(
22:52<&McMartin> (Qt's biggest flaw, to me, is that the libraries are basically unshareable, because it is a C++ ABI)
22:52<&McMartin> (Which is to say, there fucking isn't one)
22:53 * ToxicFrog stabs Google a few more times. "lqt" is not a typo of "qt", dammit
23:02<~Vornicus> what the shit, who wrote the generator and what drugs is he on
23:04
<@ToxicFrog>
Vornicus: the drugs that say "this should mirror the original API as closely as possible"
23:24
<@TheWatcher>
TF: use verbatim search?
23:24 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code
23:26 gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Z?]
23:29
<@ToxicFrog>
TheWatcher: which part of the character salad that is the query-string controls that?
23:29
<@TheWatcher>
No clue, I just turn it on from "More search tools" on the left side, bottom option
23:30
<@ToxicFrog>
Yeah, I don't like having to do that every time I search for something.
23:31
<@TheWatcher>
Doesn't seem to be some way to make it the default, either
23:39 * McMartin pokes around the Fedora repos, finds an OCaml-to-JS compiler
23:43<&McMartin> Yeah, OK
23:43<&McMartin> I'm once again remembering why I abandoned Standard ML
23:47
<@ToxicFrog>
?
23:47<&McMartin> Actually managing builds is a PITA, and it's hard to find decent Emacs modes &c for it.
23:48<&McMartin> OCaml has all the support but it's a drastically inferior language.
23:49<&McMartin> Of the two implementations in the repos, MLton has no REPL, and Poly/ML has compilation but lacks the ability to compile files without interacting *with* the REPL
23:49<&McMartin> wtf, guys
23:49
<@ToxicFrog>
;.;
23:50<&McMartin> There are *no* emacs modes for it, and three for OCaml
23:51
<@ToxicFrog>
Why is OCaml so much more popular?
23:55<&McMartin> I honestly cannot tell you
23:55<&McMartin> It was one of the first to be really fast, but polyml and mlton have been fast for years
23:55<&McMartin> And actually have proper patternmatchign function definitions, which OCaml lacks
23:55<&McMartin> Also, 2.3 + 4.5 works in them, which it does not in OCaml
23:56 Ling [rstamer@genoce.org] has quit [Connection closed]
23:56 Ling [rstamer@Nightstar-e681a855.org] has joined #code
23:56<&McMartin> The only explanations I can think of are political and I can't come up with good ones for *those* either.
23:58<&McMartin> Seriously
23:59<&McMartin> NP++ has OCaml support and Haskell support but no Standard ML support.
23:59<&McMartin> This is ridiculous
--- Log closed Wed Jan 18 00:00:49 2012
code logs -> 2012 -> Tue, 17 Jan 2012< code.20120116.log - code.20120118.log >

[ Latest log file ]