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:04 | HakanD__ | Morning |
08:58:17 | coffeepot | Good 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:00 | Sharcho | How 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:35 | repax | Sharcho: system.setLen |
11:58:01 | * | touch joined #nim |
11:59:07 | Sharcho | repax: thanks! |
12:05:04 | * | banister joined #nim |
12:08:09 | xificurC_ | 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:27 | xificurC_ | 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:33 | repax | I'm not an expert, but I think that the answer to both questions is no. |
12:14:07 | dom96 | I'm not sure exactly what constitutes higher kinded types but perhaps Nim's object variants would qualify |
12:14:28 | dom96 | as for b) https://github.com/Araq/Nim/pull/2515 |
12:14:47 | repax | blaxspirit had an implementation for a Option/Maybe type a few days ago. I'm not sure if it has accepted yet |
12:15:20 | repax | *(has been accepted) |
12:15:24 | EXetoC | it 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:15 | xificurC_ | dom96: I'm just curious how rich the type system is compared to ML languages like Haskell or Ocaml |
12:22:31 | xificurC_ | parametric polymorphism, ad-hoc polymorphism |
12:24:21 | * | OnwardEuler joined #nim |
12:24:44 | xificurC_ | 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:52 | repax | xificurC_: 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:38 | xificurC_ | repax: forgive my mistakes, I'm a mostly self-studied programmer and often call things by wrong name |
12:29:34 | repax | The 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:17 | EXetoC | no credit to fowl? :p or are any similarities accidental? |
12:30:38 | repax | EXetoC: credit to anyone involved. I don't know the whole story ;) |
12:30:51 | Araq | xificurC_: there has been some work on higher kinded types, but I think right now it simply crashes the compiler ;-) |
12:31:59 | EXetoC | xificurC_: there's "not nil" |
12:32:26 | Araq | proc p[T, S](x: T[S]): bool = false |
12:32:36 | Araq | Error: no generic parameters allowed for T |
12:32:48 | Araq | so ... good news: it doesn't crash the compiler ;-) |
12:32:56 | xificurC_ | Araq: :) |
12:33:15 | xificurC_ | I see on gh that windows doesn't compile right now? |
12:33:23 | EXetoC | and many programs will afford to be compiled with certain safety switches |
12:33:46 | xificurC_ | or linux x86_64? That's rather important! |
12:34:12 | Araq | yeah well I'm working on it but the builder's error messages are not helpful at all |
12:35:12 | Araq | this switch from nimbuild to some generic soulless build system was a huge mistake IMO |
12:35:45 | Araq | "not invented here syndrome" my ass, at least the home grown solution kind of worked |
12:35:50 | EXetoC | there's no switch specifically for null checks? |
12:36:04 | * | gokr joined #nim |
12:36:09 | xificurC_ | Araq: can't you move back if you wish to? |
12:36:34 | Araq | EXetoC: there is but it has never been implemented |
12:36:46 | EXetoC | ok |
12:38:18 | xificurC_ | 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:06 | xificurC_ | forgot the other question :< |
12:39:10 | EXetoC | I'd assume so, since if you import then it's resolved at compile time |
12:39:40 | Araq | xificurC_: well switching back requires a dom96 with time |
12:40:20 | xificurC_ | EXetoC: that's pretty cool |
12:43:36 | * | saml_ quit (Ping timeout: 240 seconds) |
12:44:24 | EXetoC | that 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:14 | EXetoC | so things could be fine-tuned in order to provide a good balance between performance and safety |
12:46:53 | xificurC_ | god I don't want to be on windows anymore.. |
12:47:12 | xificurC_ | Araq: any wild time estimate when will the build work again? |
12:47:30 | Araq | it does work, it's the tester that fails |
12:48:03 | xificurC_ | 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:10 | xyz_ | hello |
13:45:32 | xyz_ | is there a way to set the step of a for loop? |
13:45:58 | def- | xyz_: for i in countup(0, 100, 10): |
13:47:01 | * | vendethiel quit (Ping timeout: 248 seconds) |
13:47:14 | xyz_ | def-: does this make sense? |
13:47:18 | xyz_ | for i in countdown(digits, 1, 14) |
13:48:29 | def- | I don't know |
13:48:45 | xyz_ | ok i'll try it |
13:50:27 | xificurC_ | 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:04 | Demos | you need more than that probably |
13:57:13 | Demos | I would use mingw64's shell |
13:57:19 | Demos | it sets some stuff in addition to just the path |
14:00:39 | rrrrrrrr | fowlmouth: in your GameObj concept, what does 'discard 1+1 is int' actually do? |
14:03:56 | xificurC_ | Demos: I used msys2's mingw64 shell but that fails too |
14:04:47 | Demos | did you install mingw from pacman? |
14:05:40 | Demos | I mean _wfopen is part of the windows CRT so this is pretty strange |
14:07:18 | xificurC_ | Demos: isn't mingw already installed when installing msys2? This toolchain confuses me so much |
14:07:24 | Demos | no |
14:07:49 | xificurC_ | 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:12 | Demos | yeah so that shell will add the mingw64 stuff to the path before the msys2 stuff |
14:08:39 | Demos | but you need to pacman -S mingw-w64-x86_64 |
14:09:24 | xificurC_ | Demos: ok, will try. How long does nim compile? Minutes or hours :) |
14:09:31 | Demos | Minutes |
14:10:25 | xificurC_ | it's called MIN and it's 330MB :S |
14:10:29 | xificurC_ | what would FULL be |
14:11:37 | * | gokr joined #nim |
14:11:48 | Demos | well cygwin I guess |
14:12:08 | xificurC_ | 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:41 | Demos | yeah, I only use it to build stuff |
14:15:24 | * | vendethiel joined #nim |
14:16:34 | xyz_ | how do I declare an array inside a proc? |
14:16:38 | xyz_ | I have this: arr: array [0..digits, int] |
14:16:59 | xyz_ | but I ger a: Error: cannot evaluate at compile time: digits |
14:17:19 | Demos | what is digits? |
14:18:05 | xyz_ | Demos: proc compute_pi(digits: int) = |
14:18:19 | Demos | yeah, digits is not known at compile time |
14:18:22 | Demos | you need to use a seq |
14:18:46 | Demos | so 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:57 | xyz_ | Demos: yep that works |
14:20:30 | xyz_ | 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:57 | Demos | you could also do var arr: seq[int] I think |
14:21:10 | xyz_ | nop |
14:21:29 | xyz_ | I will have to initialize it |
14:21:36 | Demos | yeah, you would |
14:21:40 | xyz_ | otherwise I get the nil |
14:22:22 | * | Sharcho joined #nim |
14:23:01 | Demos | I 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:01 | xyz_ | now all I need to figure out how to count down in a for loop |
14:23:19 | Demos | there is a countdown iterator afaik |
14:24:30 | xyz_ | yes there is one |
14:26:04 | xyz_ | unfortunatly the lower limit does not work |
14:26:17 | xyz_ | for i in countdown (10, 1, -14): |
14:26:21 | xyz_ | will never stop |
14:26:51 | xyz_ | sorry |
14:26:55 | xyz_ | disregard that |
14:26:58 | * | HakanD___ quit (Quit: Be back later ...) |
14:27:01 | * | Ven joined #nim |
14:27:14 | xyz_ | 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:47 | kulelu88 | is 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:04 | Demos | what is a high perf REST API, won't any REST API be totally dominated by network I/O |
14:41:19 | Demos | (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:27 | pigmej | Demos: would be, but still, you will be abble to do more with more performant server |
14:52:32 | pigmej | same case as apache vs nginx |
14:52:49 | Demos | oh, for servicing requests I have no idea |
14:53:08 | Demos | I mean we have jester, which can route and return JSON |
14:53:19 | pigmej | jester is quite slow btw |
14:54:11 | * | xcombelle quit (Client Quit) |
14:54:19 | dom96 | it soon won't be |
14:54:21 | Demos | hm, I mean with an HTTP parser it is pretty easy to do the routing. The hard bit is the thread pooling |
14:54:44 | pigmej | Demos: it all depends ;-) |
14:54:52 | pigmej | dom96: yeah I know that you're working on async improvements :) |
14:54:57 | * | xcombelle joined #nim |
14:55:09 | pigmej | also nim uses one of the bests http parsers so, that part is fast |
14:55:23 | Demos | since 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:53 | pigmej | Demos: async in nim is quite cool |
15:03:29 | * | vendethiel quit (Ping timeout: 246 seconds) |
15:05:59 | Demos | right, idk how much control you need for a really fast server though |
15:07:32 | pigmej | ask 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:21 | rrrrrrrr | .\koch boot -d:release #> could not import: CreateSymbolicLinkW |
15:24:26 | rrrrrrrr | How do i solve this? |
15:26:57 | * | kulelu88 joined #nim |
15:29:30 | Sharcho | rrrrrrrr: what OS? |
15:29:49 | rrrrrrrr | windows XP |
15:30:03 | Sharcho | rrrrrrrr: there's a thread on the forum about it http://forum.nim-lang.org/t/768 |
15:30:14 | Sharcho | rrrrrrrr: but Windows XP is not supported by anyone |
15:32:09 | rrrrrrrr | Thank you Sharcho, but i have no idea how to tweak preprocessors. |
15:32:51 | Sharcho | rrrrrrrr: you can try one of the binaries instead from http://nim-lang.org/download.html |
15:34:15 | rrrrrrrr | They 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:34 | kulelu88 | how much improved will jester be ? |
15:37:23 | * | aboisvert quit (Quit: aboisvert) |
15:40:10 | * | vendethiel quit (Ping timeout: 255 seconds) |
15:41:30 | Sharcho | When 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:54 | EXetoC | kulelu88: there's a list of features that haven't been implemented yet |
15:42:11 | EXetoC | and 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:21 | EXetoC | just that progress is a little slow |
15:42:24 | kulelu88 | bus factor for the framework is too low |
15:47:37 | pigmej | kulelu88: what do you mean by bus factor? |
15:49:00 | Sharcho | pigmej: only one person working on it (what would happen to the project if that person would be hit by a bus?) |
15:49:11 | pigmej | ah |
15:49:26 | * | aboisvert joined #nim |
15:49:27 | * | BlaXpirit joined #nim |
15:50:32 | kulelu88 | makes committing to Nim difficult |
15:54:01 | federico2 | yep |
15:54:44 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:55:06 | dom96 | Don't worry, a bus won't kill me. |
15:55:21 | * | Ven joined #nim |
15:55:24 | * | vendethiel joined #nim |
15:57:07 | Sharcho | dom96: famous last words |
15:57:36 | rrrrrrrr | haha |
16:01:24 | dom96 | :P |
16:02:21 | dom96 | rrrrrrrr: you should be able to pass --deadCodeElim:on to ./koch |
16:02:42 | dom96 | Sharcho: Is your nim compiler working? |
16:03:14 | Sharcho | dom96: I'm trying something, I think it is now |
16:04:34 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:08:27 | Sharcho | dom96: yes, I got it working |
16:09:03 | dom96 | cool |
16:12:22 | xyz_ | how can I remove the new line after an echo? |
16:13:03 | dom96 | use 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:49 | Araq | seriously? bug factor is an issue for 'jester'? |
17:23:51 | Araq | *bus factor lol |
17:23:52 | Araq | how many lines of code does jester have? |
17:24:39 | Araq | ca. 1000? |
17:26:10 | Araq | def-: so ... I broke terminal for linux? |
17:28:55 | def- | Araq: right! |
17:29:19 | Araq | I simply fixed your wrapper though :P |
17:29:58 | dom96 | I figured out how to make recvLineInto safer! |
17:30:28 | dom96 | It seems that there aren't any good HTTP benchmarking tools for Windows |
17:32:44 | Araq | def-: well I don't know how to fix it |
17:32:54 | def- | Araq: it compiles with neither c nor cpp |
17:33:12 | Araq | yeah but if it's importc'ed from some header |
17:33:21 | Araq | how come the 'iflag' field is missing? |
17:34:28 | Araq | oh it's c_iflag |
17:34:39 | Araq | well who wrapped that? |
17:34:56 | Araq | and why do we need it? |
17:35:20 | def- | I wrapped that |
17:35:32 | def- | for getch() and reading passwords |
17:35:38 | Araq | ah |
17:35:53 | Araq | well wrap it properly please ;-) |
17:36:00 | flyx | if 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:38 | Araq | flyx: tuple unpacking only works in var or let |
17:36:59 | flyx | ah, that explains it, it's a const |
17:37:29 | flyx | so I have to write a constructor? |
17:38:55 | Araq | how would that help you? |
17:39:37 | Araq | you can do myconst[0] to get the first field etc |
17:39:43 | flyx | const myTupleVar = initTuple(vars) |
17:40:08 | Araq | const myTuple = (8, 8, 9) # already works |
17:40:20 | Araq | a constructor accomplishes nothing here |
17:40:22 | flyx | you just said it only works in var or let |
17:40:30 | Araq | tuple *unpacking* |
17:40:37 | Araq | only works in var or let |
17:40:53 | flyx | ah, I misread that then |
17:41:25 | flyx | well then the problem persists. I have const var: TupleType = (…) and I get a type mismatch |
17:41:35 | def- | dom96: i can test the http performance of your new code |
17:41:44 | flyx | I cannot figure out what's wrong, I even named every value in parentheses |
17:42:18 | dom96 | def-: I tested it on my laptop and my changes didn't have an affect on the performance. |
17:42:25 | dom96 | But it would be awesome if you could test it too |
17:42:36 | Araq | flyx: pastebin or gist it |
17:44:44 | flyx | https://gist.github.com/flyx/cd8d1d6c23ea2bea5cad |
17:44:59 | * | vendethiel joined #nim |
17:45:05 | flyx | I cannot show the code which raises the error as it's constructed with a macro. |
17:45:23 | flyx | but the error should be enough to figure out what's wrong, right |
17:45:48 | * | aboisvert quit (Quit: aboisvert) |
17:46:06 | flyx | ah, I should add the other types |
17:47:05 | flyx | updated |
17:48:25 | Araq | dunno, this shouldn't be a tuple IMO |
17:48:28 | Araq | but an object |
17:49:49 | flyx | possibly. 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:18 | def- | dom96: segfaults with markandsweep. performance with boehm is down from 50k to 33k |
17:53:02 | dom96 | :/ |
18:07:34 | flyx | converting to object triggers: Error: integer literal must have some int type |
18:07:53 | dom96 | def-: I get 44k with boehm |
18:07:59 | flyx | not sure what that means, it's from macro-generated AST |
18:08:09 | Araq | your macro does strange things |
18:08:26 | dom96 | def-: that's with -c 4 and -t 4 |
18:10:07 | flyx | as far as I see it in the generated tree, all IntLits have an integer value |
18:10:15 | flyx | but how do they get an int *type*? |
18:11:45 | flyx | can I transform the AST output back to nim source and compile it again to see the exact position? |
18:12:05 | flyx | I think I already asked that question some time ago |
18:12:30 | Araq | echo repr resullt |
18:12:57 | * | mrkishi joined #nim |
18:14:06 | flyx | ah, that's helpful |
18:15:41 | flyx | it's an int74 |
18:15:44 | flyx | *int64 |
18:17:02 | * | gsingh93 quit (Ping timeout: 272 seconds) |
18:18:44 | flyx | which is strange, because that value is generated by hash(), which returns a THash, which is an int |
18:19:06 | flyx | does hash behave differently when called at compile time? |
18:19:44 | Araq | not really but there are bug reports about hashSet/HashTable not working properly at compile-time |
18:21:41 | flyx | yes, but I particularly avoid these types |
18:22:09 | flyx | I'll play with hash a bit and see if I can find the error |
18:22:12 | Araq | well at one point you have to report the bug properly |
18:22:36 | * | wb_ joined #nim |
18:22:40 | Araq | you 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:01 | flyx | it seems like hash works properly, but the resulting value isn't accepted as int literal in the code |
18:29:12 | flyx | perhaps because int's size depends on the architecture? |
18:30:22 | flyx | how does nim decide whether a literal is an int or an int64? does that check depend on the architecture? |
18:31:45 | flyx | my value is larger than an int32, but as I compile for 64bit, that shouldn't be a problem |
18:33:01 | Araq | no, int literals have to fit into 32 bits |
18:33:05 | Araq | always. |
18:33:16 | dom96 | def-: On my machine there is no difference between your code and mine |
18:33:17 | flyx | ah, okay. that explains it, then |
18:33:41 | Araq | yup |
18:33:51 | def- | dom96: even with -c 400 -t 12 ? |
18:36:13 | dom96 | def-: yep |
18:37:20 | def- | 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:01 | def- | dom96: but it still segfaults with markandsweep. on your system too? |
18:53:09 | dom96 | yeah |
18:53:26 | def- | but then the markandsweep tests in the testsuite don't work for me either |
18:53:32 | * | gsingh93 joined #nim |
18:53:43 | dom96 | I 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:00 | rrrrrrrr | A lot of commits lately, getting ready for the next release? |
19:02:42 | Araq | always |
19:03:02 | * | xcombelle joined #nim |
19:08:23 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:09:25 | flyx | Araq: 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:15 | matkuki | Hi guys. Is there a way to make a property work with any assignment operator, not just `=`? |
20:42:07 | matkuki | I'm using the "host" example from the manual. |
20:42:40 | matkuki | Tried `host+=`, but it doesn't work. |
20:43:55 | def- | matkuki: you could try "template host(x: Obj) = ..." or "proc host(x: Obj): var int = ..." |
20:45:55 | matkuki | def-: 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:02 | def- | matkuki: see also: http://stackoverflow.com/questions/29461573/nim-operator-overloading |
20:55:09 | * | pwernersbach joined #nim |
20:56:05 | matkuki | def-: Thanks. The "proc host(x: Obj): var int = ..." example you gave works like a charm. Thanks and thanks for the link! |
20:57:36 | pwernersbach | I 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:28 | Sharcho | pwernersbach: you can use the of operator, http://nim-lang.org/tut2.html#objects |
21:00:40 | dom96 | I 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:13 | pwernersbach | Sharcho: Thanks, but there's two ways to construct the actual object itself: inheritance or variants |
21:01:24 | pwernersbach | dom96: Any reason why or just preference? |
21:02:23 | dom96 | Methods are somewhat limited as far as I can remember. |
21:02:40 | dom96 | So that kind of deters me. |
21:02:59 | * | aboisvert joined #nim |
21:03:20 | * | a5i quit (Quit: Connection closed for inactivity) |
21:04:15 | pwernersbach | Also, I'm open sourcing my SQL library this weekend if anyone cares |
21:04:28 | dom96 | cool |
21:04:34 | pwernersbach | I'll post on the forum when I do |
21:04:45 | dom96 | add it to nimble too |
21:05:07 | pwernersbach | How do I do that/ |
21:05:16 | Araq | pwernersbach: what does your SQL lib do? |
21:06:19 | dom96 | pwernersbach: https://github.com/nim-lang/nimble/blob/master/developers.markdown |
21:06:28 | pwernersbach | Araq: It's an abstraction around Qt 5's QtSQL library to expose that interface in a more nim-ish way |
21:07:01 | Araq | oh, so no ORM? |
21:07:16 | pwernersbach | Araq: It has a unified API and supports multiple SQL databases |
21:07:25 | pwernersbach | Araq: No, no ORM |
21:07:28 | Araq | pity |
21:07:41 | Araq | but understandable |
21:08:58 | pwernersbach | Why use an ORM when you can just hand write your SQL? :p |
21:09:14 | Araq | type safety |
21:09:49 | Araq | alternatively you can check my hand written SQL at compile-time ;-) |
21:10:05 | Araq | but this requires the checker to read the db's schema info |
21:10:53 | Araq | actually ... that's exactly what I'll do eventually |
21:11:00 | pwernersbach | I vote we put an SQL checker in the compiler, and then I'll use that ;) |
21:11:15 | Araq | create a compiler plugin :P |
21:11:37 | pwernersbach | That sounds fancy |
21:11:43 | pwernersbach | New compiler feature? |
21:12:06 | Araq | yeah well, it's new and it works |
21:12:23 | Araq | but you need to bootstrap with the active plugins, so it sucks |
21:13:14 | pwernersbach | That's cool though, hopefully that will allow for some compiler experimentation |
21:13:58 | Araq | we plan to use it for fowl's interface implementation |
21:15:38 | pwernersbach | As in Java-like interfaces? |
21:15:44 | pwernersbach | Or something else? |
21:16:01 | Araq | as in Go's |
21:18:18 | pwernersbach | Interesting… 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:48 | matkuki | def-: 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:11 | pigmej | matkuki: what does 'works' means ? |
21:37:16 | pigmej | mean* |
21:37:17 | def- | matkuki: "var object" |
21:37:31 | def- | matkuki: you can't get a mutable int out of an immutable object |
21:37:48 | def- | the contents of refs are always mutable (not the pointer to them) |
21:37:56 | matkuki | def: Got it. |
21:38:15 | * | aboisvert quit (Quit: aboisvert) |
21:40:08 | * | aboisvert joined #nim |
21:44:11 | * | EastByte joined #nim |
21:52:55 | ldlework | Is there good support for calling Nim from Python? |
21:53:57 | Araq | ldlework: there is nimborg, but that's more for calling Python from Nim, I think |
21:57:10 | ldlework | Araq: #python is making extenstion language suggestions to some guy |
21:57:14 | ldlework | C++ and Rust were mentioned |
21:57:17 | ldlework | And I said Nim too! |
21:57:22 | ldlework | And they said is that supported? |
21:57:25 | ldlework | And I went :3 |
21:57:50 | Araq | what question is that? via ctypes you only need to generate a DLL |
21:58:15 | ldlework | ugh ctypes |
21:58:20 | ldlework | but yeah I get your point |
21:58:53 | BlaXpirit | Araq, 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:33 | Araq | isJust? |
22:02:50 | * | polde quit (Ping timeout: 276 seconds) |
22:03:28 | kulelu88 | is it easier to write a performant lib in Nim for Python than to use C? |
22:04:19 | BlaXpirit | Araq, well the things are called just(x), nothing(T) |
22:04:28 | Araq | BlaXpirit: I know but still |
22:04:34 | BlaXpirit | the advantage of `isJust` is that it can have a twin `isNothing` |
22:04:52 | BlaXpirit | which can actually be useful. clearer than `not opt` |
22:05:10 | BlaXpirit | `not opt.has` is also pretty good though |
22:05:54 | BlaXpirit | just pick any combination of these names and let's be done with this :| |
22:07:22 | Araq | kulelu88: you're in #nim. everything is easier and better in Nim than in C. |
22:07:51 | kulelu88 | even the boilerplate for making nim talk to Python? |
22:08:57 | Araq | yes. |
22:09:08 | federico2 | speaking 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:28 | federico2 | yet, on the documentation the GC is said to be triggered by memory allocation and not run different threads ore use timers |
22:10:54 | Araq | federico2: well "rumors"... |
22:12:02 | federico2 | care to elaborate? :D |
22:12:29 | BlaXpirit | no hurry, but please do comment there :| |
22:12:50 | * | BlaXpirit quit (Quit: Quit Konversation) |
22:16:29 | Araq | federico2: 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:55 | Araq | and templates |
22:27:49 | * | TEttinger joined #nim |
22:32:13 | EXetoC | -.- |
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:22 | kulelu88 | is there a benchmark for nim vs. pypy vs Go? |
23:56:00 | * | banister quit (Read error: Connection reset by peer) |