00:11:45 | ForumUpdaterBot | New post on r/nim by AndreaDaedra: I've just realized that if you put your WIN (Windows) keycap upside down it says NIM like in the Nim programming language. <3, see https://i.redd.it/xqdn1kt2vkc61.jpg |
00:20:14 | FromDiscord | <digitcrusher> lol |
00:32:38 | * | zedeus joined #nim |
00:33:55 | FromDiscord | <Clyybber> ha nice |
00:43:12 | lain | what does %= do in a nim.cfg file? |
00:53:03 | * | Kaivo quit (Quit: WeeChat 3.0) |
01:04:55 | disruptek | see Nim/config/nim.cfg: |
01:04:57 | disruptek | # Environment variables can be accessed like so: |
01:04:58 | disruptek | # gcc.path %= "$CC_PATH" |
01:07:46 | lain | ahhh ok, thanks |
01:09:58 | * | Tanger joined #nim |
01:21:19 | * | abm quit (Read error: Connection reset by peer) |
01:23:33 | * | muffindrake joined #nim |
01:42:09 | * | cgfuh quit (Quit: WeeChat 2.9) |
02:28:17 | * | Prestige_ is now known as Prestige |
03:04:40 | * | Tlangir joined #nim |
03:07:22 | * | Tanger quit (Ping timeout: 256 seconds) |
03:13:07 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:14:44 | * | muffindrake joined #nim |
03:20:59 | * | wasted_youth quit (Quit: Leaving) |
03:41:32 | * | casaca quit (Remote host closed the connection) |
03:53:24 | * | rockcavera quit (Remote host closed the connection) |
03:55:43 | * | casaca joined #nim |
04:14:47 | * | spiderstew joined #nim |
04:15:05 | * | spiderstew_ quit (Ping timeout: 272 seconds) |
04:53:20 | * | zedeus quit (Ping timeout: 256 seconds) |
04:53:26 | leorize | disruptek: do you think the name findExe is good or should I pick something else? |
04:53:48 | * | zedeus joined #nim |
04:53:55 | leorize | I need to write one for nim-sys, and unlike the stdlib, this one is not configurable and instead mimics whatever the host os would do |
04:54:08 | leorize | basically a library version of `which` |
04:54:45 | disruptek | will it clash? if so, whichExe. else, probably not worth changing it? |
04:55:05 | leorize | probably not, I don't think anyone would import both sys/exec and osproc |
04:55:44 | disruptek | probably leave it, then; one less think for people to guess wrong. |
04:59:49 | disruptek | i like that it's not configurable. 😁 |
05:00:06 | disruptek | what are you gonna tell timmy when he demands switches? |
05:00:34 | leorize | don't use it :P |
05:01:56 | disruptek | hah |
05:08:15 | FromDiscord | <Avatarfighter> hello hello everyone |
05:10:40 | Prestige | o/ |
05:17:44 | * | sagax joined #nim |
05:37:45 | * | Tlanger joined #nim |
05:38:49 | * | vicfred_ quit (Quit: Leaving) |
05:39:45 | * | Tlangir quit (Ping timeout: 240 seconds) |
05:42:03 | FromDiscord | <JSGRANT> Now we just need Nim-Machine-Operating-Systems; We've almost gone full-circle! |
05:42:40 | FromDiscord | <JSGRANT> looooooooooool; Honestly a bit shocked there aren't more osdev projects in Nim. Maybe not too-too shocked because the barrier-to-entry / mountain-to-climb is a fair bit higher but still. |
05:44:41 | FromDiscord | <InventorMatt> I think it would really cool to make an rtos for embedded systems in nim. it would certainly be alot easier than a full os |
06:21:10 | disruptek | nim has exactly 7,000 closed issues. |
06:22:30 | FromDiscord | <ElegantBeef> We did it, let's pack it up |
06:23:20 | disruptek | we aren't growing the number of watchers but we /are/ growing the number of issues. |
06:26:00 | disruptek | timmy has 89 open PRs. |
06:27:05 | disruptek | the pr queue has grown, too. i'd say we're up around 20% yoy. |
06:28:41 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:49:36 | Prestige | That's a lot of PRs. Takes a long time to review? |
06:54:57 | disruptek | i really don't get it. |
06:55:51 | disruptek | maybe i'm an asshole, but as far as i'm concerned, nothing has really changed in the last year except that we have fewer arc bugs and orc is almost usable. |
06:56:12 | disruptek | well, not maybe. maybe was a stretch, i admit. |
06:56:51 | disruptek | choosenim seems a lot more stable lately, which is good. |
06:58:59 | Prestige | And progress (at least in research?) on cps and concepts? disruptek |
07:00:05 | disruptek | when i think of nim-2020, i won't think of cps or concepts. |
07:00:45 | Prestige | Yeah, for sure |
07:01:18 | Prestige | 2021 year of better editor support, maybe |
07:01:56 | disruptek | it's pretty disheartening if that is really our goal for the year. |
07:02:39 | Prestige | I'd really really like concepts to be in a good state. It would have a big impact on how I write Nim code |
07:02:49 | FromDiscord | <lqdev> same |
07:02:50 | disruptek | sure. |
07:02:51 | Prestige | But I've no idea what's going on with it |
07:03:04 | disruptek | you have to test it. |
07:03:26 | disruptek | i promised to test it next week. |
07:04:02 | disruptek | you may as well get your hands dirty with the new impl. it only lacks fields, afaik. |
07:04:05 | Prestige | I'm 100% down to test it and report any issues I find, but I thought it was in the middle of a rewrite, still |
07:04:31 | disruptek | no, it has been waiting for eyes for a couple months now. |
07:05:22 | * | zedeus quit (Ping timeout: 256 seconds) |
07:05:26 | Prestige | Well shit. When I'm back on my computer tomorrow I'll see about installing the most recent nim version and test it out |
07:05:39 | disruptek | don't bother; it's not in that version. |
07:05:54 | Prestige | Just in a branch? |
07:06:04 | disruptek | yes. araq-concepts |
07:06:25 | * | narimiran joined #nim |
07:06:34 | Prestige | Noted, I'll be on that tomorrow |
07:07:58 | FromDiscord | <Avatarfighter> disruptek if i send you a meme would you laugh |
07:08:00 | disruptek | no. |
07:08:00 | disruptek | last commit to the branch was september 13th. |
07:08:00 | disruptek | so, four months ago. |
07:08:02 | Prestige | I'm trying to unwind from work today. 2 different broken builds were deployed to prod, I'm amazed |
07:08:07 | FromDiscord | <Avatarfighter> Ok disruptek sending you a dank maymay |
07:08:30 | FromDiscord | <Rika> haha thats so funny avatar whered you find this |
07:09:49 | Prestige | Do we have a public board/list of goals for upcoming releases with acceptance criteria? |
07:10:13 | Prestige | Or similar |
07:10:42 | disruptek | i miss chinese food. |
07:10:46 | FromDiscord | <Avatarfighter> Rika wanna see the meme |
07:10:49 | FromDiscord | <Avatarfighter> disruptek close your eyes so you dont see it again https://media.discordapp.net/attachments/371759389889003532/801710112267829268/image0.jpg |
07:10:55 | FromDiscord | <Rika> @Avatarfighter put it through a zoom meeting too aka the teacher showing the book through zoom |
07:10:55 | FromDiscord | <Rika> xddd |
07:10:55 | FromDiscord | <Avatarfighter> lmao |
07:11:13 | FromDiscord | <Rika> make sure the text is similarly distorted |
07:11:18 | FromDiscord | <Rika> why isnt the text gray btw |
07:11:20 | FromDiscord | <Avatarfighter> better yet |
07:11:52 | Prestige | disruptek: get some |
07:12:24 | FromDiscord | <Avatarfighter> My bad |
07:12:24 | FromDiscord | <Avatarfighter> the meme hasn’t faded like textbooks have |
07:12:31 | FromDiscord | <Avatarfighter> Prestige: not that I know of |
07:12:31 | disruptek | prestige: there's a roadmap somewhere. |
07:12:31 | FromDiscord | <Avatarfighter> disruptek: nothing complete i thought? |
07:13:03 | Prestige | Hmm I'll dig for it at some point |
07:14:41 | * | hoijui_ joined #nim |
07:14:41 | * | hoijui joined #nim |
07:17:07 | disruptek | yeah, i don't remember where it is. |
07:19:48 | * | actuallybatman quit (Ping timeout: 260 seconds) |
07:21:20 | disruptek | Prestige: i know notnil was on the 2020 roadmap, along with ic and orc. |
07:21:26 | Prestige | Was there a problem with asyc/await's impl? I haven't used it in Nim |
07:21:32 | Prestige | Ah. |
07:21:53 | disruptek | it's too late to rant about async. |
07:22:02 | disruptek | !rfc 295 |
07:22:02 | disbot | https://github.com/nim-lang/RFCs/issues/295 -- 3next steps for CPS |
07:23:07 | saem | But rants are fun! |
07:31:46 | disruptek | ~goals is disruptek, 2021: nigel, nimo, gitnim/dist, cps |
07:31:47 | disbot | goals: 11disruptek, 2021: nigel, nimo, gitnim/dist, cps |
07:32:04 | disruptek | feel free to add yours. |
07:32:28 | disruptek | query with ~goals (some regex) |
07:32:48 | disruptek | as per usual ~footnote syntax. |
07:32:56 | disruptek | ~rika oo |
07:32:56 | disbot | Rika: 11a footnote |
07:33:09 | disruptek | ~rika goatlicker |
07:33:10 | disbot | no matching footnotes for `rika` with regexps `goatlicker`. 🙁 |
07:33:26 | * | haxscramper joined #nim |
07:36:33 | * | haxscramper left #nim (#nim) |
07:39:44 | * | habamax joined #nim |
07:40:06 | saem | ~goals saem |
07:40:07 | disbot | no matching footnotes for `goals` with regexps `saem, `. 🙁 |
07:40:15 | saem | Good |
07:41:45 | FromDiscord | <haxscramper> ~goals is haxscramper: C++ interop, docgen |
07:41:45 | disbot | goals: 11disruptek, 2021: nigel, nimo, gitnim/dist, cps |
07:41:46 | disbot | goals: 11haxscramper: C++ interop, docgen |
07:48:13 | FromDiscord | <lqdev> ~goals is lqdev 2021: tsuki |
07:48:14 | disbot | goals: 11disruptek, 2021: nigel, nimo, gitnim/dist, cps |
07:48:14 | disbot | goals: 11haxscramper: C++ interop, docgen |
07:48:14 | disbot | goals: 11lqdev 2021: tsuki |
08:26:57 | * | leorize quit (Remote host closed the connection) |
08:30:20 | * | Tlanger quit (Quit: Leaving) |
08:30:22 | * | leorize joined #nim |
08:33:29 | * | hoijui_ quit (Ping timeout: 272 seconds) |
08:33:29 | * | hoijui quit (Ping timeout: 272 seconds) |
08:38:32 | * | PMunch joined #nim |
08:45:53 | Oddmonger | goal: learning Nim |
08:47:49 | PMunch | Oooh, footnotes have regex support? |
08:48:49 | FromDiscord | <haxscramper> ~. |
08:48:49 | disbot | no footnotes for `.`. 🙁 |
09:19:15 | Oddmonger | how would you protect an include from multiple inclusions ? |
09:19:43 | Oddmonger | defining a global and initializing it at the end of the include ? |
09:19:43 | FromDiscord | <haxscramper> Probably using C-like include guards |
09:20:03 | FromDiscord | <haxscramper> At the start |
09:20:03 | saem | Shouldn't that be a compiler error? |
09:20:24 | FromDiscord | <haxscramper> No, `include` doesn't give any errors |
09:20:41 | saem | Sure, but shouldn't it? |
09:20:43 | FromDiscord | <haxscramper> Oddmonger: do you really need an include? |
09:21:13 | FromDiscord | <haxscramper> I guess `include` is "screw it, I don't care" use case where you are on your own |
09:21:19 | Oddmonger | it's for readability, and for defining a struct in multiple files |
09:21:31 | FromDiscord | <haxscramper> Maybe refactor your code? |
09:21:51 | FromDiscord | <haxscramper> Because `include` only brings pain IMO, you need to use `import` 99.99% of the time |
09:22:31 | Oddmonger | well i use import 99% of the time |
09:22:57 | FromDiscord | <haxscramper> But you can do `when not includeHappened: const includeHappened = true <your module body>` |
09:23:27 | Oddmonger | here the include is dragged from a tool, not used after generation and filled of import of regex and so |
09:23:39 | Oddmonger | so i keep only the 1% necessary |
09:23:50 | Oddmonger | ah ok this way, thank you |
09:37:48 | * | PMunch quit (Ping timeout: 256 seconds) |
09:38:12 | * | PMunch joined #nim |
09:49:30 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
09:50:09 | * | ehmry joined #nim |
09:53:10 | * | ehmry quit (Client Quit) |
09:53:32 | * | ehmry joined #nim |
09:57:44 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
10:03:33 | * | abm joined #nim |
10:03:42 | * | Vladar joined #nim |
10:15:59 | * | Tanger joined #nim |
10:24:31 | FromDiscord | <hamidb80> can I ask my questions/problem about Nim here? |
10:24:38 | FromDiscord | <lqdev> yeah |
10:24:48 | * | hoijui_ joined #nim |
10:24:53 | * | hoijui joined #nim |
10:27:37 | FromDiscord | <hamidb80> I'm a little confused about using "re" prefix before regex pattern. ↵in the nim doc (https://nim-lang.org/docs/re.html#Regex) I saw something like this ↵find("abcdefg", re"cde") https://media.discordapp.net/attachments/371759389889003532/801759897192235018/Capture.PNG |
10:27:59 | FromDiscord | <lqdev> the `re` "prefix" is not really a prefix, it's a procedure |
10:28:15 | FromDiscord | <lqdev> and you're only importing `find` from the `re` module |
10:28:40 | FromDiscord | <lqdev> change your `from re import find` to `from re import find, re`, or even better yet, `import re`. |
10:29:42 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/801760421803196416/Capture.PNG |
10:29:51 | FromDiscord | <hamidb80> sounds not working |
10:30:33 | FromDiscord | <lqdev> hmm |
10:30:49 | FromDiscord | <ElegantBeef> does `from module` allow using `module.proc`? |
10:31:01 | FromDiscord | <Clyybber> Araq: ping |
10:31:04 | FromDiscord | <lqdev> really i've never used `from import` so i can't really give you much advice |
10:31:15 | FromDiscord | <lqdev> but idiomatic Nim prefers using `import module` |
10:31:23 | FromDiscord | <ElegantBeef> My only advice is to write nim idiomatic code as much as your python brain says it's not right |
10:31:33 | FromDiscord | <hamidb80> but if I use re.re it's working |
10:31:51 | FromDiscord | <lqdev> yeah possibly because it imports the module from the module |
10:31:57 | * | skelett quit (Quit: WeeChat 2.9) |
10:32:02 | FromDiscord | <ElegantBeef> i dont know anything about importing modules outside `import module` and `import module except A` |
10:32:38 | FromDiscord | <lqdev> i think this could be classified as a bug but then not really |
10:33:03 | FromDiscord | <lqdev> because in the `re` module there are two symbols named `re`: the module itself and the procedure |
10:38:48 | * | xet7 joined #nim |
10:42:19 | * | Vladar quit (Remote host closed the connection) |
10:47:49 | * | Vladar joined #nim |
11:07:54 | * | habamax quit (Read error: Connection reset by peer) |
11:08:09 | * | habamax joined #nim |
11:38:07 | * | xet7 quit (Quit: Leaving) |
11:49:32 | * | Q-Master quit (Ping timeout: 260 seconds) |
11:57:47 | PMunch | Is there a guide somewhere for cross-compiling to the RPi? |
11:58:08 | PMunch | Eh, I guess it's just compiling for ARM.. |
12:00:34 | Zevv | yeah good luck with that |
12:00:51 | Zevv | the compilation is usually trivial, but using the right headers & libs is your pain |
12:00:54 | PMunch | Why would that be so hard? |
12:00:56 | PMunch | Ah.. |
12:01:21 | Zevv | I know of raspi cross compile environments, I think I tried something once |
12:01:29 | Zevv | but in the end I just decided to put a decent disk on the pi and run it there |
12:01:57 | PMunch | Probably doesn't help that I'm using it for Home Assistant |
12:02:02 | PMunch | So it's not running raspbian |
12:02:14 | PMunch | uname -a: Linux core-ssh 5.4.79-v7 #1 SMP Fri Jan 1 15:06:29 UTC 2021 armv7l Linux |
12:02:31 | Zevv | couldn't tell, in my experience 99% of the stuff running on raspis is just raspian spinoff |
12:03:46 | PMunch | This is not.. https://github.com/home-assistant/operating-system |
12:10:04 | PMunch | Hmm, looks like running it in Docker is the easiest solution.. |
12:12:30 | FromDiscord | <hamidb80> is there any reason that explains why both ↵string.len and string.len() ↵are correct? |
12:12:59 | PMunch | Yes |
12:13:13 | PMunch | It's the universal call syntax |
12:13:16 | PMunch | Or part of it |
12:13:22 | PMunch | len(string) is also valid |
12:13:26 | PMunch | So is `len string` |
12:17:03 | * | hoijui quit (Quit: Leaving) |
12:17:19 | * | hoijui joined #nim |
12:18:23 | FromDiscord | <hamidb80> wow |
12:21:37 | * | Q-Master joined #nim |
12:22:18 | PMunch | Not sure if that was a good wow or a bad wow :P |
12:29:05 | FromDiscord | <hamidb80> good wow |
12:29:12 | FromDiscord | <hamidb80> sounds amazing |
12:29:32 | PMunch | It is pretty neat |
12:29:35 | FromDiscord | <hamidb80> (edit) |
12:29:50 | FromDiscord | <hamidb80> 👍 |
12:31:06 | FromDiscord | <Rika> depends on the person but its generally neat |
12:31:08 | FromDiscord | <hamidb80> I think nim needs more attention |
12:32:12 | FromDiscord | <Rika> we all think so |
12:34:47 | * | hoijui quit (Ping timeout: 272 seconds) |
12:34:47 | * | hoijui_ quit (Ping timeout: 272 seconds) |
12:40:02 | FromGitter | <heharkon> hi, I'm new here and to Nim... I think Nim is awesome too. I saw some discussion to make tooling better for nim, but I have to say I'm pretty impressed already! :) I've been learning Ada for some time now but I keep hitting my head with it's tooling, even with the help of the new package manager Alire, everything is so, SO difficult... seems that I'm jumping ship and switching to nim now :D |
12:40:41 | FromDiscord | <Rika> nim's tooling is no chance against go's, rust's, python's, etc. |
12:40:44 | FromDiscord | <Rika> ada |
12:40:46 | FromDiscord | <Rika> oops |
12:40:51 | FromDiscord | <Rika> didnt mean to send that so early |
12:40:53 | PMunch | Really? I think it's pretty good |
12:41:09 | FromDiscord | <Rika> you think nimsuggest is good? |
12:41:23 | PMunch | Well, maybe not the editor tools |
12:41:31 | PMunch | But I don't tend to use those anyways |
12:41:50 | FromGitter | <heharkon> yeah of course there's always room for improvement, but still :) |
12:42:23 | FromDiscord | <Rika> editor tooling and debug tools are the issues for nim |
12:42:24 | FromDiscord | <Rika> i believe |
12:46:27 | ForumUpdaterBot | New thread by Wiltzutm: Is there a way to use question mark in my proc names?, see https://forum.nim-lang.org/t/7407 |
12:47:18 | FromDiscord | <Yardanico> AHAHHAHA https://media.discordapp.net/attachments/371759389889003532/801795051268866090/unknown.png |
12:47:37 | FromDiscord | <Yardanico> `proc isLarge(p: Penis): bool` |
12:55:04 | * | rockcavera joined #nim |
12:57:40 | FromDiscord | <Recruit_main707> Modern problems |
13:02:47 | * | abm quit (Remote host closed the connection) |
13:03:15 | * | abm joined #nim |
13:04:02 | * | rockcavera quit (Killed (rothfuss.freenode.net (Nickname regained by services))) |
13:04:03 | * | rockcavera joined #nim |
13:06:47 | * | Tlangir joined #nim |
13:06:57 | * | xet7 joined #nim |
13:07:29 | * | Tanger quit (Ping timeout: 256 seconds) |
13:07:35 | FromDiscord | <lqdev> damn that guy has a low self-esteem |
13:07:35 | * | Kaivo joined #nim |
13:09:35 | PMunch | http://ix.io/2MMq damn it.. |
13:09:54 | PMunch | lqdev, or a massive dong and some humour |
13:12:41 | ForumUpdaterBot | New question by Alex Craft: How to mark non-pure function as pure in Nim, see https://stackoverflow.com/questions/65828146/how-to-mark-non-pure-function-as-pure-in-nim |
13:16:17 | FromDiscord | <Yardanico> @lqdev lol https://media.discordapp.net/attachments/371759389889003532/801802343662223390/unknown.png |
13:16:23 | FromDiscord | <lqdev> frick |
13:16:25 | FromDiscord | <lqdev> you beat me to it |
13:16:40 | FromDiscord | <Yardanico> I actually cheated by posting an incomplete answer first, and then editing it a few times :) |
13:17:15 | FromDiscord | <lqdev> well i took my time to research that `cast(noSideEffects)` is actually `cast(noSideEffect)` |
13:18:30 | FromDiscord | <Yardanico> yeah same |
13:21:32 | * | hoijui_ joined #nim |
13:21:37 | * | hoijui joined #nim |
13:22:20 | planetis[m] | i liked more subtle jokes like when the french guy posted a question about strings and due to google translate, some instances were translated as thongs |
13:27:39 | PMunch | Haha :P |
13:32:16 | * | abm quit (Quit: Leaving) |
13:34:25 | * | wasted_youth joined #nim |
13:41:02 | FromDiscord | <Yardanico> If anyone wants to play around with wolfSSL and Nim - https://www.wolfssl.com/, I dirty-patched openssl.nim to work with WolfSSL (because a person in Telegram asked if it's possible to use WolfSSL with Nim and I spent some time but got the simplest httpclient get request working for https://example.com) |
13:41:03 | FromDiscord | <Yardanico> https://gist.github.com/Yardanico/8f67af4f40f272de0b68ce7cf25a6fe6 |
13:41:14 | FromDiscord | <Yardanico> it's really dirty-patched because wolfSSL adds its own prefixes |
13:41:22 | FromDiscord | <Yardanico> Compile wolfssl with ./configure --enable-static --enable-opensslextra --enable-opensslall --enable-tlsv10 --enable-dtls --disable-shared |
13:41:38 | FromDiscord | <Yardanico> and nim app with nim c --dynlibOverride:libssl --dynlibOverride:libcrypto -d:openssl10 -d:ssl --passL:"-L /path/to/wolfssl/src/.libs/ -lwolfssl" main.nim |
13:43:00 | FromDiscord | <Yardanico> file size is 944K if the binary is compiled with -d:danger --gc:arc --opt:size (dynamically linked with glibc) |
13:43:49 | PMunch | That's pretty cool |
13:44:18 | FromDiscord | <exelotl> @Yardanico omg how did you get a dark theme on the forums :( |
13:45:43 | FromDiscord | <Yardanico> dark reader |
13:45:52 | FromDiscord | <Yardanico> I'm using it for pretty much all of my browsing on desktop nowadays |
13:49:37 | PMunch | I'm reading the community survey, was it translated to other languages than English? |
13:50:02 | FromDiscord | <Yardanico> I don't think so, no |
13:50:15 | PMunch | Ah |
13:51:07 | PMunch | I wonder if we lose a lot of non-english speaking users on the survey from that |
13:51:22 | PMunch | For example the Chinese users |
14:02:22 | * | PMunch quit (Quit: leaving) |
14:06:48 | FromDiscord | <Yardanico> got a 100% static 64-bit musl (zig cc) + wolfssl nim binary of size 988KB |
14:06:54 | FromDiscord | <Yardanico> maybe I can try to bring it down even more |
14:09:32 | * | rockcavera quit (Remote host closed the connection) |
14:19:14 | * | hoijui quit (Ping timeout: 264 seconds) |
14:19:50 | * | hoijui_ quit (Ping timeout: 264 seconds) |
14:20:42 | ForumUpdaterBot | New thread by Alexeypetrushin: What are simple profilers to use with Nim?, see https://forum.nim-lang.org/t/7408 |
14:23:18 | FromDiscord | <shadow.> is there any graphics library similar to processing? i basically need a way to handle clicks, draw rectangles, and draw images |
14:25:59 | FromDiscord | <digitcrusher> opengl ;) |
14:26:24 | FromDiscord | <digitcrusher> there's also this https://github.com/memononen/nanovg |
14:26:43 | FromDiscord | <digitcrusher> i haven't used it myself though |
14:27:05 | FromDiscord | <mratsim> Do not try to compress crypto lib with UPX or compressor in that vein. They might "optimize" size for example by removing memset(0) calls that are supposed to erase secrets from memory. |
14:27:17 | FromDiscord | <shadow.> does opengl have an event-wait based system? im making chess, which means i only need to update canvas when an event fires |
14:27:18 | FromDiscord | <Yardanico> well this is not for normal "secure" usage |
14:27:37 | FromDiscord | <digitcrusher> opengl is just for graphics |
14:27:47 | FromDiscord | <shadow.> ah |
14:27:51 | FromDiscord | <shadow.> does it have click events? |
14:27:54 | FromDiscord | <digitcrusher> for window/keyboard/mouse stuff you also need something like glfw |
14:27:58 | FromDiscord | <shadow.> ahhh ok |
14:28:04 | FromDiscord | <mratsim> SDL handles controllers/joysticks/mouses and graphics |
14:28:09 | FromDiscord | <Yardanico> oh I got it down to 732KB by compiling wolfssl with zig cc musl too |
14:28:10 | FromDiscord | <shadow.> im debating between using nim and v for this project lol |
14:28:16 | FromDiscord | <Yardanico> for arm arch |
14:28:18 | FromDiscord | <Yardanico> "main: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped" |
14:28:20 | FromDiscord | <Yardanico> 732KB |
14:28:27 | FromDiscord | <Yardanico> and it works |
14:28:34 | FromDiscord | <Yardanico> without upx |
14:28:40 | FromDiscord | <digitcrusher> choose the one with easier to use bindings |
14:28:44 | FromDiscord | <digitcrusher> for the libraries you need |
14:28:54 | FromDiscord | <digitcrusher> that's the main goal right? |
14:29:02 | FromDiscord | <shadow.> nim would be much easier for the engine as i can just use ref objects and methods, whereas v's oop is pretty iffy rn, but the library `gg` in v is supported by the langauge itself, and handles clicks and rendering very simply |
14:29:10 | FromDiscord | <shadow.> so it's basically, do i want the engine to be easier or the ui |
14:29:11 | FromDiscord | <shadow.> lol |
14:29:19 | FromDiscord | <shadow.> (edit) "methods," => "methods for pieces," |
14:29:27 | FromDiscord | <mratsim> Did you look at nimx btw? |
14:29:30 | FromDiscord | <shadow.> hm |
14:29:34 | FromDiscord | <shadow.> let me take a look |
14:29:53 | FromDiscord | <shadow.> ive seen it before |
14:30:02 | FromDiscord | <shadow.> didnt know if it was good for this type of stuff or more typical desktop gui |
14:30:31 | FromDiscord | <lqdev> obligatory aglet ad https://github.com/liquidev/aglet |
14:30:50 | FromDiscord | <shadow.> bet |
14:30:52 | FromDiscord | <mratsim> Nimx was created for a game UI |
14:30:53 | FromDiscord | <shadow.> ill take a look |
14:31:05 | FromDiscord | <shadow.> hmm |
14:31:10 | FromDiscord | <lqdev> there's window.waitEvents(callback) |
14:31:19 | FromDiscord | <shadow.> oooh |
14:31:20 | FromDiscord | <shadow.> interesting |
14:31:23 | FromDiscord | <shadow.> thanks |
14:34:30 | FromDiscord | <digitcrusher> you won't need aglet if you don't want to use pure opengl |
14:35:14 | FromDiscord | <lqdev> ah right |
14:35:24 | FromDiscord | <digitcrusher> opengl is harder to use than the canvas stuff you described |
14:35:40 | FromDiscord | <lqdev> so if you want a layer on top of opengl you can try out NanoVG |
14:35:46 | FromDiscord | <lqdev> should be easy to bind with c2nim |
14:36:48 | FromDiscord | <shadow.> hmm |
14:36:49 | FromDiscord | <digitcrusher> yeah i already mentioned nanovg |
14:37:17 | FromDiscord | <shadow.> the only reason im leaning towards v is because gg works very well and is cross-platform and simple |
14:37:18 | FromDiscord | <digitcrusher> nanovg is supposed to be similar to the html canvas api |
14:37:24 | FromDiscord | <shadow.> but ill look at nanovg |
14:37:36 | FromDiscord | <shadow.> i just wish v's interfaces had fields lol |
14:38:01 | FromDiscord | <lqdev> V isn't even on 1.0 lol |
14:38:06 | FromDiscord | <shadow.> yeah exactly lmao |
14:38:08 | FromDiscord | <lqdev> and its compiler doesn't seem very stable |
14:38:14 | FromDiscord | <shadow.> works for me ¯\_(ツ)_/¯ |
14:38:17 | FromDiscord | <lqdev> and its memory management seems kind of inexistent |
14:38:22 | FromDiscord | <shadow.> that is true lmao |
14:38:27 | FromDiscord | <shadow.> autofree isn't even done yet |
14:38:36 | FromDiscord | <lqdev> you may as well use processing tbh |
14:38:38 | FromDiscord | <shadow.> here's snake https://media.discordapp.net/attachments/371759389889003532/801823068321218600/snake.v |
14:38:40 | FromDiscord | <shadow.> NO |
14:38:42 | FromDiscord | <shadow.> JAVA |
14:38:43 | FromDiscord | <shadow.> BLECH |
14:38:46 | FromDiscord | <shadow.> DO NOT MAKE ME VOMIT |
14:38:48 | FromDiscord | <lqdev> try groovy |
14:38:51 | FromDiscord | <shadow.> ehhh |
14:38:57 | FromDiscord | <shadow.> kotlin maybe? |
14:39:05 | FromDiscord | <shadow.> idfk |
14:39:11 | FromDiscord | <shadow.> if i had to use that i might as well just use py |
14:39:18 | FromDiscord | <shadow.> but im ideally looking for something i can compile and distribute |
14:39:38 | FromDiscord | <digitcrusher> scala maybe? |
14:40:06 | FromDiscord | <shadow.> oh lord |
14:40:06 | FromDiscord | <shadow.> no |
14:40:14 | FromDiscord | <digitcrusher> why lol |
14:41:27 | FromDiscord | <shadow.> idk i typically like languages with less features honestly? i know that's odd in a nim server but i make an exception for nim lmao |
14:41:36 | FromDiscord | <shadow.> and afaik scala is pretty big |
14:42:38 | FromDiscord | <digitcrusher> interesting |
14:43:40 | FromDiscord | <digitcrusher> it's not like scala is forcing you to use alll the new features |
14:43:50 | FromDiscord | <shadow.> yeah i get that |
14:44:01 | FromDiscord | <shadow.> i just mean i prefer languages that are simple in principle because i find they follow the ideals i prefer |
14:44:07 | FromDiscord | <shadow.> again, why i've kinda been drawn to v lately lol |
14:44:12 | FromDiscord | <shadow.> though i do think that goes the other way sometimes |
14:44:28 | FromDiscord | <shadow.> like i like ufcs in nim, but i find the operator overloading to be a bit much for me |
14:44:42 | FromDiscord | <shadow.> so idk, i can swing either way i suppose |
14:45:13 | FromDiscord | <shadow.> and it's not just me, but reading other's code and/or using libraries, i kinda like to be able to just read it and know what's going on. and with complex scala features i might not be able to do that as easily ¯\_(ツ)_/¯ |
14:46:13 | * | kaun_ joined #nim |
14:47:19 | * | kaun_ left #nim (#nim) |
14:48:03 | FromDiscord | <digitcrusher> hmm i didnt have any problems with not understanding scala code that i was gonna use in my project |
14:48:15 | * | Tlangir quit (Remote host closed the connection) |
14:48:34 | FromDiscord | <digitcrusher> maybe that's because i've only used lwjgl with scala so far lol |
14:54:20 | FromDiscord | <lqdev> if you like scala so much then what are you doing here 🤔 |
14:55:24 | FromDiscord | <digitcrusher> idk |
14:55:31 | FromDiscord | <mratsim> Operator overloading to allow Vec3 to work naturally is one of the most requested feature in Zig. |
14:55:37 | FromDiscord | <digitcrusher> is this some hardcore nim fandom guild then? |
14:55:51 | FromDiscord | <mratsim> For math it's very important to have operator overloading. |
14:56:04 | FromDiscord | <lqdev> no but you seem to be praising scala a lot on a server unrelated to it |
14:56:15 | FromDiscord | <lqdev> and mind you this is the on-topic chat |
14:56:20 | * | actuallybatman joined #nim |
14:56:24 | FromDiscord | <digitcrusher> ok |
14:56:28 | FromDiscord | <mratsim> that's fine, we need to know what other languages do right |
14:56:53 | FromDiscord | <mratsim> personally I don't mind |
14:57:26 | FromDiscord | <mratsim> the line between praising and evangelism task force is not that tiny |
14:58:49 | FromDiscord | <shadow.> v has operator overloading but no custom operators and only same type on both sdies |
14:58:51 | FromDiscord | <Clyybber> scala is cool |
14:58:52 | FromDiscord | <shadow.> (edit) "sdies" => "sides" |
14:59:01 | FromDiscord | <digitcrusher> i don't know the conversation kinda evolved from graphics libraries in nim to other languages, i didn't think of moving to #offtopic when the topic "crossed the line" that would've been a bit akward lol |
14:59:15 | FromDiscord | <digitcrusher> (edit) "akward" => "awkward" |
14:59:18 | FromDiscord | <Clyybber> but not as cool as nim :p |
14:59:34 | FromDiscord | <digitcrusher> >:( |
14:59:39 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2MMU |
14:59:44 | FromDiscord | <shadow.> idk, something like using `` for set intersection just feels a bit odd to me sometimes |
15:00:00 | FromDiscord | <mratsim> it should be `^` |
15:00:02 | FromDiscord | <mratsim> 😄 |
15:00:20 | FromDiscord | <shadow.> that would make more sense but still, i don't like the idea of using mathematical / logical operators for things that don't make intuitive sense |
15:00:26 | FromDiscord | <shadow.> on a vec it makes sense, on a set, not so much |
15:00:42 | FromDiscord | <lqdev> well sets do have their own set of operators in math notation |
15:00:45 | FromDiscord | <mratsim> sets have a standard mathematical symbol for intersection |
15:00:48 | FromDiscord | <lqdev> but ASCII is too limited |
15:00:55 | FromDiscord | <Clyybber> scala fits a different niche IMO, as it's built on the JVM |
15:00:57 | FromDiscord | <lqdev> and people don't have unicode keyboards |
15:01:15 | FromDiscord | <lqdev> except me :DDDDD ∧ |
15:01:20 | FromDiscord | <shadow.> lmfao |
15:01:24 | FromDiscord | <shadow.> laughs in dyalog apl |
15:01:31 | FromDiscord | <Clyybber> and sadly the @static annotation got reverted in https://github.com/scala/scala/pull/1340 which makes some things impossible |
15:01:32 | disbot | ➥ Revert `@static` annotation |
15:01:35 | FromDiscord | <haxscramper> Nim manual says that support for unicode operators might be added. I wonder how useful this might be though |
15:01:39 | FromDiscord | <mratsim> https://github.com/mratsim/weave/blob/master/formal_verification/event_notifiers.pdf↵↵Weave formal verification uses the set mathematical notation https://media.discordapp.net/attachments/371759389889003532/801828859447738399/unknown.png |
15:01:49 | FromDiscord | <shadow.> `Avg←{(+⌿⍵)÷≢⍵}` |
15:01:53 | FromDiscord | <shadow.> "you guys are using english?" |
15:02:07 | FromDiscord | <digitcrusher> there's also scala native besides jvm, i don't know how complete it is though |
15:02:08 | FromDiscord | <mratsim> Works today https://github.com/mratsim/constantine/blob/master/constantine/tower_field_extensions/tower_instantiation.nim#L31 |
15:02:32 | FromDiscord | <haxscramper> I mean infix operators |
15:02:33 | FromDiscord | <digitcrusher> some other guys were talking about scala native here earlier |
15:02:47 | FromDiscord | <haxscramper> Not just Unicode identifiers |
15:04:22 | FromDiscord | <lqdev> btw @mratsim how is formal verification for multithreaded programs done, in a nutshell? |
15:04:40 | FromDiscord | <Clyybber> by trying very many combinations :D |
15:04:47 | FromDiscord | <lqdev> _i'm saying in a nutshell because you really like throwing lots of links and references at me_ |
15:05:11 | FromDiscord | <mratsim> So what you really want to formally verify is the synchronization data structures (channels, locks, condition variables, thread notification scheme). |
15:05:51 | FromDiscord | <mratsim> If you have a borrow checher, the borrow checker can deal with their usage and ensuring unique owner and lifetimes when requires. This is the part of data race that Rust solves. |
15:07:28 | FromDiscord | <mratsim> and to formally verify synchronization data structure, that's exactly what clyybber said. You have multiple approach to formal verification:↵1. Using a deductive approach and from hypothesis determine if your scope respects some constraints or not↵2. Using an brute-force approach and trying all possible states and ensuring than none violates your constraints. |
15:08:16 | FromDiscord | <mratsim> Approach 2 is more practical and is used everywhere in the embedded world, and the concurrent data structure verifier that exist today. |
15:08:34 | FromDiscord | <mratsim> approach 1 requires a proof assistant like Coq. |
15:09:35 | FromDiscord | <mratsim> Now how does the brute-force approach work: you create "shadow" thread using coroutines or closure iterators or fibers or CPS anything that can be suspended and resumed. |
15:10:33 | FromDiscord | <mratsim> at a synchronization point (thread creation, lock, condition variable, atomic). You try enqueue all the possible interleaving that you can have, just like if you wanted to do a search on a tree. |
15:11:37 | FromDiscord | <mratsim> and then you check that all of those interleaving leads to a valid "doAssert condition" that you specify. |
15:12:24 | FromDiscord | <mratsim> in Weave, the condition is that there is no deadlock. |
15:13:36 | FromDiscord | <mratsim> and no livelock. |
15:14:21 | FromDiscord | <mratsim> i.e. the program reaches the end when there is no work to do |
15:19:30 | * | Kurre[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:30 | * | Avahe[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:31 | * | cmc[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:31 | * | Avatarfighter[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:31 | * | vindaar[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:32 | * | silvernode[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:32 | * | leorize[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:32 | * | j-james[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:32 | * | cadmium[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:32 | * | dilawar_uchiha[m quit (Quit: Bridge terminating on SIGTERM) |
15:19:32 | * | codic quit (Quit: Bridge terminating on SIGTERM) |
15:19:33 | * | BauxnaMatrix[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:35 | * | lnxw37d4 quit (Quit: Bridge terminating on SIGTERM) |
15:19:35 | * | BitPuffin quit (Quit: Bridge terminating on SIGTERM) |
15:19:35 | * | juanfra__ quit (Quit: Bridge terminating on SIGTERM) |
15:19:35 | * | k0mpjut0r quit (Quit: Bridge terminating on SIGTERM) |
15:19:35 | * | lytedev[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:36 | * | Zoom[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:36 | * | Clonkk[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:37 | * | himup[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:38 | * | ee7[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:38 | * | unclechu quit (Quit: Bridge terminating on SIGTERM) |
15:19:40 | * | awici[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:40 | * | reversem3 quit (Quit: Bridge terminating on SIGTERM) |
15:19:44 | * | planetis[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:44 | * | matthias[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:45 | * | jaens[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:45 | * | xigoi[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:45 | * | Juno[m] quit (Quit: Bridge terminating on SIGTERM) |
15:19:45 | * | VijayMarupudi[m] quit (Quit: Bridge terminating on SIGTERM) |
15:20:09 | * | stisa[m] quit (Quit: Bridge terminating on SIGTERM) |
15:20:10 | * | MTRNord quit (Quit: Bridge terminating on SIGTERM) |
15:28:31 | Oddmonger | IIRC, the objects are pointer passed in functions arguments ? |
15:29:15 | Oddmonger | if i call foo(my_heavy_object:myObj) , «my_heavy_object» wont be copied ? |
15:31:43 | Oddmonger | or should i add «var» in the function def, to be sure to pass a pointer, and not a copy of the object ? |
15:32:11 | * | stisa[m] joined #nim |
15:33:23 | Oddmonger | or (last possibility ?) i define an alias type, which is a ref |
15:34:17 | Oddmonger | but isn't the first simple form optimized by compiler ? (that is, foo(obj:myObj) will get obj as a pointer) |
15:35:10 | FromDiscord | <haxscramper> IIRC rules for passing object via pointer/by value is `sizeof(Obj) > 3 sizeof(ptr)` |
15:35:44 | FromDiscord | <haxscramper> And you don't need to use `var` for optimization, this is never necessary |
15:35:49 | * | habamax quit (Ping timeout: 246 seconds) |
15:36:21 | Oddmonger | var is for reference (when wanting modifying original variable) |
15:36:42 | Oddmonger | but i was thinking using it to force the pointer usage for passing argument |
15:36:44 | FromDiscord | <haxscramper> But if you are passing object and want to mutate it (e.g. you need to avoid copy because you need to make sure this is the same object) then yes, you should use var |
15:37:16 | Oddmonger | no, i just want to pass an fat array without copy each time |
15:38:04 | Oddmonger | but with the sizeof rules you've mentionned, that's ok for me |
15:38:35 | Oddmonger | a (big and fat) thank you |
15:46:05 | * | haxscramper joined #nim |
15:54:14 | FromDiscord | <mratsim> if you want to ensure that a type is always passed by reference add {.byref.} pragma. But this is only necessary for FFi in Nim. |
15:54:35 | FromDiscord | <mratsim> I think Nim nailed the parameter passing story. |
15:56:09 | Oddmonger | nice |
15:57:01 | * | waleee-cl joined #nim |
16:00:20 | * | rockcavera joined #nim |
16:06:41 | haxscramper | How can I define custom type in nim code and pass it into embedded nimscript interpreter? There is a `implementRoutine()` for proc declaration, but nothing for types. |
16:07:31 | haxscramper | I can define types internally in script, but I want to pass them between main program and embedded interpreter |
16:08:07 | FromDiscord | <mratsim> staticRead? 😛 |
16:08:48 | * | PMunch joined #nim |
16:09:00 | haxscramper | Do you have an example how to use it in this scenario? In my understanding it is just for reading blob of data at compile-time |
16:09:12 | haxscramper | Not for passing type definition into nim interpreter |
16:09:49 | FromDiscord | <mratsim> parseStmt should be able to recreate the type. |
16:10:08 | FromDiscord | <mratsim> but it's really just a hack. |
16:12:08 | haxscramper | I can pass type definition as string just fine by prepending it to `llStreamOpen`. What I'm interested in is how to make this /properly/, using available compiler API. There is probably some `compiler/vm.registerType()` that I can't find because it named differently. |
16:12:08 | haxscramper | And maybe someone could point me to it |
16:14:57 | FromDiscord | <mratsim> I never managed to get it working unfortunately so I never tried, last time I tried I was stuck at https://github.com/nim-lang/Nim/issues/12293 and never retried since |
16:15:00 | disbot | ➥ compiler as a library: findNimStdLibCompileTime fails to find system.nim ; snippet at 12https://play.nim-lang.org/#ix=22qc |
16:18:18 | * | natrys joined #nim |
16:18:51 | * | GitterIntegratio joined #nim |
16:18:52 | * | Avahe[m] joined #nim |
16:18:52 | * | matthias[m] joined #nim |
16:18:52 | * | jaens[m] joined #nim |
16:18:52 | * | Avatarfighter[m] joined #nim |
16:18:52 | * | Zoom[m] joined #nim |
16:18:52 | * | j-james[m] joined #nim |
16:18:52 | * | MTRNord1 joined #nim |
16:18:53 | * | unclechu joined #nim |
16:18:53 | * | lytedev[m] joined #nim |
16:18:53 | * | lnxw37d4 joined #nim |
16:18:53 | * | BitPuffin joined #nim |
16:18:53 | * | juanfra__ joined #nim |
16:18:54 | * | VijayMarupudi[m] joined #nim |
16:18:54 | * | reversem3 joined #nim |
16:18:54 | * | planetis[m] joined #nim |
16:18:54 | * | xigoi[m] joined #nim |
16:18:54 | * | leorize[m] joined #nim |
16:18:58 | * | ee7[m] joined #nim |
16:18:58 | * | k0mpjut0r joined #nim |
16:18:58 | * | Juno[m] joined #nim |
16:18:59 | * | BauxnaMatrix[m] joined #nim |
16:18:59 | * | cadmium[m] joined #nim |
16:18:59 | * | codic joined #nim |
16:19:00 | * | silvernode[m] joined #nim |
16:19:00 | * | vindaar[m] joined #nim |
16:19:00 | * | Kurre[m] joined #nim |
16:19:00 | * | cmc[m] joined #nim |
16:19:01 | * | awici[m] joined #nim |
16:19:02 | * | dilawar_uchiha[m joined #nim |
16:19:03 | * | himup[m] joined #nim |
16:19:07 | * | Clonkk[m] joined #nim |
16:19:17 | * | haxscramper left #nim ("ERC (IRC client for Emacs 27.1)") |
16:19:21 | * | haxscramper joined #nim |
16:20:25 | leorize | the design for sys/exec would be simplified so much if concepts actually worked... |
16:21:10 | * | hoijui_ joined #nim |
16:21:10 | * | hoijui joined #nim |
16:21:56 | leorize | look at this monstrosity that I am writing: https://play.nim-lang.org/#ix=2MNj |
16:22:02 | leorize | I need to simplify this somehow... |
16:22:10 | leorize | disruptek: ^ any suggestions? |
16:24:03 | FromDiscord | <Clyybber> leorize: wrong link? |
16:24:28 | leorize | it's the correct link |
16:25:01 | leorize | if I have concept I can use a "h.fd is FD" or smt like that and it would work, maybe |
16:31:22 | * | PMunch quit (Quit: leaving) |
16:31:30 | haxscramper | After examining `treeRepr` for `PNode` that interpreter passes to callback proc it seems like I instead need to search for how nim type definition corresponds to AST interpretation, and most likely writing lazy conversion between `PNode` in compiled callback implementation and actual type. |
16:31:30 | haxscramper | I can probably do something `<type-name>PNode = distinct PNode` where `<type-name>` is a name of type that I want to work on. I pass definition of the type to nim interpreter directly, but do some compile-time preprocessing on compiled side. |
16:31:31 | haxscramper | |
16:31:44 | haxscramper | This is similar to PMunch's idea for using marshalling |
16:33:37 | haxscramper | Though this would only work if I create overloads for all procs that work with given type so they would accept both `distinct PNode` and actual type. |
16:33:37 | haxscramper | |
16:33:48 | * | rockcavera quit (Remote host closed the connection) |
16:34:55 | haxscramper | Or use pointer-to-implementation in compiled code, and pass opaque handle+all procs to nim side. |
16:37:17 | disruptek | leorize: why don't you have a single opaque type that isn't a case object? |
16:38:26 | * | rockcavera joined #nim |
16:38:49 | * | Q-Master quit (Ping timeout: 246 seconds) |
16:39:11 | leorize | because I need to keep the type data? |
16:40:29 | FromDiscord | <!Privileged> may I ask if httpclient supports socks5 proxies as i can't seem to get mine to connect |
16:40:34 | leorize | I'm not sure what you're suggesting actually :P |
16:40:37 | disruptek | i mean, you keep all the fields, just don't make it a variant. i'm assuming that a read pipe can transition to skClosed. |
16:41:05 | FromDiscord | <Clyybber> leorize: huh, weird, I reloaded it and now I got a different snippet (the one I saw before was some vimscript stuff I think) |
16:41:12 | leorize | that would balloon the object size though... |
16:41:22 | disruptek | how do you figure? |
16:41:23 | FromDiscord | <Clyybber> ix has been kinda slow/unreliable for a while |
16:41:42 | FromDiscord | <mratsim> @leorize maybe that would help? https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/support/emulate_classes_with_ADTs.nim |
16:41:52 | leorize | disruptek: each field is around 8 bytes? |
16:42:08 | disruptek | there are only 5 fields. |
16:42:15 | leorize | and I need at least 3 of them |
16:42:55 | disruptek | you are going to do a discriminator transition to skClosed? |
16:43:03 | leorize | yea, it's not hard |
16:43:10 | leorize | I just need to construct a new object to replace it |
16:43:21 | leorize | all of my objects has destructors, so I don't have to care |
16:43:29 | disruptek | then that's not a transition. 😉 |
16:44:05 | leorize | same thing in my book :p |
16:44:29 | disruptek | well, if you care about 8 bytes, note that the transition costs more than 8 bytes. |
16:44:36 | disruptek | er, the replacement. |
16:45:00 | disruptek | anyway, it seems you've made your bed. now you get to lie in it. |
16:46:09 | leorize | alright, then I'll see how well this design work, then trim it down later if needed |
16:47:55 | disruptek | mratsim: have you heard the word? the word is nimph. |
16:48:02 | disruptek | !repo nimph |
16:48:03 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 94⭐ 5🍴 7& 1 more... |
16:48:15 | disruptek | imagine a package manager that understands how dependencies work. |
16:48:23 | disruptek | i know. |
16:49:08 | FromDiscord | <mratsim> I only want to install what i need for my test suite to deserialize test vectors :/. My package has no dependencies except the nim compiler. |
16:50:49 | disruptek | noted. |
16:52:41 | FromDiscord | <!Privileged> is it possible to use httpclient with socks5? |
16:52:45 | disruptek | no. |
16:52:50 | FromDiscord | <!Privileged> welp |
17:02:26 | FromDiscord | <Recruit_main707> can i create a thread, make it run a function, and instead of it being deleted once it finishes, freeze it/sleep it until i want to call that function again |
17:02:32 | FromDiscord | <Recruit_main707> ? |
17:03:10 | * | hnOsmium0001 joined #nim |
17:06:41 | FromDiscord | <Vindaar> still no Nim generated plots in the survey results 😢 |
17:08:46 | disruptek | recruit: just make a proc that waits on a semaphore at the bottom of a while loop. flip the semaphore in your controlling thread. |
17:08:50 | * | Q-Master joined #nim |
17:09:30 | FromDiscord | <Recruit_main707> yeah, that what i was thinking of, but wanted to know if i could do something else, thanks |
17:10:04 | disruptek | you can, but why would you? |
17:10:27 | FromDiscord | <Recruit_main707> it would look cleaner |
17:10:34 | FromDiscord | <Recruit_main707> i think |
17:13:03 | FromDiscord | <Rika> it would probably just be an abstraction of what disruptek just said though |
17:13:39 | FromDiscord | <mratsim> @Recruit_main707 that's called a threadpool |
17:13:58 | * | Q-Master quit (Ping timeout: 264 seconds) |
17:14:43 | * | hoijui quit (Ping timeout: 272 seconds) |
17:14:43 | * | hoijui_ quit (Ping timeout: 272 seconds) |
17:17:06 | * | leorize quit (Ping timeout: 268 seconds) |
17:18:46 | * | leorize joined #nim |
17:32:55 | * | abm joined #nim |
17:36:16 | FromDiscord | <Recruit_main707> then, how is that when i use spawn, the code is slower, each function only receives a pointer, and they are all independent |
17:36:23 | FromDiscord | <Recruit_main707> so no race condition |
17:36:50 | disruptek | leorize: i want to generate binaries in ci, for nimph/gitnim/golden/etc. and i don't know where to begin. i'm looking at nightlies and it seems like i need the settings code, the cache code, pretty much all the code. |
17:37:42 | leorize | what attributes do you want your binary to have? |
17:37:57 | disruptek | only the good ones. |
17:38:00 | FromDiscord | <mratsim> A function is a pointer, and when you do multithreading, you capture all the argument of the function in an environment and just call fn(env). |
17:38:30 | FromDiscord | <mratsim> regarding the speed I would need to see the code. |
17:38:47 | FromDiscord | <!Privileged> sent a code paste, see https://play.nim-lang.org/#ix=2MO6 |
17:39:24 | FromDiscord | <mratsim> there is a lines iterator, no need for an intermediate buffer. |
17:39:47 | leorize | disruptek: do you want the binary to be fully static (ie. no external deps)? do you want it to not depend on libc also? |
17:39:52 | FromDiscord | <lqdev> @!Privileged wdym by "proxy name"? |
17:39:53 | leorize | and do you want the build to be reproducible? |
17:39:59 | * | Q-Master joined #nim |
17:40:05 | disruptek | leorize: these sounds like good attributes. |
17:40:11 | disruptek | man, why isn't this written in nim? |
17:40:25 | leorize | setup-nim didn't exist then |
17:40:32 | FromDiscord | <!Privileged> `proxy` is the proxy, it doesnt get added to the output |
17:40:43 | FromDiscord | <lqdev> well then it must be empty |
17:40:54 | FromDiscord | <!Privileged> its not |
17:40:55 | FromDiscord | <!Privileged> it has size 2 |
17:41:02 | disruptek | i guess maybe i start from scratch. |
17:41:06 | FromDiscord | <lqdev> are you sure about that? try `echo proxies` |
17:41:17 | leorize | disruptek: better that way, you want all the hard attributes... |
17:41:50 | FromDiscord | <!Privileged> https://media.discordapp.net/attachments/371759389889003532/801869171473383454/unknown.png |
17:42:08 | FromDiscord | <!Privileged> `@["hello\c", "world\c"]` if the image wont load |
17:42:26 | disruptek | well, i guess no binaries soon. |
17:42:33 | leorize | disruptek: might be easier if you use zig C compiler to generate your binary, it has all that is needed for a static build |
17:42:40 | FromDiscord | <Recruit_main707> sent a code paste, see https://paste.rs/u4C |
17:42:53 | FromDiscord | <lqdev> `\c` is a carriage return, so your terminal returns the cursor to the beginning of the line |
17:43:00 | FromDiscord | <lqdev> you need to strip it in your `readLines` |
17:43:01 | FromDiscord | <!Privileged> ah |
17:43:06 | disruptek | yeah, i used to use zig. but now it's a pita and i need a shim just to run the compiler. |
17:43:06 | FromDiscord | <!Privileged> didnt know those existed, ty |
17:43:11 | FromDiscord | <lqdev> np |
17:43:12 | FromDiscord | <!Privileged> i was accounting for newline only |
17:43:26 | FromDiscord | <lqdev> yeah check out `"\p"`, it's the platform-dependent line ending |
17:43:39 | leorize | disruptek: easier than setting up a toolchain |
17:43:47 | FromDiscord | <!Privileged> ty will do |
17:44:04 | FromDiscord | <lqdev> np, good luck! |
17:44:12 | FromDiscord | <!Privileged> cheers ^^ |
17:44:13 | disruptek | i would just use setup-nim. i don't see why that won't work. |
17:44:20 | FromDiscord | <Rika> liquid the issue with that is that windows can have unix line ended files |
17:44:21 | FromDiscord | <mratsim> @Recruit_main707 I don't understand how the `parallel` statement works, I tried too but failed so I can't tell you what's happening here. |
17:44:43 | FromDiscord | <Rika> then you're screwed since \p isnt dependent on the file but on the compiling os |
17:45:01 | FromDiscord | <Rika> so you have to always deal with \r |
17:46:12 | FromDiscord | <Recruit_main707> @mratsim should i just remove the `parallel:`? |
17:46:26 | FromDiscord | <mratsim> yes |
17:46:39 | disruptek | leorize: i guess the issue is that i don't have any static compiler/ssl for osx/win; only my linux environments. yuk. |
17:46:40 | FromDiscord | <mratsim> I think it's only useful for seq/array accesses. |
17:47:12 | leorize | disruptek: yes, that is the issue |
17:47:20 | disruptek | recruit: i gave you the two line solution and an hour later you're still trying to make to make it work "cleaner". |
17:47:23 | leorize | I mostly give up on setting a fully reproducible chain |
17:47:27 | disruptek | i will never understand these people. |
17:50:40 | FromDiscord | <lqdev> @Rika yeah you're right |
17:51:22 | FromDiscord | <lqdev> @!Privileged in this case you can also check out https://nim-lang.org/docs/strutils.html#stripLineEnd%2Cstring |
17:52:18 | FromDiscord | <!Privileged> i kinda need to keep '\n' tho :/ |
17:52:46 | FromDiscord | <!Privileged> oh actually |
17:52:53 | * | habamax joined #nim |
17:52:58 | FromDiscord | <!Privileged> i could use that ig ty |
17:54:28 | * | tane joined #nim |
18:03:58 | FromDiscord | <Clyybber> disruptek: why do you need a shim for the compiler? |
18:04:33 | disruptek | because the generic "cc:env" feature doesn't work with zig. |
18:04:49 | FromDiscord | <Clyybber> why not? |
18:05:12 | disruptek | something to do with zig compilation requiring an extra argument or something. |
18:05:34 | disruptek | ironically, cc:env replaced cc:zig. 🙄 |
18:06:17 | FromDiscord | <Clyybber> I think you need to treat zig like clang |
18:06:27 | disruptek | go ahead and try it. |
18:07:24 | ForumUpdaterBot | New thread by Stbalbach: Regex and capture unicode text, see https://forum.nim-lang.org/t/7409 |
18:12:55 | FromDiscord | <!Privileged> anyone know why this may occur/ |
18:12:59 | FromDiscord | <!Privileged> sent a code paste, see https://play.nim-lang.org/#ix=2MOy |
18:13:34 | FromDiscord | <lqdev> ouch, where does the stack trace occur? |
18:13:41 | FromDiscord | <Clyybber> disruptek cc:env isnt gonna work for zig; it states that it expects a gcc like compiler |
18:13:47 | FromDiscord | <lqdev> (edit) "occur?" => "point to?" |
18:13:47 | FromDiscord | <!Privileged> ` outFile.writeLine(validProxy) #error` here |
18:14:00 | FromDiscord | <!Privileged> sent a code paste, see https://play.nim-lang.org/#ix=2MOz |
18:14:24 | disruptek | clyybber: my point stands. |
18:14:48 | FromDiscord | <Rika> did you open it for writing? i believe by default its reading only |
18:14:56 | FromDiscord | <lqdev> ah yeah |
18:14:59 | FromDiscord | <lqdev> rika's right |
18:15:14 | FromDiscord | <!Privileged> :facepalm: |
18:15:16 | FromDiscord | <!Privileged> iyoure right |
18:15:16 | FromDiscord | <lqdev> try `open("file.txt", fmWrite)` |
18:15:37 | FromDiscord | <lqdev> that param should be explicit tbh |
18:15:46 | * | nekits071 joined #nim |
18:15:51 | FromDiscord | <Rika> same |
18:15:51 | FromDiscord | <!Privileged> still nothing |
18:15:58 | FromDiscord | <Rika> but no error right? |
18:16:03 | FromDiscord | <!Privileged> error is still there |
18:16:05 | FromDiscord | <Rika> maybe need to flushfile |
18:16:08 | FromDiscord | <Rika> oh |
18:16:11 | FromDiscord | <Rika> huh? |
18:16:17 | FromDiscord | <Rika> did you save and recompile www |
18:16:21 | FromDiscord | <Rika> i often forget to do so |
18:16:24 | FromDiscord | <!Privileged> yep |
18:17:10 | * | nekits07 quit (Ping timeout: 246 seconds) |
18:17:10 | * | nekits071 is now known as nekits07 |
18:17:26 | FromDiscord | <Rika> no idea, maybe check that line in io.nim |
18:18:09 | FromDiscord | <!Privileged> nvm |
18:18:10 | FromDiscord | <!Privileged> classic me |
18:18:13 | FromDiscord | <!Privileged> added it in the wrong place! |
18:18:18 | FromDiscord | <Rika> lol4 |
18:18:18 | FromDiscord | <!Privileged> i need to read sometimes |
18:18:21 | FromDiscord | <!Privileged> alr tysm xd |
18:18:50 | disruptek | classic !privileged. |
18:19:39 | FromDiscord | <!Privileged> 😦 |
18:22:02 | FromDiscord | <Clyybber> disruptek did you try just setting clang.exe ? |
18:23:06 | disruptek | i dunno; i wrote this code in june. |
18:24:11 | disruptek | if it works with clang.exe, that's one less thing i need to worry about. 😉 |
18:29:41 | FromDiscord | <Clyybber> it should; try it :) |
18:32:01 | FromDiscord | <Clyybber> ah; working on arc is such a bliss 😄 |
18:34:52 | disruptek | so, starlink ordered. |
18:35:03 | disruptek | saem: this is what i'm gonna try: https://www.amazon.com/gp/product/B07YZPJ2CM |
18:35:35 | FromDiscord | <Clyybber> disruptek: Oh? are you going to facecam? |
18:35:59 | disruptek | no, but weirdly, now that people want to interview me, they also want to check out my outfits. |
18:36:04 | * | j-james joined #nim |
18:36:12 | FromDiscord | <iWonderAboutTuatara> is there a way to get the index in a regular foreach iterator? |
18:36:23 | disruptek | for index, item in foo.pairs: |
18:36:25 | FromDiscord | <iWonderAboutTuatara> or do I need to write a custom iterator that returns value index tuple |
18:36:33 | FromDiscord | <iWonderAboutTuatara> oh that's a thing? |
18:36:34 | FromDiscord | <iWonderAboutTuatara> wow |
18:36:38 | FromDiscord | <iWonderAboutTuatara> thanks! |
18:37:08 | FromDiscord | <Clyybber> disruptek: curious, does it say out of stock for you too? |
18:37:17 | disruptek | no. |
18:37:56 | FromDiscord | <Clyybber> huh |
18:38:18 | FromDiscord | <mratsim> @iWonderAboutTuatara import std/enumerate |
18:38:34 | FromDiscord | <mratsim> for iterators that don't have a "pairs" |
18:42:26 | Oddmonger | let's say i have this one: var data_b:seq[byte] = @[ 1,1 ] ; and i want to access to this data zone as byte _and_ int16 |
18:43:01 | Oddmonger | i tried of course a cast… var data_w:seq[int16] = cast[seq[int16]](data_b) |
18:44:12 | Oddmonger | answer: expected seq[byte] |
18:45:38 | Oddmonger | ah … i guess it's because a seq is not an array of something, and has its own struct. So i can only use «to» to convert, which will do a copy and not ref the same memory zone |
18:58:44 | * | hyiltiz quit (Ping timeout: 265 seconds) |
19:00:44 | * | hyiltiz joined #nim |
19:06:41 | FromDiscord | <mratsim> use ptr UncheckedArray[int16] |
19:08:44 | * | Kaivo quit (Quit: WeeChat 3.0) |
19:10:53 | Oddmonger | ahh like this |
19:11:04 | Oddmonger | thank you |
19:22:45 | FromGitter | <awr1> https://github.com/microsoft/win32metadata |
19:22:57 | FromGitter | <awr1> this is extremely interesting |
19:23:04 | disruptek | doubtful. |
19:23:29 | FromGitter | <awr1> will see about using this for generating nim bindings |
19:25:19 | * | xet7 quit (Ping timeout: 265 seconds) |
19:26:57 | * | xet7 joined #nim |
19:27:59 | * | koltrast quit (*.net *.split) |
19:27:59 | * | kinkinkijkin quit (*.net *.split) |
19:27:59 | * | qwr quit (*.net *.split) |
19:28:05 | * | qwr joined #nim |
19:28:09 | * | kinkinkijkin joined #nim |
19:29:22 | * | koltrast joined #nim |
19:34:31 | * | xet7 quit (Ping timeout: 256 seconds) |
19:37:36 | * | xet7 joined #nim |
19:38:34 | * | habamax quit (Ping timeout: 264 seconds) |
19:39:00 | FromDiscord | <Recruit_main707> @mratsim update: also was slower without `parallel:` |
19:45:53 | * | etothpiiminus1 joined #nim |
19:50:02 | * | leorize quit (Ping timeout: 268 seconds) |
19:56:03 | * | etothpiiminus1 quit (Ping timeout: 256 seconds) |
19:56:41 | * | etothpiiminus1 joined #nim |
19:57:11 | * | leorize joined #nim |
20:01:49 | * | etothpiiminus1 quit (Ping timeout: 265 seconds) |
20:02:23 | * | etothpiiminus1 joined #nim |
20:04:51 | * | leorize quit (Ping timeout: 268 seconds) |
20:06:41 | * | leorize joined #nim |
20:13:35 | saem | disruptek: did you get it yet? PS. what are you wearing? |
20:14:07 | disruptek | just a thong. |
20:15:19 | * | etothpiiminus1 quit (Ping timeout: 256 seconds) |
20:17:25 | * | NimBot joined #nim |
20:18:43 | * | jjido quit (Quit: Connection closed for inactivity) |
20:18:55 | * | hoijui_ joined #nim |
20:18:56 | * | hoijui joined #nim |
20:22:23 | * | etothpiiminus1 joined #nim |
20:23:11 | * | Vladar quit (Quit: Leaving) |
20:24:56 | * | Vladar joined #nim |
20:27:01 | * | Gustavo6046 quit (Ping timeout: 246 seconds) |
20:27:47 | * | etothpiiminus1 quit (Ping timeout: 256 seconds) |
20:29:08 | * | Gustavo6046 joined #nim |
20:33:59 | * | etothpiiminus1 joined #nim |
20:34:34 | disruptek | leorize: should balls only output to stderr, or...? |
20:38:16 | * | Mat8 joined #nim |
20:38:52 | Mat8 | G'day everyone |
20:39:23 | FromDiscord | <digitcrusher> good evening |
20:39:49 | disruptek | hello nimlets |
20:40:26 | Mat8 | I want to note that building Nim from the git sources gives an (for me) interesting hint: "conversion from string to itself is pointless" |
20:42:23 | leorize | yea, there are a bunch of those around because of either generics or because no one cleaned them up yet |
20:43:22 | * | hoijui_ quit (Ping timeout: 265 seconds) |
20:43:25 | Mat8 | well, at least I have now an explanation for this, thanks |
20:43:40 | * | etothpiiminus1 quit (Remote host closed the connection) |
20:43:51 | * | hoijui quit (Ping timeout: 265 seconds) |
20:44:40 | leorize | disruptek: no idea |
20:44:59 | leorize | tests might emit their own output but then wouldn't you want balls' messages so you know which test emitted them? |
20:45:23 | disruptek | the problem i'm trying to solve is only that streams are stomping on each other. |
20:45:47 | leorize | how is that possible? |
20:45:57 | disruptek | checkpoint currently outputs to stdout and the nim compiler does not. |
20:46:02 | leorize | multithreaded tests? |
20:46:14 | disruptek | no; slow streams. 😁 |
20:46:53 | leorize | ah yea, stdout is buffered but not stderr |
20:47:12 | disruptek | yes. |
20:47:34 | leorize | I think it's fine to output to stderr if that solves the issue |
20:48:12 | disruptek | i think so, too; this allows the user to test against stdout. i don't think supporting unittests religiously is all that useful. |
20:57:53 | * | xet7 quit (Quit: Leaving) |
21:01:51 | * | vicfred joined #nim |
21:06:09 | disruptek | it's actually already written this way, it just doesn't work on windows. |
21:06:15 | disruptek | fuck 'em. |
21:06:30 | * | leorize quit (Ping timeout: 268 seconds) |
21:07:25 | * | leorize joined #nim |
21:12:43 | * | j-james quit (Quit: WeeChat 3.0) |
21:25:33 | * | leorize quit (Remote host closed the connection) |
21:27:08 | * | leorize joined #nim |
21:41:39 | FromDiscord | <shadow.> what doesn't work on windows? |
21:43:48 | * | narimiran quit (Ping timeout: 260 seconds) |
21:44:23 | FromDiscord | <!Privileged> sent a code paste, see https://paste.rs/sHE |
21:47:49 | * | leorize quit (Ping timeout: 268 seconds) |
21:49:38 | * | haxscramper quit (Remote host closed the connection) |
21:50:39 | FromDiscord | <konsumlamm> you can't assign a "called iterator" to a value |
21:50:54 | FromDiscord | <konsumlamm> afaik at least |
21:51:27 | FromDiscord | <mratsim> inline iterators are compile-time constructs. |
21:51:57 | FromDiscord | <!Privileged> so how would you call `find` on a seq? |
21:51:59 | FromDiscord | <mratsim> use `var items = toSeq(loadedProxies.items)` |
21:52:09 | FromDiscord | <mratsim> import std/algorithms |
21:52:10 | FromDiscord | <!Privileged> ahh alr |
21:52:15 | FromDiscord | <konsumlamm> that's just copying the seq though, sin't it? |
21:52:19 | FromDiscord | <konsumlamm> (edit) "sin't" => "isn't" |
21:52:20 | FromDiscord | <mratsim> yes |
21:52:22 | FromDiscord | <lqdev> well why'd you want to do that |
21:54:01 | FromDiscord | <konsumlamm> i'd prefer it if closure iterators were the default and inline iterators just an optimization |
21:54:16 | FromDiscord | <konsumlamm> so that when designing an API, you don't need to care about inline vs closure iterators |
21:54:29 | FromDiscord | <lqdev> you hardly ever use closure iterators though |
21:54:52 | FromDiscord | <lqdev> simply because inline iterators provide pretty much all the facilities you ever need |
21:56:28 | FromDiscord | <konsumlamm> except when you want to make iterator combinators |
21:56:35 | FromDiscord | <konsumlamm> like map, filter, fold on iterators |
21:56:48 | FromDiscord | <!Privileged> so how would you call `find` on a sequence without copying it |
21:57:22 | FromDiscord | <!Privileged> also what actually is a pointer in nim |
21:57:22 | FromDiscord | <lqdev> `find` doesn't copy the sequence |
21:57:54 | FromDiscord | <lqdev> passing seqs as parameters never makes a copy unless you specifically assign it to a variable |
21:58:50 | FromDiscord | <konsumlamm> why would find need to copy the seq? you're just iterating over it (unless you're talking about a different find...) |
21:59:05 | FromDiscord | <!Privileged> for some reason i was getting some compiler errors when calling find |
21:59:08 | FromDiscord | <!Privileged> they seem to be fixed now |
21:59:16 | FromDiscord | <!Privileged> well ty for your help, i appreciate it |
22:01:25 | FromDiscord | <konsumlamm> i wish something like iterutils would be in the stdlib |
22:01:33 | FromDiscord | <konsumlamm> though the stdlib already is pretty big |
22:02:55 | federico3 | is there any Nim talk in the upcoming remote FOSDEM? |
22:03:59 | * | leorize joined #nim |
22:05:11 | tane | federico3, https://fosdem.org/2021/schedule/event/nimdsl/ there's at least one it seems |
22:05:46 | federico3 | evidently the search function on the website does not work :) |
22:06:13 | tane | if I search for "nim" the talk shows up :) |
22:10:56 | federico3 | Kotlin and Zig have a whole devroom :-/ |
22:12:30 | FromDiscord | <ElegantBeef> Yea pmunch's talk is the only one i know about |
22:12:45 | FromDiscord | <mratsim> Nim inline iterators should be combinable, right now it requires zero-functional. |
22:13:45 | FromDiscord | <ElegantBeef> Yea the solution is to make inline iterators first class not make everything closure, that way we get functionality and performance |
22:14:57 | FromDiscord | <ElegantBeef> Many things that work on `openArray[T]` should take `iterator[T]` instead so it allows more types, for instance `sum` should certainly work on anything iterable with a addition operator |
22:15:44 | FromDiscord | <ElegantBeef> It also would fix the UFCS for iterators so we dont need that `toSeq(iter)` we can do `iter.toSeq` |
22:16:53 | FromDiscord | <exelotl> That sounds very epic |
22:17:41 | FromDiscord | <ElegantBeef> I believe this PR makes that possible https://github.com/nim-lang/Nim/pull/11992 |
22:17:44 | disbot | ➥ every symbol becomes 1st class; defines 0-cost lambda and aliases; inline iterators/templates/etc can be passed to any routine ; snippet at 12https://play.nim-lang.org/#ix=250A |
22:18:32 | FromDiscord | <mratsim> we need both openarray and iterator |
22:18:43 | FromDiscord | <mratsim> it's different use cases. |
22:19:06 | FromDiscord | <ElegantBeef> Yes, but in some cases iterator makes more sense |
22:19:07 | FromDiscord | <mratsim> unless we can have var iterator? |
22:19:27 | FromDiscord | <ElegantBeef> I'm not saying remove `openArray` i'm saying replace openArray with iterator when that becomes viable and it makes sense |
22:19:33 | FromDiscord | <mratsim> or Iterable concept |
22:19:45 | FromDiscord | <ElegantBeef> sum for instance should certainly just take an iterator |
22:20:33 | FromDiscord | <ElegantBeef> Same with some of the sequtils and my contribution to setutils |
22:21:15 | FromDiscord | <konsumlamm> zero-functional looks pretty cool (i haven't used it yet), but i kinda dislike that it needs the `-->` macro and that the combinators don't use normal procs |
22:21:43 | FromDiscord | <ElegantBeef> https://github.com/nim-lang/Nim/blob/devel/lib/std/setutils.nim#L20↵Like this should be a proc that takes an iterator atleast in my view |
22:22:03 | FromDiscord | <konsumlamm> but tbf, lambdas (with the `->` sugar) have some inference problems, so using templates with `it` is probably the better alternative |
22:22:25 | FromDiscord | <mratsim> lambda syntax and inference needs some love |
22:22:46 | FromDiscord | <mratsim> I have to had {.nimcall.} or {.gcsafe.} in many case and it's quite annoying |
22:23:24 | FromDiscord | <mratsim> and foo.takeWhile(x => x <= 10) is very strange |
22:23:59 | FromDiscord | <mratsim> I would prefer `foo.takeWhile(lambda x: x <= 10)` |
22:25:29 | FromDiscord | <konsumlamm> ye, everything that just iterates over the thing should work on iterators, that'd be epic |
22:25:33 | * | natrys quit (Quit: natrys) |
22:26:07 | FromDiscord | <ElegantBeef> Yea when we get first class iterators i have a feeling that'll be what gets defaulted, since it's just better for performance and ergonomics |
22:26:28 | FromDiscord | <ElegantBeef> It's like when views get fixed, a lot of the stdlib should get view versions, like `strutils` |
22:27:02 | FromDiscord | <mratsim> strutils should get iterators in many cases 😉 |
22:27:11 | FromDiscord | <ElegantBeef> Yea, but also should get views |
22:28:00 | FromDiscord | <ElegantBeef> slice operations, split, lines, all things like that which currently double allocate should have view versions |
22:29:08 | FromDiscord | <exelotl> mannn I really want view types to be stable |
22:30:04 | FromDiscord | <exelotl> it's gonna be so good |
22:32:48 | FromDiscord | <konsumlamm> so is most things using iterators/iterables actually realistic in the foreseeable future? |
22:33:09 | FromDiscord | <ElegantBeef> I mean it's usable now if you dont mind templates/`yourTemplat(iter)` |
22:33:50 | FromDiscord | <ElegantBeef> Look at my link to setutils, it works on all iterables that are bitsetable ordinals |
22:34:36 | FromDiscord | <mratsim> "foreseeable" is a stretch. Since 2021 is the year of stability and this is a new feature. |
22:35:03 | FromDiscord | <mratsim> well inline iterator chaining is supposedly working (according to the manual) but actually never worked. |
22:35:40 | Mat8 | ciao |
22:35:48 | * | Mat8 quit (Quit: Leaving) |
22:36:42 | FromDiscord | <konsumlamm> speaking of setutils, it still needs to be linked in the stdlib docs |
22:36:48 | FromDiscord | <ElegantBeef> It's in devel |
22:36:58 | FromDiscord | <ElegantBeef> So will be in `1.6.0` |
22:37:12 | FromDiscord | <ElegantBeef> It's here https://nim-lang.github.io/Nim/theindex.html |
22:37:29 | FromDiscord | <konsumlamm> i mean https://nim-lang.github.io/Nim/lib.html |
22:37:47 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/801943652946673734/unknown.png |
22:38:03 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/801943717288083456/unknown.png |
22:38:04 | FromDiscord | <ElegantBeef> It's there |
22:38:11 | FromDiscord | <ElegantBeef> They're automatically generated docs |
22:38:51 | FromDiscord | <konsumlamm> i know it's there, but it's not in the lib.html, which is where most people would presumably look to get an overview over what modules the stdlib has |
22:39:14 | FromDiscord | <ElegantBeef> I mean i never use that, so ehh |
22:39:19 | FromDiscord | <ElegantBeef> Feel free to make a PR for it 😄 |
22:39:24 | FromDiscord | <konsumlamm> i will |
22:39:41 | FromDiscord | <ElegantBeef> I honestly forgot that page even existed since i just use the index |
22:39:56 | FromDiscord | <konsumlamm> i mean, i didn't even know about theindex until 2 weeks ago |
22:40:11 | FromDiscord | <ElegantBeef> I learned about the index before the lib page, so i guess to each their own |
22:40:13 | FromDiscord | <mratsim> theindex has a discoverability problem |
22:40:17 | FromDiscord | <ElegantBeef> Yep |
22:40:29 | FromDiscord | <mratsim> not sure how to get to it without knowing that it exists |
22:40:39 | FromDiscord | <konsumlamm> i just always looked at the lib.html |
22:41:01 | FromDiscord | <konsumlamm> i also initially thought Nim had no File type, since `io` is not linked directly there |
22:41:11 | FromDiscord | <konsumlamm> apparently i was too stupid to search for "File" |
22:41:15 | FromDiscord | <ElegantBeef> Lol |
22:42:54 | FromDiscord | <konsumlamm> the "Nim Standard Library" section is also what's linked on the website, so i assume most people will look at that first when exploring the stdlib |
22:46:01 | FromDiscord | <exelotl> theindex also has a discoverability problem on the inside xD↵I found it in my early days with nim and was like wtf... this is the worst doc ever |
22:47:30 | * | Sembei joined #nim |
22:48:32 | FromDiscord | <exelotl> I can see it being useful once you know your way around, but when I'm looking for something in the stdlib by name, I prefer to just use the search box in the doc pages |
23:00:24 | FromDiscord | <Clyybber> yeah, the doc pages itself should be searchable via the search box too |
23:03:19 | * | tane quit (Quit: Leaving) |
23:09:58 | disruptek | rust requires almost 11gb of disk in order to compile. |
23:10:31 | disruptek | on the other hand, people are willing to pay you to watch the compiler. |
23:22:57 | * | Vladar quit (Quit: Leaving) |
23:29:36 | leorize | if the user specify that the PATH variable of the child process should be modified, should I search for the program to launch in the modified PATH or should I use the parent process PATH? |
23:33:35 | FromDiscord | <Clyybber> disruptek: And a lot of RAM/swap |
23:35:15 | FromDiscord | <Clyybber> which is why the BSDs don't have 32bit rustc builds (because they require that a package can be built on the target arch) |
23:43:16 | FromDiscord | <K-> does anyone have a cool idea for a command line tool that I could do in nim? |
23:50:14 | * | Q-Master quit (Read error: Connection reset by peer) |
23:50:21 | * | Q-Master joined #nim |
23:56:51 | FromDiscord | <phoph> downloader |
23:56:57 | FromDiscord | <phoph> (edit) |