<< 10-09-2021 >>

00:04:33FromDiscord<RattleyCooper> Hey beef, you think you'd ever create a repo for the `NettyStream` type from nettyrpc?
00:05:31FromDiscord<Elegantbeef> Nah cause i'll be removing it for frosty when 1.6 is stable
00:06:08FromDiscord<RattleyCooper> ok
00:06:44FromDiscord<Elegantbeef> Both frosty and flatty offer better serialization
00:19:17FromDiscord<cabboose> haxscramper is making a c header parser or something right
00:19:43FromDiscord<cabboose> we should band together and make one before he does; except it’s filled with raise Defects
00:20:04FromDiscord<cabboose> no exceptions allowed except Defect and Exception
00:20:27FromDiscord<cabboose> And the module has a exitproc that raises Defect too
00:20:35FromDiscord<cabboose> in fact; why not just raise Defect when you import the module
00:20:40FromDiscord<cabboose> beautiful
00:22:27FromDiscord<Elegantbeef> Sounds lovely, now where does this idea come from?
00:23:48FromDiscord<cabboose> Such passion
00:23:56FromDiscord<cabboose> https://media.discordapp.net/attachments/371759389889003532/885681959957839892/image0.png
00:25:07FromDiscord<Elegantbeef> I mean anyone with a brain will say what hax said
00:25:13FromDiscord<cabboose> Of course
00:25:31FromDiscord<cabboose> But doesn’t it just make you itch to sprinkle some defects into his life
00:25:50FromDiscord<Elegantbeef> Not really cause i also have similar views to him with regards to defects
00:25:50FromDiscord<Varriount> In reply to @cabboose "haxscramper is making a": Doesn't Nimteropt already do that?
00:26:26FromDiscord<cabboose> I can’t remember exactly what he’s making but it’s beyond the current design as far as i remember
00:26:33FromDiscord<cabboose> something super hacky
00:27:32FromDiscord<Elegantbeef> https://github.com/haxscramper/hcparse
00:27:34nrds<R2D299> itHub: 7"High-level nim bindings for parsing C/C++ code"
00:28:07FromDiscord<cabboose> There you go
00:33:35FromDiscord<leorize> bummer, I raise Defect a lot, didn't know it was so evil
00:33:37FromDiscord<leorize> time to raise more of them
00:34:01FromDiscord<Elegantbeef> I mean it's only evil if people dont understand what they mean and what they do
00:34:35FromDiscord<Elegantbeef> You know what they do so i trust you! 😛
00:36:10FromDiscord<cabboose> A man after my own heart :’)
01:10:27*neurocyte6 joined #nim
01:12:30*neurocyte quit (Ping timeout: 260 seconds)
01:12:30*neurocyte6 is now known as neurocyte
01:28:48FromDiscord<auxym> so... this has nothing to do with nim, but I'll try anyways since you guys are cool: say I have the following C macro defined: `#define MTB_BASE 0x41006000UL`. And a struct defines a field of the same name `typedef struct {... uint32_t MTB_BASE ...} MTB_Type`. Any way to access that struct field like `mtb->MTB_BASE` by preventing macro expansion somehow?
01:29:46FromDiscord<leorize> wdym prevent macro expansion?
01:30:09FromDiscord<auxym> prevent `MTB_BASE` from being replaced by `0x...`
01:30:31FromDiscord<leorize> you rename the C macro \:)
01:30:31FromDiscord<Elegantbeef> Welcome to preprocessor hell
01:30:45FromDiscord<auxym> ps. this is from code being generated by ARM's SVDConv tool, for which they don't provide code, and produces question results, like this
01:30:51FromDiscord<auxym> yay
01:30:53FromDiscord<leorize> yea, the preprocessor doesn't understand C, it only knows how to copy-paste
01:31:11FromDiscord<auxym> yeh, I'll fix that crap manually I guess
01:31:37FromDiscord<auxym> thanks
01:31:39FromDiscord<leorize> if you have a tool that can parse C, just use it to alter the faulty macro automatically
01:32:22FromDiscord<leorize> or you can something that automagically lowercase all field names \:p
01:37:29*arkurious quit (Quit: Leaving)
01:40:07FromDiscord<Varriount> In reply to @auxym "so... this has nothing": Would defining another macro (`#define MTB_BASE_FIELD_NAME MTB_BASE`) before the original C macro, then using that new macro as the field name work?
01:41:04FromDiscord<auxym> Yeah, could work. Just trying to get a quick hack working so I'll patch it manually for now (with lowercase). Thanks though
01:41:13FromDiscord<Varriount> Or, I think you could use token concatenation (if I recall, it would be something like `#define MTB_PREFIX(x) MTB##x`)
01:51:07*audiophile_ quit (Quit: Default Quit Message)
02:16:22*audiophile_ joined #nim
02:18:03*audiophile joined #nim
02:21:47*audiophile_ quit (Ping timeout: 252 seconds)
02:21:55*audiophile is now known as audiophile_
02:29:10FromDiscord<Alea> sent a code paste, see https://play.nim-lang.org/#ix=3yqh
02:29:52FromDiscord<impbox [ftsf]> @Alea where did beginDrawing come from?
02:30:14FromDiscord<impbox [ftsf]> it'll be either a macro or template
02:30:21FromDiscord<Alea> ah found this
02:30:23FromDiscord<Alea> https://media.discordapp.net/attachments/371759389889003532/885713781479571486/unknown.png
02:30:44FromDiscord<impbox [ftsf]> looks like raylib, yup, they're templates
02:31:03FromDiscord<impbox [ftsf]> you can pass a block of code to a template via the : indent syntax
02:31:50FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3yqi
02:32:18FromDiscord<impbox [ftsf]> body is whatever you put indented after the colon
02:34:07FromDiscord<Alea> also has anyone run into nimble just getting stuck while installing a package off github?
02:34:19FromDiscord<Alea> oh wait
02:34:24FromDiscord<Alea> forgot that this package is huge
02:40:19FromDiscord<aleclarson> sent a code paste, see https://paste.rs/kYi
02:41:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yqk
02:41:43FromDiscord<Elegantbeef> Probably the ugliest solution and probably want a function
02:42:09FromDiscord<Elegantbeef> Or make your own `isEnum[T: enum](s: string): bool`
02:52:30FromDiscord<aleclarson> thx beef
02:55:35*Terry[m] joined #nim
03:02:49FromDiscord<Alea> so stupid idea, but is there anyway to make a macro for curly braces?
03:02:56FromDiscord<Alea> like c-style
03:03:11FromDiscord<Alea> presumably just making it so that {} = ()
03:03:49FromDiscord<leorize> you might have better luck making an editor plugin that renders `{}` at indent regions
03:09:07FromDiscord<impbox [ftsf]> i do miss being able to jump from start to end of blocks in my editor
03:09:10FromDiscord<impbox [ftsf]> probably a plugin for that
03:29:57*audiophile_ quit (Quit: Default Quit Message)
03:34:38*mdbauman__ joined #nim
03:38:06*mdbauman_ quit (Ping timeout: 260 seconds)
03:53:20FromDiscord<leorize> if you use neovim, then `]]` or `[]` should work
03:58:49FromDiscord<impbox [ftsf]> i use good ol vim
03:59:20FromDiscord<impbox [ftsf]> i've tried neovim a few times but run into issues, maybe i'll give it another go
04:06:01*supakeen quit (Quit: WeeChat 3.2.1)
04:06:29*supakeen joined #nim
04:14:01*rockcavera quit (Remote host closed the connection)
04:30:32NimEventerNew Nimble package! genny - Generate a shared library and bindings for many languages., see https://github.com/treeform/genny
04:30:35nrds<R2D299> itHub: 7"Generate a shared library and bindings for many languages."
04:33:11*Guest77 joined #nim
04:41:17FromDiscord<impbox [ftsf]> Nice!
04:54:26*Guest77 quit (Quit: Client closed)
05:04:53nrds<Prestige99> is "sound" the go-to cross platform sound lib? Looks decent but I don't see a release - just sitting at version 0.1.0
05:09:02*arfy joined #nim
05:16:53FromDiscord<impbox [ftsf]> doing what with sound?
05:18:26nrds<Prestige99> playing music and sounds in a game
05:18:39FromDiscord<impbox [ftsf]> Use SDL!
05:19:03FromDiscord<Elegantbeef> openal(slappy) is good aswell
05:19:10nrds<Prestige99> just for sound?
05:19:52FromDiscord<Elegantbeef> You can
05:20:16FromDiscord<Elegantbeef> https://wiki.libsdl.org/SDL_Init you can init specific systems
05:20:40FromDiscord<impbox [ftsf]> Prestige, what are you using for the rest of your game?
05:20:54FromDiscord<impbox [ftsf]> but yeah, can use SDL just for audio if you like
05:20:57nrds<Prestige99> Experimenting with using pixie for rendering
05:21:05FromDiscord<impbox [ftsf]> and input?
05:21:13nrds<Prestige99> glfw
05:21:52FromDiscord<impbox [ftsf]> ahh k, i'd just use SDL for all of the above =p
05:22:11*Doraemon joined #nim
05:22:40FromDiscord<impbox [ftsf]> can pixie draw to any surface?
05:22:52FromDiscord<impbox [ftsf]> looks like it can work with SDL as well
05:22:58FromDiscord<Elegantbeef> It just renders to an internal texture
05:23:20FromDiscord<Elegantbeef> You can in theory use any window context manager aslong as you can copy to it
05:24:30*NeoCron quit (Ping timeout: 260 seconds)
05:25:17nrds<Prestige99> I have it rendering with glfw to the screen, should also allow for shaders
05:25:26nrds<Prestige99> maybe more complicated than it needs to be :P
05:28:28FromDiscord<impbox [ftsf]> probably easy to swap out for SDL2_nim and can do shaders with that as well as input + audio
05:32:35nrds<Prestige99> Hm I'll look into that, thanks
05:32:52FromDiscord<impbox [ftsf]> there's a pixie SDL example
05:33:46*xet7 quit (Quit: Leaving)
05:35:57*xet7 joined #nim
05:50:01FromDiscord<Varriount> Zevv: I posted a link to the failing grammar in the GitHub issue. (https://github.com/Varriount/squint)
05:52:33*xet7 quit (Remote host closed the connection)
06:05:39FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3yqM
06:06:11FromDiscord<Elegantbeef> Cause that's super dangerous to do?
06:06:16FromDiscord<Elegantbeef> plus we have bitsets
06:07:15FromDiscord<Rika> Because enums are not sets?
06:11:58*max22- joined #nim
06:19:33*PMunch joined #nim
06:19:51FromDiscord<codic> I don't want a set, I want an enum
06:20:06FromDiscord<codic> i guess it's dangerous because it can go out of bounds, fair
06:20:17FromDiscord<codic> just makes working with old C apis inconvinent
06:20:32FromDiscord<codic> too lazy to wrap it all 😛
06:20:55FromDiscord<Elegantbeef> But just use a bitset
06:21:27FromDiscord<Elegantbeef> I dont know the API so dont know why you cannot just use a bitset
06:22:58FromDiscord<impbox [ftsf]> aww playground down
06:24:07FromDiscord<codic> bc the C api wants an enum, eg `xcb_grab_mode_t`
06:24:51FromDiscord<codic> and it's not very common to need bitwise ops anyways
06:24:56FromDiscord<codic> so I think using enums is a reasonable deicsion
06:25:08FromDiscord<impbox [ftsf]> can't you map a nim set to a c enum?
06:25:10FromDiscord<codic> they could also have used constants
06:25:13FromDiscord<codic> how do you do that?
06:25:55FromDiscord<impbox [ftsf]> https://nim-lang.org/docs/manual.html#set-type-bit-fields example here
06:26:01PMunch@imp, rebooting the playground now
06:26:57FromDiscord<codic> hmm, yeah I could do that...
06:27:01FromDiscord<codic> don't really have a use case
06:27:17FromDiscord<impbox [ftsf]> well if you want those operators you showed above, that's what bitsets are for
06:27:24FromDiscord<Elegantbeef> Also i dont get the point for your use case `xcb_grab_mode_t`
06:27:34FromDiscord<Elegantbeef> It has either sync or async
06:37:47PMunch@imp, playground is back now
06:38:29FromDiscord<impbox [ftsf]> \o/ thanks <3
06:50:49*jjido joined #nim
06:55:34FromDiscord<Varriount> https://media.discordapp.net/attachments/371759389889003532/885780522016575498/unknown.png
06:56:08FromDiscord<Varriount> I'm attempting to compile my NPeg grammar with `-d:release`
06:56:20*max22- quit (Ping timeout: 260 seconds)
07:00:13FromDiscord<Rika> In reply to @codic "bc the C api": Just because the C api wants an enum doesn’t mean it maps to an enum in Nim
07:12:51*max22- joined #nim
07:16:14FromDiscord<Yardanico> hacktoberfest this year will count GitLab PRs too
07:16:15FromDiscord<Yardanico> "You can now have PRs submitted via Gitlab count towards your Hacktoberfest goal!"
07:20:11NimEventerNew thread by Filip: Why is backward index operator [^1] not zero based [^0]?, see https://forum.nim-lang.org/t/8408
07:30:48FromDiscord<cabboose> Because stepping back in the index would be the last in the sequence
07:30:52FromDiscord<cabboose> 🤨
07:31:10FromDiscord<cabboose> Carrot 0 would just be 0 lol
07:31:48FromDiscord<Rika> it's just like that because of opinion though
07:33:01FromDiscord<impbox [ftsf]> i found it confusing at first too
07:33:01*PMunch quit (Read error: Connection reset by peer)
07:33:03FromDiscord<impbox [ftsf]> used to it now
07:33:13FromDiscord<cabboose> I think the semantics are more intuitive that carrot index would be that many before 0
07:33:21FromDiscord<impbox [ftsf]> ^0 for last would have made more sense to me, not sure if there's any good reason for it one way or the other
07:34:13NimEventerNew thread by Marks: What is the status of Nim IUP?, see https://forum.nim-lang.org/t/8409
07:34:45FromDiscord<cabboose> I guess it depends whether you consider the carrot index to be looking at the sequence reversed or whether it is you iterating backwards from 0 in the same index
07:35:04FromDiscord<cabboose> Wait that might have been confusing
07:35:11FromDiscord<cabboose> Either way I get what you mean
07:35:20FromDiscord<Rika> In reply to @impbox "^0 for last would": probably because of people used to using -1 for last index
07:35:28FromDiscord<Elegantbeef> I'm in party it takes 3 seconds to realize you've fucked up and adapt! 😀
07:35:36FromDiscord<cabboose> Ah yeah good point
07:35:37FromDiscord<impbox [ftsf]> @Rika yeah that could be it
07:35:58FromDiscord<impbox [ftsf]> yeah, it wasn't a hard thing to get used to, though i can imagine some bugs could be caused by it
07:37:06FromDiscord<cabboose> Pretty easy to implement some kind of sugar for that though right
07:37:08FromDiscord<haxscramper> I also tried to figure out what pythong is doing after answering the question, just to have something to compare to
07:37:11FromDiscord<haxscramper> and IMO it makes no sense
07:37:14FromDiscord<impbox [ftsf]> `Builtin roof operator that can be used for convenient array access. a[^x] is a shortcut for a[a.len-x].`
07:37:18FromDiscord<impbox [ftsf]> at least the docs explain it
07:37:41FromDiscord<haxscramper> `[1,3,4][-1]` is `4`, but `[1, 3,4][0:-1]` is `[1,3]`
07:37:57FromDiscord<haxscramper> like what
07:38:01FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yr2
07:38:09*PMunch joined #nim
07:38:14FromDiscord<impbox [ftsf]> err
07:38:24FromDiscord<cabboose> raise Defect
07:38:34FromDiscord<haxscramper> `anger`
07:38:45*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
07:39:00FromDiscord<haxscramper> Well, next thing woild be `raise Defect(nil)`
07:39:06FromDiscord<Rika> `[:]` is akin to `[..<]`
07:39:25FromDiscord<haxscramper> yes, but `[1,3,4][0:-0]` is `[]`
07:39:33FromDiscord<Rika> -0 isnt valid lol
07:39:44FromDiscord<Rika> python just being 20000 iq
07:39:45FromDiscord<haxscramper> ah
07:39:54FromDiscord<haxscramper> so I literally can't do slice until the end?
07:39:56FromDiscord<Rika> you can
07:39:59FromDiscord<Rika> omit the numbner
07:40:01FromDiscord<Rika> (edit) "numbner" => "number"
07:40:04FromDiscord<Rika> `[0:]`
07:40:07FromDiscord<Rika> yes
07:40:09FromDiscord<Rika> very intuitive
07:40:19FromDiscord<Rika> extremely human thought friendly
07:40:20FromDiscord<cabboose> Sometimes Python is just the superior language guys
07:40:29FromDiscord<Rika> lmfao
07:40:34FromDiscord<impbox [ftsf]> [:]
07:40:45FromDiscord<Rika> that returns a shallow copy of the whole array
07:40:59FromDiscord<haxscramper> `[::-1]`
07:41:04FromDiscord<cabboose> Hahahahaha
07:41:06FromDiscord<Rika> reversed array
07:41:09FromDiscord<impbox [ftsf]> my head
07:41:12FromDiscord<Rika> yes
07:41:33FromDiscord<impbox [ftsf]> glad i don't touch python any more
07:41:36FromDiscord<Rika> same
07:41:41FromDiscord<haxscramper> It physically pains me to read that SO answer about slicing
07:41:41FromDiscord<cabboose> Ditto
07:41:56FromDiscord<impbox [ftsf]> i remember thinking python was the most amazing thing ever...
07:42:02FromDiscord<impbox [ftsf]> when i discovered it after using PHP
07:42:27FromDiscord<Rika> i dont remember ever thinking that python was great, even as a beginner, only "its neat"
07:42:39FromDiscord<impbox [ftsf]> it was pretty amazing after PHP tbh
07:43:02FromDiscord<Rika> youre comparing a rock to a computer though
07:43:31FromDiscord<cabboose> Rock to a snake
07:43:33FromDiscord<enthus1ast> PHP is strange, but currently it is not that bad, it has good class support etc
07:43:43FromDiscord<enthus1ast> (omg i have good words for PHP)
07:44:00*PMunch quit (Read error: Connection reset by peer)
07:44:04FromDiscord<Rika> who's banning him
07:44:07FromDiscord<Rika> he cant be trusted
07:44:12FromDiscord<cabboose> I’m just quitting the discord
07:44:16FromDiscord<cabboose> I’m quitting nim
07:44:26FromDiscord<Elegantbeef> Good riddance! 😛
07:44:36FromDiscord<Rika> nah it would have been better if you left, beef
07:47:20FromDiscord<Yardanico> no i like beef
07:47:23FromDiscord<Elegantbeef> You cant get rid of me that easily
07:47:31FromDiscord<Rika> what the fuck
07:47:38FromDiscord<Rika> someone likes beef?
07:47:44FromDiscord<Yardanico> yes
07:47:45FromDiscord<Yardanico> it's tasty
07:47:47FromDiscord<Rika> oh did you mean the food
07:47:48FromDiscord<Rika> yeah
07:47:52FromDiscord<Yardanico> no i mean beef the person too
07:47:56FromDiscord<Rika> no way
07:47:56FromDiscord<Elegantbeef> I'm like crabs but for your brain, so sphyillis
07:48:02FromDiscord<impbox [ftsf]> who else will respond to me at any time of the day?
07:48:02FromDiscord<Yardanico> also we should probably move to #offtopic :P
07:48:06FromDiscord<Rika> syphilis you mean
07:48:33FromDiscord<Elegantbeef> Yea i cannot spell
07:48:34*PMunch joined #nim
07:48:47FromDiscord<impbox [ftsf]> you heard the yard!
07:48:49FromDiscord<Elegantbeef> We've established this time and time again
07:49:07FromDiscord<Rika> yard is dum
07:49:13FromDiscord<Rika> imperial in general is dum
07:49:35FromDiscord<Yardanico> hey, i didn't make my nickname because of some weird random measurement systems
07:49:41*PMunch quit (Remote host closed the connection)
07:50:18FromDiscord<Elegantbeef> Should've you'd be a lot cooler
07:50:30FromDiscord<Elegantbeef> Take my word for it, i'm talking 3 three people that despise me
07:51:34*PMunch joined #nim
07:51:35FromDiscord<Rika> beef's english systems are destabilising
07:51:58FromDiscord<Hamid Bluri> that's not a big deal
07:52:11FromDiscord<Rika> i mean beef isnt a big deal in general
07:52:43FromDiscord<Yardanico> :FeelsOkayMan: 👉 #offtopic
07:53:10FromDiscord<Elegantbeef> Any nim stuff we can talk about, like bug fixes?!
07:53:24FromDiscord<Rika> you're a bug
07:53:30FromDiscord<Yardanico> In reply to @Rika "you're a bug": rika
07:55:25FromDiscord<impbox [ftsf]> @ElegantBeef we could implement all of python's horrible slice stuff in nim
07:55:57FromDiscord<Elegantbeef> I could also strip down to nothing and live in the forest
07:56:18FromDiscord<Rika> please dont implement python slices in nim
07:56:30FromDiscord<Elegantbeef> I dont see the value in making shitty software.... on second thought i've looked at my code all i write is shit
07:57:10FromDiscord<Elegantbeef> This guy has PRs in the nim compiler, get scared 😛
07:57:27FromDiscord<Hamid Bluri> question
07:58:01FromDiscord<Hamid Bluri> how do you test nim compiler when you edit the parser?
07:58:08FromDiscord<Yardanico> you run tests
07:58:09FromDiscord<Hamid Bluri> does it take a long time to test?
07:58:12FromDiscord<Elegantbeef> I dont edit the parser
07:58:31FromDiscord<Yardanico> In reply to @hamidb80 "does it take a": for testing everything we have CI, you can only test parts that you think might be affected by your change
07:58:38FromDiscord<Yardanico> (locally)
07:58:39FromDiscord<haxscramper> `tests/tastspec.nim`
07:58:49FromDiscord<Elegantbeef> I generally have a test file i run and then run the test suite for the specific area i was testing then push to a repo and get the first have of the CI
07:58:50FromDiscord<haxscramper> For parser AST add things ther
07:59:03FromDiscord<Elegantbeef> first half\
07:59:16FromDiscord<haxscramper> In reply to @haxscramper "`tests/tastspec.nim`": https://github.com/nim-lang/Nim/pull/18798/files
07:59:52FromDiscord<Hamid Bluri> and why does sometimes CI fail without a specefic reason?
08:00:14FromDiscord<Elegantbeef> Sometimes it just doesnt live happily
08:00:37FromDiscord<Elegantbeef> Locally atleast it should be more stable
08:09:55FromDiscord<Elegantbeef> Also @Hamid Bluri what are you working on?
08:11:15FromDiscord<Hamid Bluri> what do you mean
08:11:32FromDiscord<Elegantbeef> With the parser
08:11:56FromDiscord<Hamid Bluri> just curious how did you touch it 😄
08:12:17FromDiscord<Hamid Bluri> `timeocoder` asked me to improve nimpretty
08:12:30FromDiscord<Hamid Bluri> but i couldn't find anything related to nimpretty in nim repo
08:12:31FromDiscord<Elegantbeef> Ah, i've never touched the parser so good luck
08:12:48FromDiscord<Elegantbeef> Semantics are fun!
08:12:58FromDiscord<Hamid Bluri> In reply to @Elegantbeef "Ah, i've never touched": i remember you did a pr
08:13:08FromDiscord<Yardanico> In reply to @hamidb80 "but i couldn't find": nimpretty is in https://github.com/nim-lang/Nim/tree/devel/nimpretty
08:13:10FromDiscord<Elegantbeef> "a" \:D
08:13:17FromDiscord<Yardanico> also search for when defined(nimpretty) in the compiler source
08:13:28FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/885800121621684254/unknown.png
08:22:39FromDiscord<cabboose> Nup now I’m staying to spite beef
08:27:20FromDiscord<Elegantbeef> Damn spite beef
09:18:47FromDiscord<cabboose> Ok what do i need for cps
09:18:56FromDiscord<cabboose> devel check
09:19:16FromDiscord<cabboose> keeps whinging about the proc mismatch
09:19:30arfyhi there. I just wanted to say I've been checking out nim for a day or two and really enjoying it so far. It's what would happen if you could comple python straight to native code! :)
09:19:40arfycompile python*
09:21:22FromDiscord<cabboose> hmm im actually getting an error using choosenim trying to update my devel toolchain
09:26:24NimEventerNew thread by Ingo: Keep a http connection alive and hand it off to another proc, see https://forum.nim-lang.org/t/8410
09:26:32FromDiscord<Rika> In reply to @cabboose "hmm im actually getting": What errors
09:28:20FromDiscord<cabboose> Ah nothing; I thought I closed VS Code but there was something still running in the background which kept nimsuggest running
09:28:36FromDiscord<cabboose> so that just prevented overwrites
10:19:44FromDiscord<Kiloneie> Huh, switching from the current GC to GC ORC, changes the output of "echo repr b" b being a pointer to "a", so that it outputs ptr 10 instead of the memory address.↵↵How can i see the memory address now ?
10:21:48*xet7 joined #nim
10:34:42*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
10:48:43*xet7 quit (Remote host closed the connection)
11:12:43NimEventerNew post on r/nim by zemja_: Is Nim in Action outdated?, see https://reddit.com/r/nim/comments/plixt9/is_nim_in_action_outdated/
11:26:15FromDiscord<ant1fact> In reply to @treeform "I think it always": thanks for that link!
11:34:10FromDiscord<ant1fact> Is it possible to batch export all types and their members in a .nim file without marking everything with its own ?
11:35:28FromDiscord<enthus1ast> the new version has a import ... {.all.} pragma, but i'm not sure if this is ugly for normal code yet (useful for test, though
11:35:58FromDiscord<ant1fact> will try that, thanks
11:36:57FromDiscord<enthus1ast> personally i would avoid it for normal code
11:37:27FromDiscord<enthus1ast> maybe in cases like c++ "friends" class
11:38:15FromDiscord<haxscramper> `import {.all.}` is for cases where you want to extend library implementation but have to acces internal details
11:38:18FromDiscord<Rika> I would refrain from doing the import all
11:38:21FromDiscord<haxscramper> for example `getOpt` from talbe
11:38:23FromDiscord<haxscramper> (edit) "talbe" => "table"
11:38:37FromDiscord<haxscramper> Or I needed to add getLowestValue for `fusion/btreetabs`
11:38:57FromDiscord<haxscramper> Also compiler has tons of procs that are not exported, but I just have to access them
11:39:14FromDiscord<haxscramper> Otherwise I would have to reimplement thousands of lines of code
11:39:25FromDiscord<haxscramper> reimplement/copy and maintain in my library
11:43:15*jjido joined #nim
11:55:00*max22- quit (Ping timeout: 260 seconds)
12:00:41*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:06:01*supakeen quit (Quit: WeeChat 3.2.1)
12:06:30*supakeen joined #nim
12:16:26*arkurious joined #nim
12:19:56FromDiscord<ant1fact> how can I do the following?↵↵case char↵of 0..9: do_something()
12:20:17FromDiscord<ant1fact> should I just write out each integer as a char like '0', '1', '2', ... '9'
12:20:20FromDiscord<ant1fact> or is there a better way
12:21:59FromDiscord<konsumlamm> `0` is different from `'0'`
12:22:03FromDiscord<Rika> yes
12:24:41FromDiscord<srozb> hey, does anybody know how to call an arbitrary address in memory in Nim (suppose I already know the function address and parameters). As an example let sleepFuncAddr = 0xdeadb33f, how to make it proc sleepFunc(msec: int) and finally call sleepFunc(1234) ? I know it's exactly what one should't do from security perspective but still want to do such thing
12:25:29FromDiscord<Rika> do yyou know the exact parameters, return type, and pragmas the proc has?
12:25:35FromDiscord<srozb> yes
12:26:02FromDiscord<Rika> `let sleepFunc = cast[proc(...): ... {. ... .}](0xdeadbeef)`
12:26:09FromDiscord<srozb> oh cool
12:26:10FromDiscord<Rika> actually no
12:26:16FromDiscord<Rika> well no yeah thats right
12:26:25FromDiscord<Rika> i think...
12:35:17FromDiscord<srozb> suppose procAddr is valid function address in process memory (actually kernel32.dll Sleep function, that only takes one DWORD argument), following code: let sleepFun = cast[proc(msec: DWORD)](procAddr) gives me Error: expression cannot be cast to proc (msec: DWORD){.closure.}
12:36:36PMunchTry: `let sleepFun = cast[proc(msec: DWORD) {.cdecl.}](procAddr)`
12:36:43PMunchOr whatever calling convention it uses
12:36:57PMunchIt definitely doesn't use the closure calling convention :P
12:37:26FromDiscord<srozb> and its working!
12:37:38FromDiscord<srozb> thanks! how cool is that anyway!
12:40:55PMunchNo problem :)
12:56:17*Vladar joined #nim
12:59:39*Guest2 joined #nim
13:15:12FromDiscord<impbox [ftsf]> I guess windows doesn't do ASLR then
13:24:19*Guest2 quit (Quit: Client closed)
13:37:16*max22- joined #nim
13:49:53PMunchHmm, is there a way to collapse recurring characters in a string in Nim?
13:50:10PMunchSay I have "haaaarp" and I want "harp"
13:52:37nrds<Prestige99> Don't think so
13:53:17nrds<Prestige99> wouldn't be too hard to write though I guess
14:02:30*PMunch quit (Quit: Leaving)
14:27:32*rockcavera joined #nim
14:27:32*rockcavera quit (Changing host)
14:27:32*rockcavera joined #nim
14:32:39FromDiscord<aleclarson> PMunch you must have a good name, cuz i mentioned you in my dream for some reason \:P
14:33:56FromDiscord<Gumber aka Zachary Carter> that's pretttttty creepy
14:34:00FromDiscord<Gumber aka Zachary Carter> did you use his real name or PMunch?
14:34:13FromDiscord<Gumber aka Zachary Carter> if it was the former, that's even creepier
14:36:51FromDiscord<aleclarson> lol the latter
14:37:10FromDiscord<aleclarson> it was smth like "oh you know PMunch? yeah i see him in the nim discord all the time"
14:37:15FromDiscord<aleclarson> wtf brain
14:38:37FromDiscord<Gumber aka Zachary Carter> yeah that's weird
14:38:45FromDiscord<Gumber aka Zachary Carter> known PMunch for at least 3 years I think
14:38:50FromDiscord<Gumber aka Zachary Carter> never once dreamed about him
14:39:16*ykaelig joined #nim
14:39:20FromDiscord<Gumber aka Zachary Carter> def had dreams about people I barely know / just met though
14:39:43FromDiscord<Gumber aka Zachary Carter> always a trippy experience
14:45:22NimEventerNew thread by Skaruts: I'm having a Nim+Lua+Libtcod callback wrapping problem, see https://forum.nim-lang.org/t/8411
14:46:48FromDiscord<aleclarson> yeah, the brain is frickin random when it comes to dreams.↵sometimes i wonder if the randomizer in my brain is cryptographically sound
14:48:54FromDiscord<Rika> Depends on what you mean by randomiser
14:49:05FromDiscord<cabboose> sent a code paste, see https://paste.rs/Mfe
14:49:07FromDiscord<Rika> Like “you saying a random number”? No because of biased
14:49:34FromDiscord<aleclarson> like unconscious rng in dream state
14:49:53FromDiscord<cabboose> however `proc test() {.cps:Continuation.} = echo “hello world”` would function as prescribed
14:51:19FromDiscord<cabboose> type mismatch being along the lines of ‘got proc () C {.gcsafe, locks:0.} but expected proc() Continuation {.nimcall.}’ etc
14:51:46FromDiscord<Rika> In reply to @cabboose "So I didn’t have": I’m assuming it needs to be exported? Just a guess
14:51:52FromDiscord<Rika> Almost literal shot in the dark
14:52:04FromDiscord<cabboose> Tried exporting the C
14:52:30FromDiscord<cabboose> I dont know if I did with the test but I could try that tomorrow; seems like an odd requirement :’)
14:52:31FromDiscord<Rika> Maybe conflicting with some name
14:52:45FromDiscord<Rika> Since it’s a single letter
14:52:51FromDiscord<cabboose> I did try other proc names and continuation names
14:52:55FromDiscord<cabboose> like TestC
14:52:58FromDiscord<cabboose> for the continuation
14:53:00FromDiscord<cabboose> still no luck
14:53:15FromDiscord<Rika> Maybe it is the export then
14:53:18FromDiscord<cabboose> I’ll message their IRC tomorrow if I keep hitting a wall
14:53:23FromDiscord<cabboose> aiight ill give it a shot
14:53:25FromDiscord<cabboose> thanks
14:53:27FromDiscord<cabboose> goodnight cobba
14:53:35FromDiscord<Rika> Who?
14:53:50FromDiscord<Rika> Either I am too young or too old to understand the reference
14:57:53FromDiscord<aleclarson> he must be australian
15:07:34FromDiscord<aleclarson> can a proc parameter have a default value?
15:08:15FromDiscord<Rika> Yes
15:13:51FromDiscord<Gumber aka Zachary Carter> must be the last parameter(s) defined in the proc signature
15:15:24FromDiscord<aleclarson> 😌 👍
15:17:22FromDiscord<Gumber aka Zachary Carter> Are there any cheaper linux notebooks that compare to a macbook pro in terms of hardware capabilites that folks are aware of?
15:17:47FromDiscord<Gumber aka Zachary Carter> I want a laptop for game development, but I don't want to buy a gaming laptop and I don't really want to spend the money on a macbook pro if I don't have to...
15:18:16FromDiscord<Gumber aka Zachary Carter> I do want to run linux or mac on whatever I get though... I already have a desktop windows PC
15:18:38FromDiscord<Gumber aka Zachary Carter> I guess it's also a shitty time to be laptop shopping because of the chip shortage, but that's supposed to drag on for years potentially so....
15:21:04FromDiscord<Rika> In reply to @Gumber "Are there any cheaper": Are you still on good terms with Lenovo?
15:44:15FromDiscord<aleclarson> is there a `.cast` pragma for "prove not nil"?
15:44:39FromDiscord<aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3ytr
15:44:40FromDiscord<Rika> you can just disable the warning
15:45:56FromDiscord<aleclarson> on a one-line basis?
15:45:58FromDiscord<enthus1ast> @Gumber aka Zachary Carter\: tuxedo maybe
15:46:05FromDiscord<aleclarson> (edit) "on a one-line basis?" => "for just one line?"
15:47:16FromDiscord<Gumber aka Zachary Carter> @Rika kind of forgot about them, will check out their current line up
15:47:47FromDiscord<aleclarson> In reply to @aleclarson "for just one line?": oh i guess casting works \:P↵`cast[Foo not nil](foo)`
15:47:56FromDiscord<Rika> i believe lenovo makes really linux friendly laptops (and actually also sells some with linux preloaded)
15:48:03FromDiscord<Rika> anyway idk why you asked here, i just realised
16:00:18*xet7 joined #nim
16:01:34*ykaelig quit (Quit: Client closed)
16:06:40FromDiscord<leorize> @cabboose\: Nim devel got a fix that broke CPS and we are fixing it
16:06:41FromDiscord<leorize> you can join cps discussion rooms for more details on the progress
16:17:10FromDiscord<Gumber aka Zachary Carter> In reply to @Rika "anyway idk why you": because I do what I want!
16:17:23FromDiscord<Rika> yards comin for ya
16:17:27FromDiscord<Gumber aka Zachary Carter> psh I'm a mod
16:17:37FromDiscord<Gumber aka Zachary Carter> he might be the admin / owner
16:17:39FromDiscord<Rika> hes a modder mod
16:17:46FromDiscord<Gumber aka Zachary Carter> but he's also the one that made me the mod for whatever reason
16:17:52FromDiscord<Gumber aka Zachary Carter> he must see something in me
16:18:01FromDiscord<Gumber aka Zachary Carter> believes in me
16:18:03FromDiscord<Rika> lol
16:32:46*vicfred joined #nim
16:51:38FromDiscord<reilly> In light of Rust's recent 1.55 update, in which they improved their float-parsing algorithm, what algorithm does Nim's float parser user?
16:51:42FromDiscord<reilly> (edit) "user?" => "use?"
16:52:10FromDiscord<haxscramper> nim 1.6. ships with dragonbox
16:53:58FromDiscord<Rika> what does rust use now?
16:54:17FromDiscord<pedroos (Pedro Sobota)> Hello there. I wanted to ask\: where is the definition of the tuple type in the NIm source code?
16:54:41FromDiscord<haxscramper> https://github.com/rust-lang/rust/pull/86761
16:55:21FromDiscord<haxscramper> In reply to @pedroos (Pedro Sobota) "Hello there. I wanted": `tuple` does not have a definition in nim stdlib
16:55:28FromDiscord<haxscramper> Or you want to know where in compiler it is defiend?
16:55:37FromDiscord<pedroos (Pedro Sobota)> Yes, in compiler
16:58:21FromDiscord<haxscramper> tuple type is represented via `tyTuple` kind and it does not have a concrete definition from what I can tell. Instead it is separated into multiple locations in `ccgexprs/cgen` etc,
16:59:16FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3ytK
16:59:42FromDiscord<pedroos (Pedro Sobota)> Great, so it's a compiler-only type
17:00:05FromDiscord<haxscramper> `ccgtype.mapType` shows how it is implemented
17:00:17FromDiscord<haxscramper> `/` how type is generated
17:01:12*jjido joined #nim
17:01:17FromDiscord<haxscramper> `/` how type is mapped, and discard what I said, that's a wrong explanation
17:01:18FromDiscord<Rika> pedroos: i mean its similar to how object is implemented i would say
17:01:43NimEventerNew thread by Konradmb: Call parent `$` from overwritten converter?, see https://forum.nim-lang.org/t/8412
17:01:43FromDiscord<pedroos (Pedro Sobota)> Ok, sorry I'm C# developer so I'm used to "everything is an object"
17:05:08FromDiscord<haxscramper> In reply to @pedroos (Pedro Sobota) "Great, so it's a": well, it is "magic" type, yes
17:06:52*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
17:07:19FromDiscord<pedroos (Pedro Sobota)> Yes, so I found this in mapType\:
17:07:34FromDiscord<pedroos (Pedro Sobota)> Where is ctStruct defined? I can't find it
17:08:45FromDiscord<pedroos (Pedro Sobota)> Oh! Nevermind, I found it at TCTypeKind.
17:14:14FromDiscord<pedroos (Pedro Sobota)> Is there a lot of the base library is implemented in compiler types vs. actual types?
17:15:32FromDiscord<haxscramper> tuple/string/set/seq
17:15:32FromDiscord<haxscramper> array
17:16:11FromDiscord<haxscramper> well, primitive types require special compiler support, because they are codegened into js/C/C++/VM code
17:17:30FromDiscord<pedroos (Pedro Sobota)> Oh, I see
17:17:48*tiorock joined #nim
17:17:48*tiorock quit (Changing host)
17:17:48*tiorock joined #nim
17:17:49*rockcavera is now known as Guest8197
17:17:49*tiorock is now known as rockcavera
17:18:17*audiophile_ joined #nim
17:19:02FromDiscord<haxscramper> also `NimNode`
17:19:33FromDiscord<haxscramper> But that one is an absolute dark magic
17:21:37*Guest8197 quit (Ping timeout: 252 seconds)
17:22:43FromDiscord<pedroos (Pedro Sobota)> It's fun, well in c# as you may know, there is primitives basically as ints, floats and value types, but they have mirror structs in the base library
17:23:01FromDiscord<pedroos (Pedro Sobota)> So this is where it gets me so I don't find these definitions while searching Nim
17:25:21FromDiscord<haxscramper> You can look at the generated C code, if would be easier than searching in the compier
17:25:22FromDiscord<haxscramper> And more illustrative I guess
17:25:40FromDiscord<pedroos (Pedro Sobota)> Oh! Great one
17:25:49FromDiscord<haxscramper> `--linetrace:off --stacktrace:off -d:danger` to cleanup generated code from any extra checks etc.
17:26:15FromDiscord<haxscramper> `--nimcache:yourDir` and them see for a file named `@m<your-orginal-filename>.c`
17:32:26FromDiscord<haxscramper> Just definining type won't make it occur in the generated code due to dead code elimination, you need to use it somehow
17:32:26FromDiscord<haxscramper> Like `echo (123, 4)`
17:32:29FromDiscord<pedroos (Pedro Sobota)> A discard is enough in this case?
17:32:33FromDiscord<pedroos (Pedro Sobota)> I may get in the habit of seeing the generated C side by side...
17:38:02FromDiscord<haxscramper> I don't know about discard, it all depends on how smart dead code delimination is
17:38:03FromDiscord<pedroos (Pedro Sobota)> Yup...
17:38:46FromDiscord<Rika> I don’t think it’s that smart because a discarded proc call can still have effects
17:39:50FromDiscord<pedroos (Pedro Sobota)> Uhum, just trying to think about avoiding the prints (echos) but it's harmless
17:40:15FromDiscord<pedroos (Pedro Sobota)> Thank you guys
17:45:24*vicfred quit (Quit: Leaving)
17:49:40*robertmeta quit (Ping timeout: 250 seconds)
17:50:48*Zevv joined #nim
17:51:02*Zevv left #nim (#nim)
17:51:56*robertmeta joined #nim
17:54:17*jjido joined #nim
18:00:57*SebastianM joined #nim
18:02:00*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:05:13*jjido joined #nim
18:27:04Terry[m]Last night, I had a dream, a dream where Araq and Dominik were beating me with a book. They told me that if I don't write everything in macros then they will dig up my greatgrandmother and map her.
18:27:13Terry[m]I am not sure what that dream meant.
18:27:37FromDiscord<haxscramper> ...
18:28:01FromDiscord<haxscramper> I have only one response really, and it is `raise Defect(nil)`
18:30:46FromDiscord<Rika> hax you're gonna make me go insane with that statement
18:35:45*max22- quit (Ping timeout: 260 seconds)
18:44:33FromDiscord<ant1fact> how does one reset a variable to its defaulty empty state?
18:44:36FromDiscord<ant1fact> (edit) "defaulty" => "default"
18:46:46FromDiscord<ant1fact> for a seq[float] would I just set the variable to = @[] ?
18:48:39FromDiscord<Rika> you could
18:49:06FromDiscord<haxscramper> `var a: T; a = default typeof(a)`
18:52:40FromDiscord<Beans.> How do I pass a reference of a proc to another proc as a parameter, and then call that referenced proc in the proc it was passed to? I don't know how the original proc is going to be defined, or where, or what it's identifier would be.
18:52:47FromDiscord<Beans.> Here's some pseudocode of what I'm trying to do
18:53:05FromDiscord<Beans.> sent a code paste, see https://play.nim-lang.org/#ix=3yuu
18:53:19*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:55:04FromDiscord<Beans.> Sorry If I messed up my explanation, I'm new to nim
18:56:20FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3yux
18:56:25FromDiscord<haxscramper> No need for extra `ref`, just use procedure name
18:57:08*SebastianM quit (Quit: Bye)
18:57:19FromDiscord<Beans.> Thanks!
19:01:43*xet7 quit (Remote host closed the connection)
19:02:38*xet7 joined #nim
19:03:55*max22- joined #nim
19:10:25FromDiscord<pedroos (Pedro Sobota)> Hi guys, I have one more question related to tuples. I am in INim and I'm typing 'tuple'. I am getting 'tuple' here, but what am I getting? Is this a type or not?
19:12:34FromDiscord<haxscramper> `tuple` as a type, without any further specification is a typeclass that means "any tuple"
19:12:46FromDiscord<haxscramper> Like `(1, 23) is tuple and (1, 3) is (int, int)`
19:13:07FromDiscord<haxscramper> `tuple/object/enum/proc/ref/ptr` etc. are special typeclasses
19:13:29FromDiscord<haxscramper> There are more
19:15:28FromDiscord<pedroos (Pedro Sobota)> Great... are typeclasses then a formal type in themselves...? or is there a way to inquire into wether an expression returns a typeclass, as distinct from a type?
19:16:38FromDiscord<haxscramper> no, typeclasses cannot be returned by an expression, you only can have a type literal
19:17:03FromDiscord<haxscramper> So `typeof(SomeInteger)` is `SomeInteger`, but you can't create variable of `SomeInteger` in any way
19:17:09FromDiscord<haxscramper> But `int is SomeInteger`
19:17:34*vicfred joined #nim
19:17:35FromDiscord<haxscramper> So typeclass is basically `SomeInteger = int or int8 or int16 or int32 ...`
19:18:14FromDiscord<haxscramper> And you can defined one yourself, but for `tuple` it requires some magic, since there is an infinite number of tuples, so you can't just `or` them together
19:18:58FromDiscord<haxscramper> I.e. not a "format type in themselves" but rather a shorthand for `or`ing things together
19:22:10FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3yuE
19:22:14FromDiscord<Elegantbeef> Type classes are generic constraints
19:23:33FromDiscord<pedroos (Pedro Sobota)> Ok so both SomeInteger and int are type literals and SomeInteger is the one of the 'integers' typeclass... is this typeclass then like a union type?
19:23:46FromDiscord<Elegantbeef> It's not a union it's just to limit generics to specific types
19:24:08FromDiscord<haxscramper> it is a union of types
19:24:19FromDiscord<haxscramper> I.e. does not exist at runtime as TS union type
19:24:20FromDiscord<Elegantbeef> `proc someThing[T: int or float](a: T) = echo a` can only take `int` or `float` it doesnt take `int` and `float`
19:24:41FromDiscord<haxscramper> Strictly a compile-time thing
19:27:09FromDiscord<pedroos (Pedro Sobota)> By union I meant 'either' type, sorry... so is it like an 'either type' of these types int, int8... ? But informally so only the compiler knows about it...? Correct?
19:27:19FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3yuF
19:27:38FromDiscord<Elegantbeef> You should be able to with a macro recruit
19:28:04FromDiscord<Elegantbeef> Yea pedroos sounds like you've got it
19:28:28FromDiscord<Elegantbeef> It's not a sumtype or union where at runtime it can store all the values, it's a compile time "When generating this procedure it only accepts X"
19:29:19FromDiscord<pedroos (Pedro Sobota)> Yeah
19:44:46FromDiscord<Elegantbeef> Hmm recruit i cannot reason my way around it right now
19:44:47FromDiscord<Elegantbeef> You can make a type class of any type you define
19:44:47FromDiscord<pedroos (Pedro Sobota)> @haxscramper\:matrix.org as for defining a typeclass myself... is it just defining a 'either type', like done at the compiler? And is this done only with structures found at the compiler, or is it a language construct?
19:44:48FromDiscord<Elegantbeef> That's an implict generic typeclass of all YourType instantiations
19:44:50FromDiscord<Elegantbeef> But you can also do `string or float` if you want or whatever types you have at your disposal
19:44:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3yuJ
19:48:24FromDiscord<pedroos (Pedro Sobota)> Let me see.. this is like defining a method for any instance of YourType?
19:49:20FromDiscord<Elegantbeef> Yea
19:49:26FromDiscord<pedroos (Pedro Sobota)> I don't know if you mean the typeclass is in the T generic parameter
19:49:44FromDiscord<Elegantbeef> Well the typeclass here is that you can pass all instantiations of the YourType
19:51:27FromDiscord<Elegantbeef> Dont think this was linked so here https://nim-lang.org/docs/manual.html#generics-type-classes
19:54:24FromDiscord<pedroos (Pedro Sobota)> Oh I get it so it's like this A for A[T...], A[T] for A[T[T2...]]
19:54:57*jjido joined #nim
19:55:54FromDiscord<Elegantbeef> Quite possibly if `...` means "any type" 😀
19:58:13FromDiscord<pedroos (Pedro Sobota)> Yes exactly that's what it means. Very fun...
19:58:28FromDiscord<Elegantbeef> To elaborate for fun https://play.nim-lang.org/#ix=3yuR
20:00:51FromDiscord<Elegantbeef> Generally speaking though `doStuff` should be `doStuff[T](yourtype: YourType[T])` if you actually use `T` since it's more ergonomic
20:01:18FromDiscord<pedroos (Pedro Sobota)> I see, the T is optional in this case...
20:06:08FromDiscord<pedroos (Pedro Sobota)> So typeclass is in the language but the tuple typeclass is in the compiler...
20:06:45FromDiscord<Elegantbeef> Yes, since tuples do not have a generic instantiation, they encompass a variety of tuples
20:06:54FromDiscord<Elegantbeef> same with `object`
20:09:41FromDiscord<pedroos (Pedro Sobota)> I don't get about 'generic instantiation'. Do you have any doc that explains this? Does this mean there is no specific Tuple[T] defined anywhere like in the base library?
20:12:08FromDiscord<Elegantbeef> A generic instantiation is like `YourType[float]` since tuples can be literally any size or types joined there needs to be compiler magic for a build in typeclass
20:12:50FromDiscord<Elegantbeef> There are no varadic generics(aside from tuples) in nim so you cannot do `YourType[int, int, float]` and `YourType[int]`
20:12:51FromDiscord<pedroos (Pedro Sobota)> I get if you have Tuple that can act as Tuple[T] then you basically don't need to define Tuple[T] (unless you want to make one type out of it). But then you don't need to define any generic type, right? Confusion for me as c# all generic types are exact\: A\<T\> != A != A\<T\<T2\>\> etc..
20:13:37FromDiscord<Gumber aka Zachary Carter> @enthus1ast sorry I forgot to thank you earlier when you made your suggestion - checking them out now
20:13:57FromDiscord<Elegantbeef> there is no `tuple[T]` since tuples can be any size/types
20:14:13FromDiscord<Elegantbeef> And as such there is not a single type that can represent `[T]` in the tuple
20:14:54FromDiscord<Elegantbeef> `proc something(t: tuple)` accepts any tuple, if you want to limit it to specific tuples you could do `(int, int) or (int, float)` instead of `tuple`
20:19:02FromDiscord<Elegantbeef> To clarify if it's an implicit type class no you do not need to specify a generic parameters unless you need those types
20:20:08FromDiscord<Elegantbeef> `assert @[10] is seq` `assert @[10] is seq[int]` both pass for instance
20:20:50FromDiscord<Elegantbeef> the first is checking if it's of the seq typeclass, the second checks if it's of a specific instantiation
20:22:00FromDiscord<pedroos (Pedro Sobota)> Yes I didn't mean A[T, T2...] I meant A[T[T2...]] . So in Nim\: A works with 'is' operator for A[T], A[T] works for A[T[T2]], etc... and that's when you'd want/need to define A[T] for example (since A does not work for A[T[T]])
20:24:11FromDiscord<pedroos (Pedro Sobota)> Oh I get it so a type of a type class is an instantiation of it. I have a question, are all types instantiations of one of the typeclasses?
20:40:47FromDiscord<Elegantbeef> I dont quite get the question [pedroos (Pedro Sobota)](https://matrix.to/#/@pedroos-5d669684d73408ce4fc97911:gitter.im)
20:45:57FromDiscord<pedroos (Pedro Sobota)> I think I'll read up more @elegantbeef\:matrix.org , thanks for the links
20:45:57*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
20:47:11FromDiscord<aleclarson> is `{.inline.}` better than `template` in any way, or is it just less flexible?
20:48:20FromDiscord<Recruit_main707> there was a forum thread that explained the differences afaik
20:51:18FromDiscord<Recruit_main707> a template is literally placing its body wherever you call it basically, at nim compile time https://forum.nim-lang.org/t/3948
20:51:52FromDiscord<Recruit_main707> `{.iniline.}` is left for the c/c++ compiler to inline if it considers it optimal
20:56:02FromDiscord<aleclarson> interesting. good to know that `template` does not cache its arguments in the sense that `a + b` will run every time the template references it as an argument
20:56:57FromDiscord<aleclarson> now the question is, what's a situation where `template` is the better choice? seems like never
20:57:14FromDiscord<aleclarson> (edit) "now the question is, what's a situation where `template` is the better choice? seems like ... never" added "basically"
20:58:32FromDiscord<Recruit_main707> usually only when metaprogramming
20:58:51FromDiscord<Recruit_main707> they allow certain stuff inline procs wouldnt
20:59:37FromDiscord<Recruit_main707> basically, for inlining code, usually {.inline.} is the way to go
21:03:59FromDiscord<Gumber aka Zachary Carter> templates are akin to preprocessor macros in C/C++
21:04:10FromDiscord<Gumber aka Zachary Carter> I wouldn't use inline tbh
21:04:17FromDiscord<Gumber aka Zachary Carter> the C compiler might not respect it
21:04:32FromDiscord<Gumber aka Zachary Carter> I'd just invoke the C compiler with whatever optimization options you want
21:04:37FromDiscord<Gumber aka Zachary Carter> and let it do its thing
21:04:48FromDiscord<Recruit_main707> it usually does afaik
21:04:49FromDiscord<Gumber aka Zachary Carter> it's probably smarter than you regarding what needs to be inlined anyway
21:05:01FromDiscord<Recruit_main707> thats true
21:05:19FromDiscord<Recruit_main707> so its useful to use inline to let it choose then? :P
21:05:30FromDiscord<Gumber aka Zachary Carter> I just omit the inline pragma period
21:05:47FromDiscord<Gumber aka Zachary Carter> unless I'm really trying to hunt down some optimization issue
21:06:01FromDiscord<Gumber aka Zachary Carter> it's otherwise premature and might do more damage than good
21:06:23FromDiscord<Gumber aka Zachary Carter> unless you wrote the compiler and know what it's going to do
21:06:37FromDiscord<Gumber aka Zachary Carter> in this case both compilers 😄 since both perform optimization pases
21:06:44FromDiscord<Gumber aka Zachary Carter> (edit) "in this case both compilers 😄 since both ... performpasses" added "can" | "pases" => "passes"
21:07:08FromDiscord<aleclarson> hmm, i'm getting this when using `{.inline.}` after `not nil`↵> Invalid syntax. When used with a type, 'not' can be followed only by 'nil'
21:07:33FromDiscord<Gumber aka Zachary Carter> can you share your code
21:08:06FromDiscord<Gumber aka Zachary Carter> sounds like you're not using the pragma correctly
21:08:55*vicfred quit (Quit: Leaving)
21:08:56FromDiscord<aleclarson> https://play.nim-lang.org/#ix=3yvg
21:09:12*tiorock joined #nim
21:09:12*tiorock quit (Changing host)
21:09:12*tiorock joined #nim
21:09:12*rockcavera is now known as Guest4051
21:09:12*Guest4051 quit (Killed (cadmium.libera.chat (Nickname regained by services)))
21:09:12*tiorock is now known as rockcavera
21:09:26FromDiscord<Gumber aka Zachary Carter> oh I dunno wtf this not nil thing is
21:09:33FromDiscord<Recruit_main707> that not nil is wrong
21:09:35FromDiscord<Gumber aka Zachary Carter> play with experimental features and expect broken stuff
21:09:42FromDiscord<Recruit_main707> what do you expect it to do?
21:10:10FromDiscord<aleclarson> In reply to @Recruit_main707 "that not nil is": ??
21:10:32FromDiscord<aleclarson> it's an inline proc that evaluates to a non-nil ref
21:11:11FromDiscord<Gumber aka Zachary Carter> you're not supposed to apply not nil to anything but types
21:11:11FromDiscord<Gumber aka Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=3yvh
21:11:18FromDiscord<Gumber aka Zachary Carter> you're trying to apply it to a proc
21:11:26FromDiscord<Recruit_main707> well i was right, just for the wrong reason :p
21:11:27FromDiscord<aleclarson> no its being applied to the return type
21:11:33FromDiscord<Gumber aka Zachary Carter> no it's not
21:11:39FromDiscord<Gumber aka Zachary Carter> go read the documentation
21:11:41FromDiscord<Gumber aka Zachary Carter> you're doing it wrong
21:11:42FromDiscord<aleclarson> the fook
21:11:43FromDiscord<Recruit_main707> you need to do it in the type declaration
21:12:03FromDiscord<Recruit_main707> bruh
21:12:06FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3yvj
21:12:18FromDiscord<aleclarson> that's wacky af, but ok
21:12:25FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3yvk
21:12:33FromDiscord<fowl> Hey guys I have a buddy that does devops and he mentioned Nim to me, he really likes it. Finds it easy to use, he usually writes python. I tried to talk to him about the meta programming but unfortunately he didn’t know what that was. Everybody loves Nim 🙂 Thank you all
21:12:54FromDiscord<Gumber aka Zachary Carter> Weird
21:12:55FromDiscord<Recruit_main707> glad to hear :)
21:12:56FromDiscord<Gumber aka Zachary Carter> but okay
21:13:04FromDiscord<fowl> He’s going to lose his mind when I show him macros
21:13:23FromDiscord<Gumber aka Zachary Carter> macros aren't unique to Nim
21:13:32FromDiscord<Gumber aka Zachary Carter> but cool nonetheless
21:13:41FromDiscord<Gumber aka Zachary Carter> (edit) "nonetheless" => "none the less"
21:15:06FromDiscord<fowl> I’ve not seen them how they are in Nim, a compile time function you return ast from, and you have access to type info too. It’s bananas
21:15:20FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=3yvl
21:15:29FromDiscord<aleclarson> In reply to @Gumber "you're doing it wrong": i call baloney, then why does it work when i remove `{.inline.}`
21:15:41FromDiscord<Recruit_main707> should work
21:15:52FromDiscord<Gumber aka Zachary Carter> I don't know - I've never used `notnil` before
21:15:57FromDiscord<Gumber aka Zachary Carter> it's an experimental feature
21:16:00FromDiscord<aleclarson> lols
21:16:04FromDiscord<Skaruts> is there some way to create a type that is equivalent to every kind of `int` except `cint`?
21:16:05FromDiscord<Gumber aka Zachary Carter> and it sounds like it got that treatment because it was being deprecated
21:16:09FromDiscord<Gumber aka Zachary Carter> so why would I use it?
21:16:28FromDiscord<aleclarson> they better not deprecate it \:(
21:16:29FromDiscord<Recruit_main707> Skaruts, cint == int32
21:16:39FromDiscord<Gumber aka Zachary Carter> and why would you put it on the proc signature?
21:16:46FromDiscord<Gumber aka Zachary Carter> it doesn't even make logical sense to put it there
21:16:54FromDiscord<Gumber aka Zachary Carter> you're enforcing it on the type
21:16:56FromDiscord<aleclarson> it's saying the proc will never return nil
21:17:00FromDiscord<Gumber aka Zachary Carter> no it's not
21:17:04FromDiscord<Gumber aka Zachary Carter> read the docs lol
21:17:18FromDiscord<aleclarson> u don't even use it, that's exactly what it says xD
21:17:34FromDiscord<Gumber aka Zachary Carter> I know how to read documentation
21:17:38FromDiscord<Gumber aka Zachary Carter> apparently better than you...
21:17:45FromDiscord<Recruit_main707> calm down you two
21:17:57FromDiscord<Gumber aka Zachary Carter> I'm calm 🙂
21:18:08FromDiscord<aleclarson> you just assaulted me with words!
21:18:11FromDiscord<aleclarson> lol
21:18:14FromDiscord<Gumber aka Zachary Carter> happens
21:18:22FromDiscord<aleclarson> tru
21:18:34FromDiscord<Gumber aka Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=
21:18:35FromDiscord<Gumber aka Zachary Carter> again
21:18:41FromDiscord<Gumber aka Zachary Carter> I'll leave it at that
21:18:49FromDiscord<Gumber aka Zachary Carter> types, not procedures
21:19:10FromDiscord<Skaruts> @Recruit_main707 thing is, I'm having to cast to cint a lot when using libraries, and I just need a template that takes any int and abstracts the casts. But if it's a cint I don't need the template
21:19:10FromDiscord<aleclarson> that doesn't prove your point. in my example, `not nil` is applied to the return type. it works when you remove `{.inline.}`
21:19:16FromDiscord<Gumber aka Zachary Carter> omg
21:19:26FromDiscord<Gumber aka Zachary Carter> the return type of a procedure is not a type
21:19:37FromDiscord<aleclarson> how?
21:19:44FromDiscord<Gumber aka Zachary Carter> none of the example code shows it being applied to a procedure
21:19:51FromDiscord<Gumber aka Zachary Carter> you can't just will the semantics of something to change because you think it should
21:20:04FromDiscord<aleclarson> then explain why it works without `{.inline.}`
21:20:04FromDiscord<Gumber aka Zachary Carter> it's designed to be applied to the type definition as it shows in the docs
21:20:06FromDiscord<Gumber aka Zachary Carter> and clearly states
21:20:11FromDiscord<Gumber aka Zachary Carter> it might compile
21:20:13FromDiscord<Gumber aka Zachary Carter> that doesn't mean it works
21:20:21FromDiscord<Gumber aka Zachary Carter> and regardless
21:20:24FromDiscord<Gumber aka Zachary Carter> what does that even mean?
21:20:30FromDiscord<Gumber aka Zachary Carter> that it only applies to the type when that one procedure is invoked?
21:20:36FromDiscord<aleclarson> yes
21:20:38FromDiscord<Gumber aka Zachary Carter> yeah, no
21:20:58FromDiscord<aleclarson> in some cases, the type can be nil, in others not
21:20:59FromDiscord<Gumber aka Zachary Carter> go look at the source if you want to know how it works
21:21:08FromDiscord<Gumber aka Zachary Carter> you obviously think I'm incorrect
21:21:14FromDiscord<Gumber aka Zachary Carter> and clearly you know it should work the way it should
21:21:22FromDiscord<aleclarson> i've used the feature \:)
21:21:26FromDiscord<Gumber aka Zachary Carter> cool
21:21:44FromDiscord<Gumber aka Zachary Carter> like what do you expect out of this - you're using an experimental feature in an undocumented way
21:21:58FromDiscord<Gumber aka Zachary Carter> and then complaining when it's combined with a pragma
21:22:09FromDiscord<Gumber aka Zachary Carter> that I already explained was probably not wise to use
21:22:21FromDiscord<aleclarson> i already said screw it, and took off the `{.inline.}` part \:P
21:22:26FromDiscord<Gumber aka Zachary Carter> okay then
21:22:29FromDiscord<Recruit_main707> In reply to @Skaruts "<@!386230567571554305> thing is, I'm": inothing will happen if you cast a cint to cint so you could ignore it.
21:22:36FromDiscord<aleclarson> i'm just trying to correct you, and it's not working D\:
21:22:47FromDiscord<Gumber aka Zachary Carter> yeah because I'm not convinced you know what you're talking about
21:22:49FromDiscord<Skaruts> the compiler ignore the cast?
21:22:58FromDiscord<Skaruts> ignores
21:23:01FromDiscord<aleclarson> where's elegantbeef when you need him
21:23:34FromDiscord<Recruit_main707> you are doint `cast[cint](number)`?
21:23:35FromDiscord<aleclarson> anyway, i'll let this go now \:P
21:23:37FromDiscord<Gumber aka Zachary Carter> the docs don't even specify how the thing works lol
21:23:41FromDiscord<Gumber aka Zachary Carter> not sure how you can be sure
21:23:41FromDiscord<aleclarson> true
21:23:48FromDiscord<Skaruts> no just `n.cint`
21:24:04FromDiscord<Recruit_main707> yes
21:24:25FromDiscord<Gumber aka Zachary Carter> you can use a converter
21:24:52FromDiscord<Gumber aka Zachary Carter> `converter toCint(x: int): cint = x.cint`
21:24:53FromDiscord<Recruit_main707> oh yeah thats very fitting for your usecase probably
21:25:09FromDiscord<Gumber aka Zachary Carter> you could even get rid of `int` and go with like `someinteger` or whatever the type is
21:25:22FromDiscord<Gumber aka Zachary Carter> but I'm not really sure why you need it - if you have the C signature as taking a cint
21:25:34FromDiscord<Gumber aka Zachary Carter> Nim I feel like is usually smart enough to generate code to coerce it to one
21:25:40FromDiscord<Skaruts> hmm, might be a good idea, I'll give it a try, it might be better than creating a template for every fnction that takes cint
21:25:45FromDiscord<Gumber aka Zachary Carter> you usually don't need an explicit coercion or cast
21:25:52FromDiscord<Gumber aka Zachary Carter> yeah definitely don't do that
21:25:56FromDiscord<Gumber aka Zachary Carter> that sounds ridiculous
21:25:58FromDiscord<Recruit_main707> i was trying to see if `SomeInteger and not cint` worked but the converter is better yes
21:26:01FromDiscord<Skaruts> yea I'm using SomeInterger in my templates
21:26:11FromDiscord<Gumber aka Zachary Carter> yeah you could use it in the converter tmk
21:26:45FromDiscord<Gumber aka Zachary Carter> but honestly I don't understand the need for any of it
21:26:49FromDiscord<Skaruts> I tried `type NotCint = SomeInteger and not cint` and it compiled, but then the compiler complained that cint != NotCint
21:26:59FromDiscord<Skaruts> anyway gonna try the converter
21:27:35FromDiscord<Skaruts> no, sorry, it complained that int literal != NotCint
21:27:45FromDiscord<Gumber aka Zachary Carter> I don't really use `int` that much unless I really need a hardware independent integer
21:27:55FromDiscord<Gumber aka Zachary Carter> and 64 bits is usually more than I need
21:27:56FromDiscord<Recruit_main707> it maybe gets confused because SomeInteger includes cint
21:28:02FromDiscord<Gumber aka Zachary Carter> oh
21:28:05FromDiscord<Gumber aka Zachary Carter> that could be it
21:28:36FromDiscord<Skaruts> I don't know any better, so I just use ints and floats almost everywhere
21:28:43FromDiscord<Gumber aka Zachary Carter> 😄
21:28:53FromDiscord<Gumber aka Zachary Carter> I mean that's most people
21:28:59FromDiscord<Gumber aka Zachary Carter> it doesn't matter most of the time
21:29:16*max22- quit (Quit: Leaving)
21:29:24FromDiscord<Skaruts> also because otherwise Nim complains and my brain explodes
21:29:25FromDiscord<Gumber aka Zachary Carter> only if you're working on resource constrained devices or in games or other software that needs to perform
21:29:44FromDiscord<Recruit_main707> then this worked for me so idk:↵`not SomeFloat and not string`
21:29:53*jjido joined #nim
21:30:20FromDiscord<Recruit_main707> so i suggest you to use the converter and ignore the no-issue :p
21:30:42FromDiscord<Elegantbeef> I'm back bitches!
21:30:54FromDiscord<Recruit_main707> welcome back :)
21:31:15FromDiscord<Gumber aka Zachary Carter> wb
21:31:23FromDiscord<Elegantbeef> What was i needed for though?!
21:31:25FromDiscord<Gumber aka Zachary Carter> I'm about to go take an afternoon covid nap
21:31:29FromDiscord<Skaruts> right thanks guys
21:31:38FromDiscord<Recruit_main707> np
21:31:45FromDiscord<Gumber aka Zachary Carter> There was a discussion around the notnil experimental annotation
21:31:54FromDiscord<Gumber aka Zachary Carter> and whether it could be applied to a proc signature
21:32:15FromDiscord<Gumber aka Zachary Carter> can scroll up a bit if you care to read
21:32:38FromDiscord<aleclarson> specifically the return type of a proc
21:32:50FromDiscord<Gumber aka Zachary Carter> no not the return type of a proc
21:32:53FromDiscord<Gumber aka Zachary Carter> in the proc signature
21:32:57FromDiscord<Gumber aka Zachary Carter> next to the return type
21:33:05FromDiscord<Gumber aka Zachary Carter> not on the type definition, on the proc signature
21:33:08FromDiscord<Recruit_main707> it does seem to work as aleclarson expects without the pragma, but the docs do say what you say
21:33:12FromDiscord<aleclarson> being after the return type makes it part of the return type
21:33:18FromDiscord<Gumber aka Zachary Carter> that's not where the type is defined lol
21:33:26FromDiscord<aleclarson> it's where the return type is defined
21:33:32FromDiscord<Gumber aka Zachary Carter> sure for the procedure yes
21:33:36FromDiscord<aleclarson> right
21:33:42FromDiscord<Gumber aka Zachary Carter> yeah saying it's defined next to the return type
21:33:50FromDiscord<Gumber aka Zachary Carter> makes it sound to me, like it's defined on the type
21:33:59FromDiscord<Elegantbeef> Well i do think it makes sense it cannot be used with inline
21:33:59FromDiscord<Gumber aka Zachary Carter> if you omit the word procedure
21:34:18FromDiscord<Recruit_main707> enlighten us please
21:34:20FromDiscord<Gumber aka Zachary Carter> yes because it's code flow analssis which you're potentially changing
21:34:23FromDiscord<Gumber aka Zachary Carter> with the inline pragma
21:34:28FromDiscord<Gumber aka Zachary Carter> but regardless
21:34:47FromDiscord<Gumber aka Zachary Carter> still questioning whether it even works the way alec is trying to make it work
21:34:51FromDiscord<Gumber aka Zachary Carter> or whether it just compiles
21:34:57FromDiscord<Elegantbeef> Give me one second to see
21:35:24FromDiscord<Recruit_main707> In reply to @Gumber "still questioning whether it": it does
21:35:25FromDiscord<Gumber aka Zachary Carter> the docs don't say or give that as an example
21:35:37FromDiscord<Elegantbeef> It works with the concrete type, with the `Type not nil` it doesnt since that's not how it's supposed to be used and also cause it is fucky logic
21:35:51FromDiscord<Gumber aka Zachary Carter> yeah exactly
21:35:53FromDiscord<aleclarson> not fucky at all
21:36:03FromDiscord<Jasmina Kiwi> Hello
21:36:07FromDiscord<Gumber aka Zachary Carter> oh concrete type
21:36:10FromDiscord<Elegantbeef> Well it's pretty fucky since you're type definition happens where the procedure is pasted in
21:36:21FromDiscord<Jasmina Kiwi> Umm
21:36:30FromDiscord<Elegantbeef> IE `type TestNoNil = Test not nil` gumber
21:36:30FromDiscord<Jasmina Kiwi> Whats this server
21:36:40FromDiscord<Elegantbeef> A server for the nim programming language
21:37:01FromDiscord<Jasmina Kiwi> .....
21:37:03FromDiscord<Jasmina Kiwi> Ok
21:37:07FromDiscord<Recruit_main707> its not easy to find by accident, is that why you are here?
21:37:24FromDiscord<Jasmina Kiwi> I honestly dk
21:37:34FromDiscord<Elegantbeef> I'd argue that you dont want to have to annotate `not nil` everywhere as such should just use the concrete type
21:37:42FromDiscord<Elegantbeef> Well now that you're here time to learn Nim 😛
21:37:56FromDiscord<aleclarson> a proc can guarantee a ref type is nil, even if the ref type can be nil in other unrelated procs
21:38:11FromDiscord<Jasmina Kiwi> Aha...
21:38:14FromDiscord<aleclarson> it would be weird to have `CollectionNotNil` when i can just do `Collection not nil`
21:38:14FromDiscord<Jasmina Kiwi> Well
21:39:02FromDiscord<Elegantbeef> I'd argue that `T not nil` should need to be converted to `T` explictly
21:39:12FromDiscord<Jasmina Kiwi> Idk whats umm language thingy ur talking
21:39:14FromDiscord<Elegantbeef> And vice versa
21:39:18FromDiscord<Jasmina Kiwi> Im a medical student
21:39:25FromDiscord<Recruit_main707> programming language
21:39:33FromDiscord<Recruit_main707> how did you get here xD
21:39:37FromDiscord<Jasmina Kiwi> Idk
21:39:48FromDiscord<Elegantbeef> The thing that makes computers beep boop
21:39:55FromDiscord<Recruit_main707> lol
21:39:56FromDiscord<Jasmina Kiwi> I've been on this server for a while but didn't really talk
21:40:07FromDiscord<Jasmina Kiwi> It was on my servers
21:40:11*Vladar quit (Quit: Leaving)
21:40:17FromDiscord<Jasmina Kiwi> I don't remember joining
21:40:21FromDiscord<Elegantbeef> The crown logo brings in everyone
21:40:22FromDiscord<Gumber aka Zachary Carter> https://nim-lang.org/
21:40:26FromDiscord<Gumber aka Zachary Carter> if this sounds exciting to you
21:40:29FromDiscord<Gumber aka Zachary Carter> you might be in the right place
21:40:37FromDiscord<Jasmina Kiwi> Only explanation is that bot
21:40:37FromDiscord<Recruit_main707> yeah i dont think she is into coding
21:40:41FromDiscord<aleclarson> @Jasmina Kiwi ur boyfriend probably playing a trick on you
21:40:49FromDiscord<Jasmina Kiwi> ......
21:40:55FromDiscord<Recruit_main707> bot?
21:40:58FromDiscord<Jasmina Kiwi> Ugh
21:41:09FromDiscord<Jasmina Kiwi> Well he's my ex
21:41:10FromDiscord<Elegantbeef> Me i am bot
21:41:15FromDiscord<Elegantbeef> Beep boop beep
21:41:16FromDiscord<Gumber aka Zachary Carter> Your ex is a robot?
21:41:20FromDiscord<Jasmina Kiwi> What
21:41:21FromDiscord<Jasmina Kiwi> No
21:41:31FromDiscord<Jasmina Kiwi> U said my bf or something
21:41:35FromDiscord<Gumber aka Zachary Carter> nah that wasn't me
21:41:40FromDiscord<aleclarson> he probably hacked ur account
21:41:42FromDiscord<Gumber aka Zachary Carter> I don't assume things about people like that
21:41:42FromDiscord<Jasmina Kiwi> Wr broke up last month
21:41:47FromDiscord<Gumber aka Zachary Carter> okay let's not have this haha
21:41:50FromDiscord<Jasmina Kiwi> Anyways
21:41:53FromDiscord<Jasmina Kiwi> No
21:41:54FromDiscord<Gumber aka Zachary Carter> there's an #offtopic channel if you all want to discuss that
21:41:55FromDiscord<Recruit_main707> lets go back to the point
21:42:06FromDiscord<Jasmina Kiwi> A bot called epic giveaways
21:42:15FromDiscord<Jasmina Kiwi> It adds you to servers
21:42:19FromDiscord<Jasmina Kiwi> Automatically
21:42:23FromDiscord<Gumber aka Zachary Carter> oh yes, we've had spam bots
21:42:27FromDiscord<Jasmina Kiwi> Im assuming thats what happened
21:42:30FromDiscord<Gumber aka Zachary Carter> probably
21:42:41FromDiscord<Gumber aka Zachary Carter> yeah I mean it's a programming language / software development discord server
21:42:50FromDiscord<Gumber aka Zachary Carter> so people make apps, games, web applications, etc... using this language
21:42:53FromDiscord<Gumber aka Zachary Carter> among other things
21:43:19FromDiscord<Jasmina Kiwi> Hmm my job is to open up people and fix them
21:43:30FromDiscord<Gumber aka Zachary Carter> yeah, quite a different set of skills required there
21:43:39FromDiscord<Jasmina Kiwi> Ahahah.....
21:43:44FromDiscord<Gumber aka Zachary Carter> you maybe could make a new surgeon simulator with Nim if you wanted to
21:43:48FromDiscord<Gumber aka Zachary Carter> and practice
21:43:57FromDiscord<Gumber aka Zachary Carter> but uh, beyond that I'm not sure it would be of much use to someone in your profession
21:44:01FromDiscord<Jasmina Kiwi> That would take years
21:44:03FromDiscord<Recruit_main707> leave the poor frogs alone
21:44:07FromDiscord<Gumber aka Zachary Carter> 😄
21:44:11*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:44:14FromDiscord<Jasmina Kiwi> I Don't know anything about coding
21:44:21FromDiscord<Gumber aka Zachary Carter> it's okay, I don't know anything about surgery
21:44:25FromDiscord<reilly> Well there's one way to find out ;)
21:44:29FromDiscord<Elegantbeef> Anywho alec the issue is the pragma is getting attached to some part of the `not nil` part
21:44:40FromDiscord<Elegantbeef> Programming isnt brain surgery so that's a plus
21:44:57FromDiscord<Jasmina Kiwi> Well
21:45:08FromDiscord<Recruit_main707> yeah, @Jasmina Kiwi if you want to keep talking lets move to #offtopic, but if you are gonna leave, then bye :)
21:45:21FromDiscord<Jasmina Kiwi> Tell me something interesting about your feild
21:45:40FromDiscord<Jasmina Kiwi> If you'd like i can tell u interesting facts about yourself or your body
21:45:52FromDiscord<Gumber aka Zachary Carter> prob better a topic suited for #offtopic
21:45:59FromDiscord<Jasmina Kiwi> Ok
21:46:02FromDiscord<Gumber aka Zachary Carter> we like to keep this focused on questions / discussions of the language
21:46:07FromDiscord<Gumber aka Zachary Carter> and software development in general
21:46:10FromDiscord<Gumber aka Zachary Carter> if possible
21:46:15FromDiscord<Gumber aka Zachary Carter> (edit) "if ... possible" added "and when"
21:46:16FromDiscord<Jasmina Kiwi> But first tell me interesting stuff about software things
21:46:19FromDiscord<aleclarson> In reply to @Elegantbeef "Anywho alec the issue": seems like a bug then
21:47:44FromDiscord<Elegantbeef> Well i dont think notnil is meant for anywhere but type defs so it's just luck that it works for a parameter
21:47:59FromDiscord<Elegantbeef> I personally dont see the point of only partially using it
21:48:50FromDiscord<Skaruts> is there a `SomeString` type in nim?
21:49:10FromDiscord<Elegantbeef> What's that supposed to mean?
21:49:17FromDiscord<Skaruts> string or cstring
21:49:26FromDiscord<Elegantbeef> Well you just wrote it
21:49:36FromDiscord<Elegantbeef> `type SomeString = cstring or string` 😛
21:49:49FromDiscord<Skaruts> yup, but was just wondering if it existed with some other name
21:50:21FromDiscord<Elegantbeef> So alec since 1.6 is soonTM i'd just suggest using strict not nil as it has better features and you can do `--warningAsError:strictNotNil`
21:50:24FromDiscord<Elegantbeef> https://nim-lang.github.io/Nim/manual_experimental_strictnotnil.html look at the features 😜
21:53:07FromDiscord<aleclarson> i don't really need that level of type safety. will that be the default behavior at some point?
21:53:21FromDiscord<Elegantbeef> It's desired eventually
21:53:30FromDiscord<aleclarson> that's one thing i like about Objective-C. how nilability is implicit
21:53:59FromDiscord<aleclarson> u can even send messages to nil and it won't crash \:)
21:55:16FromDiscord<Elegantbeef> Well you can always use wrapnils to make some easy nim management
21:56:06FromDiscord<aleclarson> interesting
21:57:25FromDiscord<Elegantbeef> I meant nil but wrote nim, so that's my life
21:59:13FromDiscord<aleclarson> tomato tomato
22:00:02*marek joined #nim
22:03:58*marek quit (Client Quit)
22:06:58FromDiscord<Recruit_main707> can you predeclare a type?
22:08:30FromDiscord<Elegantbeef> In what way?
22:11:00FromDiscord<Recruit_main707> well, i have a bunch of types i need to export↵then some emitted c++ code that uses those types↵then another type that needs the emitted c++ code but its also needed by the first bunch of types
22:17:54*mdbauman__ quit (Read error: Connection reset by peer)
22:19:23FromDiscord<JSONBash> should https://nim-lang.github.io/Nim/channels_builtin.html have a code example at the top?
22:23:01*audiophile_ quit (Quit: Default Quit Message)
22:23:46FromDiscord<Elegantbeef> @JSONBash\: yes https://github.com/nim-lang/Nim/blob/devel/lib/system/channels_builtin.nim#L29
22:28:20*vicfred joined #nim
22:42:12*stkrdknmibalz joined #nim
23:16:52*audiophile_ joined #nim
23:19:24FromDiscord<JSONBash> In reply to @Elegantbeef "<@245741179721744395>\: yes https://github.com/nim-": That works, thanks!
23:29:45*audiophile_ quit (Ping timeout: 260 seconds)