--- Log opened Fri Jan 26 00:00:47 2007 |
00:44 | | Vornicus [~vorn@67.50.40.ns-3674] has quit [Ping Timeout] |
00:45 | | Vornicus [~vorn@67.50.40.ns-3674] has joined #code |
00:45 | | mode/#code [+o Vornicus] by ChanServ |
00:55 | | MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer] |
01:02 | | MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code |
01:14 | | MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Connection reset by peer] |
01:15 | | MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code |
01:56 | | MahalBEDD is now known as Mahal |
02:07 | | Mahal is now known as MahalWork |
03:10 | | Chalcedon is now known as ChalcyWalk |
03:25 | | ChalcyWalk is now known as Chalcedon |
04:31 | | ReivWork is now known as Reiver |
05:12 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ] |
05:34 | | Vornicus is now known as Vornicus-Latens |
05:48 | | Derakon [~Derakon@Nightstar-12737.sea2.cablespeed.com] has joined #code |
05:48 | < Derakon> | Right. C++ rand() creates a random int from 0 to INT_MAX, not a random double from 0 to 1. |
05:50 | < Derakon> | I was trying to pull element 16108 from a vector of length 1. |
06:02 | < Derakon> | Er, name an example? |
06:02 | < Derakon> | Er, wrong channel. |
07:00 | | Derakon is now known as Derakon[AFK] |
07:00 | | Derakon[AFK] is now known as Derakafka |
07:00 | | Derakafka is now known as Derakon[AFK] |
07:07 | | AnnoDomini [~farkoff@Nightstar-29095.neoplus.adsl.tpnet.pl] has joined #Code |
07:21 | | Reiver is now known as ReivOut |
07:53 | | ReivOut is now known as Reiver |
08:08 | | MyCatVerbs is now known as MyCatDoesStuff |
09:55 | | You're now known as TheWatcher[wr0k] |
10:40 | | Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout] |
10:42 | | ReivZzz [~reaverta@IRCop.Nightstar.Net] has joined #Code |
11:26 | | gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code |
11:45 | | ReivZzz is now known as ReivSLEP |
12:32 | | MahalWork is now known as Mahal |
12:50 | | Mahal is now known as MahalBEDD |
13:21 | | MyCatDoesStuff is now known as MyCatVerbs |
15:40 | <@Vornicus-Latens> | C++'s rand() usually calls the system rand function, which is often only 0..SHORT_MAX |
15:41 | < MyCatVerbs> | Vornicus-Latens: defined constant, RAND_MAX. |
15:41 | | * AnnoDomini raises an eyebrow. |
15:41 | < MyCatVerbs> | Vornicus-Latens: on Win32 w/Cygwin and MinGW, that is apparrently ((2<<32)-1). |
15:42 | <@Vornicus-Latens> | ...that's twice UINT_MAX |
15:43 | | * MyCatVerbs bops Vornicus. |
15:43 | <@Vornicus-Latens> | irb(main):001:0> 2<<32 #=> 8589934592 |
15:43 | < MyCatVerbs> | Actually, my bad, it's ((2<<31)-1). |
15:43 | <@Vornicus-Latens> | :) |
15:44 | < MyCatVerbs> | Oh, feck, you're right. 1<<31. |
15:44 | < MyCatVerbs> | Anyway. rand() usually sucks anyway. |
15:46 | < AnnoDomini> | Then implement the Mersenne Twister. You can just steal it off the wikipedia, if you like. :P |
15:46 | < MyCatVerbs> | Check your operating system for any of the following: /dev/srandom, /dev/random, arc4random or drand48. |
15:47 | < AnnoDomini> | Hmm... Need a word. The horizontal pieces in the ladder. |
15:47 | < MyCatVerbs> | AnnoDomini: mmmmmhowaboutno. Unlike my operating system's kernel, my userland programs don't have access to, for example, disk interrupt and keystroke timings in order to seed the entropy pool. |
15:47 | <@Vornicus-Latens> | rungs |
15:48 | < AnnoDomini> | Thanks. |
16:02 | | Vornicus-Latens is now known as Vornicus |
16:03 | | NSGuest-46 is now known as jerith |
16:37 | < MyCatVerbs> | ...the more I use C, the more I wanna switch to Haskell. :( |
16:41 | < MyCatVerbs> | ...fuckdammit. *stabs own code* |
16:42 | < MyCatVerbs> | Oh and, uh... *waves a megaphone over his head* ...attention all GDB developers: I LOVE YOU, I LOVE YOU ALL! |
16:46 | < ToxicFrog> | If you want to switch to Haskell, why not do so? |
16:53 | < MyCatVerbs> | ToxicFrog: 'tis a bit late now. Besides, I don't really know Haskell. |
16:53 | < gnolam> | MyCatVerbs: Err, on MinGW RAND_MAX is 1 << 16 - 1. |
16:54 | < ToxicFrog> | You could always use Lua ¬¬ |
16:55 | < MyCatVerbs> | gnolam: last time I checked it was (1<<32)-1 in whatever compiler Dev-C++ uses, and I'm fairly certain that that is MinGW. |
16:55 | < MyCatVerbs> | I could be totally balls-up wrong and thinking of, say, DJGPP instead, though. >_> |
16:56 | <@Vornicus> | Java's rng is horrid. |
16:56 | <@Vornicus> | You can tell it to give you a long, but it uses a 48-bit key. |
16:56 | < gnolam> | Dev-C++ uses MinGW. Which has, and has always had, a RAND_MAX of 0x7FFF. |
16:56 | <@Vornicus> | so you can only ever get one in 65,536 of the longs available. |
16:57 | < MyCatVerbs> | Vornicus: are you sure about that? 48-bit keys ~= 256 x 10**18 |
16:57 | <@Vornicus> | Right |
16:57 | <@Vornicus> | but I'm asking for a 64 bit number. |
16:58 | < MyCatVerbs> | Ahhh, I see. |
16:58 | < MyCatVerbs> | I thought you were asking for a 32-bit number, right. |
16:58 | <@Vornicus> | also, 48 bit keys are about 256E12. |
16:58 | < MyCatVerbs> | Vornicus: whoopsy, my mistake. |
16:59 | <@Vornicus> | (64 bit is 16E18 |
17:01 | < gnolam> | MyCatVerbs: yep, it was DJGPP's RAND_MAX that was 0x7fffffff. |
17:21 | < MyCatVerbs> | So anyway. The faculty library here is like my own personaly little Mecca. |
17:22 | < MyCatVerbs> | Just yesterday, I found a book on list processing, where all the code examples inside were written in ALGOL (and you can still totally see the straightforward translation into C - just replace "begin" and "end" with curly braces, heh). |
17:23 | < MyCatVerbs> | The book itself is twenty years older than I am. |
17:23 | < MyCatVerbs> | The last time somebody checked it out of the library (before me, that is) was two years before I was born. |
17:25 | <@Vornicus> | Wow, algol. |
17:25 | <@Vornicus> | That's a language I have /never actually seen used/ |
17:28 | | AnnoDomini [~farkoff@Nightstar-29095.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
17:29 | < MyCatVerbs> | Vornicus: nor me, until yesterday. |
17:30 | | You're now known as TheWatcher |
17:34 | < MyCatVerbs> | It had a pretty pleasing syntax, aesthetically speaking. Not overly verbose. The way it was used in that book was like a very small subset of the features directly implemented in LISP |
17:35 | | AnnoDomini [~farkoff@Nightstar-29500.neoplus.adsl.tpnet.pl] has joined #Code |
17:36 | < gnolam> | Well, I know my dad preferred it to Fortran back in the day... |
17:36 | < gnolam> | (We're talking punch card era here) |
17:38 | | Netsplit Troika.TX.US.Nightstar.Net <-> DeepThought.NY.US.Nightstar.Net quits: @Vornicus, Serah, Derakon[AFK], ToxicFrog |
17:40 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #Code |
17:40 | | Vornicus [~vorn@Admin.Nightstar.Net] has joined #Code |
17:40 | | Derakon[AFK] [~Derakon@Nightstar-12737.sea2.cablespeed.com] has joined #Code |
17:40 | | mode/#code [+o Chalain] by ChanServ |
17:40 | | mode/#code [+o Raif] by ChanServ |
17:40 | | mode/#code [+o jerith] by ChanServ |
17:40 | | mode/#code [+o Pi] by ChanServ |
17:40 | | Serah [~-@87.72.36.ns-26407] has joined #Code |
17:43 | | Netsplit Troika.TX.US.Nightstar.Net <-> DeepThought.NY.US.Nightstar.Net quits: Vornicus, Serah, Derakon[AFK], ToxicFrog |
17:51 | | Vornicus [~vorn@67.50.40.ns-3674] has joined #code |
18:08 | | mode/#code [+o Chalain] by ChanServ |
18:08 | | mode/#code [+o Raif] by ChanServ |
18:08 | | mode/#code [+o jerith] by ChanServ |
18:08 | | mode/#code [+o Pi] by ChanServ |
18:08 | | ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code |
18:08 | | mode/#code [+o ToxicFrog] by ChanServ |
18:09 | | Vornicus is now known as NSGuest-97 |
18:09 | | Serah [~-@87.72.36.ns-26407] has joined #Code |
18:10 | | NSGuest-97 is now known as Vornicus |
18:16 | | mode/#code [+o TheWatcher] by ChanServ |
18:25 | <@ToxicFrog> | Hah! Victory over the lab machines! |
18:26 | | * ToxicFrog now has a build system that will first build Lua, then build his program as a blcgen'd binary |
18:27 | < gnolam> | blcgen? |
18:28 | < MyCatVerbs> | gnolam: thingummy. |
18:28 | <@ToxicFrog> | A program that takes Lua code and generates a C file that, when compiled and linked against liblua, produces a binary with the same behaviour. |
18:28 | < MyCatVerbs> | gnolam: like how the original QBASIC and all versions of VB up to I think VB6 worked. |
18:29 | < MyCatVerbs> | gnolam: generates source for a C program which has the Lua interpreter and the relevant Lua program both embedded in it. |
18:29 | <@ToxicFrog> | (it actually does this by storing the Lua code in a static array, then writing C code that does argv/return value translation and calls it with luaL_loadbuffer() and lua_call()) |
18:31 | <@ToxicFrog> | Anyways. Lua is not standard on the lab machines, so in order to hand in assignments written in Lua, the package must contain a Lua source tree and a Makefile that will build it. |
19:16 | | MyCatVerbs is now known as MyCatSleeps |
19:18 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
19:18 | | mode/#code [+o Chalcedon] by ChanServ |
19:26 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has quit [Ping Timeout] |
19:37 | | EvilDarkLord [althalas@Nightstar-15301.a88-115-211-62.elisa-laajakaista.fi] has joined #code |
19:53 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
19:53 | | mode/#code [+o Chalcy] by ChanServ |
19:54 | | Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
20:35 | | timelady [~romana@Nightstar-14746.lns6.adl2.internode.on.net] has joined #Code |
20:50 | | timelady [~romana@Nightstar-14746.lns6.adl2.internode.on.net] has quit [Ping Timeout] |
20:51 | | timelady [~romana@Nightstar-14746.lns6.adl2.internode.on.net] has joined #Code |
21:03 | | ChalcyGone [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
21:04 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
21:09 | | MahalBEDD is now known as Mahal |
21:11 | | ChalcyGone is now known as Chalcedon |
21:28 | | ReivSLEP is now known as Reiver |
21:29 | | timelady [~romana@Nightstar-14746.lns6.adl2.internode.on.net] has quit [Ping Timeout] |
21:31 | | Chalcedon is now known as ChalcyThesis |
21:38 | | ChalcyThesis [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout] |
21:39 | | McMartin [~mcmartin@Nightstar-8547.dsl.pltn13.pacbell.net] has joined #code |
21:39 | | mode/#code [+o McMartin] by ChanServ |
21:42 | | Netsplit Blargh.CA.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @Pi, @Raif, gnolam, @McMartin, Serah, AnnoDomini, @jerith, @ToxicFrog, @Chalain |
21:42 | | Reiver is now known as ReivOut |
21:43 | | Netsplit over, joins: Chalain, Raif, jerith, Pi, gnolam, AnnoDomini, Serah, ToxicFrog, McMartin |
21:43 | | ServerMode/#code [+oooooo McMartin ToxicFrog Pi jerith Raif Chalain] by DeepThought.NY.US.Nightstar.Net |
21:43 | | mode/#code [+o TheWatcher] by ChanServ |
21:43 | | mode/#code [+o Mahal] by ChanServ |
21:43 | | mode/#code [+o Vornicus] by ChanServ |
22:00 | | You're now known as TheWatcher[T-2] |
22:02 | | Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code |
22:02 | | mode/#code [+o Chalcy] by ChanServ |
22:03 | | Chalcy is now known as ChalcyThesis |
22:04 | | You're now known as TheWatcher[zZzZ] |
22:43 | | gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Sleep] |
22:47 | <@McMartin> | I7 4K41 is now out for Mac and Win32, it seems. |
22:47 | <@McMartin> | And WSIF actually works under it, too, unlike the last build. Hooray |
22:49 | | * ToxicFrog needs to finish catgirls.i7 sometime |
22:49 | <@Vornicus> | "catgirls.i7"? |
22:49 | <@Vornicus> | Making an IF for Neco now? |
22:50 | <@McMartin> | I think this was the one with the kitten turbines. |
22:51 | <@Vornicus> | awh |
22:51 | <@McMartin> | CURRENT RATING: 9.97 |
22:51 | <@McMartin> | Hmm, it seems one of the kittens is turning into a cat. |
22:53 | <@Mahal> | Kittens do this. |
23:29 | | ReivOut is now known as Reiver |
23:53 | | * ToxicFrog refreshes his memory on C function pointer syntax |
--- Log closed Sat Jan 27 00:00:47 2007 |