00:00:01 | FromDiscord | <albassort> its more like Haskellified Nim |
00:00:39 | FromDiscord | <albassort> (edit) "its more like Haskellified Nim ... " added "met APL" |
00:01:00 | FromDiscord | <MDuardo> I don't know Haskell, so I can't compare it |
00:01:08 | FromDiscord | <albassort> its completely functional iirc |
00:01:17 | FromDiscord | <albassort> and its an array based programming language |
00:02:15 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=html> |
00:03:37 | FromDiscord | <Elegantbeef> Unix is fine but C is the issue 😄 |
00:04:10 | FromDiscord | <Elegantbeef> Using C as the defacto ABI describing language makes machine imports much more complex than they need to be for languages that do not treat `T` as an array! |
00:04:50 | FromDiscord | <albassort> yeah i don't know what the c devs were smoking with arrays of unspecified sizers |
00:04:51 | FromDiscord | <albassort> (edit) "sizers" => "sizes" |
00:05:13 | FromDiscord | <albassort> "we don't know how many pointers are in this array, we just go until its null" |
00:05:28 | FromDiscord | <MDuardo> The best I can say about C is that is not the huge complex giant that C++ is |
00:05:29 | FromDiscord | <albassort> writing C is anxiety inducing |
00:05:40 | FromDiscord | <Elegantbeef> If pascal was used instead we'd have `array of T` and `^T` |
00:05:58 | FromDiscord | <albassort> world if pascal was used: |
00:06:05 | FromDiscord | <Elegantbeef> A much more machine interoperable experience although higher level than C, it describes intent! |
00:06:05 | FromDiscord | <albassort> (edit) "was used:" => "beat c:" |
00:06:45 | FromDiscord | <albassort> In reply to @Elegantbeef "A much more machine": being higher level than C doesn't mean it doesn't break down into more intuitive parts for machine interpretation |
00:06:53 | FromDiscord | <albassort> i think thats the whole design of nim in a sense |
00:07:15 | FromDiscord | <albassort> maybe more lisp than nim |
00:07:32 | FromDiscord | <Elegantbeef> Well the thing is that `array of T` might just map to a `ptr T` in the language depending on the language |
00:07:54 | FromDiscord | <Elegantbeef> Though most modern languages have a `ptr UncheckedArray[T]` through `[?]T` or whatever their syntax is |
00:08:07 | FromDiscord | <Elegantbeef> That's Odin's syntax iirc |
00:08:20 | FromDiscord | <albassort> how's Odin's adoption so far |
00:08:25 | FromDiscord | <albassort> i heard its doing better than nim |
00:08:35 | FromDiscord | <Elegantbeef> Outside of dog fooding it's not doing much |
00:08:58 | FromDiscord | <Elegantbeef> As much as I like the pascal influence, it does many things that are just bleh to me atleast |
00:09:01 | FromDiscord | <albassort> so it is doing better than nim :) |
00:09:15 | FromDiscord | <Elegantbeef> I do not think it's more popular than Nim |
00:09:26 | FromDiscord | <MDuardo> It has utilities for Game Dev↵(@albassort) |
00:09:29 | FromDiscord | <Elegantbeef> Hell it does not even have a package manager and gingerbill is against the idea |
00:09:55 | FromDiscord | <Elegantbeef> "Package managers are an anti pattern, just use submodules" is my paraphrased quote |
00:10:06 | FromDiscord | <albassort> In reply to @Elegantbeef "Hell it does not": yeah im kinda beginning to agree |
00:10:24 | FromDiscord | <albassort> in the lua project, i just do git clone |
00:10:39 | FromDiscord | <Elegantbeef> I mean I do not care if it's like atlas or like nimble, one should be able to easily depend on another project without reverting to using manual version control |
00:10:48 | FromDiscord | <MDuardo> Nim is somewhat popular in hacking for some reason, I don't know why↵↵Found a couple of guides how make malware |
00:11:03 | FromDiscord | <Elegantbeef> It's' a system language that can avoid anti virus detection |
00:11:04 | FromDiscord | <albassort> In reply to @MDuardo "Nim is somewhat popular": no that was AstroTurfed, it was 1 article |
00:11:16 | FromDiscord | <albassort> i don't think its actually popular |
00:11:24 | FromDiscord | <albassort> we would see people here writing dubious code |
00:11:28 | FromDiscord | <albassort> we generally don't see hints of that |
00:11:33 | FromDiscord | <Elegantbeef> Eh there are multiple different malwares written in Nim |
00:11:43 | FromDiscord | <albassort> how many more written in C macros |
00:12:18 | FromDiscord | <Elegantbeef> Well malware to the reader is another thing |
00:12:19 | FromDiscord | <albassort> i tested out some malware in nim and windows defender didn't catch it, i do atest |
00:12:42 | FromDiscord | <albassort> though im not like a hackerdood |
00:13:22 | FromDiscord | <albassort> i just said "i wonder if i could recursively zip this windows 10 vm then destroy the bootloader" |
00:13:28 | FromDiscord | <albassort> it didn't stop it |
00:13:45 | FromDiscord | <albassort> although it was run as administrator |
00:13:49 | FromDiscord | <albassort> 🤔 |
00:14:28 | FromDiscord | <albassort> anyway I just think any systems language with macros and obfuscation is g onna be popular |
00:14:41 | FromDiscord | <MDuardo> I think the difference is that Nim is somewhat popular in the field considering that has a very small community |
00:14:42 | FromDiscord | <Elegantbeef> https://cse.google.com/cse?q=nim&cx=partner-pub-7983783048239650%3A3179771210#gsc.tab=0&gsc.q=nim there are a few articles on this random hacker news site 😄 |
00:14:45 | FromDiscord | <Elegantbeef> I'm not either but ostensibly people writing these malwares already know what they need to do so it's mostly just syntax transitioning |
00:15:50 | FromDiscord | <albassort> https://www.fortinet.com/blog/threat-research/new-icexloader-3-0-developers-warm-up-to-nimhttps://www.fortinet.com/blog/threat-research/new-icexloader-3-0-developers-warm-up-to-nim |
00:16:21 | FromDiscord | <albassort> we're not even cool enough to be the malware |
00:16:27 | FromDiscord | <albassort> we just deploy PHP scripts |
00:17:08 | FromDiscord | <MDuardo> My Arch VM destroyed itself just updating GRUB and didn't need malware |
00:17:23 | FromDiscord | <albassort> simple w |
00:17:25 | FromDiscord | <albassort> (edit) removed "w" |
00:17:29 | FromDiscord | <albassort> rewrite grub in nim |
00:19:21 | FromDiscord | <MDuardo> They see "run as administrator" as the easy solution |
00:19:21 | FromDiscord | <MDuardo> Never liked how administrator works on Windows↵↵Most people will use it and risk their computer as soon something does not open |
00:19:34 | FromDiscord | <albassort> whats up with functional people not naming their variables names |
00:19:38 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=html> |
00:19:39 | FromDiscord | <albassort> what is this |
00:19:48 | FromDiscord | <albassort> xss yss ↵xs ys↵x y |
00:20:20 | FromDiscord | <albassort> In reply to @MDuardo "Never liked how administrator": same as sudo |
00:20:22 | FromDiscord | <albassort> eh |
00:20:27 | FromDiscord | <albassort> user error |
00:20:42 | FromDiscord | <michaelb.eth> x y: value value↵xs ys: sequence of x, sequence of y↵xss yss: sequence of sequence of x, ... of y |
00:33:20 | FromDiscord | <albassort> In reply to @michaelb.eth "x y: value value": do you have any idea on whats happening on the 3rd and 4th line of this |
00:33:33 | FromDiscord | <albassort> (edit) "3rd and" => "" |
00:33:44 | FromDiscord | <albassort> oh wait i see |
00:33:50 | FromDiscord | <albassort> its formatted poorly |
00:45:47 | FromDiscord | <Elegantbeef> I know in the past many of the itch.io based malware was written in Go |
00:48:58 | FromDiscord | <michaelb.eth> I imagine malware authors would be attracted to systems programming languages that easily produce standalone executables |
00:49:47 | FromDiscord | <michaelb.eth> Go and Nim fit that description, and there's very little ceremony too, e.g. just a `.nim` source code file |
00:53:04 | FromDiscord | <MDuardo> What about Rust? |
00:53:26 | FromDiscord | <MDuardo> I've never seen Rust malware |
00:53:45 | FromDiscord | <bostonboston> cause rust is gross and malware devs are refined individuals |
00:54:15 | FromDiscord | <bostonboston> but there is malware written in rust |
00:56:54 | FromDiscord | <MDuardo> There's no place safe |
01:02:42 | FromDiscord | <that_dude.> I love how the tradition of throwing Nim in the name of the project hangs on even in the malware space https://media.discordapp.net/attachments/371759389889003532/1190097530231476376/image.png?ex=65a08fb2&is=658e1ab2&hm=6d7380482fd1d6771e80b76ed3b027067b3bdc90ac4c9517832c80a177554f75& |
01:05:06 | FromDiscord | <bostonboston> Couldn't be me |
01:05:16 | FromDiscord | <that_dude.> :salute: |
01:06:20 | FromDiscord | <MDuardo> Well, that sucks |
01:29:48 | FromDiscord | <albassort> idrc about maleware |
01:29:54 | FromDiscord | <albassort> as long as it isn't in the AUR |
01:30:00 | FromDiscord | <albassort> ii have no opinion on it |
01:30:21 | FromDiscord | <albassort> just don't target hospitals or other critical infrastructure |
01:31:15 | FromDiscord | <albassort> like I don't care if Oracle gets ransomwared because they set a server's root password via ssh as password and then someone fished the SQL login password then dumped all the SSH keys |
01:31:28 | FromDiscord | <albassort> (edit) "keys" => "keys, and deployed Dark Powder" |
01:32:10 | FromDiscord | <albassort> (edit) "password" => "as 'password'" | "as 'password'via ... ssh" added "an unprotected" | removed "as password" |
01:54:25 | FromDiscord | <albassort> (i care about databreaches) |
01:55:24 | FromDiscord | <sOkam! 🫐> Does anyone here have experience debugging `nim js` backend generated code?↵How does it compare to debugging `nim c` generated code? |
01:58:44 | FromDiscord | <takemichihanagaki3129> In reply to @Elegantbeef "Why do extra work": Totally! |
02:07:49 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#ix=html> |
02:30:48 | * | rockcavera joined #nim |
02:33:52 | LuxuryMode | Elegantbeef: no, the keywords aren't dynamic. |
02:40:05 | * | jmdaemon joined #nim |
02:42:06 | FromDiscord | <Elegantbeef> Use array + enum then? |
04:02:58 | FromDiscord | <bung8954> In reply to @user2m "hey all I just": `nimble path <the_package>` |
04:11:08 | * | kristjansson joined #nim |
04:11:14 | * | derpydoo quit (Ping timeout: 256 seconds) |
04:35:18 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
04:59:16 | * | kristjansson quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
05:01:45 | * | kristjansson joined #nim |
05:05:59 | * | kristjansson quit (Client Quit) |
06:35:11 | FromDiscord | <Elegantbeef> I'm probably too far into the koolaid but I'm really feeling like "Any header generator is indistinguishable from string concatenation" https://hatebin.com/nfvwykcgfn |
06:44:11 | FromDiscord | <leorize> code generation is just string concat with smarts |
06:44:13 | FromDiscord | <Elegantbeef> Yea my dumbass thought "Hey you can use the type system to do some magic to make generating ABI pluggable" |
06:44:23 | FromDiscord | <Elegantbeef> All cause I was playing around with nimiib and exposing it to a C abi |
06:47:04 | FromDiscord | <nnsee> "hatebin" |
06:47:48 | FromDiscord | <huantian> Gonna make my own paste and glue site called lovesrc |
07:00:42 | FromDiscord | <pk.kyle> any libraries that has heavy use on osproc, might want to copy some code 🙏 thx |
07:06:52 | * | dza quit (Quit: ) |
07:08:23 | * | dza joined #nim |
07:20:16 | FromDiscord | <zectbumo> I believe we need a new section in the index on the left "Callbacks" so we can list procs such as onProgressChanged↵https://nim-lang.org/docs/httpclient.html#progress-reporting |
07:27:57 | * | dza quit (Quit: ) |
07:40:16 | * | dza joined #nim |
07:46:09 | * | dza quit (Quit: ) |
08:20:40 | * | dza joined #nim |
08:34:55 | * | azimut joined #nim |
09:02:01 | * | Qaziquza joined #nim |
09:07:02 | * | xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
09:08:55 | * | xutaxkamay joined #nim |
09:55:53 | * | junaid_ joined #nim |
10:53:48 | * | Batzy joined #nim |
11:01:11 | * | Qaziquza quit (Ping timeout: 245 seconds) |
12:08:30 | * | junaid_ quit (Remote host closed the connection) |
12:36:31 | * | jmdaemon quit (Ping timeout: 246 seconds) |
13:47:16 | * | derpydoo joined #nim |
13:59:42 | * | tiorock joined #nim |
13:59:42 | * | rockcavera quit (Killed (calcium.libera.chat (Nickname regained by services))) |
13:59:42 | * | tiorock is now known as rockcavera |
15:38:25 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html> |
15:39:47 | FromDiscord | <leorize> you can't, that's why it's called untyped |
15:41:23 | FromDiscord | <griffith1deadly> is there no way around it? i'm not quite sure I can replicate the logic by replacing untyped with typed |
15:41:28 | FromDiscord | <leorize> you can just have typed parameters for the types you wanted to operate on, though |
15:42:47 | FromDiscord | <leorize> how does your macro and it's usage look like? |
15:43:30 | FromDiscord | <griffith1deadly> you wanna see full code or just definition macro and usage? |
15:43:45 | FromDiscord | <leorize> definition is suffice |
15:45:13 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html> |
15:46:40 | FromDiscord | <leorize> how do you want to use it with types? |
15:47:32 | FromDiscord | <griffith1deadly> what do you mean? |
15:49:04 | FromDiscord | <leorize> so you want to export types, how do you signify that in your code? |
15:49:19 | * | azimut quit (Ping timeout: 240 seconds) |
15:49:22 | FromDiscord | <leorize> do you want that to be automated by the macro? |
15:49:38 | FromDiscord | <leorize> whenever it sees a parameter with that type, I mean |
15:52:27 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html> |
15:52:57 | FromDiscord | <griffith1deadly> (edit) |
15:54:00 | FromDiscord | <BarrOff> Hello, can someone please help me?↵What is the Nim equivalent way to achieve the funtionality of C's \`memset\`? |
15:57:51 | FromDiscord | <griffith1deadly> In reply to @BarrOff "Hello, can someone please": i think there is no equivalent by this: https://forum.nim-lang.org/t/1854↵but you always can importc memset |
15:58:11 | FromDiscord | <leorize> you can just create a typed macro specifically for dealing with types↵(@griffith1deadly) |
15:59:42 | FromDiscord | <griffith1deadly> In reply to @leorize "you can just create": just a separate one, or should I change my macro to typed? |
16:06:07 | FromDiscord | <leorize> you're not modifying the ast within the macro, right? |
16:06:19 | FromDiscord | <leorize> then changing it to types works |
16:08:03 | Amun-Ra | BarrOff: there's sequivalent of memset(x, 0, sizeof(x)); |
16:09:50 | FromDiscord | <griffith1deadly> In reply to @leorize "you're not modifying the": by `webviewExport` i'm modify ast by result of macro, but of proc declaration - no |
16:15:32 | FromDiscord | <leorize> then it'll be fine being typed |
16:16:33 | FromDiscord | <griffith1deadly> thanks! |
16:26:57 | FromDiscord | <Robyn [She/Her]> Trying to think of something to do with Nim, not sure what though, hm... |
16:27:12 | FromDiscord | <Robyn [She/Her]> I could wrap Ollama and other LLMs, I guess |
16:27:42 | FromDiscord | <Robyn [She/Her]> But not really feeling it tbh |
16:30:49 | FromDiscord | <saint.___.> In reply to @chronos.vitaqua "Trying to think of": How's your messaging system going? |
16:41:40 | * | azimut joined #nim |
17:04:36 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html> |
17:05:03 | FromDiscord | <griffith1deadly> just moving from untyped to typed move nnkFormalParams child nodes kind from nnkIdent to nnkSym |
17:06:37 | FromDiscord | <leorize> yea, because they're typed now \:p |
17:13:04 | FromDiscord | <griffith1deadly> now i can do whatever i want to do. maybe someday nim will have a framework like Go-lang Wails v2. if, of course, I have the strength to do so :p |
17:38:11 | FromDiscord | <srabb> # Nim is cool |
17:45:46 | FromDiscord | <Robyn [She/Her]> In reply to @saint.___. "How's your messaging system": On pause because I'm away from my computer aha |
17:45:47 | FromDiscord | <Robyn [She/Her]> I keep overcomplicating it all so I think I need a new way to look at it |
17:45:47 | FromDiscord | <Robyn [She/Her]> Considering just ignoring the use of something like Prologue, and going a tad lower down and building a DSL for only the things I need |
17:56:19 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#ix=html> |
17:56:40 | FromDiscord | <nervecenter> (edit) |
18:02:13 | FromDiscord | <Robyn [She/Her]> In reply to @nervecenter "How do you unpack": Is `map` your own function? |
18:02:26 | FromDiscord | <Robyn [She/Her]> Look into `unpackVarargs` from `std/macros` |
18:03:55 | FromDiscord | <nervecenter> `map` is from `std/sequtils` |
18:04:12 | FromDiscord | <albassort> map is from paper silly |
18:52:38 | FromDiscord | <nnsee> not very easily |
18:52:44 | FromDiscord | <nnsee> https://stackoverflow.com/a/63667520 |
19:09:20 | * | vsantana joined #nim |
19:25:06 | FromDiscord | <tauruuuuuus> Does anyone know if nimble can be used as a library too? |
19:25:56 | FromDiscord | <tauruuuuuus> Say I need to programmatically initialize a new nimble project, does it offer any APIs or am I forced to wrap a call to the nimble tool from a shell? |
19:32:45 | FromDiscord | <demotomohiro> Specifying packages your project uses using `requires` in .nimble and let nimble automatically install them doesn't work? |
19:52:08 | FromDiscord | <mluki> hi guys, im new to nim, and im wanna learn more about nim |
19:52:34 | FromDiscord | <mluki> in what file is the main function to start a gateway bot? |
19:53:34 | FromDiscord | <mluki> I'm "hunting" to start with nim and discord lib is the best way to start for me |
20:05:53 | FromDiscord | <Elegantbeef> https://github.com/krisppurg/dimscord I believe this is the most popular discord api |
20:06:04 | * | vsantana quit (Ping timeout: 276 seconds) |
20:06:38 | * | vsantana joined #nim |
20:07:34 | FromDiscord | <saint.___.> In reply to @Elegantbeef "https://github.com/krisppurg/dimscord I believe thi": I think it only works on Nim 1.6 though |
20:07:47 | FromDiscord | <saint.___.> Not sure it works for 2.0 yet |
20:08:25 | FromDiscord | <Elegantbeef> "PRs welcome" 😄 |
20:10:54 | FromDiscord | <saint.___.> 😆 |
20:22:29 | * | vsantana quit (Ping timeout: 240 seconds) |
20:38:39 | * | derpydoo quit (Quit: derpydoo) |
20:40:02 | FromDiscord | <Robyn [She/Her]> In reply to @saint.___. "Not sure it works": It does but memleaks are an issue iirc |
20:43:55 | FromDiscord | <scipio_nl> Hello 🙂 Been a while since I was in here. but I am considering returning to Nim. Let's say I wanted to create distributable desktop apps using mostly web tech as frontend, including htmx, which Nim tech stack would you recommend? ↵ps Hi @ElegantBeef ! You're still as helpful and active as ever I see 🙂 |
20:45:14 | FromDiscord | <scipio_nl> (I asked the same questions before, then took a dive in Rust using mostly Tauri for the same purpose, but I like Nim better, its syntax and meta programming mostly, but a lot of tooling seems to be missing, or I'm overlooking them?) |
20:45:47 | FromDiscord | <Elegantbeef> It's what having no life gets you! |
20:46:35 | FromDiscord | <Elegantbeef> Do not expect a response from me I keep far away from using web tech for UIs |
20:47:25 | FromDiscord | <scipio_nl> well it can also be other tech for UI as long as it's "feature complete" and "modern" and "maintained" |
20:47:26 | FromDiscord | <scipio_nl> . |
20:47:46 | FromDiscord | <Elegantbeef> Well I reach for owlkettle when I want gui |
20:47:54 | FromDiscord | <Robyn [She/Her]> I mean, if you want a Rust lib in Nim, you could make bindings to it? 😛 |
20:48:03 | FromDiscord | <Elegantbeef> But it's GTK so it's not the easiest to get it to Windows |
20:48:14 | FromDiscord | <scipio_nl> I'm macOS Beef 😁 |
20:48:19 | FromDiscord | <Robyn [She/Her]> Yet again I am currently wondering if there's any use to rewrite Nim's stdlib to call into Rust code... |
20:48:22 | FromDiscord | <Elegantbeef> Yea wrapping a Rust program using nbindgen is best |
20:48:25 | FromDiscord | <Elegantbeef> I mean mac has brew |
20:48:26 | FromDiscord | <scipio_nl> We had the same talk before 😆 |
20:48:32 | FromDiscord | <Elegantbeef> So it's at least a bit sensible |
20:48:46 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Yea wrapping a Rust": Isn't nbindgen incomplete? |
20:49:05 | FromDiscord | <Elegantbeef> Do I look like someone that really knows what I'm talking about?! |
20:49:26 | FromDiscord | <Robyn [She/Her]> I'd hope so, if you have no life 😛 |
20:49:50 | FromDiscord | <nnsee> rude |
20:49:56 | FromDiscord | <Elegantbeef> I know it supposedly works, but I've never used it cause I never want to rely on a Rust library |
20:50:01 | FromDiscord | <Robyn [She/Her]> Hey, he said it, not me! |
20:50:34 | FromDiscord | <scipio_nl> TBH: the main 2 reasons holding me back from using Nim - despite being attracted to it over and over again - is that there only seem to be 1 man show projects that get abandoned after some time, and the other one I rather not talk about right now |
20:51:13 | FromDiscord | <Elegantbeef> Does the other one rhyme with "Iraq"? |
20:51:24 | FromDiscord | <scipio_nl> You remember me correctly Beef |
20:51:41 | FromDiscord | <Elegantbeef> I was giving my own commentary |
20:52:32 | FromDiscord | <scipio_nl> I stumbled on some forum post an hour ago where this newcomer wrote a parser - still being enthusiastic - and then the only comment from the person rhyming to Iraq was the code was terrible |
20:52:35 | FromDiscord | <scipio_nl> I mean, wtf |
20:53:25 | FromDiscord | <scipio_nl> With all due respect, risking getting banned in here and having to log in via another Discord account, if that is how you think you can grow a community, you're a liability to your own project, not an asset. |
20:54:33 | FromDiscord | <Elegantbeef> No one ever said Araq's behaviour overly grows the community |
20:54:51 | FromDiscord | <scipio_nl> I didn't expect to be alone in that regard |
20:54:51 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/10809#72102 But given their response it's not like it's a big deal |
20:55:17 | FromDiscord | <scipio_nl> It isn't? How many code commits did he push since? |
20:55:18 | FromDiscord | <Elegantbeef> They seemed very receptive to the response |
20:56:35 | FromDiscord | <Elegantbeef> Eh we could argue hypotheticals all day |
20:56:54 | FromDiscord | <scipio_nl> it doesn't matter |
20:57:00 | FromDiscord | <Elegantbeef> Without a concrete response that actually shows they were offended you're just living in your own conceived notions |
20:57:35 | FromDiscord | <Elegantbeef> I'm not saying I agree with Araq's response, but it does not seem like the author was deeply offended in fact they seemed happy with proper criticism |
20:58:18 | FromDiscord | <scipio_nl> I don't particularly care for one dev being offended or not. I do care about my own time investments in first getting to know everything about Nim inside out, when there's an increased risk of zero language community growth |
20:59:20 | FromDiscord | <Elegantbeef> Well Araq is never going to change so either choose to be the dichotomous or move along \:D |
20:59:41 | FromDiscord | <scipio_nl> That is indeed the choice laying in front of me |
21:00:50 | * | vsantana joined #nim |
21:02:17 | FromDiscord | <Elegantbeef> I do not like the alternative languages too much to do the latter even though it can be quite a gut punch at times |
21:03:35 | FromDiscord | <Robyn [She/Her]> Definitely can agree with that, it sucks but, nothing I can do |
21:03:51 | FromDiscord | <scipio_nl> there's a lot we can do |
21:04:01 | FromDiscord | <huantian> Right let’s go make a Nim fork |
21:04:50 | FromDiscord | <scipio_nl> Is that on the table / being considered widely? |
21:04:53 | FromDiscord | <Q-Master> another one??? |
21:05:04 | FromDiscord | <Elegantbeef> Nope |
21:06:23 | FromDiscord | <nnsee> In reply to @scipio_nl "Is that on the": there is nimskull |
21:06:35 | FromDiscord | <scipio_nl> Other languages have a bunch of projects and their own Discords that get traction. Is that not the case for Nim ? |
21:06:49 | FromDiscord | <Elegantbeef> There are a bunch of projects |
21:07:03 | FromDiscord | <scipio_nl> Projects that do get traction? |
21:08:00 | FromDiscord | <Elegantbeef> Traction in what regard? |
21:08:07 | FromDiscord | <Elegantbeef> Usage and contributions? Yes |
21:08:14 | FromDiscord | <scipio_nl> Getting actually used and having users? |
21:08:50 | FromDiscord | <Robyn [She/Her]> Nimskull exists but they forked from Nim 1.6.0 iirc, and it has a few crucial differences such as the removal of the asyncdispatch library (they're working on a replacement using cps, since asyncdispatch required compiler hackery iirc), but a big goal of theirs is to rewrite the code generation stuff, and they've done a lot so |
21:09:00 | FromDiscord | <Robyn [She/Her]> For example, they have a VM that uses bytecode |
21:09:37 | FromDiscord | <Elegantbeef> Yea Nimskull is forked for two reasons, the leadership and the language design |
21:09:54 | FromDiscord | <Elegantbeef> The latter is what they focus on making the language more concrete, less adhoc, and easier to contribute to |
21:10:28 | FromDiscord | <Robyn [She/Her]> ^^^ |
21:10:56 | FromDiscord | <Robyn [She/Her]> I'd imagine an issue though is migrating from Nim to Nimskull once they change the syntax up |
21:11:15 | FromDiscord | <Elegantbeef> Well there already are subtle differences |
21:11:18 | FromDiscord | <Robyn [She/Her]> Since, Nim has many old libraries that still work because Nim compiles old code perfectly fine...usually |
21:11:23 | FromDiscord | <Elegantbeef> But yes it's aimed to be a different language eventually |
21:11:25 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Well there already are": Assuming semantics? |
21:11:49 | FromDiscord | <Elegantbeef> Some syntax differences that have been changed in both upstreams |
21:12:48 | FromDiscord | <Elegantbeef> Anyway call out bullshit when you see it and actively be more inviting, is my way of handling Nim 😄 |
21:13:01 | FromDiscord | <Elegantbeef> Whether it does anything different who knows, I have nothing better to do |
21:13:10 | FromDiscord | <Elegantbeef> I could go write Rust I guess and bitch about how annoying the semantics are! |
21:13:50 | FromDiscord | <Elegantbeef> The song and dance one has to do to call a C-API that expects a `cstring` in Rust is enough to make me drink and I've never drank! |
21:14:55 | * | vsantana quit (Ping timeout: 260 seconds) |
21:15:50 | FromDiscord | <Robyn [She/Her]> If I could make my own language for my own personal use 😔 |
21:16:00 | FromDiscord | <huantian> I mean you could lol |
21:16:17 | FromDiscord | <huantian> Just be Johnathan Blow |
21:18:20 | FromDiscord | <Elegantbeef> Jai will eventually be usable by others.... I'm sure of it! |
21:18:28 | * | jmdaemon joined #nim |
21:18:33 | FromDiscord | <Elegantbeef> Jonathan "Open source is offensive" Blow |
21:19:18 | FromDiscord | <Robyn [She/Her]> In reply to @huantian "Just be Johnathan Blow": Huh? |
21:19:31 | FromDiscord | <Robyn [She/Her]> I am working on a language, I just keep halting at the parser stage :p |
21:20:00 | FromDiscord | <nnsee> In reply to @Elegantbeef "The song and dance": have you really never drank? |
21:20:56 | FromDiscord | <Elegantbeef> Indeed |
21:24:18 | FromDiscord | <nnsee> interesting |
21:24:20 | FromDiscord | <nnsee> why not? |
21:24:38 | FromDiscord | <scipio_nl> https://can-lehmann.github.io/owlkettle/README |
21:24:44 | FromDiscord | <scipio_nl> ^^ doesn't mention macOS tho? |
21:25:26 | FromDiscord | <Elegantbeef> Eh just inane attempt at avoiding unneeded drugs |
21:25:42 | FromDiscord | <Elegantbeef> You can get gtk on mac so the path should be simple |
21:25:59 | FromDiscord | <Elegantbeef> It likely just works, but you can contribute to help grow the community around OwlKettle 😛 |
21:26:36 | FromDiscord | <scipio_nl> haha |
21:27:14 | FromDiscord | <Elegantbeef> To be fair offering mac support is a very tedious thing to do given it requires owning mac hardware |
21:28:35 | FromDiscord | <nnsee> In reply to @Elegantbeef "Eh just inane attempt": good on you! I didn't drink a single drop until I turned 18, bought a champagne on my birthday |
21:28:42 | FromDiscord | <nnsee> it's been all downhill from there |
21:28:54 | * | vsantana joined #nim |
21:29:10 | FromDiscord | <huantian> In reply to @Elegantbeef "To be fair offering": Yeah Mac support is so annoying |
21:31:16 | FromDiscord | <huantian> This is why I just target Linux 😛 |
21:31:45 | FromDiscord | <nnsee> finally, 2024 is the year of the linux desktop |
21:32:31 | FromDiscord | <huantian> True if I close my eyes and pretend other platforms don’t exist |
21:32:47 | FromDiscord | <Elegantbeef> I mean that's more on them |
21:33:00 | FromDiscord | <Elegantbeef> It's 2024 and you cannot use gtk4 on Windows without shipping your own gtk libs |
21:33:22 | FromDiscord | <Phil> In reply to @scipio_nl "^^ doesn't mention macOS": As the second contributor to owlkettle:↵Because we have nobody with a mac that can see if it works |
21:33:38 | FromDiscord | <Elegantbeef> You are not the second contributor! |
21:33:48 | FromDiscord | <Phil> There's no part of the code that we know of that does anything that isn't possible on windows.↵If you can get gtk installed it should work |
21:33:52 | FromDiscord | <Phil> In reply to @Elegantbeef "You are not the": I am by amount xP |
21:33:59 | FromDiscord | <Elegantbeef> Not by date! |
21:34:13 | FromDiscord | <Elegantbeef> It's either me or solitude iirc |
21:34:35 | FromDiscord | <Elegantbeef> It's me by 4 days! |
21:35:44 | FromDiscord | <Elegantbeef> Anyway yea if you want owlkettle to have good mac support you're going to have to test it |
21:35:47 | FromDiscord | <Phil> In reply to @scipio_nl "haha": Note that if you know how to generally deal with GTK and the like (meaning you instantiate instances and manually add them to other widgets) you can use gintro.↵Which looks complicated going by the README but imo if you know how GUI apps generally work it does the job of being a functional set of nim bindings |
21:36:09 | FromDiscord | <Phil> Owlkettle has the benefit that imo it has far better readability through its gui-DSL |
21:36:12 | FromDiscord | <scipio_nl> I haven't used GTK before |
21:36:18 | FromDiscord | <Elegantbeef> Given that owlkettle uses pkg-config and you should be able to get the mac gtk it should be fine |
21:36:39 | FromDiscord | <Phil> Have you used other native toolkits before? |
21:36:45 | FromDiscord | <Elegantbeef> With owlkettle it's not going to require you to know gtk to get it to working on mac it'll involve knowing C compilers 😄 |
21:37:01 | FromDiscord | <scipio_nl> In reply to @isofruit "Have you used other": MakePad, Egui and Iced on Rust |
21:37:34 | FromDiscord | <Phil> The idea generally is pretty similar:↵You create instances of widgets, set attributes on those instances and add those instances to other instances which all eventually culminates in a massive Widget-tree that gets rendered |
21:37:49 | FromDiscord | <Phil> That's also how you use gintro.↵Owlkettle allows you to display that GUI-tree directly |
21:38:02 | FromDiscord | <alireza0x0> i need help, anyone knows someone from chronos / status team? |
21:38:07 | FromDiscord | <Phil> Basically its a declarative GTK wrapper, gintro is more just a wrapper |
21:38:17 | FromDiscord | <nnsee> why is it called owlkettle anyways |
21:38:19 | FromDiscord | <alireza0x0> do they have a separate discord server? |
21:38:22 | FromDiscord | <Phil> Ask can.l |
21:38:23 | FromDiscord | <scipio_nl> Does Owlkettle allow for a "drawing API" ? For example charts? |
21:38:50 | FromDiscord | <Phil> That's beyond me, but I think it exposes Cairo or sth (?)↵Funnily enough I have no idea what counts as a drawing API |
21:39:13 | FromDiscord | <scipio_nl> https://media.discordapp.net/attachments/371759389889003532/1190408709201989702/image.png?ex=65a1b180&is=658f3c80&hm=34477b622905c6ad9f31b99d6d0499e5c5a715b070befe9ad7486d829b52db7e& |
21:39:15 | FromDiscord | <scipio_nl> Can we make this? |
21:39:21 | FromDiscord | <Phil> For the most part I contribute wrappings to widgets and mechanisms (like startup/shutdown events, docs and multithreading stuff) |
21:39:44 | FromDiscord | <Phil> Like drawing a graph? That seems like it should be possible, have you checked out the examples? |
21:40:14 | FromDiscord | <scipio_nl> Nope, Beef mentioned it to me 18 months ago and 18 mins ago |
21:40:44 | FromDiscord | <Phil> https://github.com/can-lehmann/owlkettle/blob/main/examples/widgets/drawing_area.nim↵That seems like its the thing you're looking for, possibly |
21:41:29 | FromDiscord | <Phil> As in, maybe you can programmatically call drawing procs |
21:41:41 | FromDiscord | <Phil> But generally an example overview: https://can-lehmann.github.io/owlkettle/examples/README.html |
21:41:50 | * | vsantana quit (Ping timeout: 256 seconds) |
21:42:58 | FromDiscord | <scipio_nl> https://media.discordapp.net/attachments/371759389889003532/1190409651569840209/image.png?ex=65a1b261&is=658f3d61&hm=3aa8397828bbad40e4778653e383ac87537e51d0dac2e2a429316aec26073555& |
21:43:00 | FromDiscord | <scipio_nl> errr |
21:43:17 | FromDiscord | <Phil> Huh, I stand corrected @scipio_nl , you're not looking for drawingArea, you're looking for Cairo |
21:43:30 | FromDiscord | <Elegantbeef> https://www.gtk.org/docs/installations/macos/ |
21:44:29 | FromDiscord | <Phil> https://github.com/can-lehmann/owlkettle/blob/main/owlkettle/cairo.nim#L168↵This is the file implementing procs for programmatic drawing |
21:44:32 | FromDiscord | <Elegantbeef> All in all I assume it's as simple as `brew install gtk4` `brew install libadwaita` |
21:44:56 | FromDiscord | <michaelb.eth> In reply to @alireza0x0 "do they have a": you can try the Nimbus discord:↵https://nimbus.team |
21:44:59 | FromDiscord | <Elegantbeef> https://formulae.brew.sh/formula/gtk4#default↵https://formulae.brew.sh/formula/libadwaita#default↵Damn I was right! |
21:45:32 | FromDiscord | <alireza0x0> umm |
21:45:47 | FromDiscord | <alireza0x0> okay, lets ask the question there first if anyone knows better... |
21:45:53 | FromDiscord | <Elegantbeef> If you don't use brew scipio, I uhh do not know what to tell you |
21:46:13 | FromDiscord | <michaelb.eth> there’s also macports |
21:46:19 | FromDiscord | <alireza0x0> i have 2 threads, in one of them i call connect(addr) which works normally for mintues |
21:46:26 | FromDiscord | <alireza0x0> but after some mintues , it crashes with; |
21:46:44 | FromDiscord | <alireza0x0> sent a code paste, see https://play.nim-lang.org/#ix=html> |
21:47:10 | FromDiscord | <alireza0x0> i really cofused how this can happen, 2 separate event loops , what can go wrong |
21:47:12 | FromDiscord | <scipio_nl> chatPT recommends brew as well |
21:47:17 | FromDiscord | <scipio_nl> (edit) "chatPT" => "chatGPT" |
21:47:21 | FromDiscord | <alireza0x0> i don't even know its related to threads or not... |
21:47:26 | FromDiscord | <Elegantbeef> Well good thing we do not refer to chatgpt for questions |
21:47:30 | FromDiscord | <scipio_nl> In reply to @Elegantbeef "If you don't use": lol |
21:48:50 | FromDiscord | <Elegantbeef> For your sanity though make sure you have arm Nim, and arm gtk |
21:49:02 | FromDiscord | <Elegantbeef> If you have a m1/m2 |
21:49:31 | FromDiscord | <Elegantbeef> Choosenim still does not fetch arm Nim so you will want to pull Nim from the git repo and build the 2.0.2 version |
21:51:16 | FromDiscord | <scipio_nl> okay okay running `brew install gtk4` , dont make me regret it |
21:51:37 | FromDiscord | <Elegantbeef> Also should install libadwaita |
21:51:39 | FromDiscord | <scipio_nl> intel Mac here (2021?), |
21:51:52 | FromDiscord | <Elegantbeef> Ok then you're fine! |
21:52:12 | FromDiscord | <michaelb.eth> In reply to @alireza0x0 "i really cofused how": but with the async channel thing you’re trying to resurrect, iirc each achan has a descriptor, which I’m guessing is the same regardless of which thread is accessing the achan |
21:53:28 | FromDiscord | <alireza0x0> hmm |
21:53:32 | FromDiscord | <scipio_nl> which editor should I use for Nim? VS Code? I use Zed.dev but it's not yet open sourced (soon ...) and I doubt Nim support is fleshed out |
21:53:33 | FromDiscord | <alireza0x0> one other question |
21:53:47 | FromDiscord | <alireza0x0> can i use helgrind with threads orc + malloc? |
21:54:05 | FromDiscord | <alireza0x0> or its not the right tool for orc... |
21:54:24 | FromDiscord | <alireza0x0> probably that is , what else should be |
21:54:41 | FromDiscord | <Phil> In reply to @scipio_nl "which editor should I": VSCode or sth intellij based with their nim plugin.↵Personally I'd straight up disable nimsuggest if you use vscode and only use it for syntax highlighting and run nim check or compile directly on save |
21:54:45 | FromDiscord | <alireza0x0> (edit) "malloc?" => "usemalloc?" |
21:55:06 | FromDiscord | <Phil> You can use nph as a vscode plugin for automated formatting |
21:55:23 | FromDiscord | <Elegantbeef> I use Nvim through astronvim and Kate |
21:55:35 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Choosenim still does not": Maybe someone should rewrite Choosenim/make an alternative 😛 |
21:55:50 | FromDiscord | <Elegantbeef> Hey dis has gitnim |
21:56:01 | FromDiscord | <Elegantbeef> Though it only has linux support presently |
21:56:15 | FromDiscord | <Phil> That person would need to have access to mac, linux and windows machine to reliably check on all 3 that it at least theoretically works |
21:56:17 | FromDiscord | <Elegantbeef> And given he does not write Nim and no one cares about gitnim it likely will never get windows or mac support |
21:56:28 | FromDiscord | <Elegantbeef> Needs 4↵(@Phil) |
21:56:39 | FromDiscord | <Phil> ...BSD? |
21:56:46 | FromDiscord | <Elegantbeef> M1/M2 mac, intel mac, amd64 linux/windows |
21:56:52 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "And given he does": Was gonna say, and doesn't it always compile from source? |
21:57:00 | FromDiscord | <Elegantbeef> Plus likely would want to test arm linux/windows |
21:57:34 | FromDiscord | <Phil> Yeah the amount of machines required makes it a tad difficult |
21:57:50 | FromDiscord | <Elegantbeef> CI was created for a reason I just cannot recall what now |
21:57:50 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "Yeah the amount of": GitHub Actions + VMs/QEMU? |
21:58:08 | FromDiscord | <Phil> In reply to @Elegantbeef "CI was created for": Bragging rights, silly beef |
21:58:26 | FromDiscord | <Elegantbeef> Who can make the dumber container K8 or Docker?! |
21:58:43 | FromDiscord | <michaelb.eth> In reply to @alireza0x0 "can i use helgrind": I think it should be okay, but I don’t know much about helgrind tbh↵↵in the original unmerged/closed PR for async channel, the author was running the test suite under helgrind on Linux, but that was back in refc days |
21:59:01 | FromDiscord | <scipio_nl> In reply to @Elegantbeef "M1/M2 mac, intel mac,": I almost bought an M3 |
21:59:26 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Who can make the": Me, let's use WASM! |
21:59:46 | FromDiscord | <Elegantbeef> Nice a WASM based container to loose all the benefits of containers! |
22:00:01 | FromDiscord | <huantian> Apple silicon is pretty appealing tbh |
22:00:08 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Nice a WASM based": Exactly! |
22:00:11 | FromDiscord | <huantian> Other than the arm parts |
22:00:17 | FromDiscord | <huantian> It seems good for normal use |
22:00:26 | FromDiscord | <scipio_nl> Hmm, is this installed globally on my system? Isn't there something like a venv for Nim? https://media.discordapp.net/attachments/371759389889003532/1190414048429363200/image.png?ex=65a1b679&is=658f4179&hm=352c40455320e303148cc68fcd59c20bf4d5485d1164c7debb162e0679be9bc3& |
22:00:38 | FromDiscord | <Elegantbeef> Yes nimble installs globally |
22:00:45 | FromDiscord | <Elegantbeef> Venvs are best approximated using atlas |
22:00:59 | FromDiscord | <Elegantbeef> You can install locally to a package if you want |
22:01:09 | FromDiscord | <Phil> In reply to @scipio_nl "Hmm, is this installed": If you set up your project with a dependency dir whose specific name I forgot it'll install and search for all dependencies in that folder |
22:01:11 | FromDiscord | <Elegantbeef> But you're just testing shit right now so does it really matter if you have reproducible builds?! |
22:01:48 | FromDiscord | <Phil> You can also use atlas as beef described whose workflow is more designed that way but honestly I still haven't had the need to swap |
22:02:35 | FromDiscord | <scipio_nl> In reply to @Elegantbeef "But you're just testing": well it does matter not to mess up my entire system, doesn't it |
22:02:43 | FromDiscord | <Phil> Ah, the directory needs to be called `nimbledeps`↵https://github.com/nim-lang/nimble#nimbles-folder-structure-and-packages |
22:02:48 | FromDiscord | <Elegantbeef> No cause it's installing a nimble package |
22:02:51 | FromDiscord | <Elegantbeef> Which is a source file |
22:03:04 | FromDiscord | <Elegantbeef> If downloading a text file fucks up your system I'm scared of the Mac ecosystem |
22:03:36 | FromDiscord | <Phil> I believe in your abilities to make it happen beef, provide a text file that does so |
22:04:17 | FromDiscord | <Elegantbeef> Time to make a ELF file that has text embedded to make it executable but also just a normal text file |
22:06:51 | FromDiscord | <alireza0x0> holy moly! |
22:07:01 | FromDiscord | <alireza0x0> damn it was actually related to asyncchannels |
22:07:12 | FromDiscord | <alireza0x0> didnt expect you to answer it ! wow |
22:07:28 | FromDiscord | <alireza0x0> i closed the async channel in another threda |
22:07:30 | FromDiscord | <alireza0x0> (edit) "threda" => "thread" |
22:07:36 | FromDiscord | <Phil> In reply to @alireza0x0 "damn it was actually": If you ever find functioning asynchannels in the wild, my multithreading lib may want to provide support for them |
22:07:39 | FromDiscord | <alireza0x0> so the unregsiter is happening in other thread |
22:08:05 | FromDiscord | <alireza0x0> the gdb and helgrind found issues in asynchannel that i had copied from pr 45 |
22:08:18 | FromDiscord | <Phil> I was under the impression from michaelb. that there were issues with whatever asyncchannels exist |
22:08:20 | FromDiscord | <alireza0x0> so i did modify parts of it, i think its now in its better form |
22:12:31 | FromDiscord | <michaelb.eth> I’m working on a new implementation of AsyncChannel, totally independent approach re: old PR 45, and it’s a separate lib that has chronos and threading as dependencies↵↵still just an experiment at this point |
22:12:45 | * | vsantana joined #nim |
22:12:51 | FromDiscord | <michaelb.eth> will share more if I actually get it working |
22:13:55 | FromDiscord | <scipio_nl> https://media.discordapp.net/attachments/371759389889003532/1190417441117982830/image.png?ex=65a1b9a2&is=658f44a2&hm=1cf5f81ffc05d8799537192796b8fb39d29345929e9786c6425cf58dd1b170d5& |
22:14:07 | FromDiscord | <scipio_nl> success, altho it doesn't look like macOS |
22:14:54 | FromDiscord | <scipio_nl> @Phil can I now get my honorable mention on the Owlkettle site & Github? I mean, I have gone where no other Owl has gone before ... |
22:15:30 | FromDiscord | <Elegantbeef> We did it! |
22:15:32 | FromDiscord | <Elegantbeef> Did you build a libadwaita program? |
22:15:34 | FromDiscord | <Elegantbeef> Well write documentation on how to set it up on mac intel 😛 |
22:15:39 | FromDiscord | <Phil> In reply to @scipio_nl "<@180601887916163073> can I now": Make a PR and add installation instructions for Mac and you will 😄↵If you want you can just make a quick show'n'tell entry in the discussions section |
22:15:57 | FromDiscord | <Phil> And to build for libadwaita all you need to do is use the "brew" proc from the "adw" module↵import owlkettle/adw |
22:17:06 | * | vsantana quit (Ping timeout: 260 seconds) |
22:18:49 | FromDiscord | <Elegantbeef> https://gitlab.gnome.org/GNOME/gtk-mac-bundler/ if you want to make it more macy following this will make it use quartz |
22:18:51 | FromDiscord | <Elegantbeef> I would not use the script but just link what it does under a `-d:owlKettle.quartz` |
22:20:11 | FromDiscord | <Elegantbeef> Maybe I'm wrong and it does just use quartz now |
22:21:00 | FromDiscord | <Elegantbeef> Regardless you were going for webui beforehand so what does it matter! 😄 |
22:21:07 | FromDiscord | <Elegantbeef> Use a gtk theme you prefer and be merry |
22:22:00 | FromDiscord | <scipio_nl> well a Mac look-n-feel is to be preferred if I distribute an actual working app with it but let's not get ahead |
22:23:59 | FromDiscord | <Elegantbeef> As long as you make it use the apple top bar, it's good enough! |
22:24:10 | FromDiscord | <Elegantbeef> Was it really as simple as install adwaita and gtk4 though? No special compiler flags? |
22:25:31 | FromDiscord | <scipio_nl> Yup. And installing owlkettle with `nimble install owlkettle@#head` and then I just created a project folder, put a file todo.nim in there and run `nim c -r todo.nim` |
22:25:44 | FromDiscord | <Elegantbeef> Damn I love pkg-config |
22:25:58 | FromDiscord | <Elegantbeef> Who needs a build system when you have pkg-config |
22:26:07 | FromDiscord | <scipio_nl> I do feel I still deserve an honorable mention on the Owlkettle repo |
22:26:13 | FromDiscord | <scipio_nl> 😁 |
22:26:52 | FromDiscord | <scipio_nl> I wonder tho, regarding that Nim compile command: do I need to put all code in 1 file? |
22:27:35 | FromDiscord | <scipio_nl> Or is that `todo.nim` the compilation entry and it scans for module imports from there automatically? |
22:28:26 | FromDiscord | <Elegantbeef> Well make a PR |
22:28:29 | FromDiscord | <Elegantbeef> Document how to do it |
22:28:58 | FromDiscord | <scipio_nl> In reply to @Elegantbeef "Well make a PR": I'm kidding with the honorable mention |
22:29:50 | FromDiscord | <Elegantbeef> You should still document it 😛 |
22:32:56 | FromDiscord | <scipio_nl> I think it's better I first read the entire tutorial |
22:35:28 | FromDiscord | <graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:36:55 | FromDiscord | <Elegantbeef> `p[A](A())` |
22:37:05 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:37:38 | FromDiscord | <griffith1deadly> why dont use generics |
22:38:04 | FromDiscord | <graveflo> In reply to @Elegantbeef "`p[A](A())`": how would that not bind to `p(x: A)` echoing "2" instead of "1" |
22:38:19 | FromDiscord | <graveflo> In reply to @griffith1deadly "why dont use generics": it's already using generics and that will not work either |
22:39:03 | FromDiscord | <graveflo> In reply to @Elegantbeef "`p[A](A())`": that does seem to work, but idk why lol |
22:39:46 | FromDiscord | <Elegantbeef> cause there only one `p` that is a generic |
22:39:48 | FromDiscord | <Elegantbeef> `p[A]` explicitly states "instantiate `p` with generic parameter of `A`" |
22:39:49 | FromDiscord | <Elegantbeef> Otherwise all procedures would be capable of using instantiation syntax |
22:39:51 | FromDiscord | <Elegantbeef> `proc doThing()` would be callable `doThing[void]()` 😄 |
22:39:54 | FromDiscord | <graveflo> oh my bad |
22:40:30 | FromDiscord | <Elegantbeef> Does it make sense why it calls it now? |
22:40:34 | FromDiscord | <Elegantbeef> Or do I need to explain further 😄 |
22:40:36 | FromDiscord | <graveflo> i meant for a generic object then |
22:40:55 | FromDiscord | <Elegantbeef> With a generic object same rules apply |
22:40:57 | FromDiscord | <graveflo> so `type A[T] = object`. I cut down the code I was using for the example |
22:41:30 | FromDiscord | <graveflo> you can't cheat and select the generic based on that difference anymore because `A` becomes a generic type class |
22:41:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:42:52 | FromDiscord | <Elegantbeef> `p[A[int]]` binds the implicit generic parameter to `A[int]` as such the first operand has to be `A[int]` whereas `p(A[int]()` infers `T` from the first operand |
22:44:43 | FromDiscord | <graveflo> this is confusing lol |
22:45:50 | FromDiscord | <graveflo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:46:28 | FromDiscord | <Elegantbeef> You've now rewrote the first to what the compiler sees and it changes nothing in my response |
22:46:59 | FromDiscord | <Elegantbeef> `p[A[int]]` in `p[T]` means the operand would need to be `A[A[int]]` to match, which means dispatch fails |
22:47:08 | FromDiscord | <Elegantbeef> Since you pass `A[int]` |
22:47:37 | FromDiscord | <graveflo> oh right |
22:47:49 | FromDiscord | <Elegantbeef> So there is no ambiguity and it picks the `T: object` variant |
22:48:33 | FromDiscord | <Elegantbeef> In case two you call passing `A[int]` as `p[T]` is more specific and dispatches on `A` it chooses that |
22:48:34 | FromDiscord | <graveflo> got it. Now there is the question of if this can actually select any overload in a given graph |
22:48:39 | FromDiscord | <graveflo> but that does a lot on it's own |
22:48:40 | FromDiscord | <scipio_nl> It does "feel" nice https://media.discordapp.net/attachments/371759389889003532/1190426186170511471/image.png?ex=65a1c1c7&is=658f4cc7&hm=a88d1b1b39d55cc158e9382a2984448ab07c10e29453534121c7574b950e80f7& |
22:49:28 | * | vsantana joined #nim |
22:50:42 | FromDiscord | <Elegantbeef> So `A[auto]` \> `object` since `A is A` |
22:50:44 | FromDiscord | <Elegantbeef> In Nim's dispatch a direct match of a type is a higher relation than a typeclass |
22:50:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:50:48 | FromDiscord | <Elegantbeef> And you can only make a call using a macro to extract the symbol |
22:50:51 | FromDiscord | <Elegantbeef> This falls apart cause `A` and `object` are typeclasses |
22:51:57 | FromDiscord | <Elegantbeef> As such the match is equal even though `A` is arguably more specific |
22:51:59 | FromDiscord | <Elegantbeef> Though `A[auto]` does not fail since it moves the matching back to the parameter which means it's a `tyGenericInvocation` vs `tyBuiltinTypeClass` |
22:52:25 | FromDiscord | <graveflo> ok so that was the format that I was originally trying to use. I just forgot the `[T]`.. not that I had thought about the narrowing you said earlier. |
22:52:29 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:53:40 | * | vsantana quit (Ping timeout: 245 seconds) |
22:55:48 | FromDiscord | <graveflo> okay so it seems the applications for this level of control are a lot more niche then I was thinking, but there are still scenarios where you can't really constrain overload resolution and select a compatible overload. |
22:56:14 | FromDiscord | <Elegantbeef> Right `(proc(x: object)(p))` fails |
22:56:40 | FromDiscord | <Elegantbeef> It likely should not fail in the case `p` is a generic so you can select a specific overload |
22:57:32 | FromDiscord | <Elegantbeef> For other overloaded symbols you can do the above to select one |
22:57:51 | FromDiscord | <graveflo> It would be pretty simple for the compiler to to accept a set of surrogate types for overload resolution, as long as those types are compatible with the operand. If there was a way to express that in the language then there should be no situation where you cannot select a matching overload. Idk if that matters at this point, just it's still a little weird having to think about keeping those windows of opportunity open whenever they may b |
22:57:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
22:58:46 | FromDiscord | <Elegantbeef> This just does not apply to generics which my be oversight or blind |
22:58:49 | FromDiscord | <graveflo> wait what is that syntax |
22:58:57 | FromDiscord | <Elegantbeef> Type conversion |
22:59:18 | FromDiscord | <graveflo> so it has to be concrete |
23:02:37 | * | Qaziquza joined #nim |
23:09:50 | FromDiscord | <scipio_nl> https://media.discordapp.net/attachments/371759389889003532/1190431515205718066/image.png?ex=65a1c6be&is=658f51be&hm=aa7be188d47f8caed4f78665f9f2beba1d50d42b5bcfc8dd76a6ba9e82644751& |
23:09:59 | FromDiscord | <scipio_nl> multi windows, okay I am getting enthusiastic |
23:10:02 | FromDiscord | <graveflo> sent a long message, see <!doctype html> |
23:10:24 | FromDiscord | <ieltan> In reply to @scipio_nl "": looks great 🙂 |
23:12:02 | FromDiscord | <scipio_nl> In reply to @ieltan "looks great 🙂": All credits go to @Phil and Joshua Lehmann, at the moment I can only code a working Fibonacci sequence in Nim without looking at docs. |
23:12:33 | FromDiscord | <Phil> That one is all can.l |
23:12:35 | FromDiscord | <scipio_nl> I can only take credits for being the #1 Owl ever to run Owlkettle on a Mac |
23:12:43 | FromDiscord | <scipio_nl> 😁 |
23:13:14 | FromDiscord | <scipio_nl> Well I have to say I kind of like it thusfar Phil |
23:13:30 | * | vsantana joined #nim |
23:13:38 | FromDiscord | <scipio_nl> & @ElegantBeef of course |
23:18:07 | * | vsantana quit (Ping timeout: 256 seconds) |
23:21:25 | FromDiscord | <michaelb.eth> In reply to @scipio_nl "I can only take": lol, not quite, I did last month because I was pretty sure owlkettle’s threading example was bugged and I wanted to test my theory. I just brew installed gtk4 and then was able to compile/run the example |
23:21:44 | FromDiscord | <michaelb.eth> surely others have tried it on mac long before that |
23:23:29 | FromDiscord | <scipio_nl> Of course 😉 Was only joking |
23:32:47 | * | vsantana joined #nim |
23:34:41 | FromDiscord | <scipio_nl> @ElegantBeef did you contribute to this also? https://github.com/can-lehmann/Graphing↵↵So a candlestick / line charting finance app using websockets etc should also be possible with Owlkettle? |
23:35:44 | FromDiscord | <Phil> In reply to @scipio_nl "<@145405730571288577> did you contribute": You mean fetch data from remote and display locally? |
23:36:42 | FromDiscord | <scipio_nl> Yup. There used to be an app on MacOS called "CryptoWatch" but it's discontinued since september and I loved it as it was so fast. I'm looking at rebuilding something like it |
23:38:12 | FromDiscord | <Elegantbeef> I contributed a simple change to make it installable using `nimble install` |
23:38:14 | FromDiscord | <Elegantbeef> But yes you can use the canvas mode and draw to your hearts content |
23:38:15 | FromDiscord | <Elegantbeef> Or use a GLArea and render using whatever graphics API you want |
23:41:20 | * | spacelucy joined #nim |
23:42:31 | * | azimut quit (Ping timeout: 240 seconds) |
23:47:51 | * | spacelucy quit (Quit: WeeChat 4.1.2) |