<< 17-02-2016 >>

00:04:42*NimBot joined #nim
00:06:10ldleworklol
00:37:30*so joined #nim
00:43:36*mal`` quit (Quit: Leaving)
00:51:31nkrhey guys wheres the best place to store non code assets on a nim package?
00:53:35*lompik quit (Ping timeout: 260 seconds)
00:55:52*mal`` joined #nim
00:57:22ldleworkNot sure
01:02:33ldleworkanyone know?
01:07:15*jaco60 quit (Ping timeout: 240 seconds)
01:13:04ldleworkIs there any documentation on Nimble's nimscript api?
01:16:20ldleworkeh the source was informative enough
01:21:21ldleworkDoes Nimble/Nim have a mechanism for accessing non-code assets in a Nimble package from code importing that package as a library or even from inside the library itself?
01:30:42*ekarlso quit (Ping timeout: 250 seconds)
01:36:57*filwit quit (Quit: Leaving)
01:37:19*yglukhov joined #nim
01:41:22*yglukhov quit (Ping timeout: 240 seconds)
01:46:44*ekarlso joined #nim
02:00:47*Subspice quit ()
02:03:35*StarBrilliant quit (Ping timeout: 260 seconds)
02:06:28*StarBrilliant joined #nim
02:38:04*yglukhov joined #nim
02:39:01*brson quit (Quit: leaving)
02:41:46*vendethiel joined #nim
02:42:10*yglukhov quit (Ping timeout: 240 seconds)
02:55:15*nande joined #nim
03:05:22*vendethiel quit (Ping timeout: 240 seconds)
03:14:04*pilne quit (Quit: Quitting!)
03:19:42*ked_ joined #nim
04:01:55*ked_ quit (Quit: Page closed)
04:05:49*desophos joined #nim
04:16:14*endragor joined #nim
04:30:34*Druage joined #nim
04:32:09Druagefor arrays is high() or len() a O(1) operation? or is it O(n)?
04:34:43*JStoker quit (Ping timeout: 240 seconds)
04:39:06*JStoker joined #nim
04:39:22*yglukhov joined #nim
04:43:46*yglukhov quit (Ping timeout: 240 seconds)
04:43:59*Demon_Fox joined #nim
05:01:35*darkf quit (Ping timeout: 240 seconds)
05:01:48*darkf joined #nim
05:01:57*darkf quit (Changing host)
05:01:57*darkf joined #nim
05:04:28*darkf_ joined #nim
05:07:20*darkf quit (Ping timeout: 260 seconds)
05:08:01*Kingsquee joined #nim
05:13:57Druagealso is there any difference between generics and templates in nim?
05:15:35Druageseems like they do the same thing
05:19:23vega_nskDruage, the length of array is a part of it's type, so it's a constant
05:19:40Druagekk good
05:23:45vega_nskTemplates is a simplified macros, they can be used for example for language enhancements. Generics used for data and algorithm generalization.
05:24:16vega_nskYou can't use generics in this example :-) ``template SrcDir*: expr = parentDir(instantiationInfo(0, true).filename)``
05:27:22Druagewhat about when you do something like this
05:28:27Druagehttp://pastebin.com/8EWfSmaf
05:29:05Druagewould the later not be valid?
05:31:24*s4 joined #nim
05:41:35*darkf_ quit (Ping timeout: 240 seconds)
05:42:33*darkf joined #nim
05:46:23*lompik joined #nim
05:53:18*gokr joined #nim
05:53:20*gokr quit (Read error: Connection reset by peer)
05:53:33*gokr joined #nim
06:39:15*Druage quit (Quit: Page closed)
06:41:03*yglukhov joined #nim
06:42:32*nande quit (Remote host closed the connection)
06:44:58*yglukhov quit (Ping timeout: 240 seconds)
07:27:36*vendethiel joined #nim
07:33:55*lompik quit (Ping timeout: 240 seconds)
07:51:00*vendethiel quit (Ping timeout: 248 seconds)
07:54:13*Ven joined #nim
07:58:38*Ven_ joined #nim
07:59:31*vendethiel joined #nim
07:59:32*Arrrr joined #nim
08:02:19*biscarch quit (Read error: Connection reset by peer)
08:02:38*Ven quit (Ping timeout: 265 seconds)
08:08:21*yglukhov joined #nim
08:10:00*biscarch joined #nim
08:16:17*toaoMgeorge quit (Read error: Connection reset by peer)
08:16:30yglukhovdom96: Added a binary to a package with +x perms. Git clone preserves +x. nimble install drops it. Do you know why? %)
08:19:38yglukhovah ok, found the problem.
08:20:11*toaoMgeorge joined #nim
08:21:30*vendethiel quit (Ping timeout: 252 seconds)
08:36:07*jaco60 joined #nim
08:41:50*vendethiel joined #nim
09:06:12*Trustable joined #nim
09:12:19*s4 quit (Quit: Konversation terminated!)
09:13:43*coffeepot joined #nim
09:20:57*Demon_Fox quit (Quit: Leaving)
09:25:59*vendethiel quit (Ping timeout: 264 seconds)
09:32:59vega_nskHi to all! Question about ``locks`` module. Why ``Lock`` reentrancy is not specified?
09:35:47Araqvega_nsk: it's re-entrant on win, not re-entrant on posix
09:35:59Araqso we left it unspecified
09:36:34vega_nskAraq: Ok, but what about posix recursive mutex?
09:36:55vega_nskMaybe I'll make a PR for it?
09:38:31Araqactually I prefer non-reentrant
09:39:02Araqlocks should be as fast as possible
09:39:40Araqso ... I think you should come up with your own locking module (and nimble it) ;-)
09:39:50vega_nskBut it leads to that ugly code: https://gist.github.com/vegansk/99d8d57945ff1515d6dc
09:42:29Araqbuy why do you need isEmptyImpl?
09:44:11vega_nskUpdated the gist. See ``get`` function. When I use isEmpty, it hangs
09:44:51vega_nskWhat about ``initReentantLock`` or maybe a parameter for ``initLock``?
09:50:33Araqbut you shouldn't use isEmpty with the dummy locking internally anyway, it's slower
09:50:59AraqI agree that it can get annoying
09:52:37*sarlalian quit (*.net *.split)
09:52:37*Gonzih quit (*.net *.split)
09:52:37*zaquest quit (*.net *.split)
09:52:37*exebook_ quit (*.net *.split)
09:52:37*dyce_ quit (*.net *.split)
09:52:38*zielmicha quit (*.net *.split)
09:52:38*clone1018 quit (*.net *.split)
09:52:38*CARAM__ quit (*.net *.split)
09:52:38*heinrich5991 quit (*.net *.split)
09:52:38*tstm quit (*.net *.split)
09:52:38*vega_nsk quit (*.net *.split)
09:52:38*dom96 quit (*.net *.split)
09:52:39*gmpreussner_ quit (*.net *.split)
09:52:39*DecoPerson quit (*.net *.split)
09:52:40*lyro quit (*.net *.split)
09:52:40*lenstr quit (*.net *.split)
09:52:41*themagician quit (*.net *.split)
09:52:41*reactormonk quit (*.net *.split)
09:52:54*gmpreussner joined #nim
09:52:58*heinrich5991 joined #nim
09:53:00*themagician joined #nim
09:53:01*zaquest joined #nim
09:53:01*exebook_ joined #nim
09:53:02*Gonzih joined #nim
09:53:04*vega_nsk joined #nim
09:53:18*lyro joined #nim
09:53:21*reactormonk joined #nim
09:53:34*sarlalian joined #nim
09:53:35*dom96 joined #nim
09:53:45*tstm joined #nim
09:54:03*LeNsTR joined #nim
09:54:18vega_nskFor this task, network overhead beats that slowness :-)
09:54:20*dyce_ joined #nim
09:56:42*so quit (Ping timeout: 250 seconds)
09:57:08vega_nskAraq, maybe better allow user to choose, does he wants to control reentrance by himself?
09:57:56Araqvega_nsk: if you come up with reentrantslocks.nim for the stdlib, the user can choose
09:59:04Araqbut I don't want to touch locks.nim
10:00:17vega_nskAraq, am I right, that {.locks.} magic will work with custom Lock object?
10:00:30Araqyup
10:00:42wuehlmausyet another question of mine: what does the magic pragma do?:)
10:01:02wuehlmausit is not listed in the pragma description
10:01:24wuehlmausit is magic so cannot be described? :)
10:02:39vega_nskwuehlmaus, http://nim-lang.org/docs/manual.html#guards-and-locks ?
10:03:33*sarlalian quit (*.net *.split)
10:03:34*dom96 quit (*.net *.split)
10:03:34*coffeepot quit (*.net *.split)
10:03:35*Guest96476 quit (*.net *.split)
10:05:06*dom96 joined #nim
10:05:22*Heartmender joined #nim
10:05:30*sarlalian joined #nim
10:05:44*Heartmender is now known as Guest24901
10:06:03*DecoPerson joined #nim
10:06:13*zielmicha joined #nim
10:06:37wuehlmausstill i thought it was a pragma so i looked elsewhere
10:06:40*CARAM__ joined #nim
10:07:54Araqwuehlmaus: it means it gets special treatment in the compiler
10:07:58*clone1018 joined #nim
10:08:10*zaquest quit (*.net *.split)
10:08:10*heinrich5991 quit (*.net *.split)
10:08:10*themagician quit (*.net *.split)
10:08:10*LeNsTR quit (*.net *.split)
10:08:10*Kingsquee quit (*.net *.split)
10:08:11*onionhammer quit (*.net *.split)
10:08:15wuehlmausah, thanks
10:08:19Araqit's not documented because it's an implementation detail
10:08:22*heinrich5991 joined #nim
10:08:23*themagician joined #nim
10:08:33*LeNsTR joined #nim
10:08:35*zaquest joined #nim
10:09:02wuehlmausi see
10:09:22vega_nskAraq, is reentrantslocks.nim a part of stdlib and I can add this functionality to syslocks, or it must live in the nimble repository?
10:09:37*Kingsquee joined #nim
10:09:47*onionhammer joined #nim
10:09:51Araqvega_nsk: I think stdlib is better for this
10:10:01vega_nskOk, thanks!
10:10:34Araqmaybe name it relocks.nim I cannot write reentrant
10:10:58vega_nskOk :-)
10:10:58Araqbe gentle to the dyslexic programmers
10:28:11*coffeepot joined #nim
10:32:47*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:34:49VarriountAraq: retrententra?
10:43:02vega_nskIs there any way to import enum from c header? Or enum's value as a ``const``?
10:49:25*zaquest quit (*.net *.split)
10:49:25*Guest24901 quit (*.net *.split)
10:49:25*dom96 quit (*.net *.split)
10:49:26*jaco60 quit (*.net *.split)
10:49:26*StarBrilliant quit (*.net *.split)
10:49:28*delian66 quit (*.net *.split)
10:49:28*jsudlow quit (*.net *.split)
10:49:29*zxtx quit (*.net *.split)
10:49:29*mnemonikk quit (*.net *.split)
10:49:29*Amrykid quit (*.net *.split)
10:49:30*mtj_ quit (*.net *.split)
10:49:30*someplace quit (*.net *.split)
10:49:30*GaveUp quit (*.net *.split)
10:49:30*_stowa quit (*.net *.split)
10:49:31*flyx quit (*.net *.split)
10:49:39*delian66 joined #nim
10:49:40*Amrykid joined #nim
10:49:49*zaquest joined #nim
10:50:07*Heartmen- joined #nim
10:50:09*jsudlow joined #nim
10:50:35*flyx joined #nim
10:50:37*zxtx joined #nim
10:50:53*someplace joined #nim
10:51:02*mtj_ joined #nim
10:51:10*dom96 joined #nim
10:51:40*GaveUp joined #nim
10:51:57*jaco60 joined #nim
10:52:09*mnemonikk joined #nim
10:52:13*_stowa joined #nim
10:52:32*gsingh93 quit (Ping timeout: 272 seconds)
10:52:40*mnemonikk quit (Changing host)
10:52:41*mnemonikk joined #nim
10:52:48*StarBrilliant joined #nim
10:53:12*so joined #nim
10:55:32Varriountvega_nsk: The values of the enum need to be known to the Nim compiler...
10:56:02*gsingh93 joined #nim
10:56:14Varriountvega_nsk: If you're making a wrapper, have you tried c2nim?
11:04:16*zielmicha quit (*.net *.split)
11:04:17*dyce_ quit (*.net *.split)
11:04:17*exebook_ quit (*.net *.split)
11:04:17*Gonzih quit (*.net *.split)
11:04:18*Senketsu quit (*.net *.split)
11:04:19*polde quit (*.net *.split)
11:04:20*[CBR]Unspoken quit (*.net *.split)
11:04:20*OnO_ quit (*.net *.split)
11:04:21*cnu- quit (*.net *.split)
11:04:22*mog quit (*.net *.split)
11:04:22*jck quit (*.net *.split)
11:04:22*vqrs quit (*.net *.split)
11:04:22*OmlkRoNiXz quit (*.net *.split)
11:04:39*OmIkRoNiXz joined #nim
11:04:42*Senketsu joined #nim
11:04:53*[CBR]Unspoken joined #nim
11:05:25*jck joined #nim
11:05:37*exebook_ joined #nim
11:05:45*OnO joined #nim
11:05:48*mog joined #nim
11:05:55*polde joined #nim
11:05:56*vqrs joined #nim
11:05:57*dyce_ joined #nim
11:05:59*cnu- joined #nim
11:06:01*Gonzih joined #nim
11:06:06vega_nskVarriount: No, it's the ``PTHREAD_MUTEX_RECURSIVE`` constant from pthread.h for syslocks module
11:06:28VarriountThat's an enum?
11:06:35Varriountor is it just a variable?
11:06:41VarriountEr, const
11:08:09*Guest15707 quit (Quit: No Ping reply in 180 seconds.)
11:09:12*_stowa quit (Ping timeout: 265 seconds)
11:09:36*lyro quit (Ping timeout: 272 seconds)
11:09:41vega_nskIt's the enum's value on Ubuntu 14.04 for example
11:10:54Varriountvega_nsk: Hm. You can either assume the value is the same for all systems, or attempt to read it from a local header.
11:11:14VarriountOr you can use the emit pragma.
11:11:19vega_nskCreated workaround: https://github.com/vegansk/Nim/blob/reentrant_locks/lib/system/syslocks.nim#L84
11:12:10VarriountYeah, that's probably the best you can do.
11:12:31*RushPL joined #nim
11:12:39VarriountHi RushPL
11:12:44*_stowa joined #nim
11:13:01VarriountRushPL: Also, yay! another quassel user!
11:14:40*vendethiel joined #nim
11:16:16*StarBrilliant quit (Quit: ZNC - http://znc.in)
11:17:09*zielmicha joined #nim
11:29:35*darkf_ joined #nim
11:33:30*darkf quit (Ping timeout: 260 seconds)
11:36:04*lyro joined #nim
11:37:38*vendethiel quit (Ping timeout: 276 seconds)
11:38:44*arnetheduck joined #nim
11:39:56*endragor quit (*.net *.split)
11:39:56*wuehlmaus quit (*.net *.split)
11:39:56*bbl_ quit (*.net *.split)
11:39:56*nsf quit (*.net *.split)
11:39:58*low-profile quit (*.net *.split)
11:39:58*thotypous quit (*.net *.split)
11:39:58*toddpratt quit (*.net *.split)
11:39:58*SianaGearz quit (*.net *.split)
11:40:02*toddpratt joined #nim
11:40:06*wuehlmaus joined #nim
11:40:23dom96Looks like Nim's lib docs found a webkit bug hah https://twitter.com/ddkilzer/status/699717026403602432
11:40:25*endragor joined #nim
11:40:26*thotypous joined #nim
11:40:30*wuehlmaus is now known as Guest40798
11:41:09*bbl_ joined #nim
11:41:52*low-profile joined #nim
11:42:15*jaco60 quit (Ping timeout: 240 seconds)
11:42:43*nsf joined #nim
11:47:00*SianaGearz joined #nim
11:50:20*thotypous quit (*.net *.split)
11:50:20*vqrs quit (*.net *.split)
11:50:20*[CBR]Unspoken quit (*.net *.split)
11:50:21*jsudlow quit (*.net *.split)
11:50:22*LeNsTR quit (*.net *.split)
11:50:23*awsteele quit (*.net *.split)
11:50:23*saml quit (*.net *.split)
11:50:23*\u quit (*.net *.split)
11:50:23*federico3 quit (*.net *.split)
11:50:24*nim-buildbot quit (*.net *.split)
11:50:24*r-ku quit (*.net *.split)
11:50:24*SirCmpwn quit (*.net *.split)
11:50:24*silven quit (*.net *.split)
11:50:25*rinukkusu quit (*.net *.split)
11:50:25*rektide_ quit (*.net *.split)
11:50:26*Amun_Ra quit (*.net *.split)
11:50:26*asdf quit (*.net *.split)
11:50:26*fold3 quit (*.net *.split)
11:50:37*silven joined #nim
11:50:43*saml joined #nim
11:50:44*rinukkusu joined #nim
11:51:01*federico3 joined #nim
11:51:06*LeNsTR joined #nim
11:51:12Varriountdom96: Now we can put "Nim supports Webkit!" on the front page. :3
11:51:14*[CBR]Unspoken joined #nim
11:51:20*r-ku joined #nim
11:51:23*Amun_Ra joined #nim
11:51:43*ray- joined #nim
11:51:53*thotypous joined #nim
11:52:06*SirCmpwn joined #nim
11:52:17*fold3 joined #nim
11:54:31*alexsystemf quit (Ping timeout: 260 seconds)
11:54:54*alexsystemf joined #nim
11:55:35*rektide joined #nim
11:55:40*asdf joined #nim
11:56:03*asdf is now known as Guest35628
11:56:17*jsudlow joined #nim
11:56:48*Guest35628 is now known as asdf
11:58:08endragorhttps://github.com/pragmagic/vscode-nim/
11:59:46*NimBot joined #nim
11:59:47*themagician joined #nim
11:59:51*biscarch joined #nim
11:59:59*Learath2 joined #nim
12:00:19*CcxCZ joined #nim
12:00:35*Xe joined #nim
12:00:55*dthrvr joined #nim
12:00:59*mountaingoat joined #nim
12:01:45*bbl_ joined #nim
12:03:36*nchambers joined #nim
12:04:01*wh1t3r0s3 joined #nim
12:04:01*BlaXpirit joined #nim
12:04:07*BlaXpirit quit (Max SendQ exceeded)
12:04:14*ldlework joined #nim
12:04:15*vqrs joined #nim
12:04:17*BlaXpirit joined #nim
12:04:27*desophos joined #nim
12:04:53*avsej joined #nim
12:04:53*avsej quit (Changing host)
12:04:53*avsej joined #nim
12:06:43*vendethiel joined #nim
12:07:34*SShrike joined #nim
12:18:35vega_nskIf I use ``--gc:boehm`` and ``--threadAnalysis:off``, can I share GC'ed objects between the threads?
12:20:18*ray- quit (Changing host)
12:20:18*ray- joined #nim
12:20:23*ray- is now known as \u
12:24:45*LeNsTR quit (Changing host)
12:24:45*LeNsTR joined #nim
12:24:53*cnu- quit (*.net *.split)
12:24:54*exebook_ quit (*.net *.split)
12:24:56*someplace quit (*.net *.split)
12:24:56*zxtx quit (*.net *.split)
12:24:57*CARAM__ quit (*.net *.split)
12:24:58*reactormonk quit (*.net *.split)
12:24:59*gokr quit (*.net *.split)
12:25:01*zama_ quit (*.net *.split)
12:25:03*Roin quit (*.net *.split)
12:25:04*nthxw quit (*.net *.split)
12:25:04*NhanH quit (*.net *.split)
12:25:06*regtools quit (*.net *.split)
12:25:07*nkr quit (*.net *.split)
12:25:08*huonw quit (*.net *.split)
12:25:11*regtools joined #nim
12:25:13*reactormonk joined #nim
12:25:14*nthxw joined #nim
12:25:16*huonw joined #nim
12:25:16*exebook_ joined #nim
12:25:20*zxtx joined #nim
12:25:25*cnu- joined #nim
12:25:31*someplace joined #nim
12:25:33*zama joined #nim
12:25:34*gokr joined #nim
12:25:41*Roin joined #nim
12:27:00*nkr joined #nim
12:28:22*vendethiel quit (Ping timeout: 250 seconds)
12:32:03*pigmej_ joined #nim
12:32:07*JStoker quit (Killed (sinisalo.freenode.net (Nickname regained by services)))
12:32:08*EastByte_ joined #nim
12:32:08*dthrvr quit (*.net *.split)
12:32:13*flyx quit (*.net *.split)
12:32:13*Heartmen- quit (*.net *.split)
12:32:16*DecoPerson quit (*.net *.split)
12:32:19*AckZ quit (*.net *.split)
12:32:20*ludocode_ quit (*.net *.split)
12:32:20*def- quit (*.net *.split)
12:32:21*EastByte quit (*.net *.split)
12:32:22*emery quit (*.net *.split)
12:32:23*mrkishi quit (*.net *.split)
12:32:25*kier quit (*.net *.split)
12:32:26*pigmej quit (*.net *.split)
12:32:27*JStoker joined #nim
12:32:28*flyx|znc joined #nim
12:32:29*pigmej_ is now known as pigmej
12:32:31*def- joined #nim
12:32:40*ludocode joined #nim
12:32:41*flyx|znc is now known as flyx
12:32:42*dthrvr joined #nim
12:33:11*kier joined #nim
12:34:07*Heartmender joined #nim
12:34:20*toaoMgeorge joined #nim
12:34:28*Heartmender is now known as Guest14362
12:36:08*emery joined #nim
12:38:05*mrkishi joined #nim
12:39:00*toaoMgeorge quit (Ping timeout: 248 seconds)
12:43:06*toaoMgeorge joined #nim
12:43:42*CARAM__ joined #nim
12:43:44*NhanH joined #nim
12:48:11*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:50:03*vendethiel joined #nim
12:51:08*SShrike quit (Quit: SShrike)
12:51:39*DecoPerson joined #nim
12:53:11*clone1018 quit (Remote host closed the connection)
12:53:21*Ven joined #nim
12:54:36*BitPuffin joined #nim
13:02:24*dfan joined #nim
13:03:07*lompik joined #nim
13:11:31*vendethiel quit (Ping timeout: 248 seconds)
13:14:31*toaoMgeorge quit (Ping timeout: 255 seconds)
13:16:26*matkuki joined #nim
13:18:28*vendethiel joined #nim
13:24:03matkukiAnyone got any ideas about 'Error: '[](sfBorders, i).position' cannot be assigned to' compilation error on Linux?
13:24:05matkukiThis is the code: https://github.com/matkuki/nim-chipmunk/blob/master/examples/chipmunk_test.nim#L61
13:31:18*darkf_ quit (Read error: Connection reset by peer)
13:31:41*darkf_ joined #nim
13:34:11flyxmatkuki: because `[]` does not return a var Vertex?
13:34:35matkukiflyx: it works on windows!
13:35:02flyxhum. different compiler versions?
13:35:22matkukino, same: https://github.com/nim-lang/Nim/issues/3869
13:35:56flyxah, it's a ptr, so it does not need to be var
13:36:12matkukiyes
13:37:17*spt joined #nim
13:38:54*toaoMgeorge joined #nim
13:39:21*darkf_ quit (Quit: Leaving)
13:39:25Araqmatkuki: 32 vs 64 bit issue, 'i' is int and might be incompatible with your overloaded []
13:39:40Araqjust an educated guess though
13:40:09matkukiAraq: what should i try next?
13:40:46Araqi.int32
13:41:04*vendethiel quit (Ping timeout: 255 seconds)
13:41:59matkukitried it, same thing.
13:46:33*exebook_ quit (Ping timeout: 240 seconds)
13:47:26*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:48:17matkukisignitures of the relevant procs: https://bpaste.net/show/13c9ba55c1e8
13:51:05flyx`[]=` should not get invoked, you're not assigning anything to sfBorders[i], you're accessing one of its fields
13:51:59flyxand Vertex does not seem to be a ref/ptr after all
13:52:50flyxlooking at this proc: https://github.com/BlaXpirit/nim-csfml/blob/master/src/csfml_graphics.nim#L394
13:52:56flyxI rather wonder why it compiles on Windows
13:54:34matkukiYep, pasted the wrong proc, it should have been `[]`
13:54:35matkukiVertex in a object, correct. But VertexArray is ptr object.
13:54:55flyxthat's not of concern here
13:54:57matkukisorry ,'Vertex is an object'
13:55:21matkukijust clarifying
13:55:22flyxsfBorders[i].position is not an lvalue
13:55:26*vendethiel joined #nim
13:55:52flyx(unless Nim makes magic by implicitly calling `[]=` in such a case, which I am unaware of)
13:57:18flyxdoes your code do the correct thing under Windows, matkuki?
13:57:25matkukiyes
13:59:32flyxthen maybe the compiler is inlining the call on Windows but not on Linux (now wildly guessing about things I have not really any knowledge about)
14:01:13*Ven joined #nim
14:01:37*pigmej quit (Ping timeout: 268 seconds)
14:02:26matkukiit copies the chipmunk borders to the sfml vertex array, so they get drawn correctly.
14:04:14flyxanyway, I'd say your code should not compile and the error is that it does on Windows
14:05:27*AckZ joined #nim
14:05:39flyxbut someone with more understanding about how Nim handles `[]`/`[]=` in lvalue context might give you a better answer
14:06:32*pigmej joined #nim
14:13:48*clone1018 joined #nim
14:17:03*vendethiel quit (Ping timeout: 240 seconds)
14:30:36*zielmicha quit (Ping timeout: 268 seconds)
14:32:17*zielmicha joined #nim
14:33:31*AckZ quit (K-Lined)
14:37:08*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:37:40Varriountmatkuki: Is it possible to copy & compile that gist, or do I need something else?
14:38:36*LeNsTR is now known as lenstr
14:41:37matkukiflyx, Varriount: fowl just found the error. The CSFML library changed the return type of `[]` proc from 'ptr Vertex' to 'Vertex'!
14:42:08flyxwell that's what I said above
14:42:41flyxit still doesn't explain why it compiles on Windows
14:42:50matkukiOn my windows machine I had the library from a couple of weeks back, didn't even notice the change.
14:43:11flyxwell then, that explains it
14:43:28*exebook joined #nim
14:43:47matkukiflyx: yes, thanks for the help.
14:44:13matkukisorry I didn't notice it sooner.
14:44:25Varriountmatkuki: What are you working on, by the way?
14:44:48matkukiVarriount: chipmunk2D 6 and 7 wrappers
14:45:00matkukiupdating the examples
14:46:37Varriountvega_nsk: Yes.
14:47:23Varriountvega_nsk: The downside is the overhead of the boehm GC
14:51:08vega_nskVarriount: Thanks. Are there any known issues with Nim library that uses boehm GC linked to C/C++/whatever application?
14:51:29matkukiflyx, this happened to me a couple of times this year. Someone points out something to me, but I just can't seem to get what they are saying until some time passes by.
14:53:10matkukimust be getting old
14:53:17flyxmatkuki: haha
14:54:20*Ven joined #nim
15:01:24*dfan quit (Ping timeout: 248 seconds)
15:01:40Varriountvega_nsk: No known issues, no.
15:02:53Varriountvega_nsk: The 'wrapping' of the library is fairly straightforward, as the boehm gc provides a malloc-lke routine.
15:05:33*arnetheduck quit (Ping timeout: 265 seconds)
15:05:37*pregressive joined #nim
15:06:53*polde quit (Quit: q)
15:08:31VarriountAraq: Just as a hypothetical, would multi-processor support for the GC (say, offloading certain GC mechanisms) be possible and/or beneficial to Nim?
15:08:44*polde joined #nim
15:10:28Varriountvega_nsk: This might be of interest, though I don't know if it's ever been used with Nim: http://www.hboehm.info/gc/scale.html
15:18:42nkrwhat does "value of type 'cint' has to be discarded" means? why does it have to be discarded?
15:19:34BlaXpiritnkr, a function returns something, you can't ignore its return value
15:19:52BlaXpiriteither use it or state that you did mean to ignore it
15:20:24nkrby prefixing with discard?
15:20:28nkrfunny thing is that is tecnically a void function
15:21:00endragoraccording to the error, it returns `cint`, not void
15:21:25endragoryou may add {.discardable.} pragma to the procedure to not have to prefix it discard
15:21:43endragor*with discard
15:21:52nkrah ok
15:22:05nkrlet me look deeply into that
15:24:06nkrit is void though..thats weird
15:25:00nkrahh just found out...
15:26:24nkrcant I assign values to 2 vars at the same time like "self.bla, self.blabla = 2" ?
15:26:44Varriountnkr: The strange case of Dr Void and Mr. Cint?
15:26:53nkrhaha
15:27:26Varriountnkr: `var a, b = 1` will assign 1 to both a and b
15:28:42nkrI got the cint error with this line: "self.barRect.y, self.totalRect.y = height - 40"
15:30:01Varriountnkr: You can't do it with already existing variables.
15:30:06nkrahhh!
15:30:07nkrokay
15:30:10nkrthanks a lot :)
15:30:57VarriountAlthough, such an error message is really confusing, possibly should be reported as a bug/improvement.
15:31:49nkrYes it made no sense
15:33:20Varriountnkr: What column was the error reported on?
15:36:43asdfon column 1 apparently
15:37:20asdfas simply doing `var a, b = 42; a, b = 58` throws this error
15:48:58Araq(a, b) = (58, 58)
15:54:04*pregressive quit (Remote host closed the connection)
15:57:20*dfan joined #nim
15:58:03*endragor quit (Ping timeout: 264 seconds)
15:59:40*reactormonk quit (Quit: WeeChat 1.1.1)
15:59:48*reactormonk joined #nim
16:00:30*pregressive joined #nim
16:02:40*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:04:02*yglukhov quit (Ping timeout: 265 seconds)
16:05:29*dfan quit (Ping timeout: 265 seconds)
16:11:06*spt quit (Quit: Page closed)
16:19:29*AckZ joined #nim
16:27:56*dfan joined #nim
16:27:58*pregress_ joined #nim
16:28:52*pregressive quit (Ping timeout: 250 seconds)
16:29:59*brson joined #nim
16:32:03*dfan quit (Ping timeout: 240 seconds)
16:33:42*pregress_ quit (Remote host closed the connection)
16:34:13*toaoMgeorge quit (Ping timeout: 244 seconds)
16:37:22*matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160210153822])
16:37:36AraqVarriount: it's possible and benetifical but hard
16:48:17VarriountAraq: I can imagine.
16:49:21VarriountAraq: Is the allocator lock-free?
16:54:25*silven quit (Ping timeout: 240 seconds)
16:55:08*silven joined #nim
16:59:50*nkr quit (Ping timeout: 268 seconds)
17:02:30*nkr joined #nim
17:04:27*Varriount quit (Ping timeout: 265 seconds)
17:04:48*yglukhov joined #nim
17:05:09*vendethiel joined #nim
17:09:03*yglukhov quit (Ping timeout: 240 seconds)
17:11:17*Varriount joined #nim
17:12:07*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:20:35*endragor joined #nim
17:25:30*dfan joined #nim
17:28:58*nsf quit (Quit: WeeChat 1.4)
17:32:46*pregressive joined #nim
17:33:37*NhanH quit (Ping timeout: 240 seconds)
17:34:07*CARAM__ quit (Read error: Connection reset by peer)
17:34:29*jck quit (Remote host closed the connection)
17:34:41*nkr quit (Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!)
17:35:07*Guest14362 quit (Remote host closed the connection)
17:35:30*nkr joined #nim
17:35:38*flyx quit (Ping timeout: 240 seconds)
17:35:38*someplace quit (Ping timeout: 240 seconds)
17:35:38*Learath2 quit (Ping timeout: 240 seconds)
17:36:25*Xe quit (Ping timeout: 240 seconds)
17:37:36*jck joined #nim
17:37:37*mnemonikk quit (Ping timeout: 240 seconds)
17:39:04*someplace joined #nim
17:39:10*jaco60 joined #nim
17:39:18*polde quit (Ping timeout: 268 seconds)
17:39:19*NhanH joined #nim
17:39:36*Learath2 joined #nim
17:39:44*flyx joined #nim
17:39:51*mnemonikk joined #nim
17:39:51*mnemonikk quit (Changing host)
17:39:51*mnemonikk joined #nim
17:39:55*CARAM__ joined #nim
17:39:57*Heartmender joined #nim
17:40:19*Heartmender is now known as Guest43109
17:41:00*Xe joined #nim
17:42:23*EastByte_ quit (Ping timeout: 268 seconds)
17:43:10*yglukhov joined #nim
17:44:07*shodan45 joined #nim
17:44:47*EastByte_ joined #nim
17:48:47*pilne joined #nim
17:55:57*[CBR]Unspoken quit (Ping timeout: 268 seconds)
17:59:12*endragor quit (Remote host closed the connection)
18:06:32*polde joined #nim
18:10:02*[CBR]Unspoken joined #nim
18:13:22*allan0 quit (Quit: no)
18:15:09*allan0 joined #nim
18:20:21AraqVarriount: it's thread local, there is no need for any locks whatsoever
18:20:28Araqnor atomic instructions etc
18:20:29*brson quit (Quit: leaving)
18:30:11*Arrrr quit (Quit: WeeChat 1.2)
19:03:53*BitPuffin quit (Read error: Connection reset by peer)
19:13:28*vendethiel quit (Quit: q+)
19:15:32*brson joined #nim
19:16:38shodan45is there a list of projects that use nim?
19:16:43shodan45open source or otherwise
19:16:54*yglukhov quit (Remote host closed the connection)
19:20:06*brson quit (Client Quit)
19:20:21*toaoMgeorge joined #nim
19:20:22*brson joined #nim
19:28:52flyxshodan45: well there's https://github.com/search?l=nimrod&p=2&q=stars%3A%3E1&s=stars&type=Repositories
19:51:52*darkf joined #nim
19:53:15*dfan quit (Read error: Connection reset by peer)
19:53:30*dfan joined #nim
20:13:21*BlaXpirit quit (Quit: Bye)
20:13:45*BlaXpirit joined #nim
20:14:47*nsf joined #nim
20:19:47*toaoMgeorge quit (Ping timeout: 248 seconds)
20:29:37*brson quit (Ping timeout: 240 seconds)
20:30:03*nande joined #nim
20:45:33*Ven joined #nim
20:45:57*filcuc joined #nim
20:46:34filcucis there a way to force the call of a property setter inside the same module?
20:47:09filcuci mean suppose i've a "proc `id=`(a: A, id: int) = ...."
20:47:26filcucif inside the same module i do "a.id = 30"
20:47:30ldleworkIf I want to bundle non-code assets with my library, how is the code supposed to access/refer to those assets?
20:47:39filcucthis directly write to the A field
20:47:47filcucinstead of the proc `id=`
20:48:13*mog quit (Remote host closed the connection)
20:48:26filcuccan i force the call to the `id=` ?
20:48:29filcuc:)
20:49:27flyxfilcuc: `id=`(a, 30)
20:52:13filcucflyx: thanks
20:53:51ldleworkdom96: poke
20:55:24filcucanother one, is there a way by writing a generic proc to extract from a function pointer its return type and arguments types?
20:56:26filcucbasically something like "proc foo[T](ptr: T) = ...." where T is an overloaded proc name
20:57:11filcucin D this is simple through the use of type traits
21:12:27ldleworkHow do you actually execute a nimscript task with nim?
21:12:43*brson joined #nim
21:16:48ldleworknim e dadren.nims
21:16:49ldleworklib/pure/times.nim(68, 5) Error: cannot 'importc' variable at compile time
21:16:55ldleworkI'm .. not importing times.nim
21:17:13ldleworkoh maybe because I'm importing os
21:18:32ldleworkI have no idea how to invoke a task within a nimscript
21:18:50ldleworkI've tried like every possible combination of the scriptfile name and the task name
21:20:11*shodan45 quit (Quit: Konversation terminated!)
21:20:13Araqldlework: use ospaths instead of os for nimscript
21:20:20ldleworkyeah just realized all that
21:20:24ldleworkbut still no idea how to invoke my task
21:20:25Araqfilcuc: getType() in a macro?
21:20:46Araqnim task dadren.nims
21:23:01filcucAraq: i tried last evening but seemed to me that i could not use a macro like a proc. i mean something like newBuilder().addSlot(procNamePtr) where addSlot is a macro
21:23:08filcucso inside a chain of calls
21:23:11ldleworkAraq: thank you
21:23:12filcucbut maybe it
21:23:16filcucwas my fault
21:23:40ldleworkAraq: if you happen to know the answer, regarding shipping non-code assets in nimble packages and how code should refer to those assets that would also be helpful.
21:25:37filcucAraq: furthermore i looked at the macro doc but it's not streightforward. I've been working for a couple of hours last night but it has been a pain. For sure not something like https://dlang.org/phobos/std_traits.html#ReturnType
21:26:33filcucAraq: i think that i could try to improve the nim traits
21:26:52Araqnah, type traits suck
21:27:01filcucif you think that it worths it
21:27:07filcuc:)
21:27:10Araqall you can do is pile up feature on top of feature with them
21:27:16AraqgetType() is the real solution
21:27:45Araqand btw return type extraction with getType is trivial
21:28:11Araqhowever, there is a PR I need to cleanup to improve getType
21:29:04filcucAraq: i tried it but basically it returned an identifier
21:29:27Araqit returns a *symbol*
21:29:44Araqthat you can expand further
21:29:58Araqldlework: I put binary stuff in github repos. sue me.
21:30:23ldleworkAraq: wait what?
21:30:37ldleworkAraq: Maybe I didn't ask it good
21:30:45Araqlol
21:31:05ldleworkI mean, if I put non-code assets in my Nimble package, and someone installs it, how should code in my nimble package access those non-code assets?
21:31:10ldleworkHow will it know the path?
21:31:19ldleworkIn Python you have pkg_resources()
21:31:30ldleworkbut you have to tell setup.py about those resources
21:31:37ldleworkso when they are installed there is a manifest listing them
21:31:46ldleworkwhich pkg_resources() basically just returns
21:32:04filcucAraq: given that how can i specify a particular overloaded function
21:32:32AraqI use a novel feature that some OSes created after 1970 support.
21:32:43AraqIt's called "relative paths".
21:33:05filcucAraq: i mean, suppose i've two proc foo(id: int) and proc foo(id: string) and i've to pass a function pointer somewhere (for example to macro we talked before)
21:33:30filcucAraq: like macro myMacro(foo) <--- in this case how can i specify the overloaded version i want?
21:34:22Araqldlework: not sure what I would do with Nimble assets though.
21:34:49filcucAraq: i think that in C++ you have to static_cast<void(*)(int)>(foo)
21:34:52ldleworkAraq: Maybe dom96 will have some ideas when they are around.
21:35:20Araqfilcuc: convert it to the type to disambiguate
21:35:32*aziz joined #nim
21:35:34Araqin other words Nim supports C++'s solution.
21:36:02Araqldlework: I also use niminst to produce installers, not nimble.
21:36:32ldleworkis that relevant somehow or just general advice
21:36:33Araqbut I think your work is an engine, not an enduser application
21:36:37ldleworkyeah
21:36:50ldleworkin the end you should be able to nimble install it, and then use it to develop your own application
21:36:55ldleworkbut we have some built in fonts and stuff
21:37:48filcucAraq: thanks
21:38:27Araqldlework: I think your engine should have setAssetDir() or something
21:38:59Araqnot sure it's actually Nimble's problem given that users usually like the freedom to distribute their apps in the way they like
21:39:07ldleworker
21:39:21ldleworkBut if they use nimble
21:39:33ldleworkit doesn't go anywhere the distributor or enduser choses
21:39:37ldleworkit goes where nimble choses
21:39:41ldleworkso its an implementation detail
21:39:45ldleworkwhich should be hidden behind an api
21:39:50ldleworklike every other package manager :3
21:40:02filcucAraq: are concept like rust traits?
21:40:09Araqfilcuc: no.
21:40:12ldleworkfilcuc: they are like user type-classes
21:40:12filcucAraq: i mean do they work also at runtime
21:40:14ldleworkgeneric constraints
21:40:29Araqfilcuc: I know what you mean.
21:40:33ldleworkfilcuc: no they constrain what types may be used in generic parameters
21:41:09ldleworkWhich also lets code that uses the generic parameters assume certain details about values of the generic types
21:41:10filcucldlework: yep i know it (also rust traits)
21:41:12ldlework(right Araq?)
21:41:15filcucbasically interfaces
21:41:20filcuc(at compile time)
21:41:33filcucbut on rust they work also (somewhat) at runtime
21:41:59ldleworkfilcuc: if you take just a [T] you can't later have a t: T and do t.something
21:42:16ldleworkfilcuc: but if you that [T: Something] and have a t: T, now you can do t.something
21:42:34ldleworkbut only types with a .something can be used as a T in this proc or whatever
21:42:46ldleworkso there's nothing runtime about it
21:42:55Araqldlework: yes.
21:42:59ldlework(if I understood everything)
21:43:01ldleworkyay
21:43:18Araqwell nimble usually assumes that your code is on github/bitbucket/etc
21:43:28ldleworkAraq: sure but then it is installed onto the user's machine
21:43:37ldleworkso if that code contains a png or whatever
21:43:39filcucldlework: yep, basically like C++ templates with restrictions
21:43:51ldleworkcode has no reference point of where to access it on the disk
21:43:59ldleworksince where nimble installs things is an implementation detail
21:44:08ldleworkan probably platform specific
21:44:17ldleworkso there should be some sort of api to ask nimble
21:44:21Araqnimble doesn't mess with your directory structure though
21:44:29ldleworkthat's not the point
21:44:33ldleworkso there should be some sort of api to ask nimble
21:44:43ldleworkhey where is the "assets/foo.png" in the "Dadren" package?
21:44:49filcucldlework: because also in C++ if you a templated function with a generic T and inside that function do something like T t; t.bar it wont compile if T doesn't have bar
21:44:51ldleworkand nimble would return an absolute path on the disk
21:45:19filcucldlework: but probably through concept you can have better error handling
21:45:34filcucldlework: because the compiler can output a nicer message
21:45:40ldleworkfilcuc: ah perhaps yeah
21:45:44filcuc(i think)
21:46:07ldleworkIts not have to use templates to get the functionality
21:46:09Araqhow would nimble know though?
21:46:11ldleworkjust normal generics
21:46:19ldleworkAraq: because nimble itself knows where it installs packages
21:46:28ldleworkits an implementation detail /of nimble/ afterall
21:47:01ldleworkso whatever mechanism that nimble uses to put the code there in the first place is the same mechanism that responds calls to this api
21:47:15ldleworknow even if a user configures nimble to install packages to a crazy place
21:47:23ldleworkI can still get an absolute path to assets just the same
21:47:33Araqdunno how that can work out
21:47:49Araqnimble doesn't know what you ultimately do to build the software
21:48:08ldleworkwhat?
21:48:11Araqso it would produce an .exe that works as long as it's kept in your examples/ dir, for instance
21:48:18ldleworkwhat?
21:48:28ldleworkoh you're saying
21:48:30filcucbtw "user type-classes" doesn't explain the idea to me
21:48:33ldleworkit would produce an exe
21:48:40ldleworkwhere the included font has to be inside the nimble package
21:48:49ldleworkas in you could only ever run games made with dadren
21:48:53ldleworkif the user also has nimble installed
21:48:56ldleworkwith dadren the package installed
21:48:57Araqyeah, something like that
21:48:58ldleworkI see your point
21:49:00ldleworkbut
21:49:05ldleworkif the build process is to gather assets
21:49:09ldleworkto put them in a build location
21:49:13ldleworkthe same problem exists
21:49:25ldleworkneed a path to the asset to copy it to a meaningful location
21:51:47Araqwell we can come up with all sort of things we can do at compile-time to determine the package's location
21:52:05ldleworkOr just a simple one, in the authority for that infofrmation, nimble
21:52:26ldleworkhttps://pythonhosted.org/setuptools/pkg_resources.html
21:52:28Araqnimble doesn't compile your package though. nim does.
21:52:51Araqand Python works so differently that I'm not sure we can copy its solutions
21:52:59*dfan quit (Ping timeout: 240 seconds)
21:53:37ldleworkWhat?
21:53:42ldleworkAll I want to do is
21:53:44ldleworkimport nimble
21:53:53ldleworkget_package_install_path("some_package")
21:54:10ldleworkhow is that complicated, or scandalous
21:54:58Araqand what does get_package_install_path() do? is that in your code or in the client's code?
21:55:23ldleworkWell I can make resuable macros for gathering those files and moving them somewhere
21:55:33ldleworkOr even own the entire asset build pipeline for users
21:55:44ldleworkor they can call my macro and put the assets where they care to
21:55:55Araqwell sorry but I don't understand your proposal.
21:56:00ldleworkAraq: interestingly I see that the way Rust solves it is by literally embedding the file into the source
21:56:27ldleworkWhy?
21:56:34ldleworkduring build the macro can move those files to somewhere
21:57:05ldleworklike a folder next to the binary or somewhere a config file specifies and so on
21:57:29*Johz joined #nim
21:57:33ldleworkI can't think of another way to ship assets
21:57:50Araqbut if it's next to the binary (and you know I like this solution) you can use relative paths to access anything
21:58:07ldleworkSure the end user code, the code that loads them when the application is running will use a relative path
21:58:22ldleworkhow did the font file, that is inside a nim library package, get to that folder next to the produced binary?
21:58:45Araqcopy it in the build step with nimscript :-)
21:59:14Araqperhaps that's your point .. you need to access the install target in nimscript
21:59:18ldleworkyes... okay and how does the nimscript know where a file in some arbitrary library dependency's asset lies on the disk in order to copy it
21:59:23*Demon_Fox joined #nim
21:59:34Araqaha. now I finally understand you.
21:59:46Araqyes, nimble needs to get the feature asap. dom96!
21:59:53JohzHeya, when I pass a file, say "out.exe" to the compiler, it outputs the file at that place, but when I pass a file in a directory, say "dist/out.exe", the compiler ignores it completely and doesn't output anything.
21:59:53*ldlework hugs Araq
22:00:28JohzI could play around with a build script and move the file to the right place, but that seems like more work than I should need to do for this
22:00:35JohzDoes anyone have any suggestions?
22:00:41ldleworkAraq: for now I think we will offer our "bundled assets" as a download link somewhere
22:00:51AraqJohz: should be fixed with devel
22:01:52JohzAraq: thanks, I'll use that instead. Any idea when the fix will be released on master?
22:02:24Araqwell ... I need new rubber ducks
22:02:38Araqmy GC is "obviously" correct. and yet crashes.
22:02:50Araqthat's blocking 0.14 ...
22:03:13filcuc:)
22:03:20ldleworkdoh can't import future module in nimscript
22:03:35Araqhmm interesting. how come
22:03:45filcucAraq: is it a replacement for the default one?
22:04:01Araqyeah
22:04:35ldleworklib/core/macros.nim(494, 1) Error: cannot generate VM code for macro dumpTree(s: stmt): stmt {.immediate.} =
22:04:36filcucAraq: is there a doc or mind to share the changes? at a high level :)
22:05:38Araqit combines deferred reference counting with an incremental mark and sweep GC
22:07:22Araqit's a GC that adheres to your deadlines
22:08:11filcucAraq: nice
22:08:48Araqwhich is a more appropriate term than hard/soft realtime GC.
22:10:26filcucAraq: does each thread still have its own GC?
22:11:11Araqyup and that's unlikely to change anytime soon.
22:11:21Araqsince I cannot even get gc:v2 to work -.-
22:12:28*mog joined #nim
22:13:20JohzAraq, turns out I was using devel, and it's fixed on master, so that looks like the bug's in devel somewhere.
22:13:57filcucAraq: to be honest i never worked with multiple threads, i knew that most of people complains for not being able to pass references through channels
22:15:25filcuclike go does..but i've no strong opinions
22:20:35Araqyou can pass ptr through channels
22:21:32*Matthias247 joined #nim
22:23:16ldleworkWhen I run this task, I get *no* output, https://gist.github.com/dustinlacewell/00779358f64041c27aa7
22:25:20filcucAraq: but refs? no AFAIK
22:25:50Araqfilcuc: refs are deep copied. but you know you can cast a ref to a ptr
22:26:43Araqldlework: there are bug reports that proc vars are still broken with the VM. use a template as a workaround. (which is more idiomatic too)
22:27:28*Ven quit (Read error: Connection reset by peer)
22:27:41ldleworkAraq: when I tried to do a template, and I did `for file in matched_files: body` where body is a stmt, the code inside the body couldn't access the 'file' variable.
22:28:02filcucAraq: ok, but passing ptr to another thread is not safe, isn't it?
22:28:03ldleworkAraq: do you think a non-mathematical programmer such as myself could contribute at all to the VM?
22:28:14*Ven joined #nim
22:28:33Araqldlework: so .inject the file for loop variable
22:28:45Araqor use .dirty templates
22:28:49ldleworkWoah can you show me an example of that?
22:29:07*Ven quit (Client Quit)
22:29:12Araqtemplate foo(...) {.dirty.}
22:29:33Araqfilcuc: it's not safe in Go either. :P
22:29:48ldleworkAraq: but how can I inject it
22:29:54ldleworkwhich seems.. cleaner :)
22:34:19Araqfor file {.inject.} in foo() ...
22:36:01*brson quit (Ping timeout: 265 seconds)
22:36:52ldleworkno workie
22:37:17ldleworkhttps://gist.github.com/dustinlacewell/00779358f64041c27aa7
22:37:25ldleworkdadren.nims(21, 10) Error: undeclared identifier: 'file'
22:38:09Araqbody: untyped
22:38:34Araqwe really need to remove 'stmt' and 'expr' from the language ...
22:38:45Araqand update every example out there ...
22:44:01ldleworkI'm getting 0 output again
22:44:42ldleworkhttps://gist.github.com/dustinlacewell/00779358f64041c27aa7
22:47:45filcucAraq: agree. typed and untyped are really better names
22:48:52*brson joined #nim
22:49:32*Kingsquee joined #nim
22:50:48ldleworkAraq: bugs?
22:51:12Araqldlework: told you to not use procs as parameters
22:52:22ldleworkchanging the second param to "untyped" didn't work
22:53:49ldleworkI have no idea how to write this :(
22:56:05filcucgn
22:56:11*filcuc quit (Quit: Konversation terminated!)
22:56:47ldleworkAraq: why doesn't this even work? https://gist.github.com/dustinlacewell/00779358f64041c27aa7
22:56:58ldleworkjust printing out each file
22:57:00ldleworkno conditional
22:57:27ldleworkneither does your example
22:57:32ldleworkwhich compiles but outputs nothing
23:02:35Araqcannot get the filter to work either
23:03:13ldleworkBut the current example, which has no filter, doesn't work
23:03:37Araqmaybe the dir is wrong?
23:03:48Araqlook at my gist, I have a 'nimcache' dir
23:03:53Araqand it lists every file in there
23:05:46*Jesin quit (Quit: Leaving)
23:07:46ldleworkyeah not super useful without the filter but thanks
23:07:55*Jesin joined #nim
23:07:56ldleworkactually its fine
23:07:58ldleworkthanks
23:08:32*Matthias247_ joined #nim
23:09:44ldleworkThe doc tool needs an -o option
23:10:44Araqit has --out
23:11:00*Matthias247 quit (Ping timeout: 250 seconds)
23:12:36*Jesin quit (Client Quit)
23:16:37*Trustable quit (Remote host closed the connection)
23:16:44dom96Araq: Nimble publish depends on SSL :\ https://github.com/nim-lang/nimble/issues/209
23:16:56ldleworkAraq: https://gist.github.com/dustinlacewell/2c830c8a6e5fd3a16823
23:16:59ldleworkhi dom96
23:17:04*Jesin joined #nim
23:17:11*aziz quit (Remote host closed the connection)
23:18:14dom96hi ldlework
23:18:28ldleworkdom96: did you read the scrollback
23:19:08Araqdom96: so?
23:19:43Araqeverybody loves SSL.
23:22:10dom96ldlework: nope
23:22:37dom96Araq: It's a dependency I removed because it caused many issues for users.
23:23:28AraqI used to have a version that doesn't use SSL
23:23:49AraqI also used to have 'publish' as a separate tool.
23:24:00Araqmaybe we need to do this?
23:25:14Araqalternatively we could ship some C code so that our SSL stuff doesn't depend on shitty DLLs
23:25:38Araqand since https is everywhere these days this seems to be the better solution.
23:26:17dom96It would be nice to have something which loads the SSL DLL on-demand.
23:26:34Araqthat's just asking for another desaster to happen
23:26:48dom96how so?
23:27:12Araqprogrammer tests the program, ships it, it fails for the enduser
23:27:37Araqbecause of some "DLL on-demand" loading feature
23:28:26AraqSSL support is too important, you cannot treat it as "optional dependency"
23:28:51*gokr quit (Quit: Leaving.)
23:30:21AraqNim's SSL support needs to just work. and that means we compile some *.c files into the binary, I'm afraid.
23:30:43*pregressive quit (Remote host closed the connection)
23:30:49dom96That's a security problem.
23:31:05Araqusing a computer is a security problem.
23:41:08ldleworkAraq: any idea why the doc gen does work with --out?
23:41:15ldleworkhttps://gist.github.com/dustinlacewell/2c830c8a6e5fd3a16823
23:42:03Araqldlework: well you cannot pass multiple files to 'nim doc2' (or can you?)
23:42:27Araqand iirc --out sets the output filename, not the directory but i dunno.
23:43:42ldleworkguess the index is useless then
23:44:04Araqno, but you need to merge them later on
23:44:13ldleworkoh right it does the idx thing
23:44:17ldleworkforgot
23:48:04ldleworkI was wondering, why does Nim not print the exception type when a runtime exception occurs unhandled?
23:50:29Araqpretty sure it does that?
23:51:39ldleworklib/system/nimscript.nim(174, 7) Error: unhandled exception: FAILED: nim --index:on doc2 dadren/.#application.nim
23:51:46ldleworkWhich exception type should I have handled?
23:52:04ldleworkOr do I need to inspect the implementation of nimscript.nim?
23:53:09ldleworkI was thinking that whatever operations in the os module could potentiall work from something like nimscript should be moved to say, a "path" module.
23:53:25ldleworkthere's a lot of useful stuff in there, not in the nimscript api
23:53:59Araqyou mean like an "ospaths" module?
23:54:18ldleworkyeah or just "paths" for brevity.
23:54:39Araqlol, "ospaths" already exists
23:54:42ldleworkpath manipulation seems useful for build scripts
23:55:04ldleworkoh?
23:55:14Araqyeah and it's documented too.
23:55:36ldleworkwhat's it called?
23:56:02ldleworkI don't see anything here http://nim-lang.org/docs/lib.html
23:56:26Araqhttp://nim-lang.org/docs/nims.html
23:56:58ldleworkI see. I get it.
23:57:08ldleworkIn the nimscript environment different modules are available.
23:57:58Araqand apparently the exception name is not available. yay ;-)
23:59:20*Johz quit (Quit: Page closed)