<< 03-05-2022 >>

00:21:12FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3WQ2
00:22:10FromDiscord<huantian> wait does macos not use open as well?
00:22:29FromDiscord<!Patitotective> do you mean that windows use open as well? cause macos already uses open
00:23:18FromDiscord<huantian> yes sorry
00:24:32FromDiscord<!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:09FromDiscord<huantian> huh
00:26:52FromDiscord<huantian> std/browsers seems to use `shellExecuteW` with `open` so I guess that's why
00:33:24FromDiscord<Elegantbeef> Dude that's a library↵(@!Patitotective)
00:33:49FromDiscord<Elegantbeef> Not an overly complex one, but it's a library
00:34:22FromDiscord<!Patitotective> seems like one more proc i could add to my 200 lines utils module 🤔
00:35:14FromDiscord<Elegantbeef> Of course you can put it there 😄
00:36:20*vicfred quit (Quit: Leaving)
00:36:59FromDiscord<!Patitotective> its getting too big :[ i dont like big modules
00:37:26FromDiscord<Elegantbeef> Well then dont make big modules
00:37:48FromDiscord<Elegantbeef> Though there isnt much reason to be scared of big modules
00:38:16FromDiscord<!Patitotective> In reply to @Elegantbeef "Though there isnt much": minima...
00:39:55FromDiscord<Elegantbeef> minimal what?
00:40:12FromDiscord<Elegantbeef> You can spread out modules all day long but if the API sucks you got nothing
00:40:52FromDiscord<!Patitotective> In reply to @Elegantbeef "minimal what?": minimap _sk
00:40:57FromDiscord<!Patitotective> (edit) "_sk" => "💀"
00:41:08FromDiscord<Elegantbeef> What?
00:41:25FromDiscord<Elegantbeef> Are we playing a RTS?
00:41:39*Gustavo6046 joined #nim
00:42:02FromDiscord<!Patitotective> minimap https://media.discordapp.net/attachments/371759389889003532/970847667867488316/unknown.png
00:42:16FromDiscord<!Patitotective> In reply to @Elegantbeef "Are we playing a": i would if my computer could
00:42:43FromDiscord<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:10FromDiscord<!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:44FromDiscord<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:51FromDiscord<!Patitotective> you may have a inertial scroll wheel lmao
00:45:53FromDiscord<!Patitotective> (edit) "a" => "an"
00:45:56FromDiscord<Elegantbeef> "Oh yes there is code in my code"
00:46:11FromDiscord<!Patitotective> In reply to @Elegantbeef ""Oh yes there is": lol
00:46:24FromDiscord<Elegantbeef> I dont
00:46:34*Gustavo6046 quit (Max SendQ exceeded)
00:46:38FromDiscord<!Patitotective> it makes the right side look not so empty
00:46:48FromDiscord<Elegantbeef> So what
00:47:00FromDiscord<!Patitotective> empty...
00:47:01FromDiscord<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:08FromDiscord<!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:25FromDiscord<Elegantbeef> You know you can click the scrollbar right?
00:48:30*Onionhammer quit (Quit: The Lounge - https://thelounge.chat)
00:48:32FromDiscord<Elegantbeef> That's been a feature since like the early 90s
00:48:47*Onionhammer joined #nim
01:03:48FromDiscord<!Patitotective> :[
01:21:57FromDiscord<!Patitotective> why does it take soo much to install nimgl :[
01:23:56FromDiscord<Elegantbeef> Get faster internet
01:24:17FromDiscord<Elegantbeef> it does clone the source of imgui iirc so that's probably why
01:24:52FromDiscord<!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:52FromDiscord<!Patitotective> what about nimble progress bar lol↵~~PRs open~~
01:52:24FromDiscord<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:38FromDiscord<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:39FromDiscord<Elegantbeef> What's the issue?
01:53:22FromDiscord<Elegantbeef> do you have `libssl1.1` installed?
01:53:50FromDiscord<Elegantbeef> Or does ubuntu have a too recent libssl
01:54:33FromDiscord<deadmeme77> yeah I can only see libssl3 3.0.2-0ubuntu1 now
01:55:28FromDiscord<deadmeme77> someone already reported it https://github.com/dom96/choosenim/issues/297
01:55:52FromDiscord<Elegantbeef> Yep there's the issue then
01:56:02FromDiscord<Elegantbeef> Flatpak/appimage is a wonderful idea
01:56:12FromDiscord<deadmeme77> OK, I'll try getting choosenim in a nix-shell then
01:57:06FromDiscord<Elegantbeef> Yea a flatpak or appimage really should be used if the dependencies are kept
02:08:21NimEventerNew 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:32FromDiscord<Elegantbeef> Lol dont think it's KDE
04:23:33FromDiscord<Elegantbeef> My element also crashes with new notifications
04:23:35FromDiscord<Elegantbeef> Might be an electron bug
04:23:35FromDiscord<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:35FromDiscord<huantian> but that sounds like great news!
04:23:37FromDiscord<huantian> grr something is brokey with KDE notifs, clicking on them crashes both elelment and discord
04:25:38FromDiscord<huantian> element broken? that hasn't happened ever!
04:25:57FromDiscord<Elegantbeef> You mean electron
04:26:22FromDiscord<huantian> yes
04:26:34FromDiscord<huantian> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/970903941200109608): element broken? that hasn't happened ever!↵\electron
04:27:23FromDiscord<Elegantbeef> Hell yea got basic call working 😄
04:27:57FromDiscord<Elegantbeef> Tested with a Nim file compiled with emcc
04:31:49FromDiscord<Elegantbeef> Well my work is here if you ever want to tinker https://github.com/beef331/wasmedge_playground
04:34:49FromDiscord<huantian> I'll take a look
04:36:52FromDiscord<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:23FromDiscord<5Q> sent a code paste, see https://paste.rs/Tgh
04:47:06FromDiscord<Elegantbeef> You may want to use `MultiPartData`
04:47:34FromDiscord<5Q> I'm already using it
04:47:57FromDiscord<5Q> actually, I may be using it wrong
04:48:18FromDiscord<5Q> I think I should try to send my big chunk of data like a file, not just a string
04:49:12FromDiscord<Elegantbeef> You should do something like `myData.addFiles [("myFileName", "my/file/path")]`
04:49:43FromDiscord<Elegantbeef> Or i guess `myData.addFiles {"myFileName": "my/file/path"}` 😄
04:49:51FromDiscord<5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WQr
04:50:28FromDiscord<Elegantbeef> Perhaps, but it all being in memory might be the issue
04:50:51FromDiscord<Elegantbeef> I dont know the HTTP protocol's limitation on single file uploads or if there is even
04:51:25FromDiscord<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:25FromDiscord<5Q> I don't think there is, tried looking it up
04:51:36FromDiscord<Elegantbeef> So hopefully someone with a brain here speaks instead of me 😄
04:51:45FromDiscord<5Q> it's mostly limits imposed by the servers handling the requests
04:52:11FromDiscord<5Q> and I checked that my server supports that much data, I was able to send 300 MiB using python requests.post
04:52:53FromDiscord<Elegantbeef> Can i see the code?
04:53:12FromDiscord<5Q> yes, one second, let me try this first
04:59:14FromDiscord<5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WQs
05:00:11FromDiscord<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:50FromDiscord<Elegantbeef> Yea i sadly dont know what to say
05:02:37FromDiscord<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:03FromDiscord<5Q> bugs just hunt me when I code in nim
05:05:47FromDiscord<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:27FromDiscord<5Q> arch users\:↵(@huantian)
05:11:30FromDiscord<5Q> image.png https://media.discordapp.net/attachments/371759389889003532/970915483266187314/image.png
05:13:05FromDiscord<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:23FromDiscord<Mike> Hey does anyone know how to do a POST request using the js backend?
05:51:07FromDiscord<Mike> sent a code paste, see https://play.nim-lang.org/#ix=3WQD
05:51:37FromDiscord<Mike> But the docs for jsfetch say `## `fetch()`API, simple`GET`only, returns a`Future[Response]\`\`
05:53:18*jjido joined #nim
05:54:33FromDiscord<Mike> I realize there's this\: `proc fetch(url: cstring | Request; options: FetchOptions): Future[Response] {.importjs: "$1(#, #)".}`
05:55:53FromDiscord<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:06FromDiscord<Mike> I have to be missing something obvious
05:58:54FromDiscord<Elegantbeef> This is the `jsfetch` module?
05:59:54FromDiscord<Elegantbeef> I'd personally say make a `post` variant with the same way `fetch` is implemented
05:59:54FromDiscord<Elegantbeef> but idk
06:00:46FromDiscord<Mike> Hmm, okay. Is there a better module to be using here or is the jsfetch module just underdeveloped?
06:00:58FromDiscord<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:26FromDiscord<Elegantbeef> I dont really touch the JS backend so cannot say much
06:02:52FromDiscord<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:09FromDiscord<Elegantbeef> This is in browser right?
06:05:27*Lord_Nightmare joined #nim
06:06:11FromDiscord<Mike> Yeah. Specifically a Flutter app where I'm using the foreign function interface to libraries that Nim generates
06:07:38FromDiscord<Mike> So there's a c lib when running on android and ios and a js lib when running on web
06:08:03FromDiscord<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:18FromDiscord<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:41FromDiscord<Mike> 😢
06:14:59FromDiscord<huantian> Could just use a jsobject for the options? That way you don’t specify all the options
06:15:08FromDiscord<huantian> Not too sure how that works
06:16:08FromDiscord<Elegantbeef> Well all the options are exposed so you can just use a nim constructor
06:18:22FromDiscord<huantian> Wait yeah, what’s the issue exactly?
06:19:43FromDiscord<huantian> Also I hate this rename lmao https://media.discordapp.net/attachments/371759389889003532/970932650556661790/image0.jpg
06:19:48FromDiscord<huantian> metod
06:20:06FromDiscord<Elegantbeef> Yea i'd rather `Meth`
06:20:12FromDiscord<Elegantbeef> Or an enum of `FetchMethods`
06:20:26FromDiscord<huantian> I should add renaming this field to the Nim v2 thread
06:29:04FromDiscord<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:39FromDiscord<Mike> sent a code paste, see https://play.nim-lang.org/#ix=3WQP
06:34:01FromDiscord<Mike> (and not that it matters, but I agree that intentionally misspelling a parameter name is not the way)
06:36:40PMunch@Elegantbeef, where do you get the wasmedge libraries you're wrapping?
06:37:32PMunch@huantian, ouch that rename is horrible indeed!
06:38:29FromDiscord<Elegantbeef> https://wasmedge.org/book/en/#install
06:42:31FromDiscord<enthus1ast> Funny absolutely never had a arch update break my system, \~5 years rolling updates, milage will wary I guess
06:44:12FromDiscord<enthus1ast> Ubuntu did break (eg full boot partition when new kernel installed)
06:45:56FromDiscord<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:28PMunchI'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:28PMunch@Elegantbeef, I don't want to install it though :P
07:18:39PMunchI just want the headers so I can try to get Futhark to wrap it
07:20:19PMunchOh man, WasmEdge uses a weird way of defining enums :P
07:20:42PMunchIt's actually pretty cool that Futhark is even capable of wrapping that
07:20:50FromDiscord<5Q> Is there any alternatives to httpclient that don't use it?
07:21:02FromDiscord<Elegantbeef> puppy
07:22:13PMunchhttps://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:28PMunchI wonder why they've done it that way..
07:23:32PMunchOoh, it's to avoid having to specify them multiple times, nifty
07:26:13FromDiscord<Elegantbeef> Yea i dont know much just toying around with it and running into issues with futhark for the most part 😛
07:26:48PMunchI mean it's a wonder that it even manages to read that, good luck feeding that through c2nim or nimterop
07:28:04FromDiscord<Elegantbeef> Anyway like i said changing your int128 definition fixed it
07:28:24FromDiscord<Elegantbeef> So perhaps just importing it changes the way Nim reasons the size?
07:28:38FromDiscord<Elegantbeef> Or it uses C's size i guess
07:34:43FromDiscord<m4ul3r> sent a code paste, see https://paste.rs/XTg
07:35:00PMunch@Elegantbeef, I figured out the reason, check the issue again ;)
07:36:33FromDiscord<Elegantbeef> Dont think you need to escape the space
07:36:37PMunch@m4ul3r, I don't think you have to escape spaces when using walkDir
07:37:06FromDiscord<m4ul3r> ah, very simple fix. Nim handles it for me?
07:38:15PMunch@m4ul3r, it should do, yeah
07:38:18PMunchWhy wouldn't it?
07:42:21FromDiscord<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:46FromDiscord<tandy> yes
08:12:00FromDiscord<Elegantbeef> There we go your new hero
08:12:00FromDiscord<tandy> yes again
08:12:41FromDiscord<tandy> https://nim-lang.github.io/Nim/jsfetch read the docs, and jsfetch from nim devel branch
08:13:00FromDiscord<tandy> OR use nodejs/jshttpclient
08:13:17FromDiscord<tandy> https://github.com/juancarlospaco/nodejs/blob/main/src/nodejs/jshttpclient.nim
08:13:58FromDiscord<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:41FromDiscord<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:44PMunchIs there a nice "user-management" system for Nim servers?
09:01:30PMunchI 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:40FromDiscord<dom96> There is a couple packages. Easiest thing is to implement oauth and support logins via gmail etc
09:05:50PMunchOoh that would be neat
09:05:57PMunchdom96, do you have any links or names?
09:06:29PMunchOh cool, Futhark is on the trending page of nimble.directory :)
09:07:08PMunchBut what happened with the star icons on there?
09:07:23PMunchWasn't there someone who was working on redesigning it?
09:17:25FromDiscord<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:46PMunchnim-httpauth looks good :) Oauth is of course another option though
09:17:47*jjido quit (Remote host closed the connection)
09:18:15PMunchchange B without changing B?
09:19:22FromDiscord<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:29FromDiscord<Elegantbeef> That's partially the benefit of dynlib
09:19:45FromDiscord<Elegantbeef> You can load a API compatible library after building
09:22:52FromDiscord<jmgomez> In reply to @PMunch "change B without changing": lol I meant change B without changing A
09:23:20FromDiscord<jmgomez> Cool, will give it a shot. Having a bad time trying to reuse the hot reloading system ue's provides
09:33:11FromDiscord<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:52FromDiscord<dom96> It does require a bit of reading and being careful to ensure you verify oauth tokens correctly
09:34:23FromDiscord<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:10FromDiscord<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:04FromDiscord<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:40FromDiscord<willyboar> In reply to @PMunch "But what happened with": Icons removed due to CDN
10:08:56PMunchAah I see
10:09:47FromDiscord<kiell> whats the best way to do kwargs from python in nim?
10:09:49FromDiscord<willyboar> I think there is no progress to the redesign
10:11:21PMunch@willyboar, https://github.com/FedericoCeratto/nim-package-directory/issues/47#issuecomment-1115903801
10:11:28PMunch@kiell, varargs?
10:13:13FromDiscord<willyboar> In reply to @PMunch "<@527930042555170833>, https://github.com/FedericoC": This is fresh so I missed it
10:14:07FromDiscord<willyboar> They are right. Scf are tough
10:15:42FromDiscord<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:47FromDiscord<kiell> i guess maybe tuples would work best in this case
10:17:23PMunch@willyboar, scf?
10:17:58FromDiscord<Rika> Source code filter I assume
10:18:12FromDiscord<willyboar> That
10:18:27PMunch@kiell, you can always group argument types `proc floatGenerator*(name: string, nullable, isUnique, isUnsigned, isDefault: bool, default: float): string`
10:19:11PMunchOf course another option is to create a flags enum and do `proc floatGenerator*(name: string, flags: set[Flag], default: float): string`
10:19:25FromDiscord<willyboar> It's a little painful to transform html to scf
10:20:05PMunchAh I wasn't aware that the directory was done using source code filters
10:21:32FromDiscord<willyboar> In reply to @PMunch "Ah I wasn't aware": Well I made the last redesign so I know the feeling 😋
10:27:32PMunchWhat makes converting html to scf more painful than any other templating language
10:30:53NimEventerNew thread by AlexKotik: CLOEXEC on old Linux kernel., see https://forum.nim-lang.org/t/9137
10:31:07FromDiscord<willyboar> In reply to @PMunch "What makes converting html": Prolly the syntax
10:36:42PMunchIs that syntax so much more foreign than other templating solutions? (sorry I haven't used a lot of HTML templating libraries)
10:38:40FromDiscord<willyboar> Not a lot but it's not the clearest out there.
10:39:18FromDiscord<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:57FromDiscord<jmgomez> sent a code paste, see https://paste.rs/pO3
11:11:34FromDiscord<planetis> What is the best microbenchmarking lib for Nim?
11:11:53PMunchbenchy is pretty nice
11:11:55FromDiscord<planetis> One that actually takes care that no reordering happens
11:12:18FromDiscord<planetis> I will check it
11:12:33PMunchNot sure if it does anything about reordering
11:13:18FromDiscord<planetis> nope
11:13:28FromDiscord<planetis> I have an issue with my results
11:13:29FromDiscord<Yardanico> In reply to @jmgomez "hey guys, why I": Can you show the error?
11:13:34FromDiscord<Yardanico> I mean full compiler error
11:13:50FromDiscord<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:48FromDiscord<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:51FromDiscord<jmgomez> In reply to @mothumix "Can you show the": not sure what was happening but now it seems to be fine
11:24:11FromDiscord<Yardanico> it's just cosmic rays hitting your computer:(
11:24:14FromDiscord<mratsim> you can add outliers / standard deviation stuff as well like criterion but well
11:24:17FromDiscord<Rika> In reply to @jmgomez "hey guys, why I": Also use the result variable xddd
11:24:47FromDiscord<Yardanico> Ah and yeah @jmgomez you should probably convert that cstring into a string
11:25:13FromDiscord<Yardanico> Does the C ffi you're using give you the ownership to it, so e.g. you should free it yourself?
11:25:14NimEventerNew thread by Zoom: Moderation policy for bans, see https://forum.nim-lang.org/t/9138
11:25:30FromDiscord<jmgomez> In reply to @Rika "Also use the result": what do you mean?
11:26:29FromDiscord<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:01FromDiscord<planetis> mratsim, nice thank you
11:32:09*slowButPresent joined #nim
11:33:54FromDiscord<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:35FromDiscord<larroteeno> hello everyone, is there a way of formatting code automatically with nim or nimble that I cannot find around?
11:51:33FromDiscord<mratsim> In reply to @larroteeno "hello everyone, is there": There is nimpretty, and Nim also has a --styleChecks flag
11:51:50FromDiscord<eyecon> Am I dumb? I have a beginner question: can't I use a global const in a proc?
11:52:02FromDiscord<larroteeno> is nimpretty an external package?
11:52:31FromDiscord<mratsim> In reply to @eyecon "Am I dumb? I": Yes you can
11:52:56FromDiscord<mratsim> In reply to @larroteeno "is nimpretty an external": Iirc it comes as a separate binary but with the compiler install
11:53:15FromDiscord<Yardanico> In reply to @eyecon "Am I dumb? I": Are you sure you used a `proc` and not a `func|?
11:53:21FromDiscord<mratsim> (As you guessed, my code isn't pretty)
11:54:14FromDiscord<eyecon> In reply to @mothumix "Are you sure you": Yeah, it is a proc alright
11:54:19FromDiscord<eyecon> I'm trying to simplify my case
11:54:48FromDiscord<eyecon> I hope this doesn't and in yet another compiler bug that only I happen to stumble on
11:54:56FromDiscord<eyecon> (edit) "and" => "end"
11:58:43*xet7 joined #nim
12:01:36FromDiscord<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:25FromDiscord<larroteeno> I am an idiot, it is installed lol
12:02:26FromDiscord<larroteeno> sorry
12:03:02FromDiscord<eyecon> Aha, I can't do `randomize()` at compile time
12:03:07FromDiscord<eyecon> That has been my issue apparently
12:03:51FromDiscord<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:41FromDiscord<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:20FromDiscord<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:08FromDiscord<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:25FromDiscord<Marcin> (edit) "i" => "in"
12:44:46FromDiscord<Marcin> (edit) "threads?" => "threads in builtin threadpool for spawn?"
12:50:51FromDiscord<Marcin> ok nvm found in source, thanks
13:03:18*v9fk quit (Read error: Connection reset by peer)
13:15:37FromDiscord<5Q> sent a code paste, see https://paste.rs/Cv0
13:16:02FromDiscord<Yardanico> honestly I don't know, never tried sending big chunks of data in httpclient
13:16:11FromDiscord<Yardanico> hmm
13:16:54FromDiscord<dom96> Maybe there is a bug in there somewhere. Does doing it via curl work?
13:17:15FromDiscord<5Q> yes, of course. I've already switched to using puppy, everything works great↵(@dom96)
13:17:32FromDiscord<5Q> So the server is not the culprit here
13:17:58FromDiscord<dom96> Ahh. Seems httpclient has a bug then
13:18:17FromDiscord<dom96> Please report and/or help us fix it if you’ve got some spare time :)
13:18:32FromDiscord<5Q> Ok, I will check if the issue is present on linux
13:23:23FromDiscord<5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WSg
13:23:40FromDiscord<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:13FromDiscord<5Q> hmm, just tried different websites, and I can send 10mib body to some sites
13:33:18FromDiscord<5Q> sent a code paste, see https://play.nim-lang.org/#ix=3WSn
13:34:03FromDiscord<5Q> actually, trying to send 10mib to google.com using python's requests seems to be getting the same error
13:34:22FromDiscord<5Q> but that was not the case when I was trying to send 10MiB to my own server
13:34:45FromDiscord<5Q> in that case, it worked with python's requests, and didn't work with httpClient
13:36:00FromDiscord<dom96> it's possible there is something different about your server that triggers a bug in httpclient
13:36:04FromDiscord<dom96> what kind of server is it?
13:36:53FromDiscord<5Q> uvicorn with fastapi
13:39:02FromDiscord<5Q> wait what, now it works, I'm so confused lol
13:41:29FromDiscord<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:42FromDiscord<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:12FromDiscord<eyecon> Or timing issues combined with latency
13:42:24FromDiscord<5Q> originally I was having that issue on a local web server, so no load balancing there↵(@eyecon)
13:42:54FromDiscord<dom96> could have just been a temporary network glitch
13:43:13FromDiscord<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:04NimEventerNew Nimble package! uspokoysa - Dead simple Nim app for making timebreaks, see https://github.com/ioplker/uspokoysa
13:51:56NimEventerNew 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:33FromDiscord<5Q> sent a long message, see http://ix.io/3WSD
14:25:29FromDiscord<dom96> This is why I avoid threads for as long as I can :D
14:25:36FromDiscord<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:31FromDiscord<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:58FromDiscord<leorize> if you can find the winapi for it, winim should have the wrappers that you need
15:32:56FromDiscord<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:12FromDiscord<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:49FromDiscord<eyecon> I mean the whole file, forget the line highlight
16:00:08*tdc quit (Quit: Client closed)
16:08:30NimEventerNew thread by Solomonthewise: How to initialize a ref seq type, see https://forum.nim-lang.org/t/9141
16:25:31FromDiscord<Yardanico> It's really interesting that some posts in https://forum.nim-lang.org/t/9132 propose polar changes to each other
16:25:47FromDiscord<Yardanico> Some want a bigger stdlib with more batteries included, some want to strip it down all the way
16:27:37FromDiscord<deech> It may be time to lock the discussion on this RFC haha https://github.com/nim-lang/RFCs/issues/456
16:28:07FromDiscord<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:27FromDiscord<dom96> In reply to @deech "It may be time": Why's that?
16:29:49FromDiscord<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:33FromDiscord<Yardanico> those discussions can take a long time, it's fine
16:30:46FromDiscord<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:15FromDiscord<Yardanico> yeah, the discussion itself is very civil and polite (with a few joking posts)
16:33:02*noeontheend joined #nim
16:34:38NimEventerNew thread by Solomonthewise: Is Object significantly less efficient then ref object over here, see https://forum.nim-lang.org/t/9142
16:38:01FromDiscord<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:19FromDiscord<Yardanico> In reply to @deech "I was under the": Nim does not support leading/trailing underscores at all
16:38:36FromDiscord<Yardanico> As well as it doesn't support digits as leading characters in identifiers
16:38:42Amun-Radeech: fooBar == foo_bar
16:39:01FromDiscord<deech> I'm aware but I thought the reason for that was because of style insensitivity.
16:39:02Amun-RaI'm team snake case, a minority in nim world
16:39:17Amun-Rayes, that was the reason
16:39:25FromDiscord<sheerluck> I like `foo_bar` btw
16:39:48Amun-RaI use python's code style
16:39:57FromDiscord<sheerluck> #Metoo
16:39:59FromDiscord<dom96> yeah, afaik leading/trailing and multiple underscores are disallowed because of style insensitivity
16:40:53FromDiscord<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:05FromDiscord<Yardanico> hm, but why would it be because of style insensitivity specifically?
16:44:13FromDiscord<Yardanico> leading numbers are also disallowed in identifiers for example
16:44:33FromDiscord<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:51Amun-RaI'd welcome leading underscore for an equvalent of used pragma
16:44:59FromDiscord<dom96> `_foo` is disallowed precisely because it's no different to `foo`
16:45:05FromDiscord<Yardanico> but `f_oo` is allowed :)
16:45:16FromDiscord<Yardanico> sorry, I don't see the difference in those examples really
16:45:20FromDiscord<dom96> Well I dunno, only Araq knows for sure I guess
16:45:45FromDiscord<Yardanico> heh, right :P
16:45:45FromDiscord<dom96> maybe it is independent of style insensitivity and Araq just dislikes leading underscores and multiple underscores in idents
16:45:45FromDiscord<deech> It would seem like an odd rule for identifiers without style insensitivity.
16:46:03FromDiscord<dom96> @Araq do you want to chime in?
16:47:13FromDiscord<sheerluck> Thou shalt not take the name of Araq in vain
16:47:14FromDiscord<deech> Do macros and typetraits have style normalizing support for identifiers?
16:49:09FromDiscord<deech> Also does `--styleCheck` extend to macro/template generated identifiers?
16:49:16*LuxuryMode quit (Quit: Connection closed for inactivity)
16:49:35FromDiscord<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:35FromDiscord<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:47FromDiscord<Yardanico> And for comparing identifiers things like https://nim-lang.org/docs/macros.html#eqIdent%2CNimNode%2CNimNode exist
16:51:23FromDiscord<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:34FromDiscord<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:48FromDiscord<dom96> sure, go for it
17:00:26FromDiscord<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:42FromDiscord<Yardanico> i tried using a big number, and it actually gave me all threads in one request
17:01:55FromDiscord<dom96> sure, but it's not like we've got that many threads
17:02:18FromDiscord<Yardanico> ~9 thousand is not that much, but not that low
17:02:27FromDiscord<Yardanico> I think the forum lagged for like 5-10 seconds
17:02:53FromDiscord<Yardanico> I mean the exact number I got is 8533, because some threads were deleted I guess
17:07:32FromDiscord<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:02FromDiscord<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:39FromDiscord<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:53Amun-Rain C world it's mostly used in macros (one undersore, two underscores are reserved)
17:57:43FromDiscord<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:45FromDiscord<Araq> yes, well
18:15:48FromDiscord<eyecon> In reply to @vindaar "exactly, only UTF8 art": Holy shit that really works
18:16:26FromDiscord<Araq> Unicode is too complex to prevent bad names of
18:16:37FromDiscord<Araq> plus it keeps changing
18:18:47*genpaku quit (Ping timeout: 240 seconds)
18:20:55FromDiscord<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:33FromDiscord<Generic> `GL—FLOAT` looks about right
18:23:28FromDiscord<eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3WTB
18:23:48FromDiscord<Generic> oh even better idea
18:24:00FromDiscord<Generic> I'll write my variable names in IPA symbols, so everybody can pronounce them properly
18:27:03*genpaku joined #nim
18:28:44FromDiscord<Phil> Wait, you can just put a minus in front of variables and that becomes part of the variable?
18:28:56FromDiscord<Phil> I'm learning so much variable name necromancy
18:29:27FromDiscord<Phil> No wait, that doesn't work
18:29:28FromDiscord<Phil> How the heck
18:29:51FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3WTD
18:30:39FromDiscord<Generic> sent a code paste, see https://play.nim-lang.org/#ix=3WTE
18:30:47FromDiscord<Phil> This looks horrible
18:30:57FromDiscord<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:58FromDiscord<Generic> excuse my terrible transcription, I didn't even put the syllable or stress markers
18:31:09FromDiscord<Phil> If that code somehow sacrifices a newborn, I won't be surprised
18:31:23FromDiscord<Generic> also a lot of the segments are probably also just wrong
18:31:35FromDiscord<Generic> I'm pretty bad at phonetic
18:31:48FromDiscord<eyecon> https://www.compart.com/en/unicode/U+2014
18:32:15FromDiscord<Phil> Thanks, I hate this
18:32:48FromDiscord<Phil> I'm sticking in my save camelCase and Screaming case space
18:32:55FromDiscord<Phil> (edit) "save" => "safe"
18:33:04FromDiscord<Phil> (edit) "in" => "to"
18:33:55FromDiscord<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:17FromDiscord<Phil> (edit) "consts" => "config-consts"
18:34:58FromDiscord<eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3WTG
18:37:47FromDiscord<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:57FromDiscord<Generic> In reply to @eyecon "Oxford thinks it's `/eɪdʒ/`": ah right, I hear it now too
18:38:08FromDiscord<eyecon> This is bound to give some _charm_ to my variable names
18:38:14FromDiscord<eyecon> /s
18:46:58FromDiscord<Yardanico> In reply to @eyecon "I didn't know this:": this is already true with --experimental:unicodeOperators btw
18:47:18FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#lexical-analysis-unicode-operators
19:08:41FromDiscord<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:08FromDiscord<FireLite> sent a code paste, see https://play.nim-lang.org/#ix=3WTN
19:32:01*jmdaemon joined #nim
19:34:43FromDiscord<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:20FromDiscord<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:42FromDiscord<d4rckh> Is it happening only me that the Nim docs freeze when I open them in chrome on android?
20:45:17FromDiscord<Yardanico> if you're opening a large document (e.g. the manual), that might happen, it's a chrome issue really
20:45:47FromDiscord<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:44FromDiscord<demotomohiro> I can read and scroll Nim manual in vivaldi on android.
21:17:06FromDiscord<d4rckh> Weird.
21:17:12FromDiscord<d4rckh> Also, Nim doesn't support circular imports?
21:19:27*Gustavo6046 joined #nim
21:19:47FromDiscord<Yardanico> In reply to @d4rckh "Also, Nim doesn't support": only in limited cases
21:20:33FromDiscord<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:38FromDiscord<Yardanico> exactly
21:20:46FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WU6
21:21:45FromDiscord<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:04FromDiscord<Elegantbeef> This gets very confusing with multiple modules but it's usable
21:22:20FromDiscord<Elegantbeef> Whenever nim 2.0 comes out this will not be an issue
21:22:25FromDiscord<Yardanico> 🤔
21:22:50FromDiscord<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:08FromDiscord<Yardanico> just put types into the same `type` block
21:23:09FromDiscord<Elegantbeef> guess i might be wrong it's mentioned in the 2.0 RFC though
21:23:09FromDiscord<d4rckh> I tried once splitting them in multiple files but didn't succeed so here I am
21:23:25FromDiscord<Yardanico> if you put all types into the same `type` block you can have types depend on each other
21:23:26FromDiscord<Elegantbeef> Put all your types in a single type def
21:23:30FromDiscord<Elegantbeef> Then order doesnt matter
21:23:39FromDiscord<d4rckh> Okay. What the hell
21:23:43FromDiscord<Elegantbeef> Or show the code
21:24:04FromDiscord<Yardanico> and stuff
21:24:08FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WU7
21:24:15FromDiscord<Elegantbeef> With the code someone can show you how to arrange it while preserving the API
21:24:38FromDiscord<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:50FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3WU9
21:25:57FromDiscord<Yardanico> yes
21:26:02FromDiscord<Elegantbeef> Of course not
21:26:02FromDiscord<Yardanico> you don't need to
21:26:06FromDiscord<Elegantbeef> Would be quite useless to need to do it 😛
21:26:11FromDiscord<d4rckh> Yeah haha
21:26:12FromDiscord<d4rckh> Thought so
21:30:01FromDiscord<d4rckh> In reply to @Elegantbeef "With the code someone": Haha, I will in sec, thank you
21:30:23FromDiscord<d4rckh> <https://github.com/d4rckh/nimc2>
21:30:47FromDiscord<d4rckh> <https://github.com/d4rckh/nimc2/blob/main/src/server/types.nim>
21:31:57FromDiscord<Yardanico> but you have different type blocks?
21:32:04FromDiscord<Yardanico> you can merge all of the definitions into one `type` block
21:32:37FromDiscord<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:14FromDiscord<slomp (Marcos Slomp)> sent a code paste, see https://play.nim-lang.org/#ix=3WUu
23:23:01FromDiscord<Yardanico> openArrays are not first class in Nim, you need to enable an experimental feature so they become that
23:23:12FromDiscord<Yardanico> and it's well, experimental, so don't be surprised if you get crashes and stuff
23:23:17FromDiscord<Yardanico> https://nim-lang.org/docs/manual_experimental.html#view-types
23:23:52nrds<Prestige99> maybe a nim 2.0 change could be allowing `for i in 9..01
23:23:59nrds<Prestige99> for i in 9..0
23:24:07nrds<Prestige99> I still think it's weird we can't do that
23:25:12FromDiscord<slomp (Marcos Slomp)> Ah, I see, thanks!
23:26:02FromDiscord<slomp (Marcos Slomp)> sent a code paste, see https://paste.rs/hir
23:32:42FromDiscord<Elegantbeef> Prestige it probably wont
23:35:04nrds<Prestige99> unfortunate
23:35:25FromDiscord<huantian> most languages don't do that, you usually add like a step argument to make it ocunt down
23:35:34FromDiscord<Elegantbeef> I mean it's an overhead cost aswell
23:35:58FromDiscord<Elegantbeef> You could reason it statically i guess to get it for free if the values are consts
23:36:10nrds<Prestige99> yeah
23:36:50FromDiscord<Elegantbeef> So i guess all in all, make it yourself 😛
23:36:54nrds<Prestige99> I might just pretend that sytax doesn't exist and explicitly use countup and countdown
23:37:01FromDiscord<huantian> but an inconsistent behavior between static and runtime values would be annoying imo
23:37:13nrds<Prestige99> because people get tripped up with for i in a..b
23:37:38FromDiscord<Elegantbeef> I mean it matches the syntax of ranges
23:38:18FromDiscord<Elegantbeef> `type A = 10..0` gives a nice 'Error\: range is empty'
23:38:45nrds<Prestige99> Kind of find that odd as well
23:39:02FromDiscord<Elegantbeef> Not that odd
23:39:15FromDiscord<Elegantbeef> did you mean `0..10` or `10..20`
23:40:11FromDiscord<Elegantbeef> Slices are the only part of the `..` syntax that allow a \> b
23:40:56FromDiscord<Elegantbeef> `var a = 10..0` works for instance but `5 in a` is false
23:41:03nrds<Prestige99> weird
23:41:19nrds<Prestige99> I hope we get better editor support by 2.0, I'm dying over here
23:54:03*noeontheend joined #nim
23:59:10FromDiscord<Elegantbeef> Damn playing with wasm is becoming quite a fun little project
23:59:27nrds<Prestige99> I need to get wasm working for my project :o
23:59:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3WUx
23:59:59FromDiscord<Elegantbeef> I'm not outputting wasm for web but for embdeded scripting