--- Log opened Mon Jun 04 00:00:28 2012 |
01:10 | <&McMartin> | Hm. Hey, Mac folks |
01:10 | <&McMartin> | Is there a way to pull the bundle-version out of an application bundle conveniently on the command line? |
01:19 | <&jerith> | bundle-version? |
01:20 | <&McMartin> | Basically, pulling the version information out of the plist that's in the .app bundle |
01:20 | <&jerith> | There are some standard plist-management tools. |
01:21 | <&jerith> | So if you know what you're looking for, it should be straightforward. |
01:21 | <&jerith> | Can't help much more than that, sadly. |
01:22 | <&McMartin> | I can't pull any plist management tools out of apropos - can you be specific enough to let me google for it? |
01:23 | <&jerith> | I think the tool is called "defaults". |
01:24 | <&McMartin> | This looks intensely promising. Thank you. |
01:26 | <&McMartin> | Bingo. |
01:26 | <&McMartin> | defaults read {app directory}/Contents/Info.plist CFBundleShortVersionString |
01:27 | <&jerith> | \o/ |
01:27 | <&McMartin> | You can also use -app {appname} instead of the plist location if you know its name and that it's on the application search path but not its location. |
01:28 | <&McMartin> | Remember, Macs are superior for their excellent discoverability and simple user interfaces. |
01:28 | <&McMartin> | -_- |
01:29 | <&jerith> | Quite. |
01:29 | <&jerith> | Except that doesn't apply to the command line. |
01:30 | <&jerith> | Or the GUI. |
01:30 | <&jerith> | Or the APIs. |
01:32 | <&McMartin> | I can see the glimmerings of a decent system here |
01:32 | <&McMartin> | Seriously, making a dict type be part of the core OS apis was fucking brilliant, get on this, everyone else |
01:33 | | Derakon[AFK] is now known as Derakon |
01:46 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited] |
02:09 | | Kindamoody[zZz] is now known as Kindamoody |
02:39 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Client closed the connection] |
02:40 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
02:40 | | mode/#code [+o himi] by ChanServ |
02:45 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed] |
02:50 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
02:50 | | mode/#code [+o himi] by ChanServ |
02:59 | < Noah> | McMartin: OS API DICT SAY WAAAAAH? |
03:00 | <&McMartin> | Noah: If you make calls out to OSX to, say, "hey, tell me this printer's configuration" |
03:00 | < Noah> | Oh, OS X |
03:01 | < Noah> | Bleeeeeeeh |
03:01 | <&McMartin> | Unlike Windows, where you get a bunch of binary blobs in structs that are a nightmare to keep straight from version to version (seriously, there are like 9 versions of the PRINTER_INFO struct), OS X just hands you an NSDictionary with All The Datas As Needed. |
03:01 | < Noah> | Still, that's pretty neat |
03:15 | <&McMartin> | It's very handy when futureproofing a library. |
03:16 | | Attilla [Obsolete@Nightstar-ef53f19f.as43234.net] has quit [Ping timeout: 121 seconds] |
03:20 | | Attilla [Obsolete@Nightstar-6d8ee776.as43234.net] has joined #code |
03:24 | < celticminstrel> | There's an iterator adapter that inserts into a container; is there one that removes from the container? |
03:25 | < celticminstrel> | I see there's a move_iterator, but I'm not sure if that's what I want. |
03:28 | < celticminstrel> | Oh, I didn't see that example. Guess it's not what I want. |
03:28 | < celticminstrel> | Of course I can just copy and then call clear(), but having a remove_iterator seems like it would be a good idea. |
03:34 | <&McMartin> | What's the context here? |
03:41 | | Kindamoody is now known as Kindamoody|afk |
03:55 | < celticminstrel> | Taking everything from one collection and moving it into another. (C++) |
03:56 | < celticminstrel> | I now have something strange happening. I'm stepping through the program and come to a point where an exception is thrown. As soon as I step over it, the stack suddenly seems to mutate to a different instance of where the exception gets thrown; the current location in the code is the same, but the functions below it on the stack are different. |
04:00 | < celticminstrel> | ...maybe I should try a clean build...? |
04:03 | < celticminstrel> | This doesn't make any sense... |
04:06 | <&McMartin> | Hm. |
04:06 | <&McMartin> | Non-const iterators should support remove() as an operator, right? |
04:06 | < celticminstrel> | I think so...? |
04:07 | <&McMartin> | Hrm. |
04:07 | <&McMartin> | Not sure. Debuggers might help trap it? |
04:07 | <&McMartin> | Also, woo |
04:07 | | * McMartin resolves his first merge conflict in git. |
04:07 | < celticminstrel> | Debuggers might what now? |
04:09 | <&McMartin> | Show where the stack is mysteriously mutating |
04:09 | < celticminstrel> | I'm in the debugger... |
04:09 | <&McMartin> | Oh. |
04:09 | <&McMartin> | Well, boo. |
04:09 | < celticminstrel> | Hence why I said "stepping through the program". |
04:30 | < celticminstrel> | Double indirection is annoying. |
04:36 | <&McMartin> | OK, I think my work here is done. |
04:36 | | * McMartin pushes, goes to get dinner. |
04:39 | < celticminstrel> | ...oh wow, since I happen to have a list I can use splice() for moving the stuff. |
04:59 | < celticminstrel> | For some reason I'm occasionally putting extern variable declaration inside functions. |
05:00 | < celticminstrel> | (As for the odd stack+exception thing, I just did away with the exception; it wasn't really needed in this particular case. I've no idea why I even used one in the first place.) |
06:08 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:37 | | Derakon is now known as Derakon[AFK] |
06:41 | | Kindamoody|afk is now known as Kindamoody |
06:45 | | io|gone is now known as io |
06:56 | | McMartin [mcmartin@Nightstar-107eb580.pltn13.sbcglobal.net] has quit [Connection closed] |
06:56 | | McMartin [mcmartin@Nightstar-107eb580.pltn13.sbcglobal.net] has joined #code |
06:56 | | mode/#code [+ao McMartin McMartin] by ChanServ |
06:57 | | Kindamoody is now known as Squirrel |
06:57 | | Squirrel is now known as Kindamoody |
07:17 | | Kindamoody is now known as Kindamoody|working |
07:46 | | io is now known as iospacedout |
07:49 | | Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!] |
07:52 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
07:53 | | McMartin [mcmartin@Nightstar-107eb580.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
07:59 | | McMartin [mcmartin@Nightstar-107eb580.pltn13.sbcglobal.net] has joined #code |
08:00 | | mode/#code [+ao McMartin McMartin] by ChanServ |
08:01 | | Attilla [Obsolete@Nightstar-6d8ee776.as43234.net] has quit [Ping timeout: 121 seconds] |
08:02 | | McMartin [mcmartin@Nightstar-107eb580.pltn13.sbcglobal.net] has quit [[NS] Quit: Permalagged.] |
08:06 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
08:06 | | mode/#code [+o himi] by ChanServ |
08:06 | | Attilla [Obsolete@Nightstar-6d8ee776.as43234.net] has joined #code |
09:15 | | Attilla [Obsolete@Nightstar-6d8ee776.as43234.net] has quit [Ping timeout: 121 seconds] |
09:20 | | Attilla [Obsolete@Nightstar-1e6623f5.as43234.net] has joined #code |
11:01 | | Attilla [Obsolete@Nightstar-1e6623f5.as43234.net] has quit [Ping timeout: 121 seconds] |
11:07 | | Attilla [Obsolete@Nightstar-1e6623f5.as43234.net] has joined #code |
11:32 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
11:41 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Operation timed out] |
11:46 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
11:55 | | You're now known as TheWatcher[afk] |
11:56 | | Attilla [Obsolete@Nightstar-1e6623f5.as43234.net] has quit [Ping timeout: 121 seconds] |
11:58 | < froztbyte> | there's something really likable about NTP PLL graphs |
11:58 | < froztbyte> | http://yariman.froztbyte.net/munin/froztnet/yariman.froztnet/ntp_kernel_pll_off. html |
11:58 | < froztbyte> | (v6-only URL though) |
11:59 | < Rhamphoryncus> | hrm apparently I don't have ipv6 at the moment |
11:59 | <&jerith> | Nor I. |
12:01 | | Attilla [Obsolete@Nightstar-5120ca5c.as43234.net] has joined #code |
12:02 | < froztbyte> | :( |
12:02 | < froztbyte> | and I don't really have an easy way for turning that into v4 now either |
12:04 | < froztbyte> | try http://elegua.za.net/munin with guest/guest |
12:05 | < Rhamphoryncus> | logs in |
12:07 | | * Rhamphoryncus ponders how to calculate the corners of his (triangular) map tiles such that they have exactly the same float values |
12:07 | <&jerith> | Rhamphoryncus: Very carefully. :-P |
12:07 | < Rhamphoryncus> | obviously :) |
12:08 | <&jerith> | I did that in my depixeling code by sharing the vertex between all edges connected to it. |
12:09 | < Rhamphoryncus> | I'm thinking I should give the model as barycentric coordinates so each is a (1,0,0), then have a uniform with world-space coordinates for the 3 corners |
12:11 | < Rhamphoryncus> | If I don't use barycentric then each corner would be an odd fractional distance from the tile's center, and I have no reason to expect they'd match |
12:12 | <&jerith> | Rhamphoryncus: Are you generating each triangle separately? |
12:12 | < froztbyte> | oh, apparently I don't graph ntp on elegua |
12:12 | < froztbyte> | that doesn't help much |
12:13 | < Rhamphoryncus> | Yes |
12:13 | < froztbyte> | I should probably make elegua pull yariman's graphs |
12:13 | < froztbyte> | yay for v6 and static hostnames and no dyndns shittiness \o/ |
12:14 | < Rhamphoryncus> | On the software side they follow a pattern so I can generate identical corners |
12:15 | < Rhamphoryncus> | Each triangular tile will itself be tessellated into smaller triangles, which have to match on each side |
12:15 | < Rhamphoryncus> | (unfortunately my map isn't using the same grid as opengl's tessellation shaders) |
12:17 | < Rhamphoryncus> | So I'd pass in a uniform of a,b,c (the 3 corners) and the tile's model would be in the form of weights for each of those (0..1 three times) |
12:27 | < Rhamphoryncus> | Maybe I can make this easier by only worrying about the edges, with one of the barycentric coordinates set to 0 |
12:28 | < Rhamphoryncus> | In that case it's just a linear mix |
12:34 | < Rhamphoryncus> | Alternatively I could use tessellation shaders at a higher poly count and let them do the grunt work |
12:36 | < Rhamphoryncus> | Oh wait, I'd still have to occasionally split one edge into two smaller triangles, only now I have to match what the hardware calculates |
12:37 | < Rhamphoryncus> | With the model I can give 4 a,b,c,d rather than a,b,c and still get exact results |
12:40 | < Rhamphoryncus> | oh, and tessellation shaders wouldn't do it for me. They'd just give me the barycentric coordinates |
12:42 | | 459AAACOS [omegaboot@Nightstar-efc8dc53.il.comcast.net] has joined #code |
12:42 | | 459AAACOS [omegaboot@Nightstar-efc8dc53.il.comcast.net] has quit [Connection closed] |
12:42 | | 963AABX2U [omegaboot@Nightstar-efc8dc53.il.comcast.net] has joined #code |
12:43 | | 963AABX2U is now known as Alek |
12:43 | | mode/#code [+o Alek] by ChanServ |
13:07 | | UR[V]0[V] [NSwebIRC@971820.2F7D4B.89EE7D.4E9D80] has joined #code |
13:17 | < Rhamphoryncus> | Argh, I hate situations where it seems like you're the only one who knows what they're talking about. So hard to tell if it's really just me that's clueless. |
13:17 | < UR[V]0[V]> | yep |
13:37 | | UR[V]0[V] [NSwebIRC@971820.2F7D4B.89EE7D.4E9D80] has left #code [""] |
13:43 | < Rhamphoryncus> | The funny thing is all I'm asking is if mix() is commutative. This has implications for very basic usage of patches (the tessellation shader), so you'd think someone would say if it is or if you should find an alternative |
13:47 | | * Rhamphoryncus notes that he would assume the a vs (1-a) part to be commutative. One triangle would store 0.333..., the other would store 0.666... |
13:47 | < Rhamphoryncus> | but I could cheat on that. Hrm. |
13:56 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
14:19 | | iospacedout is now known as io |
14:40 | < sshine> | Rhamphoryncus, is mix() a function that takes more than one argument? |
14:41 | < celticminstrel> | Wait, can I not use std::distance() to determine which of two iterators comes first in a std::list? |
14:41 | < Rhamphoryncus> | it's linear interpretation |
14:41 | < Rhamphoryncus> | as in mix(left, right, ratio) |
14:42 | < sshine> | ah |
14:44 | < celticminstrel> | I guess I can check both against begin() and compare the distances... |
14:49 | < celticminstrel> | But if it's a bidirectional iterator, why can't it search in both directions to find the second one? |
15:00 | < Rhamphoryncus> | Aha, tessellation shaders have specific invariance requirements, including the ability to do 1.0-a and have it matches |
15:01 | < Rhamphoryncus> | so if you had x = [0, 1/3, 2/3, 1], it requires x[1] == 1.0-x[2] |
15:01 | | EvilDarkLord [jjlehto3@Nightstar-a5db08cc.org.aalto.fi] has quit [Connection closed] |
15:05 | < Rhamphoryncus> | hmm. mix is defined as x*(1-a) + y*a. I wonder if I can derive my answer using that and the above |
15:06 | | EvilDarkLord [jjlehto3@Nightstar-a5db08cc.org.aalto.fi] has joined #code |
15:08 | < Rhamphoryncus> | I think I can.. it becomes x*x_ratio + y*y_ratio, with x_ratio and y_ratio both being consistent, just with the addition itself requiring commutativity |
15:23 | | * Rhamphoryncus types "is floating point commutative?" into a google and spots an autocompletion of "is floating poop bad?" halfway through" |
15:27 | < Rhamphoryncus> | "That FP arithmetic can be tricky in multi-threaded environment is well known." err what? |
15:42 | < Rhamphoryncus> | And ieee floating point seems to provide the addition commutativity. Hard to find strong sources but I've found enough that I'm satisfied |
16:38 | < Rhamphoryncus> | The funny thing of all that is if I use a ratio that's a power of two, ie 0/8, 1/8, 2/8, 3/8, etc it will all Just Work, but if I use 0/9, 1/9, 2/9, 3/9, etc it would not |
17:04 | | Kindamoody|working is now known as Kindamoody |
17:21 | <&jerith> | Rhamphoryncus: 1/3 has no finite representation in binary floating point. |
17:22 | <&jerith> | So 1 - 1/3 is not necessarily equal to 2/3. |
17:36 | < Rhamphoryncus> | exactly |
17:37 | < Rhamphoryncus> | But for the tessellation shaders they can pick values 1/3 and 2/3 that do work |
17:37 | < Rhamphoryncus> | I had no idea they were doing that until I found the appendix on invariants |
18:01 | | You're now known as TheWatcher |
18:42 | < celticminstrel> | One thing Xcode is terrible at is figuring out where to place breakpoints through the GUI. Sometimes I try to place a breakpoint in my code and it also inserts one somewhere in the standard library. |
18:42 | < celticminstrel> | Though I suppose that could have something to do with inlining. I think things are being inlined even though they probably shouldn't be for better debugging... |
18:45 | | jeroid [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has joined #code |
18:46 | <~Vornicus> | 1/5 doesn't have a finite representation in fp either |
18:57 | | jeroid_ [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has joined #code |
18:57 | | jeroid [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has quit [Connection reset by peer] |
19:05 | < celticminstrel> | Whee, issues with scroll limiting. |
19:08 | | Vash [Vash@Nightstar-241cb5d4.wlfrct.sbcglobal.net] has joined #code |
19:08 | | mode/#code [+o Vash] by ChanServ |
19:13 | | Kindamoody is now known as Kindamoody[zZz] |
19:41 | | jeroid [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has joined #code |
19:41 | | jeroid_ [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has quit [Client closed the connection] |
19:53 | | jeroid_ [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has joined #code |
19:53 | | jeroid [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has quit [Client closed the connection] |
19:55 | | jeroid_ [jerith@687AAB.1BBF0C.EFB4FE.9D444B] has quit [[NS] Quit: Bye] |
20:18 | < Rhamphoryncus> | weee limits with float precision. I just add scroll-wheel zooming and it's exponential, so it only takes about 100 ticks to hit the limit |
20:18 | < Rhamphoryncus> | after that things get funky :) |
20:19 | < Rhamphoryncus> | It's funny how much better it feels with the ability to zoom |
21:13 | < gnolam> | o_O |
21:13 | < gnolam> | The whole point of floats is that they scale well to different orders of magnitude. What are you doing with the poor things? :o |
21:15 | <~Vornicus> | Well, if he's using floats and he scales about 2x each time, he'll run into denormalized numbers after 127 clicks. |
21:21 | < Noah> | I wonder what would be the best way to make an IRC bot dump posts to a channel periodically |
21:21 | < Rhamphoryncus> | Vornicus: bingo :) |
21:23 | < Rhamphoryncus> | And my scroll wheel spins freely so all it takes is a good flick |
21:24 | < Noah> | Twitter posts that is, using Python/twisted. |
21:25 | < Rhamphoryncus> | The easiest would be finding one of the existing bots that do that |
21:26 | < Noah> | Yea, I'm looking at https://github.com/zach-walton/donald/blob/master/donald.py |
21:26 | < Noah> | But the scheduling seems...odd |
21:27 | < Rhamphoryncus> | what's that about key/secret to login to twitter? :P |
21:27 | < Noah> | OAuth |
21:28 | < Rhamphoryncus> | yes, but having things labelled key and secret in a public repository.. |
21:28 | < Noah> | Well, it's not mine, lol |
21:28 | < Rhamphoryncus> | heh alright |
21:31 | < Rhamphoryncus> | there's definitely some jumping around in the scheduling |
21:32 | < Noah> | And the way it resets time on join seems wonky |
21:34 | < Rhamphoryncus> | TwitterBot.joined -> TwitterBot._schedule_tweet_check -> TwitterState.schedule_check -> TwitterBot.on_tweets -> TwitterBot._schedule_tweet_check |
21:34 | < Rhamphoryncus> | the join thing has to do with the early-out in on_tweets |
21:35 | < Rhamphoryncus> | Rather than trying to cancel an ongoing twitter update when it gets booted it just waits for it to finish, then stops |
21:35 | < celticminstrel> | Hm, when reading in with ifstream and getline(), would it skip over control characters or include them? |
21:36 | < celticminstrel> | I suppose probably the latter since it'd be delimiting with newlines... |
21:50 | <~Vornicus> | What madness are you proposing here, reading an apparently binary file with newlines? |
21:51 | < Noah> | No, reading tweets |
21:54 | <~Vornicus> | Why do tweets have control characters in them? |
21:57 | < Noah> | I wouldn't think that they would |
21:57 | | GeniusT [GeniusT@F231F3.69D69B.B0C717.411B9D] has joined #code |
21:58 | < GeniusT> | Video testimonials are a great way to promote your service, product and company. These days it is very difficult to find quality and affordable video testimonials. Genius Testimonials does exactly that - have a look at our website. http://www.geniustestimonials.com |
21:59 | | mode/#code [+b *!*GeniusT@F231F3.69D69B.B0C717.411B9D] by TheWatcher |
21:59 | | GeniusT was kicked from #code by TheWatcher [sod off] |
21:59 | < Noah> | GeniusT: Our service is butchering spammers for their meatparts. |
21:59 | < Noah> | Oh, well, nevermind |
22:00 | <@Vash> | =P |
22:03 | | * Vornicus is impressed, the nick was apropos to the spam. |
22:05 | <@TheWatcher> | Does make a change |
22:14 | | Attilla [Obsolete@Nightstar-5120ca5c.as43234.net] has quit [Ping timeout: 121 seconds] |
22:19 | | Attilla [Obsolete@Nightstar-e6c12dfb.as43234.net] has joined #code |
22:22 | < celticminstrel> | Well, initially it was just a text file, so I was reading lines normally. Then I decided to apply run length compression. |
22:23 | < celticminstrel> | On another note, I now have a crash in the plist handling area. Yay. :/ |
22:24 | <~Vornicus> | Don't bother with compression of text until you're sure that it's a performance issue. |
22:25 | <~Vornicus> | And even then, consider just using zip first. |
22:26 | < celticminstrel> | Well, maybe the issue is that my dictionary is immutable. |
22:27 | < celticminstrel> | Yup, that was it... but now there's another error. |
22:28 | <~Vornicus> | (note: I have never /ever/ seen a program where text size is problematic. |
22:30 | <~Vornicus> | (well. programs where the text is printed. bioinformatics and large-corpus data mining is a different matter) |
22:31 | <~Vornicus> | (1 MB of text is enough for the english text of Crime and Punishment) |
22:31 | <@ToxicFrog> | Vornicus: KSP save file synchronization ;.; |
22:31 | < celticminstrel> | Well, I don't think the issue is in converting std::string to NSString, so maybe it's in opening the output stream... |
22:32 | <~Vornicus> | TF: 1. how so, and 2. I almost called you KSP instead? |
22:33 | <@ToxicFrog> | Vornicus: a kesslerized save file can break 5MB and that is a lot of data to upload repeatedly on a home connection. |
22:33 | <@ToxicFrog> | Or you can compress it down to 300k or so. |
22:33 | <~Vornicus> | aha. |
22:33 | <@ToxicFrog> | (the files are plain text) |
22:33 | < celticminstrel> | Oh wait. Creating a stream doesn't automatically open it? |
22:33 | < celticminstrel> | That could be a problem. |
22:35 | < celticminstrel> | Okay, crashes fixed. Hopefully it works! |
23:55 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed] |
--- Log closed Tue Jun 05 00:00:48 2012 |