| 00:08:36 | * | Jehan_ quit (Read error: Connection reset by peer) |
| 00:08:51 | * | Jehan_ joined #nim |
| 00:11:14 | * | girvo quit (Quit: Lost terminal) |
| 00:11:32 | * | yglukhov quit (Remote host closed the connection) |
| 00:20:24 | * | jaco60 quit (Remote host closed the connection) |
| 00:22:40 | * | jaco60 joined #nim |
| 00:40:23 | * | bamorim quit (Ping timeout: 264 seconds) |
| 00:40:49 | * | Jehan_ quit (Read error: Connection reset by peer) |
| 00:41:08 | * | Jehan_ joined #nim |
| 00:42:42 | * | strcmp1 quit (Quit: peace) |
| 00:45:15 | * | Jehan_ quit (Ping timeout: 240 seconds) |
| 00:46:07 | * | strcmp1 joined #nim |
| 00:46:49 | * | Jehan_ joined #nim |
| 00:49:40 | * | Varriount-Laptop joined #nim |
| 00:54:55 | * | bamorim joined #nim |
| 00:59:03 | Varriount-Laptop | So, I just succeeded in building a 64-bit LLVM.dll |
| 01:05:50 | * | desophos quit (Ping timeout: 276 seconds) |
| 01:12:02 | * | yglukhov joined #nim |
| 01:13:59 | * | bamorim quit (Ping timeout: 264 seconds) |
| 01:16:24 | * | lompik joined #nim |
| 01:16:50 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 01:20:35 | * | Jehan_ quit (Ping timeout: 264 seconds) |
| 01:21:31 | * | Jehan_ joined #nim |
| 01:32:32 | * | junw_ quit (Ping timeout: 265 seconds) |
| 01:33:15 | * | nchambers joined #nim |
| 01:44:29 | * | junw joined #nim |
| 01:48:35 | * | brson quit (Quit: leaving) |
| 01:48:35 | * | kniteli quit (Ping timeout: 240 seconds) |
| 01:53:35 | * | Jehan_ quit (Ping timeout: 240 seconds) |
| 01:54:12 | * | Jehan_ joined #nim |
| 02:01:34 | * | nchambers quit (Ping timeout: 250 seconds) |
| 02:03:44 | * | nchambers joined #nim |
| 02:05:40 | onionhammer | nd? :) |
| 02:05:47 | onionhammer | and' |
| 02:06:02 | onionhammer | what are you going to do with it? |
| 02:06:05 | Varriount-Laptop | onionhammer: I'm going to see if I can get the nlvm tool posted on the forum to work. |
| 02:06:34 | onionhammer | Ahh nifty |
| 02:07:05 | onionhammer | I wish nim had partial application |
| 02:08:57 | Varriount-Laptop | I think someone made a macro for that on the forum. |
| 02:10:14 | * | nchambers quit (Ping timeout: 250 seconds) |
| 02:10:59 | * | pregressive joined #nim |
| 02:12:18 | * | nchambers joined #nim |
| 02:13:37 | * | yglukhov joined #nim |
| 02:17:58 | * | yglukhov quit (Ping timeout: 250 seconds) |
| 02:23:46 | onionhammer | Ooh? |
| 02:24:00 | onionhammer | Well, macros like that are almost never very solid |
| 02:24:29 | onionhammer | One of the reasons why I've been kinda on the fence about nim the last year or so |
| 02:25:03 | onionhammer | The compiler has tok many gotchas |
| 02:25:11 | onionhammer | And the std lib is very buggy |
| 02:27:35 | * | Jehan_ quit (Ping timeout: 245 seconds) |
| 02:27:38 | * | Jehan` joined #nim |
| 02:33:37 | * | Sembei quit (Read error: Connection reset by peer) |
| 02:34:43 | * | Sembei joined #nim |
| 02:36:57 | * | desophos joined #nim |
| 02:37:52 | * | bamorim joined #nim |
| 02:38:40 | * | strcmp1 quit (Quit: peace) |
| 02:42:47 | * | Jehan` quit (Quit: Leaving) |
| 02:59:15 | * | nchambers quit (Ping timeout: 240 seconds) |
| 03:07:00 | * | junw quit (Read error: Connection reset by peer) |
| 03:07:19 | * | brson joined #nim |
| 03:12:50 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
| 03:13:20 | * | Varriount-Laptop joined #nim |
| 03:15:08 | * | yglukhov joined #nim |
| 03:19:26 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 03:33:19 | * | xtagon quit (Quit: Connection closed for inactivity) |
| 03:36:29 | * | nchambers joined #nim |
| 03:37:44 | * | vendethiel joined #nim |
| 03:57:06 | * | bamorim quit (Ping timeout: 240 seconds) |
| 04:00:42 | * | vendethiel quit (Ping timeout: 272 seconds) |
| 04:03:49 | * | vqrs quit (Ping timeout: 265 seconds) |
| 04:04:50 | * | nchambers quit (Ping timeout: 260 seconds) |
| 04:06:12 | * | vqrs joined #nim |
| 04:08:28 | * | pregressive quit (Remote host closed the connection) |
| 04:28:34 | * | brson quit (Quit: leaving) |
| 04:50:04 | * | sjums joined #nim |
| 04:55:39 | * | vangroan joined #nim |
| 04:55:55 | * | bozaloshtsh quit (Ping timeout: 245 seconds) |
| 04:57:56 | * | bozaloshtsh joined #nim |
| 05:05:07 | * | arnetheduck joined #nim |
| 05:16:36 | * | yglukhov joined #nim |
| 05:17:29 | * | vangroan quit (Quit: Leaving) |
| 05:21:16 | * | yglukhov quit (Ping timeout: 276 seconds) |
| 05:24:01 | * | Jesin joined #nim |
| 05:25:26 | * | Demon_Fox quit (Ping timeout: 256 seconds) |
| 05:25:57 | * | Demon_Fox joined #nim |
| 05:39:47 | * | vqrs quit (Ping timeout: 264 seconds) |
| 05:42:51 | * | vqrs joined #nim |
| 06:24:02 | * | darkf joined #nim |
| 06:54:45 | * | dheerajgopi joined #nim |
| 06:55:02 | * | dheerajgopi quit (Client Quit) |
| 06:57:47 | * | lompik quit (Ping timeout: 264 seconds) |
| 07:04:05 | * | Demon_Fox quit (Quit: Leaving) |
| 07:26:24 | * | vendethiel joined #nim |
| 07:30:03 | * | vendethiel quit (Client Quit) |
| 07:59:50 | * | desophos quit (Read error: Connection reset by peer) |
| 07:59:50 | Araq_ | onionhammer: would be nice if you could be more specific |
| 08:08:07 | * | Matthias247 joined #nim |
| 08:14:42 | * | yglukhov joined #nim |
| 08:22:04 | * | Arrrr joined #nim |
| 08:33:55 | * | kniteli joined #nim |
| 08:47:46 | * | BitPuffin|osx quit (Ping timeout: 260 seconds) |
| 08:54:03 | * | Trustable joined #nim |
| 09:11:42 | * | M-Quora quit (Quit: node-irc says goodbye) |
| 09:28:11 | * | zepolen_ joined #nim |
| 09:30:14 | * | zepolen quit (Ping timeout: 276 seconds) |
| 09:31:21 | * | Jehan_ joined #nim |
| 09:33:43 | * | zepolen joined #nim |
| 09:35:15 | * | zepolen_ quit (Ping timeout: 240 seconds) |
| 09:41:24 | * | Jehan_ quit (Quit: Leaving) |
| 09:42:40 | * | Demon_Fox joined #nim |
| 09:44:44 | * | Arrrr quit (Quit: WeeChat 1.2) |
| 09:54:06 | * | ephja joined #nim |
| 10:01:24 | * | vqrs quit (Ping timeout: 256 seconds) |
| 10:03:55 | * | vqrs joined #nim |
| 10:04:19 | * | Arrrr joined #nim |
| 10:45:13 | * | zepolen_ joined #nim |
| 10:46:46 | * | zepolen quit (Ping timeout: 240 seconds) |
| 10:48:58 | * | zepolen joined #nim |
| 10:50:08 | * | zepolen_ quit (Ping timeout: 256 seconds) |
| 10:55:57 | * | dashed joined #nim |
| 11:05:14 | * | zepolen_ joined #nim |
| 11:07:42 | * | zepolen quit (Ping timeout: 256 seconds) |
| 11:10:22 | * | zepolen joined #nim |
| 11:12:35 | * | zepolen_ quit (Ping timeout: 245 seconds) |
| 11:13:48 | * | zepolen_ joined #nim |
| 11:15:26 | * | zepolen quit (Ping timeout: 240 seconds) |
| 11:18:28 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
| 11:18:57 | * | Varriount-Laptop joined #nim |
| 11:45:24 | * | kniteli quit (Ping timeout: 265 seconds) |
| 11:53:54 | * | Demon_Fox quit (Excess Flood) |
| 11:54:31 | * | Demon_Fox joined #nim |
| 11:58:54 | * | Demon_Fox quit (Client Quit) |
| 12:00:26 | * | strcmp1 joined #nim |
| 12:16:42 | * | junw joined #nim |
| 12:20:37 | * | zepolen joined #nim |
| 12:23:34 | * | zepolen_ quit (Ping timeout: 272 seconds) |
| 12:29:50 | * | Arrrr quit (Ping timeout: 250 seconds) |
| 12:31:47 | * | Arrrr joined #nim |
| 12:33:18 | * | derka joined #nim |
| 12:37:42 | yglukhov | Araq: trying to fix conversion to uint in js. let myUnsigned = mySigned.uint16. And in backend I dont get any nkConv nodes about it. I get nkCast if i do let myUnsigned = cast[uint16](mySigned). But nothing when coverting. Is this intended behavior? |
| 12:45:55 | * | junw_ joined #nim |
| 12:50:10 | * | junw quit (Ping timeout: 265 seconds) |
| 12:51:35 | * | lyro quit (Ping timeout: 260 seconds) |
| 12:55:14 | * | yglukhov_ joined #nim |
| 12:55:14 | * | yglukhov quit (Read error: Connection reset by peer) |
| 13:09:39 | * | zepolen quit (Remote host closed the connection) |
| 13:10:11 | * | zepolen joined #nim |
| 13:11:42 | * | zepolen quit (Remote host closed the connection) |
| 13:12:13 | * | zepolen joined #nim |
| 13:23:02 | * | yglukhov_ quit (Ping timeout: 265 seconds) |
| 13:26:16 | * | vqrs quit (Ping timeout: 272 seconds) |
| 13:26:41 | * | pregressive joined #nim |
| 13:27:57 | * | vqrs joined #nim |
| 13:35:19 | * | nonsince joined #nim |
| 13:35:30 | nonsince | Hey, is anyone around here? |
| 13:36:12 | Varriount-Laptop | I'm here |
| 13:37:06 | Varriount-Laptop | nonsince: And so are 117 others. |
| 13:37:22 | Varriount-Laptop | Of course, they might all be bots. = |
| 13:37:57 | nonsince | Sure, but most people logged in to IRC are not actually checking it, they're just there to get notificatons :P anyway, I have a nim question |
| 13:38:27 | nonsince | do you know how to have a generic parameter that specifies "a type that has a definition for items"? |
| 13:39:02 | Varriount-Laptop | nonsince: I don't follow. |
| 13:39:45 | Varriount-Laptop | nonsince: You could have something like `proc foo[A, B] |
| 13:41:41 | Varriount-Laptop | Er, `proc foo[A, B](arg: A, other: seq[B])` |
| 13:42:45 | Varriount-Laptop | But you can't have `proc foo[A, B](arg: A[B])`, nor would you need to. |
| 13:47:56 | Araq_ | nonsince: use a concept |
| 13:49:30 | nonsince | Araq_: I'm afraid I don't know what that is |
| 13:51:34 | Araq_ | http://nim-lang.org/docs/manual.html#generics-concepts |
| 13:52:45 | nonsince | Araq_: that's exactly what I'm looking for! Thank you |
| 13:53:17 | nonsince | Thank you too, Varriount-Laptop, even if I wasn't sure what you were trying to tell me and I think you were having a similar experience with what I was telling you |
| 13:58:26 | * | BitPuffin|osx joined #nim |
| 14:04:36 | * | lyro joined #nim |
| 14:06:33 | * | Jesin quit (Quit: Leaving) |
| 14:10:58 | ephja | nonsince: concepts actually work for you? |
| 14:11:32 | Varriount-Laptop | ephja: As long as you're not doing anything too complex, and you have the latest compiler, concepts work reasonably well. |
| 14:11:57 | nonsince | Araq_: I've got a concept for that now, but I can't pass an array or sequence to a function that takes it (signature is like `proc foo[C: MyConcept[T]](arg: C): T` with type T = auto) but type([1, 2]) is MyConcept[auto] is true |
| 14:13:08 | Araq_ | proc foo[T](arg: MyConcept[T]): T # try this please |
| 14:13:54 | ephja | Varriount-Laptop: Fixes have been applied? All I know is that all my issues are still open |
| 14:15:33 | nonsince | Arac_: same error (says expected one of and then the function w/ signature). What you said was actually what I wrote first time around but it didn't compile so I tried again |
| 14:16:07 | nonsince | Araq_: should I post a gist? |
| 14:16:49 | Araq_ | look at tests/concepts please first |
| 14:19:46 | * | arnetheduck quit (Ping timeout: 240 seconds) |
| 14:29:05 | * | yglukhov joined #nim |
| 14:29:30 | * | lompik joined #nim |
| 14:40:19 | * | dashed quit (Quit: Connection closed for inactivity) |
| 14:44:40 | * | pregressive quit (Remote host closed the connection) |
| 14:45:16 | * | pregressive joined #nim |
| 14:49:15 | * | pregressive quit (Ping timeout: 240 seconds) |
| 14:54:43 | * | strcmp1 quit (Quit: peace) |
| 14:57:55 | * | BitPuffin|osx quit (Ping timeout: 240 seconds) |
| 14:59:35 | * | lompik quit (Ping timeout: 264 seconds) |
| 15:02:23 | * | Jesin joined #nim |
| 15:03:18 | * | bozaloshtsh quit (Ping timeout: 250 seconds) |
| 15:14:21 | * | Sembei quit (Quit: WeeChat 1.4-dev) |
| 15:27:05 | * | nchambers joined #nim |
| 15:34:09 | * | bozaloshtsh joined #nim |
| 15:36:06 | * | derka_ joined #nim |
| 15:38:20 | * | derka quit (Ping timeout: 250 seconds) |
| 15:38:21 | * | derka_ is now known as derka |
| 16:03:47 | * | L_in_O joined #nim |
| 16:19:16 | * | junw joined #nim |
| 16:19:27 | * | bozaloshtsh quit (Ping timeout: 265 seconds) |
| 16:22:20 | * | junw_ quit (Ping timeout: 276 seconds) |
| 16:26:44 | * | Varriount-Laptop quit (Ping timeout: 256 seconds) |
| 16:27:16 | * | Varriount-Laptop joined #nim |
| 16:31:52 | yglukhov | Araq: ping |
| 16:33:51 | * | L_in_O quit (Ping timeout: 252 seconds) |
| 16:48:07 | * | strcmp1 joined #nim |
| 16:50:57 | Araq_ | yglukhov: pong |
| 16:51:19 | yglukhov | Araq: trying to fix conversion to uint in js. let myUnsigned = mySigned.uint16. And in backend I dont get any nkConv nodes about it. I get nkCast if i do let myUnsigned = cast[uint16](mySigned). But nothing when coverting. Is this intended behavior? |
| 16:53:57 | ephja | c2nim chokes on elementary, but I think I'll try the AST parsing approach (clang) |
| 16:53:57 | Araq_ | no. check for skipConv calls |
| 16:54:14 | Araq_ | ephja: #def ? |
| 16:57:49 | ephja | Araq_: yes, when the symbol appears in a preprocessor directive, but there were some problems with #define's inside structs too IIRC. I think there exists an issue for that |
| 16:59:46 | Araq_ | I usually modify the C code so that c2nim can parse it. |
| 17:00:01 | * | derka quit (Quit: derka) |
| 17:00:02 | Araq_ | preprocessing it first removes to much information |
| 17:00:16 | Araq_ | all the #defines that should end up as Nim's const |
| 17:00:40 | * | nonsince quit (Ping timeout: 250 seconds) |
| 17:00:55 | * | nchambers quit (Ping timeout: 240 seconds) |
| 17:01:26 | Araq_ | bbl |
| 17:01:42 | ephja | it failed on a nested struct too. I thought that was fixed, but I dunno if it was caused by something else |
| 17:02:16 | ephja | and possibly on a struct containing function pointer fields |
| 17:04:54 | ephja | https://github.com/mjsabby/ClangSharp/tree/master/ClangSharpPInvokeGenerator |
| 17:13:45 | * | xtagon joined #nim |
| 17:18:45 | * | Jesin quit (Quit: Leaving) |
| 17:23:46 | * | brson joined #nim |
| 17:28:36 | * | derka joined #nim |
| 17:31:11 | * | kulelu88 joined #nim |
| 17:44:46 | * | kniteli joined #nim |
| 17:52:23 | * | dthrvr quit (Ping timeout: 264 seconds) |
| 17:57:01 | * | yglukhov_ joined #nim |
| 17:58:44 | * | dthrvr joined #nim |
| 18:00:45 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 18:01:47 | * | yglukhov_ quit (Ping timeout: 276 seconds) |
| 18:17:10 | * | nonsince joined #nim |
| 18:25:33 | * | derka quit (Quit: derka) |
| 18:32:34 | * | derka joined #nim |
| 18:33:49 | * | BitPuffin|osx joined #nim |
| 18:35:39 | * | Sembei joined #nim |
| 18:36:25 | * | nchambers joined #nim |
| 18:37:35 | * | nonsince quit (Ping timeout: 245 seconds) |
| 18:41:28 | * | yglukhov joined #nim |
| 18:45:58 | * | yglukhov quit (Ping timeout: 250 seconds) |
| 18:53:54 | * | bozaloshtsh joined #nim |
| 18:55:26 | * | nonsince joined #nim |
| 18:59:50 | * | nonsince quit (Ping timeout: 250 seconds) |
| 19:03:25 | * | bozaloshtsh quit (Ping timeout: 245 seconds) |
| 19:17:38 | * | Jesin joined #nim |
| 19:25:55 | * | junw quit (Ping timeout: 260 seconds) |
| 19:34:13 | * | desophos joined #nim |
| 19:34:35 | * | yglukhov joined #nim |
| 19:45:36 | * | nonsince joined #nim |
| 19:51:55 | * | nonsince quit (Ping timeout: 240 seconds) |
| 20:00:03 | * | pregressive joined #nim |
| 20:03:27 | * | biscarch quit (Quit: WeeChat 0.4.3) |
| 20:10:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 20:11:05 | * | yglukhov joined #nim |
| 20:13:15 | * | Arrrr quit (Quit: WeeChat 1.2) |
| 20:17:19 | * | derka quit (Quit: derka) |
| 20:18:24 | * | derka joined #nim |
| 20:28:28 | * | darkf quit (Quit: Leaving) |
| 20:30:02 | * | derka quit (Read error: Connection reset by peer) |
| 20:33:31 | * | derka joined #nim |
| 20:39:31 | ldlework | when I stringify a Json string I get the string value with quotes in the string |
| 20:39:41 | ldlework | do I have to unmarshal every string to a string? |
| 20:41:34 | ldlework | ah getStr |
| 20:49:03 | * | derka quit (Read error: Connection reset by peer) |
| 20:51:26 | * | bozaloshtsh joined #nim |
| 20:59:39 | * | derka joined #nim |
| 21:01:56 | * | yglukhov_ joined #nim |
| 21:01:56 | * | yglukhov quit (Read error: Connection reset by peer) |
| 21:02:45 | * | BitPuffin|osx quit (Ping timeout: 260 seconds) |
| 21:07:14 | * | yglukhov_ quit (Ping timeout: 256 seconds) |
| 21:07:46 | * | yglukhov joined #nim |
| 21:18:29 | * | nonsince joined #nim |
| 21:21:15 | ldlework | I reallllllly wanna use type names as a global enum |
| 21:22:30 | * | nchambers is now known as charmander |
| 21:24:40 | Araq_ | how would the compiler collect them? |
| 21:25:09 | Araq_ | in what order? should all 100 types in system.nim count too? |
| 21:25:32 | ldlework | sure why not |
| 21:25:32 | * | charmander quit (Changing host) |
| 21:25:32 | * | charmander joined #nim |
| 21:25:35 | Araq_ | sound like a "I want the compiler to read my mind" feature request :P |
| 21:25:38 | ldlework | I don't care waht their value or order is |
| 21:25:45 | ldlework | I just want them to be distinct values |
| 21:27:25 | Araq_ | you could write a compiler plugin ... |
| 21:27:45 | Araq_ | collectTypesAsEnum(enumName, pure=true) |
| 21:28:16 | ldlework | that has affects how useful/usable my library is right? |
| 21:28:23 | * | derka quit (Ping timeout: 264 seconds) |
| 21:28:30 | ldlework | since I have to tell people using it about special compilation options? |
| 21:28:37 | Araq_ | actually hrm, cannot work easily |
| 21:28:55 | Araq_ | well you would create a PR and the next Nim release has this "plugin" for everybody |
| 21:29:01 | Araq_ | which is really just another builtin |
| 21:29:15 | ldlework | Araq_: can you give me an idea of how big of a challenge it would be? |
| 21:29:18 | Araq_ | but you don't want to automate the collection |
| 21:29:18 | * | yglukhov quit (Remote host closed the connection) |
| 21:29:30 | ldlework | hmm? |
| 21:29:35 | Araq_ | you want to be able to use the type names as enum values |
| 21:29:43 | ldlework | right |
| 21:29:50 | Araq_ | that's much harder than a simple plugin |
| 21:30:07 | Araq_ | but actually |
| 21:30:17 | Araq_ | with a converter from typedesc to the enum ... |
| 21:30:55 | ldlework | but you have to define the enum |
| 21:31:09 | ldlework | if I have to define the enum, I could just define an enum |
| 21:31:14 | Araq_ | right but that's 1 line of code |
| 21:31:27 | ldlework | defining an enum for types you don't know the names of? |
| 21:31:33 | Araq_ | collectTypesAsEnum would produce the 'enum' declaration for you |
| 21:31:52 | ldlework | is that a macro or compiler plugin? |
| 21:32:01 | Araq_ | plugin |
| 21:32:07 | Araq_ | cannot do it as a macro. |
| 21:32:18 | ldlework | do plugins have access to all the generated types and crazy stuff like that? |
| 21:32:23 | Araq_ | yes |
| 21:32:27 | ldlework | neat |
| 21:32:41 | Araq_ | well it would iterate over the types that are in scope |
| 21:32:55 | ldlework | so to call a compiler plugin, you literally call it in your code? |
| 21:32:59 | Araq_ | so you need to import the modules that contain the types you're interested in |
| 21:33:23 | Araq_ | that is correct. a plugin looks like a builtin. |
| 21:33:41 | ldlework | haha seems such dark magic |
| 21:34:24 | ldlework | Araq_: are compiler plugins are to write or is there documentation? |
| 21:34:57 | Araq_ | there is no documentation but the 'locals' plugin does something very similar that you can look at |
| 21:35:12 | ldlework | ok |
| 21:35:15 | * | derka joined #nim |
| 21:35:26 | Araq_ | but no promises that it'll work out |
| 21:35:48 | Araq_ | I'm pretty sure I don't like a converter from typedesc to an enum |
| 21:35:58 | Araq_ | which is what you need too, remember. |
| 21:35:59 | * | charmander is now known as nchambers |
| 21:36:05 | * | nchambers quit (Changing host) |
| 21:36:05 | * | nchambers joined #nim |
| 21:36:33 | Araq_ | but that doesn't require a plugin. |
| 21:37:59 | ldlework | Araq_: hmm wait, can you already pass a typedesc? |
| 21:38:14 | ldlework | let td = Foo |
| 21:38:17 | ldlework | if f of td: |
| 21:38:19 | ldlework | etc |
| 21:38:50 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 21:38:51 | ldlework | let t = initTable[typedesc, Bar] or whatever |
| 21:41:32 | derka | Araq_ (HI Guys by the way) I got questions too :) |
| 21:42:18 | derka | My understanding is that there is not yet possibility to have concurrency on variables shared among threads |
| 21:42:24 | derka | so i got a question |
| 21:42:42 | derka | i tried to go through the code, but it will require me lot of time to understand the inner working of Nim |
| 21:43:01 | Araq_ | ldlework: doesn't work, the compiler hates 'typedesc' |
| 21:43:28 | ldlework | oh well |
| 21:43:30 | derka | would it be possible to have some kind of low level API to get access to variable creation, modification, access and destory |
| 21:43:44 | derka | destruction i mean |
| 21:44:37 | Araq_ | concurrency on variable shared among threads works, what doesn't work is to use a variable that uses GC'ed memory |
| 21:44:57 | Araq_ | but this too will be mitigated |
| 21:45:03 | Araq_ | with 0.14 |
| 21:45:07 | ldlework | does that mean ref and ptr types? |
| 21:45:11 | ldlework | IE actual values are fine? |
| 21:46:45 | Araq_ | GC'ed memory is ref/string/seq/closure plus compositions of these types |
| 21:47:01 | Araq_ | which is actually a pretty large group of types |
| 21:49:40 | derka | ok thx |
| 21:51:00 | derka | so no plan for low level access to a constructor / destructor and potentially modification api |
| 21:51:56 | ldlework | derka: destructors and finalizers are already things I think |
| 21:52:26 | derka | idlework: thx look like i didnt see that |
| 21:53:37 | ldlework | Is checking if a ref field is nil any slower than say checking if an int field is 5? |
| 21:53:50 | Araq_ | no |
| 21:54:19 | * | junw joined #nim |
| 21:54:28 | Araq_ | derka: Nim has overloading of assignment operators and destructors but they need to be fleshed out and I don't like them |
| 21:55:14 | derka | Araq_ I need to code some kind of object persitance |
| 21:55:34 | derka | with concurrency |
| 21:57:06 | Araq_ | derka: in-memory db? |
| 21:57:13 | derka | yeah like an in memory db |
| 21:57:29 | derka | but object would be used directly by the language |
| 21:59:02 | * | nonsince quit (Ping timeout: 276 seconds) |
| 21:59:19 | Araq_ | I would use Nim today for this task if that's the question. |
| 21:59:44 | derka | yes I wanna use Nim |
| 22:01:42 | * | Demon_Fox joined #nim |
| 22:04:04 | derka | Araq_ I need to take a deep dive into Nim still discovering |
| 22:04:19 | Araq_ | derka: well it really depends on what the objects look like that are stored. as a start you can use pinnedSpawn and a .thread local variable |
| 22:05:01 | Araq_ | which is tough to expain ... maybe I should write a cookbook ... |
| 22:05:32 | derka | Yes please Araq_ |
| 22:06:34 | * | yglukhov joined #nim |
| 22:06:45 | * | kulelu88 quit (Ping timeout: 245 seconds) |
| 22:09:23 | yglukhov | ldlework: you can use my variant lib. getTypeId is what you want i guess. |
| 22:09:58 | ldlework | except I just want to refer to types with their name naturally |
| 22:10:04 | ldlework | and use them as unique values |
| 22:10:25 | ldlework | unless that's what your thing does? |
| 22:11:46 | yglukhov | const MyTypeId = getTypeId(MyType) - that isnt enough? |
| 22:13:26 | ldlework | I already have a thing that generates an enum for the types I want |
| 22:13:36 | ldlework | Its just dumb that user code will have to refer to two different names |
| 22:13:42 | ldlework | for what is semantically representing one thing |
| 22:14:02 | ldlework | I want to have code that works around the type of a value, but I have to talk-around that fact by pretending to talk about enums |
| 22:14:07 | ldlework | and then doing type based stuff at the last moment |
| 22:14:16 | ldlework | generating a const would be the same thing |
| 22:15:26 | * | nchambers quit (Changing host) |
| 22:15:26 | * | nchambers joined #nim |
| 22:16:35 | * | nchambers is now known as duckbot |
| 22:16:50 | yglukhov | you can do the gettypeid thing in your api that expects a type-as-enum-value, no? |
| 22:17:04 | * | duckbot is now known as nchambers |
| 22:17:08 | * | nchambers quit (Changing host) |
| 22:17:08 | * | nchambers joined #nim |
| 22:17:30 | yglukhov | check out the matching example in the readme.md: https://github.com/yglukhov/variant |
| 22:17:41 | ldlework | yglukhov: can you pass a typedesc? |
| 22:18:15 | yglukhov | to where? procs/macros/templates can accept typedesc of course |
| 22:18:25 | ldlework | whaaaa |
| 22:18:47 | * | Varriount-Laptop quit (Ping timeout: 264 seconds) |
| 22:18:52 | yglukhov | errr... |
| 22:19:17 | * | Varriount-Laptop joined #nim |
| 22:19:38 | yglukhov | so.. the question is gone or what? oO |
| 22:19:40 | ephja | if only compile time variables could be used at run time too :p |
| 22:20:26 | yglukhov | ephja, usually such "if onlies" are easily worked around =) |
| 22:21:33 | yglukhov | you can check out my coverage lib, that kinda brings compile-time state to runtime =) |
| 22:22:48 | ldlework | oh yeah I need to do this stuff at runtime |
| 22:23:36 | yglukhov | which stuff? |
| 22:25:10 | * | yglukhov quit (Remote host closed the connection) |
| 22:31:32 | ldlework | Well I don't know what they meant, https://gist.github.com/dustinlacewell/a8292049c20e8056a712 |
| 22:31:41 | ldlework | I don't seem to be able to pass a typedesc to a proc. |
| 22:32:16 | ldlework | got me all excited for nothing |
| 22:33:04 | * | derka quit (Ping timeout: 265 seconds) |
| 22:33:06 | * | ephja quit (Ping timeout: 240 seconds) |
| 22:33:55 | * | derka joined #nim |
| 22:38:02 | * | derka quit (Read error: Connection reset by peer) |
| 22:42:15 | * | nchambers quit (Ping timeout: 240 seconds) |
| 22:44:03 | * | nchambers joined #nim |
| 22:44:30 | * | derka joined #nim |
| 22:45:49 | Araq_ | ldlework: don't name your module 'typedesc'. |
| 22:45:58 | ldlework | hahahahahahaha really |
| 22:46:19 | Araq_ | and I already told you to use converter toEnum(t: typeDesc): DaEnum = ... |
| 22:46:46 | ldlework | Ah so I have an ordinal type for the case |
| 22:46:48 | ldlework | I think I get it now |
| 22:46:55 | ldlework | the missing part was that you could actually pass a typedesc |
| 22:49:11 | ldlework | Araq_: wait, how do I return a different enum based on a different type? |
| 22:49:24 | ldlework | oh maybe I can just use if, not case |
| 22:55:28 | * | derka quit (Ping timeout: 256 seconds) |
| 22:56:13 | * | derka joined #nim |
| 23:08:50 | * | yglukhov joined #nim |
| 23:16:00 | * | Senketsu quit (Ping timeout: 250 seconds) |
| 23:16:51 | * | pregressive quit (Remote host closed the connection) |
| 23:17:27 | * | lompik joined #nim |
| 23:30:55 | * | Trustable quit (Quit: Leaving) |
| 23:39:08 | * | vqrs quit (Ping timeout: 276 seconds) |
| 23:40:18 | * | saml quit (Quit: Leaving) |
| 23:41:17 | * | vqrs joined #nim |
| 23:45:39 | * | Senketsu joined #nim |
| 23:46:16 | * | desophos quit (Ping timeout: 276 seconds) |
| 23:53:08 | * | zepolen quit (Remote host closed the connection) |
| 23:56:44 | * | Sembei quit (Ping timeout: 250 seconds) |
| 23:58:25 | * | zepolen joined #nim |