<< 18-10-2024 >>

00:43:41*tokyovigilante_ joined #nim
00:44:21*tokyovigilante quit (Ping timeout: 246 seconds)
00:44:21*tokyovigilante_ is now known as tokyovigilante
01:02:18FromDiscord<Savant> sent a long message, see https://pasty.ee/khiuBurT
01:02:32FromDiscord<Savant> sent a long message, see https://pasty.ee/kalrlMBZ
01:02:33FromDiscord<Savant> sent a long message, see https://pasty.ee/tEbrupzP
01:02:33FromDiscord<Savant> sent a long message, see https://pasty.ee/IApBRkjb
01:07:53FromDiscord<Elegantbeef> > has its own proprietary syntax as well ?
01:10:01FromDiscord<Savant> ?
01:10:14FromDiscord<Elegantbeef> What do you mean it has a proprietary syntax
01:10:22FromDiscord<Savant> sorry
01:10:51FromDiscord<Savant> i'd like to use the same "syntax" in compile time as i would at runtime
01:10:51FromDiscord<Savant> is that silly?
01:10:53FromDiscord<Savant> things like NimNode
01:10:54FromDiscord<Elegantbeef> Yes
01:10:56FromDiscord<Savant> parseStmt
01:10:57FromDiscord<Savant> etc
01:11:02FromDiscord<Savant> how's that
01:11:05FromDiscord<Savant> seems like it would be pretty sweet to me
01:11:50FromDiscord<Elegantbeef> Nim is a statically compiled language, which means the runtime would have to have a VM embedded into it to be able to parse and interpret the code
01:12:45FromDiscord<Savant> forgive my ignorance but that seems like the reasoning for why it does not already exist
01:12:51FromDiscord<Savant> naturally
01:13:13FromDiscord<Elegantbeef> Right, which is why it's silly
01:13:17FromDiscord<Savant> hm
01:13:58FromDiscord<Elegantbeef> Having a language that is statically compiled, but also can do things at runtime is incompatible imo
01:14:51FromDiscord<Elegantbeef> If you can do `var a = someMacro()` and `someMacro` is evaluated at runtime you now have `a` which is not static
01:16:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=VfHhhJko
01:20:31FromDiscord<Elegantbeef> Actually I misinterpreted what you meant
01:20:40FromDiscord<Elegantbeef> you can use the nimscript api and use the same syntax just fine
01:20:46FromDiscord<Savant> bruh
01:20:47FromDiscord<Savant> really
01:20:58FromDiscord<Elegantbeef> Well yea nimscript is a language
01:21:01FromDiscord<Savant> yea i don't want execution / vm stuff
01:21:37FromDiscord<Savant> i just want my parsing logic to be the same in a compile time and runtime
01:21:40FromDiscord<Elegantbeef> So then write code that works at CT and runtime
01:22:57FromDiscord<Elegantbeef> Unlike other languages with CTE, Nim's CT doesn't require any annotations to use a procedure written
01:27:01FromDiscord<Savant> `system/nimscript` provides the same ast exports as `macros`?
01:27:01FromDiscord<Savant> well that's simply what i'd like
01:27:09FromDiscord<Elegantbeef> No
01:27:10FromDiscord<Savant> without the hubba bubba about VM junk
01:27:12FromDiscord<Elegantbeef> Well that's not how this works, you have to embed the VM
01:27:15FromDiscord<Savant> hm
01:27:19FromDiscord<Savant> i gotcha
01:27:21FromDiscord<Savant> but if we remove execution
01:27:24FromDiscord<Savant> doesn't it sorta work like dat
01:27:26FromDiscord<Elegantbeef> Stop using `parseStmt` for 'parsing'
01:27:40FromDiscord<Elegantbeef> You can hook up the nim parser and use that alone if you want
01:28:06FromDiscord<Elegantbeef> I have no example of that, but atlas I believe does it
01:29:08FromDiscord<Savant> very new to nim coming from js
01:29:13FromDiscord<Savant> this↵https://raw.githubusercontent.com/elcritch/cdecl/refs/heads/main/src/cdecl/compiler/macros2.nim
01:29:14FromDiscord<Savant> i'll look into this
01:29:15FromDiscord<Savant> really seems exactly what i want
01:29:17FromDiscord<Savant> thanks
01:29:23FromDiscord<Savant> with even like `parseStmt` overwrittetn
01:29:24FromDiscord<Elegantbeef> Why are you using parsestmt anyway?
01:29:43FromDiscord<Savant> but... i get issues i think related to new versions of nim/libs
01:31:06FromDiscord<Savant> to load some code into a nimnode stmt
01:31:07FromDiscord<Elegantbeef> So you're using it to piggy back on the Nim parser instead of writing your own?
01:31:32FromDiscord<Savant> i guess if thats how it works
01:32:18FromDiscord<Elegantbeef> Well what do you do with the node after?
01:32:35FromDiscord<Savant> currently im just doing some basic stuff like looping its children / validating the code thereafter - extracting some information for whatever purposes i may have
01:33:20FromDiscord<Savant> later it'll include transformation
01:33:25FromDiscord<Elegantbeef> Is this for a file format, compilation, or something else?
01:33:32FromDiscord<Savant> file format
01:33:38FromDiscord<Savant> trying to do js `{}`
01:33:39FromDiscord<Savant> mixed with `:`
01:34:09FromDiscord<Elegantbeef> So yes this is a poor usage of the parser
01:34:14FromDiscord<Savant> haha
01:34:15FromDiscord<Elegantbeef> Writing a parser from scratch to match a spec will make your life so much easier
01:34:17FromDiscord<Elegantbeef> But it's a nice shortcut to working code
01:34:20FromDiscord<Elegantbeef> Parsers are not hard to write
01:35:51FromDiscord<Elegantbeef> Also by `js` do you mean json or javascript
01:35:57FromDiscord<Elegantbeef> Cause one is compilation the other is a fileformat in my definition
01:36:05FromDiscord<Savant> sorry i meant like i want `{}` identation mixed in with the python `:`
01:36:07FromDiscord<Savant> as seen in "js"
01:36:20*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
01:38:51FromDiscord<Savant> i made it poorly happen with some regex like stuff -\>↵created new file "compiler" which "transpiles" at runtime then calls normal nim command with args passed through
01:38:58FromDiscord<Savant> i want to have- like a header or something, where i could denote something
01:38:59FromDiscord<Savant> this all works really groovy for how shitty i am
01:39:02FromDiscord<Savant> but the problem now became
01:39:06FromDiscord<Savant> and i want to extract that bit of info at runtime
01:39:27FromDiscord<Savant> but i want to use the same funcs
01:39:32FromDiscord<Savant> bc later my utility will grow large
01:40:28FromDiscord<Elegantbeef> Well there's your problem, regex is hardly a solution to this problem 😄
01:40:30FromDiscord<Savant> be kinda messy having two systems even tho the solution is bridging two systems
01:40:38FromDiscord<Savant> YEA haha i understand that part of it
01:40:42FromDiscord<Savant> BUT it works for me now
01:40:46FromDiscord<Savant> what could you tell me abt this?
01:40:56FromDiscord<Savant> isn't this sorta like regex with organization
01:41:04FromDiscord<Elegantbeef> No
01:42:06FromDiscord<Elegantbeef> I mean design a requirement for the language, then write a parser that extracts it to an AST then process it how you want
01:42:21FromDiscord<Savant> do you have any ref on that process of "parsing to AST"
01:42:29FromDiscord<Savant> thats what i meant sorry
01:42:56FromDiscord<Elegantbeef> crafting interpreters
01:43:09FromDiscord<Savant> awesome thanks
01:45:23FromDiscord<Savant> will look into this
01:47:14FromDiscord<Savant> if im not mistaken this is that
01:47:17FromDiscord<Savant> https://raw.githubusercontent.com/elcritch/cdecl/refs/heads/main/src/cdecl/compiler/macros2.nim
01:47:25FromDiscord<Elegantbeef> Correct
01:47:30FromDiscord<Elegantbeef> But that's still a bad idea to rely on
01:47:37FromDiscord<Savant> yeah yeah yeah
01:56:52*lucasta joined #nim
02:00:32FromDiscord<Savant> but then also i couldnt use the same utility for compile time
02:01:31FromDiscord<Savant> cheeky cheeky ok
02:01:34FromDiscord<Elegantbeef> Correct, time to write a parser
02:01:35FromDiscord<Savant> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1296654115081945108): but then also i couldnt use the same utility for compile time?
02:08:46*rockcavera quit (Remote host closed the connection)
02:15:00*lucasta quit (Quit: Leaving)
02:42:05*pmp-p quit (Ping timeout: 252 seconds)
02:45:21*pmp-p joined #nim
03:47:21*SchweinDeBurg joined #nim
04:08:40*Guest76 joined #nim
04:40:32*pmp-p quit (Ping timeout: 252 seconds)
04:46:48*pmp-p joined #nim
05:52:59*Guest76 quit (Ping timeout: 256 seconds)
06:01:11FromDiscord<spaceshaman> how do I uh... append strings 👉 👈
06:03:29FromDiscord<spaceshaman> got it. I wanted `&`
06:04:01FromDiscord<spaceshaman> is `&=` effectively the same as `.add(`?
06:05:15FromDiscord<odexine> yes
06:16:59FromDiscord<spaceshaman> are templates auto inlined code? How do I ensure something is ctfe? do you have to assign to const?
06:17:06FromDiscord<kiloneie> In reply to @Elegantbeef "Kate does seem faster": I think it's about the same, but i prefer Geany's well most things.
06:18:10FromDiscord<Elegantbeef> `const` or `static`↵(@spaceshaman)
06:18:37FromDiscord<kiloneie> In reply to @spaceshaman "are templates auto inlined": every value simply has to be known at compile time, i think even a `var` can work as long as the data is known at compile time(last i checked)
06:19:02FromDiscord<spaceshaman> > static means comptime↵Flashbacks to D
06:20:11FromDiscord<spaceshaman> so `echo static factorial(5)` is computing factorial in ctfe?
06:22:39FromDiscord<odexine> should be yes
06:25:40FromDiscord<spaceshaman> nim is forward declared
06:25:55FromDiscord<Elegantbeef> No
06:26:12FromDiscord<odexine> what?
06:26:18FromDiscord<spaceshaman> I might be using that term inverted
06:26:28FromDiscord<Elegantbeef> I assume they're pointing out that Nim requires order of declaration to match order of use
06:26:50FromDiscord<spaceshaman> yeah
06:27:03FromDiscord<spaceshaman> wait
06:27:15FromDiscord<spaceshaman> you mean declaration must precede use
06:27:18FromDiscord<Elegantbeef> As much as people hate it, I sure as shit love it reading code
06:27:43FromDiscord<Elegantbeef> Well you have to declare procedures before you can use them so I think in an odd shitty way I was right
06:28:36FromDiscord<spaceshaman> oh but not functions?
06:28:43FromDiscord<odexine> procedures are "functions"
06:28:46FromDiscord<Elegantbeef> They're the same thing
06:28:53FromDiscord<Elegantbeef> Functions are procedures
06:28:53FromDiscord<odexine> different terminology
06:29:04FromDiscord<spaceshaman> right but the different keywords
06:29:07FromDiscord<Elegantbeef> But not all procedures are functions
06:29:37FromDiscord<odexine> i mean what i said in the common use of the term function
06:29:42FromDiscord<spaceshaman> I was wondering for a moment if it did the haskel thing where declarative code is order free
06:29:46FromDiscord<odexine> not in the functional programming usage which is rarer
06:30:19FromDiscord<spaceshaman> ive been hanging around PL devs too much
06:31:59FromDiscord<spaceshaman> In reply to @Elegantbeef "As much as people": Ive been going through my pl feature preferences and applying a principled razor to them. I think this is one I missed. Declaration before use is probably a good thing.
06:32:36FromDiscord<spaceshaman> Recently I switched sides on the brackets vs indentation debate
06:32:54FromDiscord<Elegantbeef> It does make it so much easier to read code when you know a procedure is above you
06:33:33FromDiscord<Elegantbeef> Arguably one can say "just use tooling", but it's nice to the mind when reading code top down and building up mindscape of whats what
06:33:43FromDiscord<zumi.dxy> So it's preferable than using code reordering?
06:33:51FromDiscord<Elegantbeef> It is to me
06:34:06FromDiscord<spaceshaman> Its also harder to half ass the implementation of forward declaration of symbols in the compiler if you just axe that
06:34:08FromDiscord<Elegantbeef> Whether you like having your code all spaghetified is between you and your god
06:34:23FromDiscord<spaceshaman> In reply to @spaceshaman "Its also harder to": godot fucks this up so bad
06:34:39FromDiscord<Elegantbeef> Just make a multi pass compiler, how hard could it be!
06:34:47FromDiscord<kiloneie> hmm, but if one enforced forward declaration when sharing code, but it was possible to do it anywhere... still probably worse than not being possible ... i think... the benefits are what ? spagheti code ? i already freak out on code longer than 2x page scroll, you want me to jump up and down like we are using ˙goto`s ?
06:35:00FromDiscord<spaceshaman> In reply to @Elegantbeef "Just make a multi": ...said many foolish pl devs
06:35:29FromDiscord<Elegantbeef> The benefits are simply order independent usage at the cost of a complex problem especially when you have macros
06:35:40FromDiscord<kiloneie> when was `include` added ? i don't remember it at 1.0...
06:35:46FromDiscord<Elegantbeef> Pre 1.0
06:35:50FromDiscord<kiloneie> oh damn
06:35:52*coldfeet joined #nim
06:35:56FromDiscord<Elegantbeef> Never use include unless you're making one file out of many, thanks
06:36:10FromDiscord<Elegantbeef> Pretend like include does not exist
06:36:30FromDiscord<spaceshaman> Allong the same lines, I think identifiers `should_have_separators` like `snake_case` or `kebab-case`
06:36:42FromDiscord<Elegantbeef> Eh camel case reads fine enough
06:36:46FromDiscord<spaceshaman> no
06:36:53FromDiscord<spaceshaman> no it does not.
06:36:58FromDiscord<Elegantbeef> It does to me
06:37:04FromDiscord<kiloneie> In reply to @Elegantbeef "Never use include unless": im only using it to spread out e.g. Player, Wall, EnemyMario into their own little files, not actually splitting the code
06:37:12FromDiscord<Elegantbeef> So then use `import`
06:38:18FromDiscord<kiloneie> In reply to @Elegantbeef "So then use `import`": what does import achieve that include doesn't in my case ?
06:38:23FromDiscord<Elegantbeef> The issue with `include` is that you recompile the file into the module that `include` does
06:38:29FromDiscord<spaceshaman> camel case can be pretty but its less readable than just having a gap
06:39:09FromDiscord<Elegantbeef> So later on if you ever want to do something like `import bleh/player` you now have multiple symbols that are identical but not the same type and interfere with overload
06:39:43FromDiscord<spaceshaman> regarding indentation though, I dont like dynamic typing. Why did I spend all those years prefering dynamic indentation using brackets?
06:40:01FromDiscord<Elegantbeef> Python sold you a world and you turned it down
06:40:12FromDiscord<kiloneie> In reply to @Elegantbeef "So later on if": oh, im not using it for that https://media.discordapp.net/attachments/371759389889003532/1296724492755664896/image.png?ex=6713544b&is=671202cb&hm=a3595bd9e2f45304f4030e9c5dac04877447c1258ca062321b228a9252980c2c&
06:40:22FromDiscord<kiloneie> https://media.discordapp.net/attachments/371759389889003532/1296724538612252693/image.png?ex=67135455&is=671202d5&hm=91d92a7697e453998a94f122469ac867296530e13ee8f8f24c07d7a33ebcc46b&
06:40:25FromDiscord<Elegantbeef> What's `objects` have?
06:40:30FromDiscord<kiloneie> uhm
06:40:38FromDiscord<Elegantbeef> Yea I do not see why you'd use `include` for this
06:40:50FromDiscord<kiloneie> https://media.discordapp.net/attachments/371759389889003532/1296724655251521537/image.png?ex=67135471&is=671202f1&hm=4aa771b4520b07da94eccc8584ee0b9b4cbe2a2dea1a6ed2b9cfc269b1196053&
06:40:53FromDiscord<Elegantbeef> I mean I actively use delayed imports though, so I'm probably not the best person to refer to
06:41:02FromDiscord<Elegantbeef> TIHI
06:41:16FromDiscord<spaceshaman> Ive pretty much always prefered static typing so there was no big change there. Arguably this all came from there
06:41:21FromDiscord<kiloneie> i snagged a macro to simply auto include me the whole DIR
06:41:45FromDiscord<kiloneie> i will see if i need import, but atm im not sold for this case
06:41:49FromDiscord<Elegantbeef> Well then I guess that works, although it's uh huh
06:42:18FromDiscord<kiloneie> i do wish Nim's LSP would shut up on player.nim being an error inside of it
06:42:26FromDiscord<kiloneie> on it's own
06:42:55FromDiscord<Elegantbeef> Well include is fine here, but i'd still import it and not include the player module
06:43:05FromDiscord<Elegantbeef> If we're caring about my opinion that is
06:43:25FromDiscord<kiloneie> what kind of checks does import do ?
06:43:29FromDiscord<Elegantbeef> include is a specialised tool to me and should only be used in situations where import + delayed imports do not work
06:43:49FromDiscord<Elegantbeef> A module that is imported must be compilable
06:43:55FromDiscord<Elegantbeef> That's it
06:44:06FromDiscord<kiloneie> include doesn't ?
06:44:14FromDiscord<Elegantbeef> Nope it pastes code in
06:44:23FromDiscord<kiloneie> oO
06:44:24FromDiscord<Elegantbeef> I do not even know if needs to be parsable, I imagine so
06:44:33FromDiscord<kiloneie> hmm but this does have use cases ...
06:45:02FromDiscord<Elegantbeef> include must compile after including, import is a compilable standalone module
06:45:25FromDiscord<Elegantbeef> For context on delayed imports https://github.com/beef331/nimtrest/wiki/Code-snippets#delayed-imports
06:53:43FromDiscord<kiloneie> Okay, so when i will be pushing out all "drawing" procs into a file, i should NOT include but import.↵↵Can one just `export` the whole module ? (i see that you can import and export what you imported, but can you just `export self/selfFilename` or `export appDir()` ?
06:54:20FromDiscord<fabric.input_output> yes
06:54:23FromDiscord<Elegantbeef> `export modulename` if you import a module
06:55:15FromDiscord<kiloneie> In reply to @Elegantbeef "`export modulename` if you": you mean that i have to export modules that are imported in the importable module ?
06:55:38FromDiscord<Elegantbeef> You have to export any modules you want accessible yes
06:56:24FromDiscord<kiloneie> but not if only that module needs them ? e.g. macros for "objects.nim", but main.nim doesn't need that ?
06:56:39FromDiscord<Elegantbeef> They work just like normal modules
06:56:57FromDiscord<Elegantbeef> You only export what you want someone else to get from importing this module
06:56:57FromDiscord<kiloneie> i've never really thought about this 😛
06:57:10FromDiscord<kiloneie> okay, seems simple enough
06:57:47FromDiscord<kiloneie> does it matter where you export though ? the end ? start ? doesn't matter ?
06:58:24FromDiscord<Elegantbeef> I want you to think that question through
06:59:46FromDiscord<kiloneie> i'd say the end if i want the entire module exported, but i don't know how the compiler works
07:00:06FromDiscord<Elegantbeef> Why would exporting a symbol change how a module is compiled?
07:00:34FromDiscord<Elegantbeef> does `proc doThing() = discard` suddenly stop working inside this module if you remove the ``
07:02:37FromDiscord<kiloneie> im not sure your example is comparable... im just saying that if `export AppDir()` is at the start of module b, then the compiler will know to... hmm i guess it doesn't matter. I guess main would just check what is exported from that module and import it
07:02:48FromDiscord<Elegantbeef> There you go
07:02:53FromDiscord<Elegantbeef> They are comparable
07:03:04*coldfeet quit (Remote host closed the connection)
07:03:26FromDiscord<Elegantbeef> also it's just `AppDir` not `AppDir()`
07:03:52FromDiscord<Elegantbeef> Export order does not matter cause symbols exported are added to a list of symbols
07:04:04FromDiscord<Elegantbeef> There is nothing special about export that makes it order dependant
07:04:51FromDiscord<Elegantbeef> When you import a module it compiles the module if it was not compiled, then introduces all exported symbols
07:04:52FromDiscord<kiloneie> i was wrongly remember adding the () i guess. I forget when `()` is required... no arguments procs right ? i know it when im coding, but i can't remember right now
07:05:13FromDiscord<Elegantbeef> `()` is required when you're invoking, that's it
07:05:47FromDiscord<Elegantbeef> `export` works symbols not values so invoke makes little sense there
07:06:27FromDiscord<kiloneie> hmm okay
07:14:50FromDiscord<kiloneie> do we have procs or whatever that can figure out to go up and down a level of folders ?
07:26:50FromDiscord<odexine> "figure out"??
07:28:35FromDiscord<kiloneie> https://css-tricks.com/quick-reminder-about-file-paths/
07:28:39FromDiscord<kiloneie> this is what i wanted
07:28:55FromDiscord<kiloneie> i forget this...
07:32:04FromDiscord<kiloneie> Man this nim-lang.org extension or Nim's LSP takes some time sometimes, telling me of an error that isn't there, i c -r, still telling me, then i hover over the import and 2 seconds later it finally realizes, oh, my bad... <.< WIP
07:32:27FromDiscord<fabric.input_output> what if
07:32:30FromDiscord<fabric.input_output> you didn't use lsp
07:33:54FromDiscord<odexine> its really the suggestion engines fault
07:34:01FromDiscord<odexine> its just slow and on a bad architecture
07:34:11FromDiscord<odexine> no one seems to want to fix it though
07:34:16FromDiscord<odexine> naturally me included
07:39:40FromDiscord<kiloneie> well i changes main.nim to import instead of including `objects.nim` which still uses the macro to include player.nim, wall.nim which now import and export to get code checking going on. But the Nim's LSP freaks out and only shuts up if i hover my mouse over the `main.nim`'s `import objects.nim`
07:40:13FromDiscord<kiloneie> though hopefully it will only freak out on changes in those files, an easy thing to remember.
07:40:48FromDiscord<kiloneie> Can one `import` the whole directory, rendering that macro useless ?
07:41:51FromDiscord<odexine> no
07:41:57FromDiscord<odexine> imports are on files
07:42:09FromDiscord<kiloneie> okay, im not walking the dirs, this is fine
07:42:48FromDiscord<odexine> why do you need it to be automatic anyway?
07:43:19FromDiscord<kiloneie> because it's gonna be a lot of files, and i intend to not just make a game but a mini Game Maker of sorts, not just a level editor with it
07:43:27FromDiscord<kiloneie> and so, manual is just NOT an option
07:43:49FromDiscord<kiloneie> yes i realize this works only at compile time atm
07:43:55FromDiscord<kiloneie> not the point
07:45:33FromDiscord<kiloneie> What i want might be extremely tricky to do...
08:09:08FromDiscord<spaceshaman> The nim compiler is directory aware and doesn't need you to pass included files in right?
08:09:21FromDiscord<spaceshaman> A la gcc
08:12:19Amun-Raright
09:32:21*omid joined #nim
09:32:43*omid is now known as omnad
09:34:41omnadhi nim-world!
09:35:25FromDiscord<nnsee> hi omnad
09:36:40omnadi'm puzzled ... what's that about what you call 'partial case-insensitivity'? why is the first character case sensitive?
09:37:13omnadalso, i am not sure why i'd want that kind of 'Identifier equality'.
09:42:00FromDiscord<blackmius> first character case-sensitive to separate types and variables
09:42:24FromDiscord<demotomohiro> If there are two variable `Filename` and `filename`, they don't confuse people.↵But if there are 2 variable `filename` and `fileName`, they might confuse some people.
09:42:32FromDiscord<blackmius> you shouldnt want it or unwanted either
09:43:02FromDiscord<blackmius> you just dont use variables like↵↵mYsUpErVaRiAbLE
09:43:40FromDiscord<blackmius> (edit) "you just dont use variables like↵↵mYsUpErVaRiAbLE ... " added "and at the same time another mySuPERvArIAble"
09:45:34FromDiscord<demotomohiro> In Nim, you cannot declare variables `filename` and `fileName` in one scope.
09:55:33FromDiscord<pmunch> Hmm, would probably break some stuff now. But it should be technically possible to have a type and a variable named the same since they are so different. That way we could have full case insensitivity, and `var file: file` would be valid because it knows that `: <something>` can only mean a type
09:56:33FromDiscord<pmunch> Would mean that there's a few ambiguous cases though, so might cause some issues, but as long as you have the ability to disambiguate somehow then it should be fine.
10:08:16omnadthanks!
10:16:48*omnad quit (Quit: leaving)
10:48:34*ryuukk quit (Remote host closed the connection)
10:50:55*ryuukk joined #nim
11:15:08*ntat joined #nim
11:59:04*ntat quit (Quit: Leaving)
12:30:32FromDiscord<kiloneie> Is it just me, or is there less people regularly active on Nim discord than it used to be ?
12:34:46*coldfeet joined #nim
12:40:24FromDiscord<pmunch> It ebbs and flows a bit
12:40:40FromDiscord<pmunch> Can't procedures have custom pragmas? https://play.nim-lang.org/#pasty=TACiKCYf
12:40:50FromDiscord<odexine> yes?
12:40:55FromDiscord<odexine> async is a custom pragma
12:41:01FromDiscord<pmunch> There's also the fact that we now have many different channels
12:41:10FromDiscord<pmunch> So the conversation is spread out a bit more
12:41:17FromDiscord<pmunch> @odexine check the example I sent
12:41:24*ntat joined #nim
12:41:25FromDiscord<pmunch> Async is like `task` in that snippte
12:41:30FromDiscord<odexine> you mean a template pragma okay
12:41:37FromDiscord<pmunch> I'm wondering why `stackSize` doesn't work
12:42:52FromDiscord<ayex> definitively - I used them before.
12:42:57FromDiscord<pmunch> Hmm, I can extract it from the `procImpl` definition though
12:43:12FromDiscord<pmunch> @ayex, any idea what you did differently?
12:43:53FromDiscord<ayex> custom pragmas on progs - definitively - I used them before.
12:44:27FromDiscord<odexine> you probably cant extract them via a macro pragma
12:44:57FromDiscord<odexine> im testing more things wait
12:47:10FromDiscord<odexine> In reply to @pmunch "Hmm, I can extract": prolly why you cant use the macros functions
12:48:21FromDiscord<ayex> let me check the snippet..↵(@pmunch)
12:52:03*coldfeet quit (Remote host closed the connection)
12:54:37FromDiscord<ayex> sent a code paste, see https://play.nim-lang.org/#pasty=TFHIIIXW
12:55:54FromDiscord<ayex> [pmunch](https://matrix.to/#/%40_discord_392962235737047041%3At2bot.io) would the pragma tempalte not need to be placed above type, as it is used there?
13:16:10FromDiscord<ayex> sent a code paste, see https://play.nim-lang.org/#pasty=CPPHDuxc
13:24:59FromDiscord<odexine> well yes but i assume task is intended to be used as a pragma
13:29:16FromDiscord<ayex> I see. but there is no definition of `task` as a pragma(?) -↵↵to me only `stackSize` seems to be defined as pragma?
13:29:35FromDiscord<pmunch> Macros can be called as a pragma 😉
13:29:42FromDiscord<pmunch> Async is just a macro
13:35:20FromDiscord<ayex> ah I did not know that, thank you 🙂↵(@pmunch)
13:37:12*ryuukk quit (Remote host closed the connection)
13:39:06*ryuukk joined #nim
14:32:58*zgasma joined #nim
15:31:22*lucasta joined #nim
15:47:54*fallback quit (Read error: Connection reset by peer)
16:09:13*fallback joined #nim
16:49:27*lucasta quit (Remote host closed the connection)
17:53:35*tokyovigilante quit (Read error: Connection reset by peer)
17:53:51*tokyovigilante joined #nim
18:23:08FromDiscord<grumblygibson> In reply to @xtrayambak "How are you supposed": https://nim-lang.org/docs/manual.html#types-object-variants
18:55:33FromDiscord<spaceshaman> Is there a reason that primitive types aren't capitalized?
19:01:44FromDiscord<ieltan> In reply to @spaceshaman "Is there a reason": No clue, but if I had to guess, to distinguish compiler built-ins from user code
19:04:15Amun-Raand to distinguish primitive type from non-primitive object
19:05:19Amun-Raand it's, de facto, standard ;>
19:12:37FromDiscord<spaceshaman> Its a shame they did that. Because then you cant do `var string: String`
19:15:42FromDiscord<spaceshaman> Is there a way to tell the compiler to treat default initialization as an error?
19:19:21*disso-peach joined #nim
19:23:02Amun-Raspaceshaman: https://play.nim-lang.org/#pasty=caTWfUmm
19:23:47*disso-peach quit (Client Quit)
19:25:21Amun-RawarningAsError and Uninit=on
19:34:00FromDiscord<.bobbbob> Isnt it put {.experimental: "strictDefs".} in the file
19:35:46FromDiscord<spaceshaman> And with that is there a way to explicitly init with garbage/uninitialized memory?
19:36:16Amun-Ravar somearray {.noinit.}: array[5, byte]
19:47:56FromDiscord<frusadev> Hi!
19:48:29FromDiscord<frusadev> How should i go about creating a macro that makes functions public? something like `pub proc ...`
20:01:21FromDiscord<leorize> you can't modify syntax with macros, fwiw
20:02:14FromDiscord<leorize> however you can create a macro that mark all procs in its block public
20:26:51FromDiscord<double_spiral> I didn't know Nim had a pub keyword
20:28:41FromDiscord<leorize> nim doesn't
20:32:03FromDiscord<double_spiral> Oh that's what I wanted to call the macro, I see
20:32:09FromDiscord<double_spiral> (edit) "I" => "he"
20:52:49*ntat quit (Quit: Leaving)
21:28:32*rockcavera joined #nim
23:25:02FromDiscord<spaceshaman> how do I declare something before it is defined?
23:25:37FromDiscord<spaceshaman> so that you can do mutual recursion for instance
23:28:38FromDiscord<spaceshaman> I finally found the docs
23:30:07*thomasross joined #nim
23:30:59FromDiscord<spaceshaman> imo this should link to `https://nim-lang.org/docs/manual.html` https://media.discordapp.net/attachments/371759389889003532/1296978867340185600/image.png?ex=67144132&is=6712efb2&hm=b039fc5f0f3bb52e831560e8987f246405f6d20b1a121e157940e0982f80eddb&
23:31:48FromDiscord<spaceshaman> the page it takes you to atm should be under a 'learn nim' tab
23:32:09FromDiscord<spaceshaman> you should never have to scroll for something so important
23:32:52*thomasross quit (Remote host closed the connection)
23:35:28*thomasross joined #nim
23:36:38FromDiscord<aintea> I do agree this should lead to the real docs and not to the learn Nim
23:37:00FromDiscord<Elegantbeef> "PRs welcome"
23:38:49FromDiscord<demotomohiro> If you really create a PR: https://github.com/nim-lang/website
23:41:47FromDiscord<demotomohiro> I think that documentation page is desgined for new comers.
23:49:30FromDiscord<spaceshaman> I might actually
23:51:05FromDiscord<spaceshaman> so the type of a function literal is... the same as declaring a function literal?
23:52:34FromDiscord<spaceshaman> sent a long message, see https://pasty.ee/cyKtfake
23:52:46FromDiscord<spaceshaman> (edit) "https://pasty.ee/FwLqkadh" => "https://pasty.ee/GGArFJJY"
23:52:52FromDiscord<spaceshaman> (edit) "https://pasty.ee/qgQmMTZb" => "https://pasty.ee/afOctaWT"
23:53:15FromDiscord<spaceshaman> that seems a little problematic
23:53:29FromDiscord<spaceshaman> the parser has my sympathy
23:59:50FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#types-procedural-type↵Top level procedures are `nimcall` in default. Procedures defined inside a procedure and refers local variables are closure.↵The calling convention of `type MyProc = proc()` is `closure`.