--- Log opened Sun Jun 23 00:00:10 2013 |
--- Day changed Sun Jun 23 2013 |
00:00 | < McMartin> | froztbyte: COSS is solving a different problem than this, if I'm finding what you're describing |
00:00 | < McMartin> | The "there's a lot of churn" isn't "I'm maintaining a cache of a highly active and varied request set" |
00:00 | < McMartin> | It's "malloc and free are conceptually being called a whole lot, with widely varying lifetimes" |
00:00 | < McMartin> | "But always with the same size" |
00:01 | < McMartin> | So, fixed-block allocator |
00:02 | < McMartin> | But expandable, which is amortized constant-time in the average case |
00:03 | < McMartin> | I think it's technically linear in the worst case but the worst case involves pathological configuration, as noted before |
00:03 | <@froztbyte> | McMartin: yeah, COSS is specific for storage |
00:03 | <@froztbyte> | but the cyclic buffer is the idea |
00:03 | < McMartin> | Yeah |
00:03 | < McMartin> | UQM did ultimately use a statically operated ring-queue, because that was fine for what it needed |
00:03 | <@froztbyte> | isn't it just a looping linked list, or are you optimizing it a bit beyon that? |
00:03 | < McMartin> | Yes; it was made an array |
00:04 | < McMartin> | So no lookups required |
00:04 | <@froztbyte> | (sorry, I didn't read all scrollback because I have no idea where my glasses are, and I'm tired as hell, so reading on screen is a bit painful) |
00:04 | < McMartin> | Heh |
00:04 | < McMartin> | Yeah |
00:04 | < McMartin> | I mean, what I've done over here is just a non-looping linked list (the free-list) |
00:05 | < McMartin> | And it will self-allocate a linked list of allocators when you exhaust one. |
00:05 | <@froztbyte> | nice |
00:05 | < McMartin> | The problem I really ultimately trying to solve here is "I don't get to assume that my underlying libc is using a buddy allocator" |
00:05 | <@froztbyte> | do you do any congestion control, for lack of a better term? |
00:05 | <@froztbyte> | or are you just trying to get around the fragmentation issue you mentioned |
00:05 | < McMartin> | And if I do it generically enough than if I want to play with traditional high-school data structure implementation I can do it in a language that doesn't already have it in the standard library~ |
00:06 | < McMartin> | What do you mean by "congestion control"? |
00:06 | <@froztbyte> | that you don't overallocate slabs when you might have some free earlier |
00:06 | < McMartin> | Oh. Absolutely. |
00:06 | <@froztbyte> | or rather, as time progresses you allocate some |
00:06 | <@froztbyte> | and then later earlier ones free up |
00:06 | < McMartin> | In fact, if the current allocator is exhausted, it checks the old ones |
00:06 | <@froztbyte> | what then sweeps things up? |
00:06 | <@froztbyte> | ah |
00:06 | <@froztbyte> | okay |
00:06 | < McMartin> | If any of the old ones has since freed any, that *becomes the first allocator to check* on subsequent allocations. |
00:06 | < McMartin> | You make that "resonate" |
00:06 | <@froztbyte> | so basically just better, more specific paving |
00:07 | < McMartin> | Er |
00:07 | < McMartin> | You can make that "resonate" |
00:07 | <@froztbyte> | fortunately memory doesn't have much seek latency ;p |
00:07 | < McMartin> | By repeatedly freeing something in the last allocator with everything totally full, and then allocating one thing |
00:07 | <@froztbyte> | McMartin: hmmmm |
00:07 | < McMartin> | Which changes which one "the last allocator" was |
00:07 | <@froztbyte> | ASLR won't affect this, would it? |
00:08 | < McMartin> | ... I can fix that by expanding the allocator upon allocation of The Last Block. |
00:08 | <@froztbyte> | (I honestly haven't read up on the implementation of that crap) |
00:08 | < McMartin> | ASLR won't affect this; I'm doing everything with pointers or arrays, and in C |
00:08 | < McMartin> | So even with ASLR I'm guaranteed that a chunk of memory won't move underneath me once allocated, and I'm guaranteed that array elements are contiguous. |
00:09 | <@froztbyte> | ah, true |
00:09 | <@froztbyte> | slab alloc and deal with the bits inside yourself |
00:09 | < McMartin> | Yup |
00:09 | <@froztbyte> | (this is how squid's COSS patch works, in fact) |
00:10 | < McMartin> | But not true region allocation, because the client API isn't "one free() call to annihilate everything from that region" |
00:10 | < McMartin> | The client "thinks" it's using malloc and free, but without specifying a size argument, more or less. |
00:10 | <@froztbyte> | heh |
00:11 | < McMartin> | (If turn this into something "real" it will be to manage graph nodes) |
00:27 | | froztbyte [froztbyte@Nightstar-dc394964.za.net] has quit [[NS] Quit: "Irssi uptime: 294d 8h 52m 46s", and now squeeze->wheezy] |
00:28 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
00:40 | | froztbyte [froztbyte@Nightstar-dc394964.za.net] has joined #code |
00:40 | | mode/#code [+o froztbyte] by ChanServ |
00:43 | | You're now known as TheWatcher[T-2] |
00:54 | | You're now known as TheWatcher[zZzZ] |
01:08 | <@froztbyte> | http://www.tech-thoughts-blog.com/2013/06/first-steps-with-hy.html |
01:09 | < McMartin> | Oh C |
01:10 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
01:10 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
01:10 | | * McMartin gets a segfault that only triggers on optimized code, despite the fact that this code should never have worked anywhere ever for any reason. |
01:43 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.] |
01:46 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code |
02:15 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
02:24 | <~Vornicus> | McM: there is a segment of my algorithm that is O(sqrt(n)) time if implemented on a vector (where I must use memmove) and O(log(sqrt(n))) = O(log(n)/2) = O(log(n)) if implemented on a tree. |
02:25 | <~Vornicus> | but Python's k on the logarithmic version is ridiculously large. |
02:25 | < McMartin> | Ah |
02:25 | < McMartin> | Be aware that std::map and std::set are trees~ |
02:25 | <~Vornicus> | Right. |
02:28 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
02:28 | | mode/#code [+o himi] by ChanServ |
02:30 | <~Vornicus> | The funny thing is, htis is the first time I think I've ever used maps in ways where treemaps are actually /better/ than hashmaps in the operations I'm using them on - the big important thing is the keys are sorted. |
02:30 | < McMartin> | Heh |
02:31 | < McMartin> | Yeah, one of the reasons I've been playing with custom allocators here is because with them I'll be able to write a priority-queue-based event dispatcher in pure C. |
02:31 | < McMartin> | (Getting C++ to play properly with DLLs is harder than just keeping your exports unmangled.) |
03:00 | < McMartin> | Right, then. |
03:00 | < McMartin> | C code is definitely more amenable to novel-like commenting. |
03:02 | < McMartin> | In so doing, I realized that this statement was false: |
03:02 | < McMartin> | 16:07 < McMartin> But not true region allocation, because the client API isn't "one free() call to annihilate everything from that region" |
03:02 | < McMartin> | That is in fact totally the API: it's just that call is "destroy_allocator", not "free_block"~ |
03:09 | < McMartin> | Sample comments: https://gist.github.com/michaelcmartin/04504c2db1f943006462 |
03:11 | <~Vornicus> | okay, what was I up to. |
03:12 | | * McMartin breaks for dinner, will try to get binary search trees working tonight. |
03:12 | < McMartin> | Now that I have a handy way of ripping nodes out of core~ |
03:15 | <~Vornicus> | I was... aha, I was writing up a thing to generate the available loadouts for a planet |
03:19 | <~Vornicus> | I guess the least drama filled way of doing this is to do all the complicated bullshit once and then let operator* do the rest for each planet |
03:25 | <~Vornicus> | especially as I can see some reductions I can make especially on large planets to reduce the number of unoptimal things I consider. |
03:25 | | Kindamoody[zZz] is now known as Kindamoody |
03:26 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
03:28 | <~Vornicus> | uch. no, those are hard to actually do. Better I just do the simpler way. |
03:45 | | * Vornicus tries to actually figure out how he's going to contain the thing. |
03:46 | <~Vornicus> | Okay. Since I'm generating a planet, the top level key should be the planet stats (size and breathability) |
03:46 | <~Vornicus> | Then within that I need to use the system facs key. |
03:48 | | * Derakon inhales Vorn's planets. |
03:51 | <@Alek> | what are you, Tora-Chan now? |
03:53 | <~Vornicus> | Which probably means lightly rejiggering my data structures for planet descriptions so I can use size/breathability as a direct key. |
04:03 | <~Vornicus> | Okay, then inside each one of those is just a single MORCoordinate; I can do by-resource collections a little later. |
04:07 | | Harlow [Harlow@Nightstar-fe8a1f12.il.comcast.net] has joined #code |
04:11 | <&Derakon> | Alek: I was making a joke about the breathability of planets. |
04:11 | <&Derakon> | Perhaps overly-obtuse. |
04:29 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Client closed the connection] |
04:34 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
04:48 | < Harlow> | have any of you ever created something that could be considered malicious software? JW |
04:48 | <&Derakon> | If we had, why would we ever admit it in a public channel? |
04:48 | <~Vornicus> | Well, I have crashed my computer with a memory bomb more than a few times |
04:49 | <~Vornicus> | But if you haven't done that you're not a programmer |
05:05 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
05:19 | | Derakon is now known as Derakon[AFK] |
05:42 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
05:44 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
05:48 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Client closed the connection] |
05:48 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
05:49 | | Karono is now known as NSGuest55887 |
05:49 | | NSGuest55887 [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
05:54 | <~Vornicus> | Need some vitamin R or something |
06:19 | | * Alek has written, and used, assembly code to cold-boot and shutdown his computer. |
07:06 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
07:16 | | ktemkin[awol] is now known as ktemkin |
07:22 | | Harlow [Harlow@Nightstar-fe8a1f12.il.comcast.net] has quit [[NS] Quit: Leaving] |
07:24 | | ErikMesoy|sleep is now known as ErikMesoy |
07:35 | | * Vornicus gets grumpy, decides it's time to reorganize his declarations. |
07:38 | | celticminstrel [celticminst@Nightstar-b7a93457.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:40 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
07:40 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
07:41 | | Karono is now known as Karono[afk] |
07:42 | | * ErikMesoy offers to help Vornicus reorganize his decorations, too. |
07:42 | | Karono[afk] [Karono@Nightstar-a97724cd.optusnet.com.au] has left #code [] |
07:58 | < ktemkin> | He could be declaring decorators. |
07:58 | | Karono[afk] [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
07:59 | < ktemkin> | In which case he would be reorganizing both his declarations and decorations. |
08:05 | | Karono[afk] [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
08:07 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
08:32 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
08:35 | | ktemkin is now known as ktemkin[afk] |
08:41 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
08:47 | | Kindamoody is now known as Kindamoody|out |
09:11 | | AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code |
09:22 | | AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving] |
09:46 | | ktemkin[afk] is now known as ktemkin |
09:56 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Client exited] |
09:56 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
09:59 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
10:19 | | You're now known as TheWatcher |
10:25 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
10:33 | | danger [danger@9D46A2.0B32FA.CC04E2.69CA41] has joined #code |
10:36 | | danger [danger@9D46A2.0B32FA.CC04E2.69CA41] has quit [[NS] Quit: ] |
10:39 | <~Vornicus> | derp, what am I doing here. |
10:41 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
10:55 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Client closed the connection] |
11:04 | | You're now known as TheWatcher[swim] |
11:11 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
11:12 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
11:12 | | mode/#code [+o himi] by ChanServ |
11:15 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Ping timeout: 121 seconds] |
12:08 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
12:09 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Connection closed] |
12:14 | | Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds] |
12:23 | | Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code |
12:23 | <~Vornicus> | Yay, it still builds |
12:25 | < ktemkin> | Building is the step right before watching an application segfault, right? |
12:26 | < ktemkin> | =P |
12:28 | <~Vornicus> | That'd be the one |
12:29 | <~Vornicus> | But in this case the application is not segfaulting. Mostly it means I haven't dropped anything on the floor while copying declarations et al around. |
12:29 | < ktemkin> | When I first took a university class in programming, it was a intro-level course for engineers taught by a guy who desperately didn't want to be teaching engineers. |
12:31 | < ktemkin> | We spent two weeks rapidly going over C before he threw us into creating linked lists with dynamic memory allocation. |
12:31 | <~Vornicus> | Okay. Code organized, I now see where I am and what I've defined and it's reasonable. |
12:33 | < ktemkin> | He had a class of about a hundred freshman engineers who had no idea what a debugger was trying to desparately get programs working. |
12:34 | <~Vornicus> | um. |
12:38 | < ktemkin> | I remember that most of my peers seemed to think that getting the program to build was 90% of the effort-- I don't think many of them got their programs working. |
12:44 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
12:48 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Client closed the connection] |
13:27 | | You're now known as TheWatcher |
13:33 | | * Vornicus builds comparators so he can use things in maps. |
13:39 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code |
13:42 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
13:42 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Connection closed] |
13:48 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
14:10 | | Karono is now known as Karono|zzz |
14:11 | | Karono|zzz is now known as Karono|zZz |
14:37 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
14:49 | | gnolam_ [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has joined #code |
14:49 | | gnolam is now known as NSGuest37805 |
14:49 | | gnolam_ is now known as gnolam |
14:49 | | mode/#code [+o gnolam] by ChanServ |
14:51 | | NSGuest37805 [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds] |
15:03 | | ktemkin is now known as ktemkin[work] |
16:14 | | Kindamoody|out is now known as Kindamoody |
16:48 | | Kindamoody is now known as Kindamoody|out |
16:56 | | Turaiel[MARC] is now known as Turaiel |
16:57 | | Turaiel is now known as Turaiel[MARC] |
17:00 | | Turaiel[MARC] is now known as Turaiel |
17:05 | | ktemkin[work] is now known as ktemkin |
17:17 | | celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has joined #code |
17:17 | | mode/#code [+o celticminstrel] by ChanServ |
17:40 | | ErikMesoy [Erik@A08927.B4421D.FE7332.704AA5] has quit [[NS] Quit: Kicking router and modem, because tubes are clogged.] |
17:53 | | Typh|offline is now known as Typherix |
18:00 | | ErikMesoy [Erik@Nightstar-16aba739.80-203-17.nextgentel.com] has joined #code |
18:03 | | [R] is now known as DrDREAM |
18:19 | | jeff [NSwebIRC@2D9871.A95144.1903C6.54F7C0] has joined #code |
19:44 | | Kindamoody|out is now known as Kindamoody |
19:46 | | jeff [NSwebIRC@2D9871.A95144.1903C6.54F7C0] has quit [Ping timeout: 121 seconds] |
19:59 | | Derakon[AFK] is now known as Derakon |
20:28 | | Derakon is now known as Derakon[AFK] |
20:28 | | Typherix is now known as Typh|offline |
20:33 | | Kindamoody is now known as Kindamoody[zZz] |
21:00 | | Typh|offline is now known as Typherix |
21:36 | | Karono|zZz is now known as Karono |
21:42 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Connection closed] |
21:42 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
21:53 | | DrDREAM is now known as [R] |
22:12 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has quit [Connection closed] |
22:12 | | Karono [Karono@Nightstar-03f66622.optusnet.com.au] has joined #code |
22:27 | | Karono is now known as Karono|zZz |
22:32 | | Derakon[AFK] is now known as Derakon |
22:37 | | Turaiel [Brandon@Nightstar-7dc8031d.mi.comcast.net] has quit [Operation timed out] |
22:38 | | Turaiel [Brandon@Nightstar-7dc8031d.mi.comcast.net] has joined #code |
22:39 | | Netsplit *.net <-> *.split quits: Reiver |
22:39 | | Reiver [quassel@Nightstar-3762b576.co.uk] has joined #code |
22:49 | | ErikMesoy is now known as ErikMesoy|sleep |
22:50 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
22:50 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
22:50 | | Turaiel is now known as Turaiel[Offline] |
22:50 | | Turaiel[Offline] is now known as Turaiel |
22:56 | | Turaiel is now known as Turaiel[Offline] |
22:58 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
23:09 | | Karono|zZz is now known as Karono |
23:46 | | celticminstrel is now known as celmin|away |
--- Log closed Mon Jun 24 00:00:42 2013 |