00:05:09 | FromDiscord | <Patitotective> In reply to @Elegantbeef "For system notifications linux": I was able to create an app image, I guess I'm going to use app images instead |
00:05:22 | FromDiscord | <Patitotective> In reply to @Patitotective "How con I convert": I was able to create an app image, I guess I'm going to use app images instead |
00:25:12 | * | noeontheend joined #nim |
00:26:21 | * | jmdaemon quit (Ping timeout: 268 seconds) |
00:33:26 | * | jmdaemon joined #nim |
01:02:48 | * | krux02 quit (Ping timeout: 250 seconds) |
01:15:06 | * | l1x quit (Quit: Connection closed for inactivity) |
01:17:03 | * | kayabaNerve quit (Remote host closed the connection) |
01:17:23 | * | kayabaNerve joined #nim |
01:18:54 | * | krux02 joined #nim |
01:20:00 | * | xet7 quit (Ping timeout: 268 seconds) |
01:22:09 | * | xet7 joined #nim |
01:30:00 | * | jmdaemon quit (Ping timeout: 256 seconds) |
01:34:35 | * | jmdaemon joined #nim |
01:43:50 | FromDiscord | <Patitotective> I created this template for creating app images from a nim package 🙃 ↵what do you think? https://github.com/Patitotective/nim-appimage-template |
01:56:25 | * | noeontheend quit (Ping timeout: 256 seconds) |
02:00:47 | FromDiscord | <iffy (Matt Haggard)> Thank you! That worked perfectly. |
02:02:08 | FromDiscord | <Elegantbeef> No problem |
02:17:58 | * | neurocyte0917090 quit (Ping timeout: 268 seconds) |
02:28:27 | * | jmdaemon quit (Ping timeout: 268 seconds) |
02:38:03 | * | jmdaemon joined #nim |
02:54:36 | * | cyraxjoe quit (Ping timeout: 250 seconds) |
03:04:18 | * | arkurious quit (Quit: Leaving) |
03:06:13 | * | cyraxjoe joined #nim |
03:15:45 | * | cyraxjoe quit (Ping timeout: 256 seconds) |
03:34:20 | FromDiscord | <gnu+linux user> https://media.discordapp.net/attachments/371759389889003532/937913734502973450/Screenshot_2022-02-01-09-00-06-034_mark.via.gp.jpg |
03:34:53 | FromDiscord | <Rika> ? |
03:35:37 | FromDiscord | <gnu+linux user> 0..max is violet |
03:36:07 | FromDiscord | <Rika> Ah the highlighting is wrong lol one hell of a catch |
03:39:33 | * | jmdaemon quit (Ping timeout: 256 seconds) |
03:47:42 | * | arkanoid quit (Read error: Connection reset by peer) |
03:53:30 | * | arkanoid joined #nim |
03:56:33 | * | rienske quit (Ping timeout: 256 seconds) |
03:57:40 | * | Gustavo6046 joined #nim |
03:57:57 | * | cyraxjoe joined #nim |
03:59:00 | * | arkanoid quit (Read error: Connection reset by peer) |
03:59:28 | * | jmdaemon joined #nim |
04:05:47 | * | arkanoid joined #nim |
04:19:04 | FromDiscord | <Arathanis> anyone know what the deal with this is? https://media.discordapp.net/attachments/371759389889003532/937924989506695218/unknown.png |
04:19:32 | FromDiscord | <Elegantbeef> The hash wasnt stored in the binary when built |
04:20:11 | FromDiscord | <Rika> It’s not to worry about |
04:20:17 | FromDiscord | <Arathanis> ah, so it will just mention that forever? but is otherwise just cosmetically annoying instead of functionally annoying |
04:20:19 | FromDiscord | <Arathanis> (edit) "annoying" => "bad" |
04:20:28 | FromDiscord | <Arathanis> good to know |
04:22:29 | FromDiscord | <Arathanis> thank you |
04:42:34 | * | rockcavera quit (Remote host closed the connection) |
05:10:35 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
05:34:57 | * | Gustavo6046 joined #nim |
06:20:59 | * | krux02 quit (Remote host closed the connection) |
06:21:33 | * | cyraxjoe quit (Ping timeout: 268 seconds) |
06:21:33 | * | MightyJoe joined #nim |
06:25:52 | * | Ekho quit (Quit: CORE ERROR, SYSTEM HALTED.) |
06:32:39 | * | Ekho joined #nim |
06:32:59 | FromDiscord | <haolian9 (高浩亮)> sent a code paste, see https://play.nim-lang.org/#ix=3Of0 |
06:35:25 | FromDiscord | <Elegantbeef> It's due to how the let is expanded |
06:35:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Of1 |
06:36:24 | FromDiscord | <Elegantbeef> Due to being at main scope |
06:37:11 | FromDiscord | <Rika> should it be like that? |
06:38:19 | FromDiscord | <Elegantbeef> Probably not |
06:39:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/Iny |
06:39:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/tG8 |
06:40:20 | FromDiscord | <Elegantbeef> Personally i'd argue for `let x, y =` it should only be allowed for static expressions |
06:40:58 | FromDiscord | <Elegantbeef> There is just no empirical right answer 😀 |
06:41:32 | FromDiscord | <Elegantbeef> Trying use async and oh boy am I falling flat |
06:41:44 | FromDiscord | <Elegantbeef> How the fuck can i read data from a socket without freezing my god damn main loop |
06:43:30 | FromDiscord | <Rika> can i see |
06:43:39 | FromDiscord | <Rika> i can prolly try helping |
06:43:55 | NimEventer | New thread by Haoliang: A question about block used in assignment, see https://forum.nim-lang.org/t/8857 |
06:46:37 | FromDiscord | <haolian9 (高浩亮)> i was post this question on forum first, but my account was moderated, and i did not how long would it take, so i post it here again, sorry for the duplication |
06:46:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Of6 |
06:46:57 | FromDiscord | <Elegantbeef> The latter needs to be async but i cannot call it without freezing my game's update loop |
06:47:08 | FromDiscord | <Elegantbeef> Yea no problem, for a second thought you ignored me |
06:47:15 | FromDiscord | <Rika> test |
06:47:19 | FromDiscord | <Rika> okay im alive |
06:47:31 | FromDiscord | <Rika> is your game loop async too |
06:47:36 | FromDiscord | <Elegantbeef> No |
06:47:58 | FromDiscord | <Rika> what kinda freezing do you mean? as in freezing until the thing completes? |
06:48:01 | FromDiscord | <Rika> do you use poll()? |
06:48:23 | FromDiscord | <Rika> do you call the thing within your non-async game loop somehow |
06:48:59 | FromDiscord | <Elegantbeef> Yes |
06:49:07 | FromDiscord | <Elegantbeef> So it's just going to be a thread day methinks |
06:49:26 | FromDiscord | <Rika> well |
06:49:49 | FromDiscord | <Rika> cant you make your game loop async |
06:50:28 | FromDiscord | <Elegantbeef> If i make the game loop async afaik can it not run the procedure multiple times in a single frame? |
06:50:35 | FromDiscord | <Rika> you can run it many times |
06:50:38 | FromDiscord | <Rika> just dont await it |
06:50:56 | FromDiscord | <Rika> you do more of smth like `await all @[future1, future2, future3]` |
06:51:09 | FromDiscord | <Rika> or if you have a `futures` seq |
06:51:12 | FromDiscord | <Rika> it reads really nicely |
06:51:15 | FromDiscord | <Rika> `await all futures` |
06:52:07 | FromDiscord | <Rika> basically this is how i think of it |
06:52:15 | FromDiscord | <Rika> a future can be a "thread" kinda i guess |
06:52:53 | FromDiscord | <Elegantbeef> Ehh, i guess i just need to read from a socket so async isnt needed |
06:53:12 | FromDiscord | <Elegantbeef> Thought it'd be the cool way but seems like it's just over complicating it |
06:53:51 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://paste.rs/98u |
06:54:29 | FromDiscord | <Elegantbeef> Try to write that type def out 😛 |
06:54:37 | FromDiscord | <Hamid_Bluri> how |
06:55:11 | FromDiscord | <Elegantbeef> You fill in the rest |
06:55:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ofe |
06:55:28 | FromDiscord | <Rika> ~~Option[]~~ |
06:55:42 | FromDiscord | <Elegantbeef> That doesnt even solve the issue |
06:55:48 | FromDiscord | <Elegantbeef> It's a recursive type def |
06:55:57 | FromDiscord | <Rika> actually hmm yeah |
06:56:43 | FromDiscord | <Rika> brain really thinks differently once you know formal languages damn @_@\ |
06:57:08 | FromDiscord | <Hamid_Bluri> thanks beef, I think I got the point |
06:57:32 | FromDiscord | <Elegantbeef> Hopefully my joke educational response was more educational than offensive 😜 |
06:58:12 | FromDiscord | <Rika> im offended |
06:58:17 | FromDiscord | <Elegantbeef> Good |
06:58:23 | FromDiscord | <Hamid_Bluri> lol |
06:58:30 | FromDiscord | <Rika> how could you say async is overcomplicated |
06:58:32 | FromDiscord | <Rika> i cant believe it |
06:58:34 | FromDiscord | <Rika> im so mad |
06:58:41 | FromDiscord | <Elegantbeef> I mean it's overcomplicated for this issue |
06:58:48 | FromDiscord | <Elegantbeef> I just thought i'd try it but it doesnt fit here |
07:00:24 | * | PMunch joined #nim |
07:04:36 | FromDiscord | <narimiran> there is 1.6.4 RC2 available, please give it a try: https://forum.nim-lang.org/t/8839#57814 |
07:06:23 | FromDiscord | <haolian9 (高浩亮)> a late thanks; i was thought so too, but i did not found a word about this in official docs |
07:14:14 | FromDiscord | <Michal Maršálek> How can I make a proc, template or a macro inside my template a gensymed symbol rather than injected symbol? |
07:14:39 | FromDiscord | <Elegantbeef> `proc doThing {.gensym}` |
07:20:43 | FromDiscord | <Michal Maršálek> Thanks, I was trying that pragma, but I was putting it at a wrong place |
07:34:00 | FromDiscord | <rishavs (Rishav Sharan)> sent a code paste, see https://paste.rs/9Mj |
07:36:03 | FromDiscord | <Elegantbeef> You're going to need something like a json node since that's not homogenous |
07:37:42 | PMunch | Or your own object with a kind field |
07:38:30 | FromDiscord | <Elegantbeef> "Something like" 😛 |
07:38:31 | PMunch | I mean this seems to be the same kind of object so you'd only need a kind with two states, sequence of T or T |
07:38:41 | FromDiscord | <Rika> That is indeed something like a JSON node type |
07:39:04 | PMunch | Yeah I'm not saying that JSON wouldn't work for this |
07:39:33 | PMunch | I was just saying that you don't necessarilly need to use JSON for it |
07:39:47 | FromDiscord | <Elegantbeef> No one said you had to 🙂 |
07:40:13 | FromDiscord | <Elegantbeef> I'm getting mad at this socket faff so pedantry is my break from disapointment |
07:40:57 | FromDiscord | <rishavs (Rishav Sharan)> sent a code paste, see https://paste.rs/QiA |
07:42:11 | PMunch | @Elegantbeef, socket faff? |
07:42:13 | FromDiscord | <Rika> think so, yeah |
07:42:34 | FromDiscord | <Elegantbeef> Working on making my level editor using a socket for ipc |
07:42:44 | PMunch | What is that `se/q` syntax? |
07:42:56 | PMunch | Aha.. Why? |
07:43:08 | FromDiscord | <Rika> wait there's a /? |
07:43:11 | FromDiscord | <Rika> i dont see any |
07:43:18 | PMunch | Huh? |
07:43:19 | FromDiscord | <Rika> i just see `se<span class="string">q` lmfao thanks bridge |
07:43:29 | PMunch | No that's what I see as well |
07:43:42 | PMunch | I was wondering what kind of syntax all of that was |
07:43:45 | FromDiscord | <Elegantbeef> Cause I didnt want to spend a lot of time making UI for my editor 😀 |
07:45:21 | PMunch | Oh wait, their syntax is all kinds of messed up from the bridge :P |
07:45:25 | FromDiscord | <Rika> pm |
07:45:26 | FromDiscord | <Rika> idk why |
07:45:55 | FromDiscord | <Elegantbeef> Turns out my one issue was i accidently sent the data twice |
07:45:56 | PMunch | @Elegantbeef, but what is the ipc going to connect to? |
07:46:04 | FromDiscord | <Elegantbeef> My game client? |
07:46:25 | FromDiscord | <Elegantbeef> https://streamable.com/46dxh5 |
07:46:31 | FromDiscord | <Elegantbeef> There is a shitty first prototype |
07:46:32 | PMunch | I don't think i understand what you're doing :P |
07:47:07 | PMunch | And rishavs_(Rishav_Sharan) your message through the bridge looked like this: https://paste.rs/QiA and the first one like this https://paste.rs/9Mj which is why we've been a bit confused |
07:47:07 | FromDiscord | <Rika> me neither |
07:47:19 | FromDiscord | <Elegantbeef> The video should clear it up |
07:47:27 | FromDiscord | <Rika> it doesnt |
07:47:27 | FromDiscord | <Rika> lol |
07:47:33 | FromDiscord | <Rika> i still have no idea whats happening |
07:47:36 | NimEventer | New post on r/nim by mavavilj: Is it reasonable to attempt to utilize JVM from Nim using e.g. jnim?, see https://reddit.com/r/nim/comments/shpfs1/is_it_reasonable_to_attempt_to_utilize_jvm_from/ |
07:47:38 | PMunch | rishavs_(Rishav_Sharan), and have a look at https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants if you want to do variants properly |
07:47:53 | FromDiscord | <Elegantbeef> I have a level editor that can connect to my game and feed the level i'm creating into the game so i can test it while making it |
07:48:23 | FromDiscord | <Elegantbeef> So I get a usable UI without having to make one and can inspect tiles intuitively instead of annoyingly |
07:48:34 | PMunch | Aha, so instead of creating a UI just reusing all your assets you want to have all the same functionality bit work blindly? :P |
07:48:45 | PMunch | Or are you planning on embedding the game in that gray window? |
07:49:05 | FromDiscord | <Elegantbeef> The gray window will render the sprites of the tiles yes |
07:49:39 | PMunch | Right.. |
07:49:41 | FromDiscord | <Elegantbeef> I havent got around to automating the rendering of those yet though |
07:50:03 | FromDiscord | <Elegantbeef> The editor will work independently of the game, this is just to make my life easier |
07:50:29 | FromDiscord | <pmunch> [rishavs (Rishav Sharan)](https://matrix.to/#/@rishavs-58046952d73408ce4f2ebf0c:gitter.im)\: see my past couple messages, apparently tagging doesn't work over the bridge either.. |
07:56:42 | FromDiscord | <rishavs (Rishav Sharan)> o.0↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
07:57:19 | FromDiscord | <Elegantbeef> gitter.im really likes adding html styling to messages |
07:57:33 | FromDiscord | <rishavs (Rishav Sharan)> Thanks @\_discord\_392962235737047041\:t2bot.io , gonna read up on the link you shared. btw there is a discord server for nim? |
07:57:39 | FromDiscord | <Rika> yes |
07:57:44 | FromDiscord | <Rika> the invite is nim afaik |
07:57:49 | FromDiscord | <Rika> if not then its prolly nimlang |
07:57:54 | FromDiscord | <Elegantbeef> Move to matrix if you want to use the same protocol but not suffer 😀 |
07:58:09 | FromDiscord | <Rika> i mean depends on you really |
07:58:19 | FromDiscord | <Rika> if you use mainly discord stuff then discord, if you dont then matrix |
07:58:36 | FromDiscord | <Rika> i cant imagine moving to matrix since theres a tonne of discord communities i am pretty much integral to already |
07:58:40 | FromDiscord | <Elegantbeef> Well if you're using gitter and dont want to move to a different protocol just chat client |
07:59:02 | FromDiscord | <Rika> for all we know he could be a discord user that thought there wasnt a server, dunno |
07:59:16 | PMunch | Or join me here on the dark side with IRC |
07:59:37 | FromDiscord | <Elegantbeef> It's 2022 IRC has been dead for 30 years 😛 |
07:59:58 | PMunch | Never! There are dozens of us IRC users, dozens! |
08:01:35 | * | Vladar joined #nim |
08:02:01 | FromDiscord | <Elegantbeef> And pmunch just to be certain nimlsp doesnt need anything special to report diagnostics right? |
08:06:36 | * | neurocyte0917090 joined #nim |
08:08:44 | PMunch | What do you mean? |
08:09:09 | FromDiscord | <Elegantbeef> Just making sure i dont need any special flags or anything to diagnostics |
08:10:30 | PMunch | Nope |
08:10:48 | FromDiscord | <Elegantbeef> Ok so i guess tomorrow i should debug why Kate doesnt get them |
08:16:00 | PMunch | What do you mean by diagnostics? |
08:16:45 | FromDiscord | <Elegantbeef> Syntax/compilation errors |
08:33:07 | PMunch | Ah, that should happen on saves automatically I believe |
08:34:25 | FromDiscord | <Elegantbeef> Hmm it's not so I guess something's not getting the memo |
08:35:11 | PMunch | You can make a debug build and read the logs |
08:50:36 | * | jjido joined #nim |
09:12:22 | NimEventer | New thread by Miran: This Month with Nim: February, see https://forum.nim-lang.org/t/8858 |
09:19:49 | PMunch | Wait, surely that should be "This month with Nim: January" |
09:20:14 | FromDiscord | <Elegantbeef> Yea |
09:20:18 | FromDiscord | <Elegantbeef> I dun goofed |
09:20:45 | FromDiscord | <Elegantbeef> miiiiiiran where art thou! |
09:21:23 | FromDiscord | <Elegantbeef> narimiran narimiran narimiran, it's like beetlejuice right? |
09:23:32 | FromDiscord | <lantos> maybe say something that is upsetting? |
09:23:41 | FromDiscord | <lantos> proof of stake is a scam? |
09:23:56 | FromDiscord | <Elegantbeef> NFTs are beanie babies for idiots |
09:24:05 | FromDiscord | <lantos> ahahaha |
09:24:55 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
09:27:10 | * | jjido joined #nim |
09:37:48 | FromDiscord | <narimiran> In reply to @Elegantbeef "narimiran narimiran narimiran,": ok ok, we'll change it 🙂 |
09:39:16 | FromDiscord | <narimiran> here you go 🙂 |
09:39:50 | FromDiscord | <Elegantbeef> Hey last yea you fubbed with the year and this year i fubbed with the month |
09:40:03 | FromDiscord | <Elegantbeef> Next year i'll fubb with language |
09:40:23 | FromDiscord | <Elegantbeef> I'll collect Rust/Zig/Odin libraries/tools |
09:40:29 | FromDiscord | <narimiran> you also misspelled your branch name 😉 |
09:40:49 | FromDiscord | <narimiran> i was stumped why i cannot push to `tmwn` like i usually can |
09:41:29 | FromDiscord | <narimiran> but after some git-cursing, a careful read solved that one 🙂 |
09:42:00 | FromDiscord | <Elegantbeef> Ah whoops pushed to the wrong repo when i rebased 😀 |
09:42:00 | FromDiscord | <planetis> thanks this helped me find the reason, it was strutils.% causing it |
09:42:12 | FromDiscord | <Elegantbeef> No problem |
09:42:28 | FromDiscord | <Elegantbeef> Also planetis want a working implementation of that versioned stuff to grok? 😛 |
09:42:38 | FromDiscord | <planetis> sure |
09:43:15 | FromDiscord | <Elegantbeef> It assumes a lot right now but it's a base |
09:43:16 | FromDiscord | <Elegantbeef> v |
09:43:18 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3Oga |
09:43:27 | FromDiscord | <Elegantbeef> Yes i hit v instead of ctrl+v and hit enter |
09:43:55 | FromDiscord | <planetis> nice |
09:44:08 | PMunch | I really should submit Futhark to one of these monthlies.. |
09:44:43 | FromDiscord | <Elegantbeef> I'll bug you for feburaries |
09:45:13 | FromDiscord | <Elegantbeef> Jesus it's February's |
09:45:14 | FromDiscord | <Elegantbeef> I'm not tired you are |
09:45:23 | FromDiscord | <planetis> so fieldPairs doesn't work with when? |
09:45:34 | FromDiscord | <Elegantbeef> It doesnt? |
09:45:42 | FromDiscord | <Elegantbeef> It should work |
09:46:18 | FromDiscord | <Elegantbeef> It works |
09:46:37 | FromDiscord | <planetis> oh I saw the macro and assumed you wrote it because fieldpairs didn't work |
09:46:58 | FromDiscord | <Elegantbeef> Which macro? |
09:47:24 | FromDiscord | <Elegantbeef> `migrateData`? |
09:47:50 | PMunch | @Elegantbeef, I've got another nice project coming up for February ;) |
09:47:59 | FromDiscord | <Phil> How did I express "only positive number" as a type again if I don't really want to specify an upper limit? |
09:48:04 | FromDiscord | <planetis> yes |
09:48:12 | FromDiscord | <Phil> I know I could use a range but that means myself stating "at most up to this number" |
09:48:19 | FromDiscord | <Elegantbeef> `a: Positive` |
09:48:39 | FromDiscord | <Phil> Thanks! |
09:49:05 | FromDiscord | <Elegantbeef> `migrateData` calls `migrate` until it gets to `MyType[Ver.High]` |
09:49:11 | FromDiscord | <Elegantbeef> This is how it works statically |
09:49:34 | FromDiscord | <Elegantbeef> That can be changed but the when statement was the simplest |
09:50:23 | FromDiscord | <Elegantbeef> so in the case of `ver00` `migrateData` is turned into `migrate(migrate(personData))` |
09:50:57 | FromDiscord | <planetis> yes I thought of having when outside the object declaration but then you will have too many duplicate versions for objects |
09:51:02 | PMunch | I mean Positive still has a limit, but probably one you won't find |
09:51:42 | FromDiscord | <Elegantbeef> Yea i mean you can do it eitherway, but doing when outside of the object declaration doesnt really allow you to have this easy system |
09:51:49 | FromDiscord | <Elegantbeef> Each type would be versioned by name instead i suppose |
09:52:37 | FromDiscord | <Elegantbeef> This was just the idea i had last night, might clean it up, but i dont know |
09:53:25 | FromDiscord | <Elegantbeef> I do really like the simplicity of how this versions |
09:54:19 | FromDiscord | <planetis> its nicely done |
09:55:23 | FromDiscord | <planetis> is it rellated to your fosdem talk?↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
10:10:57 | * | Jjp137 quit (Ping timeout: 240 seconds) |
10:11:57 | * | ecs quit (Ping timeout: 240 seconds) |
10:12:05 | * | blackbeard420_ joined #nim |
10:12:10 | * | ecs joined #nim |
10:12:17 | * | GreaseMonkey quit (Ping timeout: 240 seconds) |
10:12:34 | * | tinystoat is now known as typoholic |
10:12:37 | * | blackbeard420 quit (Ping timeout: 240 seconds) |
10:12:49 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:13:04 | * | greaser|q joined #nim |
10:21:54 | PMunch | Is it just me or should this definition be rewritten: https://nim-lang.org/docs/os.html#walkDirRec.i%2Cstring |
10:22:02 | * | jjido joined #nim |
10:22:28 | PMunch | Says that it yields for each file or directory in `dir`, but I'm pretty sure it now only yields for files with the default `yieldFilter` |
10:25:16 | FromDiscord | <Elegantbeef> I concur |
10:27:27 | FromDiscord | <Rika> Do you |
10:27:58 | FromDiscord | <Phil> Wait positive does not include null I just realizd |
10:28:00 | FromDiscord | <Phil> (edit) "realizd" => "realized" |
10:28:24 | FromDiscord | <Elegantbeef> Numbers arent nilable |
10:28:41 | FromDiscord | <Phil> Sorry, my german slipped through, I meant null as in 0 |
10:28:44 | Amun-Ra | and if by null you mean 0 → Natural |
10:29:23 | FromDiscord | <Phil> Ahh check, thanks Amun, yeh that's what I was looking for |
10:32:55 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:35:23 | FromDiscord | <evoalg> I suspect beefy is technically right, because zero isn't a positive number, and so when you ask for positive only... |
10:35:49 | FromDiscord | <Rika> Lmao |
10:35:57 | FromDiscord | <Rika> Also god you actually did switch to matrix |
10:36:15 | FromDiscord | <Elegantbeef> evo defending me now, damn the cult of me has begun! |
10:36:38 | FromDiscord | <evoalg> and don't call me god, call beefy god instead↵(@Rika) |
10:37:15 | FromDiscord | <Rika> You’ll have to waterboard me to make me do that |
10:39:33 | FromDiscord | <Phil> I've played around with it, just not really a reason so far to stick with it |
10:43:22 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
10:46:55 | * | happycorsair[m] quit (Ping timeout: 250 seconds) |
10:46:55 | * | crem1 quit (Ping timeout: 250 seconds) |
10:47:17 | * | Yardanico_ joined #nim |
10:47:21 | * | Yardanico quit (Ping timeout: 250 seconds) |
10:48:57 | * | crem1 joined #nim |
11:06:21 | * | happycorsair[m] joined #nim |
11:31:07 | * | jjido joined #nim |
11:33:36 | * | xiamx quit (Quit: Bridge terminating on SIGTERM) |
11:33:39 | * | cheer[m] quit (Quit: Bridge terminating on SIGTERM) |
11:33:40 | * | nixfreaknim[m] quit (Quit: Bridge terminating on SIGTERM) |
11:33:41 | * | happycorsair[m] quit (Quit: Bridge terminating on SIGTERM) |
11:41:57 | * | cheer[m] joined #nim |
11:42:42 | * | typoholic is now known as tinystoat |
11:45:19 | FromDiscord | <dom96> In case anyone's interested: https://twitter.com/d0m96/status/1488478416546455555 |
11:45:23 | * | happycorsair[m] joined #nim |
11:45:39 | * | xiamx joined #nim |
11:45:41 | * | nixfreaknim[m] joined #nim |
11:47:42 | * | xiamx quit (Remote host closed the connection) |
11:47:42 | * | cheer[m] quit (Read error: Connection reset by peer) |
11:47:42 | * | happycorsair[m] quit (Read error: Connection reset by peer) |
11:47:43 | * | nixfreaknim[m] quit (Remote host closed the connection) |
11:50:16 | PMunch | Hmm, anyone know of a good place to get some free icons? |
11:51:23 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
11:55:36 | FromDiscord | <planetis> there are google material icons and bootstrap icons |
11:55:59 | FromDiscord | <BhamidipatiNikhil> In reply to @PMunch "Hmm, anyone know of": What kind of icons do you want?? |
11:56:10 | FromDiscord | <enthus1ast> https://fontawesome.com/v5.15/icons?d=gallery&p=2 |
11:56:49 | FromDiscord | <planetis> if you need colored icons then kde icons |
11:57:03 | PMunch | I need some icons for a website, basically just illustration stuff |
11:57:15 | PMunch | Sorry, I should've been more specific |
11:58:01 | FromDiscord | <enthus1ast> then have a look at fontawesome for scientific icons there is another "community" fontawesome |
11:58:36 | FromDiscord | <enthus1ast> https://jpswalsh.github.io/academicons/ |
12:01:31 | FromDiscord | <keks> Hi! I want to convert an array of float literals which has 64bit precision by default into a 32bit array at compile time. Does it mean I have to mess around with macros, or there is an easier approach? |
12:01:37 | * | cheer[m] joined #nim |
12:02:43 | * | cheer[m] quit (Remote host closed the connection) |
12:03:00 | NimEventer | New thread by Neodim: Defer within async dispatch, see https://forum.nim-lang.org/t/8859 |
12:04:24 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Ohb |
12:04:38 | FromDiscord | <enthus1ast> since its a const, its on compile time |
12:09:07 | * | cheer[m] joined #nim |
12:14:23 | FromDiscord | <auxym> @PMunch https://www.svgrepo.com/ |
12:14:35 | * | happycorsair[m] joined #nim |
12:14:47 | * | xiamx joined #nim |
12:14:47 | * | nixfreaknim[m] joined #nim |
12:19:51 | FromDiscord | <tandy> can a Nim object be cast to a JsObject? |
12:21:25 | FromDiscord | <tandy> yes with jsffi |
12:22:03 | * | Jjp137 joined #nim |
12:22:47 | FromDiscord | <keks> sent a code paste, see https://play.nim-lang.org/#ix=3Ohg |
12:32:46 | FromDiscord | <mratsim> In reply to @keks "Thanks, this looks much": use for loops |
12:35:45 | FromDiscord | <keks> In reply to @mratsim "use for loops": I want to do the conversion at compile time for small size vectors (length 3 or 4). |
12:35:49 | * | nixfreaknim[m] quit (Quit: Client limit exceeded: 20000) |
12:36:40 | * | cheer[m] quit (Quit: Client limit exceeded: 20000) |
12:36:46 | * | happycorsair[m] quit (Quit: Client limit exceeded: 20000) |
12:40:50 | FromDiscord | <elo88> can someone who work with winapi could suggest why this code https://play.nim-lang.org/#ix=3Ocv↵reports error 187? I writed same code in go and worked fine, what am i doing wrong? |
12:40:59 | FromDiscord | <Rika> You can use for loops on compile time |
12:41:04 | * | cheer[m] joined #nim |
12:41:18 | * | happycorsair[m] joined #nim |
12:41:18 | * | nixfreaknim[m] joined #nim |
12:44:25 | FromDiscord | <keks> In reply to @Rika "You can use for": I see, I need compile time function evaluation. |
12:44:34 | * | blackbeard420_ quit (Remote host closed the connection) |
12:44:45 | * | blackbeard420 joined #nim |
12:47:15 | * | xiamx quit (Quit: Client limit exceeded: 20000) |
12:48:43 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Ohl |
12:48:55 | * | xiamx joined #nim |
12:55:32 | PMunch | @keks, you can do this: https://play.nim-lang.org/#ix=3Oho |
12:58:18 | FromDiscord | <keks> Thank you @mratsim @enthus1ast @PMunch! This is exactly what I wanted 🙂 |
12:58:23 | * | rockcavera joined #nim |
12:58:23 | * | rockcavera quit (Changing host) |
12:58:23 | * | rockcavera joined #nim |
13:01:47 | FromDiscord | <Hamid_Bluri> In reply to @PMunch "Hmm, anyone know of": very icon |
13:01:52 | FromDiscord | <Hamid_Bluri> https://www.veryicon.com/ |
13:01:58 | FromDiscord | <Hamid_Bluri> @PMunch |
13:02:06 | PMunch | @elo88, not familiar with WinAPI, but in line ten you're passing it a buffer of size 0, and tells it that it is size 0 |
13:02:23 | PMunch | So you won't have anywhere to put your base name |
13:02:34 | PMunch | Not sure if that is the issue or not though |
13:06:05 | * | Gustavo6046 quit (Ping timeout: 268 seconds) |
13:16:15 | * | jjido joined #nim |
13:17:14 | FromDiscord | <rishavs (Rishav Sharan)> What would be a good way to remove the first char from any string in-situ?↵I tried removePrefix, but it removes all occurrences of the argument character. For example, removePrefix removes `v` and `vvv` from `var` or `vvvvar` |
13:18:03 | PMunch | rishavs_(Rishav_Sharan), `if str.len > 0: str[1..^1] else: str` |
13:21:46 | FromDiscord | <rishavs (Rishav Sharan)> https://simpleicons.org/ has corporate icons as well↵(@Hamid_Bluri) |
13:21:52 | FromDiscord | <rishavs (Rishav Sharan)> Thanks! |
13:43:20 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:57:46 | * | jjido joined #nim |
14:06:21 | * | rockcavera quit (Remote host closed the connection) |
14:09:28 | FromDiscord | <Patitotective> sent a code paste, see https://paste.rs/1Qw |
14:09:33 | FromDiscord | <Patitotective> (edit) "https://play.nim-lang.org/#ix=3OhU" => "https://play.nim-lang.org/#ix=3OhV" |
14:10:11 | FromDiscord | <Rika> the regular way, use a flag |
14:10:16 | FromDiscord | <Rika> (edit) "the regular way, use a flag ... " added "variable" |
14:10:56 | FromDiscord | <Patitotective> In reply to @Rika "the regular way, use": what is that? |
14:11:33 | FromDiscord | <Rika> uh literally just a boolean that you set if you "break" and not if you "finish" |
14:11:36 | FromDiscord | <Rika> or vice versa |
14:12:09 | FromDiscord | <Patitotective> :/ok |
14:17:42 | PMunch | You can also do this @Patitotective https://play.nim-lang.org/#ix=3OhY |
14:18:03 | FromDiscord | <Patitotective> In reply to @PMunch "You can also do": :o |
14:18:05 | FromDiscord | <Patitotective> Thanks 🙃 |
14:20:26 | PMunch | (I like blocks) |
14:21:55 | FromDiscord | <Rika> oh yeah that works too, i forgot |
14:22:04 | FromDiscord | <Rika> i had it inverted in my brain and concluded it didnt work |
14:22:20 | FromDiscord | <Rika> tbf i thought about it for a split second only |
14:24:17 | PMunch | Blocks are great, such a versatile little thing :P |
14:28:58 | FromDiscord | <Patitotective> Which iterator is called when I do `for i in @[1, 2]`? |
14:29:34 | FromDiscord | <enthus1ast> should be `items` |
14:30:09 | FromDiscord | <Patitotective> Which https://nim-lang.org/docs/iterators.html#items.i%2Ccstring ? |
14:30:16 | FromDiscord | <Patitotective> 😕 |
14:30:31 | FromDiscord | <Patitotective> this https://nim-lang.org/docs/iterators.html#items.i%2CopenArray%5BT%5D? |
14:30:32 | FromDiscord | <Patitotective> (edit) "https://nim-lang.org/docs/iterators.html#items.i%2CopenArray%5BT%5D?" => "https://nim-lang.org/docs/iterators.html#items.i%2CopenArray%5BT%5D ?" |
14:30:52 | FromDiscord | <Patitotective> or this https://nim-lang.org/docs/iterators.html#items.i%2Cseq%5BT%5D ? |
14:33:57 | FromDiscord | <Rika> seq, its the more specific one |
14:33:58 | FromDiscord | <Rika> i believe |
14:35:09 | FromDiscord | <Patitotective> 👍 |
14:40:58 | FromDiscord | <Patitotective> What do you guys think on creating a PR for this feature https://play.nim-lang.org/#ix=3Oib ? |
14:42:12 | FromDiscord | <BhamidipatiNikhil> In reply to @Patitotective "What do you guys": But isn't there countup and countdown already there? |
14:43:36 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Oig |
14:44:16 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Oih |
14:51:15 | * | arkurious joined #nim |
14:54:57 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
15:26:21 | FromDiscord | <Patitotective> https://github.com/nim-lang/Nim/pull/19480 🙃 |
15:37:33 | FromDiscord | <ajusa> In reply to @Patitotective "https://github.com/nim-lang/Nim/pull/19480 🙃": https://github.com/nim-lang/Nim/issues/2457#issuecomment-91880150 |
15:37:41 | FromDiscord | <ajusa> maybe Araq's changed his view after 7 years, maybe not |
15:44:27 | FromDiscord | <haxscramper> In reply to @Patitotective "https://github.com/nim-lang/Nim/pull/19480 🙃": the naming, is kind of meh (commented on the PR in more details), but `ritems` and `rpairs` that I wrote for myself were really useful, |
15:45:40 | FromDiscord | <haxscramper> In reply to @ajusa "https://github.com/nim-lang/Nim/issues/2457#issueco": `items` covers "iterate strictly from left to right" + "iterate over whatever", and `ritems` extends the built-in set of operations to "iterate from right to left", so I bet in this case we would see similar response - the functionality extension is not especially big |
15:45:55 | FromDiscord | <konsumlamm> what would the mutable version be then? `mritems`? |
15:46:05 | FromDiscord | <ajusa> hey there mr. items |
15:46:12 | FromDiscord | <haxscramper> ir `rmitems` |
15:46:20 | FromDiscord | <haxscramper> yes, `sudo rm items` |
15:47:05 | FromDiscord | <haxscramper> `reversed` already exists in the `std/algorithm`, and returns a revesed copy |
15:47:13 | FromDiscord | <ajusa> I think a reversed iterator would look better |
15:47:49 | FromDiscord | <haxscramper> reversed/sorted and other. "ed" parts already imply the modified copy, IIRC that is even in the naming guide |
15:48:03 | FromDiscord | <haxscramper> also, they mirror `items` and `pairs`, so naming should reflect that as well |
15:48:38 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/3OiV |
15:49:01 | FromDiscord | <konsumlamm> except `pairs` shouldn't really be used anymore |
15:49:05 | FromDiscord | <ajusa> I feel like dup should be used to implemented the copied versions though |
15:49:11 | FromDiscord | <haxscramper> In reply to @konsumlamm "except `pairs` shouldn't really": why? |
15:49:21 | FromDiscord | <konsumlamm> because we have `std/enumerate` |
15:49:32 | FromDiscord | <ajusa> isn't the whole point of `dup` that it converts an inplace algorithm to a copy? |
15:49:37 | FromDiscord | <konsumlamm> which doesn't require newly implementing it for everything |
15:50:41 | FromDiscord | <haxscramper> maybe `ritems` and `rpairs` can be a generic iterator |
15:50:53 | FromDiscord | <haxscramper> and `items` for that matter as well |
15:52:08 | FromDiscord | <haxscramper> well, whatever, not like I especially care about the naming here, so |
15:52:44 | FromDiscord | <Patitotective> In reply to @ajusa "https://github.com/nim-lang/Nim/issues/2457#issueco": what about `iterutils`? |
15:52:47 | FromDiscord | <haxscramper> I just find `pairs` for sequence a lot more useful than importing `enumerate` all over the place |
15:53:11 | FromDiscord | <haxscramper> but enumerate is more generic |
15:54:57 | FromDiscord | <Patitotective> In reply to @haxscramper "the naming, is kind": Yea, I prefer them, it sounds like right-to-left |
16:03:20 | FromDiscord | <Patitotective> I let `mritems` for now |
16:03:47 | FromDiscord | <Patitotective> (edit) "I let `mritems` for now ... " added "🧐" |
16:04:45 | FromDiscord | <IsaacPaul> I like nim as a language.. but it's very DIY which is good and bad I guess, but it leaves the language in limbo and pieces. |
16:05:27 | FromDiscord | <IsaacPaul> I guess this affords you the opportunity to recreate the leftpad incident lol. Just make a package reverseIterator then delete a few years later. lol |
16:06:15 | FromDiscord | <haxscramper> It should be easy to pull in random one-file packages in for that to work properly |
16:06:32 | FromDiscord | <Patitotective> there should be a _extra_ library for nim, like a nimble package made by the community with all these features |
16:07:45 | FromDiscord | <Rika> we tried |
16:07:53 | FromDiscord | <Rika> fusion could have been that |
16:07:55 | FromDiscord | <Rika> but it was mishandled |
16:09:10 | FromDiscord | <haxscramper> muffled curses |
16:10:13 | nrds | <Prestige99> Who was handling it? |
16:10:50 | FromDiscord | <haxscramper> That is the first question that anyone would need to ask, right |
16:10:59 | FromDiscord | <haxscramper> And the answer to it is - no idea |
16:11:00 | FromDiscord | <Rika> thats the thing |
16:11:02 | FromDiscord | <Rika> yeah |
16:11:09 | FromDiscord | <Rika> who the fuck was handling it |
16:13:39 | FromDiscord | <Patitotective> what about one of you handle it? 🙃 |
16:14:33 | FromDiscord | <Rika> its dead now |
16:16:06 | nrds | <Prestige99> 🤔 |
16:16:23 | FromDiscord | <haxscramper> In reply to @Patitotective "what about one of": Oh yeah I sort of tried to handle a part of fusion |
16:16:23 | FromDiscord | <Patitotective> In reply to @Rika "its dead now": isn't the code somwhere? |
16:16:35 | FromDiscord | <haxscramper> Aka "official pattern matching for nim" |
16:16:51 | FromDiscord | <demotomohiro> https://github.com/nim-lang/fusion |
16:17:08 | FromDiscord | <haxscramper> It is installable from nimble, no issues here |
16:17:51 | FromDiscord | <haxscramper> The package itself didn't disappear, just nobody even tags it properly, looks into issues or PRs and so on |
16:18:54 | FromDiscord | <ajusa> In reply to @haxscramper "*muffled curses*": Poor hax |
16:19:04 | FromDiscord | <haxscramper> but there are a few useful libraries, like binary trees, pattern matching, and couple others |
16:19:30 | FromDiscord | <haxscramper> so even if it is sort of neglected you can still depend on it via nimble etc. |
16:19:58 | FromDiscord | <Patitotective> "we" can start a new one (outside nim-lang), copy the working ones from fusion and add these features that get removed later (mritems) |
16:19:59 | FromDiscord | <haxscramper> it was tested in 1.0.0 compatibility in mind, so the code is relatively stable |
16:20:24 | FromDiscord | <IsaacPaul> call it fusion2 |
16:20:35 | FromDiscord | <Patitotective> In reply to @IsaacPaul "call it fusion2": naah |
16:20:41 | FromDiscord | <Rika> call it fused |
16:20:44 | FromDiscord | <haxscramper> In reply to @Patitotective ""we" can start a": there is a status' stdlib extension library, maybe it has something similar |
16:20:46 | FromDiscord | <Patitotective> nim++ lol |
16:21:01 | FromDiscord | <haxscramper> nimskll |
16:21:03 | FromDiscord | <Patitotective> plus-nim |
16:21:04 | FromDiscord | <Rika> infusion |
16:21:11 | FromDiscord | <IsaacPaul> In reply to @Rika "call it fused": splash in some latin.. we can call it nim con fused |
16:21:12 | FromDiscord | <Patitotective> In reply to @Rika "infusion": a cup of tea? |
16:21:20 | FromDiscord | <Rika> lmao |
16:22:10 | FromDiscord | <Patitotective> In reply to @IsaacPaul "splash in some latin..": it could be called that way if it will get messy |
16:22:33 | FromDiscord | <Patitotective> (edit) "will" => "would" |
16:22:56 | FromDiscord | <Patitotective> what about nimrod lol |
16:23:40 | FromDiscord | <ajusa> In reply to @Patitotective "what about nimrod lol": that's what Nim used to be called though |
16:23:49 | FromDiscord | <Patitotective> In reply to @ajusa "that's what Nim used": thats the point |
16:23:59 | FromDiscord | <ajusa> but that would be... confusing? |
16:24:08 | FromDiscord | <Patitotective> well yea |
16:24:12 | FromDiscord | <Patitotective> _nimiety_ |
16:33:30 | arkanoid | "Exception message: No SSL/TLS CA certificates found" on ubuntu 20.04 on request(AsyncHttpClient) |
16:35:31 | arkanoid | project uses switch("define","ssl") and ubuntu has openssl package installed |
16:37:34 | FromDiscord | <ajusa> In reply to @arkanoid ""Exception message: No SSL/TLS": I've gotten that on Windows before (cacert.pem) but never on Linux, weird |
16:39:42 | arkanoid | my fault, forgot to add ca-certificates to Dockerfile |
16:40:00 | * | krux02 joined #nim |
16:49:26 | * | jjido joined #nim |
17:04:37 | nrds | <testtor/freenode99> rasengan places a new sign in #freenode: THE SWAMP WILL BE DRAINED TODAY! <rasengan> Decision has been made. <rasengan> We have to drain this swamp. rasengan sets #freenode +m moderated rasengan unsets #freenode -z <rasengan> We are draining the swamp. <rasengan> Classic tried to go on for the sake of the community, but the community has made it loud and clear - they want freenode classic to end, to |
17:04:45 | nrds | <testtor/freenode99> <rasengan> #MFGA rasengan adds !@* to the #freenode +q founder list <rasengan> Everyone thinks they can just say whatever they want. Lesson #1 for IRC: Think before you type. <rasengan> Consequences are real. Treat things you care about with respect. Appreciate it. Help it. Cultivate it. And don't try to destroy it - because if you wish for its destruction, you're going to get it. <rasengan> Classic |
17:04:50 | nrds | <testtor/freenode99> had a special part in my heart and everyone else's. It's the saddest and hardest thing I've done, in a long time - but I <rasengan> am giving the directive to shut it down. <rasengan> Goodbye freenode classic. <rasengan> This is your queue to go to libera and oftc if you dont like waht we're doing. <rasengan> Do it. If you don't like what we're doing - go do it better. <rasengan> They need help. <ra |
17:04:56 | nrds | <testtor/freenode99> So does OFTC. <rasengan> I hope you'll all contribute hands. If you hate me so much anyway, it's a good use of energy to try to do everything ya'll can to cultivate other IRC networks to cause freenode to not matter. |
17:05:44 | FromDiscord | <dom96> amazing |
17:07:18 | FromDiscord | <huantian> Man that was so hard to read on mobile |
17:07:20 | nrds | <Prestige99> damn trolls |
17:10:25 | FromDiscord | <dom96> btw fusion was a strange idea from the start, still don't get the point |
17:17:11 | FromDiscord | <Patitotective> In reply to @dom96 "btw fusion was a": i dont understand the readme yet 😂 |
17:19:27 | FromDiscord | <haxscramper> In reply to @dom96 "btw fusion was a": Stdlib where things get to die less under backward compatibility |
17:19:40 | FromDiscord | <haxscramper> (edit) "In reply to @dom96 "btw fusion was a": Stdlib where things get to die less under backward compatibility ... " added "requirements" |
17:19:45 | FromDiscord | <haxscramper> In theory |
17:22:55 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3OjX |
17:22:57 | FromDiscord | <tandy> set two vars in one line? |
17:24:46 | FromDiscord | <dom96> In reply to @haxscramper "Stdlib where things get": did it ever end up being bundled with Nim? |
17:25:19 | FromDiscord | <haxscramper> It was UNbundled later on if you forgot |
17:25:41 | FromDiscord | <haxscramper> Citing release cycle mismatches etc. |
17:26:55 | FromDiscord | <dom96> Tbh I kinda ignored the whole thing, so yeah, probably my opinion doesn't matter much |
17:27:40 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3Ok2 |
17:29:57 | FromDiscord | <Rika> Why are you using then instead of another await? |
17:31:45 | FromDiscord | <Rika> Actually what is then? |
17:32:39 | FromDiscord | <Phil> That looks like JS to me |
17:32:47 | FromDiscord | <Phil> Or JS-style code |
17:33:28 | FromDiscord | <Phil> At which point I'll assume that's a promise and "then" means "execute this callback once the promise resolves and you have a value", the first parameter would be the contents of the promise |
17:35:12 | FromDiscord | <Phil> Anyone up for brainstorming on how to implement an equivalent to Django's "signals" in nim? |
17:38:10 | nrds | <Prestige99> No idea what that is |
17:38:14 | FromDiscord | <Phil> Or rather, other way around, is there a way that I can "forbid" any other module to use a specific piece of code, even if it imports it?↵Specifically I want to have only one module that is permitted to call the `norm.update/delte/create` procs.↵These are all part of norm/sqlite, but I can't just not import that package, I need it also for read operations |
17:40:07 | FromDiscord | <Rika> Don’t export it 😄 |
17:40:35 | FromDiscord | <Rika> Oh |
17:40:39 | FromDiscord | <Rika> Any other module? |
17:40:46 | FromDiscord | <Rika> No, just don’t use it |
17:40:57 | FromDiscord | <Rika> Or import except |
17:41:12 | FromDiscord | <Rika> `import this except that, these` |
17:41:43 | FromDiscord | <tandy> im using both \:)↵(@Rika) |
17:41:49 | FromDiscord | <tandy> then lets me callback |
17:41:57 | FromDiscord | <tandy> https://nim-lang.org/docs/asyncjs.html |
17:42:00 | FromDiscord | <tandy> then is experimenal |
17:42:53 | FromDiscord | <Rika> I said “another” specifically because you’re using both |
17:43:17 | FromDiscord | <Rika> Is there a real difference to then and just another await in your case |
17:46:22 | * | rp1 quit (Ping timeout: 256 seconds) |
17:47:06 | FromDiscord | <Phil> Import X except? I'll need to look that syntax up, that does look promising though |
17:47:51 | * | rp1 joined #nim |
17:48:24 | FromDiscord | <Phil> Oh more like "import this module but without feature X", hmmm |
17:49:01 | FromDiscord | <Phil> In reply to @tandy "im using both \:)": If you can use await, only use await. That syntax is so much easier, particularly once it gets complex. |
17:50:39 | FromDiscord | <Phil> JS has so many answers to the entire async problem, async-await is the only one I'd give an A.↵The "Then" callback chaining I'd say is B. It's still somewhat useful if you have async await if you're in the situation where you want to fire multiple async callbacks at once instead of firing one, waiting for it to complete, then fire the second, then wait for that to complete etc... |
17:51:18 | FromDiscord | <Phil> (edit) "JS has so many answers to the entire async problem, async-await is the only one I'd give an A.↵The "Then" callback chaining I'd say is B. It's still somewhat useful if you have async await if you're in the situation where you want to fire multiple async callbacks at once instead of firing one, waiting for it to complete, then fire the second, then wait for that to complete etc..." => "sent a long message, see https://paste.rs/23q |
17:51:52 | FromDiscord | <Phil> (edit) "http://ix.io/3Oke" => "http://ix.io/3Okg" |
17:52:40 | * | PMunch quit (Quit: leaving) |
17:53:20 | FromDiscord | <tandy> in this case though, im going to use `.catch` to handle errors eventually↵(@Rika) |
17:53:54 | FromDiscord | <Phil> Try-catch does the same job and is going to be likely easier to reason about. Specifically if your error-handling becomes complicated |
17:54:51 | FromDiscord | <Phil> Actually, scratch that, not reason about, in terms of comprehension they're about both the same I'd say, I do find try-catch easier to read if contrasted with a `.then().catch()` block |
17:55:04 | FromDiscord | <Phil> (edit) "Actually, scratch that, not reason about, in terms of comprehension they're about both the same I'd say, I do find try-catch easier to read if contrasted with a `.then().catch()` block ... " added "though" |
17:55:53 | FromDiscord | <Rika> I need to go, it is 3 am |
17:56:49 | FromDiscord | <Phil> Sleep tight! Also sadly import except didn't quite do what I wanted it to, but I'll have to likely think on that more |
17:58:09 | FromDiscord | <Phil> In reply to @nrds "<Prestige> No idea what": Django's signal system is essentially a way to define a list of actions that should be performed every time an entry of a particular model is created/deleted/updated |
17:58:42 | FromDiscord | <Phil> You define functions, associate them with a given model of Django's ORM and define whether to execute that action before or after the event happens |
17:58:53 | FromDiscord | <Phil> (edit) "action" => "function" |
18:02:00 | FromDiscord | <Phil> sent a long message, see http://ix.io/3Okj |
18:02:34 | FromDiscord | <Phil> (edit) "http://ix.io/3Okj" => "http://ix.io/3Okk" |
18:05:24 | FromDiscord | <Phil> The only thing I can think of is having some kind of Hashmap of Hashmap of Lists with every list being a list of procs |
18:06:20 | FromDiscord | <Phil> (edit) "of" => "where they key is model and the value is another" | "of Lists with every list being" => "where the key is "pre/post create/update/delete" and the value is" | "list" => "List" | "Hashmapwhere the key is "pre/post create/update/delete" and the value isaListof procs ... " added "to execute if for that particular model that particular action occurs" |
18:09:07 | FromDiscord | <Phil> Can you make a seq of procs? |
18:10:48 | FromDiscord | <konsumlamm> sure |
18:13:12 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Okp |
18:14:29 | * | rp1 quit (Ping timeout: 256 seconds) |
18:15:59 | * | rp1 joined #nim |
18:16:54 | FromDiscord | <Phil> effectively, I'd want a list of procs with this signature: ↵`proc postCreateSignal[T: Model](connection: DbConn, modelInstance: T) =`↵Well, that proc in 6 variations, all combinations of post/pre and create/update/delete |
18:26:20 | NimEventer | New post on r/nim by thindil: [Nim Blog] This Month with Nim: January 2022, see https://reddit.com/r/nim/comments/si1sel/nim_blog_this_month_with_nim_january_2022/ |
18:39:59 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
18:40:58 | FromDiscord | <konsumlamm> In reply to @Isofruit "effectively, I'd want a": i don't think you can have procs with generic parameters, but `seq[proc(connection: DbConn, modelInstance: Model)]` should work |
18:41:19 | * | jmdaemon joined #nim |
18:42:39 | * | jjido joined #nim |
18:43:15 | FromDiscord | <Phil> That's fine, the above would be more the general form of the signature, the actual procs would be more like `proc(connection: DbConn, modelInstance: Creature)` Hmmm, I wonder why I the above example runs into |
18:43:28 | FromDiscord | <Phil> `/usercode/in.nim(4, 5) Error: invalid type: 'proc' in this context: 'seq[proc]' for var`↵I'll see what happens if I enter a parameter |
18:44:36 | FromDiscord | <konsumlamm> did you write what i wrote or `seq[proc]`? |
18:44:49 | FromDiscord | <konsumlamm> `proc` isn't a specific proc type |
18:44:57 | FromDiscord | <Phil> Ohhhh |
18:47:26 | FromDiscord | <Phil> In reply to @konsumlamm "`proc` isn't a specific": Yep, that works, now I just need to meditate over whether I'm too lazy to fully implement this or not |
18:49:17 | * | neurocyte0917090 quit (Ping timeout: 240 seconds) |
18:50:10 | FromDiscord | <Patitotective> In reply to @haxscramper "the naming, is kind": what about reversed? |
18:50:34 | * | neurocyte0917090 joined #nim |
18:50:52 | FromDiscord | <haxscramper> In reply to @haxscramper "reversed/sorted and other. "ed"": already exists, means different thing |
18:58:00 | * | rockcavera joined #nim |
18:58:00 | * | rockcavera quit (Changing host) |
18:58:00 | * | rockcavera joined #nim |
19:09:47 | * | jmdaemon quit (Ping timeout: 250 seconds) |
19:24:47 | FromDiscord | <Waldecir Santos> can someone help with a cryptic message ? and why open a file and executing a regex would need to convert to int32 🤔 https://media.discordapp.net/attachments/371759389889003532/938152922695467008/unknown.png |
19:25:23 | FromDiscord | <haxscramper> you can't use `re` from `std/re` at compile time |
19:25:49 | FromDiscord | <haxscramper> specifically this message means that implementation uses `cast[]` somewhere and vm can't evaluate it |
19:26:30 | FromDiscord | <Waldecir Santos> Oh I see, I cannot use const here, right ? |
19:27:24 | FromDiscord | <konsumlamm> `const` makes stuff run at compile time |
19:27:28 | FromDiscord | <konsumlamm> so no |
19:27:48 | FromDiscord | <Waldecir Santos> Yeah it works with let, but still, would be nice to have a better message, thank you @haxscramper |
19:27:51 | FromDiscord | <haxscramper> use `let` instead, it is also immutable |
19:29:35 | FromDiscord | <konsumlamm> the whole module should probably have a `when nimvm: {.error: "'std/re' module doesn't work at compile time".}` or something |
19:30:00 | FromDiscord | <haxscramper> this is a vmgen error |
19:30:24 | FromDiscord | <enthus1ast> is std/re the one that uses pcre? |
19:30:31 | FromDiscord | <haxscramper> the module can't have a "usable in vm" or "not usable in vm" property |
19:30:54 | FromDiscord | <haxscramper> Only proc can, and only in cases where it's implementation has some magic |
19:30:57 | FromDiscord | <haxscramper> `cast[]` etc. |
19:31:19 | FromDiscord | <haxscramper> So technically if it was a different cast, or some other magic, the `std/re` would've been usable at compile-time |
19:31:23 | FromDiscord | <konsumlamm> hmm, wdym? the error would get triggered when importing it, or am i missing something? |
19:31:25 | FromDiscord | <Yepoleb> is cast not allowed for security reasons? |
19:31:26 | FromDiscord | <Waldecir Santos> Another funny behaviour `re.split` works differently from `nre.split` is this expected ? |
19:31:47 | FromDiscord | <haxscramper> In reply to @Yepoleb "is cast not allowed": cast is not disallowed, just not cast are supported |
19:32:03 | FromDiscord | <haxscramper> you can do some basic casting with integer types |
19:32:21 | FromDiscord | <Yepoleb> but is that lack of support intentional? |
19:32:28 | * | vicfred joined #nim |
19:32:33 | FromDiscord | <haxscramper> no, |
19:32:47 | FromDiscord | <konsumlamm> it's more that noone bothered to make it work at compile time |
19:32:48 | FromDiscord | <haxscramper> there is no real reason to limit the cast in the vm |
19:34:07 | FromDiscord | <konsumlamm> though `std/re` uses PCRE (i.e. C FFI) anyway, so i doubt there's any hope that it'll ever work in the VM |
19:37:19 | FromDiscord | <konsumlamm> In reply to @konsumlamm "the whole module should": @haxscramper can you elaborate why this wouldn't work? |
19:38:03 | FromDiscord | <konsumlamm> or would that get triggered when compiling the module? |
19:38:07 | FromDiscord | <haxscramper> first of all, does this work? |
19:39:14 | FromDiscord | <konsumlamm> huh, `illegal context for 'nimvm' magic` |
19:39:19 | FromDiscord | <konsumlamm> haven't seen that one before |
19:39:29 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3OkN |
19:40:13 | FromDiscord | <haxscramper> `when nimvm` is a special magic that behaves differently during codegen part of the compilation IIRC, so it can trigger only when the actual evaluation happens |
19:40:51 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3OkO |
19:41:48 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3OkP |
19:43:02 | * | greaser|q quit (Changing host) |
19:43:02 | * | greaser|q joined #nim |
19:43:05 | * | greaser|q is now known as GreaseMonkey |
19:44:30 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3OkQ |
19:47:14 | * | Vladar quit (Quit: Leaving) |
19:49:15 | FromDiscord | <haxscramper> Good error message for this can probably be achieved by tracking vm codegen stack, and then creating something like "XX cannot be done in VM, error found during genration of A which calls B which calls C which calls D which has troubles" |
19:51:32 | FromDiscord | <haxscramper> this is doable, in theory, but I'm not all too well familliar with the VM internals to give a concrete suggestions on how this can be implemented, |
19:53:22 | FromDiscord | <konsumlamm> i'm completely lost rn, why can i suddenly not use `when nimvm` in a proc? |
19:53:36 | FromDiscord | <haxscramper> you can |
19:53:41 | FromDiscord | <haxscramper> that is the only place where you can use it |
19:54:12 | FromDiscord | <haxscramper> and in a couple of similar places probably |
19:54:21 | FromDiscord | <haxscramper> but not on the module toplevel |
19:54:39 | FromDiscord | <haxscramper> because module as a whole is not subject to the vm generation |
19:55:00 | FromDiscord | <haxscramper> For example, you can have a `echo 1` and `static: echo 1`, but only latter one will be generated to the vm |
19:55:15 | FromDiscord | <haxscramper> and executed |
19:55:28 | FromDiscord | <haxscramper> first one will go into the C/js/cxx codegen and executed at runtime |
19:55:32 | FromDiscord | <konsumlamm> just doing `when nimvm: discard` and i'm getting `illegal context for 'nimvm' magic` |
19:55:42 | FromDiscord | <haxscramper> in what context |
19:55:48 | FromDiscord | <haxscramper> full code |
19:55:49 | FromDiscord | <konsumlamm> as proc body |
19:56:04 | FromDiscord | <konsumlamm> sent a code paste, see https://play.nim-lang.org/#ix=3OkT |
19:56:16 | FromDiscord | <keks> Is there a substitute for `pairs` that works with iterators? I'm trying to run a for loop with indices over an iterator, but it doesn't work. |
19:56:16 | FromDiscord | <IsaacPaul> you're missing the code for when there isn't a nimvm? |
19:56:34 | FromDiscord | <haxscramper> @konsumlamm maybe `else` is required |
19:56:35 | FromDiscord | <konsumlamm> oh lol, you need an `else` |
19:56:39 | FromDiscord | <haxscramper> I don't exactly remember |
19:56:47 | FromDiscord | <konsumlamm> would be too easy to write that in the error message, eh |
19:56:57 | * | jmdaemon joined #nim |
19:57:27 | FromDiscord | <konsumlamm> and here i was, doubting my sanity |
19:59:05 | FromDiscord | <konsumlamm> there's an issue for it: https://github.com/nim-lang/Nim/issues/12517 |
19:59:21 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3OkW |
19:59:41 | FromDiscord | <haxscramper> in general the "error in context of X" turned out a lot more ugly to properly implement than I originally anticipated |
20:01:00 | FromDiscord | <haxscramper> `nimvm` is a special magic symbol, so it has to go through a couple more hoops and jumps |
20:01:20 | FromDiscord | <haxscramper> https://github.com/nim-lang/Nim/issues/12517#issuecomment-559791231 |
20:09:08 | FromDiscord | <shirleyquirk> how do i wrap a c++ iterator with a Nim iterator? put a different way: how do i dereference a c++ iterator in nim? |
20:10:03 | FromDiscord | <shirleyquirk> trying to wrap this `View` class: http://wiki.ros.org/rosbag/Code%20API |
20:16:27 | nrds | <enyc99> ACTION meows |
20:17:46 | * | fvs left #nim (WeeChat 3.4) |
20:25:40 | FromDiscord | <Phil> Boah organizing code without running into circular dependencies while seemingly staying elegant is hard |
20:25:53 | * | pch quit (Remote host closed the connection) |
20:33:17 | * | vicfred quit (Quit: Leaving) |
20:42:59 | FromDiscord | <kevin> Is there a way to convert a cstring back into a string? |
20:43:19 | FromDiscord | <kevin> is it just `var myString = $myCstring` ? |
20:43:31 | FromDiscord | <kevin> I keep getting segfault in that case 😠 |
20:44:24 | nrds | <Prestige99> iirc you can just use a cstring in place of a string |
20:45:42 | FromDiscord | <enthus1ast> $ should work |
20:46:39 | FromDiscord | <enthus1ast> do you do some pointer magic with your cstring? maybe thats the reason |
20:55:03 | FromDiscord | <kevin> I'm wrapping a C function with prototype `char myFunction(int outsize);` |
20:56:03 | FromDiscord | <kevin> Nim equivalent should just be: `proc myFunction(outsize: ptr int): cstring {.importc: "myFunction", nodecl.}` , right? |
20:58:37 | FromDiscord | <kevin> Or maybe instead of trying to automatically convert, is there a Nim way to create a new string of length `outsize` and then just copy `outsize` number bytes to the new string? |
21:04:45 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
21:10:34 | * | jjido joined #nim |
21:12:44 | FromDiscord | <elo88> In reply to @PMunch "<@752421389209698344>, not familiar with": good point, now returns access denied. Even after I gave it all the rights and run it as admin. https://play.nim-lang.org/#ix=3Olo ↵I didn't have to do this in go, so I'm wondering, it could be related with compilation process? |
21:18:18 | * | sagax quit (Ping timeout: 260 seconds) |
21:38:23 | FromDiscord | <Waldecir Santos> What does this `case` do here in the `type`. block https://github.com/fenekku/moustachu/blob/master/src/moustachupkg/context.nim#L15-L22. ? |
21:39:09 | FromDiscord | <Waldecir Santos> is that some time of "constructor" ? |
21:39:16 | FromDiscord | <Waldecir Santos> (edit) "time" => "type" |
21:43:17 | FromDiscord | <Waldecir Santos> Oh found it https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
22:12:31 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:21:03 | FromDiscord | <Waldecir Santos> How can I have a table where the value can have multiple types e.g: strings, ints and even other tables ? |
22:22:01 | FromDiscord | <konsumlamm> usually you make a variant type |
22:22:34 | FromDiscord | <Waldecir Santos> Ok and use the `object case` as I posted before right ? |
22:22:43 | FromDiscord | <konsumlamm> yes |
22:23:27 | FromDiscord | <Elegantbeef> Tagged unions or ADT is just how you have to do it in a statically typed language, or make everything a reference like in C# land 😀 |
22:38:54 | FromDiscord | <IsaacPaul> or you could use method / inheritance.. but that would require a ref and method dispatch is slow on arc |
22:41:10 | FromDiscord | <IsaacPaul> On my todo list is to investigate some of these other libraries:↵https://github.com/itsumura-h/nim-interface-implements - Macro to build a tuple↵https://github.com/andreaferretti/interfaced - Go Like vtable |
22:49:59 | Amun-Ra | can I use concept in this case? https://play.nim-lang.org/#ix=3OlJ |
22:50:35 | FromDiscord | <Elegantbeef> You can use concepts but you're doing it wrong |
22:52:02 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3OlK |
22:53:34 | Amun-Ra | thanks Elegantbeef |
23:00:04 | FromDiscord | <tandy> `to(objStore, Table[objStore.userId, User])` is this legal? |
23:00:30 | FromDiscord | <tandy> im trying to make a hashtable of `User` objects, indexed by `userId: string` |
23:01:04 | Amun-Ra | Elegantbeef: can I use var Self in concepts? as in: https://play.nim-lang.org/#ix=3OlN |
23:01:35 | FromDiscord | <tandy> initially i was doing this `storedUsers = to(objStore, seq[User])`, maybe its easier to convert seq to table.. |
23:01:45 | FromDiscord | <Elegantbeef> You can use Self inside new concepts |
23:02:04 | FromDiscord | <Elegantbeef> oh you said `var Self` |
23:02:29 | FromDiscord | <Elegantbeef> I dont know if new concepts support this |
23:02:44 | FromDiscord | <tandy> so i guess my question is now\: |
23:03:06 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3OlO i think the best you can do is |
23:03:15 | FromDiscord | <tandy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/938207770686156820): so i guess my question is now\:↵how to convert `seq[User]` to `Table[User.userId: string, User]` |
23:06:32 | FromDiscord | <tandy> i figured |
23:06:34 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3OlR |
23:06:59 | Amun-Ra | Elegantbeef: yes, looks like it works that way in old concepts, thanks again https://play.nim-lang.org/#ix=3OlO |
23:08:14 | * | rp1 quit (Ping timeout: 256 seconds) |
23:08:45 | FromDiscord | <tandy> nvm, cant do that to tables |
23:11:50 | FromDiscord | <huantian> In reply to @tandy "[Edit](https://discord.com/channels/371759389889003": You could use collect from std/sugar |
23:13:05 | FromDiscord | <tandy> ooo↵(@huantian) |
23:13:09 | FromDiscord | <tandy> leme peep the documentation |
23:22:06 | FromDiscord | <kevin> Any idea why Nim would be treating a pointer as a 32 bit value? |
23:22:08 | FromDiscord | <kevin> https://media.discordapp.net/attachments/371759389889003532/938212653212504094/unknown.png |
23:22:18 | FromDiscord | <kevin> Top one is from C, bottom is a Nim ptr |
23:22:33 | FromDiscord | <Elegantbeef> What's the code? |
23:24:13 | FromDiscord | <leorize> it's likely colored |
23:24:22 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3OlV |
23:24:46 | FromDiscord | <leorize> what is this GetOutputData of yours? |
23:24:53 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3OlW |
23:25:10 | FromDiscord | <kevin> (edit) "https://play.nim-lang.org/#ix=3OlW" => "https://paste.rs/eJk" |
23:25:19 | FromDiscord | <Elegantbeef> the C code? |
23:25:28 | FromDiscord | <leorize> `nodecl`? that's sus |
23:25:42 | FromDiscord | <leorize> are you using any form of `#include`? |
23:25:48 | FromDiscord | <Elegantbeef> If you notice the lower half of the Nim output is the same |
23:26:13 | FromDiscord | <Elegantbeef> So something is "properly" working |
23:26:16 | FromDiscord | <kevin> I'm trying to basically just create a wrapper for this C function |
23:26:27 | FromDiscord | <kevin> so it returns a string instead of a cstring |
23:26:29 | FromDiscord | <Elegantbeef> Sure what's the C function |
23:27:03 | FromDiscord | <kevin> https://github.com/trustedsec/COFFLoader/blob/main/beacon_compatibility.c#L338 |
23:27:29 | FromDiscord | <leorize> can you try changing nodecl to cdecl? |
23:27:34 | FromDiscord | <kevin> ok |
23:28:21 | FromDiscord | <kevin> nah still the same |
23:28:22 | FromDiscord | <leorize> btw your outputsize parameter is wrong, it should be `ptr cint` |
23:30:02 | NimEventer | New thread by Wils: Problem compiling ASM code with vars in Mac M1, see https://forum.nim-lang.org/t/8860 |
23:30:21 | FromDiscord | <kevin> I can try ptr cint I guess |
23:30:48 | FromDiscord | <kevin> The thing is Nim is cutting off half of my pointer value ... maybe something with the way I'm importing my function Nim thinks it's a 32 bit return value? idk |
23:31:27 | FromDiscord | <Elegantbeef> No `ptr char` is `sizeof(int)` |
23:31:53 | FromDiscord | <Elegantbeef> So unless your C code you're calling magiically converts your PC to 32 bit temporarily i think it's off |
23:33:40 | FromDiscord | <leorize> it's unlikely, `ffffffff` is too magical to be a cut-off |
23:34:56 | FromDiscord | <leorize> can you try printing with `echo cast[int](output).toHex()`? |
23:34:58 | FromDiscord | <leorize> you will have to import `strutils` |
23:35:19 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3OlZ |
23:35:20 | FromDiscord | <kevin> something like that is what I get |
23:35:35 | FromDiscord | <kevin> clearly the Nim ptr value is cut off from the C ptr |
23:37:58 | FromDiscord | <leorize> can you try `--nimcache:pick/a/folder` and check the generated C for the module you're compiling? |
23:38:57 | Amun-Ra | kevin: can you paste nim code that calls the function? |
23:39:28 | FromDiscord | <leorize> just look for a `Blah_` in the C file and you should be able to find the function |
23:44:52 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3Om7 |
23:45:10 | FromDiscord | <kevin> C code for GetOutputData is https://github.com/trustedsec/COFFLoader/blob/main/beacon_compatibility.c#L338 |
23:49:56 | Amun-Ra | kevin: does that work? https://play.nim-lang.org/#ix=3Oma |
23:50:57 | termer | How would I import a module that's in the parent directory of the current module? |
23:51:00 | termer | I can't seem to use ../ |
23:51:23 | Amun-Ra | termer: that should work |
23:51:38 | termer | import ../[utils] |
23:51:48 | termer | cannto open file: ../[utils] |
23:51:48 | FromDiscord | <leorize> sent a code paste, see https://play.nim-lang.org/#ix=3Omb |
23:52:24 | FromDiscord | <leorize> the return type `NCSTRING` is defined as `typedef char NCSTRING;` in `nimbase.h` |
23:53:00 | termer | Is there a way to import multiple packages from a relative path? |
23:53:05 | termer | using [] in it makes it fail |
23:53:32 | FromDiscord | <kevin> In reply to @Amun-Ra "<@281679831119167489>: does that work?": Yeah actually this does work! 🥳 |
23:53:36 | FromDiscord | <Elegantbeef> I think `".."/[utils, thingA]` works |
23:55:02 | Amun-Ra | kevin: \o/ |
23:55:29 | termer | Elegantbeef it doesn't work |
23:55:43 | termer | import ../[objects, client] |
23:55:49 | termer | cannot open file: ../[objects, client] |
23:55:51 | termer | Is that a bug |
23:55:57 | termer | because ../objects works |
23:56:00 | termer | and ../client also does |
23:56:08 | FromDiscord | <Elegantbeef> Did you do the string thing? |
23:56:15 | FromDiscord | <Elegantbeef> It's a known issue with `../` iirc |
23:56:46 | termer | the string thing? |
23:57:05 | FromDiscord | <Elegantbeef> Make `..` a string literal |
23:57:12 | FromDiscord | <Elegantbeef> so it's `".."/[client, objects]` |
23:57:24 | termer | hmm, that seems to work |
23:57:26 | termer | odd but I'll take it |
23:57:32 | termer | thanks |
23:57:42 | FromDiscord | <Elegantbeef> I think the issue is `../` is taken as an operator and doesnt play with `[]` |
23:58:01 | termer | that makes sense but definitely should be changed |
23:58:15 | FromDiscord | <abenedic (Alex Benedict)> Hello, I am probably trying to do something really stupid, but I am porting some of my C++ code that uses X macros to nim to learn the language. Currently I am trying something like https://play.nim-lang.org/#ix=3Omc and I would like to be able to return an `of` for a case statement from a template, but that doesn't seem to work. Should I use a macro for that or I am I going about this in entirely the wrong way? |
23:59:26 | FromDiscord | <Elegantbeef> Macro |
23:59:38 | FromDiscord | <Elegantbeef> `of x: y` isnt valid AST |
23:59:46 | FromDiscord | <Elegantbeef> So you need a macro to handle your input and turn it into your output |