<< 23-11-2016 >>

00:12:48*yglukhov joined #nim
00:17:31*yglukhov quit (Ping timeout: 256 seconds)
00:21:42*saml_ joined #nim
00:44:02*kulelu88 quit (Quit: Leaving)
00:55:54*rusua quit (Quit: Connection closed for inactivity)
01:06:17*Demos quit (Ping timeout: 240 seconds)
01:10:18*Demos joined #nim
01:14:44*shashlick quit (Quit: Connection closed for inactivity)
01:29:59*xet7 quit (Quit: Leaving)
01:49:03*space-wi_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:50:17*space-wizard joined #nim
01:50:36*space-wizard quit (Client Quit)
01:51:06*space-wizard joined #nim
01:51:24*space-wizard quit (Client Quit)
01:51:51*space-wizard joined #nim
01:52:12*space-wizard quit (Client Quit)
01:52:44*space-wizard joined #nim
01:53:00*space-wizard quit (Client Quit)
01:53:32*space-wizard joined #nim
01:53:48*space-wizard quit (Client Quit)
01:54:18*space-wizard joined #nim
01:54:20*libman quit (Remote host closed the connection)
01:54:36*space-wizard quit (Client Quit)
01:55:08*space-wizard joined #nim
01:55:24*space-wizard quit (Client Quit)
02:12:06*vendethiel- joined #nim
02:14:42*yglukhov joined #nim
02:15:16*vendethiel quit (Ping timeout: 260 seconds)
02:19:17*yglukhov quit (Ping timeout: 268 seconds)
02:24:13*chemist69 quit (Ping timeout: 245 seconds)
02:26:59*chemist69 joined #nim
02:39:09*vlad1777d quit (Quit: Leaving)
02:45:25*Jesin joined #nim
02:55:57*chemist69 quit (Ping timeout: 246 seconds)
03:06:01*space-wizard joined #nim
03:07:29*couven92 quit (Read error: Connection reset by peer)
03:08:31*couven92 joined #nim
03:10:01*chemist69 joined #nim
03:26:08*saml_ quit (Ping timeout: 260 seconds)
03:41:07*brson quit (Quit: leaving)
03:47:50*acidx quit (Read error: Connection reset by peer)
03:49:12*acidx joined #nim
04:06:06*ftsf_ quit (Ping timeout: 258 seconds)
04:17:31*ftsf_ joined #nim
04:43:17*ftsf_ quit (Ping timeout: 258 seconds)
04:52:15*Demos quit (Ping timeout: 265 seconds)
04:56:29*ftsf_ joined #nim
04:57:06*chemist69 quit (Ping timeout: 250 seconds)
04:57:29*chemist69 joined #nim
05:16:51*yglukhov joined #nim
05:20:48FromGitter<nigredo-tori> Benjamin, only inside the same `type` section: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5835272fc790e0ec561e7c66]
05:21:09*yglukhov quit (Ping timeout: 248 seconds)
05:37:01*couven92 quit (Quit: Shutting down...)
06:05:35*yglukhov joined #nim
06:06:05*ftsf_ quit (Ping timeout: 258 seconds)
06:09:49*yglukhov quit (Ping timeout: 244 seconds)
06:12:28*vlad1777d joined #nim
06:19:32*ftsf_ joined #nim
06:22:06*Dankrad quit (Ping timeout: 246 seconds)
06:27:35*vlad1777d quit (Remote host closed the connection)
06:43:32*bjz joined #nim
06:48:07*nsf joined #nim
06:55:53*bjz quit (Ping timeout: 245 seconds)
06:58:03*bjz joined #nim
07:03:00*bjz quit (Read error: Connection reset by peer)
07:07:04*couven92 joined #nim
07:16:42*bjz joined #nim
07:19:07*ftsf_ quit (Quit: :q!)
07:26:51*byte512 quit (Quit: WeeChat 1.6)
07:27:06*byte512 joined #nim
07:27:39*yglukhov joined #nim
07:31:58*yglukhov quit (Ping timeout: 250 seconds)
07:37:47*Arrrr joined #nim
08:23:00*Trustable joined #nim
08:23:55*Andris_zbx joined #nim
08:29:22*byte512 quit (Quit: WeeChat 1.6)
08:29:52*chemist69 quit (Ping timeout: 250 seconds)
08:33:40*Ven_ joined #nim
08:37:34*byte512 joined #nim
08:46:34*chemist69 joined #nim
08:52:35ArrrrIs there a reason for os.CurDir not being a string? One could 'CurDir / "music"' instead of '$CurDir / "music"'
09:04:34*yglukhov joined #nim
09:05:34*brechtm joined #nim
09:09:03*yglukhov quit (Ping timeout: 256 seconds)
09:11:57*yglukhov joined #nim
09:19:37*brechtm_ joined #nim
09:21:40*PMunch joined #nim
09:22:43*Ven_ quit (Read error: No route to host)
09:23:01*brechtm quit (Ping timeout: 260 seconds)
09:23:15*Ven_ joined #nim
09:40:52AraqArrrr: chars are faster
09:42:05*brechtm joined #nim
09:43:28*yglukhov quit (Remote host closed the connection)
09:44:26*yglukhov joined #nim
09:44:34*ARCADIVS joined #nim
09:44:57*brechtm_ quit (Ping timeout: 260 seconds)
09:45:04*vlad1777d joined #nim
09:47:33*Arrrr quit (Ping timeout: 246 seconds)
09:48:57*Ven_ quit (Quit: Textual IRC Client: www.textualapp.com)
09:49:17*Ven_ joined #nim
09:49:41*Arrrr joined #nim
09:52:01ArrrrAnd when do you actually need CurDir to be fast?
09:52:23ArrrrOr maybe there could be added a './' which is a string
09:57:25*space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:58:40*space-wizard joined #nim
09:58:45*cheatfate quit (Ping timeout: 246 seconds)
09:58:58*space-wizard quit (Client Quit)
09:59:28*space-wizard joined #nim
09:59:46*space-wizard quit (Client Quit)
10:00:17*space-wizard joined #nim
10:00:34*space-wizard quit (Client Quit)
10:01:02*space-wizard joined #nim
10:01:22*space-wizard quit (Client Quit)
10:01:54*space-wizard joined #nim
10:02:10*space-wizard quit (Client Quit)
10:02:39*space-wizard joined #nim
10:02:58*space-wizard quit (Client Quit)
10:03:28*space-wizard joined #nim
10:03:46*space-wizard quit (Client Quit)
10:11:15AraqArrrr: I don't think it's worth changing, CurDir is '.' on every OS out there anyway
10:11:31Araqfeel free to write "." or "./" or whatever instead
10:12:02Araqbtw $CurDir is optimized to "." at compiletime
10:15:05*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:16:36ArrrrOk, it was only to save two keystrokes.
10:18:26*cheatfate joined #nim
10:19:57*cheatfate quit (Client Quit)
10:21:32*cheatfate joined #nim
10:50:30*cheatfate quit (Ping timeout: 268 seconds)
10:55:21*arnetheduck joined #nim
11:07:04*MyMind joined #nim
11:31:53*Ven_ joined #nim
11:37:02*cheatfate joined #nim
11:59:24*Matthias247 joined #nim
12:11:29*arnetheduck quit (Remote host closed the connection)
12:28:43*arnetheduck joined #nim
12:44:59*vendethiel- quit (Ping timeout: 252 seconds)
12:45:12*[CBR]Unspoken1 joined #nim
12:46:08*vendethiel joined #nim
12:47:22*[CBR]Unspoken quit (Ping timeout: 265 seconds)
12:48:04*byte512 quit (Ping timeout: 260 seconds)
13:03:28*arnetheduck quit (Remote host closed the connection)
13:06:22*arnetheduck joined #nim
13:07:58*brechtm_ joined #nim
13:08:17*cyraxjoe joined #nim
13:08:54*MightyJoe quit (Ping timeout: 258 seconds)
13:11:32*brechtm quit (Ping timeout: 250 seconds)
13:12:13*arnetheduck quit (Remote host closed the connection)
13:16:45*vlad1777d quit (Quit: Leaving)
13:17:12*arnetheduck joined #nim
13:22:18*paulmr joined #nim
13:38:05*arnetheduck quit (Remote host closed the connection)
13:40:26*arnetheduck joined #nim
13:40:36*Arrrr quit (Quit: WeeChat 1.5)
13:40:54*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:49:20*brechtm_ quit (Remote host closed the connection)
13:53:41*desophos quit (Read error: Connection reset by peer)
13:53:48*Ven_ joined #nim
13:55:45*brechtm joined #nim
14:00:39*arnetheduck quit (Remote host closed the connection)
14:02:10paulmrhi, when I compile this simple program it causes the compiler to
14:02:10paulmrcrash (tried on both linux and freebsd): https://gist.github.com/paulmr/9aa6e3f9e7cf4746ddcf137d3335f2e1
14:02:20paulmrdoes it seem like a known issue?
14:06:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:07:18euantorpaulmr: Try this: https://glot.io/snippets/ekl1a4030o
14:07:31FromGitter<endragor> I think you meant `next: ref T[A]`, an object cannot recursively include itself
14:09:16paulmrahh yes that makes sense, thank you
14:25:12*couven92 quit (Ping timeout: 250 seconds)
14:27:05*couven92 joined #nim
14:30:23*paulmr quit (Quit: ERC (IRC client for Emacs 24.5.1))
14:34:04*Demos joined #nim
15:03:00*elrood joined #nim
15:03:35*Demos_ joined #nim
15:06:58*Demos quit (Ping timeout: 258 seconds)
15:17:02*ARCADIVS quit (Quit: ARCADIVS)
15:39:33*Demos_ quit (Ping timeout: 258 seconds)
15:43:49*byte512 joined #nim
15:45:45*Senketsu quit (Read error: Connection reset by peer)
15:46:10*Senketsu joined #nim
15:48:54*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:50:37*libman joined #nim
15:53:59*Ven_ joined #nim
16:04:53*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:23:15*arnetheduck joined #nim
16:24:37*Trustable quit (Remote host closed the connection)
16:27:01*Demos joined #nim
16:28:32*arnetheduck quit (Remote host closed the connection)
16:36:00*kulelu88 joined #nim
16:53:57*Snircle quit (Ping timeout: 240 seconds)
16:59:19*Andris_zbx quit (Remote host closed the connection)
17:04:23*Dankrad joined #nim
17:04:47*space-wizard joined #nim
17:11:56*Snircle joined #nim
17:16:18*Snircle quit (Ping timeout: 245 seconds)
17:26:50*Snircle joined #nim
17:40:01*chemist69 quit (Ping timeout: 260 seconds)
17:49:38*byte512 quit (Ping timeout: 245 seconds)
17:53:49*chemist69 joined #nim
18:09:38*MyMind quit (Ping timeout: 245 seconds)
18:21:39*yglukhov_ joined #nim
18:24:50*yglukho__ joined #nim
18:24:59*yglukhov quit (Ping timeout: 268 seconds)
18:26:00*yglukhov_ quit (Ping timeout: 252 seconds)
18:27:07*pafmaf joined #nim
18:29:18*yglukho__ quit (Ping timeout: 268 seconds)
18:41:23*Snircle quit (Ping timeout: 256 seconds)
18:46:56*Snircle joined #nim
18:48:51*libman quit (Quit: Leaving.)
18:49:06*libman joined #nim
18:58:29*yglukhov joined #nim
19:02:55*yglukhov quit (Ping timeout: 265 seconds)
19:03:24*brechtm quit (Remote host closed the connection)
19:17:24*dddddd joined #nim
19:22:00*yglukhov joined #nim
19:32:13*freevryheid joined #nim
19:32:21*freevryheid is now known as fvs
19:33:06fvsWhy this fails?: import random;randomize();echo random(100.0)
19:34:45fvsknock, knock
19:35:47def-fvs: Who's there?
19:35:50fvsI'm using: Nim Compiler Version 0.15.0 (2016-10-04) [Linux: amd64]
19:37:49fvsexpecting 0-100 but keep getting 4.440892098500626e-13
19:38:09def-fvs: same here, probably a bug in the random module
19:38:18def-or the randomize doesn't work
19:38:51fvsok, good to know I'm not loosing my mind :)
19:40:43def-it's in the definition of proc random*(max: float): float
19:41:47def-'u' is always the same value if x is smaller than 2^12, which always seems to be the case for the initial seed
19:42:31def-i don't know much about prngs, so no idea how to fix that properly
19:49:15dom96wow, that's a serious bug.
19:52:56dom96or perhaps not
19:54:11dom96Different seeds don't seem to affect the random generator
19:54:19dom96But calling random multiple times gives different results.
20:17:37*bjz joined #nim
20:30:04*chemist69 quit (Ping timeout: 250 seconds)
20:36:54*pafmaf quit (Read error: Connection reset by peer)
20:48:09dom96Here is my answer https://github.com/nim-lang/Nim/pull/5048
20:48:26dom96Thoughts very much welcome and encouraged.
20:52:13*chemist69 joined #nim
21:02:45*brechtm joined #nim
21:05:55*brechtm quit (Remote host closed the connection)
21:07:50*brechtm joined #nim
21:09:04*couven92 quit (Read error: Connection reset by peer)
21:09:42*xet7 joined #nim
21:11:22*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:13:12FromGitter<ephja> userspace prng's can't be secure?
21:14:00*brechtm_ joined #nim
21:16:29federico3ephja: userspace prngs can be insecure
21:17:12*brechtm quit (Ping timeout: 260 seconds)
21:20:36*shodan45 joined #nim
21:22:34*vktec joined #nim
21:34:18*elrood quit (Quit: Leaving)
21:35:17*Trustable joined #nim
21:37:06beatmoxexit
21:52:20*nsf quit (Quit: WeeChat 1.6)
21:52:50*libman quit (Quit: Leaving.)
21:55:47*brechtm_ quit (Remote host closed the connection)
21:59:15*brechtm joined #nim
22:03:38*bjz joined #nim
22:05:23*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
22:10:38Araqmuhaha, this is great
22:10:43Araq"I'll cover some alternative approaches for the above problems later. But if you managed to open and read all the data needed, everything is great, right? Wrong! How do you even know if /dev/(u)random is random in the first place? This may sound like a strange question, but it isn't. You can't just trust a file because of it's path. Consider an attacker ran the following:..."
22:12:05cheatfateAraq, that's why most of systems made syscalls to generate random data
22:12:35Araqit's the old Unix vs API story. APIs work, Unix doesn't.
22:13:54*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:14:09cheatfateephja: every available crypto library using userspace cprngs
22:14:19cheatfatecsprngs
22:14:55cheatfateephja: until you have some kind of custom hardware module and crypto library has interface to it
22:27:03*FromGitter quit (Remote host closed the connection)
22:27:03*BlaXpirit quit (Quit: Bye)
22:27:20*FromGitter joined #nim
22:27:27*BlaXpirit joined #nim
22:36:49federico3cheatfate: libsodium uses the kernel prng
22:38:40cheatfatefederico3, interesting, if it uses kernel prng, why it needs this https://github.com/jedisct1/libsodium/blob/master/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c
22:39:30federico3https://download.libsodium.org/doc/generating_random_data/ and https://download.libsodium.org/doc/advanced/custom_rng.html
22:39:38*chemist69 quit (Ping timeout: 250 seconds)
22:42:41*arnetheduck joined #nim
22:47:43cheatfatefederico3, it looks like libsodium dont have any api to create keys
22:48:27federico3to create keys? What kind of keys? if you are looking for a privkey it does
22:48:51cheatfatefederico3, sorry i can't find any procedures on key generation, could you point me?
22:48:57federico3sure, one sec
22:50:02federico3https://download.libsodium.org/doc/public-key_cryptography/public-key_signatures.html
22:50:13federico3one mor second...
22:52:01federico3on the same page "Using crypto_sign_seed_keypair(), the key pair can also be deterministically derived from a single key seed (crypto_sign_SEEDBYTES bytes)."
22:52:49Araqyay, nimble itself uses recursive module deps
22:53:27Araqwill replace the error with a warning then to give people to update their projects
22:53:38Araq*to give time
22:53:49dom96Araq: huh?
22:54:17Araqthe compiler now detects and forbids recursive module dependencies
22:55:50Araqor should I fix nimble instead?
22:56:45cheatfatefederico3, do you have randombytes_default.h?
22:56:56cheatfatei can't find it in repo
22:57:00cheatfateso i think it generated
22:58:44dom96Araq: I think Nimble either gets stuck in an infinite loop in that case or does give an error, the former would be a bug.
22:59:33AraqI think you misunderstand me:
22:59:57Araqnimblepkg\tools.nim(6, 17) Error: recursive module dependency detected:
22:59:58Araqpackageinfo.nim imports tools.nim
23:00:00Araqtools.nim imports packageinfo.nim
23:01:38cheatfatefederico3, but looks like you are right and libsodium uses kernel prng, but they have user-space prng inside, just because you can't use kernel prng inside of VM
23:03:15dom96Araq: oh. Yeah, fix it please. What would be nice is if we could import specific definitions that don't need the recursive dependency, but I guess that would be extremely complicated to implement.
23:03:48dom96I would love to be able to do from module import myProc to get around the dependency error as long as `myProc` isn't using the recursive dependency
23:04:52*Trustable quit (Remote host closed the connection)
23:06:26*chemist69 joined #nim
23:07:02Araqnah, we will get something better in the longer run instead.
23:07:17Araqbut let's not repeat D's mistake with local import statements
23:07:43Araqit screwed up scoping rules in D.
23:08:59dom96ok
23:10:03federico3cheatfate: yes, unfortunately both kernel and userspace prng have their drawbacks
23:13:17*chemist69 quit (Ping timeout: 240 seconds)
23:13:24*brechtm quit (Remote host closed the connection)
23:31:58*chemist69 joined #nim
23:32:41*ftsf_ joined #nim
23:33:06*Matthias247 quit (Read error: Connection reset by peer)
23:48:27*saml_ joined #nim
23:51:18*fvs quit (Quit: ERC (IRC client for Emacs 25.1.1))
23:59:41*yglukhov quit (Remote host closed the connection)
23:59:51*ftsf_ quit (Ping timeout: 256 seconds)