00:57:59 | FromDiscord | <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:23 | FromDiscord | <Elegantbeef> As far as I know you cannot fetch public IP without sending a request out |
01:17:24 | FromDiscord | <Elegantbeef> No clue about how best to get router IP |
01:19:09 | FromDiscord | <demotomohiro> Implement STUN with Nim?↵https://en.wikipedia.org/wiki/STUN |
01:29:14 | FromDiscord | <dddeserttt> @ElegantBeouf im fine with that just need to know how to do it |
01:33:05 | FromDiscord | <intellij_gamer> sent a code paste, see https://play.nim-lang.org/#ix=4IN4 |
01:33:19 | FromDiscord | <intellij_gamer> (edit) "https://play.nim-lang.org/#ix=4IN4" => "https://play.nim-lang.org/#ix=4IN5" |
01:35:01 | FromDiscord | <dddeserttt> thank you king |
01:35:30 | FromDiscord | <dddeserttt> heres a very large and complicated follow up. where would one go to look how to make a p2p app. |
01:36:05 | FromDiscord | <Elegantbeef> `std/net` with reference on any C or similar P2P example code |
01:36:47 | FromDiscord | <dddeserttt> hmm |
01:36:53 | FromDiscord | <dddeserttt> thank you |
01:37:08 | FromDiscord | <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:33 | FromDiscord | <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:19 | FromDiscord | <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:48 | FromDiscord | <dddeserttt> Interesting |
04:07:13 | FromDiscord | <sOkam! 🫐> is it possible to turn an iterator into a seq directly? 🤔 |
04:07:28 | FromDiscord | <Elegantbeef> What does that mean? |
04:07:40 | FromDiscord | <Elegantbeef> An iterator is practically a coroutine to make it a seq you have to iterate it |
04:08:52 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://paste.rs/JJjbC |
04:08:56 | FromDiscord | <Elegantbeef> `toSeq` |
04:09:10 | FromDiscord | <sOkam! 🫐> oh there is toseq for iterators? i had no clue |
04:09:18 | FromDiscord | <Elegantbeef> `std/sequtils` |
04:10:36 | FromDiscord | <Elegantbeef> `toSeq` is for all iterable types technically |
04:10:47 | FromDiscord | <sOkam! 🫐> i see |
04:11:05 | * | azimut quit (Ping timeout: 252 seconds) |
04:11:05 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4INw |
04:31:26 | * | azimut joined #nim |
04:54:13 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> There are many ways to use C libraries |
04:59:31 | FromDiscord | <Elegantbeef> You can compile them to static libraries, dynamic libraries, compile the source directly in Nim |
05:00:47 | FromDiscord | <user2m> any learning resources? I'm reading https://github.com/PMunch/futhark atm |
05:03:05 | FromDiscord | <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:24 | FromDiscord | <sOkam! 🫐> In reply to @user2m "any learning resources? I'm": if futhark supports your usecase, its the best option |
05:16:54 | FromDiscord | <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:16 | FromDiscord | <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:06 | FromDiscord | <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:54 | FromDiscord | <Hamid_Bluri> building `karax` on `docker.io/nimlang/nim:1.6.14-alpine-onbuild` fails 😦 |
07:26:40 | FromDiscord | <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:41 | FromDiscord | <nnsee> fails how? |
07:57:39 | Amun-Ra | hmm, 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:19 | FromDiscord | <tommy_plugg> sent a long message, see http://ix.io/4Fz8 |
08:53:17 | FromDiscord | <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:56 | FromDiscord | <nervecenter> In reply to @user2m "any learning resources? I'm": The compiler user guide is a great tool in this scenario |
12:17:57 | FromDiscord | <nervecenter> https://nim-lang.org/docs/nimc.html |
12:18:51 | FromDiscord | <nervecenter> Flags like `--dynlibOverride:<lib>` and `--dynlibOverrideAll` and `--passL:<lib>` are all useful |
12:19:12 | FromDiscord | <nervecenter> You'll also need to know which pragmas to attach to a C function signature (different for dynamic and static linking) |
12:20:02 | FromDiscord | <nervecenter> This should get you started: https://nim-lang.org/docs/backends.html |
12:20:44 | FromDiscord | <nervecenter> (edit) "(different" => "(slightly different" | "linking)" => "linking, or for piecemeal vs monolithic library files)" |
12:21:44 | FromDiscord | <nervecenter> Generally you'll be using `{.importc.}`, occasionally you'll need to use `{.importc:<function>.}` |
12:22:00 | FromDiscord | <nervecenter> (edit) "`{.importc:<function>.}`" => "`{.importc:"c_function".}`" |
12:22:41 | * | arkanoid quit (Ping timeout: 255 seconds) |
12:22:52 | FromDiscord | <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:52 | FromDiscord | <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:11 | FromDiscord | <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:29 | FromDiscord | <mratsim> In reply to @user2m "Im trying to learn": https://status-im.github.io/nim-style-guide/interop.c.html |
13:42:12 | FromDiscord | <demotomohiro> In reply to @user2m "Im trying to learn": https://internet-of-tomohiro.netlify.app/nim/clibrary.en |
13:49:06 | FromDiscord | <.aingel.> In reply to @user2m "Im trying to learn": Which library are you trying to wrap if you can share? |
13:49:20 | FromDiscord | <.aingel.> I'm thinking of writing a small guide/blogpost about wrapping since I wrapped a couple libraries myself |
13:49:38 | FromDiscord | <.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:55 | FromDiscord | <ieltan> I've thought about wrapping simdjson but there's no C api |
13:52:01 | FromDiscord | <.aingel.> In reply to @ieltan "I've thought about wrapping": I already wrapped it! |
13:52:08 | FromDiscord | <.aingel.> I'll put it out as a nimble package soon |
13:52:37 | FromDiscord | <.aingel.> I'll ping you when I put it out, should be in a couple days |
14:27:03 | NimEventer | New 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:18 | FromDiscord | <demotomohiro> i386 is very old CPU released in 1985.↵Such a old machine has enough RAM to run Nim compiler? |
14:45:11 | FromDiscord | <ieltan> In reply to @.aingel. "I already wrapped it!": Oh, nice! |
14:45:31 | FromDiscord | <ieltan> Thanks for the hard work 😀 |
14:45:50 | FromDiscord | <ieltan> Do you have a git repo out there though ? |
14:52:06 | FromDiscord | <.aingel.> In reply to @ieltan "Do you have a": Will be there shortly! I'll try and push it today |
14:52:09 | FromDiscord | <.aingel.> Will ping you for sure |
15:33:51 | * | junaid_ joined #nim |
15:42:10 | FromDiscord | <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:00 | FromDiscord | <freakyHipster> Is there a guide or example how to use a client certificate when making a http request |
16:33:48 | FromDiscord | <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:17 | FromDiscord | <freakyHipster> Does not sound like fun 😦 |
16:34:45 | FromDiscord | <jviega> Virtually nobody uses client certs in practice though |
16:34:51 | FromDiscord | <jviega> Otherwise it probably would be wrapped |
16:35:41 | FromDiscord | <freakyHipster> Really? I thought mTLS was a thing |
16:36:37 | FromDiscord | <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:33 | FromDiscord | <freakyHipster> Alrite, thanks |
16:38:51 | FromDiscord | <jviega> What are you trying to do? |
16:39:11 | FromDiscord | <freakyHipster> Making a http request with a client certificate |
16:39:20 | FromDiscord | <jviega> For what purpose I mean |
16:39:41 | Amun-Ra | authorization |
16:39:55 | Amun-Ra | authenticatioN* |
16:40:20 | FromDiscord | <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:02 | Amun-Ra | that's quite common practice when one needs to have something more than just user/password |
16:41:15 | FromDiscord | <jviega> And your intent is to issue each client its own cert and run your own CA internally?? |
16:41:52 | FromDiscord | <freakyHipster> Yeah |
16:42:10 | FromDiscord | <jviega> And how are you planning to distribute and manage client certs? |
16:42:19 | FromDiscord | <freakyHipster> Ansible |
16:42:29 | FromDiscord | <freakyHipster> Together with the application |
16:43:12 | FromDiscord | <jviega> But leaving the client private keys unencrypted? |
16:44:04 | FromDiscord | <freakyHipster> Yes |
16:45:35 | FromDiscord | <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:42 | FromDiscord | <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:55 | FromDiscord | <freakyHipster> Well, except the machines already get certificates anyway |
16:49:48 | FromDiscord | <freakyHipster> But yes, that's preferred to wrapping openssl |
16:51:17 | FromDiscord | <jviega> Well just use the cert ID as the shared secret, why pay the overhead of more expensive ops |
16:56:56 | FromDiscord | <freakyHipster> How would you revoke a jwt token ? |
16:57:19 | FromDiscord | <Phil> blacklist typically |
16:57:36 | FromDiscord | <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:36 | FromDiscord | <Phil> That and expiry timestamps |
16:57:48 | FromDiscord | <jviega> Yeah |
16:58:19 | FromDiscord | <jviega> Generally much simpler than also running an OCSP2 server |
16:58:42 | FromDiscord | <Phil> Note that you should write a job to clear out that table every expiry-timestamp x 2 or so time interval |
16:58:49 | FromDiscord | <Phil> (edit) "expiry-timestamp" => "expiry-interval" |
16:59:10 | FromDiscord | <Phil> If you have huge traffick and don't want blacklist lookups to take forever |
16:59:22 | FromDiscord | <Phil> If you don't, then don't bother |
17:01:52 | FromDiscord | <freakyHipster> Alrite, thanks for the input |
17:03:52 | FromDiscord | <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:57 | FromDiscord | <freakyHipster> I found the sslctx stuff as well but it kinda stops there |
17:04:55 | FromDiscord | <freakyHipster> No thanks I'll switch to jwt. |
17:05:19 | FromDiscord | <jviega> Good plan 🙂 |
17:07:11 | FromDiscord | <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:38 | FromDiscord | <freakyHipster> Hard to believe I'm the only one 😦 |
17:08:07 | FromDiscord | <freakyHipster> Signing off, battery hates me.↵Thanks again |
17:08:18 | FromDiscord | <jviega> Does request not have a cert param then? |
17:08:53 | FromDiscord | <jviega> Again I can go spelunking for you later. |
17:13:39 | FromDiscord | <odexine> In reply to @isofruit "blacklist typically": ? Isn’t the point of a JWT to not need look ups? |
17:15:20 | FromDiscord | <jviega> Depends, if you keep long-lived secrets you will generally want to be able to deal w/ one getting compromised |
17:20:30 | FromDiscord | <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:11 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4IQz |
17:22:25 | FromDiscord | <Phil> Because the plurals are throwing me for a loop |
17:23:39 | FromDiscord | <jviega> That's right |
17:23:43 | FromDiscord | <jviega> GParamFlags is a type |
17:24:00 | FromDiscord | <Phil> Yeh, it's an enum that for some godforsaken reason was pluralized |
17:24:02 | FromDiscord | <jviega> That's not a varargs function |
17:24:33 | FromDiscord | <Phil> The naming makes me expect a "haha gotcha" moment |
17:24:38 | FromDiscord | <jviega> Very rare to see varargs in C, and if you don't see `va_list` then you haven't hit one |
17:24:41 | FromDiscord | <Phil> (edit) "moment" => "moment, but maybe I'm just paranoid" |
17:28:02 | FromDiscord | <odexine> In reply to @jviega "Depends, if you keep": Well, iirc many people recommend against doing so with JWT |
17:28:46 | FromDiscord | <jviega> From using long-lives secrets? Yes, but people do it anyway because refresh has management overhead |
17:29:00 | FromDiscord | <jviega> The real world sucks for security people sometimes 😉 |
17:29:29 | FromDiscord | <odexine> Just keep the first four words and it’s still true ain’t it |
17:29:45 | FromDiscord | <jviega> Depends on the day I guess |
17:33:40 | * | arkanoid joined #nim |
17:34:01 | arkanoid | where's the extra byte coming from? https://play.nim-lang.org/#ix=4IQH |
17:34:34 | FromDiscord | <jviega> Alignment |
17:37:19 | arkanoid | jviega: https://play.nim-lang.org/#ix=4IQK |
17:37:43 | arkanoid | well, clearly your answer is right, but I have to wrap my head around this. |
17:39:59 | FromDiscord | <jviega> Do you understand that variant fields will only be the aligned size of the largest member? |
17:43:42 | FromDiscord | <jviega> It isn't "big enough to hold all fields", it's "big enough to hold the largest field" |
17:48:57 | FromDiscord | <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:41 | arkanoid | thanks 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:52 | FromDiscord | <jviega> That's a separate field |
17:52:23 | FromDiscord | <jviega> Which is used to determine what type is stored in the variant object |
17:52:32 | arkanoid | so sizeof(MyVariantObject) doesn't include it |
17:52:38 | FromDiscord | <jviega> It's called the 'discriminator' |
17:52:40 | FromDiscord | <jviega> Correct |
17:53:31 | FromDiscord | <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:39 | arkanoid | mmm, ok, I wonder where is it then. It it magically stored before or next the struct in memory and hidden from user? |
17:54:00 | FromDiscord | <jviega> It's a field in the object your variant is encased in |
17:54:09 | FromDiscord | <jviega> It's not in the variant record itself |
17:57:05 | arkanoid | so how can I know the size in memory of a variant object? is it sizeof(MyVarianObject) + sizeof(MyKind) ? |
17:57:31 | FromDiscord | <jviega> Depends on alignment, but usually. |
18:10:12 | arkanoid | thanks again |
18:10:25 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4IQZ |
18:10:30 | FromDiscord | <Chronos [She/Her]> `using` feels odd to me |
18:10:47 | FromDiscord | <Chronos [She/Her]> I'd also love to use `do` more but the pragma ruins the look f |
18:24:22 | FromDiscord | <taperfade> guyssss |
18:24:26 | FromDiscord | <taperfade> i have a question |
18:25:02 | FromDiscord | <taperfade> what are the things in those squiggly brackets |
18:25:07 | FromDiscord | <taperfade> {} |
18:25:14 | FromDiscord | <taperfade> like .async. |
18:25:31 | FromDiscord | <demotomohiro> It is a pragma. |
18:25:40 | FromDiscord | <taperfade> whats that |
18:26:53 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#pragmas |
18:32:51 | FromDiscord | <taperfade> Ooh |
18:39:04 | FromDiscord | <Chronos [She/Her]> Basically python decorators but better |
19:10:17 | FromDiscord | <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:52 | FromDiscord | <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:03 | FromDiscord | <Chronos [She/Her]> Or if I should just hardcode values and such until I implement that stuff |
19:11:52 | FromDiscord | <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:57 | FromDiscord | <Chronos [She/Her]> Gucci, thanks |
20:11:07 | FromDiscord | <System64 ~ Flandre Scarlet> https://programming-language-benchmarks.vercel.app/c-vs-nim↵Is this website good for benchmarks? |
20:12:25 | FromDiscord | <Chronos [She/Her]> Wish I could put the library version in the package docs tbh, would be nice |
20:12:52 | FromDiscord | <Chronos [She/Her]> But don't think there's a way to put constants into doc comments lol |
20:13:05 | FromDiscord | <.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:12 | FromDiscord | <.aingel.> (edit) "bookmarks" => "benchmarks" |
20:13:17 | FromDiscord | <.aingel.> (edit) "valid" => "meaningful" |
20:13:52 | FromDiscord | <.aingel.> (edit) "The consensus" => "A common notion" |
20:15:08 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @.aingel. "A common notion is": So benchmarking is basically useless? |
20:15:42 | FromDiscord | <Elegantbeef> Yes |
20:15:58 | FromDiscord | <Elegantbeef> When it comes to system languages benchmarks mean less than nothing |
20:16:00 | FromDiscord | <Elegantbeef> It only shows the cleverness of the programmer and in some cases it's a complete lie |
20:16:10 | FromDiscord | <Elegantbeef> Look at the Nim vs. Rust benchmarks |
20:16:19 | FromDiscord | <Elegantbeef> Some rust implementations use SIMD whilst the Nim variation does not |
20:17:26 | FromDiscord | <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:37 | FromDiscord | <Elegantbeef> "Why is Nim 200ms slower, must be dogshit" |
20:17:46 | FromDiscord | <Elegantbeef> Meanwhile the Rust impl uses simd.... |
20:22:33 | FromDiscord | <System64 ~ Flandre Scarlet> Is there some sources that says Nim is performant? |
20:25:18 | FromDiscord | <muddmaker> Performance is always somewhat contextual and relative |
20:27:28 | FromDiscord | <muddmaker> Here's another language competition that's been going around: <https://github.com/jinyus/related_post_gen> |
20:30:06 | FromDiscord | <muddmaker> Nim was pretty fast, but over languages have had more optimizations done recently |
20:32:44 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @muddmaker "Nim was pretty fast,": It looks slow compared to Go or Rust |
20:33:11 | FromDiscord | <System64 ~ Flandre Scarlet> also, some data is missing↵Which versions? Which flags? |
20:34:53 | FromDiscord | <muddmaker> In reply to @sys64 "It looks slow compared": Nim can also be improved |
20:34:56 | FromDiscord | <ieltan> In reply to @sys64 "https://programming-language-benchmarks.vercel.app/": No, it's kind of a meme |
20:37:36 | FromDiscord | <Elegantbeef> Me I am a source that says that |
20:37:58 | NimEventer | New 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:09 | FromDiscord | <Elegantbeef> With system languages it's almost always down to the programmer |
20:38:10 | FromDiscord | <Elegantbeef> As such any conversation on the matter is pointless |
20:43:23 | * | advesperacit quit () |
20:56:22 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4IRm |
20:56:36 | FromDiscord | <Chronos [She/Her]> Trying to compile with `nim doc` |
20:56:48 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4IRn |
20:58:08 | FromDiscord | <Chronos [She/Her]> Ah wait |
20:58:40 | FromDiscord | <Chronos [She/Her]> Okay nope |
20:58:45 | FromDiscord | <Chronos [She/Her]> Not sure how I'd do this |
20:59:22 | FromDiscord | <.aingel.> Can I emit a "break" statment from a proc |
20:59:36 | FromDiscord | <.aingel.> I want to run a proc and for it to emit a break if it's called inside a loop |
21:02:48 | FromDiscord | <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:00 | FromDiscord | <Chronos [She/Her]> That doesn't work rip, I'm wanting it to use the constants available from the current scope |
21:06:12 | FromDiscord | <Chronos [She/Her]> I wish doc comments could use that formatting for embedding constants in them oof |
21:08:09 | FromDiscord | <Chronos [She/Her]> In reply to @chronos.vitaqua "Why doesn't this work?": Beef, any clues? |
21:08:16 | FromDiscord | <Chronos [She/Her]> Is this a useless task? |
21:17:06 | FromDiscord | <raynei486> sent a code paste, see https://play.nim-lang.org/#ix=4IRu |
21:17:09 | FromDiscord | <demotomohiro> In reply to @.aingel. "I want to run": proc cannot do that. You need to use template or macro. |
21:18:01 | FromDiscord | <Chronos [She/Her]> In reply to @.aingel. "I want to run": You could make it return bool and do `if myproc(): break` |
21:20:24 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4IRw |
21:21:17 | FromDiscord | <demotomohiro> And c is just a macro calls newcommentStmtNode. |
21:21:47 | FromDiscord | <Chronos [She/Her]> Oh that works, thanks! |
21:26:44 | FromDiscord | <Chronos [She/Her]> Is there a way to export a template but not have docs generated for it? :p |
21:46:14 | FromDiscord | <.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:16 | FromDiscord | <Chronos [She/Her]> A template should be enough for your usecase |
21:48:41 | FromDiscord | <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:48 | FromDiscord | <.aingel.> In reply to @chronos.vitaqua "Ugh... Can't figure out": include? |
21:49:50 | FromDiscord | <.aingel.> Is that what you want |
21:50:17 | FromDiscord | <.aingel.> oh, nimble file, nvm |
21:50:36 | FromDiscord | <Chronos [She/Her]> Yeah, issue is I can't find the dir I need to import |
21:50:48 | FromDiscord | <Chronos [She/Her]> `import ./src/nulid/private/constants` doesn't work |
21:52:31 | FromDiscord | <.aingel.> Oh I think you need the absolute path |
21:53:31 | FromDiscord | <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:23 | FromDiscord | <_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:23 | FromDiscord | <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:31 | FromDiscord | <taperfade> Is it worth learning c if nim exists |
23:58:47 | FromDiscord | <taperfade> Ive been considering it bcs my friends use it |
23:59:23 | * | adium joined #nim |