00:00:50 | FromDiscord | <Elegantbeef> Well you know you can make it easier/more extensible by making a `newAnimationTrack` proc that takes `frames`? |
00:01:34 | nrds | <Prestige99> you mean something other than my proc at line 54? |
00:01:43 | FromDiscord | <treeform> In reply to @iffy (Matt Haggard) "I'm going to give": Its cool that you want to highlight pixie, thanks! |
00:01:48 | FromDiscord | <Elegantbeef> Well the body |
00:02:56 | nrds | <Prestige99> I'm not sure what you mean |
00:02:58 | FromDiscord | <Elegantbeef> Something like https://play.nim-lang.org/#ix=3zBe |
00:03:30 | nrds | <Prestige99> oh I see |
00:03:34 | FromDiscord | <Elegantbeef> Guess it's a `seq[KeyFrame[int]]` instead |
00:03:43 | nrds | <Prestige99> yeah but I don't think that addresses the issue I have |
00:04:01 | FromDiscord | <Elegantbeef> Well it solves one issue of ugly code \:P |
00:04:05 | nrds | <Prestige99> like if I decide to add new states to TrackKind but forget to update TrackFieldType, or vice versa |
00:09:30 | FromDiscord | <Elegantbeef> `static: assert (TrackKind.high.ord - TrackKind.low.ord) == arity(TrackFieldType)` here you go |
00:09:31 | FromDiscord | <Elegantbeef> `import std/typetraits` |
00:15:45 | nrds | <Prestige99> oh that's interesting, thanks - makes it a bit safer |
00:16:14 | FromDiscord | <Elegantbeef> Otherwise you could generate the enum from the typedesc |
00:16:37 | nrds | <Prestige99> from TrackFieldType? That would be great, tried and failed earlier :P |
00:16:48 | nrds | <Prestige99> Couldn't figure out how to pull info from TrackFieldType |
00:16:55 | FromDiscord | <Elegantbeef> Ah |
00:17:04 | FromDiscord | <Elegantbeef> I'll make a macro and all the dots will connect 😛 |
00:17:09 | nrds | <Prestige99> :D |
00:17:28 | nrds | <Prestige99> Gotta eat but I'll be back in a bit. Thanks for your help |
00:35:27 | FromDiscord | <Elegantbeef> Well bren i cannot compile Nim from source on my phone so yay! \:( |
00:35:29 | FromDiscord | <Elegantbeef> Here you go prestige https://play.nim-lang.org/#ix=3zBi |
00:35:45 | FromDiscord | <Elegantbeef> `cleanIdent` probably needs cleaned ironically but i'm a lazy man |
00:36:16 | nrds | <Prestige99> Thanks, I'll check it out soon |
00:40:44 | FromDiscord | <tsoj> Hi, is there an easy way to do the C `a |= 0b101101` in Nim, like `a or= 0b101101`? |
00:40:47 | FromDiscord | <Bren> What is the problem you are having |
00:42:09 | FromDiscord | <Elegantbeef> Glob issue |
00:42:16 | FromDiscord | <Elegantbeef> https://github.com/android/ndk/issues/718 |
00:42:30 | FromDiscord | <Elegantbeef> You can define your own `|=` as there doesnt seem to be one in the stdlib↵(@tsoj) |
00:43:18 | FromDiscord | <Elegantbeef> Or you could make an `or` that takes a var T as the first parameter |
00:44:31 | * | Pyautogui joined #nim |
00:44:39 | FromDiscord | <Elegantbeef> Eh i guess no since it still thinks it's the operator sadly |
00:44:47 | FromDiscord | <Bren> sent a code paste, see https://paste.rs/qef |
00:46:44 | FromDiscord | <Elegantbeef> Yea i was just trying to build nim from inside termux without alpine |
00:47:34 | FromDiscord | <Elegantbeef> apline does nothing but seg fault |
00:47:42 | FromDiscord | <Elegantbeef> So i guess i say sorry i cannot help |
00:53:42 | FromDiscord | <Bren> Odd |
01:03:26 | * | arkurious quit (Quit: Leaving) |
01:25:45 | * | neurocyte0136 joined #nim |
01:25:45 | * | neurocyte0136 quit (Changing host) |
01:25:45 | * | neurocyte0136 joined #nim |
01:27:13 | * | greyrat joined #nim |
01:27:40 | * | neurocyte013 quit (Ping timeout: 252 seconds) |
01:27:40 | * | neurocyte0136 is now known as neurocyte013 |
01:28:01 | * | lucerne joined #nim |
01:30:51 | * | Pyautogui quit (Ping timeout: 265 seconds) |
02:43:03 | FromDiscord | <gnu+linux user> the compiler dosent warn me of using a bool = true |
02:43:59 | FromDiscord | <Elegantbeef> Wh would it? |
02:46:39 | FromDiscord | <gnu+linux user> it seems to work now 🥴 |
02:51:43 | * | kayabaNerve joined #nim |
02:54:28 | FromDiscord | <Rika> ?? |
03:15:53 | nrds | <Prestige99> Hm beef so the system seems to complain about the seq[KeyFrame[prec()]] situation, can't use proc() {.closure.} for some reason. Didn't think that distinction would matter. Thoughts? |
03:18:13 | FromDiscord | <Elegantbeef> what "system" |
03:18:23 | nrds | <Prestige99> Well I guess the macro just doesn't handle it, nvm |
03:18:26 | FromDiscord | <Elegantbeef> My lazyily made macro or the actual logic |
03:18:46 | FromDiscord | <Elegantbeef> Yea you probably need to some smarter logic for the proc string representation |
03:18:49 | FromDiscord | <Elegantbeef> Or use an alias |
03:18:58 | FromDiscord | <Elegantbeef> Since it doesnt recurse |
03:24:03 | nrds | <Prestige99> 'sons' is not accessible using discriminant 'kind' of type 'TNode' [FieldDefect] 🤔 well that's a new one |
03:24:45 | FromDiscord | <Elegantbeef> You borked the compiler nice 😛 |
03:25:25 | * | justsomeguy joined #nim |
03:27:21 | nrds | <Prestige99> Doing this craziness with procs, I'm not surprised lol |
03:28:21 | nrds | <Prestige99> https://play.nim-lang.org/#ix=3zBF this is what broke it. The `lerpProc` I have to provide is redundant for procs, I just want them invoked at certain points in time... |
03:28:41 | nrds | <Prestige99> Maybe I could just make a special case for them instead of trying to include it with KeyFrames |
03:29:51 | nrds | <Prestige99> atm proc(startValue, endValue: T, completionRatio: float): T is required as the last param |
03:32:48 | * | justsomeguy left #nim (WeeChat 3.2) |
03:47:33 | * | cyraxjoe quit (Remote host closed the connection) |
03:48:45 | * | cyraxjoe joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:32 | * | supakeen joined #nim |
04:20:12 | * | rockcavera quit (Remote host closed the connection) |
04:41:10 | nrds | <Prestige99> If you're around @Elegantbeef I got around the compiler issue, but now I'm having an issue where seq[KeyFrame[newAnimationTrack.T]] and seq[KeyFrame[animation.ClosureProc]] aren't compatible. ClosureProc is just a type alias for proc() {.closure.} that I used with your makeEnum macro. Maybe this is a weird bug with generics? |
04:41:40 | nrds | <Prestige99> newAnimationTrack.T is of type TrackKind, which makeEnum generated |
04:47:13 | nrds | <Prestige99> If you want to look: https://play.nim-lang.org/#ix=3zBQ for the error, https://git.einheit.tech/EinheitTechnologies/shade/src/commit/d84cb8918d6f99e78d9c93ff8f9f4a10a32fcd8d/src/shadepkg/game/animation.nim for the code |
04:49:08 | FromDiscord | <Elegantbeef> Where is it called though? |
04:50:20 | nrds | <Prestige99> https://git.einheit.tech/EinheitTechnologies/shade/src/commit/d84cb8918d6f99e78d9c93ff8f9f4a10a32fcd8d/tests/shade/animation_test.nim#L75 was working on tests for it |
04:56:28 | FromDiscord | <Elegantbeef> I mean you're passing a proc for the field, this doesnt make much sensee |
04:56:42 | FromDiscord | <Elegantbeef> It should be a `var someProc: proc()` |
04:56:53 | nrds | <Prestige99> I agree, just trying to find a way to use procs with this system |
04:57:02 | nrds | <Prestige99> or else I'll just have to handle procs separately |
04:58:08 | nrds | <Prestige99> yeah that makes more sense |
04:58:49 | nrds | <Prestige99> oh, well that got past that issue but I ran into the same compiler problem 🤦 |
04:59:59 | nrds | <Prestige99> Maybe this is a bust |
05:49:41 | FromDiscord | <Gumber> watching everyone create these like sdl2 / glfw game engine projects is a trip |
05:49:50 | FromDiscord | <Gumber> because this was me like five / six years ago |
05:50:03 | FromDiscord | <Gumber> I guess I was using BGFX instead of OpenGL but still |
05:50:14 | FromDiscord | <Gumber> it was like aglet, and a few others and now I'm seeing more and more |
05:50:27 | * | beshr joined #nim |
05:50:37 | FromDiscord | <Gumber> I think the only project which has stayed relevant for an extended period of duration for Nim game dev is Nico |
05:51:43 | FromDiscord | <Gumber> so bravo @impbox [ftsf] |
05:51:43 | FromDiscord | <impbox [ftsf]> i think the issue is people making game engines instead of games |
05:51:53 | FromDiscord | <Gumber> well yeah |
05:51:54 | FromDiscord | <impbox [ftsf]> nico only exists and is maintained because it's used to make games |
05:51:59 | FromDiscord | <Gumber> it took me like five years to relize that was my issue |
05:52:03 | FromDiscord | <Gumber> (edit) "relize" => "realize" |
05:52:09 | FromDiscord | <Gumber> but I mean to be fair the five years wasn't without purpose |
05:52:11 | FromDiscord | <Elegantbeef> Who the hell would use Nico to make games it's so limited |
05:52:34 | FromDiscord | <Gumber> like now I can construct a 3d game engine with solid engineering principles and things like plugin architectures and fiber based job systems and a vulkan renderer etc |
05:52:38 | FromDiscord | <Elegantbeef> the above joke brought to you by visible sarcasm |
05:52:38 | FromDiscord | <Gumber> unless I had tried and failed like eight times |
05:52:42 | FromDiscord | <Gumber> and then done a bunch of R&D work |
05:52:45 | FromDiscord | <Gumber> I never would have gotten to that point |
05:53:05 | FromDiscord | <Gumber> and I can use that knowledge to build a game instead of a game engine - because at the end of the day my goal isn't to make something that others can use |
05:53:13 | FromDiscord | <Gumber> it's to make something I can use to make games and make money on steam |
05:53:28 | FromDiscord | <Gumber> and I'm NEVER going to fall back into the mode of building libs / stuff for others |
05:53:37 | FromDiscord | <Gumber> like sure you can have my source code (except for my gameplay code / assets) |
05:53:46 | FromDiscord | <Gumber> but I'm not going to help you build it or extend it or maintain it |
05:54:11 | FromDiscord | <Gumber> sorry - but there's not enough time in life for that and to achieve my goals |
05:54:51 | FromDiscord | <Gumber> but yeah - Nico is rad and if I was good at 2d art I'd probably have just kept working on FRAG / zengine and called it a day |
05:55:10 | FromDiscord | <Gumber> or if I was really good at coming up with concepts for games / game jams like you |
05:55:28 | FromDiscord | <Gumber> instead I have like one big idea for a multiplayer networked RTS game and I'm going to build it, everyone else be damned |
05:55:48 | FromDiscord | <Gumber> mostly because I like strategy games and Araq has been clamoring for a Nim RTS since I joined the community |
05:56:46 | FromDiscord | <Gumber> In reply to @impbox "i think the issue": but I agree - this is the issue |
05:57:09 | FromDiscord | <Gumber> if I could find like one or two other Nim devs who were passionate enough to join me on a networked 3d game project with an advanced renderer - we'd already have a killer game engine |
05:57:33 | FromDiscord | <Gumber> it's just like, for me as a person, trying to write all that code (which is going to be heavily reliant on bindings to other libraries since I'm doing 3d, skeletal animation, physics, networking, etc...) |
05:57:49 | FromDiscord | <Gumber> is already enough of a task and teaching someone else to compile it or whatever is even more work |
05:58:23 | FromDiscord | <Gumber> so until more people want to build a complex advanced game engine and come to the table with something besides a want |
05:58:28 | * | Vladar joined #nim |
05:58:45 | FromDiscord | <Gumber> Nim's going to have these little like 2d engines that add a bit of functionality on top of SDL / GLFW / whatever |
05:59:02 | FromDiscord | <Gumber> and then you'll have some other 3d projects that are geared /tailored to a specific project |
05:59:21 | FromDiscord | <Gumber> but aren't really built with the intention of community adoption |
05:59:32 | FromDiscord | <Gumber> at least that's how I've seen things lately (like over the past two or so years) |
05:59:43 | nrds | <Prestige99> coming up with game ideas has always been the hard part on my end |
05:59:54 | FromDiscord | <Gumber> see the thing is |
06:00:05 | FromDiscord | <Gumber> if you have a environment enough you're comfortable in |
06:00:07 | nrds | <Prestige99> I like nico but I dislike the whole color palette part of it, I just want to draw graphics |
06:00:11 | FromDiscord | <Gumber> like I imagine @impbox [ftsf] is with Nico |
06:00:18 | FromDiscord | <Gumber> since they built it |
06:00:32 | FromDiscord | <Gumber> it's much easier to iterate and ideate and develop a game from ideation to finish |
06:00:39 | FromDiscord | <Gumber> because you know everything about your tech stack from end to end |
06:00:45 | FromDiscord | <Gumber> you know the art worklflow, the ins and outs etc |
06:00:49 | FromDiscord | <Gumber> this is the power in building your own tech |
06:01:03 | FromDiscord | <Gumber> but any time you use someone else's engine or tech you're going to run into exactly what you just described |
06:01:10 | FromDiscord | <Gumber> you want it to work in a certain way that the original author didn't intend |
06:01:44 | FromDiscord | <Gumber> not to mention you'll probably never be as efficient as @impbox [ftsf] at leveraging the tech, because they wrote it and know its strengths and weaknesses |
06:02:07 | FromDiscord | <Gumber> soooo - don't try to approach the task with the mentality of I need to write a game engine or I need to have the perfect idea for a game |
06:02:12 | FromDiscord | <Gumber> the objective is to limit scope creep |
06:02:28 | FromDiscord | <Gumber> pick a genre - pick a style of game you like and start building the technology you need to make that happen |
06:02:41 | FromDiscord | <Gumber> like for me, with a 3d networked RTS I knew I needed binding to steamworks |
06:03:22 | FromDiscord | <Gumber> because I'm going to leverage steamworks for matchmaking, p2p communicaton, leaderboards, achievements, etc |
06:03:35 | FromDiscord | <Gumber> I knew I needed vulkan bindings plus something to make working with vulkan not such a pain - so vk-bootstrap |
06:03:51 | FromDiscord | <Gumber> I'm also not a graphics programmer by profession - so I don't know how to implement an abstraction like a frame or render graph, so that' sanother need |
06:03:55 | FromDiscord | <Elegantbeef> Given that you're making a 2D tooling prestige just remake retro arcadee games |
06:04:13 | FromDiscord | <Gumber> I want a performant engine - so I need some sort of work stealing / fliber based / whatever job system to parallelize work across CPU cores |
06:04:28 | FromDiscord | <Gumber> like these are requirements based on the type of game I want to make - so if I figure out how to do these things I can make that game happen |
06:04:39 | FromDiscord | <Gumber> if your goal is to make 2d games you don't need a godot or a engine or whatever |
06:04:46 | FromDiscord | <Gumber> like you can do it with SDL and probably < 10k LOC |
06:05:06 | FromDiscord | <Gumber> but everyone wants to make their own 2d engines, that at the end of the day do the exact same thing just in a slightly different |
06:05:07 | FromDiscord | <Gumber> way |
06:05:11 | nrds | <Prestige99> @Elegantbeef that's what I've mostly done in the past, like with https://astroships.einheit.tech/ |
06:05:12 | FromDiscord | <impbox [ftsf]> step 1, build a fun 2D single player RTS with rectangles/circles with basic bug AI, once it's fun proceed to step 2, step 2. get it working networked, step 3. make it shiny and look how you want |
06:05:31 | FromDiscord | <Gumber> nico is an exception - I mean it's an attempt at PICO not just some random 2d game engine that can draw tilemaps and handle animated sprites, etc... |
06:05:34 | FromDiscord | <Gumber> I disagree |
06:05:45 | FromDiscord | <Gumber> 2d rts != 3d rts |
06:05:50 | FromDiscord | <Gumber> gameplay concepts don't translate |
06:06:05 | FromDiscord | <Elegantbeef> Quick someone make a AoE joke |
06:06:05 | FromDiscord | <Gumber> not to mention - you're completely limited by the art style you just described |
06:06:20 | FromDiscord | <Gumber> RTS's with squares and vanilla mechanics aren't fun or interesting or even worth maki ng |
06:06:23 | FromDiscord | <Gumber> (edit) "maki ng" => "making" |
06:06:35 | FromDiscord | <Gumber> and I already know how to do all of that so why do I make that my starting point? seems silly to me |
06:06:43 | FromDiscord | <impbox [ftsf]> limit scope |
06:06:47 | FromDiscord | <impbox [ftsf]> get it done |
06:06:48 | FromDiscord | <Gumber> my goal isn't to make some 2d rts no one is going to play |
06:06:52 | FromDiscord | <Gumber> it's to make a 3d rts I can sell on steam |
06:07:06 | FromDiscord | <impbox [ftsf]> that's step 3. make it shiny, add 3d graphics |
06:07:08 | FromDiscord | <Gumber> if I didn't know what I was doing I might agree with you |
06:07:09 | FromDiscord | <Gumber> no |
06:07:17 | FromDiscord | <Gumber> you don't just go from 2d to 3d like that |
06:07:24 | FromDiscord | <Gumber> and if you think you do - you're wrong |
06:07:28 | FromDiscord | <impbox [ftsf]> for the most part RTS gameplay is 2D+height |
06:07:32 | FromDiscord | <Gumber> 3d is way more involved and requires upfront planning |
06:07:36 | FromDiscord | <Gumber> so does network play |
06:07:37 | FromDiscord | <impbox [ftsf]> aye, a prototype |
06:07:46 | FromDiscord | <Gumber> I can prototype in 3d |
06:07:48 | FromDiscord | <Gumber> I want 3d anyway |
06:07:54 | FromDiscord | <Gumber> why should I implement everything in 2d first? |
06:07:57 | FromDiscord | <impbox [ftsf]> ok, get it done |
06:07:59 | FromDiscord | <Gumber> it makes zero sense it' sjust extra work for me |
06:08:01 | FromDiscord | <Gumber> I am haha |
06:08:06 | FromDiscord | <impbox [ftsf]> because it's faster to get done |
06:08:18 | FromDiscord | <Gumber> faster to get a 2d vanilla rts done that I'mg oing to throw away |
06:08:27 | FromDiscord | <Gumber> not going to help me with a 3d map editor |
06:08:36 | FromDiscord | <Gumber> or figuring out how to render terrain using tessellation |
06:08:46 | FromDiscord | <impbox [ftsf]> ehh, anyway #offtopic |
06:08:48 | FromDiscord | <Gumber> yeah |
06:09:06 | FromDiscord | <Gumber> but https://github.com/zacharycarter/FRAG/tree/master/src/fragpkg it's happening albeit slowly |
06:09:14 | FromDiscord | <Gumber> and it's spread throughout like 18 repositories named FRAG something |
06:09:19 | FromDiscord | <Gumber> but it's happening |
06:09:43 | FromDiscord | <Gumber> this is the work on the vulkan renderer and atm the render graph impl is being wrapped |
06:10:01 | FromDiscord | <Gumber> but after that's done I can do stuff like - https://github.com/martty/vuk/tree/master/examples |
06:10:08 | FromDiscord | <Gumber> with vulkan and Nim |
06:10:29 | FromDiscord | <Elegantbeef> I've looked into it and there is no proc named `makeMyShit` so i really dont think you know what you're doing |
06:10:34 | FromDiscord | <Gumber> so I'm almost there - and I've already written renderers / terrain editors, etc.. using OpenGL |
06:10:44 | FromDiscord | <Gumber> xD |
06:10:48 | FromDiscord | <Gumber> write it for me beef! |
06:11:19 | FromDiscord | <Elegantbeef> `proc makeMyShit = {.error: "Todo: implement logic".}` |
06:11:20 | FromDiscord | <Gumber> also |
06:11:29 | FromDiscord | <Gumber> until the ripe age of 32 I didn't have any clue I had ADHD |
06:11:44 | FromDiscord | <Gumber> I'm 36 now and just started really treating it within the past six or so months |
06:12:09 | FromDiscord | <Gumber> so - taking a project from start to finish for me is extremely difficult - you should have seen my life prior to me getting on my meds |
06:12:12 | FromDiscord | <Gumber> or med I should say |
06:12:27 | nrds | <Prestige99> how did you realize you have it? |
06:12:30 | FromDiscord | <Gumber> now it's not nearly as bad and I can focus, and plan and strategize and function like a normal adult |
06:12:46 | FromDiscord | <Gumber> I struggled with substance abuse and mental health misdiagnoseses for two plus decades |
06:13:05 | FromDiscord | <Gumber> eventually a therapist I had seen before was like - describe your day to day life for me and posited that maybe I had some kind of attention disorder |
06:13:25 | FromDiscord | <Gumber> went to a shrink and got diagnosed and put on adderall - it helped but after like 20 years of taking meds and them not working and being told the problem is you |
06:13:55 | FromDiscord | <Gumber> it was pretty easy to stop taking them because A) I was always told I was an addict and another prescription narcotic didn't sound to appealing to me (not that I was addicted to pills - I abused alcohol and weed and stuff like that to deal with life) |
06:14:08 | FromDiscord | <Gumber> this is way off topic btw |
06:15:48 | FromDiscord | <Gumber> sent a long message, see http://ix.io/3zC1 |
06:16:55 | nrds | <Prestige99> Yeah if you want to continue there I'd like to hear. Never really understood what it is |
06:17:08 | FromDiscord | <Gumber> sure |
06:44:21 | * | PMunch joined #nim |
07:29:35 | FromDiscord | <cabboose> Hahaha we literally just had a similar wild discussion in another channel about adhd |
07:29:38 | FromDiscord | <cabboose> Must be the season |
07:29:58 | FromDiscord | <cabboose> We came to the conclusion that beef is wackd |
07:30:02 | FromDiscord | <cabboose> Not with adhd |
07:30:05 | FromDiscord | <cabboose> Just in general |
07:30:10 | FromDiscord | <Elegantbeef> Well that's a given |
07:30:33 | FromDiscord | <Krypton> I saw that nim package in arch linux is vuln to something ? |
07:30:39 | FromDiscord | <Krypton> Like is that true ? |
07:32:48 | FromDiscord | <Rika> Vulnerable to what |
07:44:31 | FromDiscord | <cabboose> criticism? |
07:57:23 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
07:57:35 | * | Gustavo6046 joined #nim |
07:58:38 | * | max22- joined #nim |
08:00:35 | * | Vladar quit (Quit: Leaving) |
08:01:32 | PMunch | @Rika, I think I've finally found an improvement to a dither |
08:01:46 | FromDiscord | <Rika> Sample? |
08:01:52 | FromDiscord | <Krypton> In reply to @Rika "Vulnerable to what": Unauthorized access to some directories |
08:02:07 | FromDiscord | <Rika> In reply to @Krypton "Unauthorized access to some": Isn’t that any binary? Explain |
08:02:16 | FromDiscord | <Rika> Or send a link explaining |
08:02:24 | FromDiscord | <Rika> Whichever is easier |
08:02:56 | FromDiscord | <Krypton> Ok |
08:03:30 | PMunch | @Rika, just a sec |
08:03:45 | FromDiscord | <Krypton> https://media.discordapp.net/attachments/371759389889003532/890146333862797322/Screenshot_20210922-133341_Chrome.jpg |
08:03:57 | FromDiscord | <Rika> In reply to @PMunch "<@259277943275126785>, just a sec": Do you plan on releasing it on the same terms as the original a dither? |
08:04:05 | FromDiscord | <Krypton> https://security.archlinux.org/package/nim |
08:04:38 | FromDiscord | <Rika> Thanks |
08:04:56 | FromDiscord | <Krypton> here its saying that nim has a vulnerability which allows a normal user to access unauthorized directories ? |
08:05:17 | FromDiscord | <Rika> This is only inherent to the zip package it seems |
08:05:18 | FromDiscord | <Krypton> Is it true ? |
08:05:41 | supakeen | Sure, it's true. |
08:05:56 | PMunch | @Rika, haven't fine tuned the magic numbers. But this is one that looks pretty good: https://uploads.peterme.net/cube_dithered_m1-237_m2-082.png |
08:05:56 | supakeen | If you handle zip files from users they can extract arbitrary paths. |
08:06:08 | FromDiscord | <Rika> That looks nice indeed |
08:06:41 | FromDiscord | <Krypton> So the compiler is vulnerable to some arbitrary code ? |
08:06:44 | supakeen | The 'normal' way to solve this is to strip all leading slashes and remove all ..-components. |
08:06:46 | FromDiscord | <Rika> Actually the half grey pattern might be indesirable |
08:06:49 | FromDiscord | <Rika> Undesirable |
08:06:56 | supakeen | No, the compiler is not vulnerable, compiling code is already executing arbitrary code. |
08:07:14 | FromDiscord | <Rika> In reply to @Krypton "So the compiler is": That’s what compilers do… |
08:07:16 | PMunch | @Rika, really? That's what I was trying to add :P |
08:07:24 | supakeen | This is specifically if you use the `zip` module in your program with zip archives containing certain paths. |
08:07:28 | FromDiscord | <Rika> In reply to @PMunch "<@259277943275126785>, really? That's what": Depends on the user I guess |
08:07:31 | supakeen | Other languages do tend to sanitize those paths. |
08:07:36 | FromDiscord | <Rika> Though it is nice IMO |
08:07:58 | supakeen | But *note* Python is vulnerable to this as well: https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile.extractall etc. |
08:07:58 | FromDiscord | <Krypton> Hmm , so the compilers shouldnt be run with sudo i guess , i mean , no one does that |
08:08:10 | PMunch | Basically I tried to ensure that a half grey image would be a perfect checkerboard |
08:08:12 | supakeen | You're still misunderstanding this has nothing to do with compiling. |
08:08:29 | FromDiscord | <Krypton> Ok |
08:09:02 | FromDiscord | <Krypton> Nvm , i dont think i am gonna use zip modules anyways |
08:09:09 | PMunch | And this has the effect of minimising the black right next to black which showed up as hard patterns |
08:10:12 | FromDiscord | <Rika> Damn I’m not home so I can’t compare with the original |
08:10:19 | FromDiscord | <Rika> Do you mind sending the original a dither add |
08:10:21 | FromDiscord | <Rika> Sample |
08:10:24 | FromDiscord | <Rika> Thanks |
08:12:00 | PMunch | https://uploads.peterme.net/cube_dithered_m1-237_m2-119.png |
08:13:04 | FromDiscord | <Rika> Okay I think the checkerboard pattern makes it look like it loses detail but of course it’s not objectifiable |
08:14:17 | PMunch | There really isn't any detail there in the source image though |
08:14:59 | FromDiscord | <Rika> I mean more like it gives a feeling of 50% with some black spots on it instead of a gradient |
08:15:49 | PMunch | Hmm, I see what you mean |
08:16:49 | PMunch | Unfortunately I don't have my device here, so I can't see which actually looks better on the real hardware |
08:23:22 | PMunch | Hmm, the more I compare the two the more I agree with you.. |
08:24:05 | PMunch | Still have to compare on the real device though |
08:24:50 | PMunch | But it's very noticeable when it's slightly more than half grey that there are black pixels in the otherwise perfect pattern.. |
08:32:01 | FromDiscord | <Rika> Yup |
08:36:13 | FromDiscord | <dom96> In reply to @Krypton "here its saying that": This is weird. Why is this a vulnerability on Nim? |
08:36:40 | FromDiscord | <dom96> It’s a vulnerability in a package that Nim doesn’t even ship with anymore as far as I can see |
08:36:58 | FromDiscord | <dom96> Can we remove this CVE from the Nim package? |
08:37:15 | * | flynn quit (Quit: Ping timeout (120 seconds)) |
08:37:15 | * | nrds quit (Remote host closed the connection) |
08:38:19 | * | flynn1 joined #nim |
08:39:19 | * | nrds joined #nim |
08:44:10 | FromDiscord | <impbox [ftsf]> from reading it, it doesn't allow privilege escalation, when a user extracts a file to a directory they expect all the files to be extracted under that location, but specially crafted zip files can escape that directory (assuming they have permission to write to the target path) |
08:44:40 | supakeen | It's a common vulnerability that I think people now call 'zipslip'. Usually any zip library has both ways of extracting (making paths 'safe', or not). |
08:46:15 | supakeen | At least Debian has it right: https://ubuntu.com/security/CVE-2020-23171 |
08:51:34 | supakeen | I've just commented in the ticket I guess. |
09:08:43 | supakeen | I've asked someone on the arch security thingy to review that thing at least so let's see :) |
09:13:00 | PMunch | @Rika, discovered I had made an oopsie in my code. Fixed it and went hunting for a better magic number combo: https://uploads.peterme.net/cube_dithered_m1-237_m2-095.png |
09:13:24 | FromDiscord | <Rika> Still has the same issue as I’ve said though |
09:13:36 | PMunch | Yeah, but that's inherit to the method I'm using |
09:13:41 | FromDiscord | <Rika> Yeah |
09:13:56 | FromDiscord | <Rika> Can’t you make this faster using a shader or something |
09:14:04 | PMunch | Oh for sure |
09:15:04 | PMunch | Fastest (and what I plan on actually doing) would be to generate the whole "mask" for the entire screen I'm using, then it's just a matter of some lookup and quick maths |
09:15:11 | PMunch | Which should be super quick on a GPU |
09:15:14 | PMunch | Even on a CPU |
09:21:29 | FromDiscord | <Rika> Eh easiest is shader |
09:22:02 | * | xet7 quit (Remote host closed the connection) |
09:22:58 | * | xet7 joined #nim |
09:53:33 | * | xet7 quit (Remote host closed the connection) |
09:54:35 | * | xet7 joined #nim |
09:55:18 | FromDiscord | <fae> hmm wonder whats going on here https://play.nim-lang.org/#ix=3zD5 |
10:00:01 | FromDiscord | <fae> It's like it only creates one generic function for the `Base` type |
10:01:55 | * | FromDiscord quit (Remote host closed the connection) |
10:02:08 | * | FromDiscord joined #nim |
10:09:46 | FromDiscord | <Rika> It’s probably the same issue as the c++ code gen thing |
10:11:21 | FromDiscord | <fae> I thought maybe using distinct would solve it but no |
10:33:05 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=3zDm |
10:34:38 | FromDiscord | <dom96> Thanks supakeen! |
10:44:18 | FromDiscord | <Rika> In reply to @Goel "I don't understand why": How did you import whatever module provides the vector type |
10:49:30 | FromDiscord | <cabboose> can someone explain to me what magic calls are? |
10:49:35 | FromDiscord | <cabboose> pragmas I mean |
10:49:50 | FromDiscord | <cabboose> or where I can find their source code |
10:51:36 | FromDiscord | <haxscramper> Magic procs are implemented in the compiler, there is no "source code" to look at really. `ast.TMagic` is an enum with all magic types, `genMagic` and `genMagicExpr` are different codegen implementations of various procs |
10:51:52 | FromDiscord | <cabboose> excellent |
10:51:55 | FromDiscord | <cabboose> found it |
10:51:57 | FromDiscord | <cabboose> cool |
10:52:29 | FromDiscord | <haxscramper> also `semtypes.processMagicType` |
11:09:07 | * | max22- quit (Ping timeout: 268 seconds) |
11:13:53 | * | pro joined #nim |
11:23:31 | PMunch | @Rika, I think I might just go with blue-noise dithering.. |
11:26:51 | pro | Is there a limit or a pool of free ports to use in linux? |
11:26:55 | NimEventer | New thread by Noob: Undeclared NtAllocateVirtualMemory SysCalls , see https://forum.nim-lang.org/t/8447 |
11:26:58 | * | Vladar joined #nim |
11:35:32 | FromDiscord | <Rika> In reply to @PMunch "<@259277943275126785>, I think I": It would still look noisy like XOR |
11:35:35 | FromDiscord | <Rika> I believe |
11:35:46 | FromDiscord | <Rika> And it’s a bit harder to implement I think |
11:37:16 | PMunch | https://uploads.peterme.net/cube_dithered_bn.png |
11:37:22 | PMunch | Looks pretty clean |
11:40:18 | PMunch | Compared to a dither add: https://uploads.peterme.net/cube_dithered_ad.png and a dither xor: https://uploads.peterme.net/cube_dithered_ax.png |
11:41:43 | FromDiscord | <Rika> Honestly prefer add over void and cluster |
11:43:11 | PMunch | And for completeness sake some error diffusion ones: Floyd_Steinberg: https://uploads.peterme.net/cube_dithered_fs.png, Jarvis, Judice, and Ninke: https://uploads.peterme.net/cube_dithered_jn.png, and Atkinson: https://uploads.peterme.net/cube_dithered_at.png |
11:45:59 | FromDiscord | <Rika> ED dithers aren’t nice |
11:46:00 | FromDiscord | <Rika> Lol |
11:46:18 | PMunch | And my checkerboard version of a dither: https://uploads.peterme.net/cube_dithered_bn.png |
11:46:26 | PMunch | Oops: https://uploads.peterme.net/cube_dithered_ch.png |
11:47:05 | PMunch | I mean it's only because they can't be easily implemented on a GPU and creates horrible artifacts when animated |
11:47:27 | PMunch | But they look nicer for a static image, so they're nice to have to strive towards |
11:48:01 | FromDiscord | <Rika> No personally it doesn’t even look good on a static image |
11:48:39 | PMunch | Really? |
11:48:50 | PMunch | I much prefer Floyd-Steinberg to a dither |
11:48:57 | PMunch | Look how crisp that cube is |
11:49:50 | FromDiscord | <Rika> It butchers light colour backgrounds in the process |
11:50:05 | FromDiscord | <Rika> Edges are fucked too |
11:55:40 | PMunch | What do you mean it butchers them? |
11:56:01 | PMunch | And edges look so much better with them, that's why I like them |
11:57:01 | pro | apparently https://en.wikipedia.org/wiki/Ephemeral_port is a thing :) |
11:59:44 | * | pch_ joined #nim |
12:00:54 | * | pch quit (Ping timeout: 260 seconds) |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:09:26 | FromDiscord | <Rika> In reply to @PMunch "And edges look so": image edges not object edges |
12:09:29 | FromDiscord | <Rika> look at the top of the image |
12:10:04 | FromDiscord | <Rika> i just honestly dont like the light bg of ED dithers over ordered |
12:29:15 | * | Guest9898 joined #nim |
12:29:57 | * | rockcavera joined #nim |
12:29:58 | * | rockcavera quit (Changing host) |
12:29:58 | * | rockcavera joined #nim |
12:32:25 | * | Guest9898 quit (Client Quit) |
12:42:33 | * | pro quit (Read error: Connection reset by peer) |
13:07:13 | NimEventer | New thread by Rb3: Wrapperless interop with C/C++, see https://forum.nim-lang.org/t/8448 |
13:07:53 | * | cyraxjoe quit (Ping timeout: 264 seconds) |
13:34:04 | * | max22- joined #nim |
13:39:16 | NimEventer | New thread by Jorjun_arch: Typescript as compilation target, see https://forum.nim-lang.org/t/8449 |
13:39:45 | FromDiscord | <Rika> oh man |
13:57:05 | * | kayabaNerve quit (Ping timeout: 264 seconds) |
13:58:08 | PMunch | Does this look like a decent example of how my automatic C wrapping library works? http://ix.io/3zE8/nim |
14:15:07 | PMunch | Okay, I have to run. But I wanted to get this out there: https://github.com/PMunch/futhark |
14:15:11 | nrds | <R2D299> itHub: 7"Automatic wrapping of C headers in Nim" |
14:15:32 | * | PMunch quit (Quit: Leaving) |
14:35:31 | * | arkurious joined #nim |
14:53:29 | FromDiscord | <hotdog> In reply to @PMunch "Okay, I have to": Looks cool! Excited to try it out |
14:58:42 | FromDiscord | <dom96> Nice! |
14:59:51 | FromDiscord | <dom96> Was waiting for somebody to create this |
15:01:58 | FromDiscord | <Krypton> should i learn nim or rust ? |
15:02:12 | FromDiscord | <IsaacPaul> Both? |
15:02:23 | FromDiscord | <Krypton> i dont have time for that much |
15:02:41 | FromDiscord | <Krypton> Lets just say i have to go somewhere after that |
15:03:24 | FromDiscord | <Krypton> i like nim , but i am constantly struggling with indentation thing |
15:03:58 | FromDiscord | <Krypton> it doesnt let me use tabs and if i use spaces , i am having even more problems |
15:04:26 | FromDiscord | <Kermithos> which code editor are you using? |
15:04:35 | FromDiscord | <Krypton> In reply to @Kermithos "which code editor are": Vim or Vs code |
15:04:52 | FromDiscord | <Kermithos> did u install the vscode plugin? |
15:05:09 | FromDiscord | <Kermithos> it uses 2 spaces when I press tab |
15:05:12 | FromDiscord | <Krypton> For nim ? No , i tried it in vim |
15:05:27 | * | max22- quit (Quit: Leaving) |
15:06:20 | FromDiscord | <enthus1ast> my editor does this for me, never had issues↵(@Krypton) |
15:06:29 | FromDiscord | <enthus1ast> be it vscode or vim |
15:06:40 | FromDiscord | <Krypton> Huh |
15:06:56 | FromDiscord | <enthus1ast> convert tabs to 2 spaces |
15:08:10 | FromDiscord | <enthus1ast> set tabstop=2 shiftwidth=2 expandtab |
15:08:22 | FromDiscord | <Krypton> hmm |
15:11:52 | * | max22- joined #nim |
15:29:56 | FromDiscord | <Saurav Niroula> use vs code and convert indentation to space |
16:17:25 | Amun-Ra | or :%s/\t/ /g |
16:17:27 | * | nrds quit (Remote host closed the connection) |
16:17:42 | * | nrds joined #nim |
16:35:01 | * | PMunch joined #nim |
16:35:52 | PMunch | @dom96, I've wanted something like that ever since I first tried to use a C library in Nim :P |
16:35:59 | PMunch | So it's good to finally have it |
16:59:14 | * | max22- quit (Remote host closed the connection) |
17:06:48 | * | max22- joined #nim |
17:11:15 | * | PMunch quit (Quit: leaving) |
17:20:25 | NimEventer | New thread by Alexeypetrushin: Integration with C for statistics and data processing?, see https://forum.nim-lang.org/t/8450 |
17:38:58 | * | ozzz quit (Read error: Connection reset by peer) |
17:41:40 | * | ozzz joined #nim |
17:54:15 | * | ozzz quit (Read error: Connection reset by peer) |
17:58:13 | * | ozzz joined #nim |
17:59:40 | * | ozzz quit (Read error: Connection reset by peer) |
18:04:04 | * | ozzz joined #nim |
18:29:25 | FromDiscord | <juan_carlos> That futha lib is cool. |
18:40:43 | FromDiscord | <fae> Yes excited to try it out with some C libs |
18:44:20 | FromDiscord | <Recruit_main707> can you avoid the result variable being predeclared in the c code? |
18:46:27 | FromDiscord | <juan_carlos> Theres a pragma I think, `.noinit` ?, `.noreturn` ? |
18:47:34 | FromDiscord | <Recruit_main707> `noInit`seems to work, thanks |
18:57:17 | * | nmz1 joined #nim |
19:24:34 | FromDiscord | <geekrelief> does nim have a token stringification operator inside templates? |
19:25:42 | FromDiscord | <haxscramper> 'astToStr' |
19:28:43 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3zGD |
19:29:17 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3zGE |
19:30:37 | FromDiscord | <geekrelief> oh if I specify a return type of string on `stringify` it works |
19:32:11 | * | Pyautogui joined #nim |
19:32:56 | * | Gustavo6046_ joined #nim |
19:33:09 | * | Gustavo6046 quit (Remote host closed the connection) |
19:35:40 | * | Gustavo6046_ is now known as Gustavo6046 |
19:44:09 | * | Pyautogui quit (Ping timeout: 265 seconds) |
20:17:23 | * | neurocyte013 quit (Quit: The Lounge - https://thelounge.chat) |
20:17:36 | * | Pyautogui joined #nim |
20:41:33 | * | Vladar quit (Remote host closed the connection) |
21:13:01 | * | PMunch joined #nim |
21:14:08 | * | Pyautogui quit (Quit: Connection closed) |
22:01:21 | * | max22- quit (Quit: Leaving) |
22:21:13 | * | arkanoid joined #nim |
22:21:33 | arkanoid | Hello! |
22:30:35 | nrds | <Prestige99> Hey arkanoid |
22:36:40 | * | stkrdknmibalz joined #nim |
22:48:26 | FromDiscord | <dain> i havent had any trouble with nim in vim |
22:48:58 | FromDiscord | <dain> i just use vim-polyglot, ez |
22:59:26 | PMunch | I fleshed out the README of Futhark a little bit: https://github.com/pmunch/futhark |
22:59:30 | nrds | <R2D299> itHub: 7"Automatic wrapping of C headers in Nim" |
22:59:41 | PMunch | I also use Nim in Vim, and have done for years |
23:03:21 | NimEventer | New thread by PMunch: Futhark: Automatic C imports in Nim using libclang, see https://forum.nim-lang.org/t/8451 |
23:04:20 | NimEventer | New post on r/nim by PMunch: Futhark: Automatic wrapping of C headers in Nim, see https://reddit.com/r/nim/comments/pti32g/futhark_automatic_wrapping_of_c_headers_in_nim/ |
23:09:09 | * | PMunch quit (Quit: leaving) |
23:13:05 | FromDiscord | <gogolxdong (liuxiaodong)> when will furthark automic translate c++ |