<< 20-03-2023 >>

00:22:53FromDiscord<Ayy Lmao> Out of curiosity, how powerful is nim script compared to python? Like is it conceivable that it could do the same things if there was a community as large as python's? I know it's kind of a silly question since you can compile the language but I'm just curious.
00:24:42*sagax joined #nim
00:36:03FromDiscord<Hourglass [She/Her]> Iirc Nimscript is a lot slower than Python + modules like the `os` module aren't implemented because of `exportc` pragmas needing Nim to be compiler
00:36:07FromDiscord<Hourglass [She/Her]> Compiled
00:36:21FromDiscord<Elegantbeef> Well they are implemented through VM hooks
00:36:47FromDiscord<Hourglass [She/Her]> I thought they weren't implemented last I checked?
00:36:58FromDiscord<Hourglass [She/Her]> Like, 70-85% of the stdlib
00:37:24FromDiscord<Elegantbeef> You can use some of std/os through VM hooks
00:37:28FromDiscord<Elegantbeef> at compile time atleast
00:37:36FromDiscord<Elegantbeef> standalone nimscript does not have that functionaly
00:37:51FromDiscord<Hourglass [She/Her]> Ah
00:38:09FromDiscord<Hourglass [She/Her]> Does Nimscripter still work? Or is it broken?
00:38:23FromDiscord<Elegantbeef> It should still work
00:38:56FromDiscord<Hourglass [She/Her]> Then yeah nimscripter can be used to embed nimscript into a Nim program, so you could expose whatever function you want
00:39:08FromDiscord<Ayy Lmao> What exactly are the use cases for nim script? Is it just meant to be used when you want to do something really simple?
00:39:44FromDiscord<Hourglass [She/Her]> I believe compile time evaluation is one, code inside the `static` block? Beef would know more though
00:40:23FromDiscord<Elegantbeef> You can use it as standalone
00:40:32FromDiscord<Elegantbeef> But it's used by the compiler for static evaluation including macros and constant folding
00:42:25FromDiscord<Elegantbeef> You can also use it to make tasks for Nim and Nimble
00:42:39FromDiscord<Elegantbeef> Nimble files are just glorified nimscript files
00:42:59FromDiscord<Ayy Lmao> But if you were doing something like making a game and you wanted to embed a scripting language you'd probably be better off doing lua or something right?
00:43:16FromDiscord<Elegantbeef> I'm a wasm evangelist for scripting so i'd say no
00:44:14FromDiscord<Ayy Lmao> I'm not sure what you mean, are you saying you can embed wasm in a game instead of scripting or something?
00:44:20FromDiscord<Ayy Lmao> Because that would be sick
00:44:28FromDiscord<Elegantbeef> Use wasm instead of using lua for scripting yes
00:44:33FromDiscord<Elegantbeef> Wasm is just a VM no different to a lua vm
00:45:21FromDiscord<Ayy Lmao> I keep hearing about all these amazing things with wasm. I really hope it picks up more.
00:47:13FromDiscord<Hourglass [She/Her]> WASM is pretty cool ngl
00:47:35FromDiscord<Hourglass [She/Her]> Still need to work on that mod using WASM... Sigh
00:47:43FromDiscord<Hourglass [She/Her]> The pain of starting so many projects
00:55:00FromDiscord<Elegantbeef> Well @Ayy Lmao https://github.com/beef331/wasm3 does exist so it's a start 😄
00:58:26FromDiscord<Ayy Lmao> I'll have to look into that. I was messing around with wasm a long time ago. It has always interested me ever since I heard about it.
01:20:14*nanxiao joined #nim
02:04:59*nanxiao quit (Quit: Client closed)
02:12:45*nanxiao joined #nim
03:34:45*arkurious quit (Quit: Leaving)
03:50:41*azimut joined #nim
03:53:32FromDiscord<dedraiaken> Is there a method to convert a cstring to string without a copy?
03:55:51FromDiscord<Elegantbeef> No it requires a copy
04:01:02FromDiscord<Elegantbeef> Do you by anychance want `openArray[char]`?
04:23:25*nanxiao quit (Quit: Client closed)
05:00:55*rockcavera quit (Remote host closed the connection)
05:02:43FromDiscord<Yardanico> oh interesting, I feared that receiving server-sent events won't work with httpclient but it does with async with bodySTream
05:02:44FromDiscord<Yardanico> (edit) "bodySTream" => "bodyStream"
05:09:06*nanxiao joined #nim
06:00:37*advesperacit joined #nim
06:28:37*nanxiao quit (Quit: Client closed)
06:35:03FromDiscord<Phil> In reply to @Ayy Lmao "What exactly are the": To me:↔- build scripts↔- scripts for executing more complex tests (e.g. involving containers)↔- cross platform mini cli tools like e.g. Ng for angular
06:35:53FromDiscord<Phil> (edit) "tools like" => "tools, stuff similar to"
06:36:02FromDiscord<Phil> Essentially it's better bash to me
06:47:22*nanxiao joined #nim
06:54:11FromDiscord<Elegantbeef> @Phil\: left out the entire conventional use case of Macros and static evaluation 😄
06:55:11FromDiscord<Phil> TBF if it is code I write in a Nim file, then it's Nim code to me
06:56:04FromDiscord<Phil> Though I guess that's an incorrect view technically for the reasons you mentioned
06:56:09FromDiscord<Elegantbeef> Yea i'm just jokingly being pedantics as always
07:17:19*sagax quit (Quit: Konversation terminated!)
07:21:14*kenran joined #nim
07:26:16*rmt joined #nim
07:33:21*PMunch joined #nim
07:37:51*junaid_ joined #nim
08:15:45*xet7 quit (Quit: Leaving)
08:16:16*nanxiao quit (Quit: Client closed)
08:16:28*xet7 joined #nim
08:25:17*nanxiao joined #nim
08:25:25*junaid_ quit (Remote host closed the connection)
08:40:18*xet7 quit (Quit: Leaving)
08:44:06*xet7 joined #nim
08:47:32*Notxor joined #nim
08:54:13*randomuser464876 joined #nim
09:03:41*beholders_eye quit (Ping timeout: 256 seconds)
09:05:30*beholders_eye joined #nim
09:09:55*onetwo38 quit (Quit: The Lounge - https://thelounge.chat)
09:16:44*onetwo38 joined #nim
09:23:00*om3ga joined #nim
09:48:35FromDiscord<turbo> Can I pass a seq at runtime to a proc that accepts varargs?
09:56:27Amun-Raturbo: if you have unpacking arguments in mind than iirc no
09:56:40FromDiscord<turbo> 😩
09:57:44*nanxiao quit (Quit: Client closed)
10:03:59*beholders_eye quit (Ping timeout: 260 seconds)
10:12:09NimEventerNew Nimble package! nimalyzer - A static code analyzer for Nim, see https://github.com/thindil/nimalyzer
10:14:50arkanoidwoah, this is a nice package
10:21:53arkanoidcould you please help me understand the difference from "nim.project" and "nim.projectMappings" in https://github.com/saem/vscode-nim ?
10:35:20*junaid_ joined #nim
10:37:34*rmnmjw joined #nim
10:46:20*fallback quit (Read error: Connection reset by peer)
10:50:39*beholders_eye joined #nim
10:56:09*fallback joined #nim
10:58:49*randomuser464876 quit (Quit: Client closed)
11:13:12PMunchUgh, new versions of Nim has completely broken nimlsp..
11:31:20*junaid_ quit (Remote host closed the connection)
11:59:01om3gaHi! Have a question about Tables module. Can ordered table have duplicates, if there will be wrong insertion, or something?
11:59:23om3gaOr maybe I print out the table using wrong iterator
11:59:47om3gafor example for i in ordTable.keys: debugEcho i
12:00:14om3gausing that loop I see duplicate entries, what was unexpected for me
12:02:25om3gaI carefully read the manual, and with use ordTable[key] = @[] initialize the new key in it. but after any other stuff what happens in that function, I assign the values using ordTable[key].add value
12:02:27FromDiscord<Rika> all tables can have duplicates
12:02:36FromDiscord<Rika> using add will make a duplicate
12:02:55FromDiscord<Rika> well, what you wrote wont make any duplicates
12:02:59om3gabut values is of type seq[Type]
12:03:21FromDiscord<Rika> can you give code that shows this behaviour
12:03:32om3gaunfortunately no :\
12:03:50om3gabut what I described is 100% like in the code
12:04:16FromDiscord<Rika> i cant see how it is possible
12:04:22om3gaI even commented out that line with .add, but seems initialization of key in table creates duplicates
12:04:46om3gaI will try to write compact example
12:05:00om3gaRika: yeah, that was surprise for me
12:07:07*fallback quit (Quit: IRCNow and Forever!)
12:24:49*fallback joined #nim
13:00:54*rockcavera joined #nim
13:15:08*rmnmjw quit (Ping timeout: 246 seconds)
13:17:16*jmdaemon quit (Ping timeout: 246 seconds)
13:20:06om3gaVery strange, compacted version works well...
13:20:21om3gaI hate such issues.. damn..
13:44:44om3gaRika: I found the issue, not related with usage of tables. debugEcho was the issue, it prints the output when it wants lol
13:44:56om3gawith/to
13:45:19FromDiscord<Rika> idgi
13:45:58om3gaI used 2 loops for debug Table keys output
13:46:10om3gaone in called procedure, second after it
13:46:47*rmnmjw joined #nim
13:46:59om3gaso what I see on the screen, second keys printout was printed before first!
13:47:07om3gaidk why that happens
13:47:37FromDiscord<Rika> ic
13:48:38om3gawhat ic is?
13:50:00FromDiscord<Phil> Looks like shorthand for "I see", though why Rika lost the ability to write sentences eludes me
13:50:33Amun-Raikr

13:51:50PMunchOkay, something between 1.6.10 and 1.6.12 broke NimLSP..
13:52:04FromDiscord<ringabout> What's the error?
13:53:18PMunchInfinite recursion
13:53:33PMunchnimsuggest.nim(235) executeNoHooks
13:54:19PMunchhttps://github.com/nim-lang/Nim/blob/devel/nimsuggest/nimsuggest.nim#L236-L237
13:54:21PMunchUhm...
13:54:47*kenran` joined #nim
13:54:55*kenran` quit (Remote host closed the connection)
13:54:59PMunchI assume there was supposed to be a default `tag` argument passed there
13:55:14PMunchSo that it would call this: https://github.com/nim-lang/Nim/blob/devel/nimsuggest/nimsuggest.nim#L190
13:56:05Amun-Raright
13:56:56FromDiscord<ringabout> In reply to @PMunch "nimsuggest.nim(235) executeNoHooks": Did you try to bisect it? probably related => https://github.com/nim-lang/Nim/commit/17d45dfd6a3de8d0b6f373af70300ba344313c7f
13:57:18PMunchYeah that's the commit I ended up with as well
13:57:25PMunchHaven't actually done a bisect though
13:57:38FromDiscord<alcatraz> Learning Nim today 🙂
13:57:48PMunch@alcatraz, welcome :)
13:57:53FromDiscord<Phil> Welcome!
13:58:20FromDiscord<alcatraz> Are there any good ebooks or videos I should watch? This is my 3rd language
13:58:50FromDiscord<Phil> What were your previous ones?
13:58:52PMunch@ringabout, it seems like yyancho added some features for langserver, but since Nimsuggest doesn't really have proper tests ended up breaking it (and by extension the library version)
13:59:09FromDiscord<alcatraz> In reply to @Isofruit "What were your previous": Python & a little bit of nodejs
13:59:30*fallback quit (Read error: Connection reset by peer)
13:59:51FromDiscord<Phil> In reply to @alcatraz "Python & a little": https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers↔https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmers↔Should give you some basis for parallels↔Other than that depends on what you want to get into first
13:59:59FromDiscord<ringabout> In reply to @PMunch "<@658563905425244160>, it seems like": Yeah, most likely. Does nimlsp have some tests since it has been added to important packages?
14:00:19FromDiscord<ringabout> In reply to @alcatraz "Are there any good": There is a good book to read => https://ssalewski.de/nimprogramming.html
14:00:21FromDiscord<Phil> I can talk your ear of about compile-time evaluation, compilers and how nice nimscript is, but none of that is useful to you yet and will only start mattering once you have a project 😉
14:00:36FromDiscord<alcatraz> In reply to @Isofruit "https://github.com/nim-lang/Nim/wiki/Nim-for-Python": I'm into automation & sometimes make ||malware|| for fun
14:00:45FromDiscord<alcatraz> Thanks
14:00:53PMunch@ringabout, nothing proper
14:01:02PMunchI want to add some though
14:01:25PMunchBut I have to fix it first, so I can gather the "here is how it should work" test cases
14:01:45FromDiscord<ringabout> I see
14:02:54PMunch@alcatraz, Nim struggles with malware vendors labeling basically any Nim-built binary as malware because people keep writing malware in Nim
14:02:57FromDiscord<Phil> In reply to @alcatraz "I'm into automation &": Other than that, personally my first suggestion is always: "Find a small project", nothing will teach you quite as much
14:03:05PMunchSo please don't..
14:04:27FromDiscord<alcatraz> I don't plan to publicly use Nim malware, it just helps to learn
14:05:44FromDiscord<Phil> Sidenote, you can use templates in nim to write context-manager like you would use them in python
14:05:52om3gaHah, the problem was not with the debugEcho
14:06:07om3galoop shifted into previous loop body
14:06:27om3gathat's why I had that mystic printout
14:07:05FromDiscord<jmgomez> @ringabout is the plan to fix all regressions before releasing 2.0?
14:07:05om3gamaan, while syntax and such code format is beautiful, it can lead for such errors
14:09:05FromDiscord<ringabout> In reply to @jmgomez "<@658563905425244160> is the plan": Yeah, regressions should be fixed as much as possible before 2.0. Though, the critical issues are what are labelled with "showstopper" => https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+label%3AShowstopper
14:10:01FromDiscord<jmgomez> In reply to @ringabout "Yeah, regressions should be": Okay, Im worried because this may be forgotten: https://github.com/nim-lang/Nim/issues/21505↔And will be odd that NUE doesnt work with the latest version of Nim
14:10:41FromDiscord<jmgomez> Last thing I want to do is to ship the compiler with the plugin..
14:14:13FromDiscord<ringabout> In reply to @jmgomez "Okay, Im worried because": Yeah, it should be fixed or reverted.
14:16:43*fallback joined #nim
14:19:38PMunch@ringabout, indeed throwing an empty string in as a default tag argument in that procedure makes NimLSP work again
14:19:55FromDiscord<ringabout> Nice work!
14:23:06FromDiscord<ringabout> `nimsuggest.nim` needs a patch which should be backporte to version-1-6 branch.
14:25:17PMunch@ringabout: https://github.com/nim-lang/Nim/pull/21555
14:25:35PMunchFour character fix :P
14:26:13FromDiscord<ringabout> Neat!
14:32:48*sagax joined #nim
14:36:12FromDiscord<planetis> In reply to @Nerve "The point is that": sorry to necrobump but I forgot there is a const JsonNode implementation in nim, https://github.com/planetis-m/packedjson2 although remove, replace, move, copy are not yet implemented
14:41:35FromDiscord<Nerve> Oh wow that looks impressively optimized
14:41:43FromDiscord<Nerve> Thanks very much I'll look into this
14:42:12PMunchHmm, I should really figure out how to run NimLSP under nimsuggest v3..
14:42:27PMunchThere is some funky stuff going on there and I can't quite figure out why it doesn't work
14:42:42*PMunch quit (Quit: Leaving)
14:45:45FromDiscord<dedraiaken> Is there an ergonomic way to convert a large seq[char] buffer into strings without making copies? Or another type of array?
14:46:39Amun-Rai'm not an expert but only toOpenArray comes to my mind
14:47:03FromDiscord<System64 ~ Flandre Scarlet> sent a long message, see https://paste.rs/R5t
14:50:24FromDiscord<dedraiaken> In reply to @Amun-Ra "i'm not an expert": Thanks, I'll take a look.
14:51:01Amun-Radedraiaken: it's more like a view than distinct type
14:59:17*arkurious joined #nim
15:00:36FromDiscord<treeform> In reply to @System64 "https://github.com/treeform/netty <@107140179025735": Yes that's what it was made for.
15:01:33FromDiscord<treeform> User inputs and getting hurt is game logic, netty does not do that. It just sends packets.
15:16:59*rmnmjw quit (Ping timeout: 248 seconds)
15:35:56FromDiscord<System64 ~ Flandre Scarlet> In reply to @treeform "User inputs and getting": So for example I can send packet containing input data?
15:44:11FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4rlN
15:45:06FromDiscord<Ayy Lmao> (edit) "https://play.nim-lang.org/#ix=4rlN" => "https://paste.rs/NCS"
15:45:24FromDiscord<Ayy Lmao> (edit) "https://play.nim-lang.org/#ix=4rlP" => "https://play.nim-lang.org/#ix=4rlO"
15:50:01FromDiscord<dedraiaken> In reply to @Amun-Ra "<@296348328122384386>: it's more like": It seems like you might not be able to store them inside of a `seq`
15:52:21*fallback quit (Read error: Connection reset by peer)
15:53:55*derpydoo joined #nim
16:10:17FromDiscord<dedraiaken> Seems like there might be an `experimental: "views"` pragma to enable that though
16:11:35FromDiscord<treeform> In reply to @System64 "So for example I": You can send packet contenting anything you want.
16:11:50FromDiscord<treeform> Netty does not impose any restrictions on what is in the packet.
16:12:01FromDiscord<treeform> Its just like using UDP, but reliable
16:17:43FromDiscord<m4ul3r> for re library (https://nim-lang.org/docs/re.html)↔↔. matches any character except newline (by default). how do i get this to search for newline and change default - not seeing it in doc
16:22:12FromDiscord<wiga> is there a way to replace \\x hex digits in a string with a \x, cuz i wanna decompress python hex strings and it has \\x instead of \x
16:22:18FromDiscord<wiga> (edit) "\\x" => "\\\\x" | "\\x" => "\\\\x"
16:23:26FromDiscord<m4ul3r> In reply to @wiga "is there a way": strutils has a replace that might fit your need
16:23:31FromDiscord<wiga> yeah but how
16:23:40FromDiscord<Rika> https://nim-lang.org/docs/re.html#re%2Cstring↔↔https://nim-lang.org/docs/re.html#RegexFlag
16:23:47FromDiscord<wiga> if i replace \\\\x with \x it gives an error
16:23:58FromDiscord<Rika> In reply to @Rika "https://nim-lang.org/docs/re.html#re%2Cstring http": @m4ul3r
16:24:17FromDiscord<m4ul3r> sick, i didn’t see it as part of re. thanks
16:24:36FromDiscord<wiga> https://media.discordapp.net/attachments/371759389889003532/1087411377636905080/image.png
16:24:49FromDiscord<Rika> re("regex string", {reStudy, reDotAll})
16:24:53FromDiscord<m4ul3r> In reply to @wiga "if i replace \\\\x": you’ll need to escape \
16:25:13FromDiscord<m4ul3r> replace(“\\\\x”, “\\x”)
16:25:22FromDiscord<Rika> that wont do anything
16:25:24FromDiscord<wiga> literally going to replace \\\\x with \\\\x
16:25:31FromDiscord<m4ul3r> (edit) "replace(“\\\\x”, “\\x”)" => "replace(“\\\\\\x”, “\\\\x”)"
16:25:35FromDiscord<Rika> wiga you need smth to parse "\x.." into the proper bytes
16:25:46FromDiscord<wiga> yes
16:26:05FromDiscord<wiga> from strings found in decompiled python assembly
16:26:07FromDiscord<Rika> https://nim-lang.org/docs/strutils.html#fromHex%2Cstring might help
16:26:18FromDiscord<wiga> there's not always hex bytes
16:26:19FromDiscord<Rika> split on every `\\x`
16:26:30FromDiscord<Rika> then you need a more complex parser
16:26:34FromDiscord<wiga> sometimes there's randomness
16:26:38FromDiscord<Rika> (edit)
16:26:46FromDiscord<wiga> In reply to @Rika "in that case then": ;
16:27:12FromDiscord<Rika> i cant expound since im about to go to sleep but since your data is complex then you might be better off making a proper parser
16:27:23FromDiscord<Rika> see parseutils module if need be
16:27:25FromDiscord<Rika> gonna go
16:27:29FromDiscord<wiga> ok gn
16:27:56FromDiscord<wiga> chatgpt goes brr
16:32:46*derpydoo quit (Quit: derpydoo)
16:33:37*arkurious quit (Ping timeout: 256 seconds)
16:40:37*kenran quit (Remote host closed the connection)
16:43:01FromDiscord<m4ul3r> In reply to @Rika "re("regex string", {reStudy, reDotAll})": this works, but i’m also using regex to search for a . character. ↔re”\./.:.:.”. ↔looks like the reDotAll prevents me from using \.
16:43:10FromDiscord<m4ul3r> (edit) "\." => "\\."
16:43:31FromDiscord<m4ul3r> (edit) "↔re”\./.:.:.”." => "↔re”\\./.\\:.\\:.\\”."
16:44:26FromDiscord<m4ul3r> (edit) "↔re”\\./.\\:.\\:.\\”." => "↔ ` re”\./.:.:.” `"
16:44:50FromDiscord<m4ul3r> (edit) "In reply to @Rika "re("regex string", {reStudy, reDotAll})": this works, but i’m also using regex to search for" => "sent" | ". character. ↔ ` re”\./.:.:.” ` ↔looks like the reDotAll prevents me from using \\." => "long message, see http://ix.io/4rm4"
16:46:06*arkurious joined #nim
16:46:10*arkurious quit (Remote host closed the connection)
16:59:11FromDiscord<Ayy Lmao> Is there a simple idiomatic way to inject fields into an object definition with metaprogramming?
16:59:51FromDiscord<Ayy Lmao> The idea is to organize some base fields in another file to inject into platform specific implementations while avoiding polymorphism.
16:59:58FromDiscord<kfdvh> In reply to @PMunch "Hmm, I should really": probably using the CLI interface, not as a Nim library
17:01:02FromDiscord<auxym> In reply to @Ayy Lmao "Is there a simple": Sure, you can create a macro that generates an object typedef for you. Based on an existing typedef or any other info you want to give it
17:02:09FromDiscord<auxym> or just use variant objects, or inheritance
17:04:48FromDiscord<Ayy Lmao> I usually try to avoid macros since I'm kind of a noob at them. I'll have to look into it though. I would like to avoid runtime polymorphism so I am trying to avoid inheritance.
17:08:13FromDiscord<cloud> Wsp nim gamers
17:08:15FromDiscord<Synthetic> wsp
17:08:18FromDiscord<cloud> :nimGlow:
17:08:20FromDiscord<Synthetic> hi nim dudes
17:08:22FromDiscord<cloud> Mmmmm yes nim
17:08:27FromDiscord<Synthetic> nim
17:08:29FromDiscord<Synthetic> yummy
17:08:29FromDiscord<cloud> Nim
17:08:35FromDiscord<cloud> Taste is gud
17:08:40FromDiscord<Synthetic> fr
17:08:45FromDiscord<Synthetic> ima start learning it after school
17:08:53FromDiscord<cloud> Same
17:09:20FromDiscord<cloud> We r gonna make fortnite hackz !!!!! đŸ˜±đŸ˜±đŸ˜‹đŸ€“đŸ˜‰đŸ˜‚đŸ˜‚đŸ‘đŸ‘
17:09:25FromDiscord<Synthetic> onb
17:11:08*rmnmjw joined #nim
17:12:14FromDiscord<Gumbercules> You both should just stay in school
17:12:29FromDiscord<Gumbercules> Concentrate on that. You need all the help you can get
17:12:33FromDiscord<cloud> In reply to @Gumbercules "You both should just": We are joking 💀
17:12:42FromDiscord<Gumbercules> No way
17:12:58FromDiscord<cloud> Are u is good homie
17:13:17FromDiscord<Gumbercules> Did you just have a stroke?
17:13:42FromDiscord<cloud> Mmmmmm
17:13:47FromDiscord<cloud> I’m American my bad
17:14:54FromDiscord<Gumbercules> What is even going on rn
17:15:34FromDiscord<Phil> This discussion I think may be happening on a higher plane
17:15:37FromDiscord<cloud> Gumbercules đŸ”„
17:15:42FromDiscord<Phil> One that I'm not privvy to
17:15:45FromDiscord<Phil> But some plan
17:15:46FromDiscord<Phil> (edit) "plan" => "plane"
17:15:50FromDiscord<cloud> ^
17:15:56FromDiscord<treeform> This is kind of discussion you get when we stop talking about AI and ChatGPT.
17:16:07FromDiscord<cloud> ^
17:16:07FromDiscord<Gumbercules> At least it's novel
17:16:34FromDiscord<cloud> Chat gpt talks to its self what they discussed ?
17:16:42FromDiscord<Gumbercules> I'd take talking to my baby who can't formulate words over talking about chat GPT
17:16:43FromDiscord<cloud> Average convo real
17:17:04FromDiscord<jmgomez> Can someone ban this guys?
17:17:12FromDiscord<jmgomez> (edit) "this" => "these"
17:17:16FromDiscord<Gumbercules> Chat GPT fans should just replace their mouths and brains with chat GPT so we can get it over with
17:17:50FromDiscord<Phil> Cloud, for general chatting there's #offtopic , this channel is mostly for asking about help with nim specifically
17:17:52FromDiscord<Gumbercules> Tired of just talking about the singularity
17:18:06FromDiscord<cloud> In reply to @jmgomez "Can someone ban these*": Mmmmmm average discordian
17:18:22FromDiscord<cloud> In reply to @Isofruit "Cloud, for general chatting": Thanks Phil!
17:21:24FromDiscord<auxym> In reply to @Ayy Lmao "I usually try to": Well you did ask for metaprogramming, which is macros (and templates) 😉 beef's tutorial is pretty good if you want to get started with macros https://dev.to/beef331/demystification-of-macros-in-nim-13n8
17:21:37FromDiscord<auxym> genast makes it super easy to write macros, IMO
17:22:38*junaid_ joined #nim
17:24:38FromDiscord<Ayy Lmao> In reply to @auxym "Well you did ask": I hadn't seen that tutorial so I'll take a look, thanks. My problem with macros isn't necessarily that I don't understand them, it's just that they become unintelligible once I write them and forget about them and come back to them some day. Maybe I just suck at writing them though.
17:25:14FromDiscord<Ayy Lmao> I have also in the past gotten absolutely absurd errors using macros before.
17:25:35FromDiscord<auxym> they do become unintelligible 🙂
17:26:32FromDiscord<auxym> depending on your definition of "runtime polymorphism" though, if you use object inheritance with regular procs, rather than methods, they will use statically dispatched calls
17:26:43FromDiscord<auxym> procs = static dispatch, method = dynamic dispatch
17:27:15FromDiscord<Ayy Lmao> In reply to @auxym "depending on your definition": I was wondering about that.
17:27:32FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4rml
17:28:23FromDiscord<Ayy Lmao> While incurring zero overhead, as if I had just written win32 on its own
17:29:45FromDiscord<Ayy Lmao> Injecting base functions is easy because I can just use templates, but injecting the fields seems harder.
17:30:13FromDiscord<cloud> In reply to @Ayy Lmao "Injecting base functions is": Inject fields mean fast ?!?
17:31:19FromDiscord<auxym> In reply to @Ayy Lmao "So what I want": I'm pretty sure you'd have to write a macro to do that. Pass in the base object typedef as an argument, introspect it with `fieldPairs`, and generate a new object typedef based on that
17:31:39FromDiscord<auxym> I mean you could try a template, but I'm not sure it'll work
17:32:15*fallback joined #nim
17:33:34FromDiscord<auxym> sent a code paste, see https://paste.rs/mLb
17:33:46FromDiscord<auxym> (edit)
17:35:54FromDiscord<Ayy Lmao> sent a code paste, see https://paste.rs/rwn
17:43:21NimEventerNew Nimble package! drawIt - Nim Terminal User Interface library for plotting graphs and drawing shapes in the terminal, uses unicode chars and colours!, see https://gitlab.com/OFThomas/drawIt
18:01:30FromDiscord<Phil> with that naming scheme I'm immediately getting flashbacks to my prior workplace with tools like "KnowIt", "ShowIt", "ReadIt" etc.
18:19:03FromDiscord<Gumbercules> It's be cool if someone made a terminal emulator similar to bearlibterminal or libctod for Nim
18:22:40FromDiscord<System64 ~ Flandre Scarlet> In reply to @treeform "Its just like using": Oh alright! I'll give it a try for my school work!
18:25:14anddamhowdy
18:29:07FromDiscord<auxym> hi
18:49:14FromDiscord<David> sent a long message, see http://ix.io/4rmK
18:52:46FromDiscord<jtv> It gets even worse if you have multiple internal packages you're building with dependencies. If you find a good solution I'd love to hear it. I essentially have a nimble dev target to automatically copy the files over.
18:53:25NimEventerNew thread by mantielero: C++ method override, see https://forum.nim-lang.org/t/10026
19:00:15FromDiscord<Gumbercules> The best way to use nimble is to not use it
19:12:45*rmnmjw quit (Quit: Leaving)
19:13:47FromDiscord<turbo> is it possible to iterate through all values of an enum
19:13:50FromDiscord<turbo> (edit) "enum" => "enum?"
19:16:17FromDiscord<demotomohiro> In reply to @turbo "is it possible to": https://nim-lang.org/docs/enumutils.html#items.i,typedesc%5BT%5D
19:18:23*rmt quit (Ping timeout: 246 seconds)
19:27:32*rockcavera quit (Ping timeout: 246 seconds)
19:28:52*jmdaemon joined #nim
19:31:45FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4rmY
19:35:44anddamhrmm I cannot tab complete several bridged nicknames
19:36:20anddamdemotomohiro: why are the `B[float].` prefixes required in the second assert?
19:36:35anddamI mean rather than just [b0, b1]
19:37:05anddamGumbercules: what's the alternative? I thought nimble was the recommended tool
19:38:06FromDiscord<Gumbercules> In reply to @anddam "<@204328759715692544>: what's the alternative?": it is, but that doesn't mean it's good at what it does... I just git submodule my dependencies which also sucks, but it's less of a headache than Nimble
19:38:17FromDiscord<Gumbercules> There are a few other package managers people have developed but I haven't used any of them
19:38:27FromDiscord<Gumbercules> nimph is one, pretty sure there is at least one other
19:41:34FromDiscord<huantian> nimph is interesting, I need to try it at some point
19:42:04FromDiscord<Phil> sent a code paste, see https://paste.rs/Uu0
19:45:48FromDiscord<demotomohiro> @anddam I don't why enum `B` has a generic parameter but it has.↔So using enum `B` requires a generic parameter like `B[float]`.
19:46:28Zevvhuantian: where did you find out about nimph. nobody knows nimph. no one uses nimph.
19:46:43FromDiscord<huantian> somewhere in this discord
19:46:51FromDiscord<huantian> maybe beef mentioned it?
19:47:02Zevvah, likely
19:47:16FromDiscord<huantian> I might have been compliaing about nimble and beef mentioned it or something
19:47:20FromDiscord<Phil> I've been here a year and it was chatted about like twice when I was around
19:47:34Zevvmy point
19:50:07FromDiscord<Gumbercules> balls
19:50:10FromDiscord<Phil> Quick read through the Readme makes it look pretty nice
19:50:19FromDiscord<Phil> But I'm expecting drawbacks
19:50:22FromDiscord<Gumbercules> uh oh, disruptek's gaining fans
19:50:30FromDiscord<Phil> And the fact I'm not seeing them there makes me suspicious
19:50:44FromDiscord<Gumbercules> you should always be suspicious of disruptek
19:50:47*rockcavera joined #nim
19:50:47*rockcavera quit (Changing host)
19:50:47*rockcavera joined #nim
19:51:14FromDiscord<Phil> Because he likes his genital naming schemes?
19:51:23FromDiscord<Gumbercules> that's one reason for sure
19:51:39FromDiscord<Gumbercules> I'm only kidding though, he's a swell guy
19:51:43FromDiscord<Phil> "Never trust somebody that releases a package called balls"
19:51:46FromDiscord<Phil> Got it
19:51:47FromDiscord<Gumbercules> can be a huge asshole, but who can't
19:52:37FromDiscord<Phil> Anyway, I am still shocked and aghast that I can't import nimscript files into a nimscript file
19:52:43FromDiscord<Phil> That is heresy and evil and I don't like it
19:53:52FromDiscord<Phil> I may even be tempted to call it mean
19:54:47FromDiscord<Gumbercules> definitely sounds limiting
19:54:50Zevvdisruptek is prolific as hell, a lot of stuff he makes is smart and useful
19:54:55Zevvit's a shame he got chased away, really
19:55:39Zevvballs, cps, nimph, all excellent stuff, but somehow people don't pick it up
19:56:39FromDiscord<Gumbercules> people were too busy getting impressed by snake in the browser and io games
19:56:47FromDiscord<Gumbercules> and web forums
19:57:00Zevvyeah i guess. he's just too smart isn't he
19:57:36FromDiscord<Gumbercules> I don't know, that whole situation was quite ridiculous
19:57:57FromDiscord<Gumbercules> and it's not like he's the only talented person that's been chased off / has run away due to said ridiculousness
19:59:05FromDiscord<Gumbercules> but the community and dev team both seem to be evolving so I guess that's a good thing? time will tell
19:59:25FromDiscord<Gumbercules> maybe some former contributors / package developers will come back into the fold
20:00:35FromDiscord<Gumbercules> and yes sometimes I think disruptek is too smart and that fact is lost on him - especially when he attempts to explain how something he's already familiar with, works
20:01:05Zevvbut it's all trivial
20:01:11Zevvhow can you not understand
20:01:15FromDiscord<Gumbercules> lol
20:01:24FromDiscord<Gumbercules> I remember when he was showing me his ebay app
20:01:54FromDiscord<Gumbercules> and I'm like dude I have no idea what the fuck this thing does
20:02:55FromDiscord<Gumbercules> he was asking for feedback on some design stuff and I was like - what exactly are you trying to build here? you should step back and figure that out first - I will never make such a suggestion to disruptek again
20:04:08Zevvi'll never talk to him at all. asshole.
20:04:16FromDiscord<Gumbercules> that's not a bad route to go either
20:04:40FromDiscord<Gumbercules> you probably wouldn't be able to make out any words anyway between the bong rips and dog barking
20:04:59FromDiscord<Gumbercules> I'm just joking - I don't think disruptek smokes a lot of pot
20:05:12FromDiscord<Gumbercules> he doesn't mess with that kiddy shit
20:05:23Zevvwe had a real nice weekend in brussels during fosdem, he's pretty cool to hang around with
20:05:28Zevvalso, he's not a smoker
20:05:31FromDiscord<Gumbercules> oh I can imagine
20:05:39FromDiscord<Gumbercules> yeah I don't know what drugs he's into
20:05:39FromDiscord<Phil> I think nimph adoption or the like mostly just shows how valuable being "official" is in terms for a project getting promotion
20:06:04FromDiscord<Gumbercules> Nimble was only "official" because at the time there was nothing else
20:06:06FromDiscord<Elegantbeef> Doesnt help that Nimble cannot build nimph
20:06:16FromDiscord<Gumbercules> and the author liked to cargo cult everything they made
20:07:19FromDiscord<Phil> One of these days I'll actually remember what the default os procs are to get a directory in a path on its own as well as the filename
20:07:56FromDiscord<Gumbercules> In reply to @Zevv "we had a real": I also wish I could attend fosdem, maybe one of these years
20:08:05FromDiscord<Gumbercules> I don't think making a baby helped my chances
20:08:49Zevvi've seen babies at fosdem
20:09:05FromDiscord<jmgomez> looks cool, did the guy left the community or what?
20:09:16Zevvhe got banned
20:09:25FromDiscord<Elegantbeef> Disruptek doesnt have the best control over his words 😄
20:09:33Zevvi forgot why. it was something silly like usual
20:09:51FromDiscord<jmgomez> ouch, hopefully nothing political
20:09:59Zevvno, we have other people for political nonsense
20:10:00FromDiscord<Elegantbeef> Called someone's code "dogshit and actively harming the community"
20:10:03FromDiscord<Gumbercules> to be fair, the person that banned him was turning this place into a marxist hellscape
20:10:14FromDiscord<Gumbercules> well the code was dogshit
20:10:22FromDiscord<Elegantbeef> The hyperbole
20:10:45FromDiscord<jmgomez> so the one who banned him, left the community?
20:10:53FromDiscord<jmgomez> like double kill?
20:11:05FromDiscord<Gumbercules> I think technically Andreas banned him
20:11:17FromDiscord<Gumbercules> but the person who wanted the ban has left
20:11:28Zevvbecause of andreas
20:11:32FromDiscord<Gumbercules> because they were the worst
20:11:35Zevvit's, like, complicated
20:11:38FromDiscord<Gumbercules> and because of Andreas
20:11:41FromDiscord<Gumbercules> and because they're a SJW
20:11:46FromDiscord<Gumbercules> but that's another tangent entirely
20:12:12FromDiscord<jmgomez> hmm I see
20:12:55FromDiscord<Gumbercules> there were a lot of issues going on in the community around that time and afterwards
20:13:11FromDiscord<Gumbercules> just people not doing the things that needed to get done and instead getting caught up in drama / politics
20:13:17Zevvyeah, those were the days. boy i miss all that
20:13:32FromDiscord<Gumbercules> was definitely 🍿 material
20:14:39FromDiscord<Elegantbeef> Anywho this conversation is one ready for a dumpster fire
20:15:25FromDiscord<Phil> Agreed
20:15:32FromDiscord<jmgomez> hmm dunno sick of polarization TBH. Didnt see any around here which I guess it's a good sign
20:15:50FromDiscord<Phil> Now on to the tragedy that is nimscript files not being able of importing other nimscript files
20:16:20FromDiscord<jmgomez> In reply to @Isofruit "Now on to the": how so? Didnt even tried yet
20:16:24FromDiscord<jmgomez> I thought that was possible
20:16:28FromDiscord<Elegantbeef> You can only import `.nim`
20:16:40FromDiscord<jmgomez> hmm well, I guess you can readFile
20:16:45FromDiscord<Elegantbeef> You might be able to do `import "mynim.nims"`
20:16:57FromDiscord<Phil> sent a code paste, see https://paste.rs/iEe
20:17:35FromDiscord<Phil> Insert image of facepalm
20:17:40FromDiscord<Phil> In reply to @Elegantbeef "You might be able": Because that did it
20:17:45FromDiscord<jmgomez> I see, cant you compound them as workaround?
20:17:56FromDiscord<jmgomez> ohh nice
20:17:59FromDiscord<Elegantbeef> The issue is the extension 😄
20:18:17FromDiscord<jmgomez> lol, that should be an easy PR Phil.. 😛
20:20:07FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4rna
20:20:22FromDiscord<Elegantbeef> `.(test, nims)`
20:20:32FromDiscord<Elegantbeef> Nim's import does not use the dot expr
20:20:50FromDiscord<Phil> Going the string way did it again
20:21:04FromDiscord<Elegantbeef> Of course
20:21:54FromDiscord<Elegantbeef> `.nims` can import `.nim`
20:24:58FromDiscord<Elegantbeef> I do not even think there is a PR here
20:25:13FromDiscord<Elegantbeef> Say you have a standalone file with a nimscript file for it's config
20:25:32FromDiscord<Elegantbeef> you're inside nimscript and attempt to `import mylibrary` which should it pull in
20:26:03FromDiscord<Elegantbeef> `.nim` then fallback to `.nims` perhaps might make sense
20:28:33FromDiscord<Phil> Can you just write a file and have the os create all directories for you if any in the path are missing?
20:29:25FromDiscord<Elegantbeef> I think you need to do it recursively
20:34:10FromDiscord<Phil> No lazy way for me 😱
20:37:01*fallback quit (Read error: Connection reset by peer)
20:44:28FromDiscord<auxym> `mkdir -p` ?
20:48:56*fallback joined #nim
20:54:41FromDiscord<planetis> you can definitely include though like this: include "x.nims"
20:55:21FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4rnh
20:55:55FromDiscord<Elegantbeef> planetis we already went over that
20:56:32FromDiscord<planetis> ah shoot
20:57:07FromDiscord<Elegantbeef> What are you statically linking vs. dynamically linking?
20:57:34FromDiscord<4zv4l> In reply to @Elegantbeef "What are you statically": a simple nim discord bot
20:57:48FromDiscord<4zv4l> that's weird because when I cross compiled it to my raspberry pi
20:57:53FromDiscord<4zv4l> I didn't get any lib issue
21:01:26FromDiscord<4zv4l> I also tried to statically link with musl but I also get an error
21:01:41*FromDiscord quit (Remote host closed the connection)
21:01:54*FromDiscord joined #nim
21:02:10FromDiscord<Elegantbeef> If so you need to compile with an older version of glibc
21:02:12FromDiscord<4zv4l> I send it over ssh to my server
21:02:14FromDiscord<4zv4l> In reply to @Elegantbeef "If so you need": how do I do that ?
21:02:14FromDiscord<4zv4l> do I need to install it or I can add a flag to specify it ?
21:03:18FromDiscord<Elegantbeef> I think the solution is generally visualise an older environment and compile there
21:04:15FromDiscord<4zv4l> I think I'm just gonna download nim on my server↔quicker to do I think xD↔I don't get why it doesn't work when it's statically linked tho
21:04:24FromDiscord<4zv4l> In reply to @4zv4l "when I link statically": why ↔`zb: dl-call-libc-early-init.c:37: _dl_call_libc_early_init: Assertion `sym != NULL' failed.`
21:06:22FromDiscord<Elegantbeef> Not a clue
21:07:02FromDiscord<Elegantbeef> What are your C compiler flags
21:07:28FromDiscord<4zv4l> where can I see that ?
21:07:38FromDiscord<Elegantbeef> Well how are you attempting to statically link
21:08:32FromDiscord<4zv4l> I compile using:
21:08:33FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4rnk
21:08:42FromDiscord<4zv4l> `nim c --d:release --d:ssl --opt:size --d:strip --passL:-static --d:static zb.nim`
21:08:53FromDiscord<4zv4l> idk if the `--d:static` is overkill or not or if it even exists
21:09:02FromDiscord<Elegantbeef> It doesnt exist
21:10:51*advesperacit quit (Ping timeout: 260 seconds)
21:11:13FromDiscord<4zv4l> alright, well those two functions are giving trouble xD↔I compiled it directly on the server to bypass that issue
21:11:47*advesperacit joined #nim
21:12:54FromDiscord<Elegantbeef> Best to dynamically link on a virtualised environment
21:12:54FromDiscord<Elegantbeef> Yea that's now how you static link anything really
21:12:56FromDiscord<Elegantbeef> Or just compile on your server
21:13:28FromDiscord<Elegantbeef> > warning\: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
21:13:46FromDiscord<Elegantbeef> That means something you relied upon uses dlopen and you need to also statically link that
21:14:20FromDiscord<Elegantbeef> When it comes to static binaries it's a path of static linking everything
21:15:10FromDiscord<4zv4l> the only external library I use is `dimscord`
21:15:15FromDiscord<4zv4l> but yeah it's ok
21:15:16FromDiscord<caravaggio> am i the only one that finds nim exercism challenges bad?
21:15:25FromDiscord<Elegantbeef> `-d:ssl` says otherwise
21:15:55FromDiscord<Elegantbeef> I think they can be bad depending if you solve them idiomatically
21:24:42FromDiscord<4zv4l> In reply to @Elegantbeef "`-d:ssl` says otherwise": yeah right I didn't see it that way xD
21:34:37FromDiscord<Dudugz> I made a simple file to compile and test my binaries :v so i just ``debug run`` or ``debug build`` or ``debug`` for both. More practical than going to each one's directory, compiling with ``-d:ssl`` and then going back to the binaries directory and running each one
21:37:25*junaid_ quit (Remote host closed the connection)
21:40:03*fallback quit (Read error: Connection reset by peer)
21:42:13*FromDiscord quit (Remote host closed the connection)
21:42:26*FromDiscord joined #nim
21:49:07*fallback joined #nim
21:58:07FromDiscord<Gumbercules> In reply to @caravaggio "am i the only": bad in what way?
22:03:51FromDiscord<caravaggio> In reply to @Gumbercules "bad in what way?": I've done quite a few exercism stuff, for some reasons the nim ones don't have instructions
22:04:21FromDiscord<caravaggio> I like playing on exercism when am on a pc without a compiler and just turned off the nim track
22:04:23*azimut quit (Ping timeout: 255 seconds)
22:04:29FromDiscord<caravaggio> Most have step by step instructions
22:05:09FromDiscord<caravaggio> The nim ones I did. Felt like vague hints on what I needed to do
22:05:12FromDiscord<Elegantbeef> What's the fun in that
22:09:12FromDiscord<caravaggio> I guess I was just looking for structure
22:09:44FromDiscord<caravaggio> I dont want the answers handed to me ofc no learning in that
22:10:09FromDiscord<caravaggio> But small step by step hints that lead in the right direction would be useful, no?
22:12:34*advesperacit quit ()
22:27:28FromDiscord<Raynei486> If there was a function in `sdl2/image.nim` that is not exported in `sdl2.nim`, how do I access it? https://media.discordapp.net/attachments/371759389889003532/1087502698141728788/image.png
22:28:00FromDiscord<Elegantbeef> `import std2/image`
22:28:02FromDiscord<Raynei486> I tried importing `sdl2/image` but it still can't find the proc
22:28:17FromDiscord<Elegantbeef> Is the proc exported in image?
22:28:48FromDiscord<Raynei486> sent a code paste, see https://paste.rs/JSV
22:29:14FromDiscord<Elegantbeef> Then it should be accesible when you do `import std2/image`
22:31:19FromDiscord<Raynei486> okay it somehow magically resolved itself when I aliased it as `import sdl2/image as image`
22:31:29FromDiscord<Raynei486> I guess it didn't know what I was referring to
22:32:42FromDiscord<geekrelief> In reply to @caravaggio "I guess I was": I used exercism to start learning Nim. It got my feet wet and see alternate implementations was educational. Beyond that, I think you'll learn more finding a goal and hacking towards it while reading the manual and api docs.
22:42:46*Notxor quit (Remote host closed the connection)
22:51:14FromDiscord<Nilts> Anyone have a way to pretty print tree-like objects?
23:22:13FromDiscord<Nilts> nvm i found treeform/print
23:43:28FromDiscord<treeform> It's me
23:45:25FromDiscord<Elegantbeef> No it's "it'sa me"
23:46:13Amun-Ra
Mario
23:51:14anddamah jeez, I am now in lua-hell
23:51:28FromDiscord<Elegantbeef> Jump before it's too late
23:52:10anddamit's already too late
23:52:12anddamhttps://termbin.com/2r9d
23:52:31anddamin fact I am going to sleep, thought I could just update cimgui then nimgl/imgui in turn
23:52:42FromDiscord<Elegantbeef> Just join the wasm scripting evangelism
23:52:50anddambtw why is there even a "thin C wrapper" on top of Dear Imgui is that is C++
23:52:52anddamC++
23:53:11anddamx/is that/ c/if that is/
23:53:18FromDiscord<Elegantbeef> Are you asking "why does cimgui" exist?
23:53:21anddamyes
23:53:41anddamis that because C is the lingua franca of programming?
23:53:48FromDiscord<Elegantbeef> Cause if you want to use dear imgui from another language it's much better to have a system library then attempt to bind to C++
23:54:06FromDiscord<Elegantbeef> To use dear-imgui you need to support compiling C++
23:54:17FromDiscord<Elegantbeef> to use cimgui since it's a system library you need `dlOpen` or similar
23:54:42anddamwhat's a "system" library, exactly?
23:54:58FromDiscord<Hourglass [She/Her]> In reply to @Elegantbeef "Then it should be": Std2?
23:55:50FromDiscord<Hourglass [She/Her]> In reply to @Elegantbeef "Just join the wasm": Yes
23:56:00FromDiscord<Hourglass [She/Her]> Still need to work on that mod....
23:57:25FromDiscord<Elegantbeef> The thing with using source libraries is you can only use what symbols are compiled, if no one marked the procedures as `extern` it will not persist past compilation
23:57:32FromDiscord<Elegantbeef> Dead code elimination is wonderful
23:59:09FromDiscord<Elegantbeef> Like `proc doThing = discard` is removed if not called in Nim, but if you do `proc doThing {.extern: "doThing".} = discard` it's compiled in