<< 24-04-2015 >>

00:00:41*Jesin quit (Quit: Leaving)
00:02:04*alex98 quit (Ping timeout: 246 seconds)
00:04:10*vendethiel quit (Ping timeout: 255 seconds)
00:04:42*Jesin joined #nim
00:09:04*antranigv quit (Remote host closed the connection)
00:10:23*gsingh93 quit (Ping timeout: 256 seconds)
00:14:02*Sharcho quit (Ping timeout: 272 seconds)
00:15:20*saml_ joined #nim
00:15:35*vendethiel joined #nim
00:16:36*aboisvert joined #nim
00:21:35*Sembei quit (Read error: Connection reset by peer)
00:22:20*MyMind joined #nim
00:25:03*aboisvert quit (Quit: aboisvert)
00:25:32*aboisvert joined #nim
00:27:40*aboisvert quit (Client Quit)
00:27:58*brson quit (Quit: leaving)
00:28:27*brson joined #nim
00:31:35*aboisvert joined #nim
00:36:33*vendethiel quit (Ping timeout: 246 seconds)
00:53:41*gsingh93 joined #nim
00:54:05*aboisvert quit (Quit: aboisvert)
00:55:30*vendethiel joined #nim
01:04:52*TEttinger joined #nim
01:06:08*TEttinger quit (Client Quit)
01:09:33*cmk_zzz_ quit (Ping timeout: 244 seconds)
01:10:47*TEttinger joined #nim
01:14:08*aboisvert joined #nim
01:15:48*brson quit (Quit: leaving)
01:18:23*vendethiel quit (Ping timeout: 256 seconds)
01:27:49*johnsoft quit (Ping timeout: 248 seconds)
01:36:04*vendethiel joined #nim
01:40:07*johnsoft joined #nim
01:43:18*cmk_zzz_ joined #nim
01:44:49*aboisvert quit (Quit: aboisvert)
01:51:44*aboisvert joined #nim
02:09:18*cmk_zzz_ quit (Ping timeout: 272 seconds)
02:17:55*aboisvert quit (Quit: aboisvert)
02:19:03*Demon_Fox_ joined #nim
02:19:06*Demon_Fox_ quit (Remote host closed the connection)
02:19:34*gsingh93 quit (Ping timeout: 250 seconds)
02:23:46*Demon_Fox quit (Remote host closed the connection)
02:29:25*xcombelle joined #nim
02:35:33*EXetoC quit (Ping timeout: 246 seconds)
02:40:56*vendethiel quit (Ping timeout: 240 seconds)
02:42:12*aboisvert joined #nim
02:42:59*xcombelle quit (Quit: Leaving)
02:43:43*aboisvert quit (Client Quit)
02:44:25*darkf joined #nim
02:55:01*vendethiel joined #nim
03:11:28*filwit quit (Quit: Leaving)
03:18:44*saml_ quit (Remote host closed the connection)
03:45:22*vendethiel quit (Ping timeout: 252 seconds)
03:48:38*vendethiel joined #nim
04:05:12*endragor joined #nim
04:10:15*vendethiel quit (Ping timeout: 250 seconds)
04:12:07*vendethiel joined #nim
04:17:00*gsingh93 joined #nim
04:21:59*aboisvert joined #nim
04:33:18*vendethiel quit (Ping timeout: 245 seconds)
04:33:20*a5i quit (Quit: Connection closed for inactivity)
04:43:07*vendethiel joined #nim
04:47:02*dtscode quit (Quit: ZNC - 1.6.0 - http://znc.in)
05:03:41*yglukhov joined #nim
05:05:37*vendethiel quit (Ping timeout: 256 seconds)
05:08:27*yglukhov quit (Ping timeout: 256 seconds)
05:16:39*yglukhov joined #nim
05:19:52*vendethiel joined #nim
05:20:53*yglukhov quit (Ping timeout: 250 seconds)
06:06:24*vendethiel quit (Ping timeout: 265 seconds)
06:09:05*touch quit (Ping timeout: 256 seconds)
06:14:19*BlaXpirit joined #nim
06:17:00*vendethiel joined #nim
06:17:37*gokr_ joined #nim
06:26:50*yglukhov joined #nim
06:31:26*gsingh93 quit (Ping timeout: 244 seconds)
06:39:42*vendethiel quit (Ping timeout: 244 seconds)
06:40:03*endragor_ joined #nim
06:43:39*endragor quit (Ping timeout: 256 seconds)
06:46:09*Demon_Fox joined #nim
06:46:53*endragor_ quit (Remote host closed the connection)
06:49:45*Ven joined #nim
06:53:00*gokr joined #nim
06:53:08*clynamen quit (Ping timeout: 246 seconds)
06:57:46*endragor joined #nim
07:12:18*NimBot joined #nim
07:13:48*vendethiel joined #nim
07:15:08*bjz joined #nim
07:24:27*endragor quit (Remote host closed the connection)
07:30:12*BlaXpirit_ joined #nim
07:32:29*ingsoc joined #nim
07:32:55*BlaXpirit quit (Ping timeout: 244 seconds)
07:33:00*Jesin quit (Quit: Leaving)
07:35:28*vendethiel quit (Ping timeout: 250 seconds)
07:39:12*johnsoft quit (Read error: Connection reset by peer)
07:39:42*johnsoft joined #nim
07:42:43*repax quit (Read error: Connection reset by peer)
07:46:36*vendethiel joined #nim
07:47:10*repax joined #nim
07:48:09*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:50:33*Trustable joined #nim
08:02:45*repax quit (Read error: Connection reset by peer)
08:06:04*repax joined #nim
08:10:36*coffeepot joined #nim
08:11:41*coffeepot quit (Client Quit)
08:11:55*bjz joined #nim
08:12:06*coffeepot joined #nim
08:12:20*xcombelle joined #nim
08:12:59*bjz quit (Client Quit)
08:13:56*bjz joined #nim
08:16:04*Pisuke joined #nim
08:19:50*bjz quit (Ping timeout: 256 seconds)
08:27:31*endragor joined #nim
08:30:20*vendethiel quit (Ping timeout: 276 seconds)
08:33:24*cmk_zzz_ joined #nim
08:34:06*HakanD__ joined #nim
08:38:45*HakanD__ quit (Ping timeout: 248 seconds)
08:42:41*milosn quit (Ping timeout: 276 seconds)
08:46:43*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:51:36*HakanD__ joined #nim
08:56:04HakanD__Morning
08:58:17coffeepotGood morning :)
09:02:32*Sharcho joined #nim
09:07:00*vendethiel joined #nim
09:12:03*gokr quit (Read error: Connection reset by peer)
09:25:28*bjz joined #nim
09:30:08*vendethiel quit (Ping timeout: 276 seconds)
09:35:30*xificurC_ joined #nim
09:42:22*ingsoc quit (Read error: Connection reset by peer)
09:42:40*ingsoc joined #nim
09:48:10*Senketsu quit (Quit: Leaving)
09:55:34*BlaXpirit_ quit (Quit: Quit Konversation)
10:00:32*vendethiel joined #nim
10:24:21*vendethiel quit (Ping timeout: 248 seconds)
10:24:32*clynamen joined #nim
10:27:53*vendethiel joined #nim
10:28:28*HakanD___ joined #nim
10:32:01*HakanD__ quit (Ping timeout: 256 seconds)
10:47:02*Kingsquee quit (Quit: Konversation terminated!)
10:50:34*vendethiel quit (Ping timeout: 256 seconds)
10:53:32*mrkishi joined #nim
10:54:22*a5i joined #nim
10:54:43*mrkishi quit (Client Quit)
10:55:11*mrkishi joined #nim
10:57:00*mrkishi quit (Max SendQ exceeded)
10:57:39*mrkishi joined #nim
11:00:55*cmk_zzz_ quit (Ping timeout: 256 seconds)
11:05:12*vendethiel joined #nim
11:11:53*OnO joined #nim
11:21:11*OnO quit (Quit: Textual IRC Client: www.textualapp.com)
11:24:30*saml_ joined #nim
11:26:13*vendethiel quit (Ping timeout: 245 seconds)
11:27:33*Demos joined #nim
11:28:50*vendethiel joined #nim
11:30:09*yglukhov quit (Quit: Be back later ...)
11:31:05*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:32:05*cmk_zzz_ joined #nim
11:37:26*Ven joined #nim
11:37:45*cmk_zzz_ quit (Ping timeout: 256 seconds)
11:42:42*TEttinger quit (Ping timeout: 256 seconds)
11:45:04*banister joined #nim
11:48:00SharchoHow do I resize a sequence?
11:51:05*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:51:17*EXetoC joined #nim
11:51:21*vendethiel quit (Ping timeout: 256 seconds)
11:53:04*vendethiel joined #nim
11:57:35repaxSharcho: system.setLen
11:58:01*touch joined #nim
11:59:07Sharchorepax: thanks!
12:05:04*banister joined #nim
12:08:09xificurC_I was browsing through documentation, learning material, forum posts etc for the last 1-2 hours but couldn't find a clear answer on 2 things - a) does nim have higher kinded types? b) is there a safe way to handle null pointer exceptions?
12:10:27xificurC_these qestions struck me when reading db_sqlite's getRow - returning a bunch of TRows with empty strings in case of no rows. I was expecting an Option (Some/None, Just/Nothing)
12:13:33repaxI'm not an expert, but I think that the answer to both questions is no.
12:14:07dom96I'm not sure exactly what constitutes higher kinded types but perhaps Nim's object variants would qualify
12:14:28dom96as for b) https://github.com/Araq/Nim/pull/2515
12:14:47repaxblaxspirit had an implementation for a Option/Maybe type a few days ago. I'm not sure if it has accepted yet
12:15:20repax*(has been accepted)
12:15:24EXetoCit looked an awful lot like good old generic types to me, but I'll have to read on then
12:17:02*yglukhov joined #nim
12:20:11*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:22:15xificurC_dom96: I'm just curious how rich the type system is compared to ML languages like Haskell or Ocaml
12:22:31xificurC_parametric polymorphism, ad-hoc polymorphism
12:24:21*OnwardEuler joined #nim
12:24:44xificurC_and for null safety - I personally like it when a potential failure is type encoded, with a parametrized Maybe/Option/Error. That way the compiler can ensure your code is safe
12:26:52repaxxificurC_: Null safety with a Maybe/Option is something I think we should have. That it not really the same thing as null pointer exceptions, though
12:28:23*banister joined #nim
12:28:28*banister quit (Max SendQ exceeded)
12:28:38xificurC_repax: forgive my mistakes, I'm a mostly self-studied programmer and often call things by wrong name
12:29:34repaxThe implementation by blaxpirit generalises Nullable so that any type can potentially adopt it (where appropriate). That makes for efficient and safe handling of, say, pointers that may be nil
12:30:17EXetoCno credit to fowl? :p or are any similarities accidental?
12:30:38repaxEXetoC: credit to anyone involved. I don't know the whole story ;)
12:30:51AraqxificurC_: there has been some work on higher kinded types, but I think right now it simply crashes the compiler ;-)
12:31:59EXetoCxificurC_: there's "not nil"
12:32:26Araqproc p[T, S](x: T[S]): bool = false
12:32:36AraqError: no generic parameters allowed for T
12:32:48Araqso ... good news: it doesn't crash the compiler ;-)
12:32:56xificurC_Araq: :)
12:33:15xificurC_I see on gh that windows doesn't compile right now?
12:33:23EXetoCand many programs will afford to be compiled with certain safety switches
12:33:46xificurC_or linux x86_64? That's rather important!
12:34:12Araqyeah well I'm working on it but the builder's error messages are not helpful at all
12:35:12Araqthis switch from nimbuild to some generic soulless build system was a huge mistake IMO
12:35:45Araq"not invented here syndrome" my ass, at least the home grown solution kind of worked
12:35:50EXetoCthere's no switch specifically for null checks?
12:36:04*gokr joined #nim
12:36:09xificurC_Araq: can't you move back if you wish to?
12:36:34AraqEXetoC: there is but it has never been implemented
12:36:46EXetoCok
12:38:18xificurC_a couple more questions - dead code elimination works on imported modules as well? E.g. if I import strutils but only use a subset of the module it'll only pull in that much? The question sounds rather silly once written
12:38:43*gokr_ quit (Ping timeout: 245 seconds)
12:39:06xificurC_forgot the other question :<
12:39:10EXetoCI'd assume so, since if you import then it's resolved at compile time
12:39:40AraqxificurC_: well switching back requires a dom96 with time
12:40:20xificurC_EXetoC: that's pretty cool
12:43:36*saml_ quit (Ping timeout: 240 seconds)
12:44:24EXetoCthat doesn't make much sense actually, but the answer is yes. it can also be controlled for individual modules, as is the case for many switches witch have an associated pragma ({.deadCodeElimination: on.} for example)
12:45:14EXetoCso things could be fine-tuned in order to provide a good balance between performance and safety
12:46:53xificurC_god I don't want to be on windows anymore..
12:47:12xificurC_Araq: any wild time estimate when will the build work again?
12:47:30Araqit does work, it's the tester that fails
12:48:03xificurC_Araq: oh, a surprising plot twist
12:48:31*rrrrrrrr joined #nim
12:54:12*mpthrapp joined #nim
12:54:35*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:55:48*gokr quit (Ping timeout: 245 seconds)
12:56:31*vendethiel quit (Ping timeout: 256 seconds)
13:03:24*vendethiel joined #nim
13:11:26*EulersBackup joined #nim
13:15:34*OnwardEuler quit (Ping timeout: 272 seconds)
13:25:01*zama quit (Ping timeout: 264 seconds)
13:30:28*Sharcho quit (Ping timeout: 264 seconds)
13:30:36*saml joined #nim
13:33:19*milosn joined #nim
13:34:32*johnsoft quit (Ping timeout: 276 seconds)
13:40:24*johnsoft joined #nim
13:41:07*zama joined #nim
13:45:05*xyz_ joined #nim
13:45:10xyz_hello
13:45:32xyz_is there a way to set the step of a for loop?
13:45:58def-xyz_: for i in countup(0, 100, 10):
13:47:01*vendethiel quit (Ping timeout: 248 seconds)
13:47:14xyz_def-: does this make sense?
13:47:18xyz_for i in countdown(digits, 1, 14)
13:48:29def-I don't know
13:48:45xyz_ok i'll try it
13:50:27xificurC_I added mingw64 in powershell's path but I can't seem to be able to build nim, I get - undefined reference to `_wfopen'
13:51:29*vendethiel joined #nim
13:52:43*Ven joined #nim
13:57:04Demosyou need more than that probably
13:57:13DemosI would use mingw64's shell
13:57:19Demosit sets some stuff in addition to just the path
14:00:39rrrrrrrrfowlmouth: in your GameObj concept, what does 'discard 1+1 is int' actually do?
14:03:56xificurC_Demos: I used msys2's mingw64 shell but that fails too
14:04:47Demosdid you install mingw from pacman?
14:05:40DemosI mean _wfopen is part of the windows CRT so this is pretty strange
14:07:18xificurC_Demos: isn't mingw already installed when installing msys2? This toolchain confuses me so much
14:07:24Demosno
14:07:49xificurC_Demos: there is a mingw64shell.bat or whatever batch file already installed with msys2, I thought it comes prepackaged
14:08:10*touch quit (Ping timeout: 244 seconds)
14:08:12Demosyeah so that shell will add the mingw64 stuff to the path before the msys2 stuff
14:08:39Demosbut you need to pacman -S mingw-w64-x86_64
14:09:24xificurC_Demos: ok, will try. How long does nim compile? Minutes or hours :)
14:09:31DemosMinutes
14:10:25xificurC_it's called MIN and it's 330MB :S
14:10:29xificurC_what would FULL be
14:11:37*gokr joined #nim
14:11:48Demoswell cygwin I guess
14:12:08xificurC_msys2 doesn't have /etc/passwd or chsh, leaves me at a strange point when trying to run zsh, I edited the batch script
14:13:04*vendethiel quit (Ping timeout: 264 seconds)
14:14:41Demosyeah, I only use it to build stuff
14:15:24*vendethiel joined #nim
14:16:34xyz_how do I declare an array inside a proc?
14:16:38xyz_I have this: arr: array [0..digits, int]
14:16:59xyz_but I ger a: Error: cannot evaluate at compile time: digits
14:17:19Demoswhat is digits?
14:18:05xyz_Demos: proc compute_pi(digits: int) =
14:18:19Demosyeah, digits is not known at compile time
14:18:22Demosyou need to use a seq
14:18:46Demosso var arr = newSeq[int](digits)
14:19:41*aboisvert quit (Quit: aboisvert)
14:19:53*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:19:57xyz_Demos: yep that works
14:20:30xyz_Demos: thank you, although the variable declaration feels a bit inconsistent to me
14:20:55*gokr quit (Quit: IRC for Sailfish 0.9)
14:20:57Demosyou could also do var arr: seq[int] I think
14:21:10xyz_nop
14:21:29xyz_I will have to initialize it
14:21:36Demosyeah, you would
14:21:40xyz_otherwise I get the nil
14:22:22*Sharcho joined #nim
14:23:01DemosI mean it makes sense, and I would not want arrays to suddenly start allocating heap memory when the length was a runtime value
14:23:01xyz_now all I need to figure out how to count down in a for loop
14:23:19Demosthere is a countdown iterator afaik
14:24:30xyz_yes there is one
14:26:04xyz_unfortunatly the lower limit does not work
14:26:17xyz_for i in countdown (10, 1, -14):
14:26:21xyz_will never stop
14:26:51xyz_sorry
14:26:55xyz_disregard that
14:26:58*HakanD___ quit (Quit: Be back later ...)
14:27:01*Ven joined #nim
14:27:14xyz_my math skills just went on a break
14:31:59*HakanD___ joined #nim
14:35:30*Jesin joined #nim
14:37:58*banister joined #nim
14:38:08*vendethiel quit (Ping timeout: 244 seconds)
14:39:30*kulelu88 joined #nim
14:39:47kulelu88is there a high-performance REST API built with Nim yet?
14:39:54*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:40:52*Ven joined #nim
14:41:04Demoswhat is a high perf REST API, won't any REST API be totally dominated by network I/O
14:41:19Demos(I don't know much about this topic)
14:42:34*vendethiel joined #nim
14:43:20*aboisvert joined #nim
14:44:16*savorywatt quit (Ping timeout: 264 seconds)
14:51:44*xcombelle quit (Quit: Leaving)
14:51:56*xcombelle joined #nim
14:52:27pigmejDemos: would be, but still, you will be abble to do more with more performant server
14:52:32pigmejsame case as apache vs nginx
14:52:49Demosoh, for servicing requests I have no idea
14:53:08DemosI mean we have jester, which can route and return JSON
14:53:19pigmejjester is quite slow btw
14:54:11*xcombelle quit (Client Quit)
14:54:19dom96it soon won't be
14:54:21Demoshm, I mean with an HTTP parser it is pretty easy to do the routing. The hard bit is the thread pooling
14:54:44pigmejDemos: it all depends ;-)
14:54:52pigmejdom96: yeah I know that you're working on async improvements :)
14:54:57*xcombelle joined #nim
14:55:09pigmejalso nim uses one of the bests http parsers so, that part is fast
14:55:23Demossince you probably want some kind of threading but not thread per connection, to avoid node style async bullshit you probably want to do some kind of user mode context switching
15:00:02*xcombelle quit (Quit: Leaving)
15:00:10*xcombelle joined #nim
15:00:53pigmejDemos: async in nim is quite cool
15:03:29*vendethiel quit (Ping timeout: 246 seconds)
15:05:59Demosright, idk how much control you need for a really fast server though
15:07:32pigmejask kulelu88 he was asking the question :)
15:12:43*Jesin quit (Quit: Leaving)
15:14:24*Jesin joined #nim
15:14:29*kulelu88 quit (Ping timeout: 265 seconds)
15:15:25*endragor quit (Ping timeout: 264 seconds)
15:15:34*darkf quit (Quit: Leaving)
15:15:38*vendethiel joined #nim
15:18:30*xcombelle quit (Quit: Leaving)
15:18:35*xcombelle_ joined #nim
15:18:37*xcombelle_ quit (Remote host closed the connection)
15:18:53*xcombelle_ joined #nim
15:21:45*Matthias247 joined #nim
15:24:21rrrrrrrr.\koch boot -d:release #> could not import: CreateSymbolicLinkW
15:24:26rrrrrrrrHow do i solve this?
15:26:57*kulelu88 joined #nim
15:29:30Sharchorrrrrrrr: what OS?
15:29:49rrrrrrrrwindows XP
15:30:03Sharchorrrrrrrr: there's a thread on the forum about it http://forum.nim-lang.org/t/768
15:30:14Sharchorrrrrrrr: but Windows XP is not supported by anyone
15:32:09rrrrrrrrThank you Sharcho, but i have no idea how to tweak preprocessors.
15:32:51Sharchorrrrrrrr: you can try one of the binaries instead from http://nim-lang.org/download.html
15:34:15rrrrrrrrThey are very outdated. Once i managed to compile it from devel, but i dont recall that error. With nim i can use "--deadCodeElim=on", but this is not the same
15:36:34kulelu88how much improved will jester be ?
15:37:23*aboisvert quit (Quit: aboisvert)
15:40:10*vendethiel quit (Ping timeout: 255 seconds)
15:41:30SharchoWhen I'm trying to install nimble, I'm getting an error: lib/nim/system.nim(2445, 21) Error: redefinition of 'fileHandle' , any ideas?
15:41:54EXetoCkulelu88: there's a list of features that haven't been implemented yet
15:42:11EXetoCand it has been submitted to that web framework benchmark a few times. I assume the plan is to try and get a better score
15:42:21EXetoCjust that progress is a little slow
15:42:24kulelu88bus factor for the framework is too low
15:47:37pigmejkulelu88: what do you mean by bus factor?
15:49:00Sharchopigmej: only one person working on it (what would happen to the project if that person would be hit by a bus?)
15:49:11pigmejah
15:49:26*aboisvert joined #nim
15:49:27*BlaXpirit joined #nim
15:50:32kulelu88makes committing to Nim difficult
15:54:01federico2yep
15:54:44*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:55:06dom96Don't worry, a bus won't kill me.
15:55:21*Ven joined #nim
15:55:24*vendethiel joined #nim
15:57:07Sharchodom96: famous last words
15:57:36rrrrrrrrhaha
16:01:24dom96:P
16:02:21dom96rrrrrrrr: you should be able to pass --deadCodeElim:on to ./koch
16:02:42dom96Sharcho: Is your nim compiler working?
16:03:14Sharchodom96: I'm trying something, I think it is now
16:04:34*Matthias247 quit (Read error: Connection reset by peer)
16:08:27Sharchodom96: yes, I got it working
16:09:03dom96cool
16:12:22xyz_how can I remove the new line after an echo?
16:13:03dom96use stdout.write
16:18:15*vendethiel quit (Ping timeout: 256 seconds)
16:28:58*vendethiel joined #nim
16:35:39*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:36:34*coffeepot left #nim (#nim)
16:40:04*HakanD___ quit (Ping timeout: 244 seconds)
16:41:14*pregressive joined #nim
16:46:53*Ven joined #nim
16:48:26*brson joined #nim
16:49:58*vendethiel quit (Ping timeout: 245 seconds)
16:52:25*JinShil joined #nim
16:55:29*JinShil quit (Client Quit)
16:56:56*vendethiel joined #nim
16:57:13*JinShil joined #nim
16:57:34*JinShil quit (Client Quit)
17:04:44*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:07:49*keypusher quit (Quit: Konversation terminated!)
17:10:20*OnwardEuler joined #nim
17:11:36*EulersBackup quit (Ping timeout: 240 seconds)
17:16:35*xyz_ quit (Quit: Page closed)
17:16:39*gsingh93 joined #nim
17:19:59*vendethiel quit (Ping timeout: 246 seconds)
17:20:26*aboisvert quit (Ping timeout: 256 seconds)
17:20:47*aboisvert joined #nim
17:23:49Araqseriously? bug factor is an issue for 'jester'?
17:23:51Araq*bus factor lol
17:23:52Araqhow many lines of code does jester have?
17:24:39Araqca. 1000?
17:26:10Araqdef-: so ... I broke terminal for linux?
17:28:55def-Araq: right!
17:29:19AraqI simply fixed your wrapper though :P
17:29:58dom96I figured out how to make recvLineInto safer!
17:30:28dom96It seems that there aren't any good HTTP benchmarking tools for Windows
17:32:44Araqdef-: well I don't know how to fix it
17:32:54def-Araq: it compiles with neither c nor cpp
17:33:12Araqyeah but if it's importc'ed from some header
17:33:21Araqhow come the 'iflag' field is missing?
17:34:28Araqoh it's c_iflag
17:34:39Araqwell who wrapped that?
17:34:56Araqand why do we need it?
17:35:20def-I wrapped that
17:35:32def-for getch() and reading passwords
17:35:38Araqah
17:35:53Araqwell wrap it properly please ;-)
17:36:00flyxif I get a "type mismatch" when I assign some values in parentheses to a variable of a named tuple type, how can I figure out what's wrong? as far as I see it, all values of the tuple are available and of the right type
17:36:38Araqflyx: tuple unpacking only works in var or let
17:36:59flyxah, that explains it, it's a const
17:37:29flyxso I have to write a constructor?
17:38:55Araqhow would that help you?
17:39:37Araqyou can do myconst[0] to get the first field etc
17:39:43flyxconst myTupleVar = initTuple(vars)
17:40:08Araqconst myTuple = (8, 8, 9) # already works
17:40:20Araqa constructor accomplishes nothing here
17:40:22flyxyou just said it only works in var or let
17:40:30Araqtuple *unpacking*
17:40:37Araqonly works in var or let
17:40:53flyxah, I misread that then
17:41:25flyxwell then the problem persists. I have const var: TupleType = (…) and I get a type mismatch
17:41:35def-dom96: i can test the http performance of your new code
17:41:44flyxI cannot figure out what's wrong, I even named every value in parentheses
17:42:18dom96def-: I tested it on my laptop and my changes didn't have an affect on the performance.
17:42:25dom96But it would be awesome if you could test it too
17:42:36Araqflyx: pastebin or gist it
17:44:44flyxhttps://gist.github.com/flyx/cd8d1d6c23ea2bea5cad
17:44:59*vendethiel joined #nim
17:45:05flyxI cannot show the code which raises the error as it's constructed with a macro.
17:45:23flyxbut the error should be enough to figure out what's wrong, right
17:45:48*aboisvert quit (Quit: aboisvert)
17:46:06flyxah, I should add the other types
17:47:05flyxupdated
17:48:25Araqdunno, this shouldn't be a tuple IMO
17:48:28Araqbut an object
17:49:49flyxpossibly. but that doesn't explain the error
17:50:38*xcombelle_ quit (Remote host closed the connection)
17:51:34*aboisvert joined #nim
17:51:47*mrkishi quit ()
17:52:18def-dom96: segfaults with markandsweep. performance with boehm is down from 50k to 33k
17:53:02dom96:/
18:07:34flyxconverting to object triggers: Error: integer literal must have some int type
18:07:53dom96def-: I get 44k with boehm
18:07:59flyxnot sure what that means, it's from macro-generated AST
18:08:09Araqyour macro does strange things
18:08:26dom96def-: that's with -c 4 and -t 4
18:10:07flyxas far as I see it in the generated tree, all IntLits have an integer value
18:10:15flyxbut how do they get an int *type*?
18:11:45flyxcan I transform the AST output back to nim source and compile it again to see the exact position?
18:12:05flyxI think I already asked that question some time ago
18:12:30Araqecho repr resullt
18:12:57*mrkishi joined #nim
18:14:06flyxah, that's helpful
18:15:41flyxit's an int74
18:15:44flyx*int64
18:17:02*gsingh93 quit (Ping timeout: 272 seconds)
18:18:44flyxwhich is strange, because that value is generated by hash(), which returns a THash, which is an int
18:19:06flyxdoes hash behave differently when called at compile time?
18:19:44Araqnot really but there are bug reports about hashSet/HashTable not working properly at compile-time
18:21:41flyxyes, but I particularly avoid these types
18:22:09flyxI'll play with hash a bit and see if I can find the error
18:22:12Araqwell at one point you have to report the bug properly
18:22:36*wb_ joined #nim
18:22:40Araqyou don't have to reduce it to a minimum, but I like it in one snippet/file
18:23:43*wb quit (Ping timeout: 245 seconds)
18:27:23*kulelu88 quit (Read error: Connection reset by peer)
18:29:01flyxit seems like hash works properly, but the resulting value isn't accepted as int literal in the code
18:29:12flyxperhaps because int's size depends on the architecture?
18:30:22flyxhow does nim decide whether a literal is an int or an int64? does that check depend on the architecture?
18:31:45flyxmy value is larger than an int32, but as I compile for 64bit, that shouldn't be a problem
18:33:01Araqno, int literals have to fit into 32 bits
18:33:05Araqalways.
18:33:16dom96def-: On my machine there is no difference between your code and mine
18:33:17flyxah, okay. that explains it, then
18:33:41Araqyup
18:33:51def-dom96: even with -c 400 -t 12 ?
18:36:13dom96def-: yep
18:37:20def-alright, fine then
18:43:46*Sharcho quit (Ping timeout: 265 seconds)
18:46:31*aboisvert quit (Quit: aboisvert)
18:49:31*NimBot joined #nim
18:50:04*kulelu88 joined #nim
18:53:01def-dom96: but it still segfaults with markandsweep. on your system too?
18:53:09dom96yeah
18:53:26def-but then the markandsweep tests in the testsuite don't work for me either
18:53:32*gsingh93 joined #nim
18:53:43dom96I would guess that it's a problem with the m&s GC
18:56:19*aboisvert joined #nim
18:56:29*aboisvert quit (Client Quit)
18:57:04*aboisvert joined #nim
18:57:21*aboisvert quit (Client Quit)
18:59:23*aboisvert joined #nim
19:02:00rrrrrrrrA lot of commits lately, getting ready for the next release?
19:02:42Araqalways
19:03:02*xcombelle joined #nim
19:08:23*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:09:25flyxAraq: I have an issue for you: https://github.com/Araq/Nim/issues/2602
19:09:40*Matthias247 joined #nim
19:13:53*saml quit (Quit: Leaving)
19:19:06*Pisuke quit (Ping timeout: 272 seconds)
19:24:38*pregressive quit (Remote host closed the connection)
19:24:56*pregressive joined #nim
19:30:18*rrrrrrrr quit (Quit: Page closed)
19:36:54*gsingh93 quit (Ping timeout: 245 seconds)
19:36:59*mrkishi quit ()
19:37:44*Demos_ joined #nim
19:41:07*Demos quit (Ping timeout: 256 seconds)
19:54:25*ingsoc quit (Ping timeout: 264 seconds)
19:57:41*Sharcho joined #nim
19:59:22*xcombelle quit (Quit: Leaving)
19:59:22*OnwardEuler quit (Ping timeout: 255 seconds)
20:01:03*Demos joined #nim
20:01:04*banister joined #nim
20:04:12*Demos_ quit (Ping timeout: 256 seconds)
20:08:36*Demos_ joined #nim
20:11:54*Demos quit (Ping timeout: 244 seconds)
20:23:45*gsingh93 joined #nim
20:24:31*aboisvert quit (Quit: aboisvert)
20:27:43*Demos joined #nim
20:30:24*aboisvert joined #nim
20:31:18*Demos_ quit (Ping timeout: 272 seconds)
20:37:49*matkuki joined #nim
20:41:15matkukiHi guys. Is there a way to make a property work with any assignment operator, not just `=`?
20:42:07matkukiI'm using the "host" example from the manual.
20:42:40matkukiTried `host+=`, but it doesn't work.
20:43:55def-matkuki: you could try "template host(x: Obj) = ..." or "proc host(x: Obj): var int = ..."
20:45:55matkukidef-: I'll try it.
20:48:35*pwernersbach joined #nim
20:53:22*mpthrapp quit (Remote host closed the connection)
20:54:01*pwernersbach quit (Ping timeout: 246 seconds)
20:55:02def-matkuki: see also: http://stackoverflow.com/questions/29461573/nim-operator-overloading
20:55:09*pwernersbach joined #nim
20:56:05matkukidef-: Thanks. The "proc host(x: Obj): var int = ..." example you gave works like a charm. Thanks and thanks for the link!
20:57:36pwernersbachI need to get an object's type at runtime, should I use object variants or an object hierarchy?
20:59:23*aboisvert quit (Quit: aboisvert)
20:59:28Sharchopwernersbach: you can use the of operator, http://nim-lang.org/tut2.html#objects
21:00:40dom96I always favour object variants to inheritance
21:00:42*aboisvert joined #nim
21:00:50*aboisvert quit (Client Quit)
21:00:51*yglukhov quit (Quit: Be back later ...)
21:01:13pwernersbachSharcho: Thanks, but there's two ways to construct the actual object itself: inheritance or variants
21:01:24pwernersbachdom96: Any reason why or just preference?
21:02:23dom96Methods are somewhat limited as far as I can remember.
21:02:40dom96So that kind of deters me.
21:02:59*aboisvert joined #nim
21:03:20*a5i quit (Quit: Connection closed for inactivity)
21:04:15pwernersbachAlso, I'm open sourcing my SQL library this weekend if anyone cares
21:04:28dom96cool
21:04:34pwernersbachI'll post on the forum when I do
21:04:45dom96add it to nimble too
21:05:07pwernersbachHow do I do that/
21:05:16Araqpwernersbach: what does your SQL lib do?
21:06:19dom96pwernersbach: https://github.com/nim-lang/nimble/blob/master/developers.markdown
21:06:28pwernersbachAraq: It's an abstraction around Qt 5's QtSQL library to expose that interface in a more nim-ish way
21:07:01Araqoh, so no ORM?
21:07:16pwernersbachAraq: It has a unified API and supports multiple SQL databases
21:07:25pwernersbachAraq: No, no ORM
21:07:28Araqpity
21:07:41Araqbut understandable
21:08:58pwernersbachWhy use an ORM when you can just hand write your SQL? :p
21:09:14Araqtype safety
21:09:49Araqalternatively you can check my hand written SQL at compile-time ;-)
21:10:05Araqbut this requires the checker to read the db's schema info
21:10:53Araqactually ... that's exactly what I'll do eventually
21:11:00pwernersbachI vote we put an SQL checker in the compiler, and then I'll use that ;)
21:11:15Araqcreate a compiler plugin :P
21:11:37pwernersbachThat sounds fancy
21:11:43pwernersbachNew compiler feature?
21:12:06Araqyeah well, it's new and it works
21:12:23Araqbut you need to bootstrap with the active plugins, so it sucks
21:13:14pwernersbachThat's cool though, hopefully that will allow for some compiler experimentation
21:13:58Araqwe plan to use it for fowl's interface implementation
21:15:38pwernersbachAs in Java-like interfaces?
21:15:44pwernersbachOr something else?
21:16:01Araqas in Go's
21:18:18pwernersbachInteresting… not sure what the usefulness of that is given Nim's pretty flexible objects, but someone will find some usage I guess
21:30:21*EastByte quit (Ping timeout: 276 seconds)
21:34:48matkukidef-: Why does "proc host(x: Obj): var int = ..." work with a "ref object" but not with "object"?
21:36:04*Kingsquee joined #nim
21:37:11pigmejmatkuki: what does 'works' means ?
21:37:16pigmejmean*
21:37:17def-matkuki: "var object"
21:37:31def-matkuki: you can't get a mutable int out of an immutable object
21:37:48def-the contents of refs are always mutable (not the pointer to them)
21:37:56matkukidef: Got it.
21:38:15*aboisvert quit (Quit: aboisvert)
21:40:08*aboisvert joined #nim
21:44:11*EastByte joined #nim
21:52:55ldleworkIs there good support for calling Nim from Python?
21:53:57Araqldlework: there is nimborg, but that's more for calling Python from Nim, I think
21:57:10ldleworkAraq: #python is making extenstion language suggestions to some guy
21:57:14ldleworkC++ and Rust were mentioned
21:57:17ldleworkAnd I said Nim too!
21:57:22ldleworkAnd they said is that supported?
21:57:25ldleworkAnd I went :3
21:57:50Araqwhat question is that? via ctypes you only need to generate a DLL
21:58:15ldleworkugh ctypes
21:58:20ldleworkbut yeah I get your point
21:58:53BlaXpiritAraq, please comment on https://github.com/Araq/Nim/pull/2515#issuecomment-95558237 "Maybe type has these operations: get-with-exception, unsafe-get, get-or-default, has." I generalized the ways to name them into 2 options, please pick one (or something else)
22:02:33AraqisJust?
22:02:50*polde quit (Ping timeout: 276 seconds)
22:03:28kulelu88is it easier to write a performant lib in Nim for Python than to use C?
22:04:19BlaXpiritAraq, well the things are called just(x), nothing(T)
22:04:28AraqBlaXpirit: I know but still
22:04:34BlaXpiritthe advantage of `isJust` is that it can have a twin `isNothing`
22:04:52BlaXpiritwhich can actually be useful. clearer than `not opt`
22:05:10BlaXpirit`not opt.has` is also pretty good though
22:05:54BlaXpiritjust pick any combination of these names and let's be done with this :|
22:07:22Araqkulelu88: you're in #nim. everything is easier and better in Nim than in C.
22:07:51kulelu88even the boilerplate for making nim talk to Python?
22:08:57Araqyes.
22:09:08federico2speaking of lib: Araq I heard rumors that the GC mechanims in Nim would not play well with Python's GC when using a Nim lib from Python
22:10:28federico2yet, on the documentation the GC is said to be triggered by memory allocation and not run different threads ore use timers
22:10:54Araqfederico2: well "rumors"...
22:12:02federico2care to elaborate? :D
22:12:29BlaXpiritno hurry, but please do comment there :|
22:12:50*BlaXpirit quit (Quit: Quit Konversation)
22:16:29Araqfederico2: well you need to know what you're doing. I heard rumors C++ cannot be used with python because of name mangling and exceptions
22:16:55Araqand templates
22:27:49*TEttinger joined #nim
22:32:13EXetoC-.-
22:35:34*polde joined #nim
22:42:15*ChrisMAN quit (Ping timeout: 244 seconds)
22:42:30*pwernersbach quit (Quit: Leaving.)
22:46:14*matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 37.0.2/20150415140819])
22:46:25*gsingh93 quit (Ping timeout: 256 seconds)
22:59:40*a5i joined #nim
23:05:20*Jesin quit (Quit: Leaving)
23:07:15*Jesin joined #nim
23:07:51*brson quit (Quit: leaving)
23:10:57*Jesin quit (Client Quit)
23:13:47*Matthias247 quit (Read error: Connection reset by peer)
23:28:03*Jesin joined #nim
23:34:47*brson joined #nim
23:43:14*cmk_zzz_ joined #nim
23:50:22kulelu88is there a benchmark for nim vs. pypy vs Go?
23:56:00*banister quit (Read error: Connection reset by peer)