<< 09-02-2025 >>

00:52:58FromDiscord<fl4shk> first PipelineC code emitted by my translator
00:53:00FromDiscord<fl4shk> https://media.discordapp.net/attachments/371759389889003532/1337949336914493531/image.png?ex=67a94deb&is=67a7fc6b&hm=d9ce0e1ba8889934f0c47d2356ec9f321af7b3dffad89399c5279619093606f2&
00:53:07FromDiscord<fl4shk> still need to emit some other stuff
00:58:43*def- quit (Ping timeout: 265 seconds)
00:58:54*def- joined #nim
01:01:04*GnuYawk673 joined #nim
01:03:04*GnuYawk67 quit (Ping timeout: 265 seconds)
01:03:04*GnuYawk673 is now known as GnuYawk67
01:37:51*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
02:35:43FromDiscord<fl4shk> is it possible to overload an operator in a Nim `macro`?
02:36:09FromDiscord<fl4shk> if not, that should still be okay
03:33:07FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=raTsGuVG
03:33:21FromDiscord<fl4shk> ah
03:33:28FromDiscord<fl4shk> thanks
04:18:17FromDiscord<yummy_licorice> does importc work with the cpp backend?
04:18:48FromDiscord<yummy_licorice> like does it automatically put it into an extern c block
04:51:34*encyde joined #nim
05:00:24FromDiscord<lainlaylie> importc is text substitution
05:00:32FromDiscord<lainlaylie> best way is to try it and see for yourself what's generated
07:08:00*GnuYawk67 quit (Quit: The Lounge - https://thelounge.chat)
07:08:22*GnuYawk673 joined #nim
07:18:14*GnuYawk673 quit (Quit: The Lounge - https://thelounge.chat)
07:19:04*GnuYawk673 joined #nim
08:16:23*kenran joined #nim
08:47:34*ntat joined #nim
08:48:16*coldfeet joined #nim
08:48:42*kenran quit (Ping timeout: 268 seconds)
09:24:19*kenran joined #nim
09:38:06FromDiscord<glisteringlime> hello people
09:38:07FromDiscord<glisteringlime> so uhh
09:38:30FromDiscord<glisteringlime> I have arrived here to express my complete and utter frustration with learning nim, so bear with me
09:38:31FromDiscord<glisteringlime> now
09:38:32FromDiscord<glisteringlime> WHY
09:38:36FromDiscord<glisteringlime> IN THE EVERLIVING HELL
09:39:06FromDiscord<glisteringlime> sent a code paste, see https://play.nim-lang.org/#pasty=gKAyZbtZ
09:39:13FromDiscord<glisteringlime> WHO THINKS THIS IS A GENUINELY GOOD IDEA
09:39:15FromDiscord<glisteringlime> H O W
09:39:49FromDiscord<glisteringlime> JUST USE A CURLY BRACE SCOPE
09:39:52FromDiscord<fabric.input_output> pythonic pascal
09:39:53FromDiscord<glisteringlime> IT'S LIKE 100X BETTER
09:39:55FromDiscord<fabric.input_output> skill issue
09:40:08FromDiscord<glisteringlime> In reply to @fabric.input_output "skill issue": it's not a skill issue, it effectively ruins the language for me
09:40:15FromDiscord<glisteringlime> I hate tab sensitive langs, because no editor ever handles them correctly
09:40:30FromDiscord<fabric.input_output> maybe you're ruining yourself for the language with your prefs
09:40:39FromDiscord<Zoom> PEBKAC
09:41:05FromDiscord<glisteringlime> In reply to @Zoom "PEBKAC": nah I'm pretty sure this is a language problem
09:41:31FromDiscord<glisteringlime> In reply to @fabric.input_output "maybe you're ruining yourself": there isn't even a `pass` keyword to make it bearable
09:42:22FromDiscord<fabric.input_output> it's called `discard`
09:42:25FromDiscord<fabric.input_output> rtfm
09:42:31FromDiscord<Zoom> Good for you. Adapt or use Go.↵(@glisteringlime)
09:42:41FromDiscord<glisteringlime> In reply to @Zoom "Good for you. Adapt": I already use go
09:43:33FromDiscord<glisteringlime> and other langs like rust, c++, c, js/ts, java, c#, etc.
09:44:25FromDiscord<glisteringlime> In reply to @fabric.input_output "it's called `discard`": no editor ever handles it correctly
09:44:40FromDiscord<fabric.input_output> handles how
09:44:56FromDiscord<glisteringlime> by going out of the scope? how else is it supposed to handle it
09:45:13FromDiscord<fabric.input_output> dedent you mean?
09:45:33FromDiscord<Zoom> Wow!↵(@glisteringlime)
09:47:03FromDiscord<fabric.input_output> I'm still not sure what goes out of scope means
09:47:14FromDiscord<fabric.input_output> what's the editor supposed to do
09:47:17FromDiscord<glisteringlime> In reply to @fabric.input_output "I'm still not sure": average high-level language developer
09:47:30FromDiscord<odexine> what
09:47:34FromDiscord<fabric.input_output> man you're talking in riddles
09:47:38FromDiscord<odexine> can we not argue about syntax for the five billionth time
09:48:10FromDiscord<glisteringlime> sent a code paste, see https://play.nim-lang.org/#pasty=SCCYyefp
09:48:13FromDiscord<odexine> ok
09:48:28FromDiscord<glisteringlime> however, because nim is an indent-sensitive language, editors basically never handle the indents correctly
09:48:39FromDiscord<odexine> what
09:48:44FromDiscord<fabric.input_output> idk mine handles them for me alright
09:49:53FromDiscord<fabric.input_output> is this an editor issue?
09:50:05FromDiscord<odexine> i dont even know what you're talking about
09:50:19FromDiscord<solitudesf> In reply to @glisteringlime "nah I'm pretty sure": bait used to be believable
09:50:24FromDiscord<odexine> are you complaining about how formatting doesnt always get indents right
09:51:21FromDiscord<odexine> i think i'll just leave you be, you have fun blowing up about the syntax of a language that you decided to try out
09:51:52FromDiscord<glisteringlime> have any of you used languages with curly bracket scopes? those include C++, C, JS, Java, C#, Kotlin, Rust, and a lot more
09:52:07FromDiscord<fabric.input_output> we all use multiple languages
09:52:17FromDiscord<solitudesf> In reply to @glisteringlime "have any of you": have you used anything? you sound like a ragebaiting tourist.
09:52:31FromDiscord<odexine> In reply to @solitudesf "have you used anything?": they said so above
09:52:39FromDiscord<fabric.input_output> we don't whine about another one we're trying by our own will like you
09:53:01FromDiscord<odexine> In reply to @fabric.input_output "we don't whine about": that sentence took a few reads to understand
09:53:22FromDiscord<fabric.input_output> indentation is the problem surely
09:53:26FromDiscord<fabric.input_output> more scopes
09:54:56FromDiscord<fabric.input_output> man explain yourself in one cohesive message
09:54:57FromDiscord<glisteringlime> In reply to @solitudesf "have you used anything?": yup, I have↵indentation sensitivity was one of the most annoying things about python for me, but at least editors handle `pass` correctly
09:55:12FromDiscord<fabric.input_output> what is your issue
09:55:49FromDiscord<odexine> we still have no damn clue about the issue you have with `discard`
09:55:56FromDiscord<glisteringlime> i'm about to literally record a video, I just have to update the flatpak package for it
09:56:02FromDiscord<odexine> okay
09:56:14FromDiscord<solitudesf> In reply to @glisteringlime "yup, I have indentation": don't use nim then. plenty of languages that fit your preference. no need to pollute this chat with low effort garbage.
09:56:24FromDiscord<fabric.input_output> In reply to @glisteringlime "i'm about to literally": should've done that from the start
09:56:36FromDiscord<odexine> we'll wait with ba(i)ted breath then
09:56:55FromDiscord<fabric.input_output> patrick baitman
09:56:55FromDiscord<glisteringlime> In reply to @fabric.input_output "should've done that from": I haven't done that because I can't, as I recently updated my system, and the depends on flatpak need to be updated as well, which I forgot to do
09:57:07FromDiscord<fabric.input_output> not our issue
09:57:16FromDiscord<glisteringlime> https://media.discordapp.net/attachments/371759389889003532/1338086306516959242/image.png?ex=67a9cd7b&is=67a87bfb&hm=1891853fea83dee8dbf245f1c015b7a6566a7ea7042d3803943bee2bb9595f6e&
09:57:32FromDiscord<glisteringlime> not a bait
09:58:01FromDiscord<fabric.input_output> we don't care about that, just explain your nim problems or just general talk about nim
09:58:12FromDiscord<glisteringlime> In reply to @fabric.input_output "we don't care about": i literally did
09:58:15FromDiscord<odexine> ngl this is just giving me flashbacks of that greentext with the linux user in the art class using gimp
09:58:20FromDiscord<fabric.input_output> you didn't
09:58:33FromDiscord<fabric.input_output> you posted some half cooked messages
09:59:23FromDiscord<fabric.input_output> first indentation, then no `pass` and then scopes
09:59:49FromDiscord<glisteringlime> indentation does not get handled correctly on editors when using vim↵↵By "not correctly", I mean there's no way to exit the scope you're in, even `discard` does not work. You have to literally press shift+tab or erase the indentation to go back to the previous scope (or global scope).
09:59:59FromDiscord<odexine> what
10:00:00FromDiscord<odexine> yes
10:00:03FromDiscord<odexine> thats how indentation works
10:00:17FromDiscord<odexine> what did you expect it to do
10:01:13FromDiscord<glisteringlime> In reply to @odexine "thats how indentation works": that's generally not how it's supposed to work
10:01:38FromDiscord<fabric.input_output> it is, your vim isn't configured properly
10:01:39FromDiscord<odexine> oh no i see what you mean now
10:02:01FromDiscord<fabric.input_output> doesn't auto dedent
10:02:06FromDiscord<fabric.input_output> is what I see
10:02:09FromDiscord<odexine> yes
10:02:10FromDiscord<odexine> same
10:02:16FromDiscord<glisteringlime> https://media.discordapp.net/attachments/371759389889003532/1338087562056826910/Video_2025-02-09_12-01-20.mp4?ex=67a9cea7&is=67a87d27&hm=a71bacd0115d4ad1f59f5bb71bb52a517f02e58912b6f111df7c92b5235a05aa&
10:02:17FromDiscord<nnsee> In reply to @glisteringlime "it's not a skill": feel free to not use nim if it's not to your tastes
10:02:22FromDiscord<odexine> well i'm used to editing with unconfigured vim so
10:03:22FromDiscord<fabric.input_output> talks about vim and shows vscode or whatever that is
10:03:26FromDiscord<odexine> zed
10:03:38FromDiscord<glisteringlime> it's zed
10:03:41FromDiscord<odexine> how is this a language issue
10:03:47FromDiscord<odexine> at most this is an extension issue
10:03:53FromDiscord<fabric.input_output> tooling yeah
10:04:38FromDiscord<nnsee> even then i don't see how pressing ctrl-backspace or Home is any more difficult than pressing }
10:04:48FromDiscord<glisteringlime> In reply to @odexine "how is this a": tabulation sensitivity has literally nearly always been proven to be inconvenient
10:05:06FromDiscord<glisteringlime> In reply to @nnsee "even then i don't": also in the video, i'm deleting the tabulation, but it goes right back
10:05:14FromDiscord<odexine> In reply to @glisteringlime "tabulation sensitivity has literally": okay, if we're going to argue seriously, then let's see your evidence for this
10:05:15FromDiscord<glisteringlime> (edit) "In reply to @nnsee "even then i don't": also in the video, i'm deleting the tabulation, but it goes right back ... " added "when I press enter"
10:05:24FromDiscord<nnsee> In reply to @glisteringlime "tabulation sensitivity has literally": proven by whom?
10:05:43FromDiscord<odexine> In reply to @nnsee "even then i don't": is it even control backspace and not just backspace
10:05:58FromDiscord<nnsee> idk whatever editor he's using looks half baked
10:06:02FromDiscord<glisteringlime> In reply to @nnsee "proven by whom?": many, many studies
10:06:08FromDiscord<odexine> In reply to @glisteringlime "many, many studies": cite them.
10:06:17FromDiscord<nnsee> In reply to @glisteringlime "many, many studies": link to one (1)
10:06:20FromDiscord<fabric.input_output> In reply to @glisteringlime "many, many studies": are these many studies in the room with us?
10:18:17FromDiscord<odexine> In reply to @glisteringlime "also in the video,": i do agree this is a tooling issue and prolly should be fixed
10:40:08FromDiscord<glisteringlime> sent a long message, see https://pasty.ee/kvJDdaBV
10:41:17FromDiscord<nnsee> In reply to @glisteringlime "I can't find the": you posted opinions, not studies
10:41:26FromDiscord<glisteringlime> In reply to @nnsee "you posted opinions, not": have you read what I said
10:41:29FromDiscord<nnsee> I'm still waiting for one of the "many, many studies"
10:41:46FromDiscord<glisteringlime> In reply to @nnsee "I'm still waiting for": I've been trying to find them again, but I know they're on ACM
10:41:52FromDiscord<glisteringlime> I don't remember what keywords I used
10:42:10FromDiscord<nnsee> well if there are so many of them they should be relatively easy to find
10:42:25FromDiscord<glisteringlime> research papers on anything are literally never easy to find lol
10:42:33FromDiscord<odexine> well you said there were many
10:42:46FromDiscord<glisteringlime> just because there is many of something doesn't mean they're easy to find
10:43:02FromDiscord<glisteringlime> the fact that you're saying this is just more proof you've never actually looked for research papers
10:43:03FromDiscord<nnsee> have you considered that these studies are hard to find because they don't exist
10:43:18FromDiscord<nnsee> In reply to @glisteringlime "the fact that you're": :')
10:43:36FromDiscord<odexine> i am just about to enter my masters, what
10:43:38FromDiscord<nnsee> many of us here are academics ourselves
10:43:49FromDiscord<glisteringlime> do you know what ACM is?
10:43:53FromDiscord<odexine> it is difficult to find a very specific topic
10:43:58FromDiscord<odexine> this is not a very specific topic
10:44:27FromDiscord<glisteringlime> In reply to @odexine "this is not a": some people use whitespace-insensitivity, some people use insensitive tabulation or some other stupid keywords
10:44:31FromDiscord<glisteringlime> that's why it's pain to find
10:44:46FromDiscord<odexine> this is the closest thing i could find that would prolly fit your conditions, but this is an opinion piece
10:44:47FromDiscord<odexine> https://queue.acm.org/detail.cfm?id=3412568
10:44:47FromDiscord<glisteringlime> I have found some but I don't have my students account so I can't just get you the studies
10:45:38FromDiscord<nnsee> "no i swear these studies on a highly opinionated topic that happen to reinforce my opinion exist but i just can't find them"
10:45:41FromDiscord<nnsee> alright mate
10:46:00FromDiscord<bendugo> In reply to @glisteringlime "": is that zig?
10:46:12FromDiscord<glisteringlime> In reply to @bendugo "is that zig?": what
10:46:14FromDiscord<odexine> zig is ap rogramming language
10:46:18FromDiscord<bendugo> (edit) "zig?" => "zigd"
10:46:22FromDiscord<bendugo> (edit) "zigd" => "zid"
10:46:22FromDiscord<odexine> what
10:46:24FromDiscord<odexine> what
10:46:26FromDiscord<odexine> zed
10:46:26FromDiscord<nnsee> zed
10:46:27FromDiscord<bendugo> (edit) "zid" => "zed"
10:46:29FromDiscord<nnsee> it's zed
10:46:30FromDiscord<odexine> youre looking for ze
10:46:31FromDiscord<odexine> (edit) "ze" => "zed"
10:46:32FromDiscord<glisteringlime> it's zed
10:46:34FromDiscord<glisteringlime> yes
10:46:46FromDiscord<bendugo> shi it's changed a lot since it launched
10:47:03FromDiscord<nnsee> it's the average redditor zoomer setup, arch + kde + zed
10:47:04FromDiscord<glisteringlime> In reply to @bendugo "shi it's changed a": my version is heavily themed
10:47:05FromDiscord<SmaamX> sent a long message, see https://pasty.ee/inbnjnUM
10:47:31FromDiscord<bendugo> In reply to @glisteringlime "my version is heavily": ah ok
10:47:59FromDiscord<odexine> In reply to @SmaamX "Any ideas for make": thats a lot of slapped on options]
10:48:04FromDiscord<glisteringlime> In reply to @nnsee "it's the average redditor": eh not really↵↵only reason I use these tools is because they're significantly more convenient than windows
10:48:11FromDiscord<glisteringlime> funnily enough I used to absolutely despise linux
10:48:12FromDiscord<odexine> In reply to @SmaamX "Any ideas for make": what are your size goals?
10:48:15FromDiscord<glisteringlime> now I daily-drive it
10:48:55FromDiscord<nnsee> In reply to @glisteringlime "eh not really ": both this and what i said can be true
10:48:59FromDiscord<glisteringlime> In reply to @glisteringlime "eh not really ": and I mean mostly convenient because programming environments are much easier to maintain and set up
10:49:28FromDiscord<odexine> In reply to @nnsee "it's the average redditor": hey now kde doesnt deserve this
10:50:36FromDiscord<glisteringlime> nvidia support still obviously kinda sucks on linux, but it's like so much better than it was like 2-3 years ago
10:50:36FromDiscord<SmaamX> better optimization for my custom sys modules↵(@odexine)
10:51:03FromDiscord<glisteringlime> it works nearly flawlessly now
10:51:04FromDiscord<odexine> In reply to @SmaamX "better optimization for my": is the current results you're getting still too large?
10:51:07FromDiscord<nnsee> In reply to @odexine "hey now kde doesnt": i like kde :p i'm just stating the facts
10:51:25FromDiscord<glisteringlime> and on wayland, which was notorious for literally never working properly around a year to 2 years ago
10:51:45FromDiscord<glisteringlime> (edit) "and on wayland, which was notorious for literally never working properly ... around" added "with nvidia"
10:51:45FromDiscord<SmaamX> No but i have OCD↵(@odexine)
10:52:17FromDiscord<glisteringlime> one of the most annoying issues with wayland was probably the weird frame duplication it used to have
10:52:19FromDiscord<SmaamX> No but i have OCD for better
10:52:31FromDiscord<odexine> In reply to @SmaamX "No but i have": id say that any more optimisation (and id say you already have a tonne) would just add complexity
10:53:15FromDiscord<odexine> In reply to @glisteringlime "and on wayland, which": surprised it does now
10:53:19FromDiscord<SmaamX> Yeah ik (im going to make it nostdlib, nomain too)↵(@odexine)
10:53:20FromDiscord<odexine> never did for me
10:53:49FromDiscord<glisteringlime> that said, I did have to do some manual configuration to get my install working at first with wayland properly
10:54:03FromDiscord<glisteringlime> but other than that, it's extremely usable now
10:54:06FromDiscord<glisteringlime> way more usable than it used to be
10:57:06FromDiscord<glisteringlime> the official nim extension for vscode doesn't work properly either
10:57:11FromDiscord<odexine> ah yeah
10:57:24FromDiscord<odexine> the vscode nim extension story is kind of a mess
10:57:40FromDiscord<odexine> people coming and going and then the fork of the fork of the fork of the official dies, etc
10:58:02FromDiscord<odexine> like idk what the current nim extension is
10:58:11FromDiscord<odexine> like idk which is the recommended one now
10:58:17FromDiscord<glisteringlime> this one https://media.discordapp.net/attachments/371759389889003532/1338101658776764447/image.png?ex=67a9dbc8&is=67a88a48&hm=ce7632250d3ba602221517b09ba4232c996e56e22b4379df6aaf9e35bed51038&
10:58:25FromDiscord<glisteringlime> that's the official one
10:58:59FromDiscord<odexine> seems so yes
10:59:09FromDiscord<odexine> what issue are you experiencing?
10:59:48FromDiscord<glisteringlime> now tabulation is not working completely correctly, but it's still better than the zed extension
11:00:03FromDiscord<glisteringlime> because it doesn't automatically indent when you press enter on the equals sign
11:00:09FromDiscord<glisteringlime> but you can exit it
11:00:13FromDiscord<glisteringlime> so it's effectively the inverse
11:00:30FromDiscord<glisteringlime> it still doesn't auto exit on discard though
11:00:36FromDiscord<glisteringlime> but you can delete the tabulation
11:02:01FromDiscord<glisteringlime> there's barely ever an editor that handles tabulation correctly
11:02:08*ntat quit (Quit: Leaving)
11:02:17FromDiscord<glisteringlime> there is always supposed to be a keyword which explicitely ends the scope
11:02:26FromDiscord<glisteringlime> if a language doesn't have one, it's not good
11:02:35FromDiscord<glisteringlime> it can be optional, but it's really convenient
11:02:39FromDiscord<odexine> thats like, your opinion,
11:02:52FromDiscord<glisteringlime> not just mine either
11:03:18FromDiscord<odexine> i mean sure
11:03:19FromDiscord<glisteringlime> and either way, apparently nim already has `discard`
11:03:27FromDiscord<glisteringlime> the problem is that it still doesn't work correctly
11:03:35FromDiscord<glisteringlime> the way that keywords like that are supposed to work in editors
11:03:43FromDiscord<glisteringlime> it works correctly with python, it used to not work, but now it does
11:03:53FromDiscord<odexine> ill leave you be at this point
11:06:34FromDiscord<glisteringlime> it's just, the language is trying to be different for the sake of being different
11:09:02FromDiscord<glisteringlime> I believe I have found a way to make it work, and that's avoiding using the global scope
11:21:47FromDiscord<solitudesf> In reply to @glisteringlime "it's just, the language": this is so ignorant, its borderline offensive
11:32:43FromDiscord<fabric.input_output> bait or mental retardation call it
11:35:32*alexdaguy joined #nim
11:42:14Amun-Rahas he never seen Python? must be a poe for sure
11:53:25FromDiscord<summarity> In NimYAML, how can I set a different name for loaded (not serialized) fields? E.g. YAML has a field `template`, and I want to load it into a field `templ` inside of a Nim object. The annotations docs don't have an entry for naming.
12:04:24*end quit (Quit: end)
12:04:24*bcksl quit (Quit: \)
12:08:55FromDiscord<System64 ~ Flandre Scarlet> Is it possible to compile Nim code quickly?
12:13:55*alexdaguy quit (Quit: w)
12:22:23*bcksl joined #nim
12:32:42*end joined #nim
12:41:21*coldfeet quit (Quit: leaving)
12:45:59FromDiscord<flyx> that's currently not implemented. you can write a custom constructor for the object type but you'd need to replicate the standard logic for the other fields. if you're not aware, you can name the field like this\: ` `template`: string`↵(@summarity)
12:46:47FromDiscord<summarity> Ah, that's unfortunate. Thanks for the answer anyway. 🙂
12:47:40FromDiscord<flyx> yours is the second requests in recent weeks, I might come around and implement it. feel free to open an issue
12:49:33*kenran quit (Remote host closed the connection)
12:52:41FromDiscord<summarity> In reply to @flyx "yours is the second": Done
12:53:21*coldfeet joined #nim
12:54:33*coldfeet quit (Client Quit)
13:10:32*m5zs7k quit (Ping timeout: 252 seconds)
13:17:52*coldfeet joined #nim
13:30:39*coldfeet quit (Quit: leaving)
13:32:06*m5zs7k joined #nim
13:39:32*coldfeet joined #nim
13:44:20*coldfeet quit (Quit: leaving)
13:50:14*coldfeet joined #nim
14:08:07*encyde quit (Ping timeout: 268 seconds)
14:08:56*tiorock joined #nim
14:08:56*rockcavera quit (Killed (lead.libera.chat (Nickname regained by services)))
14:08:56*tiorock is now known as rockcavera
14:11:02*tiorock joined #nim
14:11:02*rockcavera is now known as Guest3045
14:11:02*tiorock is now known as rockcavera
14:12:02*rockcavera quit (Remote host closed the connection)
14:14:17*Guest3045 quit (Ping timeout: 265 seconds)
14:15:04*rockcavera joined #nim
14:16:29*tiorock joined #nim
14:16:29*rockcavera quit (Killed (lead.libera.chat (Nickname regained by services)))
14:16:29*tiorock is now known as rockcavera
14:42:20FromDiscord<janakali> In reply to @sys64 "Is it possible to": [tcc](https://bellard.org/tcc/) compiler is very quick, but it doesn't optimize code much
14:42:41FromDiscord<janakali> also it'
14:43:19FromDiscord<janakali> (edit) "it'" => "it's not officially supported by nim, but mostly works in practice"
15:19:16FromDiscord<fl4shk> how can I expand a `macro` given I have it as a `NimNode`?
15:19:19FromDiscord<jabuci> Hello! Which VS Code extension do you suggest? I found 3 different for Nim.
15:27:40FromDiscord<solitudesf> In reply to @fl4shk "how can I expand": does this work? https://nim-lang.org/docs/macros.html#getAst%2Cuntyped
15:28:09FromDiscord<fl4shk> In reply to @solitudesf "does this work? https://nim-lang.org/docs/macros.ht": hey thanks for your quick response. Let me try it.
15:30:10FromDiscord<fl4shk> how can I check whether an `nnkCall` is for a `macro` or a `proc`/`func`?
15:30:14FromDiscord<fl4shk> wait a minute
15:30:16FromDiscord<fl4shk> I have that...
15:31:33FromDiscord<fl4shk> well, wait, only kind of...
15:32:27FromDiscord<solitudesf> are you sure than you need to do this manually?
15:32:35FromDiscord<fl4shk> ...it looks like it?
15:32:46FromDiscord<fl4shk> since the `nnkCall` got passed to my code
15:33:14FromDiscord<summarity> In reply to @jabuci "Hello! Which VS Code": The verified one from https://marketplace.visualstudio.com/items?itemName=NimLang.nimlang
15:33:16FromDiscord<fl4shk> and `nnkCall` is used for both `proc`/`func` and `macro` cals
15:33:23FromDiscord<fl4shk> I'd rather not do this manually
15:34:30FromDiscord<solitudesf> really hard to judge without any context here.
15:35:16FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=hIvStXIc
15:35:28FromDiscord<fl4shk> (edit) "https://play.nim-lang.org/#pasty=UzEfTbzT" => "https://play.nim-lang.org/#pasty=GllLzGCE"
15:35:29FromDiscord<fl4shk> this is the context
15:35:50FromDiscord<fl4shk> ...I didn't want to use generics here since it'd make the conversion to PipelineC more difficult to implement
15:35:56FromDiscord<fl4shk> generics are what I'd prefer in an ideal situation
15:36:52FromDiscord<solitudesf> i dont see where is expanding macros manually comes into play here, i dont see you even traversing the ast
15:36:55FromDiscord<fl4shk> generics don't, however, exist in PipelineC, so I'd have to do a translation like this to PipelineC anyway
15:36:57FromDiscord<fl4shk> oh
15:37:06FromDiscord<fl4shk> I am traversing the SAT
15:37:08FromDiscord<fl4shk> (edit) "SAT" => "AST"
15:37:12FromDiscord<fl4shk> just not in this code
15:37:29FromDiscord<fl4shk> the problem here is `Vec3(int)` being used
15:37:45FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=jbvVuEIw
15:38:02FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=lfPEjEuD
15:38:24FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=jDcUbxyu
15:38:25FromDiscord<fl4shk> like this
15:38:47FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=ntAVqXHJ
15:39:07FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=iCkxqodN
15:39:33FromDiscord<fl4shk> (edit) "https://play.nim-lang.org/#pasty=jDdcTECn" => "https://play.nim-lang.org/#pasty=IqNphQXm"
15:39:48FromDiscord<fl4shk> (edit) "https://play.nim-lang.org/#pasty=fhocpDPF" => "https://play.nim-lang.org/#pasty=SooGpequ"
15:39:55*ntat joined #nim
15:40:11FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=ryuRXDje
15:40:19FromDiscord<fl4shk> here's more context ^
15:40:56FromDiscord<solitudesf> is there an issue with passing macros as is and letting them expand later?
15:41:12FromDiscord<fl4shk> my implementation apparently doesn't let that happen
15:41:15FromDiscord<fl4shk> (edit) "let" => "have"
15:41:32FromDiscord<fl4shk> since what I see in the `findFuncs()` `proc` is just the `Vec3(int)` call
15:41:47FromDiscord<fl4shk> I based my approach on `shady`
15:43:38FromDiscord<fl4shk> is there something else you'd recommend?
15:46:40FromDiscord<glisteringlime> In reply to @Amun-Ra "has he never seen": you didn't read the above - yes I have and I've used it, and I hate it
15:46:45FromDiscord<glisteringlime> I've used it for years
15:47:08FromDiscord<solitudesf> is there even any point to Vec3 macro? all it does is substitutes parens for an underscore. i also not sure if avoiding generics here is that benefitial.
15:47:27FromDiscord<fl4shk> ...the point to the Vec3 macro is nicer syntax!
15:47:31FromDiscord<fl4shk> in any case
15:48:04FromDiscord<solitudesf> maybe working syntax is a better start, you can always upgrade when you have a working base.
15:48:05FromDiscord<fl4shk> avoiding generics isn't what I actually want ot do, but I fear that this not working for the `Vec3` macro means other issues will arise
15:48:10FromDiscord<fl4shk> I do have a working base!
15:48:28FromDiscord<fl4shk> sent a code paste, see https://play.nim-lang.org/#pasty=zmCSRSBa
15:48:48FromDiscord<fl4shk> this is from manually doing `Vec3_int`
15:49:05FromDiscord<fl4shk> I don't have `typedef struct`s or `for` loops implemented in the converter yet
15:49:42FromDiscord<fl4shk> ...anyway I think this an indicator not being able to do macros inside of a Nim `proc`
15:49:51FromDiscord<fl4shk> with my converter
15:50:32FromDiscord<solitudesf> In reply to @fl4shk "...anyway I think this": but does getAst not work? what was the issue with it?
15:50:35FromDiscord<fl4shk> oh
15:50:38FromDiscord<fl4shk> so no issue with that
15:50:39FromDiscord<fl4shk> but
15:50:51FromDiscord<fl4shk> how do I determine if I have a macro or a `proc`?
15:50:56FromDiscord<fl4shk> ...hm
15:51:18FromDiscord<fl4shk> perhaps I can look at the `getAst` result
15:51:21FromDiscord<fl4shk> and figure it out that way
15:51:47FromDiscord<solitudesf> you have a symbol in nkCall, you can probably introspect with getImpl/getType or something.
15:51:55FromDiscord<fl4shk> yeah that's the information I was looking for
15:52:14FromDiscord<fl4shk> `getImpl` gives me an error when it's a macro though
15:52:16FromDiscord<fl4shk> (edit) "`getImpl` gives me an error when it's a macro ... though" added "call"
15:54:28*kenran joined #nim
16:01:23FromDiscord<fl4shk> @solitudesf it doesn't work on `NimNode`s
16:07:47FromDiscord<fl4shk> I guess I'll go ahead and support generics instead
16:07:51FromDiscord<fl4shk> that would solve the issue
16:12:46FromDiscord<System64 ~ Flandre Scarlet> In reply to @janakali "also it's not officially": but seems it doesn't work with threads
16:55:37FromDiscord<fl4shk> I have an idea for macros. What if I include the macro definition in what I pass to the transpiler?
16:58:09FromDiscord<fl4shk> seems that macros aren't considered symbols...
17:00:13FromDiscord<fl4shk> oh
17:00:23FromDiscord<fl4shk> wait a minute... maybe I'm doing something wrongly here...
17:00:44FromDiscord<fl4shk> `symKind()` maybe?
17:01:41FromDiscord<nnsee> In reply to @glisteringlime "you didn't read the": sure, but i don't understand the mentality of coming into a language's community just to say how much you don't like it
17:01:54FromDiscord<nnsee> as i said before, you can just... not use nim if it's not for you
17:07:17FromDiscord<summarity> don't feed the trolls
17:07:26FromDiscord<fl4shk> @solitudesf I think you were right about having the macro be expanded first!
17:23:47*coldfeet quit (Quit: Lost terminal)
17:25:58*kenran quit (Remote host closed the connection)
17:32:04*kenran joined #nim
18:12:30FromDiscord<fluff.goose> sent a code paste, see https://play.nim-lang.org/#pasty=jGqmwYdv
18:12:50FromDiscord<odexine> you didnt close and open it after installing it, bet?
18:12:55FromDiscord<odexine> (edit) "you didnt close and open it after installing it, ... bet?" added "i"
18:13:20FromDiscord<Elegantbeef> It's windows so you likely didn't nuke your current session from the sun and reload
18:13:37FromDiscord<Elegantbeef> Atleast I know that's a common issue with windows, sometimes need to restart
18:26:00FromDiscord<yummy_licorice> In reply to @lainlaylie "best way is to": it does shoot out a lot of compiler warnings but it does compile and work
18:32:43FromDiscord<fluff.goose> yeah, clang works now. surprised it didnt cry like yesterday lol
18:34:53FromDiscord<fluff.goose> is there any flags for compilation that i should use since i've made some kind of software renderer?
18:36:21FromDiscord<fluff.goose> (edit) "is there any flags for compilation that i ... should" added "REALLY"
18:47:24FromDiscord<Elegantbeef> @fluff.goose if you're doing a lot of indexing you make want to put `{.push: checks:off.} ... {.pop.}` around your procs that do the indexing
18:47:36FromDiscord<Elegantbeef> But aside from that the general `-d:release -d:lto` are all you really need
18:48:23FromDiscord<alarie25> what in the world is this error↵`C:\Users\alari\Nim\lib\system.nim(841, 8) Error: invalid field at index 2`↵↵that file isnt even in my project
18:48:46FromDiscord<Elegantbeef> You did something that caused a crash in system
18:48:56FromDiscord<alarie25> oh great
18:49:32FromDiscord<Elegantbeef> Is there any more information?
18:50:25FromDiscord<alarie25> thats literally all it says
18:51:04FromDiscord<alarie25> and for some reason the language server in vs code is saying some procs dont exist even though ive imported the module and the procedures i need have a `` at the end
18:51:16FromDiscord<Elegantbeef> What are you compilation flags?
18:51:39FromDiscord<alarie25> -r and --outputdir
18:51:40FromDiscord<alarie25> thats it
18:52:15FromDiscord<Elegantbeef> Well it seems like you're doing some memory shenanigans if that's the only error
18:52:35FromDiscord<Elegantbeef> 841 is supposedly inside `new`
18:52:53FromDiscord<Elegantbeef> Though I know that system errors hardly ever are on the right line number
18:54:20*tiorock joined #nim
18:54:20*rockcavera is now known as Guest7344
18:54:20*Guest7344 quit (Killed (zinc.libera.chat (Nickname regained by services)))
18:54:20*tiorock is now known as rockcavera
18:54:20FromDiscord<alarie25> ok so
18:54:26FromDiscord<alarie25> the only place where im calling new is
18:54:30FromDiscord<alarie25> sent a code paste, see https://play.nim-lang.org/#pasty=RjVCAGHi
18:54:31FromDiscord<alarie25> which
18:54:42FromDiscord<alarie25> specifically goes to 3 functions in a separate module
18:54:48FromDiscord<alarie25> sent a code paste, see https://play.nim-lang.org/#pasty=UEATubrx
18:54:50FromDiscord<alarie25> all of which resemble that ^
18:54:52FromDiscord<alarie25> to some extent
18:55:04FromDiscord<alarie25> sent a code paste, see https://play.nim-lang.org/#pasty=oWntlZZN
18:55:08FromDiscord<Elegantbeef> Pointlessly using new nice
18:55:10FromDiscord<alarie25> sent a code paste, see https://play.nim-lang.org/#pasty=melTFPvt
18:55:18FromDiscord<Elegantbeef> `ExprString(value: value, kind: exkString)`
18:55:28FromDiscord<alarie25> so i dont need new?
18:55:31FromDiscord<Elegantbeef> That's all the body of the procedure needs t obe
18:55:39FromDiscord<Elegantbeef> It's a ref type `T()` allocates
18:55:53FromDiscord<Elegantbeef> `new T` is only pointful for generics
18:56:18FromDiscord<alarie25> okok
18:56:28*tiorock joined #nim
18:56:28*tiorock quit (Changing host)
18:56:28*tiorock joined #nim
18:56:28*rockcavera is now known as Guest3957
18:56:28*Guest3957 quit (Killed (tungsten.libera.chat (Nickname regained by services)))
18:56:28*tiorock is now known as rockcavera
18:56:31FromDiscord<Elegantbeef> Not that I imagine this will fix the bug
18:56:36FromDiscord<Elegantbeef> Cause there is no indexing involved here\:D
18:56:57FromDiscord<alarie25> this causes a different problem
18:57:01FromDiscord<alarie25> sent a code paste, see https://play.nim-lang.org/#pasty=uxJiParW
18:57:05FromDiscord<alarie25> now there is a type mismatch on output
18:57:08FromDiscord<alarie25> maybe im just being an idiot
18:57:17FromDiscord<Elegantbeef> `Expr ExprNumber(...)`
18:57:18*coldfeet joined #nim
18:57:25FromDiscord<alarie25> thats it?
18:57:35FromDiscord<Elegantbeef> Nim is not covariant with inheritance so the `seq[ExprNumber]` is not equal to `seq[Expr]`
18:57:42FromDiscord<alarie25> hm ok
18:58:13FromDiscord<alarie25> now it says invalid field at index 2 ugh
18:58:29*kenran quit (Remote host closed the connection)
18:58:39FromDiscord<Elegantbeef> Your error is inside a macro
18:58:47FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/e6f6c369ffd3073896716502af20727bd8feaf50/compiler/semmacrosanity.nim#L113
19:00:45FromDiscord<alarie25> im not entirely sure which macro im invoking here
19:00:50FromDiscord<alarie25> is it the `@[]`
19:02:21FromDiscord<Elegantbeef> Atleast I imagine that's where the issue comes from
19:02:22FromDiscord<Elegantbeef> Do you use any tuples?
19:02:23FromDiscord<Elegantbeef> Though technically you're not supposed to use runtime values in defaults
19:02:23FromDiscord<Elegantbeef> Nah it's not that
19:05:59FromDiscord<alarie25> sent a code paste, see https://play.nim-lang.org/#pasty=TwJIUWbx
19:06:03FromDiscord<alarie25> is that how im supposed to cast it
19:06:24FromDiscord<Elegantbeef> Yes
19:06:52FromDiscord<alarie25> ok thats where it's giving me the "invalid field at index 2" expect this time its for my actual parser file and not some random line in `system.nim`
19:07:43FromDiscord<Elegantbeef> Ah yes this is a bug with defaults
19:07:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=TUZEJtFV
19:07:47FromDiscord<Elegantbeef> Min repo, go make an issue and stop using defaults with runtime values 😄
19:08:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=NAJEIAlX
19:08:39FromDiscord<alarie25> so is that just for initializing a sequence like that or
19:08:54FromDiscord<Elegantbeef> It's' cause you're using a heap allocated value inside the sequence I imagine
19:09:06FromDiscord<Elegantbeef> Defaults are only meant for static values afaik
19:09:18FromDiscord<alarie25> wait so i cant use any heap allocated values inside a sequence?
19:09:27FromDiscord<alarie25> or i can and it will just be weird at initialization
19:09:39FromDiscord<Elegantbeef> defaults
19:09:41FromDiscord<Elegantbeef> Inside a defaults
19:09:58FromDiscord<Elegantbeef> It'd be a useless language if heap allocated values didn't work inside of a sequence
19:11:39FromDiscord<alarie25> ok i was gonna say
19:24:21FromDiscord<alarie25> what are the things i need to worry about when using `ref` objects
19:24:25FromDiscord<rakgew> when using cligen, is there a way to pull in the version from .nimble and make it available via `--version`?
19:24:27FromDiscord<alarie25> because i just got a seg fault
19:24:39FromDiscord<Elegantbeef> Allocating the object
19:24:47FromDiscord<alarie25> the nim manual section on ptr and ref objects is really short
19:26:00FromDiscord<alarie25> so when i allocate that object do i need to do anything special with whatever im assigning it to
19:26:07FromDiscord<alarie25> like if it did
19:26:58FromDiscord<alarie25> `let e = parser.parseExpr()` and `parseExpr()` returns a `Expr` (which is a ref object) do I need to do anything special with `e`? Is it's type like `ref Expr` or is it literally just `Expr`
19:27:04FromDiscord<Elegantbeef> refs are default 0 allocated so you have to allocate them
19:27:05FromDiscord<Elegantbeef> You either use `new T` or `T(...)` to allocate a reference so you can access fields or mutate it
19:27:11FromDiscord<Elegantbeef> Of course not
19:27:33FromDiscord<Elegantbeef> `Expr = ref object` means it's a heap allocated type
19:27:55FromDiscord<alarie25> oh ok
19:28:36FromDiscord<alarie25> OH
19:28:37FromDiscord<alarie25> ok
19:28:46FromDiscord<Elegantbeef> Uh HUH
19:28:47FromDiscord<alarie25> `parseExpr()` isn't returning an Expr so im indexing `nil`
19:29:54FromDiscord<System64 ~ Flandre Scarlet> Hi↵Do you know what's the FASTEST way to elevate a float to a power please? (the base is strictly between 0 and 1, and the exponent is strictly positive, but can be fractional)
19:32:14FromDiscord<alarie25> In reply to @Elegantbeef "Uh HUH": https://tenor.com/view/i-understand-it-now-lethalshooter-basketball-shoot-your-shot-understand-it-now-gif-8176668725026434453
19:32:15FromDiscord<alarie25> i understand it now
19:36:11FromDiscord<fabric.input_output> maybe libc pow does some sort of optimization for that case
19:39:21FromDiscord<System64 ~ Flandre Scarlet> In reply to @fabric.input_output "maybe libc pow does": The issue is none of base and exponent are constants
19:40:24FromDiscord<solitudesf> In reply to @rakgew "when using cligen, is": if you're building using nimble you can use `NimblePkgVersion` define. https://github.com/nim-lang/nimble/blob/2b1ac5d9374e5a7703985d36d07e7f74f1bb9cb9/tests/nimbleVersionDefine/src/nimbleVersionDefine.nim
19:41:00FromDiscord<fabric.input_output> maybe you could have a lookup table? depends on the precision you need. this sounds like something someone might have written a paper about
19:42:40FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=DMyxvdSZ
19:45:25FromDiscord<fabric.input_output> that looks like ub
19:46:02FromDiscord<fabric.input_output> (edit) "that looks like ... ub" added "possible"
19:50:58FromDiscord<fluff.goose> lol, it's only now I realise that there is #gamedev and that I've been annoying people here instead of there with my problems
19:56:10FromDiscord<nasuray> In reply to @rakgew "when using cligen, is": Another option besides the nimble approach is to use `staticExec` and get the version info using git tags
19:58:06FromDiscord<System64 ~ Flandre Scarlet> In reply to @fabric.input_output "that looks like possible": Quake used a similar trick for Fast Inverse Square Root
19:58:14FromDiscord<djazz> In reply to @pmunch "Futhark should automatically handle": I run into the exact same issue in futhark 0.14.0
20:03:50FromDiscord<fabric.input_output> In reply to @sys64 "Quake used a similar": yeah but I don't think they used that in all the builds
20:10:44*def- quit (Ping timeout: 252 seconds)
20:10:55*def- joined #nim
20:11:02FromDiscord<System64 ~ Flandre Scarlet> In reply to @fabric.input_output "yeah but I don't": I can probably use a LUT
20:11:26FromDiscord<fabric.input_output> what's an lut
20:11:44FromDiscord<System64 ~ Flandre Scarlet> Lookup Table
20:14:28FromDiscord<fl4shk> given a `NimNode`, I have two questions:↵ can I check if it happens to be a `macro`?↵ can I expand it from within another macro?
20:15:07FromDiscord<fabric.input_output> yeah lookup table sounds good
20:15:09FromDiscord<fabric.input_output> although
20:15:17FromDiscord<fabric.input_output> it may turn out to be slower
20:16:41FromDiscord<fabric.input_output> are you doing this because you need it or you might need it? can you parallelize computations?
20:17:26FromDiscord<System64 ~ Flandre Scarlet> In reply to @fabric.input_output "are you doing this": Isn't the pow operation slow?
20:19:27FromDiscord<fabric.input_output> well in itself it's kinda useless defining it as fast or slow. is there visible slowdown from pow?
20:22:11FromDiscord<System64 ~ Flandre Scarlet> In reply to @fabric.input_output "well in itself it's": Not really, but I use it very often
20:42:27FromDiscord<odexine> profileeeee
20:43:34FromDiscord<Elegantbeef> People really are out here using dousing rods trying to make their program run faster
20:47:41FromDiscord<solitudesf> In reply to @fl4shk "given a `NimNode`, I": are you sure there are unexpanded macros in your ast? do you have your code uploaded somewhere?
20:48:24FromDiscord<fl4shk> In reply to @solitudesf "are you sure there": I do have my code uploaded
20:48:41FromDiscord<fl4shk> but not the version using macros for this
20:50:29FromDiscord<fl4shk> also
20:50:47FromDiscord<fl4shk> the unexpanded macros showed up as `nnkCall`
20:52:05FromDiscord<solitudesf> In reply to @fl4shk "the unexpanded macros showed": whats the output of repr on this node?
20:52:11FromDiscord<fl4shk> let me try it again
20:53:50FromDiscord<summarity> In reply to @Elegantbeef "People really are out": vibe-based optimization 😄
20:55:06FromDiscord<odexine> --d:vbo
20:55:09FromDiscord<odexine> oops, double dash mb
21:01:04FromDiscord<fl4shk> In reply to @solitudesf "whats the output of": `Vec3(int)`
21:01:21FromDiscord<fl4shk> so it just looks like a plain old `func`/`proc` call from my transpiler
21:14:25FromDiscord<fl4shk> ...well it seems I'm getting closer to having generics working?
21:24:21*coldfeet quit (Quit: Lost terminal)
21:24:35FromDiscord<pmunch> In reply to @djazz "I run into the": Yeah it's a silly bug
21:24:58*xet7 joined #nim
21:25:51*ntat quit (Quit: Leaving)
21:30:01FromDiscord<djazz> In reply to @pmunch "Yeah it's a silly": its not adding the _field after the name anymore
21:30:23FromDiscord<djazz> i think..
21:39:12FromDiscord<pmunch> Indeed
21:39:31FromDiscord<pmunch> I relaxed a check a bit too much by accident
21:41:43FromDiscord<djazz> hope u are feeling better!
21:52:50*xet7 quit (Remote host closed the connection)
21:53:20FromDiscord<fl4shk> it appears that I can't see the generics passed to a function within the AST
21:56:22FromDiscord<fl4shk> so I might have to build that information back up
21:56:29FromDiscord<fl4shk> from the arguments
21:57:08FromDiscord<fl4shk> on the one hand, `dumpTree` shows it
21:57:13FromDiscord<fl4shk> but my macro can't see it
21:59:17FromDiscord<fl4shk> maybe it's because the macro took a `typed` instead of an `untyped`
22:14:38FromDiscord<solitudesf> surely thats not how it supposed to work
22:15:37FromDiscord<fl4shk> can you be more specific? Also thanks for your help
22:21:49FromDiscord<fl4shk> wait... maybe I'm doing this wrong
22:25:16FromDiscord<fl4shk> hm, here's a simple way to solve the issue I've got: building this up from the arguments can be just as simple as mangling the types of the arguments
22:26:13FromDiscord<fl4shk> oh, but that doesn't cover value generics
22:26:58FromDiscord<fl4shk> so I'll ban value generics
22:27:00FromDiscord<fl4shk> types only
23:16:12FromDiscord<ricky._.spanish> anyone know where the best place might be to find a super minimal example of the type of garbage collector used by nim, im curious to actually learn how it works