Automatic commit of irc logs
[ipdf/documents.git] / irc / #ipdf.log
index 4a9fdfa..7c4fda2 100644 (file)
 18:42 < matches> So I can show some graphs tomorrow, although they may not be graphs of actually useful things
 19:44 < matches> I hope you like ipython because we're using ipython
 19:50 < matches> git.ucc seems sick...
+--- Day changed Thu Sep 18 2014
+11:40 < matches> Good news!
+11:40 < matches> You can run ipdf on motsugo
+11:40 < sulix> I heard.
+11:40 < sulix> My good news is that I just added something to the quadtree.
+11:40 < sulix> (Sort-of)
+11:41 < matches> The GPU rendering doesn't work on motsugo though
+11:41 < sulix> I fail to be surprised.
+11:42 < matches> Does the quadtree work with the centred SVGs?
+11:44 < sulix> I haven't been brave enough to do the horrible merge that needs to happen.
+11:45 < sulix> I'm currently trying to work out how I'm going to pass which node that you want to add something to through all of the Add* code.
+11:52 < matches> Ah
+11:57 < matches> I'm about to hack around C++ 'const' correctness
+11:57 < matches> What could possibly go left
+11:57 < matches> I mean wright
+11:57 < matches> I mean lng
+11:57 < matches> asdf
+11:58 < matches> segmentation fault
+12:00 < matches> Well it compiled at least
+12:00  * matches notes that if he ever sees a function declared 'const' again he should not assume that it is actually const...
+12:01 < matches> Now to overload the new and delete operators...
+12:04  * sulix hides quietly in a corner.
+12:05 < matches> ParanoidNumber needs to call new and delete an excessive amount
+12:05 < matches> Because you might need to create a new one but you might not, but you can't tell in advance :S
+12:06 < sulix> So: pool or arena?
+12:06 < sulix> (I'd probably recommend an arena)
+12:06 < matches> I've not heard of an arena, which probably means its better
+12:07 < matches> It sounds traumatic though
+12:07 < matches> Remember these numbers are paranoid as it is
+12:08 < sulix> Basically allocate a large block of memory, every time you allocate return the next <n> bytes of it.
+12:08 < sulix> Delete is a no-op, everything is freed when you delete the entire arena.
+12:10 < matches> Hm I thought that was a pool
+12:11 < sulix> A pool is basically an array of objects of the same type that get reused.
+12:12 < sulix> Though nomenclature is pretty dodgy generally wrt memory management.
+12:12 < matches> SO thinks they are the same
+12:12 < matches> http://stackoverflow.com/questions/13381123/whats-the-difference-between-a-memory-arena-and-a-memory-allocator
+12:12 < matches> Actually no that's not quite the question I was looking for
+12:13 < matches> I said pool and it says "allocator"
+12:13 < matches> (But some guy with upvotes says arenas are also called pools)
+12:13 < matches> (Democracy has decided!)
+12:13 < matches> Ok I see the difference
+12:13 < matches> Yeah, I was going to use a pool, but I guess arena would be better
+12:14 < sulix> http://en.wikipedia.org/wiki/Memory_pool
+12:15 < sulix> http://en.wikipedia.org/wiki/Region-based_memory_management
+12:28 < matches> So, PN gives "inf" for an operation that doubles do fine
+12:29 < matches> But on the plus side, Wolfram Alpha gives "Wolfram alpha does not understand your query -344+(6+8/10 +...)"
+12:29 < matches> "Showing results instead for "6+8/10 +3/100"
+12:30 < matches> (The maths is syntactically correct, or at least, I'm fairly sure it is. I'm not actually going to count all those brackets...)
+12:31 < matches> I find it amusing that there is a number representation that is just "That number is too complicated, here is a similar looking one"
+12:32 < matches> Actually, correction
+12:32 < matches> *addition rather
+12:32 < matches> "Insert more money to calculate the number"
+12:32 < sulix> "Upgrade to wolfram alpha pro to use numbers with more factors"
+12:32 < matches> Yes
+12:32 < matches> That is pretty much what it says
+12:34 < matches> Hmm, I think PN should take a couple of minutes per frame at the moment
+12:34 < matches> I should probably actually test it
+12:39 < matches> That's a whole lot of compiler errors
+12:39 < matches> Argh
+12:39 < matches> I hate the "overloaded call to ClassConstructor(int) is ambiguous" errors
+12:40 < sulix> I think the idea of "compiler errors" is clearly too negative.
+12:41 < sulix> We should have "constructive compiler feedback" instead.
+12:41 < sulix> "warnings" should become "suggestions"
+12:41 < matches> I don't understand that type of eror
+12:41 < matches> The compiler is supposed to silently typecast the primitive types right?
+12:41 < sulix> Yes*
+12:41 < matches> So if you have a constructor for a double it will cast "0" to "0.0" and use that
+12:41 < sulix> Yes*
+12:42 < matches> If you implement constructors for *both* it will get confused
+12:42 < sulix> (If there isn't another constructor that is equal or better)
+12:42 < matches> If you implement constructors for only *one* it *still* gets confused
+12:42 < matches> Aaskdfasdf
+12:43 < matches> It's totally confused
+12:43 < matches> I think
+12:43 < matches> It sees the int
+12:44 < matches> Then goes "I can construct a ParanoidNumber off that"
+12:44 < matches> Then goes "But I can construct a ParanoidNumber off the const ParanoidNumber &"
+12:44 < matches> That doesn't make sense
+12:44 < matches> Why is the copy constructor ambiguous
+12:45 < sulix> That's exactly what I hate about c++.
+12:45 < sulix> (Also boost)
+12:51 < matches> It gets Real(0) mixed up with Real(const char * str)
+12:51 < matches> Really
+12:51 < matches> Why
+12:51 < matches> FFS
+12:52 < matches> std::string it is then
+12:52 < matches> Don't know why it had to complain about every single other constructor being ambiguous as well
+13:01 < matches> I've just realised
+13:01 < matches> ParanoidNumber is going to have to be thread safe
+13:01 < matches> As long as we want the control panel to work anyway
+13:01 < matches> Blergh
+13:05 < matches> Oh boy
+13:05 < matches> You know you are in trouble when "this == NULL"
+13:06 < matches> I feel like I am messing with forces beyond my ken
+13:06 < matches> I haven't even overloaded new yet
+13:06 < sulix> this == NULL is actually perfectly possible.
+13:07 < matches> Yeah but where is it coming from
+13:07 < sulix> It's the correct result if you call a member function of a null pointer.
+13:07 < matches> Yeah I know
+13:07 < matches> But
+13:07 < matches> But
+13:07 < sulix> (Is it time for captain valgrind?)
+13:07 < matches> That spits out so many errors due to other libraries :(
+13:07 < matches> I'm learning to use gdb more effectively
+13:07 < matches> I finally learned how to set breakpoints
+13:08 < matches> And print variables
+13:08 < matches> You can even get it to call functions
+13:08 < matches> That's cool
+13:08 < sulix> Yeah, gdb is pretty amazing.
+13:08 < matches> So I have this four dimensional tree of death
+13:08 < sulix> What you should do is setup the libstdc++ pretty printers.
+13:08 < matches> The child links are implemented as a std::vector of pointers
+13:08 < sulix> It makes gdb print stl containers nicely.
+13:09 < matches> Somehow there are null pointers in the vector
+13:09 < matches> That should really not happen
+13:09 < matches> I could check that the pointers are not null but I suspect that won't solve the underlying issue
+13:09 < matches> Of null pointers ending up in places
+13:10 < matches> Couldn't I do something like: 'p (Pointer*)vector.data()'
+13:10 < matches> I should try that
+13:11 < sulix> PANIC PANIC PANIC
+13:12 < sulix> Apparently my draft dissertation is due tomorrow.
+13:12 < matches> Wahtasdfasdf
+13:12 < matches> What
+13:12 < matches> When did this happen
+13:13 < sulix> http://undergraduate.csse.uwa.edu.au/year4/Current/dates.html
+13:14 < matches> :S
+13:14 < matches> I thought Rowan said you had two weeks...
+13:14 < matches> Or was that two weeks ago..
+13:14 < matches> Also I know I don't technically have to submit a draft dissertation but I share some level of panic
+13:15 < sulix> Yeah, I thought I had more time, too.
+13:15 < matches> I'm sure you can organise it with Rowan
+13:16 < matches> My last thesis was somewhat of a blur
+13:16 < matches> I'm not sure there was a draft
+13:17 < matches> You'll get through it
+13:20 < sulix> (The question is not so much if I'll get through it, but if I'll get through it in the next hour and forty minutes... :P)
+13:22 < matches> I give you permission to copy/paste my lit review
+13:22 < matches> Although to be honest it could do with less rambling about svg and postscript
+13:26 < sulix> btw, I've found a way to make the quadtree run as slowly as the rationals.
+13:28 < matches> How?
+13:28 < sulix> Totally broken linked lists?
+13:28 < sulix> (I think)
+13:29 < sulix> QuadTree nodes can now "overlay" other quadtree nodes, which is the way I'm hacking mutability in.
+13:29 < sulix> For some reason, if you zoom in and then zoom back out again, it ends up creating a new overlay for each individual curve.
+13:30 < sulix> Each overlay runs the entire View::Render function again, independently.
+13:30 < matches> Damn
+13:30 < matches> I don't understand how these vectors have NULL in them
+13:30 < matches> I have "assert(b != NULL)" before the only two places where things get added to them
+13:31 < sulix> Are asserts enabled? :P
+13:32 < matches> I thought that was Java
+13:32 < matches> Also python
+13:34 < sulix> I'm not actually sure about the standard asserts, but most of them do get disabled if you're not in a debug build.
+13:34 < matches> Ooh
+13:34 < matches> oh oh oh
+13:34 < matches> I always do this
+13:34 < matches> std::vector::vector does not construct with a size
+13:35 < matches> It constructs with elements
+13:35 < matches> So vector n(0) is baad
+13:35 < sulix> I always use vector(size, initialvalue)
+13:35 < matches> Nope that isn't it...
+13:35 < sulix> Or just use the default constructor if I want "empty".
+13:36 < matches> I'm already wrapping the billions of 'new's in a check that it isn't null
+13:36 < matches> What is going on
+14:40 < Pommers> matches: Fix your NTP already
+16:28 < matches> sulix: "That's actually not too bad, I may be rationalising it, but..."
+16:28 < matches> (We wouldn't want the spectators to miss any of the puns)
+16:28 < sulix> (For context: talking about the performance and correctness of rational numbers)
+23:35 < matches> Your predictions of Simplify leading to infinite loops were remarkably accurate
+23:36 < matches> That just means the number can be infinitely Simplified!
+23:49 < sulix> Simplify() { return 0; /* it can't get much more simple */ }
+23:49 < matches> Haha
+23:50 < matches> Well I just spent 15 minutes learning why I had the stupid ".test" extension on all the testers in the first place
+23:50 < matches> (Which I recently removed because it was stupid)
+23:50 < matches> Turns out it was there so that make clean could remove all the testers without needing to keep a list of them all
+23:51 < matches> And that no matter how many times I ran make clean, I was still running the same buggy executable from 7 hours ago...
+23:51 < matches> "Not so stupid after all!" says past matches
+23:51 < matches> "Shut up" says present matches
+23:52 < matches> "When are we going to sleep" says future matches at approximately 3am
+23:53 < matches> Things get wierd when you remove NTP
+23:53 < matches> I have a watch on my wrist but it's not the same
+23:55 < matches> "You know what the .test extension is still dumb, I'll just remember to rm them when they need rebuilding" says a slightly older present matches
+--- Day changed Fri Sep 19 2014
+00:00 < matches> Ah, good old copy paste and naming variables 'n' and 'm'
+00:01 < matches> Mever fails to segfault
+01:05 < matches> PN Yields: 1.0000000000000000000000000000000000000000
+01:05 < matches> PN is: 1
+01:06 < matches> Doubles Yield: inf
+01:06 < matches> TAKE THAT KAHAN
+01:06 < matches> Hmm
+01:06 < matches> I could multithread the paranoid number...
+01:07 < matches> At least, the Convert to double part of it
+01:11 < matches> Ah, it fails on the very next test though
+01:11  * matches regrest uncommenting the "return 0;"
+01:11 < matches> grects
+01:11 < matches> regrects
+01:11 < matches> dammit
+01:11 < matches> it is too aerly for this
+01:21 < matches> So ipython stores pngs as giant base64 encoded strings
+01:21 < matches> In JSON format
+01:21  * matches shudders at the commit diff
+01:23 < matches> Good luck sulix
+09:47 < sulix> "Bang, zoom, straight to the rounding error"?
+12:17  * sulix falls over in a heap of insanity and shame.
+17:20 -!- mode/#ipdf [+o matches] by OperServ
+17:20 -!- matches changed the topic of #ipdf to: IPDF: A Document Precision Playground
+17:20 <@matches> This is good reading
+17:21 <@matches> I just read "At its core, IPDF breaks documents" and choked on my drink
+17:22  * sulix thinks we might have a new slogan.
+17:23 <@matches> I think it's important that you don't specify what the initials actually stand for
+17:23 <@matches> People will think it's a fancy PDF viewer
+17:23 <@matches> Except it's really a broken SVG viewer
+17:25 < sulix> I don't intend to give any more explanation than IPDF™.
+17:25 < sulix> Or possible IPDFⓇ
+17:25 <@matches> I am jealous of your compose key
+17:26 < sulix> Mwäháhà!
+17:33 <@matches> Ah yeah, precision vs zoom doesn't work to well for doubles for some reason
+18:24 <@matches> Look at ParanoidNumber go
+18:24 <@matches> Look at it go!
+18:24 <@matches> Well you can't because you're not here
+18:24 <@matches> I should do a live stream
+18:24 <@matches> It is so exciting
+18:24 <@matches> It's been going 5 minutes but it hasn't failed any tests since I commented out the comparison against doubles
+18:25 <@matches> Yes
+18:25 <@matches> Eat all the memory
+18:25 <@matches> Soon you will grow strong
+18:27 <@matches> Actually I probably *want* it to start failing tests
+18:28 <@matches> Because if it gives the same result as a double it's not any better than a double...
+18:28 <@matches> At the very least it is mathematically interesting
+18:29 <@matches> I'm not sure Mathematically interesting and "Chemical Engineering Conference" go together
+18:29 <@matches> Also I don't have enough Maths training to say anything about it other than it is interesting
+18:29 <@matches> It is a ring of complete hidden sets of fields
+18:29 <@matches> Yeah
+18:29  * matches uses maths
+18:30 < sulix> Technically, I don't think that things which use floats can ever be rings or fields due to the whole rounding error thing.
+18:34 <@matches> Well
+18:34 <@matches> It's a tree
+18:34 <@matches> I can hold on to that
+18:34 <@matches> I understand trees
+18:35 <@matches> They have trunks and bark and leaves
+18:35 <@matches> Hmm, I should add a Bark sub class
+18:35 <@matches> I wonder if I can bring myself to implement the same test algorithm in Mathematica and compare the results
+18:36 <@matches> I think using Mathematica in research requires you to sell your soul though
+18:41 <@matches> Also Frames thinks that enabling optimisation will magically make PN less terrible
+18:41 <@matches> I'm somewhat skeptical
+18:41 <@matches> But here goes
+18:42 <@matches> (I am anticipating it will make it much faster, in that it will segfault after 2 operations)
+18:45 <@matches> Well it didn't segfault, but apparently "219123 != 219123"
+18:48 <@matches> Actually
+18:48 <@matches> It seems a lot faster
+18:48 <@matches> Hooray Frames
+18:48 <@matches> Thesis done
+18:49 < sulix> Does it speed up the GMP and/or Arbint rationals much?
+18:49 <@matches> Haven't tried yet
+18:49 <@matches> I need to adapt Paranoidtester into a general tester
+18:49 <@matches> Or was that realops
+18:49 <@matches> I forget
+18:49 <@matches> I have a lot of testers that I suspect do basically the same thing
+18:57 <@matches> Compiling with -Ofast does lead to
+18:57 <@matches> WARNING: main (main.cpp:29) - __STDC_IEC_559__ not defined. IEEE 754 floating point not fully supported.
+18:57 <@matches> (I am the best programmer I put in all the warning messages!)
+18:58 <@matches> And ipdf segfaults
+18:58 <@matches> But not the tester
+18:58 <@matches> In stbtt_FindGlyphIndex
+18:59 <@matches> Are we going to need to submit another pull request...
+19:17 <@matches> Ah
+19:17 <@matches> Adding all those "SanityCheck" calls may have slowed things down a tad
+19:17 <@matches> IPDF::ParanoidNumber::SanityCheck (this=0xe80a640, visited=std::set with 9775 elements = {...})
+19:23 <@matches> Sanity-Check-this - out
+19:24 <@matches> I think I need more sleep
+19:53 < Pommers> goto bed matches 
+--- Day changed Sat Sep 20 2014
+21:22 <@matches> Overloading operator new and delete is kind of terrifying...
+21:25 <@matches> Things run blindingly fast
+21:25 <@matches> Until they segfault
+21:26 <@matches> I suspect std::vector does not take kindly to being destructed multiple times
+21:33 <@matches> Hmm
+21:33 <@matches> I need to make std::vector pointers instead?
+21:33 <@matches> That's getting a little convoluted...
+21:35 <@matches> Or what I really need is a delete operator that doesn't actually call the destructor automagically
+21:35 <@matches> (Even when you overload delete it still calls the destructor?)
+21:36 <@matches> I'm noticing a bit of a trend here
+21:36 <@matches> You can overload C++ operators but if you do it totally breaks everything
+21:36 <@matches> eg: You could implement a double() operator for casting to double but you're better off just writing Double() and using it everywhere because otherwise the compiler goes insane trying to use your operator in places
+21:37 <@matches> You can implement your own delete operator but that won't stop the compiler from doing everything it does with the standard delete...
+21:38 <@matches> The only operators you can overload (mostly) are the arithmetic ones
+21:39 <@matches> Also the compiler seems to occasionally just use the standard delete anyway which just makes everything TOTALLY INSANE
+21:39 <@matches> WHY
+21:39  * matches grumbles and prepares to write "Delete" and "New"
+--- Day changed Sun Sep 21 2014
+16:43 <@matches> I think I'm just an idiot
+16:47 <@matches> Arena doesn't help that much
+16:47 <@matches> Which is odd
+16:48 <@matches> If anything it is slower :(
+16:49 <@matches> It's hard to profile something that doesn't work in valgrind
+17:00 <@matches> On the other hand, removing all the "SanityCheck" calls is surprisingly effective...
+17:48 <@matches> Damn
+17:48 <@matches> I guess new and delete isn't as expensive as just doing a craptonne of branches
+22:33 <@matches> So, probably a better idea is to stop the CPU renderer from recalculating the object bounds every single frame
+22:33 <@matches> And update the object bounds when the view is changed instead
+22:34 <@matches> Since we don't really care what the original bounds are
+22:37 <@matches> This is basically what the quad tree does...
+22:37 <@matches> Well it changes coordinate systems as well
+22:37 <@matches> But I can zoom in a lot further now than I could before...
+22:38 <@matches> Until eventually there is a sigfpe
+23:19 <@matches> Ok
+23:19 <@matches> This is slightly worrying
+23:19 <@matches> I can zoom to {0.5,0.5,1e-41,1e-41} and insert things without any problem
+23:21 <@matches> The CPU renderer does tend to sigfpe
+23:27 <@matches> Man I feel really foolish now
+23:27  * matches makes plans to delete the IRC logs again
+23:32 <@matches> So
+23:33 <@matches> The good news is that GMP rationals are pretty effective when you do cumulative transforms on the object bounds as opposed to keeping the bounds static and transforming them to view coordinates
+23:34 <@matches> The bad news is that so are regular floats
+23:34 <@matches> I'm pretty sure it just means we need a better tester
+23:38 <@matches> Or
+23:38 <@matches> We lie

UCC git Repository :: git.ucc.asn.au