<< 05-05-2020 >>

00:04:08FromDiscord<bedwardly-down> @Never Listen To Beef , well of course, you’re a dog beef hybrid afterall
00:22:23*krux02_ quit (Remote host closed the connection)
00:24:32*zacharyc1rter quit (Ping timeout: 256 seconds)
00:24:32*zacharycarter quit (Ping timeout: 256 seconds)
00:33:14*monokrom quit (Remote host closed the connection)
00:48:02*arecaceae quit (Remote host closed the connection)
00:48:41*arecaceae joined #nim
00:52:18*Earlh21 joined #nim
00:54:57*Earlh21 left #nim (#nim)
00:58:18*idrialite joined #nim
00:58:34*ryan__ joined #nim
01:01:25*ryan_ quit (Ping timeout: 264 seconds)
01:01:57idrialiteCan someone help me with a compile error? I'm getting invalid indentation: https://pastebin.com/1Qxh2cVg (line 23)
01:03:37leorizeit's `not` in Nim, not `!`
01:04:06leorizealso `and`, not `&&`
01:05:24idrialiteChanged them and still getting the error
01:07:36leorizealso `.inc`, not `++`
01:08:21idrialiteThat fixed it, thank you
01:08:28leorizeyou can also use `+=`, though the `inc` proc is more popular
01:08:45FromDiscord<Yardanico> Yeah I like using inc
01:12:17*ryan__ is now known as tanger_moon
01:13:14FromDiscord<KingDarBoja> Do you come from Python?
01:14:50idrialiteMe? No, I usually use C#/C++/Java
01:14:58FromDiscord<Never Listen To Beef> Ah fellow C# dev 😄
01:15:05idrialiteLove C# <3
01:15:25FromDiscord<Never Listen To Beef> I love that in nim we dont need to write extension methods ever
01:15:30FromDiscord<Never Listen To Beef> Cause normal methods function the same
01:16:12FromDiscord<Yardanico> UFCS is the best, yeah
01:16:24FromDiscord<Never Listen To Beef> For us that dont speak in abbreviations?
01:16:51FromDiscord<Yardanico> universal function call syntax, in nim it's called MCS (method call syntax)
01:17:08FromDiscord<KingDarBoja> Welcome 😄
01:17:11FromDiscord<Yardanico> Ah sorry *uniform
01:17:19FromDiscord<Never Listen To Beef> Ah the techincal term for why i can do a.b() or b(a)
01:17:21FromDiscord<Never Listen To Beef> ?
01:17:28FromDiscord<Yardanico> Yes
01:17:30FromDiscord<KingDarBoja> So you heavy OOP guy?
01:17:30FromDiscord<Yardanico> UFCS
01:17:49FromDiscord<Never Listen To Beef> I mean i am considering i use unity engine mostly, and that's all C#
01:17:58FromDiscord<Never Listen To Beef> I prefer data oriented design though
01:18:18FromDiscord<Yardanico> https://en.m.wikipedia.org/wiki/Uniform_Function_Call_Syntax check the first two languages as an examples xd
01:18:31FromDiscord<KingDarBoja> I am being converted into OV
01:18:38*FromDiscord <KingDarBoja> I am being casted awaaayyy
01:19:07FromDiscord<Yardanico> Ah seems like D and Nim are the only ones who have real UFCS
01:19:20FromDiscord<Yardanico> Out of the "bigger" languages
01:19:32FromDiscord<Never Listen To Beef> I really love it, it's so frigging nice to just have procs be procs and not specific use case procs
01:19:37idrialiteIt confused me at first cuz I was looking for a way to put methods into the objects lol
01:19:47FromDiscord<Never Listen To Beef> Ah i did the same
01:20:01FromDiscord<Never Listen To Beef> You can have objects with named procs for an event system
01:20:20FromDiscord<Kurinoku> may i ask something, im trying to use a single-header c library with nim, i cant make the .h file a dynamic library so what do i do
01:20:21FromDiscord<Never Listen To Beef> No clue if there is a proper alternative for delgates outside of a `seq[proc]`
01:20:50FromDiscord<Yardanico> @Kurinoku {.compile: "file.h".} should work
01:21:00FromDiscord<Kurinoku> ok thank you
01:21:05FromDiscord<Never Listen To Beef> Is there a type you can add procs to and have them all call in at once?
01:21:09FromDiscord<Yardanico> Put it at top level
01:21:31FromDiscord<Yardanico> At the start of the file (you can do it after imports if you want)
01:21:48FromDiscord<Kurinoku> @Yardanico okeh-okeh
01:21:54FromDiscord<Kurinoku> imma try now
01:21:56FromDiscord<Yardanico> Well actually it doesn't matter where you put it in the file, at the start or in the end, but the former is nicer
01:35:48FromDiscord<Kurinoku> c2nim translates const wchar_t* to ptr wchar_t should i use mangle to make wchar_t*, WideCString as provided by widestrs
01:39:53idrialiteCan I have multiline while statements
01:46:52*chemist69 quit (Ping timeout: 260 seconds)
01:48:18FromDiscord<Never Listen To Beef> No clue why'd you want to but yes
01:48:18FromDiscord<Never Listen To Beef> https://play.nim-lang.org/#ix=2kPD
01:48:49*chemist69 joined #nim
01:50:25FromDiscord<bedwardly-down> Is inc(1) an incremental operator?
01:50:51FromDiscord<Never Listen To Beef> you can do `inc i` or `inc(i)` and yes it just increments by 1
01:51:17FromDiscord<Never Listen To Beef> *and i guess `i.inc`*
01:51:21FromDiscord<Yardanico> Not only by 1
01:51:25FromDiscord<bedwardly-down> That looks kind of convenient
01:51:30FromDiscord<Yardanico> inc(i, 2)
01:51:34FromDiscord<Never Listen To Beef> oh
01:51:36FromDiscord<Yardanico> 1 is the default second argument
01:51:36FromDiscord<Never Listen To Beef> nice
01:52:04FromDiscord<Never Listen To Beef> Is in cthe idiomatic method of `+=` then?
01:52:10FromDiscord<Never Listen To Beef> inc the*
01:53:00FromDiscord<Yardanico> Both are fine I guess
01:53:03FromDiscord<bedwardly-down> Looks kind of like for(i = 0; i++; i < 10) in haxe
01:53:23FromDiscord<Yardanico> For that we have for i in 0 ..< 10: stuff
01:53:23FromDiscord<Never Listen To Beef> the nim of that would be `for i in 0..9`
01:53:27FromDiscord<bedwardly-down> Or the new for(i in 0..10)
01:53:58FromDiscord<bedwardly-down> That’s very similar to the Haxe 4 new incremental stuff. Nice
01:55:43FromDiscord<Yardanico> and by the way the first example you did is the default in most C-like languages
01:55:54FromDiscord<Yardanico> It's been around for tens of years :P
01:55:57FromDiscord<bedwardly-down> Mine?
01:56:18FromDiscord<Yardanico> The for(i= 0; ....) one
01:56:36FromDiscord<Never Listen To Beef> I've never seen the middle be the conditional though
01:56:41FromDiscord<Yardanico> Ah right
01:56:45FromDiscord<Never Listen To Beef> not be i mean*
01:57:04FromDiscord<bedwardly-down> It’s the default in Java, Haxe, c# and even a variant of it exists in bash and other shell scripting languages
01:57:21FromDiscord<Never Listen To Beef> Well C# it's val, conditional, increment
01:57:34FromDiscord<Yardanico> It's *also* the default in C, C++, JS
01:57:56FromDiscord<bedwardly-down> Now but about 10 years ago at least, it was how i showed.
01:59:21FromDiscord<Never Listen To Beef> Ah i've never seen it in anywhere
02:00:06leorize@Never Listen To Beef: `inc` is not the same as `+=`, though the effect is the same
02:00:06FromDiscord<Never Listen To Beef> Can nim abuse the for loop into a while loop
02:00:23FromDiscord<Never Listen To Beef> In what way is it different?
02:00:24FromDiscord<Yardanico> @bedwardly-down is it really that way? The increment being in the middle
02:00:34FromDiscord<Yardanico> It's really the first time seeing the for me
02:00:50leorizeinc() is "increase by this amount (default 1)", and `+=` is "add this amount into the var"
02:01:08FromDiscord<bedwardly-down> It was. It’s just not as used in tutorials anymore but still valid
02:01:13FromDiscord<Never Listen To Beef> C# doesnt even compile with that
02:01:33leorizethe "technical" difference would be that `inc` works with enum and `+=` doesn't :p
02:02:07FromDiscord<Never Listen To Beef> Well the difference is minimal
02:02:22leorizeyea, it's only for the reading flow
02:02:30leorizelike how people use `++` instead of `+= 1`
02:02:35FromDiscord<Never Listen To Beef> Inc still takes a negative secondary parameter so i'd argue it's illdesigned 😛
02:02:57disrupteksee also succ()
02:02:57leorizelol
02:03:16FromDiscord<Yardanico> Btw funny thing that https://haxe.org/manual/lf-iterators.html can be implemented in Nim just fine without any classes
02:03:18disruptekleorize: how well do you understand versioned symbols?
02:03:26leorizeenough to curse them
02:03:55FromDiscord<bedwardly-down> @Never Listen To Beef last time i used c# XNA just was created for Xbox Live Indie program
02:03:55leorizeyou having trouble with them?
02:04:00FromDiscord<Yardanico> You just create your own object and define items for it (and pairs if you want two values like key: value)
02:04:16FromDiscord<Never Listen To Beef> Yea i just had to see if it was possible since it seemed unlikely
02:04:26FromDiscord<Never Listen To Beef> in C# the second param has to be a bool or else it complains
02:05:03disruptekleorize: we should scheme about if there's a "best" way to exploit them going forward.
02:05:55leorizeI have always considered them a bad design
02:06:09leorizeit existed for the sole idea of "using multiple version of the same library"
02:06:14FromDiscord<bedwardly-down> They changed that then, beef
02:06:23FromDiscord<Yardanico> Uhh no
02:06:35leorizeand then it never worked out
02:06:59FromDiscord<bedwardly-down> I’m talking about c#. Sorry
02:07:01FromDiscord<Yardanico> C# always had C style for loops (they added the foreach and friends though)
02:07:23disrupteki'm wondering if we couldn't support multiple architectures or something. there's something there but i'm not sure what.
02:07:38FromDiscord<Yardanico> C# never had for loops with increment in the middle
02:08:13FromDiscord<Yardanico> Maybe you're confusing it with something else
02:08:17leorizedisruptek: wdym?
02:08:32FromDiscord<Yardanico> it's for(variable, condition, operation)
02:09:13FromDiscord<bedwardly-down> You’re probably right. Xna wasn’t pure c# but a subset
02:09:18disrupteki dunno. just looking for ideas on how to exploit the feature in the backend.
02:09:21FromDiscord<Never Listen To Beef> or if you're abusing it for(;;)
02:09:23FromDiscord<Never Listen To Beef> Cause why not!
02:09:31FromDiscord<Never Listen To Beef> *Can i abuse nim for loops?*
02:09:43FromDiscord<Yardanico> just use while true
02:09:46leorizego did the for(;;) thing then call it "a clever design"
02:09:55leorizeI say that's a retarded one
02:09:57FromDiscord<Never Listen To Beef> No that's too smart
02:10:02FromDiscord<Never Listen To Beef> While is intended for that
02:10:09FromDiscord<Never Listen To Beef> for;; is a silly while loop
02:10:31FromDiscord<Never Listen To Beef> You dont understand, one is for purposely making your code silly, the other is for serious work
02:10:59FromDiscord<Never Listen To Beef> Also im sorta offended you actually suggested while true, like i didnt know about it
02:11:00FromDiscord<Never Listen To Beef> 😦
02:11:14disrupteki'm more of a while false: guy, myself.
02:11:24disruptekfaster.
02:11:39FromDiscord<Never Listen To Beef> Im more of a `quit 1` on line 1 of my main file
02:11:52FromDiscord<Never Listen To Beef> It's the quickest program i can make
02:11:53shashlick@leorize I think I have a fix for https://github.com/nim-lang/nimble/pull/768
02:11:54disruptekamateur.
02:11:55leorizedisruptek: well we can exploit symbol versioning to walkaround our static library situation, but I don't see any good way to use it
02:12:08leorizeshashlick: what's your idea?
02:12:39disruptek#12480
02:12:41FromDiscord<bedwardly-down> Haxe and Java seem to iterate weirdly then or I’ve been using it the wrong way and it still compiled and worked
02:13:14disrupteki forgot i killed the bot.
02:13:16disruptek#12480
02:13:19disbothttps://github.com/nim-lang/Nim/issues/12480 -- 5an admittedly silly compiler crash one-liner ; snippet at 12https://play.nim-lang.org/#ix=2kPM
02:13:25shashlickIt's the same as my fix for disruptek's nimph issue with nimterop
02:13:36leorizedo you have a link?
02:14:47shashlickhttps://github.com/nim-lang/nimble/pull/768
02:14:49disbotnimscript{wrapper,api}: don't copy generated script to package directory
02:14:50shashlickUgh
02:15:00shashlickhttps://github.com/nimterop/nimterop/commit/33d77f82e878c86c0edf3bd21d359e5f40492ad2
02:15:15shashlickI added nimconf.nim which does most of the work
02:15:44shashlickBasically we can run Nim dump in the target folder and create a cfg for the nims script
02:16:19disruptekbut can we get a tag?
02:16:31disruptekwhy so stingy with the version tags?
02:16:55disruptekshashlick, take care of yourself. looks like texas is getting bad.
02:19:14leorizeshashlick: but this would make nimble requires nim >= 1.2
02:23:02*dddddd_ quit (Ping timeout: 260 seconds)
02:23:02*muffindrake quit (Ping timeout: 260 seconds)
02:25:09*muffindrake joined #nim
02:27:08shashlickYes unless we can get 4raq to backport the nim dump stuff to 1.0
02:27:27shashlick@disruptek almost there, last few tests remain
02:27:50shashlickhttps://github.com/nimterop/nimterop/blob/master/CHANGES.md
02:28:19leorizeI'm quite certain that it won't be backported
02:36:41FromDiscord<KingDarBoja> Hi guys
02:41:02FromDiscord<bedwardly-down> @Never Listen To Beef make any progress on that window manager? I’m debating on learning more nim when i get home or crashing.
02:41:25FromDiscord<bedwardly-down> Sup, @KingDarBoja ?
02:41:33FromDiscord<Never Listen To Beef> nope i've been polishing my last game jam game a bit
02:41:42FromDiscord<Never Listen To Beef> The atoms are annoying to deal with so i've been putting it off
02:41:43FromDiscord<KingDarBoja> Doing some TS stuff before continuing my journey
02:42:47FromDiscord<bedwardly-down> I need to figure out how to decouple some haxe code i worked on earlier that i had a fridge epiphany with. Ha
02:43:04FromDiscord<bedwardly-down> Atoms, @Never Listen To Beef ?
02:43:18FromDiscord<Never Listen To Beef> X uses atoms to mark features and states
02:43:22FromDiscord<Never Listen To Beef> They're annoying as hell
02:45:18FromDiscord<Never Listen To Beef> They're basicaly just strings and data, but again are annoying as hell
02:46:10FromDiscord<bedwardly-down> Ewww. Gotya
02:46:33FromDiscord<Never Listen To Beef> And for some reason i dont get fullscreen propert changes like awesomewm or any other wm
02:46:35FromDiscord<Never Listen To Beef> so idk
02:46:43FromDiscord<Never Listen To Beef> Could always just torch it and restart it
02:47:19FromDiscord<bedwardly-down> If it’s anything like other Linux software, you’re most likely forgetting some obscure flag that makes no sense
02:47:48FromDiscord<bedwardly-down> That’s not all software but there are a few out there
02:48:11FromDiscord<Never Listen To Beef> Yea i've added the property changed flags, and also added the supported atoms though so i know it's trying just not working 😄
02:49:01*cgfuh quit (Quit: WeeChat 2.7.1)
02:49:51FromDiscord<bedwardly-down> What was your git repo again?
02:51:28shashlick@leorize lmk if you think this can work
02:52:11FromDiscord<Never Listen To Beef> @bedwardly-down https://github.com/beef331/goodwm
02:52:11FromDiscord<Never Listen To Beef> Probably should rename it "Disaster WM"
02:53:14FromDiscord<bedwardly-down> Super sexy nim nim time is more like it. 🤪
02:55:24FromDiscord<bedwardly-down> I’m going to be honest, you could probably cut down the goodwm.nim file in size, but most of the atoms are in there, right?
02:59:15FromDiscord<bedwardly-down> @Never Listen To Beef , is this shell dependent? ‘execShellCmd("notify-send FullScreen it")’
02:59:29FromDiscord<Never Listen To Beef> Well that's for debugging
02:59:39FromDiscord<Never Listen To Beef> Some things dont send inside Xephyr
02:59:44FromDiscord<Never Listen To Beef> Such as mouse movement
03:00:03FromDiscord<Never Listen To Beef> I do have to replace the Xrandr call with the xrandr lib since it is inside the nim x11
03:00:48FromDiscord<bedwardly-down> Does that print to shell or log or what? That might have issues for non-bash shells
03:00:49*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
03:01:00FromDiscord<bedwardly-down> I’d have to test it out
03:02:08FromDiscord<Never Listen To Beef> I mean it sends a nitfication
03:02:12FromDiscord<Never Listen To Beef> notification
03:02:16FromDiscord<Never Listen To Beef> It's again for debugging
03:02:29FromDiscord<Never Listen To Beef> So it doesnt matter for non bashshells
03:02:39FromDiscord<bedwardly-down> Ah, gotya.
03:03:52FromDiscord<bedwardly-down> The proc name confused me since that sounds like you’re actually passing a command to be ran by the shell and not more of a console trace
03:04:13FromDiscord<bedwardly-down> Is that your own name or what your api uses?
03:04:26FromDiscord<Never Listen To Beef> That is sending a message for debugging
03:04:32FromDiscord<Never Listen To Beef> It's not proper debugging
03:04:36FromDiscord<Never Listen To Beef> It's print log debugging
03:04:40FromDiscord<Never Listen To Beef> Since im a fuckwit
03:04:50FromDiscord<bedwardly-down> 🤮🤪
03:06:23FromDiscord<bedwardly-down> I’m almost home. I’m gonna eat. Then I’ll see what i can read more. I’m not good at nim right now but could check into it more
03:06:54FromDiscord<Never Listen To Beef> Im not good at nim either
03:07:33FromDiscord<bedwardly-down> We’re idiots, so let’s try to be smart together! Lmao
03:07:47FromDiscord<Never Listen To Beef> Nah i think that just increases the idiot density
03:09:46FromDiscord<bedwardly-down> And dead work nights cause me to get grumpy, so maybe doing something not related to me might be a good distraction. Ha
03:13:03FromGitter<kayabaNerve> PMunch: You around?
03:13:27FromGitter<kayabaNerve> Have something to discuss with you
03:13:49leorizehe 's not online
03:13:57FromGitter<kayabaNerve> Oof. Damn Gitter side of things.
03:14:08*silvernode joined #nim
03:14:35FromDiscord<KingDarBoja> Hi leo 😄
03:14:45leorizeo/
03:14:56voltistIs there a way to specify a single proc that accepts either an int or a float, without having to specify the type every time in [square brackets]?
03:15:21leorizeproc foo(val: int | float)
03:15:55voltistOoo thats nice and simple, thanks
03:17:26FromDiscord<bedwardly-down> Leo, is that applicable to more than two options?
03:17:34leorizeyes
03:17:38FromDiscord<Yardanico> If you want to accept *any* number type you might why to use SomeNumber
03:17:41FromDiscord<bedwardly-down> Nice.
03:17:50leorizeit's a shorthand for proc foo[T: int | float](i: T)
03:17:56FromDiscord<Yardanico> @bedwardly-down it's implicit generics basically
03:18:03FromDiscord<bedwardly-down> Does nim have a dynamic type?
03:18:09leorize`int | float` here is a typeclass, and not a sum type
03:18:10FromDiscord<Yardanico> No
03:18:17voltistFeatures like that sit in a strange place where guides don't cover them, and they dont have a dedicated documentation (that one might, but just in general)
03:18:35FromDiscord<Yardanico> Nim manual covers that though
03:19:12leorizeusually people don't know the terms, that why they can't find them
03:19:20leorizethe manual covers like 95% of the features
03:19:27FromDiscord<Never Listen To Beef> Reading is too hard, just get a brain siphon and give me the knowledge
03:19:40FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#generics-type-classes
03:19:46voltist"usually people don't know the terms" yeah that's a better way of putting it
03:20:25voltistIt's not signposted like you might get with more fundimental features
03:22:01FromDiscord<KingDarBoja> But to use that, one must use generics
03:22:04FromDiscord<KingDarBoja> I am right?
03:22:14FromDiscord<KingDarBoja> Ofc union types aren't allowed
03:22:19leorizethat is generics
03:22:21FromDiscord<Never Listen To Beef> That's a shorthand of a generic
03:23:21*idrialite quit (Remote host closed the connection)
03:24:10FromDiscord<bedwardly-down> In haxe, this is a common way to take anything for a value: https://haxe.org/manual/types-dynamic.html
03:24:25FromDiscord<KingDarBoja> Dart uses that too
03:24:33FromDiscord<Yardanico> In Nim you can have a raw pointer too
03:24:39FromDiscord<Yardanico> With no type attached to it
03:24:46FromDiscord<bedwardly-down> https://haxe.org/manual/type-system-generic.html
03:24:55FromDiscord<Never Listen To Beef> Generic variables are always weird to me in static languages
03:24:58FromDiscord<bedwardly-down> And generic is a weird thing
03:25:18leorizedynamics reminds me of pascal's Variant type
03:25:31leorizein here we have it too, called JsonNode :)
03:25:34FromDiscord<KingDarBoja> I always confuse its purpose with being able to return union types on proc calls
03:25:34*Lord_Nightmare2 joined #nim
03:25:40FromDiscord<KingDarBoja> But ofc that is a big NO
03:25:54*FromDiscord <KingDarBoja> don't hit me Yardanicco
03:25:57FromDiscord<Yardanico> Not really you l
03:25:59FromDiscord<Never Listen To Beef> Idk in my years of C# i've never needed a generic variable
03:26:17FromDiscord<Yardanico> *you can have "a | b" as the return type
03:26:26FromDiscord<Yardanico> If the proc itself is generic
03:26:41*Lord_Nightmare quit (Ping timeout: 258 seconds)
03:26:44*Lord_Nightmare2 is now known as Lord_Nightmare
03:26:45FromDiscord<KingDarBoja> That's a whole different situation 🧠
03:26:55FromDiscord<KingDarBoja> My brain is gonna get OVERLOADED
03:27:01voltistIt's very annoying that ``*`(v: A, r: B)` doesn't support `someB * someA`. Is there a helper for this?
03:27:33leorizewrite a template :P
03:28:17voltistSo just define ``*`(v: B, r: A)`?
03:28:23leorizewe need a macro for this in sugar then
03:28:41leorize`{.permutate.}`
03:28:43FromDiscord<KingDarBoja> https://dart.dev/guides/language/sound-dart#type-inference
03:28:49leorizeshouldn't be too hard
03:29:26voltistI'll leave that to someone who knows how to write macros well :)
03:29:40leorizeI can actually write you one rn :P
03:29:59FromDiscord<Never Listen To Beef> I still think the tables module needs a macro/template to automatically hash objects so objects can always be used as keys
03:30:12leorizenah, it's a stupid idea
03:30:20FromDiscord<KingDarBoja> wtf?
03:30:25FromDiscord<KingDarBoja> I don't get the idea...
03:30:38FromDiscord<KingDarBoja> objects as keys... what?
03:31:01FromDiscord<Never Listen To Beef> Mine? All hashable fields of an object gets hashed so you can use objects as keys if you so wish without having to manually hash their fields
03:31:31PrestigeWhat do other languages do to automatically hash objects?
03:32:24voltistleorize: That would be wonderful, thanks! I should really get to know macros better, because it seems that people make contributions because of needs I have more than I do :/
03:32:39FromDiscord<Never Listen To Beef> Idk prestige i just suggest illadvised ideas i have
03:32:49*silvernode quit (Ping timeout: 256 seconds)
03:33:21PrestigeLol beef
03:33:46FromDiscord<Never Listen To Beef> I could be wrong but could be similar to what i said
03:33:49PrestigeIt sounds like a good idea for the end users but I have no idea of the drawbacks
03:34:45FromDiscord<KingDarBoja> We need a beef emoji, just saying
03:34:50FromDiscord<Never Listen To Beef> Why?
03:35:02FromDiscord<KingDarBoja> Because I am getting hungry
03:35:06Prestige🥩
03:35:10FromDiscord<KingDarBoja> 🥩
03:35:10FromDiscord<Yardanico> 🥩
03:35:12FromDiscord<KingDarBoja> that works
03:35:22FromDiscord<Never Listen To Beef>
03:35:22FromDiscord<Never Listen To Beef> https://cdn.discordapp.com/attachments/371759389889003532/707072914683330601/Beef256.png
03:35:26FromDiscord<KingDarBoja> RIP IRC
03:35:31FromDiscord<Yardanico> ?
03:35:33FromDiscord<Never Listen To Beef> They get a url
03:35:40FromDiscord<Never Listen To Beef> to that discord upload
03:35:46FromDiscord<KingDarBoja> Is that true?
03:35:52FromDiscord<Never Listen To Beef> That's what i've been told
03:35:52*Romanson joined #nim
03:35:56FromDiscord<Yardanico> Of course lol
03:36:01PrestigeBeef: I was looking into it and I think xrandr is probably the best choice for multihead btw, found a nim wrapper as well
03:36:04FromDiscord<Yardanico> and emojis work fine since it's just utf8
03:36:08Prestigeso you don't have to execute a shell command iirc
03:36:11FromDiscord<Never Listen To Beef> Yea the nim wrapper is with x11
03:36:22FromDiscord<Never Listen To Beef> I've already mentioned this multiple times and said it's dumb that i did
03:36:41PrestigeJust trying to be helpful :P
03:37:01FromDiscord<Never Listen To Beef> Yea sorry i guess, if it came off aggressive 😄
03:37:11PrestigeHehe np
03:38:20voltistDoesn't the Discord have an unrelated discussion channel you can use for beef related discussion? IRC users like myself don't really have anywhere to go to escape to when beef emojis start flowing :)
03:39:39FromDiscord<Never Listen To Beef> I mean if you want me to shutup just tell me to, ill call you rude, but i'll understand
03:39:52FromDiscord<KingDarBoja> Yes, it is offtopic
03:40:07FromDiscord<KingDarBoja> We went offtopic for a brief moment, sorry pal
03:41:54shashlickthere's a #nim-offtopic for that
03:42:05Prestigeis that bridged to irc as well?
03:42:13FromDiscord<Never Listen To Beef> Yea
03:42:24voltistNah I don't have a problem with off topic stuff, but just spam is kinda... spammy
03:42:45FromDiscord<Never Listen To Beef> I feel like i need to say "that's the joke" but i dont want to be considered a total asshole 😄
03:42:59FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#userminusdefined-pragmas-pragma-pragma pragma pragma pragma pragma pragma!
03:43:25PrestigeThat's a great url
03:44:34FromDiscord<KingDarBoja> pragmatic...
03:45:06FromDiscord<Yardanico> Pragmagic :P https://github.com/pragmagic
03:46:39FromDiscord<Never Listen To Beef> Interesting a lot of nim stuff, and they're an abathur main in Heroes of the Storm
03:46:49voltistDoes the Nim compiler tolerate special characters like Δ?
03:46:56shashlickya
03:46:58FromDiscord<Never Listen To Beef> it's utf8
03:47:11PrestigeBeef do you have a roadmap for your wm?
03:47:17voltistNeat
03:47:30FromDiscord<Never Listen To Beef> Yea, im going to drive it to a ocean dock and drop it in there with cement tied to it's legs
03:47:42FromDiscord<Never Listen To Beef> No i dont have a sincere map
03:47:48FromDiscord<Never Listen To Beef> I dont plan i just do
03:47:48Prestigelmao, ok
03:47:55FromDiscord<KingDarBoja> Wtf has to do abathur with Nim?
03:48:05FromDiscord<Never Listen To Beef> <https://github.com/pragmagic/abathur>
03:48:19FromDiscord<KingDarBoja> Clever name
03:48:28FromDiscord<Never Listen To Beef> Clearly a cool person 😛
03:48:35FromDiscord<KingDarBoja> genetics related == abathur
03:48:36FromDiscord<KingDarBoja> Noise!
03:50:09voltistHow is that repo genetics related other than through the name?
03:50:22FromDiscord<Never Listen To Beef> > A genetically modified database
03:50:30FromDiscord<Never Listen To Beef> Dont ask what that means
03:50:33FromDiscord<Never Listen To Beef> Just accept it
03:50:37FromDiscord<bedwardly-down> Was the WM stuff off topic or what came from it? My roommate needed my help a bit
03:51:27FromDiscord<Never Listen To Beef> The WM is between me and prestige who are both making WMs in nim
03:51:35FromDiscord<Never Listen To Beef> His is clearly going to be better since he actually reads docs
03:52:07PrestigeLol we'll see, you're making much more progress
03:52:51FromDiscord<bedwardly-down> It’s not a race to make Nim a common household name in the WM space, is it?
03:53:47PrestigeFirst one to do it wins 1,000 internet points
03:53:48FromDiscord<Never Listen To Beef> I mean my intial idea was to use nim for the base and nimscript for the widget programming but that seems like a pipedream, but we'll see
03:53:50voltistI don't think WM development is the kind of space where people would use a language because someone else did
03:54:03FromDiscord<Never Listen To Beef> Yea WM is the most use whatever language you want
03:54:17FromDiscord<KingDarBoja> Never stop dreaming, you can do it 🙂
03:54:19FromDiscord<Never Listen To Beef> Looks at awesome WM having a ton of lua
03:54:34FromDiscord<Never Listen To Beef> It's not an issue of doing it, it's more of doing it right 😄
03:54:52FromDiscord<Never Listen To Beef> Embedded nimscript would let me pass primitives but that's clearly not enough for me
03:56:12FromDiscord<Never Listen To Beef> Well like it'd work but it'd be a pain to setup
03:56:26FromDiscord<KingDarBoja> Well, what disruptek told me once time ago: make it work, then improve
03:56:41FromDiscord<KingDarBoja> Any doubt, feel free to ask
03:56:44FromDiscord<Never Listen To Beef> Might as well just use json instead of that
03:57:01FromDiscord<Never Listen To Beef> Well my biggest issue is xlib atm, and i doubt many people here are well accustomed in that 😄
03:57:35FromDiscord<bedwardly-down> Fix the x11 Wayland issue by building a full rendering stack in nim
03:57:43FromDiscord<Never Listen To Beef> lol
03:58:01FromDiscord<Never Listen To Beef> Yea im way less qualified then the xorg devs working on wayland, and less of a man
03:58:22FromDiscord<Never Listen To Beef> *They've got how many people contributing?*
03:59:09FromDiscord<bedwardly-down> And how much money coming in to support development?
04:00:02FromDiscord<Never Listen To Beef> Not a clue, anywho prestige you've got some time to play catchup since im polishing up a gamejam game i did, so do it quick, so we can both assist eachother later 😛
04:00:49PrestigeSounds good :)
04:02:40FromDiscord<bedwardly-down> So, I'm at my laptop. Basic way to get started is figuring out hwo the xlibs interact with each other, right?
04:02:58FromDiscord<KingDarBoja> ok enough TS stuff for today
04:03:51*silvernode joined #nim
04:04:17FromDiscord<Never Listen To Beef> Yea bedwardly this is basically the best thing i've found to get a quick grasp of xlib
04:04:17FromDiscord<Never Listen To Beef> https://tronche.com/gui/x/xlib/
04:04:19*zacharycarter joined #nim
04:04:20*zacharyc1rter joined #nim
04:05:16FromDiscord<bedwardly-down> Thanks.
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:40*supakeen joined #nim
04:08:22FromDiscord<bedwardly-down> @Never Listen To Beef and prestige, did you guys see this: https://github.com/jichu4n/basic_wm
04:08:31FromDiscord<Never Listen To Beef> I've
04:08:58voltistDoes anybody know to get in contact with SSPkrolik? One of their packages is slowly deteriorating because they aren't responding to issues/PRs
04:09:06PrestigeYep
04:09:36FromDiscord<Never Listen To Beef> If they arent maintaing it you always could fork it and maintain it 😄
04:10:06FromDiscord<bedwardly-down> He also has a paper that was part of Google Summer of Docs linked on how Xorg and Window Management work. Did you read that link?
04:10:14FromDiscord<bedwardly-down> https://jichu4n.com/posts/how-x-window-managers-work-and-how-to-write-one-part-i/
04:10:24FromDiscord<Never Listen To Beef> That is where i found basic_wm
04:11:27FromDiscord<bedwardly-down> Gotya
04:12:04voltistThing is, they have the nimble listing for the neat, recognizable name `nimongo`, so it might confuse people if it doesn't work and they actually have to go for some other library
04:12:20FromDiscord<Never Listen To Beef> Ah
04:12:46FromDiscord<Never Listen To Beef> The annoying thing there bedwardly is they stop that wm before they implement anything that is actually needed in a TWM
04:12:58FromDiscord<Never Listen To Beef> > In our next installment, we will improve the user-facing functionality of our window manager by adding ways to move, resize and close windows.
04:13:46FromDiscord<bedwardly-down> Voltist, is this the same guy? https://twitter.com/SSPkrolik
04:14:03*opal quit (Ping timeout: 240 seconds)
04:14:17voltistI'd say so yeah
04:14:23FromDiscord<Never Listen To Beef> Seems so with his big ol' nim image there
04:15:11voltistThey have made contributions on GitHub recently
04:15:32voltistBut obviously not seeing/acknowledging issues
04:16:44FromDiscord<bedwardly-down> I got no idea
04:17:26*opal joined #nim
04:20:29FromDiscord<Avatarfighter> just curious is there any reason why a variable wouldn't change its value when you "-=" from it?
04:21:32FromDiscord<Avatarfighter> I know this may sound weird but I'm getting weird behavior where a mutable variable isn't modifying
04:21:40leorizevoltist: https://play.nim-lang.org/#ix=2kQ2
04:21:42leorizethat's a rough version
04:21:50leorizeI'll have to copy it to my machine and clean it up
04:21:58leorizethe playground is not a nice editor
04:22:08FromDiscord<Avatarfighter> playground best IDE 😛
04:22:30FromDiscord<Never Listen To Beef> *intergrated* doesnt mean into the web browser
04:22:57FromDiscord<Avatarfighter> hahah
04:23:01*narimiran joined #nim
04:23:08voltistleorize: Neat, thanks! Are you going to make a pull request once you have it cleaned up a bit?
04:24:11leorizeI'll once I figured out this permutations iterator :P
04:24:22leorizeI copied it from wikipedia :P
04:24:30voltistAh right :)
04:25:08FromDiscord<Avatarfighter> oh nvm ik why im getting my weird behavior, I did change the value of the variable lmao
04:27:09leorizevoltist: does it work well? :P
04:27:54leorizeI designed it to work with arbitrary amount of params, so it might be a bit overkill
04:27:55voltistleorize: Yes it does
04:28:50voltistleorize: It took me a minute to remember my Ohms law from highschool science and figure out what procs should actually be permutable
04:29:05FromDiscord<bedwardly-down> Do any of you guys actually use playground to pigure out production level code for your projects?
04:29:13FromDiscord<bedwardly-down> Do any of you guys actually use playground to figure out production level code for your projects?
04:29:22leorizenah
04:29:32leorizeI just use it when I wanna draft something out for the chat
04:29:44FromDiscord<Avatarfighter> I use it when I'm on my phone tbh
04:29:44leorizemy trusty neovim setup trumps all
04:30:15FromDiscord<bedwardly-down> When I'm bored at work, I might need to do just that, @Avatarfighter
04:30:28leorizevoltist: currently it doesn't copy the doc comments, but if you want I can add it
04:31:16FromDiscord<Avatarfighter> @bedwardly-down I really like doing that since I get to try new things AND ask here for that realtime spoonfeeding lmao
04:31:22*thomasross quit (Ping timeout: 260 seconds)
04:31:57FromDiscord<Never Listen To Beef> I tend to use it as an alternative to makeing a nim file on my pc for quick things
04:32:26FromDiscord<bedwardly-down> That actually seems fairly useful, especially for ED users like me
04:33:07FromDiscord<Never Listen To Beef> I've gotta be honest i doubt users needs to be puralized there
04:33:37FromDiscord<bedwardly-down> You would be surprised at how many ED users are out there in my online circles
04:33:49FromDiscord<Avatarfighter> welp I just realized I messed up the implementation of salsa20poly1305 800 lines in :L
04:34:07FromDiscord<bedwardly-down> What is that, @Avatarfighter?
04:34:32leorizeit's a crypto algo
04:34:37FromDiscord<Avatarfighter> ^
04:34:39FromDiscord<bedwardly-down> Gotya
04:35:08FromDiscord<Avatarfighter> salsa20 is a symmetric stream cipher while poly1305 is a message authentication code
04:35:44FromDiscord<Avatarfighter> I forgot that passing stuff in as a variable makes it mutable out of the scope of the proc its in and it broke everything lmfao
04:36:17FromDiscord<Never Listen To Beef> Photsynthetical quantum mechanical engineering. I too can say random big words together 😛
04:36:53FromDiscord<Avatarfighter> lmao
04:37:18FromDiscord<Avatarfighter> basically salsa20 takes in bytes in sequence and as long as you also have salsa20 you can read my bytes in the correct sequence while poly1305 makes sure the bytes were by me
04:37:44FromDiscord<bedwardly-down> Gotya
04:39:45FromGitter<kayabaNerve> Can I attach a macro to an object field without a macro surrounding the object definition?
04:39:59leorizeyes
04:40:09leorizeI think
04:40:12FromGitter<kayabaNerve> So dumpTree shows the pragma, but getTypeInst doesn't
04:41:02leorizehow are your custom pragmas defined
04:41:23FromGitter<kayabaNerve> I was checking it wasn't check applying the pragma; removing the pragma def causes a compilation error
04:41:27FromGitter<kayabaNerve> template {.pragma.}
04:42:25FromGitter<kayabaNerve> Tried checking if I had to write a body and manually re-attach the pragma; I do not. {.pragma.} aren't allowed bodies.
04:43:18FromGitter<kayabaNerve> Huh. I may not want the pragma pragma
04:45:11FromGitter<kayabaNerve> So, the pragma pragma is for your custom pragma to be macro-detectable. That said, the macro calling getType and getTypeImpl strip them.
04:45:48FromGitter<kayabaNerve> Removing the pragma pragma causes this to error; so does removing commenting the pragma out (I thought maybe if it couldn't resolve, it'd be kept as a label)
04:46:22FromDiscord<Avatarfighter> I'm going to be so proud when I'm done with this library lmao it looks like spaghetti, but its my spaghetti 😉
04:46:26FromGitter<kayabaNerve> Yep. Think I need a wrapping macro.
04:46:47leorizemaybe a new issue then?
04:47:43FromDiscord<Never Listen To Beef> When ever i write code avatar im always happy because of the phrase "A face only a mother could love" and that defends my terrible code!
04:49:06FromDiscord<Avatarfighter> @Never Listen To Beef that is what I think every time I write something 😛 I also wonder why my stuff is always defective tho 😛
04:49:16FromGitter<kayabaNerve> Oh. Never mind. Found a way
04:50:23FromGitter<kayabaNerve> nim-stew has a shim for it. No idea how it works, just that it does.
04:50:39FromDiscord<Never Listen To Beef> All my code works, just dont pick at it or it may explode
04:51:03*SweetSense joined #nim
04:53:27*SweetSense quit (Client Quit)
04:53:33*rockcavera quit (Remote host closed the connection)
05:10:22*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
05:13:48FromDiscord<KingDarBoja> Good night!
05:16:15FromDiscord<Avatarfighter> gn
05:16:21FromDiscord<Never Listen To Beef> Buh bye
05:17:48FromDiscord<Avatarfighter> what is the best way of converting a seq[char] to seq[uint8?]
05:18:25leorize@seq[char].toOpenArrayByte()
05:18:33leorizelemme try first
05:19:03FromDiscord<Avatarfighter> I've never seen "@" prefixed before something what does that mean?
05:19:11leorize!eval echo `@`(@['a', 'b', 'c'].toOpenArrayByte)
05:19:13NimBotCompile failed: /usercode/in.nim(1, 26) Error: type mismatch: got <seq[char]>
05:20:07leorize!eval echo `@`(@['a', 'b', 'c'].toOpenArrayByte(0, 3))
05:20:10NimBot/usercode/in.nim(1) in↵/playground/nim/lib/system/fatal.nim(49) sysFatal↵Error: unhandled exception: index out of bounds [IndexError]
05:20:19leorize!eval echo `@`(@['a', 'b', 'c'].toOpenArrayByte(0, 2))
05:20:19FromDiscord<Avatarfighter> 0,2 should work?
05:20:21NimBot@[97, 98, 99]
05:20:26FromDiscord<Avatarfighter> lit
05:20:49FromGitter<kayabaNerve> Cam I overload a generic so one has T, U, and one only has T? D
05:20:57leorizeso `@` is the array -> seq operator
05:21:10FromGitter<kayabaNerve> Doesn't look like it, just double checking because I can't supply a default type with T, U
05:21:28leorizeyou can overload like that
05:21:32leorizeit's done all the time with types
05:22:00leorizeAvatarfighter: .toOpenArray is our zero-copy slicing operator
05:22:04leorizepretty useful
05:22:16leorizethere's also a shorter way to do the same thing
05:22:27leorize`cast[seq[byte]](seq[char])`
05:22:31FromGitter<kayabaNerve> leorize: Nim says it's a redef
05:22:32leorizebut it's dangerous so :P
05:22:41leorizekayabaNerve: how are you doing it?
05:22:43FromDiscord<Avatarfighter> yeah i try to avoid casting when i can
05:23:02Prestigeleorize: does toOpenArray just point to that location in memory?
05:23:13FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eb0f8415cd4fe50a3ed9c5a]
05:23:26leorizePrestige: pretty much
05:23:45leorizean openArray is a pointer to the data + the length
05:23:47FromGitter<kayabaNerve> inline doesn't make a difference to be clear
05:23:52PrestigeHmm but I guess assigning a var to it would copy
05:24:06FromGitter<kayabaNerve> And sorry for causing two people to be asking for help at the same time; happy to come back in 10 :P
05:24:29FromDiscord<Avatarfighter> Prestige: thats actually what I'm trying to do and it complains about openArray being unassignable to vars lol
05:24:57PrestigeopenArray isnt really a type though
05:25:04leorizenot a first class yet
05:25:17leorizetoOpenArray is our stop gap solution
05:25:42FromDiscord<Avatarfighter> Stupid question once again(i've had many of these today), but byte = uint8 right?
05:25:49leorizeyea
05:25:59FromDiscord<Avatarfighter> so why does uint8 != byte lmao
05:26:04leorize?
05:26:18leorize!eval uint8 is byte
05:26:20NimBotCompile failed: ???(0, 0) Error: expression 'true' is of type 'bool' and has to be discarded
05:26:25leorize^ it's true
05:27:04FromDiscord<Avatarfighter> i parameterized my procs only parameter with "openarray[uint8]" but when i pass a "openarray[byte]" I'm getting an error that says...
05:27:14Prestige!eval uint8(1) == byte(1)
05:27:16NimBotCompile failed: /usercode/in.nim(1, 10) Error: expression 'true' is of type 'bool' and has to be discarded
05:27:22PrestigeHmm yeah
05:27:40FromDiscord<Avatarfighter> "type mismatch: got<openArray[byte],openArray[byte],openArray[byte]>" is the official error
05:27:46FromDiscord<Avatarfighter> I hope that was one line
05:27:59leorizeI need some sample code
05:28:03FromDiscord<Avatarfighter> uhh
05:28:04FromDiscord<Avatarfighter> its like
05:28:04*Hideki joined #nim
05:28:08FromDiscord<Avatarfighter> 800+ lines atm
05:28:16PrestigeIs that the whole error?
05:28:29FromDiscord<Avatarfighter> yeah that is the whole error from what I can tell
05:28:29*Hideki is now known as Guest66655
05:28:40FromDiscord<Avatarfighter> let me get a paste of a snippet of my code
05:28:42leorizejust copy the function prototypes
05:28:46leorizeand how you called it
05:28:49leorizeuse discard as impl
05:30:14FromDiscord<Avatarfighter> oh wait I got it
05:31:14FromDiscord<Avatarfighter> the error was not descriptive at all, its because my proc takes "var openarray[uint8]" but I'm feeding it "openarray[uint8]"
05:31:32leorize:P
05:31:57leorize4raq would disagree with you but I can agree that the compiler bites you a lot with the error messages
05:32:15FromDiscord<Avatarfighter> honestly I blame myself for not reading more carefully
05:32:39FromDiscord<Avatarfighter> I'm just used to python which outputs the entire stack and a story to figure out what went wrong lol
05:32:40leorizethe compiler could always put up some highlights so you can spot the errors easier
05:33:13leorizewe should learn from some of the more mature compilers out there, though that's pretty low on my list for now
05:33:49FromDiscord<Avatarfighter> I mean the compiler does provoke your critical thinking as to what might've gone wrong lmao
05:34:01*Guest66655 quit (Remote host closed the connection)
05:35:32FromDiscord<Avatarfighter> how do you reference something?
05:35:35FromDiscord<Avatarfighter> is it []?
05:35:41FromDiscord<Avatarfighter> dereference*
05:39:29leorizeyea
05:40:00FromDiscord<Avatarfighter> dang I think I need to make everything I just wrote referenced :L
05:44:13FromDiscord<Avatarfighter> nope I just need to use vars correctly haha
05:46:00FromDiscord<Avatarfighter> leorize: if you're still here, going back to "toOpenArrayByte" what would be the correct way of storing the openarray in a var?
05:46:11leorizeyou can't store an openarray :)
05:46:16leorizeturn it into a seq if you may
05:46:43leorizethe `@` operator can be used for that
05:46:51*waleee-cl quit (Quit: Connection closed for inactivity)
05:46:52FromDiscord<Avatarfighter> for once I was doing this correctly and concisely haha
05:50:53FromDiscord<Avatarfighter> Ok well I think I'm going to head out and finish this tomorrow and then hopefully I'll get a willing soul to do a codereview
05:51:03FromDiscord<Avatarfighter> thank you very much for the help as always leorize 🙂
05:51:05FromDiscord<Avatarfighter> gn everyone
05:57:27*chemist69 quit (Ping timeout: 240 seconds)
05:57:57*chemist69 joined #nim
06:07:11*solitudesf joined #nim
06:26:50*pbb quit (Ping timeout: 246 seconds)
06:34:54*pbb joined #nim
06:40:49*Hideki joined #nim
06:41:12*Hideki is now known as Guest33548
06:45:49*Guest33548 quit (Remote host closed the connection)
06:53:03*PMunch joined #nim
06:56:46*avatarfighter joined #nim
07:09:17*avatarfighter quit (Quit: Leaving)
07:09:46*narimiran quit (*.net *.split)
07:09:47*qbradley quit (*.net *.split)
07:09:47*njoseph quit (*.net *.split)
07:09:55*Condor quit (*.net *.split)
07:10:02*zacharyc1rter quit (Ping timeout: 260 seconds)
07:11:14*zacharycarter quit (Ping timeout: 272 seconds)
07:15:57*narimiran joined #nim
07:15:57*qbradley joined #nim
07:15:57*Condor joined #nim
07:15:57*njoseph joined #nim
07:19:05FromGitter<sealmove> Do we have in-place sort?
07:20:01FromGitter<Vindaar> sure: https://nim-lang.github.io/Nim/algorithm.html#sort%2CopenArray%5BT%5D
07:20:06*Hideki joined #nim
07:20:29*Hideki is now known as Guest99123
07:21:32FromGitter<sealmove> Rephrasing: do we have `sortByIt` similarly to `sortedByIt`?
07:22:00FromGitter<sealmove> Instead of passing an anonymous function to `sort`...
07:22:39FromGitter<Vindaar> ah, no I don't think so
07:31:58*wowi42 quit (Excess Flood)
07:32:38*wowi42 joined #nim
07:35:10FromDiscord<Benumbed> I don't know who mantains c2-nim, but the link on the github page to the docs (http://nim-lang.org/docs/c2nim.html) is broken, and 404s
07:39:02*Guest99123 quit (Remote host closed the connection)
07:40:45*zacharyc1rter joined #nim
07:40:45*zacharycarter joined #nim
07:46:39*Vladar joined #nim
07:49:53AraqBenumbed: that is the wrong URL, where did you get it from?
07:50:30*zacharyc1rter quit (Ping timeout: 272 seconds)
07:50:30*zacharycarter quit (Ping timeout: 272 seconds)
07:53:32FromDiscord<Benumbed> Github page: https://github.com/nim-lang/c2nim
07:53:51FromDiscord<Benumbed> Project description up at the top
08:01:52Araqthanks, fixed
08:02:33FromDiscord<Benumbed> :thumbsup:
08:03:51FromDiscord<Benumbed> Has anyone tried the `importcpp` pragma stuff? Up until this point I've only used C, but I'm messing around with C++ dynamic libraries and it's not going so well for me :/
08:04:44leorizeit's not an easy pragma to use
08:04:53FromDiscord<Benumbed> so I've discovered lol
08:06:38PMunchI used it a bit for Arduino stuff, it's not that hard to use
08:07:25FromGitter<kayabaNerve> PMunch: There you are.
08:07:31FromGitter<kayabaNerve> I need to talk to you about something.
08:07:40PMunchOh, sounds ominous
08:07:52FromGitter<kayabaNerve> Yeah, shall I hop on IRC or do you want to PM me on Gitter?
08:08:09PMunchAnd I'm almost always here :P But I guess you don't see my IRC status on Gitter
08:08:22FromGitter<kayabaNerve> I reached out earlier; leorize said you weren't here :P
08:08:28FromDiscord<Benumbed> PMunch: Was your Arduino stuff open (aka is there asomething I can look at?)
08:08:29PMunchWhatever is easiest
08:08:53PMunchBenumbed, ah unfortunately not. But it's just not open because the code quality isn't quite there
08:09:04FromGitter<kayabaNerve> I would prefer you get on Gitter, personally. Been a while since I used IRC :P
08:09:14FromDiscord<Benumbed> damn, k
08:10:19PMunchkayabaNerve, just a sec
08:11:09FromGitter<kayabaNerve> All good
08:17:40FromDiscord<mratsim> @Araq, after thinking more on how to use both asyncdispatch and Weave, hear you go: https://github.com/mratsim/weave/issues/123
08:17:43disbotHandling blocking tasks and long-running tasks ; snippet at 12https://play.nim-lang.org/#ix=2kQT
08:17:50FromDiscord<mratsim> here*
08:22:19*fredrikhr joined #nim
08:26:08*zacharyc1rter joined #nim
08:26:08*zacharycarter joined #nim
08:27:14AraqBenumbed: we used it in production for the Urho3D wrapper fwiw
08:27:30*anti[m] joined #nim
08:28:54Araqmratsim: will read it later
08:30:07Araqso ... if (and that's a big if) my idea works out the potential speedup is from 4.3s down to 0.5s for bootstrapping
08:30:49*zacharyc1rter quit (Ping timeout: 264 seconds)
08:30:49*zacharycarter quit (Ping timeout: 264 seconds)
08:34:18*stefan[m]2 joined #nim
08:34:42leorizehttps://play.nim-lang.org/#ix=2kQW
08:34:44leorizeI think I did it
08:34:51leorizethe ultimate permutable macro
08:35:01leorizegenerates only meaningful permutations
08:35:08*stefan[m]2 left #nim ("User left")
08:35:29leorizeand completely support any weird kind of proc you can throw at it
08:35:35leorizevoltist: ^
08:35:46leorizedon't use it though, even I'm scared of it
08:35:51leorizenow I gotta sleep :P
08:39:05FromGitter<Hammer2900> hey, how about dependency text file like in python requirements.txt ? any advice to read about this ?
08:40:03FromDiscord<Benumbed> Hammer2900: If you're using nimble as your pkg manager, it provides a 'requires' directive you can use in your <project name>.nimble file
08:40:27*pbb quit (Ping timeout: 260 seconds)
08:40:53FromGitter<alehander92> Araq huh
08:40:57FromGitter<alehander92> whats your idea
08:42:03*pbb joined #nim
08:42:12FromGitter<Hammer2900> > *<FromDiscord>* <Benumbed> Hammer2900: If you're using nimble as your pkg manager, it provides a 'requires' directive you can use in your <project name>.nimble file ⏎ ⏎ ooo, ok thank you, now i check this information )) beater if this information store in first doc pages
08:42:37FromGitter<sealmove> Are 32bit integers more effecient than 16bit?
08:42:46FromGitter<sealmove> (speed-wise)
08:43:04FromDiscord<Benumbed> That would depend on the hardware you're running on
08:44:00FromGitter<sealmove> I have a type with 4+8 bits, how to align it?
08:44:10FromDiscord<Never Listen To Beef> Vertically
08:44:17FromGitter<sealmove> :D
08:44:31FromDiscord<Benumbed> That depends on the surrounding data IIRC
08:44:56FromGitter<sealmove> Well, I use only this type repetedly in an array
08:45:10PMunch@kayabaNerve, you wanted to talk?
08:46:04FromGitter<sealmove> So I am considering either padding the first field (4+8 -> 8+8) or padding both to make 32bit integer (4+8 -> 16+16). Which one do you recommend?
08:46:45PMunchIf you don't have any other data and memory isn't an issue I'd say go 32bit
08:46:51PMunchShould be faster on "normal" CPUs
08:47:19FromDiscord<Benumbed> Well my padding stuff is rusty, but padding to the highest bitcount within the structure is 'recommended' but there's some other alignment gotchas that for the life of me I can't bring to mind
08:47:24PMunch(I believe 32 bit reading is still faster than 16 bit reading on 64 bit machines, correct me if I'm wrong..)
08:47:35FromGitter<sealmove> Thanks! I though so, but wanted a confirmation from an expert :)
08:47:47FromDiscord<Benumbed> I think you're right PMunch, but I'm too tired to remember why 😄
08:49:14PMunchThe CPU instructions to read/write bytes are still the same for 32bit, it has been extended for 64bit. So it's just a matter of using the 32bit instructions instead. There are 16bit instructions as well, but I'm not entirely sure how they perform
08:49:17FromDiscord<Never Listen To Beef> Being a dumb dumb i would've thought that since most machines cache line is 64 bit having 4 being on 1 line instead of 2 would've been faster. But i know nothing about actual cpus and just aimlessly guess
08:49:28*Trustable joined #nim
08:49:30PMunchDisclaimer, been a looong while since I've done this kind of stuff :P
08:49:48FromDiscord<Benumbed> There's a good article on this but I can't find it for the life of me
08:49:49FromGitter<sealmove> Oh makes sense, I see
08:50:32FromDiscord<Never Listen To Beef> i guess i meant byte size and larger multiples 😄
08:50:52PMunchIf it's a 16bit one then a write could potentially be "read 32 bit, copy high/low 16 bits, mask out the area we want to write to, mask in our data, write back 32 bit"
08:51:28PMunchI guess the real answer is "try both, benchmark"
08:51:42PMunchIf speed is really important
08:54:16FromGitter<sealmove> It's a decompression routine so quite important...
08:57:11PMunchThen I guess it's benchmarking time!
08:58:24PMunchI mean all of this could be made null and void if your application hits the cache a certain way
08:58:47PMunchModern CPUs are getting so complex it's not always trivial to give "always do X" advice
09:00:09*dddddd joined #nim
09:02:41FromGitter<sealmove> I always try to avoid benchmark. It's a lot of work x_x
09:03:21*zacharyc1rter joined #nim
09:03:21*zacharycarter joined #nim
09:06:41*abm joined #nim
09:07:51*zacharycarter quit (Ping timeout: 258 seconds)
09:08:14*zacharyc1rter quit (Ping timeout: 258 seconds)
09:09:29*liblq-dev joined #nim
09:12:51*kayabaNerve joined #nim
09:17:30*ryan_ joined #nim
09:20:07*tanger_moon quit (Ping timeout: 260 seconds)
09:20:26Araqalehander92: it's an old idea from Zahary, re-interpreted for IC
09:20:43Araqbut it's too early to talk about it :P
09:22:16liblq-devshashlick: why does nimterop not generate .importc pragmas for bound objects?
09:22:30liblq-devit breaks the ABI and causes segfaults with soundio
09:23:04FromGitter<alehander92> Araq i am *just* reading another interesting IC idea
09:23:36*Romanson quit (Quit: Connection closed for inactivity)
09:23:43FromGitter<alehander92> but it seems a bit radical
09:23:46Araqlink?
09:23:49FromGitter<alehander92> https://github.com/ziglang/zig/pull/5158#issue-408356035
09:23:52disbotbeginnings of (non-LLVM) self-hosted machine code generation and linking ; snippet at 12https://play.nim-lang.org/#ix=2kR9
09:23:59FromDiscord<mratsim> @PMunch, @Never Listen To Beef , 16 bytes instructions are the worse on 64-bit CPU: They take more space to encode, They take somewhat more time due to more expensive zero-extension
09:24:03liblq-devdoes Nim reorder object fields somehow?
09:24:13FromGitter<alehander92> basically it requires writing a special incremental linker etc from zero
09:24:32PMunch@mratsim, so my memory didn't fail me this time, wohoo :)
09:25:59FromDiscord<mratsim> but that is valid only if everything you need is CPU-bound
09:26:16FromDiscord<mratsim> usually workload are either bottlenecked by IO or memory
09:26:34FromDiscord<mratsim> if bottlenecked by memory, as @Never Listen To Beef said, it's more important to pack more data in a single cache line
09:28:20Araqalehander92: ok, well "figure out how comptime code will work" means it's rather unfinished ;-)
09:29:08FromDiscord<Yardanico> Well Zig itself has much less "advanced" stuff
09:31:10*lritter joined #nim
09:34:45dom96Yardanico, keep in mind that Zig is much much younger
09:36:39FromDiscord<Yardanico> Well yeah, but also the ecosystem for stuff like LLVM is much better than when Nim was started ;)
09:38:18FromGitter<alehander92> Araq oh i agree
09:38:21*idf joined #nim
09:38:23FromGitter<alehander92> i just was wondering for my own
09:38:33FromGitter<alehander92> side project idea and IC
09:38:48FromGitter<alehander92> and comparing stuff i saw randomly
09:40:21FromGitter<alehander92> but aren't those a bit separated? e.g. caching in a smart way compile time code is one problem, optimizing the backend work for regenerating the final binary another one
09:41:16FromGitter<eagledot> Is it possible to get different code behaviour based on the garbarge collector used??
09:41:40Araqyes
09:42:12Araqthat's usually kinda the point of using a different algorithm, to get different runtime behaviour ;-)
09:42:32FromGitter<alehander92> probably the linking/binary thing isn't such a bottleneck tho, after all redoing 1 of 50 objects is a big win anyway
09:42:51Araqbut it also affects edge cases wrt GC_ref etc
09:43:12FromGitter<eagledot> I have trying to make this code work but it is getting compiled properly ..but it works only when "arc" is used not with default garbage collector... ⏎ https://play.nim-lang.org/#ix=2kRf
09:44:02Araqso use arc, it's the future
09:44:47FromGitter<eagledot> I have been wanting to ask that using different garbage collector should not influence the result of programmes?
09:45:30FromGitter<eagledot> shouldn't the programme's results be same independent of GC used?
09:46:07Araqideally yes, but your program is full of low level stuff, run it with -d:useMalloc --gc:arc under valgrind already
09:47:44*Hideki joined #nim
09:47:51FromGitter<eagledot> So nim doesnot take care of this if i am writing code in nim??If this is so when should i change gc. ⏎ Code works prefectly everytime when i use no GC...so i think logic is correct!!
09:48:08*Hideki is now known as Guest5252
09:49:18Yardanicoif code works "perfectly" when you don't use a gc it doesn't mean that the code is correct :P
09:49:30Yardanicowhen you use "gc:none" all GC'd memory is simply being leaked
09:50:06Araqyou might as well claim "my C++ code works perfect in debug mode"
09:50:13Yardanicoyou should really try using nim c -d:useMalloc --gc:arc --debugger:native file.nim
09:50:21Yardanicovalgrind --leak-check=full ./file
09:50:31Yardanicodebugger:native for source code lines :P
09:50:45Araq"and it fails in release, so the C++ compiler isn't working!"
09:51:13FromGitter<eagledot> I understand that GC main function is release memory automatically. But why some code works with one GC and not with other.
09:52:53FromGitter<alehander92> it's a good question in general
09:53:21FromGitter<alehander92> a lot of code never really accounts for what gc mode is used
09:53:43Araqas I said, if you have bugs the program might appear to work under various conditions for a long time
09:54:15FromGitter<eagledot> low level C code i am calling does not allocate in memory..i do it in nim.But it is behaving weirdly even if add an extra line `echo(variable)` it start working.
09:54:40Araqdoes the C code run it in a different thread?
09:54:51FromGitter<eagledot> No
09:55:03Yardanicohmm NiGui seems to be crashing with arc (uses methods for GUI controls and stuff), wonder why, crashes even with sink inference off
09:55:15FromGitter<eagledot> I CAN post even the C code..if u want.
09:55:25FromGitter<eagledot> nim code is here. ⏎ https://play.nim-lang.org/#ix=2kRf
09:56:07FromGitter<eagledot> Can u tell me if i am doing something gravely wrong??I have been upto this for 2 days.
09:56:36*Guest5252 quit (Remote host closed the connection)
09:56:41Yardanicowell we can't try without the webrtcvad_nim
09:57:16*ryan_ quit (Ping timeout: 246 seconds)
09:57:47*Tlongir joined #nim
09:58:12FromGitter<eagledot> https://gitlab.com/eagledot/webrtcvad-nim/
09:59:00FromGitter<eagledot> i was trying to writ nim-bindings for google's opensource webrtcvad (voice activity detector).
10:00:16liblq-devshashlick: I reported this as a bug in nimterop: https://github.com/nimterop/nimterop/issues/202
10:00:19disbotABI break due to the lack of .importc in struct definitions ; snippet at 12https://play.nim-lang.org/#ix=2kRm
10:01:13Yardanico@eagledot it works with the default GC for me just as fine
10:02:18Yardanico"total heap usage: 3 allocs, 3 frees, 5,608 bytes allocated" with default GC and no -d:useMalloc
10:02:26Yardanico"All heap blocks were freed -- no leaks are possible"
10:04:13FromGitter<eagledot> you tested with different wave files??
10:04:26Yardanicotested with 60seconds one, with 10 seconds one, with 3 seconds one
10:04:30Yardanicoalthough the program seems to SIGSEGV with valgrind if compiled with arc and -d:useMalloc
10:04:36Yardanicodoesn't sigsegv without valgrind at all though
10:04:51Yardanicoand yes valgrind itself crashed
10:04:53Yardaniconot the program
10:04:54YardanicoXD
10:05:17Yardanico"valgrind: the 'impossible' happened: Killed by fatal signal"
10:05:46FromGitter<eagledot> For me i used that nim code with corresponding python code ..even though the nim code works but results donot match with the equivalent python code. ⏎ https://github.com/wiseman/py-webrtcvad/blob/master/example.py
10:06:34FromGitter<eagledot> For me by now it has been a hit and miss.
10:09:42Yardanicooh also found a simple compiler crash with kinda invalid code
10:11:16FromGitter<eagledot> So is it a problem with my code or some nim internal bug ... just confirming..i am a newbie??
10:11:33YardanicoI honestly don't really know, I'm doing a different thing right now, so sorry :)
10:12:37*krux02 joined #nim
10:13:40FromGitter<eagledot> OK. Thanks.
10:14:05FromGitter<eagledot> If you have any advice to avoid such cases ..please let me know.
10:15:18FromGitter<sealmove> Is `newSeq[int](512)` slower than `array[512, int]`?
10:17:06krux02sealmove: can't say completely out of context.
10:17:35krux02array is always stack allocated, where newSeq is always heap allocated.
10:18:29FromGitter<sealmove> Hmm, I always have 512 elements but then I want to drop some (with the `keepItIf` proc)
10:18:45krux02yea that doesn't work with array.
10:18:55FromGitter<sealmove> Also I want to order them (either before or after dropping some elements)
10:19:07krux02sorting is no problem with arrays.
10:19:31FromGitter<sealmove> Should I first make an array, use `sort` and then allocate a seq and use `keepItIf` on it? Or make a seq from the beginning and not use array?
10:19:51krux02dropping isn't possible, but you can reorder then in a way that all "dropped" items are at the end and then you only iterate until you reach those "dropped" elements.
10:20:00krux02no
10:20:33krux02I can't even tell you if "keepItIf" is the right thing to do.
10:20:42narimiranjust use seq
10:21:01FromGitter<Bennyelg> Hi, Anyway I can echo all the procs names inside customType ?
10:21:17krux02what procs names?
10:21:19FromGitter<sealmove> Oh actually sort does take care of it as you suggested, I don't really need to drop anything!
10:21:38FromGitter<Bennyelg> yes procs names
10:21:47FromGitter<Bennyelg> which assosicated to him
10:21:50FromGitter<Bennyelg> it*
10:22:23krux02I don't think that there is an api to get all procs that take "CustomType" as first argument.
10:22:46krux02But it would certainly be valuable.
10:23:05*tane joined #nim
10:23:11FromGitter<Bennyelg> yea well, need to write macro for it right ?
10:23:39krux02I don't think there is a macro api so that you could implement it.
10:24:15krux02it is only possible the other way around. "give me all the overloads with the name "myCustomProc"
10:24:17FromDiscord<Recruit_main707> getting all your code into the macro and checking for all procs and their args maybe?
10:24:56krux02Recruit_main707: That could work, but solution like that can seriously hurt compile time.
10:26:36Yardanicohow do I output an address of a procedure with --gc:arc ?
10:30:59*NimBot joined #nim
10:31:18Yardanicoyou wouldn't believe it but echo cast[array[2, int]](control.fOnClick)[0] worked because in C it was defined like "static NIM_CONST tyProc__Jv1U9bAA9aOQah3FXJraBXHg TM__v6sMqsqcQidqukQ1qgYXEQ_58 = {NIM_NIL,NIM_NIL};"
10:31:40Yardanicoi just need this for debugging why nigui doesn't work with arc
10:31:56Yardanicoseems like that arc doesn't like when you try to access nil procs in an object
10:32:18Yardaniconigui has a lot of stuff like "let callback = checkbox.onToggle" "if callback != nil: stuff"
10:32:33*CcxCZ joined #nim
10:32:36FromGitter<alehander92> krux02
10:32:50*so joined #nim
10:32:56FromGitter<alehander92> i need to fix printing case objects in gdb too
10:32:56krux02yes?
10:33:05FromGitter<alehander92> can you remember what blocked you
10:33:13FromGitter<alehander92> afaik this code was disabled in nim-gdb
10:33:46krux02well, gdb needs some form of runtime type information.
10:33:50*Hideki joined #nim
10:34:14*Hideki is now known as Guest73501
10:34:22*junland joined #nim
10:34:24FromGitter<alehander92> yeah, but does the nti contain enough info for case objects?
10:34:35krux02if things are mapped to something that exists in the backend directly, then the debug information that is generated by the C/C++ compiler is enough.
10:34:48FromGitter<alehander92> iirc one mostly needs to know which branch corresponds to which enum range
10:35:09krux02but if the construct is crafted then you need to generate other forms of runtime type information.
10:35:30FromGitter<alehander92> ok
10:35:37krux02and last time I based something on NDI it was broken, because NDI is a singking ship.
10:35:41krux02sinking ship
10:35:47FromGitter<alehander92> yeah, that seems to be bad
10:36:13FromGitter<Bennyelg> Newbie question: When I should also export my module ?
10:36:42krux02Bennyelg: when you feel like doing so.
10:36:55FromGitter<alehander92> krux02 it would be good to standartize this
10:36:57krux02no honestly I don't know what you are talking about.
10:37:10krux02what do you want to export.
10:37:41FromGitter<alehander92> i also used some of that info for making better async stepping actions
10:38:32FromGitter<Bennyelg> when I do export it will pass the import along to the other module without explicitly import it again right?
10:39:14FromGitter<alehander92> and are the ndi and nti info-s in some kind of sync?
10:39:16*xcm quit (Ping timeout: 246 seconds)
10:39:20*dadada joined #nim
10:39:26dadadahey
10:39:28krux02Bennyelg: if you export a module all symbol of that module will be avaiable through another module.
10:39:46FromGitter<Bennyelg> exactly thanks
10:39:53krux02if you have a.foo and in b you export a you can access a.foo as b.foo
10:40:42dadadaI want multiline strings that includes triple quotes strings themselves... so triple quotes bite triple quotes
10:40:48dadadawhat can I do about it?
10:41:02dadadas/includes/include
10:41:13krux02dadada: nothing
10:41:40Yardanicodadada: have text files in your project and read them at compiletime :P
10:41:40krux02you can use something else that is not """ and then replace it with tripple quotes as a post process.
10:43:36*natrys joined #nim
10:57:29*Guest73501 quit (Ping timeout: 258 seconds)
11:10:00*dadada quit (Ping timeout: 272 seconds)
11:11:17*dadada joined #nim
11:11:40*dadada is now known as Guest23312
11:34:20*narimiran quit (Ping timeout: 256 seconds)
11:36:28*Romanson joined #nim
11:54:12FromGitter<alehander92> ok
11:54:31FromGitter<alehander92> how can a void async procedur yield nil
11:55:22FromDiscord<Rika> it shouldnt
12:00:10*rockcavera joined #nim
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:43*supakeen joined #nim
12:08:14*Hideki joined #nim
12:08:38*Hideki is now known as Guest23088
12:09:32FromGitter<nothratal> just out of curiosity, can someone help me transform this here: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eb1577b7a24ff01b001c9d6]
12:10:22FromGitter<Yardanico> pairs is an iterator, so you can't use UFCS for it
12:10:41FromGitter<Yardanico> instead do it like toSeq(tParam.pairs).stuff
12:10:47FromDiscord<Recruit_main707> you are also in gitter?
12:11:10Yardanicoi am
12:11:10FromDiscord<Yardanico> every
12:11:12FromGitter<Yardanico> where
12:11:42FromDiscord<Recruit_main707> i think you got a bit confused
12:12:14FromGitter<nothratal> ahh! UCFS again :P ⏎ I already tried: ⏎ pairs(tParam).toSeq.map(proc(x,y:string):string= x & "=" & y).join("&") ⏎ but not toSeq(...) [https://gitter.im/nim-lang/Nim?at=5eb1581ed898fe7a37685713]
12:12:22*Guest23088 quit (Ping timeout: 246 seconds)
12:12:47FromGitter<Yardanico> https://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax
12:13:12FromGitter<Yardanico> there's an example with an iterator here, and why it's not possible
12:15:03FromGitter<Yardanico> you can do something like proc toKv(data: Table[string, string]): string = toSeq(data.pairs).mapIt(it[0] & "=" & it[1]).join("&")
12:15:13FromGitter<Yardanico> but I don't like this kinda-functional style ;)
12:15:58FromDiscord<Rika> so this can be another reason why nim doesnt default to fully qualifying functions from imports
12:16:06FromGitter<Yardanico> yep
12:16:10FromGitter<Yardanico> there's also https://nim-lang.org/docs/uri.html#encodeQuery%2CopenArray%5B%5D
12:16:30FromGitter<Yardanico> if you don't actually need tables you can just use it as encodeQuery({"a": "b", "c": "d"})
12:16:55FromGitter<Yardanico> {} syntax is sugar openArray[tuple[val1: keytype, val2: valtype]] in Nim
12:16:58FromGitter<Yardanico> for*
12:17:28FromGitter<Yardanico> also encodeQuery automatically escapes strings so it'll be a valid part of URL
12:18:00YardanicoA cool thing is https://github.com/zero-functional/zero-functional by the way
12:18:07Yardanico"A library providing (almost) zero-cost chaining for functional abstractions in Nim."
12:18:52FromDiscord<Rika> is it better than pure sequtils
12:19:05*monokrom joined #nim
12:19:09FromDiscord<Rika> maybe itll become yet-another-dependency of circa xd
12:19:40Yardanicowell it should be more performant since it doesn't create temporary sequences
12:19:52*natrys quit (Quit: natrys)
12:19:56Yardanicoit's a really cool example of what can be done with nim macros
12:20:25Yardanicohttps://github.com/zero-functional/zero-functional/tree/master/benchmarks XDDD
12:22:12FromGitter<nothratal> @Yardanico , thx the encodeQuery is new to me. It does the same thing.
12:22:24Yardanicoyes, just don't forget that you don't need tables for the {} syntax
12:23:08Yardanico[("hello", "world"), ("yes", "no")] is the same as {"hello": "world", "yes": "no"}
12:23:35FromDiscord<Rika> {} even saves order if thats important
12:23:43Yardanicouhh wat
12:24:00Yardanicoit's the same for both [] and {} since {} is sugar over []
12:24:12Yardanicoand arrays/seqs are ordered
12:24:19Yardanicotables are not unless you use OrderedTable
12:24:56*Hideki joined #nim
12:25:20*Hideki is now known as Guest51372
12:26:11FromDiscord<Rika> yeah i know
12:26:13FromDiscord<Rika> what do you mean lmao
12:26:20Yardanico?
12:26:23FromDiscord<Rika> i was talking about {} and tables
12:26:29Yardanicoyou didn't say so
12:26:32FromDiscord<Rika> not your last message
12:26:34Yardanico"{} even saves order if thats important"
12:26:41FromDiscord<Rika> if you didnt send that message then it'd make sense xd
12:26:46FromGitter<alehander92> it was a fun benchmark to do but its old and probably was very inexact
12:27:03FromGitter<alehander92> overally we need first-class iterators, zero-functional is a huge hack
12:27:17Yardanicobut will they be fast? :P
12:27:30FromGitter<alehander92> with amazing work on writing custom operations by @micheal72
12:27:36FromGitter<alehander92> but still the approach is hacky
12:28:11FromGitter<alehander92> well it seems rust was basically the same speed in those very strange benchmarks so why not
12:32:53Yardanicook time to continue debugging nigui with arc (it sigsegvs because it can't access the control object for some reason)
12:33:22Yardanicothe problem is that it's not easy to create a small example when the lib is a lot of lines, I've managed to strip it to 2.5k loc single file but that's still a lot
12:48:33Yardanicook down to 1.3k loc
12:50:02*zacharyc1rter joined #nim
12:50:02*zacharycarter joined #nim
12:50:57FromGitter<alehander92> how do you debug it
12:51:04Yardanicorun with/without arc :DD
12:51:21Yardanicobasically nigui does some casts and uses methods so maybe there's some bug here
12:51:25Yardanicoor arc behaves differently
12:51:32YardanicoI also checked with --sinkInference:off and it doesn't help
12:52:21*thomasross joined #nim
12:56:11Yardanicooh so apparently the method event handler gets a null pointer of control
12:56:12Yardaniconice
12:56:41Yardanicowithout arc it has a proper pointer
12:56:46Yardaniconot null one :P
12:58:25YardanicoI mean gdb is pretty nice even without nim-gdb
12:58:46Yardanicohttps://i.imgur.com/DTC11Gv.png
12:59:39Yardanicoso apparently in that proc after evt.control = control control is zeroed out lol
13:03:52FromDiscord<clyybber> so its sinked
13:04:10Yardanicobut it also doesn't work with --sinkInference:off
13:04:13Yardanicoso I was a bit confused :P
13:04:23FromDiscord<clyybber> yeah, its still incorrectly sinked. I think
13:04:34Yardanicoah ok, I'll try to create a shorte example now
13:04:47FromDiscord<clyybber> can you look in the C code and see what that evt.control = control translates to?
13:05:30Yardanicoto this if I correctly understand https://gist.github.com/Yardanico/9476cf354c39a7d04a95307ccf251a7b
13:05:55Yardanicothe whole c function https://gist.github.com/Yardanico/aab2a8e0b42ce76601bfad71d6e9dd89
13:05:57Yardanico-d:danger --gc:arc
13:06:21Yardanicoand nim source for the proc https://gist.github.com/Yardanico/529540799c9455907852abf0e134006f
13:06:23liblq-dev@Bennyelg I know I'm late, but if it's your API you may be able to create a custom pragma that adds the procs to some `var procs {.compileTime.}: seq[NimNode]`
13:07:36FromDiscord<clyybber> Yardanico: Looks like somehow we sink even though its used later.
13:07:58Yardanicowell yeah I'm still minimizing it, right now it's 1.2k loc and requires gtk :/
13:08:42dom96In case anyone wants to bike shed: https://github.com/TechEmpower/FrameworkBenchmarks/issues/5680
13:08:43disbotNew classification for implementation types
13:11:18Yardanico@clyybber I think I managed to repro it :)
13:12:53PMunchdom96, did you ever try to wrap picohttp in Nim and see how that compares to the V wrapper?
13:13:11dom96nope
13:14:07FromDiscord<Rika> are we calling it pico.nim? lmao
13:15:13PMunchI was just curious how much overhead V has when wrapping stuff
13:17:11Yardanicophew, this one took a few hours to reproduce https://github.com/nim-lang/Nim/issues/14233
13:17:15disbot[ARC] Incorrect sinking of an argument? ; snippet at 12https://play.nim-lang.org/#ix=2kSu
13:17:51FromDiscord<Yardanico> @clyybber ^
13:18:35FromDiscord<clyybber> nice, thanks!!
13:24:16FromDiscord<clyybber> yeah, the dfa is not detecting the read/use of control in the last line correctly
13:24:36Yardanicoyeah I also posted a bit smaller example
13:25:01Yardanicoyou guys can join arc bug hunting too, it's fun :P
13:25:14Yardanicohttps://i.imgur.com/fYvgymp.png
13:26:16FromDiscord<clyybber> actually, nevermind. The dfa has the last use of control..
13:26:34*narimiran joined #nim
13:31:18FromDiscord<clyybber> huh. this is a wierd one..
13:31:25FromDiscord<clyybber> I think its to do with type conversions
13:31:51Yardanicowell my second repro doesn't really do type conversions and doesn't use pointers
13:31:55Yardanicoor you mean type conversions in C?
13:32:14FromDiscord<clyybber> hmm nope, I'm probably wrong
13:32:34Yardanicobtw if I remove the case statement it works
13:32:39Yardanicoah wait
13:32:42FromDiscord<clyybber> oh
13:32:50Yardanicoyes
13:32:55Yardanicoit works if I remove the case statement
13:33:54FromDiscord<clyybber> hmm, somehow isLastRead can't deal with these forks then..
13:34:15Yardanicoit also works if I replace "else: return" with "else: discard" :P
13:35:11FromDiscord<clyybber> thanks, thats actually really helpful
13:35:21FromDiscord<clyybber> so its the goto generated by the return
13:35:31FromDiscord<clyybber> but the fork happening before should reach L22..
13:37:14Yardanicowell it's nice that 1.4 (or next 1.2 release?) will have quite a lot of arc bugfixes :P
13:37:20FromDiscord<clyybber> yeah 😄
13:37:24disrupteki smell a horse.
13:37:46Yardanicooh hi disruptek
13:37:50Yardanicoare you motivated today?
13:37:51FromDiscord<clyybber> hyo
13:37:55FromDiscord<Rika> maybe you smell like a horse
13:38:06disruptekeh i haven't had a shower this month.
13:38:12disruptekwait, it's still april, right?
13:38:20*Vladar quit (Quit: Leaving)
13:38:20Yardanicoye
13:38:22disruptekoh shit.
13:38:35FromDiscord<Rika> time traveler
13:38:47Yardanicontw NiGui seems to work fine with arc if I replace two instances of "else: return" with "else: discard"
13:39:24Yardanicohmm, had another crash, but we'll deal with it later I guess :D
13:39:35FromDiscord<clyybber> yeah ::D
13:39:36disruptekyardinco: the important list holds packages that /don't/ work.
13:40:02Yardanico?
13:40:22disruptekwe need a culture of assuming that things work.
13:42:16*chemist69 quit (Ping timeout: 244 seconds)
13:42:18disruptek#13912
13:42:20disbothttps://github.com/nim-lang/Nim/issues/13912 -- 3Regression: hintConf exclusion no longer prevents hints ; snippet at 12https://play.nim-lang.org/#ix=2kSE
13:43:15*chemist69 joined #nim
13:48:09FromDiscord<Yardanico> @clyybber can you mark this one as ARC just for the sake of reference? 😛 https://github.com/nim-lang/Nim/issues/14219 (I guess I should ask 4raq to make me a collaborator in the repo again so I could label issues lol)
13:48:10disbotARC codegen bug with inline iterators ; snippet at 12https://play.nim-lang.org/#ix=2kLa
13:48:29FromDiscord<clyybber> done 🙂
13:50:52*ftsf_ joined #nim
13:53:53*ftsf quit (Ping timeout: 256 seconds)
13:55:50FromGitter<alehander92> oh well i found a waitFor in my async function
13:55:57Yardanicoxdd
13:56:01FromGitter<alehander92> but i wouldnt have found it anyway probably its indirect
13:57:59disruptekagenda: compiler or game programming?
13:58:00FromDiscord<Rika> `rg waitFor` ?
13:58:20shashlick@liblq-dev - you around?
13:58:30liblq-devye
13:58:51shashlicki replied to the issue you opened
13:58:55shashlickcan you test with `-H`?
13:59:22shashlickalso, can you post the type which is getting messed up? I am wondering if the type generated is wrong or if it is wholly importc related
13:59:36FromGitter<alehander92> disruptek compiler ?
13:59:57disruptekone vote for compiler. 😁
14:00:30FromDiscord<clyybber> count me for compiler too
14:00:34disruptekdamnit.
14:00:44FromDiscord<clyybber> you cannot escape
14:01:42FromGitter<Willyboar> if i had to choose one i want to watch web but from those 2 of course game programming
14:01:55disruptekYES
14:02:09disruptekyou are my man.
14:02:46zacharyc1rterweb dev bleh
14:02:51zacharyc1rtergame programming all the way
14:02:56*fredrikhr joined #nim
14:03:02zacharyc1rteralthough you're not really programming games are you disruptek?
14:03:06zacharyc1rteryou sneaky sneaky bastard
14:03:07FromGitter<Willyboar> alehanders dont count because of the question mark
14:03:09liblq-devshashlick: http://ix.io/2kSM/nim, the C type is defined here: https://github.com/andrewrk/libsoundio/blob/master/soundio/soundio.h#L497
14:03:22liblq-devI checked and the order seems to be correct on the Nim side
14:03:32*abm quit (Ping timeout: 272 seconds)
14:03:36disrupteki don't program games anymore.
14:03:42disrupteki program to make games unfun.
14:03:51zacharyc1rteryou're good at sucking the fun out of things
14:04:06disrupteki'm a champion sucker, that's for sure.
14:04:11zacharyc1rter:D
14:04:31FromDiscord<clyybber> Araq: ping
14:04:46liblq-devshashlick: just tested with -H, seems to work fine
14:04:47FromGitter<Willyboar> zachary why not web dev
14:04:49FromGitter<Willyboar> ?
14:04:55zacharyc1rterno web dev is the worst
14:05:03zacharyc1rterlet's light the web on fire and never look back at it again
14:05:17liblq-devmy man
14:05:17zacharyc1rteractually it's already on fire so let's just add gasoline
14:05:27liblq-devlol
14:05:48shashlickliblq-dev - is SoundIoFormat defined as a `distinct cint`
14:05:57liblq-devit's a defineEnum()
14:06:28liblq-devnot sure what the underlying type is
14:07:50*disruptek is now known as ad
14:07:58shashlickcan you check types.nim - should be distinct int
14:07:58*ad is now known as asd
14:08:39*Guest51372 quit (Remote host closed the connection)
14:09:08*asd is now known as disruptek
14:09:32FromGitter<alehander92> disruptek just do whatever you want :D
14:09:42zacharyc1rterhe's going to anyway, don't worry
14:09:44FromGitter<alehander92> democracy is optional!
14:10:17FromDiscord<Yardanico> @clyybber so there's a guy in telegram doing bindings for some C library, and basically he encountered a kind of memory leak with arc (or maybe it's just how it should work)
14:10:33FromDiscord<clyybber> I'm in the group I'll look there
14:10:36FromDiscord<Yardanico> ah ok
14:10:59zacharyc1rterwe have wayyyyy too many communication channels
14:11:04zacharyc1rterlet's just all use IRC k?
14:11:28liblq-devshashlick: yup, it's distinct int
14:11:41zacharyc1rterit's like now we have a manual bridge to telegram lol
14:12:02*Hideki joined #nim
14:12:21Yardanicozacharyc1rter: well telegram is less active than irc/discord/gitter combined of course
14:12:25*Hideki is now known as Guest20956
14:12:51YardanicoI mean for nim
14:12:55shashlicklibliq-dev you need to pull latest head
14:13:04shashlickit should be distinct cint, sorry
14:13:31zacharyc1rterYardanico: they should all just join IRC
14:14:07Yardanicozacharyc1rter: that's true but some people think that irc is bad/hard and dislike it :D
14:14:25shashlickliblq-dev - from the change log - Enums were originally being mapped to `distint int` - this has been changed to `distinct cint` since the sizes are incorrect on 64-bit and is especially noticeable when types or unions have enum fields.
14:14:43krux02IRC is a bit crude. But that is what I like about it.
14:14:47zacharyc1rteryeah I know - but pretty soon some new chat app is going to come out
14:14:48krux02No images, no animations.
14:15:10zacharyc1rterlike soon we'll have a Nim facebook messenger group chat
14:15:16FromDiscord<clyybber> oh no
14:15:17krux02I think there is an xkcd about this
14:15:20zacharyc1rterlol
14:15:24Yardanicowe need an instagram account for nim as well
14:15:31*hpyc9 quit (Quit: FREENODE IS FUCKING GAY)
14:15:31*blackbeard420 quit (Quit: ZNC 1.7.5 - https://znc.in)
14:15:31zacharyc1rteryeah and a twitter group DM
14:15:36zacharyc1rterbridge all the things
14:15:45Yardanicodon't forget to bridge the forum too
14:15:53zacharyc1rterlol
14:16:14Yardanicobut who uses forums in 2020 am i right :D
14:16:28zacharyc1rterwe should have just gone the TempleOS route we were discussing yesterday
14:16:30krux02https://xkcd.com/1782/
14:16:30shashlick@liblq-dev - can you try with latest head and remove the `-H` and see what happens
14:16:36zacharyc1rterno community, we just get messages directly from God
14:16:52liblq-devshashlick: installing it right now
14:16:53*natrys joined #nim
14:16:58zacharyc1rtercould have saved ourselves a lot of bridge construction time
14:17:01*Guest20956 quit (Ping timeout: 264 seconds)
14:17:07krux02zacharyc1rter, only works if we have a holy bible of Nim.
14:17:13zacharyc1rterhaha
14:17:36YardanicoHolyNim
14:17:38Yardanicoby krux02
14:17:40zacharyc1rteroh no
14:17:46zacharyc1rterdeath to the heretics
14:17:55liblq-devfeaturing: a functional REPL
14:18:10disruptekcrude wins. nothing to complain about.
14:18:11zacharyc1rteractually that's probably possible now with arc
14:18:13krux02I am talking about a book, not a Nim fork.
14:18:34krux02or -derivative/implementation
14:18:37Yardanicozacharyc1rter: also see https://github.com/arnetheduck/nlvm/pull/18 https://github.com/nim-lang/Nim/issues/8927#issuecomment-580456200
14:18:39disbot[Grant Proposal] Make Nim suitable for interactive programming (Implement hot code-reloading, a REPL and a Jupyter kernel) ; snippet at 12https://play.nim-lang.org/#ix=2kSQ
14:18:53disruptekarc of the covenimt.
14:19:06liblq-devshashlick: works now. thanks for that
14:19:40liblq-devI still believe that .header and .importc should be default though, it would save a lot of headaches if gcc suddenly decides to reorder fields for no reason
14:19:46shashlickokay, i need to release soon so i'm worried about this issue
14:20:13shashlickjust to confirm, you tried without `-H` right
14:20:52shashlicki think making it opt out is safer for folks
14:21:05anti[m]#matrixforthewin
14:22:00zacharyc1rterYardanico: I saw that a few weeks ago but I think it's possible even without NLVM now
14:22:06Yardanicohow?
14:22:06zacharyc1rterusing dlopen / dlclose
14:22:15liblq-devshashlick: yes, that's without -H
14:22:20Yardanicoisn't that what hcr does
14:22:24shashlickokay cool
14:22:58*blackbeard420 joined #nim
14:24:22*hpyc9 joined #nim
14:24:42Yardanicobtw c2nim works with gc:arc just fine :P
14:25:20*leorize[m] quit (Quit: killed)
14:25:20*Northstrider[m] quit (Quit: killed)
14:25:25zacharyc1rterYardanico: no not exactly HCR works with the default gc
14:25:47Yardanicowell I still don't understand how gc:arc will allow repl to work
14:25:51Yardanicowithout any shared libs
14:26:00zacharyc1rterbut it does used shared libraries and trampolines
14:26:01*leorize[m] joined #nim
14:26:10*Northstrider[m] joined #nim
14:26:11Yardanicothen what is the difference from hcr?
14:26:15zacharyc1rterno you will still need shared libraries
14:26:22Yardanicocan't you use hcr with arc
14:26:37FromGitter<alehander92> hmm
14:26:39zacharyc1rterI don't know - probably not
14:26:52zacharyc1rterbut I'm using shared libraries for hot code reloading without hcr
14:26:56zacharyc1rterNim's hcr rather
14:27:05zacharyc1rterso a repl should be doable
14:27:59zacharyc1rterbut there are still complexities - like you need to use cstrings which are not Nim strings
14:28:34zacharyc1rterbut that's relatively easy to overcome
14:28:53zacharyc1rterI'm using this library to do hot reloading - https://github.com/fungos/cr
14:29:10FromDiscord<clyybber> Yardanico: Any way to not deal with this telegram slowmode thing?
14:29:34Yardanico@clyybber the only way is to ask dom96 to disable it :P
14:29:49narimiranslowmode? what do you mean?
14:29:57dom96huh?
14:30:00narimiranyou mean that you cannot send multiple message one after the other?
14:30:03FromDiscord<clyybber> Once you write a message you have a 10 sec cooldown
14:30:04FromDiscord<clyybber> Yeah
14:30:11FromDiscord<Rika> that subtitle tho on the xkcd
14:30:11narimirani added that because we had some spammy users
14:30:53Yardanicoyeah it's sad there's no 3s or 5s slowmode
14:31:11narimiranyou can edit your message (up arrow on computer) and then add stuff there
14:31:17narimiranshift+enter for multiline
14:31:17FromDiscord<clyybber> ah right
14:32:09Yardanicoalthough with editing other people won't see that the chat has a new message, but I guess that's not an issue when a discussion is ongoing
14:32:25narimiranthat way you can also avoid "* correction" messages - just correct the original one
14:32:59narimiranpeople will notice if a message posted < 10 seconds ago was edited ;)
14:35:34zacharyc1rteris there a good cross platform filewatcher yet for Nim?
14:36:39Yardaniconot with a permissive license ;)
14:36:54zacharyc1rterI guess I get to write one
14:37:07zacharyc1rterand it will work on macOS first :P
14:37:15zacharyc1rtersince that's the only OS my game engine works on atm
14:37:27Yardanicolook into https://github.com/snowlt23/nimwatch and fsmonitor from stdlib for some inspiration :P
14:37:49Yardanicoah right its not in stdlib anymore
14:37:58Yardanicohttps://github.com/nim-lang/graveyard/tree/master/fsmonitor
14:38:02Yardanicosuch a depressing repo name
14:38:55zacharyc1rterwhere projects go to die
14:39:11shashlickdoes -d:checkAbi not work in `nim cpp` mode?
14:39:21FromGitter<Vindaar> zacharyc1rter: feel free to add support for osx here: https://github.com/Vindaar/fsmonitor2 ⏎ Been meaning to do it, but well .. :(
14:39:47shashlick`/nimbase.h:547:17: error: expected constructor, destructor, or type conversion before ‘(’ token
14:39:48shashlick _Static_assert(sizeof(typ) == sz, "Nim & C disagree on type size")`
14:40:42zacharyc1rterVindaar oh cool - I will do that
14:41:35FromGitter<Vindaar> I haven't used in in almost a year though, so I hope it didn't break in the meantime. Was working fine for my use case on linux
14:41:46PMunchHmm, any reason a non-nil cstring can segfault when converted to a Nim string?
14:41:54PMunchNot null terminated?
14:41:55zacharyc1rterI just need to run a sidecar with my game engine for recompiling game code
14:42:01zacharyc1rterwhen a game source file changes
14:42:09zacharyc1rterso I think as long as OSX support is added it should work perfectly file
14:42:12zacharyc1rterand I can update to work with Nim devel
14:42:22FromGitter<Vindaar> cool! :)
14:42:23zacharyc1rterfine not file
14:48:02PMunchThe graveyard, where the cool kids go to smoke and listen to emo music
14:51:19*Hideki joined #nim
14:51:43*Hideki is now known as Guest87169
14:54:16PMunchHmm, something funky is up here.. The cstring I should've gotten isn't a pointer to anything I can access. I get a segfault as soon as I try to get the first character..
14:54:57PMunchProblem is I can swear that this used to work..
14:55:15disruptek~stream
14:55:16disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
14:57:27disruptekrika: you awake?
14:57:32disruptek!last rika
14:57:32disbotRika spoke in 12#nim 27 minutes ago
14:57:49FromDiscord<clyybber> @Rika forward ping
14:58:05FromDiscord<Rika> hello
14:58:13FromDiscord<Rika> am awake yes
14:58:33disruptekc'mon the stream and explain your gender.
14:58:47FromDiscord<Rika> why?
14:58:59disruptekwe're talking about you and dunno which pronoun to use.
14:59:18FromDiscord<Rika> use whatever
14:59:22PMunchHaha
14:59:23FromDiscord<Rika> why are you talking about me
14:59:36disruptektrying to think of folks who are easterly.
14:59:39PMunchIsn't "they" the sorta accepted non-gendered pronoun?
14:59:42disruptekfurther east than yardanico.
14:59:49FromDiscord<Rika> i am asian
14:59:56FromDiscord<Rika> just use they or she or he
15:00:04FromDiscord<Rika> i guess i'm considered gender fluid
15:00:09PMunchHmm, can confirm. It works with Nim 1.2.0..
15:00:12disruptek"does it ping they?"
15:00:17FromDiscord<Rika> them
15:00:18PMunch"them"
15:00:21disruptek"does it ping they?"
15:00:38FromDiscord<clyybber> wtf is going on
15:00:42FromDiscord<Rika> dunno
15:00:46disrupteki took a shower.
15:00:47FromDiscord<Rika> installing mumble right now
15:01:01PMunchdisruptek is low on gender fluid, needs to top up
15:02:13FromDiscord<Rika> hahaha
15:07:20*Guest87169 quit (Ping timeout: 256 seconds)
15:08:29dom96everyone is on a spectrum when it comes to gender
15:08:40FromDiscord<Danny Fritz> Does Nim HCR work as expected right now? Was reading through the RFC and it seems unclear if it does.
15:08:41*ftsf_ quit (Ping timeout: 256 seconds)
15:09:08FromDiscord<Danny Fritz> I guess I should just try it out this evening. XD
15:09:26*chapl joined #nim
15:11:29FromDiscord<Rika> dom: i apologize if its annoying
15:11:52dom96Rika: You've got nothing to apologise for
15:12:29FromDiscord<Rika> i know some people are annoyed at it though so eh
15:14:37disrupteklet it be known:
15:14:40disruptekrika is the shit.
15:19:01FromDiscord<bedwardly-down> Disruptek, here’s some of my gender fluid in exchange for your nim compiler knowledge in full
15:19:25solitudesfthat doesnt sound right
15:19:25*Guest23312 quit (Ping timeout: 264 seconds)
15:19:41*chapl quit (Remote host closed the connection)
15:19:50disrupteki thought i felt something damp.
15:20:06*chapl joined #nim
15:20:08FromDiscord<bedwardly-down> 👀
15:22:18*fredrikhr quit (Quit: Client disconnecting)
15:22:35*couven92 is now known as fredrikhr
15:24:27*chapl quit (Remote host closed the connection)
15:24:51*chapl joined #nim
15:30:09FromDiscord<Rika> "range types need to be constructed with '..', '..<' is not supported" i'd like to know why ..< isnt supported with range
15:37:06FromDiscord<mratsim> lack of time
15:37:14FromDiscord<mratsim> (just a guess)
15:37:51narimiranbecause Ar4q doesn't like exclusive ranges :)
15:38:01FromDiscord<Rika> i see
15:38:11FromDiscord<Rika> thats fine was just wondering
15:41:58*waleee-cl joined #nim
15:42:23*dadada joined #nim
15:42:48*dadada is now known as Guest91059
15:54:22Araqit's ...er... surprisingly difficult to do this in today's compiler :P
15:54:28Araqno personal feelings involved
15:56:40FromDiscord<bedwardly-down> Nim’s compiler or the others?
15:56:53Yardanicothere's only one compiler for nim as of today ;)
15:57:02Yardanicoyou are free to implement another one if you want :D
15:57:22FromDiscord<bedwardly-down> 🤮
15:57:30FromDiscord<bedwardly-down> Not anytime soon
15:58:29FromDiscord<bedwardly-down> When i said others, i meant c++ and whatnot. I’m still not 100% sure how transpiling works
15:58:56FromDiscord<Rika> those are backends
15:58:59shashlickseeking feedback - https://github.com/nimterop/nimterop/issues/202
15:59:01disbotABI break due to the lack of .importc in struct definitions ; snippet at 12https://play.nim-lang.org/#ix=2kRm
16:04:01*Senketsu joined #nim
16:06:29*brainproxy joined #nim
16:06:30FromDiscord<Dankrad> I've a question regarding to gintro. Does anyone know if one of the following gtk procs are called before my main proc: gtk_init, gtk_init_check, gtk_init_with_args and gtk_parse_args? I'm trying to set the language on windows and it seems that the language has been set (calling setlocale(LC_ALL, nil) retrieves me the currently language I've set previously). I'm also calling disableSetlocale before any of the language relating procs. But my
16:15:59FromDiscord<Dankrad> But my gui displayes everything in my system language.
16:17:37*ptdel joined #nim
16:24:59*Senketsu quit (Quit: WeeChat 2.8)
16:29:16*tiorock joined #nim
16:29:16*tiorock quit (Changing host)
16:29:16*tiorock joined #nim
16:29:16*rockcavera is now known as Guest57253
16:29:16*tiorock is now known as rockcavera
16:33:11*Guest57253 quit (Ping timeout: 260 seconds)
16:36:35*tiorock joined #nim
16:36:35*tiorock quit (Changing host)
16:36:35*tiorock joined #nim
16:36:35*rockcavera quit (Killed (beckett.freenode.net (Nickname regained by services)))
16:36:35*tiorock is now known as rockcavera
16:37:48*rockcavera quit (Read error: Connection reset by peer)
16:38:08*rockcavera joined #nim
16:38:54*Hideki joined #nim
16:39:16*Dankrad joined #nim
16:39:17*Hideki is now known as Guest29636
16:40:42leorizeDankrad: you should post on the forum, gintro author is more active there
16:41:26shashlickmeh, checkAbi worked fine in my older devel snapshot, now fails on head
16:42:00DankradThank you for your reply leorize, i'll if i dont get it by myself
16:42:15shashlicksays **`typedef int A13(int, int, void (**func)(void));` != `*A13* = proc (a1: cint; a2: cint; 'func': proc () {.cdecl.}): cint {.cdecl.}`
16:43:43shashlickwish i had saved my devel hash before updating, now no idea what broke
16:43:44*Guest29636 quit (Ping timeout: 256 seconds)
16:46:38leorizeshashlick: looks like that's a pointer to a pointer of a function?
16:48:39shashlickc2nim gives me **`A13** = proc (a1: cint; a2: cint; 'func': proc ()): cint`*
16:48:46shashlickpretty much the same except the cdecl
16:49:04shashlickadded --cdecl flag and i get the cdecl as well
16:49:48leorizeyea, that one is pointer to pointer for real
16:51:01shashlickokay bisecting, found a working commit
16:55:13shashlickyep - @timotheecour fix for checkAbi broke this - https://github.com/nim-lang/Nim/commit/66db9de714be7c2f4cf1f2fb0a0a99145baf6acb
16:55:46*Guest91059 is now known as dadada
16:55:51leorizeshashlick: uhmmm but that's a wrong typedef for real
16:55:56dadadahey
16:56:17dadadaoh man, I'm spending the whole day with debugging something that shouldn't be a problem in the first place ... wtf
16:57:06dadadaI copied docopt.nim from its github repository into my own project, made only a few slight changes, that shouldn't hinder it from working like it used to
16:57:07krux02dadada: what did you debug on?
16:57:26krux02what broke?
16:57:29dadadaand now with the exact same inputs, my version fails, while the original works, my testcases fail, their's work
16:57:37shashlick@leorize: looks like changing to `(*A13)` gets it working
16:57:59dadadaI diffed the files, and the only changes I made are trivial... made some import changes, merged a util file into the main file
16:58:13shashlickwhat should the wrapper look like for **`typedef int A13(int, int, void (**func)(void))`*
16:58:38dadadaand now I wanted to go full gdb debugger ... but sadly the vscode integration doesn't work ...
16:58:40shashlickgcc doesn't mind that
16:58:54leorize`type A13 = proc(cint, cint, func: ptr proc() {.cdecl.}) {.cdecl.}`
16:58:57dadadakrux02: it throws an exception, that it shouldn't throw
16:59:00leorizedon't trust gcc, it's C
16:59:07leorizeto it pointers are pointers
17:00:22krux02dadada: I really can't help you with vscode, I tried it, but vscode is one of those gdb integrations that want to be visual studio debugger instead.
17:00:43krux02ignoring the fact that they are actually using gdb, but faking the behavior of visual studio
17:01:25krux02and that does work to some extend, but it makes it incompatible to gdb extensions and other benefits of gdb that you simply can't use at all if you use vscode.
17:01:49krux02The only gdb integration that I know about that works correct is as far as I know emacs.
17:01:58krux02But it is a super slim gdb wrapper
17:02:20krux02you basically have gdb, but with an emacs window displaying everything.
17:02:27dadadaemacs is great, I just don't have the time to tinker with my editor all day :D
17:02:41krux02dadada, I don.t do that either nor do I want to.
17:03:06dadadaafter 2 weeks of using emacs I started to write my own elisp scripts ...
17:03:25krux02emacs is more of a lisp machine environment that runs on other operating systems. And also an editor. And all sorts of other things.
17:03:28dadadaINSTEAD of working of on the code I should work on
17:03:51krux02then don't do that.
17:04:02krux02but it also isn't wrong to work on tools to help you do your job.
17:04:15krux02But emacs is sophisticated in its base version.
17:04:23krux02it is just very unconventional.
17:04:34krux02And that is annoying.
17:04:45krux02And not something that you can just get used to.
17:04:46dadadaspacemacs fixes a lot, but adds alot of complexity too
17:05:07krux02Every time you switch an application, you need to remember that your keys work differently.
17:05:10krux02Not very pleasing.
17:05:32krux02I don.t use spacemacs as I never really liked vim.
17:05:41krux02or modal editing
17:05:56krux02anyway, using emacs just as a debugger is possible.
17:06:32dadadaokay, I'll think about it, let me see if emacs is still installed
17:06:46dadadayeah, it's there :D
17:07:06krux02set gdb-many-windows to true
17:07:21krux02no, customize it to "on"
17:07:50krux02M-x gdb will ask you for how you would like to run gdb
17:08:14krux02nim-gdb -i=mi --args myprogram arg1 arg2 arg3 ...
17:08:21krux02that is what you should enter there
17:08:27krux02and then you are good to go
17:08:30dadadanim-gdb?
17:08:37krux02yes nim-gdb
17:08:43dadadawhy don't I have that?
17:08:52krux02that is the starter script to start gdb
17:09:15dadadawhere is that script?
17:09:24*liblq-dev quit (Quit: WeeChat 2.8)
17:09:39krux02I have it in the bin folder of my Nim installation
17:09:45krux02(I install from source)
17:09:55dadadahmm, it's not in my PATH
17:10:12krux02is nim in your path?
17:11:12krux02it should be in the same directory?
17:11:21dadadayeah, nim is installed by choosenim
17:11:27krux02fuck choosenim
17:11:34disrupteklol
17:11:47dadadanim is in .nimble/bin/
17:11:53dadadabut no nimgdb
17:12:11krux02yea, then you should stop using choosenim
17:12:32krux02well you can continue to use choosenim
17:12:43krux02I don't know what it does, but I never liked it.
17:12:46dadadawasn't dom96 responsible for choosenim?
17:12:54*tane quit (Ping timeout: 272 seconds)
17:13:02leorizedom96 is not really active here nowadays
17:13:04dadadait was recommended in this channel
17:13:19leorizeand shashlick have his hands filled with tons of projects
17:13:24krux02do you gave a nim git repository clone?
17:13:29krux02if you have that, it is in there.
17:13:33krux02and then it should work
17:14:30krux02and then you can file a bug in choosenim that it doesn't provide nim-gdb properly.
17:15:14krux02I really dislike choosenim, and my disliking already starts with the name.
17:15:19dadadayou're right, I will file a report
17:16:25krux02nim-gdb after all is a bash script that starts gdb in a way, so that the python pretty printers are loaded.
17:16:43krux02(python meaning they are implemented in python, not for python or something)
17:16:52dadadathis may be the bug https://github.com/nim-lang/Nim/issues/13104
17:16:52disbotnim-gdb is missing from all released packages
17:17:58krux02well then comment that the bug isn't fixed.
17:18:28shashlickyes that's the bug
17:20:20*liblq-dev joined #nim
17:26:49dadadachoosenim downloads over 45MB of c sources from github... (building from head with it)
17:27:20dadadaseems excessive? or is that really the size of Nim when it's compiled to C?
17:27:31shashlickit gets deleted after build is complete
17:27:33federico3yep :(
17:27:53shashlick@leorize: would you be able to test your kmod wrapper with `-f:ast2`?
17:28:19dadadashashlick: the issue is not disk space, but download time, and download speed, provider caps for some
17:29:02shashlickchoosenim downloads the .xz file which is very small in comparison
17:29:20leorizedadada: csources is big because it contain c code for all supported os
17:29:41shashlickif you mean choosenim devel then ya, it downloads a tgz which is bigger
17:30:02dadadaleorize: my hunch is that the real reason is that old versions of the files my be downloaded with the git index
17:30:15dadadamay
17:30:27leorizenah, it fetches the release tarball from github
17:30:41dadada61mb and counting
17:30:50leorizethat thing is 2Gb btw
17:30:54leorize:)
17:30:56FromDiscord<mratsim> @dadada, 45MB is really small compared to other lang. Go is 300MB+ and Rust 1GB, Haskell is also a couple hundreds iirc
17:31:19leorizejk, just around 100+Mb
17:31:29leorizeor is it 1 gig
17:31:34leorizenot sure if I remember
17:32:51leorizeshashlick: I will when I have time, if you want to test it, just verify that the examples compiles and run
17:32:52FromDiscord<mratsim> Rust is 200MB compressed on Arch actually
17:34:47federico3my binary package is 3MB and uses 12MB on disk
17:36:39FromDiscord<NerdRat> Alo Alo!
17:37:59dadadahttpclient.nim(271) httpError
17:38:00dadadaError: unhandled exception: Server terminated connection prematurely [ProtocolError]
17:38:05FromDiscord<NerdRat> Choosenim is nice, I love it. It has some obscure and esoteric errors, that's why I love it!
17:38:11dadadathis is when you want to give up
17:38:36dadadachoosenim should use something like aria2 to not be in trouble when that happens
17:39:47shashlick@leorize: it works ya
17:44:08FromDiscord<mratsim> I don't think choosenim reaches the level of nimble errors, especially the dreaded single dot ".". I'll even call that the singularity
17:44:14PMunchHuh, this is super weird
17:44:22PMunchSo I have a procedure marked with nodecl
17:44:43PMunchIt run just fine, and returns a pointer. But accessing the pointer fails.
17:44:52PMunchBy removing nodecl it works just fine
17:45:40zacharyc1rterI SEE
17:45:51zacharyc1rterlol whoops
17:47:42*Vladar joined #nim
17:50:07FromDiscord<Recruit_main707> when having multiple threads accesing a variable, is there some kind of special thing you must do?
17:50:22disrupteknah, just wing it.
17:51:21Yardanico@Recruit_main707 pray to Nim Gods
17:51:25Yardanicobut really you need to have locks
17:51:34Yardanicoor atomic variables I guess
17:51:42YardanicoI'm not really into the threading stuff, I only know locks :P
17:52:00*companion_cube joined #nim
17:52:03Araqlocks are fine, use them
17:52:03FromDiscord<Recruit_main707> can you briefly explain me locks then?
17:52:33PMunchLocks are a way to gain exclusive access
17:53:21PMunchA lock can only be "locked" once, any subsequent lock operation will wait until the lock is open again before getting past
17:53:38liblq-dev@Recruit_main707, they're available in the locks module
17:54:18PMunchSo if you have two threads that both try to manipulate variable A, but they have lock/unlock around the so-called "critical section" you are guaranteed that only one thread at a time can execute the code in this section at the same time.
17:54:43liblq-devNim has extra support for them, there's the {.guard: someLock.} pragma you can apply to variables and then you use withLock(someLock):
17:55:09liblq-devand the compiler will not allow you to modify (?) the variable outside of the withLock template call
17:55:12FromDiscord<Recruit_main707> makes sense
17:55:14PMunchThink of it as a way of saying "Hey I'm going to work on this right now, so don't touch anything I'm working on"
17:55:26Yardanicoyeah, common usecase is to use locks for IO for example
17:55:53FromDiscord<Recruit_main707> that probably fucked up my async client :P
17:56:01liblq-devthis is actually implemented using the {.locks: [someLock].} pragma which can be used to implement custom locks
17:56:06FromDiscord<Recruit_main707> multithreaded*
17:59:02PMunchHmm, so nodecl does something weird..
18:04:21dadadaI never really liked any debugger
18:05:02FromDiscord<12345> just add echo("here"); echo("here1") ... between lines
18:05:08PMunchHmm, why would a call with nodecl give me something other than a call without it?
18:05:28dadada12345: usually enough, but not always
18:06:58FromDiscord<12345> oh lel, im recruit let me change my name back, we were testing something
18:09:32cyraxjoeHi o/
18:10:04FromDiscord<Avatarfighter> Stupid question is there an easy way of converting seq[uint8] to seq[uint]? I'm casting atm but I just wanted to know if there was a better way
18:11:07cyraxjoeI have basically the same question as in https://www.reddit.com/r/nim/comments/g3kpuz/exportc_javascript_object_method/ not sure if a lot of people already saw that...
18:11:53FromDiscord<Recruit_main707> Avararfighter, it depends on what you are doing
18:12:14FromDiscord<Rika> theSeq.mapIt(it.uint) is what i would do lol
18:13:04*brainproxy quit (Ping timeout: 272 seconds)
18:13:28Yardanicocyraxjoe: output of JavaScript backend isn't really tailored to be used in other JS code
18:13:41Yardanicoso you'll probably have to deal with JS prototypes and stuff
18:14:15FromDiscord<Avatarfighter> @Recruit_main707 I need to pass a seq of uint8s as uints from one proc to another
18:14:40FromDiscord<Recruit_main707> can you show us the code?
18:14:55FromDiscord<Avatarfighter> its a tiny bit long hence why I was asking :L
18:15:08Yardanico@Avatarfighter maybe you can just use implicit generics?
18:15:30cyraxjoeYardanico: it seems that is good enough with {.exportc.} (at least for vars and procs), but the prototype integration is missing indeed
18:15:33FromDiscord<Avatarfighter> yeah I'll do that I've been dancing around that @Yardanico
18:15:40FromDiscord<Recruit_main707> or safely cast whenever you use the uint8 and need them as uints
18:15:40Yardanicocyraxjoe: well because nim has UFCS and doesn't need it ;)
18:16:04YardanicoI mean you probably can make it work
18:16:14FromDiscord<Recruit_main707> for instance: `theSeq[0].uint`
18:16:14*natrys_ joined #nim
18:16:30*companion_cube left #nim ("WeeChat 2.3")
18:16:30FromDiscord<Avatarfighter> yeah I can also do that
18:16:54FromDiscord<Avatarfighter> I have a few ways of doing what I need but wasn't sure which is best lol
18:17:08Yardanicoimplicit generics: https://play.nim-lang.org/#ix=2kUC
18:17:09FromDiscord<Recruit_main707> i dont know which in is the best either :P
18:17:20Yardanicoi don't know either, nim doesn't have the "best" way always
18:17:31Yardanicothere's the fastest way usually, the most elegant way, the straightforward way
18:17:37Yardanicosometimes these intersect
18:17:41Yardanico(which is good)
18:18:35cyraxjoeYardanico: I was thinking in the use case of making the "core" in nim and exposing some _clean_ js object, it seems that currently that can be done, but you have to manually couple the type/procs into JsObject/bindMethod (from jsffi)
18:18:44Yardanicoyeah
18:18:49Yardanicoyou can make a library to help others :P
18:18:59FromDiscord<Recruit_main707> i have some homework to do, but after that, i would apreciate some help for transpiling a function from either go/python/js and maybe more options
18:19:25*natrys quit (Ping timeout: 264 seconds)
18:19:32PMunchWhat does N_STDCALL do?
18:20:01Yardanico__stdcall
18:20:29FromDiscord<Technisha Circuit> How do i turn a JavaScript object (like a string or an int) into a Nim object?
18:20:37YardanicoJsObject
18:20:58YardanicoPMunch: for example https://github.com/nim-lang/nim/blob/master/lib/nimbase.h#L166
18:21:02Yardanicosearch for it in the file
18:21:16FromDiscord<Technisha Circuit> If I'm using Nim with C?
18:21:32PMunchRight, but when I do nodecl the only change in my code is that that the call that declares it like that disappears. But it is still able to call the procedure and get a result, but it fails to read from the result.
18:21:49PMunchBut with nodecl the only definition of it should be in the original header file, right?
18:22:17ZevvTechnisha Circuit: ParseJson in the json module
18:22:28PMunchSo why does Nim try to call it with something it was not declared with? Does it somehow force fastcall, even for procs imported from C?
18:22:32Zevvhttps://nim-lang.github.io/Nim/json.html#overview-parsing-json
18:22:50FromDiscord<Recruit_main707> he talks about javascript objects though
18:22:59FromDiscord<Technisha Circuit> > <Zevv> Technisha Circuit: ParseJson in the json module
18:22:59FromDiscord<Technisha Circuit> For JavaScript objects?
18:23:19FromDiscord<Rika> he means to go from JS objects to Nim
18:23:30FromDiscord<Technisha Circuit> Yeah
18:23:30Zevvoh right I wasn't reading properly, sorry
18:23:35Zevvlet me shut up now
18:23:45FromDiscord<Recruit_main707> happens to the best of us :p
18:23:46FromDiscord<Technisha Circuit> Like a JS string to a Nim string
18:23:56FromDiscord<Technisha Circuit> Don't worry man/woman/person of no gender
18:24:37PrestigeHm what is wrong with this? https://play.nim-lang.org/#ix=2kUE
18:24:47Prestigedo I just have to create an empty table then populate it?
18:25:03ZevvPmunch: , -> :
18:25:05Zevvline 6
18:25:19FromDiscord<Technisha Circuit> ^^
18:25:32PMunchZevv, what?
18:25:37ZevvNo, Prestige I ment, wrong tab completion
18:25:41PMunchHaha :P
18:25:45ZevvP<tab> is usually you
18:26:00Prestigewoops typo
18:26:23Prestigehuh my example works, what's going on in my actual code..
18:26:33PMunchI guess I'm flattered Zevv :)
18:26:51PMunchWell, I'm not sure how your tab complete works, but apparently it's not last message
18:27:27FromDiscord<Technisha Circuit> Maybe it's most common
18:28:04FromDiscord<Technisha Circuit> Or if the next char is closer to A
18:28:37Yardanicoit's the next char of course
18:28:45YardanicoI get PMunch first for P too
18:29:04FromDiscord<Technisha Circuit> So how would i turn a JavaScript string, int, or float into the Nim equivalent?
18:29:16FromDiscord<Technisha Circuit> And how about for JavaScript functions too?
18:29:22PrestigePMunch: You're familiar with x11 Atoms yeah?
18:29:27Yardanicodepends on what you mean @Technisha
18:29:32FromDiscord<Recruit_main707> from the c backend?
18:29:34Yardanicoi don't understand the context
18:29:35FromDiscord<Technisha Circuit> Yes
18:29:43Yardanicojson
18:29:53YardanicoJSON is literally a JS subset
18:29:58Yardanicofor data
18:30:07FromDiscord<Rika> js functions?
18:30:12FromDiscord<Rika> you can only call them in nim no?
18:30:18Yardanicojs fuinctions aren't exactly data
18:30:37Yardanicoand you can't call JS functions from C backend unless you embed a JS runtime in your app
18:30:39PMunchPrestige, yup
18:30:40Yardanicolike duktape
18:30:56PMunchWell, define "familiar"
18:31:21PrestigePMunch: Attempting to do this: https://play.nim-lang.org/#ix=2kUJ Getting a strange error on the toTable call
18:31:23FromDiscord<Technisha Circuit> I want to make a JavaScript module in Nim using the C backend using cffi, but I'd have to convert strings, ints and other data types into the Nim equivalents
18:31:39PrestigeI was thinking it may have to do with the pragma on TAtom but am unsure
18:31:49FromDiscord<Recruit_main707> remember about the python interop?
18:31:51Yardanicowell @Technisha there should be some kind of API
18:31:59Yardanicoor the JS side manages things itself
18:32:24PrestigeOh I bet it has something to do with hasing, eh
18:32:37Araquse '.emit' to gain more control over the JS output
18:32:48FromDiscord<Technisha Circuit> Okay, thanks
18:32:53YardanicoPrestige: you have to define hash proc for object types yourself
18:33:03Yardanicothe simplest way is to hash all fields (
18:33:07PMunchPrestige, on runtime?
18:33:27Yardanicowait wat
18:33:27Prestigejust from nimlsp, seemed I was able to compile the file though
18:33:31Yardanico@Prestige you don't need tables here
18:33:45Yardanicoenums are just integers
18:33:52PMunchOh, I have the same thing..
18:34:03Yardanicoyou can just use an array
18:34:06Yardanicoor a sequence
18:34:20PMunchThat is a weird error indeed..
18:34:20Yardanicoand use enum members as indexes
18:34:21PrestigeI'm going to be accessing the values by name later on
18:34:29Prestigehmm
18:34:31Prestigeok
18:34:49PrestigeGood point, thanks Yardanico
18:35:28PrestigePMunch: when I saw a similar error before, the compilation failed and revealed a more verbose error about hasing
18:35:34PMunchSeems to be a bug in nimsuggest: http://ix.io/2kUM
18:35:44Prestigeah, rip
18:36:40FromDiscord<Technisha Circuit> Is there something like Nimpy but for NodeJS?
18:36:45Yardanicono
18:36:57Yardanicowhat about using https://github.com/node-ffi/node-ffi ?
18:37:01Yardanicoidk
18:37:02FromDiscord<Rika> node.js is pretty badly supported in nim afaik
18:37:07FromDiscord<Technisha Circuit> Oof
18:37:09Yardanicothat too
18:37:13Yardaniconodejs is mainly used for testsuite
18:37:21*brainproxy joined #nim
18:37:23PrestigeYardanico: I suppose the only slightly annoying part is, I need to keep the array declaration in the same order as the enums are defined
18:37:23Yardanicothe primary target of nim JS backend is browsers
18:37:37YardanicoPrestige: I wouldn't call that annoying really :P
18:37:37Zevvnarimiran: "change 'iff' to 'if' to stop "corrections" once and for all", haha
18:38:29PMunchMore minimal example, doesn't seem to have anything to do with X
18:38:30PMunchhttp://ix.io/2kUN
18:39:19FromDiscord<Never Listen To Beef> @mratsim holy shit, my guesses arent always silly guesses?! That scares me that i was right
18:39:44Yardanicodaily reminder: please test your libraries with arc and open issues if they don't work or add it there https://github.com/nim-lang/Nim/wiki/Status-of-gc:arc-and-gc:orc-(library-compatibility) :P
18:39:51Yardanicojust so we can fix all the arc bugs
18:40:49narimiranZevv: ;)
18:40:51PrestigePMunch: I think I have a knack for breaking things
18:41:09PMunchPrestige, please report this, you can use my minimal example if you want
18:41:41PMunchYardanico, ooh, it's that stable now?
18:41:47PrestigeSure, I'm using your paste though :P
18:42:03YardanicoPMunch: well I mean a lot of libs work with it
18:42:30ZevvYardanico: yay, npeg is at #1 \o/
18:42:37YardanicoI reported 5 arc bugs in the last few days :D
18:42:47Yardanicojust was testing stuff out of boredom
18:42:57ZevvI think Ar4q found 4 AR
18:43:05ZevvARC bugs because npeg is in the default test suite
18:43:11Yardaniconice
18:43:13Zevvnothing I had to do to fix it :)
18:44:37*zacharyc1rter quit (Ping timeout: 264 seconds)
18:45:15PMunchOh, some of my packages are already there :)
18:45:20Yardanicoyeah I tried nimlsp
18:45:30Yardaniconimsuggest compiles with arc after adding nosinks but it doesn't actually work
18:45:37Yardanicoshows random strange errors everywhere
18:45:44PMunchAlthough all of them in the "A bug or not yet sure" category..
18:45:49*zacharycarter quit (Ping timeout: 264 seconds)
18:45:56Yardanicoalso parsetoml/persvec use deepCopy which is not available on arc (yet)
18:46:09PMunchYardanico, as you can see above it does that even without gc:arc :P
18:46:31PMunchBut wouldn't nimsuggest working pretty much mean that the compiler would be working with gc:arc?
18:46:41Yardanicowell that's the ultimate goal
18:46:43Yardanicowith orc thoughj
18:46:59*Romanson quit (Quit: Connection closed for inactivity)
18:48:06PMunchYeah, isn't orc the better choice?
18:48:25Yardanicothey're different
18:48:30Yardanicoorc is arc with a cycle collector
18:48:42PMunchYeah I know
18:48:46PMunchSo isn't it "better"
18:48:57Yardanicowell with arc cycles will just leak I think
18:49:03FromDiscord<clyybber> it is probably better for nimsuggest 🙂
18:49:05PMunchYeah, which isn't good..
18:49:31PMunchIs the penalty of using orc that big?
18:49:31Araqorc is for applications, arc is for libraries
18:50:11PMunchHuh, why does this error appear twice? http://ix.io/2kUS
18:50:13FromDiscord<Rika> so libraries shouldnt have cycles?
18:50:21FromDiscord<clyybber> Ideally no
18:50:31PMunch(That error message is from a library for what it's worth..)
18:50:35FromDiscord<clyybber> If they do, they should best take care of them themselves
18:50:40AraqRika: never seen a library here cycles are good design
18:50:40FromDiscord<clyybber> (if possible of course)
18:50:44Araq*where
18:51:01FromDiscord<Rika> guess thats an extra todo for my library
18:52:00FromDiscord<clyybber> tbf compiler as a library will still have cycles :p
18:52:03PMunchWhat does "cursor" mean?
18:52:39FromDiscord<clyybber> its a reference which doesn't contribute to the refcount.
18:52:43AraqPMunch, "don't perform RC ops"
18:52:49FromDiscord<clyybber> Its essentially the same as lent IMO
19:01:35leorizecursor is unsafe btw :P
19:03:20*Vladar quit (Quit: Leaving)
19:08:13Araqleorize, well in debug mode we can add a second RC field to make it safe
19:08:43*chapl quit (Quit: Leaving)
19:11:23*lritter quit (Ping timeout: 260 seconds)
19:20:53*chapl joined #nim
19:21:31chapldisruptek: irssi ftw. :P
19:21:51*NimBot joined #nim
19:31:21disrupteksay goodnight, gracie
19:36:41*natrys_ quit (Quit: natrys_)
19:36:58*natrys joined #nim
19:37:52*Hideki joined #nim
19:38:15*Hideki is now known as Guest5886
19:39:51*idf quit (Ping timeout: 260 seconds)
19:42:49*Guest5886 quit (Ping timeout: 264 seconds)
19:44:18*letto quit (Read error: Connection reset by peer)
19:45:19*letto joined #nim
20:04:48*tane joined #nim
20:06:33disruptekYardanico: same time every year.
20:08:28FromDiscord<Yardanico> That's a good answer
20:11:23*thomasross quit (Read error: Connection reset by peer)
20:11:53*thomasross joined #nim
20:20:11*PMunch quit (Quit: leaving)
20:21:14dom96dadada, please do report choosenim problems you're having on github
20:22:49dom96mratsim: I don't get the hate for the dots output by Nimble.
20:24:44dadadadom96: I did report it...
20:25:44dom96I don't see any new choosenim bug reports
20:34:46*filcuc joined #nim
20:35:13FromGitter<Vindaar> @dom96 pretty sure mratsim is referring to these kind of errors: https://github.com/nim-lang/nimble/issues/756
20:35:16disbotVery poor error messages when evaluating .nimble files ; snippet at 12https://play.nim-lang.org/#ix=2kVC
20:37:43*zacharycarter joined #nim
20:37:46*zacharyc1rter joined #nim
20:38:43dom96oh, i think you're right
20:39:10*filcuc quit (Ping timeout: 246 seconds)
20:39:25chapl"/Users/dom/projects/nim/lib/pure/streams.nim(274, 9) Error: undeclared identifier: 'copyMem'" ??
20:39:43dom96That's a really silly thing to criticise to be honest :P
20:40:17dom96I spent time to make a custom error message to explain that Nimble is attempting to read the .nimble file as an ini file and a nimscript file
20:40:24dom96You cannot get clearer than that
20:40:31FromDiscord<exelotl> woww I found an ancient copy of Nim on my external hard drive
20:40:31FromDiscord<exelotl> https://cdn.discordapp.com/attachments/371759389889003532/707330912697843763/unknown.png
20:40:44FromDiscord<Yardanico> Wow
20:41:08FromDiscord<Rika> nice
20:41:11FromDiscord<Yardanico> Well tbf you can get the same
20:41:12FromGitter<awr1> doing this PR - is the next version of the lang supposed to be 1.4 or 1.3?
20:41:21FromDiscord<exelotl> this was back when I was making games in `ooc` which was another language that compiles to C
20:41:22leorize1.4
20:41:29FromDiscord<Yardanico> Nim repo has commits since 2008
20:41:38FromDiscord<Yardanico> @awr1 you should use since 1.3.1
20:41:43dom96exelotl: hah, I've had friends that used ooc
20:42:02FromGitter<awr1> i'm writing up `since` annotations, should i use `.since: (1,4)`?
20:42:11FromDiscord<Yardanico> 1.3.1 I think
20:42:21FromDiscord<Yardanico> You should account for devel version
20:42:23FromGitter<awr1> oh okay
20:42:29leorizeawr1: write `since: (1, 3)`
20:42:54FromDiscord<Yardanico> (1, 3, 1) will work
20:43:27dom96exelotl: I even wrote up a gist a while ago outlining why I prefer Nim :P
20:43:32dom96Cannot find it though
20:43:58dom96I should have said "friends that used and contributed to ooc"
20:44:06FromDiscord<Yardanico> See https://github.com/nim-lang/Nim/pull/14197#discussion_r419789724
20:44:07disbotMake the fields of `times.DateTime` private
20:44:41dom96honestly, to me (1, 3) doesn't make sense
20:44:53dom96it should be (1, 4)
20:45:04FromDiscord<clyybber> odd is #devel
20:45:13narimiran if you ask about `since`, use `(1, 3)`
20:45:28FromDiscord<clyybber> and you wouldn't want to exclude the users who use #devel from features being introduced in #devel :p
20:46:22FromDiscord<exelotl> at the time I totally bounced off Nimrod, it mainly cause of the docs and the way that so much stuff is named differently compared to C-like languages
20:46:36dom96the only use that the since annotations have to me are to let me know which version procs have been introduced in
20:46:43dom96in that sense odd versions make no sense
20:46:46dom96since they are never released
20:47:02FromDiscord<Yardanico> Well they are still used between releases in devel
20:47:59FromDiscord<Yardanico> And since actually disables features if your version is lower than specified
20:48:12dom96I find that use case silly
20:51:57*Jesin quit (Quit: Leaving)
20:53:42*narimiran quit (Ping timeout: 260 seconds)
20:54:47FromGitter<awr1> you know i'm looking at bitops again and i don't get it, there are all these masking operations but no one that maps directly to `and` which is really... "the masking op"
20:55:02FromGitter<awr1> `setMask` actually is just an `or` which is weird
20:56:05FromGitter<awr1> https://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/bitops.nim#L73
20:58:12FromGitter<awr1> i will have to improve this API a bit
20:59:20*kayabaNerve quit (Remote host closed the connection)
21:03:56*Jesin joined #nim
21:09:58liblq-devhow should I name an "unsafe" leaked implementation detail procedure?
21:10:09FromDiscord<Rika> leaked?
21:10:36FromGitter<nothratal> can someone explain me how timezones in nim are working? ⏎ ⏎ ```2020-04-27T00:00:00+02:00==>1587938400 ⏎ 2020-04-28T02:00:00+02:00==>1588032000``` ⏎ ⏎ I expected that the first line contains the timezone but not the second one. Instead both have the timezone and the second line also has +2 hours [https://gitter.im/nim-lang/Nim?at=5eb1d64c7a24ff01b0031f44]
21:10:39liblq-devyes, leaked. because it should be private but can't
21:11:04liblq-devI was thinking about prefixing it with IMPL_
21:11:07FromDiscord<Rika> you cant???
21:11:16liblq-devno, because it's used in another module
21:11:20FromDiscord<Rika> export except not working?
21:11:40liblq-devI have one module which is an abstract interface and then modules that use the interface
21:12:37FromDiscord<Rika> then the exporter file cant except the interface?
21:12:53FromDiscord<Rika> i usually have a file that exports everything needed or so
21:14:24liblq-devI don't have such an exporter file, it would hurt documentation
21:15:50FromGitter<kaushalmodi> @nothratal By default the time will always be converted to your local time zone
21:16:02FromGitter<kaushalmodi> looking at that output, your local time zone is probably +2:00
21:16:27*sagax quit (Ping timeout: 260 seconds)
21:16:48FromGitter<kaushalmodi> You will need `inZone` to get the time from the perspective of a different zone
21:17:28FromGitter<kaushalmodi> Copying @GULPF as he's the expert in this field (I forget the difference between the "time zone" and "time offset")
21:18:05FromGitter<nothratal> I read that in the documentation, yes +2:00 is correct
21:18:06FromGitter<nothratal> but
21:18:48FromGitter<nothratal> why do I have a time difference? I changed "+02:00" to "+00:00"
21:19:40FromGitter<nothratal> this should only affect the time zone displayed but not the time itself
21:19:44FromGitter<kaushalmodi> someone can correct me here.. but what your code essentially did is "hey, here's this time in +00:00 time offset, what's the effective time in my local timezone"
21:20:26FromGitter<kaushalmodi> that code keeps the time absolute based on the time offset you provided
21:20:43FromGitter<kaushalmodi> it just printed the corresponding time in your time zone
21:20:58FromGitter<nothratal> ahhhh ok, that could make sense
21:21:36FromDiscord<Rika> wait
21:21:42FromDiscord<Rika> let me understand your code first
21:22:31FromGitter<Bennyelg> do we have builtin function in nim which convert camelCase to snake_case ?
21:22:37FromDiscord<Avatarfighter> dang I love js as a language but porting js -> nim is the biggest hassle I've ever had because I can't tell what size the ints are :L
21:22:48FromDiscord<Rika> https://nim-lang.org/docs/times.html#parse%2Cstring%2CTimeFormat%2CTimezone%2CDateTimeLocale @nothratal
21:23:06FromDiscord<Rika> default for `zone` is `local()`
21:23:10FromDiscord<Rika> you can assume what these mean
21:23:42FromDiscord<Rika> ah yes, js, the language where integers dont exist
21:24:09FromDiscord<Avatarfighter> its not that they don't exist its that they morph to different sizes lmao
21:24:28leorizeAvatarfighter: if you want a constant size, use a sized int lol
21:25:02FromDiscord<Avatarfighter> leorize: lmao I wish it was that easy
21:25:03FromDiscord<Rika> @Avatarfighter but afaik most js implementations do not store numbers as ints at all, theyre all floats
21:25:33leorizeAvatarfighter: what's the problem then?
21:25:40FromDiscord<Avatarfighter> I converted some bitwise operations from js to nim directly and the outputs aren't exciting lmao
21:26:24leorizewell you probably did something wrong :P
21:27:21FromGitter<Bennyelg> Why del not working from request.params as its : Table[string, string] ⏎ requestParams.del["key1"]
21:27:46leorizebecause that's not the syntax :)
21:28:02leorizeuse `()`, not `[]`
21:28:06FromGitter<Bennyelg> tried
21:28:06leorizedel is a procedure
21:28:09FromGitter<Bennyelg> not working
21:28:27leorize!eval import tables; var t: Table[string, string]; t.del "hi"
21:28:30NimBot<no output>
21:28:37leorizeseems to work just fine here
21:28:43FromGitter<Bennyelg> (https://files.gitter.im/nim-lang/Nim/QMRp/image.png)
21:28:58FromDiscord<Avatarfighter> leorize: I always do something wrong its my style 😛 here is where I'm having fun https://hastebin.com/mowiwapoje.makefile I made a custom operator for "^=" xor assignment
21:29:46FromDiscord<Avatarfighter> I know what the issue is though its the same as last night, I gave one of the variables the wrong size
21:29:58leorize:P
21:30:08leorizemake sure your constants are typed
21:30:11leorizeie. 0u8 or 0u32
21:30:36FromDiscord<Avatarfighter> wym constants I don't think I have any 😛
21:30:43leorizeBennyelg: try compiling it
21:31:06leorizesometimes the linter can be weird
21:31:27leorizeBennyelg: actually I think I know your problem
21:31:30FromGitter<Bennyelg> no no it didnt work maybe because something related to const
21:31:34leorize!eval import tables; let t: Table[string, string]; t.del "hi"
21:31:37NimBotCompile failed: /usercode/in.nim(1, 20) Error: 'let' symbol requires an initialization
21:31:38FromGitter<Bennyelg> I saved it in different variiable and it works
21:31:50leorizeyea, Table is a value type
21:32:18FromGitter<Bennyelg> I mean : I got request.params and it probably can't modified
21:32:36leorizehttps://nim-lang.org/docs/manual.html#procedures-var-parameters
21:32:45*tane quit (Quit: Leaving)
21:33:18FromGitter<Bennyelg> do we have something which snake_case string?
21:33:44leorize?
21:33:50FromDiscord<Rika> ?
21:34:39FromGitter<Bennyelg> Nvm I'll write a new proc
21:34:57FromDiscord<Avatarfighter> I'm actually so hyped for when I'm done with this lmao nim is about to get the sketchiest crypto it has ever seen 😛
21:35:14*ehmry quit (Remote host closed the connection)
21:36:32*ehmry joined #nim
21:37:07FromGitter<kaushalmodi> @nothratal I am not sure if this helps or confuses more, but I quickly extracted this from a different project of mine: https://play.nim-lang.org/#ix=2kVW
21:37:28dadadastaticExec isn't calling a shell to call commands, is it?
21:37:42dadadacause that would be very handy right now
21:38:05leorizedadada: it's calling a shell
21:38:35dadadaooh, nice, should be documented in https://nim-lang.org/docs/system.html#staticExec%2Cstring%2Cstring%2Cstring
21:39:12leorizeI think it's kinda common knowledge that any call that takes only a string will use the shell
21:40:19dadadaput yourself into a beginners mind, maybe it's common knowledge for you and your friends
21:40:35dadadaI assumed it could use a shell, but wasn't 100% sure, so I asked
21:41:05dadadadocumentation needs to be written in a way that somebody new to programming can catch up to that common knowledfge
21:41:08dadadaknowledge
21:42:07*solitudesf quit (Ping timeout: 260 seconds)
21:42:09leorizewas just stating my opinion :P
21:43:12FromDiscord<Rika> does `object of` (note, no ref) only copy the fields from the base?
21:43:20FromDiscord<Rika> or does it do something else
21:43:37leorizeit makes a new object type that's inherited from the base
21:43:56leorizethis mean it carry with it some RTTI
21:44:18FromDiscord<Rika> is there a way to make 2 objects where one also takes the fields of the other and nothing else?
21:44:28FromDiscord<Rika> or must i make a pragma
21:44:31leorizewdym?
21:44:44leorizedistinct object?
21:44:47FromDiscord<Rika> no
21:44:57FromDiscord<Rika> i want the other object to have its own unique fields too
21:45:08leorizethen inheritance?
21:45:11FromDiscord<Rika> no
21:45:14FromDiscord<Rika> i dont need that
21:45:29FromDiscord<Rika> i legitimately only need it to copy the fields
21:45:34leorizethen no you have to copy the fields
21:45:47leorizeI can't imagine a situation where you would need to do this though
21:46:21FromDiscord<Rika> i want to make an object that i can use `json.to` with and another that's the main type
21:46:45FromDiscord<Rika> (very lazy, yes)
21:47:19leorizethat is hacky as hell
21:47:29leorizetreat your data structure with some respect :p
21:47:34FromDiscord<Rika> naw
21:47:57leorizewhy would there be two types with the same fields but one has a bit more?
21:48:03FromDiscord<Rika> maybe i can write a template w/ typeInstance.fields
21:48:14FromDiscord<Rika> because one of its fields cannot be serialized in json
21:48:16FromDiscord<Yardanico> Guess I'll try to run Nim on https://wiki.kolibrios.org/wiki/Main_Page tomorrow , it has GCC and it's own libc (that OS is mostly written in assembly)
21:48:22FromDiscord<Yardanico> Really cool small thing
21:48:31FromDiscord<Yardanico> --os:any ftw :D
21:48:39leorizeRika: then write your own `%` for it?
21:49:03FromDiscord<Rika> leorize: you think theres a sensible way to serialize a DbConn
21:49:50leorizewrite a `%` for the object type itself
21:49:52FromDiscord<Yardanico> Isn't there no runtime impact if you use inheritance with ordinary procs
21:49:56leorizethen ignore the DbConn field
21:49:59FromDiscord<Yardanico> Without methods
21:50:56leorizeYardanico: he seems to want a way to partially serialize a data structure into json
21:51:37FromDiscord<Rika> no, deserialize actually
21:52:12leorizea custom overload for `.to`?
21:52:40FromDiscord<Yardanico> @leorize well I'm asking generally :)
21:52:42leorizesignature should be: `proc to(json: JsonNode, yourType: typedesc[YourType]): YourType`
21:53:05leorizeYardanico: yea, afaik the rtti overhead only incur when you use methods
21:53:18leorizeor when you use things that need it, like `of`
21:53:44FromDiscord<Rika> leorize: found what i must overload, `initFromJson` is what i must overload it seems
21:54:10FromDiscord<Rika> will overload them now
21:54:14*zacharyc1rter quit (Ping timeout: 240 seconds)
21:54:44*zacharycarter quit (Ping timeout: 272 seconds)
21:56:49*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
21:59:58FromDiscord<Recruit_main707> i am experimenting with threads, and i have this code here, but when it finishes, nothing its printed, why? https://play.nim-lang.org/#ix=2kW2
22:02:16FromDiscord<clyybber> Recruit_main707: Because you commented out the print?
22:02:39FromDiscord<Recruit_main707> im not stupid, i mean at the end
22:02:48FromDiscord<clyybber> kk
22:03:59FromDiscord<clyybber> works for me
22:04:26FromDiscord<Recruit_main707> hmmm
22:04:32FromDiscord<clyybber> are you on windows?
22:04:37FromDiscord<Recruit_main707> ye
22:04:45FromDiscord<clyybber> where are you running it from?
22:04:58FromDiscord<Recruit_main707> terminal
22:05:42FromDiscord<clyybber> but you see the "done" being printed?
22:05:53FromDiscord<Recruit_main707> no, nothing at all
22:06:15FromDiscord<clyybber> thats weird
22:06:44FromDiscord<clyybber> try powershell maybe
22:07:27FromDiscord<Recruit_main707> neither...
22:07:47FromDiscord<clyybber> try nim r yourfile.nim
22:15:43*avatarfighter joined #nim
22:15:45*zacharyc1rter joined #nim
22:15:45*zacharycarter joined #nim
22:24:08*covidian joined #nim
22:27:55FromDiscord<Recruit_main707> i dont understand, why does counting up to x take longer with multiple threads
22:29:04stefantalpalaruI think getTotalMem() and getOccupiedMem() are lying to me. They claim a few MiB are used, while dumpHeapInstances() reports hundreds of MiB in the GC-managed heap.
22:31:04leorizeRecruit_main707: because threads have a huge overhead
22:31:19*natrys quit (Quit: natrys)
22:31:34dadadaoh, I hate it when I hit on something that may be a Nim bug :-( It's so much nicer when the fault is mine
22:32:23leorizestefantalpalaru: I think those numbers are the amount of GC owned memory that's used
22:32:34FromDiscord<Recruit_main707> leorize: then threads are only worth it (for performance reasons) when single thread cant keep up?
22:33:16leorizethreads only worth their performance cost when you can max out all of them
22:33:39leorizethis is because you aren't the only person spawning threads on your system
22:33:40FromDiscord<Recruit_main707> that sounds a bit abstract :p
22:34:21leorizeif your threads don't take a large amount of computing power to function, then the OS will schedule other threads that need it first
22:35:11FromDiscord<Recruit_main707> So, threads are basically more useful the more you need them?
22:35:14dadadais there a way to tell the parser that code generated by a macro is valid?
22:35:28dadadaNim complains about something being wrong, that's clearly right
22:35:42dadadaand I'd like to preemptively tell it that it needs to shut it
22:35:45leorizedadada: if the compiler complains that it's wrong, it's wrong
22:35:59dadadaleorize: no, it's not always, Nim has bugs
22:35:59leorizedon't use `repr` to print out your macro result
22:36:04leorizeuse `treeRepr`
22:36:24leorizethe AST on the other hand is pretty solid
22:36:40leorizeinvalid AST will trip the compiler, but valid AST will always pass
22:36:47FromDiscord<Recruit_main707> macros are hard, it’s rather unlikely you found a compiler bug :)
22:37:29dadadaleorize: it's complaining about code that definitely should work, in this case I'm certain
22:37:38leorizewell can I see the code?
22:37:38skrylar[m]i think i've given up hope of ever using the nim forums. poked password reset again and it sends the email, says it changed the pw, then login says "invalid." and its been like this for like .. two years now, people just say ping dom, and then he never does anything. and it stays broken. *hops down pot of coffee in shrugs*
22:38:14leorizedom96: ^
22:38:22leorizeyou really need to fix nimforum, dom
22:39:13FromDiscord<Recruit_main707> I’ll @ him on discord, he has been active over here recently @dom96 ^
22:39:34FromDiscord<Rika> dadada: can we have code then, im interested in fixing it
22:41:23dadadaleorize: https://pastebin.com/UaYvLHuz
22:41:32dadadaI used treeRepr, because you forbade repr
22:41:39dadadawith repr it was even clearer
22:41:47dadadabasically I generate a simple test proc
22:42:04leorizeyea it's wrong :)
22:42:09dadada(which in my actual code is just a transformation from a real proc that I take in with a macro in the stmtlist)
22:42:17dadadathe proc returns bool
22:42:33FromDiscord<Recruit_main707> I didn’t specify that
22:42:35dadadaso the infix a == b should be no problem
22:42:41FromDiscord<clyybber> > threads are basically more useful the more you need them?
22:42:41FromDiscord<clyybber> Goes for everything in life :p
22:42:48leorizeI really hate nnkStmtList for this
22:42:57leorizesometimes it work as an expression, sometimes it doesn't :P
22:43:33dadada1) written by hand it works
22:43:37dadada2) written by macro it doesn't
22:43:42dadada3) ??? wtf
22:44:02FromDiscord<clyybber> nnkStmtListExpr is what you want
22:44:06leorizeI think you need nnkStmtExpr for this
22:44:12leorizeah yea nnkStmtListExpr
22:44:24dadadawhy are there two and not one that JUST WORKS
22:44:29leorizethough shouldn't the compiler take care of this if the output is untyped?
22:44:34FromDiscord<clyybber> because legacy
22:44:45leorizeI hate the compiler for that too
22:44:55FromDiscord<Recruit_main707> Bc one is an expression I guess :P
22:45:23leorizein the right context nnkStmtList can be an expression :)
22:45:26leorizehow fun
22:46:50FromDiscord<Recruit_main707> Nevertheless, despite this being wonky, if you want it as an expression you should use the one for expression, if not, the other one, that avoids confusing the compiler
22:46:58*Amabella joined #nim
22:47:19leorizeit's a PITA when you are transforming things though
22:47:29leorizelemme try to make a reproduction code
22:47:35FromDiscord<Recruit_main707> (But that should be fixed) and if you ask me, just don’t let nnkStmtList be an expression
22:47:46leorizeusually an untyped output should have the compiler fix all of these issues
22:47:53leorizeso I'm kinda surprised actually
22:48:05dadadahttps://github.com/oilshell/oil/issues/740#issuecomment-624259000
22:48:10dadadahelp me dispell this guys myths
22:48:42dadadahe would make the right choice by selecting Nim and believes in a few wrong "issues" that aren't really issues
22:48:53dadadaI think he confuses Nim with a transpiler
22:49:07dadadaand don't tell him about the Nim bugs :-)
22:49:14*Amabella quit (Client Quit)
22:49:19skrylar[m]nim is a transpiler
22:49:35FromDiscord<Rika> i dont see him mention it
22:50:03dadadano, but I think it's implicit, Vala doesn't hold a candle to Nim
22:50:17leorizedadada: ok now you got a problem
22:50:22leorizeI can't reproduce it
22:50:31skrylar[m]vala does a fine job if you want a C# that is welded to GObject and you have no aspirations of ever supporting windows or mac
22:50:32dadadaleorize: what did you do?
22:51:09FromDiscord<Never Listen To Beef> I dont even know what this guy's point is
22:51:14FromDiscord<Recruit_main707> skylar, I think it’s not, a transpire would grab nim code and spit it’s c clone, but nim optimizes it, that’s why I consider it compiler
22:51:23leorizedadada: generated that exact AST https://play.nim-lang.org/#ix=2kWh
22:51:37skrylar[m]people consider a transpiler anything that doesn't ultimately emit a binary
22:51:43skrylar[m]it outputs c, so its a transpiler
22:51:46leorizeRecruit_main707: the idea of a transpiler is stupid anyway
22:51:55skrylar[m]haxe also (attempts to) optimize, but it ultimately doesn't make exe's
22:52:02leorizeyou can say gcc is a transpiler and you wouldn't be wrong
22:52:08leorizegcc don't make exe either
22:52:13FromDiscord<Recruit_main707> > <skrylar[m]> it outputs c, so its a transpiler
22:52:13FromDiscord<Recruit_main707> Ppl is sometimes dumb though :)
22:52:18FromDiscord<Rika> dadada: imo thats a minor detail, the vala thing
22:52:25FromDiscord<Rika> he's not against the idea
22:52:27skrylar[m]anyway i dunno why having readable C matters in this case, but eh
22:52:44leorizepeople be like: it outputs C, so it has to write C for me
22:52:45skrylar[m]eys not upset at outputting C, ey's upset that the output C looks godawful
22:52:46FromDiscord<Rika> tbh, i'd be against the idea of switching language after ive already translated part of it in the language i chose
22:52:54leorizewe should stop advertising outputting C
22:53:12FromDiscord<Never Listen To Beef> I mean if im not writting asm am i even writting code?
22:53:14dadadaskrylar[m]: transpilers to me are things like coffeescript, I'd like to have different terminology for different things, to me a transpiler makes a 1:1 translation, and a compiler uses the target simply as a means to an end, and not the end
22:53:16skrylar[m]V claims readable C output but it looks just as horrible
22:53:46dadadaskrylar[m]: even if I were to agree with you, what different name for a coffeescript like thingy would you then choose?
22:54:14skrylar[m]¯\_(ツ)_/¯ i dun really need you to agree with me. that's just what people call the things
22:54:22FromDiscord<Rika> i dont believe transpilation is a word at all
22:54:32FromDiscord<Never Listen To Beef> I dont think it really matters
22:54:35FromDiscord<Never Listen To Beef> 😛
22:54:51skrylar[m]i would just call it a meta-language if its whole point is to let you write some other language easier
22:55:01skrylar[m]which is what coffeescript and icedcoffeescript are for
22:55:10FromDiscord<Rika> thats almost like calling translating a dialect into its "ancestor" not translation
22:55:10FromDiscord<Rika> imo
22:55:13FromDiscord<Never Listen To Beef> If you complain about something transpiling vs compiling, shouldnt you complain about writting C instead of asm?
22:55:19FromDiscord<Joshua S. Grant> The hype around V (even the amount of stars it has) blows my mind tbh
22:55:34FromDiscord<Rika> @Joshua S. Grant its just really good advertisment
22:55:40FromDiscord<Rika> which nim doesnt really do
22:55:56skrylar[m]well V is teeeensy and fast, like Go tried to be
22:56:12FromDiscord<Never Listen To Beef> Like to my uneducated brain compiling C results in the same issue of converting from C to asm, unless im dead wrong?
22:56:36FromDiscord<Recruit_main707> But it’s optimized Sam
22:56:42skrylar[m]it also sounds like they want nice stacktraces
22:56:51FromDiscord<Joshua S. Grant> Kinda sad that http://libcello.org/ never took off in this space :^P
22:57:14FromDiscord<Recruit_main707> > which nim doesnt really do
22:57:15FromDiscord<Recruit_main707> We are doing smart propaganda with memes though :p
22:57:23skrylar[m]beef is tempting but good god anything llvm based is a nightmare
22:58:17*Dankrad quit (Quit: WeeChat 1.9.1)
22:58:30*covidian is now known as ii
22:58:31FromDiscord<Rika> whats so bad about llvm
22:58:31*ii is now known as covidian
22:58:45FromDiscord<Joshua S. Grant> @Recruit_main707 Worked for Rust (or at least, made it more known) as-long as we don't get a reputation of "the annoying RIIR" crowd from other communities I'm fine with it / think it's overall a good-thing, yeah.
23:00:18skrylar[m]@Rika well in beefs case it got spotlit by a big youtube channel so people flooded in, but the sole dev is a windozer so none of the advertised nix stuff even works
23:00:27FromDiscord<Recruit_main707> I’m already the nim boi of the server, the memes are another way to torture them
23:00:32skrylar[m]so you have to build this monsterous llvm checkout which takes hours
23:00:52FromDiscord<Joshua S. Grant> What is the excitement for a llvm based Nim; That it's an already thriving ecosystem / near-standard at this point and there's no real maintance costs besides your own stack?
23:00:54skrylar[m]and then it uses an older version, so look forward to a long heave of an updateat some point
23:01:47skrylar[m]something amuses me about how fossil and v almost fit on a floppy but yet are almost an entire devstack
23:02:46leorizeJoshua S. Grant: better debugger integration
23:03:34FromDiscord<Joshua S. Grant> I've guess I just haven't seen it -- but I assume it would be "as competent" as source-to-source compilation / transpiling?
23:03:53FromDiscord<Joshua S. Grant> Like you could still Nim -> LLVM -> C++
23:03:55FromDiscord<Joshua S. Grant> ?
23:04:03*liblq-dev quit (Quit: WeeChat 2.8)
23:04:10FromDiscord<Recruit_main707> llvm is as promising as Vulkan in graphics, it’s definitely the way, but they still don’t offer something that big for people to massively use them and abandon what we have (imho)
23:04:31skrylar[m]eeh when you are tied in to the code generator you can get away with more silly low level stuff, whereas transpiling to c means it has t ofit in whatever c wants you to do
23:04:51skrylar[m]this problem came up with chicken scheme where a lot of engineering went in to conning C to let you do things Scheme allows but C doesn't, like their crazy continuation bullshit
23:04:57FromDiscord<Joshua S. Grant> @Recruit_main707 So the argument is the 'architecture is better' but it's not so-much-so that it's worth throwing everything away for it?
23:05:19FromDiscord<Recruit_main707> That’s more or less how I see it
23:05:47FromDiscord<Joshua S. Grant> "cons-ing C" * lol
23:06:08FromDiscord<Never Listen To Beef> @Recruit_main707 steam did branch mesa to include ACO over LLVM for vulkan to increase performance of game. I dont know the context of your comment though
23:06:15skrylar[m]i dont tend to use debuggers anyway so :f
23:06:25FromDiscord<Joshua S. Grant> Think that was already a pun anyways (scheme x conning) but still; Need to double up!
23:06:46FromDiscord<Recruit_main707> Anyway gn all
23:06:52FromDiscord<Joshua S. Grant> Oh, peace Recruit
23:07:28skrylar[m]i did spend a few moments thinking about how one could have abusive fun with a wasm backend
23:07:35skrylar[m]and looking at how one might HCR wasm
23:08:13FromDiscord<Rika> doesnt nim work well with gdb?
23:08:24FromDiscord<Rika> so the gdb part of the dude's comment isnt too accurate
23:09:10FromDiscord<Rika> why does he need to step through the *generated* code, and not the code that was *written*?
23:09:14FromDiscord<Joshua S. Grant> Can't wait for like 5-10 years from now when we start seeing Nim-x-Wasm games start popping up itch.io and 'just work' like a lot of these native-web-games that get embeded
23:09:36skrylar[m]eh. i'm just curious to try it for stuff really.
23:10:07skrylar[m]but i've seen a research group using wasm to do smart contracts and then the haxe nightmare where they transpile to js to run on charka to livecode 3d apps
23:10:31skrylar[m]or make those crazy time travelling debuggers like elm once had
23:11:02FromDiscord<Joshua S. Grant> I really need to look into HCR more; Have no clue what the actual limitations are -- and I'm imagining "nim, basically one-removed for a scripting-language" for Gamedev ... which I think is being way-too-optimistic at this point, probably lol
23:11:17dadadaleorize: can you show me your code ...
23:11:20*fredrikhr quit (Ping timeout: 256 seconds)
23:11:22dadadaplease?
23:11:35dadadaleorize: I can't get it to work, even when using StmtListExpr
23:12:08skrylar[m]@grant nim makes the process load itself like a dll so when you run a reload function it re-dlsym/getprocs everything and functions go through a jump table
23:12:25skrylar[m]downside is when i tried it on windows, the aftercodereload hook caused segfaults
23:13:06leorizedadada: I sent you the paste?
23:13:17leorizeyou probably missed it
23:13:23skrylar[m]but since you have to sit theough 5-30sec of build time to trip hcr, it's only worthwhile for stuff that has a lot of heavy persistent state like socket connections or textures and stuff
23:13:25FromDiscord<Joshua S. Grant> Hm. sounds interesting; Wonder how this compares to other compiled languages with similar features -- namely CL (no idea how that magic works lol)
23:13:35leorizedadada: https://play.nim-lang.org/#ix=2kWh
23:13:37dadadaleorize: ah, thanks! yeah I was writing about how great Nim is
23:13:39skrylar[m]CL is amazing magic
23:14:05FromDiscord<Joshua S. Grant> Also, gonna change my nick to '@jsgrant' on discord so it's not as-crazy to type out lol
23:14:06FromDiscord<Never Listen To Beef> @Joshua S. Grant i imagine using the nim VM with an underlying nim code base would be a more worthwile method, but idk
23:14:51FromDiscord<Never Listen To Beef> Could just be my Unity brain talking
23:14:54skrylar[m]its basically an interpreter/compiler and when you define an object or a proc, CL runs a compile proc in the image and that outputs a new set of bytecode/assembly and sticks a reference in the image, kind of like how forth has the dictionary of words. so CL is literally a script that writes itself incrementally
23:15:10skrylar[m]the image is then the result of that self-writing
23:15:28skrylar[m]its also why a common lisper will never wait 30 minutes to test a build ^^;
23:15:48dadadaleorize: I'm doing that in a subproc of a macro, there it's NimNode and not untyped, could that be a reason?
23:16:15leorizeno idea
23:16:18skrylar[m](on the off chance you look at smalltalk; don't. their magic is the same as CL.)
23:16:37zacharycarterI've used CL and I don't find it that amazing
23:17:04skrylar[m](declaim (shunned 'zacharycarter))
23:17:06zacharycarteryes lisps and schemes are cool
23:17:07FromDiscord<Joshua S. Grant> I've 'played' with Pharo a few times; And it was pretty fun, but I don't know how much of it was the language or the crazy "almost an operating-system 'ide'"
23:17:25zacharycarterbut the ecosystems and portability is not great
23:17:35zacharycarternor is using emacs
23:18:11zacharycarterthe last time I tried using CL I couldn't even get SDL2 working on my mbp
23:18:16skrylar[m]pharo is kind of trying but they are constrained by being funded by research grants and not actual business users
23:18:17FromDiscord<JSGrant> Think the ecosystem, for being like 30 years old and being a LOT MORE niche than other similarly aged ecosystems is pretty-solid. It's just super-modular / tacked on
23:18:20zacharycarterand it wasn't due to user error it was due to an issue with SDL2 bindings for CL
23:18:29*covidian is now known as ii
23:18:31*ii is now known as covidian
23:18:41skrylar[m]i am using janet bolted on to nim
23:18:49dadadaleorize: private message!
23:19:06zacharycarterThe language should have a better ecosystem if it's been around for 30 years
23:19:19FromDiscord<JSGrant> If it was popular, maybe lol
23:19:43FromDiscord<JSGrant> Most advancements I've seen have been since it's niche growth over the past 10 or-so years
23:19:46zacharycarterI think CL is fine if you want to write everything yourself - lispers claim amazing productivity but they end up authoring everything themselves
23:19:58zacharycarterNim might be more popular than CL at this point
23:20:03FromDiscord<JSGrant> Roswell itself is such a big boon, it's unbelievable to oversell it
23:20:11FromDiscord<JSGrant> Same with Quicklisp
23:20:15FromDiscord<JSGrant> and later qlot
23:20:19skrylar[m]you mean like.. we are doing. (<_< )
23:20:54zacharycarterno we're not
23:21:05zacharycarterwe have the advantage of being able to easily consume C/C++'s ecosystems
23:21:22zacharycarteras well as JavaScripts if that's your thing
23:21:30FromDiscord<JSGrant> Lol, tbh Skylar; Nim is compartiviely very new and CL does like re-implementing stuff over-and-over historically but I don't see that as a bad thing personally (and not what is holding CL back).
23:22:06*Trustable quit (Remote host closed the connection)
23:22:37skrylar[m]CL is held back by the part where all the free runtimes are convinced 70mb hello worlds are not a problem
23:23:22FromDiscord<JSGrant> Gotta be honest, unless on an embedded system -- which CL is not really aiming for ... I kina belong to that club
23:23:26skrylar[m]they are literally blind to ex. gamedevs needs and will attack you if you say hello i am from gamedev how do i do these things i absolutely cannot compromise on and their response is you are too stupid for lisp and should compromise on everything
23:23:35leorizeCL is held back by the fact that you need their super custom setup just to write code :P
23:24:29skrylar[m]treeshakers are also bad because only corporate people use those and if you are a company you shuld just buy frans or lispworks and gtfo
23:25:03skrylar[m]i've seen more than a few developers say they were excited for lisp but the lack of being able to actually use it in a game engine killed the decision in minutes
23:25:26FromDiscord<JSGrant> I personally see a lot of testimonies about agressive 'smug lisp weenies' and the like, but being involved in that orbit more than any other language-family thusfar -- I haven't really seen it.
23:25:33zacharycarterI have
23:25:39skrylar[m]i did in sbcl
23:25:51skrylar[m]i was attacked for even mentioning the importance of c abis
23:26:01zacharycarternot mentioning any names but I think we just had one who said some pretty negative things about Nim
23:26:33zacharycarterregarding it as a language they wouldn't use even if it was the last one in existence
23:26:36skrylar[m]i have this https://git.sr.ht/~skrylar/janim but it needs some smoothing over
23:27:11FromDiscord<Rika> cough
23:27:25FromDiscord<Rika> jsg. should know who you're referring to
23:27:46covidianwhat is the optimum number of pgming languages to have ? like how many ought the universities teach ?
23:27:50FromDiscord<JSGrant> Who I'm refering to or who they are?
23:28:09skrylar[m]covidian: smalltalk =p
23:28:27zacharycarterI'd be more interested in diving further into Chicken / Guile / Racket or checking out scopes honestly
23:28:34zacharycarterthan spending another minute using CL
23:28:51FromDiscord<Rika> who they are
23:29:11skrylar[m]racket seemed okay but.. not a schemer here.
23:29:14FromDiscord<Rika> covidian: that is an unfortunate name
23:29:20skrylar[m]naughty dog uses racket for their custom lispy stuff now
23:29:28*qbradley quit (Ping timeout: 256 seconds)
23:29:58skrylar[m](they also suck now, for unrelated reasons)
23:30:21zacharycarteractually I really want to get more into forth
23:30:43zacharycarterI think the next language I spend a lot of time using will be forth
23:30:50FromDiscord<Rika> how about factor?
23:30:58FromDiscord<Rika> forth's child or something
23:30:58*qbradley joined #nim
23:31:01skrylar[m]factor is kill
23:31:31skrylar[m]dev was eaten by googlebucks
23:31:53FromDiscord<Rika> oof
23:31:59FromDiscord<JSGrant> Also, not trying to write anyone off here; And maybe arguing that they're not agressive is the wrong way to go about it -- I think I'm more-so saying most are not TRYING to be agro / rude. I've just interacted with a fair bit of them (and probably the person in-question (who has personally dm'd me borderline agro)), but I've more-so noticed that hardcore common-lisp people are often both really opinionated and really conservative (about th
23:32:56FromDiscord<JSGrant> skrylar, are they still using Racket? I've heard conflicting stuff; Like evidently they stopped after they were bought out by Sony but then have here-and-there afterwards for the dialogue / interaction system in some games
23:33:10FromDiscord<mratsim> That's true for many communities actually
23:33:15FromDiscord<mratsim> Arch is the same
23:33:24skrylar[m]they used franz lisp when sony bought them, made one game with c++ that sucked, then went to racket and started winning awards again
23:33:27FromDiscord<mratsim> Nim also somewhat
23:33:41skrylar[m]they only use racket to transpile tho
23:34:00skrylar[m](obviously they can't use racket proper because it has funny licensing and they are console devs who can't make weird lgpl-ish compromises)
23:34:31FromDiscord<JSGrant> I know Jak & Daxter used GOAL pretty extensively, which was a scheme-like written in franz lisp to compile to assembly -- allowed them to dynamically load part of the map and get rid of most of the loading-screens
23:34:54FromDiscord<JSGrant> I thought Racket was dual-licensed Apache2 / MIT?
23:35:10skrylar[m]if its apache and mit thats new 'cause when i last checked it wasn't that liberal
23:35:59FromDiscord<JSGrant> Okay, now I have to re-read this because I'm confused more now; lol
23:35:59skrylar[m]i have an unfinished transpiler that turns sexps in to a shitty game-specific language that is suffering to code for lol. need to write another one for glsl
23:36:00FromDiscord<JSGrant> "Racket is primarily distributed under the Apache License, version 2.0 and the MIT License, at your option. Some components of the Racket distribution, including the compiled racket executable for the "Regular" variant of Racket and packages that distribute third-party libraries, are distributed under the GNU Lesser General Public License (LGPL) version 3.0."
23:36:58skrylar[m]well glsl is not bad. but does have some silliness
23:38:34skrylar[m]anyway. no funcoding today. logging and tracing ._.
23:39:37zacharycarterwhat are you working on?
23:39:46skrylar[m]game engine/game
23:40:00zacharycarterooo
23:40:02zacharycarterin Nim?
23:40:07skrylar[m]it is
23:40:09zacharycarternice
23:40:15zacharycarterany screenshots?
23:40:34FromDiscord<Rika> or a repo link ;;
23:40:52FromDiscord<JSGrant> @mratsim Also yeah, I think it's any community that is "moderately successful overtime" just to differeing degrees. And also, probably made worse by if the operating paradigm used is significantly different than what's popular; Because there's people who come in and go "why isn't there x,y,z?" and there very-well maybe be good reasons for it or 'you can do it this way, there's no reason for this' and there's an inherent friction there
23:41:06skrylar[m]zacharycarter: nothing fun https://media.discordapp.net/attachments/643402542000373761/706457747360841849/unknown.png
23:41:49skrylar[m]i read over corona sdk, love2d, libgdx, and less recently heaps.io, and sort of shrugged at how little all these "engines" actually "do"
23:42:09zacharycarterbetter than mine currently
23:42:13skrylar[m]well libgdx has a large pile of random stuff that kind of works
23:42:22FromDiscord<JSGrant> corona just got renamed, didn't it (because all of them unfournate association to covid)?
23:42:27zacharycarterhttps://imgur.com/dQThyOU
23:42:40FromDiscord<JSGrant> Solar2D now evidently
23:42:41zacharycarterwell mine currently has hot reloading / plugins and a fiber based job system
23:42:45skrylar[m]i remember at one point their approach to skeletal animation was "buy a proprietary program with web activation" :| which i guess is fine because monogame's answer to shaders is "just use windows to compile them rofl"
23:42:53zacharycarterhttps://github.com/zacharycarter/frag
23:43:06skrylar[m]mine just has pretty linebreaks
23:43:06zacharycarterworking now on draw call command buffers
23:43:14*krux02 quit (Remote host closed the connection)
23:44:03skrylar[m]debating on doing rich text inside of simpletext. it occured to me that since it already does vbox and hboxes for tex, that changing typefaces is just indexing a typeface array when calculating bounds
23:44:21skrylar[m]and coloring text is just changing a palette code that the GLES-izer reads
23:44:27FromDiscord<JSGrant> Forgot to ask; Is this version of frag mostly a reimplementation or what; Noticed the organization's version was archived still?
23:44:41zacharycarterit's a new version - I wrote the original
23:44:45skrylar[m]ey keeps rewriting it =p
23:45:07zacharycarterwe made an organization because there were two of us involved, but the other guy only ended up writing about 10 lines of code
23:45:16*avatarfighter quit (Remote host closed the connection)
23:45:17zacharycarterit was also my first game project in Nim
23:45:39FromDiscord<JSGrant> News about Frag a few years-ago was my first introduction to Nim, actually. :^)
23:45:40zacharycarterthis is also the final version :P
23:45:56skrylar[m]also need a tweener ._.;
23:45:57zacharycarterhaha, well hopefully this will turn out a lot better
23:46:17FromDiscord<mratsim> coming soon, frag_final_final_v2
23:46:21zacharycarter:D
23:46:38skrylar[m]i just write little modules for particular things and then shunt those on to sourcehut/github
23:46:42FromDiscord<JSGrant> Is the goal still ultimately 2D / 3D or just going with one or the other now?
23:46:43skrylar[m]the heaps stack is the way to go
23:46:54*avatarfighter joined #nim
23:47:01zacharycarterI'm developing a 3d game along side with th eengine
23:47:12FromDiscord<JSGrant> oh sweet
23:47:45skrylar[m]plus adding the font array makes it so emojis and stuff works xD
23:47:53zacharycartermost important feature ^
23:48:17skrylar[m]i saw a game called Max Gentleman and they uh, have a lot of fun with text. Color changes, rainbows, sometimes words wiggle for emphasis.
23:49:52skrylar[m]haven't decided on an image format yet. eyeing avif or jpeg-xl
23:50:18*brainproxy quit (Ping timeout: 260 seconds)
23:50:31zacharycarterhttps://www.gridsagegames.com/blog/ - I love this devblog - really makes me appreciate what can be done with ascii
23:50:59skrylar[m]will have to give it a read.
23:51:16zacharycarterjust scroll through and watch gifs
23:51:22skrylar[m]thought about an ascii display component ... they're not that hard maybe.
23:51:22zacharycarteramazing stuff he does
23:51:54skrylar[m]just a grid that indexes a texture atlas, accept a stack of change codes throughout the logic frame and then issue a pile of vbo updates for changed cells
23:53:32skrylar[m]i worry for the memory use all this vbox/hbox crap does though
23:55:08skrylar[m]i *really* appreciate that beef lets you do defer or destructors tho. `var blah = makesomething() ~ specifically_blow_it_up()` is a thing
23:55:56skrylar[m]when it goes out of scope, blows up, but you can pick which detonator it uses
23:56:29FromDiscord<Rika> hm, nim was supposed to have that at one point no?
23:56:49FromDiscord<mratsim> it does
23:56:53FromDiscord<mratsim> like right now
23:57:02FromDiscord<Rika> `=destroy`1?
23:57:08FromDiscord<Rika> disregard the 1
23:57:14*ftsf joined #nim
23:57:57FromDiscord<KingDarBoja> That's pretty neat!
23:58:14FromDiscord<KingDarBoja> Awesome ASCII stuff
23:59:41leorizeisn't `defer` also the solution?
23:59:54FromDiscord<Rika> yeah defer too