| 00:00:08 | * | shodan45 quit (Quit: Konversation terminated!) |
| 00:52:19 | tautologico | is there a way to dump the AST for a module during compilation? I can't seem to find one |
| 00:53:45 | * | PMunch quit (Quit: leaving) |
| 01:20:22 | * | Jesin quit (Quit: Leaving) |
| 01:34:22 | * | space-wizard quit (Read error: Connection reset by peer) |
| 01:59:40 | * | space-wizard joined #nim |
| 02:01:33 | * | user___ joined #nim |
| 02:03:41 | * | user2 quit (Ping timeout: 244 seconds) |
| 02:10:16 | notfowl | tautologico, if you can wrap the module in a template like this https://github.com/nim-lang/Nim/blob/master/lib/core/macros.nim#L494 |
| 02:15:32 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 02:52:53 | tautologico | found a way to do that inside the compiler by using debug |
| 02:55:00 | * | gugugaga joined #nim |
| 03:11:22 | * | |meta quit (Quit: Connection closed for inactivity) |
| 03:18:11 | * | kseg joined #nim |
| 03:22:48 | * | kseg quit (Ping timeout: 276 seconds) |
| 04:44:38 | * | Demon_Fox quit (Quit: Leaving) |
| 05:02:37 | * | GangstaCat quit (Quit: Leaving) |
| 05:38:29 | * | endragor joined #nim |
| 05:39:26 | * | gugugaga quit (Quit: Leaving) |
| 06:05:41 | * | gugugaga joined #nim |
| 06:17:55 | * | yglukhov joined #nim |
| 06:26:12 | * | endragor_ joined #nim |
| 06:30:28 | * | endragor quit (Ping timeout: 264 seconds) |
| 06:42:14 | * | GangstaCat joined #nim |
| 06:44:25 | * | endragor_ quit (Remote host closed the connection) |
| 06:44:55 | * | endragor joined #nim |
| 07:06:39 | * | gokr joined #nim |
| 07:14:52 | * | GangstaCat quit (Quit: Leaving) |
| 07:15:15 | * | Trustable joined #nim |
| 07:18:47 | * | irrequietus joined #nim |
| 07:19:03 | * | GangstaCat joined #nim |
| 07:23:25 | gokr | jeffc: Using c2nim or? |
| 07:24:53 | gokr | jeffc: What platform are you using on the embed side? We are working with lots of embedded stuff and I even did a shot at "Ardunimo": http://goran.krampe.se/2016/02/25/nim-meets-arduino/ |
| 07:25:12 | gokr | I am itching to do something similar but for mbedOS instead. |
| 07:48:27 | * | Sembei quit (Ping timeout: 244 seconds) |
| 07:50:15 | * | yglukhov quit (Remote host closed the connection) |
| 07:50:24 | * | Sembei joined #nim |
| 08:03:14 | * | der-landgraf quit (Quit: WeeChat 1.5) |
| 08:16:11 | * | filcuc joined #nim |
| 08:24:13 | vegansk | Araq_, hi! Is it legal to use templates in type definitions as I did here: https://github.com/vegansk/jbridge/blob/eb23dcb1991d1a0e36d240046f19be3bb40b656f/src/private/jni_api.nim#L92 and here: https://github.com/vegansk/jbridge/blob/eb23dcb1991d1a0e36d240046f19be3bb40b656f/src/private/jni_api.nim#L383? |
| 08:27:17 | vegansk | Is it by design, or it can be broken in the future? |
| 08:28:37 | * | Pisuke joined #nim |
| 08:37:38 | Araq_ | it's legal but it causes problems (but what doesn't?) |
| 08:38:01 | Araq_ | but we try our best and not break it ;-) |
| 08:45:37 | vegansk | Oops. It's not working. The test is green because it checks only the first typedesc from template. :-( |
| 08:51:16 | * | Matthias247 joined #nim |
| 08:53:34 | * | gokr quit (Ping timeout: 244 seconds) |
| 08:59:45 | vegansk | Araq_, it's already broken. https://github.com/nim-lang/Nim/issues/4228. Is it hard to fix? |
| 09:02:50 | Araq_ | did it ever work? |
| 09:03:08 | * | derka joined #nim |
| 09:03:37 | Araq_ | seems to be an 'is' operator bug |
| 09:08:43 | vegansk | Araq_, I tried it today, so don't know if it ever worked. |
| 09:10:23 | * | gokr joined #nim |
| 09:26:25 | * | irrequietus quit () |
| 09:29:31 | * | dmitry_p joined #nim |
| 09:45:04 | * | gugugaga quit (Quit: Leaving) |
| 09:48:03 | * | gokr quit (Ping timeout: 240 seconds) |
| 09:56:46 | * | arnetheduck joined #nim |
| 09:57:44 | * | jjido joined #nim |
| 10:02:13 | * | TheLemonMan joined #nim |
| 10:05:13 | * | gokr joined #nim |
| 10:10:00 | * | der-landgraf joined #nim |
| 10:11:39 | * | dmitry_p quit (Quit: Leaving) |
| 10:40:23 | vegansk | Araq_, I tried to debug this issue. The problem is that when VM executes ``opcIf`` instruction, typedesc variable doesn't contain the real type. Here is debug output: ``tyTypeDesc(tyGenericParam T)`` |
| 10:52:09 | Araq_ | told ya. |
| 10:53:43 | * | derka quit (Quit: derka) |
| 10:56:07 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 10:57:27 | vegansk | Araq_, but why? I can have ``proc f[T](v: T): T = ???``and the type of result is known. |
| 10:58:18 | * | fastrom joined #nim |
| 11:00:05 | vegansk | Is there a chance to fix the compiler so it will execute templates when type parameters is known and not before? |
| 11:02:12 | * | derka joined #nim |
| 11:02:44 | * | fastrom quit (Ping timeout: 244 seconds) |
| 11:03:59 | Araq_ | sure |
| 11:06:31 | vegansk | Tell me please, where is the code for generics instantiations? |
| 11:08:42 | Araq_ | semtypinst and seminst iirc |
| 11:09:11 | vegansk | Thanks! |
| 11:09:16 | Araq_ | but I doubt the problem is there |
| 11:09:41 | Araq_ | I would look into vm.nim and what it does with tyTypeDesc. it might prune it back to a generic tyTypeDesc |
| 11:11:21 | vegansk | Got it |
| 11:16:36 | * | derka quit (Quit: derka) |
| 11:47:59 | cheatfate | dom96, i know i have already asked you about https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L932-L933, but please could you think about it again, is this really needed? |
| 11:48:51 | cheatfate | dom96, i can't find any reason why socket can contain multiple callbacks |
| 11:49:12 | cheatfate | dom96, even in multithreaded environment |
| 11:49:58 | dom96 | cheatfate: I guess you're right. Can't really look into it right now, but I have a feeling that you are right :) |
| 11:50:56 | cheatfate | dom96, i thought you have passed book deadline and you have completed your exams, when you get some spare time? :) |
| 11:51:30 | dom96 | cheatfate: There is always more things to be done on the book :P |
| 11:51:58 | dom96 | But anyway, you can easily see if you're right. |
| 11:52:17 | dom96 | Just assert false if readCBs.len > 0 or writeCBs.len > 0 |
| 11:52:39 | cheatfate | dom96, `> 0` or `> 1` |
| 11:52:52 | TheLemonMan | hmm, is there a way to get the upper/lower bound for a given type (if it's an integral one obviously) |
| 11:53:15 | dom96 | TheLemonMan: low()/high() IIRC |
| 11:53:37 | dom96 | cheatfate: hrm... assert readCBs.len == 0 and writeCBs.len == 0 |
| 11:54:05 | dom96 | put that before readCBs/writeCBs is added to |
| 11:54:13 | dom96 | that way it will crash if there is already something in it |
| 11:55:09 | cheatfate | dom96, hah this assert ofc will be raised |
| 11:56:31 | cheatfate | Araq_, this `withXXXX` templates boost speed of asynchttpserver for 10% more :) |
| 11:57:48 | dom96 | cheatfate: huh? |
| 11:58:11 | cheatfate | dom96, its hard to explain, but this because of `yields` |
| 11:58:41 | cheatfate | dom96, now i'm trying to check libuv and python's asyncio if they using sequences for callback storage |
| 11:58:50 | dom96 | I'm confused |
| 11:58:55 | dom96 | what is your problem with the code you linked? |
| 11:59:15 | dom96 | I was under the impression that you think there is no need for the seq? |
| 11:59:27 | dom96 | because there is ever only one callback? |
| 12:00:07 | * | fastrom joined #nim |
| 12:02:04 | cheatfate | dom96, `because there is ever only one callback` - yes i think so |
| 12:02:27 | dom96 | cheatfate: yeah, so won't the 'assert' prove your hypothesis? |
| 12:02:30 | cheatfate | dom96, can be only one moment - transition from READ->WRITE and from WRITE->READ |
| 12:02:52 | dom96 | That is what the 'assert' is er, asserting :) |
| 12:03:26 | dom96 | "Crash if `readCBs`/`writeCBs` doesn't have 0 elements in it" |
| 12:03:30 | cheatfate | yeah there can be a moment of time when READ callback is still not called but WRITE callback must be inserted... |
| 12:04:06 | cheatfate | but i dont sure about multithreading environment |
| 12:04:08 | dom96 | or maybe my logic is wrong |
| 12:05:17 | dom96 | yeah, it should be: 'assert readCBs.len != 1 and writeCBs.len != 1' |
| 12:07:13 | cheatfate | dom96, i found a moment when this problem can appeared, when we are in poll() calling `read` callback and this callback call to addRead() again with READ to continue reading |
| 12:08:24 | dom96 | so the 'seq' is required? |
| 12:08:33 | * | BitPuffin joined #nim |
| 12:11:17 | cheatfate | dom96, still not sure |
| 12:11:43 | dom96 | is your concern performance? |
| 12:23:54 | * | PMunch joined #nim |
| 12:40:53 | cheatfate | dom96, https://gist.github.com/cheatfate/85024430f292fec8e728fd5ac7db1057 and this works... |
| 12:41:45 | cheatfate | so there no need of sequence |
| 12:42:26 | cheatfate | and this works under `wrk` load test |
| 12:44:40 | dom96 | I'm not sure what this proves. |
| 12:45:12 | dom96 | oh, did you just get rid of the sequence? |
| 12:45:55 | cheatfate | yep there no sequence anymore |
| 12:54:41 | dom96 | and how much faster is it? |
| 12:55:33 | * | gokr quit (Ping timeout: 240 seconds) |
| 13:06:08 | cheatfate | dom96, i dont know... i think i have reached my maximum performance |
| 13:06:19 | cheatfate | dom96, because i'm testing in VMs |
| 13:11:32 | * | r4vi quit (Remote host closed the connection) |
| 13:21:53 | * | kseg joined #nim |
| 13:25:19 | * | heinrich5991 quit (Ping timeout: 260 seconds) |
| 13:26:22 | * | kseg quit (Ping timeout: 244 seconds) |
| 13:27:47 | * | heinrich5991 joined #nim |
| 13:30:53 | * | gokr joined #nim |
| 13:43:49 | * | MyMind joined #nim |
| 13:45:59 | * | Sembei quit (Ping timeout: 244 seconds) |
| 13:52:15 | * | gokr quit (Ping timeout: 260 seconds) |
| 14:09:52 | * | jjido quit (Ping timeout: 260 seconds) |
| 14:29:01 | * | nsf quit (Quit: WeeChat 1.4) |
| 14:29:11 | * | Matthias247 joined #nim |
| 14:34:17 | * | jjido joined #nim |
| 14:38:49 | * | jjido quit (Ping timeout: 260 seconds) |
| 14:39:28 | * | Demon_Fox joined #nim |
| 14:55:03 | * | kulelu88 joined #nim |
| 14:55:03 | * | kulelu88 quit (Changing host) |
| 14:55:03 | * | kulelu88 joined #nim |
| 15:01:07 | * | Jesin joined #nim |
| 15:12:30 | * | jjido joined #nim |
| 15:18:40 | * | Jesin quit (Quit: Leaving) |
| 15:25:37 | * | Jesin joined #nim |
| 15:38:01 | * | pregressive joined #nim |
| 15:44:48 | * | |meta joined #nim |
| 15:52:10 | tautologico | Araq_: I've been looking at this: https://github.com/nim-lang/Nim/issues/4001 is this a parsing bug? the problem happens in pragmas.nim, processNotes, the code assumes a nkBracketExpr has 2 sons but in this case it has only one. should this be a syntax error? |
| 15:53:45 | * | Sembei joined #nim |
| 15:55:15 | * | Jesin quit (Quit: Leaving) |
| 15:55:55 | * | kingofoz quit (Ping timeout: 252 seconds) |
| 15:56:48 | * | Pisuke quit (Ping timeout: 276 seconds) |
| 15:59:25 | * | arnetheduck quit (Ping timeout: 260 seconds) |
| 16:01:21 | * | Sembei quit (Ping timeout: 244 seconds) |
| 16:01:59 | * | Jesin joined #nim |
| 16:03:54 | * | endragor quit (Remote host closed the connection) |
| 16:05:18 | * | jjido quit (Ping timeout: 258 seconds) |
| 16:06:47 | * | Sembei joined #nim |
| 16:07:59 | Araq_ | if it happens in pragmas.nim it is no a parser bug |
| 16:24:34 | * | fastrom quit (Quit: Leaving.) |
| 16:25:35 | * | fastrom joined #nim |
| 16:29:02 | * | fastrom quit (Client Quit) |
| 16:30:40 | * | Arrrr joined #nim |
| 16:30:40 | * | Arrrr quit (Changing host) |
| 16:30:41 | * | Arrrr joined #nim |
| 16:32:26 | * | filcuc quit (Read error: Connection reset by peer) |
| 16:36:17 | * | kulelu88 quit (Quit: Leaving) |
| 16:36:20 | Araq_ | tautologico: just check for n.len == 2 |
| 16:36:34 | Araq_ | I marked it "easy", don't think too hard. |
| 17:01:35 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 17:04:19 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
| 17:16:45 | tautologico | What is the intended behavior in this case? Is it an invalid pragma? |
| 17:17:14 | Araq_ | yup |
| 17:18:37 | dom96 | Maybe you could look into fixing this as well? https://github.com/nim-lang/Nim/issues/4225 :) |
| 17:20:26 | Araq_ | dom96: I think that's not a bug. |
| 17:20:40 | dom96 | okay, why not? |
| 17:20:57 | Araq_ | certain pragmas cause Nim to ignore the proc body |
| 17:21:09 | Araq_ | otherwise the nimRtl pragma would be a pita to use |
| 17:22:11 | dom96 | hrm. It seems like an easy mistake to make though. |
| 17:23:07 | dom96 | Couldn't the body still be checked to ensure it's valid? |
| 17:23:30 | * | kseg joined #nim |
| 17:26:52 | Araq_ | currently 'importc' triggers this "don't check body" behaviour |
| 17:27:03 | Araq_ | we could also require 'dynlib' but meh. |
| 17:27:29 | Araq_ | hmm, well perhaps it's a good solution. |
| 17:27:38 | dom96 | huh |
| 17:27:43 | Araq_ | I only want to ignore the body for DLL imports |
| 17:27:46 | * | kseg quit (Ping timeout: 252 seconds) |
| 17:28:00 | dom96 | surely the 'importc' doesn't get applied in my example? |
| 17:28:11 | dom96 | only 'cdecl' and 'header' do |
| 17:29:04 | Araq_ | header implies importc |
| 17:29:51 | Araq_ | which could be revised now that importcpp exists |
| 17:30:33 | Araq_ | not sure what code it would break though ... |
| 17:32:29 | Araq_ | ah and it's also internally messy. importcpp sets the same flag as importc and then some |
| 17:33:51 | Araq_ | so yeah, my fix is better. |
| 17:33:57 | Araq_ | tie it to DLL importing |
| 17:37:37 | Araq_ | btw https://github.com/web2py/pydal/ seems an excellent match for Nim. somebody should write something like this. |
| 17:39:03 | * | nsf joined #nim |
| 17:48:58 | * | Pisuke joined #nim |
| 17:51:42 | * | MyMind quit (Ping timeout: 272 seconds) |
| 18:04:56 | * | Matthias247 joined #nim |
| 18:09:01 | * | gugugaga joined #nim |
| 18:10:01 | * | fastrom joined #nim |
| 18:12:41 | def- | Araq_: pydal looks fun, I might play around with how it can look in Nim |
| 18:24:02 | * | lubos_cz joined #nim |
| 18:59:02 | * | BitPuffin quit (Read error: Connection reset by peer) |
| 19:07:54 | * | Sembei quit (Ping timeout: 244 seconds) |
| 19:09:02 | * | gugugaga quit (Quit: Leaving) |
| 19:13:47 | * | pregressive quit (Read error: Connection reset by peer) |
| 19:13:48 | * | pregress_ joined #nim |
| 19:14:26 | * | lubos_cz quit (Ping timeout: 244 seconds) |
| 19:16:55 | * | gugugaga joined #nim |
| 19:26:49 | * | TheLemonMan joined #nim |
| 19:31:02 | * | gugugaga is now known as gagagugu |
| 19:35:57 | * | irrequietus joined #nim |
| 19:41:47 | * | Arrrr quit (Quit: WeeChat 1.4) |
| 19:50:45 | * | gokr joined #nim |
| 19:53:00 | * | lubos_cz joined #nim |
| 20:26:55 | * | yglukhov joined #nim |
| 20:31:06 | TheLemonMan | hmm, nim-mode slows down to a crawl for pretty much every file |
| 20:33:29 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 20:34:35 | TheLemonMan | also why countup allows distinct types for the range ends and countdown doesn't ? |
| 20:34:44 | * | dhk joined #nim |
| 20:39:42 | Araq_ | TheLemonMan: probably because it's not a clear advantage to be able to count from uint.high to -1 |
| 20:39:54 | Araq_ | *to count down |
| 20:55:18 | TheLemonMan | fair, I would've used some asserts but whatever floats your boat |
| 21:24:31 | * | kseg joined #nim |
| 21:29:13 | * | kseg quit (Ping timeout: 252 seconds) |
| 21:30:35 | * | notfowl is now known as fowl |
| 21:34:02 | * | libman joined #nim |
| 21:41:54 | * | gagagugu quit (Quit: Leaving) |
| 21:47:25 | * | Sembei joined #nim |
| 21:52:18 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
| 22:11:06 | tautologico | done: https://github.com/nim-lang/Nim/pull/4231 |
| 22:13:09 | * | vendethiel joined #nim |
| 22:16:07 | * | yglukhov joined #nim |
| 22:17:43 | * | Mat4 joined #nim |
| 22:19:05 | Araq_ | tautologico: very nice. I prefer to not add tests for trivial stuff like this where regressions are super improbable, but it's fine. |
| 22:20:33 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 22:24:03 | * | lubos_cz quit (Ping timeout: 244 seconds) |
| 22:26:40 | tautologico | Araq_: true, I thought a test could be overkill in this case, but it can be deleted |
| 22:27:36 | Araq_ | ok, so remove it then. our test suite could always run a little faster. |
| 22:33:57 | * | libman quit (Ping timeout: 276 seconds) |
| 22:35:12 | * | Mat4 left #nim (#nim) |
| 22:35:54 | * | irrequietus quit () |
| 22:37:14 | * | Trustable quit (Remote host closed the connection) |
| 22:37:25 | * | pregress_ quit () |
| 22:39:08 | tautologico | ok done |
| 22:39:27 | tautologico | CI tests pass |
| 22:41:23 | * | |meta quit (Quit: Connection closed for inactivity) |
| 22:44:41 | * | der-landgraf quit (Ping timeout: 240 seconds) |
| 22:49:34 | * | Ven joined #nim |
| 22:54:21 | * | Ven quit (Client Quit) |
| 22:55:32 | * | Ven joined #nim |
| 23:19:55 | cheatfate | Araq_, sorry but something wrong with my `withValue` templates: https://gist.github.com/cheatfate/203cebc7f76c20e436c0ad958d41dadb |
| 23:22:54 | Araq_ | that seems a parser bug? |
| 23:23:02 | Araq_ | nothing wrong with the template, is it |
| 23:25:38 | * | kseg joined #nim |
| 23:28:05 | cheatfate | i think this is compiler bug but i want to make for you reproducible source |
| 23:29:49 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 23:30:20 | * | kseg quit (Ping timeout: 260 seconds) |
| 23:30:53 | Araq_ | don't worry, I have a trivial test case |
| 23:33:16 | cheatfate | Araq_, i have made some modifications to gist and got one more error |
| 23:33:53 | cheatfate | just tried to avoid "invalid indentation" and merged 2 lines... |
| 23:38:37 | * | heinrich5991 quit (Ping timeout: 260 seconds) |
| 23:39:27 | * | mnemonikk quit (Ping timeout: 264 seconds) |
| 23:40:50 | * | mnemonikk joined #nim |
| 23:40:50 | * | mnemonikk quit (Changing host) |
| 23:40:50 | * | mnemonikk joined #nim |
| 23:47:24 | * | Sembei quit (Ping timeout: 244 seconds) |
| 23:49:45 | * | heinrich5991 joined #nim |
| 23:51:13 | * | fastrom quit (Quit: Leaving.) |
| 23:54:18 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 23:56:35 | * | vendethiel quit (Ping timeout: 260 seconds) |