<< 09-05-2020 >>

00:01:46*dadada__ joined #nim
00:14:28*pbb quit (Ping timeout: 246 seconds)
00:15:28*pbb joined #nim
00:24:58*dadada__ quit (Ping timeout: 246 seconds)
00:27:19*lritter quit (Quit: Leaving)
00:31:45*dadada joined #nim
00:32:09*dadada is now known as Guest38675
00:46:49*abm quit (Read error: Connection reset by peer)
00:47:12zacharycarteris it possible to define a task in nimscript that accepts args?
00:47:26zacharycarterI have a task that invokes another task and then a proc
00:48:05zacharycarterbut the first nested task isn't executing the command I set with `setCommand` - only the command set inside the proc is executing
00:48:21zacharycarterI'm wondering if that's because it's a proc and not a task
00:55:25*Guest38675 quit (Ping timeout: 246 seconds)
00:59:58zacharycarterMeh I just used exec instead of setCommand
01:01:47*dadada__ joined #nim
01:02:52leorizezacharycarter: look at task source code
01:02:56leorizeit's rather simple
01:07:01zacharycarterthanks
01:08:18FromDiscord<InventorMatt> if you have a seq like seq[parentclass] can it be used to store children classes and then call functions from the stored children?
01:10:38leorizeI
01:10:44leorizeI'm pretty sure we don't have classes
01:10:55leorizebut I know what you meant, and the answer is yes
01:12:33FromDiscord<InventorMatt> yeah, I meant types. I've tried it but when I index the first position of the sequence and use that for the proc it says it is of the parent type and not the child type
01:12:56leorizeyou need to use `method` for dynamic dispatching
01:18:20FromDiscord<InventorMatt> yes, that solved it. thank you
01:22:34*exelotl quit (Ping timeout: 240 seconds)
01:25:20*dadada__ quit (Ping timeout: 256 seconds)
01:26:39*exelotl joined #nim
01:31:42*dadada joined #nim
01:32:05*dadada is now known as Guest33414
01:38:48FromGitter<kaushalmodi> zacharycarter: ⏎ ⏎ > is it possible to define a task in nimscript that accepts args ⏎ ⏎ Yes [https://gitter.im/nim-lang/Nim?at=5eb609a75cd4fe50a3fba455]
01:38:55FromGitter<kaushalmodi> Did you already find a solution for that?
01:39:14*chemist69_ joined #nim
01:41:19zacharycarterkaushalmodi: no I just used a task and exec
01:41:58zacharycarterwhich is fine
01:42:13*chemist69 quit (Ping timeout: 264 seconds)
01:55:27*Guest33414 quit (Ping timeout: 260 seconds)
02:01:02*dddddd quit (Ping timeout: 256 seconds)
02:01:43*dadada__ joined #nim
02:12:18*mono joined #nim
02:15:08*monokrom quit (Ping timeout: 256 seconds)
02:17:45*muffindrake quit (Ping timeout: 240 seconds)
02:20:07*muffindrake joined #nim
02:21:28FromGitter<gogolxdong> what's the equivalent of union
02:25:10*dadada__ quit (Ping timeout: 260 seconds)
02:26:47*avatarfighter quit (Ping timeout: 244 seconds)
02:28:47*blueberrypie7 quit (Quit: leaving)
02:31:48*dadada joined #nim
02:32:12*dadada is now known as Guest23347
02:35:42shashlickThere's a union pragma
02:41:00*theelous3 quit (Read error: Connection reset by peer)
02:47:28FromDiscord<Rika> technically you can say an object variant can be a union
02:48:26*blueberrypie7 joined #nim
02:50:25*blueberrypie7 quit (Client Quit)
02:51:26leorizenot really, an union don't have any memory protection
02:51:30leorizeobject variants do
02:52:00*jwm224 quit (Quit: WeeChat 2.9-dev)
02:53:47*jwm224 joined #nim
02:55:13FromDiscord<Rika> i mean yeah but theyre almost functionally equivalent if you only need function
02:55:47*blueberrypie joined #nim
02:58:43*avatarfighter joined #nim
02:59:36*zacharycarter quit (Quit: Lost terminal)
03:04:58FromDiscord<KingDarBoja> Hi Rika πŸ˜„
03:14:16FromDiscord<Broadwell> https://play.nim-lang.org/#ix=2ll5
03:15:34FromDiscord<Broadwell> Python 3.8-style walrus operator
03:16:36FromDiscord<Rika> both arguments should be typed
03:16:43FromDiscord<Rika> you cant set an untyped variable anyway
03:19:17FromDiscord<Broadwell> https://github.com/broad-well/dimscommander/commit/3457ba514dd5223451fe25bd0eb997676846feb4
03:22:59FromDiscord<KingDarBoja> Ah, the walrus
03:23:26FromDiscord<Broadwell> tbh I miss `if let` from Rust and Swift a little in this particular use case
03:25:40*zacharycarter joined #nim
03:25:45zacharycarterhttps://www.twitch.tv/zachary_carter streaming
03:27:52FromDiscord<Never Listen To Beef> Are you intentionally not streaming your entire screen?
03:28:02zacharycarterno lol
03:28:07zacharycarterhmm
03:28:24zacharycarterlet me try to fix I'll bring the stream down for a sec
03:32:49FromDiscord<KingDarBoja> Let's see what u streaming
03:32:58FromDiscord<Never Listen To Beef> Seems it's how to obs
03:33:25leorize[m]@Broadwell: if (let a = expr(); a) <- that's Nim version
03:33:26zacharycarterobs is super annoying on macos apparently
03:33:35FromDiscord<Never Listen To Beef> ah
03:34:04FromDiscord<Never Listen To Beef> Is you stream output set to a 16:9 resolution?
03:34:07FromDiscord<Never Listen To Beef> Is your stream output set to a 16:9 resolution?
03:34:21zacharycarterlet me check
03:35:24FromDiscord<Rika> @Broadwell passthrough ping `if (let a = expr(); a) <- that's Nim version`
03:35:46FromDiscord<Never Listen To Beef> Secondly you want to ensure your source is position properly and scaled to fit the obs recording window
03:35:59FromDiscord<Rika> obs is super buggy on anything that isnt windows
03:36:10FromDiscord<Never Listen To Beef> I find it runs smooth on linux so idk
03:36:19FromDiscord<Rika> i get flickering on mine
03:36:32leorizehmm, I need to benchmark I/O via async and I/O via threads
03:36:34FromDiscord<Never Listen To Beef> I've never streamed, so idk if streaming is bad
03:36:36FromDiscord<Rika> lmao that screen
03:36:48leorizewhat are the metrics should I take note on?
03:37:23zacharycarterit'd be nice if there was a way to preview what it'd look like on stream
03:37:28FromDiscord<Never Listen To Beef> there is
03:37:40FromDiscord<Never Listen To Beef> Unless mac doesnt have it
03:38:04zacharycarteralright hopefully this fixes it
03:38:12FromDiscord<Never Listen To Beef> Yea it's proper now
03:38:17FromDiscord<Never Listen To Beef> *Sorry i pointed it out* πŸ˜„
03:38:37zacharycarterlol thanks for doing so
03:38:45FromDiscord<Broadwell> leorize: I mean also unwrapping an Option[T] in the process
03:38:53zacharycarternow my machine is laggy af
03:39:03zacharycarterprobably need to downsample more
03:39:12FromDiscord<Rika> is it me or is your screen stretched
03:39:24FromDiscord<Rika> your screen's prolly one of those imacs with non 19:9
03:39:29zacharycarteryeah I scaled it let me fix it
03:39:31FromDiscord<Rika> 16*
03:39:43FromDiscord<Never Listen To Beef> Yea might explain the original issue
03:39:49zacharycarterI think it's 16:10
03:40:36zacharycarterokay that's better
03:40:51zacharycarterbut I just messed up the stream again lol
03:40:52zacharycartersec
03:40:52FromDiscord<Never Listen To Beef> The stream is like 3 minutes behind πŸ˜„
03:41:13FromDiscord<KingDarBoja> woa, your viewport is big
03:41:44zacharycarterlol
03:43:22FromDiscord<Rika> how big is your monitor
03:43:31FromDiscord<Never Listen To Beef> About that big
03:43:43FromDiscord<Rika> ah i see
03:43:46FromDiscord<Rika> mm
03:48:53FromDiscord<KingDarBoja> RIP stream
03:49:02FromDiscord<Never Listen To Beef> Im a terrible person
03:49:07FromDiscord<Never Listen To Beef> I regret everything
03:49:30FromDiscord<Rika> F
03:50:14FromDiscord<Never Listen To Beef> We're live with fullscreen blackbars
03:50:18FromDiscord<Never Listen To Beef> That's good enough!
03:50:37zacharycarterlol
03:50:41zacharycarterokay
03:50:53zacharycarterlet me kill this browser tab it's destroying my cpu
03:51:10FromDiscord<Never Listen To Beef> *What a poster for owning a mac*
03:51:12zacharycarterhopefully this is better
03:51:18zacharycarterit was free at least
03:51:19FromDiscord<Rika> > We're live with fullscreen blackbars
03:51:19FromDiscord<Rika> well i mean he uses a non-16:9 screen so thats natura
03:51:49FromDiscord<Rika> are you running at like 1 fps?
03:51:53zacharycarterI dunno if I google retina resolution for this size mbp it's like 2880x something but still 16:10
03:52:01zacharycarterI probably need to turn down encoding now
03:53:30FromDiscord<Rika> its in output
03:53:48zacharycarteris 2500kb/s even high?
03:53:53FromDiscord<Never Listen To Beef> Does mac not have gpu based encoding?
03:53:56zacharycarterkbps*
03:54:08zacharycarterapparently not...
03:54:25FromDiscord<Never Listen To Beef> Only CPU under Encoder?
03:54:31zacharycarteryeah :/
03:55:34zacharycarterwell this seems better at least
03:55:41zacharycartermaybe
03:55:44FromDiscord<Rika> 2.5k is very high
03:55:47FromDiscord<Rika> especially for coding
03:55:52zacharycarterokay what should I set it at?
03:55:56FromDiscord<Rika> coding can prolly go away with something like 1.5k
03:56:07zacharycarteralright let me see if that's workable
03:56:08FromDiscord<Rika> or even 1k if you dont switch tabs often
03:56:24zacharycarterif not fuck this and I'll set up my desktop tomorrow
03:56:28FromDiscord<Rika> oof
03:56:35FromDiscord<Rika> @Never Listen To Beef i blame you lol (i kid0
03:56:49FromDiscord<Never Listen To Beef> Good i accept blame
03:56:59FromDiscord<Gary M> I appear too hello
03:57:03zacharycarterhmm
03:57:10zacharycarterwell it's much more responsive on my end
03:57:20FromDiscord<Rika> looks good
03:57:34zacharycartercool
03:57:37FromDiscord<Gary M> I blame Rika to be honest
03:57:49FromDiscord<Rika> smh
03:58:05zacharycarterooph audio is crushing my cpu
03:58:08FromDiscord<Rika> you havent even been here for a few minutes today how could you blame me
03:58:10FromDiscord<Never Listen To Beef> Know what the best part is? Im heading off now
03:58:15zacharycarterlol
03:58:23FromDiscord<Rika> what kinda weak ass cpu do you have lmao
03:58:26zacharycarternight thanks for the *cough* help *cough*
03:58:26FromDiscord<Gary M> See what you caused rika
03:58:44zacharycarterwhatever a 2019 15 inch macbook pro comes with
03:58:47zacharycartera free from work one
03:58:49FromDiscord<Never Listen To Beef> Well zach once frag works on linux you can repay the help
03:59:01zacharycarter:D
03:59:19FromDiscord<Gary M> No help with my Vulkan stuff first
03:59:33zacharycarterfuck vulkan
03:59:35zacharycarterdon't use it
03:59:41FromDiscord<Gary M> That's the spirit, now come help out
03:59:50FromDiscord<Gary M> :)
04:00:12FromDiscord<Gary M> I'm at least 5% of the way towards rendering a triangle
04:00:45zacharycarterhttps://twitch.tv/zachary_carter I will yell at you aboult vulkan there
04:01:04FromDiscord<Gary M> Right now?
04:01:12zacharycartersure
04:01:14zacharycarterI'm streaming now
04:01:28FromDiscord<Gary M> Once you get done yelling you should join my repo and help me thread this shit
04:01:46zacharycarterI will help you - stop using vulkan
04:01:49zacharycarteryou don't need it
04:01:51zacharycarterjust use OpenGL
04:01:51FromDiscord<Gary M> Lol
04:01:54zacharycarteror sokol or something
04:02:03zacharycarterif you really want vulkan use bgfx
04:02:07FromDiscord<Gary M> graphics.h really
04:02:11zacharycarterthen at least you don't have to worry about vulkan
04:02:29FromDiscord<Gary M> Nim bgfx isn't working on Linux
04:02:40zacharycarterwell that's probably easy enough to fix
04:02:59zacharycarterI just don't use bgfx anymore or linux
04:03:05zacharycarterbut I bet it's due to linking bullshit
04:03:22zacharycarterthat's pretty much what every shared library issue boils down to on linux
04:03:51FromDiscord<Gary M> Well I got sdl and Vulkan basically working on windows and Linux so far
04:04:07FromDiscord<Gary M> Just very basic shit, enumerating devices and getting queues
04:04:41FromDiscord<Gary M> Oh and loading a compute shader that I haven't been able to try yet
04:04:45zacharycarteryeah and once you get to managing memory you'll want to jump out of a window
04:05:02zacharycarterwhy do you need vulkan?
04:05:09zacharycarterthat's the question to ask yourself
04:05:19zacharycarterunless you just are trying to learn it
04:05:20*waleee-cl quit (Quit: Connection closed for inactivity)
04:05:26zacharycarterand in that case maybe use clyybber's bindings
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:39*supakeen joined #nim
04:07:52FromDiscord<Gary M> I am using clyybbers bindings
04:08:08zacharycarterwell still ask yourself that question
04:08:17zacharycarterif it's just for learning cool - if it's because you want to actually make a game
04:08:20FromDiscord<Gary M> The nimsl bindings are wrong in at least a few places
04:08:27zacharycarternimsl?
04:08:39FromDiscord<Gary M> Uh whatever the Nim opengl stuff was hold on
04:08:59FromDiscord<Gary M> Sorry nimgl
04:09:02FromDiscord<Gary M> https://github.com/nimgl/vulkan
04:09:12FromDiscord<Gary M> Some things like incorrect bit flags
04:09:37zacharycarteroh yeah I dunno I don't use any of these libraries
04:09:50FromDiscord<Gary M> But no I'm not in it to make a game right now.
04:10:07FromDiscord<Gary M> I actually really like real-time rendering techniques
04:10:46FromDiscord<Gary M> I go nuts over a good PBR shader but @Elegant Beef hardly sees the reason for anything more than unlit
04:11:52zacharycarterwell just use my engine when it's done :P
04:12:01FromDiscord<Gary M> No just use mine when it's done
04:12:03zacharycarterit will have hot reloading of shaders via reflection
04:12:04zacharycarterheh
04:12:10zacharycartermine is a lot further along than yours
04:12:19zacharycarterI'm rendering a cube
04:12:21FromDiscord<Gary M> Yeah well come help on mine
04:12:23zacharycartera rotating one at that
04:12:28zacharycarternooooo
04:12:29FromDiscord<Gary M> I'm rendering text to a terminal
04:12:36FromDiscord<KingDarBoja> You truly code like a hacker πŸ˜› πŸ˜„
04:12:39zacharycarterI already have a fiber based job system and hot code reloading
04:12:54FromDiscord<Gary M> Nim has hot code reloading built in though
04:12:57zacharycarterand multi threaded command buffers
04:13:01zacharycarterI have working hot code reloading
04:13:14FromDiscord<Gary M> Well come shove that into my superior Vulkan framework
04:13:16zacharycarterjump on the stream I'll show you
04:13:20zacharycarterI don't want to use vulkan lol
04:13:24zacharycarterit's needlessly complicated
04:13:24FromDiscord<Gary M> Once I can spin a cuboid around
04:13:30shashlickSounds trollish
04:14:02FromDiscord<Gary M> Trollish? I'm joking about him helping because he clearly doesn't like Vulkan, but I am definitely working with sdl2 and Vulkan in Nim.
04:14:11*narimiran joined #nim
04:14:35FromDiscord<Gary M> Main thing is I'm not 100% on translating the whole C multithreading stuff over to Nim
04:15:19FromDiscord<Gary M> Sdl2 is working well enough, and the bindings are well documented
04:15:48FromDiscord<Gary M> https://github.com/Vladar4/sdl2_nim Vladar's bindings, anyways
04:16:04zacharycarteryeah
04:16:10zacharycarterI just use sokol it's a single header and does what I need
04:16:16zacharycarterno dynamic linking
04:16:18*narimiran quit (Client Quit)
04:16:27yumaikasAnyone have any recommendations as far as image resizing in Nim goes? Building a Chore Management system for my wife and I in Jester, and was thinking it'd be cool to be able to upload pictures of the various plants we're taking care of, but don't want to be downloading hi-rez images all the time
04:16:56yumaikasThe only google search I came across talked about wrappers around DevIL?
04:17:49FromDiscord<Gary M> Are you handling input polling with sokol too?
04:17:52zacharycartermaybe stb img
04:18:05zacharycarteryeah it handles that for you as well
04:19:12FromDiscord<Gary M> I actually wanted to get some sort of bindings working for diligent engine which is like modern bgfx
04:19:23FromDiscord<Gary M> But boyo I am not smart enough to get any of that working with nim
04:19:24zacharycarterI'd just use bgfx
04:19:42zacharycarteror whatever that other library is
04:19:50zacharycarterbut I mean dilligent and the one I'm referring to are C++
04:20:17zacharycarteror magnum
04:20:31FromDiscord<Gary M> Yes but the diligent DLL's have a C api too
04:22:11zacharycarteroh
04:22:19zacharycarterwell bgfx is probably still more mature
04:22:31zacharycarterI dunno what makes dilligent engine better than bgfx
04:23:31zacharycarterhttps://github.com/ConfettiFX/The-Forge
04:23:34zacharycarterthat's the one I was thinking of
04:23:40zacharycarterno C api yet though as far as I'm aware
04:23:43zacharycarternot a first party one anyway
04:24:03FromDiscord<Gary M> Yeah that's a good one but there's so much built into it
04:24:18FromDiscord<Gary M> It would be easier to just work with c++ with that
04:24:54FromDiscord<Gary M> Diligent Engine does have a direct "why not bgfx" thing on their homepage
04:25:19FromDiscord<Gary M> Basically better abstractions and multithreaded yada yada, bad paraphrasing
04:35:24yumaikasSo, no recommendations for image resizing?
04:35:34zacharycarteryumaikas I said stb image
04:35:45yumaikasah
04:38:49FromDiscord<flywind> !repo imageman
04:38:50disbothttps://github.com/SolitudeSF/imageman -- 9imageman: 11Image manipulation library 15 34⭐ 3🍴
04:40:25*Guest23347 quit (Ping timeout: 256 seconds)
04:44:36*dadada joined #nim
04:45:00*dadada is now known as Guest30031
04:52:06*ptdel joined #nim
05:07:20yumaikasThanks for the recommedation, flywind
05:08:28yumaikas(Imageman + a copy of libjpeg/libpng from my red eclipse 2 install, and I'm off to the races)
05:08:37*Guest30031 quit (Ping timeout: 264 seconds)
05:11:18*exelotl quit (Ping timeout: 260 seconds)
05:16:46*dadada__ joined #nim
05:25:35*Romanson joined #nim
05:40:37*dadada__ quit (Ping timeout: 260 seconds)
05:46:48*dadada joined #nim
05:47:12*dadada is now known as Guest7950
05:49:15*ertp07 joined #nim
05:50:25*rockcavera quit (Remote host closed the connection)
06:03:54*kungtotte quit (Read error: Connection reset by peer)
06:03:57*avatarfighter quit (Ping timeout: 260 seconds)
06:05:06*kungtotte joined #nim
06:10:52*Guest7950 quit (Ping timeout: 256 seconds)
06:12:21FromDiscord<Yardanico> Also see https://github.com/treeform/flippy
06:12:42zacharycarterno
06:13:52*terps joined #nim
06:16:40*dadada__ joined #nim
06:17:08zacharycarterYardanico: I was streaming but I'ma bout to go to sleep I think
06:18:32FromDiscord<Yardanico> I just woke up
06:19:01zacharycartergood morning!
06:19:08zacharycarterit's 1:19am here - I'll probably stay up until 2
06:25:56skrylar[m]walrus operator?
06:26:13zacharycarter???
06:26:44skrylar[m]its in chat history
06:26:58zacharycarteroh haha
06:27:56skrylar[m]oh its the assignment operator
06:28:22zacharycarterseems pretty useless to me
06:28:27skrylar[m]tsk. the best part about 'get what youre given' languages is they either never have all the stuff you need or the spec inevitably plumes to depths that would make constitutional lawyers weep.
06:28:58skrylar[m]nim is getting a bit long in the tooth in some ways but, eh.
06:31:26FromDiscord<Rika> bruh, i'm shooting myself in the foot with nim because i dont know what im doing (using c library) lmao
06:31:54zacharycarterjust use zig
06:32:06zacharycartertrying to turn this into a meme
06:32:15skrylar[m]mov [zig], mov [zig], for great justice take off every zig!
06:32:23FromDiscord<Rika> xd no thanks, zig wouldnt fix what shit i'm doing
06:32:36zacharycarteryeah but it can cross compile your shit
06:33:11skrylar[m]i found zig uninspiring ._.
06:33:48zacharycarterit inspired you enough to decide you were uninspired about it
06:33:59FromDiscord<Rika> ive said this before and zig is basically inverse nim isnt it?
06:34:15skrylar[m]eh i've used basically everything. nim isn't like "WOW SO HYPE" but it .. doesn't suck, and everything just mostly works, and thats good enough.
06:34:18zacharycarterZig is supposed to be a better C
06:34:34zacharycarterso maybe eventually Zig becomes a backend for Nim
06:34:49zacharycarterbut it's not really apples to apples with Nim
06:35:10FromDiscord<Rika> so are you implying zig sucks, skry?
06:35:10skrylar[m]for me the 'no fun allowed' requirement killed it. i like to overload operators.
06:35:29FromDiscord<Rika> that's the point of zig though isnt it
06:35:33skrylar[m]yes
06:35:40skrylar[m]the point of zig is not to have any fun
06:35:44skrylar[m]the point of ruby is to have much fun
06:35:50FromDiscord<Rika> lmao
06:35:56zacharycarterI actually enjoy writing Zig
06:36:24zacharycarterI don't enjoy that the language is so immature and so much is still missing
06:36:32zacharycarterbut I think it has a bright future
06:38:01skrylar[m]i think v has a better idea in conceding nobody wants to write vector_add(a, vector_add(b, c))
06:38:15zacharycarterv is vaporware
06:38:34skrylar[m]vaporware that you can download and use and has active commits :thonkang:
06:38:44zacharycarterit's just a giant scam - nothing should be compared to V because V is just a giant scam
06:38:45skrylar[m]i suppose your favorite toolchain is jai then
06:38:57zacharycarterV is about as useful as Jai
06:39:07skrylar[m]v actually works tho.
06:39:13zacharycarterdoes it?
06:39:20zacharycarterhave you written anything in V?
06:39:25skrylar[m]i've downloaded and tested it, so yes.
06:39:45skrylar[m]jai has no toolchain at all and its been 5+ years of "JOHNATHAN BLOW IS GONNA BLOW YOUR SOCKS OFF someday"
06:39:57zacharycarteryeah and V is essentially the same shit
06:39:58*exelotl joined #nim
06:40:07zacharycartervery little that the author of the language claims to exist actually does
06:40:10skrylar[m]except you can download a v compiler, code with it and the code runs
06:40:15zacharycarterit didn't even have an AST until late 2019
06:40:22*dadada__ quit (Ping timeout: 272 seconds)
06:40:32*Hideki joined #nim
06:40:38zacharycarterthe V compiler wasn't really a compiler and still isn't really
06:40:39*solitudesf joined #nim
06:40:49skrylar[m]:okay:
06:40:55*Hideki is now known as Guest82081
06:41:02FromGitter<sheerluck> zacharycarter I tried to install Zig but it wants me to recompile llvm with *all* LLVM_TARGETS enabled and I refuse to do it :(
06:41:12FromDiscord<Yardanico> You don't need do
06:41:19FromDiscord<Yardanico> You can just download the latest archive
06:41:22zacharycarterI just don't think we need to rehash the V discussion
06:41:35zacharycarteranyone who has followed V's development for a while knows how shady that project is
06:41:39zacharycarteror should know anyway
06:42:18FromDiscord<Rika> my opinion on V is that i think its sketch, but i also think that the image of it being sketch is sketch
06:42:40skrylar[m]my opinion is based purely on what i downloaded and ran
06:43:13zacharycarterit is basically a C transpiler
06:43:33skrylar[m]i still haven't gotten beef to work due to chicanery
06:43:35zacharycarterfor a long time it didn't do any type analysis and have an AST
06:43:50zacharycarterit can compile doom *clap*
06:44:36skrylar[m]this conversation is more mind numbing than porting hashes
06:44:38*Guest82081 quit (Remote host closed the connection)
06:45:04zacharycartershould port some to V
06:46:38*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:46:44*dadada joined #nim
06:47:08*dadada is now known as Guest5491
06:47:14skrylar[m]one can only wonder what problems Rika was having
06:51:57FromDiscord<Rika> skrylar: i'm trying to figure out how to use liblzma and i'm just fucking up so much i accidentally allocate a few gigabytes of ram in seconds
06:52:46Yardanicoif you only need decompression you can look into my osureplay
06:52:56FromDiscord<Rika> https://github.com/kobolabs/liblzma/blob/master/doc/examples/02_decompress.c#L149-L161 trying to figure this out
06:53:01YardanicoI just embed easylzma in nim and wrap two compress/decompress procs
06:53:05FromDiscord<Rika> Yardanico: but i wanna figure this out
06:54:37Yardanicowhat's the problem?
06:54:57Yardanicothe C code you linked just does buffered decompression
06:55:05FromDiscord<Rika> i know
06:55:11FromDiscord<Rika> i dont understand how to repeat that in nim
06:55:20Yardanicowhat part exactly?
06:55:26FromDiscord<Rika> the whole thing i linked
06:55:30FromDiscord<Rika> it has highlighted lines
06:55:41Yardanicowell I don't understand what's the issue really
06:55:52Yardanicoyo need to wrap lzma_stream in nim side
06:55:56Yardanicoand then just do the same as the C code
06:56:04Yardanicoyou can also use fwrite directly
06:56:19FromDiscord<Rika> `just do the same as the C code` is the part i cannot figure out..
06:56:22FromDiscord<Rika> w/e
06:56:26FromDiscord<Rika> disregard
06:56:33FromDiscord<Rika> ill figure this out somehow
06:56:48skrylar[m]the highlighted lines just copy from a buffer tho
06:56:59FromDiscord<Rika> ***i know***
06:57:03YardanicoI was too lazy so I just wrapper easylzma https://github.com/Yardanico/nim-osureplay/blob/master/src/lzma.nim
06:57:08FromDiscord<Rika> christ stop trying to help me
06:57:23Yardanicowell don't link stuff if you don't expect help :P
06:57:25Yardanicoor comments
06:57:33FromDiscord<Rika> i expected help i get jack shit
06:57:44skrylar[m]oh dear.
06:57:49FromDiscord<Rika> just stop
06:58:11zacharycarterI didn't know robots needed help
06:58:16zacharycarterrobot clones I mean
06:58:19skrylar[m]i'm going to uh, come back tomorrow.
06:58:53zacharycartermaybe V will have mutability working by then
06:59:19Yardanicowait what LMAO
06:59:29Yardanicozacharycarter: I was streaming for 14 hours
06:59:34Yardanicobasically disruptek's stream page
06:59:43zacharycarterlol
06:59:50Yardanico14 hours 40 minutes
07:00:27zacharycartersyndication
07:01:02Yardanicoand I got two twitch achievements
07:01:08zacharycarterlol
07:02:59FromDiscord<Rika> agfbhgs i just forgot to translate a line apparently
07:03:07FromDiscord<Rika> sorry
07:03:09FromDiscord<Never Listen To Beef> You're welcome
07:03:16FromDiscord<Rika> programming can get irritating at times
07:06:00*avatarfighter joined #nim
07:06:23YardanicoI'm gonna stream anyway (nobody will watch me tho), some random Nim stuff but with a mic and moosic just like disrupt_k
07:07:11zacharycarterI think I'm doing that now
07:07:14zacharycarterbut I have no idea
07:07:16zacharycarterobs says I am
07:07:40zacharycartermake sure you do yours in a dump truck
07:08:16Yardanicosure
07:08:26zacharycarterniceeee
07:10:35*Guest5491 quit (Ping timeout: 256 seconds)
07:14:37Yardanico~ystream
07:14:37disbotystream: 11stream at https://www.twitch.tv/yardanico, voice chat at mumble://uberalles.mumbl.io/ -- Yardanico
07:14:38Yardanico:D
07:15:11zacharycarter~zstream
07:15:12disbotno footnotes for `zstream`. πŸ™
07:15:16zacharycarterlameeeeee
07:16:44*dadada__ joined #nim
07:23:40FromDiscord<Rika> make one, `~zstream is (enter text)`
07:26:16*zacharycarter quit (Quit: Lost terminal)
07:36:37shashlicksome more easy reading https://github.com/nimterop/nimterop/blob/pragmas/README.md#header-vs-dynlib
07:40:32*dadada__ quit (Ping timeout: 272 seconds)
07:46:46*dadada joined #nim
07:47:09*dadada is now known as Guest8188
07:57:06FromGitter<sheerluck> off-topic "breaking news" slowpoke style: GCC-10 has been released.
08:10:19*terps quit (Ping timeout: 258 seconds)
08:10:28*Guest8188 quit (Ping timeout: 246 seconds)
08:16:47*dadada__ joined #nim
08:17:00FromGitter<bung87> !repo datetime_parse
08:17:01disbothttps://github.com/bung87/datetime_parse -- 9datetime_parse: 11datetime parse in Nim 15 0⭐ 0🍴
08:37:58FromDiscord<Rika> nim has no datetime parsing?
08:38:12FromGitter<Bennyelg> any easy way to patch module so I can mock the component?
08:38:47*avatarfighter quit (Ping timeout: 244 seconds)
08:38:56Yardanico@Rika it does
08:39:14FromDiscord<Rika> ah, bung87's package just detects format automatically
08:39:30FromDiscord<Rika> wonder if it can also do japanese time format eg. 16ζ™‚09εˆ†51η§’
08:39:58*idf joined #nim
08:40:34*dadada__ quit (Ping timeout: 246 seconds)
08:41:44*konvertex joined #nim
08:42:37FromGitter<bung87> I tried Numbers convert material's datetime it cant cover all case, so I wrote this
08:43:01FromGitter<bung87> excel on windows may also does like this.
08:43:25*livcd joined #nim
08:44:06FromGitter<bung87> and it is also a npm package, so when js developer check the repo url , they will see this repo 98% write in Nim
08:45:41FromGitter<bung87> it may surprise them :)
08:46:43*dadada joined #nim
08:47:06*dadada is now known as Guest97466
08:47:19FromDiscord<Rika> nice
08:53:37*ertp07 quit (Ping timeout: 264 seconds)
08:53:53*ertp07 joined #nim
08:54:08*gangstacat quit (Quit: Ĝis!)
08:58:21*ertp07 quit (Read error: Connection reset by peer)
08:58:58*ertp07 joined #nim
09:00:46*ertp07 quit (Read error: Connection reset by peer)
09:01:06*ertp07 joined #nim
09:03:43*Hideki joined #nim
09:04:06*Hideki is now known as Guest86670
09:08:29Yardanicobtw, if someone has clang on linux, I made a simple script to compile the compiler with PGO (no LTO because PGO+LTO breaks the compiler for some reason)
09:08:30Yardanicohttps://github.com/Yardanico/nim-snippets/blob/master/compile_nim_pgo.sh
09:08:39Yardanicoit uses arraymancer, npeg and compiler itself to get profiling data
09:09:21FromDiscord<Rika> is pgo better than lto?
09:09:34Yardanicothey're different
09:09:42FromDiscord<Rika> i mean, for their use
09:09:50Yardanicothey can be used together
09:09:54FromDiscord<Rika> okay
09:10:01YardanicoPGO makes optimizations based on runtime profiling
09:10:44*Guest97466 quit (Ping timeout: 256 seconds)
09:11:51YardanicoLTO analyzes the whole program (on linker stage) and does stuff like inlining and other, I'm not really a pro at that
09:12:20Yardanicobut with PGO the compler (when you compile the final version based on PGO profiling) will actually _know_ which functions are used the most, which code paths are the most hot ones
09:12:25Yardanicoand do inlining or other optimizations based on that info
09:13:14*Guest86670 quit (Remote host closed the connection)
09:13:15Yardanicolike CPython does PGO too, they run the whole test suite to get PGO data
09:13:57Yardanicobut even for nim you can get ~20-25% compiler perf boost with PGO
09:14:16Yardanicofor Nim compiler stage (not C compiler stage)
09:14:28Yardanicoalthough I didn't do --compileOnly so PGO could analyze the codegen backends too
09:15:13*ertp07 quit (Ping timeout: 264 seconds)
09:16:44*dadada__ joined #nim
09:17:10Yardanicowell it will vary, but mostly projects which use a lot of macros, generics, static will benefit I think
09:18:21FromDiscord<Rika> oh i see
09:19:41YardanicoI'm testing different projects and I see 10-20% diff (time to do nim c -d:danger --compileOnly)
09:20:18Yardanicoand you get it for free (no need to optimize the compiler itself), although as c-blake pointed out on the forum, the way C code made by nim compiler is structured may help PGO/LTO
09:23:26*ertp07 joined #nim
09:40:32*dadada__ quit (Ping timeout: 256 seconds)
09:46:53*dadada joined #nim
09:47:16*dadada is now known as Guest60858
09:53:19*waleee-cl joined #nim
09:55:45FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eb67e21b6dd230697b6a833]
09:56:15Yardanicowe need context :)
09:56:17FromDiscord<Rika> ?
09:56:18FromDiscord<Rika> yeah
09:57:33FromDiscord<Rika> Bennyelg, uh, can you give us code or something? type definitions, proc definitions, etc
10:00:00FromGitter<Bennyelg> Fixed, thanks, next time Ill post more code <#
10:00:01FromGitter<Bennyelg> <3
10:11:01*Guest60858 quit (Ping timeout: 264 seconds)
10:13:14*krux02 joined #nim
10:16:47*dadada__ joined #nim
10:29:23skrylar[m]so this newruntime stuff. is that still happening or is it a weird parallel world
10:32:09*ertp07 quit (Ping timeout: 258 seconds)
10:32:31Yardanicoskrylar[m]: arc and destructors are there
10:34:28*ertp07 joined #nim
10:35:52Yardanicoskrylar[m]: https://forum.nim-lang.org/t/5814#36054
10:35:59Yardanico"--gc:arc ~~ shared_ptr done right" "--newruntime ~~ unique_ptr done right"
10:39:05skrylar[m]that thread seems to say i should continue to ignore it entirely
10:40:24dom96hmm, seems the playground just died
10:40:39Yardanicohmm yeah
10:40:44Yardanicorip
10:40:56Yardanicohow stable is the playground btw?
10:41:01*dadada__ quit (Ping timeout: 264 seconds)
10:41:06Yardanicoand the forum
10:41:25dom96no idea about playground, that's PMunch's responsibility :P
10:41:28dom96the forum is very stable
10:41:42dom96better uptime than Github I bet
10:42:05Yardanicohaha
10:42:46skrylar[m]too bad reset password sitll doesn't work for 2 years now
10:43:02Yardanicodom96: is there any ETA for when we'll get the next forum update?
10:43:24YardanicoI know categories are already merged, but the frontend itself has a JS file made in 2018
10:43:36Yardanicowith nim 0.18.1 :D
10:43:59dom96skrylar[m], oh? in what way does it not work?
10:44:10dom96Yardanico, my game takes priority :P
10:44:28skrylar[m]dom96: it sends me a token to reset, accepts a new password, then doesn't let you log in with the new password
10:46:40*dadada joined #nim
10:47:03*dadada is now known as Guest82102
10:47:08*Hideki joined #nim
10:47:31*Hideki is now known as Guest90612
10:48:18dom96skrylar[m], hrm, true, just tested it. Did you make a bug report?
10:50:11skrylar[m]i've told you about this directly several times now ΰ² _ΰ² 
10:50:46dom96lol
10:51:05dom96Make a bug report next time
10:53:21skrylar[m]make an account somewhere else to report a bug to be able to log in to an account on a site trying to be used in the first place
10:53:30skrylar[m]god help anyone who gets socked with your sense of UX
10:54:30skrylar[m]xxhash32 and xxhash64 ported. need to clean up the user facing api a little and look for some test vectors
10:54:52dom96That's a side effect of this being an open source project
10:55:24dom96If you spent half as much time contributing as complaining then things might just be a little bit better for all of us
10:55:51*solitudesf- joined #nim
10:56:29skrylar[m]oh i'm sorry. i hadn't realized all of the code i've been releasing apparently didn't exist
10:56:38*solitudesf quit (Ping timeout: 260 seconds)
10:56:49FromDiscord<Rika> o_o
10:59:10*solitudesf- is now known as solitudesf
10:59:17Yardanicosolitudesf: poor dash
11:00:17dom96Yeah, that's great and all, now try again with projects you don't actually want to work on.
11:02:44*fredrikhr joined #nim
11:02:49skrylar[m]you are clearly set to be a prat, and i'm sure you will regret that in time
11:04:28dom96You're the one who's complaining about the poor UX as if I am personally responsible for all the problems with nimforum.
11:06:13*exelotl quit (Ping timeout: 264 seconds)
11:06:14*Guest82102 quit (Ping timeout: 240 seconds)
11:07:26skrylar[m]literally a siteop, so yes.
11:08:12*dadada__ joined #nim
11:09:21dom96Are you under the impression that I am employed to do this?
11:12:05skrylar[m]well if "literally unusable" is you standard, then id frankly be glad to hear you aren't
11:12:19skrylar[m]which it is, so i have nothing more to say on the matter
11:19:39FromGitter<Bennyelg> this is so cool https://www.nushell.sh/
11:21:07Yardanicoseems like only useful if you really do a lot of stuff with data (like sorting, etc)
11:22:34FromGitter<Bennyelg> i dont think so, its usefull for any since its simplify shell commands
11:22:55Yardanicomeh
11:27:49FromDiscord<Rika> looks interesting
11:28:05FromDiscord<RaycatWhoDat> Definitely.
11:28:14FromDiscord<Rika> BUT you can prolly do that with special executable commands
11:28:21FromDiscord<Rika> on any shell
11:28:35Yardanicoyeah thats my point too
11:29:09FromDiscord<RaycatWhoDat> I would be surprised if there wasn't a utility that did exactly this
11:29:24FromDiscord<RaycatWhoDat> All you'd have to do is pipe into it
11:30:00FromDiscord<RaycatWhoDat> But the concept of the shell automatically doing it does have merit
11:31:02*exelotl joined #nim
11:39:57*exelotl quit (Ping timeout: 260 seconds)
11:46:42FromGitter<Bennyelg> Do procs also inheritance when inheritance from type?
11:46:57Yardanicoif you need runtime dispatch, you need methods
11:47:11FromGitter<Bennyelg> great - this is what i needed:D
11:48:07FromGitter<Bennyelg> (https://files.gitter.im/nim-lang/Nim/NmVi/image.png)
11:48:14FromGitter<Bennyelg> what does it mean :
11:48:30Yardanicoyou need to define a base method for the type your types inherit from
11:48:40Yardanicoalso your base type should inherit from RootObj for inheritance
11:48:52*krux02 quit (Remote host closed the connection)
11:49:36FromGitter<Bennyelg> do we have an example somewhere ?
11:49:39Yardanicoalso you might need https://nim-lang.org/docs/manual.html#multiminusmethods , I don't know what your code looks like
11:49:43Yardanicoyeah see ^
11:52:00skrylar[m]nushell seems neat on first glance
11:56:14FromDiscord<Rika> what makes it unneat?
11:58:46FromGitter<Bennyelg> @Yardanico so this is the only option to call parent method ?
11:58:51FromGitter<Bennyelg> (https://files.gitter.im/nim-lang/Nim/ObPi/image.png)
11:59:06FromDiscord<Rika> its not required
11:59:08Yardanicoidk probably
11:59:18YardanicoI generally don't do methods in Nim so I don't know a lot of stuff about them :)
11:59:28FromDiscord<Rika> you dont need to call base method
11:59:34FromDiscord<Rika> (usually you should)
11:59:36Yardanicowell maybe he wants to
11:59:56FromDiscord<Rika> well im just saying its not a requirement
12:00:02FromGitter<Bennyelg> I have like interface which the parent has almost everything and the rest are extending it
12:00:52FromGitter<Bennyelg> If we will look at the image above, I just want to Unit to have the m method for free
12:02:54Yardanicogenerally you can do OOP in Nim but it's not the preferred method most of the time :)
12:03:43FromGitter<Bennyelg> I understand, well ok
12:03:47FromGitter<Bennyelg> I'll figure this one out
12:05:26*Guest90612 quit (Remote host closed the connection)
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:03*Hideki joined #nim
12:06:25*Hideki is now known as Guest22322
12:06:44*supakeen joined #nim
12:14:55Yardanicohmm I wonder how hard it is to set up nimforum, gonna try it on my vps
12:16:33*liblq-dev joined #nim
12:16:50Yardanicoah seems easy enough, gonna do it lol
12:18:11*zagani joined #nim
12:19:32*someunknownuser joined #nim
12:22:31skrylar[m]you could use something that actually works ^^
12:23:06*waleee-cl quit (Quit: Connection closed for inactivity)
12:33:16Yardaniconice it works
12:33:20Yardanicoit was easy to set it up
12:34:30*zagani quit (Quit: Leaving)
12:38:50dadada__it's so annoying to have to deal with FOSS licensing conflicts
12:38:55Yardanicodadada__: wdym?
12:39:54Yardanicobtw it kinda works https://forum.my-toolbox.xyz/ you can't register because I didn't set up the email thing properly though :D and need to understand how to create categories
12:40:09dom96ooh, nice
12:40:56dadada__wanted to use crc32 in my code, juan carlos put some nim code for it on github and licensed it under MIT, but he copied it from rosettacode, so he isn't really allowed to set his own license as you will know when you read the FAQ from rosettacode, you have to use the GFDL, and that's not compatible with just any FOSS license, as you would hope, the FAQ says so, will anybody complain when I do the same as
12:41:02dadada__juan? probably not, but technically you have to ask the contributors of rosettacode for permission
12:41:30*dadada__ is now known as dadada
12:41:39Yardanicodadada__: isn't it really easy to implement?
12:42:25*NimBot joined #nim
12:42:51skrylar[m]there are some magic numbers, but you could probably find many liberal implementations
12:43:02dadadaYardanico: it's very short code, yes, but who likes reinventing the wheel, even if it takes me 20 minutes, I'll regret having to spend this time when 100000 people have done it before me, I'd rather spend my time on new stuff
12:43:15Yardanicodadada: then why use Nim? :DDDDD
12:43:45Yardanicodom96: btw I didn't figure it out at first, but nimforum seems to work with recaptcha v2, not v3
12:44:03YardanicoI initially created v3 version and wondered why recaptcha said invalid site key :P
12:44:05*filcuc joined #nim
12:44:32dom96Yardanico, please update readme to mention this :)
12:45:04skrylar[m]rika: should be able to use this if you still need it https://git.sr.ht/~skrylar/skyhash/tree/master/src/skyhash/xxhash.nim
12:45:07Yardanicoonce I figure it out I might leave it running because it doesn't use a lot of resources anyway
12:45:34Yardanicoand most of the RAM on my 4gb VPS is free (although only 2 vCPU but that's enough)
12:48:01Yardanicoalso it didn't compile at first with nim 1.2, but worked fine when I installed latest Karax
12:48:06Yardanico(1.1.2)
12:50:01*Hideki_ joined #nim
12:53:37*Guest22322 quit (Ping timeout: 264 seconds)
12:54:17Yardanicoand yes I installed from source :P
12:54:28Yardanico(I mean the forum, not the old release)
13:04:50*exelotl joined #nim
13:06:26*lritter joined #nim
13:10:25*Hideki_ quit (Remote host closed the connection)
13:11:00Yardanicoactually I made it compile with orc and --threads:on lol
13:11:01*Hideki_ joined #nim
13:11:49*Hideki__ joined #nim
13:12:27*Hideki_ quit (Read error: Connection reset by peer)
13:12:42Yardanico(by wrapping the code in {.gcsafe.}: in 3 adds starting on jester.nim:1252)
13:12:53Yardanicosince with arc/orc gcasfe still will produce warnings/errors right now
13:15:03*leorize quit (Ping timeout: 240 seconds)
13:16:26*Hideki__ quit (Ping timeout: 256 seconds)
13:17:05FromGitter<Bennyelg> Hey, and easy way to run over my modules and figure out what imports are not in use ?
13:17:17Yardanicocompile the code
13:18:15Yardanicoabout forum - seems like it leaks hella lot memory with orc (probably due to async), by hitting F5 for 15 seconds I got it to 213mb
13:18:20skrylar[m]more specifically its one of the hints that is on by default
13:20:01Yardanicoit crashed when I stress-tested it with wrk though, due to orc I guess
13:20:28Yardanicocyclicrefs_bacon.nim(102) unregisterCycle ye
13:21:32*rockcavera joined #nim
13:22:08Yardanicowith arc it doesn't crash (expected I guess) but memory just grows because there's nothing to collect cycles :P
13:22:26Yardanicobut it actually uses multiple threads as far as I can see
13:23:01Yardanico1000% cpu (10 full threads), 16k reqs/second to open main forum page
13:24:21dom96fun
13:24:27dom96do threads work with orc?
13:24:36Yardanicodom96: idk really, they should I guess
13:24:49Yardanicobut as I said with orc the forum crashes if I stress-test it
13:24:51Yardanicoin orc code
13:26:02*solitudesf quit (Read error: Connection reset by peer)
13:26:09Yardanicowith asynchttpserver hello world orc doesn't crash, although leaks memory it seems
13:26:14*solitudesf joined #nim
13:26:21Yardanicolet's try just jester but with threads
13:26:38FromDiscord<clyybber> Yardanico: What error does it say?
13:26:40FromDiscord<clyybber> The crash?
13:26:45Yardanico@clyybber ok I'll show
13:26:51FromDiscord<clyybber> oh, nevermind, see it
13:26:58Yardanicobut first maybe I could replicate it without nimforum :)
13:27:13Yardanicoye
13:27:14Yardanicoeasy
13:27:18Yardanicocan replicate
13:27:22FromDiscord<clyybber> if you manage to minimize this then.. Good job!!
13:27:26Yardanicowith jester
13:27:30FromDiscord<clyybber> ha, nice
13:27:38Yardanicolemme try without threads
13:27:56FromDiscord<clyybber> it fails in line 102 ?
13:27:57Yardanicoit doesn't crash without threads on :(
13:28:01FromDiscord<clyybber> hmm
13:28:01disruptekasynchttpserver leaks with orc?
13:28:04Yardanicodisruptek: yes
13:28:08Yardanicoas far as I can see
13:28:12FromDiscord<clyybber> leaks?
13:28:16FromDiscord<clyybber> I thought it just crashed?
13:28:18Yardanicohow often does cycle collector get invoked?
13:28:24Yardanico@clyybber asynchttpserver works but memory grows
13:28:28FromDiscord<clyybber> ah ok
13:28:33Yardanicojester with threads (uses httpbeast) crashes
13:28:49disruptek!memory
13:28:49disbot total: 290 Megabytes; free: 50 Megabytes; owned: 229 Megabytes; max: 290 Megabytes
13:29:03Yardanico@clyybber full stack trace https://gist.github.com/Yardanico/d54aad2de9536ce9e896d9594d684725
13:29:03FromDiscord<clyybber> Yardanico: Can you try with GC_fullcollect?
13:29:09FromDiscord<clyybber> just intersperse them a bit
13:29:13Yardanicois orc supposed to work with threads?
13:29:21FromDiscord<clyybber> not sure
13:29:24FromDiscord<clyybber> think so
13:29:34disruptekit should.
13:29:43FromDiscord<clyybber> Yardanico: Did you build with debug?
13:29:50FromDiscord<clyybber> Then it should say container empty I think
13:30:29YardanicoI built without danger/release
13:30:37Yardanicoand now I rebuilt with -d:debug but it's still the same stack trace
13:30:50FromDiscord<clyybber> Hmm, ok
13:31:23FromDiscord<clyybber> Oh, yeah. Makes sense that this occurs with threads on
13:31:51FromDiscord<clyybber> The roots seq is probably modified concurrently
13:31:59Yardaniconeed locks?
13:32:04Yardanicoyeah it seems to work without threads with jester, I'll try adding fullcollect to asyncdispatch example
13:32:26Yardanicodoing full gc collect on each request isn't ok but for testing it's okay I guess :D
13:32:32FromDiscord<clyybber> yeah :D
13:32:46Yardanicoyeah now it stays on same 1148kb
13:32:48Yardanicoflat
13:32:52Yardanicoah wait
13:32:52Yardanicono
13:33:00Yardanicoit still increases :/
13:33:08Yardanicoeven if I do GC_fullcollet() on each request
13:33:22FromDiscord<clyybber> how about other gcs ?
13:33:28*Hideki_ joined #nim
13:33:44Yardanicowith refc it increases too, but by a much smaller amount
13:34:01disruptekorc's breaker needs to break more stuff, i guess.
13:34:08FromDiscord<clyybber> hmm
13:34:10FromDiscord<clyybber> not sure
13:34:12Yardanico@clyybber to replicate https://gist.github.com/Yardanico/daef5e8da185f5c5600ba64668aad7cc
13:34:17Yardanicorun with --gc:orc -d:danger
13:34:23Yardanicoand stress test with wrk -t15 -c500 -d30s http://127.0.0.1:8080/
13:34:35Yardanicoand check memory usage :)
13:34:36dom96works with default gc right?
13:34:39FromDiscord<clyybber> Yardanico, dom96: Could it be the selectors seq growing?
13:34:48FromDiscord<clyybber> dom96: It also leaks, just slower
13:34:54Yardanicodom96: works but even with refc it also leaks but much slower
13:34:58YardanicoI mean asynchttpserver
13:35:16Yardanicoafter 50k requests memory usage is 7.2mb from 2mb
13:35:27dom96hrm, I dunno whether that can be considered a leak
13:35:43dom967mb seems reasonable
13:36:05Yardanicoah right it seems to stay at 10.5mb even if I stress test it a lot
13:36:08Yardanico(with refc)
13:36:15Yardanicoah nvm, it still grows but really rare
13:36:21Yardanicomostly it's stable so yeah it's fine
13:36:41Yardanicoif you don't need to run a service which does hundreds of thousands of requests each day and needs to run non-stop :P
13:37:23FromDiscord<clyybber> dom96: Do you know why it happens?
13:37:32dom96no idea
13:38:02dom96what you can do to debug though is grab prometheus and set up logging with my prometheus package
13:38:09dom96it can log which types are taking up memory
13:38:13Yardanicookay
13:38:36dom96(likely only works with default gc though)
13:38:49dom96dunno if orc has the same instrumentation support
13:39:18Yardanicothis one for gc? https://github.com/dom96/prometheus/blob/master/tests/tregistry.nim#L64
13:39:46dom96yep
13:39:53dom96all you need to do is expose a jester route
13:40:01dom96like: get "/stats": resp generateLatest()
13:44:12*filcuc quit (Ping timeout: 256 seconds)
13:47:04Yardanicodom96: yeah I set it up
13:47:51Yardaniconim_gc_mem_object_usage_bytes{type="anon ref object from /home/dian/.nim/lib/pure/asyncmacro.nim(246, 33)"} 1876248.0
13:47:59Yardaniconim_gc_mem_object_usage_bytes{type="string"} 1892441.0
13:48:04Yardanico(total 22mb usage)
13:49:14Yardanicofull output https://gist.github.com/Yardanico/ebae8d71235662001eb767834fb23477
13:49:18Yardanicothat's with asynchttpserver
13:51:02Yardaniconim_gc_mem_object_count{type="anon ref object from /home/dian/.nim/lib/pure/asyncmacro.nim(246, 33)"} 13995.0
13:51:02Yardanico lol
13:51:14Yardanicoand nim_gc_mem_object_count{type="string"} 42800.0
13:53:04*someunknownuser quit (Quit: someunknownuser)
13:53:12FromGitter<t1273446_twitter> Hi all. Is it possible to do something like this? &"""content{if cond: "a" else: "b"}content""" ⏎ Or do I have to accept the verbosity of concatenating multiple strings?
13:53:50Yardanicothat's not possible
13:53:58Yardanicoand there's not a lot of "verbosity" really
13:54:11Yardanicoyou can do
13:54:18dom96t1273446_twitter: have you tried wrapping the if stmt in parenthesis?
13:54:30Yardanicodom96: doesn't work
13:54:45Yardanicostrformat doesn't really allow for any nim expressions inside I guess
13:55:08FromGitter<t1273446_twitter> It does add with multiple lines
13:55:39Yardanicobecause : in strformat is a special character
13:56:02FromGitter<t1273446_twitter> Exactly
13:57:43*filcuc joined #nim
13:57:43Yardanicowell you can workaround it
13:58:21dom96ahh of course
13:58:28dom96yeah, I would just create a variable for this
13:58:49Yardanico1-line template though
13:59:05Yardanicosorry 2-line
13:59:10Yardanicotemplate chooseOne(a, aval, bval: untyped): untyped = (newline)if a: aval else: bval
13:59:27Yardanicoand then you can just do echo fmt"{chooseOne(5 > 0, true, false)}"
14:01:33FromGitter<t1273446_twitter> Thanks I will do that
14:09:24*ertp07 quit (Ping timeout: 272 seconds)
14:10:40*ertp07 joined #nim
14:13:19*filcuc quit (Ping timeout: 256 seconds)
14:14:28*solitudesf- joined #nim
14:17:04*solitudesf quit (Ping timeout: 256 seconds)
14:27:31*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
14:28:22*pbb joined #nim
14:30:13*ertp07 quit (Ping timeout: 264 seconds)
14:31:04dadadanim can store time in nanoseconds? but what platforms actually provide this level of resolution?
14:31:21dadadaI can't assume this to work everywhere, right?
14:33:01FromGitter<bung87> yeah ,that's right, you even not need this
14:33:27Yardanicowell JS doesn't
14:33:31Yardanico@bung87 there are use-cases for it
14:34:23FromGitter<bung87> I get it, js date no nanoseconds
14:35:08Yardanicowin/mac/linux all support nanosecond resolution afaik
14:35:08*ertp07 joined #nim
14:36:36FromGitter<bung87> this topic remind me of nanolog
14:38:42dadadaYardanico: yeah, but what about Linux running on embedded systems, do MIPS/ARM and so forth also support that? it would be handy if there was a table that lists on what arch/OS combos this works/doesn't work ...
14:41:45FromDiscord<Rika> I don't see why they wouldn't be able to store time in nanoseconds
14:41:51Yardanicoit's not about storing
14:41:56dadadaRika: it's about measuring
14:41:59Yardanicoit's about having the system clock count up to nanosecond precision
14:42:00FromDiscord<Rika> I do see why they wouldn't be able to measure them at that resolution
14:42:07Yardanicoit's not that easy
14:42:45FromDiscord<Rika> It depends on the system's rtc I'm guessing
14:43:54dadadahmm, according to my googling WASI timestamps do have nanosecond resolution, as JS can interact with WASM code, does this mean we could get nanosecond resolution in JS due to this?
14:44:13YardanicoJS is not wasm though :P
14:44:36dadadawasm will creep into everything according to my estimates ... so the line will be blurred
14:46:51*fredrikhr quit (Read error: Connection reset by peer)
14:48:32FromDiscord<clyybber> dadada: You can't get nanosecond resolution in browsers
14:48:41FromDiscord<clyybber> you could, but now you cant
14:48:47FromDiscord<clyybber> to prevent against spectre
14:49:44dadadaclyybber, it's understable, ... but why do we have to make sacrifices to black hats, I wish there was something smarter to prevent those attacks
14:50:09dadadaand I hope Intel/AMD/... learn something and this doesn't repeat a 1000 times
14:50:41FromDiscord<clyybber> dadada: If you really want to you can disable the protections
14:50:46FromDiscord<clyybber> In your browser
14:51:28FromDiscord<clyybber> Also, yeah you may get nanosecond timestamps with WASM but they will be deliberately inaccurate
14:51:44dadadaclyybber: good to know, yet it means that it will be of limited use in production code, I mean you can't expect users to change such flags
14:52:03*Hideki_ quit (Remote host closed the connection)
14:52:47*Hideki_ joined #nim
14:53:23*PMunch joined #nim
14:54:50FromDiscord<clyybber> yeah, its also made really hard in most browsers
14:54:59FromDiscord<clyybber> and it makes your website seem extremely fishy
14:55:06Yardanicoyeah, since wasm is compiled
14:55:14Yardanicoand who knows what you're doing in your wasm code
14:55:20Yardanicohmm I wonder how arc+os any works with wasm
14:55:23Yardanicogonna test lol
14:55:57skrylar[m]wasm is okay
14:57:06*terps joined #nim
15:00:46*Hideki_ quit (Ping timeout: 256 seconds)
15:01:29*okcy joined #nim
15:01:38*okcy quit (Client Quit)
15:06:37*filcuc joined #nim
15:10:32dadadaI don't see it clearly stated on https://nim-lang.org/docs/times.html that Time.seconds is stored in seconds since the Unix epoch, but what else would it be?
15:11:00dadadathere are a few procs where it is stated, but they are for conversion, so it's unclear if it's converted into something else for Time.seconds
15:13:19PMunchYay, doubled my RAM today :)
15:13:26YardanicoPMunch: cool!
15:13:48PMunchAnd hit the "OC" button in my BIOS, so now I'm running a slight overclock as well :P
15:14:30FromDiscord<Rika> Dadada, it's in Unix epoch
15:15:07dadadaRika: yeah, it should be mentioned with a doc comment on the time object
15:15:25*gangstacat joined #nim
15:28:02*Hideki_ joined #nim
15:36:28*terps quit (Ping timeout: 256 seconds)
15:36:51*dddddd joined #nim
15:39:35*sagax quit (Quit: Konversation terminated!)
15:39:57*sagax joined #nim
15:47:52*Hideki_ quit (Ping timeout: 260 seconds)
15:49:09*filcuc_ joined #nim
15:49:51*filcuc quit (Ping timeout: 260 seconds)
15:54:21*terps joined #nim
16:08:46*terps quit (Ping timeout: 256 seconds)
16:09:42*tane joined #nim
16:09:50*filcuc_ quit (Ping timeout: 256 seconds)
16:17:29*krux02 joined #nim
16:26:14*ptdel joined #nim
16:36:50*sagax quit (Ping timeout: 260 seconds)
16:40:45*waleee-cl joined #nim
16:53:22*Romanson quit (Quit: Connection closed for inactivity)
17:07:29FromDiscord<Tristan> Playing around with winim, trying to write a memory scanner. In CPP it's relatively simple to call an exported function, curious how I'd go about this in Nim?
17:07:31FromDiscord<Tristan> https://hastebin.com/equfiwuriv.cpp
17:09:01FromDiscord<Rika> make a proc with the same signature and the pragma `{.cdecl, dynlib: "ntdll.dll", importc: "NtQueryVirtualMemory".}`, i think
17:13:00FromGitter<bung87> !repo psutil-nim
17:13:01disbothttps://github.com/johnscillieri/psutil-nim -- 9psutil-nim: 11Port of python psutil to nim 15 22⭐ 9🍴 7& 1 more...
17:13:45FromDiscord<Rika> im lazy, has anyone ported bisect to nim?
17:14:01PMunchbisect?
17:14:24disruptek!search bisect
17:14:25disbothttps://github.com/juancarlospaco/nimbug/issues/8 -- 3bisect bot 7& 29 more...
17:14:36disruptek!repo bisect
17:14:38disbothttps://github.com/knutin/bisect -- 9bisect: 11Ordered fixed-size binary dictionary in Erlang 15 63⭐ 18🍴 7& 29 more...
17:14:49FromDiscord<Rika> F
17:14:53FromDiscord<Rika> oops, here
17:14:57FromDiscord<Rika> https://docs.python.org/3.8/library/bisect.html
17:15:17FromDiscord<Rika> i'd port it myself but i am lazy as ive said
17:15:20FromDiscord<Rika> maybe i will tomorrow
17:15:27disruptek~stream
17:15:28disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
17:22:46*Hideki_ joined #nim
17:27:13*Hideki_ quit (Ping timeout: 264 seconds)
17:27:15*PMunch quit (Quit: leaving)
17:49:10*krux02 quit (Remote host closed the connection)
17:52:36*solitudesf- is now known as solitudesf
17:55:25*exelotl quit (Ping timeout: 264 seconds)
17:59:33liblq-devhow can I mark an import as used?
17:59:55liblq-devI can't just plop `when nimHasUsed: {.used.}` into the imported module as it's not my lib
18:06:29*Senketsu joined #nim
18:21:10*terps joined #nim
18:26:03*exelotl joined #nim
18:27:20*Senketsu quit (Quit: WeeChat 2.8)
18:38:52*Senketsu joined #nim
18:43:23*Hideki joined #nim
18:43:46*Hideki is now known as Guest58149
18:45:21YardanicoI wonder if https://github.com/nim-lang/Nim/issues/9867 (at the bottom) if issue related to Nim really
18:45:23disbotβž₯ Long-lived application occasionally dies with SIG_PIPE when calling httpclient.request ; snippet at 12https://play.nim-lang.org/#ix=2aMk
18:45:43Yardanicobasically if I call a nimpy-compiled module from a Django view and then stress-test it with wrk and exit wrk with Ctrl+C I get these SIGPIPE things a bit
18:46:56FromDiscord<Anuke> Does Nim have any good libraries for embedded scripting, e.g. with JS? I know there are Duktape bindings, but Duktape has very limited/missing support for JS features (like arrow functions)
18:47:00*trui joined #nim
18:47:10FromGitter<deech> Can anyone recommend an XML parser lib? I don't need to generate, just read.
18:47:16Yardanicostdlib
18:47:45livcdI have used this https://nim-lang.org/docs/parsexml.html
18:47:49Yardanicoyou'll need https://nim-lang.org/docs/xmlparser.html and https://nim-lang.org/docs/xmltree.html
18:48:00*Guest58149 quit (Ping timeout: 256 seconds)
18:48:15Yardanicoor parsexml, yeah
18:48:17FromGitter<deech> I know. I just wondered if there as a full featured on that supported XPATH and the like ...
18:48:25FromGitter<deech> And XSLT
18:48:30Yardaniconot that I know of
18:48:36Yardaniconimquery supports CSS selectors though
18:48:57Yardanicoit's for html but maybe you can adapt it for XML (it should not require a lot of changes really) https://github.com/GULPF/nimquery
18:49:00FromGitter<deech> This isn't for the DOM but for SVG.
18:49:08Yardanicono
18:49:15Yardanicowell I mean it doesn't really matter
18:59:10*Senketsu quit (Quit: WeeChat 2.8)
19:00:43*Senketsu joined #nim
19:02:44*Senketsu quit (Client Quit)
19:29:52*terps quit (Ping timeout: 256 seconds)
19:31:24Prestigejust saw <//> in lists.nim, what is that or where is it defined?
19:32:55Zevvit's in system.nim but not defined
19:33:24FromDiscord<Rika> it's `owned`
19:33:26FromDiscord<Rika> afaik
19:33:43Zevvyeah I remember something like that, but it was dropped because it is a bit silly
19:34:08Zevvor was it
19:34:39*terps joined #nim
19:35:25YardanicoZevv: yeah now it's actual owned ref
19:35:31Yardanicoit was old syntax iirc
19:35:35Zevvright
19:49:54*exelotl quit (Ping timeout: 240 seconds)
19:55:19*zagani joined #nim
19:55:34*sagax joined #nim
19:56:25*chemist69_ quit (Ping timeout: 240 seconds)
19:57:05*zagani left #nim (#nim)
19:57:34*zagani joined #nim
19:57:45*chemist69 joined #nim
20:00:45*zagani quit (Quit: Leaving)
20:01:53*mjsir911 quit (Quit: Goodbye, World!)
20:02:49*j4nvkvc joined #nim
20:12:32FromDiscord<Rika> TIL you cant float divide two int64s
20:12:53Yardanicoalso see https://nim-lang.org/docs/lenientops.html
20:12:57FromDiscord<Rika> prolly needs lenientops
20:12:58FromDiscord<Rika> yeah
20:12:59FromDiscord<Rika> i know
20:13:53FromDiscord<Rika> not even with lenientops...
20:14:03FromDiscord<Rika> thats weird
20:16:16FromDiscord<exelotl> @Anuke not sure if there are nim bindings but this is what you want to use: https://bellard.org/quickjs/
20:21:25*PMunch joined #nim
20:22:16*drewr joined #nim
20:23:09FromGitter<bung87> started from 2019, pretty new js engine
20:23:27Yardanicothat doesn't mean it's bad
20:23:32Yardanico"Passes nearly 100% of the ECMAScript Test Suite tests when selecting the ES2020 features."
20:23:36Yardanico"Fast interpreter with very low startup time: runs the 69000 tests of the ECMAScript Test Suite in about 95 seconds on a single core of a desktop PC. The complete life cycle of a runtime instance completes in less than 300 microseconds."
20:25:11FromDiscord<Rika> looks cool
20:25:39FromDiscord<Rika> though the "nearly" part sounds uber vague
20:25:46Yardanicohttps://en.wikipedia.org/wiki/Fabrice_Bellard
20:25:47FromDiscord<Rika> is 90% nearly to them or 99%?
20:25:53Yardanicoit's the guy who made FFmpeg, QEMU and tcc btw
20:25:56FromGitter<bung87> developer just need more confident
20:26:44FromDiscord<Rika> oh
20:26:54FromDiscord<Rika> if he made ffmpeg then i'm more trustworthy of that project now
20:27:01FromGitter<bung87> heard of ,he make of many popular projects
20:27:39FromDiscord<Rika> ffmpeg is really good, used basically anywhere that needs video processing, and sometimes image and audio processing
20:27:44Yardanicoyep
20:27:54Yardanicoand qemu is used everywhere for virtualisation ;)
20:28:28FromDiscord<Rika> that too
20:28:41FromDiscord<Rika> like holy shit his works are super impressive
20:28:58FromGitter<bung87> so he actually help lot of bussiness software
20:29:28Yardanicowell it's not "business software"
20:29:36Yardanicobut it's certainly high quality open source software
20:30:20FromGitter<bung87> I should add word indirectly
20:31:36FromGitter<bung87> what's the time there?
20:44:22FromDiscord<mratsim> I hate multithreading :/
20:44:31FromDiscord<mratsim> it's a mess to debug
20:44:55FromDiscord<Anuke> @exelotl thanks, that library looks like what I need
20:45:19PMunch@mratsim, yeah it's a pain..
20:45:52FromGitter<bung87> destribution too but you cant refuse..
20:45:57FromDiscord<Anuke> looks like there's https://github.com/ImVexed/quickjs4nim too
20:45:59Yardanico@mratsim I saw your commits and issues, you're really so smart I'm kinda jealous :P
20:46:05Yardanicolike all of this formal verification stuff
20:46:12Yardanicoso cool
20:48:17FromDiscord<mratsim> I'm stuck implementing my own though :/ I have graphs and data structure on a paper but then I need to arrange them in a functional program
20:48:29FromGitter<bung87> plus me and someone I knew
20:49:12FromDiscord<mratsim> but the C++ memory model is quite complex, I need an execution graph, a store->load graph, take into account compiler reordering :/
20:50:54FromGitter<bung87> tough day
20:56:25*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
20:57:31FromDiscord<Avahe> g
21:10:48*solitudesf quit (Ping timeout: 256 seconds)
21:11:27*krux02 joined #nim
21:12:59*Jesin quit (Quit: Leaving)
21:14:08*ertp07 quit (Ping timeout: 256 seconds)
21:15:16*terps quit (Ping timeout: 256 seconds)
21:15:18*ertp07 joined #nim
21:15:30*exelotl joined #nim
21:16:43*terps joined #nim
21:17:06*terps quit (Client Quit)
21:19:59*Jesin joined #nim
21:23:16FromDiscord<__ibrahim__> https://play.nim-lang.org/#ix=2lsB
21:23:16FromDiscord<__ibrahim__> hello, is it possible to omit the parameters in the add function on line 7?
21:23:34Yardanicowdym "omit"
21:23:45FromDiscord<__ibrahim__> just write add
21:23:54FromDiscord<__ibrahim__> without (a, b)
21:24:36Yardaniconot really
21:26:24FromDiscord<__ibrahim__> ok cool
21:27:22FromDiscord<__ibrahim__> what are a and b anyway, i cant write x and y
21:27:40Yardanicoa and b are the arguments foldl inserts
21:27:57Yardanicohttps://nim-lang.org/docs/sequtils.html#foldl.t%2Cuntyped%2Cuntyped
21:28:01Yardanico"The operation parameter should be an expression which uses the variables a and b for each step of the fold"
21:28:12Yardanicohttps://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/collections/sequtils.nim#L821
21:28:19Yardanicoit's a pretty simple template
21:28:36*lritter quit (Quit: Leaving)
21:28:44YardanicoI mean you could do something like
21:29:26Yardanicohttps://play.nim-lang.org/#ix=2lsK
21:29:49FromDiscord<__ibrahim__> oh nice
21:30:30FromDiscord<__ibrahim__> that's very cool
21:30:58Yardanicowell templates are mostly just code substitutions so you can do stuff like that :P
21:31:16Yardanicoto call + you can do something like foldls(list, `+`) / list.len()
21:31:29Yardanicobackticks because it's being called as op(a, b) and not "a op b"
21:31:45Yardanicofor the first one with operators you need to use backticks
21:32:20FromDiscord<__ibrahim__> backticks are for operator stuff right? thats how u make custom operators
21:32:33Yardanicothey're for escaping your code kinda
21:32:46Yardanicoif you want to use a keyword as an identifier, for operators and for calling operators as procedures
21:33:19FromDiscord<__ibrahim__> that's really cool for functional stuff
21:33:53Yardanicoproc `+++`(a, b: int): int = a + b + a (newline) var `if` = "hello" (newline) echo `+++`(3, 5)
21:34:15Yardanicohttps://play.nim-lang.org/#ix=2lsM
21:34:55FromDiscord<__ibrahim__> wow :D
21:35:12Yardanicoalso it's used in places like quote do (for macros) to insert nodes from the macro itself
21:35:15Yardanicolike interpolation
21:35:40FromDiscord<__ibrahim__> i didn't get into macros yet, but ill keep an eye out
21:45:28FromDiscord<mratsim> Ah, I think I solved 90% of the hanging threads issue in this PR
21:56:39*idf quit (Ping timeout: 260 seconds)
21:57:52*arecaceae quit (Remote host closed the connection)
21:58:14*arecaceae joined #nim
22:02:45*PMunch quit (Quit: leaving)
22:04:23*liblq-dev quit (Quit: WeeChat 2.8)
22:29:44*exelotl quit (Ping timeout: 272 seconds)
22:33:44*tane quit (Quit: Leaving)
23:07:47FromDiscord<kodkuce> whats that pastebin i can curl to, i reinstalled OS frogot to backup my bashrc
23:13:02*dddddd quit (Ping timeout: 260 seconds)
23:15:14*Hideki joined #nim
23:15:38*Hideki is now known as Guest76944
23:18:56Yardanicoix.io
23:21:40*dadada quit (Ping timeout: 272 seconds)
23:31:42*dadada joined #nim
23:32:06*dadada is now known as Guest8600
23:41:49*krux02 quit (Remote host closed the connection)
23:46:08rockcaveraCould someone explain why code 2 doesn't work? Or is it a bug? https://play.nim-lang.org/#ix=2ltK
23:47:06FromDiscord<KingDarBoja> fmt is not escaping the `'` afaik
23:47:47FromDiscord<KingDarBoja> Wait
23:48:25rockcaverathat's not the problem
23:48:25FromDiscord<KingDarBoja> Nope, no idea what is the issue πŸ€”
23:48:44FromDiscord<KingDarBoja> Never used template before
23:50:01*waleee-cl quit (Quit: Connection closed for inactivity)
23:55:52*Guest8600 quit (Ping timeout: 272 seconds)
23:59:07nisstyreif I do `a == b` where a is cstring and b is string, is Nim converting b to a cstring behind the scenes to do the comparison?
23:59:27nisstyreb is a literal, actually
23:59:34nisstyreso I'm curious what it does there