00:06:24 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3vd3 |
00:11:46 | FromDiscord | <top level await> wwaaaaait what |
00:11:53 | FromDiscord | <top level await> i use figma to design random things 24/7 |
00:11:59 | FromDiscord | <top level await> https://github.com/treeform/fidget ?????? |
00:12:02 | nrds | <R2D299> itHub: 7"Figma based UI library for nim, with HTML and OpenGL backends." |
00:12:05 | FromDiscord | <top level await> this a tresure trove |
00:13:38 | FromDiscord | <Elegantbeef> Hmm that's quite odd ayy, is the full code published somewhere? |
00:14:27 | FromDiscord | <Ayy Lmao> In reply to @Elegantbeef "Hmm that's quite odd": Yeah I have it here: https://github.com/Alkamist/AlkamistExtension |
00:14:30 | nrds | <R2D299> itHub: 7"<No Description>" |
00:16:36 | FromDiscord | <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:15 | FromDiscord | <Elegantbeef> Do you have a way setup to test this? |
00:19:37 | FromDiscord | <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:47 | FromDiscord | <Elegantbeef> Well i can use wine probably |
00:20:03 | FromDiscord | <Elegantbeef> But if it's complicated i'll just look at the code more |
00:21:46 | FromDiscord | <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:22 | FromDiscord | <Ayy Lmao> its from this https://www.cockos.com/wdl/ |
00:22:48 | FromDiscord | <Elegantbeef> I'll just comb the desert |
00:23:52 | nrds | <Prestige99> https://gifimage.net/wp-content/uploads/2017/10/comb-the-desert-gif-6.gif |
00:24:14 | FromDiscord | <Elegantbeef> Thanks prestige was hoping my reference wouldnt fail |
00:24:24 | FromDiscord | <Elegantbeef> That spawn statement has me weary |
00:24:58 | FromDiscord | <Ayy Lmao> As far as I can tell the problems don't involve the spawn statement. I have issues without it |
00:25:30 | FromDiscord | <Elegantbeef> Well the issue is unclear so breakpoint time? |
00:26:06 | FromDiscord | <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:29 | FromDiscord | <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:10 | FromDiscord | <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:57 | FromDiscord | <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:05 | FromDiscord | <Elegantbeef> Ayy do you use vscode? |
00:40:14 | FromDiscord | <Ayy Lmao> Yeah I do |
00:40:35 | FromDiscord | <Elegantbeef> https://github.com/saem/vscode-nim#debugging can follow that |
00:40:37 | nrds | <R2D299> itHub: 7"<No Description>" |
00:42:01 | FromDiscord | <Ayy Lmao> In reply to @Elegantbeef "https://github.com/saem/vscode-nim#debugging can fo": Sweet, I'll look into it. |
00:42:04 | nrds | <R2D299> itHub: 7"<No Description>" |
00:44:05 | FromDiscord | <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:16 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdc |
00:57:34 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdd |
01:05:57 | FromDiscord | <codic> lol never mind im dumb |
01:06:03 | FromDiscord | <codic> forgot DISPLAY==:1 |
01:06:04 | FromDiscord | <codic> (edit) "DISPLAY==:1" => "DISPLAY=:1" |
01:07:45 | nrds | <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:45 | FromDiscord | <codic> yep |
01:37:02 | FromDiscord | <codic> i think i'll have a stab at reparenting now |
01:38:04 | nrds | <Prestige99> It was a bit of a pita so I didn't bother, don't know if there are any advantages |
01:38:16 | nrds | <Prestige99> unless you want to add your own fancy borders or controls, I guess |
01:44:24 | FromDiscord | <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:35 | FromDiscord | <Elegantbeef> Hello tsoj |
01:48:13 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdm |
01:48:22 | FromDiscord | <Elegantbeef> Oh wait that was through discord i know look like a stalker |
01:49:55 | FromDiscord | <codic> lol |
01:50:25 | FromDiscord | <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:53 | FromDiscord | <Elegantbeef> XSetInputFocus |
01:51:30 | FromDiscord | <Elegantbeef> If you're grabbing inputs like the above you will not get it if it has the alt modifier |
01:51:40 | FromDiscord | <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:22 | FromDiscord | <codic> it does capture them |
02:09:23 | FromDiscord | <codic> not sure why |
02:09:28 | FromDiscord | <codic> but alt+click works |
02:10:19 | FromDiscord | <codic> i'm not sure if I want xsetinputfocus, it looks like I want xsendevent |
02:18:06 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> https://github.com/beef331/goodwm/blob/master/src/goodwm/desktops.nim#L224 which means I call this |
02:20:07 | FromDiscord | <Elegantbeef> Though my WM does have some questionable architecture |
02:43:19 | FromDiscord | <@bracketmaster-5a708063d73408ce4> sent a long message, see http://ix.io/3vdx |
02:43:33 | FromDiscord | <@bracketmaster-5a708063d73408ce4> To be more clear, nim complains that the files imported in test\_lexer are never used |
02:49:55 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#pragmas-used-pragma |
02:51:03 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdz |
02:51:39 | FromDiscord | <codic> i can use a conditional to solve it yeah |
02:53:58 | FromDiscord | <codic> hmm so I got right click to forward |
02:53:59 | FromDiscord | <codic> but not left click |
02:54:17 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdA |
03:00:04 | FromDiscord | <Elegantbeef> Nope, i manage the input internally after capturing everything i "need" |
03:22:10 | FromDiscord | <codic> hmm where does this `d` come from? |
03:24:32 | FromDiscord | <codic> also the issue I think is I don't grab left clicks without alt |
03:24:58 | FromDiscord | <Bung> am looking at disruptek's cps module, It seem it not compatible with other async libs ? |
03:24:59 | FromDiscord | <Elegantbeef> It's my desktop object that i instantiate before my main loop in `goodwm.nim` |
03:26:22 | FromDiscord | <codic> hmm i see |
03:27:28 | FromDiscord | <codic> oh wait i see my issue; the reason right click works is because it is only Alt + RClick |
03:27:42 | FromDiscord | <codic> soo XSendEvent doesn't work |
03:27:49 | FromDiscord | <codic> what other approach could I take hmm |
03:28:59 | nrds | <Prestige99> hey codic I just got back. What are you trying to do? |
03:30:37 | FromDiscord | <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:02 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdL |
03:31:37 | FromDiscord | <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:39 | FromDiscord | <codic> http://hastebin.com/epapaniruz.yaml |
03:32:14 | nrds | <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:28 | nrds | <Prestige99> for my wm I use the Super key |
03:33:11 | nrds | <Prestige99> https://github.com/avahe-kellenberger/nimdow/blob/master/src/nimdowpkg/windowmanager.nim#L768 |
03:33:31 | nrds | <Prestige99> woops I meant https://github.com/avahe-kellenberger/nimdow/blob/master/src/nimdowpkg/windowmanager.nim#L731 |
03:34:42 | nrds | <Prestige99> I should actually have an else on line 751 but it doesn't matter |
03:40:38 | FromDiscord | <codic> I used `0` instead of `AnyModifier` that might have caused the issue |
03:40:49 | nrds | <Prestige99> ah |
03:43:04 | FromDiscord | <codic> nope, same issue |
03:43:25 | nrds | <Prestige99> What issue are you having exactly? |
03:43:27 | FromDiscord | <codic> i'm grabbing/ungrabbing the pointer instead of the window |
03:43:47 | FromDiscord | <codic> left click events aren't forwarded to the application |
03:44:27 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdO |
03:44:33 | nrds | <Prestige99> I'm not sure what you mean by "instead of the window" |
03:46:00 | nrds | <Prestige99> You won't get button events if you aren't already listening for them |
03:47:47 | FromDiscord | <codic> i use XGrabPointer instead of XGrabWindow |
03:48:00 | FromDiscord | <codic> wait there is no xgrabwindow |
03:48:16 | nrds | <Prestige99> XGrabButton is what I'm using |
03:48:28 | FromDiscord | <Elegantbeef> I'm also using XGrabButton |
03:48:33 | FromDiscord | <codic> me as well |
03:48:48 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdQ |
03:48:50 | FromDiscord | <codic> for moving and resizing I'm using XGrabPointer |
03:48:51 | FromDiscord | <Elegantbeef> I call this after loading a config https://github.com/beef331/goodwm/blob/master/src/goodwm/desktops.nim#L247 |
03:49:00 | nrds | <Prestige99> can you echo in your case statement? I don't think you're going to be getting button events |
03:49:20 | nrds | <Prestige99> oh you do that earlier, cool |
03:49:53 | FromDiscord | <codic> i do get events, because resizing and moving still is working |
03:50:24 | FromDiscord | <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:25 | nrds | <Prestige99> Really should use constants in x.nim instead of 1 or 0 btw |
03:50:36 | FromDiscord | <@bracketmaster-5a708063d73408ce4> thanks beef |
03:50:46 | FromDiscord | <codic> here is the full file: https://hastebin.com/gikasitifi.yaml |
03:50:59 | nrds | <Prestige99> have you read https://tronche.com/gui/x/xlib/input/XGrabPointer.html ? |
03:51:10 | FromDiscord | <Elegantbeef> And i shouldnt give any help prestige since i have 0 idea if my WM is even done properly \:D |
03:51:34 | nrds | <Prestige99> Haha nah you're good man |
03:52:43 | nrds | <Prestige99> Xephyr + logging helped me figure things out, a lot |
03:52:58 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdR |
03:54:04 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdT |
03:54:20 | nrds | <Prestige99> could it have anything to do with a LeaveNotify event being generated after you call XUngrabPointer? |
03:55:33 | FromDiscord | <codic> not sure, I haven't selected those events in XSelectInput |
03:55:38 | FromDiscord | <codic> only substructurenotifymask |
04:01:29 | FromDiscord | <codic> i don't think so I think it's just a simple logic error |
04:01:34 | FromDiscord | <codic> but for some reason actually |
04:01:43 | FromDiscord | <codic> even if I remove the else, it never reaches the sending button release |
04:01:55 | FromDiscord | <codic> so it looks like button release is never recieved? |
04:02:49 | nrds | <Prestige99> what do you expect to happen and what behavior are you observing? |
04:05:31 | FromDiscord | <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:50 | FromDiscord | <codic> except if I alt + right click |
04:05:58 | FromDiscord | <codic> of course, normal right click would not work |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:02 | FromDiscord | <codic> but left click should work, without a modifier |
04:06:05 | FromDiscord | <codic> because I XGrabKey that |
04:06:18 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vdW |
04:06:30 | FromDiscord | <codic> oh do I have to do |
04:06:37 | FromDiscord | <codic> ButtonPressMask or ButtonReleaseMask |
04:06:38 | FromDiscord | <codic> perhaps |
04:06:41 | nrds | <Prestige99> yes |
04:06:51 | FromDiscord | <codic> yep |
04:06:58 | nrds | <Prestige99> check the function in my code that I linked |
04:07:06 | nrds | <Prestige99> I'm using ButtonPressMask or ButtonReleaseMask or PointerMotionMask, |
04:07:54 | FromDiscord | <codic> now it sends button presses and releases with xsendevent but the window doesnt react to them |
04:08:59 | FromDiscord | <codic> i think it just ignores the xsendevent... |
04:10:43 | FromDiscord | <codic> i'm not sure how I can fake a button press |
04:11:08 | FromDiscord | <codic> and have the client think its a normal one |
04:13:50 | FromDiscord | <codic> xtest has XTestFakeButtonEvent which doesnt have x and y parameters |
04:18:26 | FromDiscord | <codic> i might just handle motionnotify for focus, super+click to raise, and do the rest later |
04:19:50 | FromDiscord | <codic> (edit) "do the rest later" => "figure this out" |
04:20:09 | FromDiscord | <codic> generally I use keyboard for this anyways |
04:21:42 | FromDiscord | <Elegantbeef> That's mostly what i do |
04:22:28 | FromDiscord | <Elegantbeef> Only watch for my shortcuts, and use XGrabButton/Key |
04:24:12 | FromDiscord | <codic> ok now on to finally getting reparenting done |
04:24:23 | FromDiscord | <codic> hopefully i can use my crappy wm in a week or two |
04:24:30 | FromDiscord | <Elegantbeef> reparenting? |
04:26:08 | FromDiscord | <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:19 | FromDiscord | <codic> more complicated but gives you a lot more control |
04:26:24 | FromDiscord | <Elegantbeef> Ah didnt realize that was how that was done |
04:26:25 | FromDiscord | <codic> because the background window can be absolutely anything |
04:27:06 | FromDiscord | <Elegantbeef> My worst idea was to use sdl2 to open my status bar windows \:D |
04:27:29 | FromDiscord | <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:25 | FromDiscord | <codic> haha, did you write your own status bar? |
05:15:32 | FromDiscord | <Elegantbeef> I am |
05:15:40 | FromDiscord | <codic> nice |
05:15:55 | FromDiscord | <codic> i might try one but probably would support it with an emwh hint instead of hardcoding it into the wm |
05:16:07 | FromDiscord | <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:44 | FromDiscord | <Elegantbeef> I'm doing a weird stack like system instead of a number'd or named workspace |
05:24:21 | FromDiscord | <codic> cool, i'm adding optional master stack tiling, but that workspace method is curious |
05:24:24 | FromDiscord | <codic> how do you render texdt on the bar? |
05:24:31 | FromDiscord | <Elegantbeef> Pixie |
05:24:42 | FromDiscord | <codic> oh huh cool |
05:24:51 | FromDiscord | <codic> not using x11 directly for it ? |
05:24:57 | * | pyautogui joined #nim |
05:24:59 | FromDiscord | <Elegantbeef> Nope |
05:25:19 | FromDiscord | <Elegantbeef> After looking at the api that X has for stuff like this idk if i'd want to \:D |
05:25:20 | FromDiscord | <codic> how do you get pixie's output to render onto a window then? |
05:25:27 | FromDiscord | <Elegantbeef> Using sdl2 |
05:25:45 | FromDiscord | <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:53 | FromDiscord | <codic> ah |
05:25:55 | FromDiscord | <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:24 | FromDiscord | <codic> in x11 pango text should be pretty easy, for circles in xlib there's XDrawArc |
05:26:25 | FromDiscord | <Elegantbeef> I should be capable of copying the image it generates to the X window, but couldnt figure out how |
05:26:34 | FromDiscord | <codic> i should figure out how to make my event loop async |
05:26:42 | FromDiscord | <codic> maybe spawn a new thread whenever an event is recieved |
05:27:04 | FromDiscord | <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:49 | FromDiscord | <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:07 | FromDiscord | <codic> it's basically just functions return a xcb cookie, like a nim Future[T] |
05:29:43 | FromDiscord | <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:06 | nrds | <Prestige99> Yeah it's basically async, non-blocking |
05:43:12 | nrds | <Prestige99> xlib isn't that bad imo though |
05:45:34 | FromDiscord | <Elegantbeef> It's not too bad this time around, only major issue is the blocking main loop π |
05:45:37 | FromDiscord | <Elegantbeef> Me being a dumb dumb and threading to get around that is now biting me in the ass for the config |
05:53:46 | FromDiscord | <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:48 | FromDiscord | <Rika> not recommended, causes a few issues afaik |
05:58:36 | FromDiscord | <xflywind> I see |
06:00:08 | FromDiscord | <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:24 | FromDiscord | <xflywind> Known issues https://forum.nim-lang.org/t/6835 |
06:08:58 | FromDiscord | <undersquire> is -d:useMalloc not working? |
06:09:02 | FromDiscord | <undersquire> (edit) "working?" => "working atm?" |
06:09:12 | FromDiscord | <undersquire> I get compiler errors when trying to use it |
06:09:40 | FromDiscord | <undersquire> (edit) "I get compiler errors when trying to use it ... " added "(even on a hello world program)" |
06:09:54 | FromDiscord | <Rika> it should be |
06:10:01 | FromDiscord | <Rika> what are you doing exactly |
06:10:07 | FromDiscord | <undersquire> echo("Hello, world!") |
06:10:07 | FromDiscord | <undersquire> lol |
06:10:08 | FromDiscord | <Rika> and what errors are we talking about |
06:10:15 | FromDiscord | <undersquire> let me get the error one sec |
06:10:31 | FromDiscord | <Rika> doing as in how are you compiling |
06:10:46 | FromDiscord | <undersquire> nim --gc:arc -d:useMalloc c program.nim |
06:11:17 | FromDiscord | <Rika> c must be before --gc: |
06:11:27 | FromDiscord | <Rika> nim c --gc:arc -d:useMalloc program.nim |
06:12:22 | FromDiscord | <undersquire> oh |
06:12:31 | FromDiscord | <undersquire> ok that seemed to fix it lol |
06:12:41 | FromDiscord | <undersquire> i dont really see why that should matter tho |
06:13:10 | FromDiscord | <Rika> because otherwise your command is incorrect? |
06:13:56 | FromDiscord | <undersquire> -- flags are just flags |
06:14:44 | FromDiscord | <undersquire> tho i guess it makes sense since im assuming they are specific to the option selected `c, cpp, js |
06:14:44 | FromDiscord | <Rika> -- flags can be positionally contextual |
06:14:45 | FromDiscord | <undersquire> (edit) "js" => "js`" |
06:15:19 | FromDiscord | <Rika> just like how some programs that run other programs pass flags after raw `--` to the program |
06:15:23 | FromDiscord | <undersquire> yeah |
06:15:44 | FromDiscord | <undersquire> also -d:lto isnt working for me tho I think its an issue with cang |
06:15:46 | FromDiscord | <undersquire> (edit) "cang" => "clang" |
06:15:59 | FromDiscord | <Rika> and how nimble(?) has flags for itself (nimble --f ) and then the task (nimble task --f) |
06:16:05 | FromDiscord | <Elegantbeef> `--passC:-flto` |
06:16:07 | FromDiscord | <Rika> clang needs |
06:16:08 | FromDiscord | <Rika> yes |
06:16:12 | FromDiscord | <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:16 | FromDiscord | <Elegantbeef> It's a known issue with `-d:lto` doesnt play well with specific compilers |
06:16:18 | FromDiscord | <undersquire> In reply to @Elegantbeef "`--passC:-flto`": I saw on the docs that -d:lto replaces that |
06:16:19 | FromDiscord | <undersquire> oh |
06:16:24 | FromDiscord | <Rika> not for clang |
06:16:39 | FromDiscord | <Elegantbeef> I'm not threading Xlib but instead my status bar drawing |
06:16:43 | FromDiscord | <Elegantbeef> Which resulted in that issue |
06:17:57 | FromDiscord | <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:13 | FromDiscord | <undersquire> are you making a wm |
06:18:39 | FromDiscord | <codic> yes, 3 people here apparently including myself lol |
06:18:42 | FromDiscord | <codic> lots of nim wms |
06:18:45 | FromDiscord | <undersquire> lol nice |
06:19:24 | FromDiscord | <undersquire> also just curious what was the smallest nim executable you've ever seen |
06:19:45 | nrds | <Prestige99> Elegantbeef do you plan on making your wm widely usable? |
06:19:53 | nrds | <Prestige99> I've been using mine for about a year now I think |
06:19:59 | FromDiscord | <Elegantbeef> "widely usable"? |
06:20:18 | nrds | <Prestige99> my brain is too tired for good English |
06:20:40 | nrds | <Prestige99> like something you can use as your daily driver |
06:20:55 | FromDiscord | <Elegantbeef> That's my goal yea |
06:21:14 | FromDiscord | <Elegantbeef> Though my workspace replacement idea might not work well |
06:21:44 | FromDiscord | <Elegantbeef> May be too much like alt tab \:P |
06:22:15 | nrds | <Prestige99> ah I see |
06:22:32 | nrds | <Prestige99> I need to implement my insane tags idea, sometime... |
06:22:50 | FromDiscord | <codic> i should try using nimdow while I work on my own |
06:22:51 | nrds | <Prestige99> 81 tags (workspaces) per monitor, like a 2d array 9x9 |
06:22:52 | FromDiscord | <codic> seems very cool |
06:23:01 | FromDiscord | <codic> yeah spatial workspaces are awesome |
06:23:02 | nrds | <Prestige99> Thanks |
06:23:52 | FromDiscord | <Elegantbeef> My biggest issue with i3wm work spaces is the numbers are arbitrary and not overly helpful |
06:23:53 | FromDiscord | <codic> yeah looks like it's pretty dwm like, i like it |
06:24:00 | FromDiscord | <codic> but without the silly conflicting patches |
06:24:07 | FromDiscord | <Elegantbeef> Like yes i can do "Move to 6" but it's not easy to reason where 6 is |
06:24:33 | FromDiscord | <codic> systray too, nice |
06:24:40 | FromDiscord | <codic> for me horizontal workspaces are fine |
06:24:47 | FromDiscord | <codic> what do you mean it's not easy to reason? |
06:24:56 | FromDiscord | <Elegantbeef> I'm planning on having a toggable button that moves any new window created to it's own workspace |
06:25:12 | FromDiscord | <Elegantbeef> Well i have 3 monitors and havent setup workspaces |
06:25:17 | FromDiscord | <codic> in the status bar? |
06:25:23 | FromDiscord | <codic> oh yes i have 1 monitor |
06:25:27 | FromDiscord | <codic> i see how it can get confusing then |
06:25:51 | FromDiscord | <codic> i think if I end up supporting multiple monitors, it will probably be 9 tags / monitor |
06:26:03 | FromDiscord | <codic> so like with 3 monitors it would be 27 tags, and each monitor gets its own set of tags |
06:26:12 | FromDiscord | <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:31 | FromDiscord | <codic> hmm |
06:28:48 | FromDiscord | <codic> is it that bad that some of my code is inconsistent in how it uses ufcs and optional parens |
06:29:09 | nrds | <Prestige99> I'd say yes |
06:29:19 | FromDiscord | <Elegantbeef> Possibly depends on what you're doing |
06:37:26 | FromDiscord | <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:24 | FromDiscord | <codic> hmm so nimdow doesn't support clickable status bar? |
06:38:28 | FromDiscord | <codic> well i dont need it anyways |
06:38:59 | nrds | <Prestige99> nah, I pretty much don't use my mouse so I haven't bothered adding it yet |
06:39:06 | nrds | <Prestige99> I believe there's an open issue for it |
06:40:40 | nrds | <Prestige99> I'm off, see you all later o/ |
06:40:51 | FromDiscord | <codic> cya |
06:41:24 | FromDiscord | <Elegantbeef> Buh bye |
06:48:34 | FromDiscord | <codic> ok now nimdow works, this is pretty familiar and awesom |
06:48:35 | FromDiscord | <codic> (edit) "awesom" => "awesome" |
06:49:03 | FromDiscord | <Elegantbeef> Havent actually used nimdow i was meaning to try it but never got around to it |
06:51:33 | FromDiscord | <codic> huh, has notifications too it looks like |
06:55:05 | FromDiscord | <codic> i feel too lazy to implement reparenting rn ill just add xsetborderwidth calls |
07:00:44 | * | pyautogui quit (Quit: Connection closed) |
07:02:23 | FromDiscord | <codic> nice, i got enough done today, night https://media.discordapp.net/attachments/371759389889003532/873461047690932244/unknown.png |
07:07:44 | FromDiscord | <codic> ` discard dpy.XMoveResizeWindow(data.window, cint client.bfX, cint client.bfY, cuint client.bfW, cuint client.bfH)β΅` |
07:07:49 | FromDiscord | <codic> why would this throw a rangedefect? |
07:08:29 | FromDiscord | <Elegantbeef> Are your width/height \< 0 |
07:09:18 | FromDiscord | <Elegantbeef> Alternatively your x/y are outside the range of a cuint |
07:09:53 | FromDiscord | <codic> yeah when I assigned it it overflowed I think, this is weird |
07:10:06 | FromDiscord | <codic> i wonder why it prints the x position as `-3`?? |
07:10:08 | FromDiscord | <codic> sent a code paste, see https://paste.rs/mD4 |
07:10:56 | FromDiscord | <Elegantbeef> The top left corner of the window is beyond your screen |
07:13:28 | FromDiscord | <codic> oh yes if I move it beyond the edge of the screen I get that issue |
07:13:39 | FromDiscord | <codic> so i will store these as integer values |
07:13:42 | FromDiscord | <codic> signed |
07:14:43 | FromDiscord | <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:58 | FromDiscord | <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:13 | FromDiscord | <rishavs (Rishav Sharan)> sent a code paste, see https://play.nim-lang.org/#ix=3veD |
08:14:30 | FromDiscord | <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:53 | FromDiscord | <Elegantbeef> None of those could pass |
08:23:14 | FromDiscord | <Elegantbeef> (a, b, c) is `(int, bool, int)` |
08:23:30 | FromDiscord | <Elegantbeef> i say none but the second branch is just wrong π |
08:23:41 | FromDiscord | <Elegantbeef> Otherwise you could look at fusion matching https://nim-lang.github.io/fusion/src/fusion/matching.html |
08:23:58 | FromDiscord | <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:51 | FromDiscord | <rishavs (Rishav Sharan)> I just made that up πβ΅The 3rd case should match |
09:14:34 | FromDiscord | <Elegantbeef> You mean second? |
09:14:38 | FromDiscord | <rishavs (Rishav Sharan)> but thanks for the ref. That looks like what I am seeking |
09:28:28 | FromDiscord | <PsychoClay> sent a code paste, see https://play.nim-lang.org/#ix=3veP |
10:20:05 | FromDiscord | <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:58 | FromDiscord | <top level await> In reply to @reilly "Fidget is great! There": Currently waiting because the fidget figma plugin is broken as hell... |
10:22:45 | FromDiscord | <top level await> I use vscode too :D |
10:54:44 | FromDiscord | <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:25 | FromDiscord | <Tal> Hm |
12:49:28 | FromDiscord | <Tal> Sup |
12:50:15 | FromDiscord | <Rika> hello, do you have any questions regarding nim? |
12:51:32 | FromDiscord | <Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3vfB |
12:52:18 | FromDiscord | <Rika> Yacht is not in Category? |
12:52:42 | FromDiscord | <Rika> otherwise it should work |
12:52:48 | FromDiscord | <Smarc> My bad, it is, I just did not include it in the example |
12:53:00 | FromDiscord | <Rika> are you sure the issue is not elsewhere? |
12:53:07 | FromDiscord | <Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3vfD |
12:53:51 | FromDiscord | <Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3vfE |
12:54:19 | FromDiscord | <Rika> perhaps the qualification is not working, try just `Yacht` without `Category.` |
12:55:14 | FromDiscord | <konsumlamm> idk what you're doing, but the part you sent works on the playground |
12:55:30 | FromDiscord | <konsumlamm> usually it makes more sense to use `case` for enums though |
12:55:55 | FromDiscord | <konsumlamm> it doesn't make much sense to only show us a part of the function, it obviously does more than that |
13:16:57 | FromDiscord | <Tal> Hmm |
13:17:13 | FromDiscord | <Tal> In reply to @Rika "hello, do you have": Whats nim? |
13:21:29 | FromDiscord | <konsumlamm> Hmmm |
13:23:03 | FromDiscord | <Tal> Programming? |
13:36:47 | FromDiscord | <Rika> why are you here |
13:46:23 | * | max22- joined #nim |
14:20:32 | * | rockcavera joined #nim |
14:38:40 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3vgc |
15:13:00 | FromDiscord | <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:56 | FromDiscord | <undersquire> In reply to @Hi02Hi "https://hookrace.net/blog/nim-binary-size/": oh ty |
16:54:46 | FromDiscord | <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:42 | FromDiscord | <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:50 | FromDiscord | <codic> and now you can't resize fullscreen windows |
19:18:50 | * | auxym quit (Ping timeout: 252 seconds) |
19:19:01 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3vhV |
19:20:11 | nrds | <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:50 | nrds | <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:01 | FromDiscord | <codic> yeah good catch, i just copy pasted it to set the properties on both the root window and the dummy window |
19:22:09 | FromDiscord | <codic> i'm not sure why you have to do that, it's just what dwm does and it works |
19:23:01 | nrds | <Prestige99> dwm does some things that aren't necessary, just play with it and read the x11 docs |
19:24:47 | FromDiscord | <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:53 | FromDiscord | <Alea> Does the existence of Nim the boardgame really frustrate anyone else while searching for lang docs? |
19:27:31 | FromDiscord | <Alea> Trying to find stuff on Nim binary formatting, but no only research papers about the game |
19:27:38 | FromDiscord | <leorize> use the magic words\: "nim lang" |
19:28:30 | FromDiscord | <Alea> Oh wonderful |
19:28:40 | FromDiscord | <Alea> Problem solved π |
19:38:07 | federico3 | https://scattered-thoughts.net/writing/how-safe-is-zig/ should we have a table like this on the wiki? |
19:47:13 | FromDiscord | <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:52 | FromDiscord | <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:18 | FromDiscord | <haxscramper> does `-passc:-I` work? |
20:03:38 | FromDiscord | <ββ> can someone clarify object and ref object |
20:03:41 | FromDiscord | <ββ> like |
20:03:47 | FromDiscord | <ββ> why use ref object |
20:06:27 | FromDiscord | <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:42 | FromDiscord | <haxscramper> In reply to @ββ "can someone clarify object": `object` - can be on heap or on stack. `ref object` - always allocated on heap |
20:06:54 | FromDiscord | <haxscramper> `seq[object]` will be continious in memory |
20:07:23 | FromDiscord | <haxscramper> potentially expensive to copy, cache-friendly to iterate over |
20:07:23 | FromDiscord | <ββ> whats a use case for `ref object` |
20:07:31 | FromDiscord | <haxscramper> `seq[ref object]` would be allocated on heap in chunks |
20:07:42 | FromDiscord | <haxscramper> cheap to copy, not really cache-firendly to iterate |
20:07:55 | FromDiscord | <ββ> so basically in this language if something is on heap or stack is decided in the type? |
20:08:01 | FromDiscord | <haxscramper> no |
20:08:07 | FromDiscord | <haxscramper> not alywas |
20:08:10 | FromDiscord | <ββ> like in c++ you would have object and object if you dont want copy |
20:08:23 | FromDiscord | <haxscramper> `ref object` is a just a shorthand for putting `ref` everywher |
20:08:36 | FromDiscord | <haxscramper> In C++ you have `object` only |
20:08:51 | FromDiscord | <haxscramper> so if you want to say ref you do `object` each time you use it |
20:09:00 | FromDiscord | <haxscramper> even if you onlyuse it as a ref |
20:09:09 | FromDiscord | <ββ> oh ok i understand now |
20:09:23 | FromDiscord | <ββ> so its just a syntax thing basically |
20:09:27 | FromDiscord | <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:43 | FromDiscord | <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:00 | FromDiscord | <ββ> what does `stdin.lines` do |
21:16:09 | FromDiscord | <ββ> is it a function call? |
21:16:31 | FromDiscord | <Elegantbeef> Context matters in a for loop it's an iterator outside of it it's a procedure call afaik |
21:17:26 | FromDiscord | <Elegantbeef> Actually never mind there is no procedure version |
21:18:46 | FromDiscord | <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:23 | FromDiscord | <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 |