--- Log opened Sun Aug 04 00:00:39 2013 |
00:08 | <@Tarinaky> | "We're just a revenue model away from profitability." |
00:08 | <@froztbyte> | haha |
00:22 | <@Tarinaky> | "People tell me I need an assistant. But I don't want one. I prefer to be unresponsive and neglectful until people get the idea they're unimportant to me. I've found if you don't answer emails, it actually trains people to leave you alone. My kids aren't happy about it but... it's more of a French parenting style. Not being around." |
00:22 | <@Tarinaky> | http://vooza.com/videos/founder-philosophy-productivity/ |
00:34 | | You're now known as TheWatcher[T-2] |
00:36 | | You're now known as TheWatcher[zZzZ] |
00:58 | < simon_> | Tarinaky, that's funny. |
01:03 | | Derakon[AFK] is now known as Derakon |
01:42 | | ktemkin[work] is now known as ktemkin |
01:43 | <@Tarinaky> | simon_: The humour of some of that site's jokes are ruined by my low expectations for my future. |
02:23 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.] |
02:25 | | Vorntastic [Vorn@Nightstar-be750175.sub-70-211-5.myvzw.com] has joined #code |
02:26 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code |
02:32 | <&McMartin> | A new word, coined via typo |
02:33 | <&McMartin> | "derpgrade" |
02:33 | <&McMartin> | And upgrade that breaks everything |
02:36 | | * Azash adopts |
02:37 | < Vorntastic> | A quality term. |
02:41 | < Azash> | I just got home a while ago |
02:41 | < Azash> | I now have around one month off before university starts again |
02:41 | < Azash> | (got home from a month in the country, ed. note) |
02:41 | < Azash> | Coding marathon? |
02:41 | < Azash> | Coding marathon. |
03:14 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
03:22 | | Vorntastic [Vorn@Nightstar-be750175.sub-70-211-5.myvzw.com] has quit [Ping timeout: 121 seconds] |
03:23 | | Vorntastic [Vorn@Nightstar-be750175.sub-70-211-5.myvzw.com] has joined #code |
03:31 | | celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
03:52 | | Vorntastic [Vorn@Nightstar-be750175.sub-70-211-5.myvzw.com] has quit [[NS] Quit: Bye] |
03:58 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
04:04 | | ktemkin is now known as ktemkin[awol] |
04:39 | <@Alek> | .... |
04:40 | <@Alek> | fclose(f_log); |
04:40 | <@Alek> | fprintf(f_log, "File Closed"); |
04:41 | <&ToxicFrog> | |
04:42 | <~Vornicus> | um |
04:43 | < [R]> | Awesome |
04:48 | < [R]> | Gets around the problem of needing a mutex to prevent something from writing text to the file between the "file closed" message and the close-file command. |
05:00 | | Kindamoody[zZz] is now known as Kindamoody |
05:05 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [[NS] Quit: ] |
05:09 | | Derakon is now known as Derakon[AFK] |
05:55 | | AverageJoe [evil1@Nightstar-0b1e4625.lv.cox.net] has joined #code |
05:57 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
06:23 | | ErikMesoy|sleep is now known as ErikMesoy |
06:35 | | Kindamoody is now known as Kindamoody|out |
06:53 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
06:54 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
06:57 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Connection closed] |
06:57 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
06:58 | | jeff [jeff@2D9871.A95144.3F10DD.49F054] has joined #code |
07:02 | | jeff [jeff@2D9871.A95144.3F10DD.49F054] has quit [Ping timeout: 121 seconds] |
08:34 | | AverageJoe [evil1@Nightstar-0b1e4625.lv.cox.net] has quit [Connection closed] |
09:41 | | Turaiel is now known as Turaiel[Offline] |
09:58 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [[NS] Quit: ] |
10:08 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has joined #code |
10:48 | | You're now known as TheWatcher |
11:20 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [Ping timeout: 121 seconds] |
11:29 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code |
11:29 | | mode/#code [+o Orthia] by ChanServ |
11:32 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [Client closed the connection] |
11:32 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code |
11:32 | | mode/#code [+o Orthia] by ChanServ |
11:34 | | Karono [Karono@Nightstar-a97724cd.optusnet.com.au] has quit [Ping timeout: 121 seconds] |
11:53 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
11:55 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
11:56 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
11:58 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
11:58 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:03 | | * TheWatcher ponders this problem |
12:03 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:04 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:06 | <@TheWatcher> | So, I have a list of fnords - the size of said list is only known at runtime - and need to pick a random one. This would be a trivial job (get size of list, generate random number X such that 0 <= X < fnord_count). Except that each fnord has an associated probability that it might be picked. |
12:07 | <&jerith> | Are these just weightings? |
12:07 | <@TheWatcher> | Yeah |
12:08 | <&jerith> | Add up all the weights, pick a number between 0 and the sum, iterate the list cheking if your number is less than the weighting on the current element. |
12:09 | <~Vornicus> | Subtract the weight each time from your Pick A Number |
12:09 | <&jerith> | If it is, return. If not, subtract the weight from your number and move on. |
12:09 | <~Vornicus> | there you are. |
12:09 | <&jerith> | There may be a better way, but that's the simplest I can think of. |
12:11 | <~Vornicus> | first guess at numerical stability suggests to me sorting the list by the weighting |
12:12 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:12 | <@TheWatcher> | Yeah. The only other thing I can think of is, while traversing the list of fnords, to create a separate list where fnord IDs are replicated, so say fnord 0 has weight 2, fnord 1 has weight 1, and fnord 2 has weight 3, I'd get [ 0, 0, 1, 2, 2, 2 ] and then pick a random from that list |
12:13 | <@TheWatcher> | which might be faster, but will require more memory. |
12:13 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:13 | <~Vornicus> | And that doesn't work well for large or nonintegral weights |
12:13 | <@TheWatcher> | Well, I can enforce integer weights, size is a problem yes. |
12:14 | <&jerith> | That was my first thought too, but I discarded it for both reasons Vornicus mentioned. |
12:15 | <@TheWatcher> | I'll try the first method and see if anything better occurs while I work |
12:17 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
12:17 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:20 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:20 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:22 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:22 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:24 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:25 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:25 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code |
12:27 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
12:27 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:30 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
12:30 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:32 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
12:33 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:35 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
12:35 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:38 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
12:38 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:42 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:43 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:53 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:53 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:55 | <~Vornicus> | Oh oh. |
12:55 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:56 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
12:56 | <~Vornicus> | Build a parallel list of cumulative weightings - [sum(weights[:n] for n in range(len(weights))]; this can be bisected |
12:57 | <~Vornicus> | sum(weights[:n+1]) rather |
12:58 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
12:58 | <~Vornicus> | This guarantees also that sorting the list by weight /first/ is required for numerically stable results. |
12:59 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
13:01 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
13:01 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
13:03 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
13:04 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
13:06 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [[NS] Quit: ] |
13:08 | <~Vornicus> | oh, good |
13:33 | <~Vornicus> | I was lining up the akill... |
14:00 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection] |
14:02 | | jeff [jeff@2D9871.A95144.7A41B6.B5450E] has joined #code |
14:09 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
14:11 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
14:12 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
14:15 | < Syka> | Vornicus: aim again! |
14:15 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Connection reset by peer] |
14:16 | <~Vornicus> | looks like I'll have to, yes. :( |
14:16 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
14:18 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [Client closed the connection] |
14:19 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has joined #code |
14:20 | | Karono [Karono@Nightstar-13c26ed9.optusnet.com.au] has quit [G-Lined: [Vornicus] Fix your connection please. (ID: FBGGVD103Y)] |
14:22 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
14:22 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
14:27 | <~Vornicus> | anyway sleep. |
14:33 | <&ToxicFrog> | Huh. |
14:33 | <&ToxicFrog> | Ok, so the reason it wouldn't let me shut down /dev/md0 is that for some reason part of it was being used as swap. |
14:34 | <&ToxicFrog> | Which means that 'echo 1 > /sys/block/sda/device/delete' was a really bad idea |
14:37 | < Syka> | ToxicFrog: what's the worst that could hapSODTR37#^#Segmentation fault |
14:38 | <&ToxicFrog> | Yeah, in this case it went completely unresponsive for about ten seconds, then screen vanished, then the output of dmesg got extremely scary and a few seconds later it went completely catatonic. |
14:39 | <&ToxicFrog> | But now! |
14:39 | <&ToxicFrog> | scan: resilver in progress since Sun Aug 4 09:32:57 2013 |
14:39 | <&ToxicFrog> | 11.3G scanned out of 118G at 30.7M/s, 0h59m to go |
14:39 | <&ToxicFrog> | 11.3G resilvered, 9.57% done |
14:40 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
15:00 | | ktemkin[awol] is now known as ktemkin |
15:01 | | celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has joined #code |
15:01 | | mode/#code [+o celticminstrel] by ChanServ |
15:07 | | jeff [jeff@2D9871.A95144.7A41B6.B5450E] has quit [Ping timeout: 121 seconds] |
15:16 | < Xon> | ToxicFrog, I'ld reboot that system. who knows what has gone wrong when active swap goes away like that on it |
15:20 | <&ToxicFrog> | Xon: that was kind of implied by the "went completely catatonic" |
15:21 | < Xon> | rofl |
15:28 | < Xon> | fair enough |
16:32 | | ErikMesoy [Erik@Nightstar-0fb48670.80-203-17.nextgentel.com] has quit [Ping timeout: 121 seconds] |
16:36 | | ErikMesoy [Erik@Nightstar-0fb48670.80-203-17.nextgentel.com] has joined #code |
17:22 | | Turaiel[Offline] is now known as Turaiel |
19:02 | | Derakon[AFK] is now known as Derakon |
19:20 | | ToxicFrog_ [ToxicFrog@4CA975.D980A3.0E5445.043306] has joined #code |
19:21 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out] |
19:36 | | Kindamoody|out is now known as Kindamoody |
19:58 | | ToxicFrog_ is now known as ToxicFrog |
19:58 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
20:15 | | Kindamoody is now known as Kindamoody[zZz] |
22:05 | <&ToxicFrog> | Design question. |
22:05 | <&ToxicFrog> | I have a program with some config files. |
22:05 | <&ToxicFrog> | On first run, it copies the default configs into ~. Thereafter, it runs exclusively from those files. |
22:06 | <&ToxicFrog> | I'm trying to reorganize this to handle things like new settings appearing more sensibly. |
22:06 | <&ToxicFrog> | My current thinking is: |
22:06 | <&ToxicFrog> | - default config files ship with the program. These are all commented, etc. |
22:07 | <&ToxicFrog> | - on first run, these are copied into ~ |
22:07 | <&ToxicFrog> | - on startup, it loads first the defaults from the program install, then the user config files; the latter override the former where they differ |
22:07 | <&ToxicFrog> | So, if new settings are added, those will get the default values rather than asserting. |
22:09 | <&ToxicFrog> | I am now wondering whether the files in ~ should be copies of the default settings, or whether they should have everything commented out, so that if the default value for an existing setting changes in a future release, it gets changed for everyone who hasn't explicitly changed it. |
22:09 | <&ToxicFrog> | It's also possible I'm way overthinking this since, in practice, symbol and I are the only people who use this program. |
22:10 | | ErikMesoy is now known as ErikMesoy|sleep |
22:16 | <@TheWatcher> | Having everything in the files in ~ commented out is, IMO, the best option. And really, overthinking or no, doing it could come in useful eventually anyway |
22:17 | <@TheWatcher> | Also, godsdamn, even with NewDark, this level takes a sodding age to light |
22:24 | < [R]> | ToxicFrog: there are two ways I've seen to handle that, both assume relatively simple configurations. |
22:25 | < [R]> | 1) getConfigurationValue(key, type, defaultValue) |
22:25 | | cpux|2 [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code |
22:25 | < [R]> | 2) have your configuration be held in variables (preferably tied to structs), with the defaults pre-assigned to them. Assign new values as your read the configs. |
22:26 | <&ToxicFrog> | I'm basically already doing the latter. That's not the part I'm asking about. |
22:26 | < [R]> | Oh |
22:27 | < [R]> | Yeah, dumping a pre-generated default config with everything commented out is fine. |
22:27 | | cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
23:19 | <&ToxicFrog> | Hmm. |
23:19 | <&ToxicFrog> | Now I'm wondering how to handle the root library configuration. |
23:19 | <&ToxicFrog> | Unlike the other configurations, this is additive. |
23:20 | <&ToxicFrog> | If the default config has an extension_is "avi" rule, and the user config also has one, both take effect. |
23:29 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:29 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:41 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [Ping timeout: 121 seconds] |
23:50 | < Azash> | Hnngh |
23:50 | < Azash> | I'm in a three-person casual team intending to make an OS just for learning purposes |
23:50 | < Azash> | We have now been twiddling our thumbs for two years because nobody wants to take those arduous first steps |
23:50 | <@Tamber> | Doomed. |
23:51 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code |
23:51 | | mode/#code [+o Orthia] by ChanServ |
23:51 | < Azash> | Tamber: So far, yes |
23:57 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [Client closed the connection] |
23:58 | | Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code |
23:58 | | mode/#code [+o Orthia] by ChanServ |
--- Log closed Mon Aug 05 00:00:55 2013 |