00:54:31 | * | derpydoo quit (Ping timeout: 260 seconds) |
01:03:19 | FromDiscord | <dlesnoff> sent a code paste, see https://play.nim-lang.org/#ix=4bKP |
01:08:05 | FromDiscord | <Elegantbeef> > match email addresses with regular expressions↵Ruh roh |
01:08:27 | FromDiscord | <Elegantbeef> Jokes aside i dont know regex APIs good enough to say anything |
01:08:48 | FromDiscord | <Rika> Your last parameter to match should be 0 or not there |
01:08:49 | FromDiscord | <Generic> wasn't validating email adresses kind of a joke |
01:09:04 | FromDiscord | <Generic> because so many things are potentially valid? |
01:09:12 | FromDiscord | <Elegantbeef> Yes the spec is wild |
01:09:38 | FromDiscord | <Elegantbeef> https://en.wikipedia.org/wiki/Email_address#Examples |
01:10:40 | * | arkurious quit (Remote host closed the connection) |
01:15:13 | FromDiscord | <sklorn> sent a code paste, see https://play.nim-lang.org/#ix=4bKR |
01:16:30 | FromDiscord | <sklorn> (edit) "https://play.nim-lang.org/#ix=4bKR" => "https://play.nim-lang.org/#ix=4bKT" |
01:16:51 | FromDiscord | <sklorn> (edit) |
01:19:40 | FromDiscord | <Elegantbeef> https://internet-of-tomohiro.netlify.app/nim/faq.en.html#coding-how-to-store-different-types-in-seqqmark |
01:20:20 | FromDiscord | <sklorn> Yesss thank you |
01:20:36 | FromDiscord | <Generic> the union pragma is very low level and directly translates into a C union type |
01:20:49 | FromDiscord | <auxym> In reply to @Generic "wasn't validating email adresses": yes https://code.iamcal.com/php/rfc822/full_regexp.txt or juste use `@` |
01:21:39 | * | wallabra_ joined #nim |
01:23:45 | * | wallabra quit (Ping timeout: 268 seconds) |
01:23:49 | * | wallabra_ is now known as wallabra |
01:31:52 | FromDiscord | <dlesnoff> In reply to @Rika "Your last parameter to": Thank you! It was indeed the issue. In the doc, there is a 2 as a parameter and I confused it with the number of matches. This parameter is in fact simply the starting index for the search. |
01:32:53 | FromDiscord | <Rika> your regex kinda looks generally funky too |
01:33:33 | FromDiscord | <Rika> `([\w\.])\+?[\w\.]` kinda doesnt make sense, what is the end [] for? why do you have a inside () then +? for it outside? |
01:33:49 | FromDiscord | <dlesnoff> In reply to @Generic "wasn't validating email adresses": Yes, it is recommended everywhere to NOT use regexp for email adress capturing/validation but I am here to learn |
01:33:50 | FromDiscord | <Rika> wait dumb, never mind the inside |
01:34:20 | FromDiscord | <Rika> (edit) "wait dumb, never mind the inside ... " added "part" |
01:34:32 | FromDiscord | <dlesnoff> I am removing the part between + and @ symbols |
01:34:33 | FromDiscord | <Rika> i get everything but the end [] part |
01:35:03 | FromDiscord | <Rika> ah, it is escaped + as in raw + and not "because this isnt extended regexp" escaped + meaning "actual" _ |
01:35:05 | FromDiscord | <Rika> (edit) "_" => "+" |
01:35:18 | FromDiscord | <Rika> regex dialects are nice |
01:35:18 | FromDiscord | <dlesnoff> The end is just to ensure there is no special characters other than bla.domain.com |
02:03:49 | FromDiscord | <Rika> I think one of the worst parts of regex is that there is no “one standard” |
02:04:11 | FromDiscord | <Rika> Even if PCRE is fairly popular you will still definitely find another dialect that’s well used |
02:04:16 | FromDiscord | <Patitotective> time for regex 2 |
02:04:43 | FromDiscord | <Patitotective> hellex |
02:05:13 | FromDiscord | <Rika> Rage-ex |
02:12:03 | * | Guest88 joined #nim |
02:12:25 | * | Guest88 quit (Client Quit) |
02:14:25 | FromDiscord | <dlesnoff> sent a long message, see http://ix.io/4bL0 |
02:16:28 | FromDiscord | <Rika> In reply to @Jiezron "My standard is this": Yeah I was thinking of Vim regex actually, which does the “\+ is the one or more operator” thing |
02:16:53 | FromDiscord | <Rika> I love regex 😄 |
03:14:08 | FromDiscord | <huantian> Wait not everyone uses plus as one or more?? |
03:17:28 | FromDiscord | <Rika> Not every regex notation uses unescaped plus |
03:17:32 | FromDiscord | <Rika> For that |
03:18:03 | FromDiscord | <huantian> Interesting |
03:46:36 | * | sagax quit (Ping timeout: 260 seconds) |
03:49:16 | FromDiscord | <wiga> is there some way to encode a string into a openarray[byte] ? |
03:49:21 | FromDiscord | <wiga> i tried using toOpenArrayByte |
03:49:39 | FromDiscord | <Elegantbeef> `myStr.toOpenArrayByte(0, myStr.high).myProc` |
03:49:41 | FromDiscord | <wiga> but couldn't find any way to make it working |
03:49:50 | FromDiscord | <wiga> In reply to @Elegantbeef "`myStr.toOpenArrayByte(0, myStr.high).myProc`": oh ty |
03:50:06 | FromDiscord | <Elegantbeef> You can also technically do `cast[seq[byte]](myString)` but that's 'unsafe' |
03:58:14 | FromDiscord | <Girvo> In reply to @Elegantbeef "You can also technically": Oh _now_ you tell me 😉 |
03:58:21 | FromDiscord | <Girvo> (kidding, kidding) |
04:01:51 | FromDiscord | <Girvo> @wiga `stew` has some useful utilities that I reference somewhat often↵https://github.com/status-im/nim-stew/blob/master/stew/byteutils.nim#L197↵This is the same solution as Beef's toOpenArray call, just thought I'd show you it as it has other implementations of `toBytes` for various types (and `fromBytes` too) |
04:02:29 | FromDiscord | <wiga> 👍 |
04:03:04 | FromDiscord | <Girvo> I use it pretty extensively to handle stuff for Modbus, too, in combination with it's `endians2.nim` module to handle endianness |
04:03:32 | FromDiscord | <Girvo> though I've extended it to handle float32, I'm adding float16 support, and have added word-order as well (because Modbus is stupid, and does Big Endian byte order, and Little Endian word order lol) |
04:04:34 | * | LuxuryMode joined #nim |
04:04:51 | FromDiscord | <Elegantbeef> It's not the same cause it allocates but yea 😄 |
04:05:13 | FromDiscord | <Girvo> Sorry, "similar solution" 😉 |
04:05:55 | * | sagax joined #nim |
04:10:09 | FromDiscord | <Elegantbeef> The conversion is required for holding onto it, but if you can you make your life easier and better by using `toOpenArray` |
04:10:13 | FromDiscord | <Elegantbeef> openarrays really are just pointers + len internally |
04:11:20 | FromDiscord | <Girvo> Yeah in my case I do need to hold on to it, but if its just for in-place usage, you're right its better to do what you did |
04:11:36 | FromDiscord | <Girvo> Well, I hold on to it at the moment. That's changing shortly wooo |
04:12:13 | FromDiscord | <wiga> In reply to @Girvo "<@795785229699645491> `stew` has some": the https://media.discordapp.net/attachments/371759389889003532/1024896355593879603/unknown.png |
04:12:23 | FromDiscord | <wiga> with `import byteutils` |
04:12:28 | FromDiscord | <wiga> yes i installed the lib |
04:12:31 | FromDiscord | <Girvo> `import stew2/byteutils` |
04:12:35 | FromDiscord | <wiga> a |
04:12:45 | FromDiscord | <wiga> not the good one tho lma |
04:12:46 | FromDiscord | <wiga> (edit) "lma" => "lmao" |
04:12:47 | FromDiscord | <Girvo> They structure their package in a pretty particular way haha |
04:13:19 | FromDiscord | <Girvo> Theres no single "entry point" import, you just import each individual module directly |
04:16:29 | FromDiscord | <wiga> ok now i have problem with my decrypt module |
04:16:38 | FromDiscord | <wiga> i dont think im gonna be able to fix lol |
04:17:28 | FromDiscord | <Girvo> Haha whats the problem? |
04:18:28 | FromDiscord | <wiga> idk |
04:18:43 | FromDiscord | <wiga> there's no error |
04:18:48 | FromDiscord | <wiga> its just not doing anything |
04:19:10 | FromDiscord | <Girvo> Probably have to share the code snippet for people to help more I think |
04:19:45 | FromDiscord | <wiga> sent a code paste, see https://play.nim-lang.org/#ix=4bLl |
04:20:19 | FromDiscord | <wiga> sent a code paste, see https://play.nim-lang.org/#ix=4bLm |
04:21:43 | FromDiscord | <Girvo> Have you chucked a few `echo` calls between each line/stepped through with a debugger? Will tell you where its choking |
04:22:02 | FromDiscord | <wiga> i'll try |
04:23:12 | FromDiscord | <wiga> wait its not getting the key |
04:23:14 | FromDiscord | <wiga> wtf |
04:23:32 | FromDiscord | <Girvo> I'm pretty sure its something to do with that `{.global.}` on that key |
04:23:35 | FromDiscord | <Girvo> You're redefining it |
04:23:55 | FromDiscord | <Girvo> Are you sure you don't just want it to take a `key: var string` rather than trying to set it as a global variabel? |
04:23:58 | FromDiscord | <Girvo> (edit) "variabel?" => "variable?" |
04:24:09 | FromDiscord | <wiga> i didnt made the module lol |
04:24:20 | FromDiscord | <Girvo> Where'd the module come from? |
04:24:27 | FromDiscord | <wiga> there you go it worked |
04:24:28 | FromDiscord | <wiga> ty |
04:24:32 | FromDiscord | <Girvo> Ah no worries haha 🙂 |
04:24:36 | FromDiscord | <wiga> the global was useless |
04:24:41 | FromDiscord | <wiga> In reply to @Girvo "Where'd the module come": friend gave me |
04:24:42 | FromDiscord | <Girvo> Yeah I figured as much |
04:24:46 | FromDiscord | <wiga> funno where its from lmfao |
04:24:49 | FromDiscord | <wiga> (edit) "funno" => "dunno" |
04:24:54 | FromDiscord | <wiga> prbly github |
04:24:55 | FromDiscord | <Girvo> Basically should never need to use the `global` pragma IMO |
04:25:47 | FromDiscord | <Elegantbeef> are you shaming me?↵(@Girvo) |
04:25:57 | FromDiscord | <Girvo> Only if you're into it 😉 |
04:26:27 | FromDiscord | <Girvo> It's funny, the inital work I did on this firmware had a fair bit of `{.global.}` but nearly all of it ended up going away |
04:28:01 | FromDiscord | <Elegantbeef> Me using 1.6 for my game |
04:28:02 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1024900335631872020/image.png |
04:28:04 | FromDiscord | <Elegantbeef> All the global variables, cause they only need t obe global |
04:28:22 | FromDiscord | <Girvo> hehe. Game dev is weird though 😉 |
04:28:35 | FromDiscord | <Girvo> all globals, share all the mutable state, lets gooooo |
04:28:56 | FromDiscord | <Elegantbeef> Eh i try to avoid globals as much as possible |
04:29:46 | FromDiscord | <Elegantbeef> but the refactor to all my code to use a gamestate object and pass it as a parameter feels a bit bad |
04:30:08 | FromDiscord | <Girvo> I have a book on multithreaded game engine development in C++, its hilariously all just global objects with mutated state |
04:30:35 | FromDiscord | <Girvo> But hey its also really fast, so, trade offs I guess. Not so bad if a game crashes: really bad if our IoT hardware crashes out in the deep Papua New Guinea jungles lol |
04:31:20 | FromDiscord | <Elegantbeef> Look at this guy saying games are useless |
04:31:32 | FromDiscord | <Elegantbeef> 0/10 |
04:31:38 | FromDiscord | <Girvo> Oh god I'm going to get cancelled by gamers now |
04:31:52 | FromDiscord | <Rika> In reply to @Elegantbeef "Look at this guy": Games are useless |
04:32:06 | FromDiscord | <Rika> Life is a game therefore life is useless |
04:32:10 | FromDiscord | <Rika> Time to stop living |
04:32:18 | FromDiscord | <Girvo> The logic is undeniable |
04:32:18 | FromDiscord | <Elegantbeef> Dont need to tell me twice |
04:32:42 | FromDiscord | <Elegantbeef> I keep implementing less that useless parts to my game |
04:33:19 | FromDiscord | <Elegantbeef> So eventually i'll wrap around to games being useful |
04:33:47 | FromDiscord | <Girvo> haha |
04:35:21 | FromDiscord | <demotomohiro> In reply to @Girvo "I have a book": I think it uses global variables just for making code simpler. Using global variables in small code is fine. |
04:36:30 | FromDiscord | <Elegantbeef> soon a glimpse of my useless looney tunes level complete animation will appear |
04:37:10 | FromDiscord | <Elegantbeef> Kooha-2022-09-28-16-41-47.webm [Kooha-2022-09-28-16-41-47.webm](https://t2bot.io/_matrix/media/r0/download/matrix.org/vLhCyNnFRqgBlrRvgtSgiKIA) |
04:39:40 | FromDiscord | <Elegantbeef> finds out that matrix uploads dont embed in discord |
04:39:48 | FromDiscord | <Elegantbeef> Atleast videos |
04:42:14 | FromDiscord | <wiga> Imagine having issues with video embedding with bridges |
04:42:31 | FromDiscord | <Elegantbeef> Yea let's all moe to matrix |
04:42:37 | FromDiscord | <Elegantbeef> Atleast then people will moderate the spammers using tools |
04:43:15 | FromDiscord | <wiga> Discord with their broken video embedder |
04:43:27 | FromDiscord | <Elegantbeef> https://streamable.com/0ua2pp solves the problem of forced download |
04:44:04 | FromDiscord | <wiga> Imma try to make an image hoster in nim |
04:44:26 | FromDiscord | <wiga> Backend development seems funny in nim |
04:44:42 | FromDiscord | <wiga> What module should i use for that? |
04:45:21 | FromDiscord | <Elegantbeef> Where are all the web nerds at |
04:45:30 | FromDiscord | <wiga> Dunno |
04:45:42 | FromDiscord | <wiga> Ik jester is a thing |
04:45:55 | FromDiscord | <wiga> But is it more stable than express.js? |
04:45:58 | FromDiscord | <wiga> And faster |
04:46:30 | FromDiscord | <huantian> I think jester and prologue are the two main backend web dev stuffs |
04:46:34 | FromDiscord | <huantian> jester is pretty fast |
04:46:53 | FromDiscord | <huantian> I've never used express so idk |
04:46:57 | FromDiscord | <wiga> Any recommendations of tutorial? |
04:47:31 | FromDiscord | <wiga> Made by non-indian ytbers preferably, i like to understand what the guy says |
04:47:48 | FromDiscord | <huantian> no idea about any tutorials |
04:47:52 | FromDiscord | <wiga> a |
04:48:09 | FromDiscord | <huantian> just google jester docs or jester tutorial |
04:48:16 | FromDiscord | <Elegantbeef> There isnt a lot of educational content around Nim |
04:49:19 | FromDiscord | <wiga> In reply to @huantian "just google jester docs": Jester docs are eh |
04:49:39 | FromDiscord | <wiga> Last time i checked them there was not that much stuff going on there |
04:49:51 | FromDiscord | <huantian> I mean it's a simple library |
04:50:18 | FromDiscord | <wiga> I'll check later |
04:50:25 | FromDiscord | <wiga> I kinda need to sleep rn |
04:50:37 | FromDiscord | <wiga> Gotta wake up at 6am tomorrow |
04:50:46 | FromDiscord | <wiga> Its almost 1am |
04:50:51 | FromDiscord | <wiga> :neutraltroll: |
04:50:53 | FromDiscord | <huantian> maybe you should checkout prologue too tmrw |
04:50:54 | FromDiscord | <huantian> also go sleep |
04:51:00 | FromDiscord | <wiga> Yes |
04:51:30 | FromDiscord | <wiga> Another boring database course tomorrow morning :lipbite: |
05:00:05 | * | kenran joined #nim |
05:09:11 | FromDiscord | <Phil> Prologue is my thing |
05:09:17 | FromDiscord | <Phil> Can't support much about jester |
05:10:47 | FromDiscord | <Phil> As for tutorials, there isn't much. The docs are good, but they aren't going to explain the fundamentals of webdev to you |
05:16:05 | FromDiscord | <huantian> prologue is looking good rn tbh |
05:16:14 | FromDiscord | <huantian> if I need to make a backend web app I'm using prologue probably lol |
05:18:21 | FromDiscord | <Phil> I recommend first learning to write an html page (which means also learning CSS).↵Decent YouTube videos around that (and the CSS framework bootstrap) are on the channel traversymedia.↵↵After that you can look at a web framework to wrap your head around how you can generate that html instead of writing repetitive bits by hand via so called template languages, something like nimja |
05:33:49 | FromDiscord | <Phil> sent a long message, see http://ix.io/4bLw |
05:49:30 | * | rockcavera quit (Remote host closed the connection) |
05:53:39 | * | qwr quit (Ping timeout: 248 seconds) |
06:15:15 | * | qwr joined #nim |
06:46:56 | FromDiscord | <Girvo> In reply to @demotomohiro "I think it uses": This book is _very_ not simple though 🙂 It builds a full game engine around DX9, ends up being 50,000 LoC by the end of it lol |
06:47:34 | FromDiscord | <Elegantbeef> I'd rather write vulkan 😄 |
06:47:34 | FromDiscord | <Elegantbeef> jeez dx9 |
06:48:01 | FromDiscord | <Girvo> Yeah its rough lol. Interesting book though! |
06:49:10 | FromDiscord | <Elegantbeef> I just imagine the modern landscape is full of making games using ECS |
06:58:47 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
07:03:50 | FromDiscord | <Bung> @ElegantBeef araq said const closure should make it work : ( |
07:28:55 | * | m5zs7k quit (Ping timeout: 268 seconds) |
07:30:01 | * | pro joined #nim |
07:32:44 | * | pro quit (Client Quit) |
07:33:22 | * | pro joined #nim |
07:33:23 | * | m5zs7k joined #nim |
07:51:01 | * | jmdaemon quit (Ping timeout: 244 seconds) |
07:56:55 | * | Vladar joined #nim |
07:59:53 | NimEventer | New thread by drkameleon: See generated code after template processing?, see https://forum.nim-lang.org/t/9498 |
08:12:00 | FromDiscord | <whisper> So..how can I make intellisense working in vscode? |
08:21:35 | * | pro quit (Quit: pro) |
08:31:18 | * | pro joined #nim |
08:33:09 | * | pro quit (Client Quit) |
08:33:38 | FromDiscord | <Horizon [She/Her]> std/channels was removed from devel? There's a PR to add it back |
08:35:32 | FromDiscord | <Elegantbeef> New channels it seems |
08:36:05 | FromDiscord | <Horizon [She/Her]> Ah |
08:36:24 | FromDiscord | <Elegantbeef> No longer need to open them |
08:36:51 | FromDiscord | <Elegantbeef> And they should work with isolated |
08:37:01 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/pull/20412 @ElegantBeef `proc doThing(a: seq, b: set, c: array)` do you have real code ? |
08:37:20 | FromDiscord | <Bung> I need confirm this will not break |
08:38:08 | FromDiscord | <Elegantbeef> I linked a bunch of usages of me using it |
08:38:08 | FromDiscord | <Elegantbeef> Oh of seq/array/set |
08:38:28 | FromDiscord | <Elegantbeef> No clue if anyone uses it |
08:39:16 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "And they should work": Hm interesting |
08:40:21 | FromDiscord | <Bung> if it previously works fine |
08:55:38 | FromDiscord | <federico3> there's no mention of supporting OpenSSL 3 in https://nim-lang.org/blog/2022/09/27/version-168-released.html - how comes? |
09:06:34 | FromDiscord | <Elegantbeef> #internals ? |
09:10:16 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=4bMU |
09:33:40 | FromDiscord | <wiga> In reply to @Isofruit "<@795785229699645491> I": I already know html css sql and stuff i just only use express for my backends |
10:01:35 | FromDiscord | <konradmb> sent a code paste, see https://play.nim-lang.org/#ix=4bNi |
10:18:10 | FromDiscord | <Mrcool> I use a pipe for this https://github.com/sigmaSd/deno-nim/blob/master/examples/deno_show.nim#L21 |
10:48:23 | * | arkurious joined #nim |
10:49:13 | * | Vladar quit (Quit: Leaving) |
11:14:45 | * | watching joined #nim |
11:24:20 | * | watching quit (Ping timeout: 252 seconds) |
11:36:27 | FromDiscord | <Prestige> What are you tying to do konradmb? |
11:38:12 | FromDiscord | <Prestige> You could just `for i in ["1","2","3"]: echo i` |
11:54:44 | * | vicecea joined #nim |
12:05:14 | FromDiscord | <untoreh> with new nim version, compiling a func that does `rangeCheck` with `--panics=on` complains about sideeffects (`sysFatal`) should I just swap the func for a proc? |
12:05:33 | FromDiscord | <untoreh> (edit) "proc?" => "proc?🤔" |
12:37:46 | FromDiscord | <konradmb> @Prestige\: I wanted to chain mapIt inside mapIt and since I can't change "it", I had to use map with anon proc. Then I thought - why not drop two maps and do it manually in proc. But it doesn't work that way, so I rewrote the whole chain in another way. I just want to push Nim to the limit 😈 |
13:01:05 | FromDiscord | <konradmb> @untoreh\: from what I remeber func functions only as a self-imposed restriction - it doesn't make compiled code more optimised or something |
13:03:00 | FromDiscord | <untoreh> is there a compiler option to turn of the effect system? since it affects multiple packages, or I will just have to go with panics:off |
13:05:11 | FromDiscord | <flywind> Open an issue? Probably a regression |
13:07:06 | FromDiscord | <untoreh> It treats defects as side effects so I assumed it was an intentional change |
13:07:59 | * | derpydoo joined #nim |
13:13:28 | FromDiscord | <flywind> What's the error message? |
13:21:30 | FromDiscord | <untoreh> nvm, I think I just happened to enable panics recently, when I thought I did have them enabled already, so It has always been this way 😛 >.< it is not a regression |
13:28:48 | FromDiscord | <auxym> In reply to @konradmb "<@778498877464117248>\: I wanted to": if you're doing a lot of chaining map/filter/fold etc, you might like https://github.com/zero-functional/zero-functional |
13:44:30 | * | dnh joined #nim |
14:39:14 | FromDiscord | <Phil> In reply to @wiga "I already know html": Ah, in that case apologies. Already taken a look at nimja? |
14:39:33 | FromDiscord | <wiga> In reply to @Isofruit "Ah, in that case": nah |
14:40:27 | FromDiscord | <Phil> It's pretty fast from the benchmarks I saw and I'm at least not aware of any obvious missing features |
14:42:04 | NimEventer | New thread by EnteryName: Troubles with autocompletion with VSC and third party packages, see https://forum.nim-lang.org/t/9499 |
14:45:27 | FromDiscord | <Phil> Also I can generally recommend the webdev channel, I have more of an eye on there than main |
14:46:03 | FromDiscord | <Phil> And I believe so do a decent chunk of other webdev folks here |
15:02:17 | FromDiscord | <Tekk> is there an easy way to step through a range of floats in a for loop? |
15:07:24 | FromDiscord | <Phil> Step through as in loop through? |
15:09:32 | FromDiscord | <Tekk> yeah |
15:09:43 | FromDiscord | <Tekk> i mean step as in maybe setting a step size |
15:10:48 | FromDiscord | <Tekk> actually now that im asking it sounds stupid 😅 |
15:15:14 | FromDiscord | <Phil> In reply to @Tekk "i mean step as": Hmm would a for each loop do since that's the simplest language construct |
15:15:19 | FromDiscord | <Phil> (edit) "construct" => "construct?" |
15:15:36 | FromDiscord | <Phil> Otherwise you go into iterating by index |
15:16:03 | FromDiscord | <Tekk> im thinking something like -1.0..1.0..0.1 maybe |
15:16:09 | FromDiscord | <Tekk> but that just looks horrible |
15:16:35 | FromDiscord | <Tekk> GDScript has a range function similar to what im saying |
15:16:48 | FromDiscord | <Tekk> nim manual only has a subrange thing for types |
15:21:14 | FromDiscord | <can.l> You could define such an iterator yourself: |
15:21:25 | FromDiscord | <can.l> sent a code paste, see https://play.nim-lang.org/#ix=4bPc |
15:21:58 | FromDiscord | <Tekk> if its that simple why isnt it a part of nim? |
15:24:34 | FromDiscord | <can.l> I am sure that there is a package which implements something like this somewhere. |
15:24:50 | FromDiscord | <Phil> You can't really have everything anyone would want in the stdlib, somebody needs to maintain it and given that it's easy to implement yourself and at the same time the usecase not that often occurring, it wasn't turned into stdlib code |
15:25:09 | FromDiscord | <Tekk> true, ture |
15:25:11 | FromDiscord | <Tekk> (edit) "ture" => "true" |
15:25:32 | FromDiscord | <can.l> At least to me it seems like an iterator which is used a lot in a certain domain (maybe game development), but not needed generally. |
15:25:36 | FromDiscord | <Phil> Generally there's a lot of really good stuff in packages |
15:25:49 | FromDiscord | <Phil> Like constructor |
15:55:20 | FromDiscord | <auxym> I mean even python doesn't have linspace builtin, it comes as part of numpy |
15:56:28 | FromDiscord | <auxym> here, for Nim, arraymancer has linspace: https://mratsim.github.io/Arraymancer/init_cpu.html |
15:57:26 | FromDiscord | <Horizon [She/Her]> How would i represent this in a cleaner way for Nim? https://github.com/marteinn/Lua-Interpreter-In-Python/blob/master/luatopy/parser.py#L33 |
15:57:43 | FromDiscord | <Horizon [She/Her]> (The TokenType to Precedence mapping) |
15:58:00 | FromDiscord | <Horizon [She/Her]> Just a method that returns the precedence value of an enum? |
16:05:56 | * | wallabra_ joined #nim |
16:07:23 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=4bPv |
16:07:50 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=4bPv" => "https://play.nim-lang.org/#ix=4bPw" |
16:08:02 | FromDiscord | <aruZeta> @Horizon [She/Her] |
16:08:09 | * | wallabra quit (Ping timeout: 268 seconds) |
16:08:10 | * | wallabra_ is now known as wallabra |
16:17:48 | FromDiscord | <Horizon [She/Her]> Ah thanks! Also, `pure` doesn't do anything anymore for us anymore |
16:17:55 | FromDiscord | <konradmb> @auxym\: I did check it out earlier and it is nice, but I miss calling external procs inside `-->` |
16:37:00 | FromDiscord | <Mr. Rc> i am trying to work with winim/clr to invoke a function from a .net assembly but whenever i try to invoke the function it gives me unable to invoke specified member: <functionname> error |
16:37:08 | FromDiscord | <Mr. Rc> does anyone have any idea about this? |
16:37:51 | FromDiscord | <Mr. Rc> not sure if i am doing it right https://media.discordapp.net/attachments/371759389889003532/1025083999804194978/unknown.png |
16:38:40 | * | jmdaemon joined #nim |
17:00:32 | FromDiscord | <Mr. Rc> nevermind, figured it out |
17:08:49 | * | wallabra quit (Ping timeout: 246 seconds) |
17:11:15 | * | wallabra joined #nim |
17:16:35 | * | pro joined #nim |
17:21:07 | * | wallabra quit (Ping timeout: 265 seconds) |
17:21:25 | * | wallabra joined #nim |
17:40:52 | * | pro quit (Quit: pro) |
17:42:08 | * | xaltsc joined #nim |
17:47:05 | * | neceve quit (Quit: ZNC - https://znc.in) |
17:48:16 | * | neceve joined #nim |
18:23:00 | FromDiscord | <jan Apisu> how to iterate over a string |
18:23:04 | FromDiscord | <jan Apisu> and get the index too |
18:23:17 | FromDiscord | <jan Apisu> or iterate over a string and get the next character too |
18:27:07 | * | kenran quit (Remote host closed the connection) |
18:31:11 | * | rockcavera joined #nim |
18:31:11 | * | rockcavera quit (Changing host) |
18:31:11 | * | rockcavera joined #nim |
18:31:33 | FromDiscord | <Horizon [She/Her]> Working on Nim JVM and suffering lmao |
18:31:37 | FromDiscord | <Horizon [She/Her]> Finally making progress |
18:36:01 | FromDiscord | <jan Apisu> https://media.discordapp.net/attachments/371759389889003532/1025113738153566261/unknown.png |
18:42:32 | FromDiscord | <Horizon [She/Her]> If i make a sequence that adds values to it from the 0 index (so add is more like `insert(val, 0)`), what would be an appropriate name for it? It adds a `JMethod` to a sequence like a queue |
18:44:03 | FromDiscord | <Horizon [She/Her]> Nvm just named it `queue` |
18:46:20 | * | derpydoo quit (Quit: derpydoo) |
18:47:24 | FromDiscord | <Horizon [She/Her]> Hm idk what the equivalent of `insert` is for a single value |
18:47:44 | FromDiscord | <jan Apisu> prepend |
18:47:46 | FromDiscord | <jan Apisu> (edit) "prepend" => "`prepend`" |
18:47:49 | * | krux02 joined #nim |
18:49:14 | FromDiscord | <Horizon [She/Her]> That creates a new seq, `system.insert` does what i need, was looking at sequtils :p |
18:50:52 | * | wallabra_ joined #nim |
18:52:09 | * | wallabra quit (Ping timeout: 268 seconds) |
18:52:35 | * | derpydoo joined #nim |
18:52:39 | FromDiscord | <huantian> In reply to @jan Apisu "": yeah iterating by index is probably the best way to do this |
18:52:47 | FromDiscord | <huantian> but I don't do string parsing much so what do I know |
18:53:08 | * | wallabra_ is now known as wallabra |
18:54:39 | FromDiscord | <jan Apisu> i want to learn nim |
18:54:47 | FromDiscord | <jan Apisu> so i thought id solve problems on codewars |
18:54:59 | FromDiscord | <jan Apisu> but most of them are string related |
18:56:17 | FromDiscord | <jan Apisu> sent a code paste, see https://play.nim-lang.org/#ix=3OzE |
18:57:15 | FromDiscord | <Horizon [She/Her]> `` means to export something |
18:57:21 | * | wallabra_ joined #nim |
18:57:26 | FromDiscord | <Horizon [She/Her]> So you can use it in another module if imported, for example |
18:58:00 | FromDiscord | <jan Apisu> weird |
18:58:03 | * | wallabra quit (Ping timeout: 244 seconds) |
18:58:19 | FromDiscord | <jan Apisu> in python we have to add it to `all` |
18:58:27 | FromDiscord | <jan Apisu> (edit) "in python we have to add it to `all` ... " added "list" |
18:58:30 | FromDiscord | <jan Apisu> even weirdeer |
18:58:31 | FromDiscord | <jan Apisu> (edit) "weirdeer" => "weirder" |
18:59:12 | * | wallabra_ is now known as wallabra |
19:04:49 | FromDiscord | <jan Apisu> how do we add two sequences |
19:05:35 | FromDiscord | <demotomohiro> !eval echo @[1, 2] & @[3, 4] |
19:06:00 | * | NimBot joined #nim |
19:07:25 | FromDiscord | <demotomohiro> List of what you can do with sequences: https://nim-lang.org/docs/system.html#system-module-seqs |
19:07:38 | * | LuxuryMode joined #nim |
19:09:36 | FromDiscord | <jan Apisu> sent a code paste, see https://play.nim-lang.org/#ix=4bPQ |
19:09:38 | FromDiscord | <jan Apisu> idk why this doesnt stop the recursion |
19:11:12 | FromDiscord | <jan Apisu> (edit) "https://play.nim-lang.org/#ix=4bPQ" => "https://play.nim-lang.org/#ix=4bPR" |
19:15:18 | FromDiscord | <jan Apisu> because im stupid |
19:17:54 | FromDiscord | <jan Apisu> nice |
19:17:56 | FromDiscord | <jan Apisu> sent a code paste, see https://play.nim-lang.org/#ix=4bPU |
19:18:27 | FromDiscord | <jan Apisu> the return isnt required |
19:20:16 | FromDiscord | <Generic> it is probably faster if you would pass in a var seq and add elements to it |
19:21:12 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4bPW |
19:21:31 | FromDiscord | <jan Apisu> yep |
19:24:31 | FromDiscord | <jan Apisu> `proc solution(w: int, h: int): optional[seq[int]] =` |
19:24:46 | FromDiscord | <jan Apisu> i want to be able to return null |
19:25:13 | FromDiscord | <Horizon [She/Her]> Anyone know how I'd return a reference to a value in a sequence? |
19:27:07 | FromDiscord | <Horizon [She/Her]> I don't need to use a reference, but this would definitely make the code cleaner imo |
19:29:34 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4bPY |
19:30:32 | FromDiscord | <Horizon [She/Her]> It returns a var int? |
19:30:37 | FromDiscord | <Horizon [She/Her]> How does that even work? |
19:33:19 | FromDiscord | <demotomohiro> According to nim manual:↵> A proc, converter, or iterator may return a var type which means that the returned value is an l-value and can be modified by the caller. |
19:33:35 | FromDiscord | <Horizon [She/Her]> Oh wait then that'd mean i wouldn't need to use a reference |
19:33:59 | FromDiscord | <Horizon [She/Her]> Wait I'm using a template so I don't even need to return a reference |
19:35:20 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4bQ3 |
19:37:35 | FromDiscord | <jan Apisu> In reply to @demotomohiro "This doesn't return a": so are ints mutable? |
19:42:48 | FromDiscord | <demotomohiro> `var` variables are mutable but `let` or `const` are immutable. |
19:43:40 | FromDiscord | <demotomohiro> Adding `var` to a parameter or a return type makes them mutable. |
19:54:24 | FromDiscord | <ShalokShalom> How would you check if a file exists? |
19:54:32 | FromDiscord | <ShalokShalom> Like, on the host os |
19:54:53 | FromDiscord | <Yardanico> `fileExists` ? |
19:55:08 | FromDiscord | <Yardanico> std/os can be useful for these kind of tasks obviously |
19:59:25 | FromDiscord | <ShalokShalom> thanks |
20:03:09 | FromDiscord | <albassort> In reply to @Event Horizon "Working on Nim JVM": you're that guy? (guy being gender neutral) |
20:05:44 | * | wallabra quit (Ping timeout: 244 seconds) |
20:06:57 | FromDiscord | <ShalokShalom> Forrest? |
20:06:58 | FromDiscord | <Horizon [She/Her]> In reply to @albassort "you're that guy? (guy": Wdym by that guy? I've been talked about? xD |
20:07:07 | FromDiscord | <Horizon [She/Her]> In reply to @ShalokShalom "Forrest?": Yup that's me! |
20:07:14 | FromDiscord | <ShalokShalom> Whats this? https://media.discordapp.net/attachments/371759389889003532/1025136691368955944/Screenshot_10.png |
20:08:03 | FromDiscord | <Yardanico> In reply to @ShalokShalom "Whats this?": i think you might want to read the first nim tutorial |
20:08:09 | FromDiscord | <Yardanico> you compile and run by doing `nim c -r` or `nim r` |
20:08:20 | FromDiscord | <Yardanico> https://nim-lang.org/docs/tut1.html |
20:08:21 | FromDiscord | <ShalokShalom> I already tried -r before |
20:08:26 | FromDiscord | <Yardanico> it's not `nim -r` |
20:08:27 | FromDiscord | <ShalokShalom> And the manual speaks about --run as well |
20:08:31 | FromDiscord | <Yardanico> it's either `nim c -r` or `nim r` |
20:08:51 | FromDiscord | <Yardanico> In reply to @ShalokShalom "And the manual speaks": yes, `-r` is a shorthand of `--run` |
20:08:54 | FromDiscord | <Yardanico> `nim compile --run file.nim` |
20:09:10 | FromDiscord | <Yardanico> `nim c -r file.nim` |
20:09:12 | FromDiscord | <Yardanico> same meaning |
20:09:35 | FromDiscord | <ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/1025137285760553103/Screenshot_12.png |
20:09:48 | FromDiscord | <Yardanico> but that's the _option_ |
20:09:49 | FromDiscord | <Yardanico> not the command |
20:09:55 | FromDiscord | <ShalokShalom> i am tired |
20:09:56 | FromDiscord | <Yardanico> you have to tell the compiler at least one command |
20:10:12 | FromDiscord | <Yardanico> also your code is wrong - if you want to store the result of a call in a variable, you do it another way |
20:10:26 | FromDiscord | <ShalokShalom> you wanna tell me there is one r command and a --run option |
20:10:32 | FromDiscord | <Yardanico> maybe you should still give tut1/tut2 a read ? :) |
20:10:33 | FromDiscord | <ShalokShalom> And the two are entirely different things |
20:10:45 | FromDiscord | <ShalokShalom> That sounds like confusing API design 😛 |
20:10:47 | FromDiscord | <ShalokShalom> Thanks |
20:11:15 | FromDiscord | <ShalokShalom> In reply to @Yardanico "also your code is": Yeah, I assumed already. I just wrote this blindly, as I assumed it might be 🙂 |
20:11:17 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4bQi |
20:11:18 | FromDiscord | <Yardanico> assuming you installed the shell package of course |
20:11:23 | FromDiscord | <ShalokShalom> No expectations of that already working. |
20:11:31 | FromDiscord | <ShalokShalom> Yes, did that at least 😄 |
20:11:39 | FromDiscord | <ShalokShalom> Thanks a lot |
20:11:47 | * | wallabra joined #nim |
20:12:00 | FromDiscord | <Horizon [She/Her]> In reply to @Event Horizon "Wdym by that guy?": @albassort :p |
20:12:16 | FromDiscord | <Yardanico> In reply to @Event Horizon "<@217459674700578816> :p": he already got pinged since you replied to him |
20:12:34 | FromDiscord | <Horizon [She/Her]> I typically turn reply pings off, not sure if i did this time |
20:12:41 | FromDiscord | <albassort> In reply to @Event Horizon "Wdym by that guy?": I've used your work in my project, and I've also been mad when it doesn't work, and I've also been happy when it does |
20:12:44 | FromDiscord | <ShalokShalom> The documentation showed dirExists with proc |
20:12:50 | FromDiscord | <Yardanico> In reply to @albassort "I've used your work": which work? |
20:12:54 | FromDiscord | <albassort> nim jvm |
20:12:55 | FromDiscord | <ShalokShalom> https://nim-lang.org/docs/os.html#dirExists%2Cstring |
20:12:56 | FromDiscord | <Yardanico> In reply to @ShalokShalom "The documentation showed dirExists": yes, because it is a procedure |
20:13:01 | FromDiscord | <Yardanico> it shows you the signature of that procedure |
20:13:01 | FromDiscord | <Horizon [She/Her]> In reply to @albassort "I've used your work": Wait what? What work did i do |
20:13:03 | FromDiscord | <Yardanico> not how to call it |
20:13:07 | FromDiscord | <ShalokShalom> yeah, I assumed this is how its expected to call it |
20:13:13 | FromDiscord | <ShalokShalom> Are there no examples? |
20:13:13 | FromDiscord | <Yardanico> as I said, read the Nim tutorials at least |
20:13:17 | FromDiscord | <Horizon [She/Her]> Dou mean JNim? That ain't mine :p |
20:13:18 | FromDiscord | <ShalokShalom> thanks |
20:13:24 | FromDiscord | <Horizon [She/Her]> (edit) "Dou" => "Do you" |
20:13:30 | FromDiscord | <Yardanico> In reply to @ShalokShalom "Are there no examples?": you get the signature of the proc, so you just call it by that signature |
20:13:33 | FromDiscord | <ShalokShalom> So thats always the definition, in the docs |
20:13:39 | FromDiscord | <ShalokShalom> I see |
20:13:41 | FromDiscord | <ShalokShalom> makes sense |
20:13:42 | FromDiscord | <Yardanico> yes, unless you have the examples block |
20:13:48 | FromDiscord | <ShalokShalom> Examples would be nice too |
20:13:51 | FromDiscord | <Yardanico> some procs have examples |
20:13:54 | FromDiscord | <ShalokShalom> i see |
20:13:55 | FromDiscord | <ShalokShalom> thy |
20:14:12 | FromDiscord | <ShalokShalom> guess I could use yours now and commit that |
20:14:22 | FromDiscord | <Horizon [She/Her]> In reply to @albassort "nim jvm": Yeah idk what work of mine you could've used, nearly everything i do is incomplete- |
20:14:25 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1025138497083953312/unknown.png |
20:14:25 | FromDiscord | <Horizon [She/Her]> Or horrible to use |
20:14:25 | FromDiscord | <ShalokShalom> so the next person doesnt end up like me |
20:14:34 | FromDiscord | <Yardanico> In reply to @Yardanico "": there's an example here |
20:14:42 | FromDiscord | <ShalokShalom> yep |
20:14:52 | FromDiscord | <Yardanico> but as I said, you might get confused more and more if you haven't used Nim before - tut1 and tut2 are quite short |
20:15:03 | FromDiscord | <Yardanico> if you already know other languages it'll be easy to skim through |
20:15:04 | FromDiscord | <Yardanico> https://nim-lang.org/docs/tut1.html |
20:15:14 | FromDiscord | <ShalokShalom> thanks dear |
20:17:40 | FromDiscord | <ShalokShalom> Now it tells me, that indendation is wrong |
20:17:41 | FromDiscord | <ShalokShalom> https://github.com/Vindaar/shell#usage |
20:17:50 | FromDiscord | <ShalokShalom> But the macro is supposed to work like that |
20:18:17 | FromDiscord | <ShalokShalom> sent a code paste, see https://play.nim-lang.org/#ix=4bQl |
20:18:24 | FromDiscord | <Yardanico> you don't need && |
20:18:29 | FromDiscord | <ShalokShalom> (edit) "https://play.nim-lang.org/#ix=4bQl" => "https://play.nim-lang.org/#ix=4bQm" |
20:18:32 | FromDiscord | <Yardanico> read the readme documentatiion |
20:18:34 | FromDiscord | <Yardanico> (edit) "documentatiion" => "documentation" |
20:18:39 | FromDiscord | <Yardanico> it doesn't work 1:1 as the shell |
20:18:42 | FromDiscord | <ShalokShalom> I want to execute cd only, if git was successful |
20:18:44 | FromDiscord | <ShalokShalom> ok |
20:18:54 | FromDiscord | <ShalokShalom> but why does it complain about indendation? |
20:19:09 | FromDiscord | <Yardanico> because `&&` is not valid syntax and it confuses the lexer/parser |
20:19:12 | FromDiscord | <Yardanico> in this case |
20:19:13 | FromDiscord | <ShalokShalom> i see |
20:20:05 | FromDiscord | <ShalokShalom> https://paste.ee/p/SkvHd |
20:20:08 | FromDiscord | <ShalokShalom> ok, now I am lost |
20:20:19 | FromDiscord | <ShalokShalom> those errors are really.. quite something |
20:21:11 | FromDiscord | <ShalokShalom> ah, it hangs at the URL |
20:21:14 | FromDiscord | <Yardanico> you have to use quotes here because this isn't valid nim syntax either |
20:21:21 | FromDiscord | <ShalokShalom> yes |
20:21:23 | FromDiscord | <ShalokShalom> see that now |
20:23:55 | FromDiscord | <ShalokShalom> ok, the script asks me to confirm the process with manual input and gives me no option to pass along a parameter to automatically accept it |
20:23:59 | FromDiscord | <ShalokShalom> like a y/n question |
20:24:10 | FromDiscord | <ShalokShalom> how would I approach that? 🙂 |
20:24:29 | FromDiscord | <Yardanico> read the line from the terminal, compare it, and do actions based on the result |
20:24:36 | FromDiscord | <Yardanico> `readLine` from system, it can work on things like `stdin` too |
20:25:12 | FromDiscord | <ShalokShalom> ok, thanks a lot |
20:25:15 | FromDiscord | <ShalokShalom> will figure this out |
20:26:04 | FromDiscord | <ShalokShalom> I am still puzzled - does this mean I would ultimately just send a simple y into the shell? |
20:26:21 | FromDiscord | <ShalokShalom> Like, the process is still running and waiting for input in this way? |
20:26:45 | FromDiscord | <Yardanico> not sure what you mean, but yes, with `readLine` you'll block the execution until the user enters the line |
20:26:52 | FromDiscord | <Yardanico> for the prompt first you might use `writeLine` with stdout |
20:27:03 | FromDiscord | <ShalokShalom> i dont want the user to enter the line |
20:27:05 | FromDiscord | <Yardanico> or https://nim-lang.org/docs/rdstdin.html to simplify a bit |
20:27:07 | FromDiscord | <ShalokShalom> I just want to accept it |
20:27:10 | FromDiscord | <Yardanico> ?? |
20:27:15 | FromDiscord | <ShalokShalom> i like to accept it |
20:27:18 | FromDiscord | <Yardanico> accept what? |
20:27:23 | FromDiscord | <ShalokShalom> the read |
20:27:30 | FromDiscord | <Yardanico> you mean you're running a shell command and want to enter "y" to it? |
20:27:35 | FromDiscord | <ShalokShalom> yes |
20:27:37 | FromDiscord | <Patitotective> the program you're writing will be the "user" |
20:27:41 | FromDiscord | <Yardanico> usually you'd use non-interactive options for that shell command, and not code it in the program |
20:27:44 | FromDiscord | <Yardanico> In reply to @ShalokShalom "yes": what program? |
20:27:45 | FromDiscord | <Yardanico> git? |
20:27:58 | FromDiscord | <ShalokShalom> git downloads a bash script |
20:28:00 | FromDiscord | <ShalokShalom> and I execute that |
20:28:14 | FromDiscord | <ShalokShalom> it asks the user to import some gdp stuff |
20:28:15 | FromDiscord | <ShalokShalom> keyring |
20:28:18 | FromDiscord | <Yardanico> check if that bash script has an option to accept whatever it asks by the command line |
20:28:24 | FromDiscord | <ShalokShalom> https://github.com/nspawn/nspawn/blob/master/nspawn#L101 |
20:28:34 | FromDiscord | <ShalokShalom> And I already said it doesnt 😛 |
20:28:43 | FromDiscord | <Yardanico> then you have to use std/osproc |
20:28:45 | FromDiscord | <Horizon [She/Her]> Progress update: I can compile a very crappy "Hello World" script to the JVM using Nim code :) |
20:28:46 | FromDiscord | <ShalokShalom> Although in miserable english |
20:28:50 | FromDiscord | <ShalokShalom> ok, thanks |
20:28:55 | FromDiscord | <Patitotective> In reply to @Event Horizon "Progress update: I can": noce |
20:29:04 | FromDiscord | <Patitotective> (edit) "noce" => "nice" |
20:29:20 | FromDiscord | <ShalokShalom> In reply to @Event Horizon "Progress update: I can": Still not loving Truffle? : |
20:29:21 | FromDiscord | <Yardanico> you'll need to start the process, then write to its input stream |
20:29:27 | FromDiscord | <Horizon [She/Her]> Could defo be better but, it works now in a way that lets me do things like validation if i needed to |
20:29:28 | FromDiscord | <ShalokShalom> mhn |
20:29:33 | FromDiscord | <ShalokShalom> thanks a lot |
20:29:56 | FromDiscord | <Horizon [She/Her]> In reply to @ShalokShalom "Still not loving Truffle?": I'd prefer native integration with the JVM as well as non-graal specific integration xD |
20:30:40 | FromDiscord | <Horizon [She/Her]> Nim is one-step closer to making Minecraft mods :) |
20:31:36 | FromDiscord | <Horizon [She/Her]> But yeah i'm likely gonna need to write a Nim stdlib package for Java |
20:33:55 | FromDiscord | <ShalokShalom> In reply to @Yardanico "you'll need to start": the process is already started, no? |
20:34:03 | FromDiscord | <ShalokShalom> like, when I run the bash script |
20:34:14 | FromDiscord | <Yardanico> you need to use startProcess to start the bash script |
20:34:21 | FromDiscord | <Yardanico> not `shell` |
20:34:27 | FromDiscord | <ShalokShalom> Aaaah, ok |
20:34:30 | FromDiscord | <ShalokShalom> That makes sense |
20:34:33 | FromDiscord | <ShalokShalom> Thanks a ton |
20:34:47 | FromDiscord | <Yardanico> https://nim-lang.org/docs/osproc.html#startProcess,string,string,openArray[string],StringTableRef,set[ProcessOption don't forget to pass `poEvalCommand` to options |
20:36:20 | FromDiscord | <ShalokShalom> startProcess("bash nspawn --init garuda/garuda/raw") |
20:37:04 | FromDiscord | <ShalokShalom> thats all very handy |
20:37:11 | FromDiscord | <ShalokShalom> I guess I just have to learn the tools |
20:47:03 | FromDiscord | <Horizon [She/Her]> Does anyone know how i'd get a unique number for a unique string? |
20:47:41 | FromDiscord | <Horizon [She/Her]> So `"hello world"` and `"hlleo world"` will be me a different result but `"hello world"` will always be the same? |
20:48:51 | FromDiscord | <Yardanico> use hashes |
20:48:57 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/hashes.html |
20:49:07 | FromDiscord | <Yardanico> https://nim-lang.org/docs/hashes.html#hash%2Cstring |
20:49:08 | FromDiscord | <Horizon [She/Her]> Ah thanks! |
20:50:08 | FromDiscord | <Yardanico> actually they might have the same hash, so just use crc32 maybe |
20:51:08 | FromDiscord | <Yardanico> ah no, that'll still have collisions |
20:51:11 | FromDiscord | <Horizon [She/Her]> Ah, i think i figured out a way without hashing anyway |
20:51:16 | FromDiscord | <Yardanico> which way? |
20:51:37 | FromDiscord | <Yardanico> but collision probability for murmur hashing should be quite low, it's what Nim uses |
20:51:45 | FromDiscord | <Horizon [She/Her]> I'm just storing the variable names in a sequence and since they're all local to a method, it won't collide |
20:51:55 | FromDiscord | <Yardanico> ah in that way, then of course |
20:52:00 | FromDiscord | <Horizon [She/Her]> I can just use the indexes since they shouldn't change |
20:52:03 | FromDiscord | <Yardanico> it sounded like quite a different task than you're describing |
20:52:29 | FromDiscord | <Horizon [She/Her]> Yeah sometimes i overengineer things in my head and burn myself out of projects heh |
20:53:16 | FromDiscord | <Horizon [She/Her]> Like what i'm doing rn, i had an object for context that i had full control over, yet forgot that i could edit it to store the information i needed |
20:55:36 | FromDiscord | <martinium> Can anyone show me how to convert/structure the following code into async code in Nim? https://gist.github.com/martinium/cf44daa3a5b647ca6be0dd509b56a2d8 |
20:57:14 | FromDiscord | <martinium> I assume I need to queue up the reads and writes somehow? |
21:04:03 | * | Onionhammer quit (Quit: Ping timeout (120 seconds)) |
21:04:22 | * | Onionhammer joined #nim |
21:10:57 | * | derpydoo quit (Quit: derpydoo) |
21:26:52 | * | wallabra quit (Ping timeout: 268 seconds) |
21:28:20 | * | wallabra joined #nim |
22:00:57 | FromDiscord | <sOkam!> It feels kinda lame to me that functions as useful as `getAppDir()` are not even usable in scripts 😔↵Do you know if there are any plans to increase the toolset of std functions that nimscript can use? |
22:01:56 | FromDiscord | <sOkam!> I find myself constantly writing python for scripts, just because of how much of the std is missing |
22:32:23 | FromDiscord | <jordan4ibanez> So which of the 3 top vscode plugins is the best one for nim? |
22:32:26 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
22:33:11 | FromDiscord | <Patitotective> nimsaem |
22:34:25 | FromDiscord | <Raynei486> In reply to @sOkam! "It feels kinda lame": I guess the closest you can get is `getCurrentDir()`? |
22:34:35 | * | Lord_Nightmare joined #nim |
22:35:09 | FromDiscord | <Patitotective> In reply to @sOkam! "It feels kinda lame": well how do you expect `getAppDir` to work if there is no executable in nimscript |
22:37:06 | FromDiscord | <demotomohiro> In reply to @sOkam! "It feels kinda lame": https://nim-lang.org/docs/nimscript.html#projectDir↵This doesn't works for you when you write nimscript? |
22:39:19 | FromDiscord | <jordan4ibanez> In reply to @Patitotective "nimsaem": Is it possible to get that plugin to automatically display the type like ``: int`` |
22:52:11 | * | wallabra_ joined #nim |
22:52:51 | * | wallabra quit (Ping timeout: 260 seconds) |
22:54:34 | * | wallabra_ is now known as wallabra |
22:55:13 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:18:29 | FromDiscord | <sOkam!> In reply to @Raynei486 "I guess the closest": problem is that is dependent on current working dir |
23:18:45 | FromDiscord | <sOkam!> In reply to @Patitotective "well how do you": by getting the path of the file, just like `file` in pythong |
23:18:54 | FromDiscord | <sOkam!> (edit) "pythong" => "python" |
23:20:30 | FromDiscord | <sOkam!> In reply to @demotomohiro "https://nim-lang.org/docs/nimscript.html#projectDir": worked, didn't see that one. ty ✍️ |
23:27:24 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
23:40:23 | * | krux02 quit (Remote host closed the connection) |