<< 28-09-2022 >>

00:24:40*tanami quit (Ping timeout: 244 seconds)
00:34:16FromDiscord<Iliketwertles> got what i wanted https://media.discordapp.net/attachments/371759389889003532/1024479117623701554/screenshot_2022-09-27-202250.png
00:42:24FromDiscord<ChocolettePalette> I mean, doesn't any program support this?
00:45:53FromDiscord<Iliketwertles> support what?
00:46:39FromDiscord<Prestige> reading from stdin
00:47:38FromDiscord<Iliketwertles> i mean final product is what i wanted, i wanted to make a lolcat type program without looking at lolcats source
00:56:40FromDiscord<Prestige> https://nim-lang.org/docs/terminal.html would be useful
00:56:52FromDiscord<Prestige> And maybe https://nim-lang.org/docs/rdstdin.html
00:59:10FromDiscord<ChocolettePalette> Not only reading from stdin, but also having stdin redirected with use of command line arguments and other redirection operators like \<\<↵(@Prestige)
01:24:54FromDiscord<Bubblie> have any of you used discmd? How does one do autocomplete? So if I had a command called /greeting how would I make discord read out the possible things /greeting could have so like it can autocomplete /greeting hello or /greeting salutations
01:30:42FromDiscord<Elegantbeef> dimscmd you mean?
01:32:01FromDiscord<Bubblie> yes
01:32:39FromDiscord<Elegantbeef> dont think it presently supports that
01:33:02FromDiscord<Bubblie> oh no :(
01:33:13FromDiscord<Elegantbeef> Doesnt seem it supports documentation either
01:33:17FromDiscord<Bubblie> because I know it has an auto complete feature
01:33:25FromDiscord<Bubblie> but I dont know exactly how to use it
01:33:31FromDiscord<Bubblie> cause the docs are lack luster
01:35:03FromDiscord<Elegantbeef> Well you can jump into the dimscord discord server and ask, they're more active there
01:35:25*CyberTailor joined #nim
02:09:10*mal`` quit (Quit: Leaving)
02:38:56*mal`` joined #nim
02:53:19*arkanoid quit (Ping timeout: 268 seconds)
03:00:30FromDiscord<Girvo> Is it possible to turn off the async traceback (from getCurrentExceptionMsg)?
03:06:02FromDiscord<Prestige> I don't believe so
03:11:45FromDiscord<Girvo> All good. I'll just filter it out for now (when not in verbose mdoe)
03:11:48FromDiscord<Girvo> mode, even
03:29:12FromDiscord<Scoobery Doobery> sent a code paste, see https://play.nim-lang.org/#ix=4bEN
03:29:45FromDiscord<Elegantbeef> how are you calling it?
03:29:47FromDiscord<Elegantbeef> also you need to do `new result`
03:30:47FromDiscord<Rika> Probably Grid[T] too on the get function
03:31:00FromDiscord<Scoobery Doobery> sent a code paste, see https://play.nim-lang.org/#ix=4bEO
03:31:00FromDiscord<Scoobery Doobery> I'm assuming that's wrong
03:31:18FromDiscord<Scoobery Doobery> this would be where `myGridInstance` is a `Grid[MyType]` of course :P
03:31:18FromDiscord<Elegantbeef> `get[: MyType]`
03:31:24FromDiscord<Elegantbeef> Nim doesnt do reverse inference
03:31:30FromDiscord<Rika> What
03:31:32FromDiscord<Rika> Beef
03:31:35FromDiscord<Rika> Slow down and read
03:31:46FromDiscord<Rika> Grid has the T generic on it
03:31:54FromDiscord<Elegantbeef> You need to supply the generic parameter
03:31:56FromDiscord<Rika> But it’s just not written explicitly on her function
03:31:59FromDiscord<Rika> Get
03:32:02FromDiscord<Rika>
03:32:08FromDiscord<Elegantbeef> Ah you're right
03:32:20FromDiscord<Rika> Smh
03:32:27FromDiscord<Elegantbeef> I just read the header
03:32:37FromDiscord<Elegantbeef> and the `result[]`
03:32:45FromDiscord<Rika> That’s one more bug yes
03:32:45FromDiscord<Scoobery Doobery> Okay wait, I'm actually probably dumb
03:32:56FromDiscord<Elegantbeef> you need `Grid[T]`
03:33:13FromDiscord<Rika> Yeah as I said 😦
03:33:16FromDiscord<Elegantbeef> that allows it to infer `T` from the left hand of the `.`
03:33:57FromDiscord<Scoobery Doobery> sent a code paste, see https://play.nim-lang.org/#ix=4bEQ
03:33:59FromDiscord<Scoobery Doobery> So I guess I really did just need that
03:34:07FromDiscord<Elegantbeef> as does changing the procedure to `Grid[T]`
03:34:46FromDiscord<Scoobery Doobery> Well look at that
03:34:53FromDiscord<Scoobery Doobery> Learn something new every day
03:34:56FromDiscord<Scoobery Doobery> Thanks for the help!
03:35:23FromDiscord<Scoobery Doobery> now to figure out the `SIGSEGV` it's throwing me! :D
03:35:44FromDiscord<Elegantbeef> `new result` before `result []`
03:36:03FromDiscord<Scoobery Doobery> Ye added that as well
04:11:49FromDiscord<Girvo> Hey, hey @Rika I think that person needs `Grid[T]` 😉
04:12:14FromDiscord<Elegantbeef> Are we sure they dont need `Grid[T]`?
04:19:31FromDiscord<Bubblie> what is the best vscode nim extension?
04:19:59FromDiscord<Elegantbeef> saem's
04:31:38*tanami joined #nim
05:26:55FromDiscord<Bubblie> thanks
05:29:38FromDiscord<Bubblie> how do you do "does not equal" or "is not null" in nim
05:30:10FromDiscord<Elegantbeef> `!=`
05:30:14FromDiscord<Prestige> In reply to @Scoobery Doobery "Hey all. Hopefully this": Check out the Seq2D package btw
05:30:33FromDiscord<Elegantbeef> `a notin [b, nil]`
05:31:52FromDiscord<Bubblie> In reply to @Elegantbeef "`!=`": oh wait so this works? I thought I had to use the keywords nim has like is and not
05:31:56FromDiscord<Bubblie> I guess not
05:32:14FromDiscord<Elegantbeef> `is` is for type comparisons
05:32:39FromDiscord<Elegantbeef> `of` is for inheritance checking
05:33:11FromDiscord<Bubblie> got it
05:33:42*CyberTailor quit (Ping timeout: 258 seconds)
05:35:12*CyberTailor joined #nim
05:52:41*LuxuryMode joined #nim
05:57:20FromDiscord<Bung> what's `prev` in `sem` procs arguments, when I debuging compiler most of time it's `nil`
06:12:10*rockcavera quit (Remote host closed the connection)
06:14:57*kenran joined #nim
06:15:58NimEventerNew thread by drkameleon: Overriding default C/C++ options + error with 1.6.8 / C++ / macOS, see https://forum.nim-lang.org/t/9495
07:21:57FromDiscord<srozb> looks like play.nim-lang is down https://media.discordapp.net/attachments/371759389889003532/1024581713285877810/unknown.png
07:22:05FromDiscord<Horizon [She/Her]> How stupid would it be to try integrating Nimscript with Python so you can use Python modules lmao
07:22:11FromDiscord<Horizon [She/Her]> In reply to @srozb "looks like play.nim-lang is": Known issue, been down for quite a while now
07:26:17FromDiscord<pietroppeter> love play.nim-lang.org, @PMunch if some financial support would help to keep it running let me know, happy to pitch in and I guess others could be interested in that too. when play-nim is down I now usually go to https://replit.com/ where you can create a Nim replit (you can actually do a lot more in replit, also serve apps).
07:29:33FromDiscord<Girvo> Yeah I'd be happy to as well/my work would be happy to pitch in if it helps
07:33:06FromDiscord<Horizon [She/Her]> In reply to @pietroppeter "love play.nim-lang.org, <@696333749570371585> if": The Nim repl is outdated, i made a script to install Nim specifically because of this
07:37:36FromDiscord<pietroppeter> yeah, it is currently 1.4.8. the good think is that with the shell you can update and upgrade (and probably someone could create a better nim template, I guess someone who knows about nix should be able to). better play-nim for that, but the advantage of replit is that you can install all packages you want
07:37:54FromDiscord<pietroppeter> In reply to @Event Horizon "The Nim repl is": what's your script to update?
07:38:17FromDiscord<Horizon [She/Her]> I'll get it rn
07:39:03FromDiscord<Horizon [She/Her]> sent a code paste, see https://paste.rs/QA8
07:39:18FromDiscord<Horizon [She/Her]> Also has a (very crappy) script to install dependencies too
07:39:40FromDiscord<Horizon [She/Her]> I just added `./start.sh` to the run param in .replit
07:45:01FromDiscord<PMunch> In reply to @Avahe "PMunch": I'm not hosting it, @dom96 originally set it up. It runs on a VPS
07:45:15FromDiscord<PMunch> I'm just maintaining it
07:45:20FromDiscord<ieltan> Playground is down sobbing right now
07:46:41FromDiscord<Prestige> ah
07:47:00FromDiscord<PMunch> Rebooted it now, usually helps
07:48:26FromDiscord<ieltan> It does, thanks !
08:07:00FromDiscord<pietroppeter> as an example of something I did in replit some time ago is to be able to set up a datasette instance of a sqlite snapshots of irc logs that @Yardanico shared some time ago: https://nimirclogsdatasette.pietroppeter.repl.co/ (I am running it now, it will go down in som time) https://replit.com/@pietroppeter/NimIrcLogsDatasette
08:07:46FromDiscord<srozb> I've just installed nim 1.6.8 on pure windows 10 vm with choosenim and even compilation of hello world causes assertion errors in nimbase.h - is it something wrong with 1.6.8? can't find any related issue on GH
08:09:04FromDiscord<flywind> What's error?
08:09:30FromDiscord<srozb> sent a code paste, see https://paste.rs/lGJ
08:09:39FromDiscord<pietroppeter> In reply to @pietroppeter "as an example of": example of a query: https://nimirclogsdatasette.pietroppeter.repl.co/irc?sql=select+count%28%29+from+log+where+message+like+%27%25araq%25%27 https://media.discordapp.net/attachments/371759389889003532/1024593719061647461/unknown.png
08:10:03FromDiscord<srozb> sent a code paste, see https://play.nim-lang.org/#ix=4bFI
08:12:21FromDiscord<srozb> I'll check 1.6.6
08:13:46*jmdaemon quit (Ping timeout: 246 seconds)
08:14:28FromDiscord<srozb> and it worked on 1.6.6
08:16:55FromDiscord<flywind> Doing a git bisect would be appreciated https://nim-lang.github.io/Nim/intern.html#debugging-the-compiler-bisecting-for-regressions and https://github.com/nim-lang/Nim/compare/v1.6.6...v1.6.8
08:20:43FromDiscord<srozb> wait I see where is the problem
08:21:08FromDiscord<srozb> nim -v shows me i686 build on 1.6.8, but when I `choosenim 1.6.6` it gets me amd64
08:21:56FromDiscord<srozb> now what did I wrong that causes choosenim to get me 32bit version ?
08:23:12FromDiscord<srozb> and it is `choosenim-0.8.4_windows_amd64.exe`
08:29:03FromDiscord<srozb> so looks like a choosenim bug not compiler ( @dom96 👀 )
08:48:58*arkurious joined #nim
08:52:24*LuxuryMode quit (Quit: Connection closed for inactivity)
08:54:04*qwr quit (Ping timeout: 268 seconds)
08:55:00*CyberTailor left #nim (Konversation terminated!)
08:55:33*qwr joined #nim
09:16:02*sagax joined #nim
10:22:00NimEventerNew post on r/nim by thindil: Nim version 1.6.8 released, see https://reddit.com/r/nim/comments/xq8w5c/nim_version_168_released/
11:28:50*pro joined #nim
11:57:16*kenran quit (Remote host closed the connection)
12:09:02*gsalazar joined #nim
12:18:57FromDiscord<Scoobery Doobery> In reply to @Avahe "Check out the Seq2D": That may be just what I'm looking for. Thanks!
12:35:30*kenran joined #nim
13:08:00*gsalazar quit (Ping timeout: 265 seconds)
13:14:20FromDiscord<!&luke> In reply to @Bubblie "what is the best": All of them
13:14:38FromDiscord<!&luke> I literally installed all of them 😂
13:14:50FromDiscord<!&luke> It works great tho
13:47:13FromDiscord<exelotl> that sounds like a terrible idea lmao
13:51:23FromDiscord<ChocolettePalette> I wasn't sure whether to install Super speed vpn – best vpn or unlimited proxy vpn pro so I installed both
13:52:13FromDiscord<ChocolettePalette> Sorry!
13:52:14FromDiscord<ChocolettePalette> Oh, thought that's an offtopic
13:58:43*derpydoo joined #nim
14:31:34*rockcavera joined #nim
15:16:34*LuxuryMode joined #nim
15:21:18*pro quit (Remote host closed the connection)
15:22:54*gsalazar joined #nim
15:27:47*kenran quit (Remote host closed the connection)
15:30:58FromDiscord<Horizon [She/Her]> In reply to @ripluke "All of them": No lmao
15:31:10FromDiscord<Horizon [She/Her]> In reply to @Bubblie "what is the best": It's the one by `nimsaem`
15:37:45*gsalazar quit (Ping timeout: 252 seconds)
15:46:01FromDiscord<qb> sent a code paste, see https://play.nim-lang.org/#ix=4bHP
15:47:47FromDiscord<Generic> huh
15:47:52FromDiscord<Rika> what does that mean
15:47:55FromDiscord<Generic> but what would that be good for?
15:48:08FromDiscord<Rika> you want a variable to be somehow global and local? i dont get it
15:48:23FromDiscord<Generic> you could just call reset on the variable everytime the function is called
15:48:47FromDiscord<qb> Yea I've reconsidered it. It doesn't makes sense and won't work ;D
15:49:07FromDiscord<Generic> well I guess there would be one situation wheret his would be useful
15:49:17FromDiscord<Generic> if you have a variable which would be too big too fit on the stack
15:49:31FromDiscord<Generic> and you can live with this function not being threads safe
15:50:38FromDiscord<qb> sent a code paste, see https://play.nim-lang.org/#ix=4bHS
15:50:55FromDiscord<Generic> ah
15:51:00FromDiscord<qb> And since it's a window loop you need global vars
15:51:22FromDiscord<Generic> Python doesn't have something like var parameters
15:51:56FromDiscord<Generic> one way to solve this would be if you would introduce some new object which would contain the active and the open variable
15:52:01FromDiscord<Generic> (edit) "variable" => "fields"
15:52:13FromDiscord<Generic> and expose the creation of it to Python
15:52:42FromDiscord<Generic> then the Python code would create such an object and it would be a parameter to dropdownBox
15:53:14FromDiscord<Generic> where you would then pass the active and open fields of that object raylib's dropdownBox function
16:05:27FromDiscord<qb> Yea well I can't export functions if var arguments
16:05:35FromDiscord<qb> sent a code paste, see https://play.nim-lang.org/#ix=4bHV
16:05:50FromDiscord<qb> (edit) "if" => "with"
16:19:05FromDiscord<!&luke> In reply to @Event Horizon "No lmao": I have double the autocompletion :)
16:21:19FromDiscord<Generic> make DropDownBox a ref object
16:21:27FromDiscord<Generic> problem solved
16:21:50FromDiscord<Generic> atleast if they work with nimpy, idk never used it
16:22:55FromDiscord<Generic> In reply to @ripluke "I have double the": twice the auto completion, double nimsuggest instances stuck at 100% cpu utilisation
16:26:44FromDiscord<Goel> Which is the latest nim dev- compiler version?
16:28:13FromDiscord<Goel> (edit) "version?" => "version?↵On the download page and Nightlies i only see up to 1.6 branch but im using 1.7.1 right now"
16:28:57*jmdaemon joined #nim
16:32:56FromDiscord<flywind> In reply to @Goel "Which is the latest": Here is the latest prebuild version https://github.com/nim-lang/nightlies/tags
16:34:19FromDiscord<flywind> If you use "choosenim devel --latest" to build a latest Nim compiler, the version will be 1.7.3
16:36:09FromDiscord<flywind> I bumped it from 1.7.1 to 1.7.3 today
16:37:00FromDiscord<Horizon [She/Her]> In reply to @ripluke "I have double the": Why
16:37:23FromDiscord<flywind> In reply to @flywind "I bumped it from": https://github.com/nim-lang/Nim/pull/20432
17:15:17FromDiscord<jmgomez> sent a code paste, see https://paste.rs/3Oy
17:15:48FromDiscord<jmgomez> (I know I can move it by padding it manually, but it would be great if that works is already built in)
17:15:55FromDiscord<jmgomez> (edit) "works" => "work"
17:17:31FromDiscord<federico3> there's no mention of supporting OpenSSL 3 in https://nim-lang.org/blog/2022/09/27/version-168-released.html - how comes?
17:35:45FromDiscord<untoreh> sent a code paste, see https://play.nim-lang.org/#ix=4bIG
17:35:59FromDiscord<untoreh> zombies? how do I reap
17:47:10NimEventerNew thread by NameUndefined: EpochTime substractions gives out small negative float, see https://forum.nim-lang.org/t/9496
18:13:16FromDiscord<Horizon [She/Her]> How do i make Prologue return a file with a custom mimetype?
18:19:15*derpydoo quit (Ping timeout: 248 seconds)
18:43:36FromDiscord<Phil> In reply to @Event Horizon "How do i make": Determined to not use a reverse proxy, eh?↵In this regard, shouldn't it just be a matter of setting the content-type header
18:43:39FromDiscord<Phil> (edit) "header" => "header?"
18:44:52FromDiscord<Horizon [She/Her]> Yup i figured it out earlier xD
18:44:54FromDiscord<Phil> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type
18:44:57FromDiscord<Horizon [She/Her]> Dug through internals lol
18:44:59FromDiscord<Phil> Ah, faster than I was
18:46:39FromDiscord<Phil> In reply to @untoreh "Why does this never": I haven't done much OS level stuff, but why would your try block ever cause an OSError?
18:47:52FromDiscord<Phil> In fact, how do you ever escape your while loop other than through an exception that isn't an OSError?
19:01:29FromDiscord<Tuatarian> How does one pass a range to a function?
19:02:05FromDiscord<Tuatarian> Rephrasing that
19:02:20FromDiscord<Tuatarian> How do you take a range as a function parameter?
19:06:10*krux02_ joined #nim
19:15:29FromDiscord<auxym> In reply to @iWonderAboutTuatara "How do you take": `proc f(x: range[10..50]) = ...`
19:23:05FromDiscord<Tuatarian> What if I want a range between any 2 naturals incl 0?
19:46:14FromDiscord<Mrcool> maybe `proc f(x: HSlice[Natural,Natural]) =`
19:46:36FromDiscord<auxym> that
19:47:53FromDiscord<Mrcool> you can use Slice instead of HSlice
19:48:08FromDiscord<Mrcool> whats HSlice is even used for
19:52:56FromDiscord<auxym> HSlice allows different types for the start and end positions (not sure why you'd want that)
20:06:18*LuxuryMode quit (Quit: Connection closed for inactivity)
20:11:47*Guest97 joined #nim
20:47:53*derpydoo joined #nim
20:52:47FromDiscord<jos> what does nim use for expression parsing?
20:52:56FromDiscord<jos> i know there's tons of control over operators and stuff in nim
20:53:16FromDiscord<jos> and i know "most things" in nim are expressions
20:53:24FromDiscord<jos> i figured it might use a pratt parser for expressions, because there's all this runtime registration of operators
20:53:31FromDiscord<jos> does anybody know?
20:56:59*vicecea quit (Remote host closed the connection)
20:58:09FromDiscord<jos> i see this quote on the forums
20:58:14FromDiscord<jos> > Nim was designed to be parsable without a symbol table and this feature would break this design. You can come up with post-parse rewrite rules (which is also what Haskell does iirc), in fact, you could implement these rules via a macro. But I don't like it and I don't see why we would need it.↵> ↵> Nim's design isn't arbitrary, there are no special rules for "builtin" operators and it should stay this way.
20:58:34FromDiscord<jos> why does nim avoid a symbol table?
21:04:00NimEventerNew thread by errata-c: How to properly typecheck a variable number of array args?, see https://forum.nim-lang.org/t/9497
21:28:23FromDiscord<auxym> @jos might want to ask in #internals people who work in compiler mostly hang out there
21:29:25FromDiscord<jos> ty, good idea
21:29:49FromDiscord<Elegantbeef> I'd say it's likely that since Nim doesnt really have keywords it's not needed
21:30:42FromDiscord<jos> well my first thought was that you can't specify precedence without a symbol table, I guess?
21:30:53FromDiscord<jos> for custom operators
21:33:45qwr"Otherwise, precedence is determined by the first character." https://nim-lang.org/docs/manual.html#lexical-analysis-operators
21:34:10qwrbasically, nim has hardcoded rules for precedence
21:36:11FromDiscord<Elegantbeef> It has a few keywords, but a lot of parts are implemented in user space
21:36:43FromDiscord<Elegantbeef> It has a precedence table
21:36:49FromDiscord<Elegantbeef> For all operators
21:36:57FromDiscord<Elegantbeef> Since all operators are custom
21:37:26FromDiscord<Elegantbeef> Nim doesnt have operators implemented by default
21:37:29qwrand few rules determine any operators placement in the precedence table
21:37:39FromDiscord<Elegantbeef> All 'default' operators are apart of the system module
21:38:00FromDiscord<Elegantbeef> except `=` I guess
21:40:32qwri guess that design was chosen to be less actively hostile to creating IDEs and code analysis tools for Nim (as opposed a design where programmer can dynamically alter precedence table) - with current Nim design you can for example have pretty standard parser after custom lexer that creates lisp-like syntax tree
21:40:52FromDiscord<Mrcool> why does this fail ? https://media.discordapp.net/attachments/371759389889003532/1024797868197949440/unknown.png
21:41:32FromDiscord<Elegantbeef> it tells you why it fails
21:41:36qwrparsing for example haskell is a bit more `fun'
21:42:13qwr(though on the other hand you don't have arbitrary macros after initial parse in haskell)
21:42:31FromDiscord<Mrcool> In reply to @Elegantbeef "it tells you why": I don't get it
21:42:32FromDiscord<Elegantbeef> `lines` with a string attempts to open the file
21:42:38FromDiscord<Elegantbeef> you want `std/strutils` and the `splitLines`
21:43:05FromDiscord<Elegantbeef> `for line in myStr.lines` opens `myStr` then iterates it
21:43:09FromDiscord<Elegantbeef> you want `for line in myStr.splitLines`
21:54:10FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=4bKf
21:54:18FromDiscord<Bung> https://github.com/SciNim/numericalnim/blob/614cb304d74ac32869ff74e0d013681ecf4ff5c8/src/numericalnim/integrate.nim#L420 am suprised this syntax used in real project.
21:55:31FromDiscord<Elegantbeef> Maths needs some constants 😄
21:56:22FromDiscord<Elegantbeef> Or do you mean `(seq, seq)`?
21:58:06FromDiscord<Bung> yeah seq without element type
21:59:37FromDiscord<Mrcool> seems like <https://github.com/aMOPel/tree-sitter-nim> is getting closer to handle nim
21:59:48FromDiscord<Elegantbeef> I mean it 'works' it constraints to the typeclass, but araq doesnt like that so no clue 😄
22:00:31*qwr . o O ( the lines function is very useful to know... and surprising to those who don't :) )
22:00:53FromDiscord<Bung> https://github.com/nim-lang/Nim/pull/20412 my PR will break it. I hope so, me dont like
22:01:17FromDiscord<Elegantbeef> Does it break typeclasses?
22:01:21FromDiscord<Elegantbeef> like `proc doThing(s: seq)`?
22:01:26FromDiscord<Elegantbeef> If so it's wrong
22:02:17FromDiscord<Bung> seq will fill a tynone type if there isn't element type
22:02:29FromDiscord<Elegantbeef> So yes or no?
22:03:02FromDiscord<Bung> yes , where ever it occurs
22:03:19FromDiscord<Elegantbeef> So it breaks the array/seq typeclasses?
22:03:31FromDiscord<Elegantbeef> If that's the case your PR is wrong
22:03:59FromDiscord<Elegantbeef> `proc doThing(a: seq, b: set, c: array)` is 100% valid and should work
22:04:39FromDiscord<Bung> why
22:04:52FromDiscord<Elegantbeef> Those are typeclasses
22:05:00FromDiscord<Elegantbeef> It's the same as `proc doThing(a: object)` or `proc doThing(r: ref)`
22:06:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bKk
22:06:20FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=4bKl
22:06:44FromDiscord<Bung> it's existed code , u see `errXExpectsOneTypeParam `
22:07:22FromDiscord<Elegantbeef> I'm just making sure you didnt break typeclasses for the builtin types
22:07:29FromDiscord<Elegantbeef> I'm not overly competent with the compiler 😄
22:07:45FromDiscord<Bung> generic works fine
22:08:31FromDiscord<Bung> I never use something like `proc doThing(a: seq, b: set, c: array)`
22:08:50FromDiscord<Elegantbeef> Sure, but it's supported and consistent with all other generics
22:08:58FromDiscord<Elegantbeef> I use typeclasses a lot
22:09:08FromDiscord<Bung> since nim is static typed, from that code , I dont see real type
22:09:27FromDiscord<Elegantbeef> I mean that's the point you only care that it's a specific type
22:09:39FromDiscord<Elegantbeef> It's a generic procedure that accepts all `seq` `set` and `array`s
22:10:37FromDiscord<Bung> oh, looks like no test case cover this...
22:12:16qwrElegantbeef: what you can do with those? you can't add elements, since then wrong type of elements could be added... and you can't use the elements, as you don't know what type any element is?
22:13:25*Guest97 quit (Quit: Client closed)
22:14:16qwrthough, it should be safe to delete or move around elements (I think thats how std library uses these types...)
22:14:22*rb quit (Quit: ZNC - https://znc.in)
22:14:35*rwb joined #nim
22:15:55FromDiscord<Elegantbeef> They're generic typeclasses they're not untyped
22:15:56FromDiscord<Elegantbeef> You can though↵(<@709044657232936960_qwr=5b=49=52=43=5d>)
22:17:05FromDiscord<Bung> I haven't check but during some step compiler will fill generic type ? I guess so
22:17:40FromDiscord<Bung> so after that it's not empty
22:18:02qwrElegantbeef: if I look at example in manual, these type clases are used as constraints for generics, which makes sense
22:18:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bKq
22:18:55FromDiscord<Elegantbeef> There's an example that should work 'flawlessly'
22:18:55FromDiscord<Bung> check is after type construction
22:20:15qwrhmok, that makes sense.
22:21:56qwrand... as i understand the manual, your example is actually using implicit generic type
22:22:09FromDiscord<Elegantbeef> Correct
22:22:37*krux02_ quit (Remote host closed the connection)
22:22:53FromDiscord<Elegantbeef> I mean i'd say the best thing to use is a concept, but yea 😄
22:23:28FromDiscord<Elegantbeef> A real case is for things like https://github.com/beef331/nimtrest/blob/master/remoterefs.nim#L91-L97
22:23:38FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=4bKs
22:23:39FromDiscord<Elegantbeef> Where i really dont give a care in the world what type is `RemoteRef`
22:24:05FromDiscord<Elegantbeef> I just want to be certain it's a remoteref
22:24:27FromDiscord<Elegantbeef> Eh they might look wrong, but they feel so right
22:24:41FromDiscord<Elegantbeef> If they're wrong i dont want to be right! 😛
22:25:13FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/sentinels.nim Another example if anyone isnt sold 😛
22:46:52FromDiscord<Patitotective> im doubtful about how to implement a query parser↵easiest thing would be to have procedures that filter a document and output a document so you can use them with another procedures (`doc.allStartingWith("node").allWithXValues(2)`), but that seems to have more allocations than needed↵soo i was thinking maybe to make a sequence of `Filter` object variant that has all filter procedures as enums and fields, this way i can save and p
22:47:08FromDiscord<Patitotective> maybe there's already a query parser/lang example in nim
22:47:24FromDiscord<Patitotective> (edit) "nim" => "nim, dont know"
22:49:55FromDiscord<Elegantbeef> Do this with iterators and you're golden 😛 https://forum.nim-lang.org/t/9132#59763
22:50:43FromDiscord<Elegantbeef> Yea i dont really know about querying i generally go towards iterators for problems
22:53:17FromDiscord<Patitotective> In reply to @Elegantbeef "Do this with iterators": ooo nice
22:59:17FromDiscord<Patitotective> In reply to @Elegantbeef "Do this with iterators": why distinct tho
22:59:39FromDiscord<Elegantbeef> Cause the `filter` makes it clear what you're doing
23:01:30FromDiscord<Elegantbeef> If you read the posts prior it's about using `[]` for doing filter/apply/...
23:07:56FromDiscord<Iliketwertles> suggestions? https://media.discordapp.net/attachments/371759389889003532/1024819782094176307/neocat.nim
23:09:15FromDiscord<Patitotective> `std/[typetraits, strutils, terminal, os]` :p
23:09:36FromDiscord<Iliketwertles> fair
23:09:36FromDiscord<Elegantbeef> Variables are a hell of a drug
23:10:04FromDiscord<Iliketwertles> wym?
23:10:31FromDiscord<Patitotective> is there a way to _mix_ two enums, something like `MyEnum or YourEnum` or `type OurEnum = MyEnum and YourEnum`
23:11:28FromDiscord<Elegantbeef> No
23:11:35FromDiscord<Elegantbeef> You'd need a macro for that
23:12:11FromDiscord<Iliketwertles> might make the default color for this white so it can be a usable "replacement(kinda not rly)" of cat
23:12:25FromDiscord<Iliketwertles> so itll be cat with colors
23:12:56FromDiscord<Elegantbeef> There we go much more sensible
23:12:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bKB
23:13:45FromDiscord<Elegantbeef> colors as a parameter should be `openArray[ForegroundColor]`
23:14:50FromDiscord<Patitotective> btw @Iliketwertles you can do `newSeq[string]`
23:15:22FromDiscord<Elegantbeef> Or just `var output: seq[string]`
23:15:22FromDiscord<Elegantbeef> have\
23:15:22FromDiscord<Elegantbeef> Since that's identical to what you hva
23:16:03FromDiscord<Iliketwertles> forgot about caseing↵gonna use that
23:21:48FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4bKE
23:28:34FromDiscord<Elegantbeef> no
23:28:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bKH
23:29:10FromDiscord<Iliketwertles> i see