<< 01-11-2022 >>

00:00:36FromDiscord<huantian> <@&371760044473319454>
00:03:42FromDiscord<Prestige> why don't we just filter out all t.me links?
00:04:01FromDiscord<huantian> yeahhhhhhhhh we really should
00:04:09FromDiscord<Elegantbeef> Cause no one has setup a matrix moderator bot it seems
00:04:28FromDiscord<huantian> pls mod fix
00:13:40*wallabra quit (Ping timeout: 248 seconds)
00:15:15*wallabra joined #nim
00:19:42FromDiscord<auxym> In reply to @Elegantbeef "Cause no one has": I think @Phil was volunteering to set one up? Or am I thinking of someone else? I remember it was discussed in offtopic a week or two ago
00:28:55FromDiscord<Elegantbeef> Just ban all matrix users is easier, they're just asshats, the lot of them
00:36:27FromDiscord<huantian> Beef you never finished your sentence
00:36:38FromDiscord<Elegantbeef> I was correcting myself
00:36:43FromDiscord<Elegantbeef> But i guess i forgot an asterix
00:36:46FromDiscord<Elegantbeef> Astrix
00:36:52FromDiscord<Elegantbeef> Astericks
00:37:34FromDiscord<Rika> Asterisk
00:38:18FromDiscord<Elegantbeef> Hey the last two were jokes
00:42:55FromDiscord<Rika> Hard to tell
00:43:01FromDiscord<Rika> Given it’s you
00:54:54FromDiscord<Phil> In reply to @auxym "I think <@180601887916163073> was": I've offered to invest time in the offtopic channel and since have not really heard back. Basically I can start looking into Mjolnir docs and eventually ? sth. happens and whatever I uncover gets adopted or sth?
00:56:10FromDiscord<Phil> As far as I know its still being discussed in the mod channel occasionally
00:56:32FromDiscord<auxym> :S
01:50:36FromDiscord<Bung> `pure/times.nim(2136, 32) Hint: 'parse' cannot raise 'Defect'` is the effect system works well?
02:04:51FromDiscord<ChocolettePalette> I can fully agree
02:48:03FromDiscord<Elegantbeef> @exelotl\: are you using tileengine for your games native port?
02:48:42FromDiscord<exelotl> not confirmed yet but it seems like a promising option
02:48:47*arkurious quit (Quit: Leaving)
02:49:12FromDiscord<exelotl> I won't be starting on the port until like april next year or so
03:52:47FromDiscord<Elegantbeef> @pietroppeter\: damn the analytics are quite nice, some fun stuff to look at here
03:54:06FromDiscord<Elegantbeef> A very interesting thing is that finished projects written in Nim generate quite a bit of traffic to Nim's website
03:55:06FromDiscord<Elegantbeef> Nitter, Nimdow, raylib's binding list, godot-nim, all get some amount of interest in Nim
03:57:40FromDiscord<!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4eEx
03:58:10FromDiscord<Rika> ?
03:58:16FromDiscord<Elegantbeef> d
03:59:22FromDiscord<Elegantbeef> There's a fair bit of interest from malware/red team repos here
03:59:25FromDiscord<!&luke> (edit) "https://play.nim-lang.org/#ix=4eEx" => "https://play.nim-lang.org/#ix=4eEy"
04:00:02FromDiscord<Elegantbeef> I'd personally say just use c2nim on tuibox
04:00:05FromDiscord<Elegantbeef> It's 600 loc
04:00:16FromDiscord<!&luke> i tried that
04:00:21FromDiscord<!&luke> didnt work
04:03:15FromDiscord<Elegantbeef> Though i'd personally just use illwill, though i guess that is more complex
04:07:49FromDiscord<albassort> well
04:07:58FromDiscord<albassort> i tried for a while but I cant get httpclient to work with tor
04:07:59FromDiscord<albassort> hmmm
04:08:17FromDiscord<albassort> i presume its a port issue, but I don't know how'd I get the error
04:11:19*ormiret quit (Read error: Connection reset by peer)
04:11:37*ormiret joined #nim
04:11:56*estiquelapice quit ()
04:12:16*estiquelapice joined #nim
04:16:11FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1036856154497765397/unknown.png
04:16:15FromDiscord<albassort> rate limit speedrun
04:16:26FromDiscord<albassort> threading+async
04:18:31FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1036856739657699368/unknown.png
04:18:35FromDiscord<albassort> sad
04:25:18FromDiscord<!&luke> In reply to @Elegantbeef "Though i'd personally just": yea ill just use illwill
04:39:02FromDiscord<pietroppeter> In reply to @Elegantbeef "<@588390287810887693>\: damn the analytics": Haha nice to hear!
04:40:04FromDiscord<pietroppeter> In reply to @Elegantbeef "Nitter, Nimdow, raylib's binding": Well I did not see that filtering with GitHub you get also the details of subdomain, nice https://plausible.io/nim-lang.org?source=GitHub (that’s exactly why I love that these are public!)
04:42:45FromDiscord<Elegantbeef> A bit sad that we cannot see the google search terms 😛
04:43:29FromDiscord<Elegantbeef> The impressive thing is
04:43:29FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1036863024667037707/image.png
04:43:53FromDiscord<Elegantbeef> Ostensibly there arent 2000 Nim programmers going to that page to install Nim in a month
04:46:16madpropsis there a country where nim has more presence?
04:47:02FromDiscord<Elegantbeef> USA -\> Germany -\> Japan are the top visits
04:48:13FromDiscord<Elegantbeef> Canada actually has quite alot given that we only have 40mil
04:49:53FromDiscord<pietroppeter> In reply to @Elegantbeef "A bit sad that": I just looked up the documentation. I should be able to get those if I add the site to Google console (as admin of the instance I see a button which points to the docs)
04:51:46FromDiscord<pietroppeter> In reply to @Elegantbeef "Ostensibly there arent 2000": This is something that might be partially due to how they count visitors, iirc they track some hash of ip only for the single day and so the visitor count is reasonably accurate for the day but likely an overestimate for the month. Not sure about this, will have to check the docs
04:52:37FromDiscord<pietroppeter> In reply to @pietroppeter "I just looked up": FYI https://plausible.io/docs/google-search-console-integration
05:03:00*lucerne quit (Read error: Connection reset by peer)
05:25:26FromDiscord<Pietro Peterlongo> Huh seeing this only on element/matrix and not on discord. Guess the bridge is having issues
05:25:56FromDiscord<Elegantbeef> It does that sometimes 🙂
05:28:01FromDiscord<Pietro Peterlongo> Yep, although it seems solved already. Although here (element) the replies of discord do not show up (which I guess is pretty bad when you reply to old stuff) while replying here shows up as reply in discord. I prob should use element more
05:28:40FromDiscord<Elegantbeef> Or any matrix client 😛
05:29:34FromDiscord<Pietro Peterlongo> Ah yeah I guess element is the easiest. Once we are in more than one step of setup I get lost 😂
05:29:49FromDiscord<Elegantbeef> They're all the same
05:29:59FromDiscord<Elegantbeef> Type in your homeserver name/pass and login
05:30:22FromDiscord<Elegantbeef> If you do like discord cinny is pretty discordian
05:39:51FromDiscord<albassort> .-.
05:40:12FromDiscord<albassort> does anyone have a reason why httpclient would just be unable to connect through my httptunnel
05:40:16FromDiscord<albassort> my browser does fine
05:40:28FromDiscord<albassort> is it ssl conflicting with tor?
05:43:04FromDiscord<Rika> No
05:49:50*LuxuryMode quit (Quit: Connection closed for inactivity)
05:58:38FromDiscord<albassort> i should probably start saving the pages lol
06:24:46NimEventerNew thread by sls1005: Looping Assertions, see https://forum.nim-lang.org/t/9566
06:56:34*neceve_ is now known as neceve
07:00:32FromDiscord<Pietro Peterlongo> Not sure how I picked element but probably is because it has web desktop and iOS, not a particular fan of discord per se
07:01:15FromDiscord<Elegantbeef> Well it's most developed as it's the first party implementation of the forprofit group that established the matrix protocol
07:01:23FromDiscord<Elegantbeef> it's the most\
07:02:45FromDiscord<Elegantbeef> I do eventually want to make a Nim matrix client, but that's like item 10000 in list of things i want to do
07:03:18NimEventerNew post on r/nim by HollowEggNog: Cuda setup tutorial?, see https://reddit.com/r/nim/comments/yj1jvc/cuda_setup_tutorial/
07:16:48*lucerne joined #nim
07:21:58FromDiscord<ShalokShalom> In reply to @Elegantbeef "I do eventually want": What client do you use now?
07:24:20*PMunch joined #nim
07:29:09FromDiscord<Elegantbeef> Element
07:35:19FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4eEW
07:35:45*kenran joined #nim
07:36:01*kenran quit (Remote host closed the connection)
07:36:42*lucerne quit (Ping timeout: 255 seconds)
07:37:30FromDiscord<Elegantbeef> Likely will have to wrap pcap
07:41:01FromDiscord<4zv4l> hmmm alright, thanks
07:41:12PMunchYou could use this https://github.com/PMunch/nim-pcap to parse a pcap file captured by an external progra
07:41:23PMunch(That program could of course be launched from Nim)
07:41:52PMunchOr you could just use Futhark to import pcap
07:42:23FromDiscord<4zv4l> like I use pcap.h to get packets and that lib to parse them ?
07:43:13FromDiscord<Elegantbeef> Luckily Pmunch used a stream so aslong as you can get the data in a stream you can use it
07:44:33PMunch@4zv4l, well when I wrote that I used Wireshark to take the captures, and then Nim to parse them
07:46:23FromDiscord<4zv4l> In reply to @Elegantbeef "Luckily Pmunch used a": sounds good↵I'm gonna take a look at that lib, looks really cool !
07:47:47FromDiscord<4zv4l> In reply to @PMunch "<@329196212282458112>, well when I": yeah I could use the wireshark cli to get packets and parse them with your lib I guess
07:52:19*jjido joined #nim
08:33:13FromDiscord<rakgew> matrix cli or gui client?
08:33:24FromDiscord<Elegantbeef> Gui
08:34:34FromDiscord<rakgew> nice. would you already know which gui toolkit would you use?
08:35:40FromDiscord<Elegantbeef> No clue really, aside from certainly not QT 😄
08:36:15FromDiscord<rakgew> heheh, fair enough. \:-)
09:14:33*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
09:25:33*PMunch_ joined #nim
09:28:07*PMunch quit (Ping timeout: 252 seconds)
09:39:49FromDiscord<ShalokShalom> In reply to @Elegantbeef "image.png": Can you tell me, how representative these numbers are on time?
09:39:56FromDiscord<ShalokShalom> Like, is this quite average?
09:42:41FromDiscord<ShalokShalom> If that is true, then is Nim spectacularly good at building a community.
09:42:52FromDiscord<ShalokShalom> Or fsharp is amazingly bad. Probably both
09:43:20FromDiscord<ShalokShalom> fsharp has 7.5k daily downloads. And a significantly less engaging community.
09:45:53FromDiscord<ShalokShalom> Ah, thats just the numbers of the people visiting the websites. Can you tell me, if they represent the actual downloads?
09:47:25*lucerne joined #nim
09:48:45FromDiscord<Rika> Could be
09:57:20FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#ix=4eFa
09:59:23*jmdaemon quit (Ping timeout: 246 seconds)
10:05:44*kenran joined #nim
10:07:34*kenran quit (Remote host closed the connection)
10:08:50FromDiscord<Rika> In reply to @ezquerra "I have a ref": Put them in the same type block
10:11:34*lucerne quit (Ping timeout: 252 seconds)
10:15:25*dnh joined #nim
11:14:15FromDiscord<auxym> In reply to @Elegantbeef "Canada actually has quite": we? I assumed you were from NZ or something, you're always on here at weird ass middle of night hours 😛
11:47:48FromDiscord<sOkam!> sent a long message, see http://ix.io/4eFr
11:53:20PMunch_Hmm, what's the best way to pass a string of binary data to a procedure which takes openarray[uint32]?
11:53:53*jjido joined #nim
11:54:16PMunch_sOkam, that highly depends on the UI library
11:54:26PMunch_But multithreading would be one way of solving it
11:54:57*PMunch_ is now known as PMunch
11:55:17PMunchBy the way, the string is guaranteed to be mod 4 length
11:55:53FromDiscord<sOkam!> In reply to @PMunch_ "sOkam, that highly depends": why so? what do you mean?
11:57:13*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:59:06PMunchSome UI frameworks have built in methods to deal with this kind of stuff
11:59:35PMunchSince you're just downloading stuff and not anything CPU-intensive then async might be enough
12:04:20FromDiscord<sOkam!> could `paralell` work for this?
12:06:59FromDiscord<sOkam!> also, where could I find a simple example of async?↵I'm trying to understand the docs, but there is no explanation. They are just listing functionality assuming the person knows what they are reading, and I'm not understanding 1% of the text 😔
12:09:05FromDiscord<sOkam!> Unless I'm missing some page somewhere that does explain, so far I haven't found it
12:09:29*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
12:09:53*dnh joined #nim
12:13:13FromDiscord<sOkam!> I'm trying to search for the syntax for launching something with async, and I cannot even find that 😔
12:15:21FromDiscord<auxym> In reply to @PMunch_ "Hmm, what's the best": the fast, unsafe, no-copies way I think is https://nim-lang.org/docs/system.html#toOpenArray%2Cptr.UncheckedArray%5BT%5D%2Cint%2Cint (also assuming endianness is already native)
12:18:13FromDiscord<auxym> you could also use flatty's `fromFlatty`, which will copy however
12:25:37*lucerne joined #nim
12:28:01FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4eFz
12:29:20FromDiscord<auxym> ugh, nim's threading/parallel stuff is such a mess atm. I think araq recommends against spawn atm?
12:29:26FromDiscord<sOkam!> Also, does someone know where the async keyword is in the manual?↵Searching for async gives 10mill answers, and none contain the async itself
12:29:40FromDiscord<sOkam!> Really lost in how to start using it
12:29:45FromDiscord<auxym> https://nim-lang.org/docs/asyncdispatch.html
12:29:50FromDiscord<Rika> In reply to @sOkam! "Also, does someone know": asyncdispatch?
12:29:58FromDiscord<sOkam!> what does dispatch mean?
12:30:30FromDiscord<Rika> Relegate to
12:31:19FromDiscord<auxym> https://en.wiktionary.org/wiki/dispatch
12:31:39FromDiscord<auxym> (transitive, computing) To pass on for further processing, especially via a dispatch table (often with to).
12:32:08FromDiscord<sOkam!> ty
12:34:55FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4eFB
12:40:39PMunch@auxym, ah that's it, thanks!
12:40:42*PMunch quit (Quit: Leaving)
13:00:11*derpydoo joined #nim
13:22:37FromDiscord<Require Support> might be a dumb question but is there a way to `await` an async proc for a specific amount of time, if future hasn't completed then skip/cancel ?
13:24:21FromDiscord<Phil> Isn't what you're looking for specifying a timeout in your request?
13:24:38FromDiscord<auxym> yes
13:24:54FromDiscord<Require Support> probably yeah
13:31:07FromDiscord<Phil> Then that's what I'd be looking into based on the lib for requests you're using ^^
13:31:22FromDiscord<Phil> That's the sort of stuff you typically have to specify before sending the request
13:34:05FromDiscord<Require Support> yep that might be a better way to do it, thanks
13:42:50*arkurious joined #nim
13:50:01FromDiscord<ezquerra> In reply to @Rika "Put them in the": Thank you @Rika. I didn’t know that. I’ll give it a try!
14:17:30FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eG8
14:17:35FromDiscord<Horizon [She/Her]> I'm interacting with JS code with the JS backend
14:18:01FromDiscord<Horizon [She/Her]> I need to produce this structure but i want to make it more idiomatic then how I'd probably have to write it otherwise
14:23:47FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGb
14:23:56FromDiscord<hotdog> As entrypoint is just a string there
14:24:01*lucerne quit (Ping timeout: 252 seconds)
14:25:43*kenran joined #nim
14:26:42*kenran quit (Remote host closed the connection)
14:27:26FromDiscord<Horizon [She/Her]> Ah alright
14:27:35FromDiscord<Horizon [She/Her]> So how would i convert a Nim proc to a string?
14:27:43FromDiscord<Horizon [She/Her]> Because... I don't want to write JS code lmao
14:27:51FromDiscord<Horizon [She/Her]> The entrypoint accepts raw JS code so
14:30:30FromDiscord<Horizon [She/Her]> I could just use the JS code there actually
14:30:42FromDiscord<Horizon [She/Her]> And define my proc somewhere else
14:31:47FromDiscord<Horizon [She/Her]> I wonder if there's a Nim library that takes typescript bindings and writes Nim glue for me
14:35:54FromDiscord<hotdog> In reply to @Event Horizon "I could just use": Yeah just insert your procs into the js, probably easiest
14:36:17FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGc
14:36:26FromDiscord<hotdog> In reply to @Event Horizon "I wonder if there's": There's a couple
14:36:31FromDiscord<Horizon [She/Her]> In reply to @hotdog "Something like this maybe:": What does ` do in the code?
14:36:34FromDiscord<hotdog> But mixed results
14:36:42FromDiscord<Horizon [She/Her]> Also, why `asm` and not `emit`?
14:37:08FromDiscord<hotdog> In reply to @Event Horizon "What does ` do": In the js it's a format string, in nim it will insert the mangled identifier name
14:37:20FromDiscord<Horizon [She/Her]> Aah okay
14:37:22FromDiscord<Horizon [She/Her]> Thanks!
14:37:42FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "Also, why `asm` and": And how about for this?
14:38:37FromDiscord<hotdog> In reply to @Event Horizon "And how about for": I don't think emit supports the ident inserting thing, don't remember
14:38:55FromDiscord<Horizon [She/Her]> Ah alright!
14:38:57FromDiscord<Horizon [She/Her]> Thanks!
14:39:26FromDiscord<hotdog> No prob
14:53:36FromDiscord<Horizon [She/Her]> Does echo use `console.log` in the JS backend?
14:55:30FromDiscord<hotdog> In reply to @Event Horizon "Does echo use `console.log`": Yeah
15:00:18FromDiscord<Horizon [She/Her]> Alright good to know
15:02:54FromDiscord<hotdog> What’s the library you’re integrating with @Horizon [She/Her]
15:02:59FromDiscord<hotdog> Just out of curiosity
15:04:58FromDiscord<Horizon [She/Her]> In reply to @hotdog "What’s the library you’re": Oh I'm trying to make a Revite plugin for the Revolt client
15:05:11FromDiscord<Horizon [She/Her]> Docs are here: https://developers.revolt.chat/plugin-api
15:05:39FromDiscord<Horizon [She/Her]> Also how would i call a method from JS? Do i just do it like i would in Nim? (Since the methods are on the JsObject)
15:10:52FromDiscord<hotdog> In reply to @Event Horizon "Also how would i": You mean for that “state” object?
15:10:57FromDiscord<Horizon [She/Her]> Yup
15:11:12FromDiscord<Horizon [She/Her]> Actually no
15:11:17FromDiscord<Horizon [She/Her]> The `client` object
15:11:54FromDiscord<Horizon [She/Her]> In JS it's this code to get a channel `client.channels.get("channel id")`
15:18:39FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGE
15:19:48FromDiscord<Horizon [She/Her]> Ah alright, thanks!
15:20:11FromDiscord<Horizon [She/Her]> Also the name mangling insertion doesn't work
15:20:31FromDiscord<Horizon [She/Her]> The outputted code
15:20:32FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eGG
15:21:01FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eGH
15:29:37FromDiscord<hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGJ
15:36:32FromDiscord<Horizon [She/Her]> Ah alright!
15:37:02FromDiscord<Horizon [She/Her]> I mean, i already `exportc`d `entrypoint` so maybe not necessary?
15:37:29FromDiscord<Horizon [She/Her]> Seemed to of worked, thanks!
15:55:40FromDiscord<sOkam!> is there an existing way in nim to make a step in the sequence/proc to wait for X time, before moving to the next line?↵something like `wait(10)` or `sleep(10)`, or similar
16:01:32FromDiscord<elizabethgary> https://t.me/+PEc8FSRwFiFiYzc0
16:17:51*derpydoo quit (Ping timeout: 268 seconds)
16:21:14NimEventerNew thread by miran: This Month with Nim: October 2022, see https://forum.nim-lang.org/t/9567
16:24:45*FromDiscord quit (Remote host closed the connection)
16:24:58*FromDiscord joined #nim
16:25:15FromDiscord<hotdog> In reply to @sOkam! "is there an existing": https://nim-lang.org/docs/os.html#sleep%2Cint
16:34:17*wallabra quit (Ping timeout: 276 seconds)
16:37:06*lucerne joined #nim
16:41:59*[m]alice is now known as alice
16:43:53*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
16:46:11*Lord_Nightmare joined #nim
16:47:12FromDiscord<auxym> <@&371760044473319454> more t.me spam above
17:20:08FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=4eHm
17:25:46*xaltsc joined #nim
17:27:22*derpydoo joined #nim
17:37:54*derpydoo quit (Ping timeout: 255 seconds)
17:39:33*derpydoo joined #nim
17:43:14FromDiscord<Horizon [She/Her]> What are some up-to-date Typescript binding modules?
17:43:50*_________ quit (Quit: leaving)
17:44:00FromDiscord<Horizon [She/Her]> (For Nim, obviously, so Typescript type definitions can be ported to Nim)
17:45:40*_________ joined #nim
17:49:26FromDiscord<Bung> binding modules ? no ts backend even
18:10:10FromDiscord<Horizon [She/Her]> In reply to @Bung "binding modules ? no": Yeah
18:10:14FromDiscord<Horizon [She/Her]> There's a JS backend
18:10:32FromDiscord<Horizon [She/Her]> In Nim, to use JS modules, you need to write the functions manually with `importc`
18:10:46FromDiscord<Horizon [She/Her]> I wanna be able to do it without manually writing bindings
18:15:01FromDiscord<Bung> that's far way from current stage
18:15:45FromDiscord<jmgomez> I have a pet project that Im going to release soon that allows you to export nim types to ts definitions so you can use them in js/ts as a library. ↵But dont know anything about parsing definitions files to nim, I thought about though it and wondered why there isnt anything yet
18:16:02FromDiscord<jmgomez> It shouldnt be too difficult to do and it will make the ecosystem way better
18:16:43FromDiscord<jmgomez> (edit) "I have a pet project that Im going to release soon that allows you to export nim types to ts definitions so you can use them in js/ts as a library. ↵But dont know anything about parsing definitions files to nim, I thought about ... though" added "it"
18:17:23FromDiscord<jmgomez> We are using those types in a SPA and also in a React Native app
18:21:37FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=4eHA
18:24:23FromDiscord<Horizon [She/Her]> Fair
18:31:00*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:34:36FromDiscord<guttural666> these are not equivalent correct? https://media.discordapp.net/attachments/371759389889003532/1037072177561862194/unknown.png
18:35:56FromDiscord<guttural666> or braces were missing from the bottom version?
18:36:40FromDiscord<guttural666> parenthesis
18:47:50*dnh joined #nim
18:48:45FromDiscord<auxym> IIRC unary operators have precedence so it probably interprets (not idx) first, as a bitwise not
18:48:46FromDiscord<auxym> https://nim-lang.org/docs/system.html#not%2Cint
18:58:15FromDiscord<guttural666> yeah, that makes sense, god I was looking for the bug for so long haha
18:58:44FromDiscord<guttural666> having to use parentheses makes me like the upper version more 😛
19:04:09*wallabra joined #nim
19:06:25*jjido joined #nim
19:11:49FromDiscord<guttural666> this requires the string passed to not be an r-value right? the passed value has to exist outside the proc, am I reading that right? https://media.discordapp.net/attachments/371759389889003532/1037081547028844564/unknown.png
19:13:24FromDiscord<Horizon [She/Her]> Do the stdlib modules for making requests work in the JS backend, on the web?
19:44:40FromDiscord<guttural666> help, how do I initialize this bad boy? this seems right? https://media.discordapp.net/attachments/371759389889003532/1037089816602480702/unknown.png
19:51:54FromDiscord<guttural666> ah, without the angled brackets, was confused by https://nim-lang.org/docs/sets.html
19:59:19*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
19:59:27FromDiscord<Horizon [She/Her]> Rip Nimlangserver doesn't work on JS
20:10:52FromDiscord<Elegantbeef> Yea bitsets use curly brackets, other sets use arrays cause they're not firstclass in the language↵(@guttural666)
20:13:38*dnh quit (Ping timeout: 246 seconds)
20:19:14FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/9040 I haven't seen macro use generic param, is it designed ?
20:22:36*derpydoo quit (Ping timeout: 255 seconds)
20:27:26FromDiscord<ezquerra> In reply to @Rika "Put them in the": It does work well. Thanks again @Rika!
20:36:02FromDiscord<Elegantbeef> Macros can have generic parameters in certain cases, but they cannot be generic 😄
20:36:13FromDiscord<Elegantbeef> It's a bit of a confusing statement
20:40:03FromDiscord<Bung> I get confusing error message `t9040.nim(5, 13) Error: 'export' is only allowed at top level` instead the error reported in issue
20:40:03FromDiscord<Bung> dunno what to do now, maybe hunt other issue.
20:40:04FromDiscord<Elegantbeef> Are you sure?
20:40:04FromDiscord<Elegantbeef> I got the expected type message
20:43:53*wallabra quit (Ping timeout: 276 seconds)
20:44:04FromDiscord<guttural666> In reply to @Elegantbeef "Yea bitsets use curly": tbh, the differing use of curlies and angled and normal brackets is pretty confusing for a beginner
20:44:33*derpydoo joined #nim
20:45:51FromDiscord<guttural666> is it a good idea to default to func rather than proc in terms of performance and communicating intent? and then change it to proc if required?
20:46:06FromDiscord<Bung> I change when defined() to block\: maybe that's the cause
20:46:07FromDiscord<Elegantbeef> Yep that's the issue
20:46:07FromDiscord<Elegantbeef> Weird error message
20:46:07FromDiscord<Elegantbeef> Oh the export marker is on the macro
20:46:26FromDiscord<Elegantbeef> It doesnt really change peformance
20:46:40FromDiscord<Elegantbeef> It's more about conveying intent and mutabillity
20:47:05FromDiscord<guttural666> guess I have to read up on what would be considered a side-effect
20:47:15FromDiscord<Elegantbeef> Mutating global state
20:47:29FromDiscord<guttural666> yeah, but not sure how echo does that yknow
20:47:38FromDiscord<Elegantbeef> It writes to stdout
20:48:05FromDiscord<guttural666> and that would be considered global state
20:48:23FromDiscord<Elegantbeef> Correct
20:49:15FromDiscord<Elegantbeef> Pure functions should only return a new value or mutate parameters marked `var`
20:49:28FromDiscord<guttural666> I get it
20:49:43FromDiscord<Elegantbeef> Though without strict funcs the above isnt true, one can use a ref/pointer to mutate since Nim didnt track that mutabillity in funcs
20:50:04FromDiscord<guttural666> not like Rust i suppose?
20:50:18FromDiscord<Elegantbeef> What?
20:50:44FromDiscord<Bung> oh that's reasonable for the error
20:50:46FromDiscord<Elegantbeef> Nim with strict funcs and Rust are relatively similar
20:50:46FromDiscord<guttural666> Rust will track mutability in functions if pointers are passed to them?
20:50:58FromDiscord<guttural666> maybe another brain fart by me
20:51:05FromDiscord<guttural666> okay
20:51:27FromDiscord<Elegantbeef> You cannot mutate a reference's fields with strict funcs on in Nim
20:51:35FromDiscord<Elegantbeef> Assuming you dont do `var MyRef`
20:52:41FromDiscord<guttural666> okay, so mutating a dir: string, would be the equiv. of mutating a const string& dir and that would not be allowed
20:53:02*oddish quit (Quit: nyaa~)
20:53:07FromDiscord<Elegantbeef> That's not allowed even without strict funcs
20:53:14FromDiscord<guttural666> yeah yeah
20:53:15FromDiscord<Elegantbeef> sequencs and strings have value semantics in Nim
20:53:27FromDiscord<guttural666> yessssss
20:53:46FromDiscord<Elegantbeef> Guttural regrets talking to me
20:53:54FromDiscord<guttural666> this is all very interesting and I'm learning a lot, so thanks for explaining
20:54:40*oddish joined #nim
20:55:47*wallabra joined #nim
20:56:27FromDiscord<guttural666> if I learn enough I may be able to remodel the Nim manual page to be more like cppref, so that individual pages can be crawled and indexed, the way it is now its kind of a pain in the ass to search the manual, I mean it's all there, but really shitty to just enable hammering "nim set" into your search bar and finding what you are looking for as a first result etc.
20:57:01FromDiscord<Elegantbeef> Well Nims manual is written in RST and generated by the compiler so yea
20:57:56FromDiscord<guttural666> what is RST
21:04:17FromDiscord<Generic> Restructured text
21:04:38FromDiscord<guttural666> btw I am using Nim rn to write a tool to sort, filter, rename etc. my highly illeagally downloaded pron and tv series files and dirs, dunno if Andi would approve of this, but hey hahahaha, at least I'm taking a real world example that highly motivates me and learning something, so that's a huge win in my book
21:06:51FromDiscord<Elegantbeef> EH the red teams that use Nim and make anti viruses flag all Nim binaries is likely more concerning
21:11:17FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/18103 any idea?
21:14:37FromDiscord<Horizon [She/Her]> Could i somehow pass a template to a proc?
21:14:53FromDiscord<Horizon [She/Her]> So i could paste it into my code?
21:15:31FromDiscord<Horizon [She/Her]> I can't use a function for this which is annoying, since on reloading the app, the plugin system gets reloaded
21:15:53FromDiscord<Horizon [She/Her]> I could maybe use a macro to 'paste' code?
21:19:13FromDiscord<Horizon [She/Her]> Oh the Nim JS backend is broken from Nim 1.6.8+
21:19:23FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eIj
21:19:39FromDiscord<Elegantbeef> Could just use a template
21:21:52FromDiscord<Horizon [She/Her]> A template in a template?
21:26:14FromDiscord<Elegantbeef> Why not
21:43:40FromDiscord<tangonov> Why does `echo 69.0 / 1000` => `0.06900000000000001` and how do I make it stop:?
21:43:48FromDiscord<tangonov> (edit) "stop:?" => "stop?"
21:48:15FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/18103 it seems the closure assuming always called in same env ?
21:50:38FromDiscord<hotdog> In reply to @Event Horizon "Oh the Nim JS": JS backend works for me on both 1.6.8 and devel on one of my projects, I don't think it's broken
21:59:51FromDiscord<amadan> Had the same redefinition error for something, can't remember what I did to fix it
22:04:07FromDiscord<Elegantbeef> What do you expect?↵(@tangonov)
22:05:16FromDiscord<Arathanis> In reply to @tangonov "Why does `echo 69.0": Cause floating point.
22:06:31FromDiscord<Arathanis> The way computers represent fractional numbers like this results values like this. The same way we can't completely represent 1/3 in decimal and have to resort to .333333... computers have similar limitations but since they use binary the numbers they can't correctly represent are different.
22:06:55FromDiscord<Arathanis> You found one of them!
22:07:40FromDiscord<Arathanis> for another one try: `0.1 + 0.2`
22:08:47*mal`` quit (Quit: Leaving)
22:09:50FromDiscord<Elegantbeef> float64 is going to ruin your day↵(@Arathanis)
22:10:39FromDiscord<Arathanis> In reply to @Elegantbeef "float64 is going to": maybe
22:10:48FromDiscord<Arathanis> but nothing else I said is incorrect.
22:18:28FromDiscord<Elegantbeef> Yea i just wanted to be clear that `.1 + .2` isnt magic for why it's `.3` 😄
22:19:30FromDiscord<Horizon [She/Her]> In reply to @hotdog "JS backend works for": Hm
22:19:52FromDiscord<Arathanis> In reply to @Elegantbeef "Yea i just wanted": true haha
22:20:23FromDiscord<Arathanis> usually there is a library that sacrifices performance for fixed point precision like Python's Decimal. Does Nim have one? Is it built in or something to install?
22:20:40*mal`` joined #nim
22:21:14FromDiscord<Elegantbeef> There are likely arbitrary number libraries, i dont touch that stuff so no clue though
22:27:27FromDiscord<Generic> if you really need precise fractions use rationals from the standard library
22:43:07*lucerne quit (Read error: Connection reset by peer)
22:58:55*wallabra_ joined #nim
22:59:55*wallabra quit (Ping timeout: 252 seconds)
23:00:55*wallabra_ is now known as wallabra
23:01:44*tk quit (Quit: Well, this is unexpected.)
23:03:36*tk joined #nim
23:10:39*jmdaemon joined #nim
23:23:50*jjido joined #nim
23:58:36*derpydoo quit (Ping timeout: 255 seconds)