<< 26-11-2023 >>

00:13:34FromDiscord<bostonboston> Would you settle for doing it in a config file
00:15:55*redj joined #nim
00:16:00FromDiscord<bostonboston> Or I suppose I should ask what you're trying to accomplish
00:25:47NimEventerNew Nimble package! iniplus - An extended INI parser for Nim., see https://github.com/systemonia/iniplus
00:29:08*xet7 quit (Read error: Connection reset by peer)
00:56:49PMunchHuh, it's 2AM..
01:00:43FromDiscord<Chronos [She/Her]> Actually it's 1 AM 😎
01:00:54FromDiscord<Elegantbeef> Actually it's 6 pm
01:00:54FromDiscord<Chronos [She/Her]> [Gets kachowed by Lightning McQueen]
01:01:09FromDiscord<Chronos [She/Her]> I should sleep, adios
01:01:35FromDiscord<ieltan> In reply to @elegantbeef "Disabling entire user IO": there's been a wave of people seeking to fullfill questionable usecases lately.......
01:02:14FromDiscord<Chronos [She/Her]> Also considering that they asked about using Dimscord without a bot acc, if i remember correctly
01:02:23FromDiscord<Chronos [She/Her]> Sounds like they wanna use webhooks for something
01:04:01FromDiscord<ieltan> 🐲
01:54:56FromDiscord<michaelb.eth> recently there seems to have been a series of kids (I'm guessing 11-13 years old, maybe just the same kid but different accounts) who are hopeful about learning enough Nim to cause mischief with it
02:04:44*Onionhammer joined #nim
02:07:17FromDiscord<bostonboston> Criminals
02:21:36*PMunch quit (Quit: leaving)
02:22:29*lucasta quit (Quit: Leaving)
03:01:20FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4Ms6
03:01:32FromDiscord<ravinder387> is it compulsory to write NimMain() during call nim in c
03:01:34*jay-tuckey joined #nim
03:01:49FromDiscord<ravinder387> I want to create shared library
03:02:08FromDiscord<ravinder387> So can i avoid NimMain()
03:06:00FromDiscord<Elegantbeef> If you want to intialise all top level variables and run any top level code
03:08:00FromDiscord<ravinder387> int fib(int a); int myfun(int x) { return fib(x) }
03:08:11FromDiscord<ravinder387> is it works
03:10:41FromDiscord<Elegantbeef> If you do not have any top level code or variables
03:18:32FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4Msb
03:18:55FromDiscord<Elegantbeef> And you use orc/arc
03:32:01*jay-tuckey quit (Ping timeout: 276 seconds)
03:38:16FromDiscord<bostonboston> How would one go about making NimMain a constructor
03:38:41FromDiscord<Elegantbeef> Use codegendecl and call it inside your own
03:42:12FromDiscord<Elegantbeef> If you search for the attribute you might find me talking about it
03:47:44FromDiscord<bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4Msi
03:48:01FromDiscord<Elegantbeef> Yea
03:48:48FromDiscord<Elegantbeef> should be `importc, cdecl` iirc though
03:50:41*redj quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
03:50:50FromDiscord<bostonboston> how would I verify functionality
03:52:41*redj joined #nim
03:53:02FromDiscord<Elegantbeef> write `echo "Hello"`
03:53:18FromDiscord<Elegantbeef> Compile into a lib, load library, if you see "Hello" it done worky
04:07:42FromDiscord<bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4Msj
04:08:50FromDiscord<Elegantbeef> Yep
04:09:27FromDiscord<bostonboston> wonderful
05:07:14FromDiscord<bostonboston> should --app:lib automatically delcare nimmain as constructor or why does the compilier not do that
05:07:23FromDiscord<bostonboston> (edit) "should --app:lib ... automatically" added "by defaul"
05:08:14FromDiscord<Elegantbeef> I do not know
05:27:39*rockcavera quit (Remote host closed the connection)
05:31:41NimEventerNew thread by Boston: Delcare NimMain as constructor when --app:lib, see https://forum.nim-lang.org/t/10686
05:36:19NimEventerNew Nimble package! pathutils - Utilities for handling paths, see https://github.com/hmbemba/pathutils
06:12:41NimEventerNew post on r/nim by Dovelus: Nim nimcrypto AES128, see https://reddit.com/r/nim/comments/18448sv/nim_nimcrypto_aes128/
06:27:19*azimut quit (Ping timeout: 240 seconds)
06:29:49FromDiscord<ravinder387> NimMain() produce garbage collected code. if i convert nim code equivalent to python c api code.. i guess python GC free memory on behalf of me. how to embedded nim in other language?
06:32:30FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4MsV
06:32:39FromDiscord<ravinder387> i try to call nim in R. but it didn't work
06:33:49FromDiscord<Elegantbeef> If you're using orc/arc it does not matter
06:33:50FromDiscord<Elegantbeef> It's GC'd in Nim
06:33:51FromDiscord<Elegantbeef> As long as you do not return resources across the bridge it'll be GC'd
06:36:25FromDiscord<ravinder387> In reply to @Elegantbeef "If you're using orc/arc": I'm using nim-2.0.0 -mm:orc by default
06:36:38FromDiscord<Elegantbeef> Right
06:36:43FromDiscord<Elegantbeef> Like i said it will free gc'd memory
06:36:54FromDiscord<Elegantbeef> Do not share GC'd resources across the dll barrirer
06:36:55FromDiscord<Elegantbeef> be happy
06:40:26FromDiscord<ravinder387> gc'd what does it mean?
06:41:48FromDiscord<Elegantbeef> Garbage collected
06:48:44FromDiscord<ravinder387> then why we don't write NimMain() when we are calling nim from javascript?
06:49:18FromDiscord<Elegantbeef> Cause Nim compiled to JS uses JS?
06:50:33FromDiscord<Elegantbeef> JS has top level code it does not need NimMain
06:51:28FromDiscord<ravinder387> JS has top level code? means
06:51:45FromDiscord<ravinder387> import statement you are talking about
06:51:53FromDiscord<Elegantbeef> That'svalid
06:51:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4MsX
06:53:27FromDiscord<ravinder387> you mean function declare, function definition, function call in same file
06:53:37FromDiscord<ravinder387> that's top levelc code
06:55:47FromDiscord<Elegantbeef> Top level code is running code outside of a function
06:56:39FromDiscord<Elegantbeef> To do that with a DLL you make a function that has all your top level code in it
06:56:46FromDiscord<Elegantbeef> Ala NimMain
07:00:59*dtomato8 joined #nim
07:01:10*dtomato quit (Ping timeout: 264 seconds)
07:01:11*dtomato8 is now known as dtomato
07:44:00FromDiscord<ravinder387> undefined reference to `NimMain' errror when i compile by makevars
07:44:32FromDiscord<ravinder387> CFLAGS = -I../inst/include/fib_d -I../inst/include/lib ../inst/include/fib_d/.c
07:46:03FromDiscord<ravinder387> NimMain is only useful.. when call from C with main f(x) other wise I din't require it
08:03:15FromDiscord<Elegantbeef> You do not link the library
08:07:01FromDiscord<ravinder387> i compile with nim c --noMain --noLinking https://media.discordapp.net/attachments/371759389889003532/1178245509354373150/Screenshot_2023-11-26_133634.png?ex=657571a4&is=6562fca4&hm=ec985c6e935433b66f742d53d1e3fa1be8f29f5c2c01393410a5b93b7968fd38&
08:07:23FromDiscord<ravinder387> how to do with makefile
08:11:18*krux02 joined #nim
08:11:34Amun-Raif your library has a function that must be call first, place NimMain there, if there's not such function, create one
08:14:33Amun-Racalled*
08:15:32FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4Mti
08:16:16FromDiscord<ravinder387> By error i can say that makefile don't able to find fib and NimMain() things
08:38:11*om3ga quit (Ping timeout: 252 seconds)
08:45:43FromDiscord<xtrayambak> sent a code paste, see https://play.nim-lang.org/#ix=4Mtm
08:45:55FromDiscord<Elegantbeef> Destructors
08:46:05FromDiscord<xtrayambak> Yeah, those work too
08:48:32*xet7 joined #nim
09:34:08*krux02 quit (Remote host closed the connection)
10:00:38FromDiscord<dlesnoff> Does someone know where I can find the exact differences between Math.pow in JS and pow, powf functions in C++ ?↵I am not familiar with JS and would like to know special behavior that is proper to JS like 1^∞ = NaN
10:10:47FromDiscord<nnsee> In reply to @jiezron "Does someone know where": refer to https://262.ecma-international.org/#sec-numeric-types-number-exponentiate
10:12:52FromDiscord<nnsee> and something like https://en.cppreference.com/w/cpp/numeric/math/pow
10:12:55FromDiscord<dlesnoff> Thanks a lot! ❤️ this community who answers on Sunday 😮
10:13:06FromDiscord<nnsee> or the cpp specification itself if you can get your hands on it haha
10:20:33FromDiscord<dlesnoff> In reply to @nnsee "and something like https://en.cppreference.com/w/cp": I already checked the C++ reference documentation, I have a PR currently for the stdlib: https://github.com/nim-lang/Nim/pull/20898↵I would like to go the C++/Julia/Rust way of doing things. I have to modify Math.pow output for each difference between specifications. Wish me luck 😂
10:34:47FromDiscord<ebahie> sent a code paste, see https://play.nim-lang.org/#ix=4MtF
10:42:12FromDiscord<dlesnoff> > qui ce connecte↵qui se connecte↵(Glad to see other French devs programming in Nim btw)
10:43:55FromDiscord<ebahie> In reply to @jiezron "> qui ce connecte": oh yea lmao
11:05:53FromDiscord<dlesnoff> User-Agent value in the client.headers JSON spans multiple lines but you haven't used a """ (triple-quoted) string. Is this normal?↵You may need to ensure you get the string representation of self.token.↵For the position of the headers in the code, you may look at this SO post. I personally don't know as I have never done this kind of network thing:↵https://stackoverflow.com/questions/75069491/how-to-make-a-http-request-in-nim
11:13:17FromDiscord<ebahie> In reply to @jiezron "User-Agent value in the": the useragent is just one line, i think discord's codeblocks formatted it weirdly
11:13:26FromDiscord<ebahie> ill check out the post
11:19:03FromDiscord<intellij_gamer> Maybe pass the `Authorization` header into the request proc instead of setting it once for the client. Means it'll stay in sync with what `self.token` is
11:20:34FromDiscord<ebahie> In reply to @intellij_gamer "Maybe pass the `Authorization`": good idea ill try it out
11:22:09FromDiscord<ebahie> would making a template so i don't need to repeatedly write the headers work?
12:02:48FromDiscord<intellij_gamer> They get merged iirc so you should only need to write the auth header.↵Could probably just make that a template to access self.token, or make your own request function which just calls the normal request and adds the header
12:21:07*PMunch joined #nim
12:47:34*azimut joined #nim
13:45:17FromDiscord<Phil> Man, I need somebody smarter than me on owlkettle, my brain hurts
13:49:09FromDiscord<Phil> sent a long message, see http://ix.io/4Mum
13:52:16PMunchHmm, it sounds like you're over-complicating things a bit..
13:54:32PMunchDoesn't the Gtk callback mechanism support passing arbitrary data through a void pointer?
13:55:11FromDiscord<ravinder387> I want to compile nim into shared lib in such a way that I can call into c file
13:55:39PMunch@ravinder387, that's doable :)
13:55:54FromDiscord<ravinder387> how?
13:56:41PMunchWell the short answer is --app:lib --noMain
13:56:51PMunchTh long answer is https://peterme.net/dynamic-libraries-in-nim.html
13:58:23*jmdaemon quit (Ping timeout: 260 seconds)
13:59:16PMunchNote though that if you unload the DLL you might have some dangling memory: https://github.com/nim-lang/Nim/issues/21403
14:15:30FromDiscord<dlesnoff> How do I check whether assertions are turned on?
14:15:51Amun-Radlclose leaving allocated memory is a common issue among some libraries, some GTK versions, X11 or XCB come to my mind
14:15:59FromDiscord<dlesnoff> Sorry found it
14:18:42FromDiscord<Phil> In reply to @PMunch "Doesn't the Gtk callback": The thing is that this is an owlkettle specific issue.↵Since owlkettle has its own DSL to represent widgets you run into issues when strictly speaking you need to define a widget "twice" in a sense.↵The DSL has no elegant solution for that and neither does the XML builder approach of GTK from what I can see (Which is kinda a DSL to define a widget tree but in very ugly format)
14:19:44FromDiscord<Phil> So I can't really fix it on the GTK side of things since I first need to express the construct (A single instance of a widget that is used by multiple other widgets, in this case the StackWidget used by a StackSwitcher widget and whatever other Widget you put it into) so that it can generate the necessary GTK-tree via the c-calls
14:20:06FromDiscord<Phil> (edit) "So I can't really fix it on the GTK side of things since I first need to express the construct (A single instance of a widget that is used by multiple other widgets, in this case the StackWidget used by a StackSwitcher widget and whatever other Widget you put it into) ... so" added "in owlkettle"
14:44:39*rockcavera joined #nim
15:13:56*def- quit (Quit: -)
15:14:07*azimut quit (Ping timeout: 240 seconds)
15:14:32*def- joined #nim
15:15:52*azimut joined #nim
15:16:36FromDiscord<michaelb.eth> iiuc, sounds similar to the complex relationship between the DOM and HTML
15:19:20*def- quit (Client Quit)
15:27:45*FromDiscord quit (Remote host closed the connection)
15:28:05Amun-Rahmm, will `const foo {.booldefine.} = false or defined nimdoc` work?
15:28:06*FromDiscord joined #nim
15:28:11*FromDiscord quit (Remote host closed the connection)
15:28:24*NimEventer quit (Remote host closed the connection)
15:28:29*FromDiscord joined #nim
15:28:32Amun-Rait does
15:28:53*NimEventer joined #nim
15:29:01FromDiscord<millymox> is happyx production ready?
15:39:09*def- joined #nim
15:41:40*lucasta joined #nim
15:52:39FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4Mv7
15:56:51FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4Mv9
16:05:35FromDiscord<aintea> Still get an error
16:05:43FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4Mve
16:06:14FromDiscord<aintea> sent a code paste, see https://paste.rs/52SGT
16:06:19FromDiscord<aintea> Still get an error and I have no idea why
16:06:54FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4Mvf
16:18:01FromDiscord<demotomohiro> It is because `T` in `|>` was bind to float but `add_one` parameter is `int`.↵And |> is not a valid Nim identifier.↵So you need to enclose it with backtick when you call it as function.
16:19:50FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4Mvm
16:31:51FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4Mvo
16:32:12FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#ix=4Mvp
16:32:22FromDiscord<aintea> Wait, it worked
16:33:21FromDiscord<aintea> Thanks, have no idea why it didn't worked before (except that `float` I'm pretty much sure it was correct)
16:50:24FromDiscord<Phil> In reply to @michaelb.eth "iiuc, sounds similar to": I mean, functionally they're the same thing.↵You have a textual representation of the gui-tree and sometimes that just needs complex interactions and connections that you can not represent that way
16:51:49*lucasta quit (Quit: Leaving)
17:09:07*Guest695 joined #nim
17:09:17*Guest695 left #nim (#nim)
17:24:43*systemonia joined #nim
17:25:19*azimut quit (Ping timeout: 240 seconds)
17:26:02*azimut joined #nim
17:26:41*systemonia quit (Client Quit)
17:26:56*systemonia joined #nim
17:40:27*systemonia quit (Quit: Konversation terminated!)
17:48:41FromDiscord<michaelb.eth> okay, so it's a retained mode scene graph:↵https://blog.gtk.org/2020/04/24/custom-widgets-in-gtk-4-drawing/
17:57:19*azimut quit (Ping timeout: 240 seconds)
18:01:29*azimut joined #nim
18:18:23FromDiscord<eszetera> https://tenor.com/view/squid-clear-myself-gif-meme-gif-25725527
18:48:36*krux02 joined #nim
18:58:47FromDiscord<Phil> In reply to @michaelb.eth "okay, so it's a": Isn't all of GTK retained mode? I was under the impression that's a paradigm that the entire framework/lib you work with operates under since it's stateful vs. stateless
19:03:15NimEventerNew Nimble package! unroll - unroll for-loops (and map into seq/array) at compile-time in nim, see https://github.com/choltreppe/unroll
19:13:16NimEventerNew Nimble package! sqids - Official Nim port of Sqids. Generate short YouTube-looking IDs from numbers., see https://github.com/sqids/sqids-nim
19:53:32FromDiscord<odexine> Oh cool
20:04:21FromDiscord<Phil> Man, we need Rxnim.↵Particularly, Rxnim not written by a dumbass like me
20:11:36*lucasta joined #nim
20:33:40FromDiscord<Chronos [She/Her]> I wonder if there's an idiomatic way to use the results library tbh
20:35:59FromDiscord<Chronos [She/Her]> Questionable just doesn't feel great to use imo
20:42:27FromDiscord<Chronos [She/Her]> Also out of curiosity: Is it better to reuse one singular AsyncHttpClient?
20:43:49FromDiscord<fabric.input_output> In reply to @chronos.vitaqua "Questionable just doesn't feel": https://github.com/fabriciopashaj/yarolin
20:44:07FromDiscord<fabric.input_output> it's right there
20:44:08FromDiscord<Chronos [She/Her]> Or is there a better library for async HTTP requests since it seems like Nim has some issues with that
20:45:17FromDiscord<fabric.input_output> In reply to @fabric.input_output "https://github.com/fabriciopashaj/yarolin": that's why I made it, because questionable depended on something else for results and it failed
20:45:37FromDiscord<Chronos [She/Her]> Oh wow, that actually looks pretty nice
20:47:10FromDiscord<Chronos [She/Her]> In reply to @fabric.input_output "that's why I made": Thanks for this!
20:47:25FromDiscord<fabric.input_output> In reply to @chronos.vitaqua "Thanks for this!": thank you for using it
20:47:33FromDiscord<fabric.input_output> if you do
20:49:06FromDiscord<ElegantBeef> Any moment now this bridge will spam messages from me
20:49:08FromDiscord<ElegantBeef> I believe
20:49:16FromDiscord<michaelb.eth> In reply to @fabric.input_output "that's why I made": “failed” as in the dependency didn’t resolve via nimble?
20:49:28FromDiscord<ElegantBeef> Those operators are horrific 😄
20:49:58FromDiscord<Chronos [She/Her]> Huh this is weird... Can't use Yarolin in my code
20:50:03FromDiscord<fabric.input_output> In reply to @michaelb.eth "“failed” as in the": it was smth like a typo in the name of an import, like an extra or missing s somewhere
20:50:19FromDiscord<Chronos [She/Her]> Installed it via Nimble, but my code doesn't see it as valid
20:50:19FromDiscord<fabric.input_output> In reply to @chronos.vitaqua "Huh this is weird...": what how why where
20:50:34FromDiscord<Chronos [She/Her]> `/home/chronos/test/main.nim(1, 8) Error: cannot open file: yarolin`
20:50:38FromDiscord<ElegantBeef> don't forget when
20:50:43FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Mya
20:50:48FromDiscord<ElegantBeef> Did you add the requirement to your nimble file?
20:50:52FromDiscord<Chronos [She/Her]> (edit) "https://play.nim-lang.org/#ix=4Mya" => "https://play.nim-lang.org/#ix=4Myb"
20:50:55FromDiscord<Chronos [She/Her]> No nimble file here
20:51:09FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4Myc
20:51:11*droidrage joined #nim
20:51:18PMunch@Phil, Rxnim?
20:51:37FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Myd
20:51:37FromDiscord<Chronos [She/Her]> but everything else is nice
20:51:42FromDiscord<ElegantBeef> fabricio is there anything like the `success` and `error` templates here? https://play.nim-lang.org/#ix=4My8
20:51:47FromDiscord<Chronos [She/Her]> In reply to @fabric.input_output "oh you have to": Aah, that should be put on the README :p
20:51:59FromDiscord<fabric.input_output> In reply to @chronos.vitaqua "Aah, that should be": will do
20:52:11FromDiscord<Phil> An implementation of observables and subjects, reactive datastructures that execute callbacks when their values get updated, basically effortless syncing of values where one depends upon the other
20:52:20FromDiscord<ElegantBeef> Atleast the way I see it if you assign something to an error you generally want to return
20:54:41FromDiscord<michaelb.eth> sent a long message, see http://ix.io/4Myg
20:54:53FromDiscord<fabric.input_output> In reply to @elegantbeef "fabricio is there anything": oh there is the `.try` macro
20:55:05FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Myh
20:55:26FromDiscord<ElegantBeef> I mean that's not unpacking though
20:55:46FromDiscord<Chronos [She/Her]> `var a = Result[string, int] !+ "wah"` works fine, however
20:55:49FromDiscord<ElegantBeef> The template I shared returns inside a function when you write to the `result` variable
20:56:17FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4Myi
20:56:30FromDiscord<ElegantBeef> Calling `doThing` will never echo
20:56:39FromDiscord<Chronos [She/Her]> I may just steal the template you have Beef :P
20:56:47FromDiscord<ElegantBeef> Well it's not ideal
20:56:57FromDiscord<fabric.input_output> In reply to @chronos.vitaqua "Ah this code fails": because lhs of `!` is the errror, like in zig
20:56:58FromDiscord<ElegantBeef> It does not work inside of expressions and complicated for loops
20:57:12FromDiscord<Chronos [She/Her]> In reply to @fabric.input_output "because lhs of `!`": Aaaaah
20:57:15*qwestion joined #nim
20:57:30FromDiscord<ElegantBeef> Yea the operators are a bit of a joke 😄
20:57:36FromDiscord<Chronos [She/Her]> Threw me off, even with reading the README :p
20:57:50FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4Myj
20:57:51FromDiscord<Chronos [She/Her]> Welp, stealing your thing Beef :p
20:57:58FromDiscord<ElegantBeef> Cheers
20:58:04FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Myk
20:58:22FromDiscord<Chronos [She/Her]> In reply to @elegantbeef "Cheers": You have a repo storing this stuff, right? Is it under a license or?
20:58:41FromDiscord<ElegantBeef> https://github.com/beef331/nimtrest/wiki/Code-snippets
20:58:54FromDiscord<ElegantBeef> I mean it's a wiki so uh....
20:59:06FromDiscord<ElegantBeef> I do not have a lawyer so good luck getting sued
20:59:10FromDiscord<Chronos [She/Her]> Lol
21:00:15FromDiscord<fabric.input_output> In reply to @elegantbeef "I mean that's not": I don't know why you would need that macro, I can implement it for you okay but I don't see the significance
21:00:38FromDiscord<ElegantBeef> In my view you should not have a procedure continuing to run after assigning the result
21:00:56FromDiscord<fabric.input_output> you have `returnVal` and `returnErr`
21:01:05FromDiscord<ElegantBeef> Atleast in these afformative result like environment
21:01:08FromDiscord<Elegantbeef> I'd personally suggest replacing those ugly operators with a `succeed` and `fail` template 😄
21:01:09FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=4My8 something like this stuff here
21:01:14FromDiscord<ElegantBeef> Assigning result should mean the procedure is done
21:01:20FromDiscord<ElegantBeef> Ah there's the bastard
21:01:53FromDiscord<fabric.input_output> In reply to @Elegantbeef "I'd personally suggest replacing": yo it's the real beef I thought you had changed pfp
21:02:18FromDiscord<nnsee> beef on discord!?
21:02:25FromDiscord<ElegantBeef>
21:02:37FromDiscord<nnsee> what is this
21:02:39FromDiscord<ElegantBeef> The bridge is only one way right now
21:02:45FromDiscord<nnsee> not the interrobang
21:02:46FromDiscord<nnsee> oh
21:02:47FromDiscord<ElegantBeef> So all you lot should come use matrix
21:02:53FromDiscord<nnsee> fine by me
21:02:59FromDiscord<nnsee> ... if everyone else moved
21:03:07FromDiscord<ElegantBeef> That's what everyone says
21:03:11FromDiscord<nnsee> unfortunately I have too many people here
21:03:17FromDiscord<nnsee> yep, that's the irony of it
21:03:19FromDiscord<ElegantBeef> Jesus let the people go
21:03:23FromDiscord<ElegantBeef> Fucking hostage takers
21:03:26PMunch@Phil, maybe something like pararules would suit you?
21:03:35FromDiscord<Elegantbeef> Rumour of my death is greatly exaggerated
21:04:03FromDiscord<nnsee> In reply to @elegantbeef "Jesus let the people": never
21:04:14FromDiscord<nnsee> and my name is Rasmus, not Jesus
21:04:26FromDiscord<fabric.input_output> In reply to @fabric.input_output "you have `returnVal` and": do these do what you wanted @ElegantBeef
21:04:41FromDiscord<Chronos& [She/Her]> I exist
21:04:41FromDiscord<Elegantbeef> Ping
21:04:41FromDiscord<Chronos& [She/Her]> Wow this is really dead
21:04:42FromDiscord<Chronos& [She/Her]> Lol↵(@fabric.input_output)
21:05:03FromDiscord<nnsee> how hard is it really to write a functional bridge bot
21:05:11FromDiscord<ElegantBeef> It's just wrapping REST API
21:05:17FromDiscord<ElegantBeef> So have at it
21:05:27FromDiscord<fabric.input_output> In reply to @Elegantbeef "Ping": pong
21:05:49FromDiscord<ElegantBeef> I guess it's easier if you do not use Nim
21:06:08FromDiscord<ElegantBeef> But the nim matrix sdk is in a state of undeveloped hell, tandy's repo is the most developed, but still not that developed
21:06:11FromDiscord<ElegantBeef> They made a client using it iirc
21:06:29FromDiscord<ElegantBeef> In reply to @fabric.input_output "do these do what": Yea it's close enough
21:06:41FromDiscord<nnsee> I discovered an app the other day, Beeper, which basically combines a whole bunch of services into a single app. Nothing novel, these apps have come and gone, but what interested me was that they are using Matrix as the "home" server for the bridges for everything
21:06:56FromDiscord<ElegantBeef> Yea matrix has a shit load of puppet and normal bridges
21:07:03FromDiscord<Elegantbeef> Ping
21:07:08FromDiscord<Elegantbeef> Oh hey we're back
21:07:39FromDiscord<fabric.input_output> In reply to @elegantbeef "Yea it's close enough": I tried to make it as feature complete as possible that's the reason for all the ridiculous operators like `!+` and `=!-`
21:08:15FromDiscord<fabric.input_output> do not hesitate to ping me if you want a feature or face an obstacle
21:09:39FromDiscord<Elegantbeef> Also why do you use so many macros that are just templates?
21:09:43FromDiscord<Elegantbeef> Like all of your macros with `genSym` then `quote do` are just templates
21:09:49*PMunch quit (Quit: leaving)
21:10:29FromDiscord<fabric.input_output> because I'm not that good with templates and macros are easier to get right for me
21:10:42FromDiscord<Elegantbeef> But they're literally identical 😄
21:11:17FromDiscord<fabric.input_output> can you define variables of `genSym`ed idents in templates and use them?
21:11:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Myn
21:12:44FromDiscord<ElegantBeef> God damn bridge
21:12:54FromDiscord<ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/1178443281508610098/image.png?ex=657629d4&is=6563b4d4&hm=b220c8acf7affa38cdcffe91068f511ac380ce97ff918da1c0b3a3d6a2a7dea2&
21:12:56FromDiscord<ElegantBeef> To beat the bridge
21:13:29FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4Myo
21:13:32FromDiscord<Elegantbeef> Symbols are implicitly 'genSym'd\` inside templates
21:13:32FromDiscord<Elegantbeef> Templates are hygenic in Nim, which means any symbols that are introduced cannot be accessed unless they're marked `{.inject.}` or the template is marked `{.dirty.}`
21:13:37FromDiscord<ElegantBeef> For a simple example
21:13:38FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4Myp
21:14:18FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4Myq
21:14:20FromDiscord<ElegantBeef> Nope
21:14:28FromDiscord<ElegantBeef> The code is pasted where you call it directly just like macros
21:14:44FromDiscord<fabric.input_output> I thought they formed a separate scope
21:14:47FromDiscord<ElegantBeef> The only difference is that the macro is evaluated code on the VM, whereas a a template is a replacement
21:14:48FromDiscord<ElegantBeef> Nope
21:14:59FromDiscord<ElegantBeef> You might've thought that since they are hygenic and you cannot access the variables
21:15:09FromDiscord<ElegantBeef> If you want to make a scope inside a template you do `if true:`
21:15:40FromDiscord<fabric.input_output> I guess templates are faster than macros
21:15:46FromDiscord<fabric.input_output> I shall refactor
21:16:24FromDiscord<fabric.input_output> now I have some reason to do it
21:19:04FromDiscord<ElegantBeef> Your reliance on the `result` variable did make me realise that there can be a `error` overloaded template 😄
21:21:28FromDiscord<sOkam! 🫐> Is it possible, by any chance, to send the output of `./build_all.sh` into a folder different than `./bin/` when initializing the compiler after doing `clone NimRepoURL`?↵Was thinking of something like doing `MYNEWPATH=/path/to/somewhere ./build_all.sh` or similar
21:21:36FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4Myt
21:21:48FromDiscord<sOkam! 🫐> (edit) "`clone" => "`git clone"
21:22:20FromDiscord<ElegantBeef> I don't think so sokam
21:22:38FromDiscord<ElegantBeef> I might be wholly wrong
21:23:01FromDiscord<sOkam! 🫐> i didn't find any clues in the scripts themselves, the paths seemed hardcoded. but was asking in case I missed something
21:23:53FromDiscord<ElegantBeef> It should just use `--outDir`
21:24:18FromDiscord<sOkam! 🫐> in bash?
21:24:33FromDiscord<ElegantBeef> In the config file wherever it is
21:26:13FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4Myx
21:26:29FromDiscord<ElegantBeef> Neither of those work in expressions
21:27:10FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4Myy
21:27:44*lucasta quit (Remote host closed the connection)
21:27:52FromDiscord<ElegantBeef> Before you say "returnErr` works fine for that, you have more complicated expressions like case statements
21:28:14FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4MyA
21:28:50FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=4MyC
21:29:07FromDiscord<ElegantBeef> `return` does not work with expressions as such any exhaustive expression logic fails
21:29:23FromDiscord<ElegantBeef> Which means in the above code in the case of `B` the value is always an error on the result instead of a CTE on writing
21:30:59FromDiscord<ElegantBeef> Of course sadly this does not work for expression blocks outside of procedures and you do need to use `failure` and `success` in those cases
21:31:41FromDiscord<ElegantBeef> But it's fairly expressive inside of procedures methinks, I could be wrong and just bikeshedding ideas 😛
21:31:57FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4MyE
21:32:11FromDiscord<ElegantBeef> How does that stolve the procedure example?
21:32:12FromDiscord<fabric.input_output> (edit) "https://play.nim-lang.org/#ix=4MyE" => "https://play.nim-lang.org/#ix=4MyF"
21:32:22FromDiscord<ElegantBeef> (edit) "stolve" => "solve"
21:32:31FromDiscord<fabric.input_output> I was responding to the failure/success thing
21:32:36FromDiscord<ElegantBeef> Ah
21:33:01FromDiscord<ElegantBeef> `R.error("foo")` is a nice syntax aswell
21:33:20FromDiscord<sOkam! 🫐> does the compiler understand being sent options through any environment variable? 🤔
21:33:26FromDiscord<ElegantBeef> Not that i know of
21:33:44FromDiscord<ElegantBeef> Could also take instances so you could do `result.error("foo")` and just do `typeof(result)` inside the `error` template
21:33:49FromDiscord<ElegantBeef> Or whatever you prefer
21:33:57FromDiscord<ElegantBeef> This way it's consistent across expressions
21:34:44FromDiscord<ElegantBeef> I'm very much bikeshedding though
21:34:44FromDiscord<fabric.input_output> ok but you have the operators which are shorter and should not clutter the code because you should not do those stuff heavily
21:34:53FromDiscord<ElegantBeef> Operators are awful
21:34:58FromDiscord<fabric.input_output> boo
21:35:03FromDiscord<ElegantBeef> `!+` not plus
21:35:09FromDiscord<ElegantBeef> `!-` not minus
21:35:18FromDiscord<fabric.input_output> you are just brainwashed
21:35:36FromDiscord<ElegantBeef> Yea the 5G does that to you
21:35:47FromDiscord<sOkam! 🫐> `a !+ b` better than `notPlus(a,b)` though
21:35:56FromDiscord<ElegantBeef> As if notPlus makes any senss
21:36:06FromDiscord<sOkam! 🫐> yeah i know, but it was your example lol
21:36:23FromDiscord<ElegantBeef> My issue is it's overloading operators for a nonsensical situation
21:36:25FromDiscord<fabric.input_output> I mean the `!` is for results and the `+` ro `-` determines if it is success or failure
21:36:32FromDiscord<sOkam! 🫐> this case is kinda easy for the fuctnion version, but for nested calls operators are hella useful
21:36:37FromDiscord<fabric.input_output> (edit) "ro" => "or"
21:36:58FromDiscord<ElegantBeef> Right I know what it's supposed to symbolise but it does not make it any more readable 😄
21:37:41FromDiscord<ElegantBeef> It's a infix operator that just does not jive with what it's doing in my braine
21:37:42FromDiscord<ElegantBeef> (edit) "braine" => "brain"
21:38:07FromDiscord<fabric.input_output> I went the function way with the operators so instead of providing macros that do overloads for operators of the types I made macros like `mapIt` and `map2AB`
21:38:32FromDiscord<fabric.input_output> In reply to @elegantbeef "It's a infix operator": you probably old
21:38:40FromDiscord<ElegantBeef> `R.error(...)` and `R.success(...)` although more wordy is more indictive, but we're so deep in the bike shed we're now thinking of what to name the screw on the outlet
21:38:41FromDiscord<fabric.input_output> lol
21:38:44FromDiscord<ElegantBeef> Is 24 old?
21:38:49FromDiscord<ElegantBeef> Am I over the hill already
21:38:50FromDiscord<ElegantBeef> Fuck
21:38:59FromDiscord<fabric.input_output> In reply to @elegantbeef "Is 24 old?": older than me
21:39:09FromDiscord<ElegantBeef> Let me find a bus to jump in front of, be back in 10
21:39:24FromDiscord<ElegantBeef> Oh wait I'm in bum fuck nowhere, what's public transit
21:39:28FromDiscord<sOkam! 🫐> could this affect the compiler bootstrapping process itself too, if I added a `nim.cfg` file somewhere? 🤔 https://media.discordapp.net/attachments/371759389889003532/1178449970370711695/image.png?ex=6576300f&is=6563bb0f&hm=67b3840b620e96f17b28775094c9b8e910f8d9e46d9c90b79c0e538ee69d51df&
21:39:52FromDiscord<fabric.input_output> In reply to @elegantbeef "Oh wait I'm in": where do you live lol
21:40:05FromDiscord<ElegantBeef> Rural Canada is as much as I'll give
21:40:44FromDiscord<sOkam! 🫐> beef will be the first to call when the winter is coming
21:40:57FromDiscord<fabric.input_output> In reply to @elegantbeef "Rural Canada is as": cold there?
21:41:13FromDiscord<sOkam! 🫐> beef snow, if you get the reference 🙂
21:41:24FromDiscord<ElegantBeef> Not right now, it's a rather tame year so far
21:41:27FromDiscord<ElegantBeef> only -6 atm
21:41:40FromDiscord<sOkam! 🫐> "only" 🥶
21:41:45FromDiscord<ElegantBeef> Ask again in the depth of winter, might be in the -40s
21:42:05FromDiscord<fabric.input_output> it's 8 degrees here and feels cold af
21:42:24FromDiscord<sOkam! 🫐> In reply to @elegantbeef "Ask again in the": my goodness
21:42:42FromDiscord<ElegantBeef> Well that's with windchil if it's any consolation
21:42:52FromDiscord<ElegantBeef> So as long as you have a windbreaker it's only like -35
21:43:10FromDiscord<fabric.input_output> you got a furnace
21:43:26FromDiscord<ElegantBeef> Of course how else do you stay warm in that temperature
21:43:34FromDiscord<ElegantBeef> Heat pumps stop working effectively at -20
21:43:56FromDiscord<sOkam! 🫐> that's something i had no idea about. lol, that's insane
21:44:20FromDiscord<fabric.input_output> did you have a bountiful harvest this year
21:44:27FromDiscord<ElegantBeef> I mean I'm not that rural
21:44:29FromDiscord<fabric.input_output> to survive the harsh winter
21:47:15FromDiscord<ElegantBeef> Another silly thing you could do instead of `!+` is `as` `"Hello" as R"`
21:47:42FromDiscord<Chronos [She/Her]> Cursed
21:47:53FromDiscord<fabric.input_output> no no the operator is better
21:48:01FromDiscord<fabric.input_output> even makes more sense imo
21:48:09FromDiscord<ElegantBeef> To each their own
21:48:10FromDiscord<fabric.input_output> In reply to @chronos.vitaqua "Cursed": you enjoying the lib?
21:48:59FromDiscord<ElegantBeef> There we go `"Hello" as -R` and `"Hello" as +R` 😛
21:49:31FromDiscord<ElegantBeef> Value as positive R and value as negative R, it even reads better!
21:50:21FromDiscord<fabric.input_output> you can't do that with `string!string` in place of `R` without parens
21:50:28FromDiscord<ElegantBeef> Good
21:50:45FromDiscord<fabric.input_output> you can do it with mine `string!string !+ "Hello"`
21:51:39FromDiscord<sOkam! 🫐> to answer myself from before, the `./bin/nim` path is hardcoded in multiple places. not gonna work 😦
21:52:02FromDiscord<ElegantBeef> Why does it even matter where it builds?
21:53:24FromDiscord<sOkam! 🫐> sent a long message, see http://ix.io/4MyR
21:53:53FromDiscord<sOkam! 🫐> haven't figured out a way to do that without copying the ./bin/ folder or similars
21:54:50FromDiscord<michaelb.eth> In reply to @heysokam "haven't figured out a": have you looked at nimbus-build-system and how it builds/manages Nim as a submodule?
21:55:08FromDiscord<sOkam! 🫐> In reply to @michaelb.eth "have you looked at": haven't. where could I find it?
21:55:21FromDiscord<sOkam! 🫐> also, nimbus is not the same as nimble, i assume?
21:55:33FromDiscord<michaelb.eth> https://github.com/status-im/nimbus-build-system
21:55:42FromDiscord<ElegantBeef> Nimbus is status' make wrapper practically
21:56:55FromDiscord<michaelb.eth> it can be used for any Nim project, but came about because Status wanted reproducible builds for nimbus and nimble wasn’t suitable
21:58:09FromDiscord<michaelb.eth> tbh, it can be kind of a PITA to work with at first, but once you get used to it it’s not terrible
22:00:44FromDiscord<sOkam! 🫐> In reply to @michaelb.eth "https://github.com/status-im/nimbus-build-system": https://github.com/status-im/nimbus-build-system/blob/master/scripts/build_nim.sh↵so this file is essentially what I want to avoid, lol
22:00:57FromDiscord<sOkam! 🫐> i don't want to reinvent the whell, not needed for my case
22:01:05FromDiscord<sOkam! 🫐> (edit) "whell," => "wheel,"
22:02:20FromDiscord<sOkam! 🫐> the `add_submodule.sh` script has some great ideas, though. thx for recommending it
22:02:29FromDiscord<michaelb.eth> sure thing
22:02:54FromDiscord<Chronos [She/Her]> In reply to @fabric.input_output "you enjoying the lib?": Took a break from programming for the rest of the day, I think I'm burnt out
22:05:11FromDiscord<fabric.input_output> In reply to @chronos.vitaqua "Took a break from": I'm on the brink of headache here, overdid myself today. hopefully sleep will fix it
22:05:51FromDiscord<fabric.input_output> I despise headaches
22:08:37*jmdaemon joined #nim
22:16:50*rockcavera quit (Remote host closed the connection)
22:29:40FromDiscord<sOkam! 🫐> is the stable release branches format standarized for the nim repo?↵as in, if tomorrow 2.1 is released, will there be a new `version-2-1` branch created?↵I can only see 2 branches with that format, so wondering if that's because its the only two supported branches, or if its because the branch names are not standarized
22:33:29FromDiscord<Phil> In reply to @PMunch "<@180601887916163073>, maybe something like": Pararules looks like introducing an entirely new paradigm and thus a bit heavy on the conceptual side.↵Keep in mind that is still for owlkettle, I just want a mechanism for callbacks to fire whenever you update a reference value of sorts
23:05:47FromDiscord<Elegantbeef> Devel is always the next stable and is an odd number
23:05:47FromDiscord<Elegantbeef> version-x-y is for previous releases that are still 'supported'
23:14:37*targz77 joined #nim
23:23:58FromDiscord<Chronos [She/Her]> In reply to @fabric.input_output "I despise headaches": Fair
23:36:25*xet7 quit (Remote host closed the connection)