00:21:12 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3WQ2 |
00:22:10 | FromDiscord | <huantian> wait does macos not use open as well? |
00:22:29 | FromDiscord | <!Patitotective> do you mean that windows use open as well? cause macos already uses open |
00:23:18 | FromDiscord | <huantian> yes sorry |
00:24:32 | FromDiscord | <!Patitotective> i tried in my virtual windows machine and `open` didn't worked so i searched and i found that `start` is the equivalent of `xdg-open` and it worked so 🤷♂️ |
00:26:09 | FromDiscord | <huantian> huh |
00:26:52 | FromDiscord | <huantian> std/browsers seems to use `shellExecuteW` with `open` so I guess that's why |
00:33:24 | FromDiscord | <Elegantbeef> Dude that's a library↵(@!Patitotective) |
00:33:49 | FromDiscord | <Elegantbeef> Not an overly complex one, but it's a library |
00:34:22 | FromDiscord | <!Patitotective> seems like one more proc i could add to my 200 lines utils module 🤔 |
00:35:14 | FromDiscord | <Elegantbeef> Of course you can put it there 😄 |
00:36:20 | * | vicfred quit (Quit: Leaving) |
00:36:59 | FromDiscord | <!Patitotective> its getting too big :[ i dont like big modules |
00:37:26 | FromDiscord | <Elegantbeef> Well then dont make big modules |
00:37:48 | FromDiscord | <Elegantbeef> Though there isnt much reason to be scared of big modules |
00:38:16 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Though there isnt much": minima... |
00:39:55 | FromDiscord | <Elegantbeef> minimal what? |
00:40:12 | FromDiscord | <Elegantbeef> You can spread out modules all day long but if the API sucks you got nothing |
00:40:52 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "minimal what?": minimap _sk |
00:40:57 | FromDiscord | <!Patitotective> (edit) "_sk" => "💀" |
00:41:08 | FromDiscord | <Elegantbeef> What? |
00:41:25 | FromDiscord | <Elegantbeef> Are we playing a RTS? |
00:41:39 | * | Gustavo6046 joined #nim |
00:42:02 | FromDiscord | <!Patitotective> minimap https://media.discordapp.net/attachments/371759389889003532/970847667867488316/unknown.png |
00:42:16 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Are we playing a": i would if my computer could |
00:42:43 | FromDiscord | <Elegantbeef> Ok so what's the issue with having a module do what a module is supposed to do, and how does it relate to a minimap? |
00:42:52 | * | Onionhammer quit (Quit: The Lounge - https://thelounge.chat) |
00:43:20 | * | Onionhammer joined #nim |
00:43:56 | * | Gustavo6046 quit (Max SendQ exceeded) |
00:44:10 | FromDiscord | <!Patitotective> that you dont like minimaps, and for a big module i may use a minimap↵its not funny now :[ |
00:44:38 | * | Gustavo6046 joined #nim |
00:44:44 | FromDiscord | <Elegantbeef> I dont dislike minimaps i just see them as pointless, they dont benefit me more than a scrollbar ime |
00:44:47 | * | Gustavo6046 quit (Remote host closed the connection) |
00:45:07 | * | Gustavo6046 joined #nim |
00:45:51 | FromDiscord | <!Patitotective> you may have a inertial scroll wheel lmao |
00:45:53 | FromDiscord | <!Patitotective> (edit) "a" => "an" |
00:45:56 | FromDiscord | <Elegantbeef> "Oh yes there is code in my code" |
00:46:11 | FromDiscord | <!Patitotective> In reply to @Elegantbeef ""Oh yes there is": lol |
00:46:24 | FromDiscord | <Elegantbeef> I dont |
00:46:34 | * | Gustavo6046 quit (Max SendQ exceeded) |
00:46:38 | FromDiscord | <!Patitotective> it makes the right side look not so empty |
00:46:48 | FromDiscord | <Elegantbeef> So what |
00:47:00 | FromDiscord | <!Patitotective> empty... |
00:47:01 | FromDiscord | <Elegantbeef> Then why dont you like big modules it makes the right side always look not empty |
00:47:08 | * | Gustavo6046 joined #nim |
00:48:08 | FromDiscord | <!Patitotective> cause ~~i dont actually use the minimap, i forget about it~~ so i end up using the scroll wheel and it sucks lol |
00:48:25 | FromDiscord | <Elegantbeef> You know you can click the scrollbar right? |
00:48:30 | * | Onionhammer quit (Quit: The Lounge - https://thelounge.chat) |
00:48:32 | FromDiscord | <Elegantbeef> That's been a feature since like the early 90s |
00:48:47 | * | Onionhammer joined #nim |
01:03:48 | FromDiscord | <!Patitotective> :[ |
01:21:57 | FromDiscord | <!Patitotective> why does it take soo much to install nimgl :[ |
01:23:56 | FromDiscord | <Elegantbeef> Get faster internet |
01:24:17 | FromDiscord | <Elegantbeef> it does clone the source of imgui iirc so that's probably why |
01:24:52 | FromDiscord | <!Patitotective> idk why the windows machine downloads at 50kb/s but outside it at 500kb/s :[ |
01:37:50 | * | ehmry quit (Ping timeout: 250 seconds) |
01:40:52 | FromDiscord | <!Patitotective> what about nimble progress bar lol↵~~PRs open~~ |
01:52:24 | FromDiscord | <deadmeme77> Huh, interesting. I needed to reinstall my pop!_OS back cause of Nvidia driver, now I can not install choosenim |
01:52:30 | * | ehmry joined #nim |
01:52:38 | FromDiscord | <deadmeme77> "could not load: libcrypto.so(.1.1|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|.48|.47|.46|.45|.44|.43|.41|.39|.38|.10|)" |
01:52:39 | FromDiscord | <Elegantbeef> What's the issue? |
01:53:22 | FromDiscord | <Elegantbeef> do you have `libssl1.1` installed? |
01:53:50 | FromDiscord | <Elegantbeef> Or does ubuntu have a too recent libssl |
01:54:33 | FromDiscord | <deadmeme77> yeah I can only see libssl3 3.0.2-0ubuntu1 now |
01:55:28 | FromDiscord | <deadmeme77> someone already reported it https://github.com/dom96/choosenim/issues/297 |
01:55:52 | FromDiscord | <Elegantbeef> Yep there's the issue then |
01:56:02 | FromDiscord | <Elegantbeef> Flatpak/appimage is a wonderful idea |
01:56:12 | FromDiscord | <deadmeme77> OK, I'll try getting choosenim in a nix-shell then |
01:57:06 | FromDiscord | <Elegantbeef> Yea a flatpak or appimage really should be used if the dependencies are kept |
02:08:21 | NimEventer | New Nimble package! nephyr - Nim wrapper for Zephyr RTOS, see https://github.com/EmbeddedNim/nephyr |
02:59:53 | * | arkurious quit (Quit: Leaving) |
03:30:15 | * | vicfred joined #nim |
04:08:52 | * | vicecea quit (Remote host closed the connection) |
04:09:22 | * | vicecea joined #nim |
04:12:05 | * | slowButPresent quit (Quit: leaving) |
04:23:32 | FromDiscord | <Elegantbeef> Lol dont think it's KDE |
04:23:33 | FromDiscord | <Elegantbeef> My element also crashes with new notifications |
04:23:35 | FromDiscord | <Elegantbeef> Might be an electron bug |
04:23:35 | FromDiscord | <Elegantbeef> @huantian\: with a bit of tinkering i've now got wasmedge properly running with code i've compiled! we're on the path to fanciness |
04:23:35 | FromDiscord | <huantian> but that sounds like great news! |
04:23:37 | FromDiscord | <huantian> grr something is brokey with KDE notifs, clicking on them crashes both elelment and discord |
04:25:38 | FromDiscord | <huantian> element broken? that hasn't happened ever! |
04:25:57 | FromDiscord | <Elegantbeef> You mean electron |
04:26:22 | FromDiscord | <huantian> yes |
04:26:34 | FromDiscord | <huantian> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/970903941200109608): element broken? that hasn't happened ever!↵\electron |
04:27:23 | FromDiscord | <Elegantbeef> Hell yea got basic call working 😄 |
04:27:57 | FromDiscord | <Elegantbeef> Tested with a Nim file compiled with emcc |
04:31:49 | FromDiscord | <Elegantbeef> Well my work is here if you ever want to tinker https://github.com/beef331/wasmedge_playground |
04:34:49 | FromDiscord | <huantian> I'll take a look |
04:36:52 | FromDiscord | <Elegantbeef> Will need to figure out how to make it more portable the hard coded path to the default install location isnt ideal 😄 |
04:46:23 | FromDiscord | <5Q> sent a code paste, see https://paste.rs/Tgh |
04:47:06 | FromDiscord | <Elegantbeef> You may want to use `MultiPartData` |
04:47:34 | FromDiscord | <5Q> I'm already using it |
04:47:57 | FromDiscord | <5Q> actually, I may be using it wrong |
04:48:18 | FromDiscord | <5Q> I think I should try to send my big chunk of data like a file, not just a string |
04:49:12 | FromDiscord | <Elegantbeef> You should do something like `myData.addFiles [("myFileName", "my/file/path")]` |
04:49:43 | FromDiscord | <Elegantbeef> Or i guess `myData.addFiles {"myFileName": "my/file/path"}` 😄 |
04:49:51 | FromDiscord | <5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WQr |
04:50:28 | FromDiscord | <Elegantbeef> Perhaps, but it all being in memory might be the issue |
04:50:51 | FromDiscord | <Elegantbeef> I dont know the HTTP protocol's limitation on single file uploads or if there is even |
04:51:25 | FromDiscord | <Elegantbeef> But i'd imagine attempting to send a single 30MB message is generally to be avoided. I'm 100% ignorant here though |
04:51:25 | FromDiscord | <5Q> I don't think there is, tried looking it up |
04:51:36 | FromDiscord | <Elegantbeef> So hopefully someone with a brain here speaks instead of me 😄 |
04:51:45 | FromDiscord | <5Q> it's mostly limits imposed by the servers handling the requests |
04:52:11 | FromDiscord | <5Q> and I checked that my server supports that much data, I was able to send 300 MiB using python requests.post |
04:52:53 | FromDiscord | <Elegantbeef> Can i see the code? |
04:53:12 | FromDiscord | <5Q> yes, one second, let me try this first |
04:59:14 | FromDiscord | <5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WQs |
05:00:11 | FromDiscord | <5Q> res is a seq[string] that contains a list of server responses, trying to archive some website and want to distribute the load to multiple PCs |
05:00:50 | FromDiscord | <Elegantbeef> Yea i sadly dont know what to say |
05:02:37 | FromDiscord | <5Q> yeah, me too, I guess there is something with the httpClient that can't handle such big bodies, maybe Yardanico could help, but he is probably asleep rn |
05:03:03 | FromDiscord | <5Q> bugs just hunt me when I code in nim |
05:05:47 | FromDiscord | <huantian> In reply to @deadmeme77 ""could not load: libcrypto.so(.1.1|.1.0.2|.1.0.1|.1": heh this seems like a thing with a bunch of other apps too...↵when ubuntu updates something it breaks everythign |
05:11:27 | FromDiscord | <5Q> arch users\:↵(@huantian) |
05:11:30 | FromDiscord | <5Q> image.png https://media.discordapp.net/attachments/371759389889003532/970915483266187314/image.png |
05:13:05 | FromDiscord | <huantian> true! |
05:30:31 | * | rockcavera quit (Remote host closed the connection) |
05:31:01 | * | vicfred quit (Ping timeout: 256 seconds) |
05:43:12 | * | ltriant quit (Ping timeout: 276 seconds) |
05:50:23 | FromDiscord | <Mike> Hey does anyone know how to do a POST request using the js backend? |
05:51:07 | FromDiscord | <Mike> sent a code paste, see https://play.nim-lang.org/#ix=3WQD |
05:51:37 | FromDiscord | <Mike> But the docs for jsfetch say `## `fetch()`API, simple`GET`only, returns a`Future[Response]\`\` |
05:53:18 | * | jjido joined #nim |
05:54:33 | FromDiscord | <Mike> I realize there's this\: `proc fetch(url: cstring | Request; options: FetchOptions): Future[Response] {.importjs: "$1(#, #)".}` |
05:55:53 | FromDiscord | <Mike> But creating a `FetchOptions` has like 11 different required fields and I feel like I'm just falling down this rabbit hole of creating headers and credentials and all kinds of things just to try and get `fetch()` to do a POST |
05:56:06 | FromDiscord | <Mike> I have to be missing something obvious |
05:58:54 | FromDiscord | <Elegantbeef> This is the `jsfetch` module? |
05:59:54 | FromDiscord | <Elegantbeef> I'd personally say make a `post` variant with the same way `fetch` is implemented |
05:59:54 | FromDiscord | <Elegantbeef> but idk |
06:00:46 | FromDiscord | <Mike> Hmm, okay. Is there a better module to be using here or is the jsfetch module just underdeveloped? |
06:00:58 | FromDiscord | <Elegantbeef> I think [tandy](https://matrix.to/#/@tandy1000:matrix.org) might have used posting in browser |
06:01:07 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
06:01:26 | FromDiscord | <Elegantbeef> I dont really touch the JS backend so cannot say much |
06:02:52 | FromDiscord | <Mike> Yeah, I wouldn't really want to except that I'm working on some cross-platform stuff. I guess it wouldn't be a big deal to just implement a post version |
06:03:32 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
06:05:09 | FromDiscord | <Elegantbeef> This is in browser right? |
06:05:27 | * | Lord_Nightmare joined #nim |
06:06:11 | FromDiscord | <Mike> Yeah. Specifically a Flutter app where I'm using the foreign function interface to libraries that Nim generates |
06:07:38 | FromDiscord | <Mike> So there's a c lib when running on android and ios and a js lib when running on web |
06:08:03 | FromDiscord | <Mike> httpclient works great when compiling to C, but apparently that's a no-go when using the js backend so I'm trying to figure out how to make that work |
06:11:18 | FromDiscord | <Elegantbeef> Yea it wasnt abstracted for there sadly |
06:12:02 | * | PMunch_ is now known as PMunch |
06:12:51 | * | jjido joined #nim |
06:13:41 | FromDiscord | <Mike> 😢 |
06:14:59 | FromDiscord | <huantian> Could just use a jsobject for the options? That way you don’t specify all the options |
06:15:08 | FromDiscord | <huantian> Not too sure how that works |
06:16:08 | FromDiscord | <Elegantbeef> Well all the options are exposed so you can just use a nim constructor |
06:18:22 | FromDiscord | <huantian> Wait yeah, what’s the issue exactly? |
06:19:43 | FromDiscord | <huantian> Also I hate this rename lmao https://media.discordapp.net/attachments/371759389889003532/970932650556661790/image0.jpg |
06:19:48 | FromDiscord | <huantian> metod |
06:20:06 | FromDiscord | <Elegantbeef> Yea i'd rather `Meth` |
06:20:12 | FromDiscord | <Elegantbeef> Or an enum of `FetchMethods` |
06:20:26 | FromDiscord | <huantian> I should add renaming this field to the Nim v2 thread |
06:29:04 | FromDiscord | <Mike> @huantian problem is probably that I don't know what I'm doing. But if I try to create a new `FetchOptions` to pass in I have no idea what those fields should be set to as default |
06:32:39 | FromDiscord | <Mike> sent a code paste, see https://play.nim-lang.org/#ix=3WQP |
06:34:01 | FromDiscord | <Mike> (and not that it matters, but I agree that intentionally misspelling a parameter name is not the way) |
06:36:40 | PMunch | @Elegantbeef, where do you get the wasmedge libraries you're wrapping? |
06:37:32 | PMunch | @huantian, ouch that rename is horrible indeed! |
06:38:29 | FromDiscord | <Elegantbeef> https://wasmedge.org/book/en/#install |
06:42:31 | FromDiscord | <enthus1ast> Funny absolutely never had a arch update break my system, \~5 years rolling updates, milage will wary I guess |
06:44:12 | FromDiscord | <enthus1ast> Ubuntu did break (eg full boot partition when new kernel installed) |
06:45:56 | FromDiscord | <5Q> me neither, the only reason it broke is because of nvidia drivers, I have arch on a chinese atom tablet that was running win10 before, and it has been running great for 3 years, the only thing broke was touchscreen support that I set up using very hacky kernel modules and configs, and when the kernel updates it broke. And, of course, I didn't write down how I got the touchscreen working properly. Believe me\: it was a pain. Running linux on it |
07:06:52 | * | ltriant joined #nim |
07:14:28 | PMunch | I've had it break a program or two, but never the whole system |
07:16:26 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
07:17:49 | * | jjido joined #nim |
07:18:28 | PMunch | @Elegantbeef, I don't want to install it though :P |
07:18:39 | PMunch | I just want the headers so I can try to get Futhark to wrap it |
07:20:19 | PMunch | Oh man, WasmEdge uses a weird way of defining enums :P |
07:20:42 | PMunch | It's actually pretty cool that Futhark is even capable of wrapping that |
07:20:50 | FromDiscord | <5Q> Is there any alternatives to httpclient that don't use it? |
07:21:02 | FromDiscord | <Elegantbeef> puppy |
07:22:13 | PMunch | https://github.com/WasmEdge/WasmEdge/blob/06749c45b6d56d00e114a4b332880a88cf0cec6f/include/common/enum_types.h#L57-L63 which just sets some compile-time flags and then includes another file https://github.com/WasmEdge/WasmEdge/blob/06749c45b6d56d00e114a4b332880a88cf0cec6f/include/common/enum.inc#L804-L817 |
07:22:28 | PMunch | I wonder why they've done it that way.. |
07:23:32 | PMunch | Ooh, it's to avoid having to specify them multiple times, nifty |
07:26:13 | FromDiscord | <Elegantbeef> Yea i dont know much just toying around with it and running into issues with futhark for the most part 😛 |
07:26:48 | PMunch | I mean it's a wonder that it even manages to read that, good luck feeding that through c2nim or nimterop |
07:28:04 | FromDiscord | <Elegantbeef> Anyway like i said changing your int128 definition fixed it |
07:28:24 | FromDiscord | <Elegantbeef> So perhaps just importing it changes the way Nim reasons the size? |
07:28:38 | FromDiscord | <Elegantbeef> Or it uses C's size i guess |
07:34:43 | FromDiscord | <m4ul3r> sent a code paste, see https://paste.rs/XTg |
07:35:00 | PMunch | @Elegantbeef, I figured out the reason, check the issue again ;) |
07:36:33 | FromDiscord | <Elegantbeef> Dont think you need to escape the space |
07:36:37 | PMunch | @m4ul3r, I don't think you have to escape spaces when using walkDir |
07:37:06 | FromDiscord | <m4ul3r> ah, very simple fix. Nim handles it for me? |
07:38:15 | PMunch | @m4ul3r, it should do, yeah |
07:38:18 | PMunch | Why wouldn't it? |
07:42:21 | FromDiscord | <Rika> In reply to @PMunch "Why wouldn't it?": Because sometimes it doesn’t |
07:46:28 | * | PMunch quit (Quit: Leaving) |
07:47:36 | * | PMunch joined #nim |
08:11:46 | FromDiscord | <tandy> yes |
08:12:00 | FromDiscord | <Elegantbeef> There we go your new hero |
08:12:00 | FromDiscord | <tandy> yes again |
08:12:41 | FromDiscord | <tandy> https://nim-lang.github.io/Nim/jsfetch read the docs, and jsfetch from nim devel branch |
08:13:00 | FromDiscord | <tandy> OR use nodejs/jshttpclient |
08:13:17 | FromDiscord | <tandy> https://github.com/juancarlospaco/nodejs/blob/main/src/nodejs/jshttpclient.nim |
08:13:58 | FromDiscord | <tandy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/970961078014070785): https://nim-lang.github.io/Nim/jsfetch read the docs, and use jsfetch from nim devel branch |
08:14:41 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3WQZ |
08:24:14 | * | Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected]) |
08:43:30 | * | ehmry quit (Ping timeout: 260 seconds) |
08:43:36 | * | emery joined #nim |
08:45:41 | * | tdc joined #nim |
08:47:50 | * | emery quit (Read error: Connection reset by peer) |
08:49:41 | * | firq joined #nim |
08:56:20 | * | gsalazar quit (Ping timeout: 260 seconds) |
08:57:00 | * | gsalazar joined #nim |
09:00:44 | PMunch | Is there a nice "user-management" system for Nim servers? |
09:01:30 | PMunch | I don't want to deal with password management and access tokens if someone has already done this work for me |
09:01:59 | * | jmdaemon quit (Ping timeout: 240 seconds) |
09:02:40 | FromDiscord | <dom96> There is a couple packages. Easiest thing is to implement oauth and support logins via gmail etc |
09:05:50 | PMunch | Ooh that would be neat |
09:05:57 | PMunch | dom96, do you have any links or names? |
09:06:29 | PMunch | Oh cool, Futhark is on the trending page of nimble.directory :) |
09:07:08 | PMunch | But what happened with the star icons on there? |
09:07:23 | PMunch | Wasn't there someone who was working on redesigning it? |
09:17:25 | FromDiscord | <jmgomez> hey guys, one question, will https://nim-lang.org/docs/dynlib.html allow for having a nim dynlib as a wrapper loading another one that could be hot reload? I mean, if I load from Cpp lib A and lib A uses dynlib's loadLib to load lib B should I be able to change B without changing B, right? |
09:17:46 | PMunch | nim-httpauth looks good :) Oauth is of course another option though |
09:17:47 | * | jjido quit (Remote host closed the connection) |
09:18:15 | PMunch | change B without changing B? |
09:19:22 | FromDiscord | <Elegantbeef> You can load libraries using that module and it doesnt matter what the library is as long as it has the functions |
09:19:29 | FromDiscord | <Elegantbeef> That's partially the benefit of dynlib |
09:19:45 | FromDiscord | <Elegantbeef> You can load a API compatible library after building |
09:22:52 | FromDiscord | <jmgomez> In reply to @PMunch "change B without changing": lol I meant change B without changing A |
09:23:20 | FromDiscord | <jmgomez> Cool, will give it a shot. Having a bad time trying to reuse the hot reloading system ue's provides |
09:33:11 | FromDiscord | <dom96> In reply to @PMunch "<@132595483838251008>, do you have": There is a couple of packages out there for oauth. The rest you can read up online on how to get oauth via gmail/GitHub/etc working. Basically you just need to set up a “callback” endpoint which google et al will send a request to with info about the identity of the person identified. Then you just store some of this metadata in your db. |
09:33:52 | FromDiscord | <dom96> It does require a bit of reading and being careful to ensure you verify oauth tokens correctly |
09:34:23 | FromDiscord | <dom96> So not super trivial. But worth it so you don’t have to deal with managing emails/passwords/etc yourself |
09:34:41 | * | gsalazar_ joined #nim |
09:35:10 | FromDiscord | <dom96> If I had the will and time this would be the next thing I would do for the forum |
09:36:36 | * | gsalazar quit (Ping timeout: 248 seconds) |
09:44:04 | FromDiscord | <dom96> but yeah, nim-httpauth seems like a good choice otherwise, I haven't used it but should be good. |
09:47:40 | * | tdc quit (Quit: Client closed) |
09:47:59 | * | tdc joined #nim |
10:08:40 | FromDiscord | <willyboar> In reply to @PMunch "But what happened with": Icons removed due to CDN |
10:08:56 | PMunch | Aah I see |
10:09:47 | FromDiscord | <kiell> whats the best way to do kwargs from python in nim? |
10:09:49 | FromDiscord | <willyboar> I think there is no progress to the redesign |
10:11:21 | PMunch | @willyboar, https://github.com/FedericoCeratto/nim-package-directory/issues/47#issuecomment-1115903801 |
10:11:28 | PMunch | @kiell, varargs? |
10:13:13 | FromDiscord | <willyboar> In reply to @PMunch "<@527930042555170833>, https://github.com/FedericoC": This is fresh so I missed it |
10:14:07 | FromDiscord | <willyboar> They are right. Scf are tough |
10:15:42 | FromDiscord | <kiell> In reply to @PMunch "<@109181558149120000>, varargs?": yea, im trying to refactor a set of procs like this (that look like they'll be messy to expand in the future) with named args https://media.discordapp.net/attachments/371759389889003532/970992033856622613/Screen_Shot_2022-05-03_at_5.14.01_AM.png |
10:15:47 | FromDiscord | <kiell> i guess maybe tuples would work best in this case |
10:17:23 | PMunch | @willyboar, scf? |
10:17:58 | FromDiscord | <Rika> Source code filter I assume |
10:18:12 | FromDiscord | <willyboar> That |
10:18:27 | PMunch | @kiell, you can always group argument types `proc floatGenerator*(name: string, nullable, isUnique, isUnsigned, isDefault: bool, default: float): string` |
10:19:11 | PMunch | Of course another option is to create a flags enum and do `proc floatGenerator*(name: string, flags: set[Flag], default: float): string` |
10:19:25 | FromDiscord | <willyboar> It's a little painful to transform html to scf |
10:20:05 | PMunch | Ah I wasn't aware that the directory was done using source code filters |
10:21:32 | FromDiscord | <willyboar> In reply to @PMunch "Ah I wasn't aware": Well I made the last redesign so I know the feeling 😋 |
10:27:32 | PMunch | What makes converting html to scf more painful than any other templating language |
10:30:53 | NimEventer | New thread by AlexKotik: CLOEXEC on old Linux kernel., see https://forum.nim-lang.org/t/9137 |
10:31:07 | FromDiscord | <willyboar> In reply to @PMunch "What makes converting html": Prolly the syntax |
10:36:42 | PMunch | Is that syntax so much more foreign than other templating solutions? (sorry I haven't used a lot of HTML templating libraries) |
10:38:40 | FromDiscord | <willyboar> Not a lot but it's not the clearest out there. |
10:39:18 | FromDiscord | <willyboar> Maybe they can try nimja or their own template language, tim |
10:47:23 | * | lumo_e joined #nim |
10:50:14 | * | ehmry joined #nim |
10:50:57 | * | Zectbumo quit (Remote host closed the connection) |
10:57:57 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/pO3 |
11:11:34 | FromDiscord | <planetis> What is the best microbenchmarking lib for Nim? |
11:11:53 | PMunch | benchy is pretty nice |
11:11:55 | FromDiscord | <planetis> One that actually takes care that no reordering happens |
11:12:18 | FromDiscord | <planetis> I will check it |
11:12:33 | PMunch | Not sure if it does anything about reordering |
11:13:18 | FromDiscord | <planetis> nope |
11:13:28 | FromDiscord | <planetis> I have an issue with my results |
11:13:29 | FromDiscord | <Yardanico> In reply to @jmgomez "hey guys, why I": Can you show the error? |
11:13:34 | FromDiscord | <Yardanico> I mean full compiler error |
11:13:50 | FromDiscord | <planetis> (edit) "results" => "results, I dont trust them" |
11:23:19 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
11:23:37 | * | ehmry joined #nim |
11:23:48 | FromDiscord | <mratsim> In reply to @planetis "What is the best": I write my own ™️ https://github.com/mratsim/constantine/blob/master/benchmarks/bench_blueprint.nim#L94-L109= |
11:23:51 | FromDiscord | <jmgomez> In reply to @mothumix "Can you show the": not sure what was happening but now it seems to be fine |
11:24:11 | FromDiscord | <Yardanico> it's just cosmic rays hitting your computer:( |
11:24:14 | FromDiscord | <mratsim> you can add outliers / standard deviation stuff as well like criterion but well |
11:24:17 | FromDiscord | <Rika> In reply to @jmgomez "hey guys, why I": Also use the result variable xddd |
11:24:47 | FromDiscord | <Yardanico> Ah and yeah @jmgomez you should probably convert that cstring into a string |
11:25:13 | FromDiscord | <Yardanico> Does the C ffi you're using give you the ownership to it, so e.g. you should free it yourself? |
11:25:14 | NimEventer | New thread by Zoom: Moderation policy for bans, see https://forum.nim-lang.org/t/9138 |
11:25:30 | FromDiscord | <jmgomez> In reply to @Rika "Also use the result": what do you mean? |
11:26:29 | FromDiscord | <jmgomez> In reply to @mothumix "Does the C ffi": Im just making tests to see if I get that to work inside UE so I can hot reload the library by using a wrapper library |
11:30:01 | FromDiscord | <planetis> mratsim, nice thank you |
11:32:09 | * | slowButPresent joined #nim |
11:33:54 | FromDiscord | <mratsim> In reply to @planetis "mratsim, nice thank you": then a report template: https://github.com/mratsim/constantine/blob/master/benchmarks/bench_fields_template.nim#L26-L36= |
11:50:35 | FromDiscord | <larroteeno> hello everyone, is there a way of formatting code automatically with nim or nimble that I cannot find around? |
11:51:33 | FromDiscord | <mratsim> In reply to @larroteeno "hello everyone, is there": There is nimpretty, and Nim also has a --styleChecks flag |
11:51:50 | FromDiscord | <eyecon> Am I dumb? I have a beginner question: can't I use a global const in a proc? |
11:52:02 | FromDiscord | <larroteeno> is nimpretty an external package? |
11:52:31 | FromDiscord | <mratsim> In reply to @eyecon "Am I dumb? I": Yes you can |
11:52:56 | FromDiscord | <mratsim> In reply to @larroteeno "is nimpretty an external": Iirc it comes as a separate binary but with the compiler install |
11:53:15 | FromDiscord | <Yardanico> In reply to @eyecon "Am I dumb? I": Are you sure you used a `proc` and not a `func|? |
11:53:21 | FromDiscord | <mratsim> (As you guessed, my code isn't pretty) |
11:54:14 | FromDiscord | <eyecon> In reply to @mothumix "Are you sure you": Yeah, it is a proc alright |
11:54:19 | FromDiscord | <eyecon> I'm trying to simplify my case |
11:54:48 | FromDiscord | <eyecon> I hope this doesn't and in yet another compiler bug that only I happen to stumble on |
11:54:56 | FromDiscord | <eyecon> (edit) "and" => "end" |
11:58:43 | * | xet7 joined #nim |
12:01:36 | FromDiscord | <larroteeno> In reply to @mratsim "Iirc it comes as": lirc? how do I install it? the onyl things I can see online are text editor nimpretty support nothing about the utility itself |
12:02:25 | FromDiscord | <larroteeno> I am an idiot, it is installed lol |
12:02:26 | FromDiscord | <larroteeno> sorry |
12:03:02 | FromDiscord | <eyecon> Aha, I can't do `randomize()` at compile time |
12:03:07 | FromDiscord | <eyecon> That has been my issue apparently |
12:03:51 | FromDiscord | <eyecon> OK, kinda makes sense |
12:10:51 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
12:11:12 | * | dtomato joined #nim |
12:12:27 | * | dtomato quit (Client Quit) |
12:20:41 | FromDiscord | <gerwy> Hi, so i have a fresh linux install and of course first thing was to install nim↵but i get this error↵`could not import: SSL_get_peer_certificate`↵when pasting the choosenim line |
12:21:20 | FromDiscord | <gerwy> Oooh i see its in issues for newest Ubuntu 22.04 hah sorry |
12:23:49 | * | dtomato joined #nim |
12:25:54 | * | sagax joined #nim |
12:29:34 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
12:29:56 | * | dtomato joined #nim |
12:38:50 | * | lumo_e quit (Quit: Quit) |
12:44:08 | FromDiscord | <Marcin> is any way to create custom threadpool with custom size of max threads? I can't just find out information about that i doc and other sites 😦 OR it's any way to increase amount of max threads? I only found constant "MaxThreadPoolSize" ? |
12:44:25 | FromDiscord | <Marcin> (edit) "i" => "in" |
12:44:46 | FromDiscord | <Marcin> (edit) "threads?" => "threads in builtin threadpool for spawn?" |
12:50:51 | FromDiscord | <Marcin> ok nvm found in source, thanks |
13:03:18 | * | v9fk quit (Read error: Connection reset by peer) |
13:15:37 | FromDiscord | <5Q> sent a code paste, see https://paste.rs/Cv0 |
13:16:02 | FromDiscord | <Yardanico> honestly I don't know, never tried sending big chunks of data in httpclient |
13:16:11 | FromDiscord | <Yardanico> hmm |
13:16:54 | FromDiscord | <dom96> Maybe there is a bug in there somewhere. Does doing it via curl work? |
13:17:15 | FromDiscord | <5Q> yes, of course. I've already switched to using puppy, everything works great↵(@dom96) |
13:17:32 | FromDiscord | <5Q> So the server is not the culprit here |
13:17:58 | FromDiscord | <dom96> Ahh. Seems httpclient has a bug then |
13:18:17 | FromDiscord | <dom96> Please report and/or help us fix it if you’ve got some spare time :) |
13:18:32 | FromDiscord | <5Q> Ok, I will check if the issue is present on linux |
13:23:23 | FromDiscord | <5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WSg |
13:23:40 | FromDiscord | <5Q> I will make an issue with an example code |
13:23:57 | * | v9fk joined #nim |
13:30:40 | * | rockcavera joined #nim |
13:30:40 | * | rockcavera quit (Changing host) |
13:30:40 | * | rockcavera joined #nim |
13:32:13 | FromDiscord | <5Q> hmm, just tried different websites, and I can send 10mib body to some sites |
13:33:18 | FromDiscord | <5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WSn |
13:34:03 | FromDiscord | <5Q> actually, trying to send 10mib to google.com using python's requests seems to be getting the same error |
13:34:22 | FromDiscord | <5Q> but that was not the case when I was trying to send 10MiB to my own server |
13:34:45 | FromDiscord | <5Q> in that case, it worked with python's requests, and didn't work with httpClient |
13:36:00 | FromDiscord | <dom96> it's possible there is something different about your server that triggers a bug in httpclient |
13:36:04 | FromDiscord | <dom96> what kind of server is it? |
13:36:53 | FromDiscord | <5Q> uvicorn with fastapi |
13:39:02 | FromDiscord | <5Q> wait what, now it works, I'm so confused lol |
13:41:29 | FromDiscord | <5Q> i have no idea what is going on and why it works now, i can't reproduce it↵maybe it has something to do with locks in my main program |
13:41:42 | FromDiscord | <eyecon> The server is probably load-balanced so you are maybe having the issue with some specific servers that happen to be used for that connection |
13:42:12 | FromDiscord | <eyecon> Or timing issues combined with latency |
13:42:24 | FromDiscord | <5Q> originally I was having that issue on a local web server, so no load balancing there↵(@eyecon) |
13:42:54 | FromDiscord | <dom96> could have just been a temporary network glitch |
13:43:13 | FromDiscord | <dom96> and maybe it did cause a bug in httpclient but unless we can repro it'll be hard to find :) |
13:46:15 | * | kayabaNerve quit (Ping timeout: 260 seconds) |
13:51:04 | NimEventer | New Nimble package! uspokoysa - Dead simple Nim app for making timebreaks, see https://github.com/ioplker/uspokoysa |
13:51:56 | NimEventer | New thread by R3c: Best practices for porting huge C projects to Nim, see https://forum.nim-lang.org/t/9139 |
13:58:31 | * | vicfred joined #nim |
13:58:53 | * | PMunch quit (Quit: Leaving) |
14:22:02 | * | arkurious joined #nim |
14:23:33 | FromDiscord | <5Q> sent a long message, see http://ix.io/3WSD |
14:25:29 | FromDiscord | <dom96> This is why I avoid threads for as long as I can :D |
14:25:36 | FromDiscord | <dom96> (edit) "This is why I avoid threads for as long as I can ... :D" added "in all my projects" |
14:32:30 | * | tdc quit (Quit: Client closed) |
14:37:32 | * | tdc joined #nim |
14:48:08 | * | tiorock joined #nim |
14:48:08 | * | tiorock quit (Changing host) |
14:48:08 | * | tiorock joined #nim |
14:48:08 | * | rockcavera quit (Killed (mercury.libera.chat (Nickname regained by services))) |
14:48:08 | * | tiorock is now known as rockcavera |
15:19:31 | FromDiscord | <d4rckh> what's the best way of getting my own process' integrity level on windows in nim? |
15:29:27 | * | vicfred quit (Quit: Leaving) |
15:31:58 | FromDiscord | <leorize> if you can find the winapi for it, winim should have the wrappers that you need |
15:32:56 | FromDiscord | <eyecon> In reply to @d4rckh "what's the best way": Might prove handy: https://github.com/byt3bl33d3r/OffensiveNim/blob/master/src/sandbox_process_bin.nim#L37= |
15:40:12 | FromDiscord | <d4rckh> In reply to @eyecon "Might prove handy: https://github.com/byt3bl33d3r/O": oh yeah, id probably need another function to get the integrity level? |
15:40:49 | FromDiscord | <eyecon> I mean the whole file, forget the line highlight |
16:00:08 | * | tdc quit (Quit: Client closed) |
16:08:30 | NimEventer | New thread by Solomonthewise: How to initialize a ref seq type, see https://forum.nim-lang.org/t/9141 |
16:25:31 | FromDiscord | <Yardanico> It's really interesting that some posts in https://forum.nim-lang.org/t/9132 propose polar changes to each other |
16:25:47 | FromDiscord | <Yardanico> Some want a bigger stdlib with more batteries included, some want to strip it down all the way |
16:27:37 | FromDiscord | <deech> It may be time to lock the discussion on this RFC haha https://github.com/nim-lang/RFCs/issues/456 |
16:28:07 | FromDiscord | <dom96> In reply to @mothumix "Some want a bigger": yeah, varied array of opinions. IIRC our survey showed consistently that people are generally happy with the size of the stdlib currently |
16:28:27 | FromDiscord | <dom96> In reply to @deech "It may be time": Why's that? |
16:29:49 | FromDiscord | <deech> In reply to @dom96 "Why's that?": I'm not anything new will come in, we've heard from active, casual and potential Nim users, it's probably time for someone to make a decision. |
16:30:33 | FromDiscord | <Yardanico> those discussions can take a long time, it's fine |
16:30:46 | FromDiscord | <dom96> I see. I think as long as the discussion is civil we should be okay to keep it open. But yeah, once we make a decision it likely will be time to lock it. |
16:32:15 | FromDiscord | <Yardanico> yeah, the discussion itself is very civil and polite (with a few joking posts) |
16:33:02 | * | noeontheend joined #nim |
16:34:38 | NimEventer | New thread by Solomonthewise: Is Object significantly less efficient then ref object over here, see https://forum.nim-lang.org/t/9142 |
16:38:01 | FromDiscord | <deech> I was under the impression that the Nim identifier underscore rule was due to style insensitivity, otherwise `a == a_ == a` ? https://nim-lang.org/docs/manual.html#lexical-analysis-identifiers-amp-keywords |
16:38:19 | FromDiscord | <Yardanico> In reply to @deech "I was under the": Nim does not support leading/trailing underscores at all |
16:38:36 | FromDiscord | <Yardanico> As well as it doesn't support digits as leading characters in identifiers |
16:38:42 | Amun-Ra | deech: fooBar == foo_bar |
16:39:01 | FromDiscord | <deech> I'm aware but I thought the reason for that was because of style insensitivity. |
16:39:02 | Amun-Ra | I'm team snake case, a minority in nim world |
16:39:17 | Amun-Ra | yes, that was the reason |
16:39:25 | FromDiscord | <sheerluck> I like `foo_bar` btw |
16:39:48 | Amun-Ra | I use python's code style |
16:39:57 | FromDiscord | <sheerluck> #Metoo |
16:39:59 | FromDiscord | <dom96> yeah, afaik leading/trailing and multiple underscores are disallowed because of style insensitivity |
16:40:53 | FromDiscord | <deech> That's what I thought but was confused when a number of people (eg. https://github.com/nim-lang/RFCs/issues/456#issuecomment-1114185725) suggested that they were completely different issues when I brought it up. |
16:44:05 | FromDiscord | <Yardanico> hm, but why would it be because of style insensitivity specifically? |
16:44:13 | FromDiscord | <Yardanico> leading numbers are also disallowed in identifiers for example |
16:44:33 | FromDiscord | <Yardanico> I don't see a reason why case insensitivity would work differently for Nim if `_foo` was allowed, since it'd just mean the same as `foo` |
16:44:51 | Amun-Ra | I'd welcome leading underscore for an equvalent of used pragma |
16:44:59 | FromDiscord | <dom96> `_foo` is disallowed precisely because it's no different to `foo` |
16:45:05 | FromDiscord | <Yardanico> but `f_oo` is allowed :) |
16:45:16 | FromDiscord | <Yardanico> sorry, I don't see the difference in those examples really |
16:45:20 | FromDiscord | <dom96> Well I dunno, only Araq knows for sure I guess |
16:45:45 | FromDiscord | <Yardanico> heh, right :P |
16:45:45 | FromDiscord | <dom96> maybe it is independent of style insensitivity and Araq just dislikes leading underscores and multiple underscores in idents |
16:45:45 | FromDiscord | <deech> It would seem like an odd rule for identifiers without style insensitivity. |
16:46:03 | FromDiscord | <dom96> @Araq do you want to chime in? |
16:47:13 | FromDiscord | <sheerluck> Thou shalt not take the name of Araq in vain |
16:47:14 | FromDiscord | <deech> Do macros and typetraits have style normalizing support for identifiers? |
16:49:09 | FromDiscord | <deech> Also does `--styleCheck` extend to macro/template generated identifiers? |
16:49:16 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
16:49:35 | FromDiscord | <dom96> btw plenty of threads on the forum about this, one might hold the answer to why these identifier rules exist https://www.google.com/search?q=underscore+site:forum.nim-lang.org |
16:49:35 | FromDiscord | <Yardanico> In reply to @deech "Do macros and typetraits": There's no need for that as case insensitivity applies to all Nim identifiers, even if they were created in macros |
16:49:47 | FromDiscord | <Yardanico> And for comparing identifiers things like https://nim-lang.org/docs/macros.html#eqIdent%2CNimNode%2CNimNode exist |
16:51:23 | FromDiscord | <Yardanico> In reply to @dom96 "btw plenty of threads": So it seems like disallowing leading/trailing underscores is intended, and not just a byproduct of case insensitivity |
16:54:34 | FromDiscord | <Yardanico> @dom96 is it ok if I scrape the forum posts? I will do it directly through the API to not overload the server much |
16:57:48 | FromDiscord | <dom96> sure, go for it |
17:00:26 | FromDiscord | <Yardanico> also I think it'd be a bit better to limit this to some max value (probably 100?) so you can't easily DoS the forum - https://github.com/nim-lang/nimforum/blob/master/src/forum.nim#L841 |
17:00:42 | FromDiscord | <Yardanico> i tried using a big number, and it actually gave me all threads in one request |
17:01:55 | FromDiscord | <dom96> sure, but it's not like we've got that many threads |
17:02:18 | FromDiscord | <Yardanico> ~9 thousand is not that much, but not that low |
17:02:27 | FromDiscord | <Yardanico> I think the forum lagged for like 5-10 seconds |
17:02:53 | FromDiscord | <Yardanico> I mean the exact number I got is 8533, because some threads were deleted I guess |
17:07:32 | FromDiscord | <dom96> which reminds me, with Nim 1.6.6 we should get our Nimforum CI to be green again |
17:48:47 | * | noeontheend quit (Ping timeout: 240 seconds) |
17:49:02 | FromDiscord | <Araq> @deech an underscore is a separator, it separates words. At the beginning and end there is nothing to seperate, hence it's disallowed. You're not supposed to use ASCII art for your identifiers |
17:50:02 | * | noeontheend joined #nim |
17:54:39 | FromDiscord | <deech> I don't personally use it but it does come up a fair amount in C/C++ as you know so bindings become less straightforward. |
17:55:53 | Amun-Ra | in C world it's mostly used in macros (one undersore, two underscores are reserved) |
17:57:43 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3WTs |
18:02:01 | * | Zectbumo joined #nim |
18:04:58 | * | noeontheend quit (Ping timeout: 250 seconds) |
18:13:03 | * | tiorock joined #nim |
18:13:04 | * | tiorock quit (Changing host) |
18:13:04 | * | tiorock joined #nim |
18:13:04 | * | rockcavera quit (Killed (sodium.libera.chat (Nickname regained by services))) |
18:13:04 | * | tiorock is now known as rockcavera |
18:13:14 | * | Guest11 joined #nim |
18:15:05 | * | Guest11 quit (Client Quit) |
18:15:45 | FromDiscord | <Araq> yes, well |
18:15:48 | FromDiscord | <eyecon> In reply to @vindaar "exactly, only UTF8 art": Holy shit that really works |
18:16:26 | FromDiscord | <Araq> Unicode is too complex to prevent bad names of |
18:16:37 | FromDiscord | <Araq> plus it keeps changing |
18:18:47 | * | genpaku quit (Ping timeout: 240 seconds) |
18:20:55 | FromDiscord | <Generic> I'm going to use a gedankenstrich when I need to wrap a C library where symbols overlap when underscores are left out |
18:21:33 | FromDiscord | <Generic> `GL—FLOAT` looks about right |
18:23:28 | FromDiscord | <eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3WTB |
18:23:48 | FromDiscord | <Generic> oh even better idea |
18:24:00 | FromDiscord | <Generic> I'll write my variable names in IPA symbols, so everybody can pronounce them properly |
18:27:03 | * | genpaku joined #nim |
18:28:44 | FromDiscord | <Phil> Wait, you can just put a minus in front of variables and that becomes part of the variable? |
18:28:56 | FromDiscord | <Phil> I'm learning so much variable name necromancy |
18:29:27 | FromDiscord | <Phil> No wait, that doesn't work |
18:29:28 | FromDiscord | <Phil> How the heck |
18:29:51 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WTD |
18:30:39 | FromDiscord | <Generic> sent a code paste, see https://play.nim-lang.org/#ix=3WTE |
18:30:47 | FromDiscord | <Phil> This looks horrible |
18:30:57 | FromDiscord | <eyecon> In reply to @Isofruit "What is this dark": That's an em dash at the beginning, which is incredibly considered an acceptable character for an identifier |
18:30:58 | FromDiscord | <Generic> excuse my terrible transcription, I didn't even put the syllable or stress markers |
18:31:09 | FromDiscord | <Phil> If that code somehow sacrifices a newborn, I won't be surprised |
18:31:23 | FromDiscord | <Generic> also a lot of the segments are probably also just wrong |
18:31:35 | FromDiscord | <Generic> I'm pretty bad at phonetic |
18:31:48 | FromDiscord | <eyecon> https://www.compart.com/en/unicode/U+2014 |
18:32:15 | FromDiscord | <Phil> Thanks, I hate this |
18:32:48 | FromDiscord | <Phil> I'm sticking in my save camelCase and Screaming case space |
18:32:55 | FromDiscord | <Phil> (edit) "save" => "safe" |
18:33:04 | FromDiscord | <Phil> (edit) "in" => "to" |
18:33:55 | FromDiscord | <Phil> Where I know my compile-time consts at a glance and don't have underscores anywhere... unless my databases forces them upon me |
18:34:17 | FromDiscord | <Phil> (edit) "consts" => "config-consts" |
18:34:58 | FromDiscord | <eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3WTG |
18:37:47 | FromDiscord | <eyecon> I didn't know this:↵> Currently, any Unicode character with an ordinal value > 127 (non-ASCII) is classified as a letter and may thus be part of an identifier but later versions of the language may assign some Unicode characters to belong to the operator characters instead. |
18:37:57 | FromDiscord | <Generic> In reply to @eyecon "Oxford thinks it's `/eɪdʒ/`": ah right, I hear it now too |
18:38:08 | FromDiscord | <eyecon> This is bound to give some _charm_ to my variable names |
18:38:14 | FromDiscord | <eyecon> /s |
18:46:58 | FromDiscord | <Yardanico> In reply to @eyecon "I didn't know this:": this is already true with --experimental:unicodeOperators btw |
18:47:18 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#lexical-analysis-unicode-operators |
19:08:41 | FromDiscord | <eyecon> I had seen that but somehow missed the "everything above codepoint 128 goes" rule |
19:20:36 | * | kayabaNerve joined #nim |
19:23:56 | * | vicfred joined #nim |
19:29:08 | FromDiscord | <FireLite> sent a code paste, see https://play.nim-lang.org/#ix=3WTN |
19:32:01 | * | jmdaemon joined #nim |
19:34:43 | FromDiscord | <undel> https://nim-lang.org/docs/threads.html has an example of spawning a thread↵↵if you really want to call kernel32.CreateThread, you can also import it and call it directly, though that's much more work |
19:36:20 | FromDiscord | <FireLite> I am writing a dll, so I think kernel32 is a better option. |
19:44:39 | * | pch quit (Read error: Connection reset by peer) |
19:45:56 | * | kayabaNerve quit (Ping timeout: 250 seconds) |
19:45:57 | * | vicfred quit (Quit: Leaving) |
19:55:23 | * | kayabaNerve joined #nim |
20:44:42 | FromDiscord | <d4rckh> Is it happening only me that the Nim docs freeze when I open them in chrome on android? |
20:45:17 | FromDiscord | <Yardanico> if you're opening a large document (e.g. the manual), that might happen, it's a chrome issue really |
20:45:47 | FromDiscord | <d4rckh> Oh, I see. It's really annoying |
20:53:59 | * | LuxuryMode joined #nim |
21:13:36 | * | Gustavo6046 joined #nim |
21:14:37 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
21:16:44 | FromDiscord | <demotomohiro> I can read and scroll Nim manual in vivaldi on android. |
21:17:06 | FromDiscord | <d4rckh> Weird. |
21:17:12 | FromDiscord | <d4rckh> Also, Nim doesn't support circular imports? |
21:19:27 | * | Gustavo6046 joined #nim |
21:19:47 | FromDiscord | <Yardanico> In reply to @d4rckh "Also, Nim doesn't support": only in limited cases |
21:20:33 | FromDiscord | <Elegantbeef> Well it supports it, it's just that it works as you read it you only can import what's above the import cycle |
21:20:38 | FromDiscord | <Yardanico> exactly |
21:20:46 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WU6 |
21:21:45 | FromDiscord | <Yardanico> as you can see here, the main thing is that you have to import modules that depend on the (main) module after defining symbols that are needed by those modules |
21:22:04 | FromDiscord | <Elegantbeef> This gets very confusing with multiple modules but it's usable |
21:22:20 | FromDiscord | <Elegantbeef> Whenever nim 2.0 comes out this will not be an issue |
21:22:25 | FromDiscord | <Yardanico> 🤔 |
21:22:50 | FromDiscord | <d4rckh> I currently have all of my custom types in a single file in a very weird order, because some types depend on other types which depend on more types and it's a mess |
21:23:08 | FromDiscord | <Yardanico> just put types into the same `type` block |
21:23:09 | FromDiscord | <Elegantbeef> guess i might be wrong it's mentioned in the 2.0 RFC though |
21:23:09 | FromDiscord | <d4rckh> I tried once splitting them in multiple files but didn't succeed so here I am |
21:23:25 | FromDiscord | <Yardanico> if you put all types into the same `type` block you can have types depend on each other |
21:23:26 | FromDiscord | <Elegantbeef> Put all your types in a single type def |
21:23:30 | FromDiscord | <Elegantbeef> Then order doesnt matter |
21:23:39 | FromDiscord | <d4rckh> Okay. What the hell |
21:23:43 | FromDiscord | <Elegantbeef> Or show the code |
21:24:04 | FromDiscord | <Yardanico> and stuff |
21:24:08 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WU7 |
21:24:15 | FromDiscord | <Elegantbeef> With the code someone can show you how to arrange it while preserving the API |
21:24:38 | FromDiscord | <d4rckh> I know I had them under the same type keyword but the order did matter... i will give it another try i think i did something wrong |
21:25:50 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WU9 |
21:25:57 | FromDiscord | <Yardanico> yes |
21:26:02 | FromDiscord | <Elegantbeef> Of course not |
21:26:02 | FromDiscord | <Yardanico> you don't need to |
21:26:06 | FromDiscord | <Elegantbeef> Would be quite useless to need to do it 😛 |
21:26:11 | FromDiscord | <d4rckh> Yeah haha |
21:26:12 | FromDiscord | <d4rckh> Thought so |
21:30:01 | FromDiscord | <d4rckh> In reply to @Elegantbeef "With the code someone": Haha, I will in sec, thank you |
21:30:23 | FromDiscord | <d4rckh> <https://github.com/d4rckh/nimc2> |
21:30:47 | FromDiscord | <d4rckh> <https://github.com/d4rckh/nimc2/blob/main/src/server/types.nim> |
21:31:57 | FromDiscord | <Yardanico> but you have different type blocks? |
21:32:04 | FromDiscord | <Yardanico> you can merge all of the definitions into one `type` block |
21:32:37 | FromDiscord | <d4rckh> Yeah, I do. I used to have one block but something didn't work out I think |
21:59:26 | * | lumo_e joined #nim |
22:28:01 | * | buster_blue[m] joined #nim |
22:35:48 | * | firq quit (Ping timeout: 246 seconds) |
23:22:14 | FromDiscord | <slomp (Marcos Slomp)> sent a code paste, see https://play.nim-lang.org/#ix=3WUu |
23:23:01 | FromDiscord | <Yardanico> openArrays are not first class in Nim, you need to enable an experimental feature so they become that |
23:23:12 | FromDiscord | <Yardanico> and it's well, experimental, so don't be surprised if you get crashes and stuff |
23:23:17 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual_experimental.html#view-types |
23:23:52 | nrds | <Prestige99> maybe a nim 2.0 change could be allowing `for i in 9..01 |
23:23:59 | nrds | <Prestige99> for i in 9..0 |
23:24:07 | nrds | <Prestige99> I still think it's weird we can't do that |
23:25:12 | FromDiscord | <slomp (Marcos Slomp)> Ah, I see, thanks! |
23:26:02 | FromDiscord | <slomp (Marcos Slomp)> sent a code paste, see https://paste.rs/hir |
23:32:42 | FromDiscord | <Elegantbeef> Prestige it probably wont |
23:35:04 | nrds | <Prestige99> unfortunate |
23:35:25 | FromDiscord | <huantian> most languages don't do that, you usually add like a step argument to make it ocunt down |
23:35:34 | FromDiscord | <Elegantbeef> I mean it's an overhead cost aswell |
23:35:58 | FromDiscord | <Elegantbeef> You could reason it statically i guess to get it for free if the values are consts |
23:36:10 | nrds | <Prestige99> yeah |
23:36:50 | FromDiscord | <Elegantbeef> So i guess all in all, make it yourself 😛 |
23:36:54 | nrds | <Prestige99> I might just pretend that sytax doesn't exist and explicitly use countup and countdown |
23:37:01 | FromDiscord | <huantian> but an inconsistent behavior between static and runtime values would be annoying imo |
23:37:13 | nrds | <Prestige99> because people get tripped up with for i in a..b |
23:37:38 | FromDiscord | <Elegantbeef> I mean it matches the syntax of ranges |
23:38:18 | FromDiscord | <Elegantbeef> `type A = 10..0` gives a nice 'Error\: range is empty' |
23:38:45 | nrds | <Prestige99> Kind of find that odd as well |
23:39:02 | FromDiscord | <Elegantbeef> Not that odd |
23:39:15 | FromDiscord | <Elegantbeef> did you mean `0..10` or `10..20` |
23:40:11 | FromDiscord | <Elegantbeef> Slices are the only part of the `..` syntax that allow a \> b |
23:40:56 | FromDiscord | <Elegantbeef> `var a = 10..0` works for instance but `5 in a` is false |
23:41:03 | nrds | <Prestige99> weird |
23:41:19 | nrds | <Prestige99> I hope we get better editor support by 2.0, I'm dying over here |
23:54:03 | * | noeontheend joined #nim |
23:59:10 | FromDiscord | <Elegantbeef> Damn playing with wasm is becoming quite a fun little project |
23:59:27 | nrds | <Prestige99> I need to get wasm working for my project :o |
23:59:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WUx |
23:59:59 | FromDiscord | <Elegantbeef> I'm not outputting wasm for web but for embdeded scripting |