00:58:55 | * | gst quit (Quit: Client closed) |
01:05:59 | * | adium quit (Ping timeout: 260 seconds) |
01:09:18 | FromDiscord | <ajusa> not sure if this is a silly question but is it possible to browse the nim 1.6 docs online? |
01:11:22 | * | adium joined #nim |
01:22:11 | FromDiscord | <dawidek.2137> sent a code paste, see https://play.nim-lang.org/#pasty=KbbXeScDLvZX |
01:29:04 | * | lucasta joined #nim |
01:33:30 | FromDiscord | <kots> In reply to @ajusa "not sure if this": https://nim-lang.org/1.6.20/lib.html |
01:40:33 | FromDiscord | <ajusa> In reply to @k0ts "https://nim-lang.org/1.6.20/lib.html": Thank you! |
02:32:42 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
02:33:04 | * | SchweinDeBurg joined #nim |
02:45:05 | FromDiscord | <dawidek.2137> is there a way to check if we are in global scope? |
03:20:14 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=qKFpNSSIzZGp |
03:25:04 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=eOCwWFCBPMaf |
03:26:44 | FromDiscord | <user2m> In reply to @polylokh_39446 "because param's a runtime": oh sweet! thanks! |
03:44:16 | * | lucasta quit (Quit: Leaving) |
04:08:04 | * | fallback quit (Read error: Connection reset by peer) |
04:10:45 | * | coldfeet joined #nim |
04:19:16 | * | def- quit (Quit: -) |
04:24:22 | * | fallback joined #nim |
04:28:39 | FromDiscord | <aryzen> so, I have a .nim that just handles linking, finding headers, etc, and I use it by importing it in my actual program; it gives a warning that it's not used even though it's not exporting anything; I get around that by basically exporting a useless function that returns true and discard that result in my main. Is there a more eloquent way to not get the warning? |
04:38:50 | * | def- joined #nim |
04:42:08 | * | def- quit (Client Quit) |
04:42:49 | * | def- joined #nim |
04:53:48 | * | fallback quit (Read error: Connection reset by peer) |
04:55:50 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/manual.html#pragmas-used-pragma |
05:02:48 | * | Lord_Nightmare quit (Ping timeout: 260 seconds) |
05:05:55 | * | Lord_Nightmare joined #nim |
05:31:27 | * | coldfeet quit (Remote host closed the connection) |
05:40:13 | FromDiscord | <Phil> Hmmm... What happens if you send a closure to another thread to get executed there? ↵Does that deep copy the state? Or is that just straight up not possible? |
05:41:19 | FromDiscord | <demotomohiro> In reply to @aryzen "so, I have a": It might be fixed in devel Nim: https://github.com/nim-lang/Nim/pull/23323 |
05:43:20 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "Hmmm... What happens if": Try it maybe? |
05:44:03 | FromDiscord | <Phil> Won't have a chance for another 10h |
05:44:22 | FromDiscord | <Robyn [She/Her]> Ah damn |
05:44:47 | FromDiscord | <Robyn [She/Her]> If I can be bothered, I might try it out later |
06:02:38 | * | fallback joined #nim |
06:18:58 | * | PMunch joined #nim |
06:32:06 | * | krux02_ quit (Remote host closed the connection) |
06:32:28 | * | fallback quit (Read error: Connection reset by peer) |
06:45:03 | * | fallback joined #nim |
06:50:13 | * | qui quit (Remote host closed the connection) |
06:52:23 | * | beholders_eye joined #nim |
06:58:40 | * | deadmarshal_ quit (Quit: IRCNow and Forever!) |
07:06:07 | * | beholders_eye quit (Quit: WeeChat 4.1.2) |
07:10:08 | * | rockcavera quit (Remote host closed the connection) |
07:13:16 | * | deadmarshal_ joined #nim |
07:50:30 | * | beholders_eye joined #nim |
07:56:18 | * | fallback quit (Read error: Connection reset by peer) |
07:59:57 | * | fallback joined #nim |
08:12:07 | * | def- quit (Quit: -) |
08:31:57 | * | def- joined #nim |
09:23:10 | FromDiscord | <aintea> There is a `map`, there is a `filter`, but is there a `foreach` ? Something like map but lets me returns nothing and have side effects |
09:24:23 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=XcYeiPFWdfbg |
09:26:20 | FromDiscord | <odexine> not in the std |
09:37:20 | FromDiscord | <aintea> At worst I can just make my own |
09:37:35 | FromDiscord | <aintea> And is there a way to tell the nim compiler how much threads to use ? |
09:39:20 | FromDiscord | <the_real_hypno> In reply to @aintea "At worst I can": zero_functional |
09:39:46 | FromDiscord | <the_real_hypno> https://github.com/zero-functional/zero-functional |
10:31:27 | * | def- quit (Quit: -) |
10:31:58 | * | def- joined #nim |
11:10:04 | * | beholders_eye quit (Ping timeout: 260 seconds) |
11:31:36 | * | gst joined #nim |
11:32:26 | * | def- quit (Quit: -) |
11:32:40 | * | def- joined #nim |
11:43:59 | * | ntat joined #nim |
11:45:08 | FromDiscord | <System64 ~ Flandre Scarlet> Do you know how I can define my own type conversions please? |
11:51:56 | FromDiscord | <exelotl> you can't define your own explicit type conversions unfortunately |
11:52:11 | FromDiscord | <exelotl> you have to settle for making functions like `toInt()` and such |
11:53:02 | FromDiscord | <aintea> Isn't it basically what nim does ? |
11:53:31 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=xlyfiJnyEmeQ |
11:54:02 | FromDiscord | <aintea> Make your own convert functions and call them like above |
11:54:53 | FromDiscord | <exelotl> no, `a.uint` / `uint(a)` aren't function calls (even though they look like them), they're type conversions |
11:56:27 | FromDiscord | <exelotl> if you have custom type `Foo` and you try to define a function `Foo()` in the hopes that you can use it for type conversion like above, you will run into problems (though I forget the details) |
11:58:14 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @exelotl "you have to settle": Oh, sad :/↵Might be a nice addition for Nim |
12:00:07 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @exelotl "you can't define your": Even when converting to a built in type? |
12:00:49 | FromDiscord | <System64 ~ Flandre Scarlet> Ah seems you can |
12:03:28 | FromDiscord | <aintea> In reply to @exelotl "if you have custom": no, but it works with something like this `a.toFoo` |
12:05:34 | FromDiscord | <exelotl> oh yeah you can do that of course |
12:06:46 | FromDiscord | <grumblygibson> They're are converters, but they make a function call. I'd love a compile time converter, but I get that the argument against converters is that suddenly it's not obvious what might be happening. |
12:06:55 | FromDiscord | <grumblygibson> (edit) "They're" => "There" |
12:07:39 | FromDiscord | <exelotl> yeah converters should be used sparingly. They're good for magic purposes like implementing Go-style interfaces x) |
12:10:09 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=JGUXdzApNfxS |
12:25:15 | FromDiscord | <xkonti> In reply to @exelotl "yeah converters should be": Tell me more about those go inspired interfaces! |
12:33:12 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=MqTNnmkhMALp |
12:33:33 | FromDiscord | <System64 ~ Flandre Scarlet> It highlights the first W in toFixed function |
12:40:45 | * | xet7 quit (Remote host closed the connection) |
12:41:50 | * | rockcavera joined #nim |
12:42:30 | * | xet7 joined #nim |
12:44:29 | FromDiscord | <exelotl> In reply to @xkonti "Tell me more about": there's been a handful of experiments and discussion on the forums over the years:↵https://forum.nim-lang.org/t/2422↵https://forum.nim-lang.org/t/4571↵https://forum.nim-lang.org/t/11373 |
12:46:39 | FromDiscord | <exelotl> I haven't actually used such a library myself though, not sure of any projects that do, but it's interesting for sure |
12:59:20 | FromDiscord | <xkonti> @exelotl I see. Thank you! |
13:00:17 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=scgkGFmVwHmH |
13:10:03 | * | def- quit (Quit: -) |
13:10:53 | * | def- joined #nim |
13:17:37 | * | coldfeet joined #nim |
13:31:38 | PMunch | @xkonti, see alse: Traitor |
13:36:39 | FromDiscord | <xkonti> Yup. Familiar with traitor 🙂 |
13:41:08 | * | beholders_eye joined #nim |
13:42:55 | FromDiscord | <Phil> Question, are there any known issues with deep copying an object before passing it to another thread? |
13:43:28 | FromDiscord | <Phil> And could somebody hand me the docs to Nims version of deepcopy? Mobile does not have a search bar |
13:46:01 | * | tiorock joined #nim |
13:46:01 | * | tiorock quit (Changing host) |
13:46:01 | * | tiorock joined #nim |
13:46:01 | * | rockcavera is now known as Guest7521 |
13:46:01 | * | Guest7521 quit (Killed (copper.libera.chat (Nickname regained by services))) |
13:46:01 | * | tiorock is now known as rockcavera |
13:47:15 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "Question, are there any": I wouldn't imagine there'd be an issue? |
13:48:36 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "And could somebody hand": https://nim-lang.org/docs/system.html#deepCopy%2CT%2CT |
13:51:30 | FromDiscord | <ringabout> You might try this out => https://github.com/nim-lang/Nim/issues/23460#issuecomment-2059246622 Though it seems to have some flaws, it might be improved to fit needs |
13:55:10 | FromDiscord | <Phil> In reply to @ringabout "You might try this": What's the rationale for it? Just faster deepcopy? |
13:55:42 | FromDiscord | <Phil> As in, how is current deepcopy insufficient that you need a new one |
13:55:59 | * | def- quit (Quit: -) |
13:56:25 | * | def- joined #nim |
13:56:42 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It might be a": That fixed the issue, thanks! |
13:57:59 | FromDiscord | <Phil> In reply to @chronos.vitaqua "https://nim-lang.org/docs/system.html#deepCopy%2CT%": 🙏 |
13:58:02 | FromDiscord | <Phil> Thanks! |
13:58:52 | FromDiscord | <ringabout> In reply to @isofruit "What's the rationale for": The old implementation uses a type field in the header of inherited objects while ORC doesn't need it. By switching to the new deep copy implementation, that field can be dropped for good. It saves space for inherited objects. |
13:59:22 | FromDiscord | <Phil> In reply to @ringabout "The old implementation uses": Why not just platform specific implementations like memcpy |
13:59:35 | FromDiscord | <Phil> Surely windows and Mac have equivalents |
14:00:44 | FromDiscord | <ringabout> What do you mean? |
14:01:53 | FromDiscord | <Phil> I just want to deep copy an object ...ah memcpy wouldn't do that and you can't assume that all things in an object are in the same memory block |
14:02:14 | FromDiscord | <ringabout> Yeah |
14:05:57 | FromDiscord | <Phil> In reply to @ringabout "You might try this": Hmm I am primarily concerned with correctness, performance isn't thaaaaaat important |
14:06:15 | FromDiscord | <Phil> I assume for now the current deepcopy is more correct? |
14:07:07 | FromDiscord | <ringabout> I think so. Though the new implementation will be incorporated into Nim codebase after the flaws are fixed |
14:07:30 | FromDiscord | <ringabout> I didn't figure it out last time |
14:07:53 | FromDiscord | <Phil (he/him)> In which case I'll be getting performance improvements for free with no effort, so all good for me 😄 |
14:16:05 | * | PMunch quit (Quit: Leaving) |
14:16:26 | * | lucasta joined #nim |
14:35:29 | * | beholders_eye quit (Ping timeout: 268 seconds) |
14:46:22 | * | xet7 quit (Ping timeout: 256 seconds) |
14:50:26 | * | krux02 joined #nim |
14:56:39 | * | beholders_eye joined #nim |
14:58:25 | * | xet7 joined #nim |
15:10:09 | * | beholders_eye quit (Ping timeout: 256 seconds) |
15:15:37 | * | lucas_ta joined #nim |
15:16:20 | * | lucas_ta quit (Remote host closed the connection) |
15:18:13 | * | lucasta quit (Ping timeout: 256 seconds) |
15:36:48 | * | xet7 quit (Ping timeout: 256 seconds) |
15:41:12 | * | xet7 joined #nim |
15:54:04 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It might be a": Oh so I can't accept all floats, quite weird↵Well I'll use overloading then |
16:03:46 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=dKyAITKJSCag |
16:06:20 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "If you don't add": Like, distinct int? |
16:14:07 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=xOcockePyYjU |
16:15:30 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Never mind. This code": so distinct T doesn't work? |
16:16:35 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=wNkauFRjuRZC |
16:19:12 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=kjPujeNMQwSF |
16:23:00 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=oMmStgxOnvJu |
16:24:09 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It works but you": So I still need to overload everything? |
16:24:44 | FromDiscord | <demotomohiro> In reply to @sys64 "So I still need": yes |
16:28:26 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "yes": Oh alright! |
16:29:12 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It works but you": And what is this typeof(result) for? |
16:31:17 | FromDiscord | <demotomohiro> In reply to @sys64 "And what is this": It is because type of `distinctBase(x)` is int and the result must be converted to `FixedPoint`. |
16:34:04 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It is because type": and does distinctBase and typeof adds overhead at runtime? |
16:35:40 | FromDiscord | <solitudesf> In reply to @sys64 "and does distinctBase and": no |
16:36:41 | FromDiscord | <demotomohiro> In reply to @sys64 "and does distinctBase and": no. distinctBase and typeof is compile time things. |
16:37:48 | NimEventer | New thread by lou15b: Puzzling compiler crash, see https://forum.nim-lang.org/t/11573 |
16:37:54 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=KwvKRAGpFRBl |
17:00:22 | FromDiscord | <albassort> does http connect not work? |
17:03:19 | FromDiscord | <itr_> i wish i didn't forget how nim's type definitions look every time i don't use the language for a short while |
17:03:24 | FromDiscord | <itr_> (edit) "i wish i didn't forget how nim's type definitions look every time i don't use the language for a short ... while" added "or longer" |
17:16:10 | FromDiscord | <saint.___.> Do you guys know if I can get nim to playback audio in an infinite loop, but I want the file to be able to be changed during the loop |
17:16:25 | FromDiscord | <saint.___.> So like midway through the loop you can change the file and it will get re-read and played on the next loop |
17:19:03 | FromDiscord | <ieltan> Like hot code reloading but for audio? |
17:19:13 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=vWlNxKZbUSki |
17:22:47 | FromDiscord | <saint.___.> In reply to @ieltan "Like hot code reloading": Yeah basically |
17:23:02 | FromDiscord | <saint.___.> Well a bit more than that, I want it to be a seamless audio loop |
17:24:23 | FromDiscord | <solitudesf> sent a code paste, see https://play.nim-lang.org/#pasty=VWDsqVagdbMP |
17:25:09 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @solitudesf "error message incomprehensible, but": So I can't overload the float converter? |
17:25:28 | FromDiscord | <solitudesf> тщ |
17:25:30 | FromDiscord | <solitudesf> (edit) "тщ" => "no" |
17:25:40 | FromDiscord | <System64 ~ Flandre Scarlet> Oof |
17:29:11 | FromDiscord | <Robyn [She/Her]> In reply to @saint.___. "Well a bit more": Shitty idea: Use a thread to constantly play audio :P |
17:29:41 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=tqeZYwjkVNxv |
17:29:42 | FromDiscord | <Robyn [She/Her]> Then have that thread check data on the main thread once the loop ends |
17:29:43 | FromDiscord | <ieltan> compiles for me |
17:30:02 | FromDiscord | <ieltan> just make it a template |
17:30:20 | FromDiscord | <ieltan> seems like it's the proper thing to do anyways |
17:32:41 | FromDiscord | <saint.___.> In reply to @chronos.vitaqua "Shitty idea: Use a": Ya that's what I want to do |
17:32:49 | FromDiscord | <saint.___.> Just don't want to have to write it manually |
17:33:08 | FromDiscord | <saint.___.> The gapless playback is the hard thing really I think |
17:34:01 | FromDiscord | <ieltan> In reply to @saint.___. "Well a bit more": im not sure because i've never made anything like this before but i think you'll need to make two programs one which is a long-running daemon and actually plays the music and another which lets you load the musics on demand and pass it to the daemon |
17:34:28 | FromDiscord | <ieltan> the daemon would be a streaming pipe |
17:34:30 | FromDiscord | <ieltan> ofc |
17:34:49 | FromDiscord | <ieltan> but im not sure how the entire thing work together i might as well be saying bullshit lol |
17:36:26 | FromDiscord | <System64 ~ Flandre Scarlet> Does the CPU natively supports int128? |
17:36:56 | FromDiscord | <ieltan> > I want the file to be able to be changed during the loop↵that means a daemon to me for sure though |
17:39:10 | FromDiscord | <Robyn [She/Her]> In reply to @saint.___. "The gapless playback is": Could start another thread that starts the audio again once there's 1 or 2 seconds left of the current track, and then close the previous thread on audio finish |
17:40:03 | FromDiscord | <Robyn [She/Her]> In reply to @sys64 "Does the CPU natively": The CPU? |
17:40:03 | FromDiscord | <Robyn [She/Her]> Which CPU? |
17:40:20 | FromDiscord | <ieltan> In reply to @sys64 "Does the CPU natively": depends |
17:41:21 | FromDiscord | <saint.___.> In reply to @chronos.vitaqua "Could start another thread": Ya but I have to sync up the handoff then to make sure it plays perfectly |
17:41:34 | FromDiscord | <saint.___.> I think I found a python library that sort of helps |
17:41:38 | FromDiscord | <ieltan> meh |
17:41:52 | FromDiscord | <saint.___.> It playsback audio with a callback function that you can use to provide it playback data |
17:41:54 | FromDiscord | <ieltan> i think threads will make this more complicated than necessary |
17:42:09 | FromDiscord | <Robyn [She/Her]> 🤷♀️ |
17:42:13 | FromDiscord | <Robyn [She/Her]> In reply to @saint.___. "It playsback audio with": Oh neat |
17:42:57 | FromDiscord | <saint.___.> In reply to @ieltan "im not sure because": Interesting! |
17:48:33 | FromDiscord | <ieltan> so yeah maybe it's possible to do it using threads too but i have no clue how to do it for when you will have to load a new file by yourself |
17:54:08 | * | gst quit (Quit: Client closed) |
18:01:52 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=VpYghKudQTNs |
18:09:02 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=LPuTTDYWZsLk |
18:12:21 | FromDiscord | <ieltan> @saint._. To clarify, actually by "two programs" I mean that when you run the app you check if no other instance is already running, if not the app can set itself up as a long running daemon. Else the instance simply hands off the data to the daemon and the new instance exits. |
18:13:42 | FromDiscord | <ieltan> So it's just one program but it can either be a daemon or just an argument handler |
18:20:14 | * | coldfeet quit (Remote host closed the connection) |
18:21:44 | FromDiscord | <aintea> Do you have good articles or videos to learn Nim macros ? Either I'm too stupid for the articles I find or they're just bad (I think it's a mix of both) |
18:22:57 | FromDiscord | <demotomohiro> In reply to @aintea "Do you have good": https://internet-of-tomohiro.pages.dev/nim/faq.en#macro-is-there-any-tutorial-or-documents-to-learn-about-macroqmark |
18:34:38 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=ZuYpOTQEefGF |
18:38:52 | FromDiscord | <leorize> floating point math is always slightly inconsistent |
18:39:17 | FromDiscord | <leorize> a better fixed point is to use an uint or something |
18:39:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @leorize "a better fixed point": int↵Not uint |
18:40:59 | FromDiscord | <leorize> though I don't know why you're using power of two |
18:42:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @leorize "though I don't know": to convert back |
18:44:57 | FromDiscord | <leorize> I'd have imagined decimal fixed point and not binary |
18:45:07 | FromDiscord | <leorize> that's usually the only reason to use fixed point |
18:46:07 | FromDiscord | <leorize> but if you want your floats to make sense, do as little math with them as possible |
18:46:37 | FromDiscord | <leorize> I guess that's overly broad, basically you gotta account for rounding errors |
18:47:10 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=gjyEveuUqjMN |
18:47:22 | FromDiscord | <leorize> you will lose some data simply via converting between formats due to floating point math |
18:47:56 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "0.3 * (2^8) =": and float has the same problem? |
18:48:20 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=zqBQcFSpzQTv |
18:48:49 | FromDiscord | <System64 ~ Flandre Scarlet> yes |
19:35:00 | * | ntat quit (Quit: Leaving) |
19:38:41 | * | hernan is now known as HER |
19:52:55 | * | xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
19:54:35 | * | xutaxkamay joined #nim |
20:14:47 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "0.3 * (2^8) =": But when I convert a 0.3 float to fixed and then to float, I should obtain 0.3,no? |
20:29:27 | FromDiscord | <Elegantbeef> No |
20:30:14 | FromDiscord | <Robyn [She/Her]> Hey Beef, do you happen to know a C library that is made for WebAssembly bytecode manipulation? |
20:30:31 | FromDiscord | <Elegantbeef> Floats are not magical they have limited data to work with so not all numbers are representable |
20:30:40 | FromDiscord | <Elegantbeef> what do you need with bytecode manipulation? |
20:44:45 | FromDiscord | <albassort> why doesn't asyncnet have the low level implementations of recv |
20:44:56 | FromDiscord | <albassort> i wanna be fast |
20:45:02 | FromDiscord | <albassort> (edit) "i wanna be fast ... " added ">:(" |
20:45:08 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/asyncdispatch.html#recvInto%2CAsyncFD%2Cpointer%2Cint |
20:45:10 | FromDiscord | <Elegantbeef> It does |
20:45:19 | FromDiscord | <Elegantbeef> 😄 |
20:45:30 | FromDiscord | <albassort> why is it called recvInto but the sync version called recv |
20:45:33 | FromDiscord | <albassort> NIM EXPLAIn |
20:45:43 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=TaxyMVUMYjsf |
20:45:45 | FromDiscord | <Elegantbeef> That was the wrong one |
20:45:46 | FromDiscord | <Elegantbeef> But yea |
20:46:04 | FromDiscord | <albassort> literally unusable |
20:46:42 | FromDiscord | <albassort> wait |
20:46:49 | FromDiscord | <albassort> why doesn't it have the timeout?!? |
20:46:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=hfPUbFobrzUN |
20:47:12 | FromDiscord | <albassort> oh wait |
20:47:25 | FromDiscord | <albassort> i forgot |
20:47:29 | FromDiscord | <Elegantbeef> No async has timeout, you commit! |
20:47:29 | FromDiscord | <polylokh_39446> no, my version terminates quickly. Your version doesn't. |
20:47:46 | FromDiscord | <albassort> In reply to @Elegantbeef "No async has timeout,": i am the timeout |
20:48:41 | FromDiscord | <Elegantbeef> Uh huh |
20:50:35 | FromDiscord | <Elegantbeef> Oh right poly you're running into where the epsilon is \>1 |
20:51:27 | FromDiscord | <polylokh_39446> yep, it's pretty low with float32 |
21:01:50 | FromDiscord | <albassort> is there anyway to do these 2 things in net: |
21:02:02 | FromDiscord | <albassort> 1. see how many messages are pending↵2. see the length of them, e.g peek |
21:07:19 | FromDiscord | <polylokh_39446> the underlying syscalls don't fit those requirements at all. |
21:08:06 | FromDiscord | <polylokh_39446> with direct use of a selector (select, poll), you can know how many sockets are ready for a read, but you have to read to know how much there is to read. |
21:09:26 | FromDiscord | <polylokh_39446> or rather, not even that: you have to read to know how much you've read |
21:09:56 | FromDiscord | <polylokh_39446> the kernel directly fills a user buffer and tells you how much it wrote. |
21:14:31 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "what do you need": I need to transform WASM files that use the GC instructions into non-GC instructions |
21:16:55 | FromDiscord | <Robyn [She/Her]> Reasoning ishttps://mirkosertic.github.io/Bytecoder/chapter-1/page-1-a/ requires the GC proposal, but wasm3 and wasm2c don't support it, and wasmtime doesn't have full support for it |
21:17:07 | FromDiscord | <Robyn [She/Her]> (edit) "proposal," => "proposal to function, and it can't be disabled," |
21:18:08 | FromDiscord | <albassort> think i found a gcc bug |
21:18:11 | FromDiscord | <albassort> (edit) removed "gcc" |
21:18:14 | FromDiscord | <albassort> err |
21:20:03 | FromDiscord | <albassort> yeah def a gc issue |
21:20:11 | FromDiscord | <Robyn [She/Her]> > I need to transform WASM files that use the GC instructions into non-GC instructions↵Beef ^^^, idk if Discord replies ping |
21:20:55 | FromDiscord | <Elegantbeef> Yea I do not know of any libraries, but WASM isn't that complicated 😄 |
21:21:36 | FromDiscord | <albassort> im reading into a buffer, parsed in proc params |
21:21:44 | FromDiscord | <albassort> within the proc the data is being read |
21:21:55 | FromDiscord | <albassort> but when it exists the seq is all null |
21:22:08 | FromDiscord | <albassort> is this somehow expected behavior |
21:22:14 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Yea I do not": Yeah, it's moreso I don't want to have to reinvent the wheel and actively maintain it for new instructions too aha |
21:22:40 | FromDiscord | <polylokh_39446> it could be expected behavior if you're accidentally writing to a copy. |
21:22:58 | FromDiscord | <albassort> it is async |
21:23:00 | FromDiscord | <Robyn [She/Her]> I could make Binaryen bindings since that has all the types defined and such but if possible I just want a minimal library for manipulation |
21:23:00 | FromDiscord | <albassort> so it might |
21:23:08 | FromDiscord | <albassort> i should pass it in as an ptr |
21:23:54 | FromDiscord | <polylokh_39446> I suggest confirming that you're not accidentally writing to a copy. --expandArc:themodule and --expandArc:theproc will show lifetime functions |
21:24:06 | FromDiscord | <albassort> yay |
21:24:11 | FromDiscord | <albassort> nope it worked |
21:24:16 | FromDiscord | <albassort> (edit) "nope it worked ... " added "when i made it a ptr" |
21:24:21 | FromDiscord | <albassort> so it was def writing to a copy |
21:24:26 | FromDiscord | <albassort> well |
21:24:27 | FromDiscord | <albassort> 99% |
21:25:33 | FromDiscord | <Robyn [She/Her]> Might be a good test of Futhark's project mode to wrap Binaryen... Hm |
21:59:16 | FromDiscord | <System64 ~ Flandre Scarlet> Is there an operator I missed? https://media.discordapp.net/attachments/371759389889003532/1237886561752842281/fixPoint.nim?ex=663d4733&is=663bf5b3&hm=28a0bc27e8d3f4a41c9aed2b99cf9ad79d0eae34c0448222fa6a85feca6dc10a& |
22:22:17 | FromDiscord | <albassort> hm? |
22:24:22 | FromDiscord | <Robyn [She/Her]> In reply to @sys64 "Is there an operator": I'm pretty sure some of this is overkill :P |
22:24:33 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "I'm pretty sure some": which ones? |
22:24:51 | FromDiscord | <System64 ~ Flandre Scarlet> I just added bitshifts, btw |
22:26:57 | FromDiscord | <Robyn [She/Her]> `<`, `<=`, `==` are the only operators you need for greater than, lesser than and not equal |
22:27:29 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "`<`, `<=`, `==` are": Nim doesn't use >, >= and !=? |
22:27:50 | FromDiscord | <Robyn [She/Her]> `>`: https://nim-lang.org/docs/system.html#%3E.t%2Cuntyped%2Cuntyped↵`>=`: https://nim-lang.org/docs/system.html#%3E%3D.t%2Cuntyped%2Cuntyped↵`!=`: https://nim-lang.org/docs/system.html#%21%3D.t%2Cuntyped%2Cuntyped |
22:28:01 | FromDiscord | <Robyn [She/Her]> In reply to @sys64 "Nim doesn't use >,": Nim defines them already for you |
22:28:18 | FromDiscord | <Robyn [She/Her]> That's why it uses a template in the stdlib |
22:30:53 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=WwTRHahpTacj |
22:31:22 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "Nim defines them already": Oh, quite clever |
22:31:42 | FromDiscord | <Elegantbeef> Or you could use `macros.expandmacros` 😄 |
22:32:04 | FromDiscord | <albassort> having an issue with SSL routines::uninitialized |
22:32:22 | FromDiscord | <System64 ~ Flandre Scarlet> Btw does Nim have bit rotation operators? |
22:32:23 | FromDiscord | <Robyn [She/Her]> So Beef, no knowledge of a lib that does bytecode manipulation? :p |
22:32:34 | FromDiscord | <albassort> In reply to @sys64 "Btw does Nim have": yes |
22:32:35 | FromDiscord | <Elegantbeef> Right I did say that Robyn |
22:32:37 | FromDiscord | <albassort> std/bitops |
22:33:19 | FromDiscord | <Robyn [She/Her]> Just making sure, my memory is worse than a piece of bacteria |
22:44:55 | FromDiscord | <albassort> ok guys |
22:45:15 | FromDiscord | <albassort> sent a code paste, see https://paste.rs/Ww2pY |
22:45:19 | FromDiscord | <albassort> what the fuck could this possibly mean |
22:46:16 | FromDiscord | <albassort> well |
22:46:23 | FromDiscord | <albassort> i guess im not suppose to wrap the client |
22:46:28 | FromDiscord | <albassort> i guess thats what it means |
22:49:26 | FromDiscord | <Robyn [She/Her]> Wrong channel? |
22:50:46 | FromDiscord | <albassort> that was a nim |
22:50:47 | FromDiscord | <albassort> thing |
22:51:40 | FromDiscord | <Robyn [She/Her]> Oh |
22:51:41 | FromDiscord | <Robyn [She/Her]> Weird then |
22:51:44 | FromDiscord | <Robyn [She/Her]> (edit) removed "" |
22:55:20 | FromDiscord | <albassort> SSL routines::wrong version number |
22:55:23 | FromDiscord | <albassort> the dreaded ussye |
22:55:25 | FromDiscord | <albassort> (edit) "ussye" => "issue" |
22:57:22 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=CfDSGaSBouzf |
22:58:01 | FromDiscord | <albassort> wait! |
22:58:55 | FromDiscord | <albassort> no adding https:// didn't work |
23:01:07 | FromDiscord | <LLM af0rg v2.0> is it using ssl?↵(@albassort) |
23:01:21 | FromDiscord | <albassort> yes |
23:01:26 | FromDiscord | <albassort> i posted the code |
23:09:22 | FromDiscord | <albassort> mm |
23:09:24 | FromDiscord | <albassort> (edit) "mm" => "hmm" |
23:09:40 | FromDiscord | <albassort> let ctx : SslContext = newContext(verifyMode = CVerifyNone)↵stopped that error |
23:09:52 | FromDiscord | <albassort> but now it doesn't receive anything from the server |
23:10:01 | FromDiscord | <albassort> it barely waits and just reads nulls |
23:12:54 | FromDiscord | <albassort> nevermind |
23:13:01 | FromDiscord | <albassort> it seems it sometimes fixes it but othertimes does not |
23:35:23 | * | krux02 quit (Remote host closed the connection) |
23:55:59 | FromDiscord | <albassort> the site wasn't configured to https |
23:57:10 | FromDiscord | <albassort> classic |