00:04:42 | * | NimBot joined #nim |
00:06:10 | ldlework | lol |
00:37:30 | * | so joined #nim |
00:43:36 | * | mal`` quit (Quit: Leaving) |
00:51:31 | nkr | hey 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:22 | ldlework | Not sure |
01:02:33 | ldlework | anyone know? |
01:07:15 | * | jaco60 quit (Ping timeout: 240 seconds) |
01:13:04 | ldlework | Is there any documentation on Nimble's nimscript api? |
01:16:20 | ldlework | eh the source was informative enough |
01:21:21 | ldlework | Does 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:09 | Druage | for 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:57 | Druage | also is there any difference between generics and templates in nim? |
05:15:35 | Druage | seems like they do the same thing |
05:19:23 | vega_nsk | Druage, the length of array is a part of it's type, so it's a constant |
05:19:40 | Druage | kk good |
05:23:45 | vega_nsk | Templates is a simplified macros, they can be used for example for language enhancements. Generics used for data and algorithm generalization. |
05:24:16 | vega_nsk | You can't use generics in this example :-) ``template SrcDir*: expr = parentDir(instantiationInfo(0, true).filename)`` |
05:27:22 | Druage | what about when you do something like this |
05:28:27 | Druage | http://pastebin.com/8EWfSmaf |
05:29:05 | Druage | would 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:30 | yglukhov | dom96: Added a binary to a package with +x perms. Git clone preserves +x. nimble install drops it. Do you know why? %) |
08:19:38 | yglukhov | ah 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:59 | vega_nsk | Hi to all! Question about ``locks`` module. Why ``Lock`` reentrancy is not specified? |
09:35:47 | Araq | vega_nsk: it's re-entrant on win, not re-entrant on posix |
09:35:59 | Araq | so we left it unspecified |
09:36:34 | vega_nsk | Araq: Ok, but what about posix recursive mutex? |
09:36:55 | vega_nsk | Maybe I'll make a PR for it? |
09:38:31 | Araq | actually I prefer non-reentrant |
09:39:02 | Araq | locks should be as fast as possible |
09:39:40 | Araq | so ... I think you should come up with your own locking module (and nimble it) ;-) |
09:39:50 | vega_nsk | But it leads to that ugly code: https://gist.github.com/vegansk/99d8d57945ff1515d6dc |
09:42:29 | Araq | buy why do you need isEmptyImpl? |
09:44:11 | vega_nsk | Updated the gist. See ``get`` function. When I use isEmpty, it hangs |
09:44:51 | vega_nsk | What about ``initReentantLock`` or maybe a parameter for ``initLock``? |
09:50:33 | Araq | but you shouldn't use isEmpty with the dummy locking internally anyway, it's slower |
09:50:59 | Araq | I 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:18 | vega_nsk | For this task, network overhead beats that slowness :-) |
09:54:20 | * | dyce_ joined #nim |
09:56:42 | * | so quit (Ping timeout: 250 seconds) |
09:57:08 | vega_nsk | Araq, maybe better allow user to choose, does he wants to control reentrance by himself? |
09:57:56 | Araq | vega_nsk: if you come up with reentrantslocks.nim for the stdlib, the user can choose |
09:59:04 | Araq | but I don't want to touch locks.nim |
10:00:17 | vega_nsk | Araq, am I right, that {.locks.} magic will work with custom Lock object? |
10:00:30 | Araq | yup |
10:00:42 | wuehlmaus | yet another question of mine: what does the magic pragma do?:) |
10:01:02 | wuehlmaus | it is not listed in the pragma description |
10:01:24 | wuehlmaus | it is magic so cannot be described? :) |
10:02:39 | vega_nsk | wuehlmaus, 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:37 | wuehlmaus | still i thought it was a pragma so i looked elsewhere |
10:06:40 | * | CARAM__ joined #nim |
10:07:54 | Araq | wuehlmaus: 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:15 | wuehlmaus | ah, thanks |
10:08:19 | Araq | it'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:02 | wuehlmaus | i see |
10:09:22 | vega_nsk | Araq, 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:51 | Araq | vega_nsk: I think stdlib is better for this |
10:10:01 | vega_nsk | Ok, thanks! |
10:10:34 | Araq | maybe name it relocks.nim I cannot write reentrant |
10:10:58 | vega_nsk | Ok :-) |
10:10:58 | Araq | be 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:49 | Varriount | Araq: retrententra? |
10:43:02 | vega_nsk | Is 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:32 | Varriount | vega_nsk: The values of the enum need to be known to the Nim compiler... |
10:56:02 | * | gsingh93 joined #nim |
10:56:14 | Varriount | vega_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:06 | vega_nsk | Varriount: No, it's the ``PTHREAD_MUTEX_RECURSIVE`` constant from pthread.h for syslocks module |
11:06:28 | Varriount | That's an enum? |
11:06:35 | Varriount | or is it just a variable? |
11:06:41 | Varriount | Er, 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:41 | vega_nsk | It's the enum's value on Ubuntu 14.04 for example |
11:10:54 | Varriount | vega_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:14 | Varriount | Or you can use the emit pragma. |
11:11:19 | vega_nsk | Created workaround: https://github.com/vegansk/Nim/blob/reentrant_locks/lib/system/syslocks.nim#L84 |
11:12:10 | Varriount | Yeah, that's probably the best you can do. |
11:12:31 | * | RushPL joined #nim |
11:12:39 | Varriount | Hi RushPL |
11:12:44 | * | _stowa joined #nim |
11:13:01 | Varriount | RushPL: 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:23 | dom96 | Looks 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:12 | Varriount | dom96: 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:08 | endragor | https://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:35 | vega_nsk | If 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:03 | matkuki | Anyone got any ideas about 'Error: '[](sfBorders, i).position' cannot be assigned to' compilation error on Linux? |
13:24:05 | matkuki | This 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:11 | flyx | matkuki: because `[]` does not return a var Vertex? |
13:34:35 | matkuki | flyx: it works on windows! |
13:35:02 | flyx | hum. different compiler versions? |
13:35:22 | matkuki | no, same: https://github.com/nim-lang/Nim/issues/3869 |
13:35:56 | flyx | ah, it's a ptr, so it does not need to be var |
13:36:12 | matkuki | yes |
13:37:17 | * | spt joined #nim |
13:38:54 | * | toaoMgeorge joined #nim |
13:39:21 | * | darkf_ quit (Quit: Leaving) |
13:39:25 | Araq | matkuki: 32 vs 64 bit issue, 'i' is int and might be incompatible with your overloaded [] |
13:39:40 | Araq | just an educated guess though |
13:40:09 | matkuki | Araq: what should i try next? |
13:40:46 | Araq | i.int32 |
13:41:04 | * | vendethiel quit (Ping timeout: 255 seconds) |
13:41:59 | matkuki | tried 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:17 | matkuki | signitures of the relevant procs: https://bpaste.net/show/13c9ba55c1e8 |
13:51:05 | flyx | `[]=` should not get invoked, you're not assigning anything to sfBorders[i], you're accessing one of its fields |
13:51:59 | flyx | and Vertex does not seem to be a ref/ptr after all |
13:52:50 | flyx | looking at this proc: https://github.com/BlaXpirit/nim-csfml/blob/master/src/csfml_graphics.nim#L394 |
13:52:56 | flyx | I rather wonder why it compiles on Windows |
13:54:34 | matkuki | Yep, pasted the wrong proc, it should have been `[]` |
13:54:35 | matkuki | Vertex in a object, correct. But VertexArray is ptr object. |
13:54:55 | flyx | that's not of concern here |
13:54:57 | matkuki | sorry ,'Vertex is an object' |
13:55:21 | matkuki | just clarifying |
13:55:22 | flyx | sfBorders[i].position is not an lvalue |
13:55:26 | * | vendethiel joined #nim |
13:55:52 | flyx | (unless Nim makes magic by implicitly calling `[]=` in such a case, which I am unaware of) |
13:57:18 | flyx | does your code do the correct thing under Windows, matkuki? |
13:57:25 | matkuki | yes |
13:59:32 | flyx | then 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:26 | matkuki | it copies the chipmunk borders to the sfml vertex array, so they get drawn correctly. |
14:04:14 | flyx | anyway, 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:39 | flyx | but 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:40 | Varriount | matkuki: 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:37 | matkuki | flyx, Varriount: fowl just found the error. The CSFML library changed the return type of `[]` proc from 'ptr Vertex' to 'Vertex'! |
14:42:08 | flyx | well that's what I said above |
14:42:41 | flyx | it still doesn't explain why it compiles on Windows |
14:42:50 | matkuki | On my windows machine I had the library from a couple of weeks back, didn't even notice the change. |
14:43:11 | flyx | well then, that explains it |
14:43:28 | * | exebook joined #nim |
14:43:47 | matkuki | flyx: yes, thanks for the help. |
14:44:13 | matkuki | sorry I didn't notice it sooner. |
14:44:25 | Varriount | matkuki: What are you working on, by the way? |
14:44:48 | matkuki | Varriount: chipmunk2D 6 and 7 wrappers |
14:45:00 | matkuki | updating the examples |
14:46:37 | Varriount | vega_nsk: Yes. |
14:47:23 | Varriount | vega_nsk: The downside is the overhead of the boehm GC |
14:51:08 | vega_nsk | Varriount: Thanks. Are there any known issues with Nim library that uses boehm GC linked to C/C++/whatever application? |
14:51:29 | matkuki | flyx, 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:10 | matkuki | must be getting old |
14:53:17 | flyx | matkuki: haha |
14:54:20 | * | Ven joined #nim |
15:01:24 | * | dfan quit (Ping timeout: 248 seconds) |
15:01:40 | Varriount | vega_nsk: No known issues, no. |
15:02:53 | Varriount | vega_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:31 | Varriount | Araq: 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:28 | Varriount | vega_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:42 | nkr | what does "value of type 'cint' has to be discarded" means? why does it have to be discarded? |
15:19:34 | BlaXpirit | nkr, a function returns something, you can't ignore its return value |
15:19:52 | BlaXpirit | either use it or state that you did mean to ignore it |
15:20:24 | nkr | by prefixing with discard? |
15:20:28 | nkr | funny thing is that is tecnically a void function |
15:21:00 | endragor | according to the error, it returns `cint`, not void |
15:21:25 | endragor | you may add {.discardable.} pragma to the procedure to not have to prefix it discard |
15:21:43 | endragor | *with discard |
15:21:52 | nkr | ah ok |
15:22:05 | nkr | let me look deeply into that |
15:24:06 | nkr | it is void though..thats weird |
15:25:00 | nkr | ahh just found out... |
15:26:24 | nkr | cant I assign values to 2 vars at the same time like "self.bla, self.blabla = 2" ? |
15:26:44 | Varriount | nkr: The strange case of Dr Void and Mr. Cint? |
15:26:53 | nkr | haha |
15:27:26 | Varriount | nkr: `var a, b = 1` will assign 1 to both a and b |
15:28:42 | nkr | I got the cint error with this line: "self.barRect.y, self.totalRect.y = height - 40" |
15:30:01 | Varriount | nkr: You can't do it with already existing variables. |
15:30:06 | nkr | ahhh! |
15:30:07 | nkr | okay |
15:30:10 | nkr | thanks a lot :) |
15:30:57 | Varriount | Although, such an error message is really confusing, possibly should be reported as a bug/improvement. |
15:31:49 | nkr | Yes it made no sense |
15:33:20 | Varriount | nkr: What column was the error reported on? |
15:36:43 | asdf | on column 1 apparently |
15:37:20 | asdf | as simply doing `var a, b = 42; a, b = 58` throws this error |
15:48:58 | Araq | (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:36 | Araq | Varriount: it's possible and benetifical but hard |
16:48:17 | Varriount | Araq: I can imagine. |
16:49:21 | Varriount | Araq: 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:21 | Araq | Varriount: it's thread local, there is no need for any locks whatsoever |
18:20:28 | Araq | nor 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:38 | shodan45 | is there a list of projects that use nim? |
19:16:43 | shodan45 | open 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:52 | flyx | shodan45: 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:34 | filcuc | is there a way to force the call of a property setter inside the same module? |
20:47:09 | filcuc | i mean suppose i've a "proc `id=`(a: A, id: int) = ...." |
20:47:26 | filcuc | if inside the same module i do "a.id = 30" |
20:47:30 | ldlework | If I want to bundle non-code assets with my library, how is the code supposed to access/refer to those assets? |
20:47:39 | filcuc | this directly write to the A field |
20:47:47 | filcuc | instead of the proc `id=` |
20:48:13 | * | mog quit (Remote host closed the connection) |
20:48:26 | filcuc | can i force the call to the `id=` ? |
20:48:29 | filcuc | :) |
20:49:27 | flyx | filcuc: `id=`(a, 30) |
20:52:13 | filcuc | flyx: thanks |
20:53:51 | ldlework | dom96: poke |
20:55:24 | filcuc | another one, is there a way by writing a generic proc to extract from a function pointer its return type and arguments types? |
20:56:26 | filcuc | basically something like "proc foo[T](ptr: T) = ...." where T is an overloaded proc name |
20:57:11 | filcuc | in D this is simple through the use of type traits |
21:12:27 | ldlework | How do you actually execute a nimscript task with nim? |
21:12:43 | * | brson joined #nim |
21:16:48 | ldlework | nim e dadren.nims |
21:16:49 | ldlework | lib/pure/times.nim(68, 5) Error: cannot 'importc' variable at compile time |
21:16:55 | ldlework | I'm .. not importing times.nim |
21:17:13 | ldlework | oh maybe because I'm importing os |
21:18:32 | ldlework | I have no idea how to invoke a task within a nimscript |
21:18:50 | ldlework | I've tried like every possible combination of the scriptfile name and the task name |
21:20:11 | * | shodan45 quit (Quit: Konversation terminated!) |
21:20:13 | Araq | ldlework: use ospaths instead of os for nimscript |
21:20:20 | ldlework | yeah just realized all that |
21:20:24 | ldlework | but still no idea how to invoke my task |
21:20:25 | Araq | filcuc: getType() in a macro? |
21:20:46 | Araq | nim task dadren.nims |
21:23:01 | filcuc | Araq: 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:08 | filcuc | so inside a chain of calls |
21:23:11 | ldlework | Araq: thank you |
21:23:12 | filcuc | but maybe it |
21:23:16 | filcuc | was my fault |
21:23:40 | ldlework | Araq: 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:37 | filcuc | Araq: 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:33 | filcuc | Araq: i think that i could try to improve the nim traits |
21:26:52 | Araq | nah, type traits suck |
21:27:01 | filcuc | if you think that it worths it |
21:27:07 | filcuc | :) |
21:27:10 | Araq | all you can do is pile up feature on top of feature with them |
21:27:16 | Araq | getType() is the real solution |
21:27:45 | Araq | and btw return type extraction with getType is trivial |
21:28:11 | Araq | however, there is a PR I need to cleanup to improve getType |
21:29:04 | filcuc | Araq: i tried it but basically it returned an identifier |
21:29:27 | Araq | it returns a *symbol* |
21:29:44 | Araq | that you can expand further |
21:29:58 | Araq | ldlework: I put binary stuff in github repos. sue me. |
21:30:23 | ldlework | Araq: wait what? |
21:30:37 | ldlework | Araq: Maybe I didn't ask it good |
21:30:45 | Araq | lol |
21:31:05 | ldlework | I 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:10 | ldlework | How will it know the path? |
21:31:19 | ldlework | In Python you have pkg_resources() |
21:31:30 | ldlework | but you have to tell setup.py about those resources |
21:31:37 | ldlework | so when they are installed there is a manifest listing them |
21:31:46 | ldlework | which pkg_resources() basically just returns |
21:32:04 | filcuc | Araq: given that how can i specify a particular overloaded function |
21:32:32 | Araq | I use a novel feature that some OSes created after 1970 support. |
21:32:43 | Araq | It's called "relative paths". |
21:33:05 | filcuc | Araq: 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:30 | filcuc | Araq: like macro myMacro(foo) <--- in this case how can i specify the overloaded version i want? |
21:34:22 | Araq | ldlework: not sure what I would do with Nimble assets though. |
21:34:49 | filcuc | Araq: i think that in C++ you have to static_cast<void(*)(int)>(foo) |
21:34:52 | ldlework | Araq: Maybe dom96 will have some ideas when they are around. |
21:35:20 | Araq | filcuc: convert it to the type to disambiguate |
21:35:32 | * | aziz joined #nim |
21:35:34 | Araq | in other words Nim supports C++'s solution. |
21:36:02 | Araq | ldlework: I also use niminst to produce installers, not nimble. |
21:36:32 | ldlework | is that relevant somehow or just general advice |
21:36:33 | Araq | but I think your work is an engine, not an enduser application |
21:36:37 | ldlework | yeah |
21:36:50 | ldlework | in the end you should be able to nimble install it, and then use it to develop your own application |
21:36:55 | ldlework | but we have some built in fonts and stuff |
21:37:48 | filcuc | Araq: thanks |
21:38:27 | Araq | ldlework: I think your engine should have setAssetDir() or something |
21:38:59 | Araq | not 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:07 | ldlework | er |
21:39:21 | ldlework | But if they use nimble |
21:39:33 | ldlework | it doesn't go anywhere the distributor or enduser choses |
21:39:37 | ldlework | it goes where nimble choses |
21:39:41 | ldlework | so its an implementation detail |
21:39:45 | ldlework | which should be hidden behind an api |
21:39:50 | ldlework | like every other package manager :3 |
21:40:02 | filcuc | Araq: are concept like rust traits? |
21:40:09 | Araq | filcuc: no. |
21:40:12 | ldlework | filcuc: they are like user type-classes |
21:40:12 | filcuc | Araq: i mean do they work also at runtime |
21:40:14 | ldlework | generic constraints |
21:40:29 | Araq | filcuc: I know what you mean. |
21:40:33 | ldlework | filcuc: no they constrain what types may be used in generic parameters |
21:41:09 | ldlework | Which also lets code that uses the generic parameters assume certain details about values of the generic types |
21:41:10 | filcuc | ldlework: yep i know it (also rust traits) |
21:41:12 | ldlework | (right Araq?) |
21:41:15 | filcuc | basically interfaces |
21:41:20 | filcuc | (at compile time) |
21:41:33 | filcuc | but on rust they work also (somewhat) at runtime |
21:41:59 | ldlework | filcuc: if you take just a [T] you can't later have a t: T and do t.something |
21:42:16 | ldlework | filcuc: but if you that [T: Something] and have a t: T, now you can do t.something |
21:42:34 | ldlework | but only types with a .something can be used as a T in this proc or whatever |
21:42:46 | ldlework | so there's nothing runtime about it |
21:42:55 | Araq | ldlework: yes. |
21:42:59 | ldlework | (if I understood everything) |
21:43:01 | ldlework | yay |
21:43:18 | Araq | well nimble usually assumes that your code is on github/bitbucket/etc |
21:43:28 | ldlework | Araq: sure but then it is installed onto the user's machine |
21:43:37 | ldlework | so if that code contains a png or whatever |
21:43:39 | filcuc | ldlework: yep, basically like C++ templates with restrictions |
21:43:51 | ldlework | code has no reference point of where to access it on the disk |
21:43:59 | ldlework | since where nimble installs things is an implementation detail |
21:44:08 | ldlework | an probably platform specific |
21:44:17 | ldlework | so there should be some sort of api to ask nimble |
21:44:21 | Araq | nimble doesn't mess with your directory structure though |
21:44:29 | ldlework | that's not the point |
21:44:33 | ldlework | so there should be some sort of api to ask nimble |
21:44:43 | ldlework | hey where is the "assets/foo.png" in the "Dadren" package? |
21:44:49 | filcuc | ldlework: 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:51 | ldlework | and nimble would return an absolute path on the disk |
21:45:19 | filcuc | ldlework: but probably through concept you can have better error handling |
21:45:34 | filcuc | ldlework: because the compiler can output a nicer message |
21:45:40 | ldlework | filcuc: ah perhaps yeah |
21:45:44 | filcuc | (i think) |
21:46:07 | ldlework | Its not have to use templates to get the functionality |
21:46:09 | Araq | how would nimble know though? |
21:46:11 | ldlework | just normal generics |
21:46:19 | ldlework | Araq: because nimble itself knows where it installs packages |
21:46:28 | ldlework | its an implementation detail /of nimble/ afterall |
21:47:01 | ldlework | so 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:15 | ldlework | now even if a user configures nimble to install packages to a crazy place |
21:47:23 | ldlework | I can still get an absolute path to assets just the same |
21:47:33 | Araq | dunno how that can work out |
21:47:49 | Araq | nimble doesn't know what you ultimately do to build the software |
21:48:08 | ldlework | what? |
21:48:11 | Araq | so it would produce an .exe that works as long as it's kept in your examples/ dir, for instance |
21:48:18 | ldlework | what? |
21:48:28 | ldlework | oh you're saying |
21:48:30 | filcuc | btw "user type-classes" doesn't explain the idea to me |
21:48:33 | ldlework | it would produce an exe |
21:48:40 | ldlework | where the included font has to be inside the nimble package |
21:48:49 | ldlework | as in you could only ever run games made with dadren |
21:48:53 | ldlework | if the user also has nimble installed |
21:48:56 | ldlework | with dadren the package installed |
21:48:57 | Araq | yeah, something like that |
21:48:58 | ldlework | I see your point |
21:49:00 | ldlework | but |
21:49:05 | ldlework | if the build process is to gather assets |
21:49:09 | ldlework | to put them in a build location |
21:49:13 | ldlework | the same problem exists |
21:49:25 | ldlework | need a path to the asset to copy it to a meaningful location |
21:51:47 | Araq | well we can come up with all sort of things we can do at compile-time to determine the package's location |
21:52:05 | ldlework | Or just a simple one, in the authority for that infofrmation, nimble |
21:52:26 | ldlework | https://pythonhosted.org/setuptools/pkg_resources.html |
21:52:28 | Araq | nimble doesn't compile your package though. nim does. |
21:52:51 | Araq | and 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:37 | ldlework | What? |
21:53:42 | ldlework | All I want to do is |
21:53:44 | ldlework | import nimble |
21:53:53 | ldlework | get_package_install_path("some_package") |
21:54:10 | ldlework | how is that complicated, or scandalous |
21:54:58 | Araq | and what does get_package_install_path() do? is that in your code or in the client's code? |
21:55:23 | ldlework | Well I can make resuable macros for gathering those files and moving them somewhere |
21:55:33 | ldlework | Or even own the entire asset build pipeline for users |
21:55:44 | ldlework | or they can call my macro and put the assets where they care to |
21:55:55 | Araq | well sorry but I don't understand your proposal. |
21:56:00 | ldlework | Araq: interestingly I see that the way Rust solves it is by literally embedding the file into the source |
21:56:27 | ldlework | Why? |
21:56:34 | ldlework | during build the macro can move those files to somewhere |
21:57:05 | ldlework | like a folder next to the binary or somewhere a config file specifies and so on |
21:57:29 | * | Johz joined #nim |
21:57:33 | ldlework | I can't think of another way to ship assets |
21:57:50 | Araq | but if it's next to the binary (and you know I like this solution) you can use relative paths to access anything |
21:58:07 | ldlework | Sure the end user code, the code that loads them when the application is running will use a relative path |
21:58:22 | ldlework | how did the font file, that is inside a nim library package, get to that folder next to the produced binary? |
21:58:45 | Araq | copy it in the build step with nimscript :-) |
21:59:14 | Araq | perhaps that's your point .. you need to access the install target in nimscript |
21:59:18 | ldlework | yes... 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:34 | Araq | aha. now I finally understand you. |
21:59:46 | Araq | yes, nimble needs to get the feature asap. dom96! |
21:59:53 | Johz | Heya, 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:28 | Johz | I 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:35 | Johz | Does anyone have any suggestions? |
22:00:41 | ldlework | Araq: for now I think we will offer our "bundled assets" as a download link somewhere |
22:00:51 | Araq | Johz: should be fixed with devel |
22:01:52 | Johz | Araq: thanks, I'll use that instead. Any idea when the fix will be released on master? |
22:02:24 | Araq | well ... I need new rubber ducks |
22:02:38 | Araq | my GC is "obviously" correct. and yet crashes. |
22:02:50 | Araq | that's blocking 0.14 ... |
22:03:13 | filcuc | :) |
22:03:20 | ldlework | doh can't import future module in nimscript |
22:03:35 | Araq | hmm interesting. how come |
22:03:45 | filcuc | Araq: is it a replacement for the default one? |
22:04:01 | Araq | yeah |
22:04:35 | ldlework | lib/core/macros.nim(494, 1) Error: cannot generate VM code for macro dumpTree(s: stmt): stmt {.immediate.} = |
22:04:36 | filcuc | Araq: is there a doc or mind to share the changes? at a high level :) |
22:05:38 | Araq | it combines deferred reference counting with an incremental mark and sweep GC |
22:07:22 | Araq | it's a GC that adheres to your deadlines |
22:08:11 | filcuc | Araq: nice |
22:08:48 | Araq | which is a more appropriate term than hard/soft realtime GC. |
22:10:26 | filcuc | Araq: does each thread still have its own GC? |
22:11:11 | Araq | yup and that's unlikely to change anytime soon. |
22:11:21 | Araq | since I cannot even get gc:v2 to work -.- |
22:12:28 | * | mog joined #nim |
22:13:20 | Johz | Araq, turns out I was using devel, and it's fixed on master, so that looks like the bug's in devel somewhere. |
22:13:57 | filcuc | Araq: 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:25 | filcuc | like go does..but i've no strong opinions |
22:20:35 | Araq | you can pass ptr through channels |
22:21:32 | * | Matthias247 joined #nim |
22:23:16 | ldlework | When I run this task, I get *no* output, https://gist.github.com/dustinlacewell/00779358f64041c27aa7 |
22:25:20 | filcuc | Araq: but refs? no AFAIK |
22:25:50 | Araq | filcuc: refs are deep copied. but you know you can cast a ref to a ptr |
22:26:43 | Araq | ldlework: 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:41 | ldlework | Araq: 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:02 | filcuc | Araq: ok, but passing ptr to another thread is not safe, isn't it? |
22:28:03 | ldlework | Araq: 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:33 | Araq | ldlework: so .inject the file for loop variable |
22:28:45 | Araq | or use .dirty templates |
22:28:49 | ldlework | Woah can you show me an example of that? |
22:29:07 | * | Ven quit (Client Quit) |
22:29:12 | Araq | template foo(...) {.dirty.} |
22:29:33 | Araq | filcuc: it's not safe in Go either. :P |
22:29:48 | ldlework | Araq: but how can I inject it |
22:29:54 | ldlework | which seems.. cleaner :) |
22:34:19 | Araq | for file {.inject.} in foo() ... |
22:36:01 | * | brson quit (Ping timeout: 265 seconds) |
22:36:52 | ldlework | no workie |
22:37:17 | ldlework | https://gist.github.com/dustinlacewell/00779358f64041c27aa7 |
22:37:25 | ldlework | dadren.nims(21, 10) Error: undeclared identifier: 'file' |
22:38:09 | Araq | body: untyped |
22:38:34 | Araq | we really need to remove 'stmt' and 'expr' from the language ... |
22:38:45 | Araq | and update every example out there ... |
22:44:01 | ldlework | I'm getting 0 output again |
22:44:42 | ldlework | https://gist.github.com/dustinlacewell/00779358f64041c27aa7 |
22:47:45 | filcuc | Araq: agree. typed and untyped are really better names |
22:48:52 | * | brson joined #nim |
22:49:32 | * | Kingsquee joined #nim |
22:50:48 | ldlework | Araq: bugs? |
22:51:12 | Araq | ldlework: told you to not use procs as parameters |
22:52:22 | ldlework | changing the second param to "untyped" didn't work |
22:53:49 | ldlework | I have no idea how to write this :( |
22:56:05 | filcuc | gn |
22:56:11 | * | filcuc quit (Quit: Konversation terminated!) |
22:56:47 | ldlework | Araq: why doesn't this even work? https://gist.github.com/dustinlacewell/00779358f64041c27aa7 |
22:56:58 | ldlework | just printing out each file |
22:57:00 | ldlework | no conditional |
22:57:27 | ldlework | neither does your example |
22:57:32 | ldlework | which compiles but outputs nothing |
23:02:35 | Araq | cannot get the filter to work either |
23:03:13 | ldlework | But the current example, which has no filter, doesn't work |
23:03:37 | Araq | maybe the dir is wrong? |
23:03:48 | Araq | look at my gist, I have a 'nimcache' dir |
23:03:53 | Araq | and it lists every file in there |
23:05:46 | * | Jesin quit (Quit: Leaving) |
23:07:46 | ldlework | yeah not super useful without the filter but thanks |
23:07:55 | * | Jesin joined #nim |
23:07:56 | ldlework | actually its fine |
23:07:58 | ldlework | thanks |
23:08:32 | * | Matthias247_ joined #nim |
23:09:44 | ldlework | The doc tool needs an -o option |
23:10:44 | Araq | it 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:44 | dom96 | Araq: Nimble publish depends on SSL :\ https://github.com/nim-lang/nimble/issues/209 |
23:16:56 | ldlework | Araq: https://gist.github.com/dustinlacewell/2c830c8a6e5fd3a16823 |
23:16:59 | ldlework | hi dom96 |
23:17:04 | * | Jesin joined #nim |
23:17:11 | * | aziz quit (Remote host closed the connection) |
23:18:14 | dom96 | hi ldlework |
23:18:28 | ldlework | dom96: did you read the scrollback |
23:19:08 | Araq | dom96: so? |
23:19:43 | Araq | everybody loves SSL. |
23:22:10 | dom96 | ldlework: nope |
23:22:37 | dom96 | Araq: It's a dependency I removed because it caused many issues for users. |
23:23:28 | Araq | I used to have a version that doesn't use SSL |
23:23:49 | Araq | I also used to have 'publish' as a separate tool. |
23:24:00 | Araq | maybe we need to do this? |
23:25:14 | Araq | alternatively we could ship some C code so that our SSL stuff doesn't depend on shitty DLLs |
23:25:38 | Araq | and since https is everywhere these days this seems to be the better solution. |
23:26:17 | dom96 | It would be nice to have something which loads the SSL DLL on-demand. |
23:26:34 | Araq | that's just asking for another desaster to happen |
23:26:48 | dom96 | how so? |
23:27:12 | Araq | programmer tests the program, ships it, it fails for the enduser |
23:27:37 | Araq | because of some "DLL on-demand" loading feature |
23:28:26 | Araq | SSL support is too important, you cannot treat it as "optional dependency" |
23:28:51 | * | gokr quit (Quit: Leaving.) |
23:30:21 | Araq | Nim'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:49 | dom96 | That's a security problem. |
23:31:05 | Araq | using a computer is a security problem. |
23:41:08 | ldlework | Araq: any idea why the doc gen does work with --out? |
23:41:15 | ldlework | https://gist.github.com/dustinlacewell/2c830c8a6e5fd3a16823 |
23:42:03 | Araq | ldlework: well you cannot pass multiple files to 'nim doc2' (or can you?) |
23:42:27 | Araq | and iirc --out sets the output filename, not the directory but i dunno. |
23:43:42 | ldlework | guess the index is useless then |
23:44:04 | Araq | no, but you need to merge them later on |
23:44:13 | ldlework | oh right it does the idx thing |
23:44:17 | ldlework | forgot |
23:48:04 | ldlework | I was wondering, why does Nim not print the exception type when a runtime exception occurs unhandled? |
23:50:29 | Araq | pretty sure it does that? |
23:51:39 | ldlework | lib/system/nimscript.nim(174, 7) Error: unhandled exception: FAILED: nim --index:on doc2 dadren/.#application.nim |
23:51:46 | ldlework | Which exception type should I have handled? |
23:52:04 | ldlework | Or do I need to inspect the implementation of nimscript.nim? |
23:53:09 | ldlework | I 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:25 | ldlework | there's a lot of useful stuff in there, not in the nimscript api |
23:53:59 | Araq | you mean like an "ospaths" module? |
23:54:18 | ldlework | yeah or just "paths" for brevity. |
23:54:39 | Araq | lol, "ospaths" already exists |
23:54:42 | ldlework | path manipulation seems useful for build scripts |
23:55:04 | ldlework | oh? |
23:55:14 | Araq | yeah and it's documented too. |
23:55:36 | ldlework | what's it called? |
23:56:02 | ldlework | I don't see anything here http://nim-lang.org/docs/lib.html |
23:56:26 | Araq | http://nim-lang.org/docs/nims.html |
23:56:58 | ldlework | I see. I get it. |
23:57:08 | ldlework | In the nimscript environment different modules are available. |
23:57:58 | Araq | and apparently the exception name is not available. yay ;-) |
23:59:20 | * | Johz quit (Quit: Page closed) |