<< 10-01-2018 >>

00:02:43*sz0_ quit (Quit: Connection closed for inactivity)
00:22:46*yglukhov joined #nim
00:26:57*yglukhov quit (Ping timeout: 240 seconds)
00:34:53*pigmej quit (Ping timeout: 276 seconds)
00:35:00*pigmej joined #nim
00:41:13*zahary quit (Quit: Leaving.)
00:45:46*MJCaley joined #nim
00:50:44*kafke quit ()
00:54:23*xet7 quit (Quit: Leaving)
01:01:35*wurui joined #nim
01:14:30*vlad1777d joined #nim
01:16:26*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:16:49*gokr left #nim (#nim)
01:20:45*regtools quit (Ping timeout: 264 seconds)
01:35:08FromGitter<RedBeard0531> dom96: you around? got a question about the async macro try impl
01:59:17*MJCaley quit (Quit: MJCaley)
02:03:51*S1t1Schu joined #nim
02:07:33*S1tiSchu quit (Ping timeout: 264 seconds)
02:19:43*chemist69 quit (Ping timeout: 255 seconds)
02:22:23*marenz__ quit (Ping timeout: 248 seconds)
02:33:25*chemist69 joined #nim
02:37:15*sz0_ joined #nim
02:37:20*sz0_ quit (Client Quit)
02:38:19*sz0_ joined #nim
02:38:37*sz0_ quit (Client Quit)
02:41:35*MJCaley joined #nim
02:42:05*lotzz joined #nim
02:46:34*lotzz quit (Ping timeout: 260 seconds)
02:52:03*MJCaley quit (Quit: MJCaley)
02:59:41*wurui quit (Remote host closed the connection)
03:04:10*emgonam2 joined #nim
03:04:26emgonam2morning all
03:05:27*vlad1777d quit (Ping timeout: 240 seconds)
03:22:27*endragor joined #nim
03:26:55*endragor quit (Ping timeout: 248 seconds)
03:39:07*vivus quit (Quit: Leaving)
03:41:09*__pycache__ quit (Quit: bye-nyan!)
03:41:28*m712 joined #nim
03:54:33*sz0_ joined #nim
04:19:41*endragor joined #nim
05:24:52FromGitter<DavidMeagher1> hello
05:25:42FromGitter<DavidMeagher1> I was wondering if anyone could help me with some curiosities I have about the static keyword and its implementation
06:38:14*nsf joined #nim
07:03:49FromGitter<Varriount> @DavidMeagher1 What's your question?
07:29:35*emgonam2 quit (Ping timeout: 276 seconds)
07:38:18*emgonam2 joined #nim
07:42:47*miran joined #nim
07:43:57*gokr joined #nim
07:46:52*PMunch joined #nim
07:51:39*oprypin quit (Remote host closed the connection)
07:56:31*xet7 joined #nim
07:57:04*vlad1777d joined #nim
08:00:00*xet7 quit (Client Quit)
08:03:38*xet7 joined #nim
08:20:49*cspar joined #nim
08:23:10*PMunch quit (Quit: Leaving)
08:24:56*PMunch joined #nim
08:25:15*yglukhov joined #nim
08:25:20*yglukhov quit (Read error: Connection reset by peer)
08:25:36*yglukhov joined #nim
08:39:06*claudiuinberlin joined #nim
08:40:36*floppydh joined #nim
08:47:50*zahary joined #nim
08:51:37*yglukhov quit (Ping timeout: 252 seconds)
09:04:35*gmpreussner quit (Ping timeout: 240 seconds)
09:05:36*yglukhov joined #nim
09:05:38*gmpreussner joined #nim
09:14:52*livcd quit (Remote host closed the connection)
09:18:35*livcd joined #nim
09:22:55*wurui joined #nim
09:29:01*wurui quit (Quit: http://quassel-irc.org - ???????)
09:29:25*wurui joined #nim
09:29:40*wurui quit (Remote host closed the connection)
09:30:07*wurui joined #nim
09:38:00*dddddd joined #nim
09:43:29*zahary quit (Quit: Leaving.)
09:45:10*zahary joined #nim
09:50:27*BitPuffin joined #nim
10:13:43*BitPuffin quit (Remote host closed the connection)
10:14:43*BitPuffin joined #nim
10:15:09*hogeland quit (Ping timeout: 268 seconds)
10:16:39*floppydh quit (Remote host closed the connection)
10:17:27*floppydh joined #nim
10:17:27*wurui quit (Remote host closed the connection)
10:32:43*Yardanico joined #nim
10:33:57*emgonam2 quit (Ping timeout: 240 seconds)
10:44:45*vlad1777d quit (Ping timeout: 264 seconds)
10:45:27*vlad1777d joined #nim
10:57:25dom96RedBeard0531: just ask...
11:02:46*vlad1777d quit (Ping timeout: 276 seconds)
11:06:46*marenz__ joined #nim
11:21:50*SunDwarf quit (Ping timeout: 260 seconds)
11:35:01*regtools joined #nim
11:36:38*Vladar joined #nim
11:55:36*emgonam2 joined #nim
12:10:54FromGitter<survivorm> iup motivates me to learn lua :) ⏎ Since there are much more examples in lua, than in nim ⏎ btw, iup nim bindings doesn't have gridbox :(
12:23:57*sleepyqt joined #nim
12:26:01PMunchsurvivorm, you could learn Nim by expanding the bindings :)
12:27:25FromGitter<survivorm> I know, and it's pretty simple AFAIK (just copy and replace name) ⏎ If I won't be lazy, i'll do it :)
12:28:09FromGitter<survivorm> But for now, i'll be building my menu :)
12:35:38PMunchYou should of course also check the wxWidgets genui macro: https://github.com/PMunch/wxnim#the-genui-macro *shameless plug*
12:52:26FromGitter<survivorm> Oh! Pretty. Thanks! Currently, i'm going to make interface pluggable to the main code, so i'm going to try several frameworks, wxwidgets included
12:58:19FromGitter<survivorm> how to install it via nimble?
12:58:36FromGitter<survivorm> it's not found 'out of box'
13:02:01PMunchYeah, wxWidgets is a bit weird so I don't think it's nimble-installable atm
13:02:12PMunchOr it was weird
13:02:26PMunchNow you can just install the system wxWidgets package and use it
13:02:31PMunchMaybe it should be a nimble package..
13:02:45*Snircle joined #nim
13:03:44PMunchYou could try to clone it and run nimble install from the repo root
13:03:48PMunchSee what happens :P
13:13:56FromGitter<survivorm> thanx, but why not in global nimble repo? Unstable, or just lazy?
13:15:43*SunDwarf joined #nim
13:15:44FromGitter<survivorm> I scanned through nimble packages while choosing UI framework
13:16:04FromGitter<survivorm> If it's where, it would be much better
13:17:26FromGitter<survivorm> btw, going by examples: ⏎ nim cpp -r controlgallery.nim ⏎ Hint: used config file '/etc/nim.cfg' [Conf] ⏎ nim.cfg(5, 1) Error: '@end' expected [https://gitter.im/nim-lang/Nim?at=5a561266ae53c15903cec682]
13:19:27FromGitter<survivorm> without nim.cfg in the same folder, compiles
13:31:56FromGitter<nc-x> How do you guys work on tools like nimble, nimsuggest etc? You work in the `"nim install directory" / "the folder in which the source code of the tool is"` or you have the github repo cloned elsewhere for development purposes? ⏎ Because everytime I do even a single line of change I get random issues unrelated to the change I made. ⏎ ⏎ For example, Right now I cloned nimble repo, did `nimble build`, renamed the
13:31:56FromGitter... compiled binary to `nimbl`, ⏎ did `nimble path any-random-installed-package` multiple times, and now I get magic - ... [https://gitter.im/nim-lang/Nim?at=5a5615cc290a1f4561706c03]
13:32:21FromGitter<nc-x> Or maybe this is a bug?
13:32:25FromGitter<nc-x> IDK
13:32:37FromGitter<nc-x> Can anybody reproduce this issue?
13:33:38Araqnc-x: I only have nim devel in my PATH
13:33:39FromGitter<survivorm> I use packed version, based on github repo, though
13:33:59FromGitter<survivorm> and don't have such issues
13:34:59FromGitter<nc-x> Araq: Okay
13:38:05FromGitter<codenoid> i love nimble
13:38:06FromGitter<codenoid> <3
13:43:22PMunchsurvivorm, a bit lazy, a bit unstable
13:44:31PMunchsurvivorm, and the @end is a bug. Not sure how we didn't notice that (maybe the parsing changed..)
13:44:43PMunchJust make sure to use the correct flag :)
13:45:01PMunchOh wait, it has @endif
13:45:09PMunchDid they change it to @end?
13:45:27Araqit always was @end
13:45:30*samhain joined #nim
13:45:42Araqnot sure why it wasn't caught much earlier
13:46:40FromGitter<survivorm> @PMunch, understandable... but to give a benefit of choice, you'd better add it. Nim have not much UI (i found only 2, but maybe i've not looked hard enough) prepacked, so another choice is much welcome
13:48:02Araqwe have Qt, wxWidgets, libui, iup, gtk2, gtk3
13:48:26Araqbut UI programming is not done by many people anymore
13:48:31PMunchDon't we also have fltk?
13:48:45PMunchAnd NuGui
13:48:45Araqnot sure fltk has been released yet, but yeah
13:48:51livcdwhat kind of ipc do you guys use when interacting with other programs in Nim ?
13:48:55PMunchErr, NiGui
13:49:30Araqipc? how is that UI related?
13:49:42livcdunrelated to UI
13:50:15Araqvarriount: http://typicalprogrammer.com/what-does-code-readability-mean ;-)
13:50:18PMunchsurvivorm, the original idea was to have the genui stuff in it's own package, but I had to do some changes to wxWidgets to make it work properly. That's the main reason it wasn't added from the start, now it's just laziness :P
13:50:42PMunchlivcd, depends. Are you writing both programs?
13:50:55livcdPMunch: yes
13:51:13Araqthen use sockets
13:52:01PMunchYeah sockets is a good choice
13:52:04livcdok
13:52:23FromGitter<krux02> Araq: I have a problem with getting rid of type aliases in macros
13:52:57Araqyes I know and it annoys me.
13:53:09Araqthere have been test cases added
13:53:16*Vladar quit (Quit: Leaving)
13:53:17Araqto make your specific code work.
13:53:18FromGitter<krux02> ok, cool
13:53:28Araqand now you tell me it's broken again.
13:53:40Araqso at least contribute a real test, this time.
13:53:52FromGitter<survivorm> Oh. Than i think nimble needs at least a 'tags' optional field
13:54:04FromGitter<krux02> that I can do
13:54:14FromGitter<krux02> then how should I write the test then?
13:54:26FromGitter<survivorm> to get at least general categorization
13:55:11FromGitter<survivorm> Because as it's now, it's not very comfortable to use
13:55:38FromGitter<survivorm> The list, i mean
13:56:11PMunchsurvivorm, it does have a tags field
13:56:23FromGitter<survivorm> hm
13:56:34FromGitter<krux02> Araq: I can write a test that pretents that pretents there are functions ``proc isAlias(arg: NimNode): bool`` and ``proc resolveAlias(arg: NimNode)`` and then I can write tests on what they should return
13:56:35FromGitter<survivorm> and does anyone use it?
13:57:15PMunchsurvivorm, well most packages have them: https://github.com/nim-lang/packages/blob/master/packages.json#L6
13:58:00FromGitter<survivorm> and if they do, why's the list on nim-lang.org unoficcial packages PLAIN?
13:58:00*Jesin quit (Quit: Leaving)
13:59:02PMunchsurvivorm, because it's old?
13:59:12PMunchUse something like nimble.directory instead :)
14:00:47FromGitter<survivorm> And that's?
14:00:55Yardanicohttps://nimble.directory
14:00:56Yardanicowebsite
14:01:24FromGitter<survivorm> And no, answer "it's old" is no good for official website
14:02:10FromGitter<survivorm> @Yardanico, @PMunch thanx
14:02:38FromGitter<nc-x> Why does this line https://github.com/nim-lang/nimble/blob/6354132959f3018883d7b93dbd6af8bbddff5b0e/src/nimble.nim#L628 check *only* if the path *startsWith* the package name and not match the complete name?
14:03:35Yardanicobecause packages installed by nimble also have version in folder name?
14:03:48FromGitter<nc-x> So it should split the `-`
14:03:59Yardanicolike drawille-0.1.0
14:04:08PMunchsurvivorm, it's this list you're talking about right? https://nim-lang.org/docs/lib.html
14:04:09Yardaniconc-x: make an issue in nimble repo then :)
14:04:24FromGitter<nc-x> Right now, won't it match wrong package names?
14:04:30FromGitter<survivorm> @PMunch yeah
14:04:37Araqnc-y: I agree, it's sloppy coding and needs to be fixed asap.
14:04:51PMunchnc-x yeah a package named gtk could also match gtk3 for example
14:05:03FromGitter<nc-x> That may be the issue I am experiencing right now, but i don't understand why it didn't happen in earlier nimble version I have installed.
14:05:10FromGitter<nc-x> I'll open an issue.
14:09:51FromGitter<nc-x> Done -> https://github.com/nim-lang/nimble/issues/449
14:09:52Araqoh sorry about the upgrade, I meant nc-x
14:10:31FromGitter<nc-x> 😄
14:10:51PMunchIt's a bit annoying that we don't get tab-completion with Gitter users..
14:11:51FromGitter<survivorm> E-e-eh. Is it right that nimble.directory's search is case-sensitive?
14:12:03FromGitter<survivorm> Yeah, same to IRC
14:12:28FromGitter<survivorm> Example: https://nimble.directory/search?query=Qt, https://nimble.directory/search?query=qt
14:13:05FromGitter<nc-x> Looks like it.
14:13:10FromGitter<survivorm> It's not only annoying, but confusing too
14:13:40Yardanicomake an issue :) https://github.com/FedericoCeratto/nim-package-directory
14:13:43euantorCreate an isue: https://github.com/FedericoCeratto/nim-package-directory
14:13:52euantorOops, Yardanico beat me to it!
14:13:57Yardanico:d
14:15:06PMunchOh wow, yeah that is confusing :P
14:15:26FromGitter<survivorm> https://github.com/FedericoCeratto/nim-package-directory/issues/5
14:19:11PMunchBetter yet create a pull request :)
14:21:53FromGitter<survivorm> more stranges about directory: https://nimble.directory/search?query=GUI, https://nimble.directory/search?query=gui
14:22:20FromGitter<survivorm> Searches are different, but not completely
14:22:24*sendell joined #nim
14:25:04PMunchsurvivorm, it searches tags as well. So that might be the issue
14:25:47PMunchOr rather that might be why you're seeing so strange results
14:28:32Araqkrux02: well I trust you will write a test case that finally covers your use case
14:28:57*sleepyqtx joined #nim
14:32:19*sleepyqt quit (Ping timeout: 255 seconds)
14:39:49FromGitter<survivorm> @PMunch that might be the case, yeah
14:40:07FromGitter<survivorm> but still, confusing like htll
14:55:21*samhain quit (Ping timeout: 265 seconds)
15:00:30FromGitter<krux02> Araq: what is my test case that does not cover my use case?
15:01:53Araqdon't remember, somewhere in tests/macros, check the commit that claimed to fix your bug
15:02:48FromGitter<krux02> https://github.com/nim-lang/Nim/issues/6900
15:02:54FromGitter<krux02> do you mean that?
15:05:00FromGitter<krux02> The behavior of nim changed, so that this test works now much less than it did before
15:06:25*gokr quit (Ping timeout: 260 seconds)
15:07:08FromGitter<alehander42> what are common reasons to get memory error while compiling tr macros?
15:08:20FromGitter<alehander42> hm, it seems to be needless return values, then second question, I read about the idea of norecurse pragma, but I cant see it in the docs
15:08:57*sleepyqtx quit (Quit: Leaving)
15:09:58*xet7 quit (Quit: Leaving)
15:10:14*PMunch_ joined #nim
15:11:27*emgonam2 quit (Ping timeout: 248 seconds)
15:13:41*PMunch quit (Ping timeout: 276 seconds)
15:14:15*MJCaley joined #nim
15:15:05*sz0_ quit (Quit: Connection closed for inactivity)
15:28:33*nc-x joined #nim
15:28:46nc-xAraq: https://github.com/nim-lang/nimsuggest/issues/72#issuecomment-356636137
15:30:29*emgonam2 joined #nim
15:32:27*PMunch_ quit (Quit: Leaving)
15:33:00*nc-x quit (Client Quit)
15:38:21*nsf quit (Quit: WeeChat 2.0.1)
15:38:23FromGitter<krux02> Araq: I found out, that all I need is the skipTypes procedure also at compile time
15:38:35FromGitter<krux02> I mean callable from macros
15:38:48Araqthat doesn't seem right
15:38:50*endragor quit (Remote host closed the connection)
15:38:58Araqyou're supposed to call getTypeInst() in a loop
15:39:08Araqor getTypeImpl(), not sure
15:39:24Araqyou loop until you get something concrete like ntyObject
15:39:30Araqor ntyArray etc
15:39:47FromGitter<krux02> or wait, maybe not I am not 100% sure, but it get's me pretty far
15:40:06AraqskipTypes would skip valuable information because other programmers quite like you demand to know the type aliases
15:40:23FromGitter<krux02> well I wanted to resolve type aliases, but not generic implementations
15:41:09FromGitter<krux02> meaning I wanted to resolve to ``Vec[4,float32]``, not ``object: arr: array[0..3, float32]``
15:42:08*emgonam2 left #nim ("Leaving")
15:42:25FromGitter<krux02> getTypeImpl resolves to get the implementation
15:42:36FromGitter<krux02> but that is not what I am looking for.
15:42:38Araqnc-x unfortunately there are other regressions with nimsuggest, want to bisect them?
15:43:00Araqkrux02: ok, but what does getTypeInst do?
15:44:39Araqbtw https://github.com/nim-lang/Nim/issues/7041 is missing a heart from you XD
15:47:12*nc-x joined #nim
15:48:57nc-xAraq: I will try my best if I have time. But is this a bug or not (I am confused)?
15:49:02*azur_kind joined #nim
15:49:05*arnetheduck joined #nim
15:50:11Araqh1() has its definition in htmlgen, I think
15:50:18Araqand so nimsuggest should point to that
15:50:51Araq"resp" is part of jester's macro DSL, there is no definition at all
15:50:51nc-x👍
15:51:25Araqand "get" might be mapped to http.get, ask dom
15:51:55Araqand so nimsuggest tells you something you don't want to know, but which is correct anyway :P
15:53:38nc-xSo the only problem is with h1(). I will edit the description then.
15:56:33FromGitter<krux02> Araq: getTypeInst returns the generic representation of a type, meaning I get a type like Vec[4,float32] or Vec4[float32] or Vec4f
15:57:01FromGitter<krux02> all those type are correct, but I want to normalize them to the representation of `Vec[4,float32]`
15:57:28Araqearlier you said you want Vec[4, float32]
15:57:41FromGitter<krux02> I just said that again
15:57:43Araqnow that is in the list of options and you're still not happy
15:57:53FromGitter<krux02> ?
15:58:05FromGitter<krux02> how is that in the list of options?
15:58:29Araq"getTypeInst returns the generic representation of a type, meaning I get a type like Vec[4,float32] or Vec4[float32] or Vec4f"
15:58:41FromGitter<krux02> yes
15:58:47*jxy quit (Quit: leaving)
15:58:48FromGitter<krux02> that is exactly the problem
15:59:04FromGitter<krux02> Vec4f is just an alias for Vec[4,float32]
15:59:04AraqI fail to see how.
15:59:22AraqVec4f is an ntyAlias, skip it with getTypeImpl
15:59:22*gokr joined #nim
15:59:26FromGitter<krux02> and I want a normalized representation that doesn't care about aliases
15:59:34FromGitter<krux02> Vec4f is easy to skip
15:59:39Araqso write one more line of code, yes.
15:59:42*endragor joined #nim
15:59:50FromGitter<krux02> but Vec4 is a generic alias type
15:59:56FromGitter<krux02> that causes problems
16:00:08FromGitter<krux02> because it is not an ntyAlias even though it is an alias
16:00:13nc-xBefore even attempting to bisect any regressions in nimsuggest, I would love to have some documentation for `sug|con|def|use|dus|chk|mod|highlight|outline|known`. Can't find it anywhere.
16:00:22FromGitter<krux02> it is not just a symbol that is an alias for something
16:00:48nc-xAlso `debug` and `terse`
16:00:51Araqwhat is it?
16:01:29FromGitter<krux02> ntyGenericInvocation
16:01:48nc-xTyping `terse` and **any** command for eg `sug a.nim:1:1` crashes nimsuggest.
16:06:59Araqnc-x the experienced user usually knows what's wrong. ;-)
16:07:22Araqnc-x: there are good tests for nimsuggest
16:07:55Araqkrux02: ntyGenericInvocation seems ok as the canonical type?
16:11:35FromGitter<tim-st> When I have the choice to put a recursive called helper func inside another proc or outside, what would be better, or is it internally the same?
16:13:34*nc-x quit (Quit: Page closed)
16:14:08Araqoutside to prevent captures if you care about performance (as I do)
16:14:17FromGitter<tim-st> Thanks!
16:14:19Araqinside if you care more about code readability.
16:16:35zaharylet's say you are writing a term-rewriting macro that's only interested in adding code (i.e. a sort of aspect-oriented programming). The matched pattern is then going to appear in the bod of the macro. Is there a way to prevent the macro from being instantiated recursively in this situation?
16:18:39Araqthe best solution is to wrap it in something like prevent(...) and don't match it again in the prevent()
16:19:18Araqthis can be hard to do, there was an idea about .nonrecursive to prevent these things
16:20:25Araqbut optimizations that are non-recursive are not really optimizations, I think and so you're misusing the TR macro system ;-)
16:20:49*gokr quit (Ping timeout: 248 seconds)
16:21:37zaharywe want to misuse it as a code-instrumentation mechanism
16:22:48*Jesin joined #nim
16:23:38zaharyfor patch-free tracking of the modifications of certain built-in types such as string, seq, etc
16:24:04*jxy joined #nim
16:24:59*UxerUospr joined #nim
16:26:37FromGitter<krux02> Araq: the type is constructed like this: `Vec4f` → `Vec4[float32]` → `Vec[4,float32]` → `object: arr: array[0..3,float32]` and I would like to have a reliable way that stops at `Vec[4,float32]`
16:31:44*jxy quit (Quit: leaving)
16:31:54*jxy joined #nim
16:33:00Araqzahary: I would patch the string and seq implementations :-)
16:33:20Araqbut just do what you think is best, PRs for .nonrecursive are welcome
16:33:37*floppydh quit (Quit: WeeChat 2.0.1)
16:35:27Araqkrux02: I would match against Vec4f and tell my users to use that to get the optimizations they are after.
16:36:30Araqit's the clean solution IMO, a generic solution is the opposite of an optimized one.
16:39:10*azur_kind quit (Ping timeout: 260 seconds)
16:42:43*azur_kind joined #nim
16:49:03*azur_kind quit (Ping timeout: 248 seconds)
16:54:35*endragor quit (Remote host closed the connection)
16:55:09*endragor joined #nim
16:55:53Yardanicoon of the hottest nim issues recently: https://github.com/nim-lang/Nim/issues/6958 :P
16:56:50Yardanicooh lol, it's 4th most commented nim issue ever :D
16:59:55dom96what's the #1? :O
17:00:14Yardanicohttps://github.com/nim-lang/Nim/issues/2811
17:00:29Yardanicohttps://github.com/nim-lang/Nim/issues?q=is%3Aissue+sort%3Acomments-desc+is%3Aclosed if you're interested (you can switch between closed and open tabs)
17:01:14FromGitter<nc-x> Araq: Debugging the reason for crash in `terse` mode, I get it the crash at https://github.com/nim-lang/Nim/blob/5f3438a3fe701544e1841419ecac9c8e64d5e66b/nimsuggest/nimsuggest.nim#L460 ⏎ According to the docs, tryRecv() isn't supposed to crash?
17:01:18*Jesin quit (Quit: Leaving)
17:01:33FromGitter<nc-x> The issue for `terse` mode crash is at https://github.com/nim-lang/nimsuggest/issues/74
17:01:36FromGitter<alehander42> hahaha "Araq suggested rune ·" that would be amazing
17:02:04Yardanicohello·world
17:02:21dom96yeah, that hyphen feature ended up being removed too
17:02:33FromGitter<alehander42> so it was actually in ?
17:02:37dom96yep
17:02:56dom96Looking at these most commented issues, so many people wanting something... getting it and then disappearing.
17:03:42FromGitter<RedBeard0531> I think that `hello·world` is how go does its name mangling. So it is probably a terrible idea :)
17:03:47FromGitter<alehander42> freed souls fleeing to hyphen(heaven)
17:04:28FromGitter<nc-x> I have absolutely no experience with channels/threads/etc., but I got a similar (i think) crash when I tried to get `spinny` package running on devel, I think I had changed https://github.com/molnarmark/spinny/blob/master/spinny.nim#L76 to `tryAcquire` ⏎ ⏎ No idea if I did something wrong, or changes to nim in new version made it crash.
17:04:49FromGitter<RedBeard0531> Just threaten to have the compiler enforce nep1 and silly requests like that should go away
17:05:58dom96Sounds like a great idea :P
17:07:04FromGitter<krux02> Araq: my use case is not about optimizations
17:07:20FromGitter<krux02> my use case is about mapping glm types to glsl types
17:08:06FromGitter<krux02> and it is not easy to do, when I can't normalize the type representation
17:08:50*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:09:42Yardanicohmm, is it only me or nimsuggest is crashing on very simple files too?
17:10:29FromGitter<nc-x> nimsuggest's behaviour is pretty random for me. Works pretty good at times, fails at even simple things at other times, no idea why.
17:11:08Yardanicoit worked better in the past :)
17:11:14dom96What nimsuggest needs IMO is a simple way to submit bug reports with the code that's causing them
17:11:40FromGitter<alehander42> it probably hit puberty
17:11:55dom96Something that is integrated into VS code: if nimsuggest crashes, you get a question asking you whether it's okay to submit the code you're working on to help fix the nimsuggest issue
17:12:11Yardanicodom96, well usually you'll need to submit whole project
17:12:58Yardanicoso I reloaded project and now nimsuggest works.. strange :)
17:13:41dom96people have enough bandwidth nowadays to upload the whole project
17:14:33dom96of course that probably wouldn't help either. I bet most crashes happen as a result of nimsuggest running for long periods of time, and its state becoming corrupt.
17:14:52dom96The compiler unfortunately was never designed to do this.
17:15:05*Vladar joined #nim
17:15:20*MJCaley quit (Quit: MJCaley)
17:19:45*endragor quit (Remote host closed the connection)
17:19:48FromGitter<RedBeard0531> Could nimsuggest be a wrapper daemon that launched a subprocess to do the actual work and restarted it if it crashes? While a hack, it would probably solve a lot of the usability issues on crashes
17:21:39*azur_kind joined #nim
17:22:02dom96Yeah, I have a similar project in my todo list.
17:22:23dom96A proper language server implementation
17:22:31*darithorn joined #nim
17:22:53dom96That uses a mix of nimsuggest and simple custom parsing for faster response times.
17:31:35dom96Honestly I would start working on this now, but the amount of projects I am maintaining scares me.
17:32:38*endragor joined #nim
17:34:18*sendell quit (Remote host closed the connection)
17:36:48*yglukhov quit (Remote host closed the connection)
17:37:22*yglukhov joined #nim
17:40:48*Trustable joined #nim
17:41:04*yglukhov quit (Read error: Connection reset by peer)
17:41:15*miran_ joined #nim
17:41:17*yglukhov joined #nim
17:43:47*azur_kind quit (Remote host closed the connection)
17:45:47*yglukhov quit (Ping timeout: 256 seconds)
17:45:49*oprypin joined #nim
17:47:15*azur_kind joined #nim
17:47:29*BitPuffin quit (Ping timeout: 252 seconds)
17:55:19*gokr joined #nim
18:19:28*yglukhov joined #nim
18:19:49*claudiuinberlin joined #nim
18:22:59Yardanicook, now strfmt vs strformat has 49 comments (sharing second place with "new comment syntax" issus)
18:23:02Yardanico*issue
18:23:18miran_you're welcome :)
18:23:52Yardanicofirst place will be hard to beat - 70 comments
18:23:57*yglukhov quit (Ping timeout: 240 seconds)
18:24:24Yardanicobtw - rust record is 300 comments
18:26:38*yglukhov joined #nim
18:31:21FromGitter<tim-st> If I understand the wiki page for utf8 correct, I can use char instead of runes if I want to find a specific ascii char? In other words: an ascii char is never part (e.g. prefix, suffix) of an utf8 rune?
18:31:30*yglukhov quit (Read error: Connection reset by peer)
18:32:06*yglukhov joined #nim
18:35:26Yardanicostrings in nim are just bytes
18:36:13YardanicoAFAIK if you check for ascii "a" for example and somehow utf8 rune has "a" byte it will match
18:36:29Yardanicoof course if you're talking about nim strings and not Rune type :)
18:37:35FromGitter<tim-st> I mean for example: If I want to parse until `[` will there be any utf8 symbol e.g. a chinese one that is a "combined utf8 char" and maybe have the value of `[` as part of the symbol? In this case my parser would match the chinese symbol but I only want `[`
18:38:22FromGitter<tim-st> If I understood correct bigger utf8 symbol are sequences of bytes, so I'm not sure if one of this sequence bytes could match
18:38:31Yardanicoit won't match if it doesn't have "[" byte
18:38:37YardanicoI'm not really an expert in utf8, sorry :)
18:39:04FromGitter<tim-st> I'm not parsing for "[" I'm parsing for '['
18:43:47dom96If you're concerned about this, you can access each Rune in a string and match against that
18:44:02dom96At least I think that's possible, I'm no expert either
18:44:46FromGitter<tim-st> I dont want to use the runes iterator and need indexing. It would be *much* easier to access the indices of the string directly.
18:45:42FromGitter<tim-st> This is in the english wiki: `Moreover, 7-bit bytes (bytes where the most significant bit is 0) never appear in a multi-byte sequence, and no valid multi-byte sequence decodes to an ASCII code-point.`
18:47:56*devdri joined #nim
18:50:31Yardanicothen you're fine it seems?
18:51:11FromGitter<RedBeard0531> Rune isn't enough because it doesn't consider multi-rune graphemes. Everything in unicode is simultaneously simple and extremely complicated. @tim-st what precisely do you mean when you say you want to check for "a"?
18:52:34FromGitter<RedBeard0531> if you mean something that will be shown to the user as "a", you need to worry about combining characters, which is still a problem even with utf-32 or Rune iterators
18:52:51FromGitter<tim-st> I want to scan a string until char `'['` and I wanted to prevent runes(). I'm not sure if the bits of the char `'['` can be part of any utf8 symbol. If that's the case I have to use runes to make my parser secure
18:53:26FromGitter<tim-st> I dont want my parser to accidently match the wrong "combined symbol"
18:53:28FromGitter<RedBeard0531> symbol isn't a meaningful word in this context. Choose one of "byte/code unit", "code point/Rune", "grapheme"
18:54:34FromGitter<RedBeard0531> 99% of the time, the answer to your question is to ignore all of this and just look for the '[' byte
18:55:03FromGitter<tim-st> Yes, but can it match accidently the oth 1%? Is there a worst case?
18:55:10FromGitter<RedBeard0531> Are you parsing a defined protocol or dealing with general user text rendering?
18:55:34FromGitter<RedBeard0531> It is more like 99% of use cases than 99% of inputs.
18:55:45FromGitter<tim-st> utf8, it could be anything,
18:55:56FromGitter<tim-st> most times it's ascii, but I cannot know
18:56:29FromGitter<RedBeard0531> let me rephrase. Why are you looking for the '['? What are you planning to do with it? What is the actual use case?
18:57:46FromGitter<tim-st> bascially: can you generate a string `a` where readable char `'['` not in `a` but it matches `'[' in a`
18:58:09*nsf joined #nim
18:58:16FromGitter<tim-st> I'm developing a text parser at the moment
19:00:38FromGitter<tim-st> I'm scanning until char `'['` and then call a specific function because this symbol has a meaning
19:02:04FromGitter<RedBeard0531> What kind of text are you parsing? If you are defining the language the simplest thing to do is to just define the meaning of special symbols in terms of code points. Then you define your way out of the problem.
19:02:43FromGitter<tim-st> It's a text where it's likely that many symbols of the complete utf8 table appear
19:02:56FromGitter<tim-st> like 80% appear at least once
19:03:38FromGitter<tim-st> I'll probably just bruteforce the answer using a for loop over utf8 table
19:03:46FromGitter<RedBeard0531> again, "symbol" isn't a meaningful word in unicode
19:05:26FromGitter<tim-st> I'll bruteforce this now, I think I have the answer within the next 30mins
19:05:42FromGitter<RedBeard0531> I'm not sure if graphemes are a finite set in unicode since I don't know if there are any limits on the number of combining chars you can use in single grapheme. But even if it is technically finite the space is so large that you probably can't have a meaningfully large percentage of the possible graphemes.
19:06:19FromGitter<RedBeard0531> If you mean code points, then the answer is that the byte '[' will only appear in that code point for utf8
19:06:54dom96Looks like the language server protocol supports showing a message to the user and getting a reply: https://microsoft.github.io/language-server-protocol/specification#window_showMessageRequest
19:07:04dom96So implementing an error reporting mechanism would be possible
19:09:08*yglukhov quit (Remote host closed the connection)
19:09:41*yglukhov joined #nim
19:09:56Yardanicobut this will probably handled by vscode, no?
19:10:05FromGitter<tim-st> @RedBeard0531 Thanks
19:10:19*subsetpark_ quit (Quit: Connection closed for inactivity)
19:10:22dom96Yardanico: Yes
19:12:05GitDisc<NopeDK> dom96, you working on an LSP compatible nimsuggest-like engine?
19:12:24dom96nope, thinking about it though
19:12:44*yglukhov quit (Remote host closed the connection)
19:13:00*yglukhov joined #nim
19:13:06GitDisc<NopeDK> nice
19:14:38Yardanicoyeah, LSP will be better than using EPC
19:15:02Yardanicobecause we'll get free autocomplete support for all modern editors with LSP :)
19:16:13Yardanicobecause there's stuff like this https://github.com/tomv564/LSP :)
19:17:18Yardanicohttps://langserver.org/#implementations-client
19:17:32FromGitter<RedBeard0531> @tim-st you may find this useful to read http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries (not the algorithms but the main explanation part of section 3 before 3.1 starts)
19:18:52FromGitter<RedBeard0531> A key phrase from there "In those relatively rare circumstances where programmers need to supply end users with user-perceived character counts[...]"
19:19:37*azur_kind quit (Quit: Leaving)
19:35:20FromGitter<nitely> anyone has a clue what's going on here: https://github.com/nim-lang/Nim/issues/7059 ?
19:39:44FromGitter<tim-st> @RedBeard0531 Thanks! I will read it
19:41:00Yardaniconitely: well I mean big files work fine, but it seems that compile-time stuff in big files doesn't work fine :)
19:41:17Yardanicoint16 is used only for optimization purposes AFAIK
19:42:30FromGitter<nitely> I figured that much. The only problem with that is that it will show the wrong line/column number when it overflows
19:43:16Yardanicoyes that's known, I'm trying to find an issue on github
19:43:19Yardanicodon't close yours though
19:43:54FromGitter<nitely> The two issues opened has nothing to do with reporting, though
19:44:50FromGitter<nitely> well,the koch one does https://github.com/nim-lang/Nim/issues/7056 but I can live with it
19:45:22Yardanicovmgen.nim is not koch
19:45:36Yardanicowell I mean koch is just a wrapper
19:45:49Yardanicowell it's a *build tool*
19:45:57FromGitter<nitely> I know
19:46:36FromGitter<nitely> koch dies when trying to build the stack trace coz it's in debug mode, so it can't convert int16
19:46:54Yardanicokoch doesn't die, nim compiler does :)
19:46:56FromGitter<nitely> and it dies in msgs.nim not in vmgen
19:47:12FromGitter<nitely> it crashes there
19:47:33Yardanicokoch just calls nim binary, see https://github.com/nim-lang/Nim/blob/devel/koch.nim#L476
19:47:49FromGitter<nitely> anyway, I don't immediately care about that
19:48:36FromGitter<nitely> I want to use my unicode chars db at compile time (big arrays), so it's the other issue I care about
19:50:45FromGitter<nitely> Yardanico: ah, well, then if you find the issue about nim not handling big files when there is an error, you can close https://github.com/nim-lang/Nim/issues/7056 as duplicated
19:51:48FromGitter<nitely> but https://github.com/nim-lang/Nim/issues/7059 has nothing to do it with that (I think)
19:56:43FromGitter<data-man> Hi! ⏎ I want to add Nim support to CodeMirror, and then to Github linguist. Which keywords should be highlighted? Integer types? Or https://nim-lang.org/docs/manual.html#lexical-analysis-identifiers-keywords only?
19:57:31Yardanicoonly keywords from manual
19:57:46Yardanicobecause otherwise you make Araq sad :(
19:58:17Yardanicodata-man: but wait, there IS nim support in github linguist
19:59:12FromGitter<data-man> Without syntax highlighting
19:59:26Yardanicoehm?
19:59:41Yardanicothere is syntax highlighting on github for nim, but it uses NimLime and it's a bit broken
20:00:59FromGitter<data-man> Try edit any your nim-gist
20:01:19Yardanicoah, yes, there's no support on gist
20:03:09FromGitter<RedBeard0531> I'd highlight `result` since it is a psuedo-keyword inside any function that returns a value. The vim highlighting does that by default and I find it makes code much more readable: https://github.com/zah/nim.vim/blob/master/syntax/nim.vim#L145-L147
20:03:38dom96there is support on gist
20:03:49dom96'result' isn't a keyword
20:03:54YardanicoRedBear0531: ask Araq about this :P
20:04:04dom96it's an identifier with a special meaning
20:04:52FromGitter<data-man> BTW Notepad3 now supports Nim :-) https://github.com/rizonesoft/Notepad3/issues/284 ⏎ For Windows only.
20:04:55FromGitter<RedBeard0531> What's the difference? addr is basically a normal function, but it is technically a keyword.
20:05:47dom96The difference is that I can define my own 'result' variable
20:05:53dom96I cannot define an 'addr' variable
20:06:39FromGitter<RedBeard0531> That matters when writing, not when reading code though
20:07:52FromGitter<RedBeard0531> I would want it to look weird when code defines a variable named result because that means that `result = asdfasdf` no longer has its normal meaning.
20:09:28*Sembei joined #nim
20:11:17*Trustable quit (Remote host closed the connection)
20:14:43*Trustable joined #nim
20:15:13*Trustable quit (Client Quit)
20:26:30AraqRedBeard0531: there are precise rules about what is a keyword and what isn't. if you really want to you can highlight 'result' (but then what's so special about it?) and not highlight 'addr', but don't pick some random misguided list of "built-in" words please
20:29:45*Sembei quit (Quit: WeeChat 2.1-dev)
20:30:31*yglukhov quit (Remote host closed the connection)
20:31:02*yglukhov joined #nim
20:31:09*Sembei joined #nim
20:35:37*yglukhov quit (Ping timeout: 265 seconds)
20:37:47FromGitter<RedBeard0531> I'm fine with highliting addr. And I agree that highlighting len is a bad idea. I guess my definition would be that tokens that are special in the *language* are worth highlighting and words that are special in the *library* aren't (at least not automatically). This is a bit broader than the technical definition of "keyword" but that seems more like a parser/lexer implementation detail than something that is worth
20:37:47FromGitter... highlighting when reading code. There is also the somewhat thorny question of what to do about int, seq, string, cstring and the like. They are technically defined in system.nim, but it also seems somewhat reasonable to highlight them specially.
20:38:16FromGitter<RedBeard0531> Meh, coming up with hard and fast rules is hard. Seems like its all just squishy judgement calls :)
20:43:48*yglukhov joined #nim
20:44:26*devdri quit ()
20:50:39*devdri joined #nim
20:54:24AraqRedBeard0531: VSCode, github, ... their highlighting is worse than no highlighting because of this "semantic" highlighting bullshit.
20:54:38Araqlexers have no semantic information.
20:54:58Araqso highlight keywords, it's proven to work and is helpful.
20:55:15YardanicoAraq, make a PR to vscode-nim :D
20:55:22*Yardanico quit (Remote host closed the connection)
20:56:36*yglukhov quit (Read error: Connection reset by peer)
20:57:12*yglukhov joined #nim
20:57:54*miran_ quit (Quit: Konversation terminated!)
21:02:58dom96RedBeard0531: I agree that it would be helpful to highlight 'result', but it shouldn't have the same highlighting as a keyword
21:03:02dom96because it's not a keyword :)
21:04:51AraqI don't want result = 0 to render differently than res = 0 or r = 0 or let foo = 0
21:05:20*yglukhov quit (Read error: Connection reset by peer)
21:05:22Araqthere is no control flow happening and 'result' is nothing that needs my attention.
21:05:41Araqfor the same reason I despise ALL_UPPER_CONSTANTS_LIKE_THEY_ARE_SO_IMPORTANT
21:05:43*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:06:11Araqsorry, you constants are not important, they are in fact likely the only thing where no bug will be hiding
21:08:13*Sembei quit (Quit: WeeChat 2.1-dev)
21:10:04*Sembei joined #nim
21:10:10FromGitter<data-man> @Araq: What else I can do for my truecolored (very sexy, dom96's ©)PR?
21:10:41Araqdata-man: will you work on something important afterwards?
21:11:36FromGitter<data-man> Allocators?
21:12:00FromGitter<data-man> CI?
21:12:16FromGitter<data-man> Containers?
21:14:45FromGitter<data-man> I think about Nim IDE, based on Scintilla & ImGUI. Soon docking system will be added to ImGUI.
21:16:32*gangstacat quit (Quit: Ĝis!)
21:22:51FromGitter<data-man> I'm now unemployed and I have a lot of time. :-(
21:31:12*gangstacat joined #nim
21:32:18*UxerUospr quit (Quit: Lost terminal)
21:32:22*yglukhov joined #nim
21:32:54Araqdata-man: we can hire you
21:33:39Araqwe're looking for a new Nim core developer
21:34:36FromGitter<data-man> Really? It would be great! :-)
21:34:54*yglukhov quit (Remote host closed the connection)
21:36:03*yglukhov joined #nim
21:37:21*Vladar quit (Quit: Leaving)
21:38:16FromGitter<zetashift> @data-man have you could help with: https://github.com/Araq/nimedit ?
21:41:48FromGitter<data-man> @zetashift: Do you use nimedit?
21:44:34Araqnimedit is awesome if only I could font rendering not to suck. or fix its annoying bugs. :P
21:48:01FromGitter<RedBeard0531> @Araq if you want a good stress-test for font rendering, see if it can handle https://github.com/tonsky/FiraCode
21:48:16*Atomic2 joined #nim
21:48:21FromGitter<data-man> I dislike to use SDL. :-)
21:49:40FromGitter<zetashift> @data-man No(t yet) but I'd rather have the focus on 1 Nim centered IDE/LSP rather than 10 different ones. Ofcourse I won't stop you from making your own :P
21:53:37*darithorn quit (Quit: Leaving)
21:56:41dom96Improvements to nimsuggest/nimformat (or whatever it's called nowadays) would be a more effective use of time than writing yet another IDE
21:57:00subsetparkI would love love LOVE a working vim/nimsuggest setup
21:58:14AraqI have to agree with dom96. but there is also a good list of bugs to fix.
21:58:31FromGitter<RedBeard0531> @subsetpark I have a shitty but mostly working integration with zah/nim.vim. If you're interested I can post it to gist or something.
21:58:59subsetparkyeah post!
22:00:41*nsf quit (Quit: WeeChat 2.0.1)
22:05:08FromGitter<RedBeard0531> OK, but I warned you it is shitty :) https://gist.github.com/RedBeard0531/6e29dc5e5b40d666bfdfaee2d5270a81
22:05:14Araqbtw it's called nimpretty because I like pretty.
22:05:38Araqhuman being is an animal of the eye and all that.
22:05:55FromGitter<RedBeard0531> Unfortunately nimsuggest requires knowing what the "main" file is, so it requires some manual effort to make it work each time you start vim.
22:05:57FromGitter<data-man> Hmm, what about nimsexy? :-)
22:06:08GitDisc<NopeDK> nimilicious
22:06:21FromGitter<RedBeard0531> ding ding ding, we have a winner!
22:06:48GitDisc<NopeDK> xD
22:08:50FromGitter<RedBeard0531> @subsetpark that also only works with vim8 since it uses async channels and such. But if you aren't already running vim8, that is a bigger problem than nimsuggest integration. Also, I recommend installing https://github.com/w0rp/ale which has built-in support for running `nim check` on save
22:10:01FromGitter<RedBeard0531> I'm going to add a link to Ale in https://github.com/nim-lang/Nim/wiki/editor-support#vim unless anyone objects
22:10:17FromGitter<data-man> @RedBeard0531: neovim worked?
22:11:34Araqdata-man: nimpretty makes your code pretty but not sexy. unless you have some dubious affections to source code :-)
22:12:02GitDisc<NopeDK> Micro also has nim check on save but no integration for nimilicious yet
22:12:05FromGitter<data-man> :-D
22:13:32dom96» nimble install nimpretty
22:13:33dom96Error: Package not found.
22:13:34dom96:/
22:14:09FromGitter<RedBeard0531> @data-man nope. I wrote that for personal use and I only use vim8. I know it won't work in neovim because it uses a different API for jobs and channels, and I only know how to use the vim8 one. But feel free to steal this code and make it not-shitty :)
22:14:49FromGitter<RedBeard0531> Unless you meant Ale, in which case yeah, it works with both vim8 and neovim
22:16:57*vlad1777d joined #nim
22:18:07FromGitter<RedBeard0531> ALE link added: https://github.com/nim-lang/Nim/wiki/Editor-Support/_compare/16d203735f74fb72b424d1d8caa88fcd3f8fe3c9...5143ce05feb8ffc28c04cd7a98f5ee6459e11826
22:22:14subsetparkahh... I use neovim :/
22:22:33FromGitter<RedBeard0531> On the general topic of nimsuggest, what is the correct way to use `sug` vs `con`, and how important is the difference? Could nimsuggest figure it out automatically?
22:23:28Araqhow so? it's a completely different logic and might be bound to different key presses
22:23:57Araqsug -- '.' was pressed
22:24:05Araqcon -- '(' was pressed
22:24:42Araqyou can and should have both things open simultanously though
22:24:46FromGitter<data-man> nimsuggest can be compiled as dynamic library?
22:24:59Araqprobably
22:25:58*Jesin joined #nim
22:27:05Araq"This is a breaking change, please don't do this at initialization but only if requested via enableTrueColor."
22:27:12Araqis my latest remark.
22:27:19Araqwhich you seem to have missed.
22:27:43FromGitter<RedBeard0531> But it isn't bound to a keypress directly. I use https://github.com/Valloric/YouCompleteMe which calls a single completion on one of several triggers, including when <c-space> is hit to request language-aware completion at any time. Couldn't nimsuggest just look around where the cursor is to figure out what should be suggested?
22:27:53FromGitter<data-man> Oh, sorry, I missed. Will be corrected.
22:28:20FromGitter<RedBeard0531> Also 'con' seems like it should also happen after a space due to command syntax.
22:29:23FromGitter<RedBeard0531> @subsetpark if this is true, neovim support will be harder. vim8 supports a few protocols including line-delimited text, while neovim only supports msgpack-rpc https://www.reddit.com/r/neovim/comments/58nrwv/neovim_api_comparison_with_vim_channels/
22:31:30Araqspace is too ambiguous, I'm a fan of explicit suggestion control anyway
22:32:07Araqmy point is that nimsuggest cannot really figure out what to do here
22:32:39*yglukhov quit (Remote host closed the connection)
22:44:03*kafke joined #nim
22:45:36*devdri quit ()
22:52:27subsetparkRedBeard0531, yeah, I have ALE - i love it
22:53:04FromGitter<Yardanico> @dom96: was something changed in httpclient? This doesn't crash after ~an hour https://github.com/nim-lang/Nim/issues/6155
22:53:30dom96Dunno, check the history?
22:54:55*Jesin quit (Quit: Leaving)
22:56:53FromGitter<Yardanico> Hmm, maybe https://github.com/nim-lang/Nim/commit/ac67f5eda57a91e97d16b31dcdea65fb39de9fc5#diff-232b8586e82bf9dedf2b071ec6fd52aa
22:57:54dom96oh yes, that fixes a very critical bug
22:58:28dom96yeah, I'm going to close your issue.
22:59:19FromGitter<Yardanico> Thanks for fixing it :)
23:07:10dom96Anybody mind if I merge this? https://github.com/nim-lang/Nim/pull/6962
23:07:51FromGitter<RedBeard0531> @Araq, I still don't get why nimsuggest can't figure it out. Doesn't it's semantic analyzer know what type (kind?) of identifier the user is entering at the current cursor position? It seems like it would be necessary to know if the current position is part of an argument or a dot-call expr.
23:08:30FromGitter<RedBeard0531> This feels like a classic "parsers know more than lexers" case that you are so fond of citing for highlighting :)
23:10:33FromGitter<RedBeard0531> @dom96 👍 I've been running with that patch manually applied on top of devel. I'll go ahead and close #6915 once some fix gets merged.
23:10:55FromGitter<Yardanico> Ohhhh openssl 1.1 is merged!!!
23:11:17dom96okay, gonna merge that.
23:11:39FromGitter<RedBeard0531> Oh nice, I've also been manually applying that one :)
23:11:53FromGitter<Yardanico> I
23:12:08FromGitter<Yardanico> I'll test now on arch linux arm :P
23:15:17FromGitter<RedBeard0531> @dom96 did you see the async bugs I filed last night (#7051 and #7502)? Would it make sense for the macro to just wrap the `fut.read` call inside a `try` with the original except/finally blocks rather than rewriting it to use an if block? I think that would knock out both bugs, and hopefully simplify the macro.
23:15:35FromGitter<RedBeard0531> erm I meant #7052
23:17:16dom96I've sort of given up trying to fix the `try` transformation
23:17:32dom96it's far over-complicated right now and I'm not sure what to do with it
23:17:39FromGitter<RedBeard0531> I was looking into adding a preprocess pass to rewrite `defer` into try/finally in async, until I realized that try/finally in async compiles but doesn't work :(
23:17:49dom96and it doesn't really achieve the same semantics as a proper try
23:18:44dom96but hrm, you might be on to something here
23:18:48FromGitter<RedBeard0531> How so, assuming that finally worked?
23:19:41dom96Do try this change if you're up for it
23:19:43FromGitter<RedBeard0531> I was thinking you could avoid having the `if failed` check and just have a linear sequence of non-nested try/except/finally blocks
23:19:51dom96But I have a feeling it's not that simple :)
23:21:20FromGitter<RedBeard0531> I'm still kinda rough at reading, let alone writing, macros. But I think I finally mostly understand the async macro, so maybe I'm getting the hang of it. Is there a "trick" to learning/understanding AST-level macros is is it always hard even when you are used to them?
23:22:37dom96It sort of becomes overwhelming after a while, especially with the async macro
23:22:55dom96there is so many different combinations it's hard to keep track of everything and make sure all AST transformations are correct
23:23:37dom96an good IDE could definitely help here
23:26:55FromGitter<RedBeard0531> Have you looked at https://github.com/zielmicha/reactor.nim/blob/master/reactor/async/asyncmacro.nim? It felt a lot simpler especially because it makes await a real identifier rather than magicing it in, but that could be because it doesn't attempt to make try/except work
23:27:56FromGitter<RedBeard0531> It does support defer though which I prefer to try/finally (although I know that doesn't seem to be the majority opinion around here)
23:28:49dom96It seems it also requires you to prefix everything with 'async' though, no?
23:29:12FromGitter<RedBeard0531> Unfortunately I assume it will be impossible to support destructors in async without proper compiler support for dtors in closure iterators
23:29:48FromGitter<alehander42> A plug-in that displays macro expansions with fuzzed input parallely to a macro would be so cool
23:31:07FromGitter<RedBeard0531> No this block handles adding async prefixes to identifiers that can't be overloaded because they are keywords: https://github.com/zielmicha/reactor.nim/blob/master/reactor/async/asyncmacro.nim?#L73-L90
23:32:27FromGitter<RedBeard0531> It does have a slightly different meaning of defer though since they happen at function exit. Assuming I'm correct that nim's defer usually happens at block exit
23:34:55FromGitter<brentp> I'm using devel branch and getting a lot of new errors (Illegal storage access) inside of alloc.nim after recently pulling. Is this expected?
23:35:06FromGitter<brentp> I haven't previously had problems on devel.
23:36:13dom96RedBeard0531: Interesting. I wonder where so much complexity comes from in my implementation.
23:37:30dom96brentp: nope, is this in your program?
23:37:46dom96can you give a repro test case?
23:38:55FromGitter<brentp> heh. yeah it's deep in my program. but I can see that what I'm sending is not nil
23:39:09FromGitter<brentp> then I get ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a56a41dce68c3bc74a28e77]
23:41:43FromGitter<brentp> sorry to drop a bug and run, but I'll check in later and/or try to make a small repro. the error is intermittent.
23:47:38FromGitter<mratsim> Oh yglughov and me got similar stuff, it's something in the new allocator (from mid December)
23:49:16FromGitter<mratsim> Offtopic: I'm curious about this newCigar proc
23:50:58FromGitter<RedBeard0531> @Araq do you have some grand plan for how to support destructors in closure iterators?
23:51:28FromGitter<zetashift> @mratsim probably returns a string of of base lengths
23:51:49FromGitter<RedBeard0531> Does it involve using c++17 + coroutines TS? :D
23:52:01FromGitter<zetashift> iirc CIGAR is a way of describing DNA bases with an operation after an alignment