00:11:29 | FromDiscord | <nocturn9x> huh |
00:11:39 | FromDiscord | <nocturn9x> In reply to @chronos.vitaqua "Noise as in using": lol thx... |
00:11:46 | FromDiscord | <nocturn9x> In reply to @nocturn9x "huh": an interesting problem has occurred |
00:11:52 | FromDiscord | <nocturn9x> I can run my project fine on my laptop |
00:12:06 | FromDiscord | <nocturn9x> but when I try to execute the `uci` command on the same project compiled on my server |
00:12:13 | FromDiscord | <nocturn9x> which is an intel mini pc with a fairly old i5 |
00:12:16 | FromDiscord | <nocturn9x> it segfaults |
00:12:31 | FromDiscord | <nocturn9x> at a completely random place, with a fucked up traceback (i.e. the line numbers are completely wrong) |
00:13:26 | * | gst quit (Ping timeout: 250 seconds) |
00:13:34 | FromDiscord | <nocturn9x> if it were a CPU compatibility issue, I'd expect the executable to not boot up at all |
00:13:39 | FromDiscord | <nocturn9x> but other things are working fine |
00:21:48 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=XQSCAkCs |
00:21:53 | FromDiscord | <nocturn9x> it segfaults on the second assignment |
00:22:00 | FromDiscord | <nocturn9x> I have confirmed that the constructor runs until the end |
00:22:03 | FromDiscord | <nocturn9x> so that's not the issue |
00:22:11 | FromDiscord | <Robyn [She/Her]> Maybe it's using an instruction unavailable on the current CPU? |
00:22:11 | FromDiscord | <nocturn9x> is `create` returning `nil`? |
00:22:19 | FromDiscord | <nocturn9x> that would trigger an IOT fault |
00:22:23 | FromDiscord | <nocturn9x> this is a segmentation fault |
00:22:29 | FromDiscord | <Robyn [She/Her]> Ah |
00:22:31 | FromDiscord | <nocturn9x> it's a memory issue |
00:23:10 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=PVYMecpe |
00:23:14 | FromDiscord | <nocturn9x> nope |
00:23:17 | FromDiscord | <nocturn9x> value type |
00:23:26 | FromDiscord | <nocturn9x> as I said, everything works fine on my laptop |
00:23:31 | FromDiscord | <nocturn9x> it just breaks on my server |
00:23:34 | FromDiscord | <nocturn9x> same exact code |
00:23:55 | FromDiscord | <Robyn [She/Her]> Yeah I'm not gonna be useful then, sorry and good luck |
00:24:03 | FromDiscord | <nocturn9x> thanks for trying anyway :) |
00:24:48 | FromDiscord | <nocturn9x> yeah, `create` is returning `nil` |
00:24:54 | FromDiscord | <nocturn9x> what in the- |
00:25:02 | FromDiscord | <nocturn9x> it's even using the same allocator on both machines |
00:25:04 | FromDiscord | <nocturn9x> _how_ |
00:25:46 | FromDiscord | <nocturn9x> and it's nil only for one thing too |
00:25:48 | FromDiscord | <nocturn9x> lol wtf- |
00:26:37 | systemdsucks | but is it the same nim version? |
00:27:07 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=DeduGoJr |
00:27:11 | FromDiscord | <nocturn9x> down to the same exact commit hash |
00:27:52 | FromDiscord | <nocturn9x> yeah, if I switch from `create` to `cast[ptr T](alloc0(sizeof(T)))` it works |
00:27:55 | FromDiscord | <nocturn9x> _what_ |
00:28:51 | FromDiscord | <nocturn9x> so `create` is failing only on one platform and only for one type |
00:28:57 | FromDiscord | <nocturn9x> again, _what_ |
00:29:11 | FromDiscord | <nocturn9x> I have several other `create` calls sprinkled over the code and those work fine |
00:29:19 | FromDiscord | <nocturn9x> or, at least, it seems they do |
00:29:41 | FromDiscord | <nocturn9x> nothing is segfaulting, and it would happen immediately if any of those were in any way corrupted or null |
00:30:10 | * | jmdaemon quit (Ping timeout: 255 seconds) |
00:30:15 | FromDiscord | <nocturn9x> well at least the fix was simple but like |
00:30:17 | FromDiscord | <nocturn9x> _weird_ |
00:30:26 | FromDiscord | <nocturn9x> gonna have to investigate |
01:01:41 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=XBwMDFJM |
01:24:41 | * | jmdaemon joined #nim |
01:25:10 | FromDiscord | <polylokh_39446> benign is a mysterious undocumented pragma from 2014, which seems to be a read-only gcsafe, so I think it might really be (b), and due to data races. |
01:47:14 | * | def- quit (Quit: -) |
01:47:38 | * | def- joined #nim |
01:51:06 | * | def- quit (Client Quit) |
01:51:48 | * | def- joined #nim |
02:14:02 | FromDiscord | <amarevite> is there any way in nim to fill out this information?i just learned that c# has [assembly attributes](<https://learn.microsoft.com/en-us/dotnet/standard/assembly/set-attributes>) and i wanted to play with them but i cant figure out how to do this in nim or if it's even possible https://media.discordapp.net/attachments/371759389889003532/1239762618164576347/image.png?ex=66441a69&is=6642c8e9&hm=85c6c63342272212638515332bd67f3502051a318876 |
02:14:07 | FromDiscord | <amarevite> (edit) "information?i" => "information? i" |
02:23:59 | * | jmdaemon quit (Ping timeout: 264 seconds) |
02:48:07 | * | krux02 quit (Remote host closed the connection) |
05:04:33 | FromDiscord | <pusewicz> Mmmm, recursive module dependencies! |
05:04:50 | FromDiscord | <pusewicz> Do I just put all the type definitions in a separate file then? 😐 |
05:06:51 | FromDiscord | <Elegantbeef> You can do delayed imports |
05:07:05 | FromDiscord | <Elegantbeef> But yea most people do not futz with that |
05:07:08 | FromDiscord | <Elegantbeef> I do cause I hate myself |
05:07:57 | FromDiscord | <pusewicz> Yeah, not very elegant. |
05:08:23 | FromDiscord | <Elegantbeef> Single pass compiler does be single pass 😄 |
05:08:46 | FromDiscord | <pusewicz> Ew. now I have to export all the types. |
05:08:48 | FromDiscord | <pusewicz> FFS |
05:09:01 | FromDiscord | <Elegantbeef> Then try delayed imports |
05:09:18 | FromDiscord | <Elegantbeef> Though that only works well if procedures are not cyclically dependant |
05:09:32 | * | coldfeet joined #nim |
05:09:33 | FromDiscord | <polylokh_39446> or, just export them. That's not going to pollute the namespace of code importing your modules unless you re-export |
05:09:55 | FromDiscord | <pusewicz> Actually, you are right @polylokh_39446. I'll just make it work, then I'll make it pretty. |
05:10:01 | FromDiscord | <Elegantbeef> It does leak internal details that might not be apart of the actual API that people will use 😄 |
05:11:38 | * | coldfeet quit (Remote host closed the connection) |
05:17:59 | FromDiscord | <pusewicz> https://github.com/pusewicz/wave-function-collapse-nim/blob/main/src/cell.nim#L39: Error: identifier expected |
05:19:45 | FromDiscord | <Elegantbeef> You did `= array` |
05:19:57 | FromDiscord | <Elegantbeef> This compiler error sucks but it should be `: array` |
05:20:05 | FromDiscord | <pusewicz> urg |
05:20:41 | FromDiscord | <pusewicz> Thank you! |
05:21:33 | * | def- quit (Quit: -) |
05:37:09 | FromDiscord | <pusewicz> https://github.com/pusewicz/wave-function-collapse-nim/blob/main/src/cell.nim#L12: undeclared field entropy. Wat |
05:40:21 | * | def- joined #nim |
05:48:13 | FromDiscord | <Elegantbeef> What a wild issue 😄 |
06:10:30 | FromDiscord | <pusewicz> I don’t understand. It’s exported, defined. What am I doing wrong? |
06:11:04 | FromDiscord | <polylokh_39446> you haven't updated your code yet, the version on github still has the =array |
06:12:09 | FromDiscord | <pusewicz> True |
06:14:12 | FromDiscord | <pusewicz> Pushed |
06:19:02 | * | rockcavera quit (Remote host closed the connection) |
06:21:35 | FromDiscord | <polylokh_39446> I don't see your bug. I get other circular dependencies, like model.nim importing cell.nim which needs cellAt from model.nim |
06:21:52 | FromDiscord | <Elegantbeef> For me with that code there is a `neighbour`s error |
06:28:46 | FromDiscord | <pusewicz> Correct. |
06:28:57 | FromDiscord | <pusewicz> Which is also defined and exported? |
06:29:20 | FromDiscord | <polylokh_39446> which is also a circular dependency between cell and model |
06:29:55 | FromDiscord | <pusewicz> Right, so... ugh. I need to re-structure the code? |
06:31:42 | FromDiscord | <polylokh_39446> yep. |
06:32:13 | FromDiscord | <polylokh_39446> looks like model and cell are the only problems there |
06:32:30 | FromDiscord | <polylokh_39446> minimally, you could combine them in a single model and use foreward declarations and call it a day |
06:33:14 | FromDiscord | <polylokh_39446> but it's probably not that bad |
06:34:36 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
06:34:47 | * | SchweinDeBurg joined #nim |
06:48:36 | NimEventer | New Nimble package! nimtk - High-level Tk wrapper for Nim, see https://github.com/neroist/nimtk |
06:52:01 | * | def- quit (Quit: -) |
06:52:24 | * | def- joined #nim |
06:55:36 | * | def- quit (Client Quit) |
06:56:03 | * | def- joined #nim |
07:11:10 | Amun-Ra | I know it works but… is it safe to cast[string](a_seq_of_chars)? |
07:11:26 | FromDiscord | <Elegantbeef> Not if anything ever passes it to `cstring` |
07:12:16 | Amun-Ra | I just print the value for debugging purposes, no other conversions are made |
07:20:27 | FromDiscord | <Elegantbeef> Could do `toOpenArray(0, str.high)` 😄 |
07:20:31 | FromDiscord | <Elegantbeef> That's safe |
07:26:05 | Amun-Ra | oh |
07:26:07 | Amun-Ra | right |
07:31:00 | Amun-Ra | it'd be nice to end with compile error any attempt to mark an object containing any ref type with noinit pragma; it segfaults otherwise |
07:34:44 | Amun-Ra | hmm, I wanted to write an example but it works on play.nim, weird… |
08:05:21 | FromDiscord | <pmunch> In reply to @Elegantbeef "Not if anything ever": Why wouldn't that work? |
08:06:03 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=fWxkrgRy |
08:24:23 | FromDiscord | <solitudesf> In reply to @pmunch "Why wouldn't that work?": because '\0' terminator would be missing |
08:28:57 | FromDiscord | <pmunch> In reply to @solitudesf "because '\0' terminator would": Ah right, I assumed that this was string data that came from some low-level API |
08:35:53 | * | beholders_eye joined #nim |
08:45:51 | * | beholders_eye quit (Quit: WeeChat 4.1.2) |
08:46:49 | * | beholders_eye joined #nim |
08:53:58 | FromDiscord | <ieltan> In reply to @ringabout "Should views support implicitly": I don't know about the implications of converting string to openarray implicitly like that but I do know that `views` types are kind of buggy already, last time I tried (when Nim 2.0 first came out) I had confusing behavior iirc any method called on my `openArray[char]` would do it twice (like echo would print the string twice) |
08:54:40 | FromDiscord | <ieltan> I feel like the feature should be bug-free and polished first 😅 |
09:20:37 | FromDiscord | <intellij_gamer> In reply to @ringabout "Should views support implicitly": Imo would make sense since it already does it for parameters |
09:33:45 | * | tanami quit (Ping timeout: 255 seconds) |
09:44:11 | FromDiscord | <pusewicz> Which is the preferred LSP server for Nim? |
09:45:19 | FromDiscord | <nnsee> In reply to @pusewicz "Which is the preferred": nimlangserver |
09:45:37 | FromDiscord | <nocturn9x> quick question |
09:45:51 | FromDiscord | <nocturn9x> any idea why spawning 12 threads would consume a fuckton of memory? |
09:46:06 | FromDiscord | <nocturn9x> like I have 48GiB of RAM and the chess engine manages to occupy over 32 |
09:46:19 | FromDiscord | <nocturn9x> and there's _nothing_ even remotely close to that size |
09:46:37 | FromDiscord | <nocturn9x> the biggest item is a shared 64MiB transposition table |
09:46:43 | FromDiscord | <nocturn9x> but as I said that's shared across threads |
09:46:51 | FromDiscord | <nocturn9x> also, `createThread()` is slow af |
09:47:47 | FromDiscord | <nocturn9x> does `atomicArc` fuck with multiple threads somehow? |
09:48:37 | FromDiscord | <nocturn9x> In reply to @nocturn9x "like I have 48GiB": correction: over 42 |
09:48:45 | FromDiscord | <nocturn9x> In reply to @nocturn9x "does `atomicArc` fuck with": happens with bare ARC too |
09:49:40 | FromDiscord | <Phil> I assume something gets allocated 1000 times and given the thread doesn't get destroyed it keeps staying around |
09:49:48 | FromDiscord | <nocturn9x> but what could it possibly be |
09:49:55 | FromDiscord | <nocturn9x> let me show you the code |
09:49:59 | FromDiscord | <Phil> I'm out of crystal balls |
09:50:03 | FromDiscord | <solitudesf> In reply to @nocturn9x "any idea why spawning": does it grow proportionally with more threads? |
09:50:06 | FromDiscord | <nocturn9x> yes |
09:50:16 | FromDiscord | <nocturn9x> it seems like it's duplicating the entire address space |
09:50:19 | FromDiscord | <nocturn9x> as if it were forking |
09:50:32 | FromDiscord | <nocturn9x> let me test with just one extra worker |
09:51:05 | FromDiscord | <solitudesf> fork doesnt actually copy the entire address space |
09:51:05 | FromDiscord | <nocturn9x> yeah it grows with every thread |
09:51:12 | FromDiscord | <nocturn9x> yeah I know it's CoW |
09:51:38 | FromDiscord | <nocturn9x> also did not realize how slow creating a thread is, damn |
09:51:51 | FromDiscord | <nocturn9x> might wanna use a thread pool |
09:52:05 | FromDiscord | <nocturn9x> but that doesn't explain the huge memory usage |
09:53:32 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=oQMkcbZB |
09:53:38 | FromDiscord | <nocturn9x> for reference this is the code that spawns the workers |
09:53:47 | FromDiscord | <nocturn9x> as soon as they're all created, memory usage goes through the roof |
09:54:07 | FromDiscord | <nocturn9x> `workers` is a global module-level variable that's private |
09:54:12 | FromDiscord | <nocturn9x> it's just a `seq` |
09:54:38 | FromDiscord | <nocturn9x> the history table is about 400KiB and the killers table is even smaller |
09:54:45 | FromDiscord | <nocturn9x> so that can't be it |
09:58:41 | FromDiscord | <nocturn9x> it wasn't doing this before, when I didn't allocate `SearchManager` objects on the heap |
10:00:11 | FromDiscord | <nocturn9x> _ohhhh_ |
10:00:23 | FromDiscord | <nocturn9x> `create` doesn't take `n sizeof(T)`... |
10:00:28 | FromDiscord | <nocturn9x> does it |
10:00:37 | FromDiscord | <nocturn9x> it already does the multiplication internally? |
10:01:02 | FromDiscord | <nocturn9x> oh my god what an idiot |
10:01:50 | * | tanami joined #nim |
10:16:51 | FromDiscord | <nocturn9x> so yeah apparently I was allocating over 70 GiB to each thread |
10:16:52 | FromDiscord | <nocturn9x> for no reason |
10:17:04 | FromDiscord | <nocturn9x> I just didn't think `create` already did the multiplication on its own... upsie |
10:21:55 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ringabout "Should views support implicitly": views ? What is that? |
10:24:20 | * | beholders_eye quit (Read error: Connection reset by peer) |
10:30:12 | * | beholders_eye joined #nim |
10:31:34 | FromDiscord | <kots> https://nim-lang.github.io/Nim/manual_experimental.html#view-types |
10:31:48 | * | gst joined #nim |
10:56:09 | FromDiscord | <madonuko> why can't I do `{.push async.}` |
10:56:18 | FromDiscord | <madonuko> `invalid pragma: async` |
10:59:04 | FromDiscord | <odexine> Async isn’t a “regular pragma” |
10:59:15 | FromDiscord | <odexine> Push can’t push certain pragma |
11:11:53 | FromDiscord | <Phil> Does asyncdispatch have an equivalent to threadsignalptr in chronos? |
11:53:09 | FromDiscord | <pusewicz> sent a code paste, see https://play.nim-lang.org/#pasty=nBnbIcdC |
12:04:44 | FromDiscord | <pusewicz> Figured it out, `neighbors` is a property on `Model` too, so had to rename the `neighbors` proc to something else. Not sure if there's a better fix. |
12:26:44 | FromDiscord | <pusewicz> sent a long message, see https://pasty.ee/DsqnnkUr |
12:34:12 | FromDiscord | <ringabout> `wangid` is not a value can be computed in the compile time. You Could use `let` instead of `const` |
13:03:22 | FromDiscord | <pusewicz> Ah, idiot me, Have not noticed that I put const. |
13:21:28 | FromDiscord | <bung8954> any datetime lib format datetime for normal users ? |
13:37:40 | * | beholders_eye quit (Ping timeout: 255 seconds) |
13:44:14 | FromDiscord | <pusewicz> In reply to @ringabout "`wangid` is not a": Thank you! |
13:44:37 | FromDiscord | <ringabout> No problem |
13:46:01 | FromDiscord | <kuku> https://matomo.org/wp-content/uploads/2022/07/privacy.png |
13:49:41 | FromDiscord | <nnsee> er... what? |
13:59:46 | FromDiscord | <Phil (he/him)> Please elaborate or I'll have to assume you're a bot/spammer and act accordingly |
14:03:26 | * | ntat joined #nim |
14:09:00 | FromDiscord | <odexine> id say just assume its a mispaste |
14:24:10 | anddam | pfff only 2 bytes IP address masking… |
14:39:32 | FromDiscord | <Phil (he/him)> I would agree with you if the only 2 interactions I'd seen so far weren't just 1 uploaded file that never made it to discord and this 1 link↵(@odexine) |
14:50:00 | * | Guest23 joined #nim |
14:50:23 | * | Guest23 quit (Client Quit) |
14:55:12 | * | krux02 joined #nim |
15:05:53 | * | def- quit (Quit: -) |
15:07:20 | * | def- joined #nim |
15:41:31 | * | ntat quit (Quit: Leaving) |
16:06:07 | FromDiscord | <Phil> ... How exactly do you add the raises pragma to a proc? |
16:06:11 | FromDiscord | <Phil> generated via macro |
16:09:57 | FromDiscord | <odexine> what happened with what you tried? |
16:13:56 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=UedtWipQ |
16:15:02 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=kFvxNcZr |
16:15:24 | FromDiscord | <Phil> Not the problem really 😛 |
16:15:35 | FromDiscord | <Robyn [She/Her]> Same result either way? |
16:16:28 | FromDiscord | <odexine> what's myproc as a treerepr |
16:17:23 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Same result either way?": Yeh |
16:17:42 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=fOTIkDNd |
16:17:52 | FromDiscord | <odexine> lol |
16:18:21 | FromDiscord | <odexine> that made me physically laugh lmao |
16:19:09 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=udwhUQZq |
16:20:04 | FromDiscord | <Phil> basically addPragma is busted |
16:20:18 | FromDiscord | <Phil> Just assign directly via the pragma operator |
16:22:01 | FromDiscord | <Robyn [She/Her]> Lovely |
16:22:06 | FromDiscord | <Robyn [She/Her]> You gonna PR a fix? |
16:22:33 | FromDiscord | <Robyn [She/Her]> Wait |
16:22:43 | FromDiscord | <Robyn [She/Her]> No, that seems like expected behaviour, Phil |
16:23:38 | FromDiscord | <Robyn [She/Her]> Passing the colon expr would be no problem |
16:41:06 | FromDiscord | <kuku> https://appfair.org/ |
16:41:27 | FromDiscord | <Phil (he/him)> You have 60 seconds to describe why you posted this or you're getting banned for spam. |
16:43:10 | * | rockcavera joined #nim |
16:52:05 | FromDiscord | <saint.___.> This app fair thing is interesting actually |
16:52:14 | FromDiscord | <saint.___.> But the person does look like a spammer I guess |
16:52:29 | FromDiscord | <saint.___.> Maybe he's a benevolent spammer |
16:52:35 | FromDiscord | <odexine> been way longer than 60 seconds though so unfortunately... |
16:52:38 | FromDiscord | <saint.___.> Or some bot that someone is testing out |
16:57:07 | FromDiscord | <Phil> Perfectly fine if I'm informed. If I have to assume they're a spammer that's just testing the waters before posting whatever else I'm going to just pre-emptively ban |
16:57:56 | FromDiscord | <saint.___.> Makes sense! |
17:14:50 | FromDiscord | <threefour> sent a long message, see https://pasty.ee/ajyihpwu |
17:17:22 | FromDiscord | <michaelb.eth> In reply to @threefour "How should I go": you may just want to open a socket/s between threads and send/recv data as if they |
17:17:36 | FromDiscord | <michaelb.eth> as if they're network agents talking to each other |
17:18:45 | FromDiscord | <threefour> That's a decent solution, but I'm sure it adds overhead (network stack) that I'd like to avoid if possible. |
17:20:29 | FromDiscord | <michaelb.eth> if you're not on Windows, what about unix sockets, should avoid network overhead, though you'll still need to de/serialize |
17:21:46 | FromDiscord | <threefour> Better, but I'd still be creating two file descriptors per connection, instead of one. If there's no solution to socket passing, then I might have to settle for that. |
17:25:11 | FromDiscord | <threefour> Well actually I guess I wouldn't need to create multiple on _every_ connection. Just on startup per thread. But I still feel like that's a bandaid fix to what should be a simple message-passing solution. |
17:26:05 | FromDiscord | <polylokh_39446> In reply to @threefour "How should I go": conventionally fds are not per-thread, and they certainly aren't in your program. On linux the underlying clone() syscall can change that. |
17:26:34 | FromDiscord | <polylokh_39446> this difficulty is due to all the layers of abstraction between you and the fd. |
17:26:50 | * | ntat joined #nim |
17:27:16 | FromDiscord | <polylokh_39446> but you can confirm this with strace. |
17:29:58 | FromDiscord | <polylokh_39446> `clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID`↵that's what default `createThread` gives me. CLONE_FILES has them sharing fds |
17:33:23 | FromDiscord | <polylokh_39446> inheritable's about the close-on-exec flag, which shouldn't apply. You're not exec'ing. |
17:41:27 | * | def- quit (Quit: -) |
17:42:00 | * | def- joined #nim |
17:48:05 | FromDiscord | <System64 ~ Flandre Scarlet> Hi, does Nim have List Comprehension? |
17:49:00 | FromDiscord | <bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=kdJpXgBv |
17:50:40 | FromDiscord | <odexine> In reply to @sys64 "Hi, does Nim have": sugar has `collect` |
17:51:41 | FromDiscord | <saint.___.> In reply to @sys64 "Hi, does Nim have": Ya sugar collect is really good |
17:52:02 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @saint.___. "Ya sugar collect is": Does it work with const too? |
17:59:14 | FromDiscord | <saint.___.> In reply to @sys64 "Does it work with": Not sure! |
18:01:04 | FromDiscord | <kots> what does working with const mean? |
18:01:09 | FromDiscord | <kots> sent a code paste, see https://play.nim-lang.org/#pasty=JBDroDHl |
18:01:44 | FromDiscord | <michaelb.eth> In reply to @sys64 "Does it work with": yep!↵https://play.nim-lang.org/#pasty=yTvKCfhN |
18:01:57 | FromDiscord | <kots> great minds |
18:08:23 | FromDiscord | <nocturn9x> anyone know of any nice-ish wrapper around `builtin_prefetch` for clang/gcc? |
18:08:37 | FromDiscord | <nocturn9x> speaking of which, how would I use a C compiler intrinsic from Nim? |
18:10:37 | FromDiscord | <michaelb.eth> In reply to @nocturn9x "speaking of which, how": importc with `<intin.h>`? |
18:11:02 | FromDiscord | <polylokh_39446> if it works like a function, you wrap it like anything. In a pinch you can always use emit |
18:12:02 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=KtPLqiPn |
18:12:09 | FromDiscord | <michaelb.eth> I may have misunderstood what @nocturn9x is asking about, but the question made me think of things I've seen in the weave codebase:↵https://github.com/mratsim/weave/blob/master/benchmarks/matmul_gemm_blas/gemm_pure_nim/common/simd.nim |
18:14:33 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=nHAjCoDy |
18:14:42 | FromDiscord | <nocturn9x> (edit) "https://play.nim-lang.org/#pasty=NfyhAfMc" => "https://play.nim-lang.org/#pasty=DPACFcGH" |
18:14:58 | FromDiscord | <nocturn9x> (edit) "https://play.nim-lang.org/#pasty=jfuSaZQx" => "https://play.nim-lang.org/#pasty=LhgAvlVH" |
18:15:10 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @michaelb.eth "yep! https://play.nim-lang.org/#pasty=yTvKCfhN": Perfect for lookup tables! |
18:15:17 | FromDiscord | <kots> sent a code paste, see https://play.nim-lang.org/#pasty=DuRWifPJ |
18:16:02 | FromDiscord | <kots> In reply to @sys64 "Perfect for lookup tables!": my example was pretty good too :( |
18:20:48 | FromDiscord | <bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=RRjqWLRk |
18:21:29 | FromDiscord | <bulletxbt> Can't really provide the data, it's 180mb and contains private info |
18:21:36 | FromDiscord | <bulletxbt> (edit) "data," => "data I'm unpacking," |
18:21:55 | FromDiscord | <kots> try `headerData[0].addr` |
18:22:18 | FromDiscord | <kots> you also need to newSeq(headerStringSize ) |
18:23:15 | FromDiscord | <kots> (edit) "newSeq(headerStringSize" => "newSeq[byte](headerStringSize" |
18:24:24 | FromDiscord | <bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=QBvNnkGe |
18:24:50 | FromDiscord | <bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=gnxKYuia |
18:24:55 | FromDiscord | <kots> yeah the latter |
18:25:01 | FromDiscord | <bulletxbt> Thanks I'll try |
18:25:04 | FromDiscord | <kots> with `=` instead of `:` there |
18:25:11 | FromDiscord | <bulletxbt> 👍 |
18:25:32 | FromDiscord | <bulletxbt> In reply to @k0ts "with `=` instead of": It worked, thanks :) |
18:25:36 | FromDiscord | <kots> pog |
18:25:52 | FromDiscord | <bulletxbt> Took me a few day and you did it in 30 secs |
18:25:56 | FromDiscord | <bulletxbt> (edit) "day" => "days" |
18:26:04 | FromDiscord | <kots> :3 |
18:26:43 | FromDiscord | <bulletxbt> `func toString` is the asterisk used so you can import it from another module? I've forgotten |
18:26:51 | FromDiscord | <kots> yes |
18:26:54 | FromDiscord | <bulletxbt> Alr |
18:37:05 | FromDiscord | <motatertot> # Teen content and onlyfans leaks here :peach: :underage: : https://discord.gg/xxxhubs @everyone @here |
18:37:27 | FromDiscord | <motatertot> # Teen content and onlyfans leaks here :peach: :underage: : https://discord.gg/xxxhubs @everyone @here |
18:40:11 | FromDiscord | <raynei486> <@&371760044473319454> |
18:40:43 | * | FromDiscord quit (Remote host closed the connection) |
18:40:56 | * | FromDiscord joined #nim |
18:41:58 | * | perr_ quit (Quit: WeeChat 3.8) |
18:52:24 | * | xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in) |
18:53:39 | * | xutaxkamay joined #nim |
18:59:38 | FromDiscord | <threefour> @polylokh_39446 could you point me in a direction of how to achieve what I'm wanting? I don't know where to go with this. |
19:19:46 | * | gst quit (Quit: Client closed) |
19:25:39 | FromDiscord | <__sxp__> What's the current imgui binding for Nim? There's a NimGL which seem to be updated 3 years ago and there some other dropped / experimental ones. |
19:26:04 | FromDiscord | <__sxp__> Or should I just import the header manually / support myself with Futhark and call it a day? |
19:31:06 | * | rockcavera quit (Remote host closed the connection) |
19:50:53 | NimEventer | New Nimble package! cozylogwriter - Basic zero-dependency logging with automatic colors and styling for Nim., see https://github.com/indiscipline/cozytaskpool |
19:51:30 | FromDiscord | <Phil> squint |
19:51:34 | FromDiscord | <Phil> squint |
19:53:41 | FromDiscord | <Phil> Nah, got excited too early, not usebal for me. They're doing an abstraction level halfway between what I need and what I want to build on top of |
19:53:57 | FromDiscord | <Phil> (edit) "usebal" => "usable" |
19:54:44 | FromDiscord | <Zoom> And what do you need? |
19:55:24 | * | beholders_eye joined #nim |
19:55:42 | FromDiscord | <Phil> A threadpool that doesn't basically hotspin if I try to run an async task on it |
19:56:10 | FromDiscord | <Phil> Which currently happens on both weave_io and taskpool due to the way their work-stealing algo works |
19:56:15 | FromDiscord | <Phil> Can't cope with chronos ThreadSignalPtr |
19:56:52 | FromDiscord | <Phil> https://github.com/status-im/nim-taskpools/issues/41↵↵So basically sth with the exact same abstraction level as taskpool, but also functional.↵It doesn't have to be the fastest, it just needs to flipping work |
19:57:02 | FromDiscord | <Phil> (edit) "functional.↵It" => "functional with async.↵It" |
20:00:01 | FromDiscord | <Phil> ~~I also need a way to deal with exceptions getting thrown in the async block of chronos, but that's separate |
20:00:03 | FromDiscord | <Phil> (edit) "separate" => "separate~~" |
20:04:00 | * | jmdaemon joined #nim |
20:12:15 | FromDiscord | <Zoom> I wouldn't call that library above abstraction at all. More of a "shove it out of sight" approach. |
20:13:51 | FromDiscord | <Phil> If I don't see (and care to see) what happens in between the layers of "createThread" and "pool.spawn myproc(value)" then it's an abstraction layer 😄 |
20:14:17 | FromDiscord | <Phil> I just vaguely know it does the thing and distributes function calls across groups of threads, I don't see how, that's an abstraction 😛 |
20:14:50 | FromDiscord | <Zoom> Fair enough |
20:22:40 | * | beholders_eye quit (Ping timeout: 246 seconds) |
20:23:02 | * | rockcavera joined #nim |
20:29:32 | FromDiscord | <threefour> Doing `createThread` with a bunch of infinite-looping procs that await a `Channel.recv()` seems to be working so far for me. |
20:29:54 | FromDiscord | <threefour> (edit) "await a" => "block on" |
20:32:28 | FromDiscord | <Phil> Yeah but you're actually thinking in how many threads you have, less in just tasks that may be computed on different threads and for which you don't care where/how they get executed |
20:36:05 | * | jmdaemon quit (Ping timeout: 240 seconds) |
20:38:57 | * | beholders_eye joined #nim |
20:46:16 | FromDiscord | <nocturn9x> question |
20:46:35 | FromDiscord | <nocturn9x> is it possible to manipulate numpy arrays with numpy without scinim? |
20:46:41 | FromDiscord | <nocturn9x> it's a pretty heavy dependency |
20:46:53 | FromDiscord | <nocturn9x> and I only need this for quite literally 3 lines of code |
20:47:08 | FromDiscord | <nocturn9x> if I do like `arr[0] = 1` the entire array is set to 1 |
20:47:20 | FromDiscord | <nocturn9x> (edit) "numpy" => "nimpy" |
20:53:16 | FromDiscord | <nocturn9x> I guess I need `toTensor()`? |
20:57:33 | * | beholders_eye quit (Ping timeout: 272 seconds) |
21:13:09 | FromDiscord | <nocturn9x> I think I'm almost there |
21:13:24 | FromDiscord | <nocturn9x> only thing I need to figure out is how to turn a "numpy array in nim" back into `PyObject` |
21:13:30 | FromDiscord | <nocturn9x> so I can return it from my `exportpy` func |
21:14:12 | FromDiscord | <nocturn9x> also scinim doesn't compile: `/home/nocturn9x/.nimble/pkgs2/scinim-0.2.5-123625cbd61116b14d229ace3cd62269e4b63f7e/scinim.nim(1, 24) Error: cannot open file: ./scinim/signals/signals` |
21:16:08 | FromDiscord | <nocturn9x> fixed it by importing just `scinim/numpyarrays` |
21:16:10 | FromDiscord | <nocturn9x> kinda clunky tho |
21:19:39 | * | ntat quit (Quit: Leaving) |
21:22:08 | * | beholders_eye joined #nim |
21:34:23 | * | jmdaemon joined #nim |
22:00:51 | * | def- quit (Quit: -) |
22:01:07 | * | def- joined #nim |
22:07:49 | * | def- quit (Quit: -) |
22:08:43 | * | def- joined #nim |
22:11:58 | * | def- quit (Client Quit) |
22:12:46 | * | def- joined #nim |
22:20:32 | * | xet7 quit (Ping timeout: 260 seconds) |
22:33:08 | * | xet7 joined #nim |
22:50:57 | * | jmdaemon quit (Ping timeout: 256 seconds) |
23:26:07 | FromDiscord | <graveflo> anyone know why nimsuggest would crash every time it tries to run with a `Error: cannot open '/usr/lib/system.nim'`. It doesn't seem to matter where I run nimsuggest from, or the PWD. I haven't had an issue building from source like this before. The only thing that has changed (that I know of)is that `/etc/nim/nim.cfg` exists |
23:27:44 | FromDiscord | <graveflo> actually it seems like removing the config file stops that from happening. I presume that is a bug since that config location is supposed to be valid? |
23:35:24 | * | sadome joined #nim |
23:35:24 | * | sadome quit (Excess Flood) |
23:38:31 | * | krux02 quit (Remote host closed the connection) |
23:49:35 | * | SEP quit (Ping timeout: 252 seconds) |
23:56:46 | * | SEP joined #nim |