<< 30-12-2018 >>

00:02:25shashlick@federico: looks like nimble directory is broken for subdir packages
00:02:34shashlick@timotheecour: can you give me an easy one to review 😛
00:04:38FromGitter<timotheecour> pick from https://github.com/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3Atimotheecour+sort%3Aupdated-desc+is%3Aopen+repo%3Anim-lang%2Fnim :-)
00:04:52FromGitter<timotheecour> maybe https://github.com/nim-lang/Nim/pull/10091/files ?
00:06:08FromGitter<timotheecour> we shouldn’t let *green* PR’s unattended like that without review…
00:11:48Araqthey are not easy to review just because the CIs are green
00:12:18Araqbesides, any PR that adds a new TODO starts in the state "meh"
00:12:27*ghost64 quit (Read error: Connection reset by peer)
00:13:28Araqalways feels like "if you didn't want to implement it, why would I want to review it"
00:17:08*Notkea quit (Read error: Connection reset by peer)
00:17:30*Notkea joined #nim
00:18:20*ghost64 joined #nim
00:33:22FromGitter<timotheecour> I don’t understand that point; I added a `# TODO: consider advancing `currentPos` to end of line to avoid` in https://github.com/nim-lang/Nim/pull/10091/files#diff-977ead791db7457f2732dcd58a876c5bR283 to a piece of code that already existed before that PR
00:35:57FromGitter<timotheecour> the TODO can be addressed in future PR’s, all i did there was document the fact that pre-existing code should be changed; IMO a sufficient condition for a PR to be accepted is if it doesn’t make anything worse and makes some things better.
00:36:19Araqyeah, the next time don't write TODO.
00:36:51AraqI don't enjoy looking at code that screams at me
00:37:09FromGitter<timotheecour> what do u suggest instead? I like to be honest about shortcomings in code i see; an alternative is to add a new github issue
00:37:37Araqesp if it screams at me some irrelevant stuff that I'll do when I'm dead
00:37:53Araqinstead: Write the comment without that TODO in allcaps
00:38:29FromGitter<timotheecour> so, just 'consider advancing …’ ? or ‘todo: consider advancing …' ?
00:39:12Araqpreferably without the 'todo:' but as long as it doesn't scream it's ok ;-)
00:39:24FromGitter<timotheecour> Ok, will use that in future PR's
00:39:41Araqso ... any idea why _pthread_mutex_firstfit_unlock_slow is in that profile?
00:39:53Araqthe compiler doesn't use threading/mutexes
00:40:03FromGitter<timotheecour> (i prefer `todo` since it’s searchable, but won’t put in all CAPS in future)
00:40:12Araqis that because of mmap()'s locks?
00:41:02FromGitter<timotheecour> r u referring to https://github.com/nim-lang/Nim/pull/10124 ?
00:41:05Araqgrep for XXX in compiler/. I get 229 matches.
00:41:30Araq--> I never search for these in order to fix them.
00:41:48Araqinstead I fix github bugs...
00:42:20Araqstill it can be useful when reading the code during a debug session.
00:42:28Araqyeah, #10124
00:42:51FromGitter<timotheecour> (and i can use XXX instead of todo if u prefer XXX)
00:43:56FromGitter<timotheecour> for `_pthread_mutex_firstfit_unlock_slow` ; I’d need to use something different from `callgrind_annotate` to get a call graph instead of flat profile to see where it comes from
00:46:14Araqinteresting that genericReset still is an issue
00:46:16FromGitter<timotheecour> but ya, the takeaway is that according to valgrind, `genericReset`/`genericResetAux` is the bottleneck by far
00:46:38Araqthat's not particularly hard to fix
00:47:16*vlad1777d quit (Ping timeout: 246 seconds)
00:47:36FromGitter<timotheecour> was wondering whether we can cheat and skip init to see whether it’d speed up, to corroborate whether valgrind tells truth about it being bottleneck
00:50:25Araqsempass2.addTag is also expensive
00:53:08FromGitter<timotheecour> still need a grain of salt when interpreting results as to how well IR maps to wall time/user time in practice (but I suspect it does more so than `nim —profiler:on`
00:53:10FromGitter<timotheecour> )
01:04:59Araqdepends on the question. --profiler:on is the best concept because it gives you a reason. what's the context of these genericReset() calls
01:10:19*thomasross_ joined #nim
01:10:20*thomasross is now known as Guest3415
01:10:20*Guest3415 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
01:10:20*thomasross_ is now known as thomasross
01:11:21FromGitter<timotheecour> I’ve commented on this aspect in https://github.com/nim-lang/Nim/issues/10121#issue-394748797 ; indeed it depends on the question and both callgraph and stacktrace are useful (if callgraph isn’t enough), but that’s assuming sampling strategy used in `—profiler:on`is accurate, which we could check by comparing against valgrind + other profiler (especially sampling based on INTERRUPT instead of based on for
01:11:21FromGitter... loop as done in nimprof0
01:11:23*thomasross quit (Max SendQ exceeded)
01:11:55*thomasross joined #nim
01:13:12*thomasross quit (Max SendQ exceeded)
01:13:41*thomasross joined #nim
01:15:22Araqsampling is the only thing that works for profiling. profiling is not benchmarking.
01:16:11Araqyou can benchmark different solutions after the profiling step, the profiling is to give you the dominating stack trace(s)
01:16:31FromGitter<timotheecour> but sampling via interrupt (as done in gprof IIRC and OSX shark profiler) is different from sampling every X loop (as done in nimprof IIUC)
01:17:20FromGitter<timotheecour> the latter can introduce bias, and skew results
01:17:39Araqtrue
01:27:57FromGitter<timotheecour> thx for the merges
01:30:14shashlickhave there been any changes in typetraits?
01:31:22Araqyeah
01:31:26shashlickhttps://github.com/c-blake/cligen/issues/84
01:33:22Araqtimotheecour will fix it
01:35:58shashlickso cligen doesn't need to change?
01:40:55Araqnah
01:41:59Araqfor the protocol: I said $ for typedesc is terrible.
01:59:45*Ven`` quit (Read error: Connection reset by peer)
02:05:16*thomasross quit (Killed (orwell.freenode.net (Nickname regained by services)))
02:05:22*thomasross joined #nim
02:06:32*thomasross quit (Max SendQ exceeded)
02:08:24*thomasross joined #nim
02:53:44*Tyresc quit (Quit: WeeChat 2.4-dev)
03:00:35*banc quit (Quit: Bye)
03:13:39FromGitter<timotheecour> @araq should i do a PR to revert it until a better fix is available so it doesn’t block other ppl in meantime? I tried a few things (eg "export system.`$`”) but they fail with `Error: unknown trait`
03:16:20*banc joined #nim
03:20:49*zachk quit (Quit: Leaving)
03:27:39FromGitter<timotheecour> nevermind, seems to work, see https://github.com/nim-lang/Nim/pull/10131 (added a test case and verified that `nimble build` works in nimterop)
04:26:00*Cthalupa quit (Ping timeout: 250 seconds)
04:27:07*Cthalupa joined #nim
05:08:15*kapil____ joined #nim
06:07:46shashlickgosh can someone create a command line nim help viewer already
06:11:31*nsf joined #nim
06:50:26*dddddd quit (Remote host closed the connection)
06:57:05*narimiran joined #nim
06:57:40FromGitter<Varriount> Araq: How complete are the implementations for the sink, etc. mechanics?
07:09:12FromDiscord_<exelotl> It's so darn good having there be no such thing as nil for strings and seqs
07:18:27leorizeshashlick: nim --fullhelp | less ?
07:26:22*vlad1777d joined #nim
08:39:01AraqVarriount: 85% done, biggest problem is that --gc:destructors doesn't work yet. builtin strings and seqs are hard
08:40:06FromGitter<timotheecour> @araq https://github.com/nim-lang/Nim/pull/10131
08:40:23FromGitter<timotheecour> (fixes regression)
08:40:30FromGitter<timotheecour> thx
08:41:21Araqgood to see it was just a scoping issue
08:41:38FromGitter<timotheecour> ya...
08:51:44FromGitter<timotheecour> also https://github.com/nim-lang/Nim/pull/10119 (it was passing before i just made change to s/TODO/todo/) ; i’m trying to compare nim profiling results using 3 methods: ⏎ nimprof ⏎ Callgrind ⏎ OSX instruments (which uses sampling, unlike call grind; and unlike nimprof, the sample is interrupt based, so potentially more precise) [https://gitter.im/nim-lang/Nim?at=5c2887208dafa715c714ec00]
08:52:46FromGitter<timotheecour> so far OSX instruments agrees with callgrind
09:00:37FromGitter<timotheecour> > *<Araq>* so ... any idea why *pthread*mutex_firstfit_unlock_slow is in that profile? ⏎ ⏎ see https://github.com/nim-lang/Nim/issues/10132#issue-394857127 ; the call graph visualization shows where it comes from
09:02:01*stefanos82 joined #nim
09:02:10Araqthat's not a call graph
09:02:31AraqgenericReset never calls any Marker_tyRef_* variant
09:02:49Araqand markers never call IO
09:24:05narimiranAraq: github now has the feature to move issues to another repo — should we use that to move RFCs to a separate repo? (we tried it before manually, when there wasn't a built-in way to do it)
09:25:30Araqthe RFC model as we have it today doesn't work well but we should move to a PEP-like process IMHO.
09:26:01Araqso ... don't write the RFC in github's editor, submit a markdown/RST document
09:26:47narimiran..and have some kind of a template for it? (RFC has to have several sections, etc.)
09:27:11Araqotherwise we have the situation as today "Ok, I updated the issues, please read it again..."
09:27:19narimiranwhat about the existing RFCs?
09:28:20AraqI'm not a fan of document templates but it seems to work for Python
09:34:10Araqcan we migrate the existing RFCs to markdown documents?
09:36:08FromGitter<zacharycarter> https://github.com/mattduck/gh2md
09:36:13FromGitter<zacharycarter> might be handy for ^ ?
09:55:07*hoijui joined #nim
10:08:33FromGitter<timotheecour> > that's not a call graph ⏎ ⏎ well I think it’s a call graph, but there’s indeed something add about `genericReset` never calls any `MarkertyRef*` ; it seems mostly correct apart from oddity like this, and still is useful; could be a valgrind bug which i’ll try to report; added more details + text-version of call graph here: https://github.com/nim-lang/Nim/issues/10132#issue-394857127
10:16:36FromGitter<timotheecour> @araq ok so nimprof doesn’t reveal actual important bottlenecks such as zeroMem which confirms my suspicion that it’s biased since it only looks at nim loops and doesn’t use interrupts, so totally misses memset + friends => see https://github.com/nim-lang/Nim/issues/10132#issuecomment-450550921
10:19:27Araqnimprof is awesome
10:19:56Araq initIntSet causes the genericReset
10:20:28Araqand matches calls initIntSet, probably could reuse the int set
10:22:39Araqwe need a test for nimprof though to keep it from bit rotting
10:25:16FromGitter<timotheecour> but nimprof could sample differently, right? say another process that queries for a stacktrace every x millisecs
10:25:23*vlad1777d quit (Ping timeout: 268 seconds)
10:25:55*hoijui quit (Ping timeout: 268 seconds)
10:27:04*kapil____ quit (Quit: Connection closed for inactivity)
10:31:49Araqsure but it screams "unreliable" to me
10:33:51Araqsignal handlers and the eternal question of signal handler safety
10:34:52FromGitter<timotheecour> well that’s how sampling profilers work IIUC; in any case it’s not same as “recovering from segfault inside a signal handler”, the state is well defined
10:36:28Araqthings you can do in a signal handler: set a global flag that you probe outside of the signal handler. nothing else.
10:36:49Araqyou can then inject code to poll this flag everywhere.
10:36:58Araqwhich is what nimprof already does
10:37:10Araq--> causes the same biases
10:37:19*hoijui joined #nim
10:37:33Araqwell ok, not really because then it's timing based
10:39:09FromGitter<timotheecour> Well ya, and it avoids the issue with `memset` being invisible to nimprof
10:39:27*kinkinkijkin joined #nim
10:39:37FromGitter<timotheecour> (which turns out to be a major bottleneck , as I’ve proved)
10:43:02Araqyeah but I can't optimize memset
10:43:43Araqso that's a mostly meaningless result, unless you can tell me where the memsets come from
10:44:40Araqthere, I optimized initIntSet, compilation times down by 0.5s
10:48:19FromGitter<timotheecour> i know, memset is already optimized as good as it can (eg AVX etc), but a faithful profiler should reveal this bottleneck and reflect it in parent’s total time; I don’t think nimprof does or can with current strategy
10:49:20*kinkinkijkin quit (Remote host closed the connection)
10:50:20*kinkinkijkin joined #nim
10:50:21FromGitter<timotheecour> > unless you can tell me where the memsets come from ⏎ ⏎ I can from reading the call graphs (modulo that bug) or from reading OSX’s sampling profile; number 1 source of memset is from genericReset
10:51:04Araqand once the genericReset is optimized it will be just the memset() call left
10:53:48FromGitter<dom96> Narimiran: Araq: migrating all of the existing RFCs
10:53:49FromGitter<timotheecour> > there, I optimized initIntSet, compilation times down by 0.5s ⏎ ⏎ if that’s true, that’s great (would amount ot 10%); not sure how you measured though
10:53:54*kinkinkijkin quit (Remote host closed the connection)
10:54:05FromGitter<dom96> Into a formal format will be very painful
10:54:32FromGitter<timotheecour> ugh, D’s DIPS are a disaster of bureaucracy
10:54:34narimiran@dom96 for us or for people who want to write them? ;)
10:55:34*kinkinkijkin joined #nim
10:55:38FromGitter<alehander42> yeah, I am also not sure about the RFC-s: some of the existing ones are simple and the fact one can post them, get a "yes this makes sense" and merge code for them in 1-2 days is very nice
10:55:42FromGitter<timotheecour> please let’s not reproduce that model; however, I do agree that maintaining a structured doc (in markdown, please) instead of github can help (maybe in a git repo, where others can send PRs against an RFC)
10:55:49narimiran@dom96 what is your opinion about current RFCs? should they be transferred to a new repo?
10:56:03narimiran(question for others too)
10:56:52FromGitter<timotheecour> i think some complex RFC’s warrant structured (maybe version controlled) doc, but many don't
10:57:18FromGitter<alehander42> I agree with @timotheecour
11:02:23Araqtimotheecour: it is in devel, try for yourself
11:02:26Araqhowever
11:02:48Araqmy measurement was done on this laptop which is running out of battery and disk space
11:03:09Araqand has widely different results from run to run
11:03:45FromGitter<timotheecour> well ya, i was trying it from devel, but couldn’t repro that 0.5 sec speedup yet
11:04:11FromGitter<timotheecour> unrelated note; (maybe??) nim build broke in past 1 hour ish: see https://github.com/nim-lang/Nim/issues/10133
11:04:48Araqeverything I merged was green
11:04:59Araqbut probably PRs interact with each other
11:05:16FromGitter<timotheecour> `nim c -r testament/tester.nim r tests/enum/tenumfieldpragma.nim` to repro
11:05:51FromGitter<alehander42> @Araq about the mutation not invalidating a.len, I am not sure I get it: it should not invalidate it, but it should change the "static length set" ⏎ ⏎ if a.len >= 2: ⏎ a.delete(1, 1) ⏎ echo a[1] # this might be an error [https://gitter.im/nim-lang/Nim?at=5c28a68f8dafa715c715a3b9]
11:06:29*kapil____ joined #nim
11:06:46*kinkinkijkin quit (Quit: Leaving)
11:09:29*kinkinkijkin joined #nim
11:10:17FromGitter<alehander42> ```code paste, see link```
11:10:47FromGitter<alehander42> maybe just signifying this in signatured can deal with all of the mutation "changes" tho
11:10:55FromGitter<alehander42> (mutation of length, not an element)
11:13:56FromGitter<timotheecour> ok sent out https://github.com/nim-lang/Nim/pull/10134 hope it fixes CI failure
11:21:59*Vladar joined #nim
12:05:10Araqalehander42: how it works / will work:
12:05:28Araqif a.len >= 2 # push onto knowledge stack that 'a.len >= 2'
12:05:57Araqa.delete(1, 1) # pop all entries from stack that contain 'a' because a is passed to a 'var T'
12:06:48Araqmutations in the source code cause mutations in our knowledge base
12:08:11Araqwe don't track that afterwards a.len >= 1, we reject the 'a.len >= 2' proposition instead
12:17:55*leorize quit (Ping timeout: 250 seconds)
12:18:38*OrganicAnywhere joined #nim
12:19:20*leorize joined #nim
12:36:06*xet7 joined #nim
12:53:48*dddddd joined #nim
12:57:28FromGitter<alehander42> so in this case a[0] and a[1] would both be warning/errors as we erased our a.len knowledge at that point?
12:58:51FromGitter<alehander42> maybe that's simpler indeed, I thought capturing this in your hypothetical `{.require ..len .}` would be a more general solution tho, as you wouldn't need to hardcode knowledge of `add`/`delete`/etc
12:59:25Araqyup, both a[0] and a[1] are invalid after a.delete(...)
13:00:18FromGitter<arnetheduck> if you're on linux, `perf record --call-graph` will capture call graphs and show origin of call.. with `perf top` you can even follow your program live and see where the hotspots are..
13:00:25*OrganicAnywhere quit (Ping timeout: 252 seconds)
13:01:04Araqbut I'm beginning to understand how Spark works and NimZ3 will eventually exist
13:01:20*vlad1777d joined #nim
13:02:05FromGitter<arnetheduck> apache spark?
13:02:21AraqAda Spark.
13:04:11Araqhttps://github.com/Z3Prover/z3
13:09:58AraqZ3 supports both "unbounded integer" arithmetic as well as "bit vectors"
13:11:15Araqbut the primary reason you cannot prove the absense of overflows is that programmers are not aware of overflows and almost all code out there simply can overflow. You cannot prove it correct because it isn't.
13:13:51*nsf quit (Quit: WeeChat 2.3)
13:14:46FromGitter<arnetheduck> yeah, that's true. but what I'm after is more subtle - a bound or expression that tells me up to which point it's correct. *when* the grains of sand become a heap.
13:17:24FromGitter<arnetheduck> it's specially true for general applications and random mindlessly written code, but we have the advantage that the state transition in particular is isolated - one can afford to be rigorous there..
13:18:16FromGitter<alehander42> So, if you have 2 int args and int result and function f you want to know for which ranges of args the result is valid ?
13:18:32FromGitter<alehander42> Sorry, I don't know the prehistory of your problem
13:25:56FromGitter<arnetheduck> yeah, something like that.. I have `uint64` coming in, a bunch of expressions (`a*3 < b*2`) - what's the safe bound on the incoming value of `a` in that case? `high(uint64)/3` - and so it goes on.. for every expression, you can build up better bounds so in the end, you can tell that your code is overflow-free up to X
13:39:23FromGitter<bluenote10> Hi! Any spontaneous ideas what could cause an internal error in `filename: "semexprs.nim", line: 406, column: 19` (latest devel)? I was trying to migrate godot-nim to 0.19, but I'm now stuck with this compiler crash and it is hard to find what is causing it (or come up with a minimal example) because the auto-generated godot bindings are huge.
13:39:39FromGitter<bluenote10> The full traceback is here: https://github.com/pragmagic/godot-nim/pull/42#issuecomment-450560842
13:40:14*xet7 quit (Ping timeout: 250 seconds)
13:47:02*xet7 joined #nim
13:48:54*stef joined #nim
13:50:07stefHi. Is it possible to run the tests without kock (without recompiling the tester exe)?
13:54:33*OrganicAnywhere joined #nim
13:55:54leorizestef: run the tester directly
13:56:06leorizeit's testament/tester
13:56:25stefI tried, but I can't figure out the syntax
13:56:56stefAlso I wonder why the documentation suggests to run using koch
13:57:30leorizetestament/tester all <-- runs all tests
13:57:53leorizebecause koch will recompile testament and nim compiler automatically
13:58:11stefohh... I first cd-ed into testament and then run ./tester, that's why it failed. Thanks!
14:12:53stefhmm... so all the koch commands basically are: <build the compiler> + <do something else>?
14:13:40leorizemost of the time, yes
14:13:46leorizeyou can read koch source itself
14:13:52leorizeit's pretty clear and easy to understand
14:15:25stefGreat, I will. Btw what's the first place to look to start understanding the codebase? (if that's an easy question...)
14:16:44leorizehttps://nim-lang.github.io/Nim/intern.html
14:16:51leorize^ that should do good
14:19:37*Ven`` joined #nim
14:21:02stefleorize: Of course i will read the documentation (manual, intern etc). Was just wondering about specific files, but I guess I'll figure it out.
14:22:19dom96bluenote10: have you tried compiling with --verbosity:4? It might show you where in your code that error shows up
14:27:28*xet7 quit (Ping timeout: 250 seconds)
14:29:54FromGitter<bluenote10> @dom96 cool thanks, I think I just found the issue... Will probably open an issue to discuss it
14:35:59FromGitter<bluenote10> I'm not sure if this is a known issue or if it is actually supposed to work: https://github.com/nim-lang/Nim/issues/10136
14:36:32dom96Not sure either, but definitely an issue nonetheless
14:38:52*OrganicAnywhere quit (Ping timeout: 252 seconds)
14:43:08*xet7 joined #nim
15:02:09*stef quit (Quit: WeeChat 2.3)
15:05:33FromGitter<zacharycarter> I think no matter where the RFCs exist - there's going to be some sort of live-revision process happening
15:05:51FromGitter<zacharycarter> I'm not sure what the conversion to markdown and getting them off of github does
15:06:18FromGitter<zacharycarter> besides preserving them if github were to disappear
15:09:07FromGitter<alehander42> @arnetheduck well you need to generate some range of var-ranges, e.g. ⏎ [a in [X, Y] b in [X1, Y1]] ⏎ [a in [X2, Y2] b in [X3, Y3]] ⏎ or directly ⏎ [a in [X, Y] b in f(a boundaries)] [https://gitter.im/nim-lang/Nim?at=5c28df9293cce97d3bbe9a31]
15:09:39FromGitter<alehander42> or just a very conservative [a in [X, Y] for all kinds of b, b in [X1, Y1] for all kinds of a]
15:24:19*nsf joined #nim
15:27:13*kinkinkijkin quit (Remote host closed the connection)
15:32:26FromGitter<zacharycarter> https://github.com/SanderMertens/bake
15:34:51FromGitter<zacharycarter> another build system to not use for C/C++ \o/
15:35:17*kapil____ quit (Quit: Connection closed for inactivity)
15:36:22FromGitter<zacharycarter> does anyone have any experience with - https://mesonbuild.com/ and Nim?
15:37:00FromGitter<zacharycarter> I have C++ dependencies for my project, and it's a pain to instruct people how to compile them for their platform
15:37:18FromGitter<zacharycarter> wondering if it might be worth it to find a build system that can handle C++ and Nim as well
15:37:50FromGitter<zacharycarter> I guess I could just use genie (premake) since the C++ projects are already using it
15:38:14FromGitter<zacharycarter> and just have genie invoke the Nim compiler
15:38:31FromGitter<zacharycarter> I don't know... I don't have a good answer for this
15:39:50FromGitter<zacharycarter> I guess I'll just let people worry about building them
15:39:58FromGitter<zacharycarter> on their own I mean
15:44:38*Tyresc joined #nim
15:45:22*natrys joined #nim
15:50:56FromGitter<deech> What are the case object and comment field features? https://forum.nim-lang.org/t/4500
15:50:57*kinkinkijkin joined #nim
15:55:20leorizecomment field is basically exposing doc comments to the AST afaict
15:56:25leorizecase objects are just object variants I believe?
15:56:54*kinkinkijkin quit (Remote host closed the connection)
15:57:23*kinkinkijkin joined #nim
15:57:23FromGitter<Clyybber> They are equivalent to unions in C afaik
16:02:05*thumbs_scum quit (Ping timeout: 268 seconds)
16:03:32FromGitter<alehander42> not really, they're more similar to algebraic types(but still not the same)
16:04:09FromGitter<alehander42> the shared subparts of the case objects are represented with unions in the c backend
16:07:36*natrys quit (Quit: natrys)
16:09:20Araqbluenote: both 0.19 and devel affected?
16:10:04*thumbs_scum joined #nim
16:12:04Araqthe bullet point about 'case objects' is about fixing their memory safety holes
16:12:49AraqI recently found an alternative solution to this problem by studying Modula 2 more carefully. :P
16:16:02FromGitter<bluenote10> Araq: I didn't verify, but I assume 0.19 as well. The change linked in the issue is from August and 0.19 was released in September, right?
16:18:04Araq internalAssert c.config, lhsType.base.kind != tyNone
16:18:04Araq if c.inGenericContext > 0 and lhsType.base.containsGenericType:
16:18:04Araq # BUGFIX: don't evaluate this too early: ``T is void``
16:18:04Araq return
16:18:29Araq^ seems we can move this check into the 'if' and let later phases sort it out
16:23:13FromGitter<bluenote10> yes, the linked PR also had a discussion about that, mentioning that the path wasn't triggered so far. So we could use that as test case
16:23:35FromGitter<bluenote10> isn't a showstopper for the godot bindings anyway, there was a simple work-around ;)
16:26:18*krux02 joined #nim
16:28:16*Trustable joined #nim
16:29:51Araqalright
16:29:58Araqanything else blocking godot?
16:30:20krux02hello
16:30:36FromGitter<zacharycarter> o/
16:31:59*nc-x joined #nim
16:32:27Araqhi
16:32:43nc-xAraq: can you please merge https://github.com/nim-lang/Nim/pull/10135, it makes devel green
16:35:04FromGitter<bluenote10> Araq: No, I only hit this issue as well, but also with a straightforward workaround: https://github.com/nim-lang/Nim/issues/7375
16:36:09FromGitter<bluenote10> Everything compiles now on latest devel and I get a shared lib... I only haven't figured out how to properly load it in Godot, but that's most likely because I'm using it for the first time ;)
16:36:49*nc-x quit (Client Quit)
16:37:36*btbytes joined #nim
16:43:09*kinkinkijkin quit (Quit: Leaving)
16:45:22shashlickleorize: regarding Nim help, I was referring to the manual and proc documentation
16:45:36shashlickHaving twenty tabs open in the browser is a nuisance
16:55:03leorizeshashlick: links to the rescue :P
16:55:05leorizeor w3m
16:55:30FromGitter<alehander42> i used to have like 40-50 tabs all the time
16:55:35shashlickI know someone mentioned a command line client to read the docs
16:55:36FromGitter<alehander42> and these days i have up to 9-10 max
16:55:47FromGitter<alehander42> i guess i learned to manually GC them all the time
16:56:07FromGitter<alehander42> with periodical full dealloc :D
16:56:59shashlickWas hoping to use Nimscript as an extention language but cannot interact with the running process at all
16:57:51shashlickEither have to extend nimscript or build in compiler
16:59:16FromGitter<bluenote10> current number of open tabs: 537 will close some next year ;)
17:04:12krux024 to 5 tabs here
17:04:17krux02that is healthy
17:04:33krux02you know you can close tabs and open the same website later again?
17:05:26FromGitter<alehander42> yeah, I agree that history/bookmarks are underrated
17:05:54krux02just history
17:06:05FromGitter<alehander42> but on the other hand I often have 300-400 tabs in sublime, so I can see the problem
17:06:12krux02you can visit everything that was open once
17:06:22krux02and you can search in it
17:06:35shashlickTabs are not scalable
17:06:37krux02no need to keep anything open for "later"
17:06:39FromGitter<alehander42> history doesn't have priority: i might have visited X 500 times, but not remembering the exact article title
17:06:47FromGitter<alehander42> bookmarks give you a bit of priority
17:06:53krux02tabs don't have priority either
17:07:02FromGitter<alehander42> i am arguing for history/bookmarks too
17:07:34krux02history has priority. Anything recent has priority, anything far away in the past is far away in the past.
17:07:46shashlickI'm not implementing tabs in the editor I'm writing
17:07:51FromGitter<alehander42> meh, can't agree, bookmarking is useful
17:08:03FromGitter<bluenote10> I also go down to like 5 from time to time, but I have to say it still works surprisingly well for me... would have guessed it's like 50 tabs or so ;)
17:08:14FromGitter<alehander42> for stuff like sublime: I'd implement tab "collection": after a while if a tab hasn't been used AND it's saved, close it
17:08:29FromGitter<alehander42> and make that configurable
17:13:37shashlickAnyway, nothing like running a command in the terminal and getting the exact proc as a result
17:13:49shashlickIn the terminal most of the time
17:14:55*btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:15:49shashlickOr integrate the search into the editor eventually
17:17:14*Ven`` quit (Read error: Connection reset by peer)
17:17:30*Ven`` joined #nim
17:19:24*btbytes joined #nim
17:28:01FromGitter<arnetheduck> @alehander42 indeed - and it looks like a very systematic problem that I'm pretty sure people have looked into already :)
17:30:03*kinkinkijkin joined #nim
17:34:10Araqshashlick, I can guide you how to make stdin.readline work from Nimscript but I hesitate to add it to the compiler
17:49:10*jjido quit (Quit: Connection closed for inactivity)
17:49:59*kinkinkijkin quit (Quit: Leaving)
18:00:01*Vladar quit (Remote host closed the connection)
18:11:03*nc-x joined #nim
18:12:41nc-xI think someone should review/merge the PR's/Guest posts for the website
18:12:44nc-xhttps://github.com/nim-lang/website/pulls
18:12:59nc-xSome of the PR's are unreviewed
18:13:26*btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:14:41FromGitter<deansher> Seems like maybe it's a law of Nim linguistics that one cannot stash a type and use it in a declaration later. For example, here's one of many permutations I've tried. Can anyone tell me either that it *is* a law (and ideally why!) or how to do it? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c290b10f6166a3027934165]
18:17:03*Pisuke joined #nim
18:17:08*MyMind quit (Ping timeout: 250 seconds)
18:17:37*nc-x quit (Ping timeout: 256 seconds)
18:22:23Araqvar mytypes {.compileTime.}: seq[NimNode]
18:22:56Araqmacro insert(t: typed) = mytypes.add t
18:23:27Araqthough I don't see why you would do that. types work better when they describe the invariants in your program
18:29:23FromGitter<deansher> :-) Thanks!
18:32:33FromGitter<deansher> @Araq Agreed, but I'm working around a different issue. Simplified from last night to highlight that issue: ⏎ ⏎ I am working on a macro package that will allow a user to declare a "field" in module A and then use it from module B. A field has an identifier, a fully qualified name, and a type. The fully qualified name is constructed from the module name and the identifier. (This is inspired by Clojure's namespaced
18:32:33FromGitter... maps.) I am trying to figure out what underlying Nim thing I can export from module A and reference in module B to represent the field. ⏎ ⏎ The field declaration macro could separately define a type and a const tuple in module A, but then that's not a single thing that the programmer can think of as the field for imp ... [https://gitter.im/nim-lang/Nim?at=5c290f418dafa715c7182937]
18:32:38shashlickAraq: I can certainly make a custom build of nim with the capabilities I need in nimscript but I think its important to consider making this standard so that more folks can use nim as a script engine
18:33:21shashlickI understand your reservations but there's a difference between Nim as a compiler and Nim as a script engine
18:33:52shashlickand even otherwise, having an expanded feature set in the VM makes macros and compile time that much more powerful
18:34:16shashlickin fact, likewise with FFI support in the VM
18:34:41shashlickbut I want to understand your concerns before grumbling any further
18:53:58Araqshashlick, my motivation is easy to understand: I don't want a compiler that suddenly stops and asks me stuff on stdin
18:54:36Araqjust because somebody put let installDir = prompt("installation dir?") in a 'static' section
18:56:51shashlickbut that blocks legitimate use cases in nimscript where I could use pipes
18:57:15shashlickand let's just say that if someone did something like that, you wouldn't use the package 😉
18:57:57Araqhow would I know?
19:00:13shashlickyou'd use it once and then throw it out I guess
19:02:12Araqplease tell me instead what you wanna "pipe" into your nimscript
19:03:02shashlickso like I said before, I want to use nim as a script engine without building it all in
19:03:25shashlickso the idea was to kick off a nim e script.nims and then talk back and forth with stdin/stdout
19:04:16shashlickthis way, you could write plugins in any language and just use this simple interface
19:05:00shashlickbut that's my use case, you could just as well imagine writing simple nim scripts that as part of a bunch of pipe commands
19:05:09shashlickls | nim e process.nims
19:35:01*Vladar joined #nim
19:36:19FromGitter<Varriount> Araq: How did you come across that paper on Garbage Collection?
19:58:05*ChristianWitts joined #nim
20:00:30Araqshashlick, hmm I think this should be done with a nimscript.exe
20:01:15AraqVarriount: Google search on "reference counting with cycle detection" or similar
20:01:26Araqand going through all the papers it brought up :P
20:02:09*vivus joined #nim
20:11:28shashlickthat would mean yet another binary with the full compiler in it
20:16:37*endragor joined #nim
20:21:48*ChristianWitts quit (Ping timeout: 272 seconds)
20:23:34*endragor quit (Ping timeout: 268 seconds)
20:24:09*endragor joined #nim
20:28:23FromGitter<timotheecour> @araq 2 questions: ⏎ ⏎ 1) not sure what you’re suggesting in this review comment: https://github.com/nim-lang/Nim/pull/10070#discussion_r244528070 ⏎ 2) see https://github.com/nim-lang/Nim/pull/10070#discussion_r244544490 [https://gitter.im/nim-lang/Nim?at=5c292a66ab910e7d3af89345]
20:32:20*endragor quit (Ping timeout: 250 seconds)
20:32:42*endragor joined #nim
20:38:28*nsf quit (Quit: WeeChat 2.3)
20:50:20*Ven`` quit (Ping timeout: 244 seconds)
20:52:28*krux02 quit (Remote host closed the connection)
20:53:22*krux02 joined #nim
21:09:02*shashlick quit (Remote host closed the connection)
21:29:07*Ven`` joined #nim
21:43:11*btbytes joined #nim
21:49:44*Vladar quit (Remote host closed the connection)
22:00:19*Trustable quit (Remote host closed the connection)
22:01:51*krux02 quit (Remote host closed the connection)
22:02:28*narimiran quit (Ping timeout: 250 seconds)
22:11:02FromGitter<zetashift> Oh wow karax v1 was released? I didn't even know
22:12:59*endragor quit (Remote host closed the connection)
22:16:49*Sembei joined #nim
22:17:08*Pisuke quit (Ping timeout: 244 seconds)
22:41:25dom96Wow, really? A v1 with not even a forum thread?
22:59:29*nsf joined #nim
23:14:50*hoijui quit (Ping timeout: 250 seconds)
23:23:49*flyx quit (Quit: ZNC - http://znc.in)
23:24:04*flyx joined #nim
23:32:49*nsf quit (Quit: WeeChat 2.3)
23:41:30*stefanos82 quit (Remote host closed the connection)
23:47:19*btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:54:24*whaletechno joined #nim