<< 12-10-2023 >>

00:57:59FromDiscord<dddeserttt> hello all. Does anyone know how i could use nim to discover my routers ip address or my "Public" ip address
00:58:41*beholders_eye quit (Ping timeout: 255 seconds)
01:00:49*beholders_eye joined #nim
01:17:23FromDiscord<Elegantbeef> As far as I know you cannot fetch public IP without sending a request out
01:17:24FromDiscord<Elegantbeef> No clue about how best to get router IP
01:19:09FromDiscord<demotomohiro> Implement STUN with Nim?↵https://en.wikipedia.org/wiki/STUN
01:29:14FromDiscord<dddeserttt> @ElegantBeouf im fine with that just need to know how to do it
01:33:05FromDiscord<intellij_gamer> sent a code paste, see https://play.nim-lang.org/#ix=4IN4
01:33:19FromDiscord<intellij_gamer> (edit) "https://play.nim-lang.org/#ix=4IN4" => "https://play.nim-lang.org/#ix=4IN5"
01:35:01FromDiscord<dddeserttt> thank you king
01:35:30FromDiscord<dddeserttt> heres a very large and complicated follow up. where would one go to look how to make a p2p app.
01:36:05FromDiscord<Elegantbeef> `std/net` with reference on any C or similar P2P example code
01:36:47FromDiscord<dddeserttt> hmm
01:36:53FromDiscord<dddeserttt> thank you
01:37:08FromDiscord<intellij_gamer> There is also an example by status using [libp2p](https://github.com/status-im/nim-libp2p/)↵https://status-im.github.io/nim-libp2p/docs/tutorial_6_game/
01:37:33FromDiscord<dddeserttt> i saw that and it went very much over my head
01:41:44*Jjp137 quit (Quit: Leaving)
01:46:06*Jjp137 joined #nim
02:15:19FromDiscord<that_dude.> In reply to @dddeserttt "heres a very large": When you get to nat hole punching, https://pdos.csail.mit.edu/papers/p2pnat.pdf is a good read. I think I've gone down a very similar road as you are
02:53:02*dtomato quit (Ping timeout: 260 seconds)
02:53:22*dtomato joined #nim
03:11:13*derpydoo quit (Read error: Connection reset by peer)
03:23:51*beholders_eye quit (Ping timeout: 260 seconds)
04:04:48FromDiscord<dddeserttt> Interesting
04:07:13FromDiscord<sOkam! 🫐> is it possible to turn an iterator into a seq directly? 🤔
04:07:28FromDiscord<Elegantbeef> What does that mean?
04:07:40FromDiscord<Elegantbeef> An iterator is practically a coroutine to make it a seq you have to iterate it
04:08:52FromDiscord<sOkam! 🫐> sent a code paste, see https://paste.rs/JJjbC
04:08:56FromDiscord<Elegantbeef> `toSeq`
04:09:10FromDiscord<sOkam! 🫐> oh there is toseq for iterators? i had no clue
04:09:18FromDiscord<Elegantbeef> `std/sequtils`
04:10:36FromDiscord<Elegantbeef> `toSeq` is for all iterable types technically
04:10:47FromDiscord<sOkam! 🫐> i see
04:11:05*azimut quit (Ping timeout: 252 seconds)
04:11:05FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4INw
04:31:26*azimut joined #nim
04:54:13FromDiscord<user2m> Im trying to learn how to wrap a c library for nim. to do that do I have to compile the library first as a .dll ? (I.e. for windows)
04:59:13FromDiscord<Elegantbeef> There are many ways to use C libraries
04:59:31FromDiscord<Elegantbeef> You can compile them to static libraries, dynamic libraries, compile the source directly in Nim
05:00:47FromDiscord<user2m> any learning resources? I'm reading https://github.com/PMunch/futhark atm
05:03:05FromDiscord<Elegantbeef> An example of the latter is https://github.com/beef331/wasm3/blob/master/src/wasm3/wasm3c.nim↵But I do not have any better resources on hand
05:15:52*alphacentauri quit (Quit: WeeChat 4.0.5)
05:16:24FromDiscord<sOkam! 🫐> In reply to @user2m "any learning resources? I'm": if futhark supports your usecase, its the best option
05:16:54FromDiscord<sOkam! 🫐> aside from that, you will need to compile the code, which massively depends on what you are trying to wrap exactly (each project is different)
05:17:16FromDiscord<sOkam! 🫐> (edit) "aside from that, you will need to compile the code, which massively depends on what you are trying to wrap exactly (each project is different) ... " added "and how you then link with it (dynamic/static)"
05:22:06FromDiscord<sOkam! 🫐> sent a long message, see http://ix.io/4INJ
05:32:00*alphacentauri joined #nim
05:47:35*rockcavera quit (Remote host closed the connection)
06:06:34*alphacentauri quit (Quit: WeeChat 4.0.5)
06:53:31*advesperacit joined #nim
07:24:55*marcus quit (Read error: Connection reset by peer)
07:25:54FromDiscord<Hamid_Bluri> building `karax` on `docker.io/nimlang/nim:1.6.14-alpine-onbuild` fails 😦
07:26:40FromDiscord<Hamid_Bluri> is there anything to tell nimble that it's a "dev dependency" like in npm?
07:26:52*marcus joined #nim
07:31:39*azimut quit (Ping timeout: 252 seconds)
07:41:16*FromDiscord quit (Ping timeout: 255 seconds)
07:41:16*NimEventer quit (Ping timeout: 255 seconds)
07:41:55*FromDiscord joined #nim
07:42:05*NimEventer joined #nim
07:46:41FromDiscord<nnsee> fails how?
07:57:39Amun-Rahmm, have a require in a task preparing dev env?
08:08:02*junaid_ joined #nim
08:19:07*junaid_ quit (Remote host closed the connection)
08:50:19FromDiscord<tommy_plugg> sent a long message, see http://ix.io/4Fz8
08:53:17FromDiscord<that_dude.> <@&371760044473319454>
09:15:14*junaid_ joined #nim
09:22:28*junaid_ quit (Remote host closed the connection)
09:38:19*alphacentauri joined #nim
11:22:40*beholders_eye joined #nim
12:07:37*junaid_ joined #nim
12:10:38*junaid_ quit (Remote host closed the connection)
12:17:27*derpydoo joined #nim
12:17:56FromDiscord<nervecenter> In reply to @user2m "any learning resources? I'm": The compiler user guide is a great tool in this scenario
12:17:57FromDiscord<nervecenter> https://nim-lang.org/docs/nimc.html
12:18:51FromDiscord<nervecenter> Flags like `--dynlibOverride:<lib>` and `--dynlibOverrideAll` and `--passL:<lib>` are all useful
12:19:12FromDiscord<nervecenter> You'll also need to know which pragmas to attach to a C function signature (different for dynamic and static linking)
12:20:02FromDiscord<nervecenter> This should get you started: https://nim-lang.org/docs/backends.html
12:20:44FromDiscord<nervecenter> (edit) "(different" => "(slightly different" | "linking)" => "linking, or for piecemeal vs monolithic library files)"
12:21:44FromDiscord<nervecenter> Generally you'll be using `{.importc.}`, occasionally you'll need to use `{.importc:<function>.}`
12:22:00FromDiscord<nervecenter> (edit) "`{.importc:<function>.}`" => "`{.importc:"c_function".}`"
12:22:41*arkanoid quit (Ping timeout: 255 seconds)
12:22:52FromDiscord<nervecenter> For dynamic libs you'll need the `{.dynlib:"library".}` pragma: https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import
12:23:52FromDiscord<nervecenter> I also recommend wrapping the FFI signature in a very Nim-like proc that does all the conversions and can interface to the rest of your code as idiomatic Nim
12:24:11FromDiscord<nervecenter> Don't force yourself to use `pointer` or `cstring` or other FFI stuff in the rest of your program
12:57:56*beholders_eye quit (Ping timeout: 258 seconds)
13:12:36*beholders_eye joined #nim
13:12:52*junaid_ joined #nim
13:18:52*junaid_ quit (Remote host closed the connection)
13:33:29FromDiscord<mratsim> In reply to @user2m "Im trying to learn": https://status-im.github.io/nim-style-guide/interop.c.html
13:42:12FromDiscord<demotomohiro> In reply to @user2m "Im trying to learn": https://internet-of-tomohiro.netlify.app/nim/clibrary.en
13:49:06FromDiscord<.aingel.> In reply to @user2m "Im trying to learn": Which library are you trying to wrap if you can share?
13:49:20FromDiscord<.aingel.> I'm thinking of writing a small guide/blogpost about wrapping since I wrapped a couple libraries myself
13:49:38FromDiscord<.aingel.> So it would be cool to know what you are wrapping as well so I can see if what I'm doing will apply to yours as well
13:50:55FromDiscord<ieltan> I've thought about wrapping simdjson but there's no C api
13:52:01FromDiscord<.aingel.> In reply to @ieltan "I've thought about wrapping": I already wrapped it!
13:52:08FromDiscord<.aingel.> I'll put it out as a nimble package soon
13:52:37FromDiscord<.aingel.> I'll ping you when I put it out, should be in a couple days
14:27:03NimEventerNew thread by Akito: Compiling on i386: Pointer size mismatch between Nim and C/C++ backend, see https://forum.nim-lang.org/t/10547
14:37:18FromDiscord<demotomohiro> i386 is very old CPU released in 1985.↵Such a old machine has enough RAM to run Nim compiler?
14:45:11FromDiscord<ieltan> In reply to @.aingel. "I already wrapped it!": Oh, nice!
14:45:31FromDiscord<ieltan> Thanks for the hard work 😀
14:45:50FromDiscord<ieltan> Do you have a git repo out there though ?
14:52:06FromDiscord<.aingel.> In reply to @ieltan "Do you have a": Will be there shortly! I'll try and push it today
14:52:09FromDiscord<.aingel.> Will ping you for sure
15:33:51*junaid_ joined #nim
15:42:10FromDiscord<Chronos [She/Her]> Ah... How should I use the `IdGenerator`? Not sure here
15:46:45*junaid_ quit (Remote host closed the connection)
16:19:22*lucerne quit (Quit: Ping timeout (120 seconds))
16:19:28*notchris quit (Ping timeout: 252 seconds)
16:20:03*Ekho quit (Remote host closed the connection)
16:20:25*oprypin quit (Quit: No Ping reply in 180 seconds.)
16:21:29*lumidify quit (Ping timeout: 258 seconds)
16:21:44*oprypin joined #nim
16:21:51*lucerne joined #nim
16:22:26*lumidify joined #nim
16:23:09*notchris joined #nim
16:23:55*Ekho joined #nim
16:30:35*azimut joined #nim
16:33:00FromDiscord<freakyHipster> Is there a guide or example how to use a client certificate when making a http request
16:33:48FromDiscord<jviega> Not that I've seen; I don't think you can even directly do that without wrapping the OpenSSL calls for it yourself
16:34:17FromDiscord<freakyHipster> Does not sound like fun 😦
16:34:45FromDiscord<jviega> Virtually nobody uses client certs in practice though
16:34:51FromDiscord<jviega> Otherwise it probably would be wrapped
16:35:41FromDiscord<freakyHipster> Really? I thought mTLS was a thing
16:36:37FromDiscord<jviega> Depends, for device-to-device stuff a little, but not as much as one would want; even standards like SPIFFE have not taken off
16:38:33FromDiscord<freakyHipster> Alrite, thanks
16:38:51FromDiscord<jviega> What are you trying to do?
16:39:11FromDiscord<freakyHipster> Making a http request with a client certificate
16:39:20FromDiscord<jviega> For what purpose I mean
16:39:41Amun-Raauthorization
16:39:55Amun-RaauthenticatioN*
16:40:20FromDiscord<freakyHipster> We roll out a small application on our servers and the idea was to use certificates from our PKI↵Pretty much what Icinga2 does
16:41:02Amun-Rathat's quite common practice when one needs to have something more than just user/password
16:41:15FromDiscord<jviega> And your intent is to issue each client its own cert and run your own CA internally??
16:41:52FromDiscord<freakyHipster> Yeah
16:42:10FromDiscord<jviega> And how are you planning to distribute and manage client certs?
16:42:19FromDiscord<freakyHipster> Ansible
16:42:29FromDiscord<freakyHipster> Together with the application
16:43:12FromDiscord<jviega> But leaving the client private keys unencrypted?
16:44:04FromDiscord<freakyHipster> Yes
16:45:35FromDiscord<jviega> Then you're adding a tremendous amount of management overhead for no real benefit over a shared-secret based solution, for instance have your ansible process get a JWT token for that machine that the client must pass.
16:47:42FromDiscord<jviega> Unless you're going to have people manually add passwords to decrypt keys when workloads start up, you're just making everyone's life harder without any benefit if you try to use mtls
16:48:55FromDiscord<freakyHipster> Well, except the machines already get certificates anyway
16:49:48FromDiscord<freakyHipster> But yes, that's preferred to wrapping openssl
16:51:17FromDiscord<jviega> Well just use the cert ID as the shared secret, why pay the overhead of more expensive ops
16:56:56FromDiscord<freakyHipster> How would you revoke a jwt token ?
16:57:19FromDiscord<Phil> blacklist typically
16:57:36FromDiscord<jviega> Glancing through the source for the net module, looks like there is probably support; theres PSK support and I see hints that you can probably somehow set a client cert in the underlying SslCtx object
16:57:36FromDiscord<Phil> That and expiry timestamps
16:57:48FromDiscord<jviega> Yeah
16:58:19FromDiscord<jviega> Generally much simpler than also running an OCSP2 server
16:58:42FromDiscord<Phil> Note that you should write a job to clear out that table every expiry-timestamp x 2 or so time interval
16:58:49FromDiscord<Phil> (edit) "expiry-timestamp" => "expiry-interval"
16:59:10FromDiscord<Phil> If you have huge traffick and don't want blacklist lookups to take forever
16:59:22FromDiscord<Phil> If you don't, then don't bother
17:01:52FromDiscord<freakyHipster> Alrite, thanks for the input
17:03:52FromDiscord<jviega> I can dig into it more later if you really want to go the client cert route, but my advice is sound and I would shy you away from it anyway 🙂
17:03:57FromDiscord<freakyHipster> I found the sslctx stuff as well but it kinda stops there
17:04:55FromDiscord<freakyHipster> No thanks I'll switch to jwt.
17:05:19FromDiscord<jviega> Good plan 🙂
17:07:11FromDiscord<freakyHipster> Except I know have to expand the jwt stuff on the backend while the PKI already works↵https://docs.python-requests.org/en/latest/user/advanced/#client-side-certificates
17:07:38FromDiscord<freakyHipster> Hard to believe I'm the only one 😦
17:08:07FromDiscord<freakyHipster> Signing off, battery hates me.↵Thanks again
17:08:18FromDiscord<jviega> Does request not have a cert param then?
17:08:53FromDiscord<jviega> Again I can go spelunking for you later.
17:13:39FromDiscord<odexine> In reply to @isofruit "blacklist typically": ? Isn’t the point of a JWT to not need look ups?
17:15:20FromDiscord<jviega> Depends, if you keep long-lived secrets you will generally want to be able to deal w/ one getting compromised
17:20:30FromDiscord<Phil> In reply to @odexine "? Isn’t the point": Generally yes, it is however none the less a pretty common tactic to use that to deal with JWTs
17:22:11FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IQz
17:22:25FromDiscord<Phil> Because the plurals are throwing me for a loop
17:23:39FromDiscord<jviega> That's right
17:23:43FromDiscord<jviega> GParamFlags is a type
17:24:00FromDiscord<Phil> Yeh, it's an enum that for some godforsaken reason was pluralized
17:24:02FromDiscord<jviega> That's not a varargs function
17:24:33FromDiscord<Phil> The naming makes me expect a "haha gotcha" moment
17:24:38FromDiscord<jviega> Very rare to see varargs in C, and if you don't see `va_list` then you haven't hit one
17:24:41FromDiscord<Phil> (edit) "moment" => "moment, but maybe I'm just paranoid"
17:28:02FromDiscord<odexine> In reply to @jviega "Depends, if you keep": Well, iirc many people recommend against doing so with JWT
17:28:46FromDiscord<jviega> From using long-lives secrets? Yes, but people do it anyway because refresh has management overhead
17:29:00FromDiscord<jviega> The real world sucks for security people sometimes 😉
17:29:29FromDiscord<odexine> Just keep the first four words and it’s still true ain’t it
17:29:45FromDiscord<jviega> Depends on the day I guess
17:33:40*arkanoid joined #nim
17:34:01arkanoidwhere's the extra byte coming from? https://play.nim-lang.org/#ix=4IQH
17:34:34FromDiscord<jviega> Alignment
17:37:19arkanoidjviega: https://play.nim-lang.org/#ix=4IQK
17:37:43arkanoidwell, clearly your answer is right, but I have to wrap my head around this.
17:39:59FromDiscord<jviega> Do you understand that variant fields will only be the aligned size of the largest member?
17:43:42FromDiscord<jviega> It isn't "big enough to hold all fields", it's "big enough to hold the largest field"
17:48:57FromDiscord<demotomohiro> In other word, sizeof object variants doesn't get larger by adding more fields to the enum type and more fields.↵It is similar to union type in C.
17:51:41arkanoidthanks a lot, but if the size of the variant object is the size of the largest variant, where is the "kind" stored? There's no space for it
17:51:52FromDiscord<jviega> That's a separate field
17:52:23FromDiscord<jviega> Which is used to determine what type is stored in the variant object
17:52:32arkanoidso sizeof(MyVariantObject) doesn't include it
17:52:38FromDiscord<jviega> It's called the 'discriminator'
17:52:40FromDiscord<jviega> Correct
17:53:31FromDiscord<jviega> Well, depends on what you mean there, it's a field in your object, just not the same as your variant field
17:53:39arkanoidmmm, ok, I wonder where is it then. It it magically stored before or next the struct in memory and hidden from user?
17:54:00FromDiscord<jviega> It's a field in the object your variant is encased in
17:54:09FromDiscord<jviega> It's not in the variant record itself
17:57:05arkanoidso how can I know the size in memory of a variant object? is it sizeof(MyVarianObject) + sizeof(MyKind) ?
17:57:31FromDiscord<jviega> Depends on alignment, but usually.
18:10:12arkanoidthanks again
18:10:25FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4IQZ
18:10:30FromDiscord<Chronos [She/Her]> `using` feels odd to me
18:10:47FromDiscord<Chronos [She/Her]> I'd also love to use `do` more but the pragma ruins the look f
18:24:22FromDiscord<taperfade> guyssss
18:24:26FromDiscord<taperfade> i have a question
18:25:02FromDiscord<taperfade> what are the things in those squiggly brackets
18:25:07FromDiscord<taperfade> {}
18:25:14FromDiscord<taperfade> like .async.
18:25:31FromDiscord<demotomohiro> It is a pragma.
18:25:40FromDiscord<taperfade> whats that
18:26:53FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#pragmas
18:32:51FromDiscord<taperfade> Ooh
18:39:04FromDiscord<Chronos [She/Her]> Basically python decorators but better
19:10:17FromDiscord<Chronos [She/Her]> I'm working on just implementing the authorisation flow for a user in my chat app before working on the spec some more
19:10:52FromDiscord<Chronos [She/Her]> Tho something that's probably really easy, I'm not sure how I should make a 'mock db' of users
19:11:03FromDiscord<Chronos [She/Her]> Or if I should just hardcode values and such until I implement that stuff
19:11:52FromDiscord<graveflo> hard code them / store dynamic content in memory unless you need them to persist on disk.. eg for testing. Just use the file system in that case for mockup
19:52:57FromDiscord<Chronos [She/Her]> Gucci, thanks
20:11:07FromDiscord<System64 ~ Flandre Scarlet> https://programming-language-benchmarks.vercel.app/c-vs-nim↵Is this website good for benchmarks?
20:12:25FromDiscord<Chronos [She/Her]> Wish I could put the library version in the package docs tbh, would be nice
20:12:52FromDiscord<Chronos [She/Her]> But don't think there's a way to put constants into doc comments lol
20:13:05FromDiscord<.aingel.> In reply to @sys64 "https://programming-language-benchmarks.vercel.app/": The consensus is that a lot of bookmarks are not really valid
20:13:12FromDiscord<.aingel.> (edit) "bookmarks" => "benchmarks"
20:13:17FromDiscord<.aingel.> (edit) "valid" => "meaningful"
20:13:52FromDiscord<.aingel.> (edit) "The consensus" => "A common notion"
20:15:08FromDiscord<System64 ~ Flandre Scarlet> In reply to @.aingel. "A common notion is": So benchmarking is basically useless?
20:15:42FromDiscord<Elegantbeef> Yes
20:15:58FromDiscord<Elegantbeef> When it comes to system languages benchmarks mean less than nothing
20:16:00FromDiscord<Elegantbeef> It only shows the cleverness of the programmer and in some cases it's a complete lie
20:16:10FromDiscord<Elegantbeef> Look at the Nim vs. Rust benchmarks
20:16:19FromDiscord<Elegantbeef> Some rust implementations use SIMD whilst the Nim variation does not
20:17:26FromDiscord<Elegantbeef> https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/mandelbrot/9.rs↵↵https://github.com/hanabi1224/Programming-Language-Benchmarks/blob/main/bench/algorithm/mandelbrot/1.nim
20:17:37FromDiscord<Elegantbeef> "Why is Nim 200ms slower, must be dogshit"
20:17:46FromDiscord<Elegantbeef> Meanwhile the Rust impl uses simd....
20:22:33FromDiscord<System64 ~ Flandre Scarlet> Is there some sources that says Nim is performant?
20:25:18FromDiscord<muddmaker> Performance is always somewhat contextual and relative
20:27:28FromDiscord<muddmaker> Here's another language competition that's been going around: <https://github.com/jinyus/related_post_gen>
20:30:06FromDiscord<muddmaker> Nim was pretty fast, but over languages have had more optimizations done recently
20:32:44FromDiscord<System64 ~ Flandre Scarlet> In reply to @muddmaker "Nim was pretty fast,": It looks slow compared to Go or Rust
20:33:11FromDiscord<System64 ~ Flandre Scarlet> also, some data is missing↵Which versions? Which flags?
20:34:53FromDiscord<muddmaker> In reply to @sys64 "It looks slow compared": Nim can also be improved
20:34:56FromDiscord<ieltan> In reply to @sys64 "https://programming-language-benchmarks.vercel.app/": No, it's kind of a meme
20:37:36FromDiscord<Elegantbeef> Me I am a source that says that
20:37:58NimEventerNew post on r/nim by winsome28: Learning Nim: Write an Interpreter [Episode 02], see https://reddit.com/r/nim/comments/176gsab/learning_nim_write_an_interpreter_episode_02/
20:38:09FromDiscord<Elegantbeef> With system languages it's almost always down to the programmer
20:38:10FromDiscord<Elegantbeef> As such any conversation on the matter is pointless
20:43:23*advesperacit quit ()
20:56:22FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4IRm
20:56:36FromDiscord<Chronos [She/Her]> Trying to compile with `nim doc`
20:56:48FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4IRn
20:58:08FromDiscord<Chronos [She/Her]> Ah wait
20:58:40FromDiscord<Chronos [She/Her]> Okay nope
20:58:45FromDiscord<Chronos [She/Her]> Not sure how I'd do this
20:59:22FromDiscord<.aingel.> Can I emit a "break" statment from a proc
20:59:36FromDiscord<.aingel.> I want to run a proc and for it to emit a break if it's called inside a loop
21:02:48FromDiscord<intellij_gamer> In reply to @chronos.vitaqua "Why doesn't this work?": Think it's just treating `s` as a normal string. Could use [% formatting](https://nim-lang.org/docs/strutils.html#%25%2Cstring%2CopenArray%5Bstring%5D) instead maybe?
21:04:00FromDiscord<Chronos [She/Her]> That doesn't work rip, I'm wanting it to use the constants available from the current scope
21:06:12FromDiscord<Chronos [She/Her]> I wish doc comments could use that formatting for embedding constants in them oof
21:08:09FromDiscord<Chronos [She/Her]> In reply to @chronos.vitaqua "Why doesn't this work?": Beef, any clues?
21:08:16FromDiscord<Chronos [She/Her]> Is this a useless task?
21:17:06FromDiscord<raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4IRu
21:17:09FromDiscord<demotomohiro> In reply to @.aingel. "I want to run": proc cannot do that. You need to use template or macro.
21:18:01FromDiscord<Chronos [She/Her]> In reply to @.aingel. "I want to run": You could make it return bool and do `if myproc(): break`
21:20:24FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4IRw
21:21:17FromDiscord<demotomohiro> And c is just a macro calls newcommentStmtNode.
21:21:47FromDiscord<Chronos [She/Her]> Oh that works, thanks!
21:26:44FromDiscord<Chronos [She/Her]> Is there a way to export a template but not have docs generated for it? :p
21:46:14FromDiscord<.aingel.> In reply to @demotomohiro "proc cannot do that.": How do I do that in a macro? I looked up an example for macros but it was pretty complicated
21:48:16FromDiscord<Chronos [She/Her]> A template should be enough for your usecase
21:48:41FromDiscord<Chronos [She/Her]> Ugh... Can't figure out how to import a Nim file (from within my project) in the nimble file
21:48:51*alphacentauri quit (Quit: WeeChat 4.0.5)
21:49:48FromDiscord<.aingel.> In reply to @chronos.vitaqua "Ugh... Can't figure out": include?
21:49:50FromDiscord<.aingel.> Is that what you want
21:50:17FromDiscord<.aingel.> oh, nimble file, nvm
21:50:36FromDiscord<Chronos [She/Her]> Yeah, issue is I can't find the dir I need to import
21:50:48FromDiscord<Chronos [She/Her]> `import ./src/nulid/private/constants` doesn't work
21:52:31FromDiscord<.aingel.> Oh I think you need the absolute path
21:53:31FromDiscord<Chronos [She/Her]> That's... bs f
22:09:56*raynei joined #nim
22:23:20*xet7 quit (Remote host closed the connection)
22:31:09*derpydoo quit (Read error: Connection reset by peer)
22:54:23FromDiscord<_gumbercules> welcome to the shitshow that is Nimble
23:14:25*raynei quit (Ping timeout: 255 seconds)
23:14:25*alphacentauri joined #nim
23:16:23FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "Ugh... Can't figure out": this is one of the main reasons I ended up abandoning nimble in favor of confy, even against my own will
23:25:36*alphacentauri quit (Quit: WeeChat 4.0.5)
23:46:33*tk quit (Remote host closed the connection)
23:47:51*tk joined #nim
23:52:28*alphacentauri joined #nim
23:58:31FromDiscord<taperfade> Is it worth learning c if nim exists
23:58:47FromDiscord<taperfade> Ive been considering it bcs my friends use it
23:59:23*adium joined #nim