00:00:36 | FromDiscord | <huantian> <@&371760044473319454> |
00:03:42 | FromDiscord | <Prestige> why don't we just filter out all t.me links? |
00:04:01 | FromDiscord | <huantian> yeahhhhhhhhh we really should |
00:04:09 | FromDiscord | <Elegantbeef> Cause no one has setup a matrix moderator bot it seems |
00:04:28 | FromDiscord | <huantian> pls mod fix |
00:13:40 | * | wallabra quit (Ping timeout: 248 seconds) |
00:15:15 | * | wallabra joined #nim |
00:19:42 | FromDiscord | <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:55 | FromDiscord | <Elegantbeef> Just ban all matrix users is easier, they're just asshats, the lot of them |
00:36:27 | FromDiscord | <huantian> Beef you never finished your sentence |
00:36:38 | FromDiscord | <Elegantbeef> I was correcting myself |
00:36:43 | FromDiscord | <Elegantbeef> But i guess i forgot an asterix |
00:36:46 | FromDiscord | <Elegantbeef> Astrix |
00:36:52 | FromDiscord | <Elegantbeef> Astericks |
00:37:34 | FromDiscord | <Rika> Asterisk |
00:38:18 | FromDiscord | <Elegantbeef> Hey the last two were jokes |
00:42:55 | FromDiscord | <Rika> Hard to tell |
00:43:01 | FromDiscord | <Rika> Given it’s you |
00:54:54 | FromDiscord | <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:10 | FromDiscord | <Phil> As far as I know its still being discussed in the mod channel occasionally |
00:56:32 | FromDiscord | <auxym> :S |
01:50:36 | FromDiscord | <Bung> `pure/times.nim(2136, 32) Hint: 'parse' cannot raise 'Defect'` is the effect system works well? |
02:04:51 | FromDiscord | <ChocolettePalette> I can fully agree |
02:48:03 | FromDiscord | <Elegantbeef> @exelotl\: are you using tileengine for your games native port? |
02:48:42 | FromDiscord | <exelotl> not confirmed yet but it seems like a promising option |
02:48:47 | * | arkurious quit (Quit: Leaving) |
02:49:12 | FromDiscord | <exelotl> I won't be starting on the port until like april next year or so |
03:52:47 | FromDiscord | <Elegantbeef> @pietroppeter\: damn the analytics are quite nice, some fun stuff to look at here |
03:54:06 | FromDiscord | <Elegantbeef> A very interesting thing is that finished projects written in Nim generate quite a bit of traffic to Nim's website |
03:55:06 | FromDiscord | <Elegantbeef> Nitter, Nimdow, raylib's binding list, godot-nim, all get some amount of interest in Nim |
03:57:40 | FromDiscord | <!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4eEx |
03:58:10 | FromDiscord | <Rika> ? |
03:58:16 | FromDiscord | <Elegantbeef> d |
03:59:22 | FromDiscord | <Elegantbeef> There's a fair bit of interest from malware/red team repos here |
03:59:25 | FromDiscord | <!&luke> (edit) "https://play.nim-lang.org/#ix=4eEx" => "https://play.nim-lang.org/#ix=4eEy" |
04:00:02 | FromDiscord | <Elegantbeef> I'd personally say just use c2nim on tuibox |
04:00:05 | FromDiscord | <Elegantbeef> It's 600 loc |
04:00:16 | FromDiscord | <!&luke> i tried that |
04:00:21 | FromDiscord | <!&luke> didnt work |
04:03:15 | FromDiscord | <Elegantbeef> Though i'd personally just use illwill, though i guess that is more complex |
04:07:49 | FromDiscord | <albassort> well |
04:07:58 | FromDiscord | <albassort> i tried for a while but I cant get httpclient to work with tor |
04:07:59 | FromDiscord | <albassort> hmmm |
04:08:17 | FromDiscord | <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:11 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1036856154497765397/unknown.png |
04:16:15 | FromDiscord | <albassort> rate limit speedrun |
04:16:26 | FromDiscord | <albassort> threading+async |
04:18:31 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1036856739657699368/unknown.png |
04:18:35 | FromDiscord | <albassort> sad |
04:25:18 | FromDiscord | <!&luke> In reply to @Elegantbeef "Though i'd personally just": yea ill just use illwill |
04:39:02 | FromDiscord | <pietroppeter> In reply to @Elegantbeef "<@588390287810887693>\: damn the analytics": Haha nice to hear! |
04:40:04 | FromDiscord | <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:45 | FromDiscord | <Elegantbeef> A bit sad that we cannot see the google search terms 😛 |
04:43:29 | FromDiscord | <Elegantbeef> The impressive thing is |
04:43:29 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1036863024667037707/image.png |
04:43:53 | FromDiscord | <Elegantbeef> Ostensibly there arent 2000 Nim programmers going to that page to install Nim in a month |
04:46:16 | madprops | is there a country where nim has more presence? |
04:47:02 | FromDiscord | <Elegantbeef> USA -\> Germany -\> Japan are the top visits |
04:48:13 | FromDiscord | <Elegantbeef> Canada actually has quite alot given that we only have 40mil |
04:49:53 | FromDiscord | <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:46 | FromDiscord | <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:37 | FromDiscord | <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:26 | FromDiscord | <Pietro Peterlongo> Huh seeing this only on element/matrix and not on discord. Guess the bridge is having issues |
05:25:56 | FromDiscord | <Elegantbeef> It does that sometimes 🙂 |
05:28:01 | FromDiscord | <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:40 | FromDiscord | <Elegantbeef> Or any matrix client 😛 |
05:29:34 | FromDiscord | <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:49 | FromDiscord | <Elegantbeef> They're all the same |
05:29:59 | FromDiscord | <Elegantbeef> Type in your homeserver name/pass and login |
05:30:22 | FromDiscord | <Elegantbeef> If you do like discord cinny is pretty discordian |
05:39:51 | FromDiscord | <albassort> .-. |
05:40:12 | FromDiscord | <albassort> does anyone have a reason why httpclient would just be unable to connect through my httptunnel |
05:40:16 | FromDiscord | <albassort> my browser does fine |
05:40:28 | FromDiscord | <albassort> is it ssl conflicting with tor? |
05:43:04 | FromDiscord | <Rika> No |
05:49:50 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
05:58:38 | FromDiscord | <albassort> i should probably start saving the pages lol |
06:24:46 | NimEventer | New thread by sls1005: Looping Assertions, see https://forum.nim-lang.org/t/9566 |
06:56:34 | * | neceve_ is now known as neceve |
07:00:32 | FromDiscord | <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:15 | FromDiscord | <Elegantbeef> Well it's most developed as it's the first party implementation of the forprofit group that established the matrix protocol |
07:01:23 | FromDiscord | <Elegantbeef> it's the most\ |
07:02:45 | FromDiscord | <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:18 | NimEventer | New 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:58 | FromDiscord | <ShalokShalom> In reply to @Elegantbeef "I do eventually want": What client do you use now? |
07:24:20 | * | PMunch joined #nim |
07:29:09 | FromDiscord | <Elegantbeef> Element |
07:35:19 | FromDiscord | <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:30 | FromDiscord | <Elegantbeef> Likely will have to wrap pcap |
07:41:01 | FromDiscord | <4zv4l> hmmm alright, thanks |
07:41:12 | PMunch | You could use this https://github.com/PMunch/nim-pcap to parse a pcap file captured by an external progra |
07:41:23 | PMunch | (That program could of course be launched from Nim) |
07:41:52 | PMunch | Or you could just use Futhark to import pcap |
07:42:23 | FromDiscord | <4zv4l> like I use pcap.h to get packets and that lib to parse them ? |
07:43:13 | FromDiscord | <Elegantbeef> Luckily Pmunch used a stream so aslong as you can get the data in a stream you can use it |
07:44:33 | PMunch | @4zv4l, well when I wrote that I used Wireshark to take the captures, and then Nim to parse them |
07:46:23 | FromDiscord | <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:47 | FromDiscord | <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:13 | FromDiscord | <rakgew> matrix cli or gui client? |
08:33:24 | FromDiscord | <Elegantbeef> Gui |
08:34:34 | FromDiscord | <rakgew> nice. would you already know which gui toolkit would you use? |
08:35:40 | FromDiscord | <Elegantbeef> No clue really, aside from certainly not QT 😄 |
08:36:15 | FromDiscord | <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:49 | FromDiscord | <ShalokShalom> In reply to @Elegantbeef "image.png": Can you tell me, how representative these numbers are on time? |
09:39:56 | FromDiscord | <ShalokShalom> Like, is this quite average? |
09:42:41 | FromDiscord | <ShalokShalom> If that is true, then is Nim spectacularly good at building a community. |
09:42:52 | FromDiscord | <ShalokShalom> Or fsharp is amazingly bad. Probably both |
09:43:20 | FromDiscord | <ShalokShalom> fsharp has 7.5k daily downloads. And a significantly less engaging community. |
09:45:53 | FromDiscord | <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:45 | FromDiscord | <Rika> Could be |
09:57:20 | FromDiscord | <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:50 | FromDiscord | <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:15 | FromDiscord | <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:48 | FromDiscord | <sOkam!> sent a long message, see http://ix.io/4eFr |
11:53:20 | PMunch_ | 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:16 | PMunch_ | sOkam, that highly depends on the UI library |
11:54:26 | PMunch_ | But multithreading would be one way of solving it |
11:54:57 | * | PMunch_ is now known as PMunch |
11:55:17 | PMunch | By the way, the string is guaranteed to be mod 4 length |
11:55:53 | FromDiscord | <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:06 | PMunch | Some UI frameworks have built in methods to deal with this kind of stuff |
11:59:35 | PMunch | Since you're just downloading stuff and not anything CPU-intensive then async might be enough |
12:04:20 | FromDiscord | <sOkam!> could `paralell` work for this? |
12:06:59 | FromDiscord | <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:05 | FromDiscord | <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:13 | FromDiscord | <sOkam!> I'm trying to search for the syntax for launching something with async, and I cannot even find that 😔 |
12:15:21 | FromDiscord | <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:13 | FromDiscord | <auxym> you could also use flatty's `fromFlatty`, which will copy however |
12:25:37 | * | lucerne joined #nim |
12:28:01 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4eFz |
12:29:20 | FromDiscord | <auxym> ugh, nim's threading/parallel stuff is such a mess atm. I think araq recommends against spawn atm? |
12:29:26 | FromDiscord | <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:40 | FromDiscord | <sOkam!> Really lost in how to start using it |
12:29:45 | FromDiscord | <auxym> https://nim-lang.org/docs/asyncdispatch.html |
12:29:50 | FromDiscord | <Rika> In reply to @sOkam! "Also, does someone know": asyncdispatch? |
12:29:58 | FromDiscord | <sOkam!> what does dispatch mean? |
12:30:30 | FromDiscord | <Rika> Relegate to |
12:31:19 | FromDiscord | <auxym> https://en.wiktionary.org/wiki/dispatch |
12:31:39 | FromDiscord | <auxym> (transitive, computing) To pass on for further processing, especially via a dispatch table (often with to). |
12:32:08 | FromDiscord | <sOkam!> ty |
12:34:55 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4eFB |
12:40:39 | PMunch | @auxym, ah that's it, thanks! |
12:40:42 | * | PMunch quit (Quit: Leaving) |
13:00:11 | * | derpydoo joined #nim |
13:22:37 | FromDiscord | <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:21 | FromDiscord | <Phil> Isn't what you're looking for specifying a timeout in your request? |
13:24:38 | FromDiscord | <auxym> yes |
13:24:54 | FromDiscord | <Require Support> probably yeah |
13:31:07 | FromDiscord | <Phil> Then that's what I'd be looking into based on the lib for requests you're using ^^ |
13:31:22 | FromDiscord | <Phil> That's the sort of stuff you typically have to specify before sending the request |
13:34:05 | FromDiscord | <Require Support> yep that might be a better way to do it, thanks |
13:42:50 | * | arkurious joined #nim |
13:50:01 | FromDiscord | <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:30 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eG8 |
14:17:35 | FromDiscord | <Horizon [She/Her]> I'm interacting with JS code with the JS backend |
14:18:01 | FromDiscord | <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:47 | FromDiscord | <hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGb |
14:23:56 | FromDiscord | <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:26 | FromDiscord | <Horizon [She/Her]> Ah alright |
14:27:35 | FromDiscord | <Horizon [She/Her]> So how would i convert a Nim proc to a string? |
14:27:43 | FromDiscord | <Horizon [She/Her]> Because... I don't want to write JS code lmao |
14:27:51 | FromDiscord | <Horizon [She/Her]> The entrypoint accepts raw JS code so |
14:30:30 | FromDiscord | <Horizon [She/Her]> I could just use the JS code there actually |
14:30:42 | FromDiscord | <Horizon [She/Her]> And define my proc somewhere else |
14:31:47 | FromDiscord | <Horizon [She/Her]> I wonder if there's a Nim library that takes typescript bindings and writes Nim glue for me |
14:35:54 | FromDiscord | <hotdog> In reply to @Event Horizon "I could just use": Yeah just insert your procs into the js, probably easiest |
14:36:17 | FromDiscord | <hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGc |
14:36:26 | FromDiscord | <hotdog> In reply to @Event Horizon "I wonder if there's": There's a couple |
14:36:31 | FromDiscord | <Horizon [She/Her]> In reply to @hotdog "Something like this maybe:": What does ` do in the code? |
14:36:34 | FromDiscord | <hotdog> But mixed results |
14:36:42 | FromDiscord | <Horizon [She/Her]> Also, why `asm` and not `emit`? |
14:37:08 | FromDiscord | <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:20 | FromDiscord | <Horizon [She/Her]> Aah okay |
14:37:22 | FromDiscord | <Horizon [She/Her]> Thanks! |
14:37:42 | FromDiscord | <Horizon [She/Her]> In reply to @Event Horizon "Also, why `asm` and": And how about for this? |
14:38:37 | FromDiscord | <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:55 | FromDiscord | <Horizon [She/Her]> Ah alright! |
14:38:57 | FromDiscord | <Horizon [She/Her]> Thanks! |
14:39:26 | FromDiscord | <hotdog> No prob |
14:53:36 | FromDiscord | <Horizon [She/Her]> Does echo use `console.log` in the JS backend? |
14:55:30 | FromDiscord | <hotdog> In reply to @Event Horizon "Does echo use `console.log`": Yeah |
15:00:18 | FromDiscord | <Horizon [She/Her]> Alright good to know |
15:02:54 | FromDiscord | <hotdog> What’s the library you’re integrating with @Horizon [She/Her] |
15:02:59 | FromDiscord | <hotdog> Just out of curiosity |
15:04:58 | FromDiscord | <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:11 | FromDiscord | <Horizon [She/Her]> Docs are here: https://developers.revolt.chat/plugin-api |
15:05:39 | FromDiscord | <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:52 | FromDiscord | <hotdog> In reply to @Event Horizon "Also how would i": You mean for that “state” object? |
15:10:57 | FromDiscord | <Horizon [She/Her]> Yup |
15:11:12 | FromDiscord | <Horizon [She/Her]> Actually no |
15:11:17 | FromDiscord | <Horizon [She/Her]> The `client` object |
15:11:54 | FromDiscord | <Horizon [She/Her]> In JS it's this code to get a channel `client.channels.get("channel id")` |
15:18:39 | FromDiscord | <hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGE |
15:19:48 | FromDiscord | <Horizon [She/Her]> Ah alright, thanks! |
15:20:11 | FromDiscord | <Horizon [She/Her]> Also the name mangling insertion doesn't work |
15:20:31 | FromDiscord | <Horizon [She/Her]> The outputted code |
15:20:32 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eGG |
15:21:01 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eGH |
15:29:37 | FromDiscord | <hotdog> sent a code paste, see https://play.nim-lang.org/#ix=4eGJ |
15:36:32 | FromDiscord | <Horizon [She/Her]> Ah alright! |
15:37:02 | FromDiscord | <Horizon [She/Her]> I mean, i already `exportc`d `entrypoint` so maybe not necessary? |
15:37:29 | FromDiscord | <Horizon [She/Her]> Seemed to of worked, thanks! |
15:55:40 | FromDiscord | <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:32 | FromDiscord | <elizabethgary> https://t.me/+PEc8FSRwFiFiYzc0 |
16:17:51 | * | derpydoo quit (Ping timeout: 268 seconds) |
16:21:14 | NimEventer | New 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:15 | FromDiscord | <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:12 | FromDiscord | <auxym> <@&371760044473319454> more t.me spam above |
17:20:08 | FromDiscord | <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:14 | FromDiscord | <Horizon [She/Her]> What are some up-to-date Typescript binding modules? |
17:43:50 | * | _________ quit (Quit: leaving) |
17:44:00 | FromDiscord | <Horizon [She/Her]> (For Nim, obviously, so Typescript type definitions can be ported to Nim) |
17:45:40 | * | _________ joined #nim |
17:49:26 | FromDiscord | <Bung> binding modules ? no ts backend even |
18:10:10 | FromDiscord | <Horizon [She/Her]> In reply to @Bung "binding modules ? no": Yeah |
18:10:14 | FromDiscord | <Horizon [She/Her]> There's a JS backend |
18:10:32 | FromDiscord | <Horizon [She/Her]> In Nim, to use JS modules, you need to write the functions manually with `importc` |
18:10:46 | FromDiscord | <Horizon [She/Her]> I wanna be able to do it without manually writing bindings |
18:15:01 | FromDiscord | <Bung> that's far way from current stage |
18:15:45 | FromDiscord | <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:02 | FromDiscord | <jmgomez> It shouldnt be too difficult to do and it will make the ecosystem way better |
18:16:43 | FromDiscord | <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:23 | FromDiscord | <jmgomez> We are using those types in a SPA and also in a React Native app |
18:21:37 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=4eHA |
18:24:23 | FromDiscord | <Horizon [She/Her]> Fair |
18:31:00 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:34:36 | FromDiscord | <guttural666> these are not equivalent correct? https://media.discordapp.net/attachments/371759389889003532/1037072177561862194/unknown.png |
18:35:56 | FromDiscord | <guttural666> or braces were missing from the bottom version? |
18:36:40 | FromDiscord | <guttural666> parenthesis |
18:47:50 | * | dnh joined #nim |
18:48:45 | FromDiscord | <auxym> IIRC unary operators have precedence so it probably interprets (not idx) first, as a bitwise not |
18:48:46 | FromDiscord | <auxym> https://nim-lang.org/docs/system.html#not%2Cint |
18:58:15 | FromDiscord | <guttural666> yeah, that makes sense, god I was looking for the bug for so long haha |
18:58:44 | FromDiscord | <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:49 | FromDiscord | <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:24 | FromDiscord | <Horizon [She/Her]> Do the stdlib modules for making requests work in the JS backend, on the web? |
19:44:40 | FromDiscord | <guttural666> help, how do I initialize this bad boy? this seems right? https://media.discordapp.net/attachments/371759389889003532/1037089816602480702/unknown.png |
19:51:54 | FromDiscord | <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:27 | FromDiscord | <Horizon [She/Her]> Rip Nimlangserver doesn't work on JS |
20:10:52 | FromDiscord | <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:14 | FromDiscord | <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:26 | FromDiscord | <ezquerra> In reply to @Rika "Put them in the": It does work well. Thanks again @Rika! |
20:36:02 | FromDiscord | <Elegantbeef> Macros can have generic parameters in certain cases, but they cannot be generic 😄 |
20:36:13 | FromDiscord | <Elegantbeef> It's a bit of a confusing statement |
20:40:03 | FromDiscord | <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:03 | FromDiscord | <Bung> dunno what to do now, maybe hunt other issue. |
20:40:04 | FromDiscord | <Elegantbeef> Are you sure? |
20:40:04 | FromDiscord | <Elegantbeef> I got the expected type message |
20:43:53 | * | wallabra quit (Ping timeout: 276 seconds) |
20:44:04 | FromDiscord | <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:51 | FromDiscord | <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:06 | FromDiscord | <Bung> I change when defined() to block\: maybe that's the cause |
20:46:07 | FromDiscord | <Elegantbeef> Yep that's the issue |
20:46:07 | FromDiscord | <Elegantbeef> Weird error message |
20:46:07 | FromDiscord | <Elegantbeef> Oh the export marker is on the macro |
20:46:26 | FromDiscord | <Elegantbeef> It doesnt really change peformance |
20:46:40 | FromDiscord | <Elegantbeef> It's more about conveying intent and mutabillity |
20:47:05 | FromDiscord | <guttural666> guess I have to read up on what would be considered a side-effect |
20:47:15 | FromDiscord | <Elegantbeef> Mutating global state |
20:47:29 | FromDiscord | <guttural666> yeah, but not sure how echo does that yknow |
20:47:38 | FromDiscord | <Elegantbeef> It writes to stdout |
20:48:05 | FromDiscord | <guttural666> and that would be considered global state |
20:48:23 | FromDiscord | <Elegantbeef> Correct |
20:49:15 | FromDiscord | <Elegantbeef> Pure functions should only return a new value or mutate parameters marked `var` |
20:49:28 | FromDiscord | <guttural666> I get it |
20:49:43 | FromDiscord | <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:04 | FromDiscord | <guttural666> not like Rust i suppose? |
20:50:18 | FromDiscord | <Elegantbeef> What? |
20:50:44 | FromDiscord | <Bung> oh that's reasonable for the error |
20:50:46 | FromDiscord | <Elegantbeef> Nim with strict funcs and Rust are relatively similar |
20:50:46 | FromDiscord | <guttural666> Rust will track mutability in functions if pointers are passed to them? |
20:50:58 | FromDiscord | <guttural666> maybe another brain fart by me |
20:51:05 | FromDiscord | <guttural666> okay |
20:51:27 | FromDiscord | <Elegantbeef> You cannot mutate a reference's fields with strict funcs on in Nim |
20:51:35 | FromDiscord | <Elegantbeef> Assuming you dont do `var MyRef` |
20:52:41 | FromDiscord | <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:07 | FromDiscord | <Elegantbeef> That's not allowed even without strict funcs |
20:53:14 | FromDiscord | <guttural666> yeah yeah |
20:53:15 | FromDiscord | <Elegantbeef> sequencs and strings have value semantics in Nim |
20:53:27 | FromDiscord | <guttural666> yessssss |
20:53:46 | FromDiscord | <Elegantbeef> Guttural regrets talking to me |
20:53:54 | FromDiscord | <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:27 | FromDiscord | <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:01 | FromDiscord | <Elegantbeef> Well Nims manual is written in RST and generated by the compiler so yea |
20:57:56 | FromDiscord | <guttural666> what is RST |
21:04:17 | FromDiscord | <Generic> Restructured text |
21:04:38 | FromDiscord | <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:51 | FromDiscord | <Elegantbeef> EH the red teams that use Nim and make anti viruses flag all Nim binaries is likely more concerning |
21:11:17 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/issues/18103 any idea? |
21:14:37 | FromDiscord | <Horizon [She/Her]> Could i somehow pass a template to a proc? |
21:14:53 | FromDiscord | <Horizon [She/Her]> So i could paste it into my code? |
21:15:31 | FromDiscord | <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:53 | FromDiscord | <Horizon [She/Her]> I could maybe use a macro to 'paste' code? |
21:19:13 | FromDiscord | <Horizon [She/Her]> Oh the Nim JS backend is broken from Nim 1.6.8+ |
21:19:23 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4eIj |
21:19:39 | FromDiscord | <Elegantbeef> Could just use a template |
21:21:52 | FromDiscord | <Horizon [She/Her]> A template in a template? |
21:26:14 | FromDiscord | <Elegantbeef> Why not |
21:43:40 | FromDiscord | <tangonov> Why does `echo 69.0 / 1000` => `0.06900000000000001` and how do I make it stop:? |
21:43:48 | FromDiscord | <tangonov> (edit) "stop:?" => "stop?" |
21:48:15 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/issues/18103 it seems the closure assuming always called in same env ? |
21:50:38 | FromDiscord | <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:51 | FromDiscord | <amadan> Had the same redefinition error for something, can't remember what I did to fix it |
22:04:07 | FromDiscord | <Elegantbeef> What do you expect?↵(@tangonov) |
22:05:16 | FromDiscord | <Arathanis> In reply to @tangonov "Why does `echo 69.0": Cause floating point. |
22:06:31 | FromDiscord | <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:55 | FromDiscord | <Arathanis> You found one of them! |
22:07:40 | FromDiscord | <Arathanis> for another one try: `0.1 + 0.2` |
22:08:47 | * | mal`` quit (Quit: Leaving) |
22:09:50 | FromDiscord | <Elegantbeef> float64 is going to ruin your day↵(@Arathanis) |
22:10:39 | FromDiscord | <Arathanis> In reply to @Elegantbeef "float64 is going to": maybe |
22:10:48 | FromDiscord | <Arathanis> but nothing else I said is incorrect. |
22:18:28 | FromDiscord | <Elegantbeef> Yea i just wanted to be clear that `.1 + .2` isnt magic for why it's `.3` 😄 |
22:19:30 | FromDiscord | <Horizon [She/Her]> In reply to @hotdog "JS backend works for": Hm |
22:19:52 | FromDiscord | <Arathanis> In reply to @Elegantbeef "Yea i just wanted": true haha |
22:20:23 | FromDiscord | <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:14 | FromDiscord | <Elegantbeef> There are likely arbitrary number libraries, i dont touch that stuff so no clue though |
22:27:27 | FromDiscord | <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) |