<< 25-12-2022 >>

00:00:27FromDiscord<ShalokShalom> Oh, that is great
00:01:09FromDiscord<ShalokShalom> Matrix bridges are the best
00:01:42FromDiscord<ShalokShalom> If its good for anything, then for that
00:02:51FromDiscord<ShalokShalom> I guess they cant prevent it technically
00:03:17FromDiscord<ShalokShalom> Since they want the API for other bot stuff
00:04:03FromDiscord<Elegantbeef> Yea can even send SMS/Email through matrix bots 😄
00:04:20FromDiscord<Elegantbeef> It's got quite good capabilities \:D
00:05:25FromDiscord<undel> In reply to @ShalokShalom "Typical open source fashion": Situation: there are now 15 competing standards
00:07:27*ehmry joined #nim
00:08:55FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4juH
00:08:56FromDiscord<albassort> what do you think of my use of block
00:09:28FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4juH" => "https://paste.rs/A4e"
00:10:11FromDiscord<Rika> Makes no sense because you’re not breaking out of any sort of outer loop
00:10:20FromDiscord<Rika> There’s only one loop to break out of
00:10:57FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4juI
00:11:07FromDiscord<albassort> ok i just wanna use block-break because its cool
00:11:31FromDiscord<Rika> Okay
00:11:33FromDiscord<Rika> You do you
00:11:38FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4juI" => "https://play.nim-lang.org/#ix=4juJ"
00:12:03FromDiscord<albassort> judging by your reaction you actually mean↔"Don't do you, thats fucking stupid"
00:12:42FromDiscord<Rika> Feel free to interpret what I say like that
00:12:47FromDiscord<Rika> Just don’t say that it’s what I said
00:13:25FromDiscord<albassort> I can see block being used to break out of nested if statements
00:13:43FromDiscord<albassort> it can be used anyway you wish for it to
00:13:57FromDiscord<albassort> if it was only for loops they would have stopped its use outside of a loop
00:14:01FromDiscord<Rika> In reply to @albassort "I can see block": Sure
00:14:11FromDiscord<albassort> but my code has no use for it here
00:14:15FromDiscord<albassort> so im gonna do it the normal way
00:14:19FromDiscord<Rika> But the way you used it doesn’t have anything to apply
00:14:43FromDiscord<albassort> if there was another branch to spontaneously switch to
00:14:51FromDiscord<albassort> idk
00:15:09FromDiscord<Rika> What?
00:16:16FromDiscord<albassort> don't you what me you sussy baka
00:20:28FromDiscord<ali> Merry Christmas y'all 😘 British time anyways
00:21:54FromDiscord<albassort> :)
00:28:32FromDiscord<System64 ~ Flandre Scarlet> Hi↔https://github.com/Niminem/Neel↔Can it work with a JS Framework like Angular?
00:31:54FromDiscord<Elegantbeef> Probably
00:33:17FromDiscord<System64 ~ Flandre Scarlet> Oh my god, I probably found the Graal?!↔I hate Electron because how heavy it is
00:35:41FromDiscord<Elegantbeef> https://github.com/juancarlospaco/webgui and friends do exist
00:39:16FromDiscord<System64 ~ Flandre Scarlet> Oh nice↔If both supports JS Frameworks and NodeJS, it would be so nice!
00:59:50FromDiscord<ShalokShalom> In reply to @Elegantbeef "https://github.com/juancarlospaco/webgui and friend": Do I assume correctly that this has no search functionally
00:59:58FromDiscord<ShalokShalom> I looked into the docs
01:01:51FromDiscord<ShalokShalom> I look for something that runs on Linux and provides a search box and dynamic updating of the content based on the search results :nimGlow:
01:02:35FromDiscord<Elegantbeef> I toyed with webgui briefly it had a terrible interop afaik
01:02:54FromDiscord<ShalokShalom> I see
01:03:17FromDiscord<ShalokShalom> Do you know any toolkit, that can do this
01:03:43FromDiscord<Elegantbeef> I've used owlkettle for something similar
01:03:50FromDiscord<ShalokShalom> Thanks
01:04:07FromDiscord<Elegantbeef> Infact there is an app launcher example
01:04:55FromDiscord<ShalokShalom> Hnn
01:05:09FromDiscord<ShalokShalom> Was just about asking you about your code
01:05:50FromDiscord<Elegantbeef> https://github.com/can-lehmann/owlkettle/blob/main/examples/apps/app_launcher.nim
01:06:02FromDiscord<Elegantbeef> Based off code i wrote but cah rewrote to fit the paradigm better
01:07:32FromDiscord<ShalokShalom> It looks really clean
01:08:09FromDiscord<ShalokShalom> That interface to GTK makes it a thousand times more approachable
01:10:35FromDiscord<ShalokShalom> I will try to build this app tomorrow
01:10:53FromDiscord<ShalokShalom> Or today, more precise
01:11:06FromDiscord<ShalokShalom> Looks really neat
01:11:17FromDiscord<Elegantbeef> Yea i liked owlkettle
01:18:43FromDiscord<System64 ~ Flandre Scarlet> I prefer designing GUIs with HTML / CSS / JS
01:21:10FromDiscord<Elegantbeef> I prefer not making GUI 😄
01:37:45FromDiscord<Bung> searchbox that's just html input
01:40:50FromDiscord<Elegantbeef> Yea you could use webgui for that, i just didnt like how it did interop
01:41:07FromDiscord<Elegantbeef> You couldnt modify the HTML from the host afaict
01:41:24FromDiscord<Elegantbeef> I guess cannot modify the dom is more correct to say 😄
01:42:05FromDiscord<Bung> dont know why you say cant modify the dom
01:42:17FromDiscord<Elegantbeef> How do you modify the dom with webgui?
01:42:25FromDiscord<Elegantbeef> I did not see anyway to
01:42:36FromDiscord<Bung> it's local html file, how cant you modify it
01:43:03FromDiscord<Elegantbeef> I was loading a html page, calling Nim code then wanting to display that result
01:43:51FromDiscord<Elegantbeef> There was no good way to mutate the dom, the only way you can interact with the dom is through their json interop bridge
01:46:56FromDiscord<Bung> I use something like this https://github.com/bung87/gamode/blob/main/src/gamode.nim#L154
01:47:34FromDiscord<Elegantbeef> How does that relate to the webgui package?
01:47:51FromDiscord<sekao> sent a code paste, see https://play.nim-lang.org/#ix=4juT
01:48:34FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/pull/21170
01:49:22FromDiscord<Bung> it use modified webview.nim that handle load html string properly
01:49:31FromDiscord<sekao> In reply to @Elegantbeef "https://github.com/nim-lang/Nim/pull/21170": ah nice
01:50:28FromDiscord<Elegantbeef> Ok bung, but it's not like your sending runtime data to the html to update the page afaict
01:52:11FromDiscord<Bung> ok then
02:03:28FromDiscord<albassort> you guys ever have a #TODO and forget about it
02:03:32FromDiscord<albassort> then find it
02:03:36FromDiscord<albassort> and go "NOOOOOOO"
02:47:25FromDiscord<Rika> No
02:47:37FromDiscord<Rika> Why so dramatic about a forgotten todo I don’t get it
02:57:51madpropsbecause the software is bad
03:00:42FromDiscord<Bung> I guess just he write something todo he really dont want to do
03:29:11FromDiscord<Bung> look what I found https://github.com/kaitai-io/kaitai_struct
03:30:07FromDiscord<Elegantbeef> A general binary language interesting
03:32:46FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/eUm
03:35:00FromDiscord<Bung> oh, I cant get the idea behind it, where the code come from?
03:35:16FromDiscord<Elegantbeef> https://github.com/kaitai-io/kaitai_struct_nim_runtime/tree/f5285907bea2f464bb9e3b7f9ee5ed12f14740e9
03:35:32FromDiscord<Elegantbeef> It's really just a language agnostic variant of https://sealmove.github.io/binarylang/
03:35:38*wallabra_ joined #nim
03:38:35*wallabra quit (Ping timeout: 264 seconds)
03:38:36*wallabra_ is now known as wallabra
03:40:57FromDiscord<Bung> I feel kaitai\_struct is more like unified apis handle binaray files
03:41:19FromDiscord<Elegantbeef> Afaict it just generates code that parses the data
03:41:24FromDiscord<Elegantbeef> So kinda
04:07:06*ltriant joined #nim
04:12:38*ltriant quit (Ping timeout: 272 seconds)
04:16:19FromDiscord<GalacticColourisation> hello
04:16:26FromDiscord<GalacticColourisation> merry cmris
04:16:45FromDiscord<Rika> 👍
04:24:05*ltriant joined #nim
04:30:19*ltriant quit (Ping timeout: 260 seconds)
04:38:59*rockcavera joined #nim
04:52:12*tiorock joined #nim
04:52:12*tiorock quit (Changing host)
04:52:12*tiorock joined #nim
04:52:12*rockcavera is now known as Guest1976
04:52:12*tiorock is now known as rockcavera
04:56:15*Guest1976 quit (Ping timeout: 265 seconds)
05:16:20*tiorock joined #nim
05:16:20*tiorock quit (Changing host)
05:16:20*tiorock joined #nim
05:16:20*rockcavera is now known as Guest2840
05:16:20*Guest2840 quit (Killed (sodium.libera.chat (Nickname regained by services)))
05:16:20*tiorock is now known as rockcavera
06:30:52*Guest12 joined #nim
06:34:41*Guest12 quit (Client Quit)
06:38:37FromDiscord<ShalokShalom> @sekao thanks a ton
06:38:40FromDiscord<ShalokShalom> https://forum.nim-lang.org/t/9758#64240
06:39:46FromDiscord<ShalokShalom> I was looking for proper persistent data structures for long :nimGlow:
06:42:48FromDiscord<ShalokShalom> Since initialized collections are recommended, why did you use the bulkier name on them?
06:45:50FromDiscord<ShalokShalom> Map[] definitely sounds like the default↔And initMap like the special case
06:46:16FromDiscord<ShalokShalom> (edit) "initMap" => "initMap[]" | "initMap[]like the special case ... " added ":nimGlow:"
06:47:45FromDiscord<ShalokShalom> Does it sound sane to swap this around and spend the uninitialized collections a special name.. ?
06:59:09*wallabra_ joined #nim
07:01:59*wallabra quit (Ping timeout: 264 seconds)
07:03:13*wallabra joined #nim
07:03:53*wallabra_ quit (Ping timeout: 268 seconds)
07:16:27*tiorock joined #nim
07:16:27*tiorock quit (Changing host)
07:16:27*tiorock joined #nim
07:16:27*rockcavera is now known as Guest1374
07:16:27*tiorock is now known as rockcavera
07:19:28*Guest1374 quit (Ping timeout: 272 seconds)
08:38:10FromDiscord<Phil> I feel like I remembered preludes incorrectly
08:38:32FromDiscord<Phil> I thought I could implicitly have everything in a prelude imported in every module file in a project
08:38:52FromDiscord<Phil> now I see it's just a convenience file with a bunch of import statements and no magic surrounding it whatsoever
08:41:35FromDiscord<Elegantbeef> you can do `--import:myFile`
08:44:09FromDiscord<Phil> Was going over the compiler flags just not just in case I'd forgotten it and found it.↔Seem like I mixed up prelude and the import flag in my mind
09:00:24*ltriant joined #nim
09:04:40*ltriant quit (Ping timeout: 252 seconds)
09:19:06FromDiscord<Mitja Felicijan> I am new to Nim. How would one return string or error if something goes wrong from a procedure? I am parsing some JSON and if fails I would like to return error so I can handle it later in the code. I tried Result and I keep getting errors that stuff is not defined even though I have imported system.
09:19:27FromDiscord<ezquerra> In reply to @Isofruit "now I see it's": What do you mean?↔I made a library called “batteries” that is similar to prelude except that you can import it (instead of including it like prelude). It also imports more modules form the standard library
09:19:43FromDiscord<ezquerra> I wonder what additional kind of magic you’d like to get from such a library?
09:20:52FromDiscord<Phil> In reply to @ezquerra "What do you mean?": I mostly needed to know the mechanism because I intend to write a mini mocking lib based on the custom pragma beef gave me in offtopic.↔I basically want to annotate all exported procs in all modules of a project with said pragma and make sure that pragma is defined by having it auto-imported
09:22:36om3gaMitja Felicijan, like in other languages, you should catch that errors, and return the integer code, or true/false with mutable function input parameter (string) to have string description of that error
09:23:29om3gaor handle the error with already made mechanisms, like strerror, or assertions
09:24:24om3gause try-except constructs, there is many ways how to do that
09:24:33FromDiscord<Mitja Felicijan> I have the following procedure `proc requestAvailabilityInformation(url: string): Availability =`. I capture stuff inside with try/except. What I would like is to somehow return either Availability or nil or something like that.
09:25:29om3gawhat type Availability is?
09:25:38FromDiscord<Mitja Felicijan> Its a struct.
09:25:49FromDiscord<Mitja Felicijan> So not an int, which would be acceptable with nil.
09:27:37om3gaor maybe object? you can move it to input parameter, maybe like thar : proc requestAvailabilityInformation(url: string, avail: var Availability): bool =
09:27:44FromDiscord<Mitja Felicijan> I was thinking maybe having a something like tuple for the response (Availability, err). Or something like that if that is not possible, and return empty struct in case of error. I am still learning how to do things in Nim and what are the best practices.
09:27:46om3gaand return true-false
09:28:10FromDiscord<Elegantbeef> `std/options` exists
09:28:37FromDiscord<Mitja Felicijan> Would that allow me to access the object when I call the procedure later in the code with assignment?↔(<@709044657232936960_om3ga=5b=49=52=43=5d>)
09:29:26FromDiscord<Mitja Felicijan> I call this function later in the code and access the object props.
09:29:43om3gaMitja Felicijan, yeah, it should, you pass the object to this function
09:29:43FromDiscord<Mitja Felicijan> That is why I am returning the struct.
09:30:41FromDiscord<Mitja Felicijan> Is this similar to passing by reference?
09:30:48om3gait will exist until calling function will not exit (or you will not copy it to another object)
09:32:06om3gaMitja Felicijan, I don't really tried to study how nim passes that objects to the functions, but yeah, it should be the reference to the orig one object
09:33:32om3gabut it depends on the type of objects, for example if you have shared heap alloceted, then you should pass prt typeName, then word var is not necessary
09:34:51FromDiscord<Mitja Felicijan> 2022-12-25\_10\:34\:30.png https://media.discordapp.net/attachments/371759389889003532/1056505290884919346/2022-12-25_103430.png
09:34:56FromDiscord<Mitja Felicijan> This is the struct
09:35:03om3gaMitja Felicijan or you can return object with elements inside it that can point to an error with string of the error code
09:35:57FromDiscord<Mitja Felicijan> This seems the most simple solution for now.↔(<@709044657232936960_om3ga=5b=49=52=43=5d>)
09:36:04om3gabut by my opinion this is not optimal, to operate with such amounts of data
09:36:35om3gasorry, I'm from IRC, which one is simple?
09:36:56FromDiscord<Mitja Felicijan> or you can return object with elements inside it that can point to an error with string of the error code↔(<@709044657232936960_om3ga=5b=49=52=43=5d>)
09:37:23FromDiscord<Mitja Felicijan> The most simple one until I understand this more 🙂
09:37:28om3gayeah, but as I mentioned, this might be not optimal
09:38:35FromDiscord<Mitja Felicijan> I know 🙂 For the prototype, it will do.↔(<@709044657232936960_om3ga=5b=49=52=43=5d>)
09:42:21FromDiscord<Mitja Felicijan> I initialized it like this `var availability: Availability = default(Availability)` and then I populate it if nothing fails and return this, and then I can check status attr in struct. Not the most elegant way of doing it, but it works. Thanks for the help.
09:44:05om3gaMitja Felicijan : here is example https://play.nim-lang.org/#ix=4jvA
09:44:33om3gaMitja Felicijan : ur welcome!
09:50:25FromDiscord<Mitja Felicijan> It works like a charm! This is awesome. Thank you, so much!↔(<@709044657232936960_om3ga=5b=49=52=43=5d>)
09:50:37om3gaMitja Felicijan : no prob
10:42:34FromDiscord<hdbg> Can I determine if a certain address was allocated via `alloc` function?
10:50:38FromDiscord<HitBlast> Is there a way to clear out or check for unused packages inside nimble?
10:50:48Amun-Rahdbg: no, that address isn't managed anywhere
10:53:07FromDiscord<willyboar> Isn't possible to setup GitHub actions to packages repo and then remove any package that fail to install?
10:54:15FromDiscord<willyboar> I know there are a lot of them but it seems like a solution to remove broken packages
10:54:34FromDiscord<willyboar> (edit) "a" => ""
11:38:14*wallabra quit (Ping timeout: 246 seconds)
11:42:46*wallabra joined #nim
11:52:14*jmdaemon quit (Ping timeout: 246 seconds)
12:22:20FromDiscord<N00nehere> Hey guys, just wanted to wish you all happy holidays. Discord is filled with ready-made messages that you don't even read, you just copy and paste to every server, I don't like that, I like writing from my heart. Our friendship, from the deepest to virtual, is very important to me and couldn't ever be represented by a cookie-cutter message from anywhere. So, I'd like to thank you all, you're the best furry roleplaying server I've ever i
12:24:56FromDiscord<Phil> ... I am tempted to request for spam ban
12:55:15FromDiscord<Phil> Anyone can think of a decent way to scan for the end of a proc to insert a pragma manually there? (I know its ugly as hell, you don't need to tell me, can't think of a better solution)
12:55:38FromDiscord<Phil> Assuming you have the line of a file where a proc definition starts
12:56:00FromDiscord<Phil> (edit) removed "of a file" | "a" => "the" | "wheretheproc definition starts ... " added "and you can look at future lines"
12:56:15FromDiscord<Phil> (edit) "future" => "the" | "thelines ... " added "that follow after"
13:24:23FromDiscord<Vindaar> If you want it robust: use the compiler API, parse the code, insert into the AST similar to how you would in a macro, then render tree back as code & write back.↔Otherwise, depends a bit. If single line procs are forbidden it's not too bad (replace last `=` by `{.myPragma.} =`. Otherwise search for `proc/func` + `(` + `)` + `=` (gotta make sure to count parens, as there may be nested parens)
13:24:38FromDiscord<Vindaar> but maybe there's a better way 🙂
13:24:54FromDiscord<arkanoid> Wouldn't be nice if the ide would paint CT/RT code with different colors?
13:28:43FromDiscord<amadan> Think that would be possible LSP semantic highlighting đŸ€”
13:28:51FromDiscord<Phil> In reply to @Vindaar "If you want it": I'm semi-certain that I don't care about inline proc definitions.↔The macro would let me mock the proc, I don't care about mocking inline-procs, they're part of the procedure that's getting tested and thus shouldn't be mocked
13:29:04FromDiscord<Phil> (edit) "In reply to @Vindaar "If you want it": I'm semi-certain that I don't care about inline proc definitions.↔The macro would let me mock the proc, I don't care about mocking inline-procs, they're part of the procedure that's getting tested and thus shouldn't be mocked ... " added "individually"
13:30:33FromDiscord<arkanoid> Even better would be be able to ask the ide (nimsuggest/lsp) if the code I'm on is CT or RT
13:30:44FromDiscord<Vindaar> I mean with something like `npeg` you should be able to construct the nim grammar for procedure signatures I suppose. I'm no help there though, as I don't have peg experience and reading the Nim grammar is also work for me đŸ€Ł
13:35:17FromDiscord<Bung> I'd rather it render color fully client side (the current implementation)
13:36:13FromDiscord<arkanoid> What do you mean?
13:36:22FromDiscord<Bung> wait language server just for syntax highlight? no, that's nightmare
13:38:13FromDiscord<Phil> In reply to @Vindaar "I mean with something": Hot dang all of this looks painful
13:38:28FromDiscord<Phil> Parsing language is pain
13:39:00FromDiscord<arkanoid> Well my point was not how to provide it, but if that would be interesting on not. It's abou what, not how
13:40:24FromDiscord<Bung> I know that am saying that just because it's a directly route implement it in language server
13:42:05FromDiscord<arkanoid> You mean it's easy to make it spit out that info?
13:44:30FromDiscord<Bung> I think so the server can identify this and give different color response to client side
13:46:28FromDiscord<arkanoid> \`42'f32\` vs \`42.float32\` , would the second be paited as CT?
13:47:52FromDiscord<Bung> the second one more closer to RT, as it call a conversation proc
13:51:06FromDiscord<arkanoid> You sure? Is a proc on a literal
14:00:24FromDiscord<Bung> it's `int literal` -\> conversation proc -\> `float`
14:00:27FromDiscord<sekao> In reply to @ShalokShalom "Since initialized collections are": I'm going with the normal convention of initialization functions starting with `init`. But really it's fine to just not initialize them. I say it's not recommended in parazoa for stylistic reasons. Isn't nim going to start printing a warning when you do it?
14:02:20FromDiscord<Bung> there's a issue about a proc defines return type but proc body just have `discard`, they suggest give a warning
14:09:59NimEventerNew thread by CraneDancingShape: How to further speed up the build of your Nim's projects (using ccache), see https://forum.nim-lang.org/t/9759
14:17:58FromDiscord<arkanoid> So it's a procedure running on a constant (literal) value. It's constant
14:18:24*junaid_ joined #nim
14:20:41FromDiscord<Bung> why you think like that? the literal only means you write the number in code
14:23:38FromDiscord<tyrion> Hello, I was wondering if I declare a type like this type `Mat[N, M: static[int]] =` ... is there a way to access the values of N and M at runtime?
14:28:44FromDiscord<Bung> I may need full code to answer your question, in most cases I'd say yes, but I dont know where that question come from.
14:31:00FromDiscord<tyrion> Well, the full code right now is just `type Mat[N, M: static[int]] = array[N, array[M, float]]`, and so I could use `low` and `high`, however I was wondering if I could define the type as something like `type Mat[N, M: static[int]] = array[NM, float]` ?
14:31:02FromDiscord<arkanoid> Aren't literals constant?
14:32:34FromDiscord<Bung> so can you declare a proc returns `static[int]`
14:34:24FromDiscord<Bung> yes you can, there're few issues related to it but not this case
14:35:15FromDiscord<tyrion> Ok cool, thanks, I will try. What are the issues anyway? just curious
14:36:54FromDiscord<Bung> like nested generic proc when you instantiation outer the inner proc cant get the `static[int]` generic param, so it cant instantiation
14:39:01FromDiscord<Bung> like `array[T]` well `T` requires static as array is special handled so the `T` must be special handled to , but now when you pass non-static number it cause other error make user confusing.
14:41:00FromDiscord<Bung> and `array[T]` accept a type like `int` but it cause cgen error , as it's too large
14:41:46FromDiscord<tyrion> Ok! thanks for the explanation
14:42:28FromDiscord<Bung> NP
14:43:14FromDiscord<tyrion> Also, if I want to iterate over the values in an array, what is the difference in doing `for i in low(arr)..high(arr): arr[i]` or directly `for val in arr: val`
14:45:50FromDiscord<Bung> 1. `for i in 111 .. 222:` , 2. `for val in system.items(arr)`
14:49:10FromDiscord<tyrion> It works without the `system.items` for me though ...
14:49:18FromDiscord<tyrion> is it an automatic cast to iterable or something like that?
14:50:33FromDiscord<vindaar> writing `for x in SomeInstance` implicitly converts that to `for x in items(SomeInstance)`. That's why it works magically without
14:50:49FromDiscord<vindaar> as long as there's an `iterator items` defined that is
14:54:09FromDiscord<Bung> it's magic proc
14:54:33FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=4jwC
14:55:59FromDiscord<tyrion> Not sure I understand this in detail. I get it, it's a special case of the for statement
14:56:33FromDiscord<tyrion> So, is there a way I can make some magic like this for my "Matrix" type as well?
14:57:33FromDiscord<tyrion> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1056586108198211684): Not sure I understand this in detail. What I get is that it's a special case of the for statement
14:58:27FromDiscord<vindaar> as mentioned above, just define an iterator named `items`
14:58:59FromDiscord<Bung> and export it
14:59:22FromDiscord<tyrion> ah, super cool
15:08:33FromDiscord<ShalokShalom> In reply to @sekao "I'm going with the": Ah ok
15:08:38FromDiscord<ShalokShalom> Idk about Nim warnings
15:08:56FromDiscord<ShalokShalom> But it sounds like in the docs, not doing so will explode the world
15:09:06FromDiscord<ShalokShalom> Maybe you wanna explain in the README
15:09:18*arkurious joined #nim
15:17:26FromDiscord<sekao> i removed the warning from the comments since it isn't a safety issue (bugs notwithstanding)
15:47:08FromDiscord<tyrion> Now, maybe this is too much, but out of curiosity, is it possible to define a type with a variable type of arguments? Like `Tensor[A, B, C, ...]`
15:47:49FromDiscord<tyrion> kind of varargs for types
15:50:41FromDiscord<ajusa> In reply to @tyrion "Now, maybe this is": pretty sure you can't - you'd need to resort to macros
15:51:03FromDiscord<ajusa> at least that's what beef told me last time I asked that question
15:59:49FromDiscord<tyrion> where prod is imported from math
16:00:14FromDiscord<tyrion> would be fun though ahah
16:21:16FromDiscord<Vindaar> bridge is half dead I think
16:21:30FromDiscord<tyrion> @ajusa\: you meant to turn `prod` into a macro? Or something else, like generating a tensor type on demand?
16:21:51FromDiscord<tyrion> My understanding of nim is not yet good enough to figure this out I think
16:24:02*junaid_ quit (Remote host closed the connection)
16:25:56FromDiscord<tyrion> so would you need to generate separate types like `Tensor2D, Tensor3D, Tensor4D` ... etc?
16:37:17*ltriant joined #nim
16:38:33FromDiscord<Bung> I just realize matrix bridge is down
16:41:44*ltriant quit (Ping timeout: 246 seconds)
16:41:51FromDiscord<tyrion> So, I am curious to understand why my previous example with Matrix worked perfectly even though it had `NM` on the rhs, and now `prod(S)` doesn't seem to work. Is the limitation that it is not possible to have a static array (or object or whatever) on the left-hand side of a type?
16:48:21FromDiscord<Bung> am off now it's 0\:33 here
17:27:44FromDiscord<Smarc> whats a good way to put values to the letters {'a'..'z'} and {'A'..'Z'}? I want 'a' to have the value 1, 'b' value 2, ... and 'A' value 26, 'B' value 27 , ... etc. What would be an Nim idiomatic way to accomplish that?
17:27:52FromDiscord<Smarc> I thought about enums first thought
17:28:50FromDiscord<Smarc> 'A' value 27, 'B' 28 and so on of course
17:48:29FromDiscord<mantielero (mantielero)> Happy holidays all
17:59:37FromDiscord<mantielero (mantielero)> So probably I should emit it
19:07:03FromDiscord<Phil> In reply to @Smarc "whats a good way": Depends, if you want to go hyper efficient you could just store an array and define a "value" proc that takes the index of the character and adds 1 to it to get your desired number
19:07:10FromDiscord<Phil> (edit) "In reply to @Smarc "whats a good way": Depends, if you want to go hyper efficient you could just store an array ... and" added "or a seq"
19:16:18FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jxy
19:16:55FromDiscord<Phil> or 2 dictionaries if you want to map value --> character as well as character --> value
19:17:21FromDiscord<Phil> Or another way could be to transform the bits of cha into the number you want, should be pretty easily possible
19:27:10FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jxz
19:32:56FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jxC
19:33:26FromDiscord<huantian> I’d say just do if c in ‘a’..’z’
19:33:44FromDiscord<Phil> I think he wants explicitly numerical values
19:33:48FromDiscord<huantian> Instead of the isLowerCase/upperacsde
19:33:55FromDiscord<Phil> ohhh that way
19:34:40FromDiscord<Phil> I wonder what's faster, 2 comparisons or checking if x is in a range
19:35:01FromDiscord<huantian> Should be optimized to be the same
19:35:07FromDiscord<huantian> Maybe a case match would be even better
19:42:47FromDiscord<Phil> Just did a check for the funsies
19:43:49FromDiscord<Phil> sent a code paste, see https://paste.rs/Ild
19:45:03FromDiscord<Phil> I don't really understand how these number differences come about.↔Factor 50 would've made sense to me again, "only" a 50% difference just confuses me
19:45:36FromDiscord<Phil> (edit) "50" => "20+"
19:46:07FromDiscord<Phil> Not that it matters. Unless you're insanely performance sensitive this is irrelevant
19:55:20FromDiscord<Smarc> whats the nim equiv to a dict? table?
19:55:49FromDiscord<Smarc> dict or hashmap or something like that
19:59:28FromDiscord<Phil> In reply to @Smarc "whats the nim equiv": Table.↔The important difference to things like a python table is though, that your values all need to have the same datatype.↔So you can't have one table where some values are strings and others are ints
19:59:37FromDiscord<Phil> (edit) "table" => "dict"
20:00:29FromDiscord<Phil> Or rather you can, but that'd require an object variant
20:04:11FromDiscord<Smarc> thats fine. gonna look into it, thank you
20:06:35FromDiscord<Smarc> is there a shortcut to assign all the values? or do i have to write every single letter in a single line?
20:06:57FromDiscord<Smarc> or just loop it? whats the most idiomatic way?
20:32:58FromDiscord<albassort> hey so im making a simple bidirectional table library
20:33:29FromDiscord<albassort> how would you guys prefer to differentiate between a bitable with two of the same types
20:34:27FromDiscord<albassort> my current idea is, for [A,A] you are required to have a [A,A,B], the B being an enum to sort the additions
20:34:36FromDiscord<albassort> that or a proc
20:34:47FromDiscord<albassort> (edit) "that or a proc ... " added "as a parameter with the input of a"
20:34:52FromDiscord<albassort> (edit) "that or a proc as a parameter with the input of a ... " added "and yeilds a bool"
20:36:59*xet7 joined #nim
20:42:40FromDiscord<auxym> In reply to @Smarc "or just loop it?": what do you mean assign all values? assign all of what?
20:43:42FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jxM
20:43:48FromDiscord<albassort> kinda surprised this compiles
20:44:43FromDiscord<albassort> could of sworn you couldn't default cast parameters to nil
21:11:57FromDiscord<Mitja Felicijan> Is there a reason why this line `write(stdout, fmt"{snapshot.timestamp}\t{snapshot.original}\n")` would not respect new line and tab? They are not being rendered. I also tried with echo, and it's the same. I guess the `fmt` is a problem. Is there and alternative for this?
21:12:46FromDiscord<djazz> Use `&` instead of `fmt`
21:12:58FromDiscord<djazz> I think?
21:13:16FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jxP
21:13:29FromDiscord<Phil> Though tbh I'd recommend just using the procs over using a table
21:14:37FromDiscord<djazz> In reply to @Mitja Felicijan "Is there a reason": https://nim-lang.org/docs/strformat.html#nimfmt-vsdot-nimamp
21:15:47FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jxS
21:16:00FromDiscord<albassort> I don't know what object variants are
21:16:04FromDiscord<Phil> Let the user give you 2 types, you throw them into a generic object variant for which you have procs that differentiate between the two
21:17:05FromDiscord<Phil> In reply to @albassort "I don't know what": object variants are nims way to deal with the scenario that you want a sequence, but values in it may either be of type string or of type int (or other such scenarios)↔So you define a type that can be both, using different fields to store each value based on an enum
21:17:07FromDiscord<Elegantbeef> Nope
21:17:10FromDiscord<Phil> std/json makes heavy use of this
21:17:40FromDiscord<Elegantbeef> Nim has a special string syntax that allows any callable to be used `callable"myString"` but the caveat is it turns it into a raw string literal
21:17:45FromDiscord<Phil> In reply to @albassort "I don't know what": https://nim-lang.org/docs/manual.html#types-object-variants
21:17:47FromDiscord<Elegantbeef> Which means characters are not escaped
21:19:09FromDiscord<Phil> An object variant is kind of a statement ala:↔"This object contains either this field, or this other field, or this last other field" (depending on how many enums you have)
21:20:12FromDiscord<Phil> (edit) "have)" => "have). And since they are all different fields they're allowed by the type-system to have different types."
21:20:37FromDiscord<Phil> The main drawback of object variants is you are unlikely to get around using case statements
21:21:08FromDiscord<Phil> Since they force you for every operation you do with the object variant, to deal with all possible variants an object variant can be
21:23:44FromDiscord<albassort> In reply to @Isofruit "https://nim-lang.org/docs/manual.html#types-object-": I mean the user can do that if they want
21:23:47FromDiscord<albassort> That's probably a smart way to go about it
21:23:53FromDiscord<albassort> But I also like the option for classifiers
21:24:12FromDiscord<Phil> Not sure what you mean by classifiers, could you elaborate?
21:24:22FromDiscord<Mitja Felicijan> How would you split this into multiple lines `write(stdout, snapshot.timestamp & "\t" & snapshot.original & "\n")` without having a bunch of separate write statements? For example, in bash you can do `\` at the end of the line.
21:24:28FromDiscord<albassort> A classifier would be you attach a proc to it to define whether or not the input is of a or b
21:25:00FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jxT
21:25:13FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4jxT" => "https://play.nim-lang.org/#ix=4jxV"
21:25:18FromDiscord<albassort> (((trying to figure out how to statically nilcheck, this wont compile)
21:25:32FromDiscord<albassort> (edit) "compile)" => "compile because isnil is runtime... )))"
21:26:02FromDiscord<Phil> But you can do that (at runtime) with an object variant
21:26:08FromDiscord<Phil> Checking if it is a or b that is
21:26:19FromDiscord<albassort> i already have code for that ;-;
21:26:22FromDiscord<Phil> Which is something you can't do at compile-time either way unless your data is compiletime
21:26:50FromDiscord<albassort> well i still want to figure out how to check if something is nil at compile time because it can make some of my code cleaner
21:27:38FromDiscord<albassort> sent a code paste, see https://paste.rs/3AT
21:27:44FromDiscord<albassort> this is one solution i had
21:27:55FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jxW
21:28:14FromDiscord<Phil> for nil checking that tends to work for me
21:28:35FromDiscord<Phil> this forcefully checks at compile-time due to the static block
21:28:52FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jxX
21:28:52FromDiscord<albassort> this would be cool
21:29:00FromDiscord<Phil> that also works
21:29:18FromDiscord<Phil> so does `when x.isNil` huh
21:29:58FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jxY
21:29:58FromDiscord<Phil> Could you throw your BiTable type definition at me?
21:30:11FromDiscord<albassort> doesn't compile
21:30:12FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4jxY" => "https://play.nim-lang.org/#ix=4jxZ"
21:30:14FromDiscord<Phil> Or rather a complete code sample I can compile
21:30:28FromDiscord<Phil> Because "doesn't compile" doesn't tell me what's wrong 😛
21:30:37FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jy0
21:31:14FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4jy0" => "https://play.nim-lang.org/#ix=4jy1"
21:32:20FromDiscord<Phil> I am spotting an indentation issue with your procdefinition of "initBiTable" and "Classify"
21:32:27FromDiscord<Phil> But I'll try to get it running first
21:32:48FromDiscord<albassort> ok yes
21:32:51FromDiscord<albassort> but that doesn't fix it lol
21:33:10FromDiscord<albassort> because classifier cant be resolved at runtime
21:33:36FromDiscord<albassort> idk how that happened lol
21:33:39FromDiscord<Phil> In reply to @albassort "because classifier cant be": It can, you wanna know how?
21:33:49FromDiscord<albassort> o.o
21:33:51FromDiscord<Phil> `static proc(a : A) : bool`
21:34:20FromDiscord<albassort> https://tenor.com/view/cerebro-explosion-mind-blown-gif-8141811
21:34:25FromDiscord<Phil> Keep in mind though that this will mean you will not be able to swap out the proc properly, this likely has a limitation that I'm not fully getting
21:34:50FromDiscord<Phil> Unless you want to only ever provide 1 type of proc for every combination of A-B you plan to use
21:34:52FromDiscord<albassort> i forgot about the static keyword
21:35:29FromDiscord<albassort> In reply to @Isofruit "Unless you want to": I don't support the insanity that would be not doing this
21:35:45FromDiscord<albassort> making a ref to a proc that mutates would be actually just... I want my code to stop you
21:36:03FromDiscord<Phil> In reply to @albassort "I don't support the": I don't parse this sentence but clearly common sense went out the window the moment object variants were rejected for the solution 😛
21:36:21FromDiscord<Phil> Ohhh you mean you don't want to allow people to swap out the proc at runtime
21:36:22FromDiscord<albassort> you cant generate new object variants
21:36:28FromDiscord<albassort> so
21:36:36FromDiscord<Phil> You can do generic ones I'm semi sure, let me see
21:36:37FromDiscord<albassort> if the user wants to not use a classifier its up to them
21:36:51FromDiscord<albassort> the user is free to write logic code
21:36:55FromDiscord<albassort> im here allowing for insane code as well
21:37:04FromDiscord<albassort> this solution is a bit more adaptable
21:39:36FromDiscord<Phil> sent a code paste, see https://paste.rs/q9z
21:40:04FromDiscord<Phil> You likely always have to quality what combination of 2 types you want to use for MyVar, but as a user you can deal with that by making a simple Alias
21:40:11FromDiscord<Phil> (edit) "quality" => "qualify"
21:46:47FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jy4
21:50:15FromDiscord<albassort> ok
21:50:19FromDiscord<albassort> my example is having a problem
21:50:22FromDiscord<albassort> đŸ€”
21:50:23*wallabra quit (Ping timeout: 246 seconds)
21:51:34FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jy5
21:51:42FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4jy5" => "https://play.nim-lang.org/#ix=4jy6"
21:52:00FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jy7
21:52:31FromDiscord<albassort> []= dont work between two distinct types
21:54:52*wallabra joined #nim
21:58:18FromDiscord<huantian> Then you’ll need to make your own hash for your types ig
21:59:43*ltriant joined #nim
22:00:28FromDiscord<albassort> NOOOOO
22:00:48FromDiscord<albassort> if i wanted to program my own hash
22:01:06FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1056693093409239151/image.png
22:01:17FromDiscord<albassort> theres the formula for it
22:02:08FromDiscord<huantian> Are you sure lol
22:02:27FromDiscord<huantian> I mean that’s not a formula for a specific hashing alto
22:02:33FromDiscord<huantian> (edit) "alto" => "algo"
22:02:39FromDiscord<albassort> well thats the... start
22:02:45FromDiscord<albassort> i would need to them figure out the harsh
22:02:56FromDiscord<albassort> this is just the concept
22:03:41FromDiscord<Phil> In reply to @albassort "your solution doesn't fix": My example does indeed have an entirely different problem
22:04:20FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1056693907724959765/image.png
22:04:23FromDiscord<albassort> i have no idea how to solve this
22:04:24FromDiscord<albassort> lmao
22:05:14FromDiscord<albassort> template instantiation
22:05:23FromDiscord<albassort> from inserting two distinct types
22:05:32FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4jyf
22:05:55FromDiscord<albassort> well i dont know how to see the actual issue
22:06:04FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=4jyf" => "https://play.nim-lang.org/#ix=4jyg"
22:06:40FromDiscord<Phil> The line that bombs is `table[variantKey].fld2`, as `[]` apparently does not like being in a variant object generic or sth
22:07:12FromDiscord<albassort> do i...
22:07:16FromDiscord<albassort> open up an issue
22:07:49FromDiscord<albassort> alright i have another solution
22:08:01FromDiscord<albassort> this might be cursed
22:10:07FromDiscord<albassort> @Phil what was that keyword which defines generic conversions again
22:14:06FromDiscord<Phil> In reply to @albassort "<@180601887916163073> what was that": converter?
22:14:07FromDiscord<albassort> converter
22:14:27FromDiscord<ElegantBeef> Fuck bridge dieded
22:14:40FromDiscord<ElegantBeef> sent a code paste, see https://paste.rs/8yq
22:15:31FromDiscord<ElegantBeef> You implement a `==` and `hash` procedure
22:15:34FromDiscord<ElegantBeef> Solveded
22:18:38FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jyi
22:18:39FromDiscord<albassort> ok this doesn't work either
22:19:01FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4jyi" => "https://play.nim-lang.org/#ix=4jyk"
22:19:26*ltriant quit (Ping timeout: 272 seconds)
22:19:32FromDiscord<albassort> oh wait
22:19:36FromDiscord<albassort> i never implemented that proc
22:19:53FromDiscord<albassort> works fine
22:19:56FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jyl
22:20:21FromDiscord<albassort> or wait maybe
22:21:36FromDiscord<albassort> this also works
22:21:38FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jym
22:22:00FromDiscord<ElegantBeef> I dont get why you just dont implement `hash` and `==`
22:22:08FromDiscord<ElegantBeef> You lose all type safety here
22:22:16FromDiscord<albassort> for the that is the point
22:22:27FromDiscord<ElegantBeef> What's the point of the distincts then?
22:22:42FromDiscord<albassort> hypothetical type saftey
22:23:12FromDiscord<albassort> though for actual type saftey you should implement them to be the same type but implement a classifier
22:23:22FromDiscord<ElegantBeef> I dont follow
22:24:08FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4jyn
22:24:39FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jyo
22:24:44FromDiscord<albassort> type saftey between cased strings
22:24:56FromDiscord<ElegantBeef> Oh there we go matrix bridge is back
22:26:01FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jyp
22:26:03FromDiscord<ElegantBeef> They dont care about distincts
22:26:13FromDiscord<albassort> in this case they do
22:26:17FromDiscord<ElegantBeef> No they dont
22:27:15FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1056699674674876509/image.png
22:27:38FromDiscord<albassort> explain that, liberal
22:27:59FromDiscord<Elegantbeef> I guess it errors in `==` so you need to implement the `==` for your variant aswell
22:28:07FromDiscord<ElegantBeef> Works fine
22:28:09FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4jyr
22:28:24FromDiscord<albassort> then whats hapening here
22:28:38FromDiscord<ElegantBeef> I dont know give the compiler error instead of an arrow you cuckservative
22:28:50FromDiscord<ElegantBeef> Am i doing this joke right?
22:28:59FromDiscord<albassort> not exactly but close enough
22:29:07FromDiscord<albassort> aight lemme if you the compiler error
22:29:08FromDiscord<albassort> ahem
22:29:20FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jys
22:29:21FromDiscord<ElegantBeef> That's not the compiler error
22:29:26FromDiscord<ElegantBeef> That's a part of the message
22:29:27FromDiscord<albassort> how i give compiler error
22:29:29FromDiscord<ElegantBeef> The least important part
22:29:31FromDiscord<ElegantBeef> Compile the program
22:29:35FromDiscord<ElegantBeef> And give the entire compiler error
22:29:56FromDiscord<albassort> it doesn't even fitr
22:29:57FromDiscord<albassort> (edit) "fitr" => "fit"
22:30:08FromDiscord<ElegantBeef> Well turn it into a cat
22:30:20FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4jyt
22:30:23FromDiscord<ElegantBeef> There you go
22:30:25FromDiscord<ElegantBeef> You're missing a hash
22:30:35FromDiscord<albassort> (edit) "https://play.nim-lang.org/#ix=4jyt" => "https://paste.rs/Nfj"
22:30:38FromDiscord<ElegantBeef> You need to implement `==` and `hash` for custom types
22:30:41FromDiscord<albassort> ok how do i write a hash that accounts for this
22:30:46FromDiscord<albassort> for arbitrary types
22:30:50FromDiscord<albassort> any type put into this proc
22:31:00FromDiscord<albassort> or do i just let the user figure it out
22:31:06FromDiscord<ElegantBeef> Users provide their own
22:31:09FromDiscord<ElegantBeef> Just like std/tables
22:31:16FromDiscord<ElegantBeef> You can provide defaults
22:31:27FromDiscord<albassort> :hmm:
22:31:48FromDiscord<ElegantBeef> Works for instance
22:31:50FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4jyv
22:32:04FromDiscord<albassort> i will include this in the readme
22:32:10FromDiscord<ElegantBeef> Though `$` should call `$` i guess
22:32:25FromDiscord<albassort> "supreme spaghetti writer, ElegentBeef"
22:32:25FromDiscord<ElegantBeef> https://nim-lang.org/docs/tables.html#basic-usage-hashing but nim's tables documents this
22:32:30FromDiscord<ElegantBeef> It's not even spaghetti
22:32:33FromDiscord<ElegantBeef> It's sensible code
22:32:46FromDiscord<albassort> no, but spaghetti is what i associate you with
22:32:47FromDiscord<ElegantBeef> This is the power of mixins in Nim
22:32:56FromDiscord<ElegantBeef> You can define logic that operates on code that's not even written yet
22:45:48*ltriant joined #nim
22:49:19*adium quit (Ping timeout: 260 seconds)
22:49:49*adium joined #nim
22:51:04*ltriant quit (Ping timeout: 260 seconds)
22:51:37FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4jyx
22:51:45FromDiscord<System64 ~ Flandre Scarlet> (edit) "https://play.nim-lang.org/#ix=4jyx" => "https://play.nim-lang.org/#ix=4jyy"
22:53:28FromDiscord<Phil> In reply to @ElegantBeef "Works for instance": Huh, didn't know about distinctBase
22:54:19FromDiscord<Phil> How... does that bracket syntax even work?
22:54:27FromDiscord<ElegantBeef> Damn it the bridge only goes one way right now
22:54:29FromDiscord<ElegantBeef> That's funny
22:54:32FromDiscord<ElegantBeef> That's JS phil
22:54:41FromDiscord<Phil> Oh wow
22:54:50FromDiscord<Phil> Yeah, just didn't parse
22:55:35FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "Damn it the bridge": I think Neel can do both directions?
22:55:49FromDiscord<ElegantBeef> No the matrix bridge is only taking discord messages
22:55:53FromDiscord<ElegantBeef> Discord is not recieving them
22:56:03FromDiscord<ElegantBeef> I think you do `nim js neel.nim` and use that
22:56:12FromDiscord<ElegantBeef> Given the example has a `<script src = "neel.js"/>`
22:56:58FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "I think you do": What I want to do is doing an electron-like app (what is Neel done for) and use stuff like NodeJS, Angular, ...
22:57:10FromDiscord<Phil> In reply to @System64 "Hi About Neel, where": callProc is never written anywhere, it gets generated (see Readme.md):↔> `exposeProcs` is a macro that exposes specific procedures for javascript to be able to call from the frontend. When the macro is expanded, it creates a procedure `callProc` which contains all exposed procedures and will call a specified procedure based on frontend data, passing in the appropriate params (should there
22:57:15FromDiscord<ElegantBeef> I dont get why you want to use NodeJs, Nim is there 😄
22:57:52FromDiscord<ElegantBeef> Or i guess maybe neeljs is embeded in the binary
22:57:58FromDiscord<ElegantBeef> I dont know but your HTML needs to add it
22:58:58FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "I dont get why": Like, for building single page apps for exemple
22:59:07*ltriant joined #nim
22:59:09FromDiscord<ElegantBeef> Karax?
22:59:22FromDiscord<System64 ~ Flandre Scarlet> what's that?
22:59:33FromDiscord<ElegantBeef> https://github.com/karaxnim/karax
22:59:39FromDiscord<ElegantBeef> I dont get why you want to use neel to be honest
22:59:46FromDiscord<ElegantBeef> It locks your program to chrome
23:00:26FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "It locks your program": Wait, that means if you don't have Chrome, the program crashes?
23:00:37FromDiscord<ElegantBeef> If you dont have chrome the program doesnt work correct
23:00:51FromDiscord<ElegantBeef> If you want to have it not depend on chrome you likely want https://github.com/juancarlospaco/webgui
23:03:07FromDiscord<Phil> Still not convinced of the approach that uses webview
23:03:24FromDiscord<Phil> For HTML/CSS/JS gui's
23:03:53FromDiscord<System64 ~ Flandre Scarlet> In reply to @Isofruit "*For HTML/CSS/JS gui's": any better options?
23:05:02FromDiscord<Phil> Not nim based ones. Imo as bad as the rep is that electron gets, it does mean you do not have to deal with the buggy/non-standard implementations that Konqueror/Epiphany will give you on Linux (no idea about safari/edge on Mac/Windows)
23:05:21FromDiscord<ElegantBeef> > Konqueror/Epiphany ↔What?
23:05:22FromDiscord<Phil> For CSS/HTML
23:05:46FromDiscord<Phil> In reply to @ElegantBeef "> Konqueror/Epiphany What?": From what I've seen, the engines used to render the HTML/CSS/JS are based on your OS
23:05:59FromDiscord<ElegantBeef> For linux webgui use webkitgtk
23:05:59FromDiscord<Phil> AFAIK on Gnome that's Epiphany and the engines it comes with
23:06:16FromDiscord<Phil> KDE uses webkitgtk?
23:06:26FromDiscord<ElegantBeef> webgui only uses webkitgtk
23:06:33FromDiscord<ElegantBeef> So who gives a shit what KDE uses?! 😛
23:06:49FromDiscord<ElegantBeef> It's a single runtime
23:07:10FromDiscord<Phil> Ohhhhhh so instead of bundling chromium, it bundles webkitgtk
23:07:16FromDiscord<ElegantBeef> Correct
23:07:22FromDiscord<ElegantBeef> So it's in theory consistent
23:07:34FromDiscord<ElegantBeef> Though windows will always be fun to ship to from linux
23:07:37FromDiscord<Phil> Still means your CSS/HTML rendering will behave different from standard
23:07:47FromDiscord<ElegantBeef> "different from standard"
23:07:55FromDiscord<ElegantBeef> I mean chrome is different from standard in many places
23:07:56FromDiscord<Phil> The standard Chrome and Mozilla set
23:07:58FromDiscord<System64 ~ Flandre Scarlet> Okay so↔How can I compile the examples?
23:08:19FromDiscord<ElegantBeef> https://github.com/juancarlospaco/webgui#install
23:08:22FromDiscord<Phil> I mention those two specifically (and Safari) because I checked out how my side-project frontend renders on all of them and it renders fine
23:08:30FromDiscord<Phil> But it breaks hard on webkitgtk
23:08:46FromDiscord<ElegantBeef> Sure, but the browser engines(chrome especially) dont always abide by the standard
23:09:00FromDiscord<ElegantBeef> So bringing up the standard when the most popular engine doesnt.... is always fun
23:09:00FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "https://github.com/juancarlospaco/webgui#install": already installed
23:09:25FromDiscord<ElegantBeef> Should just be `nim c the_example.nim` then
23:09:47FromDiscord<Elegantbeef> Macros sure are magical
23:09:50FromDiscord<ElegantBeef> But phil if they're making an application built purely on webgui does it really matter if it doesnt abide by the standard
23:09:54FromDiscord<ElegantBeef> There's that slow poke
23:10:24FromDiscord<Phil> In reply to @ElegantBeef "So bringing up the": Yeh but the cross-section of the 3 most used browsers does manage to render it fine while Epiphany doesn't, its the de-facto standard though I guess chances aren't zero that it's a google-extension that mozilla and safari adopted when they could
23:10:26FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4jyB
23:11:08FromDiscord<Phil> In reply to @ElegantBeef "But phil if they're": Nah, if you know your CSS might get annoying at parts though when it behaves not as you'd expect, but you are correct that ultimately it doesn't matter too much if you adjust the CSS to fit locally
23:11:29*ltriant quit (Ping timeout: 260 seconds)
23:11:37FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4jyC
23:12:33FromDiscord<System64 ~ Flandre Scarlet> Oh god I hate Windows
23:12:39FromDiscord<Phil> Windows is the moment I start fleeing
23:12:43FromDiscord<Phil> Can't support what I don't have
23:12:53FromDiscord<ElegantBeef> > ShellExecuteW↔Hmph does seem something isnt linking a library
23:13:07FromDiscord<System64 ~ Flandre Scarlet> WTF
23:13:14FromDiscord<ElegantBeef> You're on a 32bit system?
23:13:51FromDiscord<ElegantBeef> Which version of gtk did you install?
23:14:26FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "Which version of gtk": I don't have GTK I think
23:14:35FromDiscord<ElegantBeef> Well follow the instructions
23:14:40FromDiscord<System64 ~ Flandre Scarlet> and I use 32-bits Nim I think
23:14:43FromDiscord<ElegantBeef> https://gtk.org/docs/installations/windows/
23:14:47FromDiscord<ElegantBeef> Why do you use 32bit Nim?
23:14:50FromDiscord<ElegantBeef> Are you on a 32bit os?
23:15:06FromDiscord<System64 ~ Flandre Scarlet> No 64-bits
23:15:16*jmdaemon joined #nim
23:15:20FromDiscord<ElegantBeef> So then why are you using 32bit Nim/Mingw?
23:15:31FromDiscord<System64 ~ Flandre Scarlet> But I used 32-bits one 'cause I used a 32-bits lib for my game
23:15:42FromDiscord<ElegantBeef> ugh
23:15:58*ltriant joined #nim
23:16:09FromDiscord<ElegantBeef> I dont know what to say here
23:16:22FromDiscord<ElegantBeef> I can only say install 64bit Nim, Mingw, Gtk then try again
23:16:32FromDiscord<System64 ~ Flandre Scarlet> alright
23:16:42FromDiscord<ElegantBeef> I think compiling on Windows 32bit is actually quite easy on 64bit
23:17:01FromDiscord<ElegantBeef> But you would need to pass compiler options
23:18:26FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "I dont know what": https://github.com/kometbomb/klystron/wiki/libksnd↔I tried to compile this lib on 64-bits↔But doesn't seems to work (even for 32-bits)↔So I used the pre-compiled dll which is... 32-bits
23:18:51FromDiscord<ElegantBeef> You can make Nim compile 32bit on a 64bit PC
23:19:00FromDiscord<ElegantBeef> Assuming you have a 32bit C compiler/linker
23:19:25FromDiscord<System64 ~ Flandre Scarlet> I have 2 Nim installed↔One 32 bits, the other 64 bits
23:19:34FromDiscord<ElegantBeef> That's kinda pointless
23:20:23FromDiscord<ElegantBeef> `nim c --cpu:i386 --gcc.exe=mingw-i386 --gcc.linkerexe=mingw-i386 myNim.nim` or there abouts should work
23:20:31FromDiscord<ElegantBeef> I dont know what the mingw 32 bit is called exactly
23:20:41FromDiscord<System64 ~ Flandre Scarlet> Oh alright
23:20:52FromDiscord<System64 ~ Flandre Scarlet> I should make a batch script
23:20:58FromDiscord<ElegantBeef> Or a `config.nims`
23:21:09FromDiscord<ElegantBeef> https://nim-lang.org/docs/nimc.html#crossminuscompilation can help
23:21:37FromDiscord<ElegantBeef> @Phil what's your frontend even for anywho?
23:22:51FromDiscord<Elegantbeef> Ping
23:23:05FromDiscord<Elegantbeef> Hey this is alive again
23:31:10*ltriant quit (Ping timeout: 268 seconds)
23:58:36FromDiscord<nqeron> I have a generic type `Move[M: MoveKind] = tuple(square: Square, movekind: M)` and I'm trying to get set up a default Move that I can return to a procedure `Move`
23:59:08FromDiscord<nqeron> (edit) "I have a generic type `Move[M: MoveKind] = tuple(square: Square, movekind: M)` and I'm trying to get set up a default Move that I can return to a procedure ... `Move`and" added "returning a" | "returning a`Move` ... " added "and an error"