<< 11-12-2021 >>

00:02:13*[R] quit (Ping timeout: 240 seconds)
00:07:34*[R] joined #nim
00:20:49*PMunch quit (Quit: leaving)
00:46:51FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3HEs
00:47:12FromDiscord<Rika> so a LRU cache?
00:47:13FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3HEs" => "https://play.nim-lang.org/#ix=3HEt"
00:47:22FromDiscord<TryAngle> ah yes exactly thaat, forgot tit's name
00:47:25FromDiscord<TryAngle> (edit) "tit's" => "it's"
00:47:29FromDiscord<TryAngle> (edit) "thaat," => "that,"
00:47:35FromDiscord<Rika> prolly 3rd party
00:57:45*noeontheend joined #nim
00:58:11FromDiscord<valerga> how does nim have so many backends/targets, c, cpp, objc, js, seems like a lot of work?
01:01:17FromDiscord<Elegantbeef> it has a code gen phase that is somewhat hookable
01:01:38FromDiscord<Elegantbeef> So you need to take the Nim code then emit semantically correct backend and send it to where it needs to go
01:06:26*lumo_e quit (Ping timeout: 268 seconds)
01:18:54*krux02 quit (Remote host closed the connection)
01:25:35FromDiscord<Sabena Sema> In reply to @valerga "how does nim have": well, C, cpp, and objc are very similar in terms of what the code looks liike
01:25:38FromDiscord<Sabena Sema> (edit) "liike" => "like"
01:26:09FromDiscord<Sabena Sema> nim isn't emitting the kind of code that a human would write in those languages
01:26:10FromDiscord<Rika> They share a lot of their code base yes
01:26:15FromDiscord<Sabena Sema> (edit) "nim isn't emitting the kind of code that a human would write in those languages ... " added "either"
01:26:48FromDiscord<Sabena Sema> so it needs to generate just a subset of all the "normal" patterns you'd see in code
01:27:29FromDiscord<leorize> the C++ backend is really just the C backend but with exceptions \:p
01:28:43FromDiscord<Sabena Sema> are nim's C exceptions typcially just sjlj style
01:29:23FromDiscord<leorize> if you use arc then it's kinda like an if statement
01:29:46FromDiscord<leorize> "goto exceptions", as we call it
01:29:56FromDiscord<Sabena Sema> (I'm convinced that C++ table based exception handling could be implemented much, much better (in particular in the matching phase of exception catching) if you can exploit {.final.} / final exceptions
01:30:06FromDiscord<Sabena Sema> (edit) "exceptions" => "exceptions)"
01:30:20FromDiscord<leorize> sjlj is the default for non-arc gc, though
01:30:45FromDiscord<Sabena Sema> none of the c++ implementations around can exploit that though, since they can't really break exceptions ABI and their implementations were designed before final was a "thing"
01:31:24FromDiscord<leorize> c++ people are looking into a redesign of exceptions and it looks pretty good
01:32:00*noeontheend quit (Quit: noeontheend)
01:32:43FromDiscord<Sabena Sema> herbceptions is unlikely to happen in the next decade
01:33:03FromDiscord<Sabena Sema> it's a good idea, but has zero actual traction in wg21
01:33:16FromDiscord<Sabena Sema> (edit) "it's a good idea, but has zero actual traction in wg21 ... " added "in terms of people actually doing the work to get it through"
01:33:31FromDiscord<leorize> thankfully nim is not c++ so we can steal it and beat them to the punch \:p
01:33:58FromDiscord<leorize> in fact we have a similar proposal made by Araq
01:34:08FromDiscord<Sabena Sema> like it's a whole new error handling facility, many people are not convinced that adding another separate error handling facility to the core lang is needed (the usual outcome here is that we get some insane library metaprogramming approach)
01:34:12FromDiscord<leorize> it suffers from the same fate, though
01:34:21FromDiscord<Sabena Sema> Quirky exceptions?
01:35:05FromDiscord<leorize> https://github.com/nim-lang/Nim/issues/8363
01:35:54FromDiscord<Sabena Sema> hmm, even nim's exception semantics shouldn't require an allocation
01:35:57FromDiscord<Sabena Sema> I don't think C++'s do
01:36:02FromDiscord<Sabena Sema> (edit) "I don't think ... C++'s" added "even"
01:36:20FromDiscord<leorize> c++ do for most practical use of it, unfortunately
01:36:37FromDiscord<Sabena Sema> only on itanium abi
01:38:43FromDiscord<Sabena Sema> you can pre-allocate even on itanium-abi, so you can still handle out of memory by exception (although most systems that follow itanium-abi for c++ overcommit anyway, so that point is moot)
01:38:43*noeontheend joined #nim
01:39:34FromDiscord<leorize> nim pretty much do the same thing, the allocation is still awful, though
01:40:04FromDiscord<leorize> maybe it will be dealt with by the time nim 3.0 comes, if ever \:p
01:41:05FromDiscord<Sabena Sema> personally I would like a way to hook into exceptions and write the implementation in library code
01:41:21FromDiscord<Sabena Sema> but ... composition is a total nightmare
01:41:45FromDiscord<leorize> yea, customizability is a double-edged sword
01:42:16FromDiscord<Sabena Sema> the problem is when exceptiosn can flow through like, random other stack frames
01:42:41FromDiscord<Sabena Sema> sjlj and c++ style tables allow this by construction
01:44:24FromDiscord<Sabena Sema> the return value or hidden pointer methods don't necessarily allow this without using like, a tls global, which can have bad consiquences
01:44:29FromDiscord<Sabena Sema> (edit) "consiquences" => "consequences"
01:44:37FromDiscord<Sabena Sema> I think Ada takes the more control flow oriented approach
01:44:49FromDiscord<Sabena Sema> or at least gnat does
01:46:41FromDiscord<Sabena Sema> glib/gobject is the hidden pointer approach
01:46:51FromDiscord<Sabena Sema> and seems to work fairly well in practice
01:48:08*noeontheend quit (Remote host closed the connection)
01:50:25FromDiscord<Sabena Sema> I like this PR and the discussion so far
01:50:35FromDiscord<Sabena Sema> well this issue rahter
01:52:27FromDiscord<leorize> nim has a hidden pointer in tls for this as well
01:52:39FromDiscord<leorize> it works well enough, i suppose
01:53:08FromDiscord<Sabena Sema> gobject does the pointer just at the end of the argument list for functions that can raise
01:53:10FromDiscord<Sabena Sema> no tls
01:54:15FromDiscord<Sabena Sema> using tls is only really a problem because of limited tls slots and because it can cause optimizers to do bad things, because they see the global write and have to assume they don't have a complete picture of the world
01:55:53FromDiscord<leorize> the nice thing about nim is that you know for sure most code won't be threaded
01:56:20FromDiscord<leorize> well, not nice thing, rather
01:57:50FromDiscord<Sabena Sema> do you though?
01:58:07FromDiscord<Sabena Sema> and, just not being threaded doesn't eliminate the problems with optimizers
01:59:16FromDiscord<Sabena Sema> notably errno and Get/SetLastError have like, actual special runtime support from the OS
01:59:25FromDiscord<leorize> yes you do, because threading is just too hard in nim the moment you need to throw memory around \:p
01:59:26FromDiscord<Sabena Sema> at least Get/SetLastError is not stored using normal tls
01:59:56FromDiscord<Sabena Sema> eagh, I've done it before
01:59:58FromDiscord<Sabena Sema> it's not that bad
02:00:30FromDiscord<Sabena Sema> I've even done it with two other gcs running in process (both a python interpreter and the C# CLR runtime)
02:00:43FromDiscord<Sabena Sema> it was a party
02:00:50FromDiscord<leorize> you give up anything that have the word `ref` in it, though
02:00:56FromDiscord<Sabena Sema> no
02:01:03FromDiscord<leorize> isolate was meant to solve this, but it didn't
02:01:18FromDiscord<Sabena Sema> when you need to share refs you just pin them and take a pointer
02:02:18FromDiscord<leorize> with a lot of work, you can get threading done, but it's a lot of work
02:02:37FromDiscord<Sabena Sema> if you are doing multithreaded programming and don't understand your memory ownership model things are bound to fail anyway
02:03:26FromDiscord<Sabena Sema> and, fwiw, the fact memory management is thread local really does make things faster in general
02:04:53FromDiscord<leorize> the effect on speed so far has been minimal, unfortunately
02:05:38FromDiscord<leorize> there are several piece of work being done on moving memory across thread in nim but most of them are not going well
02:05:40FromDiscord<Sabena Sema> really? I thought nim's alloc and delete beat most malloc implementations by quite a bit
02:06:50FromDiscord<leorize> tslf is O(1), but it also means that you give up some special work that other allocators can do for small sizes since the time has to be constant
02:07:13FromDiscord<leorize> and in threading mode Nim's allocator is protected by a single mutex
02:07:23FromDiscord<Sabena Sema> also: once a ref is pinned on the allocating thread you can inc and dec the refcount without atomic operations (on amd64)
02:07:50FromDiscord<Sabena Sema> it's very common to have a single allocator lock
02:08:27*src quit (Quit: Leaving)
02:10:12FromDiscord<Sabena Sema> it definitely does start to get into "juggling razorblades" territory, but I guess in my case I already had three gcs running (one of which was _moving_ and was sharing memory between all three, so the razorblades were very much already in the air
02:11:12FromDiscord<Sabena Sema> all different kinds of automatic memory management (refcounting, deffered refcounting, thread local rc, basic mark/sweeb bdwgc style gc, and compacting gc) have uses for different kinds of programs
02:11:27FromDiscord<Sabena Sema> and ofc the fastest gc of "never free anything"
02:15:07FromDiscord<leorize> the lock is fine until you have to juggle 10k threads \:p
02:15:32FromDiscord<Sabena Sema> yesp
02:15:34FromDiscord<Sabena Sema> (edit) "yesp" => "yep"
02:15:37FromDiscord<Sabena Sema> depends what they are doing too
02:15:41FromDiscord<leorize> one of the thing we are researching is moving computation and data between threads, and nim refs are horrible for that at the moment
02:16:00FromDiscord<Sabena Sema> but if you are like, a usual java program 10k threads with a global lock will end up with everyone piled on that lock quite a bit
02:16:27FromDiscord<Sabena Sema> that's true
02:17:29FromDiscord<leorize> not only that isolate doesn't work at runtime, orc cycle collection makes it impossible to move refs safely as it peeks into the refcount for trial deletion
02:17:39FromDiscord<leorize> which is not atomic...
02:18:00FromDiscord<Sabena Sema> it just reads though right?
02:18:55FromDiscord<leorize> yes but if the count is not correctly synchronized, an object might be prematurely freed
02:19:05FromDiscord<leorize> which it usually is not when you juggle them around threads
02:19:28FromDiscord<Sabena Sema> how can that happen if the actual writes to the count are correctly synchronized?
02:20:01FromDiscord<leorize> the writes are not synchronized, they are not atomics
02:20:08FromDiscord<Sabena Sema> oh
02:20:09FromDiscord<Sabena Sema> yeah
02:20:36FromDiscord<Sabena Sema> then your pretty screwed (although things might "just work" on x86 lol)
02:20:54FromDiscord<leorize> afaik in loony (mpmc ref object queue) they currently use a full fence to "hopefully" force the count to synchronize
02:21:13FromDiscord<Sabena Sema> two concurrent refs racing and resulting in only one increment then those two unrefs later not racing and resulting in two derefs
02:25:12FromDiscord<leorize> the folks working on loony do their work with \>10k objects so their "luck" to get desynchronized counts are a bit too high for comfort \:p
02:25:43FromDiscord<leorize> so right now they are looking at making refcount atomics and try to figure out ways to make atomics not have to happen
02:25:57FromDiscord<Sabena Sema> just copying the objects into a shared heap using like SmartPtr or whatever seems easier
02:26:28FromDiscord<Sabena Sema> the idea is that the queue transfers ownership at both ends or no?
02:33:16FromDiscord<leorize> pretty much, though I could be wrong, the goal is to move continuations between threads
03:12:29*arkurious quit (Quit: Leaving)
03:16:26*jmdaemon joined #nim
03:58:34*noeontheend joined #nim
04:04:01*jmdaemon quit (Quit: WeeChat 3.3)
04:04:17*jmd joined #nim
04:04:48*jmd quit (Client Quit)
04:05:02*jmdaemon joined #nim
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:28*jmdaemon quit (Client Quit)
04:06:30*supakeen joined #nim
04:06:42*jmdaemon joined #nim
04:08:17*jmdaemon quit (Client Quit)
04:08:34*jmdaemon joined #nim
04:22:45*jmdaemon quit (Ping timeout: 252 seconds)
04:41:56*jmdaemon joined #nim
05:19:47nrds<Prestige99> Is https://github.com/moigagoo/nimage the current nimage package? I see an older one with less stars that's linked on nimble.directory
05:20:14nrds<Prestige99> ohoh I looked at the wrong repo
05:23:10nrds<Prestige99> actually wanted https://github.com/haldean/nimage
05:40:13FromDiscord<baalajimaestro> Does nim have something like a file that would let people nimble install deps much easily?↵↵Something like python requirements.txt or Rust's Cargo.toml
05:41:43nrds<Prestige99> Packages would have a .nimble file with dependencies listed, then you can install with `nimble install -d`
05:41:56nrds<Prestige99> e.g. https://github.com/treeform/pixie/blob/master/pixie.nimble
05:43:53FromDiscord<baalajimaestro> on the case of pixie, I do a `nimble install -d` from the root of the clone, right?
05:46:48FromDiscord<Rika> yes
05:56:53nrds<Prestige99> Is there a simple way to init a 2d seq with zeroed entries? like if I wanted a 3x3 grid of booleans for instance
05:57:38nrds<Prestige99> or x by y in general, doesn't have to be a square
06:01:23*noeontheend quit (Ping timeout: 252 seconds)
06:11:33FromDiscord<Rika> in general a rectangular 2d seq can be distilled into a 1d seq with NxM entries
06:11:53FromDiscord<Rika> it is also better at performance and holding the rectangular invariant
06:12:32FromDiscord<Rika> you can make wrapper procs `[](seq, tuple[int, int])` and `[]=`
06:12:46nrds<Prestige99> good point. I thought there may be a lib for it but I can just write a simple one
06:19:56nrds<Prestige99> hm I wish I could do proc `[][]`(this: Foo, x, y: int)
06:20:01nrds<Prestige99> and call it like myArr[0][1]
06:22:33nrds<Prestige99> https://play.nim-lang.org/#ix=3HFr What's wrong here? Something weird with generics
06:25:23*jmdaemon quit (Ping timeout: 250 seconds)
06:25:48nrds<Prestige99> oh, I have to do `get[bool](s, 1, 2)
06:25:54nrds<Prestige99> that's.. odd?
06:26:42FromDiscord<Elegantbeef> Why wouldnt you have to
06:26:58nrds<Prestige99> Couldn't the type be inferred from s?
06:27:25FromDiscord<Elegantbeef> Ah sorry read the wrong proc
06:28:05FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3HFs
06:28:14FromDiscord<Elegantbeef> Yep
06:28:16nrds<Prestige99> Yeah fixed that
06:28:23FromDiscord<Elegantbeef> There's the error 😛
06:29:37nrds<Prestige99> oh so this compiles but nimlsp is still showing errors, that's all
06:31:56nrds<Prestige99> https://play.nim-lang.org/#ix=3HFt Elegantbeef do you know any magic I could pull to use something nicer than get/set function names?
06:32:09nrds<Prestige99> Like I was speaking about above, s[0][1] = true or whatever
06:33:03FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3HFu
06:33:17nrds<Prestige99> oh neat
06:33:25FromDiscord<Sabena Sema> In reply to @nrds "<Prestige> hm I wish": you can do this with a little temporary object, but just using foo[x,y] is just ... better
06:34:07FromDiscord<Sabena Sema> a 1D array of NxM is better in every single way then the insane ragged N pointers to N elements thing you see in C
06:34:26nrds<Prestige99> Yeah for sure
06:35:00FromDiscord<Sabena Sema> and, unlike in C++ you can actually use the subscript operator for it
06:35:26*rockcavera joined #nim
06:35:26*rockcavera quit (Changing host)
06:35:26*rockcavera joined #nim
06:39:44*jmdaemon joined #nim
07:18:31nrds<Prestige99> Does std/monotimes getMonoTime actually use nanoseconds? I'm running a bit of code that seems to take about 14 seconds, but it's reporting back 14452299 nanoseconds (which is about 14 milliseconds)
07:18:55nrds<Prestige99> Would make sense if it were actually microseconds
07:23:05FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Tz9
07:26:20nrds<Prestige99> Weird. If my code is running so fast I wonder why it's taking 14 seconds to echo that it's finished and exit
07:26:40nrds<Prestige99> https://github.com/avahe-kellenberger/maze_bench_nim for reference
07:27:15nrds<Prestige99> Compiling for danger and speed
07:29:14FromDiscord<Elegantbeef> 14 seconds you say? 😀
07:29:46FromDiscord<Elegantbeef> It's taking much longer than 14 seconds here
07:30:06nrds<Prestige99> Yep
07:30:30FromDiscord<Elegantbeef> I dont kno wwhat to say it seems to work fine
07:30:53nrds<Prestige99> But the measured time is way off?
07:31:11FromDiscord<Elegantbeef> Did the above example work?
07:31:51nrds<Prestige99> Yeah. What times printed for you in this maze benrhmark?
07:32:07FromDiscord<Elegantbeef> Was taking too long
07:32:09FromDiscord<Elegantbeef> Stopped it
07:33:25nrds<Prestige99> Mind running it till it exits?
07:41:44FromDiscord<Elegantbeef> If it takes hours i hate you
07:42:57nrds<Prestige99> Lol well it takes me 14 seconds so hopefully not very long for you
07:43:16FromDiscord<Elegantbeef> Still running
07:43:33nrds<Prestige99> I wonder if it's just hanging after finishing for some odd reason
07:43:56FromDiscord<Elegantbeef> 0 seconds
07:44:17FromDiscord<Elegantbeef> Your warmup takes a bunch of time i reason
07:44:57nrds<Prestige99> Hmm yeah
07:54:39FromDiscord<valerga> anything nicer than
07:54:42FromDiscord<valerga> ?
07:54:46FromDiscord<valerga> sent a code paste, see https://play.nim-lang.org/#ix=3HFQ
07:54:58FromDiscord<valerga> if I don't know the number of iterations
08:09:40FromDiscord<Michal58> Make an infinite natural numbers iterator
08:12:06FromDiscord<Michal58> sent a code paste, see https://paste.rs/69Q
08:14:05FromDiscord<valerga> that works, thanks
09:28:57*jjido joined #nim
09:36:19*Colt quit (Remote host closed the connection)
11:40:50*src joined #nim
11:40:51ozzzHi! Which editor/ide with nim support is the best functions and performance vise? I mean not the VScode, it eats alot of ram and cpu
11:43:32FromDiscord<tbrekalo> is there something as .clang-format for nim?
11:50:13FromDiscord<Rika> No
11:50:19FromDiscord<Rika> Best is nimpretty
11:50:25FromDiscord<Rika> Rather closest
11:53:04FromDiscord<victorNine> Hi! I am trying to run a binary compiled in Nim on OpenWRT witch uses WolfSSL. Is there any way to compile for that?
11:53:24FromDiscord<victorNine> (Testing out Nim so pretty new to it)
11:55:12FromDiscord<Rika> I know there is a way but I do not know what it is
11:59:44FromDiscord<hmmm> In reply to @ozzz "Hi! Which editor/ide with": micro, you "install" it, auto recognizes nim synthax, applies nimsuggest each save. Zero config, no extensions, justworks.jpg
12:00:50FromDiscord<hmmm> good defaults, and you can use a mouse like sane people do 😋
12:01:23FromDiscord<hmmm> you can also F7 to compile and run but you have to set it
12:01:25FromDiscord<Rika> Honestly the best editors allow for both mouse+kb and kb only usage
12:02:57FromDiscord<hmmm> honestly we should stop funnelling people into VSCode just because we happen to have a clunky extension that kind of works on it but not really. VSCode is a terrible editor
12:06:01*supakeen quit (Quit: WeeChat 3.3)
12:06:31*supakeen joined #nim
12:09:22FromDiscord<pmunch> Mouse? What is this heresy you speak of?
12:13:44*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:14:31*terminalpusher joined #nim
12:17:38FromDiscord<pmunch> I use Vim with NimLSP. Works fairly well, although the LSP implementation could use some love↵(<@709044657232936960_ozzz=5b=49=52=43=5d>)
12:25:37FromDiscord<pmunch> [victorNine](https://matrix.to/#/@victor9:feneas.org)\: OpenWRT is a kind of Linux system isn't it, just very stripped down?
12:32:05FromDiscord<Rika> yes
12:32:35FromDiscord<Rika> In reply to @hmmm "honestly we should stop": i honestly dont see the difference between your beloved editor and vsc
12:38:22*jmdaemon quit (Quit: WeeChat 3.3)
12:42:30FromDiscord<victorNine> Yes it is
12:48:46FromDiscord<Abi> sent a code paste, see https://play.nim-lang.org/#ix=3HH7
12:49:11FromDiscord<Abi> (edit)
12:49:59FromDiscord<Abi> (edit) "https://play.nim-lang.org/#ix=3HH7" => "https://play.nim-lang.org/#ix=3HH8"
12:50:06FromDiscord<Rika> are you using async or closure iterators
12:50:28FromDiscord<Abi> No, and what?
12:50:57FromDiscord<Rika> `iterator ...(...): ... {.closure.} =` i think
12:51:04FromDiscord<Michal58> In reply to @hmmm "honestly we should stop": Hmm, I was just thinking about trying VScode... I have never used it (for anything) but now I'm not sure it's worth it?
12:51:21FromDiscord<Rika> or `proc ...(...): iterator(): ... = return ...`
12:52:38FromDiscord<Abi> sent a code paste, see https://play.nim-lang.org/#ix=3HH9
12:53:15FromDiscord<Rika> `adjacent in getAdjacentPoints(point):` do you mean `for ...`?
12:53:23FromDiscord<Abi> (edit) "https://play.nim-lang.org/#ix=3HH9" => "https://play.nim-lang.org/#ix=3HHa"
12:53:27FromDiscord<Abi> yeah, i mangled that when editing it in discord
12:53:30FromDiscord<Rika> okay
12:53:35FromDiscord<Rika> i see the issue then
12:53:39FromDiscord<Rika> wait not really
12:53:42FromDiscord<Abi> (edit) "https://play.nim-lang.org/#ix=3HHa" => "https://play.nim-lang.org/#ix=3HHb"
12:53:53FromDiscord<Rika> it shouldnt be an issue but since the 2nd proc is a closure proc
12:53:57FromDiscord<Rika> aka captures cave
12:54:09FromDiscord<Rika> so capturing cave whilst cave is variable...
12:54:21*rockcavera quit (Remote host closed the connection)
12:55:15FromDiscord<Rika> im still thinking why again this is not good, because i have forgotten
12:55:21FromDiscord<Abi> `iterate` modifies `cave` later on hence the `var`
12:56:07FromDiscord<Rika> handle nine should probably not be a proc within iterate
12:56:47FromDiscord<Rika> also, does iterate need to "pass cave out modified without returning it" or just needs it to be mutable?
12:57:07FromDiscord<Rika> In reply to @Rika "also, does iterate need": if this is true, make the parameter just "Cave" and do the workaround
12:57:14FromDiscord<Rika> var parameters have a different meaning
12:57:33FromDiscord<Abi> In reply to @Rika "handle nine should probably": `handleNine` modifies some other variables that are defined in `iterate`, hence that weirdness
12:58:25FromDiscord<Abi> In reply to @Rika "also, does iterate need": `iterate` needs to modify `cave` and have those changes accessible by the caller
12:58:38FromDiscord<Abi> if that makes sense, words are failing me atm lol
12:59:38FromDiscord<Rika> okay, this is the simpler question, are you returning `cave` in that tuple or some other var typed Cave?
12:59:52FromDiscord<Abi> `cave`
13:00:15FromDiscord<Rika> then make `cave` a `Cave` instead of var Cave and keep on using that workaround
13:00:30FromDiscord<Abi> gotcha
13:00:38FromDiscord<Rika> `var Cave` means that any changes you make to `cave` will "automatically" be done as well to the outer scope and not need to be returned as well
13:00:58FromDiscord<Abi> oooooooo
13:01:04FromDiscord<Abi> that's actually what i was aiming for
13:01:17FromDiscord<Rika> yes but then you cant use the nested proc xd
13:01:27FromDiscord<Abi> damnit lol
13:01:40FromDiscord<Rika> i dont exactly know why
13:01:51FromDiscord<Rika> its really better to explicitly pass everything you need
13:01:54FromDiscord<Rika> imo
13:02:25FromDiscord<Abi> probably
13:02:32FromDiscord<Abi> Either way - thanks for your help!
13:09:10FromDiscord<victorNine> Seems like SSL is not "pluggable" https://github.com/nim-lang/Nim/issues/14719
13:33:56FromDiscord<pmunch> I believe you can use https://nim-lang.org/docs/nimscript.html#patchFile%2Cstring%2Cstring%2Cstring in your config or nimble file in order to swap out the parts of the standard library to use your own SSL implementation
13:34:13FromDiscord<pmunch> Definitely not perfect, but it should at least be possible
13:38:07FromDiscord<victorNine> Thanks I'll give it a try
13:50:42*noeontheend joined #nim
13:55:17*neurocyte0132889 joined #nim
13:55:17*neurocyte0132889 quit (Changing host)
13:55:17*neurocyte0132889 joined #nim
13:59:40*noeontheend quit (Quit: noeontheend)
14:00:13*arkurious joined #nim
14:02:39FromDiscord<Cloudperry> does anyone know how to use nim.nvim with nvim-cmp?
14:03:27FromDiscord<Cloudperry> or alternatively how to make nimlsp not behave completely wrong with nvim-cmp?
14:04:31FromDiscord<Cloudperry> I have nimlsp working with nvim-cmp and nim.nvim working with asyncomplete but I don't want to use asyncomplete
14:05:40FromDiscord<Cloudperry> also nvim-cmp autocomplete pops up after every new line with nimlsp
14:06:09FromDiscord<Cloudperry> if I could get that fixed nimlsp would be just fine
14:07:30FromDiscord<Cloudperry> but I don't know how to even begin debugging that
14:07:37FromDiscord<Cloudperry> because I have 10 other language servers for nvim-cmp and they all work just fine and don't pop up autocomplete after newline
14:08:00*Colt joined #nim
14:08:17FromDiscord<Rika> dunno, i personally still use compe
14:08:27FromDiscord<Rika> i dont know how to call vimscript fns from lua
14:08:37FromDiscord<Rika> In reply to @Rika "i dont know how": you will prolly need this for cmp
14:08:56FromDiscord<Cloudperry> yeah if I wanted to use nim.nvim sure
14:09:08FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3HHB
14:09:21FromDiscord<Rika> can prolly adapt for lua somehow but i cant help for that
14:09:29FromDiscord<Rika> In reply to @Cloudperry "or alternatively how to": wrt this whats the issue?
14:09:55FromDiscord<Rika> actually i dont know how to use nimlsp so maybe pmunch
14:09:58FromDiscord<Cloudperry> its the one with autocomplete popping up after every enter/newline
14:10:29FromDiscord<Cloudperry> so its just popping up autocomplete on empty lines constantly 😄
14:26:59*Colt quit (Remote host closed the connection)
14:27:32*Colt joined #nim
14:30:39*Colt quit (Remote host closed the connection)
14:31:01*Colt joined #nim
14:32:32*Colt quit (Remote host closed the connection)
14:34:12*Colt joined #nim
14:34:29*Colt quit (Remote host closed the connection)
14:34:56*Colt joined #nim
14:35:10*Colt quit (Remote host closed the connection)
14:39:40*noeontheend joined #nim
14:42:49*noeontheend_ joined #nim
15:53:45FromDiscord<pmunch> I dont see how NimLSP could be doing that. LSP is a client/server architecture, so NimLSP is only answering requests sent from your client..
15:58:22FromDiscord<Fish-Face> I expect this is an arraymancer or local issue but I'm wondering if anyone can help. Trying to install arraymancer with nimble in docker - it works on my machine but not on someone else's. The relevant bit of build log is here: https://pastebin.com/BSvmfW23
15:59:46*PMunch joined #nim
16:02:33*noeontheend quit (Remote host closed the connection)
16:02:33*noeontheend_ quit (Remote host closed the connection)
16:05:22PMunchDon't have a lot of time today, so we'll have to solve today extra fast! Advent of Code day 11 - https://www.twitch.tv/pmunche
16:06:39FromDiscord<Fish-Face> In reply to @Fish-Face "I expect this is": never mind, a docker prune fixed it
16:06:53*jmdaemon joined #nim
16:08:02*CyberTailor left #nim (Konversation terminated!)
16:10:47*jmdaemon quit (Client Quit)
16:11:20*jmdaemon joined #nim
16:11:31*jmdaemon quit (Client Quit)
16:30:10*terminalpusher quit (Remote host closed the connection)
16:46:15*PMunch quit (Remote host closed the connection)
17:01:26FromDiscord<Cloudperry> I guess it could be because nimlsp has " " in its trigger characters
17:02:08FromDiscord<Cloudperry> In reply to @pmunch "I dont see how": I guess it could be because nimlsp has space as a trigger character
17:02:48FromDiscord<Cloudperry> but I don't know the details of trigger characters in lsp
17:04:54FromDiscord<Cloudperry> I get unwanted autocomplete popups only after typing spaces and when entering newline in indented blocks
17:17:09FromDiscord<Cloudperry> oh wow
17:17:16FromDiscord<Cloudperry> that was actually the cause
17:17:52FromDiscord<Cloudperry> just removed space from triggerCharacters and now its not popping up all the time
17:18:54FromDiscord<Cloudperry> hmm I hope this doesn't break anything
17:19:26*noeontheend joined #nim
17:49:12*noeontheend quit (Quit: noeontheend)
17:53:43*noeontheend joined #nim
18:01:57*noeontheend_ joined #nim
18:25:21*vicfred joined #nim
18:35:46*neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat)
18:36:24FromDiscord<Hamid_Bluri> Hey, I don;t understand the point of `byCopy` and `byRef` pragmas.↵↵isn't `ref object` or `object` enough ?
18:36:36FromDiscord<Hamid_Bluri> https://nim-lang.org/docs/manual.html#foreign-function-interface-bycopy-pragma
18:38:57*neurocyte0132889 joined #nim
18:38:57*neurocyte0132889 quit (Changing host)
18:38:57*neurocyte0132889 joined #nim
18:44:13*jjido joined #nim
18:52:53FromDiscord<Hamid_Bluri> In reply to @0xAb1 "Either way - thanks": https://nim-lang.org/docs/sugar.html#capture.m,varargs[typed],untyped
18:53:10FromDiscord<Hamid_Bluri> it might help you
19:00:10*vicfred quit (Quit: Leaving)
19:04:43FromDiscord<leorize> it's to control an optimization feature of nim↵(@Hamid_Bluri)
19:05:09FromDiscord<leorize> in Nim parameter passing is not as rigid as C/C++
19:05:51FromDiscord<leorize> we define these by semantics, where C/C++ have a strict definition on how parameters are always copied
19:06:41FromDiscord<leorize> this allow us to do pass large objects via reference (read\: pointers) if it is faster that way
19:07:02FromDiscord<leorize> you can imagine, though, that it would make interop with C/C++ harder than it should be
19:07:45FromDiscord<leorize> so the `{.bycopy.}`, `{.byref.}` specifiers are there to let you force it one way or another (usually you force `{.bycopy.}` because that's how C works)
19:38:20NimEventerNew thread by Jorjun_arch: Happy Christmas, see https://forum.nim-lang.org/t/8700
19:49:19*krux02_ joined #nim
19:53:52FromDiscord<Cloudperry> ok wtf is going on with my advent of code day 5 solution 😄
19:54:11FromDiscord<Cloudperry> it takes 1 minute 2 seconds on -d:debug or whatever the default is
19:54:25FromDiscord<Cloudperry> and 2 damn seconds on -d:release
19:54:43FromDiscord<Cloudperry> my solution is quite badly optimized I think
19:55:04FromDiscord<Cloudperry> but I have no idea how is it possible to get this big speedup with -d:release
19:56:04FromDiscord<Cloudperry> whoops
19:56:14FromDiscord<Cloudperry> just saw theres an advent of code channel too
20:11:54arkanoidthat is the suggested nim way to handle classical client/server architecture with client->rpc ... slow internet ... prc->server->db and back? I need to move quite large tables between
20:12:39arkanoidI'm considering using norm for the server -> db but not yet sure, it depends on which solutions I have to move large tables
20:28:53*xet7 quit (Ping timeout: 250 seconds)
20:41:51*xet7 joined #nim
20:43:56*src quit (Quit: Leaving)
20:44:41*src joined #nim
21:08:04FromDiscord<geekrelief> Is there a way to parse a string to NimNode? If not is there an easy way to convert PNode to NimNode?
21:18:27FromDiscord<Solitude> In reply to @geekrelief "Is there a way": https://nim-lang.org/docs/macros.html#parseStmt%2Cstring
21:18:58FromDiscord<geekrelief> In reply to @Solitude "https://nim-lang.org/docs/macros.html#parseStmt%2Cs": thanks!
21:22:33NimEventerNew thread by Niminem: Help with displaying only used fields in Object for JS backend, see https://forum.nim-lang.org/t/8701
21:46:40*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:07:50*jjido joined #nim
22:45:28*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:47:36FromDiscord<el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3HL4
22:48:12FromDiscord<el__maco> I'd like to have something that can be passed to a function and initialized using a constant literal, e.g. ``foo(0xaabbcc.rgba8)``
22:54:30FromDiscord<el__maco> I may have asked about anonymous unions before here, and I think the answer was that there are no such things in nim
23:05:24*lumo_e joined #nim
23:05:45*lumo_e quit (Client Quit)
23:06:23*jmdaemon joined #nim
23:07:42FromDiscord<el__maco> hmm `cast[rgba8](0xaabbcc)` seems to work. Its not pretty but I guess it will have to make do
23:10:46*jmdaemon quit (Client Quit)
23:13:59*jmdaemon joined #nim
23:14:30FromDiscord<Elegantbeef> https://github.com/alaviss/union @elmaco
23:18:07FromDiscord<evoalg> I'd like my proc to take an openarray (so it can accept both seq's and arrays) but I can't get it to work? : https://play.nim-lang.org/#ix=3HLg
23:18:51FromDiscord<Yardanico> you can't have openarray of openarrays afaik
23:18:58FromDiscord<evoalg> ahhh ok thanks
23:26:31FromDiscord<evoalg> I could use `auto` ... works, but might be bad programming practice
23:27:20FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3HLl works aswell but introduces you to concepts 😛
23:28:08FromDiscord<evoalg> oh!
23:29:34FromDiscord<Yardanico> In reply to @Elegantbeef "https://play.nim-lang.org/#ix=3HLl works aswell but": you don't really need concepts for this though (except the low == 0) :P
23:29:45FromDiscord<Elegantbeef> Indeed
23:30:04FromDiscord<Elegantbeef> The low == 0 is pretty important for preventing issues
23:30:25FromDiscord<evoalg> `o, O` ... why is both the lower & upper "oh" used?
23:30:56FromDiscord<Yardanico> o_O
23:31:06FromDiscord<Yardanico> O_o
23:31:10FromDiscord<Elegantbeef> I'm an idiot that forgot to do `, type O`
23:31:29FromDiscord<Elegantbeef> It's the same logic so one could drop the `O`
23:32:18FromDiscord<Elegantbeef> Before you ask concepts are just check lists of what types need to fulfil to match
23:33:03FromDiscord<evoalg> thank you!
23:41:00*jmdaemon quit (Quit: WeeChat 3.3)
23:41:23*jmdaemon joined #nim
23:42:20*jmdaemon quit (Client Quit)
23:42:38*jmdaemon joined #nim
23:44:53*jmdaemon quit (Client Quit)
23:45:21*jmdaemon joined #nim
23:47:03*pch joined #nim
23:47:54*jmdaemon quit (Client Quit)
23:48:12*jmdaemon joined #nim
23:48:51*neurocyte0132889 quit (Ping timeout: 250 seconds)
23:50:57*jmdaemon quit (Client Quit)