<< 26-10-2020 >>

00:12:54FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/770077459315294228/unknown.png
00:13:06FromDiscord<nikki> benchmark of fib(42) in nim->js->browser, plain js->browser, and nim->c->wasm->browser
00:13:17FromDiscord<nikki> browser is firefox here. chromium had different results but same ordering
00:13:23FromDiscord<nikki> (edit) "results" => "numbers"
00:13:35FromDiscord<ElegantBeef> Nikki you have a problem ๐Ÿ˜„
00:13:51FromDiscord<ElegantBeef> From the outside it looks like you like Nim, but are attempting to validate your usage of it ๐Ÿ˜›
00:13:56FromDiscord<nikki> sorry that i'm not doing exactly what you're doing lol
00:14:07FromDiscord<ElegantBeef> Huh?
00:14:14FromDiscord<nikki> using nimvm ๐Ÿ˜…
00:14:18FromDiscord<ElegantBeef> It's unrealted to nimvm
00:14:39FromDiscord<ElegantBeef> But hey i'm finding bugs left and right in it, so hey, i'll take it!
00:14:46FromDiscord<nikki> xD
00:15:07FromDiscord<nikki> yeah currently the main thing i'm intersted in abt nim is the reflective and metaprogramming capabilities making it easier to have eg. automatic editor ui for my game components and whatnot
00:15:37FromDiscord<nikki> i do that in my c++ engine but it could be so much more ... relaxed. with nim
00:15:56FromDiscord<ElegantBeef> Yea plus nim macros are nicer to look at compared to C++ metaprogramming
00:16:01FromDiscord<nikki> definitely
00:18:46FromDiscord<ElegantBeef> Being able to annotate using `{.serialized.}` or equivelent on fields you want in your editor will be cool
00:19:12FromDiscord<nikki> yeah would be p awesome ๐Ÿ˜ฎ
00:19:35FromDiscord<nikki> i'm wondering if to do the editor ui stuff in karax from nim-js, but then yeah the gameplay itself is nim-c (and also thus runs as a native desktop app and mobile app)
00:20:03FromDiscord<nikki> game state would be marshalable and passable between the nim-c and nim-js in editor
00:20:19FromDiscord<ElegantBeef> Yea we're resolving similar issues
00:20:24FromDiscord<ElegantBeef> Gotta do the same here aswell
00:20:44FromDiscord<ElegantBeef> One way i've got sofar is https://media.discordapp.net/attachments/371759389889003532/770079425756004352/unknown.png
00:20:45*hyiltiz quit (Ping timeout: 240 seconds)
00:21:11FromDiscord<ElegantBeef> But i'm also working on a project where the game uses scripting so i dont want to expose everything
00:23:35FromDiscord<nikki> that's pretty nice
00:23:59FromDiscord<nikki> yeah i keep doing this same thing over and over again. the earliest was c++<->python in https://github.com/nikki93/grall2/blob/68171f4cdad871ca11d749b68d3ef4230a37b8d4/src/Objects/Obstacles/Teleporter.cpp#L181-L186
00:24:00FromDiscord<ElegantBeef> The benefit of using nimscript though is i can generate the code using nim's AST/Macros
00:38:11FromDiscord<nikki> @ElegantBeef to show you what the situation in the c++ stuff looks like
00:38:13FromDiscord<nikki> https://media.discordapp.net/attachments/371759389889003532/770083829490647071/unknown.png
00:38:30disruptekplease stop.
00:38:33disrupteki can only get so hard.
00:38:37FromDiscord<nikki> hahaha
00:39:02FromDiscord<nikki> @ElegantBeef but yeah this would be sooooooo much more chill as nim lol
00:39:40FromDiscord<nikki> anyways you can see what the ui stuff looks like bottom right -- adding some custom inspector ui for sprite. but it also does automatic ui for some of the properties like depth. the position component is pretty simple and fully auto ui. they are all jsonable
00:42:14FromDiscord<nikki> i reduced it as much as possible but there's still so much more noies in c++ than what it'd be like in nim
00:42:25FromDiscord<nikki> (edit) "noies" => "noise"
00:42:54disrupteksounds noies to me.
00:43:13FromDiscord<ElegantBeef> I'm a little interested in if the nimVM can run using WASM
00:43:36FromDiscord<nikki> like compile the vm itself to wasm or compile nim to wasm bytecode to eval at runtime?
00:43:44FromDiscord<nikki> i think you can do the former. there'll be so many layers at that point lol but yeah
00:44:03FromDiscord<nikki> disruptek: tbh, i agree. it's every permutation of the word 'noise' ๐Ÿ˜
00:46:01FromDiscord<Avatarfighter> @ElegantBeef i am willing to pay you 50$ to find out
00:46:21FromDiscord<ElegantBeef> I'm the exact wrong person to ask to do that avatar
00:46:26FromDiscord<Avatarfighter> ok and
00:46:32FromDiscord<ElegantBeef> I can barely compile nim normally nevermind to WASM ๐Ÿ˜„
00:46:38FromDiscord<Avatarfighter> lmao
00:47:07FromDiscord<Avatarfighter> compile nimvm using the compiler nlvm and use wasm as a target ๐Ÿค”
00:52:05*mbomba joined #nim
00:54:05*Tanger joined #nim
00:58:55*hyiltiz joined #nim
00:58:55*hyiltiz quit (Changing host)
00:58:55*hyiltiz joined #nim
01:00:00*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:01:07*njoseph joined #nim
01:03:05*hyiltiz quit (Ping timeout: 240 seconds)
01:03:49*krux02 quit (Remote host closed the connection)
01:06:48FromDiscord<Avatarfighter> So when is pypi getting ported to nim ๐Ÿค”
01:11:58FromDiscord<ElegantBeef> Bad avatar, bad
01:21:04FromDiscord<nikki> my nim->c->wasm setup actually compiles the generated c through a cmake setup with other vendored c libs lol
01:21:18ldleworknim to wasm sounds nice
01:21:41FromDiscord<nikki> on ios a fib(42) benchmark ran 2x as fast on nim->c->wasm vs nim->js
01:21:55FromDiscord<nikki> just my goto quick to code benchmark haha
01:24:45FromDiscord<nikki> sdl rendering is also working
01:24:51FromDiscord<nikki> (edit) "sdl rendering is also working ... " added "(to canvas)"
01:31:41*abm quit (Quit: Leaving)
01:37:26*mbomba quit (Quit: WeeChat 2.9)
01:37:45*Axiomatic joined #nim
01:46:14*astronavt quit (Quit: Leaving)
01:46:32*astronavt joined #nim
01:49:23*ConfuzzledPython joined #nim
01:52:00ConfuzzledPythonAnyone free for a websocket consult? I'm so completely confused.
01:52:26*hyiltiz joined #nim
01:52:26*hyiltiz quit (Changing host)
01:52:26*hyiltiz joined #nim
01:53:23disruptekbusy trying to find my fingerless gloves. it's 53โ„‰ up in this bitch.
01:53:43disruptekwhat's the problem, maybe laughter will warm me up.
01:55:34ConfuzzledPythonI feel like fingerless gloves defeat the point of gloves, but then again my fingertips are cold AF.
01:55:53ConfuzzledPythonLol, basically no matter what I try to do with the ws library I get errors.
01:56:13ConfuzzledPythonI think it is because I'm new to types.
01:56:31ConfuzzledPythonIs there an easy way to paste short code snippits?
01:56:35disruptek~playground
01:56:36disbotplayground: 11an online in-the-browser IDE for simple Nim experiments at http://argentina-ni.ml/ -- disruptek
01:56:36disbotplayground: 11https://play.nim-lang.org the official Nim playground, can run Nim in the browser and share snippets
01:57:10AxiomaticNIice
01:57:25ConfuzzledPythonSweet
01:57:25ConfuzzledPythonhttps://play.nim-lang.org/#ix=2C0t
01:57:59disruptekshould that work?
01:58:19ConfuzzledPythonI mean apparently not because the compiler dislikes it.
01:58:40ConfuzzledPythonBut I really need to figure out how to use websockets.
01:59:29disruptekwell, you need a tutorial on async first.
01:59:45disruptekhttps://play.nim-lang.org/#ix=2C0u
02:00:00disruptekalso, your sense of humor is lousy. i said i wanted to laugh, not cry.
02:00:48disruptekthe first rule of async is, you don't raise exceptions in async.
02:00:59disruptekthe second rule of async is, you don't raise exceptions in async.
02:01:07disrupteki'll let you guess what the third rule is.
02:01:23Axiomatic(The 3rd rule is the same, but in French)
02:01:37*vicfred joined #nim
02:01:53ConfuzzledPythonvous n'levez pas les exceptions a l'async?
02:02:08disruptekoui oui, vous comprende!
02:03:53ConfuzzledPythonil faut que je vous admette que je suis un newb...
02:04:25disruptekje ne comprend pas.
02:04:28ConfuzzledPythonAlso I hope we don't have to continue in french because I'm only slightly better at that then french.
02:04:34ConfuzzledPython*than nim/async
02:04:57disruptekje ne sais pas le francais. i just pretend to pick up chicks.
02:05:17ConfuzzledPythonI said I had to admit that I'm a newb.
02:05:17FromDiscord<19> xD
02:05:24*rockcavera joined #nim
02:05:56ConfuzzledPython@disruptek just say "Je suis excitee a vous rencontrez" and they'll fall in love.
02:05:59FromDiscord<ElegantBeef> It's ok we forgive you, soon you wont be and will be in disrupteks boots ๐Ÿ˜„
02:06:17FromDiscord<ElegantBeef> You dont want to be in disrupteks boots, he doesnt bathe regularly
02:07:03disrupteki'm going to freeze to death if i don't make enough money to buy some propane.
02:07:10disruptekthis is ridiculous.
02:07:29FromDiscord<ElegantBeef> What's cheaper driving south or propane?
02:07:37disruptekpropane.
02:07:41FromDiscord<19> #support_disruptek
02:08:49ConfuzzledPythonI know a way to keep you warm for the rest of your life, unfortunately it involves self immolation.
02:09:00disruptekbentley might go for that.
02:09:09disrupteki'm pretty sure he's gonna eat my face when i die.
02:09:24disruptekmay as well roast it for him.
02:09:27ConfuzzledPythonAnd Beef if I grow up to be a crusty sea dog that'll be great.
02:09:46*disruptek kicks off a rust compilation to warm his cores.
02:10:01disruptekfuck, i wish nim was less efficient.
02:10:43FromDiscord<ElegantBeef> Just run my code
02:10:51AxiomaticOne of the benefits of using an inefficient language is the extra CPU cycles heat up your apartment. Just saying...
02:11:09ConfuzzledPythonJust multithread everything?
02:11:16FromDiscord<ElegantBeef> I'm in Canada and it gets like -10 already so not a terrible plan
02:11:32FromDiscord<ElegantBeef> Need to use inefficient CPU and GPU code
02:11:55AxiomaticAt least put your computer on F@H, and do yourself a favour in heat while searching for a solution to this damn virus.
02:12:09disruptekit's only about 32โ„‰ here right now. gonna be a long winter.
02:12:33FromDiscord<ElegantBeef> What do you use for power?
02:12:34disruptekproblem is, i only have 10a to power the whole trailer.
02:13:06AxiomaticPut all 10a through the CPU, heat is heat
02:13:09disruptekit's on a gfi at least, so when i trip the circuit i don't have to enter the neighbor's house to reset a breaker.
02:13:40FromDiscord<ElegantBeef> Ah you've got your trailer hooked up to someones house... do they know?
02:13:49disruptekit's hard to miss my trailer.
02:13:56FromDiscord<ElegantBeef> Yea but the cable
02:14:15disruptekthe cable is practically buried.
02:15:20ConfuzzledPythonIn all sincerity mylar space blankets are like 9 bucks on amazon, you could probably insulate a whole room with a couple packs...
02:15:27FromDiscord<19> can tell if real or not
02:15:55FromDiscord<19> (edit) "can" => "cant"
02:16:33disrupteki was supposed to move but the electric company fucked up and installed the demarc on the neighbor's property, so i'm not about to move somewhere where i can't get power.
02:17:05FromDiscord<ElegantBeef> Disruptek does live in a trailer with bentley his doggo
02:17:28disruptekit's the one that says, "Bad Motherfucker" on it.
02:17:35disrupteklike i said. can't miss it.
02:19:34disrupteki am working on a new, inefficient version of nim called `dim`.
02:20:12*apahl quit (Ping timeout: 260 seconds)
02:20:42AxiomaticI've got a fork where the results are never correct, called 'grim'.
02:21:09disruptek!repo dim
02:21:09disbothttps://github.com/krisppurg/dimscord -- 9dimscord: 11A Discord Bot & REST Library for Nim. 15 43โญ 5๐Ÿด 7& 3 more...
02:21:16disruptek!repo disruptek/dim
02:21:16disbothttps://github.com/disruptek/dim -- 9dim: 11an experimental language 15 2โญ 0๐Ÿด
02:21:31disruptekoh i didn't push it.
02:22:00*apahl joined #nim
02:26:58disruptekleorize[m]1: is it me or is nimsuggest working much better now?
02:27:06disruptekin the compiler, i mean.
02:27:17*arecacea1 quit (Read error: Connection reset by peer)
02:27:36leorize[m]1probably the latter
02:27:38*arecacea1 joined #nim
02:27:56disruptekgood job.
02:28:03disrupteki'm liking it.
02:45:01ConfuzzledPythonAlright now what am I fucking up? https://play.nim-lang.org/#ix=2C0E
02:45:29ConfuzzledPythonNo error, but it doesn't return anything either
02:47:00disruptekyour triple-quoted string literal appears to be missing quotes.
02:47:55disruptektoo damned cold. ima grab a trashbag and go sleep on a heating vent.
02:49:09ConfuzzledPythonHrm, fixed that, still nothing. It should return a message after I send the auth message.
02:49:41ConfuzzledPythonOkay stupid mistake
02:49:54ConfuzzledPythonIt's looking for json so it needed a {} around it
02:50:10ConfuzzledPythonhow come it doesn't return an error when I try to send an invalid message?
02:50:16ConfuzzledPythonLike shouldn't it scream at me?
02:58:38leorize[m]1disruptek: any suggestions for me to make this output simpler? https://play.nim-lang.org/#ix=2C0G
02:59:21leorize[m]1currently I have to generate two templates because I can't just do a newCall with a sym I already have laying around
03:00:55*shuji joined #nim
03:02:05*hyiltiz quit (Ping timeout: 240 seconds)
03:02:24leorize[m]1@Clyybber can you look at that ^ as well
03:06:20FromDiscord<Rika> ConfuzzledPython: wdym? that's the API's job, not Nim's
03:06:44FromDiscord<Rika> if you send the API an invalid message you check the response for an error message or something
03:06:49FromDiscord<Rika> nim cant catch thta
03:07:07ConfuzzledPythonFair.
03:10:57*arecacea1 quit (Remote host closed the connection)
03:11:59*arecacea1 joined #nim
03:12:47*hyiltiz joined #nim
03:12:47*hyiltiz quit (Changing host)
03:12:48*hyiltiz joined #nim
03:14:08jonjitsu[m]Is there another library besides this for xcb? https://github.com/adrianperreault/nim-xcb
03:18:45*hyiltiz quit (Ping timeout: 240 seconds)
03:22:02*muffindrake quit (Ping timeout: 260 seconds)
03:22:12*ConfuzzledPython quit (Remote host closed the connection)
03:24:14*muffindrake joined #nim
03:26:03*hyiltiz joined #nim
03:26:03*hyiltiz quit (Changing host)
03:26:03*hyiltiz joined #nim
03:28:06disruptekleorize[m]1: output simpler?
03:30:45*hyiltiz quit (Ping timeout: 240 seconds)
03:30:47disruptekyou can do things like ... result = newCall(x.strVal, y.strVal, commandLine, args)
03:31:04leorize[m]1those stuff are gensym-ed
03:31:14leorize[m]1so my macro generates an another macro
03:31:21disruptekyes, well i don't really understand what getAst is doing for you.
03:31:28leorize[m]1and I want it to bind to the symbols I gensym-ed earlier
03:31:39disruptekuse bindSym?
03:32:17leorize[m]1that doesn't work, bindSym doesn't take symbols (funnily)
03:32:34*shuji quit (Ping timeout: 245 seconds)
03:33:05disruptekif you have the symbol, why not just use it?
03:33:32leorize[m]1the symbol is not in a nimnode, so newCall can't use it
03:34:07disruptekwhat is it, then?
03:34:22leorize[m]1my macro generates a helper `_wrapper` (gensym-ed) and a macro.
03:34:54disruptekokay, but gensym yields a nimnode.
03:35:27disruptekanyway, if you can get the name via repr or something, then you can use that to bind. but this just seems way more boilerplate than you need. i think i'm missing some key abstraction.
03:35:45disruptekwhat do the templates do for you?
03:36:33disruptekwhy create the tmp_...36, for example.
03:36:34leorize[m]1yep, but if you slot the gensym-ed symbol into the AST of the `exec` macro (that macro is generated by the macro that generates `_wrapper`), then it becomes a symbol of type `proc(Module, cstring, varargs[cstring, cstring])`, not a NimNode
03:36:55leorize[m]1the template is my "hack". I can obtain a NimNode using `getAst` on a template
03:37:16disruptekmadness.
03:37:27disruptekcan i see the generator?
03:40:49disruptekis this really how normal people write macros?
03:40:56disruptekthis is why dim needs to exist.
03:41:22disrupteksomeone must have just used the :disruptek: emote.
03:41:34disrupteki felt that little twinge in my left testicle.
03:42:03leorizelooks like matrix got laggy again
03:42:28disruptekit's 40-something degrees in here.
03:42:57leorizehere's the very ugly generator: https://github.com/alaviss/setup-nim/blob/ng/src/private/utils.nim#L107
03:43:02disruptekabout 10โ„ƒ for you chuckleheads.
03:43:34disruptekhmm, expectKind ftw
03:43:51leorizeI use expectKind for user facing code
03:43:56disruptekrude.
03:44:21leorizethe generator powers this stuff: https://github.com/alaviss/setup-nim/blob/ng/src/private/actions/core.nim
03:44:35leorizebasically a typesafe wrapper thingy for js modules
03:45:02disruptekfucking ()
03:45:05disruptekuse command syntax.
03:45:31disrupteki get wrapSym now, at least.
03:46:33leorizeI get a lot more compiler issues writing this macro than I'd like tbh
03:47:08disrupteknow you know why i think macros should be removed.
03:47:32*hyiltiz joined #nim
03:47:32*hyiltiz quit (Changing host)
03:47:32*hyiltiz joined #nim
03:48:05leorizeas long as you make it so that I can still write generators like those, I'm fine with it
03:48:48disrupteklol
03:48:59disruptekit's a much thornier problem, honestly.
03:49:07disrupteki'm just naive about the solution.
03:49:37disruptekit took a decade to get nim to this point. i just see what remains, not how far it has come.
03:50:00disruptekbut i stand by my position: macros are mad.
03:50:44disruptekwhat happens if you just ident(wrapper.repr)?
03:50:53disruptekyou're going to have output by then, right?
03:51:02disrupteki'm asking because i've never used this hack.
03:51:18disrupteki'm wondering if this is how i do it.
03:52:52leorizegot undeclared identifier, which makes sense since genSym symbols can only be bound if you have the symbol
03:53:12disruptekwhat does the output look like?
03:53:32disruptekhow could it be undeclared?
03:54:16disruptekyou used repr and not $, right?
03:54:36disruptekbecause $ just emits the name while repr emits the gensym'd identifier...
03:54:57leorizehttps://play.nim-lang.org/#ix=2C0N
03:55:17disruptekyeah, you don't need bindsym here.
03:55:28disruptekjust the identifier as ident(wrapper.repr)
03:55:30disruptekor w/e.
03:55:47leorizeI need bindSym, the _wrapper version is not exported
03:56:12disruptekoh christ.
03:56:28disruptekso why doesn't it work with bindsym... grrr.
03:57:10leorizejust genSym things I guess
03:57:31disrupteksilly.
03:58:05leorizemy walkaround do function at least. The thing looks ugly as hell but at least it works and generates small js
03:58:51disruptekwell, i think it's a defect but there's just so much stuff like this.
03:59:26disruptekyou generate all this output in a single macro?
04:00:27leorizeit's splitted into multiple helpers
04:00:45disruptekoh you might be dynamicBindSym actually.
04:01:00disrupteks/be/need/
04:01:36disruptekbut the preamble is definitely typed by the time your macro is run, right?
04:01:42disrupteksem'd?
04:01:58leorizenope, I take untyped
04:02:17disruptekso how could this work?
04:02:27leorizetyped is a land of madness and I would very much like to not touch it again
04:02:28disruptekyou can't bind to symbols that don't exist.
04:02:34disruptekdude.
04:02:58leorizeall of them are in the same AST tree
04:03:02disruptekput it all in one macro. {.experimental: "dynamicBindSym".}
04:03:27disruptekthey are in the same ast maybe, but that ast, if un-sem'd, may as well be a string.
04:04:15disrupteki guess your template hack works because it forces everything to get sem'd first.
04:05:15disrupteki have drank the kool-aid, but if you don't want to go that route, i think your approach is good enough.
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:08leorizedynamicBindSym works... until it met a symbol with {.varargs.}
04:06:29leorizeI guess will have to make do with my approach for now
04:06:43*supakeen joined #nim
04:07:20disruptekvarargs pragma? what is that?
04:07:32*mbomba joined #nim
04:09:31leorize[m]1translate to varargs in the target language
04:09:43disruptekoh right.
04:10:01disrupteki wonder how much of a future our js backend has.
04:10:32leorize[m]1I think it's plenty useful
04:11:13leorize[m]1at least now I can write my setup-nim action in Nim
04:11:26disruptekwe need some killer apps else some of this stuff could get axed easily in the name of progress.
04:12:14leorize[m]1flywind is playing with it, I think something cool will come around soon
04:15:08FromDiscord<iWonderAboutTuatara> Would just a general utils module be acceptable for fusion?
04:15:11*arecacea1 quit (Remote host closed the connection)
04:15:36*arecacea1 joined #nim
04:15:51FromDiscord<iWonderAboutTuatara> I have quite a few algorithm implementations and such that I use for some competitive programming problems in Nim, like qsort, bsort, etc
04:19:20disruptekgood. we need some wins.
04:21:17*rockcavera quit (Remote host closed the connection)
04:23:59*mbomba quit (Quit: WeeChat 2.9)
04:30:25*fredrikhr quit (Read error: Connection reset by peer)
04:30:39*fredrikhr joined #nim
04:34:27FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2C0S
04:36:25FromDiscord<Gyllou> any game recommendations for good arena shooters....
04:36:46FromDiscord<Gyllou> ๐Ÿ˜„
04:37:00FromDiscord<Gyllou> or am i like 20 years too late for that
04:39:48mipritinygiant: https://play.nim-lang.org/#ix=2C0T
04:41:00FromDiscord<tinygiant> Thanks for the help and quick response!
04:43:43FromDiscord<InventorMatt> you can also do this https://play.nim-lang.org/#ix=2C0U
04:47:25*hyiltiz quit (Ping timeout: 240 seconds)
04:49:02*hyiltiz joined #nim
04:49:03*hyiltiz quit (Changing host)
04:49:03*hyiltiz joined #nim
04:51:58*bung quit (Quit: Lost terminal)
05:10:26*solitudesf joined #nim
05:19:39*waleee-cl quit (Quit: Connection closed for inactivity)
05:30:50FromDiscord<tinygiant> @InventorMatt Awesome, thanks!
05:49:11*NimBot joined #nim
06:06:27*hyiltiz quit (Ping timeout: 240 seconds)
06:08:40*solitudesf quit (Ping timeout: 256 seconds)
06:15:01*Axiomatic quit (Remote host closed the connection)
06:17:23*Axiomatic joined #nim
06:31:49*hyiltiz joined #nim
06:31:50*hyiltiz quit (Changing host)
06:31:50*hyiltiz joined #nim
06:51:59*narimiran joined #nim
06:54:25*hyiltiz quit (Ping timeout: 240 seconds)
06:55:45Yardanico!status
06:55:47FromDiscordUptime - 5 days, 11 hours, and 19 minutes
06:56:08*BarrOff joined #nim
06:59:57*hyiltiz joined #nim
06:59:57*hyiltiz quit (Changing host)
06:59:57*hyiltiz joined #nim
07:00:50FromDiscord<Yardanico> everyone's sleeping ๐Ÿ’ค
07:02:20FromDiscord<alehander42> :))
07:02:22FromDiscord<alehander42> noooo
07:02:32FromDiscord<alehander42> east europe awaek
07:03:36*PMunch joined #nim
07:05:50PMunchGood morning everyone :)
07:07:10supakeenMorning PMunch!
07:07:25supakeenPMunch: I worked on the PEG parser for CLI a tiny bit: https://github.com/supakeen/clip
07:09:13FromDiscord<PizzaFox> does using `result` over return have worse performance?
07:09:41FromDiscord<PizzaFox> looking at the C code nim generates it has a new param for `result` which seems like it would be slightly slower
07:09:53FromDiscord<Rika> result over return usually has better performance
07:10:16FromDiscord<Rika> that is called NRVO in C++ and it's considered an optimization
07:11:31FromDiscord<PizzaFox> interesting
07:11:35PMunchEssentially by using result you can directly set the fields of the object on the stack where the return value would be
07:11:49PMunchInstead of building your object and then copying it over into the return position
07:12:20FromDiscord<PizzaFox> does GCC and nim optimize my code to be as fast as using `result` anyway
07:12:27PMunchsupakeen, cool!
07:12:43PMunchWhat do you mean by "Support GNU parsing (mostly)" though :P
07:12:55FromDiscord<lqdev> i'm still wondering what that "observable stores to 'variable'" warning is
07:13:04FromDiscord<lqdev> there was gonna be a blog post about it
07:13:10FromDiscord<Rika> > does GCC and nim optimize my code to be as fast as using `result` anywayโ†ตthink about this, it can be faster with result ๐Ÿ˜›
07:13:12FromDiscord<lqdev> it still isn't there
07:13:16FromDiscord<nikki> @PizzaFox the result param is a pointer to the original loc on stack where the return value was going to bubble up to
07:13:19supakeenPMunch: There's one super annoying bit in GNU's style of arguments and that's short options with a value such as `-bfoo` where foo is the value for -b.
07:13:31PMunchAaah
07:13:38FromDiscord<Rika> > i'm still wondering what that "observable stores to 'variable'" warning isโ†ตjust a warning about possibly inconsistent behavior when an exception is raised
07:13:41FromDiscord<Rika> afaik?
07:13:44FromDiscord<Rika> or maybe im mistaken
07:13:52FromDiscord<lqdev> it's related to NRVO
07:13:57supakeenSince you're also allowed to pass multiple flags with `-abc` so I have to do some research to look at how they implement this.
07:14:07FromDiscord<nikki> @PizzaFox you can see oldschool C APIs for vector math do sth like this manually by passing out-param pointers
07:14:28FromDiscord<Rika> yeah basically when you raise you would expect the variable to be unmodified but it might be modified due to nrvo or so
07:14:39FromDiscord<Rika> is what i recall, at least
07:14:44FromDiscord<Rika> might be mistaken, as ive said
07:14:52FromDiscord<nikki> @lqdev basically it means if you partially write to result then except, after the exception is caught the partially written state of result is visible
07:15:08FromDiscord<nikki> (for example -- including other ways to observe)
07:15:13FromDiscord<Rika> thanks for confirming that i aint a dumbass lol
07:15:36PMunchsupakeen, AFAIK it's just if option 'a' has an argument then it has to be last in a list of short opts immediately followed by the value.
07:15:59FromDiscord<nikki> under the model of result where result is a new temporary that is atomically copied over the return value only in the end, this wouldn't be observed. so it's leaking that result is an alias of the final return value location
07:16:09supakeenPMunch: Yea so it means I need to 'invert' how it's currently laid out, currently my idea is to have a set of parsers that parse into a table (or perhaps a tree) and then have constraints applied on that.
07:16:23supakeenHowever, it seems better to reverse that and have constraints and generate a parser based on those :)
07:16:40PMunchYeah
07:18:50FromDiscord<PizzaFox> i will award a gold star to anyone who can make a nim arg parser that can emit a man page or bash/fish/zsh completions
07:20:16PMunchPizzaFox, oh that's not a bad idea
07:20:39FromDiscord<PizzaFox> this could be yours โญ
07:20:48PMunchShiny!
07:21:05FromDiscord<Rika> bsah/fish/zsh completions ๐Ÿ‘€
07:21:10FromDiscord<Rika> i'd love that
07:21:33FromDiscord<PizzaFox> i know fish can read man pages to provide autocompletions, not sure if other shells do that
07:21:45FromDiscord<PizzaFox> emitting per-shell completions sounds annoying and prone to errors
07:22:00FromDiscord<PizzaFox> but i've seen other non-nim libraries that can do it
07:22:36FromDiscord<Rika> sounds like a library needs to have functionality to customize the autocompletions as well
07:31:32*vicfred quit (Quit: Leaving)
07:31:38FromDiscord<PizzaFox> rust has clap and clap_generate for arg parsing and shell completions, respectively https://docs.rs/clap_generate/3.0.0-beta.2/clap_generate/
07:35:06PMunchNim of course can output these on compile-time automatically :)
07:35:20FromDiscord<Rika> but no one has made it, no?
07:37:05PMunchNo..
07:41:29supakeenmrm clap vs clip
07:52:46PMunchHmm, when making PRs to the Nim repo now should I make them towards master or devel
07:54:20narimiranPMunch: huh?
07:55:58FromDiscord<Yardanico> @PMunch master doesn't exist anymore
07:56:17FromDiscord<Yardanico> well it does, but it's dead
07:56:27*Jjp137 quit (Ping timeout: 260 seconds)
07:57:44FromDiscord<lqdev> @nikki ah, thanks
07:58:16PMunchOh really? Okay
07:59:59*BarrOff quit (Ping timeout: 260 seconds)
08:00:07narimiranPMunch: who are you and where is the real PMunch?
08:00:19PMunchHaha, what do you mean?
08:00:19*mmohammadi9812 joined #nim
08:00:33narimirani wouldn't expect of you to ask that kind of questions
08:00:56PMunchHaha, I don't actually make that many PRs to Nim itself
08:06:42*hyiltiz quit (Ping timeout: 256 seconds)
08:08:00*mbomba joined #nim
08:13:21*hyiltiz joined #nim
08:13:21*hyiltiz quit (Changing host)
08:13:21*hyiltiz joined #nim
08:13:56*mbomba quit (Quit: WeeChat 2.9)
08:15:46FromDiscord<alehander42> i think to `devel`
08:16:15FromDiscord<alehander42> oh
08:16:26FromDiscord<alehander42> working in my
08:16:29FromDiscord<alehander42> nilcheck things
08:16:34FromDiscord<alehander42> trying to see why a test fails
08:16:52FromDiscord<alehander42> hopefully in the evening, would try more on optimization
08:24:40FromDiscord<PizzaFox> im interesting in playing around with nim documentation generation, does nim have some way to generate json instead of html so i can make my own docs?
08:25:05FromDiscord<PizzaFox> i have found it https://nim-lang.org/docs/docgen.html#document-types-json
08:33:15Oddmongerhello archlinux users: is nim 1.4.0 package ok ? I had switched to gitnim when there were troubles with arch package, but it seems history
08:33:48FromDiscord<Yardanico> arch package has bugs generally
08:33:57Oddmongerah
08:33:57FromDiscord<Yardanico> but they probably won't affect you
08:34:13FromDiscord<Yardanico> https://bugs.archlinux.org/?project=5&string=nim cross-compilation and no nimsuggest source files
08:34:21Oddmongeri've seen git nim 1.4rc was 1.3.7
08:34:41FromDiscord<Yardanico> well yes that's right
08:34:50FromDiscord<Yardanico> nim development versions have odd versions
08:34:56FromDiscord<Yardanico> 1.3.1, 1.3.3, 1.3.5, 1.3.7 etc
08:35:01*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:36:00Oddmongeri mean, arch ยซnim -vยป says 1.4.0, and git nim -v says: 1.3.7 (but it is in 1.4rc branch)
08:36:37FromDiscord<Yardanico> well for gitnim you should ask @disruptek :)
08:36:48FromDiscord<Yardanico> but it should have 1.4 already
08:36:55Oddmongerah he's the evil man behind this :)
08:37:09FromDiscord<Yardanico> !repo gitnim
08:37:10disbothttps://github.com/disruptek/gitnim -- 9gitnim: 11choosenim for choosey nimions 15 6โญ 0๐Ÿด
08:37:13FromDiscord<Yardanico> exactly
08:45:14*hyiltiz quit (Ping timeout: 256 seconds)
08:51:14FromDiscord<Yardanico> https://youtrack.jetbrains.com/issue/NIM-3
08:51:20FromDiscord<Yardanico> sent a long message, see http://ix.io/2C4M
09:00:05*stisa[m] quit (Quit: Idle for 30+ days)
09:05:07AraqPizzaFox: yeah indeed it has but I still consider it a bad idea
09:05:34FromDiscord<PizzaFox> why
09:05:36Araqinstead parse the HTML, it's a tree structure of a markup language so stuff like **bold** becomes <b>bold</b>
09:06:03FromDiscord<PizzaFox> that seems bad
09:06:09Araqwheras in JSON is becomes either **bold** or <b>bold</b>
09:06:19Araqneither of which are JSON.
09:06:36FromDiscord<Yardanico> @PizzaFox nim's generated HTML is strict
09:06:40FromDiscord<PizzaFox> the json has html in it??
09:06:41FromDiscord<PizzaFox> what?
09:06:51Araqso JSON is by design an incomplete format for this purpose
09:07:03FromDiscord<Yardanico> you know that nim's docs are XHTML right? @PizzaFox
09:07:10FromDiscord<Yardanico> so they are easy to correctly parse
09:07:32FromDiscord<PizzaFox> not as easy as json
09:07:39Araqinstead of parsing HTML you would parse JSON, except that the JSON is incomplete, by construction. A bad idea.
09:07:48FromDiscord<PizzaFox> looking at tools from other ecosystems (ex. typedoc)
09:07:51FromDiscord<PizzaFox> you can generate json instead of html
09:08:04Araqbut do what you want, I failed to convince others before
09:08:05FromDiscord<PizzaFox> their html generator is just a single implementation of a json consumer
09:08:13Araqyeah yeah yeah
09:08:18FromDiscord<PizzaFox> this seems like a failing on nim's part
09:08:28Araq1. we do support 'nim jsondoc'
09:08:38Araq2. I personally think it's a bad idea.
09:09:03FromDiscord<hobbledehoy> Brings back the pain of converting the html in json to discord markdownโ†ตfound it good though since I could keep the formatting of the docs
09:09:26FromDiscord<PizzaFox> i will take this into consideration
09:09:32FromDiscord<PizzaFox> next question
09:09:53FromDiscord<PizzaFox> i have looked at the js code in nim docs and i am not pleased
09:10:03FromDiscord<PizzaFox> i will make a PR to make it awesome
09:10:18FromDiscord<PizzaFox> however, the more awesome the JS code gets the less browser compatibility you get
09:10:28FromDiscord<Yardanico> wdym by "awesome" though?
09:10:38FromDiscord<Yardanico> better performance?
09:10:41FromDiscord<PizzaFox> in ES2015 (ES6) the const and let operators were added
09:10:56FromDiscord<PizzaFox> prior to that variables were declared with `var` and are totally mutable
09:10:58FromDiscord<Yardanico> yes, so how this will make it better? :)
09:11:20FromDiscord<PizzaFox> (edit) "const" => "`const`" | "let" => "`let`"
09:11:30Araqinstead rewrite the JS code to be Nim code
09:11:35Araq;-)
09:11:39FromDiscord<Yardanico> yeah I wanted to say that too
09:11:41FromDiscord<Yardanico> nim has a js backend
09:11:44FromDiscord<PizzaFox> if you think i am upset with the state of the current js code
09:11:48FromDiscord<haxscramper> @PizzaFox you might try to just write own documentation generator. I'm thinking about doing it too, so far I only wrote example for compiler pass: https://gist.github.com/haxscramper/8821819221b1d73866e4aed306147f0c - maybe you can go from here
09:12:06FromDiscord<PizzaFox> the nim js target is very bad at generating efficient js code
09:12:11FromDiscord<Yardanico> is it?
09:12:13FromDiscord<PizzaFox> yes
09:12:23Araqno it isn't.
09:12:24FromDiscord<Yardanico> karax is on-par with other similar frameworks by performance for example
09:12:26FromDiscord<haxscramper> Or maybe not, I'm not sure if I made this thing even works correctly
09:12:29FromDiscord<Yardanico> don't look at the JS itself
09:12:31FromDiscord<Yardanico> look at the performance
09:12:35FromDiscord<Yardanico> more code != less performance
09:12:42FromDiscord<PizzaFox> not necessarily true
09:12:48FromDiscord<Yardanico> but not necessarily false
09:13:00FromDiscord<PizzaFox> if you are declaring a billion typed array variables at the top at every nim js file you are going to get worse performance
09:13:01FromDiscord<Yardanico> nim's JS is mostly statically typed so it's much easier for JITs to optimize it
09:13:25AraqPizzaFox: top level statements are executed *once*
09:13:38FromDiscord<PizzaFox> let me play around with the JS snippet on the docs page
09:13:50FromDiscord<PizzaFox> i will come back with awesome es2020 code and potentially awesome nim code
09:14:32FromDiscord<PizzaFox> btw
09:14:35FromDiscord<PizzaFox> regardless of what happens
09:14:43FromDiscord<PizzaFox> i am submitting a PR that fixes the dark theme bug on theindex.html
09:15:09Araqok, thanks
09:15:40FromDiscord<flywind> How can I manage the states between different components in Karax? I'm write a UI framework based on `Karax`. โ†ตI want to pass `index` from `Menu` to `MenuItem` interally. React use `useState` to pass Context. Are there some solutions?
09:15:50FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2C4V
09:16:23Araqflywind: I don't know. Use a global variable? lol
09:17:51AraqI never got the point of stateful components, they don't work well with DOM diffing and they don't make anything easier to manage. Feels like turning into the dark ages of OOP where you can "hide" state but never its resulting bugs
09:20:50FromDiscord<flywind> `MenuItem` needs to know whether itself is selected from parent VNode `Menu`. Then It could trigger some callbacks.
09:21:52FromDiscord<flywind> Ok, I will just do some style things. States will be solved by users.
09:25:57FromGitter<timotheecour> > Use a global variable โŽ โŽ that works well in practice
09:31:41FromDiscord<flywind> I don't think that will work for a UI library. Users may use `Menu` many times. Each `Menu` need a context object. It can't be controlled by UI framework unless allowing ugly styles.
09:32:32FromDiscord<flywind> for example `Menu` return `(VNode, ctx)`. Or let users to create `ctx` to `Menu` function.
09:32:57FromDiscord<flywind> (edit) "for example `Menu` return `(VNode, ctx)`. Or let users to create `ctx` ... to" added "and pass that"
09:34:40FromDiscord<flywind> Like this:
09:34:42FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/770218834752962570/unknown.png
09:36:22*Tanger quit (Quit: Leaving)
09:36:24FromDiscord<flywind> I can't use `template` as item in Karax. Otherwise I can `inject` ctx object. So children node can use this context object.
09:36:46FromDiscord<PizzaFox> here is my awesome es2020 rewrite of the js to run on doc pages https://play.nim-lang.org/#ix=2C55
09:38:00FromDiscord<PizzaFox> this will cut your browser support to only people running very recent versions of browsers
09:38:44FromDiscord<PizzaFox> https://zws.im/โ€โ€โ€โ€โ€โ€โ€Œโ€Œโ€Œโ€Œโ€Œโ€Œโ€โ€Œโ€โ€Œ
09:38:47FromDiscord<PizzaFox> optional chaining ftw
09:39:03FromDiscord<PizzaFox> if you tell me minimum javascript version to support
09:39:06FromDiscord<PizzaFox> i will rewrite this
09:39:07FromDiscord<Yardanico> I don't think that we want cutting off support of older browsers
09:39:13FromDiscord<PizzaFox> tell me an ecmascript version
09:39:17FromDiscord<Yardanico> Nim is about supporting a lot of platforms
09:39:45FromDiscord<Yardanico> Well, ask @Araq :)
09:40:40FromDiscord<PizzaFox> so do we just wait until he responds or
09:41:28FromDiscord<Yardanico> but generally what about not changing the requirements for that js? There's not much of it anyway
09:41:35FromDiscord<PizzaFox> that is true
09:41:41FromDiscord<PizzaFox> syntactic sugar is fun tho
09:41:41*fxn joined #nim
09:41:44FromDiscord<PizzaFox> i will rewrite for es2015
09:41:50FromDiscord<PizzaFox> aka when js got good
09:42:10*natrys joined #nim
09:42:15*hyiltiz joined #nim
09:42:15*hyiltiz quit (Changing host)
09:42:15*hyiltiz joined #nim
09:42:17FromDiscord<PizzaFox> 92% of browsers support it, compared to the 80% from above
09:42:20FromDiscord<hobbledehoy> what about writing it in nim?
09:42:25FromDiscord<Yardanico> ^^
09:42:35FromDiscord<Yardanico> nim's js backend is not as bad as you think it is
09:42:44FromDiscord<PizzaFox> i am the javascript understander
09:43:04FromDiscord<PizzaFox> and it is my firm belief that this nim compiler automaton can not produce better code than me, an intellectual js dev
09:43:06FromDiscord<hobbledehoy> couldn't be too difficult to write the bindings for localStorage?
09:43:23FromDiscord<Yardanico> I just don't see the need for newer JS sugar for that simple small js script
09:43:28FromDiscord<PizzaFox> i am not defending the js sugar
09:43:33FromDiscord<Yardanico> It would make more sense to rewrite it in Nim
09:43:42fxnhi, I am doing the hello world in exercism.io, and example code has a procedure with a string literal in the body, and that works. Why? I know about the result variable, and about the return statement, but have not seen in the docs last expressions documented as they work in Perl or Ruby
09:43:48FromDiscord<PizzaFox> localstorage returns null or string for the `.get()` call, not sure the best way to type that in nim
09:44:01FromDiscord<PizzaFox> (edit) "localstorage" => "`localStorage`" | "null" => "`null`" | "string" => "`string`" | "`.get()`" => "`localStorage.get()`"
09:44:32FromDiscord<Yardanico> Check out https://nim-lang.org/docs/jsffi.html
09:44:32FromDiscord<hobbledehoy> Option[string] wouldn't it be?
09:45:01FromDiscord<PizzaFox> that seems like a logical way to do that, but idk if that compiles to a null check in js @hobbledehoy
09:46:33FromDiscord<PizzaFox> i will work on this rn and report my findings
09:50:58FromDiscord<Rika> fxn nim also has implicit return or whatever its called, like in rust
09:53:18fxngotcha! may send a doc patch then
09:54:53FromDiscord<Rika> im pretty sure its documented in the manual, unless you're changing another doc
09:56:40fxnI could not find it, neither in the tutorials not in the reference manual, maybe I missed it
09:57:38fxnanother question, does `func` improve performance (generally speaking) because the compiler can assume stuff? or is it just a defensive way to say: it should not, if it does please do not compile
09:58:46fxnin principle I guess I'd write `func` unless there are side-effects, also signals no side effects to readers of the code
09:59:58FromDiscord<PizzaFox> how can i type `document.documentElement` as an `Element` with nim to js compiler
10:00:07FromDiscord<PizzaFox> types for `Document` are missing it
10:00:35FromDiscord<PizzaFox> despite it being around since chrome version 1
10:02:34FromDiscord<hobbledehoy> @PizzaFox don't know about that issue but here is how to use local storageโ†ตhttps://play.nim-lang.org/#ix=2C5kโ†ตnull checks just become nil checks
10:02:41FromDiscord<PizzaFox> yeah i have already solved that issue
10:02:49FromDiscord<hobbledehoy> ah ok then
10:02:50FromDiscord<PizzaFox> now i am dealing with nim types of js things being very broken
10:02:58FromDiscord<PizzaFox> Element is also missing the `dataset` property
10:03:04FromDiscord<PizzaFox> (edit) "Element is also missing the `dataset` property ... " added "as well"
10:04:03*abm joined #nim
10:05:59FromDiscord<PizzaFox> also is it cooler to write `thing == nil` or `thing.isNil()`
10:07:58*Jjp137 joined #nim
10:09:16mipriPizzaFox: something like https://play.nim-lang.org/#ix=2C5p
10:09:39FromDiscord<PizzaFox> is there no way to extend the type of the actual document or smth
10:09:54FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2C5q
10:10:13miprino AFAIK, but if you define a proc that takes a Document, UFCS will get you most of the way there
10:10:44Araqfxn, complex question. 'func' is also inferred for you as .noSideEffect. .noSideEffect is increasingly used by the optimizer but I doubt it's currently measurable
10:13:28*mmohammadi9812 quit (Ping timeout: 256 seconds)
10:15:24*mmohammadi9812 joined #nim
10:20:14*krux02 joined #nim
10:20:45FromDiscord<PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2C5y
10:21:42FromDiscord<PizzaFox> i decided not to do mipri's ufcs idea because it even after marking the procs as inline they still werent getting optimized to the proper js code
10:24:13*stefantalpalaru quit (Ping timeout: 264 seconds)
10:26:38*GuestBased joined #nim
10:27:05FromDiscord<PizzaFox> sent a code paste, see https://paste.rs/sT4
10:27:05FromDiscord<PizzaFox> this should be valid nim code
10:27:23FromDiscord<PizzaFox> but something is deeply fucked with the types for `event.target`
10:28:31narimiran18,000 commits!!!
10:28:32*nclark joined #nim
10:28:46FromDiscord<PizzaFox> 18000 commits and js types are still broken
10:28:48narimirancongrats beef331
10:29:50*nclark quit (Client Quit)
10:31:13*nrclark joined #nim
10:31:30*agent0x00 joined #nim
10:31:53nrclarkso I'm just getting started with Nim, and Im
10:32:07nrclark*I'm having some problems getting my toolchain up and running
10:32:22*mmohammadi9812 quit (Ping timeout: 246 seconds)
10:33:24*mmohammadi9812 joined #nim
10:33:36nrclarkWhen I install the toolchain (either using ./install.sh or using ./koch install), none of the companion tools (nimble, nimpretty, etc) get installed
10:34:23fxn@Araq awesome, so I do not know what's idiomatic, but like the idea of defining pure procedures with func so that readers of the code know upfront there are no side-effect, and use `proc` only if there are
10:34:36FromDiscord<Rika> > 18000 commits and js types are still brokenโ†ตbecause it isnt really the priority right now
10:35:53nrclarkrunning "./install.sh $SOME_DIR" creates "$SOME_DIR/nim/", with a subdirectory of "$SOME_DIR/nim/bin/". And in that folder, the nim compiler is installed. So that all seems OK. But none of the tools are installed along with it :(
10:36:17FromDiscord<BAsedCeo> ahem
10:37:29narimirannrclark: what about `./koch tools`?
10:37:50nrclarknarimiran: that compiles the tools OK. But it doesn't install them.
10:37:57Araqfxn, it is idiomatic to that yes, plenty of people prefer 'func' too.
10:38:20Araqnrclark, while you're not supposed to ever use 'install.sh', there might a problem here indeed
10:38:32narimirannrclark: so, they are there, but not in the correct `bin` folder?
10:38:38Araqas install.sh is the blueprint for package managers...
10:38:51nrclarkHere's a pastebin for the steps I ran, starting from an empty folder
10:38:53nrclarkhttps://pastebin.com/VXADtgte
10:39:52nrclarkat the end of that, the tools are built and live in bin/ inside of the git directory
10:39:58nrclarkbut they don't get installed into the install directory
10:44:00*GuestBased quit (Quit: Connection closed)
10:44:14*Vladar joined #nim
10:44:40nrclarkAraq "install.sh $SOME_DIR" and "./koch install $SOME_DIR" behave the same way, as far as whether the tools get installed
10:45:05nrclarkalso this is true for me using the binary tarball from nim-lang.org
10:46:18narimiran`cd dir_you want`, and then to the remaining steps? :)
10:46:32*lritter joined #nim
10:52:06FromDiscord<BAsedCeo> hey @PizzaFox may I ask you something about JS, since you seem so knoweldgeable
10:54:00FromDiscord<PizzaFox> yeah sure
10:54:22FromDiscord<PizzaFox> i am the js understander
10:54:25FromDiscord<BAsedCeo> @PizzaFox, you bubbling lowlife nigger faggot with 3 neurons and 2 synapses, you creation of kikery and satan, waste of God, drooling retard, mentally damaged faggot that likes nigger cocks up his ass and foreksin down his throat, may your life be miserable in hell you insufferable moron, may you take JS with you, and get fucked by it in the afterlife
10:54:37FromDiscord<PizzaFox> what
10:54:46Araqmoderation!
10:58:14PMunchUnfortunately I'm only a moderator here on IRC and not on Discord..
10:58:37*natrys quit (Ping timeout: 246 seconds)
10:59:46FromGitter<gogolxdong> Is there a way to get strVal of untyped in template?
11:01:09Araqwhat's the context?
11:01:59FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f96aca7c990bb1c3931632a]
11:02:14*stefantalpalaru joined #nim
11:03:40FromGitter<gogolxdong> Construct variable and literal value at the same time in a template .
11:04:58FromGitter<gogolxdong> It also hints invalid token: _ (\95) if I want `name _demuxer_class`
11:06:09FromGitter<gogolxdong> call as : `aa(h264)`
11:10:31*fxn quit (Remote host closed the connection)
11:11:43AraqI'd use a macro instead
11:15:55FromDiscord<Vindaar> doesn't `astToStr` work in this case?
11:16:03FromGitter<Araq> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f96aff2eb82301c1a4db8cf]
11:16:57AraqVindaar: yeah but the underscore separator doesn't work either and who knows how complex this thing will become
11:17:08Araqso a macro seemed appropriate
11:18:53FromDiscord<Vindaar> Yes, I agree
11:20:06*dddddd quit (Ping timeout: 260 seconds)
11:20:59FromDiscord<flywind> I add lots of blocks to the code that `Karax` generates. And now it works.
11:21:04FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/770245604977934356/unknown.png
11:21:52narimirani should probably know this, but.... is there a way to specify which nim executable to use when doing `koch boot`?
11:22:34FromGitter<gogolxdong> astToStr doesn't work , hints undeclared indentifier: 'h264', I'm trying to write what expanded in C macros. Macros construction are still hard to remember in Nim, though I've write a similiar one.
11:30:39*dddddd joined #nim
11:34:22*hyiltiz quit (Ping timeout: 260 seconds)
11:34:27*agent0x00 quit (Quit: WeeChat 1.9.1)
11:45:46*mmohammadi9812 quit (Ping timeout: 256 seconds)
11:45:54*mmohammadi9812 joined #nim
11:48:25*rockcavera joined #nim
11:53:02*mmohammadi9812 quit (Ping timeout: 260 seconds)
11:56:45*nrclark quit (Quit: My MacBook has gone to sleep. ZZZzzzโ€ฆ)
11:57:04*mmohammadi9812 joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:37*supakeen joined #nim
12:12:42*hyiltiz joined #nim
12:12:42*hyiltiz quit (Changing host)
12:12:42*hyiltiz joined #nim
12:18:06*Vladar quit (Remote host closed the connection)
12:19:24*hyiltiz quit (Ping timeout: 272 seconds)
12:19:36*BarrOff joined #nim
12:35:15PMunchhttps://github.com/nim-lang/Nim/pull/15729
12:35:16disbotโžฅ Implements streams for sockets
12:48:56Zevvand we want them async
12:49:05Zevv\o/
12:50:36PMunchShould be very simple to do
13:12:18PMunchWait, is there an async stream API?
13:20:06Araqyes there is and it considered broken by some people
13:20:11Araq*it is
13:20:18Araq(but then what isn't...)
13:25:39*hyiltiz joined #nim
13:25:39*hyiltiz quit (Changing host)
13:25:39*hyiltiz joined #nim
13:26:19*TomDotTom joined #nim
13:27:32PMunchError: type mismatch: got <proc (s: Stream){.gcsafe, locks: <unknown>.}> but expected 'proc (s: Stream){.nimcall, gcsafe.}'
13:27:32PMunch.tag effects differ
13:27:34PMunchUhm..
13:32:25*hyiltiz quit (Ping timeout: 240 seconds)
13:45:40disruptekchrome will save us all.
13:46:10PMunchHuh?
13:46:54disruptekit puts heat into my 10โ„ƒ trailer.
13:47:32disrupteka nimble rant might generate some warmth, too. which do you prefer?
13:49:32PMunchHaha, are you using Chrome as a heat source? :P
13:49:44disruptekungoogled-chromium compilation, yes.
13:49:55PMunchAah compiling it!
13:50:01PMunchYeah that'll output some heat
13:50:08disruptekrunning it just isn't very inefficient, but compiling it is.
13:55:25PMunchIs it inefficient, or is there just a lot to compile?
13:55:56disruptekmost of what we compile, we don't use. face it.
13:58:14disruptekPMunch: what are you doing here, dude? i, like, never see you.
13:58:17*hyiltiz joined #nim
13:58:18*hyiltiz quit (Changing host)
13:58:18*hyiltiz joined #nim
13:58:33PMunchWhat do you mean? I'm here almost every single day :P
13:58:42disruptekyou're avoiding me, then.
13:58:59PMunchI'm not!
13:59:01disruptekis it dark all the time or light all the time, where you are?
13:59:05disrupteki can't remember.
13:59:21PMunchRight now we're in the transition period
13:59:28PMunchFrom light to dark
13:59:31disruptekhold on, i gotta drain the main vein into a bottle. brb
13:59:51PMunchSo days are getting shorter and shorter every single day
14:00:38ForumUpdaterBotNew thread by Clonk: Testament & module, see https://forum.nim-lang.org/t/6987
14:01:44disruptekwhat activities do you have in the permadark that you don't have elsewhen?
14:02:01PMunchDepression and staying indoors pretty much
14:02:24PMunchI mean it's dark and cold outside, so what else would you do
14:02:26disrupteksame.
14:03:05*hyiltiz quit (Ping timeout: 240 seconds)
14:04:08disrupteki think we should come up with some activities for you folks.
14:04:22disruptekstuff that you can look forward to when the sun is shining.
14:07:10FromDiscord<tinygiant> sent a long message, see http://ix.io/2C6C
14:07:51disrupteki've done a parseUrl and then check to see if scheme exists.
14:07:57disruptekno scheme, no url.
14:08:16FromDiscord<tinygiant> Ok, thanks, I'll give that a shot.
14:08:50disruptekit's lazy but it basically works.
14:09:28*arecacea1 quit (Remote host closed the connection)
14:09:32disruptekif your paths are well-formed, you can just check for //.
14:09:58*arecacea1 joined #nim
14:11:39PMunchBe a touch careful with that if you plan on running it on Windows though: https://play.nim-lang.org/#ix=2C6D
14:11:47PMunchScheme will return the drive letter
14:12:01disruptekawesome, thanks.
14:14:35FromDiscord<tinygiant> PMunch, yup, just figured that out. It's marking my paths as urls.
14:15:06FromDiscord<ThothLoki> sent a code paste, see https://play.nim-lang.org/#ix=2C6F
14:16:30FromDiscord<lqdev> that's because `PEXA_BTC` isn't a string.
14:16:57FromDiscord<lqdev> have you looked at jsonutils yet? https://nim-lang.org/docs/jsonutils.html
14:17:27disruptekjsonutils should be dragged out behind the barn and told to put its head down.
14:17:46Prestigethat bad eh?
14:18:33PMunchWhy don't you like it disruptek?
14:18:35FromDiscord<ThothLoki> i have not looked at jsonutils. i am just importing json right now
14:19:09disrupteki think the main reason i hate it so much is that i read the source.
14:19:39*hyiltiz joined #nim
14:19:39*hyiltiz quit (Changing host)
14:19:39*hyiltiz joined #nim
14:19:39PMunchHaha :P
14:19:59disrupteki honestly have no idea what it does.
14:20:29disruptekit's dogshit, through and through, balls to bones.
14:21:37FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2C6H
14:22:24FromDiscord<ThothLoki> @lqdev so PEXA_BTC isnt a string, from what i can see, it should return an array. does that sound correct to you?
14:22:39PMunchWhat's so bad about it? (Haven't looked at the source in case it's blatantly obvious)
14:22:40FromDiscord<lqdev> @ThothLoki `getStr` returns a string.
14:23:25FromDiscord<ThothLoki> i know but `let name = parsedObject["PEXA_BTC"].getStr()` (nix the getStr()) should be returning an array based on the json that is coming out
14:23:40FromDiscord<ThothLoki> does that sound correct to you?
14:23:54FromDiscord<lqdev> no
14:23:55FromDiscord<lqdev> https://nim-lang.org/docs/json.html#getStr%2CJsonNode%2Cstring
14:23:58FromDiscord<lqdev> it returns a string
14:24:01FromDiscord<lqdev> always
14:24:55FromDiscord<ThothLoki> sent a code paste, see https://play.nim-lang.org/#ix=2C6L
14:25:26FromDiscord<lqdev> yea it it
14:25:27FromDiscord<lqdev> (edit) "it" => "is"
14:25:41FromDiscord<lqdev> https://nim-lang.org/docs/json.html#%5B%5D%2CJsonNode%2Cint
14:25:49FromDiscord<lqdev> you can index a JSON array using []
14:25:55FromDiscord<tinygiant> No expert here, but I just went through something like this. Doesn't it return a JsonNode (possibly Jobject or JArray)?
14:26:13FromDiscord<ThothLoki> thats my thought too
14:26:45FromDiscord<ThothLoki> i wonder if i need to go the way of `let name = parsedObject["PEXA_BTC"].newJIArray()`
14:26:56FromDiscord<ThothLoki> then handle the array
14:29:55*solitudesf joined #nim
14:30:24FromDiscord<lqdev> no.
14:30:32FromDiscord<lqdev> it will just return a JsonNode whose kind is JArray
14:30:39FromDiscord<lqdev> because that's what your damn JSON is
14:31:16FromDiscord<ThothLoki> i just removed `getStr()` and it is spitting out what i want
14:31:22disruptekHOLY SHIT
14:32:26Zevvwut
14:34:28*stefantalpalaru quit (Changing host)
14:34:28*stefantalpalaru joined #nim
14:35:39FromDiscord<ThothLoki> he is probably just making fun of my slow learning of this language
14:39:22Prestigedisruptek: bottle overflow?
14:40:19disrupteki'm at about 2850ml. well within safe capacity limits.
14:40:40PMunchDo I even want to know what's in the bottle?
14:41:16disruptekyou'd be pissed.
14:42:11FromDiscord<ThothLoki> "pissed"
14:44:54FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2C6Q
14:47:05FromDiscord<ThothLoki> well, it looks like it actually parsed the url
14:48:14FromDiscord<tinygiant> There's something wonky about the `path` variable in the first example. the `url.path` is showing the entire url in quotation marks, where the second example does not have quotation marks around the values.
14:48:44FromDiscord<ThothLoki> i wonder if it is taking the `path` as a string literal and not seeing it as a url
14:49:11disruptekof course.
14:49:23disruptekdon't $ your json string, getStr it.
14:49:38FromDiscord<tinygiant> Will do, thanks.
14:49:52disruptekyou're not trying to /render it as json/, you're trying to /get the string value of it/
14:50:17disruptek!repo jsonconvert
14:50:18disbothttps://github.com/disruptek/jsonconvert -- 9jsonconvert: 11lazy json node conversion 15 2โญ 0๐Ÿด
14:50:22disruptekdon't use it, but learn from it.
14:50:23FromDiscord<tinygiant> Worked! Shoving a tiny bit of wisdom into my cranium every day. Thanks.
14:51:46FromDiscord<tinygiant> Nice. Thanks, standard nim documentation doesn't necessarily show the difference bewteen the $ and getStr methods. Good to learn.
14:52:19disruptekthere's getBool, getInt, getFloat, etc.
14:53:03FromDiscord<tinygiant> Yep. It makes way more sense that way. `$` if you just want to see it, `get` if you actually want to use it for anything.
14:54:29*hnOsmium0001 joined #nim
15:02:24disruptekwell, $ is for rendering, not converting per se.
15:02:33disruptekacross all types, that is.
15:02:46disruptekyou can use `string` for conversion.
15:05:19FromDiscord<tinygiant> Cool, thanks for the learning point. I'll have to go back through some of my "code" and change a few things.
15:06:47disruptekrepr() is like an internal renderer impl for /everything/ -- it's useful, but generally the wrong tool for production.
15:12:13*solitudesf quit (Ping timeout: 264 seconds)
15:12:26mipriespecially as its output varies by --gc
15:12:56rockcaveraIs anyone else seeing the documentation all messed up? https://snipboard.io/uFjLq1.jpg
15:13:40mipriyes, that's fixed the devel
15:15:45*nclark joined #nim
15:28:51ForumUpdaterBotNew thread by Xigoi: Square brackets for generics, see https://forum.nim-lang.org/t/6988
15:30:05*waleee-cl joined #nim
15:34:39*luis_ joined #nim
15:34:40*solitudesf joined #nim
15:35:03*leorize quit (Ping timeout: 240 seconds)
15:35:27*solitudesf quit (Remote host closed the connection)
15:37:29*leorize joined #nim
15:43:51luis_hi all, are there any modules to quickly create tempfiles, similar to mktemp?
15:46:22luis_just found: https://github.com/OpenSystemsLab/tempfile.nim
15:46:34luis_sorry for not googling hard enough
15:46:41luis_๐Ÿ˜‰๏ธ
15:50:47disrupteki only found one fingerless glove.
15:51:00*unihernandez22 joined #nim
15:51:06disruptekit's incredible how lucky i am.
15:51:09supakeenGood, now throw it away.
15:52:15*solitudesf joined #nim
15:54:20*unihernandez22 quit (Client Quit)
16:00:11*VijayMarupudi[m] quit (Quit: Idle for 30+ days)
16:03:23disruptekwut
16:03:36disruptekthese gloves were handmade for me.
16:03:45supakeenToo bad.
16:03:45disruptekno fucking way am i letting them go, ever.
16:03:48supakeenIt's a crime.
16:04:00disruptekthen call me a criminal.
16:06:00disrupteki do wish they were in a darker color, though.
16:06:25disrupteki don't mind being homeless, but i don't like /looking/ like i'm homeless.
16:07:04disrupteki mean, it's not shame, really. it's just that once you've been hit in the eye with a quarter, you stop wishing people would throw change at you.
16:08:49*nclark quit (Quit: My MacBook has gone to sleep. ZZZzzzโ€ฆ)
16:09:55*nclark joined #nim
16:16:45*nclark quit (Quit: My MacBook has gone to sleep. ZZZzzzโ€ฆ)
16:18:53*nclark joined #nim
16:30:01*nclark quit (Quit: Textual IRC Client: www.textualapp.com)
16:33:02*narimiran quit (Ping timeout: 260 seconds)
16:35:01*solitudesf quit (Remote host closed the connection)
16:35:07*luis_ quit (Quit: luis_)
16:35:18*solitudesf joined #nim
16:41:03*luis_ joined #nim
16:43:03FromDiscord<Recruit_main707> when printing the ast of a type section, it does this:โ†ต`type`โ†ต` BoostPadState = object of FlatObj`โ†ตcan you avoid it so that it doesnt write it in a separate line?
16:43:38FromDiscord<Yardanico> replace it yourself :P
16:43:50FromDiscord<Yardanico> but really I don't see much use for it except for some hacks
16:44:25FromDiscord<Recruit_main707> its just that i prefer it the other way, nothing very important
16:45:42FromDiscord<alehander42> @BAsedCeo you need help, mate
16:46:10*tane joined #nim
16:53:25*BarrOff quit (Ping timeout: 240 seconds)
17:03:35*natrys joined #nim
17:07:20*narimiran joined #nim
17:16:46*NimBot joined #nim
17:25:23FromDiscord<MiniApple> how to make local function in nim
17:30:01*luis_ quit (Quit: luis_)
17:30:34*luis_ joined #nim
17:31:13FromDiscord<Yardanico> @MiniApple if you mean "how to make a procedure inside of other procedure" - just do it
17:31:14FromDiscord<Yardanico> it'll just work (TM)
17:31:23FromDiscord<Yardanico> syntax is the same
17:34:20FromDiscord<MiniApple> Ok
17:34:25FromDiscord<MiniApple> I see
17:34:41FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=2C7M
17:34:46FromDiscord<alehander42> https://github.com/Yardanico/ircord/#ircord---discord---irc-bridge-written-in-nim PMunch you can ban ppl from irc
17:35:33FromDiscord<alehander42> (i can't seem to see your discord account, so assume you are only in irc )
17:35:57FromDiscord<Avatarfighter> yo yo what is up everyone
17:40:48FromDiscord<nikki> just hangin' wbu
17:41:26FromDiscord<Avatarfighter> well not much tbh im bored so im making a program to eat all my pcs memory
17:41:45FromDiscord<nikki> doesn't that already exist and is called google chrome xD
17:41:45FromDiscord<Rika> Are you also using your pc as a space heater
17:42:30FromDiscord<nikki> i just got past the interop chapter in dom's nim book and only the metaprogramming one is left so i'm excited
17:42:53ZevvI sometimes boot my laptop into memtest86+ when waiting for a train at winter time
17:49:55*luis_ quit (Quit: luis_)
17:53:57FromDiscord<Avatarfighter> @Rika funny enough i actually am lmao
18:12:09*arecacea1 quit (Remote host closed the connection)
18:12:32*arecacea1 joined #nim
18:13:03*solitudesf quit (Remote host closed the connection)
18:14:34*solitudesf joined #nim
18:16:26FromDiscord<alehander42> heyy
18:19:40*BarrOff joined #nim
18:22:44*vicfred joined #nim
18:22:56FromDiscord<krisppurg> In https://play.nim-lang.org/#ix=2C7X, whenever you either write with `addr`ing a string how come it segfaults what is the solution to this problem?
18:24:09Zevvaddr tmp[0]
18:26:05*TomDotTom quit (Ping timeout: 240 seconds)
18:26:45FromDiscord<krisppurg> done that
18:26:49FromDiscord<krisppurg> index out of bounds
18:26:55FromDiscord<krisppurg> @Zevv
18:26:58Zevvhttp://zevv.nl/nim-memory/#_strings_and_seqs
18:27:09Zevvyour string data does not live at s.addr but at s[0].addr
18:28:00FromDiscord<krisppurg> ?
18:28:32FromDiscord<Yardanico> Nim strings aren't just "array of chars"
18:28:42FromDiscord<Yardanico> They have size and capacity fields just like seqs
18:28:51FromDiscord<krisppurg> right
18:28:58ZevvBut what are you trying to do here, you're bigEndian64-ing a string
18:29:05FromDiscord<krisppurg> oh oops
18:29:06Zevvbut you're not checking if the string is 8 bytes long
18:29:10Zevvhow is that supposed to work?
18:29:21FromDiscord<krisppurg> made a mistake there
18:29:56Zevvshit happens, right
18:30:28FromDiscord<krisppurg> yup
18:31:41FromDiscord<alehander42> guys
18:34:41Zevvzup
18:42:13FromDiscord<alehander42> whats up
18:51:02*Jesin quit (Quit: Leaving)
19:00:29*mbomba joined #nim
19:02:07FromDiscord<Idefau> my cpu temperature
19:02:30*Jesin joined #nim
19:02:35FromDiscord<ache of head> F
19:03:19planetis[m]Could some admin add hacktoberfest topic to fusion, plz?
19:12:13*apahl quit (Ping timeout: 272 seconds)
19:12:38*apahl joined #nim
19:21:43Araqplanetis[m], ping Miran tomorrow please
19:28:06FromDiscord<Recruit_main707> so, i was using MTuner to check if there were any leaks in my regions vs none vs arc tests, but they all seemed to have the same number of allocations and deallocations, even none, why?
19:28:29disrupteknothing is being deallocated?
19:28:58FromDiscord<alehander42> why
19:29:05FromDiscord<alehander42> not ellectoral college for GC
19:29:38disruptekbecause then the republicans would corrupt memory.
19:30:13FromDiscord<alehander42> but democrats are already mismanaging it and leaking it
19:30:24FromDiscord<alehander42> vote libertarian, vote for no allocator
19:30:32FromDiscord<Recruit_main707> ^
19:30:36disruptekso what? i would rather suffer a little leakage than corruption.
19:30:52disruptekcorruption means that no one can agree on the state.
19:31:05FromDiscord<Recruit_main707> but seriously though, why would arc and none have the same number of allocations and deallocations
19:31:17disruptekmaybe they are the same.
19:32:10*TomDotTom joined #nim
19:32:40FromDiscord<alehander42> corruption is rampant sadly
19:33:06FromDiscord<alehander42> time for bath
19:35:42FromDiscord<nikki> @Recruit_main707 it might be only allocs for the underlying allocator itself, the nim allocator may just get slabs of mem from the os allocator and free them at end
19:36:09FromDiscord<krisppurg> bruh alehander I'm going to have a bath in like 10mins
19:36:13FromDiscord<nikki> if that's the case, your tool would be unaware of the allocation model nim has on top of that base memory
19:36:14FromDiscord<krisppurg> anyways
19:36:31FromDiscord<krisppurg> How would I send a udp packet to the udp socket?
19:38:04FromDiscord<krisppurg> I've used `ws` newWebsocket and I awaited for it which is connecting to the socket, and I got no response at all, in Discord API I was told that UDP and websocket are different so I thought you don't need to use `ws` hence ^^^^
19:40:02blackbeard420when using async httpclient, and running with valgrind i get a bunch of "Conditional jump or move depends on uninitialised value(s)". the test program does nothing more then call newAsyncHttpClient() and then client.getContent(). is this normal?
19:43:45FromDiscord<Avatarfighter> @krisppurg UDP is a connectionless protocol that allows you to send off packets, the docs give an example here: https://nim-lang.org/docs/net.html#examples-connecting-to-a-server
19:44:07FromDiscord<krisppurg> thank you
19:45:31FromDiscord<Avatarfighter> I explained what UDP is really badly but wikipedia explains it in greater detail! https://en.wikipedia.org/wiki/User_Datagram_Protocol
19:48:14*mmohammadi9812 quit (Read error: Connection reset by peer)
19:48:50*mmohammadi9812 joined #nim
19:52:57*luis_ joined #nim
20:10:29*luis_ quit (Ping timeout: 272 seconds)
20:10:55*narimiran quit (Ping timeout: 246 seconds)
20:12:29FromDiscord<Recruit_main707> @nikki i think you are right, useMalloc shows some more realistic results
20:12:34*TomDotTom quit (Quit: Leaving)
20:12:49*TomDotTom joined #nim
20:22:22*lritter quit (Quit: Leaving)
20:27:43*natrys quit (Ping timeout: 246 seconds)
20:28:11*natrys joined #nim
20:28:19*luis_ joined #nim
20:32:15*mbomba quit (Quit: WeeChat 2.9)
20:40:38*luis_ quit (Quit: luis_)
20:40:41*luis_ joined #nim
20:43:51*Kaivo quit (Ping timeout: 260 seconds)
20:45:08*krux02 quit (*.net *.split)
20:45:08*lum[m] quit (*.net *.split)
20:45:08*reversem3 quit (*.net *.split)
20:45:08*lnxw37d4 quit (*.net *.split)
20:45:08*skelett quit (*.net *.split)
20:45:08*euantorano quit (*.net *.split)
20:45:08*blackbeard420 quit (*.net *.split)
20:45:21*euantorano joined #nim
20:45:30*blackbeard420 joined #nim
20:45:34*skelett joined #nim
20:45:36*krux02 joined #nim
20:46:34*Kaivo joined #nim
20:50:57*lum[m] joined #nim
20:52:20*reversem3 joined #nim
20:52:42*lnxw37d4 joined #nim
20:53:50*luis_ quit (Quit: luis_)
21:01:25*kinkinkijkin joined #nim
21:01:44*kinkinkijkin quit (Client Quit)
21:02:04*kinkinkijkin joined #nim
21:05:51*shu65 joined #nim
21:08:46*shu65 quit (Remote host closed the connection)
21:09:12*kinkinkijkin quit (Ping timeout: 260 seconds)
21:11:36*arecacea1 quit (Remote host closed the connection)
21:12:17*arecacea1 joined #nim
21:13:17*kinkinkijkin joined #nim
21:15:30FromDiscord<dom96> blackbeard420: valgrind gets confused by Nim's default allocator
21:16:25FromDiscord<nikki> is there a standard allocation benchmark with minimal dependencies to try out? to decide whether to use `useMalloc` or not in the context i'm running in (emscripten)
21:16:56FromDiscord<nikki> maybe i can just copy thavlak from nim's repo into my code
21:26:47FromDiscord<nikki> yeah that worked. nice
21:29:11*solitudesf- joined #nim
21:31:46*solitudesf quit (Ping timeout: 256 seconds)
21:32:29*natrys quit (Quit: natrys)
21:35:35*luis_ joined #nim
21:41:13*luis_ quit (Quit: luis_)
21:44:34FromDiscord<mratsim> for allocation you have to use your own app for benching
21:45:47*BarrOff quit (Ping timeout: 258 seconds)
21:45:48FromDiscord<mratsim> The profile between a tree algorithm that is destroyed/created often, string processing, a parser, matrices in sequences is completely different and depends on your application
21:46:20FromDiscord<mratsim> It also depends on the default malloc implementation on your system
21:56:40FromDiscord<tinygiant> Anyone have any advice on building a form-based/console application with a nim backend? Possible? Too difficult? Stupid idea? VS .net + nim? Just do it in c#, you idiot? I don't really have direction yet, just random thoughts for an upcoming project and wanted to see what the more experienced guys thought.
21:58:17FromDiscord<ElegantBeef> Are you asking about a GUI library similar to WPF?
22:00:51FromGitter<awr1> @tinygiant Nim has multiple interesting UI solutions. It depends on what you want.
22:01:04FromGitter<awr1> the community has not really centralized around any one of them though
22:01:24FromGitter<awr1> Personally I am partial to the imgui-based approach.
22:01:33FromDiscord<ElegantBeef> I'm partial to Fidget
22:01:51FromGitter<awr1> https://github.com/johnnovak/illwill Might be of use if you want to do terminal UI
22:02:17FromDiscord<Avatarfighter> fidget has my heart
22:02:44FromDiscord<Avatarfighter> !repo fidget
22:02:45disbothttps://github.com/treeform/fidget -- 9fidget: 11Figma based UI library for nim, with HTML and OpenGL backends. 15 318โญ 12๐Ÿด 7& 1 more...
22:03:58*solitudesf- quit (Ping timeout: 246 seconds)
22:07:27FromDiscord<tinygiant> Primarily looking for a forms bad interface that would allow users to open json/table (2d array) files into tree-view like controls and modify values across multiple files. I'll take a look at those ui suggestions. Thanks!
22:08:01FromDiscord<tinygiant> (edit) "bad" => "based"
22:08:15FromDiscord<Avatarfighter> @tinygiant you might like this library then https://github.com/trustable-code/NiGui
22:08:59FromDiscord<Avatarfighter> I would check out nimble's website and just look at whichever you like the most https://nimble.directory/search?query=gui
22:09:45FromDiscord<tinygiant> Thanks, didn't even know you could search nimble by category.
22:10:07FromDiscord<Avatarfighter> That search is just for everything with "gui" in the name and description I believe
22:10:12FromDiscord<Avatarfighter> I wish you could do category though!
22:10:51FromDiscord<scott> what's going on here? https://play.nim-lang.org/#ix=2C90
22:11:43FromDiscord<Avatarfighter> that's a great question because that error only occurs when the regex is in a const
22:11:45FromDiscord<Avatarfighter> wtf
22:11:57leorize[m]1you can't store the regex in a const
22:11:58FromDiscord<scott> woah, weird
22:12:04leorize[m]1Nim's `re` uses libpcre
22:12:07FromDiscord<Avatarfighter> ah
22:12:12FromDiscord<scott> oh ok that makes sense
22:12:15FromDiscord<Avatarfighter> leorize to the rescue ๐Ÿ˜›
22:12:25disruptekuse nre if you must re.
22:12:29disruptekfrom stdlib.
22:12:37leorize[m]1there's nim-regex if you're into compile-time regexes
22:12:41disruptekideally, use the native nim impl outside of stdlib.
22:13:03disruptekbetter than ideal is to not use regular expressions at all.
22:13:06leorize[m]1though at that point you can also use npeg :P
22:13:14disruptekgreat minds.
22:13:53*tane quit (Quit: Leaving)
22:19:09FromDiscord<tinygiant> @ElegantBeef can you point me at wpf?
22:19:34FromDiscord<ElegantBeef> I was talking about windows presentation form, the C# API for windows applications
22:30:09ZevvPMunch: talking bout npeg: did it all work out for you?
22:30:35*abm quit (Quit: Leaving)
22:30:54*abm joined #nim
22:37:01FromDiscord<tinygiant> @ElegantBeef Ok, thanks. Yeah, looking for something similar as far as presentation, but wanted to keep going in nim, if that was possible. fidget sounds promising. Still need to look at the other options.
22:51:18FromDiscord<Gyllou> @mratsim hiya!
22:51:45FromDiscord<Gyllou> oh sad face, been trying to catch you to ask you some things about arraymancer
23:04:16*arecacea1 quit (Quit: WeeChat 2.0.1)
23:15:40*mbomba joined #nim
23:52:49*jxy quit (Ping timeout: 246 seconds)