<< 26-07-2022 >>

00:02:43FromDiscord<theangryepicbanana> it seems to be caused by `=sink`
00:02:48FromDiscord<theangryepicbanana> or just sink semantics in general
00:02:53FromDiscord<Elegantbeef> Yes
00:03:11FromDiscord<theangryepicbanana> however, it's actually due to the `Value` type rather than `Dec64`
00:03:29FromDiscord<Elegantbeef> If you `move someParam` it forces it to be moved and 0's the source of the move
00:04:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45DH
00:04:22FromDiscord<Elegantbeef> `a == default(SomeObject)`\
00:05:10FromDiscord<theangryepicbanana> so then why is it happening with this
00:11:11FromDiscord<salt rock lamp> what happens if you call a nim function from c, but the nim function raises a nim exception?
00:12:27FromDiscord<Elegantbeef> Unhandled exceptions are unhandled
00:12:43FromDiscord<Elegantbeef> If you want to ensure your Nim procedure doesnt crash annotate it with `{.raises: [].}`
00:13:00FromDiscord<Elegantbeef> Banana if you want manually `move`ing it should copy when it sinks
00:15:11FromDiscord<Elegantbeef> if you arent manually\
00:16:49FromDiscord<theangryepicbanana> ok
00:18:07FromDiscord<theangryepicbanana> hmm so doing `mySeq[^1] = move value` copies, but `mySeq.add move value` sinks
00:18:12FromDiscord<theangryepicbanana> annoying
00:18:29FromDiscord<Elegantbeef> No both should sink
00:18:40FromDiscord<Elegantbeef> the usage of `move` enforces a sink
00:18:42FromDiscord<theangryepicbanana> well one works and one doesn't
00:19:51FromDiscord<theangryepicbanana> wack
00:20:24FromDiscord<theangryepicbanana> oh, assigning works without move
00:20:25FromDiscord<theangryepicbanana> ???
00:21:22FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DK
00:21:22FromDiscord<Arathanis> nimble removes quotation marks from passthrough commands, rip
00:22:16FromDiscord<Elegantbeef> Both are sink'd parameters so both should worrk
00:23:01FromDiscord<theangryepicbanana> that's so weird
00:23:14FromDiscord<Elegantbeef> It might be a bug with sink analysis
00:23:14FromDiscord<Arathanis> well whats happening is if I do this:↵`nimble build --passL:"-L. -lasdf"`
00:23:25FromDiscord<Elegantbeef> But if you can min repro it i'd take a more assertive message
00:23:29FromDiscord<Arathanis> its removing the quotes and doing `nim c --passL:-L. -lasdf`
00:24:02FromDiscord<Arathanis> and then the compiler complains that `-l` needs an argument cause its see it as `nim c -l`
00:24:06FromDiscord<Arathanis> cause the quotes are gone
00:24:16FromDiscord<Elegantbeef> Use a `config.nims`
00:24:42FromDiscord<Arathanis> aww but then I have to watch the incorrect import errors :P
00:25:11FromDiscord<Arathanis> I have gotten it working with a nimble task that does it correctly
00:26:27FromDiscord<theangryepicbanana> sent a code paste, see https://play.nim-lang.org/#ix=45DL
00:27:46FromDiscord<Yardanico> wait, are you using refc?
00:27:58FromDiscord<theangryepicbanana> I'm pretty sure it's orc
00:28:07FromDiscord<theangryepicbanana> oh, yeah
00:28:20FromDiscord<Yardanico> because `genericAssign` is not emitted with ARC/ORC
00:28:24FromDiscord<theangryepicbanana> hmm
00:28:30FromDiscord<theangryepicbanana> should I try switching to it?
00:28:56FromDiscord<Yardanico> do you see any `eqcopy` or `eqsink` in the generated C?
00:29:11FromDiscord<Yardanico> if no, then you're not using arc/orc so there's no sink/move analysis, proper destructors, etc
00:29:42FromDiscord<theangryepicbanana> yeah I see a bit of both
00:29:58FromDiscord<Yardanico> oh then it's orc I guess, sorry
00:30:49FromDiscord<theangryepicbanana> no it seemed to be refc
00:31:00FromDiscord<theangryepicbanana> switching to orc makes it crash elsewhere
00:31:40FromDiscord<theangryepicbanana> oh there we go
00:31:44FromDiscord<theangryepicbanana> that works, thanks
00:58:01*pch joined #nim
01:48:52*genpaku quit (Read error: Connection reset by peer)
01:52:42*genpaku joined #nim
02:04:31*byanka quit (Read error: Connection reset by peer)
02:12:37FromDiscord<Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=45DZ
02:15:45FromDiscord<Elegantbeef> It's probably that it's a generic procedure
02:16:08FromDiscord<Elegantbeef> It does not know which `concat` it's using until instantiation
02:17:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45E0
02:18:36FromDiscord<Professor Actual Factual> In reply to @Elegantbeef "It does not know": Oddly enough, by looking at references. It is able to find a single `concat` from the lib, but not `ones`↵Regardless of reasons why this happens, is there any way to work aronud this, its a huge productivity killer
02:19:11FromDiscord<Professor Actual Factual> Modifying the library is not an option here :L
02:19:28FromDiscord<Elegantbeef> This is just a thing with generics and overloads
02:20:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45E1
02:21:05FromDiscord<huantian> yeah generics and jump to def are always kind of a pain
02:21:26FromDiscord<Elegantbeef> There isnt much of a solution either
02:21:55FromDiscord<Professor Actual Factual> 😦↵Back to googling documentation i guess, thanks for the help :/
02:22:02FromDiscord<Elegantbeef> Why googling?
02:22:13FromDiscord<Elegantbeef> Open up the source code in your text editor and use search there
02:22:22FromDiscord<Professor Actual Factual> Google is faster
02:22:27FromDiscord<Elegantbeef> It's really not
02:22:29FromDiscord<Professor Actual Factual> esp on split screen
02:23:31FromDiscord<Professor Actual Factual> Ah I see you are correct for the most part, however the arraymancer documentation has its own HTML page via docgen
02:25:47FromDiscord<!Patitotective> i still live in 2002, i dont use any extension to tell me definitions or that stuff↵i open the docs in firefox
02:25:59FromDiscord<Elegantbeef> Well bless your slow heart
02:26:26FromDiscord<!Patitotective> its because nimlsp totally breaks in sublime
02:26:42FromDiscord<Elegantbeef> Works fine with kate ime
02:26:43FromDiscord<!Patitotective> so it blocks sublime built-in recommendations and its worse
02:26:45FromDiscord<ghoom> can one define a template that works like a method?
02:26:51FromDiscord<!Patitotective> In reply to @Elegantbeef "Works fine with kate": :[
02:26:58FromDiscord<!Patitotective> In reply to @ghoom "can one define a": no?...
02:26:58FromDiscord<Elegantbeef> All callables work with method syntax
02:27:05FromDiscord<ghoom> shweet
02:27:10FromDiscord<huantian> In reply to @Elegantbeef "There isnt much of": we have two generic systems, one with no mixin-ing and one with mixin-ing
02:27:17FromDiscord<huantian> ez
02:27:23FromDiscord<Elegantbeef> Lol
02:27:32FromDiscord<Elegantbeef> The issue is Nim implicitly mixins 😄
02:27:44FromDiscord<Elegantbeef> But it also implicitly binds
02:27:51*rockcavera joined #nim
02:29:13FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45E5
02:29:19FromDiscord<Elegantbeef> No
02:29:23FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45E5" => "https://play.nim-lang.org/#ix=45E6"
02:29:31FromDiscord<ghoom> that would be neat
02:29:58FromDiscord<Elegantbeef> I mean you can always cheat if you really wanted to
02:30:21FromDiscord<ghoom> cheat how
02:31:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45E7
02:32:01FromDiscord<Elegantbeef> that should be `args {.inject.}: typeof(arguments)`
02:32:25FromDiscord<ghoom> ok
02:32:38FromDiscord<KepKep> I know it's not a nim question but I wanted to try out nvim and I'm so confused rn is it supposed to just run in your command prompt like this? https://media.discordapp.net/attachments/371759389889003532/1001316080448458854/unknown.png
02:32:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45E8
02:32:41FromDiscord<Elegantbeef> God damn indented wrong
02:32:53FromDiscord<ghoom> take it ez
02:32:53FromDiscord<Elegantbeef> Yes nvim is a tui
02:33:11FromDiscord<huantian> also please don't use like
02:33:16FromDiscord<huantian> command prompt
02:33:20FromDiscord<huantian> at least use windows terminal
02:33:28FromDiscord<KepKep> I'm intrigued but confused
02:33:29FromDiscord<ghoom> XD
02:33:48FromDiscord<ghoom> naw dis guy's a real hacker 😎
02:33:57FromDiscord<ghoom> he don't need to fancy windows terminal
02:34:04FromDiscord<ghoom> (edit) "to" => "no"
02:34:16FromDiscord<KepKep> I'm completely new to this I've been usually just using vsc
02:34:17FromDiscord<ghoom> amirite kepkep
02:34:53FromDiscord<huantian> you might wanna checkout programs like <https://github.com/LunarVim/LunarVim>
02:34:57FromDiscord<!Patitotective> In reply to @Elegantbeef "Yes nvim is a": nvim is a concept
02:35:03FromDiscord<huantian> which help with a lot of configuring
02:36:45FromDiscord<KepKep> I think I might wanna stick to just being a mouse pleb :PikaDerp:
02:37:02FromDiscord<!Patitotective> just use the minimap 😎
02:37:05NimEventerNew thread by Morturo: Downloading big files, see https://forum.nim-lang.org/t/9327
02:37:11FromDiscord<huantian> how does minimap help you code
02:37:55FromDiscord<ghoom> exactly
02:37:56FromDiscord<huantian> but I would definitely recommend a proeconfigured vim thingy
02:38:05FromDiscord<huantian> so you don't have to spend time making it look good
02:38:06FromDiscord<!Patitotective> In reply to @huantian "how does minimap help": it makes you think of your code as a whole and not only the section you're watching 🧐
02:38:22FromDiscord<Elegantbeef> I've seen your code you don think about it atall↵(@!Patitotective)
02:38:27FromDiscord<ghoom> i only use it as an easy-to-click scrollbar
02:38:35FromDiscord<ghoom> :p
02:38:42FromDiscord<!Patitotective> In reply to @Elegantbeef "I've seen your code": :[
02:39:24FromDiscord<!Patitotective> In reply to @Elegantbeef "I've seen your code": gave up on writing lmao
02:44:56FromDiscord<ghoom> hey what does `out` do?
02:45:04FromDiscord<ghoom> i noticed it gets highlighted
02:45:05FromDiscord<Elegantbeef> Nothing it's reserved
02:45:11FromDiscord<ghoom> for what
02:45:26FromDiscord<Elegantbeef> Definite assignment variables
02:45:35FromDiscord<ghoom> what
02:45:52FromDiscord<Elegantbeef> Definite assignment parameters
02:46:03FromDiscord<ghoom> what are thoose
02:46:11FromDiscord<ghoom> 👀
02:46:12FromDiscord<Elegantbeef> Parameters that are checked and ensured to be assigned
02:46:30FromDiscord<ghoom> but why is it reserved lol
02:46:34FromDiscord<ghoom> 😭
02:46:43FromDiscord<Elegantbeef> Cause it might become used eventually
02:46:48FromDiscord<ghoom> mk
02:46:54FromDiscord<ghoom> hopefully
02:46:58FromDiscord<Elegantbeef> Not really
02:48:13FromDiscord<ghoom> damn it
02:48:48FromDiscord<KepKep> head hurty nvim hard , give back mouse :SadCat:
02:49:45FromDiscord<ghoom> learning to use the keyboard for everything really pays off mate
02:50:03FromDiscord<ghoom> kepkep, train hard my man
02:50:19FromDiscord<!Patitotective> In reply to @KepKep "head hurty nvim hard": R no
02:50:45FromDiscord<KepKep> I'm just like highly confused, is there any real difference between vim and nvim or can I look at vim tutorials too to try to figure out what the hell is going in
02:50:48FromDiscord<KepKep> (edit) "in" => "on"
02:51:09FromDiscord<ghoom> yeah nvim has all stuff vim has
02:51:13FromDiscord<ghoom> plus more
02:51:25FromDiscord<ghoom> so you're fine looking at vim tuts
02:51:34FromDiscord<Elegantbeef> You dont look at tutorials you look up shortcuts! 😄
02:51:43FromDiscord<ghoom> yes
02:52:03FromDiscord<!Patitotective> In reply to @KepKep "I'm just like highly": nvim is a fork of vim focused on community contributing and fix major vim issues
02:52:14FromDiscord<!Patitotective> its meant to be fully compatible
02:52:19FromDiscord<KepKep> brother I spent like 3 min looking at my console window confused untill it hit me that THAT is nvim
02:53:13FromDiscord<KepKep> well thanks I'll go look at some beginner tutorials to figure out how to start using this
02:53:51FromDiscord<!Patitotective> :Tutor
02:53:56FromDiscord<!Patitotective> 30 minutes tutorial
02:54:04FromDiscord<KepKep> learning nim and vim together just so I can tell people I code nim in vim cause it sounds funny :RatirlBusiness:
02:54:13FromDiscord<ghoom> indeed
02:54:19FromDiscord<ghoom> nim'ndeed
02:54:37FromDiscord<ghoom> nimdeed
02:55:30FromDiscord<Rika> In reply to @Patitotective "its meant to be": It isn’t though
02:56:01FromDiscord<Rika> Some Vim 8/9 duplicate features aren’t mirrored in Neovim of course
02:57:13FromDiscord<KepKep> been enjoying reading through the nim stuff tho , didn't read much cause of time but seems cool, even a pepega pyton enjoyer like me can understand most of it
02:57:37FromDiscord<KepKep> brain struggles to mash C like performance with Indent syntax tho
03:04:16FromDiscord<ghoom> lol
03:04:41FromDiscord<ghoom> yo can one specify parameter types in template definitions?
03:04:59FromDiscord<Elegantbeef> Yes...
03:06:02FromDiscord<ghoom> phew
03:06:19FromDiscord<ghoom> i thought it was strictly like c macros
03:12:34FromDiscord<ghoom> sent a code paste, see https://paste.rs/2QL
03:12:44FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45Eg" => "https://paste.rs/6LE"
03:12:45FromDiscord<huantian> no not like that
03:14:39FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=45Eh
03:14:53FromDiscord<huantian> (edit) "https://play.nim-lang.org/#ix=45Eh" => "https://play.nim-lang.org/#ix=45Ei"
03:15:36FromDiscord<huantian> the return variable of `makeIncrementer` is a closure proc implicitly↵this closure captured the variable `n` and is able to access and modify `n`'s value even after `makeIncrementer` has finished
03:16:07FromDiscord<ghoom> ooh ok
03:16:10FromDiscord<Arathanis> i think the problem is 2-fold:↵↵1. X needs to be defined before the closure using it↵2. blocks create scope so even if you reordered the blocks it wont work since they are different scopes
03:16:11FromDiscord<Arathanis> https://media.discordapp.net/attachments/371759389889003532/1001327042450702366/unknown.png
03:17:11FromDiscord<Arathanis> in this case you could just use a global
03:17:24FromDiscord<Arathanis> and what @huantian sent is a more realistic use of a closure
03:17:51FromDiscord<ghoom> 🐸👍
03:44:10*arkurious quit (Quit: Leaving)
03:55:09FromDiscord<halc> is there a cleaner way to get a `NimNode`'s children as a `seq` or any kind of `OpenArray`-compatible other than `node.children.toSeq`?
03:55:27FromDiscord<halc> (edit) "other" => "type"
03:55:45FromDiscord<halc> (edit) "is there a cleaner way ... totype?" added "than `node.children.toSeq`" | "type than `node.children.toSeq`?" => "type?"
03:55:57FromDiscord<Elegantbeef> Not that i know of
04:08:33FromDiscord<# Luke> how can i split an image diagnally and only keep 1 half of it
04:09:11FromDiscord<!Patitotective> pixie? and some search for an algorithm lol
04:09:23*FromDiscord quit (Remote host closed the connection)
04:09:37*FromDiscord joined #nim
04:26:40FromDiscord<ghoom> halp `'args' is of type <varargs[string]> which cannot be captured as it would violate memory safety`
04:26:58FromDiscord<Elegantbeef> `seq[T]` instead
04:27:04FromDiscord<ghoom> 😭
04:27:12FromDiscord<ghoom> looks less sexy
04:27:27FromDiscord<Elegantbeef> i mean you can take in varargs but then do `let myargs = args.toSeq`
04:27:31FromDiscord<Elegantbeef> Or rather `@args`
04:30:30FromDiscord<ghoom> the problem is that the args are varargs
04:30:39FromDiscord<Elegantbeef> The above solves that
04:30:47FromDiscord<ghoom> nah
04:31:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=45Eo
04:31:20FromDiscord<Elegantbeef> `varargs[auto]`
05:36:42FromDiscord<ghoom> how do i install a local package globally?
05:45:38FromDiscord<Rika> nimble develop↵Inside the package directory
05:49:12FromDiscord<wiga> is there inline variables in nim?
05:49:25FromDiscord<wiga> like ${} in node or {} in python
05:49:54FromDiscord<wiga> i looked on google and found nothing so idk if i miss smth or its just not existant
05:51:06FromDiscord<Rika> strformat module
05:51:20FromDiscord<Rika> similar format as python
05:52:05FromDiscord<wiga> ty
05:52:25FromDiscord<Rika> 👌
05:52:38FromDiscord<ghoom> In reply to @Rika "nimble develop Inside the": didnt work
05:52:46FromDiscord<Rika> What happened
06:02:56*estiquelapice quit ()
06:20:23FromDiscord<Arathanis> how the heck does nimsuggest work
06:29:09FromDiscord<creikey> In reply to @Arathanis "how the heck does": https://www.mturk.com/
06:29:34FromDiscord<wiga> is it possible to get the length of a table?
06:29:52FromDiscord<huantian> https://nim-lang.org/docs/tables.html#len%2CTable%5BA%2CB%5D
06:30:00FromDiscord<huantian> `table.len`
06:30:07FromDiscord<wiga> i tried
06:30:16FromDiscord<wiga> didnt worked
06:30:30FromDiscord<huantian> how did it not work
06:30:35FromDiscord<huantian> is there an error
06:30:51FromDiscord<wiga> https://media.discordapp.net/attachments/371759389889003532/1001376031158063104/unknown.png
06:30:59FromDiscord<wiga> https://media.discordapp.net/attachments/371759389889003532/1001376065538768896/unknown.png
06:31:11FromDiscord<huantian> did you `import std/tables`?
06:31:36FromDiscord<wiga> 😅 no
06:31:40FromDiscord<wiga> ty tho
06:31:52FromDiscord<huantian> all good easy problem to make
06:31:53FromDiscord<wiga> i should really sleep more lol
06:32:07FromDiscord<huantian> also curious, what does intToStr do?
06:32:18FromDiscord<wiga> takes an int
06:32:26FromDiscord<wiga> and transform it to a string
06:32:37FromDiscord<huantian> is it the same as `$` on ints?
06:32:50FromDiscord<wiga> dunno
06:33:00FromDiscord<wiga> i just saw it in my intellisense
06:33:04FromDiscord<wiga> and used it lol
06:33:10FromDiscord<huantian> cus if there's no fancy logic you could just do `$g.members.len`
06:33:35FromDiscord<wiga> it does the same thing ig
06:34:09FromDiscord<wiga> it does in fact the same thing
06:34:31FromDiscord<huantian> oh I see, `intToStr` has an optional argument that lets you pad out the int with leading zeros
06:35:11FromDiscord<wiga> i didnt dug too deep, i just saw "intToStr" and i was like "it does what i want" so i used it
06:35:22FromDiscord<huantian> so if you don't need the padding I think you can just use `$`
06:35:22FromDiscord<wiga> never knew $ was doing that tho
06:35:51FromDiscord<huantian> yeah `$` is the general nim string-ifier, the same as C#'s `ToString()` and python's `str()`
06:36:07FromDiscord<wiga> toString() is not only on cs lol
06:36:15FromDiscord<wiga> its literally everywhere
06:36:37FromDiscord<huantian> Yeah but I can’t just list all of em 😛
06:36:46FromDiscord<wiga> java,javascript,powershell for the most popular one
06:37:35FromDiscord<wiga> can u help me test smth?
06:37:46FromDiscord<Rika> Tell us what it is first lol
06:38:02FromDiscord<wiga> im making a discord bot and i wanna see if my welcome message works
06:39:17FromDiscord<wiga> and like all my friends are sleeping
06:39:25FromDiscord<wiga> and i dont have alt acc anymore they all got termed
06:39:46FromDiscord<wiga> and i dont have any mail to make new acc anymore lol
06:40:43FromDiscord<Rika> Eh
06:41:29FromDiscord<wiga> yeah
06:41:32FromDiscord<wiga> that sucks
06:41:52FromDiscord<wiga> even this account is an alt cuz my main got disabled
06:42:04FromDiscord<wiga> its the only one i have lmao
06:44:28FromDiscord<wiga> nvm i got helped
06:44:32FromDiscord<wiga> works perfectly
06:45:12FromDiscord<Rika> Congrats
06:46:17FromDiscord<wiga> im suprised on how nim can be easy sometime
08:07:00*tiorock joined #nim
08:07:00*tiorock quit (Changing host)
08:07:00*tiorock joined #nim
08:07:00*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
08:07:00*tiorock is now known as rockcavera
08:17:29FromDiscord<Prestige> How do I obtain the value of a defined symbol? e.g. `nim r -d:seed=123 foo.nim` I want to get the value of `seed`
08:23:54FromDiscord<creikey> In reply to @Avahe "How do I obtain": from what I understand you just use seed?
08:24:00FromDiscord<creikey> or make it a constant in your code
08:24:07FromDiscord<creikey> then it's set on compile time
08:24:12FromDiscord<creikey> like `const seed: int = 0`
08:25:23FromDiscord<Prestige> by default it just says it isn't defined, inside a `when defined(seed):` block, lol
08:25:46FromDiscord<Rika> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas
08:33:33FromDiscord<Prestige> Thanks
08:33:33FromDiscord<jmgomez> Is it possible to parallelise macro code?
08:33:33FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45Gl
08:33:34FromDiscord<Rika> In reply to @jmgomez "Is it possible to": No
08:33:34FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=45Gn
08:49:35FromDiscord<lantos> trying to work out how to make httpclient body stream an itter
08:49:54FromDiscord<lantos> (edit) "itter" => "iter so you can do stuff to the chunks"
09:27:07*tafa left #nim (Leaving)
09:54:12FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=45Hc
09:55:24FromDiscord<Rika> You don’t
09:55:42FromDiscord<Rika> The concept doesn’t exist in Nim so I don’t think you do
09:56:49FromDiscord<jmgomez> Im getting around it by doing reinterpret_cast maybe we should have a way to specify it in the importcpp syntax or something
10:05:06*CyberTailor joined #nim
10:28:17*CyberTailor quit (Ping timeout: 268 seconds)
11:03:28FromDiscord<Phil> In reply to @jmgomez "Is it possible to": Out of curiosity, what is the concept behind that question?↵Is this about speeding up compile times?
11:13:04*CyberTailor joined #nim
11:14:40FromDiscord<jmgomez> In reply to @Isofruit "Out of curiosity, what": Yup. I have a macro that does a bunch of stuff into a proc and I generally apply it to a bunch of them at the time one by one
11:56:29FromDiscord<Bloss> what is up with the playground?
12:00:26FromDiscord<flywind> In reply to @blans "what is up with": It has been down for few days.
12:29:29FromDiscord<Phil> In reply to @jmgomez "Yup. I have a": IIRC most of the time is spent either way for the compilation to binary step
12:40:14FromDiscord<vindaar> that really depends. for macro heavy code evaluating all the macro logic can be very time consuming (compile the `unchained` or `datamancer` tests to get an idea of that)
13:03:39FromDiscord<jmgomez> I see. Im trying to measure it with cpuTime() but not sure if its really working because it's giving me 0. What do I have to import in order to get exec to work in macro time so I can call shell with sleep (just to make sure cpuTime is actually doing the right thing)?
13:31:16FromDiscord<flywind> In reply to @jmgomez "I see. Im trying": Enable benchmarkVM
13:31:25FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=45Iv
13:31:29FromDiscord<flywind> (edit)
13:31:38FromDiscord<flywind> Otherwise it won't work.
13:35:43*CyberTailor quit (Remote host closed the connection)
13:38:56*CyberTailor joined #nim
13:45:42FromDiscord<jmgomez> In reply to @flywind "Enable benchmarkVM": Thanks!
13:45:47*arkurious joined #nim
13:46:44FromDiscord<@bracketmaster-5a708063d73408ce4> I used to use Nim a lot in 2021 - but I got converted to Rust.
13:46:59FromDiscord<@bracketmaster-5a708063d73408ce4> Should I come back to Nim?
13:48:15FromDiscord<jmgomez> In reply to @Isofruit "IIRC most of the": it only takes 0.033ms for an increase of time of ~1.5 so I guess you are right. Is there something else than can be done?
13:49:55FromDiscord<Phil> In reply to @jmgomez "it only takes 0.033ms": To speed up compile times?↵none that I'm aware of
13:50:47FromDiscord<Phil> In reply to @@bracketmaster-5a708063d73408ce4 "Should I come back": Write nim if it's fun for you. Don't if you don't want to.
13:50:52FromDiscord<Rika> In reply to @@bracketmaster-5a708063d73408ce4 "I used to use": Well why did you switch in the first place
13:52:35FromDiscord<jmgomez> In reply to @Isofruit "To speed up compile": Ok, not sure if can do something else on my end. But for now, I will let it as it is, and split it into more files if necessary
13:53:53FromDiscord<Phil> In reply to @jmgomez "Ok, not sure if": Don't take my words as gospel, almost anyone here has more knowledge about the compiler than I do. The peak of my compiler knowledge is knowing flags that let me swap out gcc
13:54:31FromDiscord<Rika> If you really want, TCC is fast as a C compiler
13:54:37FromDiscord<flywind> I dont know any good and stable solution to reduce compilation time. Probably profile the Nim compiler when compiling your projects and report hot spots to the Nim issue track.
13:56:16FromDiscord<jmgomez> In reply to @Rika "If you really want,": I need to use clang/vcc because of UE/Cpp. ↵The macro is massive anyways, it generates a bunch of stuff behind the scenes. I would love to get it run faster but it is what it is
13:56:18FromDiscord<jmgomez> Thanks
13:56:30FromDiscord<jmgomez> (edit) "In reply to @Rika "If you really want,": I need to use clang/vcc because of UE/Cpp. ↵The macro is massive anyways, it generates a bunch of stuff behind the scenes. I would love to get it ... run" added "to"
13:57:45*wallabra_ joined #nim
13:58:30FromDiscord<@bracketmaster-5a708063d73408ce4> Rust macros seemed to have less dark corners than Nim's↵(@Rika)
13:58:39FromDiscord<@bracketmaster-5a708063d73408ce4> Also this - https://www.egui.rs
13:58:53FromDiscord<@bracketmaster-5a708063d73408ce4> Rust has really cool GUI options for native and WASM
14:00:11FromDiscord<Rika> Rust macros feel like they have more dark corners, to me
14:00:20*wallabra quit (Ping timeout: 268 seconds)
14:00:21*wallabra_ is now known as wallabra
14:02:37FromDiscord<@bracketmaster-5a708063d73408ce4> I was trying to create a DSL in rust - and Rust lets me get the variable names as well as line numbers more easily
14:02:48FromDiscord<@bracketmaster-5a708063d73408ce4> But I think Nim is probably more fun than Rust
14:03:27FromDiscord<@bracketmaster-5a708063d73408ce4> But Rusts's Algebraic Data Types and haskell like functional programming makes writing larger compiler in Rust far more practical
14:04:17FromDiscord<@bracketmaster-5a708063d73408ce4> And it turned out that I didn't need the garbage collector as much as I thought I did
14:55:38*mdbauman joined #nim
15:08:38FromDiscord<treeform> In reply to @ripluke "I’m using zig to": You can define `--d:pixieNoSimd` to skip the simd.
15:09:13FromDiscord<Professor Actual Factual> In reply to @@bracketmaster-5a708063d73408ce4 "And it turned out": Picking the right tool for the job is often more important imo.↵There are areas where rust excels and other where nim does.↵For example i much prefer doing cli tools and script like work in nim
15:09:43FromDiscord<treeform> you can also do `--d:pixieNoAvx` if you want sse2 but not avx
15:14:10FromDiscord<Rika> treeform how usable is pixie in embedded lol
15:18:11*wallabra_ joined #nim
15:19:59*wallabra quit (Ping timeout: 255 seconds)
15:19:59*wallabra_ is now known as wallabra
15:21:29FromDiscord<Arathanis> Is there a list of built-in compiler symbols to be queried with `when`? Specifically which backend (c, cpp, js) is being used?
15:22:58FromDiscord<flywind> In reply to @Arathanis "Is there a list": See `std/compilersettings` => https://nim-lang.github.io/Nim/compilesettings.html
15:23:05FromDiscord<flywind> (edit) "`std/compilersettings`" => "`std/compilesettings`"
15:23:40FromDiscord<Arathanis> In reply to @flywind "See `std/compilesettings` => https://nim-lang.githu": appreciate it
15:28:08FromDiscord<Arathanis> This works! How do you use it for conditional compilation? Like defining a function in different ways depending on backend.
15:39:41FromDiscord<ghoom> any c++ namespace equivalent in nim?
15:40:28FromDiscord<demotomohiro> In reply to @ghoom "any c++ namespace equivalent": Nim's module is closest to c++ namespace but not equivalent.
15:40:39FromDiscord<ghoom> how about c's `##` operator!
15:40:40FromDiscord<ghoom> (edit) "operator!" => "operator?"
15:40:47FromDiscord<ghoom> for macros
15:43:46FromDiscord<demotomohiro> You can get variable names as string in macro with `strVal` and concatenate them with `&`.
15:44:07FromDiscord<demotomohiro> In template:↵https://nim-lang.org/docs/manual.html#templates-identifier-construction
15:45:54FromDiscord<ghoom> sent a code paste, see https://paste.rs/sFX
15:47:04FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45Jz" => "https://play.nim-lang.org/#ix=45Jy"
15:49:46FromDiscord<demotomohiro> For example: https://wandbox.org/permlink/vhDmyeNgechQ5HKJ
15:51:13FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45JA
15:51:18FromDiscord<ghoom> it worked
15:51:29FromDiscord<ghoom> 🐸👍
15:58:24NimEventerNew thread by Planetis: How to copy a random field into another of the same type at runtime?, see https://forum.nim-lang.org/t/9328
16:01:35FromDiscord<ghoom> how do i declare a global variable from inside a scope
16:02:41FromDiscord<ghoom> nvm i just use `{.global.}`
16:10:31FromDiscord<Idän Koodari> sent a code paste, see https://play.nim-lang.org/#ix=45JG
16:11:41FromDiscord<Idän Koodari> (edit) "https://play.nim-lang.org/#ix=45JG" => "https://play.nim-lang.org/#ix=45JH"
16:12:40FromDiscord<Phil> Wasn't hcr still experimental ?
16:14:06FromDiscord<Idän Koodari> Could be, I just read an article about it and became interested in the language and decided to try it out.
16:14:25FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45JI
16:14:46FromDiscord<ghoom> (edit) "https://play.nim-lang.org/#ix=45JI" => "https://play.nim-lang.org/#ix=45JJ"
16:15:49FromDiscord<Phil> I've written a fairly large webpage with it and ignored hcr so far mostly because I believed it to be experimental. Not that it was necessary, compile times were okay either way
16:16:10*pch quit (Remote host closed the connection)
16:17:49FromDiscord<Phil> I can play around a bit with it later and see what I can gather on whether it works for me idan
16:18:02FromDiscord<Phil> I'll be working on my project in a bit anyway
16:19:11FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=45JK
16:19:57FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=45JL
16:20:27FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=45JM
16:20:56FromDiscord<Idän Koodari> In reply to @Isofruit "I've written a fairly": Yup and it is a pretty nice lang overall, I just wish I didn't have to reload the window lose my gamestate when I wanted to change the size of a box :P I got used to how nice the hot reloading is in V, but the language was still very much unfinished in other areas and became a pain in the ass to use for game dev in the long run.
16:21:11FromDiscord<Idän Koodari> In reply to @Isofruit "I can play around": Thanks, let me know if you get it working 👍
16:26:40FromDiscord<ghoom> In reply to @demotomohiro "https://nim-lang.org/docs/manual.html#templates-lim": can i at least make the template a symbol and use it as a binary operator?
16:26:47FromDiscord<ghoom> (edit) "In reply to @demotomohiro "https://nim-lang.org/docs/manual.html#templates-lim": can i at least make the template ... a" added "name"
16:28:06FromDiscord<ghoom> sent a code paste, see https://paste.rs/LMP
16:28:20FromDiscord<Rika> In reply to @ghoom "no commas seems to": i dont think it will be fine
16:28:36FromDiscord<demotomohiro> In reply to @ghoom "can i at least": https://nim-lang.org/docs/manual.html#lexical-analysis-operators
16:28:37FromDiscord<Rika> In reply to @ghoom "can i at least": only if your name is within a specific list of names
16:28:48FromDiscord<Rika> as in the list tomohiro sent
16:29:24FromDiscord<demotomohiro> You cannot use arbitrary name as binary operator.
16:29:38FromDiscord<ghoom> ofc
16:31:32FromDiscord<ghoom> In reply to @Rika "no need for the": the "_" is necessary to differentiate something like `ab_c` and `a_bc`
16:32:40FromDiscord<Rika> that does not exist in nim 🙂 style insensitivity
16:35:31qwrfoobar and fooBar are not same in nim
16:35:31FromDiscord<flywind> In reply to @Idän Koodari "I wanted to try": The alternative solution is to use nimscript to do embed script programming language. See https://github.com/beef331/nimscripter and https://github.com/jmgomez/NimForUE#hot-reloading-and-debugging-poc-video
16:36:52qwrhm, or are?
16:37:31*qwr stupid
16:37:34FromDiscord<Phil> I think they are
16:37:38FromDiscord<Phil> Case insensitivity
16:38:14FromDiscord<Phil> Iirc they also work with underscores
16:38:22FromDiscord<wiga> is there some kind of deamon for nim programs?
16:38:36FromDiscord<wiga> so when i save the script it restarts automatically
16:38:41FromDiscord<wiga> like nodemon
16:39:35FromDiscord<wiga> cuz yeah uh https://media.discordapp.net/attachments/371759389889003532/1001529224789753886/unknown.png
16:39:42qwryes, i somehow thought that it distinguised between words in identifier, but it doesn't do it :)
16:40:31FromDiscord<Rika> In reply to @wiga "is there some kind": not that i know of
16:40:47FromDiscord<Rika> In reply to @qwr "yes, i somehow thought": only the first letter is distinguished
16:46:41FromDiscord<flywind> In reply to @Isofruit "I can play around": hcr lacks development and no one knows how broken it is. Imo nimscript should serve as a better better solution for the web reloading development. It would better to experiment on beef's nimscripter 😜
16:47:18FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality
16:48:06FromDiscord<flywind> (edit) "In reply to @Isofruit "I can play around": hcr lacks development and no one knows how broken it is. Imo nimscript should serve as a better better solution for the web reloading development. It would ... better" added "be"
16:48:13FromDiscord<Phil> In reply to @flywind "hcr lacks development and": How does that actually work?↵Does script trigger compile of individual files and those can magically be used at runtime?
16:49:23FromDiscord<demotomohiro> In reply to @flywind "hcr lacks development and": It seems not many people use HCR. I dont see much questions about HCR in here or Nim forum.
16:52:48FromDiscord<reversem3> @can.l\: I guess, I'm not understanding how proc changed is working , can you look at my code please ? The more I understand this Library the better. https://hatebin.com/kqpbahqyqb
16:53:58FromDiscord<flywind> In reply to @Isofruit "How does that actually": Yeah. The Nim program will start an interpreter to execute the Nimscript. So the Nim program can accesa the data from nimscript. Vice versa.
16:55:04FromDiscord<flywind> See also https://peterme.net/how-to-embed-nimscript-into-a-nim-program-embedding-nimscript-pt-2.html
16:55:22FromDiscord<Rika> In reply to @demotomohiro "It seems not many": its not very common outside of game/(frontend)web development i believe
16:56:46FromDiscord<flywind> In reply to @flywind "See also https://peterme.net/how-to-embed-nimscript": nimscripter is the easier way to interoperate between Nim and Nimscript.
16:59:10FromDiscord<Phil> Though that would mean I would first need to play around with nimscript
16:59:33FromDiscord<demotomohiro> In reply to @Rika "its not very common": I see
17:02:26*wallabra_ joined #nim
17:04:10FromDiscord<can.l> In reply to @reversem3 "<@893965307171979326>\: I guess, I'm": This should not compile since temperature is not a field of Entry.
17:04:32*wallabra quit (Ping timeout: 244 seconds)
17:04:32*wallabra_ is now known as wallabra
17:04:41FromDiscord<flywind> In reply to @Isofruit "Though that would mean": You can think of nimscript as Nim with interpreter backend. Though there is no gc support and c ffi.
17:07:10FromDiscord<dom96> In reply to @wiga "cuz yeah uh": that's not how you spell daemon
17:09:11FromDiscord<Phil> At a first glance, just to at least try hcr out, I think it might be completely broken due to the system lib not complying with that flags needs
17:10:18FromDiscord<Phil> > /home/philipp/.choosenim/toolchains/nim-1.6.6/lib/system/seqs_v2.nim(78, 11) Error: setLen(x, newLen) can have an unlisted effect: RootEffect↵↵That's not my own code that's causing the error, that's procs for initializing a seq causing issues
17:10:34FromDiscord<Phil> (edit) "> /home/philipp/.choosenim/toolchains/nim-1.6.6/lib/system/seqs_v2.nim(78, 11) Error: setLen(x, newLen) can have an unlisted effect: RootEffect↵↵That's not my own code that's causing the error, that's ... procs" added "system"
17:10:55FromDiscord<Phil> Given that nimscript appears to be better supported with nimscripter that might not just be the better, but only route
17:11:12FromDiscord<flywind> The error looks quite familiar to Nim. How about the devel compiler.
17:11:23FromDiscord<flywind> (edit) "Nim." => "mr."
17:11:27FromDiscord<Phil> errrr which command was it again to swap to devel?
17:11:31FromDiscord<Phil> nimble devel?
17:11:50FromDiscord<flywind> choosenim devel for me
17:11:57FromDiscord<Phil> check, works
17:12:01FromDiscord<Phil> now to compile
17:12:32FromDiscord<flywind> (edit) "mr." => "me."
17:13:34FromDiscord<Phil> In reply to @flywind "The error looks quite": devel causes systems module to no longer be the issue!↵There appear to still be some with the os module though with `walkDirRec` which... I never directly call in my code... huh.↵> /home/philipp/.choosenim/toolchains/nim-#devel/lib/pure/os.nim(2371, 74) template/generic instantiation from here↵> /home/philipp/.choosenim/toolchains/nim-#devel/lib/pure/os.nim(2416, 14) Error: add(stack, rel
17:14:11FromDiscord<Phil> > stack.add rel↵Appears to be the problem child there
17:15:34FromDiscord<Phil> overall I'd guess that you really should go the nimscripter route as hcr is likely to lynch you due to std lib usage
17:15:57FromDiscord<Prestige> In reply to @wiga "cuz yeah uh": do you mean daemon?
17:19:12FromDiscord<flywind> In reply to @Isofruit "devel causes systems module": It is probably fixed by my pr https://github.com/nim-lang/Nim/pull/19512/files
17:19:50FromDiscord<Phil> In reply to @flywind "It is probably fixed": Nice!
17:20:14FromDiscord<Phil> Thanks for your contribution there!
17:20:32FromDiscord<flywind> I mean the former one, the latter one in the os module still needs some patches.
17:21:09FromDiscord<Phil> In reply to @flywind "I mean the former": Yeh, I gathered it as such ^^
17:21:12FromDiscord<flywind> {.cast(tags: []).}: add(stack, rel)
17:21:25FromDiscord<flywind> probably.
17:22:45FromDiscord<Phil> As someone who never interoped with C++ and has a high chance of never doing so, is this statement true?↵> Nim is easy to read, fast, with a good type system a fantastic macro system and it also has the best C++ interop in the industry.↵Like, I like nim but that raised my eyebrow a bit
17:24:40FromDiscord<flywind> Where is the statement, I am not sure it has the best cpp interop in the industry.
17:25:45FromDiscord<Phil> Reading through the two links on hot code reloading with nimscript. First line on the "Why Nim" section of the nim for ue repo
17:26:38FromDiscord<Phil> I can't evaluate that statement, was mostly curious on how far the interop convenience goes there
17:26:56FromDiscord<Phil> I'd imagine it classifies as "good" so far
17:27:37FromDiscord<flywind> Yeah, I agree.
17:28:10FromDiscord<ghoom> how can i mark a callable as a binary operator?
17:28:50FromDiscord<Rika> wdym? whats the name of the proc
17:29:00FromDiscord<ghoom> "on"
17:29:13FromDiscord<Rika> you cannot
17:30:10FromDiscord<Rika> it must be in this list `and or not xor shl shr div mod in notin is isnot of as from`
17:30:38FromDiscord<Phil> In reply to @flywind "Yeah, I agree.": On an unrelated note, looking at nimscripter, isn't it mostly concerned with using nimscript within normal nim and their interop, rather than enabling hot code reloading. Was the idea to write most of the backend using nimscript and thus enabling hot code reloading?
17:30:52FromDiscord<Phil> (edit) "code reloading." => "code?reloading."
17:30:58FromDiscord<Phil> (edit) "code?reloading." => "code reloading?"
17:32:57FromDiscord<flywind> nimscripter is intetpreted. If you changed the nimscript, you dont need to recompiler the Nim program, just run the executable.
17:33:37FromDiscord<flywind> (edit) "recompiler" => "recompile"
17:33:46FromDiscord<flywind> (edit) "nimscripter" => "nimscript"
17:33:53FromDiscord<reversem3> You're right it doesn't compile↵(@can.l)
17:34:44FromDiscord<can.l> In reply to @reversem3 "You're right it doesn't": Change the line where you assign temperature = app.temperature to text = app.temperature
17:34:48FromDiscord<flywind> In reply to @Isofruit "On an unrelated note,": Write some logics and data in the nimscript I think.
17:34:58FromDiscord<Phil> In reply to @flywind "nimscript is intetpreted. If": Ahhh, but that means it only reduces compile time if I were to write my entire application in nimscript (maybe beyond a certain core that needs all of nim), no?
17:35:09FromDiscord<Phil> (edit) "beyond" => "except for"
17:35:55FromDiscord<Elegantbeef> Dont use niimscript cause you want HCR 😄
17:36:52FromDiscord<Phil> Yeh, so far I had imagined the usecase for nimscript mostly for code around building a nim-project, less for actual code
17:37:53FromDiscord<flywind> In reply to @Isofruit "Ahhh, but that means": You cannot because nimscript doesnt support c ffi. Unless you use a custom Nim compiler and register everything as a vm callback. nimscript is much slower than c backend.
17:38:37FromDiscord<flywind> When everything is settled, rewrite them in actual Nim code.
17:40:14FromDiscord<flywind> Nim c backend always need to semcheck and compile every modules it imports even a small change in this module.
17:45:20FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45K6
17:45:46FromDiscord<ghoom> why are "()" necessary here?
17:45:51FromDiscord<ghoom> (edit) ""()"" => "`()`"
17:50:22FromDiscord<Shiba> is there an option for the nim compiler that showes how much lines are compiled for each .nim file ?
17:50:49FromDiscord<Shiba> (edit) "showes" => "shows"
17:53:54FromDiscord<Phil> In reply to @flywind "When everything is settled,": I think unless compiling the code without release takes more than 5 minutes I wouldn't use nimscript for prototyping
17:54:27FromDiscord<Phil> That seems like it'd be too much effort
17:56:55FromDiscord<flywind> True, though I need incremwntal compilation because I like to make small changes frequently.
17:57:05FromDiscord<flywind> (edit) "incremwntal" => "incremental"
17:58:28FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=45K9
18:01:27FromDiscord<ghoom> In reply to @demotomohiro "It seems your template": ah, so when i add `()` it becomes `proc() echo "!"`?
18:01:41FromDiscord<ghoom> makes sense
18:01:47FromDiscord<ghoom> :p
18:01:56FromDiscord<ghoom> frogs ain't da smartest you know?
18:02:53FromDiscord<Shiba> In reply to @flywind "True, though I need": we all need it
18:03:26FromDiscord<Phil> In reply to @ghoom "frogs ain't da smartest": I'll undercut you in the smartness department, people keep accusing me of writing java in nim
18:03:43FromDiscord<ghoom> bro what
18:04:08FromDiscord<Phil> You'll need to ask Rika and Beef on that one, I'll keep dementing it any day of the week
18:04:26FromDiscord<Phil> All I'm doing is using the Repository pattern which is basically the bog standard for webdev using relational db's without graphql
18:04:46FromDiscord<Elegantbeef> Well phil if you quit writing java in Nim we'd shush 😛
18:05:07FromDiscord<Phil> I am not writing java in nim though! I shall keep dementing these baseless accusations!
18:05:34FromDiscord<ghoom> 🫂👍
18:05:56FromDiscord<Phil> ~~All I'm writing is a completely needlessly fast webpage~~
18:11:57*CyberTailor quit (Read error: Connection reset by peer)
18:13:04*CyberTailor joined #nim
18:16:34FromDiscord<Phil> In reply to @Idän Koodari "Thanks, let me know": For short, if you have really long compiletimes, it might be worth contemplating to prototype new code in nimscript and rewriting that to full nim if it works. Other than that your biggest hope is waiting for incremental compilation to arrive one day
18:22:08FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Kd
18:22:45FromDiscord<ghoom> i don't wanna do `proc() {.async.}`
18:23:05FromDiscord<Rika> In reply to @Isofruit "I am not writing": "dementing"?
18:23:13FromDiscord<Rika> you're gonna give the accusations alzheimers?
18:23:49FromDiscord<Rika> In reply to @ghoom "i don't wanna do": you cannot
18:23:55FromDiscord<Rika> cannot avoid it i mean
18:23:58FromDiscord<ghoom> ok
18:30:53FromDiscord<exelotl> In reply to @Isofruit "For short, if you": Every day I wake up and pray IC will land before I finish my game 😅
18:30:58FromDiscord<reversem3> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: can I bug you to look at some code ?
18:36:06FromDiscord<reversem3> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: https://hatebin.com/knrzyulnjl -- So I have my proc and the proc changed does work , if you input something in one entry it will be the same in the other entry , but I can figure out how to incorporate the proc Fahrenheit into the app.temperature in the Celsius entry.
18:38:05FromDiscord<Phil> In reply to @Rika ""dementing"?": Turns out the german "Dementieren" does not translate to english as I had thought
18:38:29FromDiscord<Rika> HAHAHAHAHA
18:38:32FromDiscord<Rika> what did you think
18:38:34FromDiscord<Phil> It's denying/disclaiming instead over here and there is no actual verb around dementieren
18:38:53FromDiscord<Rika> honestly that was pretty fucking funny
18:39:09FromDiscord<Phil> Language traps you in the little things
18:39:42FromDiscord<Rika> had a similar discussion earlier
18:39:47FromDiscord<Rika> about natrium and kalium
18:40:08FromDiscord<Rika> In reply to @Rika "had a similar discussion": somewhere else
18:41:27FromDiscord<ghoom> how do i make parentheses not be part of a template's argument?
18:43:09FromDiscord<Rika> what do you mean
18:43:10FromDiscord<Shiba> In reply to @Shiba "is there an option": ?
18:43:22FromDiscord<Rika> In reply to @Shiba "?": im not aware of any
18:45:25FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Kj
18:46:05FromDiscord<jmgomez> In reply to @flywind "The alternative solution is": just so you know, even though we are planning to use NimScript down the road, that's dll swapping
18:46:25FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=45Kk
18:53:00*NimEventer quit (*.net *.split)
18:53:12*NimEventer joined #nim
18:53:14FromDiscord<ghoom> In reply to @Rika "you cannot": any workarounds?
18:53:24FromDiscord<ghoom> aside from `(a/b)()`
18:53:26FromDiscord<Rika> no
18:53:36FromDiscord<ghoom> 🥲
18:53:51FromDiscord<Rika> at least none that i can think of and arent incredibly cursed
18:54:02FromDiscord<ghoom> lol
18:54:10FromDiscord<ghoom> how cursed can it be anyway
18:54:29FromDiscord<ghoom> (edit) "be" => "get"
18:54:34FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=45Kn
18:54:57FromDiscord<Rika> In reply to @ghoom "how cursed can it": idk some term rewriting macro maybe
18:55:22FromDiscord<ghoom> sheesh
18:56:00FromDiscord<Rika> beef is more acquainted with cursed macros
18:56:09FromDiscord<Rika> i dont tend to make things that are cursed
18:56:14FromDiscord<ghoom> btw, if a symbol-named template has more than two arguments, what would the shorthand call look like?
18:56:34FromDiscord<Rika> as in?
18:56:47FromDiscord<Rika> `templ a, b, c`?
18:56:59FromDiscord<ghoom> like binary operators
18:57:20FromDiscord<Rika> if your template has three+ arguments then its not really binary now is it
18:57:32FromDiscord<ghoom> told ya frogs ain't da smartest
18:57:41FromDiscord<ghoom> i wish there was ternary operators
18:57:44FromDiscord<Rika> well
18:57:49FromDiscord<Rika> those are harder to reason about parsing
18:57:57FromDiscord<ghoom> ye i read about it
18:58:06FromDiscord<ghoom> ambiguity and whatnot
18:58:19FromDiscord<ghoom> ¯\_(ツ)_/¯
19:06:27FromDiscord<Phil> In reply to @Rika "about natrium and kalium": "Surely this translates the same, it sounds so easily... SODIUM AND POTASSIUM? Does that molecula like a hippopotamus or something?!"
19:06:37FromDiscord<Rika> LMFAO
19:06:41FromDiscord<Phil> (edit) "molecula" => "molecul look"
19:18:24FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45Kv
19:18:36FromDiscord<Rika> `maybe misplaced space between f and '('`
19:18:53FromDiscord<Rika> `t(f, (1, 2))` -> `f (1, 2)` != `f(1, 2)`
19:19:04FromDiscord<ghoom> 🤯
19:19:26FromDiscord<ghoom> nim will never cease to surprise
19:19:30FromDiscord<ghoom> (edit) "nim will never cease to surprise ... " added "me"
19:19:43FromDiscord<ghoom> why
19:19:48FromDiscord<ghoom> (edit) "why ... " added "is this a thing?"
19:21:08FromDiscord<ghoom> i tried `(f)x` instead of `f x` and it still didn't work
19:22:29*CyberTailor quit (Remote host closed the connection)
19:23:26FromDiscord<Rika> In reply to @ghoom "why is this a": Because both command call syntax and tuples exist
19:24:00*CyberTailor joined #nim
19:24:29FromDiscord<Shiba> In reply to @Rika "im not aware of": sad
19:25:37FromDiscord<ghoom> `(f)x` seems to work fine as a normal call
19:25:41FromDiscord<Shiba> (edit) "In reply to @Rika "im not aware of": sad ... " added ", they should implement that , cause i think it's useful"
19:25:43FromDiscord<ghoom> (edit) "`(f)x`" => "`(f)(1, 2)`"
19:26:15FromDiscord<ghoom> does that mean `(f)x` doesn't expand to `(f)(1, 2)`? 🤔
19:33:40FromDiscord<domosokrat> It seems to expand to `(f)((1,2))`, atleast the error message is the same
19:38:07FromDiscord<ghoom> ok
19:38:15FromDiscord<ghoom> that's weird
19:40:39FromDiscord<ghoom> In reply to @domosokrat "It seems to expand": yes it does, i checked by making the parameters a tuple
19:40:47FromDiscord<ghoom> 😭
19:41:53*fallback quit (Ping timeout: 272 seconds)
19:45:17FromDiscord<mr_noia> sent a code paste, see https://play.nim-lang.org/#ix=45KA
19:46:01FromDiscord<ghoom> but what about more than two args?
19:46:48FromDiscord<ghoom> that would be wicked D
19:46:50FromDiscord<ghoom> (edit) "D" => "XD"
19:47:14FromDiscord<Vindaar> as long as you're willing to have some kind of scope opening for your ternary operators, you can implement them with macros
19:47:30FromDiscord<demotomohiro> You can use `dumpTree` macro to see how Nim parse your code:↵https://nim-lang.org/docs/macros.html#dumpTree.m%2Cuntyped
19:49:50*krux02 joined #nim
19:50:16FromDiscord<mr_noia> yeah, that's the hack. I didn't define the `||` operator, it's just so the parser bundles the subexpression into a `nnkInfix` node, then I extract the subexpressions and glue them together into an if, giving me sort of a ternary operator↵(@ghoom)
19:51:39FromDiscord<ghoom> very neat
19:52:04FromDiscord<ghoom> i'd have to learn more about macros
19:52:23FromDiscord<ghoom> thanks
19:59:20*fallback joined #nim
20:03:31FromDiscord<ghoom> any std alternatives to js's `with`?
20:03:51FromDiscord<ghoom> hopefully ones that work with tuples
20:04:54FromDiscord<jan0809> is js s with like pythons with?
20:05:26FromDiscord<ghoom> i think python's `with` is for closeable objects
20:05:33FromDiscord<ghoom> like files
20:05:36FromDiscord<mr_noia> Js
20:05:44FromDiscord<ghoom> so it automatically closes em
20:06:02FromDiscord<jan0809> In reply to @ghoom "so it automatically closes": context manager is the name
20:06:19FromDiscord<ghoom> ah ok
20:06:30FromDiscord<jan0809> is js s with similar or not?
20:06:56FromDiscord<ghoom> js's `with` exposes an objects keys into a scope
20:07:10FromDiscord<jan0809> oh
20:07:30FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45KC
20:07:50FromDiscord<ghoom> (edit) "objects" => "object's"
20:08:10FromDiscord<mr_noia> nim has a similar with, but it only seems to work for function calls\: https://nim-lang.org/docs/with.html
20:08:28*rwb quit (Ping timeout: 244 seconds)
20:08:37FromDiscord<ghoom> oh that's still very useful
20:10:00*fallback quit (Ping timeout: 244 seconds)
20:11:00FromDiscord<ghoom> also i still yet to understand the difference between macros and templates
20:11:40FromDiscord<ghoom> pls enlighten my slimy brain
20:13:16FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=45KD
20:13:34FromDiscord<ghoom> In reply to @jan0809 "i dont get the": imagine a table name that's too long
20:13:38FromDiscord<ghoom> (edit) "table" => "object"
20:13:49FromDiscord<ghoom> you don't wanna type it again and again
20:13:58FromDiscord<ghoom> (edit) "you don't wanna type it again and again ... " added "everytime you try to index it"
20:14:02FromDiscord<ghoom> (edit) "everytime" => "every time"
20:14:18FromDiscord<jan0809> u wouldnt load it into a var name thats longer than... t
20:14:28FromDiscord<ghoom> lol
20:14:37FromDiscord<ghoom> true programmer
20:15:02FromDiscord<jan0809> also theres `as`
20:15:33FromDiscord<jan0809> atleast in python
20:16:24FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=45KE
20:16:42FromDiscord<ghoom> sheesh
20:17:08FromDiscord<ghoom> laziness is the most affecting trait of a programmer
20:18:06FromDiscord<ghoom> (edit) "affecting" => "defining"
20:20:28FromDiscord<jan0809> sent a code paste, see https://play.nim-lang.org/#ix=45KF
20:21:08FromDiscord<Prestige> Use a different name
20:21:27FromDiscord<Vindaar> In reply to @ghoom "also i still yet": macros are direct manipulation of nim's abstract syntax tree (how the nim compiler sees nim code). templates are fancy text replacement / insertion. everything you can do with templates, you can also do with macros, but not the inverse
20:21:50FromDiscord<ghoom> 🐸👍
20:22:09FromDiscord<jan0809> In reply to @Avahe "Use a different name": or not js
20:22:39FromDiscord<Prestige> What about js?
20:23:02FromDiscord<jan0809> nothing
20:23:56FromDiscord<lantos> sent a code paste, see https://play.nim-lang.org/#ix=45KH
20:24:06FromDiscord<lantos> (edit) "https://play.nim-lang.org/#ix=45KH" => "https://paste.rs/DCx"
20:24:31FromDiscord<jan0809> the client itself has a body?
20:25:19FromDiscord<jan0809> to store body params across multiple requests?
20:29:20FromDiscord<jan0809> i mean for real
20:29:54FromDiscord<jan0809> headers, ofc but isnt the body more a request or responses business?
20:34:33*rwb joined #nim
20:42:53FromDiscord<ghoom> how to call a callable aside from doing `callable args`?
20:45:09FromDiscord<huantian> how do you want to call it
20:45:22FromDiscord<huantian> you can do callable(args) lol
20:47:18FromDiscord<ghoom> In reply to @huantian "how do you want": i want to bypass templates automatically enclosing arguments in `()`
20:47:33FromDiscord<ghoom> and adding space between identifiers
20:47:39FromDiscord<ghoom> (edit) "identifiers" => "stuff"
20:49:05FromDiscord<Vindaar> I think if you give more explicit examples of what you want to accomplish, it's easier to help you
20:49:16*jmdaemon joined #nim
20:49:39FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45KN
20:49:43FromDiscord<lantos> In reply to @jan0809 "the client itself has": nah it doesn't do non blocking sync streams
20:50:14FromDiscord<Elegantbeef> You cannot do that ghoom
20:50:19FromDiscord<Elegantbeef> You need a macro to do this
20:50:34FromDiscord<Vindaar> In reply to @ghoom "^": yes, but this does not explain what you want to _accomplish_.↵yeah, beef was faster than me
20:50:36FromDiscord<ghoom> could you give me a macro alternative?
20:51:34FromDiscord<Elegantbeef> `import std/macros` change it to a `macro` then make the body `result = newCall(f); result.add x[0..^1]`
20:51:43FromDiscord<Elegantbeef> This doesnt solve any issue though
20:51:55FromDiscord<ghoom> then why did you suggest it XD
20:52:04FromDiscord<Elegantbeef> I'm taking about your code
20:52:39FromDiscord<jan0809> In reply to @lantos "nah it doesn't do": still dont understand
20:53:17FromDiscord<ghoom> In reply to @Elegantbeef "I'm taking about your": i have my own issues 😉
20:54:46FromDiscord<jan0809> or is httpClient a misslabeled single httpRequest
20:57:24FromDiscord<lantos> std/httpClient ↵you can get body() easy but getting a non terminating get request. Like a large file or polling data↵you can use http.bodyStream but it only returns for async. As synchronous bodyStream locks.
20:57:40FromDiscord<lantos> (edit) "request." => "request isn't possible."
21:07:02FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45KR
21:11:10*fallback joined #nim
21:11:38*ehmry joined #nim
21:13:26FromDiscord<jan0809> hmm yeah non async http barely make sense in alot of application cases
21:13:54FromDiscord<jan0809> and not at all for polling data(?)
21:15:53*kenran joined #nim
21:32:06FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45KV
21:32:54*kenran quit (Quit: WeeChat info:version)
21:53:09*lumo_e joined #nim
22:01:11FromDiscord<jan0809> lol
22:02:50FromDiscord<ghoom> what
22:35:29FromDiscord<ghoom> guys pls halp
22:36:41FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45L2
22:37:05FromDiscord<amadan> (Since the variable `a` kinda becomes the name)
22:37:58FromDiscord<ghoom> sent a code paste, see https://play.nim-lang.org/#ix=45L3
22:38:09FromDiscord<ghoom> that's supposed to be the args
22:38:16FromDiscord<ghoom> (edit) "args" => "parameters"
22:39:16FromDiscord<amadan> Wait so x is providing the parameters to the proc not the name?
22:39:20FromDiscord<ghoom> yes
22:42:05FromDiscord<ghoom> and if i do `proc(x)` it will expand to `proc((1, 2))` if i pass `(1, 2)`
22:42:15FromDiscord<ghoom> :/
22:46:46FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45L4
22:47:49FromDiscord<ghoom> thanks for the hustle first of all
22:48:01FromDiscord<amadan> (edit) "https://play.nim-lang.org/#ix=45L4" => "https://play.nim-lang.org/#ix=45L5"
22:48:15FromDiscord<ghoom> i dont like how the template is used tho
22:48:23FromDiscord<ghoom> i mean in terms of passing arguments
22:49:02FromDiscord<ghoom> ideally, i'd want them to be normal arguments
22:49:25FromDiscord<ghoom> but ngl this is a nice hack
22:49:28FromDiscord<ghoom> 😎
22:49:41FromDiscord<amadan> hmm, gimme like 2 mins think I can make that work
22:53:10FromDiscord<ghoom> > (or I'm not big brain enough to know how to do it with templates)↵bruh macros are big brain
22:53:12FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=45L6
22:53:27FromDiscord<ghoom> what's macro master?
22:54:47FromDiscord<amadan> Someone who has studied the ways of the macro for a while lol
22:55:18FromDiscord<ghoom> The Ways of the Macro
22:55:35FromDiscord<ghoom> bets book ever
22:55:38FromDiscord<ghoom> (edit) "bets" => "best"
23:09:42FromDiscord<ghoom> @amadan how would i add pragmas do that newProc?
23:10:19FromDiscord<ghoom> syntactic pragmas
23:10:32FromDiscord<ghoom> (edit) "syntactic pragmas ... " added "(inside the tree)"
23:13:00FromDiscord<amadan> https://nim-lang.org/docs/macros.html#newProc%2CopenArray%5BNimNode%5D%2CNimNode%2CNimNode pass pragmas to `newProc`
23:23:51*lumo_e quit (Quit: Quit)
23:26:18FromDiscord<Arathanis> sent a long message, see http://ix.io/45Ld
23:30:14FromDiscord<Arathanis> Actually seem to have solved it. For anyone encountering this problem:↵↵go to your `.choosenim` directory which by default is located at `C:\Users\<user>\.choosenim`. You should see a `toolchains` folder. You need to add `toolschains
23:30:21FromDiscord<Arathanis> (edit) "`toolschains" => "`toolschains\mingw64\bin` to your path."
23:30:57FromDiscord<Arathanis> (edit) "Actually seem to have solved it. For anyone encountering this problem:↵↵go to your `.choosenim` directory which by default is located at `C:\Users\<user>\.choosenim`. You should see" => "sent" | "`toolchains` folder. You need to add `toolschains\mingw64\bin` to your path." => "long message, see http://ix.io/45Lh"
23:31:00FromDiscord<Arathanis> (edit) "http://ix.io/45Lh" => "https://paste.rs/VZK"
23:31:19FromDiscord<Arathanis> (edit) "https://paste.rs/hTO" => "http://ix.io/45Lj"
23:31:27FromDiscord<Arathanis> (edit) "http://ix.io/45Lj" => "https://paste.rs/s89"
23:31:31FromDiscord<Arathanis> (edit) "https://paste.rs/7lY" => "http://ix.io/45Li"
23:44:20FromDiscord<demotomohiro> Can you run `ar` command?
23:45:48FromDiscord<demotomohiro> `ar` is a program used to create staticlib on both windows and linux: https://internet-of-tomohiro.netlify.app/nim/clibrary.en.html#create-static-library-from-nim-code-and-use-from-c-code