<< 07-08-2021 >>

00:06:24FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3vd3
00:11:46FromDiscord<top level await> wwaaaaait what
00:11:53FromDiscord<top level await> i use figma to design random things 24/7
00:11:59FromDiscord<top level await> https://github.com/treeform/fidget ??????
00:12:02nrds<R2D299> itHub: 7"Figma based UI library for nim, with HTML and OpenGL backends."
00:12:05FromDiscord<top level await> this a tresure trove
00:13:38FromDiscord<Elegantbeef> Hmm that's quite odd ayy, is the full code published somewhere?
00:14:27FromDiscord<Ayy Lmao> In reply to @Elegantbeef "Hmm that's quite odd": Yeah I have it here: https://github.com/Alkamist/AlkamistExtension
00:14:30nrds<R2D299> itHub: 7"<No Description>"
00:16:36FromDiscord<Ayy Lmao> `reaper/wrapper.nim` has most of the functions I'm talking about. If I call the `analyzePitch` function in `pitchcorrection/editor.nim` that's when the problems start.
00:17:15FromDiscord<Elegantbeef> Do you have a way setup to test this?
00:19:37FromDiscord<Ayy Lmao> I'm super unorganized at the moment so not really. It most likely only works on windows at the moment since I don't have other platforms to test on. If you have windows I could try to walk you through it
00:19:47FromDiscord<Elegantbeef> Well i can use wine probably
00:20:03FromDiscord<Elegantbeef> But if it's complicated i'll just look at the code more
00:21:46FromDiscord<Ayy Lmao> I have a build script in `scripts` that builds it, but it is hardcoded for windows. It should be able to be run on other platforms but you need to properly link the files in `WDL/swell`
00:22:22FromDiscord<Ayy Lmao> its from this https://www.cockos.com/wdl/
00:22:48FromDiscord<Elegantbeef> I'll just comb the desert
00:23:52nrds<Prestige99> https://gifimage.net/wp-content/uploads/2017/10/comb-the-desert-gif-6.gif
00:24:14FromDiscord<Elegantbeef> Thanks prestige was hoping my reference wouldnt fail
00:24:24FromDiscord<Elegantbeef> That spawn statement has me weary
00:24:58FromDiscord<Ayy Lmao> As far as I can tell the problems don't involve the spawn statement. I have issues without it
00:25:30FromDiscord<Elegantbeef> Well the issue is unclear so breakpoint time?
00:26:06FromDiscord<Ayy Lmao> The weird thing is that all of this stuff works fine, except for when I call it from an even in a win32 window.
00:26:29FromDiscord<Ayy Lmao> In reply to @Elegantbeef "Well the issue is": I have no idea how to set something like that up, I've just been commenting out parts of the code to narrow down the issue.
00:27:10FromDiscord<Ayy Lmao> I am almost certain it involves the memory allocation in the peaks function. Because if I generate a sine wave manually without asking reaper for audio it doesn't have problems
00:31:57FromDiscord<reilly> In reply to @top level await "this a tresure trove": Fidget is great! There are already plans for a Fidget2 as well :)
00:40:05FromDiscord<Elegantbeef> Ayy do you use vscode?
00:40:14FromDiscord<Ayy Lmao> Yeah I do
00:40:35FromDiscord<Elegantbeef> https://github.com/saem/vscode-nim#debugging can follow that
00:40:37nrds<R2D299> itHub: 7"<No Description>"
00:42:01FromDiscord<Ayy Lmao> In reply to @Elegantbeef "https://github.com/saem/vscode-nim#debugging can fo": Sweet, I'll look into it.
00:42:04nrds<R2D299> itHub: 7"<No Description>"
00:44:05FromDiscord<Ayy Lmao> I have a hunch that the function I'm calling to get the audio data from reaper `PCM_Source_GetPeaks` intends you to keep polling it or something. It's not super well documented but it says in the docs that it returns information about how many samples it wrote. I was thinking that it blocks until it's done but that might not be the case.
00:57:16FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdc
00:57:34FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdd
01:05:57FromDiscord<codic> lol never mind im dumb
01:06:03FromDiscord<codic> forgot DISPLAY==:1
01:06:04FromDiscord<codic> (edit) "DISPLAY==:1" => "DISPLAY=:1"
01:07:45nrds<Prestige99> codic are you making a new wm? :D
01:10:14*auxym quit (Ping timeout: 256 seconds)
01:22:34*neurocyte1 joined #nim
01:22:34*neurocyte1 quit (Changing host)
01:22:34*neurocyte1 joined #nim
01:26:21*neurocyte quit (Ping timeout: 258 seconds)
01:26:22*neurocyte1 is now known as neurocyte
01:30:43*cyraxjoe quit (Quit: I'm out!)
01:32:22*cyraxjoe joined #nim
01:35:45FromDiscord<codic> yep
01:37:02FromDiscord<codic> i think i'll have a stab at reparenting now
01:38:04nrds<Prestige99> It was a bit of a pita so I didn't bother, don't know if there are any advantages
01:38:16nrds<Prestige99> unless you want to add your own fancy borders or controls, I guess
01:44:24FromDiscord<codic> yeah I was just using xsetwindowborder, but this offers more control if I can get it working
01:46:58*xet7 quit (Ping timeout: 240 seconds)
01:47:35FromDiscord<Elegantbeef> Hello tsoj
01:48:13FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdm
01:48:22FromDiscord<Elegantbeef> Oh wait that was through discord i know look like a stalker
01:49:55FromDiscord<codic> lol
01:50:25FromDiscord<codic> the field is ev.xbutton.state, but now how do I both focus the clicked window (XRaiseWindow) and forward the click event I intercepted to it?
01:50:53FromDiscord<Elegantbeef> XSetInputFocus
01:51:30FromDiscord<Elegantbeef> If you're grabbing inputs like the above you will not get it if it has the alt modifier
01:51:40FromDiscord<Elegantbeef> XGrabButton only grabs inputs if they matche the filter
01:54:40*arkurious quit (Quit: Leaving)
01:59:47*xet7 joined #nim
02:09:22FromDiscord<codic> it does capture them
02:09:23FromDiscord<codic> not sure why
02:09:28FromDiscord<codic> but alt+click works
02:10:19FromDiscord<codic> i'm not sure if I want xsetinputfocus, it looks like I want xsendevent
02:18:06FromDiscord<Elegantbeef> What i do is use a `Button(btn: 1..5, state: cuint)` as a key to a hashtable for finding the event
02:18:43FromDiscord<Elegantbeef> https://github.com/beef331/goodwm/blob/master/src/goodwm/desktops.nim#L224 which means I call this
02:20:07FromDiscord<Elegantbeef> Though my WM does have some questionable architecture
02:43:19FromDiscord<@bracketmaster-5a708063d73408ce4> sent a long message, see http://ix.io/3vdx
02:43:33FromDiscord<@bracketmaster-5a708063d73408ce4> To be more clear, nim complains that the files imported in test\_lexer are never used
02:49:55FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#pragmas-used-pragma
02:51:03FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdz
02:51:39FromDiscord<codic> i can use a conditional to solve it yeah
02:53:58FromDiscord<codic> hmm so I got right click to forward
02:53:59FromDiscord<codic> but not left click
02:54:17FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdA
03:00:04FromDiscord<Elegantbeef> Nope, i manage the input internally after capturing everything i "need"
03:22:10FromDiscord<codic> hmm where does this `d` come from?
03:24:32FromDiscord<codic> also the issue I think is I don't grab left clicks without alt
03:24:58FromDiscord<Bung> am looking at disruptek's cps module, It seem it not compatible with other async libs ?
03:24:59FromDiscord<Elegantbeef> It's my desktop object that i instantiate before my main loop in `goodwm.nim`
03:26:22FromDiscord<codic> hmm i see
03:27:28FromDiscord<codic> oh wait i see my issue; the reason right click works is because it is only Alt + RClick
03:27:42FromDiscord<codic> soo XSendEvent doesn't work
03:27:49FromDiscord<codic> what other approach could I take hmm
03:28:59nrds<Prestige99> hey codic I just got back. What are you trying to do?
03:30:37FromDiscord<codic> i'm trying to make it so that I can use my left mouse button to raise a window if it's not already raised, then click on it in the clicked spot
03:31:02FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdL
03:31:37FromDiscord<codic> and in the main loop I tried forwarding the events, but it doesn't look to work; it raises the window but doesn't forward the events
03:31:39FromDiscord<codic> http://hastebin.com/epapaniruz.yaml
03:32:14nrds<Prestige99> So the way I handled that, is by using XGrabButton with AnyButton and AnyModifier (so you can capture click events without modifiers). Then, once the window becomes raised/focused, I use XUngrabButton with AnyButton and AnyModifier, then XGrabButton again with the modifiers I want
03:32:28nrds<Prestige99> for my wm I use the Super key
03:33:11nrds<Prestige99> https://github.com/avahe-kellenberger/nimdow/blob/master/src/nimdowpkg/windowmanager.nim#L768
03:33:31nrds<Prestige99> woops I meant https://github.com/avahe-kellenberger/nimdow/blob/master/src/nimdowpkg/windowmanager.nim#L731
03:34:42nrds<Prestige99> I should actually have an else on line 751 but it doesn't matter
03:40:38FromDiscord<codic> I used `0` instead of `AnyModifier` that might have caused the issue
03:40:49nrds<Prestige99> ah
03:43:04FromDiscord<codic> nope, same issue
03:43:25nrds<Prestige99> What issue are you having exactly?
03:43:27FromDiscord<codic> i'm grabbing/ungrabbing the pointer instead of the window
03:43:47FromDiscord<codic> left click events aren't forwarded to the application
03:44:27FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdO
03:44:33nrds<Prestige99> I'm not sure what you mean by "instead of the window"
03:46:00nrds<Prestige99> You won't get button events if you aren't already listening for them
03:47:47FromDiscord<codic> i use XGrabPointer instead of XGrabWindow
03:48:00FromDiscord<codic> wait there is no xgrabwindow
03:48:16nrds<Prestige99> XGrabButton is what I'm using
03:48:28FromDiscord<Elegantbeef> I'm also using XGrabButton
03:48:33FromDiscord<codic> me as well
03:48:48FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdQ
03:48:50FromDiscord<codic> for moving and resizing I'm using XGrabPointer
03:48:51FromDiscord<Elegantbeef> I call this after loading a config https://github.com/beef331/goodwm/blob/master/src/goodwm/desktops.nim#L247
03:49:00nrds<Prestige99> can you echo in your case statement? I don't think you're going to be getting button events
03:49:20nrds<Prestige99> oh you do that earlier, cool
03:49:53FromDiscord<codic> i do get events, because resizing and moving still is working
03:50:24FromDiscord<codic> it is just forwarding a click to the application that isn't working (i'll add a XRaiseWindow before here later, i just want to get it to work first)
03:50:25nrds<Prestige99> Really should use constants in x.nim instead of 1 or 0 btw
03:50:36FromDiscord<@bracketmaster-5a708063d73408ce4> thanks beef
03:50:46FromDiscord<codic> here is the full file: https://hastebin.com/gikasitifi.yaml
03:50:59nrds<Prestige99> have you read https://tronche.com/gui/x/xlib/input/XGrabPointer.html ?
03:51:10FromDiscord<Elegantbeef> And i shouldnt give any help prestige since i have 0 idea if my WM is even done properly \:D
03:51:34nrds<Prestige99> Haha nah you're good man
03:52:43nrds<Prestige99> Xephyr + logging helped me figure things out, a lot
03:52:58FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdR
03:54:04FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdT
03:54:20nrds<Prestige99> could it have anything to do with a LeaveNotify event being generated after you call XUngrabPointer?
03:55:33FromDiscord<codic> not sure, I haven't selected those events in XSelectInput
03:55:38FromDiscord<codic> only substructurenotifymask
04:01:29FromDiscord<codic> i don't think so I think it's just a simple logic error
04:01:34FromDiscord<codic> but for some reason actually
04:01:43FromDiscord<codic> even if I remove the else, it never reaches the sending button release
04:01:55FromDiscord<codic> so it looks like button release is never recieved?
04:02:49nrds<Prestige99> what do you expect to happen and what behavior are you observing?
04:05:31FromDiscord<codic> I expect that when I click a button and release it, a ButtonRelease event is recieved but I don't get it
04:05:50FromDiscord<codic> except if I alt + right click
04:05:58FromDiscord<codic> of course, normal right click would not work
04:06:01*supakeen quit (Quit: WeeChat 3.2)
04:06:02FromDiscord<codic> but left click should work, without a modifier
04:06:05FromDiscord<codic> because I XGrabKey that
04:06:18FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdW
04:06:30FromDiscord<codic> oh do I have to do
04:06:37FromDiscord<codic> ButtonPressMask or ButtonReleaseMask
04:06:38FromDiscord<codic> perhaps
04:06:41nrds<Prestige99> yes
04:06:51FromDiscord<codic> yep
04:06:58nrds<Prestige99> check the function in my code that I linked
04:07:06nrds<Prestige99> I'm using ButtonPressMask or ButtonReleaseMask or PointerMotionMask,
04:07:54FromDiscord<codic> now it sends button presses and releases with xsendevent but the window doesnt react to them
04:08:59FromDiscord<codic> i think it just ignores the xsendevent...
04:10:43FromDiscord<codic> i'm not sure how I can fake a button press
04:11:08FromDiscord<codic> and have the client think its a normal one
04:13:50FromDiscord<codic> xtest has XTestFakeButtonEvent which doesnt have x and y parameters
04:18:26FromDiscord<codic> i might just handle motionnotify for focus, super+click to raise, and do the rest later
04:19:50FromDiscord<codic> (edit) "do the rest later" => "figure this out"
04:20:09FromDiscord<codic> generally I use keyboard for this anyways
04:21:42FromDiscord<Elegantbeef> That's mostly what i do
04:22:28FromDiscord<Elegantbeef> Only watch for my shortcuts, and use XGrabButton/Key
04:24:12FromDiscord<codic> ok now on to finally getting reparenting done
04:24:23FromDiscord<codic> hopefully i can use my crappy wm in a week or two
04:24:30FromDiscord<Elegantbeef> reparenting?
04:26:08FromDiscord<codic> fancy window borders, drawing windows that are bigger than the actual window and setting them as the parent of the actual window to map on the screen
04:26:19FromDiscord<codic> more complicated but gives you a lot more control
04:26:24FromDiscord<Elegantbeef> Ah didnt realize that was how that was done
04:26:25FromDiscord<codic> because the background window can be absolutely anything
04:27:06FromDiscord<Elegantbeef> My worst idea was to use sdl2 to open my status bar windows \:D
04:27:29FromDiscord<Elegantbeef> Works and was easy but takes my program from like 1MB to 24MB of ram \:D
05:14:45*vicfred joined #nim
05:15:25FromDiscord<codic> haha, did you write your own status bar?
05:15:32FromDiscord<Elegantbeef> I am
05:15:40FromDiscord<codic> nice
05:15:55FromDiscord<codic> i might try one but probably would support it with an emwh hint instead of hardcoding it into the wm
05:16:07FromDiscord<Elegantbeef> If curious this is the present state of my WM flashing images for those that cant see them πŸ˜› https://streamable.com/hottcl
05:16:15*pyautogui joined #nim
05:17:24*pyautogui quit (Client Quit)
05:18:44FromDiscord<Elegantbeef> I'm doing a weird stack like system instead of a number'd or named workspace
05:24:21FromDiscord<codic> cool, i'm adding optional master stack tiling, but that workspace method is curious
05:24:24FromDiscord<codic> how do you render texdt on the bar?
05:24:31FromDiscord<Elegantbeef> Pixie
05:24:42FromDiscord<codic> oh huh cool
05:24:51FromDiscord<codic> not using x11 directly for it ?
05:24:57*pyautogui joined #nim
05:24:59FromDiscord<Elegantbeef> Nope
05:25:19FromDiscord<Elegantbeef> After looking at the api that X has for stuff like this idk if i'd want to \:D
05:25:20FromDiscord<codic> how do you get pixie's output to render onto a window then?
05:25:27FromDiscord<Elegantbeef> Using sdl2
05:25:45FromDiscord<codic> i wrote a small bar before it's not that bad, just inbuilt font rendering is super super bad but pango makes it ok
05:25:53FromDiscord<codic> ah
05:25:55FromDiscord<Elegantbeef> I want to get rid of that dependency but spent about an hour today trying to and decided "well i'll keep it i guess"
05:26:24FromDiscord<codic> in x11 pango text should be pretty easy, for circles in xlib there's XDrawArc
05:26:25FromDiscord<Elegantbeef> I should be capable of copying the image it generates to the X window, but couldnt figure out how
05:26:34FromDiscord<codic> i should figure out how to make my event loop async
05:26:42FromDiscord<codic> maybe spawn a new thread whenever an event is recieved
05:27:04FromDiscord<Elegantbeef> I'm also presently using a thread for drawing my status bars, though i do want to see if i can use CPS here
05:28:49FromDiscord<codic> i might switch to xcb but it just looks like overcomplication because for 99% of my tasks the style is just making code verbose
05:29:07FromDiscord<codic> it's basically just functions return a xcb cookie, like a nim Future[T]
05:29:43FromDiscord<codic> and it makes the request, but doesnt fetch the value from the server until you try to get the value the cookie holds
05:43:06nrds<Prestige99> Yeah it's basically async, non-blocking
05:43:12nrds<Prestige99> xlib isn't that bad imo though
05:45:34FromDiscord<Elegantbeef> It's not too bad this time around, only major issue is the blocking main loop πŸ˜€
05:45:37FromDiscord<Elegantbeef> Me being a dumb dumb and threading to get around that is now biting me in the ass for the config
05:53:46FromDiscord<xflywind> Can I use the same proc name to module name in Nim?
05:53:52*pyautogui quit (Quit: Connection closed)
05:56:27*pyautogui joined #nim
05:56:48FromDiscord<Rika> not recommended, causes a few issues afaik
05:58:36FromDiscord<xflywind> I see
06:00:08FromDiscord<xflywind> In reply to @top level await "run.nim https://pastebin.com/Hnc7nnf3 routes/index.": Please not use the same proc name to module name.
06:03:24FromDiscord<xflywind> Known issues https://forum.nim-lang.org/t/6835
06:08:58FromDiscord<undersquire> is -d:useMalloc not working?
06:09:02FromDiscord<undersquire> (edit) "working?" => "working atm?"
06:09:12FromDiscord<undersquire> I get compiler errors when trying to use it
06:09:40FromDiscord<undersquire> (edit) "I get compiler errors when trying to use it ... " added "(even on a hello world program)"
06:09:54FromDiscord<Rika> it should be
06:10:01FromDiscord<Rika> what are you doing exactly
06:10:07FromDiscord<undersquire> echo("Hello, world!")
06:10:07FromDiscord<undersquire> lol
06:10:08FromDiscord<Rika> and what errors are we talking about
06:10:15FromDiscord<undersquire> let me get the error one sec
06:10:31FromDiscord<Rika> doing as in how are you compiling
06:10:46FromDiscord<undersquire> nim --gc:arc -d:useMalloc c program.nim
06:11:17FromDiscord<Rika> c must be before --gc:
06:11:27FromDiscord<Rika> nim c --gc:arc -d:useMalloc program.nim
06:12:22FromDiscord<undersquire> oh
06:12:31FromDiscord<undersquire> ok that seemed to fix it lol
06:12:41FromDiscord<undersquire> i dont really see why that should matter tho
06:13:10FromDiscord<Rika> because otherwise your command is incorrect?
06:13:56FromDiscord<undersquire> -- flags are just flags
06:14:44FromDiscord<undersquire> tho i guess it makes sense since im assuming they are specific to the option selected `c, cpp, js
06:14:44FromDiscord<Rika> -- flags can be positionally contextual
06:14:45FromDiscord<undersquire> (edit) "js" => "js`"
06:15:19FromDiscord<Rika> just like how some programs that run other programs pass flags after raw `--` to the program
06:15:23FromDiscord<undersquire> yeah
06:15:44FromDiscord<undersquire> also -d:lto isnt working for me tho I think its an issue with cang
06:15:46FromDiscord<undersquire> (edit) "cang" => "clang"
06:15:59FromDiscord<Rika> and how nimble(?) has flags for itself (nimble --f ) and then the task (nimble task --f)
06:16:05FromDiscord<Elegantbeef> `--passC:-flto`
06:16:07FromDiscord<Rika> clang needs
06:16:08FromDiscord<Rika> yes
06:16:12FromDiscord<codic> In reply to @Elegantbeef "Me being a dumb": i like xlib too but I was thinking of threading too, what issues did you notice?
06:16:16FromDiscord<Elegantbeef> It's a known issue with `-d:lto` doesnt play well with specific compilers
06:16:18FromDiscord<undersquire> In reply to @Elegantbeef "`--passC:-flto`": I saw on the docs that -d:lto replaces that
06:16:19FromDiscord<undersquire> oh
06:16:24FromDiscord<Rika> not for clang
06:16:39FromDiscord<Elegantbeef> I'm not threading Xlib but instead my status bar drawing
06:16:43FromDiscord<Elegantbeef> Which resulted in that issue
06:17:57FromDiscord<codic> why don't you just after handling an event, check if you need to redraw the bar and if so do it there?
06:18:13FromDiscord<undersquire> are you making a wm
06:18:39FromDiscord<codic> yes, 3 people here apparently including myself lol
06:18:42FromDiscord<codic> lots of nim wms
06:18:45FromDiscord<undersquire> lol nice
06:19:24FromDiscord<undersquire> also just curious what was the smallest nim executable you've ever seen
06:19:45nrds<Prestige99> Elegantbeef do you plan on making your wm widely usable?
06:19:53nrds<Prestige99> I've been using mine for about a year now I think
06:19:59FromDiscord<Elegantbeef> "widely usable"?
06:20:18nrds<Prestige99> my brain is too tired for good English
06:20:40nrds<Prestige99> like something you can use as your daily driver
06:20:55FromDiscord<Elegantbeef> That's my goal yea
06:21:14FromDiscord<Elegantbeef> Though my workspace replacement idea might not work well
06:21:44FromDiscord<Elegantbeef> May be too much like alt tab \:P
06:22:15nrds<Prestige99> ah I see
06:22:32nrds<Prestige99> I need to implement my insane tags idea, sometime...
06:22:50FromDiscord<codic> i should try using nimdow while I work on my own
06:22:51nrds<Prestige99> 81 tags (workspaces) per monitor, like a 2d array 9x9
06:22:52FromDiscord<codic> seems very cool
06:23:01FromDiscord<codic> yeah spatial workspaces are awesome
06:23:02nrds<Prestige99> Thanks
06:23:52FromDiscord<Elegantbeef> My biggest issue with i3wm work spaces is the numbers are arbitrary and not overly helpful
06:23:53FromDiscord<codic> yeah looks like it's pretty dwm like, i like it
06:24:00FromDiscord<codic> but without the silly conflicting patches
06:24:07FromDiscord<Elegantbeef> Like yes i can do "Move to 6" but it's not easy to reason where 6 is
06:24:33FromDiscord<codic> systray too, nice
06:24:40FromDiscord<codic> for me horizontal workspaces are fine
06:24:47FromDiscord<codic> what do you mean it's not easy to reason?
06:24:56FromDiscord<Elegantbeef> I'm planning on having a toggable button that moves any new window created to it's own workspace
06:25:12FromDiscord<Elegantbeef> Well i have 3 monitors and havent setup workspaces
06:25:17FromDiscord<codic> in the status bar?
06:25:23FromDiscord<codic> oh yes i have 1 monitor
06:25:27FromDiscord<codic> i see how it can get confusing then
06:25:51FromDiscord<codic> i think if I end up supporting multiple monitors, it will probably be 9 tags / monitor
06:26:03FromDiscord<codic> so like with 3 monitors it would be 27 tags, and each monitor gets its own set of tags
06:26:12FromDiscord<Elegantbeef> I much prefer the idea that i can carousel through monitors, and then move to a new monitor optionally choosing if it moves to a new workspace or not
06:26:31FromDiscord<codic> hmm
06:28:48FromDiscord<codic> is it that bad that some of my code is inconsistent in how it uses ufcs and optional parens
06:29:09nrds<Prestige99> I'd say yes
06:29:19FromDiscord<Elegantbeef> Possibly depends on what you're doing
06:37:26FromDiscord<codic> its just stuff like `abc def` vs `abc(def)`, i just use whichever seems clearer to me when I'm writing it
06:38:24FromDiscord<codic> hmm so nimdow doesn't support clickable status bar?
06:38:28FromDiscord<codic> well i dont need it anyways
06:38:59nrds<Prestige99> nah, I pretty much don't use my mouse so I haven't bothered adding it yet
06:39:06nrds<Prestige99> I believe there's an open issue for it
06:40:40nrds<Prestige99> I'm off, see you all later o/
06:40:51FromDiscord<codic> cya
06:41:24FromDiscord<Elegantbeef> Buh bye
06:48:34FromDiscord<codic> ok now nimdow works, this is pretty familiar and awesom
06:48:35FromDiscord<codic> (edit) "awesom" => "awesome"
06:49:03FromDiscord<Elegantbeef> Havent actually used nimdow i was meaning to try it but never got around to it
06:51:33FromDiscord<codic> huh, has notifications too it looks like
06:55:05FromDiscord<codic> i feel too lazy to implement reparenting rn ill just add xsetborderwidth calls
07:00:44*pyautogui quit (Quit: Connection closed)
07:02:23FromDiscord<codic> nice, i got enough done today, night https://media.discordapp.net/attachments/371759389889003532/873461047690932244/unknown.png
07:07:44FromDiscord<codic> ` discard dpy.XMoveResizeWindow(data.window, cint client.bfX, cint client.bfY, cuint client.bfW, cuint client.bfH)↡`
07:07:49FromDiscord<codic> why would this throw a rangedefect?
07:08:29FromDiscord<Elegantbeef> Are your width/height \< 0
07:09:18FromDiscord<Elegantbeef> Alternatively your x/y are outside the range of a cuint
07:09:53FromDiscord<codic> yeah when I assigned it it overflowed I think, this is weird
07:10:06FromDiscord<codic> i wonder why it prints the x position as `-3`??
07:10:08FromDiscord<codic> sent a code paste, see https://paste.rs/mD4
07:10:56FromDiscord<Elegantbeef> The top left corner of the window is beyond your screen
07:13:28FromDiscord<codic> oh yes if I move it beyond the edge of the screen I get that issue
07:13:39FromDiscord<codic> so i will store these as integer values
07:13:42FromDiscord<codic> signed
07:14:43FromDiscord<codic> yeah works
07:19:04*pyautogui joined #nim
07:20:50*supakeen joined #nim
07:55:36*pyautogui quit (Quit: Connection closed)
07:55:48*pyautogui joined #nim
07:58:57*pyautogui quit (Client Quit)
08:13:58FromDiscord<rishavs (Rishav Sharan)> Is there a way to implement a case stements with multiple comparisons. It would help me get my nested spaghetti code cleaned up.
08:14:13FromDiscord<rishavs (Rishav Sharan)> sent a code paste, see https://play.nim-lang.org/#ix=3veD
08:14:30FromDiscord<rishavs (Rishav Sharan)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/873479064378298418): Is there a way to implement a case statement with multiple comparisons. It would help me get my nested spaghetti code cleaned up.
08:22:53FromDiscord<Elegantbeef> None of those could pass
08:23:14FromDiscord<Elegantbeef> (a, b, c) is `(int, bool, int)`
08:23:30FromDiscord<Elegantbeef> i say none but the second branch is just wrong πŸ˜€
08:23:41FromDiscord<Elegantbeef> Otherwise you could look at fusion matching https://nim-lang.github.io/fusion/src/fusion/matching.html
08:23:58FromDiscord<Elegantbeef> Or share the code you have and someone might suggest something wiser
08:48:10*max22- joined #nim
09:04:21*neceve joined #nim
09:12:38*vicfred quit (Quit: Leaving)
09:13:51FromDiscord<rishavs (Rishav Sharan)> I just made that up πŸ˜ƒβ†΅The 3rd case should match
09:14:34FromDiscord<Elegantbeef> You mean second?
09:14:38FromDiscord<rishavs (Rishav Sharan)> but thanks for the ref. That looks like what I am seeking
09:28:28FromDiscord<PsychoClay> sent a code paste, see https://play.nim-lang.org/#ix=3veP
10:20:05FromDiscord<top level await> In reply to @flywind "Please not use the": oh god, I already switched to httpx.. This is very good information though, thank you for sharing!
10:20:58FromDiscord<top level await> In reply to @reilly "Fidget is great! There": Currently waiting because the fidget figma plugin is broken as hell...
10:22:45FromDiscord<top level await> I use vscode too :D
10:54:44FromDiscord<Rika> In reply to @PsychoClay "why doesnt this work": You never start the event loop at the end with a run forever
11:21:47*max22- quit (Ping timeout: 245 seconds)
11:52:04*arkurious joined #nim
12:02:42*auxym joined #nim
12:06:01*supakeen quit (Quit: WeeChat 3.2)
12:06:30*supakeen joined #nim
12:07:01*auxym quit (Client Quit)
12:07:13*auxym joined #nim
12:34:11*auxym quit (Ping timeout: 250 seconds)
12:49:25FromDiscord<Tal> Hm
12:49:28FromDiscord<Tal> Sup
12:50:15FromDiscord<Rika> hello, do you have any questions regarding nim?
12:51:32FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3vfB
12:52:18FromDiscord<Rika> Yacht is not in Category?
12:52:42FromDiscord<Rika> otherwise it should work
12:52:48FromDiscord<Smarc> My bad, it is, I just did not include it in the example
12:53:00FromDiscord<Rika> are you sure the issue is not elsewhere?
12:53:07FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3vfD
12:53:51FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3vfE
12:54:19FromDiscord<Rika> perhaps the qualification is not working, try just `Yacht` without `Category.`
12:55:14FromDiscord<konsumlamm> idk what you're doing, but the part you sent works on the playground
12:55:30FromDiscord<konsumlamm> usually it makes more sense to use `case` for enums though
12:55:55FromDiscord<konsumlamm> it doesn't make much sense to only show us a part of the function, it obviously does more than that
13:16:57FromDiscord<Tal> Hmm
13:17:13FromDiscord<Tal> In reply to @Rika "hello, do you have": Whats nim?
13:21:29FromDiscord<konsumlamm> Hmmm
13:23:03FromDiscord<Tal> Programming?
13:36:47FromDiscord<Rika> why are you here
13:46:23*max22- joined #nim
14:20:32*rockcavera joined #nim
14:38:40FromDiscord<Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3vgc
15:13:00FromDiscord<Hi02Hi> In reply to @undersquire "also just curious what": https://hookrace.net/blog/nim-binary-size/
15:50:34*ozzz joined #nim
16:26:07*neurocyte left #nim (The Lounge - https://thelounge.chat)
16:47:56FromDiscord<undersquire> In reply to @Hi02Hi "https://hookrace.net/blog/nim-binary-size/": oh ty
16:54:46FromDiscord<reilly> In reply to @top level await "Currently waiting because the": Personally, I prefer describing my UIs through hand-written code anyway.
17:56:52*byanka joined #nim
18:17:12*max22- quit (Ping timeout: 245 seconds)
18:23:26*supakeen quit (Remote host closed the connection)
18:23:50*supakeen joined #nim
18:42:46*auxym joined #nim
18:50:52*auxym quit (Quit: Konversation terminated!)
18:51:04*auxym joined #nim
18:52:11*max22- joined #nim
18:54:42FromDiscord<codic> hell yeah i finally got emwh support working properly, now everything can fullscreen
18:57:27*auxym quit (Ping timeout: 258 seconds)
19:03:07*auxym joined #nim
19:06:50FromDiscord<codic> and now you can't resize fullscreen windows
19:18:50*auxym quit (Ping timeout: 252 seconds)
19:19:01FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3vhV
19:20:11nrds<Prestige99> codic the first one did you mean to pass the unsafeAddr of the ewmhWindow or the root window?
19:21:20*auxym joined #nim
19:21:50nrds<Prestige99> I see you pass in `root` as the second param but the addr to another window as the 2nd to last param
19:22:01FromDiscord<codic> yeah good catch, i just copy pasted it to set the properties on both the root window and the dummy window
19:22:09FromDiscord<codic> i'm not sure why you have to do that, it's just what dwm does and it works
19:23:01nrds<Prestige99> dwm does some things that aren't necessary, just play with it and read the x11 docs
19:24:47FromDiscord<codic> if I only set the properties on emwh window, it works.. i'll leave it there for now and read the docs for icccm, could be I don't need it
19:26:53FromDiscord<Alea> Does the existence of Nim the boardgame really frustrate anyone else while searching for lang docs?
19:27:31FromDiscord<Alea> Trying to find stuff on Nim binary formatting, but no only research papers about the game
19:27:38FromDiscord<leorize> use the magic words\: "nim lang"
19:28:30FromDiscord<Alea> Oh wonderful
19:28:40FromDiscord<Alea> Problem solved πŸ‘Œ
19:38:07federico3https://scattered-thoughts.net/writing/how-safe-is-zig/ should we have a table like this on the wiki?
19:47:13FromDiscord<theangryepicbanana> ok so I think I finally nailed down the cause of my generics issues https://play.nim-lang.org/#ix=3vi0
19:51:27*auxym quit (Ping timeout: 276 seconds)
19:53:52FromDiscord<Ayy Lmao> What is the proper way to get the compiler to search for c headers somewhere specific? I've been trying to get `--cincludes` to work but haven't had any luck.
19:58:18FromDiscord<haxscramper> does `-passc:-I` work?
20:03:38FromDiscord<βƒŸβƒŸ> can someone clarify object and ref object
20:03:41FromDiscord<βƒŸβƒŸ> like
20:03:47FromDiscord<βƒŸβƒŸ> why use ref object
20:06:27FromDiscord<Ayy Lmao> In reply to @haxscramper "does `-passc:-I` work?": It seems to still not know where the header is. To give context, I'm messing around with glfw and I'm wondering how to be able to do something like `proc glfwInit: cint {.importc, header: "glfw3.h".}`, where I can just put the header name instead of some huge relative directory.
20:06:42FromDiscord<haxscramper> In reply to @βƒŸβƒŸ "can someone clarify object": `object` - can be on heap or on stack. `ref object` - always allocated on heap
20:06:54FromDiscord<haxscramper> `seq[object]` will be continious in memory
20:07:23FromDiscord<haxscramper> potentially expensive to copy, cache-friendly to iterate over
20:07:23FromDiscord<βƒŸβƒŸ> whats a use case for `ref object`
20:07:31FromDiscord<haxscramper> `seq[ref object]` would be allocated on heap in chunks
20:07:42FromDiscord<haxscramper> cheap to copy, not really cache-firendly to iterate
20:07:55FromDiscord<βƒŸβƒŸ> so basically in this language if something is on heap or stack is decided in the type?
20:08:01FromDiscord<haxscramper> no
20:08:07FromDiscord<haxscramper> not alywas
20:08:10FromDiscord<βƒŸβƒŸ> like in c++ you would have object and object if you dont want copy
20:08:23FromDiscord<haxscramper> `ref object` is a just a shorthand for putting `ref` everywher
20:08:36FromDiscord<haxscramper> In C++ you have `object` only
20:08:51FromDiscord<haxscramper> so if you want to say ref you do `object` each time you use it
20:09:00FromDiscord<haxscramper> even if you onlyuse it as a ref
20:09:09FromDiscord<βƒŸβƒŸ> oh ok i understand now
20:09:23FromDiscord<βƒŸβƒŸ> so its just a syntax thing basically
20:09:27FromDiscord<haxscramper> in nim you can say `ref object` in type definition it would work as if you said `ref object` in each use place
20:09:43FromDiscord<haxscramper> In reply to @βƒŸβƒŸ "so its just a": syntax sugar, yes
20:44:10*jkl quit (Quit: Gone.)
20:45:33*jkl joined #nim
20:51:19*jkl1337 joined #nim
20:53:26*jkl quit (Ping timeout: 256 seconds)
21:16:00FromDiscord<βƒŸβƒŸ> what does `stdin.lines` do
21:16:09FromDiscord<βƒŸβƒŸ> is it a function call?
21:16:31FromDiscord<Elegantbeef> Context matters in a for loop it's an iterator outside of it it's a procedure call afaik
21:17:26FromDiscord<Elegantbeef> Actually never mind there is no procedure version
21:18:46FromDiscord<Elegantbeef> So it's an inline iterator, which means it can only be used in a for loop
21:46:42*neceve quit (Ping timeout: 256 seconds)
22:02:35*max22- quit (Quit: Leaving)
22:38:23FromDiscord<ynfle (ynfle)> There is `splitlines` though
23:47:13*auxym joined #nim
23:53:22*flynn quit (Read error: Connection reset by peer)
23:54:29*flynn joined #nim