<< 31-07-2021 >>

00:01:39FromDiscord<timotheecour> `{.nosystem.}` will solve this problem of system bloat without introducing any breaking change
00:02:26FromDiscord<timotheecour> (edit) "change" => "change, allowing to redefine system module as one that imports a number of `{.nosystem.}` smaller modules"
00:04:02arkanoidwhen I test a module I import it on the top of the test file, but this forces me to export some names even if they should stay hidden inside the module
00:12:42FromDiscord<Elegantbeef> you could always put them inside a `when defined(yourPackageNameTest)`
00:13:02FromDiscord<r3m> can someone mention my nickname please i'm testing something
00:13:22FromDiscord<leorize> or... `import {.all.}`, newly introduced in devel
00:13:53FromDiscord<Elegantbeef> Import all i presume disregards ``?
00:15:00FromDiscord<leorize> yea
00:17:45arkanoidElegantbeef, what do you mean? Do you mean not using * but add all "export name" in myPackageName in a when block?
00:22:26FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3uxe
00:24:29arkanoidyeah got it. thanks
00:24:40arkanoidquite verbose, but probably is the cleanest solution
00:24:54FromDiscord<Elegantbeef> Well unless in devel like leorize mentioned
00:25:28arkanoidthis compiles "proc foo: Future[string] {.async.} = result = "bar"", this not "proc foo: Future[string] {.async.} = "bar""
00:26:03arkanoidI don't understand why
00:28:39arkanoidI mean, the result should be implicit, and the return type is explicit. I see no differences between the two
00:30:05FromDiscord<timotheecour> that's because of the way the async macro is implemented, feel free to send a PR to fix it
00:30:54arkanoidI don't have the skills for that (yet), thanks for the answer!
00:37:28*Onionhammer quit (Quit: Ping timeout (120 seconds))
00:37:45*Onionhammer joined #nim
00:56:20arkanoidI've just found out that the times.nim module is cursed and has side effects on string format if you import it whole, but not if you import it partially https://play.nim-lang.org/#ix=3uxk
00:58:03arkanoidis this an issue worth posting on github?
01:02:53FromDiscord<Elegantbeef> well it prints the time locally so i dont think it's "cursed"
01:04:13arkanoidElegantbeef, printing? no, the proc returns string, there's no main, no echo
01:04:26fn<ForumUpdaterBot99> New thread by Giaco: '$' on Time can have side effect, but only if you import the whole times module, see https://forum.nim-lang.org/t/8287
01:04:30FromDiscord<Elegantbeef> I mean it converts it to time local
01:04:47arkanoidwhy it should, I'm not even filling it
01:04:53FromDiscord<Elegantbeef> Without importing the whole module you use the normal object stringify operator
01:04:57FromDiscord<Elegantbeef> When you import the entire module you get the overriden one which it relies on a global variable
01:05:12FromDiscord<Elegantbeef> And as such it's not a pure function
01:05:42FromDiscord<Rika> In reply to @mlokis "yes that's why i": Nim also has {} for indexing
01:07:16arkanoidso Time is not the right type to store timestamps?
01:08:56FromDiscord<Elegantbeef> DateTime might be what you want
01:09:27FromDiscord<Elegantbeef> I dont know much about time truthfully
01:09:27FromDiscord<Elegantbeef> I dont know much about times truthfully
01:10:21arkanoiddatetime raises same error
01:10:43FromDiscord<Elegantbeef> I mean you can override side effect analysis
01:10:51FromDiscord<Elegantbeef> But it's a question of what do you want to echo \:D
01:11:29FromDiscord<Elegantbeef> I guess i mean it's a question of what do you want the string to be
01:11:37arkanoidis it really necessary to do side effect to print a time?
01:11:48FromDiscord<Elegantbeef> Well it converts it to local
01:11:48arkanoidI mean, to format a time
01:13:20arkanoidbtw, I got the point. It's just the fast the format is implicit that puzzles me
01:13:26arkanoids/fast/fact
01:13:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3uxm
01:13:55FromDiscord<Elegantbeef> Or make your own `$` operator
01:14:15FromDiscord<Rika> It would be nice to know why it is having side effects
01:14:36FromDiscord<Elegantbeef> Cause it converts to the local time zone which is done by calling `local` which populates an internal global
01:15:24FromDiscord<Elegantbeef> Which is the same for datetime, it calls format, which calls local
01:16:06arkanoidyeah it makes kinda sense, but shouldn't it default to utc?
01:17:19FromDiscord<Elegantbeef> I'd tell you if i knew
01:18:41arkanoidwhile the DateTime init asks you a timezone, the Time init doesn't. https://nim-lang.org/docs/times.html#initTime%2Cint64%2CNanosecondRange
01:21:46*arkurious quit (Quit: Leaving)
01:22:02arkanoidlet's see if this requires an effect too https://nim-lang.org/docs/times.html#format%2CTime%2Cstring%2CTimezone
01:24:33arkanoidyes, also mytime.format("yyyy-MM-dd'T'HH:mm:ss", utc()) requires an effect
01:25:30FromDiscord<Elegantbeef> Yes `utc` and `local` use global variables
01:26:08arkanoiddamn, I've to use noSideEffects escape hatches then
01:26:29FromDiscord<Elegantbeef> Or you know make your own `$` operator
01:27:54arkanoidTime attributes are not exported
02:15:54arkanoida type made of a deeply nested hierachy of non-ref objects is checked on all hierachy levels with default `==`?
02:16:36FromDiscord<Rika> i believe so yes
02:17:35arkanoidthanks
02:18:00arkanoidto forbid ref types in generic type is proc foo[T not ref](...)?
02:18:43FromDiscord<Elegantbeef> Should be
02:18:58FromDiscord<Elegantbeef> well `T: not ref` though dont know if it's just the bridge ruining it
02:19:44arkanoidno you're right I was missing ':'
02:20:13FromDiscord<Rika> bridge moment
02:20:29arkanoidI wonder if this function I just wrote is already in system: func isDefault*[T: not ref](o: T): bool = o != T.default
02:20:56arkanoidoops I inverted the result, :D yes, is it already in stdlib?
02:21:38FromDiscord<Elegantbeef> I dont think so, also reference default is `nil` so you dont need that
02:21:54FromDiscord<Elegantbeef> !eval echo (ref int).default.isNil
02:21:57NimBottrue
02:22:26FromDiscord<Rika> yeah i dont see a reason when you can just `v == c.typeof.default` i think?
02:22:34FromDiscord<Rika> v
02:22:53FromDiscord<Rika> !eval let a = 2; echo a == a.typeof.default
02:22:55FromDiscord<Rika> lets see
02:22:56NimBotfalse
02:23:01FromDiscord<Rika> yeah
02:23:44arkanoidisDefault seems a quite important function, isn't it
02:23:53arkanoidI mean, I find myself using it quite oftem
02:23:58FromDiscord<Elegantbeef> Well they can always keep the procedure, but a normal generic will be fine
02:23:58FromDiscord<Elegantbeef> Not really since everything is 0-init'd
02:24:20FromDiscord<Elegantbeef> I know an unassigned value is default why do i need to check
02:24:31arkanoidparsers!
02:24:57FromDiscord<Elegantbeef> Options
02:25:36FromDiscord<leorize> if you like parsers and you like types, you might like this\: https://github.com/nim-lang/Nim/pull/15212
02:26:13FromDiscord<Elegantbeef> That's pretty nice
02:31:14*vicfred_ joined #nim
02:33:40*vicfred quit (Ping timeout: 256 seconds)
02:36:45arkanoidwhat's this, peeping into category theory?
02:37:37FromDiscord<generic linux user> is looping eraseLine and cursorUp better than eraseScreen?
02:39:39FromDiscord<Elegantbeef> Well eraseScreen on unix puts `\e[2J` to the buffer which clears it afaik
02:40:08FromDiscord<Elegantbeef> So it's probably better to just use the terminal emulator commands
02:40:52FromDiscord<leorize> eraseScreen is better, eraseLine is for deleting a selected portion of a string
02:40:58FromDiscord<leorize> screen\
02:41:32FromDiscord<leorize> if you want to do more advanced cli things, checkout illwill
02:50:33FromDiscord<theangryepicbanana> In reply to @leorize "if you like parsers": that looks cool
02:51:51FromDiscord<generic linux user> like we print a menu, and then we put "> "
02:51:57FromDiscord<generic linux user> then we ask for a choice
02:52:08FromDiscord<generic linux user> if user enters something invalid
02:52:32FromDiscord<generic linux user> for a in 1..4:↵ eraseLine()↵ cirsorUp()
02:52:40FromDiscord<generic linux user> (edit) "cirsorUp()" => "cursorUp()"
02:53:06FromDiscord<generic linux user> so instead of clearing that menu , which is supposed to be static,until we exit
02:53:15FromDiscord<generic linux user> will it be useful tho
02:53:33FromDiscord<generic linux user> (edit) "1..4:↵" => "1..2:↵"
02:54:41FromDiscord<generic linux user> In reply to @Elegantbeef "Well eraseScreen on unix": do it print out 255 \n s?↵thats what i get on my terminal, it doesnt clear the screen↵it prints out a lot of newlines , and then if on posix, i have to use setcursorpos(0,0) to set it back
02:54:50FromDiscord<generic linux user> but in wjndows it works ok
02:55:01FromDiscord<generic linux user> (edit) "do" => "does"
02:56:12FromDiscord<generic linux user> since it talks to win32 api i think
02:58:23FromDiscord<generic linux user> yes, using eraseScreen only doesnt do the job
02:58:40FromDiscord<Elegantbeef> Consider using illwill
02:59:30FromDiscord<generic linux user> sent a code paste, see https://play.nim-lang.org/#ix=3uxy
02:59:44FromDiscord<generic linux user> (edit) "https://play.nim-lang.org/#ix=3uxy" => "https://play.nim-lang.org/#ix=3uxz"
03:01:40*vicfred__ joined #nim
03:04:08*vicfred_ quit (Ping timeout: 250 seconds)
04:06:01*supakeen quit (Quit: WeeChat 3.2)
04:06:34*supakeen joined #nim
04:24:56FromDiscord<Bung> @Araq please consider merge https://github.com/karaxnim/karax/pull/207 or https://github.com/karaxnim/karax/pull/208
04:38:43*max22- quit (Remote host closed the connection)
06:25:15*thunder quit (Ping timeout: 276 seconds)
06:35:59*sagax joined #nim
06:39:08*thunder joined #nim
06:53:03*max22- joined #nim
07:01:25*vicfred__ quit (Quit: Leaving)
07:34:44*neceve joined #nim
07:57:14*pro joined #nim
08:45:27*thunder quit (Ping timeout: 258 seconds)
09:03:06*neceve quit (Ping timeout: 240 seconds)
09:10:03*neceve joined #nim
09:11:53FromDiscord<dom96> Happy weekend. What’s everybody up to?
09:12:48FromDiscord<generic linux user> back on project
09:15:12FromDiscord<impbox [ftsf]> does nim have a way to output your source without anything that wouldn't be included according to defines?
09:16:41FromDiscord<hotdog> In reply to @impbox "does nim have a": Nim source you mean?
09:16:46FromDiscord<impbox [ftsf]> yep, nim source
09:16:52FromDiscord<hotdog> That would be cool if it doesn’t exist already
09:17:30FromDiscord<hotdog> Don’t know if it’s possible atm
09:20:37FromDiscord<impbox [ftsf]> mmm can't find anything in the compiler guide for it, figured it'd be nice for doing a tutorial series where i gradually add features but you could see the source without any specific features for simplicity
09:21:38FromDiscord<impbox [ftsf]> but seems like a pretty niche usecase
09:42:21FromDiscord<rishavs (Rishav Sharan)> sent a code paste, see https://paste.rs/MH0
09:43:19FromDiscord<impbox [ftsf]> hmm Options already exist in nim?
09:44:10FromDiscord<impbox [ftsf]> sent a code paste, see https://paste.rs/4lH
09:44:29*pro quit (Ping timeout: 258 seconds)
09:44:44FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/manual.html#types-enumeration-types you should probably learn about enum types in nim
09:45:11*pro joined #nim
09:45:37FromDiscord<impbox [ftsf]> each entry in an enum needs to be a value, not a type
09:46:32FromDiscord<rishavs (Rishav Sharan)> Options are in nim?! o.0↵can you link m to them. I never knoew!
09:46:34FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3uyV
09:46:41FromDiscord<rishavs (Rishav Sharan)> Thanks!
09:46:52FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/options.html
09:50:09FromDiscord<impbox [ftsf]> https://play.nim-lang.org/#ix=3uyW
09:53:41FromDiscord<impbox [ftsf]> if you're having seqs, it doesn't make much sense to use Option, Option = good for one or none, Seq = good for many or none
09:56:00FromDiscord<impbox [ftsf]> you might also be interested in object variants
09:56:10FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/manual.html#types-object-variants
09:58:36FromDiscord<impbox [ftsf]> https://play.nim-lang.org/#ix=3uyY using object variants
10:11:31arkanoidis this assumption correct? converter toByteSeq*(s: string): seq[byte] = cast[seq[byte]](s)
10:12:41FromDiscord<impbox [ftsf]> what is `castseq`?
10:13:13arkanoidI think the bridge us mangling the squared parethesis
10:13:38FromDiscord<impbox [ftsf]> it shows as toByteSeq(s: string): seq[byte] = castseq[byte]
10:14:42*neceve quit (Ping timeout: 272 seconds)
10:14:48arkanoidhere https://play.nim-lang.org/#ix=3uz2
10:15:23FromDiscord<impbox [ftsf]> ok, what is your assumption that you want confirmed?
10:16:47arkanoidif that unsafe cast is safe
10:17:02arkanoidand if that is the most idiomatic way to turn a string into a byte sequence
10:17:27arkanoidI'm parsing network bytes but streams receives it as string
10:18:16FromDiscord<impbox [ftsf]> seems to be safe
10:18:32arkanoidok thanks
10:24:30FromDiscord<Rika> It is safe as long as strings are internally the same as seqs (which they are since it is more convenient as of now, but may not in the future)
10:25:15FromDiscord<Rika> In reply to @impbox "does nim have a": You mean like the preprocessor pass flag in GCC?
10:25:20FromDiscord<Rika> I don’t think so
10:26:19FromDiscord<impbox [ftsf]> @Rika i'm not familiar with it, but i'd like the output to be the same as the input just without anything that fails a when defined test
10:26:55FromDiscord<Rika> Yeah in GCC they have a flag that only runs the preprocessor and emits the code after
10:27:17FromDiscord<Rika> So without the defines and the ifdef stuff
10:27:25FromDiscord<impbox [ftsf]> yeah, that kinda thing would be nice
10:27:25FromDiscord<Rika> (Though it also does the includes)
10:38:31FromDiscord<evil> does anyone know what the syntax would be for integer string indices in nimpy?
10:46:33*pro quit (Quit: WeeChat 3.2)
10:48:17*pro joined #nim
11:23:27FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3uzn
11:25:15FromDiscord<haxscramper> yes, it should be safe, but if C compiler complains you need to use `struct udev` in `object`
11:25:17FromDiscord<Rika> No I think that’s an opaque pointer, I don’t know how those would convert to Nim
11:25:28FromDiscord<haxscramper> But you would still have an issue with forward declaration
11:25:41FromDiscord<enthus1ast> it compiles
11:25:56FromDiscord<enthus1ast> but does not work \:) and i do not understand c good enough
11:26:45FromDiscord<haxscramper> "does not work" .. how exactly?
11:26:48FromDiscord<haxscramper> segfault/wrong runtime behavior/etc?
11:27:52FromDiscord<enthus1ast> nope no segfault
11:28:32FromDiscord<Rika> What’s the issue then?
11:28:35FromDiscord<enthus1ast> when i call the↵var udev = udev\_new()↵i get a pointer un the udev object but i think there is the error because its just an object
11:28:57FromDiscord<enthus1ast> i think object is not correct here
11:29:17FromDiscord<enthus1ast> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/870991326261420042): when i call the↵var udev = udev\_new()↵i get a pointer on the udev object but i think there is the error because its just an object
11:29:33FromDiscord<Rika> Then find the definition perhaps
11:31:07FromDiscord<haxscramper> You can wrap forward-declared C types as nim `object`, but that would later introduce issues when you try to wrap actual declaration
11:31:31FromDiscord<haxscramper> Ideally you would want to either treat `udev` as an opaque pointer always - if C library does not expose the struct itself
11:31:47FromDiscord<haxscramper> Or, if struct definition is exposed in another header you need to wrap that header
11:31:55FromDiscord<enthus1ast> so opaque pointer would be just `pointer`
11:31:56FromDiscord<enthus1ast> ?
11:32:18FromDiscord<haxscramper> `pointer` is no different from `ptr udev`
11:32:39FromDiscord<haxscramper> And I'm sure you don't want to wrap things as `udev_unref(p: pointer)` to later get absolutely unexplainable crashes
11:33:32FromDiscord<haxscramper> And I'm still not sure about the issue
11:33:34FromDiscord<haxscramper> Like, does it work or not?
11:34:00FromDiscord<Rika> Is there an error or do you just think it’s wrong
11:34:01FromDiscord<haxscramper> And look at C code btw
11:34:27FromDiscord<haxscramper> it should make things clearer as to what is going on behind the scenes
11:34:38FromDiscord<enthus1ast> yes thats a good tip
11:35:36FromDiscord<enthus1ast> the problem for me is i don't know yet if it does not work because i have a error in my test, or if the wrapping types are not correct.
11:35:59FromDiscord<enthus1ast> but yes i'll look at the generated c code
11:58:38*max22- quit (Ping timeout: 256 seconds)
12:06:01*supakeen quit (Quit: WeeChat 3.2)
12:06:33*supakeen joined #nim
12:18:48*Mister_Magister quit (Ping timeout: 250 seconds)
12:32:01*Mister_Magister joined #nim
12:48:25*arkurious joined #nim
12:51:42*koltrast quit (Ping timeout: 272 seconds)
13:03:26*koltrast joined #nim
13:05:43*koltrast quit (Read error: Connection reset by peer)
13:06:21*koltrast joined #nim
13:09:51*koltrast quit (Read error: Connection reset by peer)
13:16:34*koltrast joined #nim
13:20:41*koltrast quit (Client Quit)
13:21:19*xet7 quit (Remote host closed the connection)
13:21:45*max22- joined #nim
13:22:09*koltrast joined #nim
13:22:20*xet7 joined #nim
13:51:56*koltrast quit (Ping timeout: 272 seconds)
14:36:31FromDiscord<fwsgonzo> hey all, is there a way to embed binary data into a nim program?
14:37:38FromDiscord<haxscramper> `const binaryData = staticRead("dataFile")`
14:37:48FromDiscord<fwsgonzo> really?
14:40:11FromDiscord<haxscramper> https://nim-lang.org/docs/system.html#staticRead%2Cstring
14:40:18FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=3uA8
14:42:29FromDiscord<Rika> In reply to @haxscramper "`const binaryData = staticRead("dataFile")`": FYI, this just inlines strings into wherever the const is used, i believe with enough uses it will blow your binary up
14:42:40FromDiscord<Rika> i dont recall how to embed the string once and refer to that via address
14:43:47FromDiscord<haxscramper> `let tgaFile = static: staticRead("../data/test.tga")` is also possible
14:44:34FromDiscord<haxscramper> someone asked earlier about embedding const data to ROM to save on RAM
14:45:30FromDiscord<haxscramper> sent a long message, see http://ix.io/3uA9
14:46:17FromDiscord<haxscramper> So it might internally take advantage of some optimizations and `let` and cursor inference
14:46:19FromDiscord<Rika> good point lol
14:46:25FromDiscord<haxscramper> so look at C codegen
15:28:20*koltrast joined #nim
15:51:12*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
15:58:12*neceve joined #nim
16:31:45*stkrdknmibalz joined #nim
16:42:42*federico3_ is now known as federico3
16:47:54*thunder joined #nim
17:02:13*krux02 joined #nim
17:04:30FromDiscord<treeform> In reply to @nixfreak_nim "* So I took": You can do a ton with pixie, if you are ok with CPU only you it can be done.
17:09:35FromDiscord<timotheecour> sent a code paste, see https://play.nim-lang.org/#ix=3uBg
17:09:49FromDiscord<timotheecour> (edit) "https://play.nim-lang.org/#ix=3uBg" => "https://play.nim-lang.org/#ix=3uBh"
17:10:15FromDiscord<timotheecour> (edit) "https://play.nim-lang.org/#ix=3uBh" => "https://play.nim-lang.org/#ix=3uBi"
17:18:58*max22- quit (Remote host closed the connection)
17:21:17*thunder quit (Ping timeout: 265 seconds)
17:24:15*thunder joined #nim
18:10:34FromDiscord<0ffh> Is there a standalone library to parses Nim code?↵I think I saw an example once that uses Nim's Nim parser, but that didn't work (was probably outdated).
18:10:42FromDiscord<0ffh> (edit) "parses" => "parse"
18:11:53FromDiscord<Bung> have you tried compiler package ?
18:20:52FromDiscord<0ffh> In reply to @Bung "have you tried compiler": Can you point me to some documentation on how to use it? I looked a (longer) while ago and didn't find much apart from the third party example I have mentioned.
18:21:16FromDiscord<0ffh> (edit) "mentioned." => "mentioned (which didn't work)."
18:21:37FromDiscord<0ffh> (edit) "In reply to @Bung "have you tried compiler": Can you point me to some documentation on how to use it? I looked a (longer) while ago and didn't find much apart from the third party example I have mentioned ... (which" added "above"
18:22:46FromDiscord<haxscramper> In reply to @haxscramper "Easiest solution would be": Using compiler API
18:23:06FromDiscord<0ffh> In reply to @Bung "have you tried compiler": I can't find any documentation
18:23:07FromDiscord<Bung> https://github.com/bung87/rehighlite I only have example project show you
18:23:09fn<R2D299> itHub: 7"<No Description>"
18:23:17FromDiscord<0ffh> In reply to @Bung "https://github.com/bung87/rehighlite I only have": Oh, thanks!
18:23:19fn<R2D299> itHub: 7"<No Description>"
18:23:25FromDiscord<Bung> yeah, It's not well documented.
18:25:33FromDiscord<0ffh> In reply to @haxscramper "Using compiler API": Thanks, too!
18:27:34FromDiscord<0ffh> In reply to @haxscramper "Using compiler API": That might actually be the snippedt I tried before.↵compiler_parser_test.nim(3, 16) Error: cannot open file: compiler/parser
18:27:52FromDiscord<0ffh> (edit) "snippedt" => "snippet"
18:28:47FromDiscord<0ffh> No it's not. I see. Need to get the Nim source first.
18:31:13FromDiscord<haxscramper> Install `compiler` package
18:31:14FromDiscord<haxscramper> you just need to `nimble install compiler`
18:31:14FromDiscord<haxscramper> no, you don't
18:56:30FromDiscord<theangryepicbanana> question: does `create`/`alloc` have to be explicitly freed if one of the gc backends is used (instead of orc/arc)?
18:58:31FromDiscord<haxscramper> I would assume yes, because GC is only concerned with traced references
18:58:50FromDiscord<haxscramper> Whatewher happens in your manual allocatinos you need to manage yourself, or wrap in object that can be `=destroy`ed
18:59:14FromDiscord<theangryepicbanana> hmm ok
19:00:44FromDiscord<theangryepicbanana> also a possibly related question: are seqs laid out sequentially in memory like a ptr/array, or does it do weird alignment stuff?
19:01:15FromDiscord<theangryepicbanana> it seems to but I'm not completely sure
19:02:14FromDiscord<haxscramper> Seq internally uses `T data`
19:02:14FromDiscord<haxscramper> So it depends on the C compiler being used
19:02:17FromDiscord<haxscramper> Flags
19:02:24FromDiscord<theangryepicbanana> ok
19:02:33FromDiscord<theangryepicbanana> thx
19:02:38FromDiscord<haxscramper> C and nim pragmas and other implementaiton details
19:10:29*supakeen quit (Remote host closed the connection)
19:10:53*supakeen joined #nim
20:02:47FromDiscord<carmysilna> How do you access the inner type of a distinct type, ie convert back or deconstruct. I've tried `.0` and `.inner` but neither works
20:04:10FromDiscord<Rika> What’s the inner type variable name? Type[T] is accessed with T for example
20:07:17FromDiscord<carmysilna> `seq[Term]` in this case. so I would do `seq[Term](val)`?
20:12:36FromDiscord<timotheecour> @carmysilna typetraits.distinctBase ?
20:14:11arkanoidI need to convert an uint64 to the equivalent bytestring. I'm currently doing myint.toHex.parseHexStr and it is working as expected, I just wonder if this is the most idiomatic/efficient way to do this
20:27:04FromDiscord<Rika> In reply to @carmysilna "`seq[Term]` in this case.": type A[B] = … then val.B where val is A returns what type B is
20:54:37*max22- joined #nim
20:54:41*pro quit (Ping timeout: 252 seconds)
21:12:36arkanoidI tried a massive hack force times module to be {.noSideEffect.} by creating https://play.nim-lang.org/#ix=3uCn , but by importing it I'm getting strange errors like Error: type mismatch: got <Time> but expected 'Time = object'
21:27:28*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
21:35:41FromDiscord<0ffh> In reply to @haxscramper "no, you don't": Ooops, didn't realise there was a package out there! 😅
21:56:52*thunder quit (Remote host closed the connection)
21:57:15*thunder joined #nim
22:16:46*max22- quit (Quit: Leaving)
22:17:57*max22- joined #nim
22:27:06FromDiscord<@bracketmaster-5a708063d73408ce4> @haxscramper\:matrix.org , have you seen this before?\:https://github.com/loloicci/nimly
22:27:07fn<R2D299> itHub: 7"Lexer Generator and Parser Generator as a Library in Nim."
22:27:11FromDiscord<@bracketmaster-5a708063d73408ce4> seems good for describing grammars
22:28:43FromDiscord<haxscramper> Yes, it is a first item in my "languages and vms" list. But I'm not a big fan of parser generators, and would prefer to use more commonly used tool
22:30:06FromDiscord<haxscramper> Also it is a simple LR/LALR without any advanced hacks from bison or tree-sitter
22:30:41FromDiscord<@bracketmaster-5a708063d73408ce4> what type of advanced hacks do you need?
22:31:38FromDiscord<haxscramper> Glr for runtime grammar conflict resolution, support for operator precedence
22:32:01FromDiscord<haxscramper> And decades worth of examples in case of bison
22:32:42*thunder quit (Remote host closed the connection)
22:33:01*thunder joined #nim
22:33:19FromDiscord<haxscramper> And when I write parsers by hand I want to have manual failure resolution and more attention to error messages, which is not possible with LALR generator
22:34:35FromDiscord<haxscramper> But it is my personal preference, and there are valid use cases for all items in my list
22:35:09FromDiscord<@bracketmaster-5a708063d73408ce4> Ah, I see
22:56:32*oprypin quit (Quit: Bye)
22:56:41*oprypin joined #nim
23:20:16*max22- quit (Remote host closed the connection)
23:30:18*ehmry quit (Ping timeout: 276 seconds)
23:40:14FromDiscord<Varriount> In reply to @haxscramper "And when I write": NPeg?
23:40:17*vicfred joined #nim
23:40:27*emery joined #nim
23:45:46*neceve quit (Ping timeout: 240 seconds)