00:06:11 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
00:37:34 | * | xaltsc quit (Quit: WeeChat 3.7.1) |
00:40:00 | * | xaltsc joined #nim |
00:50:53 | * | xaltsc quit (Ping timeout: 246 seconds) |
01:07:30 | alystair | hector my concern was debuggability if/when a compiled NIM project breaks in some way within the browser, looking at the compiled output it seems overly complex and not easy to follow |
01:10:08 | alystair | I'll eventually join Discord instead... proxy chat feels odd to me :) |
01:10:31 | * | alystair quit (Remote host closed the connection) |
01:12:15 | * | Guest61 joined #nim |
01:13:02 | * | Guest61 quit (Client Quit) |
01:17:26 | FromDiscord | <Elegantbeef> Compiling with `-d:danger` does make it a bit more manageable but that removes some checks |
01:18:13 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/9525 there is also the stuff here |
01:24:29 | FromDiscord | <Lorin> Hi, moved over ~ |
01:24:45 | FromDiscord | <Lorin> is this the official server? |
01:25:24 | FromDiscord | <Elegantbeef> Yes |
01:34:44 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4eZ5 |
01:34:52 | FromDiscord | <Elegantbeef> Same typedef yes |
01:35:04 | FromDiscord | <sOkam!> what do you mean? |
01:35:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eZ6 |
01:36:09 | FromDiscord | <sOkam!> oh, by being inside the same `type` block it works? 👀 |
01:37:23 | FromDiscord | <sOkam!> very unexpected behavior, but happy that its there |
01:46:49 | * | rockcavera quit (Remote host closed the connection) |
01:52:42 | FromDiscord | <Elegantbeef> It's documented and encourages not having code smell 😄 |
01:58:06 | FromDiscord | <John Novak> hi there, it seems to me that the 1.6.8 win32 distribution package is broken somehow |
01:58:09 | FromDiscord | <Elegantbeef> Oh hey it's john novak |
01:58:23 | FromDiscord | <John Novak> just trying to compile a simple hello world app fails on 1.6.8 / 32-bit on windows |
01:58:29 | FromDiscord | <John Novak> while it works fine with 1.6.6 |
01:58:34 | FromDiscord | <John Novak> the error |
01:58:38 | FromDiscord | <John Novak> https://media.discordapp.net/attachments/371759389889003532/1038271088184012891/image.png |
01:58:56 | FromDiscord | <Elegantbeef> What about 1.6.10? |
01:58:58 | FromDiscord | <John Novak> i'm using the same mingw32 compiler in both cases |
01:59:15 | FromDiscord | <John Novak> haven't tried 1.6.10 |
01:59:29 | FromDiscord | <John Novak> tbh i'm fine with 1.6.6 for now, don't wanna waste time investigating this |
01:59:32 | FromDiscord | <Elegantbeef> The release candidate forum post has an issue that might be related iirc |
01:59:33 | FromDiscord | <John Novak> just wanted to flag it for you guys |
02:00:08 | FromDiscord | <John Novak> not many people might be using the 32-bit win version, so i thought i'd let you know. i'm personally fine with 1.6.6 for now, i don't need anything from 1.6.8 or later |
02:00:29 | FromDiscord | <John Novak> anyway, now you know 😄 lunchtime 😄 |
02:00:49 | FromDiscord | <Elegantbeef> Well a bug report i think exists and this isnt #internals |
02:09:17 | FromDiscord | <Bung> there's one already https://github.com/nim-lang/Nim/issues/19957 |
02:09:49 | FromDiscord | <Bung> I almost viewed all issues. |
02:21:34 | FromDiscord | <ringabout> In reply to @John Novak "not many people might": Using `_setjmp` on Windows becomes default since 1.6.8 => https://github.com/nim-lang/Nim/pull/20758 |
02:34:35 | FromDiscord | <banan|crab> whats the nim analagous of pythons os.rename in nim |
02:34:44 | FromDiscord | <banan|crab> moveFile doesnt really do what i expected |
02:36:37 | * | lucerne quit (Ping timeout: 268 seconds) |
02:41:24 | FromDiscord | <John Novak> cool, i'll stay on 1.6.6 for 32-bit until this gets resolved, thanks guys |
02:43:20 | FromDiscord | <John Novak> i'll use #internals next time @ElegantBeef 👍 |
03:12:42 | * | disso_peach joined #nim |
03:21:02 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4eZr |
03:21:34 | FromDiscord | <Elegantbeef> No |
03:21:50 | FromDiscord | <Elegantbeef> Like i said C defaults to by copy Nim does the right thing |
03:21:55 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=4eZt" => "https://play.nim-lang.org/#ix=4eZs" |
03:22:27 | FromDiscord | <sOkam!> kk, so if i change all ptr proc inputs, and remove the bycopy from the types, it should work the same? |
03:22:44 | FromDiscord | <Elegantbeef> Yes `var T` is `T` |
03:23:23 | FromDiscord | <sOkam!> oh, so passing ptr and var is the same? |
03:23:36 | FromDiscord | <Elegantbeef> Well `var T` is safer but yes |
03:23:45 | FromDiscord | <sOkam!> ✍️ |
03:35:45 | * | arkurious quit (Quit: Leaving) |
03:36:40 | * | xaltsc joined #nim |
03:58:45 | * | via__ quit (Ping timeout: 268 seconds) |
03:59:12 | * | via_ joined #nim |
04:08:00 | * | wallabra_ joined #nim |
04:09:19 | * | wallabra quit (Ping timeout: 272 seconds) |
04:09:42 | * | wallabra_ is now known as wallabra |
04:39:34 | FromDiscord | <fancy plants> If you want to manually alloc/dealloc a Nim object separate from ref counting, how would one do so? Maybe like an arena for allocating multiple objects, computing something, and then deallocing at the end? |
04:40:28 | FromDiscord | <Elegantbeef> Manual memory management is done with `alloc` and `create` |
04:43:49 | FromDiscord | <fancy plants> Would the performance difference be negligible compared to the earlier refcount example alloc/dealloc we talked about earlier? |
04:44:22 | FromDiscord | <Elegantbeef> Correct non cyclical types have no overhead compared to manual |
04:50:29 | * | lucerne joined #nim |
04:51:18 | NimEventer | New thread by JeysonFlores: Can't manipulate HashSet of complex types, see https://forum.nim-lang.org/t/9578 |
05:03:19 | * | via_ quit (Ping timeout: 260 seconds) |
05:03:40 | * | via_ joined #nim |
05:05:21 | * | xet7 quit (Ping timeout: 268 seconds) |
05:06:25 | * | xet7 joined #nim |
05:09:09 | * | via_ quit (Ping timeout: 260 seconds) |
05:13:53 | * | pech joined #nim |
05:16:44 | * | disso_peach quit (Ping timeout: 260 seconds) |
05:24:52 | * | via_ joined #nim |
06:21:56 | FromDiscord | <ShalokShalom> @ElegantBeef#0000 Did you write anything of your own? Like a tutorial, guides, or a blog? |
06:23:13 | FromDiscord | <Elegantbeef> I've got a macro tutorial, and a pointer thing but nothing overly indepth |
06:23:40 | FromDiscord | <ShalokShalom> Macro tutorial sounds awesome |
06:23:48 | FromDiscord | <ShalokShalom> Can I see it? |
06:23:58 | FromDiscord | <Elegantbeef> https://dev.to/beef331/demystification-of-macros-in-nim-13n8 |
06:29:28 | * | derpydoo joined #nim |
06:39:49 | * | lucerne quit (Read error: Connection reset by peer) |
06:41:42 | FromDiscord | <ShalokShalom> Cool 😃 |
06:42:04 | FromDiscord | <ShalokShalom> I like your writing style 😄 |
06:47:45 | FromDiscord | <Elegantbeef> Thanks |
06:56:14 | * | wallabra quit (Ping timeout: 268 seconds) |
06:56:30 | * | wallabra joined #nim |
07:09:13 | FromDiscord | <ShalokShalom> Do you agree on this one? https://media.discordapp.net/attachments/371759389889003532/1038349249571717190/Screenshot_20221105-080840.png |
07:09:27 | FromDiscord | <Elegantbeef> Of course |
07:09:30 | FromDiscord | <ShalokShalom> Since I see people doing macros all the time, and templates quite less |
07:09:32 | FromDiscord | <ShalokShalom> Ok |
07:10:02 | FromDiscord | <Elegantbeef> They all have use cases |
07:10:09 | FromDiscord | <Elegantbeef> But they're limited in regards |
07:12:34 | FromDiscord | <ShalokShalom> That guy in the video is treeform? |
07:12:42 | FromDiscord | <Elegantbeef> Correct |
07:12:52 | FromDiscord | <ShalokShalom> Since he looks and sounds entirely different as this treeform:↵↵https://youtu.be/nyhkhB23tOQ |
07:18:54 | FromDiscord | <ShalokShalom> Probably just subjective 😅 |
07:23:14 | FromDiscord | <ChocolettePalette> Has nim 2.0 released? o.o |
07:23:19 | FromDiscord | <Elegantbeef> Nope |
07:23:39 | FromDiscord | <ChocolettePalette> Good, no need to update then |
07:24:00 | FromDiscord | <Elegantbeef> Araq wants it out this year though |
07:24:35 | FromDiscord | <ChocolettePalette> Omg that's kinda epic doe |
07:25:13 | FromDiscord | <Elegantbeef> I mean it's not as big of a change as some might imagine |
07:38:38 | * | derpydoo quit (Ping timeout: 246 seconds) |
07:48:10 | * | jjido joined #nim |
07:51:23 | FromDiscord | <Phil> Well, nim devel is like one CLI command away! |
07:51:59 | FromDiscord | <Elegantbeef> Some people dont use choosenim! |
07:52:06 | FromDiscord | <Elegantbeef> Or even gitnim |
07:52:38 | FromDiscord | <Phil> heresy |
07:53:05 | FromDiscord | <Elegantbeef> Yea it's wild, some people want a ball ache to change language versions it seems |
07:56:00 | FromDiscord | <Phil> that reminds me I need to update my devel version since IIRC ringabout said the datetime thing is fixed |
07:58:17 | FromDiscord | <Phil> > (base) ~/dev/playground % choosenim update devel↵> could not import: SSL_get_peer_certificate↵Erm... any ideas on what this is? |
07:59:32 | FromDiscord | <ringabout> It is not fully fixed for `distinct` though. The VM seems to screw up the types, which cannot be sem checked again. |
07:59:44 | FromDiscord | <Phil> Ah, shoot |
08:00:26 | FromDiscord | <ringabout> In reply to @Isofruit "> (base) ~/dev/playground %": I'm experienced with that, when `choosenim` doesn't work, I'm trying over and over again. |
08:00:46 | FromDiscord | <Phil> In reply to @flywind "I'm experienced with that,": Ah, basically just repeat the command until it gives up? |
08:01:16 | FromDiscord | <ringabout> Yeah, sometimes it is caused by internet. |
08:02:14 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4f03 |
08:04:22 | FromDiscord | <Elegantbeef> I dont think that binary operators are documented in the manual like that |
08:04:37 | FromDiscord | <nocturn9x> I found what caused my bug |
08:04:49 | FromDiscord | <nocturn9x> I was never setting the `kind` discriminant of my object variant |
08:04:59 | FromDiscord | <Elegantbeef> What code? |
08:05:08 | FromDiscord | <nocturn9x> it was just out of luck that the right enum value was the first one, so as lon as memory was zeroed it would work |
08:05:08 | FromDiscord | <Phil> In reply to @flywind "I'm experienced with that,": Wait, so immediately try over and over or try every 10 minutes? |
08:05:11 | FromDiscord | <Elegantbeef> Whoops i misread so i guess disregard |
08:05:22 | FromDiscord | <nocturn9x> I had to use an ugly template but now it works |
08:05:25 | FromDiscord | <nocturn9x> (edit) "lon" => "long" |
08:05:43 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#ix=4f04 |
08:06:48 | FromDiscord | <Elegantbeef> Is that better than just `uncheckedAssign`? |
08:06:55 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#types-cast-uncheckedassign |
08:06:59 | FromDiscord | <nocturn9x> I don't know, haven't tried |
08:07:02 | FromDiscord | <ringabout> In reply to @Isofruit "Wait, so immediately try": I will give up, download nightlies and finally drag the executables to the `.choosenim/toolchains` directory. |
08:07:13 | FromDiscord | <nocturn9x> does uncheckedAssign not raise `FieldDefect` |
08:07:21 | FromDiscord | <nocturn9x> when setting the discriminant of an object variant |
08:07:34 | FromDiscord | <Elegantbeef> Exactly it's point |
08:07:35 | FromDiscord | <ringabout> In reply to @flywind "I will give up,": It is probably something wrong with choosenim. |
08:07:40 | FromDiscord | <nocturn9x> lemme see |
08:08:30 | FromDiscord | <ringabout> ARC doesn't check them though. |
08:08:47 | FromDiscord | <Elegantbeef> What? |
08:09:20 | FromDiscord | <ringabout> https://github.com/nim-lang/Nim/issues/18977 |
08:09:46 | FromDiscord | <Elegantbeef> Wild |
08:10:25 | FromDiscord | <nocturn9x> nope |
08:10:26 | FromDiscord | <nocturn9x> `Error: unhandled exception: assignment to discriminant changes object branch [FieldDefect]` |
08:10:53 | FromDiscord | <nocturn9x> the code |
08:10:54 | FromDiscord | <nocturn9x> sent a code paste, see https://paste.rs/SsM |
08:12:09 | * | derpydoo joined #nim |
08:12:20 | FromDiscord | <ringabout> There is a bug regarding `unCheckedAssign` in 1.6 irrc |
08:13:10 | FromDiscord | <ringabout> https://github.com/nim-lang/Nim/pull/19567 |
08:13:10 | FromDiscord | <Elegantbeef> I do have to ask cause i'm silly, why do you not just use Nim's string? |
08:13:36 | FromDiscord | <ringabout> In reply to @flywind "There is a bug": It should work on the devel branch. |
08:13:51 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
08:24:59 | FromDiscord | <nocturn9x> In reply to @Elegantbeef "I do have to": uhm |
08:25:05 | FromDiscord | <nocturn9x> because I'm running my own VM |
08:25:07 | FromDiscord | <nocturn9x> with its own GC |
08:25:14 | FromDiscord | <nocturn9x> using nim's memory management would be no fun :) |
08:25:35 | FromDiscord | <nocturn9x> some of internal VM structures as well as the lexer, parser and compiler will keep using it |
08:25:43 | FromDiscord | <nocturn9x> but the core of the language will be GC'ed by me |
08:25:53 | FromDiscord | <nocturn9x> (edit) "some of ... internal" added "the" |
08:25:56 | FromDiscord | <Elegantbeef> I mean `ref string` and `GcRef` and `GcUnRef` is the same as `alloc`/`free` |
08:26:12 | FromDiscord | <nocturn9x> yes but where's the fun if you don't get at least one segfault |
08:26:22 | FromDiscord | <Elegantbeef> Ok |
08:26:25 | FromDiscord | <nocturn9x> jk ofc |
08:26:32 | FromDiscord | <nocturn9x> I just want to write a GC |
08:26:34 | FromDiscord | <Elegantbeef> Was just asking cause it was odd, to me. Carry on |
08:26:37 | FromDiscord | <nocturn9x> it's fun and a learning experience |
08:26:45 | FromDiscord | <nocturn9x> I mean |
08:26:46 | FromDiscord | <Elegantbeef> I mean you still can write a GC using Nim's string 😄 |
08:26:50 | FromDiscord | <nocturn9x> I already _have_ a GC |
08:26:53 | FromDiscord | <nocturn9x> In reply to @Elegantbeef "I mean you still": fair |
08:27:02 | FromDiscord | <nocturn9x> but I wanna be a lil more independent |
08:27:04 | FromDiscord | <nocturn9x> just cause |
08:27:11 | FromDiscord | <Elegantbeef> It's the same thing it's just using a different allocation method that lets you more easily get operations you might want |
08:27:15 | FromDiscord | <nocturn9x> this code can be ported to C fairly easily |
08:27:24 | FromDiscord | <nocturn9x> ref strings? not so much |
08:27:30 | FromDiscord | <nocturn9x> In reply to @Elegantbeef "It's the same thing": like? |
08:27:50 | FromDiscord | <Elegantbeef> The entirety of `strutils` `parseUtils` and so forth |
08:28:07 | FromDiscord | <nocturn9x> I mean fair |
08:28:13 | FromDiscord | <nocturn9x> but I'll reimplement those anyway |
08:28:35 | FromDiscord | <Elegantbeef> Sure but the point is it's much easier to just directly call the operations you're going to reimplement 😄 |
08:28:47 | FromDiscord | <Elegantbeef> So like i said disregard me |
08:29:27 | FromDiscord | <Elegantbeef> If i had it my way the entire stdlib would use `openArray[char]` but araq said no |
08:29:40 | FromDiscord | <Elegantbeef> So i might make copies of the stdlib modules now that do that |
08:30:03 | FromDiscord | <Elegantbeef> \Atleast with 2.0 we get `parseutils` and `unicode` to work with `openArray[char]` |
08:30:11 | FromDiscord | <nocturn9x> nice |
08:30:13 | FromDiscord | <Elegantbeef> Finally get some reusable code in the stdlib |
08:30:22 | FromDiscord | <nocturn9x> lul |
08:34:26 | FromDiscord | <Elegantbeef> As an aside is Peon a Warcraft reference? |
08:35:23 | FromDiscord | <Elegantbeef> I know it's a real word, but cmon it's a green orc that doesnt want you to touch him |
08:38:50 | * | derpydoo quit (Ping timeout: 246 seconds) |
08:39:55 | * | derpydoo joined #nim |
08:53:34 | * | lucerne joined #nim |
09:00:17 | FromDiscord | <nocturn9x> nope |
09:00:26 | FromDiscord | <nocturn9x> https://git.nocturn9x.space/nocturn9x/peon |
09:00:29 | FromDiscord | <nocturn9x> see for yourself :d |
09:00:33 | FromDiscord | <nocturn9x> (edit) ":d" => ":D" |
09:31:14 | * | jjido joined #nim |
10:20:58 | * | derpydoo quit (Ping timeout: 268 seconds) |
10:39:42 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
10:40:12 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
11:08:55 | * | jjido joined #nim |
11:13:29 | * | jmdaemon quit (Ping timeout: 276 seconds) |
11:16:32 | FromDiscord | <Phil> TFW nimble is down once again |
11:17:36 | FromDiscord | <Generic> huh |
11:17:42 | FromDiscord | <Generic> is github down? |
11:17:53 | FromDiscord | <Phil> Nah, just the nimble.directory page |
11:17:55 | FromDiscord | <Generic> ah |
11:18:02 | FromDiscord | <Phil> That's what I normally mean when I talk about nimble being down |
11:18:20 | FromDiscord | <Phil> I was wondering whether anybody made an essentially compile-time checked SQL DSL in nim |
11:18:42 | FromDiscord | <Phil> I know Ormin exists but the syntax in the examples I'm reading is...odd |
11:19:16 | FromDiscord | <Phil> Wait, no, I was looking at the wrong nim file, god damnit that thing needs a readme |
11:19:19 | FromDiscord | <Phil> (edit) "Wait, no, I was looking at the wrong nim file, god damnit that thing needs a ... readme" added "better" |
11:22:23 | FromDiscord | <Phil> Anyway, <@&371760044473319454> I wasn't reprimanded for using this one last time so unless somebody tells me it's the wrong way to try to contact anybody I'll do it anytime I see nimble being down.↵Well, nimble is down. See the nimble.directory page. https://media.discordapp.net/attachments/371759389889003532/1038412963666731098/image.png |
11:23:24 | FromDiscord | <Generic> `nimble search whatever` is never down |
11:24:08 | FromDiscord | <Phil> that is some fantastic advice right there, thanks! |
11:24:40 | FromDiscord | <Phil> (On third reading I realize that might be read sarcastically, I did mean it honestly, I wasn't aware of the search functionality) |
11:41:27 | FromDiscord | <PMunch> @Phil it's federico which maintains nimble.directory |
11:41:27 | FromDiscord | <Generic> thanks for the clarification, because I did in fact interpreted it sarcastically when I read it |
11:42:53 | FromDiscord | <Phil> Sometimes it needs that third, fourth or fifth reading for me to notice that the message if only given in text may be sounding sarcastically |
11:44:11 | FromDiscord | <ringabout> Here is the project => https://github.com/FedericoCeratto/nim-package-directory |
11:47:52 | * | derpydoo joined #nim |
11:48:45 | FromDiscord | <Phil> What name does he go by on discord? federico3? |
11:54:56 | FromDiscord | <PMunch> I don't think he has Discord |
12:11:03 | FromDiscord | <Rika> That’s his name on IRC |
12:26:28 | FromDiscord | <dlesnoff> Is there a way to redirect the ouput of a shell command into a Nim string?↵I have used execShellCmd so far.↵What I could do as a circumvention is redirecting the output to a temporary file, but I wonder if I can use execProcess or another functions from std/osproc to fetch stdout into a string ? |
12:30:06 | FromDiscord | <PMunch> @dlesnoff https://nim-lang.org/docs/osproc.html#execCmdEx%2Cstring%2Cset%5BProcessOption%5D%2CStringTableRef%2Cstring%2Cstring |
12:32:30 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
12:33:49 | FromDiscord | <banan|crab> whats the nim analagous of pythons os.rename in nim |
12:34:05 | FromDiscord | <banan|crab> `moveFile` doesnt do what i wanted |
12:41:29 | FromDiscord | <dlesnoff> In reply to @PMunch "<@610977647601909781> https://nim-lang.org/docs/osp": thanks ! I realized that I printed out the Nim cheatsheet and hanged on my wall just above my head and managed to not see it had my answer 😅 |
12:51:23 | FromDiscord | <PMunch> There's a Nim cheatsheet? |
12:51:50 | FromDiscord | <PMunch> In reply to @banan|crab "`moveFile` doesnt do what": What doesn't it do that you want it to do? |
12:53:57 | * | lucerne quit (Ping timeout: 255 seconds) |
13:03:27 | FromDiscord | <dlesnoff> In reply to @PMunch "There's a Nim cheatsheet?": Yes, @juan_carlos made it a long time ago. https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers third column fourth item from the bottom to the top in the very first table. |
13:04:20 | FromDiscord | <dlesnoff> https://www.overleaf.com/project/5ec86bd3f01cd200019aaaf9 It links to the overleaf project that is visible only if you have an overleaf account |
13:05:13 | FromDiscord | <dlesnoff> I asked him and he made me a Black & White version. |
13:05:29 | FromDiscord | <dlesnoff> (edit) "Black" => "printable (Black" | "White" => "White)" |
13:05:38 | FromDiscord | <dlesnoff> (edit) "version." => "version https://www.overleaf.com/project/5ecfe6de1824ae0001dfdb2a." |
13:07:28 | FromDiscord | <banan|crab> sent a code paste, see https://play.nim-lang.org/#ix=4f0T |
13:16:41 | * | derpydoo quit (Quit: derpydoo) |
13:20:23 | * | oprypin quit (Quit: Bye) |
13:20:40 | * | oprypin joined #nim |
13:20:54 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4f0Y |
13:22:40 | FromDiscord | <sOkam!> Also, you don't need to do open() and close() in most of the file i/o functions. only in a very specific few of them↵when they take a string as a path, instead of a `File` type, then they just open and close the file themselves |
13:22:57 | FromDiscord | <banan|crab> In reply to @sOkam! "`writeFile("Filename", "Contents")` aka you": oh |
13:25:09 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4f10 |
13:25:26 | FromDiscord | <sOkam!> the `\\` stuff is not needes if you import os and use / operator instead |
13:26:41 | FromDiscord | <sOkam!> (edit) "import os" => "`import os`" | "/" => "`/`" |
13:26:53 | FromDiscord | <sOkam!> (edit) "needes" => "needed" |
13:27:40 | FromDiscord | <deech> sent a code paste, see https://play.nim-lang.org/#ix=4f11 |
13:28:15 | FromDiscord | <deech> (edit) "https://play.nim-lang.org/#ix=4f11" => "https://play.nim-lang.org/#ix=4f12" |
13:30:51 | FromDiscord | <banan|crab> sent a code paste, see https://play.nim-lang.org/#ix=4f14 |
13:32:47 | FromDiscord | <sOkam!> In reply to @banan|crab "it does the correct": yep |
13:53:56 | * | arkurious joined #nim |
14:14:40 | FromDiscord | <Rika> In reply to @deech "How do I pass": I don’t think you can, you’re just gonna have to convert the parameter you pass in to the right type I think |
14:14:54 | FromDiscord | <Rika> Are there even generic lambdas |
14:58:16 | * | jjido joined #nim |
15:35:32 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4f1M |
15:36:31 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4f1N |
15:39:28 | FromDiscord | <dlesnoff> Do you know what I have done wrong in my overloading procedure ? |
15:40:48 | FromDiscord | <dlesnoff> (edit) "overloading" => "overloaded dollar" |
15:46:29 | FromDiscord | <dlesnoff> nvm, I think the \n come from my strings itself |
15:47:26 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
15:50:11 | FromDiscord | <treeform> In reply to @ShalokShalom "Since he looks and": both are me, probably different rooms/microphones. |
15:54:26 | FromDiscord | <treeform> In reply to @Elegantbeef "Again jsony doesnt take": That could be an interesting tool to write though... maybe next time I need a ton of foreign json parsed. |
15:56:46 | * | tinystoat quit (Remote host closed the connection) |
15:56:50 | FromDiscord | <Horizon [She/Her]> I wonder how i could even improve the WASM3 bindings... |
15:56:56 | * | tinystoat joined #nim |
15:57:49 | * | arkurious quit (Ping timeout: 260 seconds) |
15:58:15 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4f1R |
16:10:24 | * | arkurious joined #nim |
16:16:32 | FromDiscord | <Require Support> if i have a seq of object and I would like to find the object based on its id attribute and delete it from the seq, whats the best way to do this |
16:32:49 | * | Zevv joined #nim |
16:33:12 | Zevv | is Varriount ever around here? |
16:43:29 | FromDiscord | <Require Support> `Error: 'myTypeRef' is of type <var myTypeRef> which cannot be captured as it would violate memory safety, using '-d:nimNoLentIterators' helps in some cases` try to pass my object into a proc with `var` so i can add to a sequence in one of the attributes. Ex: `myTypeRef.myAttribute.add("hi")` but getting this error. Object type is declared as `ref object` |
16:52:53 | FromDiscord | <auxym> In reply to @Require Support "if i have a": you could use `filter` or `keepIf` from sequtils but it will iterate the full list. If you know you're removing only 1 item at most, you might want to do it manually. iterate over the seq, stop when you find the id, then call `delete` with the index. |
16:53:28 | FromDiscord | <auxym> Though if you're doing a lot of that, might want to consider using a `Table` or `OrderedTable`, both the search and the removal will be faster. |
17:02:56 | FromDiscord | <Require Support> In reply to @auxym "you could use `filter`": yep this is what I did eventually, just thought there might be a better way of doing it |
17:07:23 | * | xet7 quit (Remote host closed the connection) |
17:09:30 | * | pech is now known as disso_peach |
17:50:50 | * | jjido joined #nim |
18:13:36 | FromDiscord | <haxscramper> PMunch: https://forum.nim-lang.org/t/8629 is there a finalized version of community guidelines right now? |
18:14:19 | * | arkurious quit (Ping timeout: 260 seconds) |
18:14:42 | * | krux02 joined #nim |
18:26:53 | * | arkurious joined #nim |
19:16:24 | FromDiscord | <Horizon [She/Her]> In Nim am i able to declare a proc within another proc, that returns another proc using something from the first method? |
19:16:48 | FromDiscord | <Horizon [She/Her]> And I don't think i can structure it differently, i already need to use 2 procs due to wasm3 bindings |
19:19:24 | FromDiscord | <Phil> In reply to @Event Horizon "In Nim am i": So like... how many levels of procs? |
19:19:29 | FromDiscord | <Phil> 3? |
19:20:15 | FromDiscord | <Phil> Anyway, feels like it should be possible, given from what I experimented with of procs generating procs with other procs |
19:20:57 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "3?": Yup |
19:20:58 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4f2R |
19:21:19 | FromDiscord | <Horizon [She/Her]> Since each WASI interface is specific to the machine it's running on |
19:21:32 | FromDiscord | <Horizon [She/Her]> 'machine' just being a container in a way |
19:22:15 | FromDiscord | <Phil> I'd honestly put the proc definitions on the same level and then only stack their usages inside one another |
19:22:43 | FromDiscord | <Phil> Unless they need to access the environment of the other proc? |
19:28:36 | FromDiscord | <Horizon [She/Her]> Wdym? |
19:31:28 | FromDiscord | <Horizon [She/Her]> `proc_exit` needs access to `machine` for example, so |
19:46:56 | FromDiscord | <Enc1nt> Can some one help me on how to use the std/math GDC function? |
19:49:20 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4f2V |
19:49:48 | FromDiscord | <dlesnoff> (edit) "https://play.nim-lang.org/#ix=4f2V" => "https://play.nim-lang.org/#ix=4f2W" |
19:50:46 | FromDiscord | <Enc1nt> sent a code paste, see https://play.nim-lang.org/#ix=4f2X |
19:51:32 | FromDiscord | <dlesnoff> output of `nim -v` ? Which error ? |
19:51:57 | FromDiscord | <Enc1nt> In reply to @Jiezron "output of `nim -v`": all of this ones https://media.discordapp.net/attachments/371759389889003532/1038541197658030130/image.png |
19:52:25 | FromDiscord | <dlesnoff> remove your code, and copy paste correctly mine |
19:53:07 | FromDiscord | <dlesnoff> you have a typo writing problem. It is gcd and not gdc for `greatest common denominator` |
19:54:10 | FromDiscord | <Enc1nt> sent a code paste, see https://play.nim-lang.org/#ix=4f2Z |
19:54:10 | FromDiscord | <Enc1nt> this outputs even longer erros |
19:54:39 | FromDiscord | <Phil> In reply to @Event Horizon "Wdym?": One sec, phoning in parallel can't really do code questions in parallel |
19:57:23 | FromDiscord | <Horizon [She/Her]> Ah fair lol |
19:57:25 | FromDiscord | <dlesnoff> aren't there threads in discord to discuss things in parallel? Does it break IRC bridge?↵Sorry for the inconvenience of answering another code question and starting another thread. |
19:57:38 | FromDiscord | <Horizon [She/Her]> Does anyone know if you can get the name of a type in Nim? |
19:57:43 | FromDiscord | <Horizon [She/Her]> as a string |
19:57:51 | FromDiscord | <Elegantbeef> `$typeof(x)`? |
20:00:30 | FromDiscord | <Horizon [She/Her]> Thanks! Does that work with ref objects? |
20:02:32 | FromDiscord | <Elegantbeef> Why wouldnt it |
20:06:02 | FromDiscord | <Horizon [She/Her]> Like i mean |
20:07:02 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4f31 |
20:07:08 | FromDiscord | <Horizon [She/Her]> Would it print `BaseEvent` or `EventTwo`? |
20:07:30 | FromDiscord | <Elegantbeef> That's inheritance, `typeof` is compile time |
20:07:40 | FromDiscord | <Elegantbeef> So no it wouldnt |
20:08:40 | * | wallabra joined #nim |
20:09:23 | * | krux02 quit (Remote host closed the connection) |
20:11:03 | FromDiscord | <Elegantbeef> You can do `proc printEventName[T: BaseEvent](e: T)` |
20:11:17 | FromDiscord | <Elegantbeef> Instead of converting up it remains `EventTWo` |
20:11:59 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4f35 |
20:13:39 | * | wallabra quit (Ping timeout: 255 seconds) |
20:13:55 | FromDiscord | <Enc1nt> In reply to @Jiezron "I found your error:": Yeah i first thought its like python but its kina like java but i found that `.parseInt()` is the solution, Thanks for the spelling mistake! |
20:14:00 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4f37 |
20:16:19 | FromDiscord | <dlesnoff> I have changed gcdorlcm variable to its english version sorry 😅 ↵Also, maybe it is better to let gcdorlcm as a string and compare to "1", like you did. Just in case, the program does not crash this way if the user input is not parsable as an integer. |
20:18:28 | FromDiscord | <Enc1nt> In reply to @Jiezron "I have changed gcdorlcm": Thank you! I started today so i dont know what is going on soo it helps! |
20:21:52 | FromDiscord | <ShalokShalom> In reply to @Elegantbeef "As an aside is": Really fits it well xD↵↵Good catch 😅 |
20:22:30 | FromDiscord | <dlesnoff> In reply to @Enc1nt "Thank you! I started": I must confess that the error message was really confusing. |
20:23:02 | * | wallabra joined #nim |
20:23:17 | FromDiscord | <Enc1nt> In reply to @Jiezron "I must confess that": Yeah its like an essay lol |
20:24:58 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "You can do `proc": Ah neat! Thanks! |
20:29:15 | * | wallabra_ joined #nim |
20:30:34 | FromDiscord | <haywireSSC> how would I wait for an event using asyncdispatch? |
20:32:05 | * | wallabra quit (Ping timeout: 268 seconds) |
20:32:06 | * | wallabra_ is now known as wallabra |
20:33:48 | FromDiscord | <Enc1nt> Also 1 more question how do you make for example a 1 second delay? |
20:34:25 | FromDiscord | <dlesnoff> @Enc1nt sleep(1000) |
20:35:05 | FromDiscord | <dlesnoff> sent a code paste, see https://paste.rs/RPl |
20:35:48 | FromDiscord | <Enc1nt> sent a code paste, see https://play.nim-lang.org/#ix=4f3d |
20:36:47 | FromDiscord | <Enc1nt> sent a code paste, see https://play.nim-lang.org/#ix=4f3e |
20:37:03 | FromDiscord | <Enc1nt> https://media.discordapp.net/attachments/371759389889003532/1038552549365661859/image.png |
20:37:44 | FromDiscord | <Elegantbeef> Did you `import std/os`? |
20:37:54 | FromDiscord | <dlesnoff> Well, it miss import std/os indeed |
20:37:59 | FromDiscord | <Enc1nt> os? |
20:38:13 | FromDiscord | <Enc1nt> sent a code paste, see https://play.nim-lang.org/#ix=4f3f |
20:38:13 | FromDiscord | <Enc1nt> isnt it times? |
20:38:27 | FromDiscord | <dlesnoff> https://nim-lang.org/docs/os.html#sleep%2Cint |
20:38:28 | FromDiscord | <Elegantbeef> Sleep is in `os` |
20:38:35 | FromDiscord | <Elegantbeef> As it's an OS feature |
20:38:37 | FromDiscord | <Enc1nt> In reply to @Elegantbeef "Sleep is in `os`": ohh |
20:39:01 | FromDiscord | <Enc1nt> i got a bit confused in the documentation ig https://media.discordapp.net/attachments/371759389889003532/1038553040912912424/image.png |
20:39:35 | FromDiscord | <dlesnoff> I believed it was in `system` so I did not mention the import |
20:39:49 | FromDiscord | <Enc1nt> And ti works now |
20:39:53 | FromDiscord | <Enc1nt> (edit) "ti" => "it" |
20:40:31 | FromDiscord | <dlesnoff> In reply to @Enc1nt "i got a bit": I would not have thought this to be confusing. You have to know that contrarily to Python you don't have to (and don't want to) specify the library you import your functions. |
20:44:28 | FromDiscord | <Enc1nt> In reply to @Jiezron "I would not have": yeah |
20:45:33 | * | wallabra quit (Ping timeout: 255 seconds) |
20:46:26 | * | wallabra joined #nim |
20:47:52 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4f3h |
20:55:38 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:58:39 | * | thomasross joined #nim |
21:04:12 | FromDiscord | <Enc1nt> In reply to @Jiezron "We don't write `os.sleep(1000)`": i see |
21:05:40 | FromDiscord | <Enc1nt> ammm am i doing something wrong? https://media.discordapp.net/attachments/371759389889003532/1038559749043658902/image.png |
21:06:02 | FromDiscord | <Enc1nt> (probably) |
21:08:23 | FromDiscord | <Enc1nt> apparently if i put the full path it works |
21:13:25 | FromDiscord | <that_dude> It looks like the project and terminal directories are different |
21:14:36 | FromDiscord | <that_dude> Ie pwd is .../programming/nim but you're compiling ".../ascii art spam/spam.nim" |
21:36:13 | FromDiscord | <demotomohiro> @Enc1nt The relative path given to `readFile` is relative to current working directly. |
21:36:33 | FromDiscord | <Raynei486> `string.len` returns a int and the compiler doesn't like it when I compare it against `length` which is a uint https://media.discordapp.net/attachments/371759389889003532/1038567521671979008/image.png |
21:36:47 | FromDiscord | <Raynei486> is a cast the appropriate solution here? |
21:38:11 | FromDiscord | <Rika> In reply to @Jiezron "We don't write `os.sleep(1000)`": os.sleep(n) is supported |
21:38:37 | FromDiscord | <Rika> Import qualification is supported even without import nil |
21:39:33 | FromDiscord | <Rika> In reply to @Raynei486 "is a cast the": No, convert it by using the type name like a function instead |
21:39:35 | FromDiscord | <!!sharpcdf!!> just restarted my laptop after an update and now i get this error when i try to run my app, what do i need to fix it? im on arch linux https://media.discordapp.net/attachments/371759389889003532/1038568282355159080/image.png |
21:39:58 | FromDiscord | <Rika> Install an older version of open SSL |
21:40:13 | FromDiscord | <Rika> Perhaps there is a version with a 1 at the end |
21:40:18 | FromDiscord | <Rika> That is what you’re looking for |
21:40:22 | FromDiscord | <Raynei486> In reply to @Rika "No, convert it by": I'm not exactly sure what that means |
21:40:25 | FromDiscord | <!!sharpcdf!!> ah ok |
21:40:28 | FromDiscord | <!!sharpcdf!!> let me try that |
21:40:32 | FromDiscord | <Raynei486> like `it.len.uint`? |
21:40:42 | FromDiscord | <!!sharpcdf!!> In reply to @Raynei486 "I'm not exactly sure": uint(it) |
21:40:48 | FromDiscord | <Raynei486> ah |
21:40:55 | FromDiscord | <Rika> temp.filterIt(it.len.uint, ... |
21:41:18 | FromDiscord | <Raynei486> 👍 |
21:42:53 | FromDiscord | <!!sharpcdf!!> how can i install a specific version of openssl with yay again |
21:43:10 | FromDiscord | <Rika> Is there no "openssl1" |
21:43:43 | * | rlr left #nim (The Lounge - https://thelounge.chat) |
21:43:50 | FromDiscord | <dlesnoff> vs code |
21:43:58 | FromDiscord | <!!sharpcdf!!> theres openssl1-1.1 and openssl1-1.0 |
21:44:20 | FromDiscord | <!!sharpcdf!!> why does nim not support the latest openssl anyways |
21:45:14 | FromDiscord | <!!sharpcdf!!> oh wait its openssl-1.1 and openssl-1.0 |
21:45:45 | FromDiscord | <Rika> 1.1 is good |
21:45:57 | FromDiscord | <Rika> In reply to @sharpcdf "why does nim not": Because it’s relatively big of a change |
21:46:00 | FromDiscord | <Rika> It’s on the way |
21:46:05 | FromDiscord | <!!sharpcdf!!> ok |
21:46:10 | FromDiscord | <!!sharpcdf!!> looks good now |
21:47:05 | * | wallabra joined #nim |
21:55:12 | * | jkl1337 quit (Quit: Gone.) |
21:56:28 | * | jkl joined #nim |
21:59:12 | FromDiscord | <AmjadHD> Is there an option for `koch docs` to make it not compile `runnableExamples` ? |
21:59:25 | FromDiscord | <Enc1nt> I am trying to compile to JS but i cannot find why is this error happening anyone know? https://media.discordapp.net/attachments/371759389889003532/1038573275275591710/image.png |
22:09:01 | * | ehmry quit (Ping timeout: 260 seconds) |
22:15:33 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:17:46 | * | wallabra joined #nim |
22:18:02 | * | ehmry joined #nim |
22:26:20 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:30:38 | * | ltriant joined #nim |
22:36:31 | * | jmdaemon joined #nim |
22:37:13 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
22:44:56 | * | wallabra joined #nim |
23:11:41 | FromDiscord | <Rika> No I don’t think so |
23:12:05 | FromDiscord | <dlesnoff> There is no syntax highlighting for nim in Stack Overflow ?! `lang-nim` keyword only partially highlights my code. |
23:14:27 | FromDiscord | <dlesnoff> I have answered the Stack Overflow question from yesterday, I am curious to have your opinion on my answer: https://stackoverflow.com/questions/74320430/getting-hardware-info-in-nim-lang/74332136#74332136 |
23:15:29 | FromDiscord | <Elegantbeef> Dont a lot of those utilities just read files directly? |
23:16:10 | FromDiscord | <Elegantbeef> Using shell programs is best to be avoided when writing Nim, you generally use either the files directly or linux exposed APIs |
23:19:36 | FromDiscord | <Raynei486> Is there a way to assign variables to values produced by expressions? |
23:20:16 | FromDiscord | <Elegantbeef> If you make the expression a proc that returns `var T` yes |
23:24:15 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
23:26:50 | FromDiscord | <auxym> In reply to @Raynei486 "Is there a way": as in... `let a = 2 + 2` ? Not sure I understand the question |
23:28:05 | FromDiscord | <Rika> Probably bad wording |
23:33:24 | FromDiscord | <dlesnoff> sent a long message, see http://ix.io/4f3X |
23:33:39 | FromDiscord | <Elegantbeef> It also requires having awk on the system |
23:33:42 | FromDiscord | <dlesnoff> (edit) "http://ix.io/4f3X" => "http://ix.io/4f3Y" |
23:33:47 | FromDiscord | <Elegantbeef> `strscans` `regex` both exist |
23:36:08 | * | wallabra joined #nim |
23:39:25 | FromDiscord | <dlesnoff> I'll look into it tomorrow. |
23:41:12 | FromDiscord | <dlesnoff> (edit) "tomorrow." => "tomorrow, if I finish my C++ program for the PhD first." |
23:50:22 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4f43 |
23:51:02 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4f43" => "https://play.nim-lang.org/#ix=4f44" |
23:51:15 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4f44" => "https://play.nim-lang.org/#ix=4f45" |
23:56:07 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4f46 |
23:58:09 | FromDiscord | <ChocolettePalette> There's a bug in your code it doesn't compile on bubuntu |