00:00:39 | * | flynn quit (Read error: Connection reset by peer) |
00:01:15 | nrds | <Prestige99> Yep :P |
00:01:25 | nrds | <Prestige99> I just don't get to use nim frequent enough |
00:01:32 | nrds | <Prestige99> forget things |
00:01:57 | * | flynn joined #nim |
00:03:44 | FromDiscord | <Alea> what happens if your run a program importing winim but putting the calls under ``when defined(windows)`` and then run it on linux? |
00:03:49 | FromDiscord | <Alea> (edit) "your" => "you" |
00:03:59 | FromDiscord | <Alea> (edit) removed "and then run it" |
00:04:09 | FromDiscord | <huantian> then the calls don't happen on linux |
00:04:13 | FromDiscord | <Elegantbeef> Is the import under `when defined(windows)`? |
00:04:34 | FromDiscord | <Elegantbeef> Only the true branch of a `when` is semantically checked |
00:05:21 | FromDiscord | <Alea> No the import isn't, I wasn't sure if that would break things |
00:05:51 | * | flynn quit (Read error: Connection reset by peer) |
00:06:22 | FromDiscord | <Elegantbeef> Move the import into it and it'll be fine |
00:06:33 | FromDiscord | <Elegantbeef> When doesnt create scope and as such everything still happens top level |
00:07:06 | * | flynn joined #nim |
00:07:08 | FromDiscord | <Elegantbeef> Really what i'd suggest is making a file called `windowsImpl.nim` and import that in your main file |
00:07:08 | FromDiscord | <Elegantbeef> This way you can easily abstract per OS |
00:09:20 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Wlv |
00:09:50 | FromDiscord | <Alea> would I have identically named and similarly functioning procs in each that are picked based on the whens? |
00:10:18 | FromDiscord | <Elegantbeef> I mean that'd be the idea you abstract the API to something that can be called identically |
00:10:31 | FromDiscord | <Elegantbeef> This what you just make equivlent APIs and you never need to write new code |
00:10:54 | FromDiscord | <pls use my ruby nimble package> sent a code paste, see https://play.nim-lang.org/#ix=3Wlw |
00:11:00 | FromDiscord | <pls use my ruby nimble package> (edit) |
00:11:40 | FromDiscord | <pls use my ruby nimble package> That's how I would do it for a nimble package, at least |
00:11:40 | FromDiscord | <Alea> so it would be like MainImplModule.abstractedProc that is underlied by the 3 implementations? |
00:12:13 | FromDiscord | <Alea> I'm just not quite understanding how to abstract and pick between calling into different modules |
00:12:24 | FromDiscord | <Elegantbeef> Ideally you treat the modules as modules and export identical procedures so they can be used as such |
00:12:34 | * | flynn quit (Read error: Connection reset by peer) |
00:12:38 | FromDiscord | <Elegantbeef> Say you're doing some PID stuff |
00:12:39 | FromDiscord | <pls use my ruby nimble package> sent a code paste, see https://play.nim-lang.org/#ix=3Wlx |
00:13:47 | * | flynn joined #nim |
00:13:59 | FromDiscord | <Elegantbeef> You may expose a procedure `getProcessName(id: int)` which calls the coresponding api in the other module |
00:14:12 | FromDiscord | <Elegantbeef> They'd all be named the same and take the same parameters |
00:14:25 | FromDiscord | <Elegantbeef> But since the modules are only imported based off the target OS there is no issue |
00:14:53 | FromDiscord | <Elegantbeef> Like i said `when` only uses the correct branch so `elif` branches dont cause imports |
00:16:14 | FromDiscord | <pls use my ruby nimble package> Think of `when` like C's `#if` |
00:16:28 | nrds | <Prestige99> Did I really already run into a concepts bug |
00:16:36 | FromDiscord | <Elegantbeef> Probably not |
00:16:42 | FromDiscord | <pls use my ruby nimble package> ? I want to see |
00:16:48 | FromDiscord | <pls use my ruby nimble package> I use concepts a lot |
00:17:16 | nrds | <Prestige99> This is my error, it's a bit of code to share.. https://play.nim-lang.org/#ix=3Wly |
00:17:41 | nrds | <Prestige99> I only have one type named `UIElement` and it's a concept, maybe it's constructed incorrectly |
00:18:35 | FromDiscord | <Elegantbeef> @Alea\: here's an example program https://wandbox.org/permlink/R4AcbmQOvShxp1nl |
00:19:04 | FromDiscord | <Elegantbeef> Well without code cant say much |
00:19:12 | FromDiscord | <pls use my ruby nimble package> sent a long message, see http://ix.io/3Wlz |
00:19:29 | FromDiscord | <pls use my ruby nimble package> (edit) "http://ix.io/3Wlz" => "http://ix.io/3WlA" |
00:19:31 | FromDiscord | <pls use my ruby nimble package> link broken |
00:19:31 | FromDiscord | <Elegantbeef> Uhh ran fine here |
00:19:35 | FromDiscord | <Alea> In reply to @Elegantbeef "<@218035776179404811>\: here's an example": got it, thanks π |
00:19:50 | nrds | <Prestige99> Elegantbeef: mine? I'll push so you can take a look |
00:19:56 | FromDiscord | <Elegantbeef> Ok |
00:20:16 | FromDiscord | <pls use my ruby nimble package> hmm, weird. Firefox really doesn't like that website for some reason |
00:20:20 | * | flynn quit (Read error: Connection reset by peer) |
00:20:23 | FromDiscord | <Elegantbeef> I'm using FF |
00:20:34 | FromDiscord | <huantian> link is broken for me too hm |
00:20:38 | nrds | <Prestige99> https://github.com/avahe-kellenberger/pheasantfarm/commit/93be636c2933574e1329297c8cd21266f80bc970 Elegantbeef |
00:20:41 | FromDiscord | <Elegantbeef> Atleast that's how i'd abstract it alea there are other ways, some people do it all in a single module |
00:21:07 | FromDiscord | <Elegantbeef> `e of positionable`? |
00:21:15 | FromDiscord | <Elegantbeef> Think you're funny? |
00:21:17 | nrds | <Prestige99> Specifically trying to get UIElement to work error in menu.nim line 48 with the above error I showed |
00:21:33 | * | flynn joined #nim |
00:21:43 | nrds | <Prestige99> hm? |
00:21:49 | FromDiscord | <Elegantbeef> You cannot inherit from a concept |
00:21:50 | FromDiscord | <Elegantbeef> it's `is` |
00:22:06 | nrds | <Prestige99> hm I thought it was of because that's how you type check |
00:22:15 | FromDiscord | <Elegantbeef> Your UIElement uses `of` |
00:22:16 | FromDiscord | <Elegantbeef> You do not use `of` since it's a runtime check |
00:22:17 | FromDiscord | <Elegantbeef> you use `is` |
00:22:22 | FromDiscord | <Elegantbeef> No |
00:22:25 | FromDiscord | <Elegantbeef> That's how you runtime check |
00:22:28 | nrds | <Prestige99> ah |
00:22:29 | FromDiscord | <Elegantbeef> This isnt a runtime check |
00:22:32 | FromDiscord | <Elegantbeef> This is a static check |
00:22:45 | nrds | <Prestige99> Yeah just didn't realize of was just for runtime |
00:23:06 | FromDiscord | <Elegantbeef> that concept also is wrong again |
00:23:08 | FromDiscord | <pls use my ruby nimble package> Can't blame you. couldn't tell you the last time I used dynamic dispatch in nim |
00:23:22 | FromDiscord | <Elegantbeef> `concept e, ctx` binds both as the same concept |
00:23:30 | FromDiscord | <Elegantbeef> you want `var ctx: Target` |
00:23:42 | nrds | <Prestige99> uh well |
00:23:47 | FromDiscord | <Elegantbeef> inside the concept body |
00:23:56 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3WlB |
00:24:04 | nrds | <Prestige99> so I basically am just wanting to use it for the render proc, where ctx is a parameter |
00:24:08 | FromDiscord | <Elegantbeef> Whoops remove the ctx on the first line |
00:24:17 | nrds | <Prestige99> but UIElement doesn'h have a ctx: Target |
00:24:41 | FromDiscord | <Elegantbeef> What is target? |
00:25:00 | nrds | <Prestige99> It's a type in sdl-gpu, and ctx is the name |
00:25:20 | nrds | <Prestige99> I have a render proc where Target is the 2nd param type |
00:25:36 | FromDiscord | <pls use my ruby nimble package> Hey, I'm also working on a nim project that uses sdl2, cool |
00:26:03 | nrds | <Prestige99> Nice |
00:26:08 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3WlB so then yes use https://play.nim-lang.org/#ix=3WlB |
00:26:08 | FromDiscord | <Elegantbeef> Whoops double paste |
00:26:34 | FromDiscord | <pls use my ruby nimble package> just without the ctx in the first line |
00:26:45 | FromDiscord | <pls use my ruby nimble package> ... I think |
00:26:54 | FromDiscord | <Elegantbeef> Fuck bad paste again |
00:26:55 | FromDiscord | <Elegantbeef> Jeezus |
00:26:55 | FromDiscord | <Elegantbeef> Yea without ctx on first line |
00:26:57 | * | flynn quit (Read error: Connection reset by peer) |
00:27:57 | FromDiscord | <Elegantbeef> ` elements: seq[UIElement]` is invalid |
00:28:10 | * | flynn joined #nim |
00:28:12 | FromDiscord | <Elegantbeef> That needs to be `Menu[T: UiElement]` `seq[T]` |
00:28:15 | FromDiscord | <Elegantbeef> Concepts are not dynamic |
00:28:18 | FromDiscord | <Elegantbeef> They're compile time |
00:29:45 | FromDiscord | <Elegantbeef> I assume you missed me saying they're for generic constraints only |
00:29:48 | nrds | <Prestige99> hm I'm still getting https://play.nim-lang.org/#ix=3WlD |
00:29:51 | nrds | <Prestige99> oh okay |
00:29:56 | nrds | <Prestige99> Yeah |
00:30:37 | FromDiscord | <Elegantbeef> You can use them like a trait system where you explicitly state what a type needs to implement so others can easily constraint to it |
00:31:44 | FromDiscord | <Elegantbeef> Like for instance if you're making a Json library you might make a concept that is `UseCustomHooks` which checks if the proc has a `toJson` and `fromJson` otherwise the unconstrianed version is dispatched |
00:32:45 | * | flynn quit (Read error: Connection reset by peer) |
00:33:58 | * | flynn joined #nim |
00:34:48 | nrds | <Prestige99> does that mean I have to pass in some generic type for Menu that isn't UIElement? |
00:34:57 | FromDiscord | <Elegantbeef> Well yea |
00:35:03 | FromDiscord | <Elegantbeef> It's just a constraint |
00:35:11 | nrds | <Prestige99> hmm |
00:35:21 | FromDiscord | <Elegantbeef> It's not instantiatable type |
00:35:29 | FromDiscord | <Elegantbeef> It's just like you cant do `myField: seq` |
00:35:33 | nrds | <Prestige99> maybe my only option is just inheritence then, and do away with concepts here |
00:35:34 | FromDiscord | <Elegantbeef> or `myField: int or float` |
00:35:58 | FromDiscord | <Elegantbeef> I mean you could use something like traitor but i dont condone the usage of it π |
00:36:59 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
00:37:00 | FromDiscord | <Elegantbeef> Oh and also evan i'm kinda use SDL2 for a project so all three of us are using sdl2 π |
00:37:12 | FromDiscord | <pls use my ruby nimble package> Depends what you want to do. Do you plan on having 2 totally different implementations of `UIElement`? And only one of those implementations is ever used in a particular build? |
00:37:17 | FromDiscord | <Elegantbeef> Though i only am using it for IO |
00:37:30 | FromDiscord | <Elegantbeef> Not using it to draw or anything |
00:37:37 | nrds | <Prestige99> I'd have many types that fit the UIElement constraint |
00:37:41 | FromDiscord | <Elegantbeef> I think prestige thought that they worked like TS interfaces |
00:37:42 | FromDiscord | <Elegantbeef> Which to some extent they do |
00:37:44 | nrds | <Prestige99> but I want a collection of said things |
00:37:48 | nrds | <Prestige99> yeah |
00:37:58 | FromDiscord | <Elegantbeef> Yea you want dynamic dispatch that uses the UI constraint |
00:38:04 | FromDiscord | <Elegantbeef> Traitor gives that |
00:38:18 | FromDiscord | <Elegantbeef> But it's also not really tested or to be used π |
00:38:29 | FromDiscord | <pls use my ruby nimble package> In reply to @Elegantbeef "Though i only am": Neat! I'm making a visual novel engine (it uses my ruby nimble package, which you should use) |
00:38:31 | nrds | <Prestige99> yeah I'll just use inheritence, then |
00:38:59 | FromDiscord | <Elegantbeef> Have fun |
00:39:42 | FromDiscord | <Elegantbeef> I have to animate my moveable tiles, going to be fun |
00:39:53 | * | flynn quit (Read error: Connection reset by peer) |
00:40:17 | FromDiscord | <pls use my ruby nimble package> This is actually my second attempt at a Nim-based VN engine. I made one that used nim macros to make all the dialogue/graphics |
00:40:36 | FromDiscord | <Elegantbeef> Is ruby for runtime scripting? |
00:40:44 | FromDiscord | <pls use my ruby nimble package> Nim macros are great but at a certain point they become... difficult to maintain. |
00:41:06 | * | flynn joined #nim |
00:41:37 | FromDiscord | <pls use my ruby nimble package> The user writes their graphics/UI code in Ruby, and the game dialogue is written in a Ruby-like DSL that gets compiled into Ruby cod3 |
00:41:40 | FromDiscord | <pls use my ruby nimble package> (edit) "cod3" => "code" |
00:42:05 | FromDiscord | <Elegantbeef> For context this is what i'm presently working on https://streamable.com/12gb97 |
00:42:05 | FromDiscord | <Elegantbeef> You can see at one point my pushed tiles just teleport |
00:42:40 | FromDiscord | <pls use my ruby nimble package> It's a VN so performance isn't really a concern the way it is with other games, so you can get away with an interpreted language. Especially when Nim is doing all the actual rendering work |
00:42:57 | FromDiscord | <pls use my ruby nimble package> That looks really nice |
00:43:03 | FromDiscord | <Elegantbeef> Yea i was half curious why you were using ruby over nimscript π |
00:43:19 | FromDiscord | <Elegantbeef> Thanks |
00:43:35 | * | vicfred quit (Quit: Leaving) |
00:44:14 | FromDiscord | <pls use my ruby nimble package> A couple reasons. 1) I like ruby 2) Ruby is really easy to embed inside another application if you're willing to translate a bunch documentation from japanese |
00:46:26 | FromDiscord | <huantian> didn't know people actually liked ruby π |
00:46:52 | FromDiscord | <pls use my ruby nimble package> It's just Python but less stupid |
00:47:17 | FromDiscord | <huantian> I haven't used ruby so I can't say anything tbh |
00:47:25 | * | flynn quit (Read error: Connection reset by peer) |
00:47:36 | FromDiscord | <huantian> but I like python more just based on looks |
00:47:56 | FromDiscord | <pls use my ruby nimble package> Rails blew my mind the first time I used it. Had no idea it could be so easy to make a full-stack app |
00:48:39 | * | flynn joined #nim |
00:48:41 | FromDiscord | <huantian> ok but that's rails being good not ruby :P |
00:48:57 | FromDiscord | <huantian> and I can do static type checking in python |
00:49:09 | FromDiscord | <luteva> ruby is not just python but.... ruby is pretty cool! π |
00:49:32 | FromDiscord | <pls use my ruby nimble package> I like Ruby's syntax better. It's different, but better once you understand what it's doing, especially under the hood |
00:49:37 | FromDiscord | <luteva> although not usefull for some of the stuff you might do with nim π |
00:50:30 | FromDiscord | <huantian> I just don't like writing `end` |
00:50:37 | FromDiscord | <pls use my ruby nimble package> Fair |
00:50:48 | FromDiscord | <luteva> can be done by the IDE π |
00:50:52 | FromDiscord | <luteva> π |
00:50:59 | FromDiscord | <huantian> give me indentation based langs all day, even {} looks better than `end` imo |
00:51:00 | FromDiscord | <pls use my ruby nimble package> I type fast and I never notice it |
00:51:26 | FromDiscord | <pls use my ruby nimble package> I really started to appreciate ruby when I started trying to embed it in native (i.e. nim and c) code. Its block construct is basically doing what Nim's `iterator` does. That's pretty clever for an interpreted lang |
00:51:36 | FromDiscord | <huantian> maybe I'm not used to it but three characters is too much word-based syntax to end a scope/block |
00:52:52 | FromDiscord | <pls use my ruby nimble package> You get used to it quickly. Ruby's getter/setter syntax is way better than python's. Basically everything class-related is better tbh |
00:53:03 | * | flynn quit (Read error: Connection reset by peer) |
00:53:25 | FromDiscord | <pls use my ruby nimble package> No `self` all over the place, no `ugly` stuff |
00:53:48 | FromDiscord | <huantian> I like my `self` and dunders |
00:54:16 | * | flynn joined #nim |
00:54:16 | FromDiscord | <luteva> self even have one more character than end! |
00:54:17 | FromDiscord | <luteva> π |
00:54:36 | FromDiscord | <luteva> (edit) "self" => ""self"" | "end!" => ""end"!" |
00:54:55 | FromDiscord | <pls use my ruby nimble package> EXACTLY |
00:55:02 | FromDiscord | <pls use my ruby nimble package> Ruby is already 25% better |
00:55:53 | FromDiscord | <luteva> π |
00:58:15 | FromDiscord | <pls use my ruby nimble package> My VN engine is partly targeted at people who have never written code before, so certain ruby constructs like `do_thing if cond` that are english-esque are a plus |
00:58:24 | FromDiscord | <treeform> In reply to @Rika "given an image loaded": Do you want compute shaders or fragment shaders? |
00:59:36 | FromDiscord | <huantian> In reply to @luteva ""self" even have one": but I don't need to do oop if I dont' want toβ΅it's hard to not write if statements π |
00:59:47 | * | flynn quit (Read error: Connection reset by peer) |
00:59:54 | FromDiscord | <Rika> In reply to @treeform "Do you want compute": What Iβm running is per pixel so fragment |
01:00:03 | FromDiscord | <creikey> @treeform I have a random question, have you ever tried using rust for things? what did you think of it? |
01:00:47 | FromDiscord | <creikey> In reply to @Rika "What Iβm running is": https://github.com/treeform/boxy/blob/master/src/boxy/textures.nim#L85 you might be interested in how boxy loads pixy images |
01:01:00 | * | flynn joined #nim |
01:01:02 | FromDiscord | <creikey> (edit) "In reply to @Rika "What Iβm running is": https://github.com/treeform/boxy/blob/master/src/boxy/textures.nim#L85 you might be interested in how boxy loads pixy images ... " added "into opengl textures" |
01:05:20 | * | flynn quit (Read error: Connection reset by peer) |
01:06:33 | * | flynn joined #nim |
01:11:14 | * | flynn quit (Read error: Connection reset by peer) |
01:12:27 | * | flynn joined #nim |
01:15:10 | NimEventer | New Nimble package! audiodb - TheAudioDB API client, see https://github.com/thechampagne/audiodb-nim |
01:18:29 | * | flynn quit (Read error: Connection reset by peer) |
01:19:43 | * | flynn joined #nim |
01:26:07 | * | flynn quit (Read error: Connection reset by peer) |
01:26:39 | FromDiscord | <treeform> In reply to @creikey "<@107140179025735680> I have a": No, not really... |
01:27:21 | * | flynn joined #nim |
01:32:29 | * | flynn quit (Read error: Connection reset by peer) |
01:33:42 | * | flynn joined #nim |
01:39:03 | * | flynn quit (Read error: Connection reset by peer) |
01:40:16 | * | flynn joined #nim |
01:45:18 | * | flynn quit (Read error: Connection reset by peer) |
01:46:32 | * | flynn joined #nim |
01:47:30 | FromDiscord | <morgan> thinking about writing something to read thru all my installed themes and construct a graph with values on each connection for how many times two scopes get the same style |
01:49:20 | * | duuude joined #nim |
01:52:37 | * | flynn quit (Read error: Connection reset by peer) |
01:53:50 | * | flynn joined #nim |
02:00:01 | * | flynn quit (Read error: Connection reset by peer) |
02:01:16 | * | flynn joined #nim |
02:02:31 | * | arkurious quit (Quit: Leaving) |
02:06:33 | * | flynn quit (Read error: Connection reset by peer) |
02:07:46 | * | flynn joined #nim |
02:12:49 | * | flynn quit (Remote host closed the connection) |
02:14:03 | * | flynn joined #nim |
02:17:45 | * | flynn quit (Read error: Connection reset by peer) |
02:18:57 | * | flynn joined #nim |
02:19:36 | * | koltrast quit (Quit: ZNC - http://znc.in) |
02:19:55 | * | koltrast joined #nim |
02:24:32 | * | flynn quit (Read error: Connection reset by peer) |
02:25:45 | * | flynn joined #nim |
02:30:45 | * | flynn quit (Read error: Connection reset by peer) |
02:31:58 | * | flynn joined #nim |
02:37:33 | * | flynn quit (Read error: Connection reset by peer) |
02:38:46 | * | flynn joined #nim |
02:43:23 | * | flynn quit (Read error: Connection reset by peer) |
02:44:36 | * | flynn joined #nim |
02:49:07 | * | flynn quit (Read error: Connection reset by peer) |
02:50:20 | * | flynn joined #nim |
02:55:38 | * | flynn quit (Read error: Connection reset by peer) |
02:56:52 | * | flynn joined #nim |
03:02:14 | * | flynn quit (Read error: Connection reset by peer) |
03:03:27 | * | flynn joined #nim |
03:08:39 | * | flynn quit (Read error: Connection reset by peer) |
03:09:52 | * | flynn joined #nim |
03:14:41 | * | flynn quit (Read error: Connection reset by peer) |
03:15:54 | * | flynn joined #nim |
03:20:44 | * | flynn quit (Read error: Connection reset by peer) |
03:21:57 | * | flynn joined #nim |
03:26:24 | * | flynn quit (Remote host closed the connection) |
03:27:36 | * | flynn joined #nim |
03:32:32 | * | flynn quit (Remote host closed the connection) |
03:33:45 | * | flynn joined #nim |
03:38:05 | * | flynn quit (Read error: Connection reset by peer) |
03:39:18 | * | flynn joined #nim |
03:42:38 | * | vicfred joined #nim |
03:44:09 | * | flynn quit (Remote host closed the connection) |
03:45:23 | * | flynn joined #nim |
03:50:41 | * | flynn quit (Read error: Connection reset by peer) |
03:51:55 | * | flynn joined #nim |
03:57:49 | * | flynn quit (Read error: Connection reset by peer) |
03:59:02 | * | flynn joined #nim |
04:00:57 | * | xet7 joined #nim |
04:03:51 | * | flynn quit (Read error: Connection reset by peer) |
04:05:04 | * | flynn joined #nim |
04:10:40 | * | flynn quit (Read error: Connection reset by peer) |
04:11:53 | * | flynn joined #nim |
04:17:20 | * | flynn quit (Read error: Connection reset by peer) |
04:18:33 | * | flynn joined #nim |
04:19:23 | * | slowButPresent quit (Quit: leaving) |
04:23:35 | * | flynn quit (Read error: Connection reset by peer) |
04:24:48 | * | flynn joined #nim |
04:30:08 | * | flynn quit (Read error: Connection reset by peer) |
04:31:21 | * | flynn joined #nim |
04:35:54 | * | flynn quit (Read error: Connection reset by peer) |
04:37:07 | * | flynn joined #nim |
04:42:21 | * | flynn quit (Remote host closed the connection) |
04:43:05 | * | rockcavera quit (Remote host closed the connection) |
04:43:33 | * | flynn joined #nim |
04:48:35 | * | flynn quit (Read error: Connection reset by peer) |
04:49:47 | * | flynn joined #nim |
04:55:17 | * | flynn quit (Read error: Connection reset by peer) |
04:56:31 | * | flynn joined #nim |
05:01:37 | * | flynn quit (Read error: Connection reset by peer) |
05:02:50 | * | flynn joined #nim |
05:07:48 | * | duuude quit (Ping timeout: 240 seconds) |
05:07:49 | * | flynn quit (Read error: Connection reset by peer) |
05:09:02 | * | flynn joined #nim |
05:12:58 | FromDiscord | <Void> Is Nim based or is it infested with tranny degenerates like Rust and V? |
05:13:50 | FromDiscord | <Elegantbeef> How dumb do you have to be to pose that question π |
05:13:54 | FromDiscord | <huantian> Tranny??? |
05:14:22 | FromDiscord | <huantian> Am I not caught up with the latest lingo |
05:14:48 | * | flynn quit (Read error: Connection reset by peer) |
05:14:49 | FromDiscord | <0000> In reply to @Void "Is Nim based or": it's aight imo |
05:14:56 | FromDiscord | <Phil> I... Err think that's too describe transsexuals derogatory |
05:15:26 | FromDiscord | <Void> In reply to @kaletaa "it's aight imo": Thanks I'll take your word |
05:15:33 | FromDiscord | <Phil> And wtf is wrong with you if in terms of coding you give a shit |
05:15:49 | FromDiscord | <0000> In reply to @Isofruit "And wtf is wrong": huh |
05:15:53 | FromDiscord | <Void> In reply to @Isofruit "And wtf is wrong": ? |
05:16:00 | * | flynn joined #nim |
05:16:03 | FromDiscord | <0000> can a man not be judgemental and be good at programming at the same time |
05:16:19 | FromDiscord | <Phil> He can, just means he's also an asshat |
05:16:38 | FromDiscord | <Elegantbeef> I mean they can but concerning oneself with the users of a language seems like a weird fucking choice |
05:17:02 | FromDiscord | <0000> i think it's a sane thing to consider |
05:17:08 | FromDiscord | <0000> rust has a terrible community |
05:17:32 | FromDiscord | <0000> there was that guy who got bullied out of the programming scene in general just cause he used unsafe in a webserver |
05:17:47 | FromDiscord | <Elegantbeef> Sure but that's unrelated |
05:17:59 | FromDiscord | <Phil> And that has to do with transsexuals how? |
05:18:02 | FromDiscord | <0000> why? the users make up the community |
05:18:16 | FromDiscord | <Elegantbeef> Not using a language cause there are transgender programmers is fucking inane |
05:18:31 | FromDiscord | <Elegantbeef> You're not playing with their bits, why the fuck does it matter to you |
05:19:03 | FromDiscord | <0000> it does matter to me when they make being transgender their whole personality and cry about every single thing that doesn't align with their views |
05:19:04 | FromDiscord | <Void> In reply to @Elegantbeef "Not using a language": Whats insane is self botting. Im surprised Discord hasnt banned you yet. |
05:19:10 | FromDiscord | <Phil> It goes against community guidelines to take that into account as it pretty much goes against the mutual respect clause. |
05:19:17 | FromDiscord | <0000> In reply to @Void "Whats insane is self": its a bridge from a different server |
05:19:21 | FromDiscord | <Phil> Void, learn what matrix is |
05:19:21 | FromDiscord | <0000> service |
05:19:24 | FromDiscord | <0000> gitter or irc |
05:19:37 | FromDiscord | <0000> if the nim gitter even exists anymore |
05:19:42 | FromDiscord | <Elegantbeef> I'm not a self bot |
05:19:43 | FromDiscord | <Elegantbeef> I'm a matrix user |
05:19:48 | FromDiscord | <0000> ah yes matrix |
05:20:17 | * | flynn quit (Read error: Connection reset by peer) |
05:21:30 | * | flynn joined #nim |
05:22:19 | FromDiscord | <huantian> Itβs fine to call a community bad, but your greeting couldβve been more tactful |
05:23:22 | FromDiscord | <huantian> Toxicity goes both ways |
05:23:26 | FromDiscord | <0000> are you writing a wall of text phil |
05:23:46 | FromDiscord | <Phil> In reply to @huantian "Itβs fine to call": A more tactful form of that greeting wouldn't have made it better really |
05:25:07 | FromDiscord | <Void> In reply to @huantian "Itβs fine to call": I was genuinely curious... a lot of programming communities can be full of freaks I was just making sure this wasn't one of them. |
05:27:40 | FromDiscord | <pmunch> @Void\: please don't call transgender people freaks.. The Nim community welcomes everyone, as long as they stay welcoming back |
05:27:41 | * | flynn quit (Read error: Connection reset by peer) |
05:27:43 | FromDiscord | <Phil> @Yardanico could you check whether this goes against the community rule about respecting people? I'm entirely sure how much it covers |
05:27:52 | FromDiscord | <Elegantbeef> We write code so certainly we're freaks |
05:27:57 | FromDiscord | <Phil> (edit) "@Yardanico could you check whether this goes against the community rule about respecting people? I'm ... entirely" added "not" |
05:28:08 | FromDiscord | <huantian> And beef writes macros so heβs a metafreak |
05:28:54 | * | flynn joined #nim |
05:28:54 | FromDiscord | <huantian> Matrix bridge moment |
05:29:08 | FromDiscord | <huantian> Why did that go through first what |
05:29:18 | FromDiscord | <Elegantbeef> Bridge ate pmunch's message π |
05:30:00 | FromDiscord | <PMunch> If you're just here to speak ill of a group of people and not to talk about programming you can take your hat and leave |
05:30:08 | FromDiscord | <PMunch> Silly bridge.. |
05:31:42 | FromDiscord | <PMunch> In reply to @Isofruit "<@177365113899057152> could you check": This is certainly not accepted. A good rule, as a member of the community you don't feel like it belongs here it probably doesn't. After all we're here to moderate for the community |
05:32:56 | * | flynn quit (Read error: Connection reset by peer) |
05:34:09 | * | flynn joined #nim |
05:35:55 | FromDiscord | <Phil> Regarding the earlier debate about dunders |
05:36:34 | FromDiscord | <Phil> Nobody diss ma boy funders, those are actually a pretty beast feature of python that I like a fair bit |
05:36:43 | FromDiscord | <Phil> God damit phone |
05:36:54 | FromDiscord | <Phil> Why do you keep correcting shit wrong |
05:37:06 | FromDiscord | <Phil> (edit) "funders," => "dunders," |
05:37:21 | FromDiscord | <Phil> (edit) "beast" => "neat" |
05:38:25 | FromDiscord | <Phil> I really like how you can basically build a system like that yourself in nim |
05:39:05 | * | flynn quit (Read error: Connection reset by peer) |
05:39:53 | FromDiscord | <morgan> ya i like dunders |
05:40:17 | * | flynn joined #nim |
05:40:26 | FromDiscord | <morgan> also im glad to see the regulars standing up against hate π |
05:41:24 | FromDiscord | <Phil> Actually, can you manipulate what gets auto imported? Like could I make it so a particular module gets imported in every other module in the same project? |
05:43:05 | FromDiscord | <-|-> In reply to @Void "Is Nim based or": V is unbased because it is deceptively marketed |
05:44:10 | FromDiscord | <Void> In reply to @-|- "V is unbased because": As in its proposed ease of use? |
05:44:31 | * | flynn quit (Read error: Connection reset by peer) |
05:44:46 | FromDiscord | <Phil> In reply to @-|- "V is unbased because": ?β΅In what sense? Never heard of the language before, this the question |
05:44:49 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#ix=3Wmg |
05:44:52 | FromDiscord | <morgan> also i've not used V but im on a rust server and it's a cool lang and seems to be a cool community from what i can tell as someone who doesn't use the lang |
05:45:10 | FromDiscord | <morgan> V seemed to be making some really bold claims |
05:45:16 | FromDiscord | <pmunch> Yeah there is a configuration flag to auto-import a fileβ΅(@Phil) |
05:45:19 | FromDiscord | <morgan> which kinda turned me off |
05:45:27 | FromDiscord | <huantian> What Iβve heard is that it has these bold claims and doesnβt actually have any of the implemented |
05:45:43 | * | flynn joined #nim |
05:45:49 | FromDiscord | <huantian> And is always behind on their deadlines and underdeliver |
05:46:44 | FromDiscord | <-|-> In reply to @huantian "And is always behind": That's basically it |
05:46:57 | FromDiscord | <huantian> Finally I can have the entire standard library imported |
05:46:58 | FromDiscord | <Phil> In reply to @pmunch "Yeah there is a": Heck yeah, once more the language provides me all I need! |
05:47:09 | FromDiscord | <morgan> ok so i looked at my old code again (which iirc doesn't work anymore maybe i'll update it someday) and you can either initialize the object with specific local modules or import them dynamically |
05:47:15 | FromDiscord | <-|-> With V, the problem isn't the claims, it's the fact that it doesn't deliver |
05:48:30 | FromDiscord | <pmunch> What's dunders?β΅(@Phil) |
05:48:46 | FromDiscord | <Elegantbeef> the weird python `something` iirc |
05:49:20 | FromDiscord | <Phil> You know how python has len(obj), str(obj) etc.? |
05:49:33 | FromDiscord | <pmunch> Sure |
05:49:55 | FromDiscord | <morgan> there's also `_sunders_` |
05:50:02 | FromDiscord | <morgan> tho i think dunders are more common |
05:50:10 | FromDiscord | <Void> In reply to @-|- "With V, the problem": I watched a video of a guy say V was a better version of Go and I cringed. |
05:50:15 | FromDiscord | <morgan> single underscore or double underscore |
05:50:25 | FromDiscord | <Phil> These implicitly call the corresponding dunder (double under score) methods.β΅There are default implementations for most of them that you can override |
05:50:28 | * | flynn quit (Read error: Connection reset by peer) |
05:50:31 | FromDiscord | <morgan> lol why is score so hard to type fast |
05:50:47 | FromDiscord | <Phil> Sort of a python interface with less correctness checking |
05:50:57 | FromDiscord | <huantian> Yep theyβre called magic methods and let you override operations like attribute access of an object, operators, etc |
05:51:26 | FromDiscord | <huantian> (edit) "operators," => "operators (like addition, or string and repr)," |
05:51:41 | * | flynn joined #nim |
05:51:45 | FromDiscord | <Phil> By implementing them you get to use a lot of generic methods that only rely on your obj having these implemented |
05:51:51 | FromDiscord | <morgan> `aMyObj == anInt` is the same as `eq(this: MyObj, other: int)` iirc |
05:52:58 | FromDiscord | <Phil> You'd do it in nim by basically using concepts |
05:53:11 | FromDiscord | <morgan> also member variable lookup is one which is how i did the hacky importing lol |
05:53:28 | FromDiscord | <Phil> Just that python libs already use these a lot |
05:53:33 | FromDiscord | <huantian> In reply to @Isofruit "You'd do it in": It would be nice if concepts were more widely used for duck typing |
05:53:50 | FromDiscord | <huantian> eg a table concept, a collection concept, etc |
05:54:00 | FromDiscord | <PMunch> Aah I see |
05:54:43 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#ix=3Wmm |
05:54:55 | FromDiscord | <PMunch> Well in Nim we would just use operation overloading for that. But to accept a type into a procedure you would need a concept |
05:55:01 | FromDiscord | <huantian> (edit) "etc" => "etcβ΅But this topic would drift away from python dunders to python static typing" |
05:56:40 | FromDiscord | <huantian> Maybe one day concepts will be more prevalent in Nim |
05:56:49 | * | flynn quit (Read error: Connection reset by peer) |
05:57:06 | FromDiscord | <huantian> Theyβre still in the experimental section rn tho rogjt |
05:57:13 | FromDiscord | <Phil> Yeh, overall concepts are definitely superior, just needs spreading |
05:57:23 | FromDiscord | <Elegantbeef> Just use them |
05:57:32 | FromDiscord | <Elegantbeef> Who cares where they're located, they're fantastic |
05:58:02 | * | flynn joined #nim |
06:01:21 | FromDiscord | <huantian> They arenβt as good in some ways as interfaces in other langs but so much more powerful in others |
06:01:49 | FromDiscord | <Elegantbeef> Eh i have traits built on new concepts |
06:03:20 | * | flynn quit (Read error: Connection reset by peer) |
06:04:32 | * | flynn joined #nim |
06:09:47 | * | flynn quit (Read error: Connection reset by peer) |
06:10:59 | * | flynn joined #nim |
06:13:44 | FromDiscord | <Phil> In reply to @huantian "They arenβt as good": I'm curious, in which scenarios? |
06:14:31 | * | duuude joined #nim |
06:17:31 | * | flynn quit (Read error: Connection reset by peer) |
06:18:44 | * | flynn joined #nim |
06:23:30 | * | flynn quit (Read error: Connection reset by peer) |
06:24:43 | * | flynn joined #nim |
06:27:30 | nrds | <Prestige99> It seems the code from config.nims does not carry over when compiling a binary - I have it setting a specific LD_LIBRARY_PATH |
06:27:54 | nrds | <Prestige99> I tried moving it to my main module/file but it needs the path set before then, it seems.. |
06:29:02 | FromDiscord | <Elegantbeef> Rather the compile time equivlent π |
06:29:17 | nrds | <Prestige99> https://github.com/avahe-kellenberger/pheasantfarm/blob/master/config.nims for reference |
06:29:22 | * | flynn quit (Read error: Connection reset by peer) |
06:29:57 | nrds | <Prestige99> hmm |
06:30:35 | * | flynn joined #nim |
06:31:37 | nrds | <Prestige99> yeah problem is, it needs to modify an env variable at the start. But it complains about not finding a shared library, which is in the dir I'm trying to add to LD_LIBRARY_PATH |
06:35:17 | * | flynn quit (Read error: Connection reset by peer) |
06:36:30 | * | flynn joined #nim |
06:40:03 | FromDiscord | <Rika> In reply to @-|- "V is unbased because": Lol |
06:41:32 | FromDiscord | <Rika> In reply to @huantian "Theyβre still in the": Just use them |
06:41:43 | * | flynn quit (Read error: Connection reset by peer) |
06:42:01 | FromDiscord | <Rika> More users of experimental things means more eyes on issues with them |
06:42:56 | * | flynn joined #nim |
06:48:32 | * | flynn quit (Read error: Connection reset by peer) |
06:49:44 | * | PMunch joined #nim |
06:49:46 | * | flynn joined #nim |
06:52:32 | * | Arrrrrrr joined #nim |
06:52:33 | * | Arrrrrrr quit (Changing host) |
06:52:33 | * | Arrrrrrr joined #nim |
06:54:38 | * | flynn quit (Remote host closed the connection) |
06:55:51 | * | flynn joined #nim |
07:00:53 | * | flynn quit (Read error: Connection reset by peer) |
07:02:08 | * | flynn joined #nim |
07:03:41 | * | flynn quit (Read error: Connection reset by peer) |
07:04:54 | * | flynn joined #nim |
07:09:37 | * | flynn quit (Read error: Connection reset by peer) |
07:10:50 | * | flynn joined #nim |
07:15:11 | FromDiscord | <AsbjΓΈrn F> This is probably a dumb question, but could you guys suggest a stack of libs for a warehouse (monitoring stock, integrating with ERP and webshops, that kind of stuff) system with a HTTP Rest API and a web frontend in Nim? I'm having trouble picking and I'm not sure which stuff works together.β΅Something like PostgreSQL or MySQL for db |
07:16:45 | * | flynn quit (Read error: Connection reset by peer) |
07:17:16 | FromDiscord | <IDF(ardek66)> have you checked out prologue? i wrote some REST API stuff in the past and it was quite pleasant |
07:17:58 | * | flynn joined #nim |
07:18:42 | FromDiscord | <IDF(ardek66)> as for db you could use an orm like norm or ormin |
07:21:06 | FromDiscord | <AsbjΓΈrn F> So prologue and norm? Do I need much else to get started? |
07:21:16 | FromDiscord | <AsbjΓΈrn F> I'm guessing prologue has routing? |
07:21:25 | FromDiscord | <AsbjΓΈrn F> I was thinking of hosting on nginx |
07:22:08 | PMunch | Prologue does routing, yes |
07:22:32 | PMunch | In general both Jester and Prologue should be put behind a reverse proxy when used in production |
07:23:15 | PMunch | I think there are official guides on how to do this for NGinx, but I've managed to set it up in Apache as well (although I forgot to document that so it would take me a little time to figure out how I did it) |
07:23:23 | FromDiscord | <IDF(ardek66)> for the web frontend you can use karax |
07:23:44 | PMunch | Or HTMX, that seems to be the new cool thing for Nim projects |
07:24:01 | FromDiscord | <IDF(ardek66)> i used nimja for server-side rendering |
07:24:10 | * | flynn quit (Read error: Connection reset by peer) |
07:24:18 | PMunch | https://arhamjain.com/2021/11/22/nim-simple-chat.html |
07:25:02 | PMunch | I've used autotemplates for my home automation interface: https://github.com/PMunch/autotemplate |
07:25:22 | * | flynn joined #nim |
07:25:23 | PMunch | Which works pretty well |
07:25:28 | FromDiscord | <AsbjΓΈrn F> So Prologue, Norm, HTMX? |
07:25:40 | FromDiscord | <AsbjΓΈrn F> And yeah Nginx themselves have a guide on how to reverse proxy |
07:25:51 | PMunch | I think that's what I would go with now yeah, seems like a good stack |
07:26:00 | FromDiscord | <IDF(ardek66)> yeah sounds good |
07:26:01 | FromDiscord | <AsbjΓΈrn F> Thanks so much |
07:26:15 | FromDiscord | <AsbjΓΈrn F> Very helpful community π |
07:26:23 | PMunch | Happy to help :) |
07:26:34 | PMunch | You wouldn't happen to be a fellow Norwegian by the way? |
07:26:37 | PMunch | Judging by your name |
07:26:48 | FromDiscord | <AsbjΓΈrn F> Danish, you oil stealing scoundrel π |
07:26:59 | PMunch | Oil stealing :o |
07:27:17 | FromDiscord | <AsbjΓΈrn F> yeah back when Denmark gave a huge part of the sea that had oil to Norway |
07:27:24 | FromDiscord | <AsbjΓΈrn F> Never letting that one go haha |
07:27:55 | PMunch | Aaah haha, hadn't actually heard about that before |
07:28:26 | PMunch | I know Sweden offered us shares in Volvo for the rights to all the (at that point) undiscovered oil |
07:29:12 | PMunch | The deal was set to go through but was dropped at the last minute because someone found oil. Norway wasn't really rich enough back then to keep searching forever, so the timing was impeccable |
07:30:52 | FromDiscord | <AsbjΓΈrn F> https://nyheder.tv2.dk/politik/2016-09-08-husker-du-da-norge-snoed-os-for-olie-milliarderne-her-er-hvad-der-virkelig-skete |
07:30:58 | * | flynn quit (Read error: Connection reset by peer) |
07:31:52 | FromDiscord | <AsbjΓΈrn F> It's just a myth though π But it's a funny story |
07:32:10 | * | flynn joined #nim |
07:32:41 | FromDiscord | <AsbjΓΈrn F> I think it's only old people like me that remember it these days |
07:32:54 | FromDiscord | <Elegantbeef> Ew old people |
07:32:56 | PMunch | I'm working on a new library by the way, for automatically converting procedures with specific types into ones that just takes e.g. a Request object. It will then call procedures you've defined to extract parts of the request into objects and call the initial procedure. It should make it possible to create a fully type-safe routing system :) |
07:34:40 | FromDiscord | <AsbjΓΈrn F> that sounds nice |
07:34:51 | FromDiscord | <Rika> Wonder if there will be a day where our web servers donβt need to be put behind a reverse proxy |
07:34:57 | FromDiscord | <dom96> In reply to @Void "Is Nim based or": For any avoidance of doubt. This user has been banned because this kind of bullshit is definitely not acceptable here π |
07:35:11 | * | flynn quit (Read error: Connection reset by peer) |
07:35:15 | FromDiscord | <AsbjΓΈrn F> oh lol |
07:35:38 | FromDiscord | <Rika> I certainly thought PMunch had banned them already lol |
07:36:24 | * | flynn joined #nim |
07:36:42 | FromDiscord | <dom96> Donβt think so. Unless I missed it. |
07:37:28 | PMunch | @AsbjΓΈrn_F, just read the article, interesting story :) |
07:37:29 | FromDiscord | <d4rckh> what can i put in the except block to just ignore the error? |
07:37:34 | FromDiscord | <dom96> In reply to @Rika "Wonder if there will": Good point. Iβd really like httpbeast to get there. Wonβt call it 1.0 until thatβs the case. |
07:37:41 | FromDiscord | <luteva> In reply to @PMunch "I'm working on a": Yeah! This would be REALLY cool! I was waiting for that for... quite a long time! That sounds really nice! |
07:38:54 | FromDiscord | <dom96> In reply to @d4rckh "what can i put": `discard` |
07:38:59 | PMunch | @Rika, nope I didn't ban them. In general I like to warn them first, as I did, and they seemed to behave afterwards. If they wanted to pick up a serious discussion about programming or get some help with coding in Nim I'd be happy to help them. Pushing away people with different views is never a good way to get them to change. |
07:39:01 | FromDiscord | <d4rckh> tysm |
07:39:14 | FromDiscord | <Elegantbeef> Any non value AST works you can also do `##` π |
07:39:52 | PMunch | @luteva, nice. Hopefully the "derived types"-library (still haven't found a name for it..) will be ready soon :) |
07:40:00 | PMunch | Then it's just a matter of gluing the pieces together |
07:40:09 | FromDiscord | <d4rckh> oh wow @dom96 remember that error from yesterday which you told me to catch? its actually threw by runForever |
07:41:11 | PMunch | Has anyone done a comparison of ormin and norm by the way? |
07:41:27 | FromDiscord | <dom96> In reply to @d4rckh "oh wow <@132595483838251008> remember": Ahh. Thatβs annoying. I think we should fix that. |
07:41:59 | FromDiscord | <AsbjΓΈrn F> In reply to @PMunch "Has anyone done a": If you tell me how to I can do it when I get home |
07:42:40 | PMunch | @AsbjΓΈrn_F, well create a small database, write a snippet to interact with it from both ormin and norm, and then compare the pros and cons of either |
07:42:45 | * | flynn quit (Read error: Connection reset by peer) |
07:43:17 | FromDiscord | <AsbjΓΈrn F> is that sufficient? |
07:43:38 | FromDiscord | <Elegantbeef> Given he's talking about the ergonomics yes |
07:43:45 | FromDiscord | <Elegantbeef> Not everything is about performance π |
07:43:50 | FromDiscord | <AsbjΓΈrn F> Oh right |
07:43:53 | FromDiscord | <dom96> In reply to @PMunch "<@259277943275126785>, nope I didn't": I think myself and PMunch disagree here. I think the ban shouldβve been immediate, when a person starts a discussion that way itβs clear to me they arenβt interested in having their mind changed. Itβs not our job to change peopleβs minds about such things anyway. If anyone wants to do it then I think itβs best done in PM, not in a public chat like this one where this |
07:43:54 | FromDiscord | <AsbjΓΈrn F> My bad |
07:43:58 | * | flynn joined #nim |
07:44:27 | FromDiscord | <AsbjΓΈrn F> I keep thinking of those extensive performance tests that remove outliers and does all kinds of stuff |
07:44:32 | PMunch | @AsbjΓΈrn_F, oh by all means, if you want to get into it comparing performance would be great as well :) |
07:45:05 | FromDiscord | <AsbjΓΈrn F> Yeah I'd need help doing performance testing π But if it's just comparing use cases I can do that when I get home |
07:45:56 | FromDiscord | <IDF(ardek66)> honestly i havent used ormin but i think the syntax is overall better, norm tends to get very verbose at times |
07:48:46 | * | flynn quit (Read error: Connection reset by peer) |
07:49:18 | FromDiscord | <Elegantbeef> Pmunch i have realized how we can use generic interfaces instead of the manual annotating |
07:49:31 | PMunch | Oh? |
07:49:59 | * | flynn joined #nim |
07:50:00 | FromDiscord | <Elegantbeef> the macro emits a macro call of `myMacro(procSymbol, all args)` then does what you do with the table |
07:50:19 | FromDiscord | <Elegantbeef> `procSymbol` being whatever the proc name you decided to go with |
07:51:22 | PMunch | Hmm, I'm not sure how that solves anything |
07:51:34 | PMunch | If I still need the table I would still need the annotations.. |
07:51:40 | FromDiscord | <Elegantbeef> It removes the need to manually annotate π |
07:51:55 | FromDiscord | <Elegantbeef> No you dont need the table |
07:51:57 | FromDiscord | <Elegantbeef> It does what you do with the table |
07:52:04 | FromDiscord | <Elegantbeef> No it uses the table |
07:52:20 | PMunch | Hmm, I don't think I'm getting this |
07:52:24 | * | om3ga quit (Ping timeout: 260 seconds) |
07:52:25 | FromDiscord | <Elegantbeef> I'll writeup a basic version |
07:52:28 | PMunch | Nice |
07:55:12 | * | flynn quit (Read error: Connection reset by peer) |
07:56:25 | * | flynn joined #nim |
08:00:43 | * | flynn quit (Read error: Connection reset by peer) |
08:01:56 | * | flynn joined #nim |
08:06:37 | * | flynn quit (Read error: Connection reset by peer) |
08:07:49 | * | flynn joined #nim |
08:10:51 | PMunch | Hmm, I get `sym "int"` into my hash procedure at two different times. Sometimes getType returns `sym "int"`, and sometimes it returns `BracketExpr(sym "typedesc", sym "int")` |
08:11:14 | FromDiscord | <Elegantbeef> `.getType.typeKind`? |
08:11:23 | FromDiscord | <Elegantbeef> Typed ast is hard |
08:12:04 | PMunch | ntyTypeDesc vs ntyInt.. |
08:14:51 | NimEventer | New post on r/nim by momoPFL01: How do you elegantly handle types in bigger projects?, see https://reddit.com/r/nim/comments/ucykd6/how_do_you_elegantly_handle_types_in_bigger/ |
08:15:13 | * | flynn quit (Read error: Connection reset by peer) |
08:16:27 | * | flynn joined #nim |
08:19:41 | FromDiscord | <Elegantbeef> You know now that i wrote it i dont know if it solves anything |
08:19:41 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3WmJ |
08:20:28 | * | flynn quit (Read error: Connection reset by peer) |
08:21:04 | FromDiscord | <Elegantbeef> Ah nevermind i certainly does just the dispatch logic is wrong |
08:21:41 | * | flynn joined #nim |
08:22:49 | PMunch | Why is it wrong? |
08:23:18 | FromDiscord | <Elegantbeef> Well right now it doesnt allow `10, "someString", 10` to match `doThing(a, b: int)` |
08:23:29 | PMunch | Ah.. |
08:23:35 | PMunch | That's certainly a problem |
08:23:47 | FromDiscord | <Elegantbeef> Well that's just a thing i didnt do |
08:24:01 | FromDiscord | <Elegantbeef> I did a lazy thing of discard all arguments I dont need to showcase how you'd do it |
08:24:06 | FromDiscord | <Elegantbeef> You have all the same information here |
08:24:10 | PMunch | Wait, as long as you have `doThing(a: int, b: string)` then it should be fine |
08:24:17 | FromDiscord | <Elegantbeef> Yes |
08:24:42 | FromDiscord | <Elegantbeef> Anyway the point is you can use this logic to generate your calls from your route generate and never need to annotate, just need to export |
08:24:54 | PMunch | That's neat |
08:26:04 | FromDiscord | <Elegantbeef> Reallistically this should relatively easily fit into your current solution assuming you stored the proc defs |
08:26:14 | FromDiscord | <Elegantbeef> Dont recall your implementation presently |
08:27:58 | * | flynn quit (Read error: Connection reset by peer) |
08:28:05 | PMunch | Stored the proc defs? |
08:28:17 | PMunch | But yeah, this should be able to slot right in |
08:28:55 | FromDiscord | <Elegantbeef> Just need to figure out what to call the proc π |
08:29:10 | * | flynn joined #nim |
08:31:00 | FromDiscord | <Elegantbeef> Yea i figured you stored the proc defs fro a given type in table iirc |
08:33:58 | * | flynn quit (Read error: Connection reset by peer) |
08:35:11 | * | flynn joined #nim |
08:40:14 | * | flynn quit (Read error: Connection reset by peer) |
08:40:32 | * | Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] β I don't check my email often since it's full of crap, but in any case, [email protected]) |
08:41:27 | * | flynn joined #nim |
08:42:47 | FromDiscord | <d4rckh> is there any function i can use to get the username of the user my programming is running as? |
08:42:51 | FromDiscord | <d4rckh> (edit) "as?" => "as which works on linux and windows?" |
08:43:46 | FromDiscord | <Elegantbeef> The dumb way is to use `getHomeDir()` then get the name from that |
08:44:00 | FromDiscord | <Elegantbeef> I dont think there is a way to get the username in the stdlib |
08:44:05 | FromDiscord | <Rika> Not guaranteed for Unix |
08:44:32 | FromDiscord | <Rika> You can have a home of β/some mountβ in Unix , no username in sight |
08:44:50 | FromDiscord | <d4rckh> maybe env variables? π€ |
08:45:18 | * | flynn quit (Read error: Connection reset by peer) |
08:46:32 | * | flynn joined #nim |
08:53:05 | * | flynn quit (Read error: Connection reset by peer) |
08:54:18 | * | flynn joined #nim |
08:57:59 | * | jmdaemon quit (Ping timeout: 240 seconds) |
08:59:57 | * | flynn quit (Read error: Connection reset by peer) |
09:01:11 | * | flynn joined #nim |
09:01:22 | PMunch | @d4rckh, https://stackoverflow.com/questions/24503466/how-do-i-get-the-user-name-of-the-current-user and https://stackoverflow.com/questions/8953424/how-to-get-the-username-in-c-c-in-linux |
09:01:42 | PMunch | Now wrap those calls in a `when defined(linux)/else:` block and you're good to go |
09:02:32 | PMunch | Or maybe `when defined(windows)/else:` the Linux call is probably available on Mac as well |
09:02:43 | FromDiscord | <d4rckh> yeah, i am already doing this. thanks π |
09:05:28 | * | flynn quit (Read error: Connection reset by peer) |
09:06:41 | * | flynn joined #nim |
09:12:45 | * | flynn quit (Read error: Connection reset by peer) |
09:13:58 | * | flynn joined #nim |
09:18:28 | * | flynn quit (Read error: Connection reset by peer) |
09:19:41 | * | flynn joined #nim |
09:23:18 | * | Zectbumo quit (Remote host closed the connection) |
09:25:26 | * | flynn quit (Read error: Connection reset by peer) |
09:26:40 | * | flynn joined #nim |
09:31:00 | PMunch | Hmm, annoying.. |
09:31:24 | PMunch | Why doesn't the sets module allow a HashSet to be modified by an OrderedSet |
09:31:35 | PMunch | I get why it doesn't work the other way |
09:32:05 | * | flynn quit (Remote host closed the connection) |
09:33:18 | * | flynn joined #nim |
09:37:03 | FromDiscord | <Elegantbeef> I assume as always it's cause someone didnt think of it |
09:37:57 | * | flynn quit (Read error: Connection reset by peer) |
09:39:10 | * | flynn joined #nim |
09:44:05 | FromDiscord | <AsbjΓΈrn F> anyone here tried this? https://nginxproxymanager.com/ |
09:45:26 | * | flynn quit (Read error: Connection reset by peer) |
09:46:41 | * | flynn joined #nim |
09:50:23 | * | flynn quit (Read error: Connection reset by peer) |
09:50:34 | FromDiscord | <Elias> could not get to the site, got blocked it seems... |
09:51:37 | * | flynn joined #nim |
09:57:01 | * | flynn quit (Read error: Connection reset by peer) |
09:58:15 | * | flynn joined #nim |
10:02:09 | * | flynn quit (Read error: Connection reset by peer) |
10:03:22 | * | flynn joined #nim |
10:03:27 | FromDiscord | <Phil> In reply to @AsbjΓΈrn F "So Prologue, Norm, HTMX?": Norm does not provide a connection pool and supports sqlite and postgres, keep that in mind |
10:05:33 | FromDiscord | <AsbjΓΈrn F> In reply to @Elias "could not get to": the link I gave? |
10:07:27 | * | flynn quit (Read error: Connection reset by peer) |
10:08:31 | FromDiscord | <Elias> yepp |
10:08:40 | * | flynn joined #nim |
10:08:47 | FromDiscord | <Elias> was it intentional? |
10:11:59 | * | flynn quit (Read error: Connection reset by peer) |
10:13:12 | * | flynn joined #nim |
10:18:46 | * | flynn quit (Read error: Connection reset by peer) |
10:19:59 | * | flynn joined #nim |
10:26:13 | * | flynn quit (Read error: Connection reset by peer) |
10:27:26 | * | flynn joined #nim |
10:27:38 | FromDiscord | <Elias> sent a code paste, see https://play.nim-lang.org/#ix=3Wnc |
10:27:59 | FromDiscord | <Elias> (edit) "https://play.nim-lang.org/#ix=3Wnc" => "https://play.nim-lang.org/#ix=3Wnd" |
10:29:49 | FromDiscord | <AsbjΓΈrn F> In reply to @Elias "was it intentional?": copy paste the address? |
10:29:55 | FromDiscord | <AsbjΓΈrn F> works fine for me |
10:30:13 | * | flynn quit (Read error: Connection reset by peer) |
10:30:49 | duuude | where should a noob start learning? |
10:31:08 | FromDiscord | <Elias> In reply to @AsbjΓΈrn F "copy paste the address?": is this right? https://media.discordapp.net/attachments/371759389889003532/968821593981726740/unknown.png |
10:31:25 | * | flynn joined #nim |
10:31:47 | FromDiscord | <Elias> In reply to @duuude "where should a noob": What do you want to make/work on? |
10:32:30 | FromDiscord | <AsbjΓΈrn F> https://www.nginxproxymanager.com/ maybe? |
10:32:43 | FromDiscord | <AsbjΓΈrn F> oh wait that's why |
10:32:54 | FromDiscord | <Elias> https://media.discordapp.net/attachments/371759389889003532/968822036464013312/unknown.png |
10:33:13 | FromDiscord | <AsbjΓΈrn F> yeah there's no www in the address |
10:33:43 | FromDiscord | <AsbjΓΈrn F> wow that's weird. You have to put in https://nginxproxymanager.com/ as written |
10:33:58 | FromDiscord | <AsbjΓΈrn F> with the https |
10:34:05 | FromDiscord | <Elias> ok |
10:34:42 | FromDiscord | <Elias> now i try this: https://media.discordapp.net/attachments/371759389889003532/968822490673598494/unknown.png |
10:35:03 | FromDiscord | <Elias> Get this https://media.discordapp.net/attachments/371759389889003532/968822576799445022/unknown.png |
10:36:13 | FromDiscord | <AsbjΓΈrn F> ni is mispelled |
10:36:22 | FromDiscord | <Elias> Hahah |
10:36:23 | FromDiscord | <AsbjΓΈrn F> it's ngi |
10:36:29 | * | flynn quit (Read error: Connection reset by peer) |
10:36:41 | FromDiscord | <Elias> still does not work |
10:36:58 | FromDiscord | <AsbjΓΈrn F> https://nginxproxymanager.com? |
10:37:03 | FromDiscord | <AsbjΓΈrn F> (edit) "https://nginxproxymanager.com?" => "https://nginxproxymanager.com ?" |
10:37:15 | duuude | Elias: making portable applications without C89 |
10:37:42 | * | flynn joined #nim |
10:38:47 | FromDiscord | <Elias> In reply to @duuude "<@390570241903689728>: making portable applications": Nice so you're familiar with C? |
10:38:54 | FromDiscord | <Elias> In reply to @AsbjΓΈrn F "https://nginxproxymanager.com ?": nope |
10:40:08 | FromDiscord | <AsbjΓΈrn F> weird |
10:40:10 | FromDiscord | <Elias> I am at school, but we have quite unrestricted internet. If i cant reach it, the county cant π |
10:40:44 | duuude | Elias: yes |
10:40:45 | FromDiscord | <AsbjΓΈrn F> What about the link from a google search? https://www.google.com/search?q=nginxmanager&oq=nginxmanager&aqs=chrome..69i57j0i13j0i13i30j0i8i13i30l7.2496j0j7&sourceid=chrome&ie=UTF-8 |
10:41:12 | FromDiscord | <Elias> Guess we have some restrictions... https://media.discordapp.net/attachments/371759389889003532/968824126783516702/unknown.png |
10:41:18 | FromDiscord | <Elias> haha |
10:41:22 | FromDiscord | <AsbjΓΈrn F> oh ok |
10:41:29 | FromDiscord | <AsbjΓΈrn F> that makes more sense... |
10:41:32 | FromDiscord | <Elias> yepp |
10:41:32 | PMunch | duuude, the Nim tutorials are a good place to start |
10:41:54 | PMunch | Or if you haven't had a look at Nim at all before then learnxinyminutes is a nice first glance look |
10:42:07 | * | flynn quit (Read error: Connection reset by peer) |
10:42:46 | PMunch | If you don't really know programming you can start with this tutorial: https://narimiran.github.io/nim-basics/ |
10:43:09 | FromDiscord | <Elias> In reply to @duuude "<@390570241903689728>: yes": I started (am starting) by rewriting a small C++ library of mine in nim... |
10:43:20 | * | flynn joined #nim |
10:43:32 | FromDiscord | <Elias> i like having a project when learning something new |
10:43:36 | PMunch | And if you like video content you can check out these videos: https://www.youtube.com/watch?v=5tVIsDYPClA |
10:44:50 | PMunch | @Elias, what kind of restrictive network are you on? |
10:44:58 | PMunch | Even my old school wasn't that restrictive |
10:46:02 | FromDiscord | <Elias> In reply to @PMunch "<@390570241903689728>, what kind of": Hehe, were on the "open" network that the "fylkeskommune" administers instead of the school. Gotta love high-school |
10:46:51 | FromDiscord | <Elias> we cant have the same restrictions as the rest of the school since were doing network stuff |
10:48:00 | FromDiscord | <Elias> Would love open internet though |
10:51:08 | * | flynn quit (Read error: Connection reset by peer) |
10:52:21 | * | flynn joined #nim |
10:57:32 | * | flynn quit (Read error: Connection reset by peer) |
10:58:45 | * | flynn joined #nim |
11:04:21 | * | flynn quit (Read error: Connection reset by peer) |
11:05:34 | * | flynn joined #nim |
11:11:51 | Arrrrrrr | {.returnnotnil.} when |
11:12:51 | * | flynn quit (Read error: Connection reset by peer) |
11:12:57 | FromDiscord | <Rika> `ref object not nil` soon? |
11:14:04 | * | flynn joined #nim |
11:14:37 | Arrrrrrr | Is for testing purposes |
11:19:39 | PMunch | @Elias, guess it's time to get a VPN ;) |
11:20:04 | * | flynn quit (Read error: Connection reset by peer) |
11:20:15 | PMunch | @Elegantbeef, have you gone to bed yet? |
11:20:26 | PMunch | I found a slight problem in the code you sent |
11:20:44 | PMunch | It doesn't really address that all of these take the same base type and return different types.. |
11:21:03 | FromDiscord | <Elias> In reply to @PMunch "<@390570241903689728>, guess it's time": havent bothered to set it up at school, but would solve my problems yes |
11:21:18 | * | flynn joined #nim |
11:22:15 | PMunch | I'd need to add some kind of typedesc passing for that.. |
11:25:18 | * | flynn quit (Read error: Connection reset by peer) |
11:26:32 | * | flynn joined #nim |
11:30:05 | FromDiscord | <Zoom> Wow. Wanted to try something lighter than cligen for my script and I'm disappointed. cliche doesn't support arguments at all, nim-argparse is broken, parseopts doesn't support standart `-n 0` or `-n0`, as far as I can tell. |
11:31:55 | * | flynn quit (Read error: Connection reset by peer) |
11:33:08 | * | flynn joined #nim |
11:33:10 | FromDiscord | <Yardanico> In reply to @Zoom "Wow. Wanted to try": how is argparse broken? i'm just curious |
11:33:49 | PMunch | @Zoom, yeah I've been missing a good cli library forever |
11:34:25 | FromDiscord | <exelotl> I've been pretty happy with parseopts personally x) |
11:34:26 | FromDiscord | <Zoom> [Yardanico](https://matrix.to/#/%40Tiberium%3Amatrix.org) https://github.com/iffy/nim-argparse/issues/77 |
11:34:50 | duuude | what could be a reason not to use nim? |
11:36:05 | duuude | could the fact that less people know nim than C come to play in an opensource project? |
11:36:08 | FromDiscord | <Zoom> GNU coding standards of gtfo \>\:)β΅(@exelotl) |
11:37:54 | * | flynn quit (Read error: Connection reset by peer) |
11:39:07 | * | flynn joined #nim |
11:40:12 | FromDiscord | <Zoom> 1. Collaboration with people who don't know/can't learn or use Nim.β΅2. Sometimes it's just easier to use an existing library infrastructure for a language than hack some LangA\<\>Nim interop in case there's no native/wrapper alternative already.β΅3. Your target can't run arbitrary executables.β΅(<@709044657232936960_duuude=5b=49=52=43=5d>) |
11:43:14 | PMunch | The arguments are pretty much the same as for any kind of early adoption |
11:44:33 | * | flynn quit (Read error: Connection reset by peer) |
11:45:14 | FromDiscord | <Zoom> [Yardanico](https://matrix.to/#/%40_discord_177365113899057152%3At2bot.io) give the issue I've linked above a thumbs-up when you read it ;) |
11:45:47 | * | flynn joined #nim |
11:51:57 | * | flynn quit (Read error: Connection reset by peer) |
11:53:10 | * | flynn joined #nim |
11:58:29 | * | flynn quit (Read error: Connection reset by peer) |
11:59:41 | * | flynn joined #nim |
12:05:10 | * | flynn quit (Read error: Connection reset by peer) |
12:06:23 | * | flynn joined #nim |
12:10:55 | * | flynn quit (Read error: Connection reset by peer) |
12:12:07 | * | flynn joined #nim |
12:16:27 | * | flynn quit (Remote host closed the connection) |
12:16:31 | * | rwb is now known as rb |
12:17:40 | * | flynn joined #nim |
12:22:32 | * | flynn quit (Read error: Connection reset by peer) |
12:23:45 | * | flynn joined #nim |
12:29:51 | * | flynn quit (Read error: Connection reset by peer) |
12:31:05 | * | flynn joined #nim |
12:35:19 | * | flynn quit (Read error: Connection reset by peer) |
12:36:33 | * | flynn joined #nim |
12:41:10 | * | lumo_e joined #nim |
12:41:47 | * | flynn quit (Read error: Connection reset by peer) |
12:43:00 | * | flynn joined #nim |
12:44:48 | NimEventer | New thread by Pietroppeter: AIβs opinions on Nim, see https://forum.nim-lang.org/t/9129 |
12:47:23 | * | flynn quit (Read error: Connection reset by peer) |
12:48:36 | * | flynn joined #nim |
12:52:03 | * | flynn quit (Read error: Connection reset by peer) |
12:53:15 | * | flynn joined #nim |
12:53:51 | * | firq joined #nim |
12:55:25 | FromDiscord | <hmmm> the best advertising for nim is just trying it and it feels like summer breezy air and it just werks, too bad most people don't even try π€ |
12:57:20 | * | flynn quit (Read error: Connection reset by peer) |
12:58:33 | * | flynn joined #nim |
13:02:54 | * | rockcavera joined #nim |
13:02:55 | * | rockcavera quit (Changing host) |
13:02:55 | * | rockcavera joined #nim |
13:03:15 | * | flynn quit (Read error: Connection reset by peer) |
13:04:30 | * | flynn joined #nim |
13:09:10 | * | flynn quit (Remote host closed the connection) |
13:10:23 | * | flynn joined #nim |
13:11:09 | FromDiscord | <aph> how does one wrap a javascript library |
13:13:11 | FromDiscord | <golova> In reply to @aph "how does one wrap": It's describes in Nim in Action book |
13:13:18 | FromDiscord | <golova> (edit) "describes" => "described" |
13:13:38 | FromDiscord | <aph> π |
13:13:40 | FromDiscord | <aph> thanks! |
13:14:05 | FromDiscord | <golova> In reply to @aph "π": afaik chapter about js ffi is free on author website |
13:14:38 | FromDiscord | <aph> yeah i see that |
13:14:44 | FromDiscord | <aph> chapter 8 i think |
13:14:49 | FromDiscord | <aph> thanks for the resources |
13:15:19 | * | flynn quit (Read error: Connection reset by peer) |
13:16:33 | * | flynn joined #nim |
13:16:49 | FromDiscord | <jken> Does choosenim work on apple sillicon? |
13:21:43 | * | flynn quit (Read error: Connection reset by peer) |
13:22:55 | * | flynn joined #nim |
13:25:27 | * | vicecea quit (Remote host closed the connection) |
13:25:57 | * | vicecea joined #nim |
13:28:16 | * | flynn quit (Read error: Connection reset by peer) |
13:29:30 | * | flynn joined #nim |
13:33:03 | * | flynn quit (Read error: Connection reset by peer) |
13:34:15 | * | flynn joined #nim |
13:37:11 | * | slowButPresent joined #nim |
13:39:31 | * | flynn quit (Read error: Connection reset by peer) |
13:40:44 | * | flynn joined #nim |
13:42:22 | FromDiscord | <Zoom> I stand corrected, argparse is fine, and not broken (to my knowledge, at least). It's just me who's dumb. |
13:44:47 | PMunch | @Zoom, does argparse support chaining shortopts? |
13:45:23 | * | flynn quit (Read error: Connection reset by peer) |
13:46:37 | * | flynn joined #nim |
13:49:03 | FromDiscord | <Zoom> Don't know, but I bet it doesn't... Yep\: `Unknown argument(s): -ab` |
13:49:25 | FromDiscord | <Solitude> In reply to @PMunch "@Zoom, does argparse support": cligen does |
13:49:52 | FromDiscord | <Zoom> I know, it's what I use regularly. Just wanted to try something different. |
13:49:55 | PMunch | @Zoom, hmm |
13:51:27 | FromDiscord | <Zoom> https://play.nim-lang.org/#ix=3WnRβ΅(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
13:52:40 | * | flynn quit (Read error: Connection reset by peer) |
13:53:52 | * | flynn joined #nim |
13:55:02 | PMunch | Huh neat, that works on the playground :) |
13:57:07 | FromDiscord | <Zoom> BTW, [Solitude](https://matrix.to/#/%40_discord_104136074569211904%3At2bot.io) (or anybody else), do you happen to know how to limit the number of positional args in cligen? |
13:57:48 | * | duuude quit (Ping timeout: 240 seconds) |
13:57:50 | * | arkurious joined #nim |
13:58:37 | FromDiscord | <Solitude> positional are the ones that arent flags? |
13:59:03 | FromDiscord | <Zoom> Yep, those which go to a seq[string] |
13:59:25 | FromDiscord | <Solitude> yep, cligen doesnt have any special handling for them, its up to you to assert their count |
14:00:33 | FromDiscord | <Zoom> Thx |
14:00:53 | * | flynn quit (Read error: Connection reset by peer) |
14:02:05 | * | flynn joined #nim |
14:08:40 | * | flynn quit (Read error: Connection reset by peer) |
14:09:53 | * | flynn joined #nim |
14:10:55 | FromDiscord | <dom96> In reply to @golova "afaik chapter about js": yep, can be downloaded here https://book.picheta.me/ |
14:11:12 | * | duuude joined #nim |
14:11:16 | FromDiscord | <dom96> In reply to @jken "Does choosenim work on": it should work through Rosetta |
14:11:25 | FromDiscord | <dom96> there were some patches made to make it work |
14:15:28 | * | flynn quit (Read error: Connection reset by peer) |
14:16:42 | * | flynn joined #nim |
14:19:09 | FromDiscord | <vindaar> [Zoom](https://matrix.to/#/@Zoom:matrix.org)\: You could use an `array` of a fixed size I guess (not sure if arrays are supported directly) or just a custom type for which you define how it's parsed. c-blake is pretty open to ideas if you have any, too |
14:21:42 | * | flynn quit (Read error: Connection reset by peer) |
14:22:55 | * | flynn joined #nim |
14:26:43 | FromDiscord | <Knedlik> Hey guys, is it possible to get atleast somwhat accurate source from a dll? I want to mod a game of which I don't have source code, but I assume it's not possible with any compiled lang? |
14:26:58 | FromDiscord | <Knedlik> (edit) "somwhat" => "somewhat" |
14:27:26 | FromDiscord | <dom96> depends on the language, but it is possible |
14:27:47 | * | flynn quit (Read error: Connection reset by peer) |
14:28:26 | FromDiscord | <Knedlik> We are in Nim Discord, I thought it's obvious the game is in Nim |
14:29:00 | * | flynn joined #nim |
14:29:00 | * | lumo_e quit (Read error: Connection reset by peer) |
14:30:26 | FromDiscord | <Knedlik> Or specifically, the backend dll is in nim |
14:32:19 | * | flynn quit (Remote host closed the connection) |
14:33:32 | * | flynn joined #nim |
14:38:08 | * | flynn quit (Read error: Connection reset by peer) |
14:39:21 | * | flynn joined #nim |
14:39:28 | * | vicfred quit (Quit: Leaving) |
14:40:36 | * | duuude quit (Ping timeout: 240 seconds) |
14:44:00 | * | flynn quit (Read error: Connection reset by peer) |
14:44:05 | PMunch | @Knedlik, then it'll be hard |
14:45:02 | PMunch | You can use a disassembler to get you C code (but without any variable names), but the C code Nim outputs is pretty obfuscated and I'd guess more so after it has been passed through optimisation and then converted back from a binary format |
14:45:12 | * | flynn joined #nim |
14:46:15 | * | lumo_e joined #nim |
14:50:08 | * | flynn quit (Read error: Connection reset by peer) |
14:50:55 | * | lumo_e quit (Remote host closed the connection) |
14:51:02 | * | duuude joined #nim |
14:51:20 | * | flynn joined #nim |
14:52:02 | * | lumo_e joined #nim |
14:56:08 | * | PMunch quit (Quit: Leaving) |
14:57:33 | * | flynn quit (Read error: Connection reset by peer) |
14:58:46 | * | flynn joined #nim |
15:04:01 | * | flynn quit (Read error: Connection reset by peer) |
15:05:15 | * | flynn joined #nim |
15:09:29 | * | flynn quit (Read error: Connection reset by peer) |
15:10:42 | * | flynn joined #nim |
15:10:43 | FromDiscord | <alehander42> hey |
15:11:14 | FromDiscord | <huantian> hey |
15:11:43 | FromDiscord | <dom96> hi |
15:13:10 | FromDiscord | <alehander42> i introduce my colleague @emil.ivanichkov |
15:13:22 | FromDiscord | <alehander42> he is kinda new to nim, but a cool guy |
15:14:11 | FromDiscord | <alehander42> in the meantime i realize that i am very bad at importc |
15:14:15 | * | joast quit (Quit: Leaving.) |
15:14:38 | FromDiscord | <alehander42> so can someone help if importc should be able to work with patterns |
15:14:48 | FromDiscord | <alehander42> i thought importcpp is the pattern pragma |
15:15:25 | * | flynn quit (Read error: Connection reset by peer) |
15:15:54 | FromDiscord | <alehander42> but it seems it forces compilation to c++, so i somehow misundestand it |
15:16:38 | * | flynn joined #nim |
15:21:23 | * | flynn quit (Read error: Connection reset by peer) |
15:22:36 | * | flynn joined #nim |
15:22:48 | FromDiscord | <Rika> Import c doesnβt work with patterns I believe? |
15:26:31 | * | flynn quit (Read error: Connection reset by peer) |
15:26:37 | FromDiscord | <alehander42> i see: probably that's the wrong approach |
15:26:40 | FromDiscord | <alehander42> but what does work |
15:26:46 | FromDiscord | <alehander42> for c compilation? |
15:27:01 | FromDiscord | <alehander42> is `importcpp` ok for `c`? |
15:27:35 | FromDiscord | <alehander42> i use it in the javascript backend |
15:27:44 | * | flynn joined #nim |
15:28:35 | Amun-Ra | alehander42: iirc no |
15:32:34 | FromDiscord | <alehander42> so what do people do: use emit? |
15:33:17 | * | flynn quit (Read error: Connection reset by peer) |
15:34:31 | * | flynn joined #nim |
15:37:00 | * | jjido joined #nim |
15:40:26 | * | flynn quit (Read error: Connection reset by peer) |
15:41:39 | * | flynn joined #nim |
15:42:19 | FromDiscord | <huantian> Do you want the CodegenDecl pragma? |
15:42:30 | FromDiscord | <huantian> (edit) "CodegenDecl" => "codegenDecl" |
15:42:49 | FromDiscord | <huantian> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma |
15:43:49 | FromDiscord | <huantian> Wait no thatβs for creating code |
15:45:05 | FromDiscord | <Yardanico> In reply to @huantian "Wait no thatβs for": it can be used for importing as well |
15:45:20 | FromDiscord | <huantian> Ah cool |
15:46:15 | * | flynn quit (Read error: Connection reset by peer) |
15:47:28 | * | flynn joined #nim |
15:50:24 | * | lumo_e quit (Read error: Connection reset by peer) |
15:50:39 | Amun-Ra | alehander42: what people do use for what? |
15:51:29 | * | flynn quit (Remote host closed the connection) |
15:51:34 | * | lumo_e joined #nim |
15:52:30 | FromDiscord | <alehander42> so what i want is |
15:52:42 | * | flynn joined #nim |
15:53:02 | FromDiscord | <alehander42> sorry, it might be a bad idea: |
15:53:22 | FromDiscord | <alehander42> generate `value.field_function(arg)` |
15:53:30 | FromDiscord | <alehander42> from a nim `field_function(value, arg)` call |
15:53:53 | FromDiscord | <alehander42> it seems one needs importcpp for that, however it seems like this enforces `nim cpp` even if one uses c |
15:54:17 | FromDiscord | <Rika> Isnβt the only time that works is when you have a field thatβs a function pointer? |
15:54:21 | FromDiscord | <alehander42> yes |
15:54:27 | FromDiscord | <alehander42> it is a function pointer |
15:54:35 | * | joast joined #nim |
15:54:41 | FromDiscord | <Rika> Just make a function with the same name as the field that then calls the field? |
15:54:50 | FromDiscord | <Rika> Or a template |
15:54:52 | FromDiscord | <alehander42> now it sounds obvious |
15:54:57 | FromDiscord | <Rika> Lol |
15:55:02 | FromDiscord | <alehander42> the first one |
15:55:16 | FromDiscord | <alehander42> ok, this should work when they are statically built |
15:57:37 | * | flynn quit (Read error: Connection reset by peer) |
15:58:49 | * | flynn joined #nim |
16:01:01 | NimEventer | New post on r/nim by momoPFL01: Problem with inheritance + proc types + generic types, see https://reddit.com/r/nim/comments/ud6yet/problem_with_inheritance_proc_types_generic_types/ |
16:03:30 | * | lumo_e quit (Ping timeout: 276 seconds) |
16:03:53 | * | flynn quit (Read error: Connection reset by peer) |
16:05:06 | * | flynn joined #nim |
16:05:18 | * | lumo_e joined #nim |
16:08:44 | * | flynn quit (Read error: Connection reset by peer) |
16:09:57 | * | flynn joined #nim |
16:10:06 | NimEventer | New Nimble package! ssostrings - Small String Optimized (SSO) string implementation, see https://github.com/planetis-m/ssostrings |
16:10:06 | NimEventer | New Nimble package! cowstrings - Copy-On-Write string implementation, see https://github.com/planetis-m/cowstrings |
16:15:25 | * | flynn quit (Read error: Connection reset by peer) |
16:16:38 | * | flynn joined #nim |
16:22:28 | * | flynn quit (Read error: Connection reset by peer) |
16:23:41 | * | flynn joined #nim |
16:27:36 | * | flynn quit (Read error: Connection reset by peer) |
16:28:49 | * | flynn joined #nim |
16:32:46 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzβ¦) |
16:33:18 | * | flynn quit (Remote host closed the connection) |
16:34:30 | * | flynn joined #nim |
16:38:55 | * | flynn quit (Read error: Connection reset by peer) |
16:39:44 | * | Arrrrrrr quit (Quit: Arrrrrrr) |
16:40:08 | * | flynn joined #nim |
16:42:48 | FromDiscord | <Yardanico> nim https://media.discordapp.net/attachments/371759389889003532/968915123785838672/unknown.png |
16:44:33 | * | vicfred joined #nim |
16:45:16 | * | flynn quit (Read error: Connection reset by peer) |
16:46:29 | * | flynn joined #nim |
16:48:15 | FromDiscord | <Yardanico> https://github.com/Yardanico/nimpylib/issues/22#issuecomment-1111227149 if anyone's curious |
16:49:10 | FromDiscord | <dom96> epic, you should add to the library |
16:50:23 | FromDiscord | <Yardanico> well it already kind of supported that, but I added "type hints" |
16:50:32 | * | duuude quit (Ping timeout: 248 seconds) |
16:50:35 | FromDiscord | <Yardanico> but sadly "b: int = 5" isn't valid Nim syntax when used together in this way |
16:50:37 | FromDiscord | <Yardanico> so I had to replace it with ~ |
16:51:29 | * | flynn quit (Read error: Connection reset by peer) |
16:52:42 | * | flynn joined #nim |
16:54:56 | FromDiscord | <dom96> ahh, that's a shame, but still nice |
16:56:03 | * | flynn quit (Read error: Connection reset by peer) |
16:57:16 | * | flynn joined #nim |
17:02:56 | * | flynn quit (Read error: Connection reset by peer) |
17:04:08 | * | flynn joined #nim |
17:09:04 | * | flynn quit (Read error: Connection reset by peer) |
17:10:17 | * | flynn joined #nim |
17:13:24 | FromDiscord | <enthus1ast> in marshal.nim |
17:13:30 | FromDiscord | <enthus1ast> there is this\:β΅let z = y.to[\:Foo] |
17:13:36 | FromDiscord | <enthus1ast> what is \:Foo ? |
17:13:47 | * | tiorock joined #nim |
17:13:47 | * | tiorock quit (Changing host) |
17:13:47 | * | tiorock joined #nim |
17:13:47 | * | rockcavera is now known as Guest7080 |
17:13:47 | * | Guest7080 quit (Killed (copper.libera.chat (Nickname regained by services))) |
17:13:47 | * | tiorock is now known as rockcavera |
17:13:57 | FromDiscord | <enthus1ast> never saw this syntax before |
17:15:21 | * | flynn quit (Read error: Connection reset by peer) |
17:16:18 | FromDiscord | <dom96> It's the same as `to[Foo](y)` |
17:16:34 | * | flynn joined #nim |
17:16:43 | FromDiscord | <dom96> it's just a way to disambiguate the generic specialisation for the UFCS syntax |
17:16:47 | FromDiscord | <enthus1ast> i mean the \:Foo |
17:16:48 | FromDiscord | <enthus1ast> \: |
17:17:32 | FromDiscord | <enthus1ast> oh ok? Do you know where this is documented?β΅(@dom96) |
17:17:35 | FromDiscord | <dom96> https://forum.nim-lang.org/t/2407 |
17:17:47 | FromDiscord | <dom96> there is likely docs for this somewhere in the manual under generics or UFCS |
17:18:25 | FromDiscord | <enthus1ast> thank you @dom96 will have a look |
17:21:52 | * | flynn quit (Read error: Connection reset by peer) |
17:23:05 | * | flynn joined #nim |
17:27:19 | FromDiscord | <Rika> there isnt on the manual afaik |
17:27:28 | * | flynn quit (Read error: Connection reset by peer) |
17:28:41 | * | flynn joined #nim |
17:30:09 | FromDiscord | <Yardanico> In reply to @Rika "there isnt on the": it is |
17:30:21 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#procedures-method-call-syntax |
17:30:31 | FromDiscord | <Yardanico> "The [: ] notation has been designed to mitigate this issue: x.p[:T] is rewritten by the parser to p[T](x), x.p[:T](y) is rewritten to p[T](x, y). Note that [: ] has no AST representation, the rewrite is performed directly in the parsing step." |
17:34:06 | * | flynn quit (Read error: Connection reset by peer) |
17:35:19 | * | flynn joined #nim |
17:35:44 | * | jjido joined #nim |
17:40:37 | * | flynn quit (Read error: Connection reset by peer) |
17:41:50 | * | flynn joined #nim |
17:42:22 | * | tiorock joined #nim |
17:42:22 | * | tiorock quit (Changing host) |
17:42:23 | * | tiorock joined #nim |
17:42:23 | * | rockcavera quit (Killed (sodium.libera.chat (Nickname regained by services))) |
17:42:23 | * | tiorock is now known as rockcavera |
17:46:12 | * | flynn quit (Remote host closed the connection) |
17:47:25 | * | flynn joined #nim |
17:47:59 | FromDiscord | <morgan> interesting |
17:48:37 | * | lumo_e quit (Read error: Connection reset by peer) |
17:51:44 | * | lumo_e joined #nim |
17:53:34 | * | flynn quit (Read error: Connection reset by peer) |
17:54:47 | * | flynn joined #nim |
17:59:38 | * | flynn quit (Read error: Connection reset by peer) |
18:00:51 | * | flynn joined #nim |
18:04:41 | * | duuude joined #nim |
18:06:05 | * | flynn quit (Read error: Connection reset by peer) |
18:07:19 | * | flynn joined #nim |
18:12:20 | * | flynn quit (Read error: Connection reset by peer) |
18:13:34 | * | flynn joined #nim |
18:18:35 | * | flynn quit (Read error: Connection reset by peer) |
18:19:48 | * | flynn joined #nim |
18:20:46 | * | Zectbumo joined #nim |
18:25:21 | * | flynn quit (Read error: Connection reset by peer) |
18:25:32 | * | pro joined #nim |
18:26:34 | * | flynn joined #nim |
18:31:31 | * | flynn quit (Read error: Connection reset by peer) |
18:32:44 | * | flynn joined #nim |
18:36:03 | * | flynn quit (Read error: Connection reset by peer) |
18:37:16 | * | flynn joined #nim |
18:43:59 | * | flynn quit (Read error: Connection reset by peer) |
18:45:13 | * | flynn joined #nim |
18:48:55 | * | tiorock joined #nim |
18:48:55 | * | tiorock quit (Changing host) |
18:48:55 | * | tiorock joined #nim |
18:48:55 | * | rockcavera is now known as Guest8059 |
18:48:55 | * | Guest8059 quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
18:48:55 | * | tiorock is now known as rockcavera |
18:50:57 | * | lumo_e quit (Ping timeout: 272 seconds) |
18:51:21 | * | flynn quit (Read error: Connection reset by peer) |
18:51:27 | * | lumo_e joined #nim |
18:52:34 | * | flynn joined #nim |
18:58:33 | * | flynn quit (Read error: Connection reset by peer) |
18:59:45 | * | flynn joined #nim |
19:04:10 | * | flynn quit (Read error: Connection reset by peer) |
19:05:23 | * | flynn joined #nim |
19:10:26 | * | flynn quit (Read error: Connection reset by peer) |
19:11:40 | * | flynn joined #nim |
19:16:24 | FromDiscord | <Pralkarz> How can I generate a random int between 1 and 9_999_999_999 without Nim complaining about type mismatch? |
19:17:15 | * | flynn quit (Read error: Connection reset by peer) |
19:17:20 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Wpt |
19:17:30 | FromDiscord | <Yardanico> of course also call `randomize` so the random values are different each time you launch the program |
19:17:46 | FromDiscord | <Pralkarz> Tried that unfortunately. :/ |
19:17:51 | FromDiscord | <Pralkarz> `type mismatch: got 'int64' for 'rand(1'i64 .. 9999999999'i64)' but expected 'int'` |
19:18:23 | FromDiscord | <Pralkarz> Oh. π€¦ββοΈ |
19:18:27 | FromDiscord | <Pralkarz> I typed my variable incorrectly. |
19:18:28 | * | flynn joined #nim |
19:18:31 | FromDiscord | <Pralkarz> Sorry and thank you! |
19:20:17 | FromDiscord | <Yardanico> In reply to @Pralkarz "I typed my variable": when learning nim it might be useful to type out your variables, but generally you don't need to do that |
19:20:29 | FromDiscord | <Yardanico> just `let val = rand(1'i64..9_999_999_999)` is enough |
19:21:24 | FromDiscord | <Pralkarz> In reply to @Yardanico "when learning nim it": I don't really plan to learn it per-se, using it for a university project since there's extra credit for "creativity", and not many people use Nim. |
19:21:41 | FromDiscord | <Pralkarz> I'm using other languages at work, so thought that it won't hurt to challenge myself a bit. |
19:21:46 | FromDiscord | <Yardanico> i wish my university would give credits for creativity :) |
19:21:50 | FromDiscord | <Pralkarz> (edit) "I'm using other languages at work, so ... thought" added "I" |
19:22:03 | * | flynn quit (Read error: Connection reset by peer) |
19:22:05 | FromDiscord | <Yardanico> In reply to @Pralkarz "I don't really plan": well, then you generally don't need to type out your variables if you initialize them immediately |
19:23:16 | * | flynn joined #nim |
19:24:06 | FromDiscord | <Pralkarz> This particular one is modified dynamically, hence the typing. |
19:24:13 | FromDiscord | <Pralkarz> I will keep that in mind though, thanks! |
19:24:31 | FromDiscord | <Yardanico> In reply to @Pralkarz "This particular one is": you still don't have to, if you initialize it with another value :P |
19:24:43 | FromDiscord | <Yardanico> `var val = call()` works the same |
19:29:07 | * | flynn quit (Read error: Connection reset by peer) |
19:30:20 | * | flynn joined #nim |
19:34:17 | FromDiscord | <Phil> In reply to @AsbjΓΈrn F "oh ok": Finally off work. Webdev channel is a pretty decent t resource. If you have not specific webdev questions regarding building rest APIs in prologue I can offer some support as I am currently building a medium sized project using a prologue rest API myself |
19:34:46 | * | flynn quit (Read error: Connection reset by peer) |
19:35:59 | * | flynn joined #nim |
19:40:34 | * | flynn quit (Read error: Connection reset by peer) |
19:41:47 | * | flynn joined #nim |
19:45:43 | * | flynn quit (Read error: Connection reset by peer) |
19:46:56 | * | flynn joined #nim |
19:51:29 | * | flynn quit (Read error: Connection reset by peer) |
19:52:42 | * | flynn joined #nim |
19:54:41 | * | Gustavo6046 joined #nim |
19:55:04 | * | lumo_e quit (Ping timeout: 248 seconds) |
19:55:49 | * | Gustavo6046 quit (Max SendQ exceeded) |
19:56:30 | * | Gustavo6046 joined #nim |
19:57:25 | * | flynn quit (Read error: Connection reset by peer) |
19:58:38 | * | flynn joined #nim |
20:03:29 | * | flynn quit (Remote host closed the connection) |
20:04:42 | * | flynn joined #nim |
20:05:25 | * | flynn quit (Read error: Connection reset by peer) |
20:06:37 | * | flynn joined #nim |
20:08:08 | FromDiscord | <Elegantbeef> Doubt you're on, but pmunch how doesnt it? |
20:11:56 | * | flynn quit (Read error: Connection reset by peer) |
20:13:09 | * | flynn joined #nim |
20:13:15 | * | jmdaemon joined #nim |
20:17:49 | * | flynn quit (Read error: Connection reset by peer) |
20:19:02 | * | flynn joined #nim |
20:23:29 | * | flynn quit (Read error: Connection reset by peer) |
20:24:42 | * | flynn joined #nim |
20:29:09 | * | flynn quit (Read error: Connection reset by peer) |
20:30:22 | * | flynn joined #nim |
20:35:18 | * | flynn quit (Read error: Connection reset by peer) |
20:36:31 | * | flynn joined #nim |
20:40:22 | * | flynn quit (Read error: Connection reset by peer) |
20:41:35 | * | flynn joined #nim |
20:44:47 | * | duuude quit (Ping timeout: 240 seconds) |
20:46:33 | * | flynn quit (Read error: Connection reset by peer) |
20:47:50 | * | flynn joined #nim |
20:50:37 | * | pro quit (Quit: pro) |
20:53:11 | * | flynn quit (Remote host closed the connection) |
20:54:24 | * | flynn joined #nim |
20:54:45 | FromDiscord | <kunitoki> how to extract more info for an AssertDefect raised in the compiler in types.nim ? |
20:55:03 | FromDiscord | <Yardanico> In reply to @kunitoki "how to extract more": if you installed nim manually, run `nim_dbg` |
20:55:11 | FromDiscord | <kunitoki> sent a code paste, see https://paste.rs/2iX |
20:55:14 | FromDiscord | <Yardanico> also, this is "just" a compiler bug, it's not a bug in your program |
20:55:25 | FromDiscord | <Yardanico> In reply to @Yardanico "if you installed nim": otherwise compile nim compiler in debug mode and use that |
20:55:30 | FromDiscord | <Yardanico> or share the code there so others can also do that :) |
20:55:54 | FromDiscord | <kunitoki> ouch is a bit complicated to share, i didn't push all my latest changes |
20:56:18 | FromDiscord | <Yardanico> well, if you installed nim via build_all.sh or the tarballs, you should have nim_dbg available |
20:56:30 | FromDiscord | <kunitoki> i installed with choosenim |
20:56:42 | FromDiscord | <kunitoki> not sure i want to go down that path right now |
20:56:45 | FromDiscord | <Yardanico> don't think choosenim compiles nim_dbg, but you can just check |
20:57:03 | FromDiscord | <kunitoki> no i don't have |
20:57:16 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3WpY |
20:58:27 | FromDiscord | <kunitoki> ok thanks, will try |
20:58:43 | FromDiscord | <kunitoki> i've tried isolate the issue, but if i isolate, it works |
20:59:21 | * | flynn quit (Read error: Connection reset by peer) |
20:59:30 | FromDiscord | <kunitoki> it must be the tons of bindings i have dragged in the project that are killing the compiler |
21:00:33 | * | flynn joined #nim |
21:00:46 | * | termer quit (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
21:02:04 | * | termer joined #nim |
21:02:25 | FromDiscord | <kunitoki> it's strange that assertion defect doesn't print a stacktrace in the compiler at least |
21:03:09 | FromDiscord | <konsumlamm> In reply to @Yardanico "also, this is "just"": i honestly find it terrifying how many people think that internal compiler errors are normal error messages / exceptions |
21:04:07 | FromDiscord | <konsumlamm> if you think about how many bugs stay unreported because people simply look for a workaround because they think they made a mistake |
21:04:31 | FromDiscord | <kunitoki> yeah honestly it's a bit problematic |
21:04:51 | FromDiscord | <konsumlamm> i wonder why that is though, maybe because people aren't used to compilers having many bugs? |
21:05:14 | FromDiscord | <kunitoki> now i need to go down into the compiler, which i didn't want at this time, maybe later yes |
21:05:38 | FromDiscord | <Yardanico> you don't have to, maybe it was already reported, maybe it can be easily worked around |
21:05:43 | FromDiscord | <Yardanico> you're not expected to fix it |
21:05:48 | FromDiscord | <kunitoki> well no compiler is perfect, i hit hundreds of ICE in clang and gcc and msvc in the past |
21:05:57 | FromDiscord | <konsumlamm> either way, ig the error messages should point out that it's an internal error that should be reported |
21:06:04 | * | flynn quit (Read error: Connection reset by peer) |
21:06:21 | FromDiscord | <kunitoki> yep error reporting should be a bit clearer |
21:07:11 | FromDiscord | <konsumlamm> hey look, i already made an issue about it: https://github.com/nim-lang/Nim/issues/19610 |
21:07:16 | FromDiscord | <Yardanico> In reply to @konsumlamm "either way, ig the": they do in most cases |
21:07:17 | * | flynn joined #nim |
21:07:35 | FromDiscord | <Yardanico> it's just that some compiler code hasn't been updated to properly error (even for an internal error) instead of asserts |
21:08:04 | FromDiscord | <konsumlamm> In reply to @Yardanico "they do in most": i've never seen one that does as far as i remember |
21:08:42 | FromDiscord | <Yardanico> hmm, I guess most ICEs just get fixed instead of just fixing the error |
21:09:21 | NimEventer | New thread by Foderking: Compiler giving wrong error message?., see https://forum.nim-lang.org/t/9130 |
21:09:33 | FromDiscord | <Yardanico> @konsumlamm see the usage of internalError |
21:09:37 | FromDiscord | <Yardanico> in the compiler |
21:09:51 | FromDiscord | <Yardanico> ideally someone should make a PR replacing all compiler asserts into internalError :) |
21:10:10 | FromDiscord | <konsumlamm> In reply to @Yardanico "<@312654963694108674> see the usage": do you have a link to its definition? |
21:10:42 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/968982545498783864/unknown.png |
21:10:51 | FromDiscord | <Yardanico> lines 607 and 612 in compiler/msgs.niom |
21:10:52 | FromDiscord | <Yardanico> (edit) "compiler/msgs.niom" => "compiler/msgs.nim" |
21:11:02 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Wq1 |
21:11:36 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Wq2 |
21:11:50 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/968982830828883998/unknown.png |
21:12:12 | FromDiscord | <kunitoki> In reply to @Yardanico "hmm, I guess most": you workaround when is possible, and update compiler when it isn't |
21:12:57 | FromDiscord | <kunitoki> now what i do with this ? https://media.discordapp.net/attachments/371759389889003532/968983112778416128/message.txt |
21:13:26 | * | flynn quit (Read error: Connection reset by peer) |
21:13:31 | FromDiscord | <kunitoki> it seems the issue is because of `resolveStarsInCppType` |
21:13:51 | FromDiscord | <konsumlamm> yeah, i see that |
21:14:09 | FromDiscord | <kunitoki> because i have a bunch of heavily templated c++ types all over the place |
21:14:27 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/968983486113415258/unknown.png |
21:14:30 | FromDiscord | <konsumlamm> now the interesting part is what `errInternal` is (i'm on mobile currently) |
21:14:39 | * | flynn joined #nim |
21:14:46 | FromDiscord | <Yardanico> In reply to @konsumlamm "now the interesting part": enum value of course |
21:14:57 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/968983616124235776/unknown.png |
21:15:01 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/968983633350238218/unknown.png |
21:15:43 | FromDiscord | <konsumlamm> of course |
21:16:41 | FromDiscord | <konsumlamm> see, that's the proglem though, it doesn't say anything about that this is a compiler bug or opening an issue |
21:16:53 | FromDiscord | <Yardanico> yes yes i know |
21:16:55 | FromDiscord | <konsumlamm> it may be obvious to us, but apparently not to everyone |
21:19:41 | * | flynn quit (Remote host closed the connection) |
21:20:54 | * | flynn joined #nim |
21:24:31 | FromDiscord | <kunitoki> in any case, if you don't want to go and fix it (which could require months, maybe a year of study for a non nim compiler dev) you are still to try to workaround |
21:24:39 | FromDiscord | <kunitoki> (edit) "workaround" => "work it around" |
21:26:18 | * | flynn quit (Read error: Connection reset by peer) |
21:26:26 | FromDiscord | <konsumlamm> my point was that most people don't even consider the possibility that they encountered a compuler bug, they think they just used the language/library wrong |
21:27:05 | FromDiscord | <konsumlamm> so they don't report the bug |
21:27:31 | * | flynn joined #nim |
21:28:28 | FromDiscord | <kunitoki> i agree, especially if those bugs are difficult to repro or need a lot of code and stuff around, in which case you will be told to reduce to the minimum, and then the bug is gone, like in my case |
21:29:03 | FromDiscord | <Elegantbeef> Choosenim needs to ship a debug compiler to make min repros easier |
21:29:36 | FromDiscord | <kunitoki> i was able to isolate the line that produced the issue, but now it's a ascending path |
21:30:21 | FromDiscord | <Elegantbeef> Yea if you arent using a debug compiler use one it makes life a bit easier |
21:32:12 | * | flynn quit (Read error: Connection reset by peer) |
21:33:25 | * | flynn joined #nim |
21:38:09 | * | flynn quit (Read error: Connection reset by peer) |
21:39:22 | * | flynn joined #nim |
21:39:39 | FromDiscord | <kunitoki> it seems like a strange issue, if i replace the function that is the culprit with its body inline, then it works |
21:40:11 | FromDiscord | <kunitoki> sent a code paste, see https://play.nim-lang.org/#ix=3Wq9 |
21:40:38 | FromDiscord | <kunitoki> this is the line that chokes, bindClosure will just call a c++ special bind function that is taking the closure rawProc and rawEnv |
21:42:14 | FromDiscord | <Elegantbeef> What's the bindclosure proc do? |
21:43:10 | FromDiscord | <kunitoki> then it works |
21:43:11 | FromDiscord | <kunitoki> sent a code paste, see https://play.nim-lang.org/#ix=3Wqb |
21:43:30 | FromDiscord | <kunitoki> bindInternal just forwards to a c++ |
21:44:06 | FromDiscord | <kunitoki> sent a code paste, see https://play.nim-lang.org/#ix=3Wqc |
21:44:15 | FromDiscord | <Elegantbeef> Ok but what's the bind closure proc verbatim? |
21:44:41 | FromDiscord | <kunitoki> sent a code paste, see https://play.nim-lang.org/#ix=3Wqd |
21:45:04 | * | flynn quit (Read error: Connection reset by peer) |
21:45:58 | FromDiscord | <kunitoki> should i add an explicit `{.closure.}` pragma to the bindClosure arg ? the compiler is not hinting it, i think it does it automatically |
21:46:18 | * | flynn joined #nim |
21:46:20 | FromDiscord | <Elegantbeef> It should have it annotated |
21:46:37 | FromDiscord | <Elegantbeef> As an argument to a procedure if it's not annotated i think it can accept nimcall |
21:46:53 | FromDiscord | <kunitoki> will try adding it |
21:47:49 | FromDiscord | <Elegantbeef> Yea in the case there is no captured environment it wont make it a closure and will pass it as a nimcall afaik |
21:48:53 | FromDiscord | <kunitoki> yeah, but closure or non closure pragma, i still get the assert defect |
21:49:04 | FromDiscord | <Elegantbeef> Ok |
21:51:08 | * | flynn quit (Read error: Connection reset by peer) |
21:52:21 | * | flynn joined #nim |
21:53:36 | FromDiscord | <Elegantbeef> Cant say much without the entire code |
21:54:14 | FromDiscord | <Elegantbeef> Somewhere it calls `elemType` i believe and due to FFI it's empty is my present reasoning |
21:56:44 | * | flynn quit (Read error: Connection reset by peer) |
21:57:57 | * | flynn joined #nim |
22:04:56 | * | flynn quit (Read error: Connection reset by peer) |
22:05:50 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzβ¦) |
22:06:09 | * | flynn joined #nim |
22:10:05 | FromDiscord | <kunitoki> yeah, is there a way to extract the cppType of an importcpp ? |
22:10:18 | FromDiscord | <Elegantbeef> No clue |
22:11:02 | * | flynn quit (Read error: Connection reset by peer) |
22:11:06 | FromDiscord | <kunitoki> ok, what happens if i modify the compiler , should i run build_all.sh again ? |
22:11:21 | FromDiscord | <Elegantbeef> `./koch temp c ./myFile.nim` |
22:12:15 | * | flynn joined #nim |
22:17:07 | * | flynn quit (Read error: Connection reset by peer) |
22:17:25 | FromDiscord | <kunitoki> sent a code paste, see https://play.nim-lang.org/#ix=3Wqk |
22:17:56 | FromDiscord | <kunitoki> if i remove the star from the `'0` it then works ! |
22:18:19 | * | flynn joined #nim |
22:19:49 | FromDiscord | <kunitoki> basically the `` there is like `std::remove_cvref` in c++ right ? |
22:20:29 | FromDiscord | <kunitoki> damn those files in the nim compiler. pretty dense |
22:22:57 | * | flynn quit (Read error: Connection reset by peer) |
22:24:10 | * | flynn joined #nim |
22:29:04 | * | flynn quit (Read error: Connection reset by peer) |
22:30:17 | * | flynn joined #nim |
22:34:25 | * | flynn quit (Read error: Connection reset by peer) |
22:35:35 | FromDiscord | <kunitoki> Things start to move in the right direction https://media.discordapp.net/attachments/371759389889003532/969003907563028530/unknown.png |
22:35:38 | * | flynn joined #nim |
22:36:46 | FromDiscord | <kunitoki> thanks all for the help so far ! and good night |
22:37:53 | FromDiscord | <Elegantbeef> Buh bye |
22:38:40 | FromDiscord | <kunitoki> Bruh π€£ |
22:38:57 | FromDiscord | <Elegantbeef> What? |
22:39:21 | FromDiscord | <kunitoki> Nothing, i read that as bruh bye |
22:39:30 | FromDiscord | <Elegantbeef> Ah |
22:39:59 | FromDiscord | <kunitoki> It reminded me of a post in the forum |
22:40:27 | * | flynn quit (Read error: Connection reset by peer) |
22:40:36 | FromDiscord | <dom96> Not only are we saying bro we're now imagining it |
22:40:52 | FromDiscord | <dom96> Time to rename this discord to 'Bro' I guess |
22:41:04 | FromDiscord | <dom96> π |
22:41:08 | FromDiscord | <Elegantbeef> Time to rename the language to "Bro" |
22:41:11 | FromDiscord | <kunitoki> It was fun when i read the post |
22:41:25 | FromDiscord | <exelotl> Bro is my favourite brogramming language |
22:41:40 | * | flynn joined #nim |
22:41:50 | FromDiscord | <Elegantbeef> instead of `sink` parameters have `suh` parameters |
22:42:05 | FromDiscord | <kunitoki> Yeah Bro seems like better than all the new languages starting with v |
22:42:22 | FromDiscord | <Elegantbeef> Odd they end with v aswell |
22:42:49 | FromDiscord | <exelotl> `sus` parameters π |
22:43:07 | FromDiscord | <Elegantbeef> No sus is what we name `nil` |
22:43:16 | FromDiscord | <kunitoki> No sus is the new ptr |
22:43:22 | FromDiscord | <Elegantbeef> `if a.isSus` |
22:43:40 | FromDiscord | <kunitoki> I love it |
22:43:54 | FromDiscord | <kunitoki> So clear and concise |
22:46:23 | * | termer quit (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
22:47:42 | * | flynn quit (Read error: Connection reset by peer) |
22:48:55 | * | flynn joined #nim |
22:50:32 | * | termer joined #nim |
22:53:42 | * | flynn quit (Read error: Connection reset by peer) |
22:54:55 | * | flynn joined #nim |
23:01:55 | * | flynn quit (Read error: Connection reset by peer) |
23:03:08 | * | flynn joined #nim |
23:04:18 | FromDiscord | <!Patitotective> ΰΆ |
23:05:34 | FromDiscord | <exelotl> mmh this gonna be slightly annoying https://github.com/nim-lang/Nim/pull/19722 |
23:06:00 | FromDiscord | <Elegantbeef> Oh noes a warning π |
23:06:36 | FromDiscord | <exelotl> I want my lib to support nim 1.4 since that's what debian/ubuntu users have |
23:06:52 | FromDiscord | <exelotl> 1.4 doesn't have --mm |
23:07:00 | FromDiscord | <exelotl> so I have to use --gc in my examples |
23:07:20 | FromDiscord | <exelotl> --gc will raise warnings |
23:07:30 | FromDiscord | <exelotl> pain |
23:07:31 | FromDiscord | <Elegantbeef> Is this really an issue? |
23:07:57 | FromDiscord | <Elegantbeef> 'If using Nim version pre 1.6 use `--gc` otherwise use --mm\` |
23:09:18 | FromDiscord | <exelotl> it's not an insurmountable issue, it's just a bit of friction in the experience for new users |
23:09:29 | FromDiscord | <exelotl> and bits of friction add up |
23:10:02 | * | flynn quit (Read error: Connection reset by peer) |
23:10:53 | FromDiscord | <Elegantbeef> And i mean it's only going to be in the next major release |
23:10:58 | FromDiscord | <Elegantbeef> So you still have a bunch of time π |
23:11:16 | * | flynn joined #nim |
23:15:24 | FromDiscord | <Elegantbeef> Joke aside just using `--gc` in your examples should suffice given going to take 10000 years before it's an error |
23:16:03 | FromDiscord | <exelotl> the only solution to remove the warning is going to be to ditch 1.4 support, which I don't wanna do cause it seems like those debian/ubuntu systems are gonna be stuck with 1.4 for a long time |
23:16:46 | FromDiscord | <exelotl> but yeah I mean having the warning isn't the end of the world I guess |
23:17:15 | FromDiscord | <Elegantbeef> Seems debian is at 1.6.4 |
23:17:35 | * | flynn quit (Read error: Connection reset by peer) |
23:18:11 | FromDiscord | <Elegantbeef> Atleast bookworm/bullseye backports |
23:18:37 | FromDiscord | <exelotl> ah interesting |
23:18:43 | FromDiscord | <huantian> people that use their system's package manager for programing langs deserve it πΏ |
23:18:48 | * | flynn joined #nim |
23:18:58 | FromDiscord | <Elegantbeef> I concur |
23:19:17 | FromDiscord | <Elegantbeef> Also after using debian sid, if you dont use rolling, what are you doing π |
23:19:31 | FromDiscord | <xflywind> The warning is for Nim 2.0 since it doesnβt have backport in the PR title. |
23:19:45 | FromDiscord | <Elegantbeef> I mentioned that |
23:22:02 | FromDiscord | <exelotl> when Nim 2.0 comes out I'll _aim_ to keep supporting older versions too for a while, unless there's major breaking changes that make it impossible |
23:22:32 | FromDiscord | <Elegantbeef> I mean even if there is `when NimMajorVersion >= 2` exists π |
23:23:42 | FromDiscord | <exelotl> yeah, it's just really ugly to put that in the config files for all the example/template projects xD |
23:25:15 | FromDiscord | <xflywind> Nim 2.0 defaults to ORC, which should be enough to be a breaking change π |
23:25:30 | * | flynn quit (Read error: Connection reset by peer) |
23:26:44 | * | flynn joined #nim |
23:26:46 | FromDiscord | <huantian> but orc is perfect, how could it break anything |
23:27:03 | FromDiscord | <Elegantbeef> Eh exelotl is using `--gc:none` iirc so it's hardly an issue |
23:27:33 | FromDiscord | <Elegantbeef> Move semantics are hard huan, so that's how π |
23:27:33 | FromDiscord | <exelotl> oh I'm on `arc` now! |
23:27:49 | FromDiscord | <Elegantbeef> oh shit gc'd memory |
23:27:49 | FromDiscord | <Elegantbeef> Fuck it's the future |
23:28:03 | FromDiscord | <Elegantbeef> Is GBG using it? |
23:29:12 | FromDiscord | <exelotl> yes, only for a few infrequently allocated/deallocated heap things |
23:29:32 | FromDiscord | <Elegantbeef> Regardless nice to hear |
23:29:54 | FromDiscord | <Elegantbeef> I just got reminded I need to make the RFC to make strutils use `openarray[char]` for 2.0 π |
23:30:53 | * | flynn quit (Read error: Connection reset by peer) |
23:31:22 | FromDiscord | <Elegantbeef> Atleast i think an RFC is probably needed before a massive PR π |
23:32:06 | * | flynn joined #nim |
23:34:09 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3WqA |
23:38:37 | FromDiscord | <exelotl> tbh I might just change it to manual alloc/dealloc, I don't really gain anything from the ref counting here π
|
23:39:21 | * | flynn quit (Read error: Connection reset by peer) |
23:40:35 | * | flynn joined #nim |
23:41:37 | * | flynn quit (Read error: Connection reset by peer) |
23:42:49 | * | flynn joined #nim |
23:43:11 | FromDiscord | <exelotl> in theory I'm protected from a leak or use-after-free, but like, calling `show` or `hide` twice is _already_ wrong so all it would mean is that my code would be more "gracefully" buggy, but still buggy at the end of the day |
23:46:36 | NimEventer | New Nimble package! nimdotenv - Load local environment variables from .env files, see https://wioenena-q.github.io/nim-dotenv |
23:47:00 | * | flynn quit (K-Lined) |
23:54:31 | * | duuude joined #nim |