<< 06-04-2015 >>

00:07:17*johnsoft quit (Ping timeout: 248 seconds)
00:08:43*hellonico joined #nim
00:12:07*johnsoft joined #nim
00:15:38*irrequietus quit ()
00:22:37reactormonkyup, shared state doesn't seem to be a problem. I'm only running one thread and it still segfaults.
00:24:28*gsingh93 quit (Ping timeout: 244 seconds)
00:27:01*johnsoft quit (Ping timeout: 248 seconds)
00:31:21*a5i joined #nim
00:32:14Araqreactormonk: well a failing test is still a test you can submit
00:32:18*johnsoft joined #nim
00:38:09reactormonkAraq, I'll reduce it to a simpler testcase and submit as a separate issue
00:38:18*tstm quit (Ping timeout: 272 seconds)
00:38:19Araqsure
00:38:35*tstm joined #nim
00:39:10*gsingh93 joined #nim
00:40:47flaviuAny chance that the test suite will get faster?
00:40:55flaviuIt isn
00:41:12flaviu't useful if no one runs it, and people tend to avoid running it as it takes 1.5 hours
00:41:45reactormonkflaviu, go benchmark and make nice graphs :-)
00:42:02def-flaviu: it takes 1.5 hours?
00:42:25flaviureactormonk: I'm about 5% of the way there on my add-test-metadata, but I've been working on other things lately.
00:42:41flaviudef-: http://buildbot.nim-lang.org/builders/linux-x32-builder/builds/322/steps/Run%20Testament
00:42:53reactormonkflaviu, just add it in the ugly way I'd say
00:42:55flaviuAnd something like 6 hours on the slower ARM boards.
00:43:07def-flaviu: Does that run with a release compiler or debug?
00:43:40reactormonktests should run in release imo
00:43:49Araqflaviu: it takes 45 minutes for me
00:43:50reactormonkalthough debug would make kinda more sense...
00:43:58Araqand I do run it from time to time
00:44:11reactormonkAraq, do the tests run in debug or release?
00:44:18flaviuAraq: The correct approach would be to never make a commit without running the test suite.
00:44:23Araqthe release version of the compiler
00:44:44Araqflaviu: that's not even worth replying to.
00:44:56*Menche quit (Quit: Leaving)
00:45:13Araqtests suites grow to the point where your suggestion is completely unrealistic
00:45:44flaviuAt which time those test suites need to be optimized.
00:45:50*Menche joined #nim
00:46:12*hellonico quit (Quit: Leaving...)
00:46:30Araqyou cannot optimize them to take as little time as test driven development demands
00:46:30reactormonkAraq, yes, the release version of the compiler - but are the tests which are run also compiled in release mode?
00:46:41Araqreactormonk: no.
00:46:42flaviuEven if once per commit is unrealistic, test suite run time should be less than 5minutes, max.
00:47:14Araqso name a production compiler which has a test suite that only runs for 5 minutes.
00:47:23def-I think go does
00:47:25Araqyou have no idea what you're talking about.
00:47:37*johnsoft quit (Ping timeout: 250 seconds)
00:48:11Araqa proper full test suite can run for months before a release.
00:49:03reactormonkdef-, lemme run
00:49:54*Menche quit (Client Quit)
00:50:00Araqflaviu: we have instead tests that are in groups. touched the GC? --> run the GC tests
00:50:19Araqtouched template handling? --> run the templates tests
00:50:30def-Go even runs all tests when you build the compiler
00:50:38cazovthere's a difference between unit tests and ftests. i'm not sure i've seen any sizeable project with ftests that are optimized for speed
00:50:57flaviuAraq: I'm not familiar with production compilers, but looks like rust and crystal have test suites shorter than 5 min.
00:51:14Araqdef-: then Go either completely lacks long running tests or it doesn't run them.
00:51:32def-Araq: they don't seem to have many tests indeed, takes just 1 minute to run them
00:51:43Araqflaviu: rust doesn't even bootstrap in 5 minutes
00:52:05*johnsoft joined #nim
00:53:42def-wait, I'm wrong, go has some more tests
00:54:13reactormonkdef-, can't bootstrap go from the go installed via package manager :-/
00:54:29flaviuAraq: Good point, looks like they only run lint here: https://travis-ci.org/rust-lang/rust/builds/57285839
00:54:31def-reactormonk: i just built it from source with ./all.bash
00:54:49reactormonkdef-, yup, got Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4
00:55:31reactormonkand if I set that one to /usr it starts complaining
00:56:21*HakanD joined #nim
00:56:26def-Maybe I'm doing something wrong, but for me the Nim tests run in 10 minutes
00:56:33flaviuBut it should be possible to run compiler tests very rapidly if techniques like those used in AFL are used.
00:57:06reactormonklooks like GOROOT_BOOTSTRAP=/usr/lib/go is the correct one
00:57:19reactormonkflaviu, which techniques?
00:58:08reactormonkdef-, looks reasonable
00:58:11EXetoCyou could parallelize across machines
00:58:23reactormonkEXetoC, not very useful
00:59:04reactormonkhow do I test for windows/not windows in the tester?
01:00:05Araq5 minutes is no meaningful number anyway. A 5 minutes pause means I start to do something else. might as well take 10-15 minutes then. 5 minutes is a totally arbitrary number which has no psychological foundation.
01:00:14flaviureactormonk: http://lcamtuf.blogspot.com/2014/10/fuzzing-binaries-without-execve.html
01:00:42*HakanD quit (Ping timeout: 252 seconds)
01:01:09flaviuAraq: Of course it's totally arbitrary, but it's also short enough that it's practical to run the test suite frequently.
01:01:36EXetoCreactormonk: why not? is it still not parallelized across cores though?
01:01:52Araqit's not short enough for development.
01:01:53reactormonkEXetoC, that would be more useful. the average developer doesn't have multiple machines.
01:02:32reactormonkflaviu, you could make a repl compiler with that idea and just feed the tests in
01:03:32reactormonkwell more like fork - read - compile - print - die
01:04:04def-Maybe we could just speed up the Nim compiler in general?
01:04:09flaviuWell, it'd first be useful to instrument and see exactly how slow initialization is, but yeah.
01:04:11reactormonkdef-, I don't think so.
01:04:18reactormonkflaviu, probably not very.
01:04:24reactormonkI mean the compiler startup is probably 0.5s
01:04:41flaviuThat is quite slow.
01:05:10flaviuOn AFL timescales, 500 invocations/second is pretty terrible.
01:05:22reactormonkthey're doing fuzzying
01:05:45flaviuAnd what is a test suite except fuzzing with known input? :)
01:05:58renesacone approach: benchmark each test separatedly and record how much time it takes
01:06:23def-I guess the tests run in < 10 min for me because I'm using this: https://github.com/Araq/Nim/pull/2454
01:06:43renesacthen create a script that runs the tests for a given fixed amount of time given as a parameter
01:06:46def-But that's only if you had them compiled before
01:06:51renesacrunning it from the faster to the slower tests
01:07:02*johnsoft quit (Ping timeout: 246 seconds)
01:07:12renesacof course, some important test may be left because it is too slow
01:07:33reactormonkin the tester, how can I make a new tests that's basically "run this executable and go by the exit code"
01:07:36renesacor it is in a file with a lot other important tests
01:07:44renesacand the benchmark is per file
01:10:40reactormonk... how do I tests a C file?
01:10:48reactormonkwith testament
01:12:01*johnsoft joined #nim
01:27:06*johnsoft quit (Ping timeout: 252 seconds)
01:30:13*EXetoC quit (Ping timeout: 265 seconds)
01:32:02*johnsoft joined #nim
01:34:43Varriountreactormonk: Uh, can you give some info?
01:38:19reactormonkVarriount, currently implemeting a proc to run C files as test.
01:46:56*johnsoft quit (Ping timeout: 246 seconds)
01:51:43*brson joined #nim
01:52:02*BitPuffin quit (Ping timeout: 252 seconds)
01:52:11*johnsoft joined #nim
02:02:30*saml_ quit (Quit: Leaving)
02:03:10*untitaker quit (Ping timeout: 272 seconds)
02:04:41*brson quit (Quit: leaving)
02:05:09*brson joined #nim
02:07:14*johnsoft quit (Ping timeout: 246 seconds)
02:09:19*untitaker joined #nim
02:12:11*johnsoft joined #nim
02:19:55*Menche joined #nim
02:22:58*Senketsu quit (Read error: Connection reset by peer)
02:27:01*johnsoft quit (Ping timeout: 248 seconds)
02:28:12*darkf joined #nim
02:32:02*johnsoft joined #nim
02:46:54*johnsoft quit (Ping timeout: 245 seconds)
02:52:07*johnsoft joined #nim
03:00:51*endragor joined #nim
03:00:53*endragor quit (Remote host closed the connection)
03:01:20*endragor joined #nim
03:07:50*johnsoft quit (Ping timeout: 250 seconds)
03:12:03*johnsoft joined #nim
03:13:14*brson quit (Quit: leaving)
03:13:28*brson joined #nim
03:13:36*brson quit (Client Quit)
03:13:54*brson joined #nim
03:14:13*dashed joined #nim
03:24:18*brson quit (Quit: Lost terminal)
03:24:37*brson joined #nim
03:25:06*MagusOTB joined #nim
03:27:25*johnsoft quit (Ping timeout: 264 seconds)
03:28:20MagusOTBis openarray a thing that can actually be instantiated, or an abstraction?
03:29:17MagusOTBI have a list of things that I don't know the length of until runtime, but when I do, it'll be allocated once to the correct size, and I'm not sure what I should use.
03:30:22*brson quit (Quit: leaving)
03:30:57*brson joined #nim
03:32:02*johnsoft joined #nim
03:47:01*johnsoft quit (Ping timeout: 252 seconds)
03:48:54flaviuMagusOTB: openarray isn't a concrete type
03:48:59flaviuyou're looking for seq.
03:50:29flaviuI think that either newSeq(seqLen) or mySeq.setLen(seqLen) can be used to preallocate space, but it's late and I need to sleep.
03:52:06*johnsoft joined #nim
03:55:28*Menche quit (Read error: Connection reset by peer)
03:56:00*Menche joined #nim
04:07:47*johnsoft quit (Ping timeout: 265 seconds)
04:12:19*johnsoft joined #nim
04:27:36*johnsoft quit (Ping timeout: 256 seconds)
04:32:03*johnsoft joined #nim
04:48:01*johnsoft quit (Ping timeout: 264 seconds)
04:52:09*johnsoft joined #nim
05:07:37*johnsoft quit (Ping timeout: 264 seconds)
05:12:03*johnsoft joined #nim
05:27:16*johnsoft quit (Ping timeout: 255 seconds)
05:32:02*johnsoft joined #nim
05:36:42*brson quit (Quit: leaving)
05:39:44*ChrisMAN quit (Ping timeout: 252 seconds)
05:40:55reactormonkMagusOTB, openarray is just the nim implementation of varargs
05:42:19renesacreactormonk: nim has varargs too
05:42:28reactormonkduh
05:43:00renesacopen array is more like a type you use in function parameters when you expect either seq or array
05:43:10renesac*is a type
05:43:16renesacmore like a concept
05:43:46renesacgood night
05:47:29*johnsoft quit (Ping timeout: 250 seconds)
05:52:16*johnsoft joined #nim
06:03:57*gsingh93 quit (Ping timeout: 250 seconds)
06:08:34*johnsoft quit (Ping timeout: 244 seconds)
06:12:10*johnsoft joined #nim
06:27:19*johnsoft quit (Ping timeout: 245 seconds)
06:32:16*johnsoft joined #nim
06:46:51*HakanD joined #nim
06:47:22*johnsoft quit (Ping timeout: 255 seconds)
06:48:11*HakanD_ joined #nim
06:50:48*HakanD__ joined #nim
06:52:04*johnsoft joined #nim
06:52:19*HakanD quit (Ping timeout: 255 seconds)
06:53:41*HakanD_ quit (Ping timeout: 248 seconds)
07:06:14*endragor_ joined #nim
07:07:02*johnsoft quit (Ping timeout: 250 seconds)
07:08:35*endragor quit (Ping timeout: 246 seconds)
07:12:08*johnsoft joined #nim
07:14:59*endragor_ quit (Remote host closed the connection)
07:22:26*wb joined #nim
07:24:18*dashed quit (Quit: Connection closed for inactivity)
07:27:24*johnsoft quit (Ping timeout: 252 seconds)
07:27:38*EXetoC joined #nim
07:32:11*johnsoft joined #nim
07:36:38*repax joined #nim
07:47:04*johnsoft quit (Ping timeout: 256 seconds)
07:47:38*BlaXpirit joined #nim
07:49:38*Ven joined #nim
07:52:01*johnsoft joined #nim
08:07:23*johnsoft quit (Ping timeout: 246 seconds)
08:12:03*johnsoft joined #nim
08:13:01*endragor joined #nim
08:13:03*endragor quit (Remote host closed the connection)
08:13:32*endragor joined #nim
08:15:36*MyMind joined #nim
08:27:31*johnsoft quit (Ping timeout: 252 seconds)
08:32:20*johnsoft joined #nim
08:32:47*endragor quit ()
08:32:52*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:32:58*endragor joined #nim
08:47:17*johnsoft quit (Ping timeout: 248 seconds)
08:52:05*johnsoft joined #nim
08:56:18*Ven joined #nim
08:57:04*eigenlicht joined #nim
09:04:02*milosn quit (Ping timeout: 250 seconds)
09:06:49*johnsoft quit (Ping timeout: 244 seconds)
09:12:06*johnsoft joined #nim
09:15:45*HakanD__ quit (Read error: Connection reset by peer)
09:19:18*HakanD__ joined #nim
09:27:29*johnsoft quit (Ping timeout: 244 seconds)
09:32:01*johnsoft joined #nim
09:44:30*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:46:50*dtscode is now known as fbi-bot
09:47:22*Ven joined #nim
09:47:27*johnsoft quit (Ping timeout: 252 seconds)
09:48:37*fbi-bot is now known as charmander
09:52:04*johnsoft joined #nim
09:54:29*filwit joined #nim
09:54:43*HakanD__ quit (Read error: Connection reset by peer)
09:55:44*Matthias247 joined #nim
09:57:02*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:00:00*BitPuffin joined #nim
10:01:34*Ven joined #nim
10:07:17*johnsoft quit (Ping timeout: 248 seconds)
10:10:42*repax quit (Quit: repax)
10:11:30*HakanD joined #nim
10:12:01*johnsoft joined #nim
10:15:37*charmander is now known as mewtwo
10:25:29*milosn joined #nim
10:28:09*johnsoft quit (Ping timeout: 256 seconds)
10:32:06*milosn quit (Read error: Connection reset by peer)
10:32:11*johnsoft joined #nim
10:32:47*milosn joined #nim
10:34:09*milosn quit (Read error: Connection reset by peer)
10:35:16*milosn joined #nim
10:36:35*Trustable joined #nim
10:42:45*milosn quit (Read error: Connection reset by peer)
10:43:40*milosn joined #nim
10:47:34*johnsoft quit (Ping timeout: 244 seconds)
10:52:04*johnsoft joined #nim
10:53:58*milosn quit (Ping timeout: 252 seconds)
10:58:19*Senketsu joined #nim
10:59:26*milosn joined #nim
11:00:04*HakanD quit (Ping timeout: 265 seconds)
11:01:19*HakanD joined #nim
11:07:38*jefus__ joined #nim
11:07:38*milosn quit (Read error: Connection reset by peer)
11:07:50*johnsoft quit (Ping timeout: 272 seconds)
11:07:57*milosn joined #nim
11:08:48*milosn quit (Read error: Connection reset by peer)
11:12:01*jefus_ quit (Ping timeout: 264 seconds)
11:12:09*johnsoft joined #nim
11:12:56*milosn joined #nim
11:13:37*TEttinger quit (Ping timeout: 252 seconds)
11:19:47*milosn quit (Read error: Connection reset by peer)
11:20:16*milosn joined #nim
11:22:32*Varriount quit (Quit: Leaving)
11:26:56*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:27:37*johnsoft quit (Ping timeout: 264 seconds)
11:28:31*Ven joined #nim
11:28:31*HakanD quit (Read error: Connection reset by peer)
11:28:35*HakanD_ joined #nim
11:31:53*Pisuke joined #nim
11:32:04*johnsoft joined #nim
11:34:37*MyMind quit (Ping timeout: 264 seconds)
11:38:20*milosn quit (Read error: Connection reset by peer)
11:38:48*milosn joined #nim
11:44:32*BitPuffin quit (Ping timeout: 265 seconds)
11:46:59*johnsoft quit (Ping timeout: 244 seconds)
11:50:54*milosn quit (Ping timeout: 272 seconds)
11:52:05*johnsoft joined #nim
11:56:31*mewtwo is now known as dtscode
12:07:20*johnsoft quit (Ping timeout: 250 seconds)
12:10:52*milosn joined #nim
12:12:05*johnsoft joined #nim
12:13:03*Menche quit (Ping timeout: 265 seconds)
12:14:43*BlaXpirit_ joined #nim
12:16:58*Menche joined #nim
12:18:01*BlaXpirit quit (Ping timeout: 264 seconds)
12:27:19*johnsoft quit (Ping timeout: 252 seconds)
12:32:13*johnsoft joined #nim
12:35:05*jefus__ is now known as jefus
12:35:05*milosn quit (Read error: Connection reset by peer)
12:35:30*milosn joined #nim
12:40:43*Kingsquee quit (Quit: Konversation terminated!)
12:47:12*johnsoft quit (Ping timeout: 250 seconds)
12:52:09*johnsoft joined #nim
12:52:20*milosn quit (Read error: Connection reset by peer)
12:53:33*milosn joined #nim
12:56:30*mpthrapp joined #nim
12:59:57*arnetheduck quit (Read error: Connection reset by peer)
13:07:47*irrequietus joined #nim
13:08:31*johnsoft quit (Ping timeout: 256 seconds)
13:12:03*johnsoft joined #nim
13:12:21*milosn quit (Ping timeout: 248 seconds)
13:14:30*endragor quit (Ping timeout: 272 seconds)
13:15:41federico3http://nim-lang.org/talk01/slides.html
13:15:52federico3very nice examples
13:19:09*Trustable quit (Remote host closed the connection)
13:20:53*milosn joined #nim
13:25:22*arnetheduck joined #nim
13:26:06*endragor joined #nim
13:28:26*johnsoft quit (Ping timeout: 272 seconds)
13:30:31*rational joined #nim
13:32:02*johnsoft joined #nim
13:32:58*endragor quit (Remote host closed the connection)
13:38:00pigmejwhen a proc returns an object, what's the initial value of result?
13:45:35def-pigmej: binary 0
13:47:25*endragor joined #nim
13:53:13*johnsoft quit (*.net *.split)
13:53:13*Menche quit (*.net *.split)
13:53:13*pipeep quit (*.net *.split)
13:53:13*k1i quit (*.net *.split)
13:53:13*Matthias247 quit (*.net *.split)
13:53:19*betawaffle quit (*.net *.split)
13:53:25*ntjnsz quit (*.net *.split)
13:53:25*mahlon quit (*.net *.split)
13:53:25*MattAitchison quit (*.net *.split)
13:53:25*filwit quit (*.net *.split)
13:53:25*ekarlso quit (*.net *.split)
13:53:25*dhasenan quit (*.net *.split)
13:53:25*mnemonikk quit (*.net *.split)
13:53:25*jez0990 quit (*.net *.split)
13:53:25*gmpreussner|work quit (*.net *.split)
13:53:25*fowl quit (*.net *.split)
13:53:25*nulpunkt quit (*.net *.split)
13:53:25*jacksnipe quit (*.net *.split)
13:53:25*elbow quit (*.net *.split)
13:53:25*pigmej quit (*.net *.split)
13:53:25*onionhammer quit (*.net *.split)
13:53:25*mtj quit (*.net *.split)
13:53:25*mrkishi quit (*.net *.split)
13:53:25*rinukkusu quit (*.net *.split)
13:53:25*adam12 quit (*.net *.split)
13:53:25*arnetheduck quit (*.net *.split)
13:53:25*Ven quit (*.net *.split)
13:53:25*EXetoC quit (*.net *.split)
13:53:25*MagusOTB quit (*.net *.split)
13:53:25*walt quit (*.net *.split)
13:53:25*vinnie quit (*.net *.split)
13:53:25*dhasenan_ quit (*.net *.split)
13:53:25*skroll1 quit (*.net *.split)
13:53:25*qfire quit (*.net *.split)
13:53:25*jokra quit (*.net *.split)
13:53:59*johnsoft joined #nim
13:55:22*filwit joined #nim
13:55:22*ekarlso joined #nim
13:55:22*dhasenan joined #nim
13:55:22*mnemonikk joined #nim
13:55:22*jez0990 joined #nim
13:56:41*gmpreussner|work joined #nim
13:56:41*fowl joined #nim
13:56:41*nulpunkt joined #nim
13:56:41*pigmej joined #nim
13:56:41*jacksnipe joined #nim
13:56:41*elbow joined #nim
13:56:41*onionhammer joined #nim
13:56:41*mtj joined #nim
13:56:41*mrkishi joined #nim
13:56:41*rinukkusu joined #nim
13:56:41*adam12 joined #nim
13:58:00*saml joined #nim
13:58:00*Menche joined #nim
13:58:00*pipeep joined #nim
13:58:00*k1i joined #nim
13:58:18*Matthias247 joined #nim
13:58:18*betawaffle joined #nim
13:58:18*ntjnsz joined #nim
13:58:18*mahlon joined #nim
13:58:18*MattAitchison joined #nim
13:58:44*arnetheduck joined #nim
13:58:44*Ven joined #nim
13:58:44*EXetoC joined #nim
13:58:44*MagusOTB joined #nim
13:58:44*walt joined #nim
13:58:44*vinnie joined #nim
13:58:44*dhasenan_ joined #nim
13:58:44*skroll1 joined #nim
13:58:44*qfire joined #nim
13:58:44*jokra joined #nim
14:00:22*saml quit (*.net *.split)
14:00:22*Menche quit (*.net *.split)
14:00:22*pipeep quit (*.net *.split)
14:00:22*k1i quit (*.net *.split)
14:01:06*saml joined #nim
14:01:06*Menche joined #nim
14:01:06*pipeep joined #nim
14:01:06*k1i joined #nim
14:01:10*saml quit (Max SendQ exceeded)
14:01:14*johnsoft quit (Read error: Connection reset by peer)
14:01:34*saml joined #nim
14:01:59*johnsoft joined #nim
14:07:07*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:12:24*Strikecarl joined #nim
14:12:32StrikecarlCan i make my own API?
14:12:56StrikecarlSo i can just import lets say Steam
14:13:05Strikecarland i can get all the procs without having to re define them.
14:13:57def-you can reexport procs from another module or the whole module with "export Steam"
14:17:05StrikecarlHow would i do that?
14:19:34def-by writing "export Steam"
14:20:30renesacyou already have that Steam module?
14:20:35renesacor you need to make bindings to it?
14:21:53StrikecarlI dont already have a direct Module.
14:21:56StrikecarlI just have stuff like
14:21:59Strikecarl"exitSteam"
14:22:04Strikecarl"openSteam"
14:22:17renesacin nim?
14:22:20Strikecarlye
14:22:39Strikecarldef- so i do export steam at the bottom of my already made stuff
14:22:39renesacand why would you need to redefine them?
14:22:54Strikecarland on the new one i do import steam?
14:22:59Strikecarlor export at the top?
14:23:29renesacto export procs in your file, you use "*"
14:23:41renesacthe "export Steam" is to export something you imported
14:23:52Strikecarl*proc openSteam
14:23:56Strikecarlor proc *openSteam
14:23:59Strikecarli guess the second one?
14:24:00renesacat the end
14:24:12Strikecarlproc openSteam*?
14:24:30renesacyeah
14:24:33Strikecarlkk
14:24:39renesachttps://github.com/Araq/Nim/blob/master/lib/pure/collections/sets.nim
14:24:43EXetoC'import Steam' might be what you want then, in addition to exporting with '*' (making available to modules that import it)
14:24:45renesactake a look at any module on nim stdlib
14:25:21renesacexported procs have that *
14:25:30renesacinternal procs like "rawGet" don't
14:25:38renesacand then you import your module
14:25:51*darkf quit (Quit: Leaving)
14:25:54Strikecarlso i add * to the procs i want to export
14:25:58Strikecarlthen in the new .nim
14:26:07Strikecarli just do import nameoffilehere
14:26:14Strikecarland i got them?
14:26:14renesacyeah
14:26:17StrikecarlGreat!
14:26:50renesacdon't forget to add * to the types/objects you want to export too
14:27:01Strikecarl:=)
14:27:18EXetoCd(:)|<
14:27:40Strikecarlthat's one weird fish, EXetoC
14:28:29EXetoCyou forgot to tilt your head
14:28:54*Ven joined #nim
14:29:06Strikecarloh
14:33:45StrikecarlHow do i read REG_SZ's?
14:44:09*milosn quit (Ping timeout: 250 seconds)
14:49:00*yymoto2 joined #nim
14:49:49*jholland joined #nim
14:50:06*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:55:12*pafmaf_ joined #nim
15:00:39*yymoto2 quit (Quit: leaving)
15:08:42endragorDo I understand it correctly that there is no point in making "immutable classes" in Nim? i.e. classes instances of which cannot be modified. Because you'll just use "let" if you don't want your instance to be modifiable
15:09:49def-endragor: sounds right
15:12:52Araqso ... I think I figured out how overloading of '=' should work in Nim. :-)
15:13:55Araqas a side-effect you can implement an efficient shared memory GC all in userland, I think.
15:14:03*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:15:18Araqthe basic idea is that a macro can be invoked for '=' which then can inspect the ASTs and generate highly efficient write barriers
15:19:35EXetoC:o
15:20:04filwitinteresting
15:23:44endragoris there a way to override object constructor? or at least hide it?
15:24:58EXetoCneat
15:26:59AraqI read about similar in a children's book once. :-)
15:27:38def-endragor: don't export the fields? then you can only use the object constructor to make an empty object, same as with "var x: Foo"
15:29:16endragornot exactly. Basically I want to ensure that objects of my class always satisfy certain properties. I won't be able to do that, if I allow clients to call constructor setting arbitrary fields
15:29:43def-the clients could always just overwrite the raw memory
15:29:45endragorso I want to have my own constructor, and not allow the default one
15:29:59endragorwell, yes, but then they are on their own
15:32:55*Ven joined #nim
15:33:46endragora pragma like {.noConstructor.} would be nice
15:35:43filwitendragor: there's been much discussion about this. You're not alone. I've started an official proposal and patch, but I've another project I spend Nim time on too, so no strong ETA just yet.
15:36:17Araqendragor: also .noConstructor doesn't work well with newSeq[Foo]()
15:36:57Araqthe language assume the axiom of choice is available, so a Foo can be constructed without passing any parameters around
15:37:23Araqit keeps surprising me how often this little detail is overlooked
15:37:51Araqas a result objects without default constructor don't work well in C++ either.
15:38:01Araqbbl
15:38:07filwitit's not overlooked, Araq.. it's just often you want sensible defaults for a type, and often that's not it's member's defaults
15:38:10endragorwell, ok, what if I add *my own* implementation of empty constructor?
15:38:26endragorand if I don't, throw compile-time error
15:40:23endragorempty constructor is not necessarily equal to "fields have default values". There can be more logic involved. Although in my case empty constructor = fields with default. And I only want to control non-empty constructor
15:41:49*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:50:54*HakanD__ joined #nim
15:55:01*HakanD_ quit (Ping timeout: 264 seconds)
15:55:36*ChrisMAN joined #nim
15:55:58endragorcan you declare multidimensional array in Nim?
15:56:05endragore.g. 2x2 matrix
15:56:47filwitarray[2, array[2, float]]
15:57:00endragorthanks
15:59:12*Ven joined #nim
16:00:59*endragor quit (Remote host closed the connection)
16:01:06renesachttps://www.openhub.net/p/Nimrod <-- why does it think nimrod is mostly written in C?
16:01:18renesacit must be the C sources directorty
16:02:27renesacand the name should be changed
16:02:58renesachttps://www.openhub.net/sessions/new <--- does anyone have an account there?
16:03:24*filwit quit (Quit: Leaving)
16:04:04renesacand even more strange is the 6% of python
16:05:14renesachttps://www.openhub.net/p/Nimrod/analyses/latest/languages_summary <-- WTF
16:05:26federico3besides, is openhub still useful/relevant?
16:05:42renesacI don't know, but it has pretty graphics
16:05:57federico3heh :)
16:06:43*milosn joined #nim
16:06:44renesacfederico3: can you fill the "TODO" parts on the nim for python programmers?
16:07:03federico3renesac: I just added few data structures a minute ago
16:07:04renesacwith the problem you had an your solution
16:07:11renesacbefore you forget it
16:07:28renesacoh, cool
16:16:15*endragor joined #nim
16:30:13*brson joined #nim
16:37:45Araqendragor: "there can be more logic involved" yes but very often you can also simply make the default value have proper semantics
16:41:23endragorthat's true. As I said, my concern is mostly about non-default constructor.
16:43:25BlaXpirit_honestly, i wouldn't mind constructors disappearing from the language altogether
16:44:17BlaXpirit_even their syntax feels out of place
16:47:10AraqBlaXpirit_: tuple construction: (field: 2, fieldB: 4)
16:47:28Araqobject construction: Obj(field: 2, fieldB: 4)
16:47:39Araq"out of place" my ass
16:47:41BlaXpirit_that's cool
16:54:12Araqendragor: type Foo {.requiresInit.} = object
16:54:14Araq a, b: int
16:54:15Araqvar f: Foo # cannot prove 'f' is initialized
16:55:57endragorAraq: thanks. but I'm looking to override behaviour of Obj(field: 2, fieldB: 4) (or to hide it altogether, and provide my own newObj() proc)
16:57:54endragorto be more concrete, I have Fraction class, and I want to make sure objects of the class are always normalized, which means gcd(numerator, denominator) == 1 and denominator is positive. Without this, almost in every procedure I implement for my fractions, I have to normalize the input fraction first
16:59:10Araqyou can always map denominator to denominator+1 internally :P
16:59:27Araqand then (0,0) is a valid fraction
16:59:54Araqbtw he have fractions in the stdlib now.
17:00:17endragorWhere?
17:00:27Araqin devel
17:00:37endragorhaving (0,0) as valid fraction is odd
17:00:56endragorand that doesn't solve the problem of keeping the fraction normalized
17:01:50Araqyou only need to normalize the result anyway, not the input
17:02:32endragorif I want to compare fractions, I have to normalize them first
17:02:33federico3renesac: I still don't have an answer
17:05:02endragorAraq: how's new fractions module called?
17:05:16Araqlib/pure/rationals.nim
17:06:06*Trustable joined #nim
17:16:03*yeye123 joined #nim
17:27:50*endragor quit (Remote host closed the connection)
17:37:44*gever-gever quit (K-Lined)
17:41:44*BitPuffin joined #nim
17:44:55*HakanD__ quit (Read error: Connection reset by peer)
17:48:52*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:49:31*Ven joined #nim
17:52:25*repax joined #nim
17:53:32*Ven quit (Client Quit)
18:03:07*BitPuffin quit (Ping timeout: 244 seconds)
18:15:40*Strikecarl joined #nim
18:16:00*elbow is now known as elbow_jason
18:26:36StrikecarlLittle problem regarding ftpclient
18:26:47StrikecarlWhen i excecute "connect()"
18:27:14Strikecarli get the error code 220, but it expects 230 or 331, i am running a private FTP system that gives me 220 when i login.
18:27:25Strikecarlany way i can add the code 220 to be acceptable?
18:31:27*gsingh93 joined #nim
18:33:33*Trustable quit (Quit: Leaving)
18:35:57AraqStrikecarl: fix the ftpclient module then
18:37:17StrikecarlAlso, Araq, what lib allows me to read registry?
18:37:18StrikecarlWinlean?
18:40:59*Trustable joined #nim
18:44:37federico3the documentation pages are missing a nice search function :)
18:44:53Strikecarlc:
18:46:06flaviuhttp://nim-lang.org/theindex.html
18:46:55federico3thanks flaviu
18:50:41*HakanD joined #nim
18:54:34AraqStrikecarl: we don't have a registry lib, only the raw winapi stuff in windows.nim
18:54:46StrikecarlYeah, trying to use it atm.
18:57:28*Menche quit (Ping timeout: 245 seconds)
19:01:12federico3a non-blocking readline from stdin?
19:02:06dom96federico3: doesn't exist
19:02:23dom96I was able to get it working with asyncfile on Linux
19:02:29dom96but it doesn't work on Windows IIRC
19:03:39federico3dom96: any hope if I check the size of the stdin file maybe?
19:04:09dom96You'd be better off getting async working with it I think
19:08:17federico3ok, I can do a readline inside an .async. - but then where do I put the output?
19:08:35dom96not sure what you mean
19:08:43dom96you can return data from async procs
19:09:49reactormonkfederico3, for dictionaries, use tables, not hashset
19:10:26*Pisuke quit (Ping timeout: 272 seconds)
19:11:30federico3yet, I don't want to block on await
19:15:42*Menche joined #nim
19:16:49federico3*sigh*
19:17:45reactormonkfederico3, so yu basically want a future and continue on that?
19:24:43StrikecarlCan anyone give me an example of RegQueryValueExA?
19:26:38federico3I'm not sure: one option is have a "thread" wait on input and execute procs that will change the status of some objects while another "thread" mostly sleep and prints the objects status.
19:27:03federico3reactormonk: and I suspect it won't work because both "threads" are reading/writing attributes on the same objects
19:28:41Araqfederico3: can you elaborate on what you're trying to do?
19:29:24federico3another option is to simply use async to implement a stdin.readline() with a timeout
19:34:10federico3Araq: generally speaking I want to react to two type of events: a new line in stdin or 1 second has elapsed
19:37:53*Menche quit (Quit: Leaving)
19:38:45*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
19:39:38*pafmaf_ quit (Quit: This computer has gone to sleep)
19:43:17Araqfederico3: sounds like you want 3 threads. 1 waiting on stdin, 1 using a timer and the main thread waiting on a channel. the other 2 threads writing to the channel
19:46:42dom96async await supports timers
19:46:43*ChrisMAN quit (Read error: Connection reset by peer)
19:47:03dom96You can wait 2 futures.
19:47:05dom96*await
19:47:31dom96So you can combine sleepAsync() with stdin.readLine (once you implement it for stdin)
19:48:18*yeye123 quit (Quit: Leaving)
19:49:37*Etheco quit (Quit: Leaving)
19:52:59*UberLambda joined #nim
20:29:24*ChrisMAN joined #nim
20:31:11*fizzbooze joined #nim
20:37:35*pafmaf joined #nim
20:39:09federico3dom96: by starting an async readline and an async sleepasync together and then having the latter go and complete the future from the readline?
20:39:19*Trustable quit (Remote host closed the connection)
20:40:48dom96federico3: no. You can start them both and then: await readLineFut or sleepAsync(1000)
20:40:59dom96execution will then resume once either is finished
20:41:10dom96then you can check which finished
20:41:32dom96with .finished
20:41:37federico3oh, awaits to both together, I see
20:48:03*repax quit (Quit: repax)
20:52:42*HakanD quit (Quit: Be back later ...)
21:02:15*bat_R joined #nim
21:02:27*jefus_ joined #nim
21:02:27*user7181 joined #nim
21:03:04*bat_R quit (Client Quit)
21:03:55*mwbrown joined #nim
21:05:05*jefus quit (Ping timeout: 256 seconds)
21:07:03*walt is now known as ggVGc
21:12:02*mpthrapp quit (Ping timeout: 272 seconds)
21:23:20Araqarnetheduck: well now the compiler outputs a shiton of deprecation warnings
21:24:36*user7181 quit (Quit: leaving)
21:27:09dtscodedidnt it before
21:27:10dtscode?
21:28:10Araqno.
21:28:24dtscodehmmm
21:32:06*Joe-T joined #nim
21:33:52*user7181 joined #nim
21:38:20*mpthrapp joined #nim
21:43:42*mpthrapp quit (Ping timeout: 272 seconds)
21:44:48*mwbrown quit (Ping timeout: 252 seconds)
21:48:09*zama quit (Ping timeout: 245 seconds)
21:49:01*zama joined #nim
21:50:07*a5i quit ()
21:55:46*BitPuffin joined #nim
21:56:16*nortiero joined #nim
21:58:26*nortiero left #nim (#nim)
21:58:37*nande joined #nim
22:00:16*fizzbooze quit (Quit: WeeChat 1.1.1)
22:13:18*UberLambda quit (Remote host closed the connection)
22:14:15*a5i joined #nim
22:17:54*Joe-T quit (Quit: ZNC - http://znc.in)
22:18:06*Matthias247 quit (Read error: Connection reset by peer)
22:22:41Araqso ... today I implemented the last missing feature for version 1.0. now "only" bugs and "minor" things are left ...
22:23:42fowlwhat feature
22:23:58Araqoverloading of the assignment operator
22:24:11ldleworkwas that hard
22:24:16ldleworkfor you, I mean
22:24:40Araqit was tedious
22:24:45*ldlework nods.
22:25:18Araqand afterwards I had a couple of brilliant ideas ...
22:25:35BlaXpirit_i'm just scared that the standard library would be frozen
22:26:08BlaXpirit_you can't deny that parts of it were built chaotically
22:26:28Araq*shrug*
22:26:49Araqyou didn't even manage to push the regex patches upstream
22:27:28BlaXpirit_i didn't like the changes because they can't work well based on the "re" library
22:27:36flaviuAraq: I've been playing with rust recently. You were right, Result<> everwhere is a PITA.
22:27:41flaviuExceptions do work better.
22:27:58Araqhrm ... i need to save this somewhere
22:28:01ldleworklol
22:28:17Araqbut oh well the channel is logged
22:28:27flaviuhaha :)
22:29:01ldleworkflaviu: how's modern rust treating you in other respects?
22:32:30AraqBlaXpirit_: IMO all we need to do is to integrate Nimble with the installer and ensure it works really well. I don't want to maintain the stdlib really, I want to trim it.
22:32:50BlaXpirit_trimming it would be great
22:32:55BlaXpirit_Araq, i said earlier that there is just too much to fix about the current "re" library
22:33:16BlaXpirit_we have a new beautiful lib
22:33:21AraqBlaXpirit_: works for my projects though
22:33:35flaviuldlework: It's pretty nice, with problems, of course. I need to have some generics in non-generic code, which I assume is because of borrow checker. Documentation tends to be incomplete, although I do like their "stable", "deprecated", "experimental" categories.
22:34:23BlaXpirit_and the changes to "random" - i'm at a loss
22:34:34BlaXpirit_so many difficulties about it
22:35:11BlaXpirit_RAND_MAX can't be a constant and isn't even guaranteed to be a power of two
22:35:46BlaXpirit_i used to advocate removing it and just leaving rand() but then i remembered about JS backend
22:39:11BlaXpirit_i don't do pull requests about the standard library because it often feels foreign to me.
22:39:39BlaXpirit_we have functions operating on arrays when we could have them work on iterators too, for free
22:40:12BlaXpirit_but there is no infrastructure for that
22:41:07BlaXpirit_there is 0 support for custom container types
22:41:56BlaXpirit_if i make a super awesome sparse array, i can't use sequtils on it
22:42:39Araqwhy not? mapIt just requires an 'items' iirc
22:43:13BlaXpirit_hm let me see
22:43:45BlaXpirit_ok the templates would work
22:45:19Araqand 'concept' just recently got a nice name
22:46:01BlaXpirit_concepts for collections/containers are sorely needed
22:46:34def-BlaXpirit_: they don't work well enough yet in my experience
22:47:06BlaXpirit_openarray is harmful
22:47:49BlaXpirit_it's literally better to just use a generic than openarray
22:48:37BlaXpirit_(let alone seq)
22:50:27Araqdef-: any bug number I should give priority? (for concepts)
22:50:35*brson quit (Quit: leaving)
22:50:49BlaXpirit_I tried to make a concept for "random access container" and failed
22:51:17Araqlen and [] ?
22:51:30Araqwhat is your definition of it?
22:51:49BlaXpirit_https://github.com/BlaXpirit/nim-random/blob/a18cb/src/random/private/util.nim#L32
22:51:55BlaXpirit_low,high,len,[]
22:52:45BlaXpirit_i tried different things, there used to be a [T] of course
22:54:56BlaXpirit_hm it actually seems to work now. c[0] is T
22:55:16def-Araq: I haven't tried much but this didn't work: https://github.com/Araq/Nim/pull/2449#commitcomment-10564458
22:55:37*wb quit (Ping timeout: 264 seconds)
22:59:40BlaXpirit_yeah, definitely seems like concept was improved recently
23:00:32Araqdef-'s stuff is spot on though
23:02:10fowlnooo
23:02:17fowlcontainer[t] isnt useful
23:02:47BlaXpirit_k
23:02:55Araqfowl: why not?
23:03:18fowlAraq, this is actually Iterable[T]
23:03:39BlaXpirit_no need for low,high then
23:04:03Araqfowl: it's only a name
23:04:13Araqwe wonder why it doesn't work
23:04:35BlaXpirit_anything's better than just making the whole standard libreary work only for seq
23:04:35fowlit does work if you remove the ordinal stuff
23:04:41fowland the "value.type is T" which is weird
23:05:10def-well, that example is mostly from the manual iirc
23:05:21Araqyeah
23:05:22*pafmaf quit (Quit: This computer has gone to sleep)
23:05:25BlaXpirit_ordinal actually doesn't work
23:05:28BlaXpirit_SomeInteger does
23:05:47Araqinteresting
23:05:53fowlAraq, whats the point of being able to pass multiple args to concept
23:06:09Araqhrm?
23:06:09fowlie you could have "concept x, var y" does that mean y is the var version of x?
23:06:31Araqgood question
23:06:40def-oh right, ordinal doesn't even exist
23:06:45def-it's SomeOrdinal
23:06:58Araqyeah that's actually the biggest problem
23:07:02Araqmake a typo
23:07:13Araqand nothing whatsoever is reported!
23:07:36BlaXpirit_i don't know what happened, but i tried this not so long ago and nothing worked
23:07:39BlaXpirit_now everything is great
23:07:50*jefus__ joined #nim
23:07:58AraqBlaXpirit_: well I *did* fix some things wrt concept
23:08:04BlaXpirit_great
23:08:37BlaXpirit_is it time to replace openarray with concepts?
23:09:17fowldef-, theres also Ordinal
23:09:45Araqwtf if I replace ordinal with SomeOrdinal everything works? :O
23:09:54def-Araq: yes, seems so
23:10:43fowlpairs() doesnt
23:10:57*vendethiel quit (Ping timeout: 250 seconds)
23:11:04BlaXpirit_pairs is weird btw
23:11:44*jefus_ quit (Ping timeout: 272 seconds)
23:12:29BlaXpirit_nvm i should go sleep
23:13:08*BlaXpirit_ quit (Quit: Quit Konversation)
23:13:12*pafmaf joined #nim
23:14:12*TEttinger joined #nim
23:18:05*pafmaf quit (Client Quit)
23:19:37*Joe-T joined #nim
23:20:17onionhammerAraq we need to trim more out of the std lib
23:20:23onionhammerand work on making nimble a lot better
23:20:41federico3can I "map" an integer to an eval value?
23:26:10Araqonionhammer: well? you just like to repeat what I said?
23:26:23fowlfederico3, do you mean fold?
23:26:34onionhammeraraq dont see a lot of movement
23:26:39onionhammeron that front
23:27:02Araqwe made several things Nimble packages
23:27:07onionhammermonths ago
23:27:08federico3fowl: yep
23:27:10onionhammerbut theres a lot more
23:27:24fowlfederico3, fold would be for example going from @[1,2,3] apply operation `+` and end up with 6
23:27:30onionhammerunless you did more recently
23:27:34fowlfederico3, there is foldl/foldr in sequtils
23:27:56Araqwell I can only work every day and hope my wife doesn't file for divorce.
23:28:14federico3hm, I mean, given an integer, extract the enum value where ord(value) == int
23:28:38fowlfederico3, that is easy
23:28:51fowlfederico3, just use type conversion on the int
23:29:04onionhammerAraq maybe just mark them, you dont have to do the work of moving them
23:29:09fowl.eval type tx = enum aa,bb,cc; echo tx(1)
23:29:13Mimbusfowl: bb
23:29:20onionhammerAraq nimble needs to improve, and the lib list needs to include nimble packages
23:29:22federico3thanks!
23:29:55Araqonionhammer: make the db_* modules a Nimble package
23:29:55*user7181 quit (Quit: leaving)
23:30:09Araqgraphics.nim -- Nimble package
23:30:13onionhammerdo they even still work?
23:30:35Araqquite sure they do
23:30:42AraqI regularly get PRs about them
23:34:37onionhammerwell, i'm not really interested in maintaining nimble projects that i didnt write; it'd be better if they were moved into nim-code or something
23:34:55Araqisn't that nim-lang by now?
23:35:13onionhammerright, thats the one i mean
23:35:31Araqalso the distribution should bundle these somehow
23:35:40onionhammerthat would be nice
23:36:28Araqheck with 100+ packages we could even bundle everything, I think
23:36:31onionhammerthe distribution of nim could be built on nimble
23:36:55Araqwell make it happen
23:36:56*irrequietus quit ()
23:37:02onionhammernimble install oldstdlib :P
23:38:06onionhammeri'm going to have a ton of free time... after july :P
23:38:47Araqwant to watch me on OSCON. a wise move :P
23:39:54onionhammerhmm?
23:40:03onionhammerim out of the loops :)
23:40:28*Menche joined #nim
23:41:51def-http://www.oscon.com/open-source-2015/public/schedule/detail/42497
23:42:18Araqoh so it's finally online
23:46:52reactormonkonionhammer, how would you make nimble better?
23:48:22Araqgood night
23:53:27*HakanD joined #nim
23:57:29*netroby joined #nim
23:57:36*HakanD quit (Ping timeout: 240 seconds)
23:59:50*Kingsquee joined #nim