00:06:20 | * | lritter quit (Ping timeout: 246 seconds) |
00:23:12 | * | abm quit (Quit: Leaving) |
00:25:28 | * | treeform quit (Remote host closed the connection) |
00:44:12 | * | doesntgolf quit (Ping timeout: 245 seconds) |
01:10:44 | FromGitter | <gogolxdong> GLFM is based on opengl,you can use Vulkan to build a cross-platform GUI |
01:11:48 | leorize | for GUI building OGL would be much easier |
01:11:57 | leorize | iirc you'd need to build your own pipeline in vulkan |
01:12:03 | leorize | and that's overkill for GUI usage |
01:15:13 | * | endragor joined #nim |
01:45:22 | * | laaron quit (Remote host closed the connection) |
02:04:03 | * | exelotl quit (Ping timeout: 245 seconds) |
02:05:54 | * | thomasross joined #nim |
02:10:10 | * | laaron joined #nim |
02:13:59 | * | laaron quit (Client Quit) |
02:15:43 | * | laaron joined #nim |
02:21:54 | FromGitter | <arnetheduck> on package managers, here's go's take: https://github.com/golang/go/wiki/Modules |
02:37:22 | * | dddddd quit (Remote host closed the connection) |
02:55:27 | * | rockcavera quit (Remote host closed the connection) |
03:05:53 | * | chemist69 quit (Ping timeout: 246 seconds) |
03:08:12 | * | chemist69 joined #nim |
03:16:18 | FromGitter | <arnetheduck> interesting thoughts in there on managing a thriving eco-system of independent libraries |
04:13:18 | * | laaron quit (Remote host closed the connection) |
04:16:21 | * | laaron joined #nim |
04:23:31 | * | laaron quit (Remote host closed the connection) |
04:26:25 | * | laaron joined #nim |
04:42:59 | FromGitter | <kdheepak> --outdir:DIR doesn't seem to work anymore? |
04:44:47 | FromGitter | <kdheepak> It seems I have an older nim. Trying to upgrade now |
04:45:33 | * | laaron quit (Remote host closed the connection) |
04:49:21 | FromGitter | <kdheepak> When I run this: ⏎ ⏎ ```nim c --outdir:temp --threads:on --app:lib --out:mymodule.so mymodule.nim``` ⏎ ⏎ I don't see any temp folder [https://gitter.im/nim-lang/Nim?at=5d845a51ab4244767bcfdffa] |
04:49:47 | * | nsf joined #nim |
04:51:14 | leorize | I wouldn't rely on --outdir |
04:53:33 | leorize | it's better in your case to just use `--out:temp/mymodule.so` instead |
05:01:53 | * | laaron joined #nim |
05:02:37 | * | laaron quit (Remote host closed the connection) |
05:05:25 | FromGitter | <kdheepak> Thanks! |
05:05:35 | * | laaron joined #nim |
05:16:41 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
05:17:23 | * | laaron joined #nim |
05:48:16 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
05:50:54 | * | laaron joined #nim |
06:16:38 | * | narimiran joined #nim |
06:17:50 | * | solitudesf-- joined #nim |
06:21:03 | * | PMunch joined #nim |
06:21:04 | * | solitudesf-- quit (Read error: Connection reset by peer) |
06:21:55 | * | solitudesf joined #nim |
06:33:22 | FromGitter | <zacharycarter> If anyone is aware of any Nim related opportunities, I'm looking again 🙂 |
06:34:22 | * | livcd joined #nim |
06:50:31 | * | PMunch quit (Remote host closed the connection) |
06:50:47 | * | PMunch joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:35 | * | gmpreussner joined #nim |
07:08:06 | * | krux02 joined #nim |
07:10:47 | * | Vladar joined #nim |
07:11:02 | PMunch | Hmm, this async stuff with hard sleeps is really confusing |
07:12:11 | PMunch | It works in chronos, but its implementation have deviated too far from the stdlib asyncdispatch that it's a bit tough to tell what exactly makes this difference.. |
07:14:28 | Zevv | and there you have it |
07:14:41 | PMunch | Have what? |
07:15:11 | Zevv | the chronos thing again :/ |
07:16:21 | * | ng0 joined #nim |
07:19:44 | PMunch | Haha, I just wanted to check if it had the same issue |
07:20:00 | PMunch | I have no horse in this race, if you would call it that |
07:21:38 | * | alexander92 joined #nim |
07:21:52 | PMunch | Hmm, tried to roll back chronos to a much earlier commit to see if the changes were small enough for me to easily see the difference |
07:22:17 | PMunch | And it has a completely different issue :P |
07:25:27 | PMunch | With stdlib asyncdispatch: http://ix.io/1VYc, with old chronos: http://ix.io/1VYa, with current chronos: http://ix.io/1VYd, and the code I use to test this: http://ix.io/1VKv/nim, the only difference between the tests is to change the import. |
07:30:45 | Araq | ping shashlick |
07:31:38 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
07:32:19 | * | laaron joined #nim |
07:35:00 | shashlick | Sup |
07:41:18 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
07:42:07 | * | laaron joined #nim |
07:52:50 | Araq | shashlick, we want a new Nimble release, asap |
07:52:57 | Araq | look at my PRs please |
07:57:44 | alexander92 | Zevv, i have another pro linux question |
07:58:49 | PMunch | Yay, found the fault in asyncdispatch and a way to easily fix it :) |
07:59:11 | Zevv | alexander92: here |
08:02:22 | Zevv | PMunch: congrats! |
08:04:01 | shashlick | Hey @Araq, am on the road until next week |
08:04:39 | shashlick | I understand fixes but why do you care about nimble release? Nim is pinning to a commit right |
08:04:48 | alexander92 | Zevv sorry |
08:05:16 | alexander92 | is it possible that something "hides" from me info from /proc/id/maps ? e.g. i see only `/` as binary path for stuff |
08:05:36 | nc-x[m] | shashlick: Araq does not want to release 1.0 without new release of nimble |
08:06:10 | * | ng0_ joined #nim |
08:06:29 | Zevv | what is "stuff" in this case? |
08:07:17 | * | leorize quit (Remote host closed the connection) |
08:07:21 | shashlick | when is 1.0 scheduled? |
08:08:14 | Araq | today *cough* |
08:08:24 | * | ng0 quit (Ping timeout: 260 seconds) |
08:08:37 | shashlick | Wow okay |
08:08:42 | alexander92 | Zevv: programs ran in docker with other permissions |
08:08:45 | shashlick | I had texted about this earlier |
08:08:59 | shashlick | But anyway, looks like we don't have time |
08:09:19 | Zevv | alexander92: ah, with docker other magic happens; stuff runs in other namespaces, SELinux might be involved |
08:09:27 | shashlick | There's been no new features in nimble recently, but was hoping to fix more bugs and stabilize |
08:09:37 | shashlick | Before 1.0 |
08:10:13 | PMunch | Wait really? 1.0 is scheduled for today? |
08:10:23 | PMunch | I haven't even had time to bake a cake! |
08:10:24 | Araq | --passNim is a new feature, shashlick |
08:10:43 | Zevv | what?! 1.0! today! Does Araq even know?! |
08:10:47 | alexander92 | oh man, good thing i didnt rebase my patches until today |
08:11:39 | * | leorize joined #nim |
08:11:43 | alexander92 | PMunch, at least you know it before going to the army |
08:11:45 | narimiran | itshappening.gif |
08:11:55 | shashlick | @Araq is that in Nim or nimble, don't see any recent changes in nimble |
08:12:13 | shashlick | Related to passNim |
08:12:15 | PMunch | alexander92, that's true, but I'm not leaving until Wednesday |
08:13:19 | PMunch | Hmm, just updated to the latest devel to try my asyncdispatch fix before I make a PR, and I'm unable to run my example: http://ix.io/1VYy |
08:13:58 | Araq | PMunch, Time is not an int |
08:14:55 | PMunch | Yeah I know, but this isn't something I've touched.. |
08:15:07 | narimiran | PMunch: i remember seeing a similar error when i tried to bisect some (very) old commits |
08:15:21 | PMunch | That is the entire error message by the way, so no idea where it comes from.. |
08:15:50 | narimiran | there was a change in times.nim module, but i have no idea why are you seeing it *now* |
08:16:59 | * | sammich quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
08:17:23 | PMunch | I fixed that issue (doing .int64 on the low(CTime) and high(CTime) parts), but now I'm faced with a similar issue: http://ix.io/1VYA |
08:17:53 | shashlick | okay it has been around for a few months now for passNIm |
08:18:04 | * | sammich joined #nim |
08:19:42 | PMunch | After fixing those issues there are more of the same: http://ix.io/1VYC |
08:20:12 | narimiran | PMunch: stupid question: are you using 0.20.2 or newer? |
08:20:26 | PMunch | devel updated about a minute ago |
08:20:51 | PMunch | And that repo was pulled minutes ago with a one-liner fix in asyncdispatch applied to it |
08:21:00 | * | leorize quit (Ping timeout: 260 seconds) |
08:21:00 | * | ng0_ quit (Ping timeout: 260 seconds) |
08:21:00 | * | laaron quit (Ping timeout: 260 seconds) |
08:21:48 | PMunch | Oh, weird.. Running this with the devel version of asyncdispatch works.. |
08:22:27 | alexander92 | Araq, so current todo things |
08:22:28 | alexander92 | would just go into 1.1 |
08:23:13 | alexander92 | ? |
08:23:45 | narimiran | alexander92: https://github.com/nim-lang/Nim/milestone/2 |
08:26:01 | alexander92 | so https://github.com/nim-lang/Nim/milestone/4 |
08:26:02 | alexander92 | ok |
08:26:54 | alexander92 | but what happens with `do` etc |
08:27:03 | PMunch | Hmm, pulling the devel branch, building it, and running "choosenim ." makes it work fine |
08:27:33 | PMunch | Is "choosenim update devel" not the same as "git checkout devel && ./koch boot && choosenim ."? |
08:29:23 | shashlick | @Araq - I can merge both PRs, both look good |
08:29:33 | shashlick | but is @dom96 on board with 0.11.0 |
08:30:07 | nc-x[m] | is 1.0 really today? |
08:30:09 | shashlick | won't we need a readme |
08:30:16 | shashlick | changeme |
08:30:19 | shashlick | ugh changelog |
08:35:10 | * | laaron joined #nim |
08:36:23 | Araq | alexander92, yeah, into 1.1 |
08:37:01 | livcd | when is v1 going to get released ? :-) |
08:38:24 | * | leorize joined #nim |
08:38:25 | Araq | we are preparing the last steps and then you should test it this weekend |
08:38:33 | Araq | and then we'll release on monday |
08:39:24 | shashlick | i understand on one hand, but why bump nimble to 0.11.0 instead of 0.10.4 for a bunch of bug fixes |
08:39:39 | Araq | because 0.10.4 was too buggy for me |
08:39:43 | * | ng0_ joined #nim |
08:40:22 | shashlick | no, current release is 0.10.2, so we can bump to 0.10.4 |
08:40:53 | narimiran | livcd, nc-x[m]: today's devel (with some more commits coming in later today) is—if after testing nothing showstopping is found—what will be v1.0 on monday |
08:41:02 | livcd | release on monday 13:00 or 15:00 |
08:42:54 | narimiran | so my personal wish/request to everybody who can would be: update to the latest devel and test it over the weekend |
08:43:52 | nc-x[m] | narimiran, araq: 👍🏻 |
08:45:37 | PMunch | https://github.com/nim-lang/Nim/pull/12221 the fix for asyncdispatch for those at home following along |
08:46:26 | * | disruptek quit (Ping timeout: 240 seconds) |
08:47:04 | Zevv | sweet |
08:47:18 | * | snooptek quit (Ping timeout: 258 seconds) |
08:48:16 | nc-x[m] | btw, won't the deprecated stuff be removed for 1.0? |
08:49:08 | * | disruptek joined #nim |
08:50:41 | PMunch | Oh cool, then I have time to test all my packages over the weekend to make sure it's ready for v1 :) |
08:51:13 | * | PMunch looks at number of packages |
08:51:25 | PMunch | That should be, interesting.. |
08:51:58 | * | ng0_ is now known as ng0 |
08:52:00 | narimiran | nc-x[m]: as i said: current devel (including deprecations) will be v1.0 |
08:52:23 | narimiran | as for why: look at julia 0.7 --> julia 1.0 deprecation fiasco |
08:56:02 | nc-x[m] | but didn't the deprecation guidelines (dunno where i read that) say that deprecated stuff will be removed after 2 major nim releases. and i think (not sure) that there are stuff that were deprecated much before that which are not yet removed. |
08:56:29 | Araq | nc-x[m], we are going through every stdlib module... |
08:56:40 | Araq | but I'm sure we'll miss these things, so ... report it please |
08:56:54 | nc-x[m] | anyways no big deal. its just that compiling nim (and nimble?) show too many deprecated warnings |
08:57:01 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
08:57:08 | nc-x[m] | Araq: 👍🏻 |
08:57:41 | * | laaron joined #nim |
09:06:11 | alexander92 | but what happens |
09:06:14 | alexander92 | with the do syntax |
09:06:21 | alexander92 | i remember there were plans for deprecating |
09:06:29 | alexander92 | which seems like one of the major possible breaking changes |
09:06:35 | alexander92 | which would be good to be before 1.0 |
09:09:12 | leorize | did I hear that right, 1.0 soon? |
09:09:25 | narimiran | alexander92: it is part of the experimental manual: https://nim-lang.github.io/Nim/manual_experimental.html#do-notation |
09:09:39 | narimiran | "Unless otherwise indicated, these features are not to be removed, but refined and overhauled." |
09:11:54 | leorize | are any of you still hiding nim.nvim bugs from me? :P I need to iron them all out before Nim 1.0 |
09:17:05 | * | navin joined #nim |
09:17:05 | * | Trustable joined #nim |
09:26:07 | * | Vladar quit (Remote host closed the connection) |
09:34:07 | FromGitter | <arnetheduck> @Araq I saw somewhere that you think statement-based ast would be easier for `nlvm` - why is that? |
09:36:13 | * | NimBot joined #nim |
09:39:54 | * | Perkol joined #nim |
09:44:59 | Araq | what? |
09:48:01 | FromGitter | <arnetheduck> https://github.com/nim-lang/Nim/milestone/4 - `Rewrite expression based ASTs into statement based ASTs as both C++ and JavaScript are statement based languages. In order to support all control flow constructs, some form of goto is probably needed for this. NVLM will benefit from this. ` |
09:54:09 | * | navin quit () |
09:57:21 | Araq | arnetheduck: oh yeah, not sure I still hold this opinion but the idea was basically |
09:57:59 | Araq | to transform 'let x = if cond: a else: b' into 'if cond: x = a else: x = b' because backends benefit from this |
09:58:46 | Araq | currently it is done by vmgen, cgen, jsgen but it could be an AST to AST transformation |
09:58:56 | PMunch | Hmm, is there a way to manually yield an async procedure? |
09:58:56 | Araq | and then the backends would be simpler |
09:59:13 | PMunch | I tried to use poll() and drain() but they don't appear to do what I expect them to do.. |
10:00:06 | PMunch | Oh wait, poll(1) does almost what I wanted |
10:02:49 | PMunch | Ah, `await sleepAsync(0)` works even better for what I was trying to achieve |
10:03:09 | PMunch | That isn't the best though.. Can potentially create a lot of timers.. |
10:03:20 | PMunch | Or I guess it would only create one at a time.. |
10:08:29 | FromGitter | <arnetheduck> hm, so examples like that will lead to worse codegen in `llvm` - for example there are now two `x` meaning double the stack space - this must be optimized away by running code flow analysis which is slow and bad. basically, that's a lossy transformation - if anything, I'd actually like the AST to be fully expression-based - it's a bit of a mess now with `ifexpr` vs `ifstmt` and both behaving as expressions depending |
10:08:30 | FromGitter | ... on template expansions and the like.. there's a number of irregular AST's that the cgen swallows because of how it deals with `TLoc` that's really hard to analyze.. for example, there are cases of `nkAsgn` where the right hand side is a statement (list) that must be evaluated which is really weird.. likewise that ... [https://gitter.im/nim-lang/Nim?at=5d84a51dc77f285fb1aef896] |
10:11:47 | FromGitter | <arnetheduck> or maybe not double in that case because the x would sit uninitialized for a while, but it applies to liveness analysis which is trivial to generate in the expression case, but requires analysis in a statement-based world |
10:18:36 | * | clyybber joined #nim |
10:21:32 | clyybber | arnetheduck: I agree, I also find that you can't rely on ifStmt vs ifExpr and the distinction is basically useless as we don't have it for other AST Nodes either(like case). It gets worse when discardable comes into play. |
10:21:34 | * | abm joined #nim |
10:25:12 | clyybber | arnetheduck: So to fix AST inconsistencies without breaking bootstrapping, Araq started working on this: https://github.com/nim-lang/Nim/tree/araq-nodekinds-by-string-comparisons |
10:28:45 | FromGitter | <arnetheduck> yeah, but almost worse than that is that there are statements where you would expect an expression (like in `nkAsgn`) and the only reason it works is basically that the ast is never checked as long as the cgen spits out something that seems to work.. |
10:43:48 | leorize | disruptek, narimiran, Zevv: I've pushed some new commits to nim.nvim's refactoring, please check them out |
10:44:21 | leorize | most notably are tweaks to when the semantic highlighter will be triggered |
10:44:44 | leorize | it should not be triggered as often now |
10:44:58 | narimiran | translation? :) |
10:45:19 | narimiran | i.e. what do i need to look for? |
10:45:23 | * | clyybber quit (Quit: Quit) |
10:45:34 | leorize | check if everything still works :P |
10:45:39 | leorize | esp. the highlighter |
10:46:11 | leorize | I've tweaked a bit to make sure that the highlighter won't trigger when there aren't any changed text |
10:47:38 | leorize | also, apparently no one noticed that the 'only available to files on disk' message has gone :P |
10:49:08 | leorize | please let me know if everything still works correctly by weekend :) |
10:49:24 | leorize | I would like to merge refactoring to master before Nim 1.0 |
10:51:30 | * | alexander92 quit (Ping timeout: 258 seconds) |
10:59:04 | * | endragor quit (Remote host closed the connection) |
10:59:16 | * | navin joined #nim |
10:59:36 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:01:50 | * | laaron joined #nim |
11:03:21 | * | navin quit (Remote host closed the connection) |
11:13:42 | * | dddddd joined #nim |
11:14:10 | FromGitter | <mratsim> But is Nim 1.0 scheduled? |
11:14:36 | narimiran | huh? read the logs from this morning |
11:15:57 | PMunch | mratsim: https://irclogs.nim-lang.org/20-09-2019.html#08:40:53 |
11:16:42 | PMunch | And the answer to this: https://irclogs.nim-lang.org/20-09-2019.html#08:37:01 |
11:19:02 | * | navin joined #nim |
11:23:39 | * | navin quit (Ping timeout: 250 seconds) |
11:26:35 | * | navin joined #nim |
11:27:28 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:27:56 | * | laaron joined #nim |
11:37:56 | * | rockcavera joined #nim |
11:48:17 | * | navin quit (Remote host closed the connection) |
11:49:15 | * | navin joined #nim |
11:51:23 | * | gangstacat quit (Ping timeout: 276 seconds) |
11:53:46 | * | Perkol quit (Remote host closed the connection) |
12:01:09 | * | gangstacat joined #nim |
12:03:33 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
12:08:17 | * | laaron joined #nim |
12:16:06 | * | thomasross quit (Ping timeout: 246 seconds) |
12:19:25 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
12:20:19 | * | alexander92 joined #nim |
12:20:57 | * | laaron joined #nim |
12:24:33 | * | laaron quit (Client Quit) |
12:25:30 | * | laaron joined #nim |
12:32:09 | * | Kaivo joined #nim |
12:33:22 | * | thomasross joined #nim |
12:37:13 | * | navin quit (Remote host closed the connection) |
12:37:50 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
12:39:10 | * | laaron joined #nim |
12:39:39 | lqdev[m] | so hyped for 1.0 |
12:39:58 | PMunch | Choo choo! |
12:40:06 | lqdev[m] | mainly because my mates will stop saying Nim's not even out of 1.0 yet lol |
12:41:55 | * | laaron quit (Client Quit) |
12:42:30 | FromGitter | <Vindaar> Damn, seems like I will miss the release of 1.0, cause I'll be on vacation for 3 weeks from Sunday on |
12:42:43 | * | laaron joined #nim |
12:44:48 | lqdev[m] | I'm on yesterday's devel, I'm gonna test during the weekend |
12:46:14 | * | laaron quit (Client Quit) |
12:46:27 | lqdev[m] | one gripe I have is the way unused imports are handled; they basically ignore exports. say you have module a with the type A, then you have module b which imports a and exports A, if you import b and use A there'll still be an unused warning |
12:47:08 | lqdev[m] | this has been an issue for the entirety of 0.20.99 devel for me |
12:47:53 | * | laaron joined #nim |
12:48:08 | Zevv | lqdev[m]: when defined(nimHasUsed): {.used.} |
12:48:41 | lqdev[m] | that works with imports? |
12:48:55 | lqdev[m] | I tried some time ago and it didn't work |
12:49:02 | lqdev[m] | there was a parse error |
12:49:25 | Zevv | there was if you only do {.used.} |
12:49:34 | Zevv | thus the when defined(nimHasUsed) |
12:49:51 | lqdev[m] | that's verbose |
12:50:03 | Zevv | I have similar problems because these modules do not export anything, but run some toplevel code instead |
12:50:09 | Zevv | I'm not too fond of it, but it works for me for now |
12:50:10 | * | laaron quit (Client Quit) |
12:50:16 | lqdev[m] | I wonder what prevents this issue from being solved properly though? |
12:50:23 | Zevv | time, probably |
12:50:38 | Zevv | I guess the definition of 'used' is the problem here |
12:51:22 | lqdev[m] | seems like it, but it's been so long since this issue started being a thing that this could've been fixed long ago. I guess there were more important matters |
12:52:01 | lqdev[m] | still, that doesn't make 1.0 that much worse :) |
12:52:42 | * | laaron joined #nim |
12:53:50 | * | laaron quit (Client Quit) |
12:55:44 | * | laaron joined #nim |
12:56:05 | * | lritter joined #nim |
13:04:00 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:06:31 | * | laaron joined #nim |
13:08:00 | * | laaron quit (Client Quit) |
13:09:46 | * | laaron joined #nim |
13:20:50 | * | navin joined #nim |
13:22:05 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:24:24 | * | laaron joined #nim |
13:26:30 | alexander92 | what |
13:26:58 | alexander92 | i wonder what would be the people top questions/stuff asked for |
13:28:46 | PMunch | Hmm, when using locks/channels/other blocking stuff with threadpool, that will block the entire thread that it runs on right? |
13:29:41 | * | Vladar joined #nim |
13:31:02 | FromGitter | <mratsim> Blocking blocks the entire thread |
13:31:32 | * | a_b_m joined #nim |
13:31:35 | FromGitter | <mratsim> Locks or sync IO |
13:32:01 | * | a_b_m quit (Read error: Connection reset by peer) |
13:32:13 | FromGitter | <mratsim> Channels, they block if buffer is full or if they are unbuffered |
13:32:20 | PMunch | Yeah yeah, I know |
13:32:24 | PMunch | I wonder if implementing something similar to what asyncdispatch does, but extend it to include locking and channels, and make it run on multiple threads would be a good idea. |
13:33:04 | FromGitter | <mratsim> I don't think so |
13:33:52 | FromGitter | <mratsim> For multithreaded IO, it's interesting |
13:34:07 | PMunch | So essentially something like `if not tryLock(theLock): threadAwait theLock`, and then having the dispatcher queue that process up until the lock is freed |
13:35:15 | FromGitter | <mratsim> If you use locks, it's because you need low-level tinkering with threads, spawning a new threads automatically will create impredictable behavior and needs of workarounds |
13:35:33 | * | abm quit (Ping timeout: 265 seconds) |
13:35:48 | * | alexander92 left #nim ("WeeChat 2.4") |
13:36:08 | * | Skaruts joined #nim |
13:36:14 | PMunch | Hmmm |
13:36:15 | * | PMunch quit (Remote host closed the connection) |
13:36:16 | FromGitter | <mratsim> Channels: just use buffered channels with trySend, tryRecv that return a bool |
13:42:48 | Skaruts | hey guys, I've never delved into pointers in Nim, so I don't quite understand them, and now I was looking at the source code for libtcod_nim and I found objects being defined like |
13:42:52 | Skaruts | `Map* = ptr MapObj` |
13:43:03 | Skaruts | does this mean I have to destroy them manually? |
13:43:37 | * | navin quit (Ping timeout: 250 seconds) |
13:45:39 | Skaruts | to complete the above: `MapObj* {.bycopy.} = object` |
13:45:40 | FromGitter | <mratsim> Yes |
13:46:00 | Araq | Skaruts, depends on the wrapper |
13:46:01 | FromGitter | <mratsim> Or wrap them in an object with a destructor |
13:46:09 | FromGitter | <mratsim> Or a ref with a finalizer |
13:48:23 | Skaruts | I've no clue what any of that even is... |
13:48:42 | Skaruts | the lib's samples don't seem to destroy anything |
13:48:44 | Skaruts | https://github.com/Vladar4/libtcod_nim/blob/4b2efc7832838647b370e0dc7d27490d722d8265/samples112/samples.nim |
13:49:12 | Skaruts | not in the way I know, at least, like `destroy MyObject` |
13:50:09 | Skaruts | (correction, I suppose I know what a destructor is, if it's anything like a destructor in C++) |
13:50:23 | Zevv | yeah, but in nim its just not that, really |
13:55:43 | Skaruts | so basically I'd have to wrap the entire lib |
13:58:00 | * | laaron quit (Remote host closed the connection) |
13:58:37 | * | Trustable quit (Remote host closed the connection) |
13:58:44 | Skaruts | well, maybe the lib has destructors, if this is it: |
13:58:47 | Skaruts | https://github.com/Vladar4/libtcod_nim/blob/4b2efc7832838647b370e0dc7d27490d722d8265/src112/fov.nim#L61 |
14:01:44 | * | nsf quit (Quit: WeeChat 2.5) |
14:02:50 | Skaruts | is there some way to find out if my program is leaving memory leaks behind when closed? |
14:03:20 | Skaruts | or during execution |
14:03:59 | Zevv | if on linux, use valgrind |
14:04:09 | Zevv | clang and gcc have sanitizer options to do checking for you |
14:04:11 | Skaruts | hmm, I'm on windows |
14:09:07 | FromGitter | <zacharycarter> Dr Memory |
14:18:00 | FromGitter | <arnetheduck> generally doesn't work with nim though, due to the gc |
14:21:10 | * | Skaruts quit (Remote host closed the connection) |
14:22:42 | Zevv | araq, why is it you consider auto items/pairs a mistake? |
14:23:54 | disruptek | leorize: as an example of broken syntax highlighting, open https://github.com/disruptek/openapi/blob/master/src/openapi/codegen.nim and jump to the bottom of the file, eg. `G` |
14:26:29 | disruptek | i consider auto items/pairs a mistake because it's implicit semantics based on hidden rules. |
14:29:57 | * | Skaruts joined #nim |
14:34:42 | * | navin joined #nim |
14:35:50 | Skaruts | gives me a few "possible leaks" |
14:36:24 | Zevv | disruptek: but where does that start and where does it and. Isn't that what an higher level language is about? |
14:37:18 | * | alexander92 joined #nim |
14:38:08 | disruptek | let me put it to you like this: i know how to determine/override the magical semantics of python's __foo__ calls. not so with nim. but i'm willing to admit that could be simply because 1) there's no docs, or 2) i haven't read them, or 3) the semantics are obvious if you know where to look. |
14:39:49 | disruptek | until i am confident that i understand a feature, i try not to rely on it. that's why most of my nim code is pretty trivial. that's a shame, but again, the fault could be all due to my ignorance. |
14:39:56 | Zevv | Well the docs are in the manual section 'Implict items/pairs invocations', and *overriding* is something you just might not want to do |
14:40:28 | Zevv | the manual is pretty clear on the semantics imho |
14:40:50 | disruptek | if the only implicit calls are `items` and `pairs`, i would just as soon remove them for simplicity and explicitness. |
14:41:30 | disruptek | i fully expected that there'd be other examples. |
14:41:31 | alexander92 | this is a good idea, disruptek |
14:41:37 | alexander92 | but it's a matter of language design |
14:41:58 | Zevv | the old discussion, sugar or no sugar |
14:42:03 | alexander92 | on the other hand it makes it harder to use for loops , as now they only work directly with stuff |
14:42:09 | alexander92 | that the compiler knows about |
14:42:30 | alexander92 | and items for all user defined types: this might be a good thing, but it's really subjective imo |
14:42:42 | alexander92 | but iirc there are others |
14:42:50 | alexander92 | you can write `.` and `()` macros |
14:43:07 | alexander92 | when we were working on py2nim, we tried to model many of those __slot__ methods to nim equivalents |
14:43:14 | * | laaron joined #nim |
14:44:15 | disruptek | when you cannot type the `foo` in `for foo in bar:` then which is getting invoked? `pairs()` or `items()`? |
14:44:33 | disruptek | i really wish i could `for foo: FooType in bar:`. |
14:44:42 | alexander92 | i'd guess it doesn't matter |
14:44:51 | alexander92 | what i'd expect is items if its for a |
14:44:54 | Zevv | "when [...] the for loop has exactly 1 variable, the for loop expression is rewritten to items(e)" |
14:44:58 | alexander92 | pairs if its for a,b |
14:45:08 | alexander92 | disruptek, this sounds like return type overloading |
14:45:45 | disruptek | no, the workaround is to define a proc `bif` and then `for foo in bar: foo.bif`; you get the type checking you want. |
14:46:00 | disruptek | "it doesn't matter" is the most accurate statement, afaict. |
14:46:07 | alexander92 | disruptek, example is also |
14:46:09 | alexander92 | https://github.com/metacraft-labs/py2nim_deprecated/tree/master/tests/python |
14:46:21 | alexander92 | and https://github.com/metacraft-labs/py2nim_deprecated/blob/master/tests/nim/call.nim |
14:48:23 | disruptek | Zevv: the problem is that i want to typecheck my tuple return type destructuring from `pairs()`, and i don't know how to do that otherwise. |
14:48:39 | alexander92 | overriding is a good point |
14:48:55 | alexander92 | disruptek you can do for (a, b) in .. |
14:49:05 | alexander92 | ah sorry, i misread tuple |
14:49:11 | * | navin quit (Remote host closed the connection) |
14:49:29 | alexander92 | no, it is `tuple` .. nvm |
14:49:45 | * | navin joined #nim |
14:49:48 | leorize | disruptek: templates are not evaluated until they're used |
14:50:00 | leorize | so nimsuggest won't highlight them (should be fixed ofc) |
14:50:14 | leorize | also template name are never highlighted for some reason |
14:51:12 | disruptek | `for temp: MyTempTuple in getTemperatures.pairs: echo temp.inF; echo temp.inC` is superior to `for (inF, inC) in getTemperatures():`; does that make sense? |
14:51:38 | leorize | Skaruts: windows cleanup resources once your program closes |
14:51:43 | leorize | like every sane os :P |
14:51:44 | disruptek | leorize: they work fine for me most of the time. eg. from logging, `warn`, `info`, etc. are all highlighted as templates. |
14:51:57 | leorize | once you use them they will highlight |
14:52:05 | leorize | one of the nimsuggest quirks |
14:52:25 | alexander92 | but why? why is MyTempTuple temp? |
14:52:30 | disruptek | weirdly, i rarely need to highlight identifiers that i don't use. 😜 |
14:52:35 | alexander92 | ah, temperature, not temp |
14:52:42 | Zevv | oooh leorize do inline-red-letters-error-messages inside my vim source just like cdecl |
14:53:32 | Zevv | no clangd that is |
14:53:34 | alexander92 | well, i am not sure i get your usecase disruptek, that's the same as "a: MyTempTuple = call()" |
14:53:44 | leorize | Zevv: you mean that annotation thingy? |
14:53:51 | leorize | doesn't ALE already do it? |
14:53:56 | disruptek | alexander92: nah, my example is for loop iteration. |
14:53:57 | * | navin quit (Ping timeout: 246 seconds) |
14:53:59 | Zevv | ale? |
14:54:06 | alexander92 | but it is the same principle |
14:54:15 | alexander92 | you invoke something with a return type |
14:54:17 | leorize | Zevv: it's a linter plugin |
14:54:21 | Zevv | ah oh |
14:54:22 | disruptek | exactly, and yet you cannot type-check that interim variable `temp`. |
14:54:24 | leorize | has nim support |
14:54:32 | alexander92 | but it can have only one possible type |
14:54:37 | leorize | if it doesn't do that then I'll consider adding the annotation thingy |
14:54:47 | Zevv | I would *hate* that :) |
14:54:51 | disruptek | the order of the tuple fields could be reversed accidentally. |
14:55:00 | disruptek | or, i could misremember the order of the values. |
14:55:01 | Zevv | all these letters in my editor that I didn't type there myself! |
14:55:28 | disruptek | for (inC, inF) in getTemperatures(): -- where is the bug? |
14:55:32 | alexander92 | wbut .. dis |
14:55:36 | alexander92 | ops* |
14:55:42 | alexander92 | but disruptek |
14:55:47 | alexander92 | this is true for all possible usages |
14:55:50 | alexander92 | of tuples |
14:55:56 | disruptek | nope. |
14:55:57 | alexander92 | var (inc, inf) = getTempCall() |
14:56:00 | alexander92 | where is the bug |
14:56:01 | leorize | Zevv: do you have pics? :P I'd like to see how that annotating thingy looks like |
14:56:46 | disruptek | var foo: MyTupleType = getTempCall() # avoid future bug |
14:57:00 | Zevv | leorize: http://zevv.nl/div/redletters.png |
14:57:05 | disruptek | where is your defensive programming wrt my for loop? |
14:57:25 | alexander92 | but while you write your own code, you know if getTempCall returns MyTupleType |
14:57:44 | alexander92 | i dont understand why would you need to repeat that info |
14:57:46 | alexander92 | on the callsite |
14:58:00 | alexander92 | a bit like var i: int = parseInt |
14:58:04 | disruptek | because i want to assert that the type i'm about to work with is correct. |
14:58:09 | leorize | for t in getTemperatures(): when not t is MyTupleType: {.error: "t is not the type that I like".} :P |
14:58:10 | alexander92 | good |
14:58:15 | alexander92 | in this case, can't one |
14:58:20 | alexander92 | yes, do something like this ^ |
14:58:34 | * | abm joined #nim |
14:58:44 | leorize | you can always do this as well: |
14:58:55 | leorize | for t in getTemps(): let t: MyTupleType = t |
14:59:00 | disruptek | great, you guys think that a hidden invocation of `pairs()` is "sugar" but i should be putting in compile-time `when` statements in all my loops... makes sense! |
14:59:13 | * | disruptek 🙄 |
14:59:23 | alexander92 | but this is just bizarre |
14:59:27 | alexander92 | i dont understand |
14:59:33 | alexander92 | why do you need to assert that |
14:59:42 | alexander92 | why dont you need to do |
14:59:46 | disruptek | because depending on what the type is, a call might vary. |
14:59:48 | alexander92 | var i: int = parseInt("e") |
15:00:01 | alexander92 | ok, i can see it in some cases, but not in most loops |
15:00:06 | disruptek | `for bar in bif: echo $bar` -- which $ am i invoking? any idea? |
15:00:59 | disruptek | anyway... i will continue to specify tuple types in my code and simple invoke procs with those types on each iteration. solves my problem using simple constructs that already exist in the language. |
15:01:10 | FromGitter | <arnetheduck> as long as they all follow the agreed-upon semantic for `$`, does it matter? |
15:01:13 | alexander92 | well, then something like "typeAssert t is MyTupleType" |
15:01:18 | disruptek | absolutely it matters. |
15:01:20 | alexander92 | seems also simple |
15:01:28 | leorize | Zevv: eh, that doesn't look really nice |
15:01:38 | lqdev[m] | leorize: protip: `notin` is a thing |
15:01:45 | Zevv | not at all. That's why I said I would *hate* that :) |
15:01:47 | leorize | disruptek: did you see my obviously simpler version? :P |
15:01:51 | lqdev[m] | s/notin/isnot |
15:02:17 | leorize | let t: MyTupleType = t |
15:02:21 | leorize | put that in the for loop |
15:02:28 | leorize | it will shadow the actual t variable |
15:02:31 | leorize | problem solved |
15:02:41 | disruptek | sure. |
15:03:00 | disruptek | i guess i find `for t: MyTupleType in bar:` easier to read. maybe it's just me. |
15:03:43 | alexander92 | it is a bit easier to read indeed |
15:04:23 | alexander92 | and one can argue it's similar to var t: T = .. |
15:04:43 | alexander92 | you can always open a RFC |
15:05:18 | * | navin joined #nim |
15:07:33 | * | laaron quit (Remote host closed the connection) |
15:08:07 | * | rockcavera quit (Remote host closed the connection) |
15:08:17 | * | nif quit (Quit: ...) |
15:08:26 | * | nif joined #nim |
15:09:28 | * | navin quit (Ping timeout: 245 seconds) |
15:10:22 | disruptek | i will implement it as a macro. what would you call it? |
15:10:54 | leorize | explicit()? |
15:11:15 | leorize | for t: MyType in explicit(iterator(object)) |
15:11:27 | leorize | your biggest problem would be the `:` next to `t` though |
15:11:29 | disruptek | no, the typed for. |
15:11:42 | disruptek | the syntax is macro-able, so it's trivial. |
15:12:19 | leorize | for loop macros can rewrite the for loop |
15:12:26 | disruptek | it'll be like `typedFor t: MyTupleType in bar:` |
15:13:27 | * | navin joined #nim |
15:13:28 | disruptek | or maybe it should be like `for t in bar of MyTupleType:` |
15:13:42 | disruptek | or maybe it should be like `for t in bar.pairs of MyTupleType:` |
15:16:47 | * | abm quit (Remote host closed the connection) |
15:17:16 | * | abm joined #nim |
15:17:26 | leorize | !eval for (t: int) in [0, 1, 2]: discard |
15:17:28 | NimBot | Compile failed: /usercode/in.nim(1, 8) Error: expected: ')', but got: ':' |
15:17:44 | leorize | looks like the parser won't let this pass :P |
15:17:48 | * | navin quit (Ping timeout: 245 seconds) |
15:18:17 | disruptek | i'm thinking `each t in bar.pairs of MyTupleType:` but i kinda hate to eat up the lucrative `each` identifier. |
15:22:59 | FromGitter | <alehander42> !eval typedfor t: M in bar |
15:23:00 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'typedfor' |
15:23:11 | FromGitter | <alehander42> it would pass |
15:23:19 | FromGitter | <alehander42> for is different of typedFor |
15:24:52 | leorize | !eval for t in int(items([0,1])): discard |
15:24:53 | NimBot | Compile failed: /usercode/in.nim(1, 19) Error: attempting to call routine: 'items' |
15:25:42 | disruptek | it's easier to just write the macro. all it has to do is juggle some nodes around. |
15:28:22 | * | alexander92 quit (Ping timeout: 268 seconds) |
15:34:44 | * | lqdev[m] uploaded an image: image.png (1KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/NePXMxkbxNAqJNdfpOGJhqmI > |
15:34:51 | lqdev[m] | treeform: am I doing something wrong? |
15:35:00 | lqdev[m] | the space seems way too big |
15:35:08 | lqdev[m] | also there's some keming present in certain strings |
15:35:26 | * | lqdev[m] uploaded an image: image.png (1KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/LDdCWQoRZGqWasryzAjSluFa > |
15:35:29 | lqdev[m] | eg. here ↑ |
15:37:23 | lqdev[m] | also, how can I make the text look sharper? it looks really blurry everywhere |
15:40:07 | lqdev[m] | man, I don't know if I like this text rendering |
15:42:18 | lqdev[m] | don't get me wrong, it's amazing you created a whole typography library all on your own, but the results are kind of disappointing after seeing so much of FT-rendered text |
15:42:39 | lqdev[m] | …and to think all of this effort went just to support text boxes |
15:43:32 | disruptek | holy shit, it worked first time. |
15:44:04 | disruptek | this is hilarious. what an incredible language. |
15:45:59 | disruptek | https://gist.github.com/disruptek/89f2979b58901cd5d90057b4b02a5647 |
15:48:28 | * | theelous3 joined #nim |
15:58:10 | FromGitter | <mratsim> @lqdev I don't know treeform lib but I know that font rendering is all kinds of broken easily. Between subpixel rendering with RGB to mimic a vibrant black or whatever, aliasing, ligatures, monospace, glyphs interpolation for some sizes (or SVG for big one). |
15:58:34 | FromGitter | <mratsim> I remember installing forks of freetype often in the paste also for proper Cleartype font rendering |
16:01:45 | lqdev[m] | all I want is nice, smooth font rendering without all this RGB crap (since it's a pain to implement) |
16:05:13 | lqdev[m] | also for some reason, a pure Nim library added weight to my executable |
16:05:28 | lqdev[m] | somehow, treeform's library is bigger than freetype |
16:05:32 | lqdev[m] | I don't even want to know how |
16:19:26 | * | matlock joined #nim |
16:35:27 | * | Cthalupa quit (Ping timeout: 245 seconds) |
16:36:43 | * | Cthalupa joined #nim |
16:48:16 | * | matlock quit (Read error: Connection reset by peer) |
16:49:41 | * | vsantana joined #nim |
17:13:32 | * | navin joined #nim |
17:41:12 | * | navin quit (Remote host closed the connection) |
17:41:19 | * | navin joined #nim |
17:41:54 | * | navin quit (Remote host closed the connection) |
17:42:22 | * | navin joined #nim |
17:45:37 | * | navin quit (Remote host closed the connection) |
17:45:45 | * | navin joined #nim |
17:50:00 | * | navin quit (Ping timeout: 246 seconds) |
17:55:42 | * | navin joined #nim |
17:59:22 | * | navin quit (Remote host closed the connection) |
17:59:47 | * | navin joined #nim |
18:00:21 | * | navin quit (Remote host closed the connection) |
18:01:10 | Araq | Zevv, we can do pairs much better now with for loop macros |
18:01:33 | * | nsf joined #nim |
18:16:23 | Zevv | Must admit I haven't use those yet. Is it possible to implicitly use a for loop macro using the same "for thing in things:" notation? Because I do like the terse form where you just get the 'default' iterator that makes sense. |
18:17:03 | Araq | ah these are two separate things: |
18:17:08 | Zevv | right |
18:17:24 | Araq | 1) I think the implicit items is a bit to clever and also produced bugs |
18:17:38 | Araq | 2) pairs can be done much better with a for-loop macro |
18:17:53 | Araq | but as I said, items can stay and we fix the remaining bugs |
18:18:19 | Zevv | sure, my original question was about 1. I can see that implicit/hidden functionality might lead to surprises, but the concise notation is also sweet. |
18:18:23 | Araq | in retrospect though the language would be a tiny bit better without the implicit items, IMO. |
18:18:40 | Zevv | naah, it's just a tiny bit better *with* :) |
18:19:00 | Araq | it's surely something people can disagree about |
18:20:00 | Zevv | Nim has the tendency to do the right thing if you don't ask for anything special. And how often would I iterate a seq in any other way then from the first to the last item? |
18:20:29 | Zevv | But sure, tons of things to disagree. I was jus wondering earlier of you were not pleased about the implicitness, or if there were technical reasons. |
18:21:41 | Araq | the implicitness leads to bugs and the existence of 'mitems' makes it less elegant |
18:22:23 | Zevv | hm yes, that makes sense, didn't think of that... |
18:28:27 | * | def- quit (Quit: -) |
18:28:38 | * | def- joined #nim |
18:28:42 | * | ldlework quit (Quit: co'o ro do) |
18:29:05 | * | ldlework joined #nim |
18:40:44 | * | clyybber joined #nim |
18:46:15 | * | krux02 quit (Remote host closed the connection) |
18:46:57 | * | krux02 joined #nim |
19:02:26 | * | Vladar quit (Remote host closed the connection) |
19:08:47 | disruptek | this `each` really should be valid `for` syntax, IMO. i'm just putting it into code and finding that it's great for readability. just like an `except MyError of ValueError` would be. i guess i will add that next. |
19:17:05 | * | treeform joined #nim |
19:19:54 | treeform | lqdev[m], yeah text is hard. I am not sure what bug you are running into. It looks like it typesets stuff assuming subpixeling but you are not applying it yet? |
19:20:47 | treeform | do you have en example where freetype characters look sharper? |
19:21:07 | treeform | usually character sharpness is based on the subpixel offset |
19:21:20 | treeform | some times you want less sharper character so that it looks nicer in a word |
19:23:10 | treeform | "treeform's library is bigger than freetype", you are probably dynamically linking to freetype while mine is statically linked? |
19:24:55 | treeform | Freetype DLL's size is 283.41KB how much more did my library grow for? |
19:34:45 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
19:38:59 | * | pbb joined #nim |
19:39:19 | * | navin joined #nim |
19:49:23 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
19:49:51 | * | Trustable joined #nim |
19:50:14 | * | pbb joined #nim |
19:54:28 | * | rockcavera joined #nim |
19:55:32 | * | navin quit (Remote host closed the connection) |
19:57:01 | * | alexander92 joined #nim |
19:59:48 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
20:00:14 | * | pbb joined #nim |
20:01:13 | * | clyybber quit (Quit: WeeChat 2.6) |
20:06:17 | FromGitter | <awr1> hello |
20:09:36 | FromGitter | <awr1> question: can you use submodules in nimble packages? |
20:11:38 | FromGitter | <danielecook> Where do you store .c files that are imported during builds? |
20:11:39 | FromGitter | <danielecook> https://travis-ci.org/danielecook/seq-collection/builds/587636377?utm_source=github_status&utm_medium=notification |
20:11:50 | FromGitter | <danielecook> I'm getting this error that the `.c` file can't be found |
20:14:37 | * | tdc_ joined #nim |
20:15:38 | * | tdc quit (Ping timeout: 240 seconds) |
20:15:46 | FromGitter | <awr1> hm |
20:15:51 | FromGitter | <awr1> `-I/home/travis/build/danielecook/seq-collection/nim-devel/lib -I/home/travis/build/danielecook/seq-collection` |
20:16:03 | FromGitter | <awr1> is murmur3.c in these directories? |
20:19:42 | FromGitter | <danielecook> no |
20:20:14 | FromGitter | <danielecook> ok...i can try putting it there... |
20:20:32 | FromGitter | <danielecook> is there a way to specify the location though? |
20:22:23 | FromGitter | <awr1> you can add another include directory. i might be wrong though, not remembering my GCC args |
20:23:44 | FromGitter | <danielecook> if I pop this into the source files would that resolve it? `{.compile: "path/to/murmer.c".}`? |
20:23:57 | FromGitter | <awr1> maybe |
20:24:09 | FromGitter | <awr1> i can't say i understand how gcc is being shelled out here by the nim compiler |
20:25:48 | * | tdc_ quit (Quit: Leaving) |
20:26:38 | FromGitter | <awr1> normally nim compiles the generated C file from the cache folder, but assuming that murmur3.c is not generated by nim (and is in fact https://github.com/PeterScott/murmur3 )...maybe you already have a compile pragma in there somewhere? |
20:27:07 | FromGitter | <danielecook> actually it's a dependency of bitvector |
20:27:17 | FromGitter | <danielecook> it might not be correctly specified in bitvector tho.. |
20:27:22 | FromGitter | <danielecook> but i'm not sure |
20:28:06 | FromGitter | <awr1> https://github.com/MarcAzar/BitVector/blob/8e8a24a0bae19099dd138b7b588192681215c005/src/bloom.nim#L13 |
20:28:08 | FromGitter | <awr1> :| |
20:28:51 | FromGitter | <danielecook> yeah but then that file is in a 'private' folder |
20:28:57 | FromGitter | <danielecook> so it's not correctly specified |
20:29:02 | FromGitter | <awr1> yeah |
20:29:11 | FromGitter | <awr1> you may need to use `patchFiles` or something to that effect |
20:32:28 | * | narimiran quit (Remote host closed the connection) |
20:34:07 | FromGitter | <danielecook> i'm going to try to compile it in my package and see if that fixes it |
20:35:14 | shashlick | @awr1 yes you can use sub modules |
20:36:20 | FromGitter | <awr1> cool! thanks |
20:36:56 | FromGitter | <arnetheduck> btw not sure it was mentioned here's an amalgamation build of `sqlite3` that the compiler could use: https://github.com/arnetheduck/nim-sqlite3-abi - using a random binary seems really really messy - this would be an easy way to deprecate the existing sqlite3 support in the std lib.. it probably needs a wee bit of polish, I remember there were some features in nimterop I was waiting for (but not quite which) |
20:40:04 | Araq | I patched the existing sqlite3 module instead |
20:40:08 | shashlick | well, the compiler probably has a wrapper it uses anyway, just need the .c file in the repo and that's it |
20:40:16 | Araq | but IC is disabled for now |
20:40:29 | Araq | compiler doesn't use sqlite, will re-enable it later |
20:40:49 | federico3 | Nim could have something like LMDB built-in |
20:40:55 | FromGitter | <arnetheduck> in other news, `nlvm` now uses zero-cost / dwarf exceptions.. and no, I haven't compared perf really, but the generated code is much more in line with what llvm expects / uses fewer ugly hacks - it's also the first feature that requires patches to the std lib that don't make sense for upstream, due to the unfortunate use of exceptions in some random parts `system.nim` |
20:40:57 | shashlick | ok, good thing is that nightlies work again :) |
20:41:06 | FromGitter | <arnetheduck> oh nice ;) |
20:41:33 | shashlick | but the 0.20.x branch doesn't since IC is still enabled there |
20:46:39 | FromGitter | <arnetheduck> it's all in a commit, if anyone is curious what dwarf eh implementations look like: https://github.com/arnetheduck/nlvm/commit/040a87e4c6254001e43c3c90380c123198b03619 |
20:47:51 | shashlick | @arnetheduck - any feedback on the nimterop getHeader feature in dev? |
20:48:12 | FromGitter | <arnetheduck> haven't look at it, been busy |
20:49:06 | FromGitter | <arnetheduck> https://blog.ethereum.org/2019/09/19/eth2-interop-in-review/ - that's nim running on one of those battery driven pi's :) |
20:51:03 | Araq | if s.name.s == "getCurrentException": # I know you know it, but can't resist |
20:51:08 | Araq | ^ that's wrong |
20:51:45 | Araq | I could have myownmodule.getCurrentException and then you miscompile the code |
20:52:28 | FromGitter | <arnetheduck> isn't that in a `if module == system` or something like that section? |
20:52:55 | FromGitter | <arnetheduck> but yeah, I got lazy in a few places |
20:53:39 | Araq | maybe it is, every diff is incomplete and IMHO diffs suck for code reviews |
20:55:09 | FromGitter | <arnetheduck> yup, it is.. there are little expand buttons next to the line numbers to see more, which seems like a reasonable way to do it |
20:56:21 | FromGitter | <arnetheduck> specially since llgen.nim is 7k lines :) |
20:56:41 | Araq | ah, nice |
20:56:50 | Araq | maybe they are new, never noticed them |
20:57:30 | Araq | I would use case s.name.s |
20:57:40 | Araq | of "atomicLoadN": ... |
20:57:51 | Araq | of "atomicStoreN": |
20:57:51 | * | navin joined #nim |
20:57:54 | Araq | etc etc |
20:59:23 | disruptek | here's another version i added: `each k, v in input.pairs of string and int:` |
21:01:15 | treeform | ^ is that nim code? |
21:01:24 | disruptek | yeah |
21:01:37 | disruptek | you have to admit, it's pretty damned sweet. |
21:01:53 | treeform | what does it do? |
21:02:03 | * | navin quit (Ping timeout: 240 seconds) |
21:02:09 | disruptek | yields a compile-time error if k isn't a string or v isn't an int. |
21:02:27 | disruptek | otherwise, it's the same as a `for k, v in input.pairs:` |
21:02:40 | FromGitter | <arnetheduck> Araq, I would too if I knew the language when I started writing it |
21:04:16 | disruptek | also, you can `each k, v in input.pairs:` and it turns into a "normal" `for`. |
21:08:24 | treeform | I got the same code to run on iOS, Android, MacOS and Web: https://cdn.discordapp.com/attachments/371759389889003532/624713278228267018/unknown.png |
21:08:36 | Zevv | disruptek: ow wow is that in the docs somewhere? |
21:08:51 | disruptek | treeform: what was your memory problem due to? |
21:08:58 | disruptek | that's quite an accomplishment. |
21:09:04 | disruptek | Zevv: it's a macro i just wrote. |
21:09:06 | treeform | I still don't know. I just turned off GC for now. |
21:09:10 | Zevv | disruptek: sweet |
21:09:32 | Zevv | but should be "of string or int" then :) |
21:09:49 | disruptek | but it's not either. the types have to match. |
21:10:05 | Zevv | right |
21:10:59 | treeform | My hope is that I can ship this UI library to every one. And any one who makes a UI app using this library can just ship it anywhere. |
21:11:38 | disruptek | it's one of the main reasons i chose nim. |
21:12:24 | disruptek | i know there are a few other efforts like wiish that do this, but it's great to see broader x-platform work like that. |
21:25:20 | * | solitudesf quit (Ping timeout: 276 seconds) |
21:31:20 | * | Skaruts quit (Remote host closed the connection) |
21:33:36 | disruptek | i would publish this sugar (now it's `foreach`) along with a couple other libs, but after one successful publish, nimble stopped working for me. it just segfaults. |
21:33:42 | disruptek | on publish, that is. |
21:37:14 | * | alexander92 quit (Ping timeout: 240 seconds) |
21:38:00 | Zevv | well, you have the source, fix it then :) |
21:50:58 | * | rockcavera quit (Remote host closed the connection) |
21:56:27 | * | Trustable quit (Remote host closed the connection) |
22:04:12 | * | ng0 quit (Ping timeout: 260 seconds) |
22:04:12 | * | leorize quit (Ping timeout: 260 seconds) |
22:09:04 | * | exelotl joined #nim |
22:12:23 | * | exelotl_ joined #nim |
22:12:54 | * | sagax quit (Ping timeout: 268 seconds) |
22:13:13 | * | exelotl quit (Ping timeout: 245 seconds) |
22:15:16 | * | nsf quit (Quit: WeeChat 2.5) |
22:21:37 | * | leorize joined #nim |
22:22:06 | * | vsantana quit (Quit: leaving) |
22:22:15 | * | ng0 joined #nim |
23:16:39 | * | krux02 quit (Remote host closed the connection) |
23:37:32 | * | navin joined #nim |
23:42:08 | * | navin quit (Ping timeout: 265 seconds) |
23:43:33 | * | laaron joined #nim |