<< 22-09-2020 >>

00:00:52*konkrrrrrr quit (Ping timeout: 246 seconds)
00:08:45*a_chou joined #nim
00:11:26FromDiscord<Elegant Beef> is it normal for your nas to use a GUI?
00:12:40FromDiscord<exelotl> So hyped for Nim 1.4
00:22:32*arecacea1 quit (Remote host closed the connection)
00:24:22*arecacea1 joined #nim
00:28:59*a_chou quit (Ping timeout: 240 seconds)
00:30:23*a_chou joined #nim
00:33:38disruptekoh yeah?
00:35:20FromDiscord<hobbledehoy> What's new in 1.4? I have heard stuff about orc but that's it
00:35:39FromDiscord<hobbledehoy> (edit) 'orc but that's it' => 'orc, what else is new?'
00:36:55*krux02 quit (Remote host closed the connection)
00:50:17*aenesidemus joined #nim
00:54:18*gmaggior quit (Ping timeout: 272 seconds)
01:05:42*lritter quit (Ping timeout: 272 seconds)
01:07:26*gmaggior joined #nim
01:11:23disrupteknothing leaps out at me, and orc isn't the default gc, so... we probably should adopt a changelog action into our release process.
01:11:45FromDiscord<ThothLoki> anyone make some guis here?
01:11:53FromDiscord<ThothLoki> i am referencing nigui
01:14:01FromDiscord<ThothLoki> i have a for loop that is making a list of elements. it is taking a list of tuples and building a [label] [textbox] [button] [button]↵↵my main problem is that all of the labels and buttons are named the same, so a proc doesnt work well because the buttons do not know which textbox to edit
01:14:52disrupteksounds like a fun ux.
01:14:57FromDiscord<Rika> usually there are internal IDs to elements like these since theyre usually named the same
01:15:37FromDiscord<Rika> also disruptek: what makes you think i know how to tinker with CPS xd i might try
01:16:46FromDiscord<ThothLoki> and that is what i am trying to find, the internal IDs
01:16:49*Zectbumo quit (Remote host closed the connection)
01:18:16FromDiscord<Rika> from the gui libraries ive used, you can manually set the IDs
01:18:21FromDiscord<Rika> but i dont know if nigui does that
01:19:20FromDiscord<ThothLoki> are you tlaking about something like `var tb = newTextBox()` where the tb is the ID?
01:20:40FromDiscord<Rika> something more of xxx.setID(num)
01:21:08FromDiscord<acek7> wassup
01:21:55FromDiscord<ThothLoki> nothing that i can see in nigui
01:24:20*Tanger joined #nim
01:29:42FromDiscord<ThothLoki> @Rika what gui lib do you use?
01:29:57*apahl quit (Ping timeout: 260 seconds)
01:30:31FromDiscord<Rika> i was using imgui a while back
01:31:46*apahl joined #nim
01:31:57FromDiscord<ThothLoki> i notice their github has no examples
01:32:05FromDiscord<ThothLoki> is there a place i can fine the syntax?
01:36:06disruptekrika: just make something silly with it and you'll understand how it differs from the native closure iterators.
01:36:47FromDiscord<Rika> okay, ill look into it
01:37:02FromDiscord<Rika> @ThothLoki what do you mean?
01:37:08FromDiscord<Rika> which github?
01:37:31FromDiscord<ThothLoki> https://github.com/nimgl/imgui
01:37:39FromDiscord<ThothLoki> so you have any place better?
01:37:57FromDiscord<Rika> one moment
01:38:44FromDiscord<Rika> you can actually translate most examples in the original lib https://github.com/ocornut/imgui
01:39:19FromDiscord<ThothLoki> wtf. now there are two?
01:39:35FromDiscord<Rika> no
01:39:42FromDiscord<Rika> the 2nd one is the original C lib
01:39:47FromDiscord<Rika> C++*
01:39:54FromDiscord<Rika> the first one are Nim bindings
01:40:07*abm quit (Quit: Leaving)
01:41:31FromDiscord<ThothLoki> hmmm. lemme take a look
01:42:15*vicfred quit (Quit: Leaving)
01:43:32*Zectbumo joined #nim
01:48:37*dgb quit (Quit: WeeChat 2.7.1)
02:11:47*arecacea1 quit (Remote host closed the connection)
02:13:21*arecacea1 joined #nim
02:21:06*oprypin quit (Remote host closed the connection)
02:21:17*shad0w_ joined #nim
02:23:33*oprypin joined #nim
02:24:01*FromGitter quit (Remote host closed the connection)
02:24:31*FromGitter joined #nim
02:36:47*muffindrake quit (Ping timeout: 272 seconds)
02:38:31*muffindrake joined #nim
02:40:13*dgb joined #nim
03:01:43*lritter joined #nim
03:06:12*a_chou quit (Ping timeout: 256 seconds)
03:06:28FromDiscord<Avatarfighter> @Elegant Beef the UI in the NAS is to have an interface to change settings and stuff
03:15:13FromGitter<gogolxdong> Is there any video player library like ffmpeg?
03:16:46*a_chou joined #nim
03:20:14*a_chou quit (Remote host closed the connection)
03:26:56PrestigeI'm reading the write tracking article and came across this: func select(cond: bool; a, b: const Node): Node
03:27:12PrestigeIs there a reason cond is separated by ; instead of , ?
03:31:02*apahl quit (Ping timeout: 260 seconds)
03:31:59*apahl joined #nim
03:37:42FromDiscord<juan_carlos> ; cuts the grouping of types
03:38:07FromDiscord<juan_carlos> a,b,c: string --> all string
03:38:31FromDiscord<juan_carlos> a,b: int ;c: string --> c string, a,b int
03:38:51*waleee-cl quit (Quit: Connection closed for inactivity)
03:38:54FromDiscord<juan_carlos> a,b ; c: string --> error :P
03:39:15FromDiscord<juan_carlos> You kinda group stuff up with ;
03:39:42Prestigein that needed?
03:40:02FromDiscord<juan_carlos> Yes and No.
03:40:14FromDiscord<juan_carlos> Depends if you want to group stuff or not.
03:40:33PrestigeI can't do func select(cond: bool, a, b: const Node): Node ?
03:41:17FromDiscord<juan_carlos> Yes
03:42:47*aeldemeryde[m] left #nim ("User left")
03:46:52*vicfred joined #nim
04:04:44*thomasross quit (Ping timeout: 256 seconds)
04:05:08Prestigeoh I can
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:37*supakeen joined #nim
04:47:03*vicfred quit (Quit: Leaving)
04:59:00*narimiran joined #nim
04:59:45FromDiscord<acek7> is there a way to get this into an epub format
04:59:49FromDiscord<acek7> http://ssalewski.de/nimprogramming.html#_part_i_introduction
05:02:34*vicfred joined #nim
05:25:14*solitudesf joined #nim
05:32:42FromGitter<StefanSalewski> What is the concrete problem reading it as plain html?
05:33:04FromDiscord<acek7> i just wanna read it in bed as well as at the computer
05:33:12FromDiscord<acek7> im lazy ok
05:33:37FromGitter<StefanSalewski> Maybe you can try saving it to disk, browsers like firefox have a "save as".
05:35:51FromGitter<StefanSalewski> When part I and II are ready I may try to make a ebub, but epub is not that easy and needs some testing on various devices.
05:37:41FromGitter<StefanSalewski> Someone requests a PDF, but PDF is only really good for printout. We should not kill trees for printout, so no PDF from me, sorry. Bye.
05:49:14*kenran joined #nim
05:52:44*lritter quit (Quit: Leaving)
06:09:56*gmaggior quit (Quit: Leaving)
06:14:28FromDiscord<gour> _is considering to try/use wxnim for desktop gui app, it would be nice to include it in the https://github.com/nim-lang/Nim/wiki/Curated-Packages#gui list 💭_
06:17:34*orazovae[m] joined #nim
06:25:22*kenran quit (Quit: leaving)
06:26:30*PMunch joined #nim
06:29:43*letto quit (Quit: Konversation terminated!)
06:31:32*letto joined #nim
06:34:03*Trustable joined #nim
06:34:45Araqhi gour, nice that you're still around
06:44:54*gour joined #nim
06:45:07*muffindrake quit (Ping timeout: 240 seconds)
06:45:15gourAraq: hiya, i'm glad that Nim is kicking nicely around ;)
06:45:45*superbia quit (Ping timeout: 240 seconds)
06:47:31*muffindrake joined #nim
06:47:45gouri've defintely decided to use Nim for computational part of my application, iow. to have it available as library; then for UI part i'll try with some Nim bindings (e.g. wxnim) and if that ends up as not satisfactorily, the other option is (which i'd like to avoid) using nimporter/pyqt
06:49:21FromDiscord<hobbledehoy> aren't there already qt bindings for nim?
06:49:48FromDiscord<flywind> !repo nimqml
06:49:49disbothttps://github.com/filcuc/nimqml -- 9nimqml: 11Qt Qml bindings for the Nim programming language 15 72⭐ 9🍴 7& 1 more...
06:50:40FromDiscord<gour> hmm, that's interesting, but no update for almost 1 yr?
06:51:02FromDiscord<flywind> You can use this fork, https://github.com/status-im/nimqml
06:51:39FromDiscord<flywind> There is also a client building with this fork, https://github.com/status-im/nim-status-client
06:52:15FromDiscord<gour> > You can use this fork, https://github.com/status-im/nimqml↵@flywind ahh, that's better 🙂
06:56:27Araqthe time it took you to decide on Nim could have been used for app development. you could have written your app in Lazarus. 5 times by now ;-)
06:59:07gourAraq: heh, i had difficult situation at home, could not do much...btw, i was also seriously considering fpc/lazarus :-)
07:00:22gourbtw, fidget also looks interesting, but don't like dependency on Figma...so QML sounds better in comparison
07:00:57Araqit doesn't have that dependency. If I understand it correctly, you can import the Figma code
07:01:11Araqbut you can also write it by hand, it's declarative
07:01:31gourother GUI options are nice, but, imho, not mature enough. however, considering that one of the Nim's "features" is "much better Python", it would be nice to have few mature options for GUI
07:02:21AraqI consider Python's UI support quite bad fwiw
07:02:37gourAraq: yeah, but why not having QML import then which is, at least, open-source, has free builder etc.
07:03:43gourAraq: heh, there is Pyqt/pyside2 and wxpython, among others...much better than what is available for many other languages...e.g. Go, not sure about Rust since its syntax creates pain in my eyes
07:06:54Araqwell pyqt is a QT wrapper, we have one too. Same for wxPython
07:07:37FromDiscord<flywind> pyqt5 has a great ide support(eric 6).
07:07:56gourright, but they're maintained and up-to-date
07:08:12gourmoreover, there is good docs, books etc.
07:09:01Araqgood point
07:10:27*Vladar joined #nim
07:23:50*arecacea1 quit (Remote host closed the connection)
07:24:24*arecacea1 joined #nim
07:32:51*shad0w_ quit (Remote host closed the connection)
07:35:28*Trustable quit (Remote host closed the connection)
07:38:13*solitudesf quit (Ping timeout: 256 seconds)
07:49:22FromDiscord<flywind> If i use lock in closure environment and I want call them multi times, how can I deinit lock instead of using global locks.
07:49:31FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2ymr
07:50:49*solitudesf joined #nim
07:51:42Araqwell a lock protects something and in your snippet it doesn't do anything
07:51:51Araqthe lock must live for as long as the thing you protect
07:53:12FromDiscord<Rika> why cant you put the lock in the closure?
07:53:26FromDiscord<Rika> or, oh
07:53:26FromDiscord<Rika> i see
07:54:16FromDiscord<flywind> I think, it will be used in shared heap(arc/orc) in which closure environment is shared by every thread.
07:58:02FromDiscord<flywind> I want to make closure variables thread-safe in arc/orc https://github.com/planety/prologue/blob/0a92a863922ccf5b8e23cb31fea45b542d7588fa/src/prologue/middlewares/sessions/memorysession.nim#L40
08:06:41Oddmongerfollowing the discussion from yesterday about .nim.cfg for builds, i wonder if i can display strings from within this file ?
08:06:53Oddmongeri've searched here, but found nothing: https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L55
08:06:57Araqlol what
08:07:10Oddmongerwhat i want to do is:
08:07:12Araqyou mean you need an 'echo'? use a .nims file instead then
08:08:03Oddmongeryes echo, and testing if variables are defined or not, and then exit if not defined
08:08:41FromDiscord<Rika> nims file
08:08:49Araqwhen not defined(mymum): quit "I miss my mum"
08:08:50Oddmongerah nim script, didn't knew that
08:09:21Oddmongerfine, i've found nims doc, thank you Rika and Araq
08:10:08Oddmongerso for building with Nim, there is : .nim.cfg (local config for module), nims (~ Makefile ?) and nimble (package distribution) ?
08:21:00Araqthe nimble file can include your .nims file
08:21:07Araqthat's the beauty of the system
08:21:16Araqand you can ignore the nim.cfg entirely
08:22:24FromDiscord<Recruit_main707> nimble is also makefile -ish
08:26:01Araqofftopic but an interesting read, http://solidsoftware.com.au/Information/Article/C++/Article1.html
08:27:23*Vladar quit (Quit: Leaving)
08:30:49*Tanger quit (Quit: Leaving)
08:32:13*lmariscal quit (Ping timeout: 256 seconds)
08:34:21Oddmongerahhh Borland C++ :')
08:35:10Oddmongerbut Borland ruled in Pascal land, and they disappeared with the Pascal's decline
08:38:34*krux02 joined #nim
08:41:20Araqthey disappeared when MS bought their employees
08:45:09Oddmongerbut when you thought of Pascal, you were thinking Turbo-Pascal. When you thought about C++, you weren't thinking of Turbo-C++
08:45:51Araqno? what were you thinking then? I had both Delph and C++Builder fwiw
08:45:58Araq*Delphi
08:46:01OddmongerAztec :)
08:46:41AraqAztec C++? are you kidding me? never heard of that one
08:47:11Oddmongeri thouhgt it was this one, but i cannot remember of the name
08:47:35AraqZortech?
08:47:46Oddmongerno, it was djgpp
08:48:08Oddmongerterrible name, no wonder why i forgot it
08:48:20Araqthat was GNU C++ for DOS iirc
08:48:45Araqyou would use that when you had no money for real tools :P
08:48:58Oddmongeri was using it with Dos yes, and i had no money :)
08:49:16Oddmongerbut is has dos extender, already
08:49:53FromDiscord<Clyybber> Araq: Can you close https://github.com/nim-lang/RFCs/issues/161 I don't have permissions to do so
08:49:55disbotMulti-line string literals (blocks of lines) ; snippet at 12https://play.nim-lang.org/#ix=2ymL
08:50:15Araqand then the free compilers took over and destroyed the compiler market entirely. For good. But let's not talk about that, everything is great in open-source land
08:50:51FromDiscord<ShalokShalom> https://tenor.com/view/magic-shia-labeouf-snl-skit-fingers-gif-4860090
08:51:15Oddmongerwell, there is still still VS which tends to become… ok favourite editor for Unity's teenagers :þ
08:52:19FromDiscord<Recruit_main707> vs is a very good ide
08:52:58Oddmongeryes, that's everybody says, but nobody talk about compilers side now :)
08:53:14Oddmongerthat sounds a bit weird to me, VS reduced to its editor part
08:53:32FromDiscord<Recruit_main707> cant you change the used compiler?
08:54:31Oddmongermaybe MS is selling an editor now, and not compilers :)
09:06:16*haxscramper joined #nim
09:07:01FromDiscord<Elegant Beef> Well VS is used for C# a lot and supports WPF, so for WPF you cant get a better tool really
09:08:07PMunchHmm, the hover information from nimsuggest doesn't include which exceptions it can throw..
09:08:08haxscramperalehander92: I'm not really sure about adding a lot of escape hatches. I'm actuall in favor of making syntax /a little/ overloaded but completely disallowing any custom transformation/logic for patterns. The only thing that I think /might/ be added is custom predicates but they are not necessary in overwhelming majority of cases.
09:09:16haxscramperAnd certainly no custom matcher/unpacker procs as it will make learning this thing more complicated. If one needs to check if something matches regex then use `"string" =~ re"<regex>"`. Same goes for different patterns
09:09:28haxscramperThis is really nice to have but a little to specific for stdlib
09:10:38haxscramperIf `caseStmtMacros` are no longer experimental it would be quite easy to write custom matcher. And again - just nesting conditions/patterns is more declarative and easier to understand than more 'compact' syntax
09:12:36haxscramperI think only predicate expressions that are really necessary are `fld: in {set}` and `val: == something`.
09:23:06*Zectbumo quit (Remote host closed the connection)
09:35:03*opal quit (Ping timeout: 240 seconds)
09:38:00*opal joined #nim
09:49:15FromDiscord<alehander42> sorry, escape hatches was a comment about something else and not to you
09:49:16FromDiscord<alehander42> iirc 😄
09:49:51FromDiscord<alehander42> yes, i agree that one should be very careful with custom matchers
09:50:13FromDiscord<alehander42> but it is important to think a bit of that, because otherwise the design might be too hard to change later
09:50:20FromDiscord<alehander42> even if we don't support that
09:50:28FromDiscord<alehander42> also
09:50:38FromDiscord<alehander42> it's cool to have a construction-like syntax imo
09:50:55FromDiscord<alehander42> iirc that's the way e.g. haskell does it and it makes it a bit easier to learn
09:51:22FromDiscord<ShalokShalom> Is the function in Nim already guaranteed to be pure?
09:51:26FromDiscord<alehander42> those are just notes on stuff i remembered thinking about
09:51:29FromDiscord<ShalokShalom> I heard this is about to be implemented
09:51:43FromDiscord<ShalokShalom> Despite the fact, that the documentation already states, it is.
09:51:58FromDiscord<alehander42> not necessarily comments on your design, just stuff that might be interesting to compare to as thought
09:52:18FromDiscord<haxscramper> By construction-like syntax you mean what exactly?
09:52:21FromDiscord<alehander42> e.g.
09:52:41FromDiscord<alehander42> sets to use the {a, b, c} thing, seq-s @[a, b, c] objects A(..)
09:53:01FromDiscord<alehander42> and even variants to have patty-like constructor helpers so one can construct them similarly to the way you match
09:53:04FromDiscord<haxscramper> > Is the function in Nim already guaranteed to be pure?↵@ShalokShalom Nim `func` is guaranteed to have no side effects. Last addition to that check is deep immutability for ref types
09:53:15FromDiscord<alehander42> as this is closer to the way sum types are matched in other places imo
09:53:32FromDiscord<alehander42> @ShalokShalom this needs a flag
09:53:38FromDiscord<alehander42> or experimental pragma
09:53:41FromDiscord<alehander42> strictFuncs i think
09:53:48FromDiscord<alehander42> so it's opt in
09:54:21FromDiscord<ShalokShalom> @haxscramper Thanks a lot.
09:54:23FromDiscord<ShalokShalom> Since when?
09:54:35FromDiscord<ShalokShalom> Can you send the commit please?
09:55:15FromDiscord<alehander42> did you have a look at gara? it's totally not great, but it might also have some examples of that (and the variant thing i am talking about is e.g. https://github.com/alehander92/gara/issues/5 : originally patty !)
09:55:16disbotMacro to generate variant objects
09:55:23FromDiscord<ShalokShalom> @alehander42 Thanks a lot, this will become standard, nonetheless?
09:55:35FromDiscord<alehander42> no idea : ask Araq
09:55:38Oddmongerin a nims file, how to user a variable with the «-- …» sugar syntax ?
09:55:55Oddmonger--out:myvar , will create a «myvar» file
09:56:15Oddmongerswitch("out", myvar) , is ok
09:56:25FromDiscord<alehander42> on the other hand i kinda dig the $ @ thing : sounds a bit like perl i guess
09:56:43FromDiscord<haxscramper> @alehander42 I used gara and even made a PR several months ago with some minor fixes.
09:56:46FromDiscord<alehander42> but i am a little cautious with the many symbols
09:56:48FromDiscord<alehander42> oh sorry
09:56:50FromDiscord<haxscramper> Using `[a, b, c]` vs `@[a, b, c]` for int-indexable is preferrable because not everything is a sequence and prefxi `@` does not add anything really. `A( ... )` is mostly useful for case objects
09:57:02FromDiscord<alehander42> yes, but it's more general
09:57:04FromDiscord<haxscramper> For sets - yes, I like the idea actually
09:57:14FromDiscord<alehander42> it's about construction being the opposite of extraction
09:57:20FromDiscord<alehander42> and being consistent
09:57:28FromDiscord<alehander42> but this is subjective (if this should be a goal)
09:57:42FromDiscord<alehander42> (one opposite: of course destructors are a more obvious one)
09:59:59FromDiscord<haxscramper> If you match regular object you are not really interested in the name itself I think, only in fields. When working with case objects you are also interested in checking kind field. I think `Kind( ... )` is better (closer to various ML/Haskell languages, better conveys intention). If you need to check kind against multiple values (e.g. all string literal nodes for example) can use `(kind: in StringLiterals)`
10:00:36FromDiscord<haxscramper> So this is not construction/destruction but type-definition/match-pattern
10:00:40FromDiscord<alehander42> yes, i agree
10:00:45FromDiscord<alehander42> but this is the reason
10:00:54FromDiscord<alehander42> why it's good to be able to construct them like that as well
10:01:07FromDiscord<alehander42> so that's why we had the idea to e.g. use ~Kind
10:01:14FromDiscord<alehander42> iirc
10:01:33FromDiscord<alehander42> but yeah, Kind(..) is also very close
10:01:54FromDiscord<Recruit_main707> @ShalokShalom its a pretty recent commit /the pure funcs one) so it might be in the latest nightly build, or at least in devel
10:01:59FromDiscord<alehander42> one thing that surprises me is kind: in : i expect this to be literally invalid syntax, is it valid
10:02:05FromDiscord<haxscramper> We can just support both `Kind( ... )` and `Obj( ... )` and make kind test true for lattern one
10:02:09FromDiscord<alehander42> id imagine .kind in
10:02:12FromDiscord<haxscramper> *always true
10:02:14FromDiscord<alehander42> (but it's probably also invalid?)
10:02:31FromDiscord<ShalokShalom> @Recruit_main707 Oh, thanks a lot
10:02:36FromDiscord<ShalokShalom> Thats what I have hoped for.
10:02:43FromDiscord<ShalokShalom> Sad that I need to pragma.
10:02:46FromDiscord<alehander42> yes, the only problem is if it's obvious enough
10:02:49FromDiscord<ShalokShalom> Hope this is in the next release.
10:02:54FromDiscord<alehander42> that they are two different kinds of matches
10:02:59FromDiscord<haxscramper> !eval import macros; dumpLisp((e: in 12))
10:03:01NimBot<no output>
10:03:11FromDiscord<ShalokShalom> Is there some way to define alternative keywords and operators?
10:03:15FromDiscord<alehander42> !eval import macros; dumpTree: .a in 2
10:03:16NimBotCompile failed: /usercode/in.nim(1, 26) Error: expression expected, but found '.'
10:03:20FromDiscord<ShalokShalom> Like, as an example a pipe?
10:03:29FromDiscord<alehander42> !eval import macros; dumpTree: a: in 2
10:03:31NimBotCompile failed: /usercode/in.nim(1, 29) Error: expression expected, but found 'keyword in'
10:03:55FromDiscord<alehander42> yes, you can define `->`
10:03:56FromDiscord<alehander42> function
10:04:04FromDiscord<haxscramper> > Like, as an example a pipe?↵@ShalokShalom `` proc`|`(a, b: int) = echo a, b` `` for infix `|`
10:04:12FromDiscord<alehander42> yea* ^
10:04:13orazovae[m]Hello people. I want to build a simple program to determinify an automaton.
10:04:20orazovae[m]The first step is to reduce all edges with multiple letters to multiple edges with one letter.
10:04:48FromDiscord<ShalokShalom> @haxscramper So | becomes the pipe in this example? Very convenient and nice ^^
10:04:51FromDiscord<Recruit_main707> i didnt understand a single thing about this message, so im gonna guess i cant help you lol
10:04:52orazovae[m]I would also like to have a taste in manual memory management. So how do I allocate memory for a Vertex and initialize its values?
10:05:20FromDiscord<lqdev> Vertex(field1: value1, field2: value2, …)
10:05:40FromDiscord<Recruit_main707> is your Vertex stack or heap allocated
10:05:46FromDiscord<ShalokShalom> @Recruit_main707 Someone else has mentioned that I need a pragma for now, to activate this. I hope for a default implementation in the next version of Nim.
10:06:24FromDiscord<alehander42> i doubt it: func is already used a lot
10:06:29FromDiscord<haxscramper> > !eval import macros; dumpTree: a: in 2↵@alehander42 This is treated as type definition I think, and `.a` is just invalid in general
10:06:30orazovae[m]https://pastebin.com/xyt8c7e6 here is my code
10:06:30FromDiscord<alehander42> i am not sure what the plan is
10:06:40FromDiscord<ShalokShalom> @haxscramper Does this implementation limit the pipe to ints?
10:06:56FromDiscord<haxscramper> Yes. This is just regular proc basically
10:07:14FromDiscord<lqdev> orazovae: Vertex is small, don't allocate it on the heap. also you don't need inheritance so remove the `of RootObj`
10:07:27FromDiscord<alehander42> noo
10:07:28FromDiscord<ShalokShalom> > yes, you can define `->`↵> function↵@alehander42 And how? ↵As haxscramper just showed?
10:07:28FromDiscord<haxscramper> If you want something crazy can do `` macro `|`(a, b: untyped) = echo ``
10:07:36FromDiscord<alehander42> yes ^
10:07:38FromDiscord<ShalokShalom> @haxscramper Why crazy?
10:07:41FromDiscord<alehander42> but man
10:07:42FromDiscord<lqdev> if you want to do manual memory management you also must not use seq and ref
10:07:48FromDiscord<ShalokShalom> Sounds sane to me.
10:07:53FromDiscord<alehander42> i dont like the a: b = value
10:08:00FromDiscord<alehander42> i mean on the other hand maybe i do
10:08:01FromDiscord<Recruit_main707> or regions :P
10:08:04FromDiscord<haxscramper> > @haxscramper Why crazy?↵@ShalokShalom Operator macros are not really sane thing to use IMHO
10:08:07FromDiscord<ShalokShalom> I come from F#, so pipes are mandatory to me.
10:08:08FromDiscord<alehander42> but it means if i dont capture it
10:08:15FromDiscord<alehander42> i need to write a = 0, b = 1
10:08:16FromDiscord<ShalokShalom> @haxscramper Ah 🤪
10:08:24FromDiscord<alehander42> which is a bit strange
10:08:28orazovae[m]And several questions: what's the difference between inheriting with `ref` and without. For example: type Automaton = ref object of RootObj
10:08:33FromDiscord<ShalokShalom> And how would you do a type agnostic thing sane then?
10:08:41FromDiscord<lqdev> orazovae: `ref` means managed pointer
10:08:43FromDiscord<haxscramper> Wait a second, I think I just had an idea for something really bad
10:08:46FromDiscord<lqdev> aka GC'd
10:08:58FromDiscord<alehander42> we really need threads
10:09:05FromDiscord<alehander42> in the chat 😄
10:09:07FromDiscord<lqdev> you really should not use inheritance when you don't need it
10:09:55FromDiscord<alehander42> what do you mean type agnostic
10:09:58PMunchorazovae and `of RootObj` adds the fields from what you inherit from, along with adding some hidden fields to do runtime method overloading
10:10:03FromDiscord<alehander42> you can use a generic probably
10:10:19FromDiscord<Recruit_main707> orazovae: here you have an example of manual memory management https://play.nim-lang.org/#ix=2yn8
10:10:22FromDiscord<alehander42> ohh PMunch
10:10:33PMunch@alehander42, huh?
10:10:41FromDiscord<alehander42> btw haxscramer Pmunch's macroutils have a thing that reminds me a bit of pattern matching
10:10:45FromDiscord<alehander42> it's like quote matching
10:11:00FromDiscord<alehander42> not really important for this rfc, but just cool to take a look at
10:11:07FromDiscord<haxscramper> > Wait a second, I think I just had an idea for something really bad↵@haxscramper https://play.nim-lang.org/#ix=2yn9
10:11:22FromDiscord<haxscramper> Variadic pipe operators
10:11:26orazovae[m]2. in function parameters, what's the difference between passing something by `ref`and passing with `var`. They both let you modify the passed object, right?
10:11:32FromDiscord<alehander42> the extract thing
10:11:45FromDiscord<ShalokShalom> > what do you mean type agnostic↵@alehander42 ↵ proc`|`(a, b: int) = echo a, b` This sounds very strongly like something that is limited to integers.
10:12:00FromDiscord<alehander42> PMunch we were discussing @haxscramper 's ideas for https://github.com/nim-lang/RFCs/issues/245
10:12:01disbotEarly version of RFC: Pattern matching ? ; snippet at 12https://play.nim-lang.org/#ix=2sbl
10:12:06FromDiscord<Recruit_main707> orazovae, check the last message of this thread:https://forum.nim-lang.org/t/1787
10:12:09PMunchorazovae[m], passing by var means you can change the original memory location, passing by ref means you can edit whatever the reference points to
10:12:14FromDiscord<haxscramper> > not really important for this rfc, but just cool to take a look at↵@alehander42 Yes, I saw this one. Really cool but only for NimNode so not applicable here. But nice thing to have really
10:12:14FromDiscord<ShalokShalom> @haxscramper And is this now truly serious and nonsense?
10:12:24FromDiscord<Recruit_main707> it shows the difference between ref and var arguments
10:12:29FromDiscord<alehander42> @ShalokShalom yes: so then you can use generics or maybe template
10:12:41PMunchIf you do pass in a var to a ref type you are able to change the ref to point to another object
10:12:50FromDiscord<Recruit_main707> ^
10:13:09FromDiscord<alehander42> something i really need to write about now
10:13:10FromDiscord<alehander42> thanks
10:13:39PMunch@alehander42 var vs. ref?
10:14:10PMunch~varvsref is https://forum.nim-lang.org/t/1787#11158
10:14:10orazovae[m]Sorry for disturbance. I would usually google questions like these but I don't find it quite as easy to find answers for nim as it is for other languages.
10:14:11disbotvarvsref: 11https://forum.nim-lang.org/t/1787#11158
10:14:34FromDiscord<alehander42> PMunch my nil stuff
10:14:34FromDiscord<haxscramper> > And is this now truly serious and nonsense?↵@ShalokShalom ? Just example of what you can do with term rewriting templates
10:14:36FromDiscord<ShalokShalom> @haxscramper Do you know FSharp pipes?
10:14:43FromDiscord<ShalokShalom> Since I think you confuse them
10:14:45PMunchorazovae[m], no worries :) Nim can indeed be a bit harder to find help for, but this IRC channel will help you out with pretty much anything
10:14:54FromDiscord<ShalokShalom> I mean forward pipes, usually done with maps.
10:15:04FromDiscord<Recruit_main707> and the discord server too :)
10:15:19PMunchWell yeah, but they are linked to each other :P
10:15:38PMunchSo it's the same stream of information
10:15:46FromDiscord<Recruit_main707> xD
10:15:51FromDiscord<alehander42> :))
10:16:06FromDiscord<alehander42> mate
10:16:19FromDiscord<alehander42> wow discord is trying to detect my
10:16:22FromDiscord<alehander42> browser discord accoun
10:16:24FromDiscord<alehander42> from an app
10:16:31FromDiscord<alehander42> huh i didnt know they do that
10:16:49FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/757908248689901628/Screenshot_2020-09-14-20-05-48-53_7a4090f09f6554852d748ee9fd6f40d3.jpg
10:16:58FromDiscord<ShalokShalom> You pass one function into the next
10:17:08FromDiscord<ShalokShalom> The triangle is |>
10:17:28FromDiscord<ShalokShalom> Fira Code transforms it into the ligature. 😉
10:18:17FromDiscord<haxscramper> > I mean forward pipes, usually done with maps.↵@ShalokShalom https://play.nim-lang.org/#ix=2ync
10:18:48FromDiscord<haxscramper> I just did a quick google search for `|>` operator so this is probably very primitive alternative
10:18:49FromDiscord<ShalokShalom> Ah yeah, yes
10:18:59FromDiscord<ShalokShalom> But again, limited to integer?
10:19:10FromDiscord<ShalokShalom> Thanks a lot
10:19:21FromDiscord<haxscramper> No, fully generic `` func `|>`[A, B](x: A, f: A -> B): B = f(x) ``
10:19:31FromDiscord<ShalokShalom> Oh, thanks a lot
10:20:12FromDiscord<ShalokShalom> I was confused by the line below, but this is obviously just the setup for the example 😂
10:20:28*Sembei joined #nim
10:20:35FromDiscord<ShalokShalom> How is type inference in Nim?
10:20:56FromDiscord<Clyybber> inferred
10:21:02FromDiscord<alehander42> ok
10:21:20FromDiscord<ShalokShalom> Has it a Hindley-Milner type system, or so?
10:21:22FromDiscord<alehander42> i am trying the general discord screen sharing
10:21:29FromDiscord<alehander42> i am going to work a bit on stuff
10:21:56FromDiscord<Clyybber> @ShalokShalom Nope
10:22:07FromDiscord<Clyybber> No general return type inference
10:22:14FromDiscord<ShalokShalom> So pure deduction?
10:22:16FromDiscord<haxscramper> @alehander42 I will remove `$a` for variable captures and replace it with just `a` for variable, add non-trailling pattern matches.
10:22:29FromDiscord<Clyybber> Except for literals and iterators
10:22:47FromDiscord<ShalokShalom> I would like to infer the name of a binding as its default type, is this possible?
10:22:48FromDiscord<Clyybber> Literals in the sense that you can do var x: uint = 1
10:22:55FromDiscord<haxscramper> I'm not really sure what `{a, b, c}` should do though
10:22:57FromDiscord<alehander42> @haxscramper but how would you separate if from the case of a: existingA
10:23:09FromDiscord<alehander42> @haxscramper well it is good for capturing
10:23:16FromDiscord<Clyybber> And iterators in the sense that you can do `for i in x:` and `for i, v in x:`
10:23:17FromDiscord<alehander42> e.g. stuff like {@a} (old syntax sorry)
10:23:31FromDiscord<haxscramper> Maybe `when declared(a)` ?
10:23:34FromDiscord<alehander42> or {2, *@others}
10:23:44FromDiscord<Clyybber> @ShalokShalom Please elaborate
10:24:16FromDiscord<ShalokShalom> Like that const test = "super" is inferred as type test instead string.
10:24:32FromDiscord<Clyybber> huh?
10:24:36FromDiscord<ShalokShalom> (edit) 'test' => '*test*' | 'string.' => '*string*.'
10:24:39FromDiscord<Clyybber> thats incredibly cursed
10:24:51FromDiscord<alehander42> no, it's just surprising
10:24:55FromDiscord<alehander42> but you can do that with a macro
10:24:59FromDiscord<ShalokShalom> I like to have more refined types
10:25:02FromDiscord<ShalokShalom> Yes?
10:25:36FromDiscord<Rika> why dont we have return type inference?
10:25:52FromDiscord<ShalokShalom> I see less sense in a type system, when you have 40 different ints, 60 strings and 10 floats, which you are *NOT* supposed to combine with each other
10:25:52FromDiscord<Rika> is it thought as dumb, is it hard to squeeze in, or what
10:25:53FromDiscord<haxscramper> > or {2, *@others}↵@alehander42 `{2}` means `len(set) == 1 and contains(set, 2)`, `{2, *@others}` means `len(set) >= 1 and contains(set, 2)` followed by `for val in set: if val != 2: other.incl val`. Correct?
10:26:08FromDiscord<Recruit_main707> generic returns 👀
10:26:30FromDiscord<ShalokShalom> > but you can do that with a macro↵@alehander42 How? 👀
10:26:32FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2yne
10:26:52FromDiscord<ShalokShalom> I already have my pipe, that would save my day ^^
10:28:59FromDiscord<ShalokShalom> What does ```import sugar``` do? ↵So, what does sugar do, sounds like syntactic sugar? 👀
10:29:10FromDiscord<Clyybber> yep, its a module with macros
10:29:12FromDiscord<ShalokShalom> Ah, found it.
10:30:17FromDiscord<ShalokShalom> Hnn, two arrows, and both for procedures?
10:30:25FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/757911672898715679/Screenshot_2020-09-22-12-29-48-88.jpg
10:30:45FromDiscord<ShalokShalom> I guess I can just copy the while lib and change that to a pure func.
10:31:12FromDiscord<ShalokShalom> Seems like I could change Nim into a fully-fledged functional language 😊
10:31:15FromDiscord<haxscramper> Is there a way to make regular proc into infix? Like this operators I can use `` `|`(a, b) `` for prefix notation
10:31:50FromDiscord<Clyybber> @ShalokShalom You can attach pragmas with those macros
10:31:56FromDiscord<ShalokShalom> Hnnn
10:32:03FromDiscord<Clyybber> so you can have f: (int, int) {.noSideeffect.} -> int
10:32:04FromDiscord<ShalokShalom> That means? They change its behavior?
10:32:15FromDiscord<Clyybber> It makes it a pure functions
10:32:18FromDiscord<Clyybber> (edit) 'makes' => 'make'
10:32:25FromDiscord<Clyybber> (edit) 'make' => 'makes' | 'functions' => 'function'
10:32:39FromDiscord<ShalokShalom> Aah. Yeah, I read about {.noSideeffect}
10:33:14FromDiscord<ShalokShalom> But I would save noise, by simply creating my own version of sugar, I guess?
10:33:36FromDiscord<Clyybber> sure, there has been a proposal to add special syntax for func versions of these macros
10:33:46FromDiscord<ShalokShalom> But this pragma thing is definitely useful.
10:33:52FromDiscord<Clyybber> I think they used ==> and -->
10:33:58FromDiscord<ShalokShalom> Uff
10:34:09FromDiscord<ShalokShalom> I dont plan to use proc at all, so...
10:34:21FromDiscord<Recruit_main707> thats gonna be hard
10:34:28FromDiscord<Clyybber> what is?
10:34:33FromDiscord<ShalokShalom> I use Godot and it's C++ API to do this
10:34:37FromDiscord<Recruit_main707> i just try to write func, and if it errors, i sure proc xD
10:34:39FromDiscord<ShalokShalom> Nim is for the logic.
10:34:53FromDiscord<Rika> @haxscramper anything stropped is infix afaik
10:35:02FromDiscord<ShalokShalom> Godot/GDScript
10:35:08FromDiscord<haxscramper> > @alehander42 I will remove `$a` for variable captures and replace it with just `a` for variable, add non-trailling pattern matches.↵And disallow multiple uses for the same variable in single pattern
10:35:25FromDiscord<Rika> so something like ```proc `test`() = discard``` is infix
10:35:28FromDiscord<Clyybber> @Rika Nope, anything that uses only operator symbols and has two args is
10:35:33FromDiscord<Rika> really?
10:35:37FromDiscord<Rika> ah
10:35:38FromDiscord<Rika> no
10:35:44FromDiscord<Rika> also some certain words
10:35:44FromDiscord<Clyybber> But its a funny idea
10:35:45FromDiscord<Rika> are infix
10:35:47FromDiscord<Rika> but not all words
10:35:52FromDiscord<Clyybber> Only operators
10:35:58FromDiscord<Clyybber> like not and or mod div
10:35:59FromDiscord<ShalokShalom> I mean, I like -> for types, that is exactly as in GDScript, so I dont need to adapt.
10:36:04FromDiscord<Rika> operators makes me think "symbols"
10:36:33FromDiscord<ShalokShalom> Yeah, me too
10:36:36FromDiscord<Clyybber> @Rika Having custom infix operators that can also be words would make the parsing dependent on the semantics
10:36:38FromDiscord<ShalokShalom> But we are wrong.
10:36:46FromDiscord<ShalokShalom> I always forget this.
10:36:56FromDiscord<Rika> ok
10:37:13FromDiscord<ShalokShalom> How to register something as operator, in the first place?
10:37:18FromDiscord<Rika> you dont
10:37:25FromDiscord<ShalokShalom> I mean, is this samething the user can do?
10:37:28FromDiscord<Clyybber> @ShalokShalom Simply use operator symbols
10:37:34FromDiscord<Rika> only certain combinations of alphanum characters and most symbols are
10:37:48FromDiscord<haxscramper> And maybe add support for binding checks in form of `(fld: variable.matchesPredicate())`. I just really love how rust macros handle pattern matching with tree categories
10:37:55FromDiscord<Clyybber> @ShalokShalom https://nim-lang.github.io/Nim/manual#lexical-analysis-operators
10:38:06FromDiscord<ShalokShalom> @Clyybber Yeah, I plan to do so.
10:38:16FromDiscord<ShalokShalom> >> is already in use?
10:38:26FromDiscord<Clyybber> maybe somewhere
10:38:29FromDiscord<ShalokShalom> Does the macro overwrite default behavior?
10:38:36FromDiscord<Clyybber> but not without importing some weird shit
10:38:37FromDiscord<ShalokShalom> I mean in the core language
10:38:42FromDiscord<ShalokShalom> Superb
10:38:43FromDiscord<Clyybber> what macro?
10:38:58FromDiscord<ShalokShalom> So both |> and >> are free.
10:39:01FromDiscord<Clyybber> the core language also uses custom operators
10:39:08FromDiscord<Clyybber> they are defined in system.nim
10:39:23FromDiscord<ShalokShalom> Thats all very good.
10:39:29FromDiscord<Rika> also thankfully `>>` isnt shr in this language so you have that
10:39:34FromDiscord<ShalokShalom> The language is much more flexible than Rust.
10:39:39FromDiscord<Rika> easily
10:39:48FromDiscord<ShalokShalom> And also far less noisy.
10:40:27FromDiscord<ShalokShalom> So, the 'use my own type for each binding' issue? Is this possible?
10:40:42FromDiscord<ShalokShalom> > Like that const test = "super" is inferred as type *test* instead *string*.
10:41:48*abm joined #nim
10:41:51FromDiscord<Rika> you can probably make a macro for that
10:42:50*Trustable joined #nim
10:43:39FromDiscord<ShalokShalom> Thanks a lot
10:44:00FromDiscord<Clyybber> *but* its really cursed and I don't get why you would ever want that
10:44:03FromDiscord<Rika> hey
10:44:05FromDiscord<Rika> dont judge
10:44:12FromDiscord<Rika> nim itself is pretty cursed on its own
10:44:14FromDiscord<Clyybber> vvvvv
10:44:16FromDiscord<haxscramper> By they way, macro has full access to types. It involves some workarounds though and not really pretty in general
10:47:25FromDiscord<ShalokShalom> @Clyybber I dont plan to use this all the time
10:47:47FromDiscord<ShalokShalom> I dont get why people use 40 different integers, which they dont like to match.
10:48:11FromDiscord<ShalokShalom> To me, primitive types are cursed, at least on tbe surface.
10:48:17FromDiscord<Rika> hey, *sometimes* its useful, but to that point it sounds more hindrance than useful
10:48:40FromDiscord<ShalokShalom> I use the type system to shape my code.
10:48:55FromDiscord<Clyybber> well, its useful if you intend to code efficiently
10:48:57FromDiscord<ShalokShalom> You can even implement business logic in it.
10:49:09FromDiscord<Rika> why tho
10:49:35FromDiscord<ShalokShalom> @Clyybber You mean in terms of performance? I think such custom types get compiled into their primitive forms, at least other languages do that.
10:49:43FromDiscord<ShalokShalom> https://nim-lang.github.io/Nim/manual#lexical-analysis-operators
10:49:58FromDiscord<Clyybber> what custom types?
10:50:05FromDiscord<Clyybber> I'm talking about using uint8 when you need it
10:50:28FromDiscord<Clyybber> for example
10:50:35FromDiscord<ShalokShalom> Sounds superb, while I dont see any documentation (here or otherwhere) about the types shr, shl and so on, it seems not being linked.
10:50:54FromDiscord<Clyybber> shr shl are not types
10:50:56FromDiscord<Rika> shr is not a type
10:51:01FromDiscord<ShalokShalom> > I'm talking about using uint8 when you need it↵@Clyybber In case Iike it so performant as possible, I can do it
10:51:06FromDiscord<ShalokShalom> Sorry, operators.
10:51:10FromDiscord<ShalokShalom> I am still sleepy.
10:51:15FromDiscord<Rika> you can find those in `system`
10:51:25FromDiscord<Rika> https://nim-lang.org/docs/system.html#shr%2Cint%2CSomeInteger
10:51:27FromDiscord<Clyybber> theres a search box
10:51:27FromDiscord<ShalokShalom> I mean, the docs to it.
10:51:29FromDiscord<ShalokShalom> Tha ms
10:51:36FromDiscord<ShalokShalom> Yeah, didnt find any?
10:51:46FromDiscord<ShalokShalom> (edit) 'Tha ms' => 'Thanks.'
10:52:02FromDiscord<Clyybber> typing in `shr` into the search box yields a bunch of shr for me
10:52:13FromDiscord<Rika> works for me https://media.discordapp.net/attachments/371759389889003532/757917154971615242/unknown.png
10:52:21FromDiscord<Rika> albeit broken theme still
10:52:26FromDiscord<ShalokShalom> Yeah, I am on mobile
10:52:26FromDiscord<Clyybber> @Rika using the stable docs, cursed
10:52:30FromDiscord<Rika> dont worry, its fixed next stable
10:52:35FromDiscord<Rika> well
10:52:36FromDiscord<Clyybber> I know
10:52:38FromDiscord<Rika> i mean
10:52:42FromDiscord<Rika> i was talking to shalok
10:52:47FromDiscord<Clyybber> oh
10:52:57FromDiscord<Clyybber> yeah search bar doesn't appear for me at all on mobile
10:53:01FromDiscord<ShalokShalom> I used find in the methods page 🙈
10:53:07FromDiscord<Rika> regards me using stable docs, its because i didnt realize devel docs was also built
10:53:18FromDiscord<Rika> and im too lazy to replace my search box
10:53:18FromDiscord<ShalokShalom> Like, the build in one from the browser.
10:53:21FromDiscord<Clyybber> @Rika https://nim-lang.github.io/Nim/manual
10:53:28FromDiscord<Clyybber> @ShalokShalom gotcha
10:53:33FromDiscord<Rika> > and im too lazy to replace my search box
10:53:43FromDiscord<Clyybber> I I don't understand
10:53:57FromDiscord<Rika> ive known for a while already, im just lazy to switch
10:54:00FromDiscord<ShalokShalom> Documentation is Nim is complete and overall good
10:54:02FromDiscord<Clyybber> do you have the nim manual set up as a search engine somehow?
10:54:05FromDiscord<Rika> docs arent complete
10:54:20FromDiscord<Clyybber> nothing is ever complete
10:54:33FromDiscord<Rika> no, i have some jank version of search (basically `https://nim-lang.org/docs/%s.html`)
10:54:38FromDiscord<Rika> i type down module names
10:54:42FromDiscord<ShalokShalom> While it had been the reason for my last leave of Nim as a language, since it's so convoluted and unorderly
10:54:46FromDiscord<Rika> i know most of them by heart already so its not hard for me to remember
10:55:30FromDiscord<ShalokShalom> It has obviously been grown over the years and grew so big, that it became to big for the structure... All is all over the place. 🙄
10:55:41FromDiscord<Clyybber> eh, I think its fine
10:55:47FromDiscord<Rika> i think it can be better
10:55:52FromDiscord<ShalokShalom> Yeah, you already know it...
10:55:55FromDiscord<Clyybber> you can make it better :P
10:56:04FromDiscord<ShalokShalom> I did suggest this
10:56:22FromDiscord<ShalokShalom> I actually already had setup some examples and was ready to port it
10:56:31FromDiscord<Rika> i think they mean you directly contributing code to nim
10:56:35FromDiscord<Rika> ah
10:56:36FromDiscord<Rika> what happened?
10:56:42FromDiscord<ShalokShalom> But Andreas meant in the last minute 'meh' lets leave it that way.
10:56:42FromDiscord<Clyybber> the issue with docs is that the people who see the problems can't fix them and the people who could fix them don't see the problems
10:57:09FromDiscord<ShalokShalom> I considered a dedicated docs instance, and also sorting the current version.
10:57:30FromDiscord<ShalokShalom> Jekyll offers documentation templates
10:58:02FromDiscord<ShalokShalom> https://vsoch.github.io/docsy-jekyll/
10:58:51FromDiscord<ShalokShalom> I could work with you together, since I see lots of potential descriptions being improvable
10:59:14FromDiscord<ShalokShalom> I just know I dont quite get them, while I have no idea what how to improve them.
10:59:48FromDiscord<Clyybber> ~improvingdocs is the issue with docs is that the people who see the problems can't fix them and the people who could fix them don't see the problems
10:59:48disbotimprovingdocs: 11the issue with docs is that the people who see the problems can't fix them and the people who could fix them don't see the problems
11:00:16FromDiscord<Clyybber> just archiving since I like that quote
11:00:30FromDiscord<ShalokShalom> Yeah, I honestly see myself willing to do that and in cooperation with the community, also able
11:00:44FromDiscord<Clyybber> what do you want to improve, the styling?
11:00:45FromDiscord<ShalokShalom> I would study Nim in the process, so its a clear win to me anyway
11:01:00FromDiscord<ShalokShalom> No, the consistency and that all in in one place
11:01:09FromDiscord<Clyybber> how is jekyll related though?
11:01:13FromDiscord<ShalokShalom> Now it feels like hundreds of different sources got collected.
11:01:35FromDiscord<Clyybber> https://nim-lang.github.io/Nim/lib.html
11:01:36FromDiscord<ShalokShalom> @Clyybber The webpage is in Jekkyl and Andreas said he would never accept Hugo
11:01:43FromDiscord<Clyybber> Ah, I see
11:01:53FromDiscord<ShalokShalom> I would also use any other one that is accepted by the community
11:02:12FromDiscord<Clyybber> did you see the page I linked?
11:02:26FromDiscord<ShalokShalom> I really dont care about the underlying technique, more about the readability.
11:02:30FromDiscord<Clyybber> yeah, I think the tech is fine
11:02:45FromDiscord<haxscramper> Isn't there an `edit` button for every proc? It tooke me less than ten seconds to edit random documentation - https://github.com/nim-lang/Nim/compare/devel...haxscramper:patch-1
11:03:16FromDiscord<ShalokShalom> @Clyybber Yes, this reads interesting and that I have never seen it, suggests its relatively well hidden.
11:03:24FromDiscord<Clyybber> Heh, nope not at all
11:03:27FromDiscord<Clyybber> its the second link
11:03:28FromDiscord<haxscramper> Maybe streamline this process (remove CI checks for documentation patches and automatically assign 'doc patch' label so they can be quickly processed)
11:03:30FromDiscord<Clyybber> on all pages
11:03:35FromDiscord<Clyybber> its right below manual
11:03:39FromDiscord<ShalokShalom> @haxscramper I am not concerned about the editability.
11:03:51FromDiscord<ShalokShalom> I am concerned about the acceibiltiy.
11:03:55FromDiscord<Clyybber> You just missed it :)
11:03:57FromDiscord<ShalokShalom> (edit) 'acceibiltiy.' => 'accessibility.'
11:04:46FromDiscord<Clyybber> maybe its hidden on mobile tho
11:04:46FromDiscord<Clyybber> not sure
11:04:46FromDiscord<ShalokShalom> Yeah, I also missed the documentation for newbies, since I clicked on docs instead on learn. 🙈
11:05:01FromDiscord<ShalokShalom> Its just all over the place.
11:05:16*NimBot joined #nim
11:05:21FromDiscord<ShalokShalom> Like one, nice documentation
11:05:39FromDiscord<haxscramper> Something closer to haxe/rust documentation where they have something closer to a book
11:05:59FromDiscord<ShalokShalom> I also think that being able to link from one place to the other would help.
11:06:00FromDiscord<Rika> maybe we need to move the more technical info in manual to an actual spec or so
11:06:21FromDiscord<ShalokShalom> Like in that case, that I just showed about the operators: shl, div and so on.
11:06:35FromDiscord<haxscramper> Yes, like starting beginner manual with EBNF description of the language is a bit unnecessary IMO
11:06:35FromDiscord<Yardanico> Current manual is more or less a spec
11:06:43FromDiscord<ShalokShalom> @haxscramper Yes, totally.
11:06:44FromDiscord<Yardanico> Well it's not a beginner manual
11:06:52FromDiscord<Yardanico> It is a complete manual of the language
11:07:05FromDiscord<Rika> then we need a beginner manual 🙂
11:07:35FromDiscord<haxscramper> Separate it into sections that are marked as 'beginner' and 'spec' then. No need to have to separate documents, but splitting current one is probably not that bad of an idea
11:07:58FromDiscord<haxscramper> *splitting into smaller sections
11:08:14FromDiscord<Clyybber> > Its just all over the place.↵Its not, its linked together by https://nim-lang.github.io/Nim/lib.html
11:08:30FromDiscord<Clyybber> We can't accomodate for every link someone might miss
11:08:34FromDiscord<haxscramper> 'beginner', 'spec', 'advanced' and 'horrible-hacks-with-term-rewriting-macros'
11:08:39FromDiscord<Rika> LOL
11:08:57FromDiscord<ShalokShalom> > Something closer to haxe/rust documentation where they have something closer to a book↵@haxscramper This is my goal. And I think both Gitbook and the Jekkyl theme can do that.
11:09:30FromDiscord<ShalokShalom> I just dont wanna do it, and then it gets rejected 🤷‍♂️
11:09:56FromDiscord<Clyybber> I don't like the book approach
11:10:04FromDiscord<Clyybber> Sections and scrolling is fine
11:10:05FromDiscord<ShalokShalom> > then we need a beginner manual 🙂↵@Rika There is one?
11:10:13FromDiscord<Clyybber> There is a tutorial
11:10:26FromDiscord<Clyybber> https://nim-lang.org/docs/tut1.html
11:10:28FromDiscord<ShalokShalom> @Clyybber Youn still have sections and scrolling in books?
11:10:34FromDiscord<ShalokShalom> Its just more ordered.
11:10:37FromDiscord<Clyybber> But you have to switch pages
11:10:40FromDiscord<Clyybber> its unneccessary
11:10:55FromDiscord<haxscramper> I think this should be a one big rst document but then just split it into several pages when rendering html. Like with org-mode you can write whole website and then present it in chunks with necessary size
11:10:59FromDiscord<Rika> > I just dont wanna do it, and then it gets rejected 🤷‍♂️↵@ShalokShalom you can always make one without it being put in the nim repo cant ya?
11:11:03FromDiscord<ShalokShalom> I dont like that either. But we dont need to do it that way.
11:11:15FromDiscord<ShalokShalom> @Rika Yes.... Just for myself.
11:11:18FromDiscord<Clyybber> https://nim-lang.org/docs/tut2.html
11:11:20FromDiscord<Clyybber> https://nim-lang.org/docs/tut3.html
11:11:25FromDiscord<Rika> or for other people to link as well
11:11:42FromDiscord<Clyybber> @ShalokShalom were you aware of these pages?
11:11:43FromDiscord<ShalokShalom> And then I ask myself, if I truly like to port the whole documentation, just to use it myself.
11:11:51FromDiscord<ShalokShalom> @Clyybber Yes.
11:12:03FromDiscord<ShalokShalom> They are one of the most newbie friendly docs I found.
11:12:13FromDiscord<Clyybber> Hmm, but why do we need to port the whole documentation to something else?
11:12:21FromDiscord<Clyybber> I don't see how the current one is fundamentally broken
11:12:24FromDiscord<ShalokShalom> I was already on my way to complain back then and then I found them.
11:12:27FromDiscord<Clyybber> :D
11:12:43FromDiscord<Clyybber> Maybe they should be linked below the manual
11:13:04FromDiscord<ShalokShalom> @Clyybber The documentation is not broken, just its presentation and overall searchability.
11:13:17FromDiscord<ShalokShalom> Its just a confusing mess now.
11:13:32FromDiscord<Clyybber> I disagree, I don't get the point about searchability
11:13:43FromDiscord<Clyybber> we have a search box
11:13:47FromDiscord<ShalokShalom> Surely not, when I invest couple of hours into it. But this is not, how you get new people on board.
11:14:04FromDiscord<ShalokShalom> @Clyybber I used that one previously and it yielded millions of results.
11:14:22FromDiscord<Clyybber> So we should improve the search algo/heuristics
11:14:28FromDiscord<ShalokShalom> Every single instance of a word or anything gets listed, not by priority.
11:14:44FromDiscord<ShalokShalom> Yes, that too. And the said implementations have this by default.
11:15:05FromDiscord<ShalokShalom> Also, Learn/Docs under one tab and Andreas is against this
11:15:07FromDiscord<Clyybber> Its far more effort to redo the whole docs than to just tweak the existing
11:15:28FromDiscord<ShalokShalom> While he said also, that he would like the combination prior to that in the forum.
11:16:04FromDiscord<Clyybber> IMO to improve docs its not necessary to switch doc backends
11:16:24FromDiscord<Clyybber> So regarding the presentation, how can we improve?
11:16:35FromDiscord<Clyybber> And do you have some specific pages in mind?
11:17:09FromDiscord<ShalokShalom> As said: Put them all under one roof.
11:17:21FromDiscord<ShalokShalom> Not spread across multiple documents.
11:17:30FromDiscord<Clyybber> Huh?
11:17:31FromDiscord<ShalokShalom> I want to access all docs from one page.
11:17:38FromDiscord<Clyybber> But I linked you the page
11:17:40FromDiscord<ShalokShalom> And links between all important parts.
11:17:45FromDiscord<Clyybber> which links all stdlib docs
11:17:54FromDiscord<Clyybber> Theres always a link to the manual
11:18:01FromDiscord<ShalokShalom> The libs, yes. And this is not, how I imagine it.
11:18:04FromDiscord<Clyybber> Theres always a link to the stdlib docs
11:18:16FromDiscord<Clyybber> The thing which I didn't find a link to is the tutorial
11:18:26FromDiscord<ShalokShalom> I dont know, how you can navigate with that page and nothing else, I cant do it.
11:18:53FromDiscord<ShalokShalom> The only thing that would really help me, is something like Docsy and Gitbook, personally.
11:19:20FromDiscord<Clyybber> please list concrete problems, I don't know docsy or gitbook
11:19:30FromDiscord<ShalokShalom> You already know 80% of the language, I know less than 1% 🤷‍♂️
11:19:54FromDiscord<Clyybber> I mean, I'm a dev, but I started out as you did
11:19:57FromDiscord<Rika> basically search shit is what im getting from this
11:20:13FromDiscord<Rika> i mean, search is shit
11:20:14FromDiscord<Clyybber> yeah, thats noted, but about the presentation part I'm wondering
11:20:30FromDiscord<Clyybber> @ShalokShalom what does docsy or gitbook do differently?
11:22:04FromDiscord<Clyybber> I know radare and crystal use gitbook and its cool
11:22:29FromDiscord<Clyybber> hmm I think I know one thing that would make this section index much nicer
11:23:02FromDiscord<Clyybber> That is having the section list be "before" the actual text
11:23:28FromDiscord<Clyybber> I don't know how to say that in terms of webdev but @Rika might know
11:23:46FromDiscord<Rika> wait what im no web dev
11:24:01FromDiscord<Clyybber> hmm, actually thats already the case.
11:24:06FromDiscord<Clyybber> sorry rika :P
11:24:10FromDiscord<Rika> though i dont understand what you mean anyway
11:24:17FromDiscord<Rika> so even if i were i wouldnt be able to help
11:24:42FromDiscord<Clyybber> @ShalokShalom Please look at the docs on desktop, mobile docs I find shitty too :D
11:25:04FromDiscord<Clyybber> Because they don't have the sidebar with the search box headers and so on
11:25:12FromDiscord<ShalokShalom> I did start on desktop
11:25:16FromDiscord<ShalokShalom> Now I am on mobile
11:25:52FromDiscord<ShalokShalom> @Clyybber Is there anything else next to turning pages, that you dislike about Gitbook?
11:25:58FromDiscord<Rika> i think the sidebar should scroll with the browser viewpoint
11:26:15FromDiscord<Rika> or rather the sidebar is not anchored with the docpage
11:26:43FromDiscord<Clyybber> @ShalokShalom Not really, but I don't see why we would need to replace current docgen with gitbook to fix its presentation
11:26:55FromDiscord<Clyybber> So thats why I'm bugging you about concrete points :D
11:28:07FromDiscord<ShalokShalom> Since its not all under one hood
11:28:23FromDiscord<ShalokShalom> And mainly because the separate points take too much space
11:28:33FromDiscord<ShalokShalom> Its very spacious, how its now.
11:29:00FromDiscord<Clyybber> Hmm, do you think it would help to make the sidebar go with scrolling?
11:29:06FromDiscord<Clyybber> so that its always in view?
11:29:17FromDiscord<ShalokShalom> https://nim-lang.org/documentation.html
11:29:39FromDiscord<ShalokShalom> No, I think those points being index entries, small and on the side, that helps.
11:29:49*Trustable quit (Remote host closed the connection)
11:30:19FromDiscord<Clyybber> Ah sure
11:31:24FromDiscord<Clyybber> Yeah, I think that can be improved
11:31:53FromDiscord<Clyybber> @ShalokShalom For easily nagivating the manual for example, what do you think about making the sidebar always be in view?
11:32:13FromDiscord<Clyybber> So that you don't have to scroll to the top to search for another section
11:34:29FromDiscord<ShalokShalom> Which sidebar?
11:34:49FromDiscord<ShalokShalom> Ah, you mean that one in the desktop view?
11:34:52FromDiscord<Clyybber> Yeah
11:34:59FromDiscord<ShalokShalom> Yes, and also making it available on mobile.
11:35:18FromDiscord<Clyybber> yep agree
11:35:27FromDiscord<ShalokShalom> Like, by swiping or clicking, while less critical, since most use the desktop, when coding.
11:35:49FromDiscord<ShalokShalom> Also, sorting it out, so that learn and documentation can be one.
11:36:08FromDiscord<Clyybber> we should simply link the tutorial in the sidebar
11:36:14FromDiscord<ShalokShalom> I dont get why switching between the two is senseful, personally.
11:36:22FromDiscord<ShalokShalom> Yes, you can?
11:36:29FromDiscord<ShalokShalom> And all the other content?
11:36:30FromDiscord<Clyybber> there is value in seperating spec and tutorial
11:37:28FromDiscord<Clyybber> The other stuff doesn't belong IMO
11:38:49FromDiscord<ShalokShalom> I would more sort the whole thing into categories and subcategories, so we can fit more into less space.
11:40:10FromDiscord<ShalokShalom> How are those elements called, who are similar to drop down menus, so categories who flip content visible and invisible?
11:40:21FromDiscord<ShalokShalom> https://nim-lang.org/learn.html
11:40:40FromDiscord<Clyybber> dropdowns?
11:40:49FromDiscord<ShalokShalom> Yes
11:40:49*arecacea1 quit (Remote host closed the connection)
11:40:55FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/757929410346090576/Screenshot_2020-09-22-13-40-33-45_3aea4af51f236e4932235fdada7d1643.jpg
11:41:02FromDiscord<ShalokShalom> This whole page could be one simple line
11:41:11FromDiscord<ShalokShalom> And not one full page.
11:41:26FromDiscord<Clyybber> Hey, please look at the desktop layout
11:41:34FromDiscord<Clyybber> I know mobile is kinda bad
11:41:35FromDiscord<Clyybber> :D
11:41:39FromDiscord<ShalokShalom> Yes, it does the same thing
11:41:46FromDiscord<ShalokShalom> It just has more space to waste
11:41:59FromDiscord<Rika> one line? i dont see how
11:42:06*arecacea1 joined #nim
11:42:07FromDiscord<ShalokShalom> And it overwhelms newbies as well, since there are still so much objects on the screen.
11:42:15FromDiscord<ShalokShalom> @Rika Community ressources
11:42:27FromDiscord<ShalokShalom> Click and you see the content that is associated
11:42:36FromDiscord<Rika> eeh why
11:42:44FromDiscord<Clyybber> But now instead of scrolling you have to click and then scroll
11:42:48FromDiscord<ShalokShalom> Because it saves screen space.
11:43:03FromDiscord<Clyybber> I think reducing the line spacing could help
11:43:08FromDiscord<ShalokShalom> You would have that all in the sidebar, like Gitbook.
11:43:14FromDiscord<ShalokShalom> That too.
11:43:21FromDiscord<Clyybber> But all of that doesn't belong in the sidebar
11:43:26FromDiscord<Clyybber> some of it are blogs
11:43:53FromDiscord<ShalokShalom> While its still unnecessary content. I dont stress newbies with lots of documents, they are overwhelmed with.
11:44:19FromDiscord<Clyybber> who actually gets stressed by information?
11:44:27FromDiscord<Clyybber> Its not like you *have* to click or read it
11:44:41FromDiscord<Rika> i dont get it
11:44:51FromDiscord<Rika> why would this stress someone
11:45:02FromDiscord<Rika> no one's holding you at gunpoint forcing you to read everything
11:45:02FromDiscord<Clyybber> I think we could make it smaller, by reducing the space between Header and Description but other than that I think its fine
11:46:30FromDiscord<ShalokShalom> That would already help
11:46:38FromDiscord<ShalokShalom> I would still dislike it
11:46:51FromDiscord<ShalokShalom> > no one's holding you at gunpoint forcing you to read everything↵@Rika My eyes do
11:47:44FromDiscord<Clyybber> @ShalokShalom I say start with uncontroversial small improvements
11:47:51FromDiscord<ShalokShalom> > some of it are blogs↵@Clyybber Blogs could get into a dedicated 'Community section' together with the links to social media, since 'Learn and Documentation' could get merged.
11:47:58FromDiscord<Clyybber> I think this is nim-lang/website territory tho
11:48:04FromDiscord<ShalokShalom> @Clyybber That fine for sure.
11:48:06FromDiscord<Clyybber> so you'd have to change that in that repo
11:48:24FromDiscord<ShalokShalom> Yes, I already had the PRs ready.
11:48:35FromDiscord<ShalokShalom> That is actually quite easy to manage.
11:48:40FromDiscord<Clyybber> @ShalokShalom but many learning resources come from the community
11:48:51FromDiscord<Clyybber> so I'm not sure how much it makes sense to seperate the two
11:49:01*waleee-cl joined #nim
11:49:27FromDiscord<ShalokShalom> I also thought about a split between the docs for developing on the language from that one who show you how to use the language and put the dev docs onto the same page as 'source'
11:49:45FromDiscord<Clyybber> also if its not too much to ask for, include screenshots in the PR description so that people can vote without building the website/docs themselves
11:49:47FromDiscord<ShalokShalom> So effectively making 'Source' 'Development '
11:50:01FromDiscord<ShalokShalom> Yes, good idea.
11:50:53FromDiscord<Clyybber> Yeah, the fact that internal compiler docs is linked in the sidebar is a bit weird to me
11:51:01FromDiscord<Clyybber> IMO it should be linked from docs/intern
11:52:40FromDiscord<ShalokShalom> 👌
11:53:32FromDiscord<ShalokShalom> > @ShalokShalom but many learning resources come from the community↵@Clyybber Yeah, Community resources still stay there. I thought you mean regular blogs, unrelated to docs.
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:40*supakeen joined #nim
12:15:37*shad0w_ joined #nim
12:26:09*Kaivo quit (Quit: WeeChat 2.9)
12:39:29Oddmongerwhat's wrong with putting « --warning[LockLevel]:off » in a task of a nims file ?
12:39:42Oddmongerthe other parameters are accepted, but not this one
12:39:53Oddmonger Error: invalid command line option: '--warning[LockLevel]'
12:40:16Oddmongernothing in the forum about that (and not in google too)
12:40:41FromDiscord<Clyybber> does it work from the command line?
12:40:51FromDiscord<Clyybber> I don't see warning[LockLevel] in the list of warnings
12:40:54Oddmongerit was working in .nim.cfg
12:41:23Oddmongerand it seems to be real parameter: https://forum.nim-lang.org/t/1394#8680
12:41:24FromDiscord<Clyybber> Ah, gotcha
12:41:43FromDiscord<Clyybber> Use https://nim-lang.github.io/Nim/nimscript#warning%2Cstring%2Cbool
12:42:24Oddmongerahhh , thank you
13:06:37*nyd joined #nim
13:17:12*Trustable joined #nim
13:31:27*opal quit (Remote host closed the connection)
13:32:41*opal joined #nim
13:35:26*superbia joined #nim
14:03:11Oddmongerah … i'd like to set « --hints » on or off , depending of a sentry file put in /tmp. If the sentry file has been accessed less than one minute, hints are off when compiling. But i don't have access to getLastAccessTime from os module, in nimscripts
14:06:26Oddmongeranyway that's not serious, but i wonder why os module is forbidden from nimscripts
14:12:53*PMunch quit (Quit: leaving)
14:13:45FromDiscord<lqdev> it's not
14:13:58FromDiscord<lqdev> you can do `from os import getLastAccessTime` afaik
14:14:06Oddmongeroh
14:15:14Oddmongerstill i get : this proc is not available on the NimScript target; usage of 'getLastAccessTime' is an {.error.} defined at …
14:16:06Oddmongerbut maybe that's another problem (i had read some modules were unavailable in nim scripts and took that explaination)
14:16:24Araqyes, only some procs from os.nim are supported in nimscript
14:16:39Araqfor two reasons: we like to encourage reproducible builds
14:16:59Araqand it's not always that easy to make the VM support the operation
14:17:19Oddmongerok
14:17:48Oddmongermay be i could parametrize nohint instead
14:18:29Araqif I wanted a system where everything could be done and nothing understood, I know where to find makefiles and autoconf and config.h files produced from a 40_000 line shell script
14:18:37*Trustable quit (Remote host closed the connection)
14:19:43Oddmongeryou are hard with Make :)
14:19:58Oddmongerbut i understand your point of view
14:20:16Oddmongerno need to remake what's already make
14:20:34FromDiscord<haxscramper> `quote do:` affects line info for all interpolated nodes: is this an intended behaviour that should be worked around using temporary from `copyNimNode` or a bug? https://play.nim-lang.org/#ix=2yoL
14:21:50AraqOddmonger: what do you suggest? parametrize hint with what?
14:23:19Oddmongeri wanted to say with my bad english: passing a parameter when launching compilation, for turning hints on or off. Like: « nim debug --hintsoff project »
14:23:42Oddmongerfor the moment, i'm doing « nim debug project », no parameters for the moment
14:30:16*sealmove joined #nim
14:30:46sealmoveIs it possible to use `from` and `as` in one `import` statement?
14:32:15*shad0w_ quit (Remote host closed the connection)
14:33:08Araq!eval from (strutils as su) import toLowerAscii
14:33:10NimBotCompile failed: /usercode/in.nim(1, 6) Error: invalid module name: '(strutils as su)'
14:33:20Araq!eval from strutils as su import toLowerAscii
14:33:22NimBot<no output>
14:33:40Araq!eval from strutils as su import toLowerAscii; echo toLowerAscii('A')
14:33:43NimBota
14:33:51Araqseems to work fine
14:33:57FromDiscord<Clyybber> !eval from strutils as su import toLowerAscii; echo su.toLowerAscii('A')
14:34:00NimBota
14:34:17Araq!eval from strutils as su import nil; echo su.toLowerAscii('A')
14:34:19NimBota
14:35:39FromDiscord<slonik_az> sent a long message, see http://ix.io/2yoQ
14:36:01FromDiscord<slonik_az> I am following nimble docs to the letter
14:36:11FromDiscord<gour> i'm trying to install wxnim(using nimble), but it says: "Package not found" ?
14:36:34FromDiscord<shashlick> @slonik_az it's a new features only in devel
14:36:41FromDiscord<shashlick> What version of Nim you using
14:38:40FromDiscord<slonik_az> sent a code paste, see https://play.nim-lang.org/#ix=2yoS
14:38:42FromDiscord<shashlick> Araq: thoughts on https://gist.github.com/genotrance/469a590858cde5c91005aafc8bbcfe81
14:40:25FromDiscord<shashlick> @slonik_az that's not the latest - 9/2
14:40:38Araqeverything you write makes lots of sense, I need to **finally try out** all this new exciting stuff and then I can comment :-)
14:41:28FromDiscord<shashlick> @slonik_az namedBin was only added on the 11th
14:42:23FromDiscord<shashlick> Araq: I still need to respond to zah but I'm hoping to solve both his and your requirement with a simpler user workflow
14:43:39FromDiscord<shashlick> Given 1.4 is around the corner though, I don't think it will be in time - especially since there's no agreement
14:43:55FromDiscord<shashlick> The other package structure proposal has also stalled
14:45:48FromDiscord<slonik_az> @shashlick thanks for the help. ↵The nimble docs are totally confusing. The experimental features are not marked as such in the giant REDME file that serves as the documentation on github and is linked from the main nim's doc page for the stable release.↵I installed Nim using recommended `choosenim` route and was expected to get installation that is consistent with the docs found on Nim portal https://nim-lang.org/documentation.ht
14:45:55alehander92:)
14:46:21FromDiscord<shashlick> I agree - no devel vs stable docs
14:46:34FromDiscord<shashlick> I'll look into it
14:46:42*arecacea1 quit (Remote host closed the connection)
14:47:06*arecacea1 joined #nim
14:47:23FromDiscord<slonik_az> Actually there are dev version of the docs under https://nim-lang.github.io/Nim/
14:47:32FromDiscord<alehander42> @haxscramper i think kinda yeah for sets
14:47:57FromDiscord<alehander42> not super important tho
14:48:09FromDiscord<shashlick> @slonik_az that's for Nim, not nimble
14:49:07FromDiscord<alehander42> does someone want to watch me streaming
14:49:27FromDiscord<slonik_az> @shashlick : you are right
14:50:35Araqgour: wxnim is not on Nimble
14:51:24FromDiscord<shashlick> I think nimble also needs a devel vs stable
14:51:43Araqyou need to git clone it yourself, https://github.com/PMunch/wxnim
14:52:05FromDiscord<Clyybber> @shashlick Do you have a link to your package structure proposal?
14:52:12FromDiscord<alehander42> ill be https://discord.gg/9kDkaj
14:52:27FromDiscord<shashlick> https://github.com/nim-lang/nimble/wiki/Package-structure-and-Interop
14:52:51FromDiscord<haxscramper> > I think kinda yeah for sets↵@alehander42 No, I think this is easy to support actually. Working on it right now. I decided to use `@` for captures always. I think is not really possible in the end to get rid of some kind of prefix for variable capture (because in situation like `fld: enumValue` is it not clear whether `.fld == enumValue` should be generated or `(enumValue = .fld; true)`. Not without type information, which I really
14:53:36FromDiscord<Clyybber> @alehander42 Huh, how did you create such a link?
14:53:41FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2yoZ
14:53:48FromDiscord<alehander42> yeah i just shared it somehow
14:53:49FromDiscord<Clyybber> ah found it!
14:53:57FromDiscord<haxscramper> Or `Asgn([@lhs is Ident(), @rhs]):`
14:54:38sealmoveI can't figure out how to use block argument syntax with htmlgen macros...
14:54:40FromDiscord<haxscramper> > not super important tho↵@alehander42 Basic syntax for checking if set contains some value and capturing all 'other' values should be supported I think
14:55:02sealmovefor example `echo h1("Nim")` works fine, but `echo h1: "Nim"` doesn't
14:55:16FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2yp0
14:55:49FromDiscord<alehander42> a prfix sounds cool to me
14:56:36FromDiscord<Clyybber> @shashlick Looks good to me!
14:56:37FromDiscord<haxscramper> Because we basically have (1) literal values, (2) arrays/sequences, (3) sets, (4) key-value pairs and (5) objects. Should support all of them in one way or another
14:56:59FromDiscord<Clyybber> @alehander42 Doesn't look like you are streaming tho
14:57:08FromDiscord<alehander42> huh
14:57:17FromDiscord<Clyybber> sealmove: Thats an echo issue
14:57:25FromDiscord<alehander42> well i see it , but i have no idea how
14:57:28FromDiscord<haxscramper> E.g. `==`, `[idx]`, `in`, `key in table and table[key] == <...>` and `.fld == `
14:57:34FromDiscord<alehander42> it's in th right of the screen
14:57:36FromDiscord<alehander42> for me
14:57:43sealmovebut it's the same problem when trying to save the macro result in a string
14:57:59FromDiscord<Clyybber> sealmove: Its a problem with the code block syntax
14:58:22FromDiscord<Clyybber> Its the same reason why `result.add quote: ...` doesn't work
14:58:31FromDiscord<haxscramper> It works
14:58:32FromDiscord<Clyybber> and you have to do `result.add quote do: ...`
14:58:40FromDiscord<haxscramper> Sometimes
14:59:02FromDiscord<Clyybber> I wanted to fix that for quite some time
15:00:05sealmoveoh, `do` keyword helps, nice
15:00:46Araqhow is it fixable?
15:01:36FromDiscord<alehander42> @haxscramper sounds ok
15:01:40FromDiscord<Clyybber> by making it bind to the most recent call
15:01:49FromDiscord<alehander42> but what do you mean for .a ==
15:01:52FromDiscord<alehander42> isn't it fld:
15:04:00FromDiscord<alehander42> Araq
15:04:09FromDiscord<alehander42> i wrote a SeqOfDistinct impl
15:04:14FromDiscord<alehander42> and it seems useful to me
15:04:15FromDiscord<haxscramper> `expr.fld == Value`
15:04:22FromDiscord<alehander42> especially with many handles / indices
15:04:29FromDiscord<alehander42> so i want to keep it
15:04:31Araqalehander42: totally agree
15:04:50FromDiscord<alehander42> ok
15:04:54Araqkeep it and put it into a helper module for all us compiler devs
15:04:59FromDiscord<alehander42> so happy, i was ready to argue
15:05:16FromDiscord<alehander42> yeah: about that, that was my plan as well
15:05:35FromDiscord<alehander42> but it seems to me eventually it can be useful for stdlib too one day, as distinct types are a good practice
15:05:42FromDiscord<alehander42> but fusion might also be it
15:05:45FromDiscord<alehander42> anyway this is offtopic
15:07:35*nyd quit (Quit: nyd)
15:10:09FromDiscord<alehander42> Araq btw what's the logic for assigning symbol id-s to dot expr fields
15:10:23FromDiscord<alehander42> as they are not really like separate expressions
15:10:45FromDiscord<alehander42> it seems Nilable(field: ..) and a.field.a : here i think i get different symbol id-s for field
15:11:09Araqno idea what you mean
15:11:29Araqmaybe you refer to 'let obj.field = f()' which is introduced by lambda lifting
15:12:12FromDiscord<alehander42> well e.g. in a.field.a you have a dot expr where you have a nkSym field as well, right
15:14:19FromDiscord<alehander42> oh man i found it
15:14:28FromDiscord<alehander42> in a.field.a i have a nkHiddenDeref as well
15:14:38FromDiscord<alehander42> so that's why i get a different hash
15:15:41FromDiscord<shashlick> @Clyybber thanks - please feel free to comment on the forum post to get it moving 😄
15:19:22FromDiscord<alehander42> so @haxscramper
15:20:08FromDiscord<haxscramper> yes?
15:20:41FromDiscord<haxscramper> I'm implementing `*_` right now, maybe in `+-3` hours I will have some kind of finalized syntax description
15:20:51*Vladar joined #nim
15:22:06*shad0w_ joined #nim
15:22:19FromDiscord<alehander42> is it possible that your adblocker somehow prevents it @Clyybber : i read an old forum like https://www.reddit.com/r/discordapp/comments/6ge7bw/cant_connect_to_voice_chat_on_the_browser_version/
15:22:34FromDiscord<alehander42> yes so about unification
15:22:36FromDiscord<haxscramper> Although i would like to use `..` instead. Maybe treat `@a .. @b` to capture variables?
15:22:42FromDiscord<alehander42> let's say we dont have a: @a, b: @a
15:22:52FromDiscord<alehander42> then how can i say that i want .a to be equal to .b
15:22:56FromDiscord<alehander42> even without capturing?
15:23:22FromDiscord<haxscramper> Use if inside of match arm
15:25:01FromDiscord<haxscramper> I don't think it is a good idea to mix unification with pattern matching too much. They are really similar, but nim is not a ML/prolog so I'd better leave predicate checking to `if`
15:26:49FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ypb
15:27:10FromDiscord<Clyybber> Araq: I take it https://github.com/nim-lang/Nim/pull/15386 is good to merge when its green?
15:27:11disbotFix forward declarations in shadow scope contexts
15:27:41shad0w_i have no scope, bot.
15:27:49FromDiscord<Clyybber> lol
15:28:19Araqadd Cooldome's test too
15:28:26FromDiscord<Clyybber> Ok
15:28:35AraqI don't like test overfitting
15:29:03Araq("great, the tiny reduced example works now. And in the real world it still doesn't.")
15:29:08FromDiscord<alehander42> but how would the if
15:29:15FromDiscord<alehander42> ah it would be just inside
15:29:19FromDiscord<alehander42> other posibility is jut to
15:29:29FromDiscord<alehander42> make it (a: @a, b: @b) and a == b
15:29:41FromDiscord<shashlick> Araq: this is my only pending nimble change - https://github.com/nim-lang/nimble/pull/852
15:29:42disbotLocaldeps flag support
15:29:42FromDiscord<alehander42> and can be a good alternative
15:30:03sealmoveStupid question again, how do you write this htmlgen block syntax? I can't even find an amountable example on the internet. This doesn't compile: https://play.nim-lang.org/#ix=2ypc
15:30:05FromDiscord<alehander42> imho for some cases so we dont need to have like nested ifs too much
15:30:22FromDiscord<haxscramper> It only makes sense to support something like this if you want to make several patterns that just check for equality of internal captures, which is what `if` is for IMO
15:30:35FromDiscord<Clyybber> Araq: I was wary of including the big one since it loops for a bit
15:30:40FromDiscord<Clyybber> But I guess its fine
15:30:47Araqhuh?
15:31:00Araqyou can usually reduce the number of loop iterations
15:32:22FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ypd
15:33:34Araqhaxscramper: symbol injecting macros are really problematic with today's Nim
15:34:00Araqusually you can test it inside a ' proc g[T](x: T) = ...' to see what I mean
15:34:29FromDiscord<Clyybber> Araq: Ok, added it.
15:34:37FromDiscord<Clyybber> Should I attach merge_if_green?
15:34:39Araqin fact, I consider an interesting, terrible language design problem
15:36:23FromDiscord<haxscramper> > haxscramper: symbol injecting macros are really problematic with today's Nim↵I didn't have any problems with macro injectsions basically ever. And I certainly have very convoluted combinations of macro-insideof-generic-inside-of-callback-proc
15:36:39FromDiscord<haxscramper> Like I *really* can't remember any problems at all.
15:36:51Araq:-)
15:36:52FromDiscord<haxscramper> With both typed and untyped macros
15:37:15Araqyou're special, ask mratsim for a rant
15:37:53AraqI wrote a 'unsemAst' proc for typed macros once
15:38:05*WilhelmVonWeiner quit (Read error: Connection reset by peer)
15:38:12*WilhelmVonWeiner joined #nim
15:38:32FromDiscord<haxscramper> Well, I sometimes write code that makes me feel sorry for the compiler, but maybe I just got lucky and somehow dodged everything
15:38:36*WilhelmVonWeiner is now known as Guest90270
15:38:38FromDiscord<mratsim> you called?
15:39:09FromDiscord<mratsim> I'm not ranting, I'm thoroughly documenting while preparing a generic sandwich
15:39:37AraqI'm not talking about generic sandwiches
15:39:46FromDiscord<mratsim> - https://github.com/nim-lang/RFCs/issues/44↵- https://github.com/nim-lang/Nim/issues/8677
15:39:47disbot[Meta] Generics/Static early symbol resolution
15:40:13FromDiscord<mratsim> No one is allowed to talk about generic swandwich
15:40:16FromDiscord<mratsim> it's a very secret club
15:40:45FromDiscord<haxscramper> Oh, youi mean this type of injection. Sorry, for some reason I just thought about `{.inject.}`
15:41:06Araqbummer
15:41:23FromDiscord<haxscramper> Yes, I got just destroyed by this when writing nimtrs
15:41:45FromDiscord<haxscramper> And hparse too. And basically anything that involves iteration over hashset too
15:42:29Araqyeah yeah, enough of it. :-/
15:42:37*Guest90270 quit (Client Quit)
15:42:52*WilhelmV1nWeiner joined #nim
15:42:59*shad0w_ quit (Ping timeout: 240 seconds)
15:42:59FromDiscord<shashlick> Araq: looks like nimterop is passing all tests with `--gc:arc -d:useMalloc`
15:43:48FromDiscord<alehander42> hmmmm
15:43:55FromDiscord<alehander42> but and is a good escape hatch
15:44:19*gour_ joined #nim
15:44:22Araqhaxscramper: so ... any ideas?
15:45:08*WilhelmV1nWeiner quit (Client Quit)
15:45:22AraqI think one problem is 'untyped' is simply the wrong thing.
15:45:24FromDiscord<haxscramper> About symbol injection? None. I'm not really familiar with compiler to comment on anything like that yet.
15:45:52Araqforget about the compiler, how do we write DSLs that compose better
15:46:41*sagax quit (Remote host closed the connection)
15:46:41FromDiscord<haxscramper> Be very careful when choosing DSL primitives, preferrably enhance existing language constructs instead of inventing new ones
15:47:22FromDiscord<haxscramper> I can plug things inside of `case` easily because it is just an advanced version of default language construct
15:47:44Araqyou cannot introduce variable bindings via '@x'
15:48:02FromDiscord<mratsim> @ is taken for seq conversion btw
15:48:02*gour quit (Ping timeout: 258 seconds)
15:48:05FromDiscord<alehander42> but with @Araq you maybe can!
15:48:28FromDiscord<haxscramper> > @ is taken for seq conversion btw↵@mratsim isn't it just an operator with couple overloads?
15:48:34FromDiscord<mratsim> yes
15:48:40FromDiscord<alehander42> ->a might be a good dsl
15:48:45FromDiscord<alehander42> b: ->a
15:48:48FromDiscord<mratsim> a "T" overload I think
15:49:10FromDiscord<alehander42> even ruby added -> i think
15:49:15FromDiscord<mratsim> ah maybe not
15:49:16FromDiscord<alehander42> so its not super rare
15:49:21FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ypk
15:49:22FromDiscord<mratsim> you need to do @[foo]
15:49:25Araq->a is ugly but that's all that the point
15:49:29Araq*all not
15:49:34FromDiscord<haxscramper> Which one? I think `.._` is better
15:49:40Araqargh
15:49:42*Araq dies
15:49:43FromDiscord<alehander42> no, ruby added `=>`
15:49:57FromDiscord<shashlick> Araq: tests still fail without `-d:useMalloc` but there's a dll load involved
15:50:03FromDiscord<mratsim> ~> is better :p
15:50:03disbot>: 11better :p
15:50:15FromDiscord<haxscramper> `*&$#&(*@&($`
15:50:15FromDiscord<alehander42> no @haxscramper i mean `->` instead of `@a`
15:50:18FromDiscord<mratsim> >~>
15:50:27FromDiscord<alehander42> but i kinda think we need a way to bind
15:50:31FromDiscord<shashlick> Araq: I also updated that issue stating how nimrtl cannot be compiled today with gc:arc
15:50:35*Kaivo joined #nim
15:50:38FromDiscord<alehander42> and how to do it with `lhs =` ?
15:50:43FromDiscord<mratsim> can't we just reuse the "bind" keyword
15:50:58Araqshashlick, yeah, will work on it after 1.2.x is out
15:51:05FromDiscord<alehander42> A(a = b:, c: 4) ?
15:51:13FromDiscord<mratsim> I don't like how "distinct" is reused but here it seems like there is no ambiguity
15:51:16FromDiscord<alehander42> A(a = b: _, c: 4)
15:51:20FromDiscord<alehander42> hm, maybe
15:52:00FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2ypr
15:52:47FromDiscord<alehander42> i imagined it more `->ident`, but this probably better
15:52:48*thomasross joined #nim
15:52:58FromDiscord<alehander42> but thhe other posibilities ssemsto be
15:52:58FromDiscord<haxscramper> Spacing is irrelevant
15:53:04FromDiscord<mratsim> ah regarding symbol resolution, bind many, bind once is also a fun one to read on https://github.com/nim-lang/RFCs/issues/153
15:53:06disbotUse a keyword different from `distinct` for `bind many` behaviour ; snippet at 12https://play.nim-lang.org/#ix=2yps
15:53:41FromDiscord<alehander42> we can have also `A(a = a: _, b: 2)
15:53:44FromDiscord<alehander42> (edit) '2)' => '2)`'
15:53:53FromDiscord<alehander42> and A(a: bind a, b: 2)
15:53:54FromDiscord<haxscramper> I will just use `const pattVarPrefix {.strdefine.}: string = "->"`
15:54:13FromDiscord<alehander42> noo we dont want everyone to use his own binding syntax imho
15:54:31FromDiscord<haxscramper> > we can have also `A(a = a: _, b: 2)`↵@alehander42 `Error: expected: ')', but got: ':'`
15:54:45FromDiscord<alehander42> yeah, but a parser fix can make it work
15:54:59FromDiscord<alehander42> and it seems Araq is ok with parser fixes for the matching
15:55:10FromDiscord<haxscramper> No. no parser fixes for simple macro dsl, this is just overkill I think
15:55:17FromDiscord<alehander42> but it's not about this only
15:55:19Araqno, I'm not
15:55:22FromDiscord<alehander42> but for "better dsls"
15:55:28FromDiscord<alehander42> ok, i just remembered a comment
15:55:34FromDiscord<alehander42> but maybe it was only about guards
15:55:45FromDiscord<alehander42> well then how can we have binding with `=`
15:55:55FromDiscord<alehander42> we'd need a different syntax in dsl-s
15:56:01AraqI'm talking about the general 'it' problem, how do we know that 'mapIt(it == 3)' introduces the 'it' symbol
15:56:33FromDiscord<alehander42> yeah but here the dsl usr introduces it in case
15:56:34disruptekhope.
15:56:35FromDiscord<haxscramper> `a = fld: patt()` is the same as `fld: @a is patt()` or `fld: -> a is patt()`
15:56:36Araqhow do we know that '@@x' (for example!) introduces a new local variable x inside the pattern matching macro
15:56:47FromDiscord<alehander42> which is a bit different than mapIt where the macro always does
15:57:11FromDiscord<alehander42> disruptek hope is good
15:57:20Araqand do we need to know this?
15:57:28disrupteknope.
15:57:51FromDiscord<alehander42> we do: but for now documentation + convention
15:57:56FromDiscord<haxscramper> > how do we know that '@@haxscramper' (for example!) introduces a new local variable x inside the pattern matching macro↵this is the same as `mapIt`, `foldl` and others. `re.=~`. Just write in documentation that `@XXX` creates variable with type of matched field
15:57:56FromDiscord<alehander42> seem ok-ish
15:58:11FromDiscord<alehander42> the point is to be something that most dsl-s can reuse as convention
15:58:20disruptekwhy do you think we need to know?
15:58:27FromDiscord<alehander42> maybe even something checkable with a tool
15:58:43FromDiscord<haxscramper> `@XXX` is good enough. Already used for all pattern matching libraries in nim
15:58:54Araqdisruptek: because of the open/closed symbol lookups inside generic code
15:58:55FromDiscord<alehander42> "does this expansion produces locals not annotated like @ or ->"
15:59:09FromDiscord<alehander42> or "not annotated in its pragma"
15:59:25disruptekit should be valud code if `it` is not a thing. what else?
15:59:33FromDiscord<alehander42> mapIt can have metainfo in its declaration
16:00:04disrupteki mean, if you omit it, thats fine, no?
16:00:10FromDiscord<haxscramper> > maybe even something checkable with a tool↵I'm porting https://hal.archives-ouvertes.fr/hal-01054552/document to nim. I want to write too that does ast diffing for old source code and compiled one
16:00:43Araqtemplate foo() = let x = 3 # ok, 'x' is gensym'ed. We can do this because we understand 'let'
16:01:04FromDiscord<alehander42> very cool, i had in mind something more specific tho
16:01:05Araqtemplate mylet(name, x) = let name = x; template foo() = mylet(x, 3) # er...
16:01:21FromDiscord<alehander42> something that just plugs in expansion pass and detects locals which are producd
16:01:21FromDiscord<haxscramper> Is it possible to use effect for this?
16:01:44Araqthat's the design problem I'm talking about
16:02:09FromDiscord<alehander42> hmm
16:05:10Araqone option would be to have (let x) as a construct that introduces 'x', mapIt(let it, it == 0)
16:05:54Araqor one or more operators that do the same. these have to be built into the language
16:08:47*snowolf quit (Remote host closed the connection)
16:11:09FromDiscord<alehander42> but why for mapIt
16:11:23FromDiscord<alehander42> this makes sense for stuff that generates various symbols
16:11:34FromDiscord<alehander42> but mapIt can just have a pragma {.gen: ["it"].}
16:11:51FromDiscord<alehander42> and the compiler can know it whenever it needs to (or is it about code readability)
16:12:15AraqmapIt can be specialized as you outlined
16:12:27Araqbut now the same problem comes up for pattern matching
16:12:39FromDiscord<alehander42> yes, I agree
16:13:12FromDiscord<alehander42> hm, so stuff like
16:13:19FromDiscord<alehander42> A(a: let local) ?
16:13:46FromDiscord<alehander42> or `of let local, A(a: local)`
16:13:54FromDiscord<alehander42> i cant really see it working with the current syntax
16:13:59FromDiscord<alehander42> if it's not an op
16:14:42FromDiscord<alehander42> but cant the compiler just write down the newly generated local symbols automatically while expanding
16:14:54*snowolf joined #nim
16:15:11Araqthe problem is that in an 'untyped' context there is no expansion
16:16:37FromDiscord<alehander42> eh, there is some step where one replaces the old ast with the result of the macro
16:16:50FromDiscord<alehander42> but yeah doesnt make sense
16:17:17FromDiscord<alehander42> what i imagind was filtring
16:17:24FromDiscord<alehander42> the untyped output for stuff like var and let sections
16:17:38FromDiscord<alehander42> and just annotating that those idents are "new"
16:17:51sealmoveis there a proc to prettify html?
16:19:40FromDiscord<haxscramper> Maybe annotate all elements that might generate identifiers with `gen`? Like `quote do:` etc. and make it a compilation error if new identifier is introduced in generated code? Although it won't work with things like `ident("UserDefinedInput")` - e.g. actual name of the variable won't be known in general
16:21:23FromDiscord<haxscramper> Some kind of ast fingerprinting to differentiate between generated and user-provided one and check only generated
16:23:47FromDiscord<alehander42> yeah the compiler knows enough to recognize new ident decls
16:24:15FromDiscord<alehander42> even without any annotation
16:25:13*WilhelmV1nWeiner joined #nim
16:27:06*WilhelmV1nWeiner is now known as WilhelmVonWeiner
16:33:01FromDiscord<haxscramper> In case if I match `IfStmt([*ElseIf([_, @bodies]), @bodies])` it is logical to expect `@bodies` to be a seq of all nodes.
16:33:37FromDiscord<haxscramper> Support for optional captures is a good idea? `[_, ?@secondElement]` where it would be injected as `Option[]`
16:34:31FromDiscord<alehander42> yeah, optionals sound good, but not sure if they are easy to support
16:34:39FromDiscord<haxscramper> Pretty easy
16:34:53FromDiscord<alehander42> but actually often i'd want a default or value
16:35:03FromDiscord<alehander42> because option requires me to do additional match
16:35:06FromDiscord<alehander42> but yeah
16:35:41FromDiscord<haxscramper> `IfStmt([*ElseIf([_, @bodies]), newEmptyNode() ?@ bodies])` looks good?
16:36:15FromDiscord<haxscramper> https://github.com/haxscramper/nimtrs#regex-like-pattern-matching-termpattern
16:36:35FromDiscord<alehander42> it's a cool thing to have
16:36:50FromDiscord<haxscramper> E.g. 'search until' for variadic patterns?
16:37:06FromDiscord<alehander42> but i wonder if other people might
16:37:09FromDiscord<alehander42> expect unification
16:37:25FromDiscord<alehander42> e.g. A(a: @b, b: @b) where
16:37:27FromDiscord<alehander42> those are seq-s
16:38:36FromDiscord<haxscramper> Well, I can just die with long error message about how we don't support unification. Variable is either a seqence (has been used at least once in variadic context) or a single instance. If this is a single instance it should be used only once
16:38:41FromDiscord<haxscramper> Although ...
16:38:52FromDiscord<alehander42> yeah but if they are both seq-s
16:40:37FromDiscord<alehander42> Araq i hit many bugs running it on stdlib/test you said
16:40:42FromDiscord<alehander42> thanks, a good way to test it
16:41:03FromDiscord<alehander42> going out for a travel to Plovdiv
16:41:07FromDiscord<alehander42> bbl 🙂
16:41:15FromDiscord<haxscramper> Alright I will try to have variadic patterns, alternatives and unification but for some reasone I'm not sure if this is really simple
16:41:46*D_ quit (Remote host closed the connection)
16:42:42*D_ joined #nim
16:48:06*shad0w_ joined #nim
16:48:51*shad0w_ quit (Remote host closed the connection)
17:01:13*sagax joined #nim
17:02:13*a_chou joined #nim
17:07:28*a_chou quit (Remote host closed the connection)
17:10:49FromDiscord<Avatarfighter> Ello party people what is up
17:11:05*Ergpopler joined #nim
17:11:11ErgpoplerAYOOO
17:11:14*lmariscal joined #nim
17:11:19Ergpopleranyone here
17:11:28FromDiscord<Avatarfighter> ya whats up
17:11:45Ergpoplerdamn IRC pretty fire ngl
17:12:16ErgpoplerKonversation
17:30:34*mmohammadi9812 joined #nim
17:36:35FromDiscord<exelotl> I'm on quassel following yardanico's recommendation (but I don't use it for #nim since I already have discord for that)
17:37:43FromDiscord<exelotl> My verdict is: quassel desktop client is kinda garbage, but quasseldroid is the best client ever. xD
17:37:49Oddmongeri'm sure i can have a proc in a table… but how ? https://play.nim-lang.org/#ix=2yq9
17:39:03FromDiscord<lqdev> it's `proc ()` not `proc`
17:39:27FromDiscord<lqdev> `proc` is a generic type that matches any proc with any formal params
17:39:36Oddmongerohhh
17:39:44Oddmongeromg
17:39:47Oddmongerthank you
17:40:30FromDiscord<lqdev> i'd recommend that you put the proc type in a typedef tho, otherwise it can get messy real quick with a lot of repetition
17:40:42FromDiscord<lqdev> unless it's only used once ofc
17:41:49Oddmongerhum i think i'm going nowhere with this table…maybe there are better options for linking a parameter to an action
17:42:40Oddmongerthe error message is even funnier than before
17:43:46*solitudesf quit (Read error: Connection reset by peer)
17:44:05FromDiscord<Avatarfighter> what are you trying to do oddmonger?
17:44:09*solitudesf joined #nim
17:44:56Oddmongeri want to parse command line, and being able to display recognized commands
17:45:10Oddmongerso the same table for parsing and displaying help
17:45:57FromDiscord<Avatarfighter> so based on the inputs you're calling a proc in a table?
17:47:17*confundus joined #nim
17:47:19Oddmongeryes
17:49:53Oddmongermy best try: https://play.nim-lang.org/#ix=2yqc
17:50:52*confundus quit (Client Quit)
17:54:53*natrys joined #nim
17:55:32FromDiscord<lqdev> what's the error?
17:56:55Oddmongerrror: type mismatch: got <array[0..0, tuple of (string, proc (){.locks: 0.})]>
17:56:56Oddmongerbut expected one of:
17:56:58Oddmongerproc (pairs: openArray[tuple of (string, fx)]): Table[system.string, in.fx]{.noSideEffect, locks: <unknown>.}
17:57:37*natrys quit (Client Quit)
17:57:50Oddmongerif it expects a function with no side effects, it won't work anyway (as my function sets global var)
17:58:25*natrys joined #nim
18:08:09FromDiscord<lqdev> odd
18:08:54*oculuxe joined #nim
18:09:42*oculux quit (Ping timeout: 265 seconds)
18:10:59Oddmongerat least it's not a stupid error (errrm … i hope)
18:16:26ZevvClyybber. I'm so sorry, but I hate it :/
18:17:28*waleee-cl quit (Quit: Connection closed for inactivity)
18:20:33*sealmove quit (Quit: WeeChat 2.8)
18:33:40disruptekhate what?
18:34:40FromDiscord<Clyybber> Zevv: I know :D
18:34:47FromDiscord<Clyybber> And I understand you
18:35:01FromDiscord<Clyybber> disruptek: My npeg PR
18:35:19FromDiscord<Clyybber> disruptek: this one https://github.com/zevv/npeg/pull/26
18:35:19disbotAllow capturing on the LHS of a rule definition
18:36:11*arecacea1 quit (Remote host closed the connection)
18:36:52*arecacea1 joined #nim
18:40:16*Zectbumo joined #nim
18:43:21*mmohammadi98122 joined #nim
18:43:39*mmohammadi98122 quit (Client Quit)
18:44:05*mmohammadi9812 quit (Ping timeout: 240 seconds)
18:45:35*gmaggior joined #nim
18:51:33FromDiscord<Clyybber> disruptek: do you like that? :D
18:55:40*gour_ quit (Remote host closed the connection)
19:02:34ZevvI hate all of it
19:02:58ZevvI'll merge it if you promise not to tell anyone npeg can do that
19:04:07FromDiscord<Nisha (LGBTQ+)> Heya everyone, could you guys give me the repos of all of the websocket libs you know of?
19:04:14*sealmove joined #nim
19:04:30Zevvand if you refactor the duplicate code inside parseGrammar
19:04:36Zevvjust put it into a nested proc or something
19:09:21*mmohammadi9812 joined #nim
19:10:03FromDiscord<Clyybber> Yeah, locally I have a TODO there
19:10:15FromDiscord<Nisha (LGBTQ+)> :P
19:10:29FromDiscord<Clyybber> @Nisha (LGBTQ+) I know theres treeform/ws
19:10:35FromDiscord<Clyybber> Other than that I don't know any :D
19:10:48FromDiscord<Nisha (LGBTQ+)> Alright, thanks :P
19:15:10*narimiran quit (Ping timeout: 246 seconds)
19:15:37*sealmove quit (Quit: WeeChat 2.8)
19:22:25disruptekclyybber: if zevv says it's bad, it's bad.
19:27:31*vicfred quit (Quit: Leaving)
19:29:48FromDiscord<Clyybber> Heh
19:30:38FromDiscord<Clyybber> Zevv: I pushed a change, I first put it into a nested proc but in the end I typed more than I saved so I do it differently now
19:31:31FromDiscord<Clyybber> let me know if it fits your coding style
19:36:02FromDiscord<Clyybber> and I promise I won't tell anyone (except for Yardanico :)
19:39:58*FromDiscord quit (Remote host closed the connection)
19:40:12*FromDiscord joined #nim
19:40:24*FromDiscord quit (Remote host closed the connection)
19:40:37*FromDiscord joined #nim
19:40:49*FromDiscord quit (Remote host closed the connection)
19:41:02*FromDiscord joined #nim
19:41:27*FromDiscord quit (Remote host closed the connection)
19:41:40*FromDiscord joined #nim
19:42:21*FromDiscord quit (Remote host closed the connection)
19:42:39*FromDiscord joined #nim
19:46:59*Ergpopler quit (Ping timeout: 240 seconds)
20:01:18*gmaggior quit (Ping timeout: 260 seconds)
20:03:08*jacereda joined #nim
20:03:09jaceredaHi
20:03:13jaceredais there a clean way to handle converting a set of enum flags into a bitflags type? Something like expressing that any of the enum flags are implicitly convertible to the bitflags type?
20:09:02*vicfred joined #nim
20:14:12*gmaggior joined #nim
20:31:19Zevvclyybber: fair enough, I'll merge the change but not the test. otherwise people might realize this is possible and use ut
20:34:02*waleee-cl joined #nim
20:39:50Zevvhttps://github.com/zevv/npeg/commit/fc986c00b541e723fc5e1536872a01b7c074f351
20:40:32Zevvis that cool or what. That you just can type `>patt` in nim and that's also valid.
20:46:18disruptekclyybber: would you really merge this shit if it were your project?
20:46:44*Jjp137 quit (Quit: Leaving)
20:47:00*Jjp137 joined #nim
20:47:15*haxscramper quit (Remote host closed the connection)
20:48:16disruptekjacereda: cast[int](flags); give your enum the {.size: sizeof(cint).} ... all this is in the manual.
20:48:19disruptek~manual
20:48:20disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
20:54:43*opal quit (Ping timeout: 240 seconds)
20:56:27jaceredadisruptek: I don't want to use casts, anyways, krux02 gave me the solution, just use set[]
20:57:00*Trustable joined #nim
21:08:03*Vladar quit (Remote host closed the connection)
21:21:38disruptekyou don't need to cast if you follow the manual.
21:27:28FromGitter<Lecale> Why did I decide to convert something from python to nim when I don't know python?
21:35:34*mmohammadi9812 quit (Quit: I quit (╯°□°)╯︵ ┻━┻)
21:40:12*Kaivo quit (Quit: WeeChat 2.9)
21:48:05*solitudesf quit (Ping timeout: 240 seconds)
21:50:19*natrys quit (Quit: natrys)
22:04:27*fowl quit (Ping timeout: 240 seconds)
22:05:23*NimBot joined #nim
22:09:07*Trustable quit (Remote host closed the connection)
22:23:10*gmaggior quit (Ping timeout: 260 seconds)
22:36:03*gmaggior joined #nim
22:40:25FromGitter<deech> Superficial thing but have trailing commas been discussed?
23:21:51*Zectbumo quit (Remote host closed the connection)
23:22:34disruptekfor what? echo?
23:23:20*Zectbumo joined #nim
23:25:48*opal joined #nim
23:35:36FromGitter<deech> eg. `@[1,2,3,]`
23:47:04*jacereda left #nim ("ERC (IRC client for Emacs 27.1)")
23:55:35disruptekthat's permitted afaik.
23:57:02FromGitter<deech> I'll be damned. It does for seqs, could have sworn I ran into a case with collections where it didn't.