<< 14-05-2024 >>

00:11:29FromDiscord<nocturn9x> huh
00:11:39FromDiscord<nocturn9x> In reply to @chronos.vitaqua "Noise as in using": lol thx...
00:11:46FromDiscord<nocturn9x> In reply to @nocturn9x "huh": an interesting problem has occurred
00:11:52FromDiscord<nocturn9x> I can run my project fine on my laptop
00:12:06FromDiscord<nocturn9x> but when I try to execute the `uci` command on the same project compiled on my server
00:12:13FromDiscord<nocturn9x> which is an intel mini pc with a fairly old i5
00:12:16FromDiscord<nocturn9x> it segfaults
00:12:31FromDiscord<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:34FromDiscord<nocturn9x> if it were a CPU compatibility issue, I'd expect the executable to not boot up at all
00:13:39FromDiscord<nocturn9x> but other things are working fine
00:21:48FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=XQSCAkCs
00:21:53FromDiscord<nocturn9x> it segfaults on the second assignment
00:22:00FromDiscord<nocturn9x> I have confirmed that the constructor runs until the end
00:22:03FromDiscord<nocturn9x> so that's not the issue
00:22:11FromDiscord<Robyn [She/Her]> Maybe it's using an instruction unavailable on the current CPU?
00:22:11FromDiscord<nocturn9x> is `create` returning `nil`?
00:22:19FromDiscord<nocturn9x> that would trigger an IOT fault
00:22:23FromDiscord<nocturn9x> this is a segmentation fault
00:22:29FromDiscord<Robyn [She/Her]> Ah
00:22:31FromDiscord<nocturn9x> it's a memory issue
00:23:10FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=PVYMecpe
00:23:14FromDiscord<nocturn9x> nope
00:23:17FromDiscord<nocturn9x> value type
00:23:26FromDiscord<nocturn9x> as I said, everything works fine on my laptop
00:23:31FromDiscord<nocturn9x> it just breaks on my server
00:23:34FromDiscord<nocturn9x> same exact code
00:23:55FromDiscord<Robyn [She/Her]> Yeah I'm not gonna be useful then, sorry and good luck
00:24:03FromDiscord<nocturn9x> thanks for trying anyway :)
00:24:48FromDiscord<nocturn9x> yeah, `create` is returning `nil`
00:24:54FromDiscord<nocturn9x> what in the-
00:25:02FromDiscord<nocturn9x> it's even using the same allocator on both machines
00:25:04FromDiscord<nocturn9x> _how_
00:25:46FromDiscord<nocturn9x> and it's nil only for one thing too
00:25:48FromDiscord<nocturn9x> lol wtf-
00:26:37systemdsucksbut is it the same nim version?
00:27:07FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=DeduGoJr
00:27:11FromDiscord<nocturn9x> down to the same exact commit hash
00:27:52FromDiscord<nocturn9x> yeah, if I switch from `create` to `cast[ptr T](alloc0(sizeof(T)))` it works
00:27:55FromDiscord<nocturn9x> _what_
00:28:51FromDiscord<nocturn9x> so `create` is failing only on one platform and only for one type
00:28:57FromDiscord<nocturn9x> again, _what_
00:29:11FromDiscord<nocturn9x> I have several other `create` calls sprinkled over the code and those work fine
00:29:19FromDiscord<nocturn9x> or, at least, it seems they do
00:29:41FromDiscord<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:15FromDiscord<nocturn9x> well at least the fix was simple but like
00:30:17FromDiscord<nocturn9x> _weird_
00:30:26FromDiscord<nocturn9x> gonna have to investigate
01:01:41FromDiscord<polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=XBwMDFJM
01:24:41*jmdaemon joined #nim
01:25:10FromDiscord<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:02FromDiscord<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:07FromDiscord<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:33FromDiscord<pusewicz> Mmmm, recursive module dependencies!
05:04:50FromDiscord<pusewicz> Do I just put all the type definitions in a separate file then? 😐
05:06:51FromDiscord<Elegantbeef> You can do delayed imports
05:07:05FromDiscord<Elegantbeef> But yea most people do not futz with that
05:07:08FromDiscord<Elegantbeef> I do cause I hate myself
05:07:57FromDiscord<pusewicz> Yeah, not very elegant.
05:08:23FromDiscord<Elegantbeef> Single pass compiler does be single pass 😄
05:08:46FromDiscord<pusewicz> Ew. now I have to export all the types.
05:08:48FromDiscord<pusewicz> FFS
05:09:01FromDiscord<Elegantbeef> Then try delayed imports
05:09:18FromDiscord<Elegantbeef> Though that only works well if procedures are not cyclically dependant
05:09:32*coldfeet joined #nim
05:09:33FromDiscord<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:55FromDiscord<pusewicz> Actually, you are right @polylokh_39446. I'll just make it work, then I'll make it pretty.
05:10:01FromDiscord<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:59FromDiscord<pusewicz> https://github.com/pusewicz/wave-function-collapse-nim/blob/main/src/cell.nim#L39: Error: identifier expected
05:19:45FromDiscord<Elegantbeef> You did `= array`
05:19:57FromDiscord<Elegantbeef> This compiler error sucks but it should be `: array`
05:20:05FromDiscord<pusewicz> urg
05:20:41FromDiscord<pusewicz> Thank you!
05:21:33*def- quit (Quit: -)
05:37:09FromDiscord<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:13FromDiscord<Elegantbeef> What a wild issue 😄
06:10:30FromDiscord<pusewicz> I don’t understand. It’s exported, defined. What am I doing wrong?
06:11:04FromDiscord<polylokh_39446> you haven't updated your code yet, the version on github still has the =array
06:12:09FromDiscord<pusewicz> True
06:14:12FromDiscord<pusewicz> Pushed
06:19:02*rockcavera quit (Remote host closed the connection)
06:21:35FromDiscord<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:52FromDiscord<Elegantbeef> For me with that code there is a `neighbour`s error
06:28:46FromDiscord<pusewicz> Correct.
06:28:57FromDiscord<pusewicz> Which is also defined and exported?
06:29:20FromDiscord<polylokh_39446> which is also a circular dependency between cell and model
06:29:55FromDiscord<pusewicz> Right, so... ugh. I need to re-structure the code?
06:31:42FromDiscord<polylokh_39446> yep.
06:32:13FromDiscord<polylokh_39446> looks like model and cell are the only problems there
06:32:30FromDiscord<polylokh_39446> minimally, you could combine them in a single model and use foreward declarations and call it a day
06:33:14FromDiscord<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:36NimEventerNew 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:10Amun-RaI know it works but… is it safe to cast[string](a_seq_of_chars)?
07:11:26FromDiscord<Elegantbeef> Not if anything ever passes it to `cstring`
07:12:16Amun-RaI just print the value for debugging purposes, no other conversions are made
07:20:27FromDiscord<Elegantbeef> Could do `toOpenArray(0, str.high)` 😄
07:20:31FromDiscord<Elegantbeef> That's safe
07:26:05Amun-Raoh
07:26:07Amun-Raright
07:31:00Amun-Rait'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:44Amun-Rahmm, I wanted to write an example but it works on play.nim, weird…
08:05:21FromDiscord<pmunch> In reply to @Elegantbeef "Not if anything ever": Why wouldn't that work?
08:06:03FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=fWxkrgRy
08:24:23FromDiscord<solitudesf> In reply to @pmunch "Why wouldn't that work?": because '\0' terminator would be missing
08:28:57FromDiscord<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:58FromDiscord<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:40FromDiscord<ieltan> I feel like the feature should be bug-free and polished first 😅
09:20:37FromDiscord<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:11FromDiscord<pusewicz> Which is the preferred LSP server for Nim?
09:45:19FromDiscord<nnsee> In reply to @pusewicz "Which is the preferred": nimlangserver
09:45:37FromDiscord<nocturn9x> quick question
09:45:51FromDiscord<nocturn9x> any idea why spawning 12 threads would consume a fuckton of memory?
09:46:06FromDiscord<nocturn9x> like I have 48GiB of RAM and the chess engine manages to occupy over 32
09:46:19FromDiscord<nocturn9x> and there's _nothing_ even remotely close to that size
09:46:37FromDiscord<nocturn9x> the biggest item is a shared 64MiB transposition table
09:46:43FromDiscord<nocturn9x> but as I said that's shared across threads
09:46:51FromDiscord<nocturn9x> also, `createThread()` is slow af
09:47:47FromDiscord<nocturn9x> does `atomicArc` fuck with multiple threads somehow?
09:48:37FromDiscord<nocturn9x> In reply to @nocturn9x "like I have 48GiB": correction: over 42
09:48:45FromDiscord<nocturn9x> In reply to @nocturn9x "does `atomicArc` fuck with": happens with bare ARC too
09:49:40FromDiscord<Phil> I assume something gets allocated 1000 times and given the thread doesn't get destroyed it keeps staying around
09:49:48FromDiscord<nocturn9x> but what could it possibly be
09:49:55FromDiscord<nocturn9x> let me show you the code
09:49:59FromDiscord<Phil> I'm out of crystal balls
09:50:03FromDiscord<solitudesf> In reply to @nocturn9x "any idea why spawning": does it grow proportionally with more threads?
09:50:06FromDiscord<nocturn9x> yes
09:50:16FromDiscord<nocturn9x> it seems like it's duplicating the entire address space
09:50:19FromDiscord<nocturn9x> as if it were forking
09:50:32FromDiscord<nocturn9x> let me test with just one extra worker
09:51:05FromDiscord<solitudesf> fork doesnt actually copy the entire address space
09:51:05FromDiscord<nocturn9x> yeah it grows with every thread
09:51:12FromDiscord<nocturn9x> yeah I know it's CoW
09:51:38FromDiscord<nocturn9x> also did not realize how slow creating a thread is, damn
09:51:51FromDiscord<nocturn9x> might wanna use a thread pool
09:52:05FromDiscord<nocturn9x> but that doesn't explain the huge memory usage
09:53:32FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=oQMkcbZB
09:53:38FromDiscord<nocturn9x> for reference this is the code that spawns the workers
09:53:47FromDiscord<nocturn9x> as soon as they're all created, memory usage goes through the roof
09:54:07FromDiscord<nocturn9x> `workers` is a global module-level variable that's private
09:54:12FromDiscord<nocturn9x> it's just a `seq`
09:54:38FromDiscord<nocturn9x> the history table is about 400KiB and the killers table is even smaller
09:54:45FromDiscord<nocturn9x> so that can't be it
09:58:41FromDiscord<nocturn9x> it wasn't doing this before, when I didn't allocate `SearchManager` objects on the heap
10:00:11FromDiscord<nocturn9x> _ohhhh_
10:00:23FromDiscord<nocturn9x> `create` doesn't take `n sizeof(T)`...
10:00:28FromDiscord<nocturn9x> does it
10:00:37FromDiscord<nocturn9x> it already does the multiplication internally?
10:01:02FromDiscord<nocturn9x> oh my god what an idiot
10:01:50*tanami joined #nim
10:16:51FromDiscord<nocturn9x> so yeah apparently I was allocating over 70 GiB to each thread
10:16:52FromDiscord<nocturn9x> for no reason
10:17:04FromDiscord<nocturn9x> I just didn't think `create` already did the multiplication on its own... upsie
10:21:55FromDiscord<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:34FromDiscord<kots> https://nim-lang.github.io/Nim/manual_experimental.html#view-types
10:31:48*gst joined #nim
10:56:09FromDiscord<madonuko> why can't I do `{.push async.}`
10:56:18FromDiscord<madonuko> `invalid pragma: async`
10:59:04FromDiscord<odexine> Async isn’t a “regular pragma”
10:59:15FromDiscord<odexine> Push can’t push certain pragma
11:11:53FromDiscord<Phil> Does asyncdispatch have an equivalent to threadsignalptr in chronos?
11:53:09FromDiscord<pusewicz> sent a code paste, see https://play.nim-lang.org/#pasty=nBnbIcdC
12:04:44FromDiscord<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:44FromDiscord<pusewicz> sent a long message, see https://pasty.ee/DsqnnkUr
12:34:12FromDiscord<ringabout> `wangid` is not a value can be computed in the compile time. You Could use `let` instead of `const`
13:03:22FromDiscord<pusewicz> Ah, idiot me, Have not noticed that I put const.
13:21:28FromDiscord<bung8954> any datetime lib format datetime for normal users ?
13:37:40*beholders_eye quit (Ping timeout: 255 seconds)
13:44:14FromDiscord<pusewicz> In reply to @ringabout "`wangid` is not a": Thank you!
13:44:37FromDiscord<ringabout> No problem
13:46:01FromDiscord<kuku> https://matomo.org/wp-content/uploads/2022/07/privacy.png
13:49:41FromDiscord<nnsee> er... what?
13:59:46FromDiscord<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:00FromDiscord<odexine> id say just assume its a mispaste
14:24:10anddampfff only 2 bytes IP address masking…
14:39:32FromDiscord<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:07FromDiscord<Phil> ... How exactly do you add the raises pragma to a proc?
16:06:11FromDiscord<Phil> generated via macro
16:09:57FromDiscord<odexine> what happened with what you tried?
16:13:56FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=UedtWipQ
16:15:02FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=kFvxNcZr
16:15:24FromDiscord<Phil> Not the problem really 😛
16:15:35FromDiscord<Robyn [She/Her]> Same result either way?
16:16:28FromDiscord<odexine> what's myproc as a treerepr
16:17:23FromDiscord<Phil> In reply to @chronos.vitaqua "Same result either way?": Yeh
16:17:42FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=fOTIkDNd
16:17:52FromDiscord<odexine> lol
16:18:21FromDiscord<odexine> that made me physically laugh lmao
16:19:09FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=udwhUQZq
16:20:04FromDiscord<Phil> basically addPragma is busted
16:20:18FromDiscord<Phil> Just assign directly via the pragma operator
16:22:01FromDiscord<Robyn [She/Her]> Lovely
16:22:06FromDiscord<Robyn [She/Her]> You gonna PR a fix?
16:22:33FromDiscord<Robyn [She/Her]> Wait
16:22:43FromDiscord<Robyn [She/Her]> No, that seems like expected behaviour, Phil
16:23:38FromDiscord<Robyn [She/Her]> Passing the colon expr would be no problem
16:41:06FromDiscord<kuku> https://appfair.org/
16:41:27FromDiscord<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:05FromDiscord<saint.___.> This app fair thing is interesting actually
16:52:14FromDiscord<saint.___.> But the person does look like a spammer I guess
16:52:29FromDiscord<saint.___.> Maybe he's a benevolent spammer
16:52:35FromDiscord<odexine> been way longer than 60 seconds though so unfortunately...
16:52:38FromDiscord<saint.___.> Or some bot that someone is testing out
16:57:07FromDiscord<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:56FromDiscord<saint.___.> Makes sense!
17:14:50FromDiscord<threefour> sent a long message, see https://pasty.ee/ajyihpwu
17:17:22FromDiscord<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:36FromDiscord<michaelb.eth> as if they're network agents talking to each other
17:18:45FromDiscord<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:29FromDiscord<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:46FromDiscord<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:11FromDiscord<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:05FromDiscord<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:34FromDiscord<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:16FromDiscord<polylokh_39446> but you can confirm this with strace.
17:29:58FromDiscord<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:23FromDiscord<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:05FromDiscord<System64 ~ Flandre Scarlet> Hi, does Nim have List Comprehension?
17:49:00FromDiscord<bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=kdJpXgBv
17:50:40FromDiscord<odexine> In reply to @sys64 "Hi, does Nim have": sugar has `collect`
17:51:41FromDiscord<saint.___.> In reply to @sys64 "Hi, does Nim have": Ya sugar collect is really good
17:52:02FromDiscord<System64 ~ Flandre Scarlet> In reply to @saint.___. "Ya sugar collect is": Does it work with const too?
17:59:14FromDiscord<saint.___.> In reply to @sys64 "Does it work with": Not sure!
18:01:04FromDiscord<kots> what does working with const mean?
18:01:09FromDiscord<kots> sent a code paste, see https://play.nim-lang.org/#pasty=JBDroDHl
18:01:44FromDiscord<michaelb.eth> In reply to @sys64 "Does it work with": yep!↵https://play.nim-lang.org/#pasty=yTvKCfhN
18:01:57FromDiscord<kots> great minds
18:08:23FromDiscord<nocturn9x> anyone know of any nice-ish wrapper around `builtin_prefetch` for clang/gcc?
18:08:37FromDiscord<nocturn9x> speaking of which, how would I use a C compiler intrinsic from Nim?
18:10:37FromDiscord<michaelb.eth> In reply to @nocturn9x "speaking of which, how": importc with `<intin.h>`?
18:11:02FromDiscord<polylokh_39446> if it works like a function, you wrap it like anything. In a pinch you can always use emit
18:12:02FromDiscord<polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=KtPLqiPn
18:12:09FromDiscord<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:33FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=nHAjCoDy
18:14:42FromDiscord<nocturn9x> (edit) "https://play.nim-lang.org/#pasty=NfyhAfMc" => "https://play.nim-lang.org/#pasty=DPACFcGH"
18:14:58FromDiscord<nocturn9x> (edit) "https://play.nim-lang.org/#pasty=jfuSaZQx" => "https://play.nim-lang.org/#pasty=LhgAvlVH"
18:15:10FromDiscord<System64 ~ Flandre Scarlet> In reply to @michaelb.eth "yep! https://play.nim-lang.org/#pasty=yTvKCfhN": Perfect for lookup tables!
18:15:17FromDiscord<kots> sent a code paste, see https://play.nim-lang.org/#pasty=DuRWifPJ
18:16:02FromDiscord<kots> In reply to @sys64 "Perfect for lookup tables!": my example was pretty good too :(
18:20:48FromDiscord<bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=RRjqWLRk
18:21:29FromDiscord<bulletxbt> Can't really provide the data, it's 180mb and contains private info
18:21:36FromDiscord<bulletxbt> (edit) "data," => "data I'm unpacking,"
18:21:55FromDiscord<kots> try `headerData[0].addr`
18:22:18FromDiscord<kots> you also need to newSeq(headerStringSize )
18:23:15FromDiscord<kots> (edit) "newSeq(headerStringSize" => "newSeq[byte](headerStringSize"
18:24:24FromDiscord<bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=QBvNnkGe
18:24:50FromDiscord<bulletxbt> sent a code paste, see https://play.nim-lang.org/#pasty=gnxKYuia
18:24:55FromDiscord<kots> yeah the latter
18:25:01FromDiscord<bulletxbt> Thanks I'll try
18:25:04FromDiscord<kots> with `=` instead of `:` there
18:25:11FromDiscord<bulletxbt> 👍
18:25:32FromDiscord<bulletxbt> In reply to @k0ts "with `=` instead of": It worked, thanks :)
18:25:36FromDiscord<kots> pog
18:25:52FromDiscord<bulletxbt> Took me a few day and you did it in 30 secs
18:25:56FromDiscord<bulletxbt> (edit) "day" => "days"
18:26:04FromDiscord<kots> :3
18:26:43FromDiscord<bulletxbt> `func toString` is the asterisk used so you can import it from another module? I've forgotten
18:26:51FromDiscord<kots> yes
18:26:54FromDiscord<bulletxbt> Alr
18:37:05FromDiscord<motatertot> # Teen content and onlyfans leaks here :peach: :underage: : https://discord.gg/xxxhubs @everyone @here
18:37:27FromDiscord<motatertot> # Teen content and onlyfans leaks here :peach: :underage: : https://discord.gg/xxxhubs @everyone @here
18:40:11FromDiscord<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:38FromDiscord<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:39FromDiscord<__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:04FromDiscord<__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:53NimEventerNew Nimble package! cozylogwriter - Basic zero-dependency logging with automatic colors and styling for Nim., see https://github.com/indiscipline/cozytaskpool
19:51:30FromDiscord<Phil> squint
19:51:34FromDiscord<Phil> squint
19:53:41FromDiscord<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:57FromDiscord<Phil> (edit) "usebal" => "usable"
19:54:44FromDiscord<Zoom> And what do you need?
19:55:24*beholders_eye joined #nim
19:55:42FromDiscord<Phil> A threadpool that doesn't basically hotspin if I try to run an async task on it
19:56:10FromDiscord<Phil> Which currently happens on both weave_io and taskpool due to the way their work-stealing algo works
19:56:15FromDiscord<Phil> Can't cope with chronos ThreadSignalPtr
19:56:52FromDiscord<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:02FromDiscord<Phil> (edit) "functional.↵It" => "functional with async.↵It"
20:00:01FromDiscord<Phil> ~~I also need a way to deal with exceptions getting thrown in the async block of chronos, but that's separate
20:00:03FromDiscord<Phil> (edit) "separate" => "separate~~"
20:04:00*jmdaemon joined #nim
20:12:15FromDiscord<Zoom> I wouldn't call that library above abstraction at all. More of a "shove it out of sight" approach.
20:13:51FromDiscord<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:17FromDiscord<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:50FromDiscord<Zoom> Fair enough
20:22:40*beholders_eye quit (Ping timeout: 246 seconds)
20:23:02*rockcavera joined #nim
20:29:32FromDiscord<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:54FromDiscord<threefour> (edit) "await a" => "block on"
20:32:28FromDiscord<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:16FromDiscord<nocturn9x> question
20:46:35FromDiscord<nocturn9x> is it possible to manipulate numpy arrays with numpy without scinim?
20:46:41FromDiscord<nocturn9x> it's a pretty heavy dependency
20:46:53FromDiscord<nocturn9x> and I only need this for quite literally 3 lines of code
20:47:08FromDiscord<nocturn9x> if I do like `arr[0] = 1` the entire array is set to 1
20:47:20FromDiscord<nocturn9x> (edit) "numpy" => "nimpy"
20:53:16FromDiscord<nocturn9x> I guess I need `toTensor()`?
20:57:33*beholders_eye quit (Ping timeout: 272 seconds)
21:13:09FromDiscord<nocturn9x> I think I'm almost there
21:13:24FromDiscord<nocturn9x> only thing I need to figure out is how to turn a "numpy array in nim" back into `PyObject`
21:13:30FromDiscord<nocturn9x> so I can return it from my `exportpy` func
21:14:12FromDiscord<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:08FromDiscord<nocturn9x> fixed it by importing just `scinim/numpyarrays`
21:16:10FromDiscord<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:07FromDiscord<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:44FromDiscord<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