<< 26-12-2021 >>

00:07:17FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JvX
00:07:22FromDiscord<Elegantbeef> But this is probably contrived
00:11:36FromDiscord<retkid> what do you guys think of nim packags
00:12:02FromDiscord<retkid> really excited for package level stuff
00:13:02FromDiscord<Elegantbeef> Comically nim2.0 is going to remove it IIRC
00:13:05FromDiscord<Elegantbeef> Since it's not needed
00:13:36FromDiscord<retkid> i thought it was the opposite
00:13:45FromDiscord<retkid> hmm
00:13:46FromDiscord<Rika> The implementation is not needed
00:13:47FromDiscord<retkid> lemme reread
00:13:52FromDiscord<Elegantbeef> Well nim2.0 will allow cyclical dependencies so it's not needed
00:14:22FromDiscord<Rika> I think he was more excited to maybe see package level access level
00:14:30FromDiscord<retkid> ah so its here right now, nobody uses it, so its getting culled in favor of more rtraditional
00:14:40FromDiscord<retkid> (edit) "rtraditional" => "trraditional"
00:14:42FromDiscord<Rika> It’s gonna be here
00:14:44FromDiscord<Rika> It’s not yet
00:14:46FromDiscord<Rika> Nim 2.0
00:16:11FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3JvY
00:16:26FromDiscord<Rika> No
00:16:29FromDiscord<Rika> Never happening
00:16:38FromDiscord<Rika> Make a macro if you want
00:17:08FromDiscord<Rika> Seems trivial to implement a rudimentary macro for this
00:17:32FromDiscord<Elegantbeef> `package` imports/exports all files below this one?
00:17:34FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3Jw0
00:18:21*jjido joined #nim
00:19:16FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3Jw1
00:19:43FromDiscord<Rika> That should be possible in a future version without your package thingy
00:20:16FromDiscord<retkid> i just think its cool 🥺
00:20:43FromDiscord<retkid> instead of interfacing with files you can use package groups
00:21:08FromDiscord<retkid> In reply to @Rika "Seems trivial to implement": yet to learn macros they seem scary
00:21:11FromDiscord<Rika> You break a lot of access level concepts
00:21:51FromDiscord<Elegantbeef> Though i still dont think i like it
00:21:52FromDiscord<Elegantbeef> Nim 2.0 will support this↵(@retkid)
00:22:20FromDiscord<retkid> In reply to @Rika "You break a lot": well, no. Because on compile they packages are just one file on compile, you split them up rfor organization
00:22:45FromDiscord<retkid> (edit) "they" => "the" | "file on compile," => "file,"
00:22:50FromDiscord<retkid> (edit) "rfor" => "for"
00:23:12FromDiscord<Rika> What happened to private and public then
00:23:25FromDiscord<Rika> I don’t see why I’d want it
00:23:56FromDiscord<retkid> In reply to @Elegantbeef "Nim 2.0 will support": I like this, even if it makes reading potentially more difficult. i like to define it like↵↵Its, enums, classes, top level variables, functions
00:24:12FromDiscord<retkid> (edit) "functions" => "functions↵in that order"
00:24:28FromDiscord<Rika> The ordering imo doesn’t make reading too much harder
00:24:49FromDiscord<retkid> In reply to @Rika "The ordering imo doesn’t": well if your procs are at the head you have more context if you read top to bottom
00:25:00FromDiscord<Rika> Most of us are supportive of the thing, especially since it’s a feature most modern languages have
00:25:16FromDiscord<Rika> In reply to @retkid "well if your procs": Nothing is truly top to bottom anymore
00:25:25FromDiscord<retkid> In reply to @Rika "What happened to private": well private and public applies to the package. Things outside the package cant import them
00:25:42FromDiscord<Rika> If it was we wouldn’t have people complain about cyclic dependencies I guess
00:25:53FromDiscord<Rika> In reply to @retkid "well private and public": I still fail to see why I would want this
00:25:56FromDiscord<evoalg> In reply to @Elegantbeef "<@900872397224280125>\: do you have": I used zip on day 01 of aoc ... https://play.nim-lang.org/#ix=3Jw2
00:26:22FromDiscord<retkid> In reply to @Rika "I still fail to": because it allows for splitting files for better organization without having extensive import headers
00:27:00FromDiscord<retkid> this is one of many reasons I should never make a language, this is tupid
00:27:04FromDiscord<retkid> (edit) "tupid" => "stupid"
00:27:11FromDiscord<Rika> I mean I guess I can see it
00:27:15FromDiscord<Rika> Go has this feature
00:27:20FromDiscord<Rika> I don’t think rust or zig does
00:27:28FromDiscord<Rika> But I’m pretty sure go does
00:28:10FromDiscord<retkid> java/kotlin dont, python doesn't, Ocaml doesn't (need to learn more)
00:28:21FromDiscord<retkid> Bash has it
00:28:26FromDiscord<retkid> (edit) "it" => "it. Technically"
00:28:48FromDiscord<retkid> JS would never have this
00:30:31FromDiscord<Rika> JS barely has the concept of modules
00:30:53FromDiscord<Rika> ~~I like how Lua does it~~
00:31:01FromDiscord<Elegantbeef> That's a good enough reason not to do it↵(@Rika)
00:31:06FromDiscord<retkid> I should learn more lua
00:31:08FromDiscord<Rika> Oh god I might start sounding like a Lisp user
00:31:19FromDiscord<Rika> Lua is fun
00:31:24FromDiscord<Rika> Head melting too sometimes
00:31:33FromDiscord<retkid> i was going to learn Lisp but decided not to
00:31:49FromDiscord<retkid> Common Lisp, that is
00:32:16FromDiscord<Rika> What about uncommon lisp
00:33:16FromDiscord<evoalg> sent a long message, see http://ix.io/3Jw8
00:33:17FromDiscord<retkid> i dont wanna learn carp-lang
00:33:45FromDiscord<retkid> https://github.com/carp-lang/Carp
00:34:12FromDiscord<retkid> babe wakeup, statically typed lisp system lang just dropped
00:34:13FromDiscord<Elegantbeef> Nim doesnt support unpacking and it requires a compiler change to support, so yea not overly feasible↵(@evoalg)
00:34:57FromDiscord<retkid> have you ever been doing manual GC, and you sit down and go
00:35:02FromDiscord<retkid> "i wanna do this in lisp"
00:35:30FromDiscord<evoalg> if I really needed it, and if I knew what I was doing, I could modify the zip code to look instead a container and just pass a container right?
00:36:25FromDiscord<Elegantbeef> I mean we can always cheat unpacking and do something like `myColl -> zip` assuming `myColl` is an array
00:36:49FromDiscord<Elegantbeef> Since nim is dynamic we cant really zip an unknown collection nicely afaict
00:37:03FromDiscord<Elegantbeef> isnt dynamic\
00:37:21FromDiscord<evoalg> gotcha ok
00:38:41FromDiscord<Elegantbeef> My `zip` is slower than the `sequtils` due to the fact they only work on openarrays and can reason the size needed, but more flexible so in some cases it's faster
00:38:54FromDiscord<Elegantbeef> Just thought i'd mention that
00:39:12FromDiscord<Elegantbeef> `all`/`map` should in theory be faster, but i need to bench them in my contrived example
00:44:43FromDiscord<evoalg> you don't need "fold" as it doesn't copy to a temporary seq?
00:51:06nrds<sorcerer99> merry christmas nim coders! from the IRC-nERDs irc network! =)
00:52:50FromDiscord<Elegantbeef> I mean this is working on iterators so doesnt make sense really
00:52:52FromDiscord<Elegantbeef> Write a reversed iterator if you can for your type
00:52:52FromDiscord<Elegantbeef> Actually i'm dumb
00:52:53FromDiscord<Elegantbeef> You dont have step by step
00:52:53FromDiscord<Elegantbeef> But eitherway doesnt make sense for iterators imo
00:52:56FromDiscord<Elegantbeef> Substantially faster due to just applying logic as we go instead of allocating a seq
00:53:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Jwd
00:53:02FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/MoW
00:54:01*drewr joined #nim
00:56:08FromDiscord<Elegantbeef> Now if only you were a nim coder so you'd be weirdly saying it to yourself
00:58:44FromDiscord<evoalg> oh that's a huge difference in time
00:59:19FromDiscord<evoalg> like 500 x faster ... am I testing that right?
00:59:42FromDiscord<Elegantbeef> Yea it's quite a bit faster
01:00:05FromDiscord<Elegantbeef> Bad example since we're just doing `filterIt` then getting the size of that
01:00:18FromDiscord<Elegantbeef> But the point is to test the equivlent loop logic's performance
01:00:30FromDiscord<evoalg> yep makes sense
01:02:01FromDiscord<evoalg> The `x == 'd'` bit in `all(a, x == 'd')` ... it supports any `true` statement right? ... so I could use a complicated func in that bit right?
01:02:29FromDiscord<Elegantbeef> Yep
01:03:02*drewr quit (Quit: ERC (IRC client for Emacs 27.2))
01:03:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Jwj
01:04:21*drewr joined #nim
01:04:22FromDiscord<Elegantbeef> It's heavily leaning into "Nim is imperative and doesnt support iterator chaning" so i'm embracing it using for statement macros
01:05:14FromDiscord<evoalg> that was my next question 😉 ... so `all` is just a nice way of writing it right? ... and that's important as was is Araq that said if code is simpler then one can reason about it better?
01:07:53FromDiscord<evoalg> if sequtils had a closure iterator for all, then that would also be fast right?
01:08:25FromDiscord<Elegantbeef> The closure is actually slower
01:08:38FromDiscord<Elegantbeef> It copies the collection and does funky logic
01:08:51FromDiscord<evoalg> wow ok
01:09:38FromDiscord<Elegantbeef> `zipIter` will always be slower than `sequtils.zip` since `sequtils.zip` only iterates once
01:09:53FromDiscord<Elegantbeef> The way that `zipIter` is faster is in the cases you need to do `toSeq` on values
01:10:37FromDiscord<Elegantbeef> It's really just a case of enabling iterating over N number of iterators stepping at the same time
01:11:06FromDiscord<evoalg> gotcha ... and also you've made it nice to accept >= 2 containers
01:11:30FromDiscord<Elegantbeef> > = 2 iterators\ 😛
01:11:55FromDiscord<evoalg> >= iterators true 😉
01:12:04FromDiscord<evoalg> can't type
01:12:20FromDiscord<evoalg> >= 2 iterators
01:12:28FromDiscord<Elegantbeef> There we go one of us could do it
01:13:55FromDiscord<evoalg> so I've had a little play with `zip` and `all` ... I have to go out so I can't play with `map` until later
01:14:03FromDiscord<Elegantbeef> lol
01:14:18FromDiscord<Elegantbeef> They're not that special, just a semi funky for loop
01:14:25FromDiscord<Elegantbeef> But i'll leave them until i decide i dont like them
01:14:57*drewr quit (Ping timeout: 240 seconds)
01:15:07FromDiscord<Elegantbeef> Though i think since they're a tinge safer that just manually writing them I might not dislike them that much
01:17:52*drewr` joined #nim
01:18:17*drewr` quit (Client Quit)
01:21:06FromDiscord<evoalg> I can't use `a.all(x == 'd')` right?
01:22:20*drewr` joined #nim
01:24:32FromDiscord<Elegantbeef> I dont think so
01:26:10FromDiscord<Elegantbeef> Just how the for loop macros work
01:26:48*drewr` quit (Client Quit)
01:28:13*drewr joined #nim
01:28:47FromDiscord<Elegantbeef> Really i could make `a.forAll(x, x == 'd')` though it's less consistent
01:34:32*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
01:58:17*drewr quit (Ping timeout: 240 seconds)
02:15:55*drewr joined #nim
02:20:39*neceve quit (Ping timeout: 256 seconds)
02:30:17*drewr quit (Ping timeout: 240 seconds)
02:32:08*drewr joined #nim
02:34:37*neurocyte0132889 quit (Ping timeout: 240 seconds)
02:40:20*drewr quit (Quit: ERC (IRC client for Emacs 27.2))
02:41:11*drewr joined #nim
03:31:48*kayabaNerve_ joined #nim
03:33:45*kayabaNerve quit (Ping timeout: 256 seconds)
03:45:17FromDiscord<Roundlay> Pretty new to Nim and find myself frequently searching here for good examples of the language in use. Anybody floated the idea of a Highlights channel? A place where nice/cool/interesting contributions could be automatically collated by a bot (written in Nim, of course) based on reactions?
03:46:12FromDiscord<Elegantbeef> There is "This month with Nim" which is kinda like that, but a showcase channel could be nicer for less delayed waiting 😀
03:46:13*kayabaNerve_ quit (Ping timeout: 256 seconds)
03:48:06*kayabaNerve joined #nim
03:49:51*kayabaNerve quit (Remote host closed the connection)
03:58:37*drewr quit (Ping timeout: 240 seconds)
04:02:46*Colt_ joined #nim
04:04:39*Colt quit (Ping timeout: 268 seconds)
04:05:04*kayabaNerve joined #nim
04:20:40*drewr joined #nim
04:22:10FromDiscord<Yardanico> In reply to @Roundlay "Pretty new to Nim": yeah I was thinking about making something like this, but user-submitted instead of being managed by a bot
04:22:17FromDiscord<Yardanico> (edit) "making something" => "adding a channel"
04:27:15*kayabaNerve quit (Quit: Leaving)
04:28:23FromDiscord<Roundlay> Nice. Yeah, I guess I figured basing it on some reasonable threshold of reactions might help surface quality contributions without adding extra busywork for mods here, but both approaches work 👍🏻
04:28:47FromDiscord<Elegantbeef> Well there are also Matrix/IRC users
04:29:18FromDiscord<Elegantbeef> I'm not a sophisticated bot afterall
04:29:54FromDiscord<Rika> You aren’t?
04:30:18FromDiscord<Elegantbeef> I'm an unsophisticated schmuck
04:30:27FromDiscord<Bung> @haxscramper where is hmisc/helpers moved to ?
04:30:49FromDiscord<Elegantbeef> Oh it's bung 😀
04:31:22FromDiscord<Roundlay> In reply to @Elegantbeef "Well there are also": Ahh, fair point
04:32:28FromDiscord<Elegantbeef> Though the matrix protocol supports reactions i find it hard to believe all clients implement it 😛
05:09:22*arkurious quit (Quit: Leaving)
05:23:11*kayabaNerve joined #nim
05:24:45FromDiscord<Roundlay> I guess if platform parity is important to the community then things get tricky yeah. Although I’m not sure what the user numbers per platform is like
05:24:45FromDiscord<haxscramper> In reply to @Bung "<@!608382355454951435> where is hmisc/helpers": Depending on which proc you need, but it is a hmisc/core/all mostly
05:25:00FromDiscord<haxscramper> But it has been half a year since then
05:25:53FromDiscord<Bung> In reply to @haxscramper "But it has been": yeah, I just updated my slim package.
05:41:11FromDiscord<AulonSal> are `nim doc` and `nim doc2` the same command?
05:43:37FromDiscord<Elegantbeef> It appears so
05:43:42FromDiscord<Elegantbeef> Though i didnt even know doc2 was a thing
05:44:48FromDiscord<AulonSal> thank you, I encountered it in a repo from 2018
05:45:07FromDiscord<Elegantbeef> Perhaps it used to do something different but that got moved to `doc`
05:45:14FromDiscord<Rika> The assumption is that they weren’t the same before
05:45:31FromDiscord<Rika> Then doc probably got deprecated
05:45:38FromDiscord<Rika> And then was made the same as 2
06:44:37*drewr quit (Ping timeout: 240 seconds)
06:44:41*Colt_ is now known as Colt
06:46:09*drewr joined #nim
06:50:39FromDiscord<evoalg> @ElegantBeef why is slicerator.all called "all" and not "filter" or something?
06:51:32FromDiscord<Elegantbeef> Possibly cause i'm an idiot
06:52:43FromDiscord<evoalg> you certainly aren't ... I thought I was an idiot for not knowing 😉
06:53:06FromDiscord<Elegantbeef> Eh i read it as `for all(x == 'a') in a.items` 😀
06:53:24FromDiscord<Elegantbeef> But filter matches the convention and probably more accurate
06:53:43FromDiscord<Elegantbeef> Naming it the same as the functions is probablly illadvised since it's kinda hidden
06:54:15FromDiscord<Elegantbeef> should be like `allWhere()` or `syncIter(a, b, c)` instead of `zipIter`
06:54:16FromDiscord<evoalg> ahh yea I see what you mean ... but "all" is also in sequtils but means something different
06:55:06FromDiscord<evoalg> ... where all of the elements have to match
06:55:25FromDiscord<Elegantbeef> Yea i know i noticed the bad naming today but didnt change it cause i forgot
06:55:46FromDiscord<Elegantbeef> I did update it to be `filter` now, if `all` bothers you that much
06:55:54FromDiscord<Elegantbeef> But yea might rename them again to be more readable
06:57:25FromDiscord<evoalg> hehe I'm not used to someone listening to my advice 😉 ... but yea hmmm ... filter is nice, but if it shouldn't be named the same then what about "filterFor" ... since slicerator is all about for loops?
06:58:18FromDiscord<evoalg> ... and map can be mapFor ??
06:58:56FromDiscord<Elegantbeef> Being named the same isnt that big of a deal
07:00:15FromDiscord<Elegantbeef> The issue with the name was that it didnt make much sense, i'm probably going to end with something more descriptive like `onlyWhere`
07:00:46FromDiscord<evoalg> ok ... and if I import both sequtils and slicerator (because that's the crazy fool I am), how do I do one over the other? ... do I do: slicerator.map?
07:01:42FromDiscord<evoalg> oh I do do that 😉
07:01:52FromDiscord<Elegantbeef> I mean you dont need to
07:02:31FromDiscord<evoalg> oh because the compiler is intelligent enough to choose?
07:03:16FromDiscord<Elegantbeef> Well all the stuff is forloop macros so it'll only be chosen in the case of `for x in map(y, x +10)`
07:03:31FromDiscord<Elegantbeef> Which is why we cannot do `a.items.map`
07:04:42FromDiscord<Elegantbeef> In the case you want to use the `sequtils` map yes you will need to do `for x in sequtils.map(y, myProc)`
07:04:57FromDiscord<Elegantbeef> Though if you're testing both you'll probably use `sequtils.mapit` so it's less of an issue
07:05:32FromDiscord<evoalg> gotcha ok ... and as cool as function programming is, for loops are easier for me to read, and I can do them efficiently and I can even break out of them early etc
07:06:10FromDiscord<Elegantbeef> You also made me find a bug so win 😀
07:06:25FromDiscord<evoalg> oh?!
07:07:00FromDiscord<Elegantbeef> i didnt produce an intelligent error for `for x in map(a)`
07:07:14FromDiscord<Elegantbeef> It should say "No expression to map provided."
07:07:22FromDiscord<Elegantbeef> But i instead just had a dumb macro error
07:07:31FromDiscord<evoalg> ahh
07:08:11FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/924559200787501106/image.png
07:08:15FromDiscord<Elegantbeef> Now it's a lovely error 😛
07:08:53FromDiscord<evoalg> that's a handsome error yes
07:09:21FromDiscord<Elegantbeef> I should have a nice error for all the cases one ruins the syntax for these new macros, so if you get a confusing error let me know
07:11:42FromDiscord<evoalg> oh sure ... I'd be good for that as I'm easily confused ... I'm not joking either. It's like someone new to nim comes in and they are either the type that reads the docs & source code and understands complicated error messages, and then there are people like me where it needs to be explained in a dumbed-down way
07:16:36FromDiscord<evoalg> `for x in filter(x):` -> "slicerator.nim(247, 23) Error: index 2 not in 0 .. 1" ... that confuses me
07:17:55FromDiscord<Elegantbeef> Yea that was the error i mentioned i fixed
07:18:14FromDiscord<evoalg> oh I thought you fixed map
07:18:50FromDiscord<Elegantbeef> Both they have replicated logic
07:19:08FromDiscord<dizzyliam> @ElegantBeef What are you using to see an error in your text editor?
07:19:16FromDiscord<Elegantbeef> Codelens
07:19:22FromDiscord<evoalg> I uninstalled slicerator and installed it again but still saw that error
07:20:11FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/924562217062531162/image.png
07:20:14FromDiscord<Elegantbeef> Uhh
07:20:48FromDiscord<evoalg> I see it now!
07:21:05FromDiscord<dizzyliam> In reply to @Elegantbeef "Codelens": damn, premium feature
07:21:54FromDiscord<Elegantbeef> Indeed
07:22:14FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/924562733616218112/image.png
07:22:17FromDiscord<Elegantbeef> I'm really happy with these errors
07:22:50FromDiscord<dizzyliam> that's not a normal thing to say about errors
07:25:10FromDiscord<Elegantbeef> Codelens + the `error` for macros makes me sleep easier at night
07:25:37FromDiscord<Elegantbeef> `error` is so nice for macros, giving helpful custom error messages on the input code
07:25:41FromDiscord<Elegantbeef> You cant beat it if you ask me
07:29:07FromDiscord<Elegantbeef> This reminds me that i havent got an inline linter setup for nvim
07:29:56FromDiscord<Elegantbeef> Anyway evo i pushed changes for `zipIter` aswell which make it smarter for errors, but yea i really want to hear when you break it all
07:30:10FromDiscord<Rika> In reply to @Elegantbeef "You cant beat it": It can be better
07:30:40FromDiscord<Elegantbeef> For macros?
07:30:47FromDiscord<Rika> Yeah
07:31:11FromDiscord<Rika> Being able to show where in the untransformed code is the error
07:31:27FromDiscord<Elegantbeef> `error` does that
07:31:42FromDiscord<Elegantbeef> You pass the input node and it links back to it's line infor
07:31:45FromDiscord<Rika> Does it now
07:31:52FromDiscord<Rika> I don’t remember it being able to
07:31:58FromDiscord<Rika> Nonetheless then that is good
07:31:59FromDiscord<Elegantbeef> The `error` from `macros` does
07:32:10FromDiscord<Elegantbeef> https://nim-lang.org/docs/macros.html#error%2Cstring%2CNimNode
07:32:40FromDiscord<Elegantbeef> It also has a sibling `warning`
07:32:53FromDiscord<Elegantbeef> Oh and also hint, didnt know that
07:33:43FromDiscord<Elegantbeef> Though comically since it takes the lineinfo of whatever you give it you can give arbitrary errors on unrelated lines
07:34:52FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3Jx2
07:34:59FromDiscord<Elegantbeef> If you run that it errors on line 6 😀
07:35:10FromDiscord<evoalg> can you determine the length of the nim source file and then import random and and point to someone innocent?
07:35:28FromDiscord<Elegantbeef> Nah you need a node to point to
07:35:40nrds<Prestige99> weird beef
07:36:14FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3Jx3 you can get really funky
07:36:31FromDiscord<Elegantbeef> I can create an error on a 100% unrelated file that I have imported
07:36:34FromDiscord<Elegantbeef> What's weird?
07:37:09nrds<Prestige99> That error on line 6 thing
07:37:22FromDiscord<Elegantbeef> I mean it has it's uses I wager
07:37:35nrds<Prestige99> shouldn't it have been on the next line though?
07:37:47FromDiscord<Elegantbeef> No i gave it the line info of the last line
07:39:01nrds<Prestige99> 🤔
07:39:35FromDiscord<Elegantbeef> i do `getImpl` which gets the declaration of `a` which is `var a = 300` then do `[0]` which gets the `a` ident
07:40:03nrds<Prestige99> oh, I see
08:04:02FromDiscord<evoalg> https://play.nim-lang.org/#ix=3Jxa not sure what I broke beef
08:06:37*drewr quit (Ping timeout: 240 seconds)
08:07:45FromDiscord<Elegantbeef> You didnt break anything
08:08:10FromDiscord<Elegantbeef> `parseInt(x)` in the second example is trying to do `parseInt(char)` not string do `parseInt($x)`
08:08:54FromDiscord<Elegantbeef> `Error: type mismatch: got <char> but expected one of: func parseInt(s: string): int` is right
08:11:21FromDiscord<Elegantbeef> Due to how quasi quoting works here means we get an odd error message, though accurate info
08:11:38FromDiscord<evoalg> is a the same as b here?
08:12:03FromDiscord<Elegantbeef> b is a string so iterating over it yields `char`
08:12:20FromDiscord<Elegantbeef> iterating over `a` yields `string` since it's a `seq[string]`
08:13:37FromDiscord<evoalg> ohhhhhh right!
08:19:20FromDiscord<evoalg> oooo I can even do `for i, x in map(a, parseInt(x) div (i + 1)):` ... I didn't expect that I can use `i` (not just `x`)
08:19:42FromDiscord<Elegantbeef> Yep implemented for both filter and map 🙂
08:19:50FromDiscord<evoalg> nice!
08:20:03FromDiscord<Elegantbeef> and if you do `for i, x, y` it'll give a cryptic error methinks
08:20:30FromDiscord<Elegantbeef> Ah nvm
08:20:43FromDiscord<Elegantbeef> "Invalid number of for loop variables for 'map" is not cryptic
08:20:54FromDiscord<evoalg> even I can understand that one 😉
08:24:22FromDiscord<Elegantbeef> also a side note is you can do `typeof(expr)` instead of `typedesc(expr)`
08:24:27FromDiscord<Elegantbeef> It reads better and is the convention
08:24:47FromDiscord<evoalg> ahhh my syntax highlighting highlights typedesc but not typeof
08:25:00FromDiscord<evoalg> but I'll use it
08:25:21FromDiscord<evoalg> my syntax highlighting doesn't highlight slicerator stuff either 😉
08:25:44FromDiscord<evoalg> I love how I can do `for i, x in filter([5, 6, 7, 8], i > 0):` do skip the first element btw
08:25:57FromDiscord<Elegantbeef> That's a happy accident 😀
08:26:10FromDiscord<JamesH> I've got a silly generic programming question. I've never worked in languages that need manual memory management, but I vaguely know about malloc() etc. in C. If one were to make something like a game in Nim, do you think most occasions people use malloc() etc. to get dynamic allocations, they could get away with just using a `seq` of a custom struct, or is that naive?
08:26:45FromDiscord<Elegantbeef> You only use malloc and similar to interop with C, you dont ever really need to do it otherise
08:27:08FromDiscord<JamesH> I only ask because I was reading some code that relied a lot on malloc() to dynamically allocate new structs in a game written in C++, and thought i might have implemented it as a seq, but i know C++ has vectors, which is the same?
08:27:26FromDiscord<Elegantbeef> I've got a framework that I only use 1 non GC'd allocated heap memory for iirc
08:27:37FromDiscord<Elegantbeef> Yea i mean you can use a seq, there isnt much reason not to
08:27:55FromDiscord<JamesH> What was the situation you didn't use the GC for, out of interest?
08:28:07FromDiscord<Elegantbeef> Loading shaders since it required a cstringarray
08:29:07FromDiscord<Elegantbeef> You dont really need to use manual memory management in most siutations
08:29:14FromDiscord<Elegantbeef> A vast majority you can do with built in collections
08:29:29FromDiscord<Rika> Even interop sometimes
08:29:46FromDiscord<Elegantbeef> Yep Nim strings are null terminated
08:30:13FromDiscord<Elegantbeef> So a cstring that doesnt outlive creation is 100% safe
08:30:29FromDiscord<Rika> If the C API is also safe lol
08:30:30FromDiscord<Elegantbeef> a cstring from a nim string\
08:30:41FromDiscord<Elegantbeef> That's what i meant by outlive creation
08:31:09FromDiscord<Elegantbeef> If the C Api holds onto the pointer and you add to your nimstring causing it to grow it'll have a bad pointer to old memory
08:31:34FromDiscord<Elegantbeef> But anyway the point is Nim's collections work, if they dont work well enough you'll want to rewrite them in your own container which uses destructors anyway
08:33:37FromDiscord<Elegantbeef> It's odd to hear that they didnt use vector, maybe they just didnt like the name 😛
08:34:28FromDiscord<evoalg> I can also do: `for i, x in map(1..9, x ^ i):` ... so nice
08:37:14FromDiscord<Elegantbeef> The fun part with those variants is it was just me going "I really hate testing these with manually declaring a counter and incrementing it"
08:38:04FromDiscord<Elegantbeef> I was getting tired of doing that
08:38:05FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/R7j
08:40:18*Guest2440 joined #nim
08:40:33Guest2440hi
08:41:19FromDiscord<Elegantbeef> hello
08:43:35Guest2440I'm at a lost, im trying to upload a png to an ftp using asyncftpclient and it keeps corrupting it. when i try to open it again i get "PNG file curropted by ASCII conversion".
08:44:07Guest2440there is no excpetion or anything, and i can figure out how to make the ftp use binary for the upload
08:45:26Guest2440*cant
08:57:47FromDiscord<Elegantbeef> It doesnt look like it can change between the two, that might've been a detail missed in writting it
08:58:18FromDiscord<Elegantbeef> Though i dont get why a binary/ascii file behaves differently
08:58:48FromDiscord<Elegantbeef> You're sure you got the order right?
09:02:30Guest2440i don't understand the question. the file works on the original computer, then copied to ftp and stops working.
09:03:14FromDiscord<Elegantbeef> I mean do you have the parameter order correct?
09:03:51FromDiscord<Elegantbeef> I guess you'd know cause it'd throw an exception otherwise
09:04:55Guest2440it has two parameters, local file and remote, and its copies the file, just corrupted
09:05:13FromDiscord<Elegantbeef> What's the file size?
09:05:35Guest24401. 40kb. 2. 110kb.
09:06:03FromDiscord<Elegantbeef> 40 is on recieve?
09:09:39Guest2440i checked files, the first 40kb and the second 110kb.
09:10:03FromDiscord<Elegantbeef> So they're properly transferred?
09:10:13Guest2440yes.
09:12:39FromDiscord<Elegantbeef> Wish i could help, dont have anything setup to help debug this
09:15:37FromDiscord<Elegantbeef> Oddly there is https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/asyncftpclient.nim#L433-L448 in the module
09:20:13FromDiscord<Elegantbeef> Seems no one tested if the files worked properly, so it seems the binary stuff needs to be added
09:23:44FromDiscord<Elegantbeef> Atleast the spec is published and easily understandable
09:25:18*jjido joined #nim
09:30:34FromDiscord<Elegantbeef> If i can be arsed to setup a ftp server I might consider implementing it properly, but big if, do make an issue on the github though
10:24:41*Goodbye_Vincent joined #nim
10:53:30FromDiscord<glyh (Lyhokia)> I'm trying to create a treesitter grammar for Nim, and I found this\:
10:56:24FromDiscord<glyh (Lyhokia)> I'm trying to create a treesitter grammar for Nim, and I found this [Grammar](https://nim-lang.org/docs/manual.html#syntax-grammar), on Nim's website, which is not standard CFG, I guess. So could you explain how these operator works? e.g. "/","\\", "IND{\}"?↵There seems to be more magic, e.g. OP0, it claims to be operator ending in either "-\>", "\~\>" or "=\>", does this mean "abc=\>" is a OP0?
10:57:27FromDiscord<glyh (Lyhokia)> Or, if I have to read the source, except the parser.nim file, could you point out what else should I scan through?
10:58:35FromDiscord<glyh (Lyhokia)> I'm trying to create a treesitter grammar for Nim, and I found this [Grammar](https://nim-lang.org/docs/manual.html#syntax-grammar), on Nim's website, which is not standard CFG. So could you explain how these operator works? e.g. "/","\\", "IND{\}"?↵There seems to be more magic, e.g. OP0, it claims to be operator ending in either "-\>", "\~\>" or "=\>", does this mean "abc=\>" is a OP0?
10:59:59FromDiscord<glyh (Lyhokia)> Or, if I have to read the sources, could you point out what else should I scan through, except "compiler/{parser.nim,lexer.nim}" ?
11:07:58*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
11:09:42FromDiscord<demotomohiro> It seems these operators are explained in http://nim-lang.github.io/Nim/manual.html#about-this-document
11:14:50FromDiscord<demotomohiro> 'IND{=}" and "IND{>}" are explained in http://nim-lang.github.io/Nim/manual.html#lexical-analysis-indentation↵I think you need to read the manual from the top.
11:15:38FromDiscord<glyh (Lyhokia)> I'll go and see, thank you
11:24:20FromDiscord<demotomohiro> There is also grammer related file in https://github.com/nim-lang/Nim/blob/devel/doc/grammar.txt
11:27:29FromDiscord<glyh (Lyhokia)> Thanks!
11:42:59*pro joined #nim
11:48:57*neceve joined #nim
12:36:23FromDiscord<kaddkaka> Hi, why did `nim` go for named `shl`/`shr` instead of operators `<<`/`>>`?
12:39:20proiirc shl and shr are common assembly names in popular risc's so why not use them
12:39:45FromDiscord<Marisol> And because of pascal roots i guess
12:39:56FromDiscord<kaddkaka> add is assembly for `+` 😛
12:40:03FromDiscord<kaddkaka> I see
12:40:06FromDiscord<kaddkaka> thanks
12:52:14FromDiscord<Solitude> In reply to @kaddkaka "Hi, why did `nim`": and to leave `<<`, `>>` free for some wacky sugar, i guess
12:52:27FromDiscord<kaddkaka> Make sense
13:05:28FromDiscord<haxscramper> You can also copy some parts from https://github.com/haxscramper/tree-sitter-nim/blob/master/grammar.js if you find this useful
13:05:29FromDiscord<glyh (Lyhokia)> I'm trying to create a treesitter grammar for Nim, and I found this [Grammar](https://nim-lang.org/docs/manual.html#syntax-grammar), on Nim's website, which is not standard CFG. So could you explain how these operator works? e.g. "/","\\", "IND{\}"?↵There seems to be more magic, e.g. OP0, it claims to be operator ending in either "-\>", "\~\>" or "=\>", does this mean "abc=\>" is a OP0?
13:22:45FromDiscord<MD> sent a long message, see http://ix.io/3JyF
13:23:51FromDiscord<MD> (edit) "http://ix.io/3JyF" => "http://ix.io/3JyG"
13:23:59FromDiscord<MD> (edit) "http://ix.io/3JyG" => "http://ix.io/3JyH"
13:24:09FromDiscord<MD> (edit) "http://ix.io/3JyH" => "http://ix.io/3JyI"
13:24:23FromDiscord<MD> (edit) "http://ix.io/3JyI" => "http://ix.io/3JyJ"
13:24:35FromDiscord<MD> (edit) "http://ix.io/3JyJ" => "http://ix.io/3JyK"
13:36:07FromDiscord<Shiba> HI
13:36:25FromDiscord<Shiba> iam new to nim
13:36:43FromDiscord<Shiba> and i have some questions😀
13:37:38prowelcome
13:39:05FromDiscord<Shiba> so is nim faster than LuaJit
13:40:44*pro quit (Read error: Connection reset by peer)
13:50:12FromDiscord<TryAngle> In reply to @Shiba "so is nim faster": nim is one of the faster languages available, especially when arc/orc becomes default↵in most situations ur implementation is what matters and not the language though.
13:51:05FromDiscord<TryAngle> https://github.com/kostya/benchmarks↵here are some benchmarks
13:51:06FromDiscord<enthus1ast> also fast EXECUTION is not everything, also fast code writing, CORRECT code, joy of use...
13:51:51FromDiscord<Shiba> okay 😀 but i think that luaJit is fast and has acces to hardaware level with c in "fii"
13:52:18FromDiscord<Ricky Spanish> Agreed with all of this, it's fast but the code also is nice to work with and it has a lot of options if you want to deep dive to improve the performance also, nim can also call c and cpp easily
13:53:16FromDiscord<TryAngle> C / C++ interop feels a bit too easy in nim tbh, almost illegal XD
13:53:29FromDiscord<TryAngle> (edit) "XD" => "how easy it isXD"
13:53:52FromDiscord<Shiba> iam confused beacause i already know lua and i want to switch to a languagesthat has acces to low level stuff and maybe a similair syntanx
13:53:59FromDiscord<Shiba> (edit) "languagesthat" => "language that"
13:54:24FromDiscord<Shiba> so if i compile my code to i need to get a c compiler too
13:54:31FromDiscord<Shiba> (edit) "so if i compile my code to ... i" added "c"
13:54:38FromDiscord<Shiba> (edit) "c" => "c, do"
13:54:42FromDiscord<Shiba> (edit) "too" => "too?"
13:56:01FromDiscord<Rika> Yes
13:56:04*neurocyte0132889 joined #nim
13:56:04*neurocyte0132889 quit (Changing host)
13:56:04*neurocyte0132889 joined #nim
13:56:13FromDiscord<Rika> But nim on Windows gets it for you
13:56:17FromDiscord<TryAngle> In reply to @Shiba "so if i compile": you only need a c compiler installed but u don't need to use it
13:56:23FromDiscord<TryAngle> nim does that for u
13:56:39FromDiscord<Shiba> i have minGW installed with gcc
13:56:58FromDiscord<TryAngle> that should be perfect
13:57:02FromDiscord<Rika> You won't need to manually use it
13:57:53FromDiscord<Shiba> so how do i start make a fille with .nim at the end
13:57:58FromDiscord<Shiba> (edit) "fille" => "file"
13:57:59FromDiscord<Rika> Startup time is not easily measurable I’d say↵Image manipulation is pretty easy I’d say↵Probably on the GUI but I don’t know too much on that
13:58:11FromDiscord<Rika> In reply to @Shiba "so how do i": Call the Nim compiler
13:58:32FromDiscord<Rika> “nim c file” generates a binary
13:58:33FromDiscord<Shiba> iam interested in game dev and i found the nico framework
14:01:49FromDiscord<Shiba> and since most luaJit frameworks are made for games and not software even that they have "ffi" , i decided to work with another language with another framework that allows to make games and software at the same time , i will need some time to learn the language , can anyone give some youtube videos i can watch to start learning😀
14:03:20FromDiscord<TryAngle> that is the main issue with nim in my opinion... the lack of documentation, media etc. :c
14:05:16FromDiscord<TryAngle> https://nim-lang.org/docs/tut1.html↵https://nim-lang.org/docs/manual.html↵https://nim-lang.org/docs/lib.html
14:10:23FromDiscord<Solitude> In reply to @Shiba "and since most luaJit": https://narimiran.github.io/nim-basics/
14:12:55NimEventerNew thread by Gcao: Nim 1.6.2 does not compile on MacOS BigSur 11.6.1, see https://forum.nim-lang.org/t/8743
14:14:12FromDiscord<Shiba> nim syntax higlighting package for sublime?
14:14:17FromDiscord<Shiba> (edit) "higlighting" => "highlighting"
14:19:34FromDiscord<Zajt> How can I define a function that doesn't return anything? Can I put void after `proc main(): ` this?
14:20:00FromDiscord<enthus1ast> proc main() =
14:20:27FromDiscord<Zajt> thanks!
14:22:17FromDiscord<Zajt> sent a code paste, see https://play.nim-lang.org/#ix=3Jz9
14:24:01FromDiscord<enthus1ast> no this means they must be declared at the most left tab intentation level
14:24:48FromDiscord<enthus1ast> idn why this complains here, maybe change the NimMain name
14:24:51FromDiscord<enthus1ast> idk
14:26:12FromDiscord<Zajt> https://media.discordapp.net/attachments/371759389889003532/924669433333559346/unknown.png
14:26:21FromDiscord<Zajt> i think it complains about line 134 here
14:26:40FromDiscord<enthus1ast> yes
14:26:44FromDiscord<enthus1ast> toByteSeq\
14:26:46FromDiscord<enthus1ast> is not allowed
14:26:52FromDiscord<enthus1ast> must be toByteSeq
14:26:56FromDiscord<enthus1ast> withouth export marker
14:27:24FromDiscord<Zajt> but it worked with this code when I had `when isMainModule:` instead of `proc main() =` on line 132 there
14:27:33*arkurious joined #nim
14:27:38FromDiscord<Solitude> when doesnt introduce new scope
14:28:04FromDiscord<Zajt> ah I see, now it compiled! thanks
14:31:05FromDiscord<MD> In reply to @Rika "Startup time is not": What did you mean by "Probably on the GUI but I don’t know too much on that"?
14:31:24FromDiscord<MD> (edit) "What" => "Thanks! And what"
14:36:35*pro joined #nim
14:39:02*pro quit (Client Quit)
14:39:30*pro joined #nim
14:42:22prowhat is lua lol
14:44:53madpropsi use lua to program my window manager
14:45:30madpropsbut i'd rather use something else tbh
14:46:28FromDiscord<Rika> In reply to @MD "Thanks! And what did": Probably exists fitting your criteria but I am not familiar
14:46:36FromDiscord<Rika> In reply to @madprops "i use lua to": Why?
14:46:51madpropsbecause that's what awesomewm uses for configuration/extension
14:47:11FromDiscord<Rika> I think I replied to the wrong one
14:47:17FromDiscord<Rika> Why on the you would rather another
14:47:32madpropsthe language is very barebones
14:47:52madpropslots of basic things have to be implemented
14:54:23FromDiscord<enthus1ast> lua has some interesting constructs, but i would rather use a typed language even for configuration
14:55:22FromDiscord<enthus1ast> would be interesting to have a dynamic nim configuration (nimscript) that could also be compiled, for default configuration and super fast startup times
14:55:39FromDiscord<enthus1ast> for a wm i mean
14:56:33FromDiscord<enthus1ast> the nimscript startup times unfortunately are not THAT great currently
14:56:56FromDiscord<enthus1ast> think lua can startup much quicker than the nim compiler
15:11:11*rp2 quit (Ping timeout: 250 seconds)
15:13:06*rp2 joined #nim
15:16:28*Colt quit (Remote host closed the connection)
15:16:54*Colt joined #nim
15:19:54*Colt quit (Remote host closed the connection)
15:20:19*Colt joined #nim
15:26:04*Colt quit (Remote host closed the connection)
15:26:30*Colt joined #nim
15:28:14FromDiscord<el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3Jzz
15:31:59FromDiscord<Rika> How would that work
15:32:57FromDiscord<el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3JzB
15:33:07*Colt quit (Remote host closed the connection)
15:33:17*rp2 quit (Ping timeout: 240 seconds)
15:35:06*Colt joined #nim
15:35:11FromDiscord<el__maco> it doesn't matter if the buffer is in heap. But avoiding constant malloc matters. I don't know for a fact that Nim allocates, I should probably see the C source and see if it does, but I suspect it would
15:35:17*rp2 joined #nim
15:35:57*Colt quit (Read error: Connection reset by peer)
15:45:37FromDiscord<Shiba> ok so compiler said that i dont have a compatible mingw installation and it's started a download
15:57:28FromDiscord<el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3JzF
15:57:44FromDiscord<el__maco> rawNewString almost certainly allocates. But I don't see where it gets freed
15:58:09FromDiscord<el__maco> there's popFrame() but that only updates a frame pointer of some kind
16:13:57FromDiscord<Yardanico> sent a code paste, see https://paste.rs/Dvd
16:14:02FromDiscord<Yardanico> (edit) "https://play.nim-lang.org/#ix=3JzI" => "https://play.nim-lang.org/#ix=3JzJ"
16:14:10FromDiscord<Yardanico> well it still uses strings
16:14:52FromDiscord<Yardanico> also for a cleaner C code you can compile with `-d:danger --gc:arc`
16:14:59FromDiscord<Yardanico> and also, nim uses its own allocator by default
16:15:10FromDiscord<Yardanico> so even if it's doing rawNewString it might actually not allocate _new memory_, but I'm not sure
16:16:09FromDiscord<Solitude> In reply to @Yardanico "maybe take a look": what the hell is that
16:16:15FromDiscord<Yardanico> In reply to @Solitude "what the hell is": dont ask me
16:16:42FromDiscord<Solitude> waiting for seqbasics
16:16:46FromDiscord<Solitude> jsonbasics
16:16:55FromDiscord<Yardanico> return to basics
16:17:56FromDiscord<Yardanico> In reply to @Solitude "what the hell is": have you forgot about https://nim-lang.org/docs/strmisc.html
16:19:12FromDiscord<Yardanico> also https://nim-lang.org/docs/cstrutils.html
16:20:03FromDiscord<Solitude> In reply to @Yardanico "have you forgot about": forsenInsane
16:20:20FromDiscord<Yardanico> In reply to @Solitude "forsenInsane": https://media.discordapp.net/attachments/371759389889003532/924698152601264128/unknown.png
16:20:27FromDiscord<Yardanico> :forsenNOIDONTTHINKSO:
16:27:26FromDiscord<el__maco> sent a code paste, see https://play.nim-lang.org/#ix=3JzN
16:27:33FromDiscord<Yardanico> yes
16:27:35FromDiscord<Yardanico> use setLen
16:27:41FromDiscord<el__maco> also its not pretty, I wonder if I got this right
16:27:42FromDiscord<Yardanico> or create a string with `newStringOfCap`
16:27:53FromDiscord<Yardanico> and then you can just use normal `add` really
16:28:13FromDiscord<el__maco> that sounds kinda better tbh
16:28:29FromDiscord<Yardanico> also @elmaco you can avoid temp allocations when adding ints to the string
16:28:59FromDiscord<Yardanico> https://nim-lang.org/docs/digitsutils.html#addInt%2Cstring%2Cint64 it's exported by system so always available
16:29:22FromDiscord<Yardanico> just don't forget `echo` itself allocates too
16:29:22FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3JzO
16:29:37FromDiscord<el__maco> well, echo is just debug
16:29:56FromDiscord<el__maco> that can allocate if it feels like it
16:30:14FromDiscord<Yardanico> and I think it's a bit better to use char instead of string if the string is len 1
16:30:24FromDiscord<Yardanico> if you want to add it to another string
16:31:11FromDiscord<krisppurg> sent a long message, see http://ix.io/3JzP
16:31:38FromDiscord<Yardanico> of 19 bytes
16:31:39FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3JzQ
16:31:42FromDiscord<Solitude> In reply to @krisppurg "<@!107140179025735680> heya uh whenever": jsony treats tuples as arrays
16:32:33FromDiscord<krisppurg> how come?
16:33:50FromDiscord<krisppurg> it expects an array, but it gets an object instead.↵↵jsony should treat objects as objects but also treat tuples as objects as well
16:34:28FromDiscord<Solitude> open issue, treeform thought otherwise.
16:34:41FromDiscord<Yardanico> In reply to @Solitude "open issue, treeform thought": :forsenDespair:
16:35:08FromDiscord<Solitude> i would go for compromise where named tuples are treated as objects, and unnamed - as arrays.
16:35:49FromDiscord<Yardanico> can you actually distinguish between named and unnamed in code? i guess if you check that the field is named "field1" xD?
16:36:27FromDiscord<Solitude> https://nim-lang.org/docs/typetraits.html#isNamedTuple%2Ctypedesc
16:36:32FromDiscord<Solitude> amazing
16:36:43FromDiscord<Yardanico> wow
16:36:48FromDiscord<Yardanico> nim is usable?!
16:37:55*Colt joined #nim
16:39:58FromDiscord<krisppurg> In reply to @Solitude "i would go for": yeah basically
16:40:33FromDiscord<Shiba> how do i make objects that has an update functions and variables
16:40:46FromDiscord<krisppurg> In reply to @Solitude "https://nim-lang.org/docs/typetraits.html#isNamedTu": didnt know that was there. Deffo would come in handy
16:40:55FromDiscord<Yardanico> In reply to @Shiba "how do i make": not sure what you mean. If you want objects to "have variables", then you add fields to your object
16:40:59FromDiscord<Yardanico> nim doesn't really have a notion of classes
16:41:11FromDiscord<Yardanico> but you can easily replicate what you would do with classes in other languages in Nim without them
16:41:26FromDiscord<Shiba> In reply to @Yardanico "nim doesn't really have": so like i need to update seprately
16:41:42FromDiscord<Shiba> (edit) "In reply to @Yardanico "nim doesn't really have": so like i need to update ... seprately" added "them"
16:42:13FromDiscord<Yardanico> In reply to @Shiba "so like i need": can you show what you want with code maybe?
16:42:34FromDiscord<Yardanico> if you want to have functions that update your object, you can just write them normally
16:45:08FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3JzU
16:56:18FromDiscord<krisppurg> In reply to @krisppurg "<@!107140179025735680> heya uh whenever": also minimal example to reproduce this error message↵↵https://play.nim-lang.org/#ix=3JzX
16:59:33*neceve quit (Ping timeout: 256 seconds)
17:10:28FromDiscord<treeform> In reply to @krisppurg "also minimal example to": I treat tuples as arrays, but maybe if tuple has named fields I should read it as an object. To get around this limitation, you can create a hook.
17:11:26FromDiscord<krisppurg> well I dont want to create a hook for every single possible tuple
17:12:51FromDiscord<Solitude> In reply to @treeform "I treat tuples as": how do you override default hook?
17:13:19*neceve joined #nim
17:26:17*xet7 quit (Ping timeout: 252 seconds)
17:29:09*pro quit (Quit: WeeChat 3.3)
17:31:35FromDiscord<treeform> In reply to @krisppurg "well I dont want": I don't support named tuples at the moment, it's probably not that hard to add support.
17:31:54FromDiscord<krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=3JAc
17:32:23FromDiscord<treeform> If that works great.
17:38:38*xet7 joined #nim
18:02:31FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JAl
18:02:47FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3JAl" => "https://play.nim-lang.org/#ix=3JAm"
18:04:04FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3JAm" => "https://play.nim-lang.org/#ix=3JAo"
18:04:08FromDiscord<Solitude> In reply to @TryAngle ". anybody knows now?": yes, just `template impl(p: untyped): untyped =` and use p in place of required proc
18:04:29FromDiscord<treeform> In reply to @krisppurg "Seems like I sort": I don't think its correct to parse every named tuple with fields, my code for instance relies on pacing named tuple as array. It probably should check and parse it as array if it sees [ and { if it sees as object.
18:04:43FromDiscord<treeform> (edit) "pacing" => "parsing"
18:06:09FromDiscord<Solitude> In reply to @treeform "I don't think its": since its very debatable what behaviour should be default, i think that hook needs to be moved to other module and imported as needed
18:06:43FromDiscord<krisppurg> ^^
18:06:57FromDiscord<krisppurg> (edit) "^^ ... " added "i agree"
18:10:55FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JAv
18:11:09FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3JAv" => "https://play.nim-lang.org/#ix=3JAw"
18:12:48FromDiscord<Solitude> you cant use SomeFloat like that
18:12:58FromDiscord<Solitude> in newSeq
18:13:05FromDiscord<Solitude> SomeFloat is typeclass, not a concrete type
18:13:31FromDiscord<Solitude> sent a code paste, see https://play.nim-lang.org/#ix=3JAz
18:13:33FromDiscord<TryAngle> do I do p[T: SomeFloat](..)↵newSeq[T]()?
18:13:44FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JAA
18:13:49FromDiscord<TryAngle> what is the difference now?
18:14:03FromDiscord<TryAngle> does the T in the second be treated as a concrete type ?
18:14:14FromDiscord<TryAngle> (edit) "?" => "instead of a typeclass?"
18:14:25FromDiscord<Solitude> when you instantiate a generic proc T will be resolved to a concrete type
18:15:07FromDiscord<TryAngle> but why does it work "normal" when I don't put it in a template when using SomeFoat without a T ?
18:15:27FromDiscord<Solitude> it doesnt
18:15:38FromDiscord<treeform> In reply to @Solitude "since its very debatable": Not sure what you mean with extra imports, but I think jsony should work out of the "box" for most people. I don't want to make people think.
18:15:51FromDiscord<treeform> I just want to give them a 1 line solution that should work in most cases
18:15:53FromDiscord<TryAngle> In reply to @Solitude "it doesnt": it does lol, so its a bug that it wokrs?
18:16:03FromDiscord<Solitude> give a snippet wehre it works
18:16:34FromDiscord<Solitude> In reply to @treeform "I just want to": but make solution painful in rare cases?
18:17:18FromDiscord<Solitude> In reply to @treeform "I just want to": you can still make it as easy to use if you split it up into modules, and reexport all of them in `jsony.nim`. whoever needs extra customization will mix and match component modules
18:18:10FromDiscord<Solitude> !eval echo newSeq[SomeFloat](1)
18:18:12NimBotCompile failed: /playground/nim/lib/system.nim(643, 14) Error: cannot instantiate: 'T'
18:21:50FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JAH
18:21:59FromDiscord<Solitude> what
18:22:10FromDiscord<Solitude> dont bother explaining
18:23:09FromDiscord<TryAngle> sent a code paste, see https://paste.rs/wwe
18:29:30FromDiscord<Solitude> In reply to @TryAngle "I mean that is": thats broken
18:30:42FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JAJ
18:31:25FromDiscord<Solitude> compiles for me
18:34:47FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3JAM
18:35:08FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3JAM" => "https://play.nim-lang.org/#ix=3JAN"
18:38:37FromDiscord<Solitude> what is your nim version\
18:38:44FromDiscord<TryAngle> 1.6.2
18:40:18FromDiscord<Solitude> works on playground https://play.nim-lang.org/#ix=3JAS
18:42:46FromDiscord<Yardanico> In reply to @Solitude "works on playground https://play.nim-lang.org/#ix=3": playground runs fake nim
18:42:53FromDiscord<Yardanico> /s
19:19:52FromDiscord<planetis> is there a way to do the same as .bycopy pragma directly in the function definition?
19:20:24FromDiscord<planetis> I want to bypass nim's way of parameter passing but only for some functions
19:24:43FromDiscord<enthus1ast> how can i tell nimble to always install the newest version? ↵When useing this syntax\:↵↵requires "https://github.com/enthus1ast/nimFsm.git"
19:25:04FromDiscord<enthus1ast> i want to basically ignore the artificial versioning and just install the newest
19:25:19FromDiscord<Solitude> `#HEAD`
19:25:52FromDiscord<Yardanico> :forsenHead:
19:26:26FromDiscord<enthus1ast> mhh lets try
19:26:38FromDiscord<enthus1ast> i thought i have done this already
19:28:16FromDiscord<Solitude> i hope its for your personal use, because its a pain in the ass for other users to have #HEAD'ed dependency
19:28:26FromDiscord<enthus1ast> yes
19:28:33FromDiscord<enthus1ast> personal use
19:28:54FromDiscord<enthus1ast> i always fight with this nimble syntax
19:29:01FromDiscord<enthus1ast> every time
19:29:09FromDiscord<enthus1ast> it does not what i want
19:47:15FromDiscord<planetis> requires "x@#head"
19:48:27FromDiscord<Yardanico> In reply to @planetis "requires "x@#head"": AFAIK @# when using nimble on CLI, no?
19:48:29FromDiscord<Yardanico> and # is for requires
19:48:32FromDiscord<Yardanico> or is it the other way?
19:55:40FromDiscord<frankzig> Is there a bucket queue impl for Nim?
20:14:00FromDiscord<enthus1ast> on the cli afaik
20:14:14FromDiscord<enthus1ast> und just #head when in nimble file
20:20:34FromDiscord<sOkam!> How does nim code interact with the original code a binding exactly?
20:21:52FromDiscord<sOkam!> @ElegantBeef Started the gdextension-nim thing. Having trouble understanding the architecture of the binding generator, and why the mentioned macros. I get that macros create a desired AST, I don't get why (in my total noob understanding) "a bunch of procedures" will need custom restructuring of the AST
20:22:18FromDiscord<sOkam!> (edit) "How does nim code interact with the original code ... a" added "of"
20:23:02FromDiscord<sOkam!> (edit) "@ElegantBeef Started the gdextension-nim thing. Having trouble understanding the architecture of the binding generator, and why the mentioned macros. I get that macros create a desired AST, ... I" added "but"
20:24:15FromDiscord<sOkam!> Why is the generated code not gonna be compliant to the default AST? 🤔
20:42:07FromDiscord<yledu> hi↵I don't know if it's the right channel to ask :
20:42:42FromDiscord<yledu> I've downloaded nim using choosenim on my mac, everything compiled fine and all, but trying some examples `import random fails`
20:43:37FromDiscord<yledu> It tells me "cannot open random"
20:45:27FromDiscord<yledu> Some random is in math I found out, but not rand() for example which is used in the nim by example
20:46:36FromDiscord<Yardanico> In reply to @yledu "Some random is in": can you show all of your code ?
20:47:09FromDiscord<yledu> sent a code paste, see https://play.nim-lang.org/#ix=3JBr
20:47:34FromDiscord<yledu> taken from https://nim-by-example.github.io/if_else_while/
20:49:41FromDiscord<yledu> I must have a path problem, but I did follow all instructions there:↵https://nim-lang.org/install_unix.html↵with choosenim
20:56:30*ozzz quit (Remote host closed the connection)
20:59:10FromDiscord<yledu> any idea ?
21:26:27*Gustavo6046 joined #nim
21:33:21*ozzz joined #nim
21:34:27FromDiscord<Elegantbeef> `nim -v`?
21:34:27FromDiscord<Elegantbeef> Can you elaborate i dont quite follow?↵(@sOkam!)
21:37:08FromDiscord<Elegantbeef> Are you asking why use macros to generate the code from the json?
21:37:34FromDiscord<evoalg> In reply to @yledu "any idea ?": one thing you could try and remove choosenim (`rm -fr ~/.config/nim/`) and install nim via brew?
21:37:46FromDiscord<evoalg> (edit) "and" => "is"
21:38:48FromDiscord<evoalg> brew for mac has the latest nim version (1.6.2)
21:38:49FromDiscord<Elegantbeef> Or just check your nim version and make sure it's modern
21:39:29FromDiscord<Elegantbeef> Given that i jump around versions i'm a bit biased against system installed packages
21:39:46FromDiscord<evoalg> oh yea do `nim -v` first like beef said @yledu
21:39:46FromDiscord<TryAngle> In reply to @Solitude "works on playground https://play.nim-lang.org/#ix=3": hmmm... sus 😳
21:39:48FromDiscord<Elegantbeef> So after playing with the iterator macros, evo likey?
21:40:37FromDiscord<Elegantbeef> try running with a broken compiler
21:40:41FromDiscord<Elegantbeef> shame on try
21:48:15FromDiscord<evoalg> sent a code paste, see https://play.nim-lang.org/#ix=3JBH
21:49:05FromDiscord<Elegantbeef> You dont really need to of course
21:49:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JBI
21:49:50FromDiscord<Elegantbeef> So yea it's probably 100% useless
21:50:21FromDiscord<Elegantbeef> I have ideas that make me go "Hey this would solve X" then realize "hey that's dumb"
21:50:53FromDiscord<Elegantbeef> What i actually want to do but cannot reason how is chaining iterators
21:51:14FromDiscord<evoalg> hehe ... I am learning the right way to do things by test all this stuff, which is awesome
21:51:35FromDiscord<Elegantbeef> so like `for x in filter(map(a, x 10), x >= 100)`
21:51:55FromDiscord<evoalg> yea chaining iterators would be so awesome, and that's what attracts people to functional programing I think?
21:52:17FromDiscord<Elegantbeef> which i guess could be achieved by doing `for x in chain(a.map(x 10).filter(x >= 10))`
21:52:48FromDiscord<TryAngle> In reply to @Elegantbeef "shame on try": literally reinstalled nim XD https://media.discordapp.net/attachments/371759389889003532/924781821965766697/unknown.png
21:53:33FromDiscord<Elegantbeef> Really though i just need to reason how to poop out the iterators in such a way that iterators are inlined at `yield` points
21:53:41FromDiscord<sOkam!> In reply to @Elegantbeef "Can you elaborate i": I get that macros create a desired AST, but I don't get why "a bunch of procedures" will need custom restructuring of the AST↵In my current understanding, the godot api is just a bunch of procedures/types that need some "mapping", so that they exist in nim syntax↵What I don't know is how is the AST related to that, if the ast is used for creating new custom structures (like the walrus o
21:53:47FromDiscord<Elegantbeef> Which isnt that difficult just gets complicate
21:54:15FromDiscord<Elegantbeef> Ok so the reason is say you want to do `SomeNode` which inherits `Node`
21:54:29FromDiscord<Elegantbeef> You need to know in Nim the methods and fields `Node` has and have them map to the GD native code
21:54:35FromDiscord<Elegantbeef> This way you can properly write code for godot
21:55:05FromDiscord<Elegantbeef> What's' the entire module Try?
21:55:18FromDiscord<TryAngle> @Solitude @ElegantBeef I think I found the issue now maybe?
21:56:01FromDiscord<TryAngle> Calling it in NNFS project works↵calling it from the library I'm developing and testing in another does not
21:56:03FromDiscord<Elegantbeef> You had T somewhereelse in the module?
21:57:27FromDiscord<Elegantbeef> Also AST isnt for custom structures
21:57:34FromDiscord<Elegantbeef> AST is legitimately everything you write
21:57:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JBL
21:58:15FromDiscord<Elegantbeef> It's a VarSection with an identDef of `"a", emptyNode(), 100`
22:00:29FromDiscord<TryAngle> hmmm maybe its an issue with nimble devlop and generics withhin templates?
22:00:53FromDiscord<Elegantbeef> That doesnt make any sense really
22:01:31FromDiscord<TryAngle> test it make a project add this template & proc there, nimble develop it and call it from another project
22:01:44FromDiscord<TryAngle> when I create it in the same project it works
22:02:13FromDiscord<sOkam!> @ElegantBeef About the architecture. How does nim code actually interact with the original code?↵Is it some type of translation on compile timer or smth? or how does it work, roughly?
22:02:28FromDiscord<sOkam!> (edit) "timer" => "time"
22:02:50FromDiscord<Elegantbeef> You use the C code in the header and do everything required to let Godot know about your "classes"
22:03:23FromDiscord<Elegantbeef> Do you have the link for the godot extension repo
22:03:31FromDiscord<sOkam!> ye, its godot-headers
22:03:32FromDiscord<Elegantbeef> I dont have it on hand atm
22:03:42FromDiscord<Elegantbeef> Thanks
22:03:49FromDiscord<sOkam!> https://github.com/godotengine/godot-headers
22:04:02FromDiscord<sOkam!> Master is the gdextension branch
22:04:12FromDiscord<Elegantbeef> https://github.com/godotengine/godot-headers/blob/master/godot/gdnative_interface.h#L447-L454
22:04:20FromDiscord<Elegantbeef> these are percisely how you let it know
22:04:50*xet7 quit (Quit: Leaving)
22:06:29FromDiscord<sOkam!> Ok. So you interact with those functions to let C know about nim procs↵But how does the interaction work?
22:06:59FromDiscord<sOkam!> I understand that that interaction is what I'm going to be designing... so that's what my Q is about mainly
22:07:31FromDiscord<sOkam!> Trying to design the model for what the generator is going to actually be doing... but kinda lost
22:07:41FromDiscord<sOkam!> (edit) "model" => "model/architecture"
22:07:57FromDiscord<Elegantbeef> If you want an example compile a `godot-nim` project with `--expandMacro:gdobj` to see what it does
22:08:32FromDiscord<sOkam!> you mean a godot game project?
22:08:57FromDiscord<Elegantbeef> Works fine here @TryAngle
22:08:58FromDiscord<Elegantbeef> It wont be the same for Godot extensions of course but it's atleast the basic idea
22:09:14FromDiscord<sOkam!> or just compiling the godot-nim bindings themselves?
22:09:20FromDiscord<Elegantbeef> Yea
22:09:42FromDiscord<Elegantbeef> You emit a bunch of top level instructions that subscribe the code to the godot environment
22:09:58FromDiscord<Elegantbeef> Yea using a godot game project that uses the `gdobj` example
22:10:06FromDiscord<Elegantbeef> `gdobj` macro\
22:10:21FromDiscord<Shiba> so my hello world program compiles in 3s with d:release
22:10:32FromDiscord<Shiba> can i optimiz it further
22:10:38FromDiscord<Shiba> (edit) "optimiz" => "optimize"
22:10:46FromDiscord<Yardanico> use clang, also consequent compilations are faster
22:10:47FromDiscord<frankzig> Are you guys aware of bucket queue implementations for Nim?↵Heapqueue is perfect for most intents, I need approximate priority handling in order to reduce that LogN complexity
22:13:53FromDiscord<frankzig> In reply to @Shiba "so my hello world": Joking: Yes, enable LTO, it will compile slower but run faster ;)
22:13:57FromDiscord<Shiba> In reply to @Yardanico "use clang, also consequent": ?? sorry can you explain "consequent compilations" and how i can use it😅
22:14:24FromDiscord<Yardanico> if you compile again and only change some code nim won't recompile all C files
22:14:58FromDiscord<Elegantbeef> yardanico mean subsequent compilations
22:15:09FromDiscord<Shiba> but i only have one fille with "echo "hello world"" andit's still 3s
22:15:16FromDiscord<Shiba> (edit) "andit's" => "and it's"
22:15:21FromDiscord<Shiba> wow
22:15:24FromDiscord<Yardanico> well you gotta deal with that
22:15:28FromDiscord<Yardanico> get a faster CPU :))
22:15:35FromDiscord<Yardanico> things should improve with IC
22:15:50FromDiscord<Elegantbeef> You could also use TCC if it's the c compiler but it's not as optimized code
22:16:13FromDiscord<frankzig> It cannot be avoided, on the other hand, it does scaly as badly as other languages, so longer scripts still compile in reasonable time
22:16:24FromDiscord<frankzig> (edit) "does" => "doesnt"
22:16:25FromDiscord<Shiba> In reply to @Elegantbeef "You could also use": i have it ,but idk how
22:16:33FromDiscord<Elegantbeef> `--cc:tcc`
22:16:38FromDiscord<Elegantbeef> On \nix atleast
22:16:45FromDiscord<Elegantbeef> On windows i think there is more of a setup
22:17:03FromDiscord<Yardanico> also @Shiba this only speeds up the C compilation part
22:17:09FromDiscord<Yardanico> it doesn't change the speed of the nim compilation part
22:17:18FromDiscord<Yardanico> so if you run your compile command more than 1 time and it's still 3s - that's nim time
22:17:20FromDiscord<Yardanico> not C compiler time
22:17:36FromDiscord<yledu> @evoalg @ElegantBeef Thanks ! it allowed me to see that I had the wrong nim version, a very old one from 2014! I then used `choosenim show path` and that gave me the right path to add to my .bash_profile
22:18:01FromDiscord<evoalg> nice!
22:18:42FromDiscord<sOkam!> @ElegantBeef Is this not exactly what I would be coding?↵https://github.com/pragmagic/godot-nim/blob/master/godot/godotapigen.nim
22:18:54FromDiscord<Shiba> In reply to @Yardanico "not C compiler time": i wonder why embeded languages like lua run super fast , maube because they don't compile
22:19:04FromDiscord<Yardanico> In reply to @Shiba "i wonder why embeded": not "maybe", that's exactly the reason :D
22:19:06FromDiscord<Shiba> (edit) "maube" => "maybe"
22:19:13FromDiscord<Yardanico> and the term you're looking for is "interpreted"
22:19:18FromDiscord<sOkam!> Ofc, adapting to gdextension... but seems like most of the work should be done there? possibly? or am I missing something big
22:19:50FromDiscord<Elegantbeef> Nope you're mostly right
22:20:24FromDiscord<Elegantbeef> They didnt document the code much though so it's a slog to try to understand
22:28:00FromDiscord<sOkam!> Good news is they were already binding with a json file, so at least that's similar 🤷‍♂️
22:28:17FromDiscord<sOkam!> I really thought it was done with an autowrapper
22:30:37FromDiscord<evoalg> sent a long message, see http://ix.io/3JBU
22:31:07FromDiscord<Elegantbeef> Most interpreted languages are not statically typed so a good type system 😛
22:31:25FromDiscord<evoalg> what beef said!
22:32:22FromDiscord<Shiba> In reply to @evoalg "a short program that": do all imported scripts compile
22:32:30FromDiscord<Shiba> (edit) "In reply to @evoalg "a short program that": do all imported scripts compile ... " added "in one time"
22:32:49FromDiscord<Shiba> (edit) "In reply to @evoalg "a short program that": do all imported scripts compile in ... one" added "all running scripts in"
22:33:42*FromDiscord quit (Remote host closed the connection)
22:33:55*FromDiscord joined #nim
22:34:12FromDiscord<Shiba> idk if that makes sense
22:34:14FromDiscord<evoalg> you mean when you do something like "import random" in your nim source file? ... it will import the random source (but only the part you actually use!) and will compile that along with your nim code (I belive)
22:34:23FromDiscord<Elegantbeef> It presently imports the entire file and semantically checks it all
22:34:36FromDiscord<Elegantbeef> Lazysem is a think that is being looked at, which will only look at what you actively use
22:34:43FromDiscord<Elegantbeef> "is a thing"
22:35:14FromDiscord<Shiba> not a problem since all of my programs are written in one file
22:35:29FromDiscord<Shiba> (edit) "file" => "file😜"
22:35:33FromDiscord<KatrinaKitten> Is there a way to call a proc which is stored as a property on an object? Trying to just do `object.property(params)` gives an error `identifier expected, but found 'object.property'`.
22:36:13FromDiscord<Elegantbeef> That's how you d oit
22:36:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JBW
22:37:54FromDiscord<KatrinaKitten> Hmm... is it possibly an issue with the fact that the property is declared `var`? If so, is there a way to work around that?
22:38:09FromDiscord<Elegantbeef> What?
22:39:08FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JBX
22:39:29FromDiscord<KatrinaKitten> sent a code paste, see https://play.nim-lang.org/#ix=3JBY
22:39:44FromDiscord<KatrinaKitten> (edit) "https://play.nim-lang.org/#ix=3JBY" => "https://play.nim-lang.org/#ix=3JC0"
22:40:11FromDiscord<Solitude> var shouldnt be there
22:40:43FromDiscord<KatrinaKitten> It needs to be there, the proc can be `nil` and needs to be changeable. I'm doing a manual `nil` check directly before the call in my actual code.
22:40:47FromDiscord<Elegantbeef> indeed
22:40:57FromDiscord<Solitude> .
22:40:57FromDiscord<Elegantbeef> `var proc` isnt a type deef
22:41:04FromDiscord<Elegantbeef> remove `var` from your object definition
22:41:23FromDiscord<Elegantbeef> field mutability depends on object mutabillity
22:41:57FromDiscord<KatrinaKitten> So why was the error nothing related to "hey idiot, don't use `var` there"?
22:42:02FromDiscord<KatrinaKitten> Just removing it results in `'parser1.body' cannot be assigned to`
22:42:06FromDiscord<KatrinaKitten> (edit) "Just removing it results in `'parser1.body' cannot be assigned to` ... " added "from elsewhere."
22:42:21FromDiscord<Solitude> declare your p with var
22:42:42FromDiscord<Solitude> https://nim-lang.github.io/Nim/tut1.html#the-var-statement
22:42:55FromDiscord<Elegantbeef> methinks the views has escaped the flags
22:43:10FromDiscord<Elegantbeef> Cause `var T` should error without `--experimental:views`
22:43:27FromDiscord<KatrinaKitten> In reply to @Solitude "declare your p with": That isn't really an option, this is an API thing. It's intended to be essentially an invisible replacement, it shouldn't rely on the user declaring with `var`.
22:44:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JC1
22:44:36FromDiscord<Solitude> In reply to @KatrinaKitten "That isn't really an": make your type a ref. your code doesnt do what you think ti does
22:45:02FromDiscord<Solitude> or make a better api
22:45:09FromDiscord<Elegantbeef> Indeed `var T` in a type definition is for views, and apparently a fix has leaked into views disabled
22:45:31FromDiscord<Elegantbeef> Weirder even that `var T` compiles in 1.0
22:45:32FromDiscord<Shiba> can you acces memory?
22:45:35FromDiscord<Elegantbeef> So the hell is going on
22:45:40FromDiscord<Solitude> no, you should use rust for that
22:46:09FromDiscord<Elegantbeef> Depends what you mean by access memory
22:47:48FromDiscord<Shiba> accessing by modifiying variables adresses and vallues in hex ...
22:48:07FromDiscord<Elegantbeef> It's a system language so yes you have that control
23:41:06FromDiscord<evoalg> @ElegantBeef when you did `b = "\10\20\30\40"` ... what is that sort of string?
23:41:33FromDiscord<Elegantbeef> It's a normal string
23:41:58FromDiscord<Elegantbeef> `\number` is a char escape that equates to `char(theByte)`
23:42:22FromDiscord<Elegantbeef> So the 10th ascii character is written, then the 20th, 30th ...
23:44:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JCc
23:44:23FromDiscord<Elegantbeef> This is just getting silly
23:45:20FromDiscord<evoalg> I'll have a play 😉
23:45:36FromDiscord<Elegantbeef> Lol it's not pushed yet
23:45:41FromDiscord<Elegantbeef> I'm still questioning if it makes any sense
23:45:49FromDiscord<evoalg> ahh true
23:46:10FromDiscord<evoalg> zip and zipIter are the same thing except I use zipIter in a for loop right?
23:46:39FromDiscord<Elegantbeef> Well "same"
23:46:46FromDiscord<Elegantbeef> They're vastly different implementations
23:46:59FromDiscord<evoalg> I can pass the same args?
23:47:13FromDiscord<Elegantbeef> Yea
23:47:51FromDiscord<evoalg> I guess I can use slicerator zip in the for loop but zipIter is more efficient
23:53:08FromDiscord<Elegantbeef> Neither are overly performant if you have a fixed size collection
23:53:11FromDiscord<Spook> nigga
23:53:21FromDiscord<Spook> semen
23:53:21FromDiscord<Spook> semen
23:53:22FromDiscord<Spook> semen
23:53:22FromDiscord<Spook> semen
23:53:23FromDiscord<Spook> semen
23:53:25FromDiscord<moggo> fucking niggers
23:53:31FromDiscord<moggo> niger ngien
23:53:32FromDiscord<moggo> gengeingeigeg
23:53:33FromDiscord<moggo> egegemg
23:53:33FromDiscord<moggo> enege
23:53:34FromDiscord<moggo> nge
23:53:34FromDiscord<moggo> ng
23:53:34FromDiscord<moggo> eng
23:53:51FromDiscord<Spook> https://tenor.com/view/redo-of-healer-redo-of-a-healer-redo-of-the-healer-anime-anime-girl-gif-20602961
23:53:53FromDiscord<ElegantBeef> <@&371760044473319454>
23:54:10FromDiscord<moggo> https://media.discordapp.net/attachments/371759389889003532/924812361859207168/2Q.png
23:54:10FromDiscord<Yardanico> thanks
23:54:12FromDiscord<moggo> https://media.discordapp.net/attachments/371759389889003532/924812370419777596/2Q.png
23:54:12FromDiscord<moggo> https://media.discordapp.net/attachments/371759389889003532/924812371904577536/2Q.png
23:54:45FromDiscord<Elegantbeef> Probably should also delete it from matrix since apparently image uploads deletion dont propagate
23:56:07FromDiscord<evoalg> beef are you on discord as well as matrix?
23:56:14FromDiscord<Elegantbeef> I am
23:56:22FromDiscord<Elegantbeef> Cant ping moderators from here 😛
23:57:08FromDiscord<Elegantbeef> Useless speed increase code
23:57:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3JCg
23:57:11FromDiscord<Yardanico> i'm not an admin in here
23:59:41FromDiscord<retkid> so im running something i barely have enough memory for
23:59:54FromDiscord<retkid> i have it on a while true loop