<< 20-03-2016 >>

00:04:32*ddmgy joined #nim
00:06:00cnclah seems like defining a converter is good
00:06:03*toaoMgeorge quit (Quit: Bye)
00:47:57*yglukhov joined #nim
00:52:19*yglukhov quit (Ping timeout: 248 seconds)
01:11:33*vendethiel quit (Ping timeout: 240 seconds)
01:14:36*vendethiel joined #nim
01:17:33*ddmgy quit (Quit: "Quit.")
01:28:20*arnetheduck joined #nim
01:35:19*vendethiel quit (Ping timeout: 260 seconds)
01:39:31*vendethiel joined #nim
01:50:11*brson quit (Ping timeout: 244 seconds)
02:23:58*vendethiel quit (Ping timeout: 268 seconds)
02:26:16*vendethiel joined #nim
03:27:00*desophos joined #nim
03:28:45cnclis there no way to try to get a value from a table by key without either looking it up twice or raising an exception?
03:49:18def-cncl: getOrDefault
03:58:54cnclhmm
04:03:15cnclwhat if the type has {.requiresInit.} ?
04:07:55cncli guess i should also say that, the default value might be inserted into the table intentionally
04:08:13cnclbut i would still need to be able to tell whether the key was present or not
04:08:27cncli guess i could wrap it in another type
04:16:41*francisl joined #nim
04:22:09*desophos quit (Read error: Connection reset by peer)
04:28:38cnclin c/c++ i would usually use some procedure that would return a pointer to the value in the table/map
04:28:54cncli can see why you might not want an API that does that in nim, though
04:44:37*Demon_Fox joined #nim
05:16:41*francisl quit (Quit: francisl)
05:42:52*_stowa quit (Remote host closed the connection)
05:53:01*yglukhov joined #nim
05:56:19*StarBrilliant joined #nim
05:57:23*yglukhov quit (Ping timeout: 248 seconds)
05:57:24*exebook quit (Read error: Connection reset by peer)
06:19:55*exebook joined #nim
07:09:15*endragor joined #nim
07:27:27*vendethiel quit (Ping timeout: 264 seconds)
07:30:54*gokr joined #nim
07:43:16*vendethiel joined #nim
07:45:50*StarBrilliant quit (Quit: ZNC - http://znc.in)
07:46:22*StarBrilliant joined #nim
07:54:41*yglukhov joined #nim
07:58:59*yglukhov quit (Ping timeout: 248 seconds)
08:00:28*gokr quit (Quit: Leaving.)
08:04:15*vendethiel quit (Ping timeout: 244 seconds)
08:04:33*yglukhov joined #nim
08:12:13*vendethiel joined #nim
08:17:50*yglukhov quit (Remote host closed the connection)
08:56:03*vendethiel quit (Ping timeout: 240 seconds)
09:00:02*vendethiel joined #nim
09:11:26*Ven joined #nim
09:18:18*yglukhov joined #nim
09:22:36*endragor quit (Remote host closed the connection)
09:22:43*yglukhov quit (Ping timeout: 248 seconds)
09:34:58flyxis the overhead of Nim's strings compared to C's char* noticable when doing string-heavy tasks? my NimYAML parser currently is about three times slower than libyaml, and I'm wondering if this is partly caused by string heap management or if my code is just bad
09:35:26*endragor joined #nim
09:36:23ldleworkflyx: string have copy semantics I believe
09:37:23flyxldlework: unless I use shallowCopy, yeah. but I use that when possible
09:37:56ldleworkflyx: I mean like even when passing it around
09:44:01flyxldlework: I can call shallow() on a string to prevent that. interestingly, that makes it rather slower
09:46:59*darkf quit (Quit: Leaving)
09:55:49flyxhum, it helped replacing `content = ""` with `content.setLen(0)`
09:56:08flyxI'd have thought the compiler would make this optimization
09:57:33*vendethiel quit (Ping timeout: 240 seconds)
09:59:31*vendethiel joined #nim
10:12:17*boopsiesisaway is now known as boopsies
10:20:09*Gonzih joined #nim
10:38:32*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:44:55cheatfateVarriount, are you here?
10:47:08flyxwhy is this true: ',' in {'\x20'..'\x31', '!', '\"', '$'..'+', '-'..'9', ';'..'Z', '\\', '^'..'z', '|', '~'..'\xFF'}
10:47:23flyx',' is between '+' and '-', so it shouldn't be in the set
10:52:09cheatfatebecause of '\x20'..'\x31'
10:53:13cheatfate[0x20, 0x31] - [20,21,22,23,24,25,26,27,28,29,2A,2B,2C,2D,2E,2F,30,31], and ',' - 0x2C
10:53:26flyxoh, whoops, I confused decimal with hex here
10:53:27flyxthanks
10:55:05cheatfatewhat is most easy way to define [uint] constant with highest bit set?
10:56:40*bjz joined #nim
11:03:11flyxhm. cast[uint](1 shl (sizeof(uint) * 8 - 1)) ?
11:03:52flyxoh wait, VM cannot cast
11:03:54endragorwon't work for `const`
11:04:57flyxint.high.uint + 1 perhaps
11:10:36cheatfateError: cannot convert -9223372036854775808 to uint64
11:12:58cheatfatehmm
11:14:41flyxhum, int.high shouldn't be negative
11:16:28flyxconst u = int.high.uint + 1.uint
11:16:31flyxworks for me
11:16:36flyxyou cannot echo it though
11:19:54*yglukhov joined #nim
11:21:12*chrisheller quit (Remote host closed the connection)
11:24:19*yglukhov quit (Ping timeout: 248 seconds)
11:32:57*yglukhov joined #nim
11:57:47*boopsies quit (Ping timeout: 244 seconds)
12:01:31*boopsies joined #nim
12:05:58*irrequietus joined #nim
12:50:22*exebook quit (Read error: Connection reset by peer)
12:52:52*Glucton joined #nim
12:55:42*yglukhov quit (Remote host closed the connection)
12:57:02*yglukhov joined #nim
12:58:40*Glucton left #nim (#nim)
13:04:49*exebook joined #nim
13:30:47*Arrrr joined #nim
13:35:25*francisl joined #nim
13:59:39*exebook quit (Ping timeout: 260 seconds)
14:04:16*qwertfisch joined #nim
14:12:32*francisl quit (Quit: francisl)
14:22:04*endragor quit (Ping timeout: 252 seconds)
14:30:19*irrequietus quit ()
14:45:30*yglukhov quit (Remote host closed the connection)
14:47:38*yglukhov joined #nim
14:48:49*krux02 quit (Ping timeout: 244 seconds)
15:00:28ArrrrJester: once you pop you can't stop
15:39:17cncli'm getting warning messages related to ProveInit from tables.nim (i'm just using the 0.13.0 distribution from the website). is that normal?
15:50:18*def- quit (Ping timeout: 244 seconds)
15:54:16*def- joined #nim
15:57:33*arnetheduck quit (Ping timeout: 276 seconds)
16:02:14*UberLambda joined #nim
16:05:33*toaoMgeorge joined #nim
16:05:56*^GaveUp^ joined #nim
16:09:55*mahasamoot quit (Ping timeout: 244 seconds)
16:18:33*GaveUp quit (Quit: I owe you pain.)
16:18:49*^GaveUp^ is now known as GaveUp
16:27:10*GaveUp quit (Quit: ZNC - http://znc.in)
16:27:29*GaveUp joined #nim
16:30:21*silven quit (Ping timeout: 248 seconds)
16:31:07*silven joined #nim
16:32:49*yglukhov quit (Remote host closed the connection)
16:33:39*yglukhov joined #nim
16:39:26*yglukhov quit (Remote host closed the connection)
16:40:39*yglukhov joined #nim
17:03:37*Arrrr quit (Ping timeout: 260 seconds)
17:12:56*desophos joined #nim
17:18:14*desophos quit (Quit: Leaving)
17:18:56*irrequietus joined #nim
17:19:00*desophos joined #nim
17:19:00*krux02 joined #nim
17:20:19*Arrrr joined #nim
17:20:19*Arrrr quit (Changing host)
17:20:19*Arrrr joined #nim
17:34:33*yglukhov quit (Remote host closed the connection)
17:35:53*yglukhov joined #nim
17:45:47*A_Harlan joined #nim
17:55:26*UberLambda quit (Quit: GTG)
18:00:00*A_Harlan is now known as aharlan
18:15:25*aharlan quit (Quit: Textual IRC Client: www.textualapp.com)
18:17:14cnclah i guess it's because there's no valid default value for this type
18:17:15*francisl joined #nim
18:20:51*rok joined #nim
18:26:22*francisl quit (Quit: francisl)
18:39:26*Jesin quit (Quit: Leaving)
18:42:33*darkf joined #nim
18:47:25*Gonzih quit (Quit: WeeChat 1.4)
18:47:43*Jesin joined #nim
18:47:47toaoMgeorgeI have just started to play with metaprogramming and I have a question: In which case do I have to use stmt/expr instead of typed/untyped? It's unclear whether stmt/expr are completely deprecated and exist just for legacy or there are still use cases for them
18:51:23*brson joined #nim
18:54:50*brson quit (Client Quit)
19:01:25ArrrrThat's a good question. In the past Araq has stated that stmt/expr is deprecated. At least that was the intention when they were introduced.
19:01:48*chrisheller joined #nim
19:01:57Arrrr*when typed/untyped were introduced
19:11:22*francisl joined #nim
19:11:43toaoMgeorgebut?
19:13:37ArrrrBut? Probably many programs relay on expr/stmt so they are not going to be removed, at least in a while.
19:19:13Arrrrhttp://stackoverflow.com/questions/31367313/typed-vs-untyped-vs-expr-vs-stmt-in-templates-and-macros
19:21:21toaoMgeorgeSo I won't have problems if I only use typed/untyped, they are just different aliases?
19:21:32*francisl quit (Quit: francisl)
19:23:27ArrrrYes. This is the last thing Araq said on the subject http://forum.nim-lang.org/t/2025#12611
19:27:44toaoMgeorgeFine
20:15:20*chrisheller quit (Remote host closed the connection)
20:22:28*gokr joined #nim
20:26:29*chrisheller joined #nim
20:29:01*aharlan joined #nim
20:29:03*gokr1 joined #nim
20:29:05*gokr quit (Read error: Connection reset by peer)
20:31:10*toaoMgeorge quit (Read error: Connection reset by peer)
20:31:39*toaoMgeorge joined #nim
20:31:53*aharlan quit (Client Quit)
21:08:03*mat4 joined #nim
21:15:59*mat4 quit (Quit: Leaving)
21:20:35*Arrrr quit (Ping timeout: 248 seconds)
21:30:06*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:31:57*bjz joined #nim
21:33:17*bjz quit (Client Quit)
21:35:53*kulelu88 joined #nim
21:46:33*themagician quit (Ping timeout: 240 seconds)
21:47:57*yglukhov quit (Remote host closed the connection)
21:52:03*Gonzih joined #nim
21:52:20*Gonzih quit (Client Quit)
21:52:38*brson joined #nim
21:53:26*Gonzih joined #nim
22:05:42*Demon_Fox quit (Quit: Leaving)
22:05:44*Gonzih quit (Quit: WeeChat 1.4)
22:06:03*Gonzih joined #nim
22:06:43*Gonzih quit (Client Quit)
22:07:29*Gonzih joined #nim
22:08:41*yglukhov joined #nim
22:20:09*vendethiel quit (Ping timeout: 260 seconds)
22:20:57*vendethiel joined #nim
22:40:01*rok quit (Quit: rok)
22:41:44*vendethiel quit (Ping timeout: 260 seconds)
22:47:44*Trustable joined #nim
23:06:21*beatmox quit (Ping timeout: 244 seconds)
23:07:44*qwertfisch quit (Ping timeout: 250 seconds)
23:08:50*yglukhov quit (Remote host closed the connection)
23:10:20*beatmox joined #nim
23:10:21*qwertfisch joined #nim
23:12:52*Trustable quit (Remote host closed the connection)
23:21:10*vendethiel joined #nim
23:31:09*beatmox quit (Ping timeout: 244 seconds)
23:32:01*qwertfisch quit (Ping timeout: 240 seconds)
23:32:17*beatmox joined #nim
23:32:53*qwertfisch joined #nim
23:33:19*boopsies is now known as boopsiesisaway
23:34:16*gorgonzolapasta quit (Ping timeout: 244 seconds)
23:39:25*gorgonzolapasta joined #nim
23:43:04*vendethiel quit (Ping timeout: 252 seconds)
23:43:58*gokr1 quit (Quit: Leaving.)