00:44:53 | * | skippy8 joined #nim |
01:45:45 | * | amadaluzia joined #nim |
02:05:56 | * | tiorock joined #nim |
02:05:56 | * | tiorock quit (Changing host) |
02:05:56 | * | tiorock joined #nim |
02:05:56 | * | rockcavera is now known as Guest7528 |
02:05:56 | * | tiorock is now known as rockcavera |
02:09:42 | * | Guest7528 quit (Ping timeout: 244 seconds) |
02:55:36 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
03:57:41 | * | amadaluzia quit (Quit: You) |
04:08:25 | * | cm quit (Ping timeout: 276 seconds) |
04:16:53 | * | cm joined #nim |
04:55:56 | FromDiscord | <that_dude.> sent a code paste, see https://play.nim-lang.org/#pasty=KhLWKsMi |
04:57:05 | FromDiscord | <Elegantbeef> It's a compiler bug so yes it should be reported |
04:57:22 | FromDiscord | <Elegantbeef> But you do not want to do \`cast[ptr BaseStateRef](addr result.stateRef) |
04:57:59 | FromDiscord | <that_dude.> sent a code paste, see https://play.nim-lang.org/#pasty=XBNgRgFI |
04:58:08 | FromDiscord | <that_dude.> Is that another bug then? |
04:58:26 | FromDiscord | <Elegantbeef> No you should do `(ptr BaseStateRef)(result.stateReff.addr)` |
04:59:29 | FromDiscord | <that_dude.> `result.setup = () {.nimcall.} => setup((ptr BaseStateRef)(result.stateRef.addr))`↵gives error↵`Error: type mismatch: got 'ptr typeof(result.stateRef)' for 'addr(result.stateRef)' but expected 'ptr BaseStateRef'` |
04:59:41 | FromDiscord | <that_dude.> Which seems to be the same error |
05:00:20 | FromDiscord | <Elegantbeef> You actually should be using object types and ref types |
05:00:51 | FromDiscord | <that_dude.> I don't understand |
05:01:01 | * | derpydoo joined #nim |
05:01:02 | FromDiscord | <Elegantbeef> then it's `(ptr MyObject)(result.stateRef[].addr)` |
05:01:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=vKpmnrmS |
05:03:19 | FromDiscord | <that_dude.> I'm not sure I can do that. Wouldn't state destruct at the end of the scope? |
05:03:38 | FromDiscord | <Elegantbeef> ptr's don't invoke destructors |
05:04:10 | FromDiscord | <that_dude.> But they also don't prolong the life right? Because state is created in the initModule scope so it should die after it ends |
05:04:20 | FromDiscord | <Elegantbeef> Right |
05:04:32 | FromDiscord | <Elegantbeef> You're the one using ptrs so I was uncertain what you were trying to do |
05:04:58 | FromDiscord | <Elegantbeef> If you want to skip closures you have to pass state into the function |
05:05:06 | FromDiscord | <that_dude.> I may be tired sorry, I'm trying to keep everything together |
05:05:24 | FromDiscord | <Elegantbeef> `proc() {.nimcall.}` means you cannot use local variables in the function |
05:06:48 | FromDiscord | <that_dude.> I do get that, it's just that I need to find a way for a proc to have access to the module state, but for it to work with Malebolgia, it must be a nimcall |
05:06:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=kiBEofJD |
05:07:45 | FromDiscord | <that_dude.> Maybe I just don't use Malebolgia and try a different threading solution that may not have that restriction |
05:09:34 | FromDiscord | <that_dude.> Well specifically, for me to be able to spawn a thread with Malebolgia, I need to be able to `isolate(Module)` and it doesn't permit closures. That's what I'm currently stuck at |
07:23:06 | FromDiscord | <.tokyovigilante> is there a standard/best practice way to have a signal/observer pattern in Nim? Should I just be using threads/channels? |
07:38:26 | FromDiscord | <.tokyovigilante> I've previously used this sort of thing with Swift - https://github.com/artman/Signals but I'm not sure it will work as well without weak references |
08:09:15 | * | strogon14 quit (Quit: Auf Wiese geh'n!) |
08:14:13 | * | strogon14 joined #nim |
08:28:38 | strogon14 | https://nimpkgs.dayl.in/#/pkg/sigils |
08:32:18 | * | skippy8 joined #nim |
08:42:21 | * | Goodbye_Vincent1 quit (Server closed connection) |
08:42:36 | * | Goodbye_Vincent1 joined #nim |
08:46:55 | * | Jhonny2x4 quit (Server closed connection) |
08:47:06 | * | Jhonny2x4 joined #nim |
09:41:37 | * | mahlon quit (Ping timeout: 248 seconds) |
09:58:28 | * | tiorock joined #nim |
09:58:28 | * | tiorock quit (Changing host) |
09:58:28 | * | tiorock joined #nim |
09:58:28 | * | rockcavera quit (Killed (mercury.libera.chat (Nickname regained by services))) |
09:58:28 | * | tiorock is now known as rockcavera |
10:00:33 | * | tiorock joined #nim |
10:00:33 | * | tiorock quit (Changing host) |
10:00:33 | * | tiorock joined #nim |
10:00:33 | * | rockcavera is now known as Guest8122 |
10:00:33 | * | tiorock is now known as rockcavera |
10:03:22 | * | Guest8122 quit (Ping timeout: 255 seconds) |
10:14:04 | * | mahlon joined #nim |
10:15:28 | * | pmp-p quit (Ping timeout: 240 seconds) |
10:18:25 | FromDiscord | <.tokyovigilante> strogon14: thanks, I saw sigil, but was hoping for something a bit lighter. I've now gone down a whole other rabbit-hole trying to get libdispatch and the LLVM blocks runtime working on Linux |
10:27:59 | FromDiscord | <.tokyovigilante> If anyone can explain this to me it would be awesome 🙂 https://pasty.ee/vXBHMUHg |
10:28:21 | FromDiscord | <.tokyovigilante> trying to link with the blocks runtime but the symbols the linker says are missing are all there |
10:29:56 | * | przmk quit (Remote host closed the connection) |
10:30:29 | * | przmk joined #nim |
10:32:07 | FromDiscord | <.tokyovigilante> ah, I needed to use the lld linker as well |
10:33:01 | * | pmp-p joined #nim |
10:51:07 | FromDiscord | <.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=UFAahPLx |
11:43:11 | * | beholders_eye joined #nim |
12:30:19 | * | derpydoo quit (Quit: derpydoo) |
12:41:21 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=vMFBWMxY |
12:41:41 | FromDiscord | <albassort> doing.addr is ugly |
12:43:25 | FromDiscord | <albassort> I fear that guy's entire project design might be over complicating something, and I think i found the one guy who needs std/Taasks |
12:43:29 | FromDiscord | <albassort> (edit) "std/Taasks" => "std/Tasks" |
12:43:43 | FromDiscord | <albassort> @that_dude. check out std/Tasks see if they would help this |
12:44:13 | FromDiscord | <albassort> you can create type safely in the task instead of trying to force it into a nimcall |
12:44:20 | FromDiscord | <albassort> (edit) "you can create type safely in the task instead of trying to force it into a nimcall ... " added "anonymously" |
13:12:31 | * | skippy8 quit (Ping timeout: 252 seconds) |
13:24:57 | * | skippy8 joined #nim |
13:41:53 | FromDiscord | <that_dude.> In reply to @albassort "<@532751332445257729> check out std/Tasks": Thanks for the suggestion, I think I looked into this, but tasks couldn't fulfill the isolation check when I tried it. That said, I discovered that I had misunderstood createThread in that the argument passed to the calling function can be an object that contains closures. So I think I figured it out |
13:42:44 | FromDiscord | <albassort> keep in mind closures are slow |
13:43:08 | FromDiscord | <that_dude.> In reply to @albassort "I fear that guy's": I promise it's not an overcomplicated archetecture for the game thing I'm doing https://media.discordapp.net/attachments/371759389889003532/1406634451030511658/image-8.png?ex=68a32deb&is=68a1dc6b&hm=fa1610f2e945118bc1ad11b6ca03c40edd7c1eb6adf397ec89927f40467ffcfb& |
13:44:34 | FromDiscord | <that_dude.> I think I can bite the closure bullet. It shouldn't be too bad. I mean I have a sleep(1) in all of my main loops atm so they burn too many cycles |
13:44:59 | FromDiscord | <that_dude.> (edit) "promise" => ""promise"" |
13:45:25 | FromDiscord | <albassort> i think I understand what you're going for 🫡 |
13:45:45 | FromDiscord | <that_dude.> :salute: |
13:47:46 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
13:50:37 | * | skippy8 joined #nim |
14:05:23 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=FphBGnvc |
14:05:30 | FromDiscord | <albassort> i did not know this compiled |
14:14:44 | FromDiscord | <Robyn [She/Her]> i did↵(@albassort) |
14:16:27 | FromDiscord | <Robyn [She/Her]> `toSeq(DepositType)` also works |
14:16:38 | FromDiscord | <Robyn [She/Her]> But yeah, `items` is implemented on enums, it's cool |
14:18:31 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
14:18:40 | FromDiscord | <albassort> In reply to @Robyn "`toSeq(DepositType)` also works": well if you can iterate you can sequtils |
14:18:46 | FromDiscord | <albassort> i had a meme in my brain about sequitls but its gone now |
14:18:55 | FromDiscord | <albassort> i was gonna make it just for beef |
14:21:27 | * | skippy8 joined #nim |
14:21:34 | madprops | imagine dreaming with sequtils |
14:22:11 | * | skippy8 quit (Client Quit) |
14:23:13 | * | switchy_ joined #nim |
14:24:01 | * | skippy8 joined #nim |
14:24:02 | * | switchy quit (Ping timeout: 252 seconds) |
14:24:16 | FromDiscord | <kentrid> A short Nim-related post got into the top on HN https://news.ycombinator.com/item?id=44931415 |
14:39:24 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
14:40:49 | * | skippy8 joined #nim |
14:42:10 | * | skippy8 quit (Client Quit) |
14:42:36 | * | beholders_eye quit (Ping timeout: 272 seconds) |
14:42:38 | * | skippy8 joined #nim |
14:43:00 | FromDiscord | <albassort> i dont wanna know what it says |
14:44:02 | * | beholders_eye joined #nim |
14:44:02 | * | skippy8 quit (Client Quit) |
14:44:29 | * | skippy8 joined #nim |
15:02:57 | FromDiscord | <leorize> note that directly linking might cause it to be down ranked if many people interact via the ink↵(@kentrid) |
15:04:37 | FromDiscord | <kentrid> Is this still true today? I think it's one of those rumors, especially since the post already had 30+ upvotes when I linked it here. |
15:13:08 | FromDiscord | <leorize> I can't tell if it's true, actually |
15:13:28 | FromDiscord | <leorize> the rumor stuck around, so maybe there's some merit to it |
15:16:04 | * | beholders_eye quit (Ping timeout: 244 seconds) |
15:18:19 | * | beholders_eye joined #nim |
15:24:29 | FromDiscord | <albassort> how cani prevent floats from using scientific notation |
15:24:40 | FromDiscord | <albassort> inserting SE into my databases >:( |
15:24:50 | FromDiscord | <albassort> (edit) "SE" => "SN" |
15:25:45 | FromDiscord | <albassort> not sure if selection bias applies to rumors btw |
15:26:01 | FromDiscord | <albassort> or natural selection rather |
15:29:36 | FromDiscord | <albassort> aha |
15:32:35 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=XkottgsJ |
15:33:11 | FromDiscord | <albassort> though its not working, perhaps its the database |
15:33:36 | FromDiscord | <albassort> whatever |
15:33:45 | FromDiscord | <albassort> (edit) "whatever ... " added "im too lazy to update all the db calls" |
15:33:52 | FromDiscord | <albassort> (edit) "whatever im too lazy to update all the db calls ... " added "or make a trigger" |
15:33:59 | FromDiscord | <albassort> or am i |
15:37:33 | FromDiscord | <albassort> i hope parsefloat handles SE |
16:55:49 | * | tiorock joined #nim |
16:55:49 | * | rockcavera is now known as Guest9552 |
16:55:49 | * | Guest9552 quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
16:55:49 | * | tiorock is now known as rockcavera |
16:57:56 | * | tiorock joined #nim |
16:57:56 | * | tiorock quit (Changing host) |
16:57:56 | * | tiorock joined #nim |
16:57:56 | * | rockcavera is now known as Guest7185 |
16:57:56 | * | Guest7185 quit (Killed (mercury.libera.chat (Nickname regained by services))) |
16:57:56 | * | tiorock is now known as rockcavera |
17:04:12 | * | jjido joined #nim |
17:09:16 | * | tiorock joined #nim |
17:09:16 | * | rockcavera is now known as Guest8111 |
17:09:16 | * | Guest8111 quit (Killed (lead.libera.chat (Nickname regained by services))) |
17:09:16 | * | tiorock is now known as rockcavera |
17:11:20 | * | tiorock joined #nim |
17:11:20 | * | rockcavera is now known as Guest6913 |
17:11:20 | * | tiorock is now known as rockcavera |
17:14:23 | * | Guest6913 quit (Ping timeout: 244 seconds) |
17:16:14 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
17:18:14 | * | jjido joined #nim |
17:37:52 | * | beholders_eye quit (Ping timeout: 255 seconds) |
18:30:25 | * | tiorock joined #nim |
18:30:25 | * | rockcavera is now known as Guest4161 |
18:30:25 | * | Guest4161 quit (Killed (osmium.libera.chat (Nickname regained by services))) |
18:30:25 | * | tiorock is now known as rockcavera |
18:32:31 | * | tiorock joined #nim |
18:32:31 | * | rockcavera is now known as Guest334 |
18:32:31 | * | tiorock is now known as rockcavera |
18:35:01 | * | Guest334 quit (Ping timeout: 248 seconds) |
18:43:50 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
18:44:25 | * | skippy8 joined #nim |
19:31:35 | * | systemdsucks joined #nim |
19:46:53 | * | systemdsucks left #nim (#nim) |
19:59:11 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
20:01:24 | FromDiscord | <thearchivalone> Sqlite support is pretty good. I've never implemented it before but getting it working like I wanted took only a few hours. Now base64 encoding is where I'm currently reaching interesting quirks. Ha |
20:04:04 | * | skippy8 joined #nim |
20:04:46 | * | skippy8 quit (Client Quit) |
20:05:15 | * | skippy8 joined #nim |
20:07:01 | * | skippy8 quit (Client Quit) |
20:07:29 | * | skippy8 joined #nim |
20:33:47 | * | xet7 quit (Remote host closed the connection) |
20:39:19 | * | xet7 joined #nim |
20:47:06 | FromDiscord | <albassort> In reply to @bugcrowd_tao "Sqlite support is pretty": should be in a data |
20:47:16 | FromDiscord | <albassort> oh wait |
20:47:19 | FromDiscord | <albassort> no in data it wants binary |
20:47:23 | FromDiscord | <albassort> just keep it as a string |
20:47:47 | FromDiscord | <albassort> (edit) "just keep it as a string ... " added "TEXT" |
20:54:05 | FromDiscord | <thearchivalone> What are you referring to? |
20:55:53 | FromDiscord | <thearchivalone> Base64 encoded strings were printing out wrong, so I moved away from it. They worked all right for awhile in SQLite |
21:19:33 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
21:27:28 | * | beholders_eye joined #nim |
21:57:04 | * | beholders_eye quit (Ping timeout: 255 seconds) |
22:21:49 | * | switchy_ is now known as switchy |
22:24:06 | * | switchy quit (Remote host closed the connection) |
22:28:44 | * | switchy joined #nim |
22:31:00 | * | xet7 quit (Remote host closed the connection) |
22:34:39 | FromDiscord | <captainbuckkets> Is NIM currently usable with WASM. Lots of the repos I saw looked old (5-7 years) |
22:36:43 | FromDiscord | <Elegantbeef> YES |
23:03:56 | FromDiscord | <Robyn [She/Her]> In reply to @captainbuckkets "Is NIM currently usable": It's just 'Nim', not all caps btw |
23:04:33 | FromDiscord | <captainbuckkets> Okay, sorry |
23:04:38 | FromDiscord | <Robyn [She/Her]> But you do have two options:↵1. Use Nlvm, which is a LLVM backend maintained by arnetheduck↵2. Use Clang/Emscripten as the C compiler for Nim |
23:04:45 | FromDiscord | <Robyn [She/Her]> In reply to @captainbuckkets "Okay, sorry": All good, don't sweat it |
23:05:28 | FromDiscord | <Robyn [She/Her]> In reply to @battery.acid.bubblegum "But you do have": also, I'd recommend the second purely because you'd be able to get much more help and can still use C libraries easily |
23:05:40 | FromDiscord | <Robyn [She/Her]> (edit) "In reply to @battery.acid.bubblegum "But you do have": also, I'd recommend the second purely because you'd be able to get much more help and can still use ... C" added "wrapped" | removed "easily" |
23:10:37 | FromDiscord | <captainbuckkets> Yeah can use the second. Seems safest |
23:55:37 | * | tiorock joined #nim |
23:55:37 | * | rockcavera is now known as Guest2750 |
23:55:37 | * | Guest2750 quit (Killed (iridium.libera.chat (Nickname regained by services))) |
23:55:37 | * | tiorock is now known as rockcavera |