<< 15-03-2015 >>

00:05:29*Matthias247 quit (Read error: Connection reset by peer)
00:07:56*reem quit (Remote host closed the connection)
00:08:29*reem joined #nim
00:27:00Aszarshawell, you should make sure to have slices right when releasing 1.0. D had a major community problem regarding specifically slices. they didn't get it right in D 1.0 and had to change everything (which was very very annoying for everyone) for D 2.0. actually, it was one of the key motivations for making a non-backward compatible D 2 version...
00:34:38*tmku quit (Ping timeout: 256 seconds)
00:43:32*Varriount joined #nim
00:46:49fowli wish there was a non inclusive range, 0 ... len(x)
00:49:56EXetoCwhy use len as an example? since there's high already
00:51:33EXetoCI assume you just don't want to subtract
00:56:05fowlhigh subtracts
00:56:19fowlthis only really bothers me for NimNode
00:57:16fowlhigh(nimnode) used to bug out
00:58:22*reem quit (Remote host closed the connection)
00:58:44EXetoCwhen else would you like it?
01:01:36*reem joined #nim
01:04:07*reem quit (Remote host closed the connection)
01:07:26*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:07:28*rzzz quit (Ping timeout: 272 seconds)
01:08:22*reem joined #nim
01:09:45*reem quit (Remote host closed the connection)
01:10:16*BlaXpirit_ quit (Quit: Quit Konversation)
01:11:37*reem joined #nim
01:17:54*gsingh93 joined #nim
01:18:46*reem quit (Remote host closed the connection)
01:25:29NhanHhow do you alias array type?
01:25:37NhanHie I got this: https://gist.github.com/anonymous/b15a7c7620fe095a40cc , and it doesn't fly with the compiler
01:25:43*reem joined #nim
01:27:31*reem quit (Remote host closed the connection)
01:29:07fowlNhanH, vector[range[0..20], float]
01:29:52fowlEXetoC, im not sure :x
01:30:21NhanHfowl: thanks. Another question: how do I initialize x or y? Using the array notation won't work (x = [1,2,3,4, 5])
01:30:50NhanHis there any way to initialize it at once? Rather than doing x[i] = z
01:31:54*reem joined #nim
01:33:12*rzzz joined #nim
01:35:05EXetoCyou're passing 21 elements?
01:35:23NhanHyes
01:35:30NhanHit's array of 21 elements, jsut lazy to type it out here :-)
01:35:36fowlNhanH, make the first one a float
01:35:38*Trustable quit (Quit: Leaving)
01:35:49fowl[1.0, 1,1] is array 0..2 float
01:36:17NhanHI did, I got `Error: type mismatch: got (Array constructor[0..9, float]) but expected 'vector[range 0..3(int), float]'`
01:37:35*rzzz quit (Ping timeout: 246 seconds)
01:37:47fowlit says your array has 10 members but the type has 4 members
01:38:05NhanHwait yeah
01:38:08NhanHsomething is messed up
01:38:09NhanHlet me try again
01:38:28NhanHokay scratch that, I messed up a number on the file
01:38:30NhanHthanks!
01:38:38fowl.eval type v[r,t] = array[r,t]; var x: v[range[0..1],float] = [1.0,1]
01:38:41Mimbusfowl: <no output>
01:38:50fowlsure
01:39:44EXetoC10 != 4 indeed ;)
01:51:54*darkf joined #nim
01:55:19*pregressive quit (Remote host closed the connection)
01:55:55*pregressive joined #nim
01:57:35*pregress_ joined #nim
01:59:08*fizzbooze quit (Ping timeout: 265 seconds)
02:00:40*pregressive quit (Ping timeout: 272 seconds)
02:02:06*fizzbooze joined #nim
02:03:47*^aurora^ joined #nim
02:26:34*TEttinger joined #nim
02:37:05*brson quit (Ping timeout: 246 seconds)
02:42:45*chemist69 joined #nim
02:45:47*chemist69_ quit (Ping timeout: 252 seconds)
02:46:45*bjz joined #nim
02:51:07*fizzbooze quit (Ping timeout: 245 seconds)
02:59:04*a5i quit (Quit: Connection closed for inactivity)
03:01:29*saml_ quit (Quit: Leaving)
03:09:40*epichero quit ()
03:12:49*^aurora^ quit (Quit: Leaving.)
03:14:11*jsudlow joined #nim
03:15:35*jsudlow__ quit (Ping timeout: 246 seconds)
03:17:13*jholland quit (Quit: Connection closed for inactivity)
03:56:54*reem quit (Remote host closed the connection)
04:03:11*reem joined #nim
04:04:37*reem quit (Remote host closed the connection)
04:37:16*reem joined #nim
04:51:05*pregress_ quit (Remote host closed the connection)
04:51:17*pregressive joined #nim
04:56:54*reem quit (Remote host closed the connection)
05:01:48*reem joined #nim
05:28:03*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:38:00*rzzz joined #nim
06:01:53*bjz joined #nim
06:10:51*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:14:47*Asz quit (Ping timeout: 252 seconds)
06:20:31*pregressive quit (Remote host closed the connection)
06:30:17*gsingh93 quit (Ping timeout: 245 seconds)
06:44:25*bjz joined #nim
07:00:16*Demon_Fox quit (Quit: Leaving)
07:01:47*gsingh93 joined #nim
07:22:45*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:25:37*untitaker quit (Ping timeout: 264 seconds)
07:31:28*untitaker joined #nim
07:46:37*arnetheduck joined #nim
08:02:14*gmpreussner|work quit (Read error: Connection reset by peer)
08:03:50*xificurC joined #nim
08:54:22*MagusOTB quit (Ping timeout: 240 seconds)
09:00:10*smodo quit (Ping timeout: 244 seconds)
09:13:42*rzzz quit (Ping timeout: 256 seconds)
09:47:48*BlaXpirit joined #nim
09:51:11*bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…)
10:22:11*reem quit (Remote host closed the connection)
10:22:33*Matthias247 joined #nim
10:26:40*^aurora^ joined #nim
10:54:46*irrequietus joined #nim
11:01:57*xificurC quit (Ping timeout: 245 seconds)
11:39:48*davidhq joined #nim
11:45:09*akiradeveloper joined #nim
11:46:00*Trustable joined #nim
11:46:41akiradeveloperis there some general pooling library that demands alloc/dealloc/acquire/release methods? I need this for connection pooling
11:48:23*polde quit (Quit: q)
11:53:17*polde joined #nim
12:21:20*johnsoft quit (Ping timeout: 272 seconds)
12:22:09*johnsoft joined #nim
12:36:56*akiradeveloper quit (Remote host closed the connection)
12:59:39federico3huh, asciidoc is really nice compared to ReST and markdown
13:00:16qwrhow? (genuinely interested, as i've mostly used rest and sometimes thought about trying asciidoc)
13:00:39*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:01:59federico3qwr: I found markdown limited (to the point of being a toy) and ReST less readable, sometimes counter-intuitive and hard to get right
13:05:30federico3qwr: asciidoc is claimed to be more feature-rich and extensible, here's the basic grammar http://powerman.name/doc/asciidoc
13:07:27qwrok, some of the examples look like they would be hard to reproduce with ReST
13:07:42qwr(and yes, markdown really don't compete)
13:10:08*jsudlow__ joined #nim
13:13:02*jsudlow quit (Ping timeout: 246 seconds)
13:13:52*akiradeveloper joined #nim
13:22:55*reem joined #nim
13:26:20*devzerp quit (Remote host closed the connection)
13:26:20*no_name quit (Remote host closed the connection)
13:27:22*reem quit (Ping timeout: 240 seconds)
13:27:33*devzerp joined #nim
13:27:37*no_name joined #nim
13:29:05*ARCADIVS joined #nim
13:30:10*ARCADIVS quit (Client Quit)
13:55:42*jsudlow__ quit (Remote host closed the connection)
13:55:49*xamara1 joined #nim
13:57:23xamara1Hi guys. barcode is "1234567". How can I parse the 3rd character to an int? I tried: echo ParseInt(barcode[2])
13:57:39xamara1But that does not work
13:59:13xamara1Preferrably I would convert the string to an int Array. But I did not found anything in the documentation
14:01:09EXetoCit does take a string but you're passing a char to it. try parseInt("" & barcode[2])
14:02:37xamara1Yes. Now it works. Thank you
14:09:37*gsingh93 quit (Ping timeout: 252 seconds)
14:09:55EXetoCd(:)|<
14:11:37BlaXpirit.eval echo parseInt($("1234567"[2]))
14:11:40MimbusBlaXpirit: 3
14:19:47EXetoCofc
14:22:07*qwr quit (Ping timeout: 256 seconds)
14:34:25*a5i joined #nim
14:37:05*rzzz joined #nim
14:38:49*akiradeveloper quit ()
14:42:48xamara1I want to generate a random 13 character long string. The above code generates a 13 character long string, but it consists of the same characters like "1111111111111" etc... What am I doing wrong?
14:42:50xamara1proc randomStrNumber(): string = var number = "" var zahl: int for x in countup(0, 12): randomize() zahl = random(9) number = number & $zahl return number
14:43:47dom96could you gist that please?
14:44:26xamara1Goal: random 13 character long string
14:45:01xamara1Must consist of numbers
14:45:18xamara1Like "1397461209237"
14:46:15xamara1df
14:47:23EXetoCxamara1: he meant this https://gist.github.com/
14:47:46xamara1Oh, sorry
14:48:25dom96just remove the randomize call
14:48:35dom96put it above the for loop and it will work
14:48:41xamara1https://gist.github.com/anonymous/52088b4e015b0dbca525
14:49:19xamara1Ah yes. Thank you. Now it works
14:49:27*darkf quit (Quit: Leaving)
14:54:36*rzzz quit (Ping timeout: 244 seconds)
15:01:48*flaviu joined #nim
15:02:07flaviuxamara1: The randomize call reseeds the PRNG with the current time
15:02:33BlaXpirityou're basically converting current time to a number
15:02:44BlaXpiriti hope you don't use this for a password
15:02:47xamara1ah, ok
15:02:57xamara1No, I don't
15:02:59BlaXpiritor anything important at all
15:03:13xamara1No. I am generating random ean 13 numbers
15:03:13flaviuso each result is exactly the same. Also, don't count on that function to return anything resembling randomness. C spec provides no guarantees upon it's quality. `return 4` is literally a conforming implementation.
15:03:16xamara1Just for testing
15:03:37xamara1For learning Nim
15:03:52BlaXpiritshould i try to bug Araq again?
15:04:20BlaXpiritbest that can be done is at least exposing rand() and RAND_MAX instead of just an even more broken wrapper around it
15:04:30*elrood joined #nim
15:04:44flaviuBlaXpirit: Just recommend your random library.
15:05:05BlaXpiritit's futile
15:06:18BlaXpiriti want random(n) to be deprecated with the message like: use rand() with caution or look for a specialized library
15:11:12*rzzz joined #nim
15:14:56EXetoCwhy didn't you want to use some popular engine by default?
15:15:00EXetoCor maybe I recall incorrectly
15:25:45*Matthias247 quit (Read error: Connection reset by peer)
15:35:29*xamara1 quit (Quit: Page closed)
15:36:53*rzzz quit (Ping timeout: 252 seconds)
15:38:59*xificurC joined #nim
15:39:07dom96BlaXpirit: Honestly. xamara1 doesn't even care about the security implications of random()
15:39:13dom96because he doesn't need to
15:39:16dom96he is just learning
15:39:21dom96that is what most people will use random() for
15:39:27dom96and that is why it should stay in the stdlib
15:40:39BlaXpiritrandom(30000) has the first 2000 numbers twice as likely
15:41:18BlaXpiritrandom(1000000000) is actually random(32768)
15:41:23BlaXpiritsure, let's keep it
15:41:48*mwbrown joined #nim
15:44:50EXetoCdom96: why not make it use mt or whatever?
15:46:13dom96EXetoC: There is no reason not to.
15:46:21EXetoCI assume there'll be a pluggable interface in the standard distribution at some point
15:46:52dom96For some reason BlaXpirit prefers to create his own libraries instead of improving the stuff already in the standard library.
15:47:18*quasinoxen quit (Ping timeout: 252 seconds)
15:47:28BlaXpiritthere is nothing to improve
15:47:41BlaXpiritliterally just a horrible wrapper for rand
15:47:47*quasinoxen joined #nim
15:48:05EXetoCfine, replace then; or add to
15:48:05BlaXpiriti'm not keeping anyone from adding my library to standar
15:49:18EXetoCtrue
15:53:46*zipR4ND joined #nim
15:54:49dom96BlaXpirit: your random module is nice but it doesn't look thread safe.
15:55:25BlaXpiritthere is no good reason to use the same RNG across multiple threads
15:55:37dom96I bet Araq would be more inclined to add it to the standard library if you could switch between the implementations with a -d:urandom
15:55:48BlaXpiritthat is silly
15:56:06BlaXpirityou can switch between implementations in code
15:56:46BlaXpirit(back to the previous point) you can have separate RNGs for each thread
15:57:24EXetoCsomeone might want to use several engines too. both approaches could be supported though
15:57:52EXetoCbut a project-local random module with such conveniences doesn't seem like much work
15:58:00dom96good point
15:58:32BlaXpiritit is actually not difficult to change default implementation with compiler switch
15:58:59*rzzz joined #nim
15:58:59dom96bbl
15:59:19BlaXpiritbut let's just say the default global rng is for "learning"
16:03:41dom96BlaXpirit: you have a global var in there which won't be usable with multiple threads because it's not a threadvar.
16:03:44dom96bblforreal
16:04:13*banister joined #nim
16:04:17BlaXpirit> but let's just say the default global rng is for "learning"
16:04:53BlaXpiritfor simple scripts and whatnot
16:05:11BlaXpiritstill much better than what is currently there
16:05:47BlaXpiritas soon as your program gets even a tad complicated, you just don't use the global var
16:09:01flaviuBlaXpirit: Why not just put threadvar on the global PRNG?
16:09:22BlaXpiritthis is the first time i hear of it, for one
16:09:31*rzzz quit (Ping timeout: 252 seconds)
16:09:32BlaXpiritit may be good to do
16:09:36flaviuIs there some hook to initialize something on thread spawn?
16:10:38BlaXpiritand what if someone doesnt want to call urandom in each thread?
16:11:14BlaXpiritbut then again, they wouldnt be using the global anyway
16:16:13*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:23:09*bcinman joined #nim
16:23:19flaviuHow does nim initialize threadvars to 0?
16:34:50BlaXpiritumm
16:34:57BlaXpiritisn't it the basic guarantee?
16:39:11*banister joined #nim
16:44:51flaviuIf Nim can do that, why can't variables be initialized in arbitrary ways?
16:46:28BlaXpiritwell zero is special
16:46:38BlaXpiriteverything is initialized to zero
16:46:52BlaXpiritand we want arbitrary code
16:47:02BlaXpiritmaybe it is possible
16:48:19flaviuWell, if the thread library is asking for new pages for static data, that'd lead to it being 0ed
16:48:29flaviuNim might not actually be doing anything here.
16:48:38*arnetheduck quit (Ping timeout: 246 seconds)
17:08:20*flaviu quit (Remote host closed the connection)
17:18:07*dewdrop joined #nim
17:48:25*gokr joined #nim
17:49:38*saml_ joined #nim
17:50:43*bjz joined #nim
17:51:16*UberLambda joined #nim
17:59:40*fowl quit (Ping timeout: 255 seconds)
18:02:23*^aurora^ quit (Quit: Leaving.)
18:11:06*UberLambda quit (Remote host closed the connection)
18:41:22*UberLambda joined #nim
18:42:15*gokr quit (Read error: Connection reset by peer)
18:42:26*gokr joined #nim
18:57:04*reem joined #nim
18:59:11*Matthias247 joined #nim
19:01:06*MagusOTB joined #nim
19:15:59Araqdom96: how about we let the compiler search the hole hd for some stdlib?
19:16:05Araq*whole
19:16:28Araqthese bug reports "I failed to install anything properly" are annoying me
19:16:53dom96lol. Just search every partition on the user's PC?
19:16:58Araqyup
19:17:23EXetoClook in system32
19:18:17dom96on linux we can read /dev/urandom until whatever data we get out of it forms valid Nim source code.
19:18:32Araqha, brilliant!
19:18:50Araqtrading a bit of speed for correctness is always valid
19:19:32Araq"the universe doesn't exist long enough for this operation. But hey, it is correct."
19:31:02*clynamen quit (Ping timeout: 246 seconds)
19:32:25TEttinger"Proves P=NP in O(N^Graham's number) time"
19:33:01TEttingerO(Graham's number^N) would actually be much worse
19:34:18AraqN=1 --> P=NP ;-)
19:34:46federico3or P=0
19:35:06TEttingerah
19:35:13TEttingerneeds to be little n
19:36:23TEttinger"parses all IEEE standards and produces an implementation of all of them"
19:37:28EXetoCP for Pie?
19:37:43TEttinger"it's a library that implements floating-point numbers and 802.11ac wireless"
19:39:52TEttingerEXetoC: https://en.wikipedia.org/wiki/P_versus_NP_problem
19:40:14TEttingerone of those things that keeps #haskell up at night
19:44:52*quasinoxen quit (Ping timeout: 240 seconds)
19:45:31*quasinoxen joined #nim
19:47:28*zipR4ND quit (Ping timeout: 252 seconds)
19:51:44*gsingh93 joined #nim
20:04:46*reem quit (Remote host closed the connection)
20:05:27*reem joined #nim
20:12:19*bmaxa joined #nim
20:17:54*saml_ quit (Ping timeout: 252 seconds)
20:20:07*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:39:47*Etheco joined #nim
20:40:19*bmaxa left #nim ("Leaving")
20:40:36*reem quit (Remote host closed the connection)
20:45:48*reem joined #nim
20:47:00*reem quit (Read error: Connection reset by peer)
20:47:35*reem joined #nim
20:52:00*reem quit (Ping timeout: 252 seconds)
21:02:36*johnsoft quit (Ping timeout: 256 seconds)
21:03:19*quasinoxen quit (Ping timeout: 256 seconds)
21:08:12*a5i quit ()
21:14:00*rzzz joined #nim
21:14:27*fowl joined #nim
21:14:38*qwr joined #nim
21:23:30*johnsoft joined #nim
21:24:00*fizzbooze joined #nim
21:25:24*quasinoxen joined #nim
21:25:34*elrood quit (Quit: de chelonian mobile)
21:33:10*reem joined #nim
21:40:00*Demon_Fox joined #nim
21:41:34*pregressive joined #nim
21:44:50*Jesin joined #nim
21:46:20*Jesin quit (Max SendQ exceeded)
21:46:57*Jesin joined #nim
21:58:19*quasinoxen quit (Quit: No Ping reply in 180 seconds.)
21:59:33*quasinoxen joined #nim
22:01:19*gsingh93 quit (Ping timeout: 255 seconds)
22:04:58*reem quit (Remote host closed the connection)
22:06:04*reem joined #nim
22:09:52*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:10:53*banister joined #nim
22:11:13*reem quit (Ping timeout: 264 seconds)
22:13:07*UberLambda quit (Quit: Leaving the Matrix)
22:34:32*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:54:04*davidhq joined #nim
22:54:41*davidhq quit (Client Quit)
22:55:42*elbow_jason joined #nim
23:00:16*xificurC quit (Ping timeout: 255 seconds)
23:06:50*bitcraft__ quit (Ping timeout: 264 seconds)
23:07:30*wb joined #nim
23:10:39*banister quit (Ping timeout: 245 seconds)
23:12:05*a5i joined #nim
23:15:53*^aurora^ joined #nim
23:32:31*banister joined #nim
23:48:43*clynamen joined #nim
23:50:21BlaXpirituint(int.high)+1 compiles to..... IL64(-9223372036854775807) - IL64(1)
23:50:23BlaXpiritwut?
23:53:06BlaXpiritthis is probably to avoid number suffixes
23:54:26*pregress_ joined #nim
23:54:55VarriountOh, look! The number of people on the channel is a power of two!
23:55:34EXetoChalf life 3 confirmed
23:55:44*pregress_ quit (Client Quit)
23:56:04*pregressive quit (Ping timeout: 244 seconds)
23:56:16BlaXpiritnow i'm gonna make it a power of 5
23:56:22*BlaXpirit quit (Quit: Quit Konversation)
23:56:53VarriountEXetoC: What about portal 3?
23:57:14*BlaXpirit joined #nim
23:59:00EXetoCBlaXpirit: how did you do that?
23:59:23BlaXpiritwell it isnt power of 5 anymore
23:59:27BlaXpiritbut it was after i said
23:59:56EXetoCmagic