00:01:51 | * | nrds quit (Remote host closed the connection) |
00:08:45 | * | nrds joined #nim |
00:36:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
01:46:46 | * | Gustavo6046 joined #nim |
01:59:58 | * | stkrdknmibalz joined #nim |
02:00:34 | * | arkurious quit (Quit: Leaving) |
02:21:59 | * | krux02 quit (Remote host closed the connection) |
02:26:40 | * | Gustavo6046 quit (Remote host closed the connection) |
02:27:03 | * | Gustavo6046 joined #nim |
03:07:31 | FromDiscord | <Hamid Bluri> hey |
03:07:46 | FromDiscord | <Hamid Bluri> `nimble install` gives me |
03:07:59 | FromDiscord | <Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3AY4 |
03:08:34 | FromDiscord | <Hamid Bluri> is there any specefic reason for this? |
03:09:07 | FromDiscord | <Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3AY5 |
03:09:12 | * | xet7 quit (Ping timeout: 268 seconds) |
03:09:14 | FromDiscord | <Hamid Bluri> here's my `package.nimble` |
03:10:48 | FromDiscord | <Hamid Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3AY8 |
03:11:00 | FromDiscord | <Hamid Bluri> (edit) "https://play.nim-lang.org/#ix=3AY8" => "https://play.nim-lang.org/#ix=3AY9" |
03:16:09 | * | meowray quit (Remote host closed the connection) |
03:16:19 | * | meowray joined #nim |
03:19:06 | * | happycorsair[m] quit (Ping timeout: 265 seconds) |
03:19:13 | FromDiscord | <xflywind> In reply to @hamidb80 "hey": hello, https://discord.com/channels/371759389889003530/764946138109050893/893868412734951455 |
03:19:31 | FromDiscord | <xflywind> It seems that you need to clear .nimble/pkg |
03:19:54 | FromDiscord | <xflywind> > afraid you need to clear your /home/tandy/.nimble/pkgs/ |
03:22:34 | * | xet7 joined #nim |
03:23:02 | * | rockcavera quit (Remote host closed the connection) |
03:38:25 | FromDiscord | <Elegantbeef> Well if anyone is keeping track, my interop now handles overloaded procedures! 🙂 |
03:38:56 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3AYb for those weirdos that like my spam |
03:41:16 | FromDiscord | <Rika> no thanks |
03:41:31 | * | happycorsair[m] joined #nim |
03:41:47 | FromDiscord | <Elegantbeef> Damn i'll remove you from the mailing list |
03:43:20 | FromDiscord | <Rika> has always been going to spam anyway |
03:43:32 | FromDiscord | <Elegantbeef> Rightfully so |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:07:05 | * | stkrdknmibalz quit (Ping timeout: 246 seconds) |
04:13:50 | * | meowray quit (Changing host) |
04:13:50 | * | meowray joined #nim |
04:28:39 | * | stkrdknmibalz joined #nim |
04:34:27 | * | stkrdknmibalz quit (Excess Flood) |
04:35:19 | FromDiscord | <Gumber> I'll love it when the vm goes brrrrrrrrrrrrr |
04:49:59 | FromDiscord | <Hamid Bluri> In reply to @Gumber "I'll love it when": brrrrrrr ? |
04:50:06 | FromDiscord | <Gumber> fast |
04:54:18 | FromDiscord | <Hamid Bluri> In reply to @Elegantbeef "<@714152700920594493>\: i know it's": what version? |
04:54:38 | FromDiscord | <Hamid Bluri> do you mean can i use it in `static` context? |
04:54:57 | FromDiscord | <Elegantbeef> What? |
04:55:06 | FromDiscord | <Hamid Bluri> (edit) "do you mean ... can" added "i" | removed "i" |
04:55:41 | FromDiscord | <Hamid Bluri> as far as i know the code in the `static` is block executed by VM |
04:55:49 | FromDiscord | <Elegantbeef> Yes? |
04:56:12 | FromDiscord | <Rika> ? |
04:56:42 | FromDiscord | <Elegantbeef> This makes it's own interpreter, you cannot extend the builtin nimVm without using libcffi or manually adding code to the compiler |
04:57:11 | FromDiscord | <Hamid Bluri> and it's not capable of using some features like ref, or ...↵and it means you can't use `json` stdlib in compile time |
04:57:35 | FromDiscord | <Elegantbeef> it can use ref/json |
04:58:23 | FromDiscord | <Elegantbeef> I dont think you realize the above is for runtime scripting not compile time scripting |
04:58:40 | FromDiscord | <Elegantbeef> It enables stuff like this https://streamable.com/oerlmi |
05:02:47 | FromDiscord | <Hamid Bluri> In reply to @Elegantbeef "It enables stuff like": that's so cool 😄 |
05:04:27 | FromDiscord | <Hamid Bluri> (edit) "😄" => "XD" |
05:04:35 | FromDiscord | <Hamid Bluri> (edit) removed "XD" |
05:31:38 | FromDiscord | <impbox [ftsf]> @ElegantBeef very nice! |
05:32:19 | FromDiscord | <impbox [ftsf]> full nico support now? |
05:32:50 | FromDiscord | <Elegantbeef> Who knows 😀 |
05:33:00 | FromDiscord | <tourist> Hello guys I am new to nim |
05:33:18 | FromDiscord | <Elegantbeef> Hello new to nim |
05:33:30 | FromDiscord | <Hamid Bluri> In reply to @Elegantbeef "Hello new to nim": 😄 😄 |
05:33:34 | FromDiscord | <Elegantbeef> But yea impbox it'll be much easier to support Nico |
05:33:48 | FromDiscord | <Elegantbeef> Typedefs are the last thing i need to support again |
05:34:14 | FromDiscord | <tourist> But I am just very confused between nim, rust , crystal, Julia ,Dlang, golang |
05:34:25 | FromDiscord | <tourist> Idk what to choose as programming language for my life |
05:34:26 | FromDiscord | <impbox [ftsf]> @tourist welcome! |
05:34:29 | FromDiscord | <Elegantbeef> First on the list must mean it's first in your mind |
05:34:42 | FromDiscord | <Elegantbeef> Well we'll almost certainly suggest Nim |
05:34:48 | FromDiscord | <Rika> What's your goal in learning a new programming language |
05:34:48 | FromDiscord | <Elegantbeef> So do that one |
05:34:49 | FromDiscord | <Hamid Bluri> In reply to @impbox "<@!489496602868842498> welcome!": do not choose anything for your life |
05:35:02 | FromDiscord | <Rika> If it's to get hired then this isn't really the right language |
05:35:06 | FromDiscord | <tourist> @Rika I already know python,C and ocaml |
05:35:17 | FromDiscord | <tourist> @Rika I want to develop games |
05:35:23 | FromDiscord | <tourist> With it , pygame is too slow |
05:35:24 | FromDiscord | <impbox [ftsf]> well well well! |
05:35:27 | FromDiscord | <Rika> Then sure this sounds like the right one |
05:35:42 | FromDiscord | <Hamid Bluri> pygame is ahhhhh |
05:35:48 | FromDiscord | <impbox [ftsf]> nim is pretty rad for games, though the stuff is still young |
05:35:59 | FromDiscord | <impbox [ftsf]> I use nim for games a lot |
05:36:07 | FromDiscord | <tourist> @impbox [ftsf] yes, are there any game libraries for nim |
05:36:18 | FromDiscord | <impbox [ftsf]> i wouldn't use anything else unless i'm forced to for work |
05:36:30 | FromDiscord | <tourist> But Nim really has potential to take the crown from python and Julia |
05:36:31 | FromDiscord | <impbox [ftsf]> I develop one of them called Nico, there's a bunch of others too |
05:36:44 | FromDiscord | <Hamid Bluri> In reply to @impbox "I use nim for": did you published any games on the internet? |
05:36:48 | FromDiscord | <Hamid Bluri> (edit) "published" => "publish" |
05:36:52 | FromDiscord | <impbox [ftsf]> https://github.com/ftsf/nico/ |
05:36:54 | nrds | <R2D299> itHub: 7"a Game Framework in Nim inspired by Pico-8." |
05:37:03 | FromDiscord | <impbox [ftsf]> https://impbox.itch.io/ yeah |
05:37:32 | FromDiscord | <Elegantbeef> Both impbox and i have used nico to make games! |
05:37:40 | FromDiscord | <impbox [ftsf]> nico is great if you want to do 2d pixel art games |
05:37:48 | FromDiscord | <tourist> @impbox [ftsf] wow I designed your own library for making games |
05:37:50 | FromDiscord | <impbox [ftsf]> but if you're more into 3D stuff there's other things |
05:37:57 | FromDiscord | <tourist> (edit) "I" => "you" |
05:37:58 | FromDiscord | <impbox [ftsf]> for 3D I use SDL2+opengl |
05:38:48 | FromDiscord | <Hamid Bluri> In reply to @impbox "https://impbox.itch.io/ yeah": wow, they are so many |
05:39:25 | FromDiscord | <impbox [ftsf]> some people are using nim+godot |
05:39:42 | FromDiscord | <Elegantbeef> Others are looking at the machinary + nim |
05:39:50 | * | max22- joined #nim |
05:40:18 | FromDiscord | <impbox [ftsf]> almost all of those games on my itch.io are made in nim+nico |
05:40:37 | FromDiscord | <impbox [ftsf]> https://jbeetham.itch.io/linerino @ElegantBeef made this cool puzzle game |
05:40:40 | FromDiscord | <Elegantbeef> Quick ask impbox what the best game made with Nico is |
05:41:01 | FromDiscord | <impbox [ftsf]> Vektor 2089 is the most commercially successful =p |
05:41:01 | FromDiscord | <Elegantbeef> Jokes jokes, they're all shit you can see the pixels |
05:41:17 | FromDiscord | <impbox [ftsf]> Smalltrek is the most critically acclaimed |
05:41:38 | FromDiscord | <impbox [ftsf]> Bushfire Rescue Tactics is the most newsworthy |
05:41:50 | FromDiscord | <Elegantbeef> My hypothesis is that a few copies sold would make it the most comercially successful 😛 |
05:42:39 | FromDiscord | <Elegantbeef> Anywho back to the actual conversation |
05:42:55 | FromDiscord | <Elegantbeef> Nim is a fantastic language for game dev as it's very readable and very performant |
05:43:03 | FromDiscord | <impbox [ftsf]> yup, would recommend |
05:43:12 | FromDiscord | <Hamid Bluri> In reply to @impbox "https://jbeetham.itch.io/linerino <@!14540573057128": @ElegantBeef how did you make a android installable file `apk` for this game |
05:43:25 | FromDiscord | <Elegantbeef> Nico supports building to android |
05:43:59 | FromDiscord | <Elegantbeef> A few Nim flags in your project and as impbox would say bob's your uncle 😛 |
05:44:16 | FromDiscord | <Rika> Has anyone used DrNim seriously? |
05:44:23 | FromDiscord | <Hamid Bluri> bobs your uncke |
05:44:26 | FromDiscord | <Hamid Bluri> (edit) "uncke" => "uncle" |
05:44:30 | FromDiscord | <Hamid Bluri> :/ |
05:44:32 | FromDiscord | <Hamid Bluri> (edit) ":/" => "😕" |
05:44:33 | FromDiscord | <impbox [ftsf]> @Rika never heard of them |
05:44:43 | FromDiscord | <Rika> Formal proving for nim |
05:44:54 | FromDiscord | <Elegantbeef> Given that drnim only does index checking it's not overly fantastic presently |
05:45:18 | FromDiscord | <Rika> It only does that automatically, it can do more can't it? |
05:45:31 | FromDiscord | <Rika> Isn't that why there are the condition pragmas |
05:45:45 | FromDiscord | <Hamid Bluri> In reply to @Rika "Formal proving for nim": https://media.discordapp.net/attachments/371759389889003532/895185039594258452/unknown.png |
05:45:48 | FromDiscord | <Elegantbeef> It might be capable, there isnt much in the way of documentation for it |
05:46:02 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/drnim.html |
05:46:04 | FromDiscord | <Elegantbeef> For context |
05:46:14 | FromDiscord | <NullCode> In reply to @hamidb80 "": yes |
05:46:19 | FromDiscord | <Rika> Yeah that doesn't sound like "not much" to me |
05:46:21 | FromDiscord | <NullCode> nim clothes v3 |
05:46:41 | FromDiscord | <xflywind> drnim is rarely maintained |
05:46:43 | FromDiscord | <impbox [ftsf]> I got the same result =p |
05:48:54 | FromDiscord | <impbox [ftsf]> @ElegantBeef nimscripter ready for me to mess with it? |
05:49:21 | FromDiscord | <Elegantbeef> If you want, there is no documentation or tests for the new changes yet |
05:49:33 | FromDiscord | <Elegantbeef> I dont forsee massive changes now |
05:49:40 | FromDiscord | <Elegantbeef> Mostly just small things to enable more stuff |
05:50:12 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimscripter/tree/bigrewrite the branch you'll want to use |
05:52:31 | FromDiscord | <impbox [ftsf]> sweet |
05:53:45 | FromDiscord | <Elegantbeef> I do want to look into storing globals on save and reload them after loading |
06:00:50 | FromDiscord | <Elegantbeef> and of course please mention issues or additions that you'd like |
06:01:40 | FromDiscord | <impbox [ftsf]> aye, will give it a try |
06:04:40 | FromDiscord | <xflywind> regression |
06:04:45 | FromDiscord | <xflywind> !eval type CharSet = array |
06:04:46 | NimBot | Compile failed: Error: internal error: invalid kind for lastOrd(tyGenericParam) |
06:25:01 | FromDiscord | <Rika> Is that even legal |
06:25:54 | FromDiscord | <Elegantbeef> Aliasing a typeclass should be |
06:26:21 | FromDiscord | <xflywind> !eval type CharSet = set |
06:26:24 | NimBot | <no output> |
06:26:35 | FromDiscord | <Rika> So it is |
06:26:45 | FromDiscord | <xflywind> yeah |
06:27:07 | FromDiscord | <xflywind> https://github.com/nim-lang/Nim/issues/3367 |
06:49:16 | * | PMunch joined #nim |
06:57:15 | * | jjido joined #nim |
07:03:04 | * | neurocyte013288 joined #nim |
07:03:04 | * | neurocyte013288 quit (Changing host) |
07:03:04 | * | neurocyte013288 joined #nim |
07:29:10 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
07:43:09 | FromDiscord | <tandy> do `choosenim update self`↵(@Hamid Bluri) |
07:43:27 | FromDiscord | <tandy> oh this too↵(@xflywind) |
07:58:16 | * | neurocyte013288 quit (Read error: Connection reset by peer) |
07:59:04 | * | neurocyte013288 joined #nim |
07:59:05 | * | neurocyte013288 quit (Changing host) |
07:59:05 | * | neurocyte013288 joined #nim |
08:05:14 | * | neurocyte013288 quit (Read error: Connection reset by peer) |
08:06:01 | * | neurocyte013288 joined #nim |
08:06:01 | * | neurocyte013288 quit (Changing host) |
08:06:01 | * | neurocyte013288 joined #nim |
08:08:02 | * | neurocyte013288 quit (Read error: Connection reset by peer) |
08:08:39 | * | neurocyte013288 joined #nim |
08:08:39 | * | neurocyte013288 quit (Changing host) |
08:08:39 | * | neurocyte013288 joined #nim |
08:09:41 | FromDiscord | <impbox [ftsf]> say I remove a nimble package and replace it with a newer version, when I run nim why does it still try to open the file of the old version that's gone and get an IOError? How do I tell it to forget about the old version |
08:10:27 | FromDiscord | <impbox [ftsf]> does nim store the nimble package versions it's using somewhere? |
08:10:48 | * | neurocyte0132889 joined #nim |
08:10:49 | * | neurocyte0132889 quit (Changing host) |
08:10:49 | * | neurocyte0132889 joined #nim |
08:12:22 | * | neurocyte0132889 quit (Read error: Connection reset by peer) |
08:12:41 | FromDiscord | <Elegantbeef> It uses the youngest version that fits your nimble if none the first i finds i think, eitherway assuming i know what package you want i'd just suggest cloning the repo and using `nimble develop` until I release it properly |
08:13:04 | FromDiscord | <Elegantbeef> That way you can just do `git pull` inside that directory and it'll update it |
08:13:11 | FromDiscord | <impbox [ftsf]> yeah, i just did that, but instead of using the develop one it's using one that I deleted |
08:13:18 | * | neurocyte013288 quit (Ping timeout: 265 seconds) |
08:13:24 | FromDiscord | <Elegantbeef> Odd |
08:13:28 | FromDiscord | <impbox [ftsf]> indeed |
08:13:43 | FromDiscord | <impbox [ftsf]> i just set the nimcache to a different path and now it works, so i guess it's something to do with nimcache |
08:19:19 | * | neurocyte0132889 joined #nim |
08:19:19 | * | neurocyte0132889 quit (Changing host) |
08:19:19 | * | neurocyte0132889 joined #nim |
08:24:49 | FromDiscord | <konradmb> Is there file watcher for Nim that recompiles and reruns project on change like "npm watch" or "gow"? |
08:30:15 | FromDiscord | <impbox [ftsf]> @konradmb not that i know of, but you could implement your own easily with a script. though there is hotcodereloading |
08:30:20 | FromDiscord | <impbox [ftsf]> https://nim-lang.org/docs/hcr.html |
08:31:39 | FromDiscord | <Rika> hot code reloading is not the same though |
08:32:08 | FromDiscord | <impbox [ftsf]> nope, but might be useful for the same use case |
08:32:26 | FromDiscord | <impbox [ftsf]> depending on what you're trying to do |
08:54:27 | * | jjido joined #nim |
09:16:07 | FromDiscord | <dom96> In reply to @flywind "> afraid you need": you went too far in that exchange, the first thing they need to do is downgrade nimble 🙂 |
09:30:09 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:06:54 | FromDiscord | <NullCode> whats an `if defer` statement? |
10:07:00 | FromDiscord | <NullCode> (edit) "statement?" => "statement in nim?" |
10:07:45 | FromDiscord | <Rika> Example |
10:07:55 | FromDiscord | <Rika> Those are two decoupled constructs |
10:08:48 | FromDiscord | <impbox [ftsf]> defer lets you make something happen at the end of the function |
10:09:06 | FromDiscord | <NullCode> sent a code paste, see https://paste.rs/t4v |
10:09:07 | FromDiscord | <NullCode> kanged from `winim` |
10:09:15 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3AZs |
10:09:37 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3AZt |
10:09:43 | FromDiscord | <Rika> That’s just an if and then a defer after |
10:09:48 | FromDiscord | <NullCode> oh |
10:09:53 | FromDiscord | <NullCode> i thought it was together |
10:09:56 | FromDiscord | <Rika> In reply to @impbox "defer lets you make": Here’s what defer does |
10:10:05 | FromDiscord | <NullCode> but this isn't inside a proc |
10:10:07 | FromDiscord | <NullCode> https://github.com/khchen/winim/blob/b7b32603f4ef672bc34405bc6200e8aab2c366b1/examples/fileopendialog.nim#L15 |
10:10:31 | FromDiscord | <impbox [ftsf]> it's in the "main" ... proc? |
10:10:36 | FromDiscord | <impbox [ftsf]> not sure what you call it |
10:10:47 | FromDiscord | <Rika> Entry point function ? |
10:10:48 | FromDiscord | <impbox [ftsf]> but statements in global scope get called |
10:11:17 | FromDiscord | <NullCode> what |
10:11:30 | FromDiscord | <NullCode> main proc? |
10:11:50 | FromDiscord | <impbox [ftsf]> stuff outside any proc gets called immediately on start |
10:11:56 | FromDiscord | <NullCode> yes |
10:12:03 | FromDiscord | <impbox [ftsf]> you can kind of think of it as a proc |
10:12:05 | FromDiscord | <Rika> You can imagine that as the main proc |
10:12:06 | FromDiscord | <NullCode> oh so all those things are in a proc? |
10:12:13 | FromDiscord | <Rika> Technically |
10:12:13 | FromDiscord | <NullCode> "imagine" got it |
10:12:35 | FromDiscord | <Rika> But a defer outside any block actually doesn’t work afaik |
10:12:48 | FromDiscord | <Rika> So in that case it runs the code at the end of the try block |
10:12:51 | FromDiscord | <NullCode> so defer means the `CoBlaBlaBla` will happen at the very end? |
10:12:56 | FromDiscord | <impbox [ftsf]> i think it's technically different in some ways, but you could put it all in a proc main() and then call main() at the end if you wanted |
10:13:31 | FromDiscord | <NullCode> yeah understood |
10:13:37 | FromDiscord | <NullCode> a lil like the main proc in python |
10:13:49 | FromDiscord | <NullCode> (edit) "main proc" => "`def main()`" |
10:14:42 | FromDiscord | <NullCode> anyway i was looking at `winim` because i wanna hide and show console at will |
10:16:21 | FromDiscord | <NullCode> a lil like `ShowWindow(window, 0);` in <windows.h> |
10:16:25 | FromDiscord | <impbox [ftsf]> console? |
10:16:44 | FromDiscord | <NullCode> you know, this https://media.discordapp.net/attachments/371759389889003532/895253227921084426/unknown.png |
10:16:46 | FromDiscord | <impbox [ftsf]> as in a windows terminal, or something else? |
10:16:53 | FromDiscord | <impbox [ftsf]> or cmd |
10:16:53 | FromDiscord | <NullCode> yeah that |
10:17:21 | FromDiscord | <impbox [ftsf]> ok, i guess you'd just createprocess |
10:17:22 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3AZw |
10:17:32 | FromDiscord | <impbox [ftsf]> ahh you want to hide/show an existing terminal |
10:17:52 | FromDiscord | <NullCode> thanks, I'm dumb |
10:17:53 | FromDiscord | <NullCode> (edit) "https://play.nim-lang.org/#ix=3AZy" => "https://paste.rs/hEv" |
10:17:54 | FromDiscord | <NullCode> sent a code paste, see https://paste.rs/LSV |
10:18:06 | FromDiscord | <NullCode> where can i learn more about nim tho |
10:18:27 | FromDiscord | <impbox [ftsf]> right here |
10:18:41 | FromDiscord | <NullCode> yeah but I'm just like |
10:18:47 | FromDiscord | <NullCode> asking for help and getting answers |
10:18:51 | FromDiscord | <impbox [ftsf]> did you read the book yet? |
10:18:57 | FromDiscord | <NullCode> by learn i wanna hardcode this shit into my brain |
10:19:00 | FromDiscord | <NullCode> like python |
10:19:06 | FromDiscord | <NullCode> In reply to @impbox "did you read the": https://media.discordapp.net/attachments/371759389889003532/895253824221102090/unknown.png |
10:19:07 | FromDiscord | <impbox [ftsf]> learn by doing |
10:19:13 | FromDiscord | <NullCode> yeah I finished reading this |
10:19:18 | FromDiscord | <NullCode> nim basics book |
10:19:46 | FromDiscord | <NullCode> In reply to @impbox "learn by doing": i feel like I'm bothering others when i ask questions |
10:19:54 | FromDiscord | <impbox [ftsf]> nah, some of us have no life |
10:19:55 | FromDiscord | <NullCode> so yeah not a fan |
10:20:01 | FromDiscord | <NullCode> In reply to @impbox "nah, some of us": lmfao |
10:20:16 | FromDiscord | <NullCode> my kinda situation |
10:20:37 | FromDiscord | <enthus1ast> @NullCode\: read the docs of modules you wanna use; read the code of modules you wanna use |
10:20:42 | FromDiscord | <impbox [ftsf]> and some of us have lives but procrastinate them by answering questions here |
10:20:46 | FromDiscord | <enthus1ast> at least skim through the code |
10:21:01 | FromDiscord | <NullCode> In reply to @enthus1ast "<@360748438784180225>\: read the docs": some modules have extremely convulated docs |
10:21:06 | FromDiscord | <NullCode> (winim and nimbass for example) |
10:21:06 | FromDiscord | <enthus1ast> this way you see how others have solved the stuff |
10:21:18 | FromDiscord | <NullCode> In reply to @enthus1ast "at least skim through": yes i do that as a last resort |
10:21:22 | FromDiscord | <impbox [ftsf]> sometimes reading the source is nicer than the docs |
10:21:35 | FromDiscord | <impbox [ftsf]> tbh i usually just read the README then jump into the source |
10:21:41 | FromDiscord | <enthus1ast> winim is "just" a wrapper for the winapi, so the docs should be msdn i think |
10:21:55 | FromDiscord | <NullCode> but isn't msdn for c |
10:21:56 | FromDiscord | <NullCode> not for nim |
10:22:00 | FromDiscord | <NullCode> (edit) "c" => "c/cpp" |
10:22:03 | FromDiscord | <impbox [ftsf]> but the API is the same |
10:22:10 | FromDiscord | <impbox [ftsf]> well the nim one is based on the C one |
10:22:18 | FromDiscord | <NullCode> windows.h? |
10:22:19 | FromDiscord | <impbox [ftsf]> so i you understand the C one then the nim one will make sense |
10:22:23 | FromDiscord | <impbox [ftsf]> just the syntax is different |
10:22:30 | FromDiscord | <NullCode> oh i see |
10:22:45 | FromDiscord | <impbox [ftsf]> but same functions and arguments generally |
10:22:49 | FromDiscord | <enthus1ast> and winim tries to be very similar to c names |
10:24:04 | FromDiscord | <impbox [ftsf]> ` proc CreatePropertySheetPage(constPropSheetPagePointer: LPCPROPSHEETPAGEA): HPROPSHEETPAGE {.winapi, stdcall, dynlib: "comctl32", importc: "CreatePropertySheetPageA".}`↵eg the bit that says "import:" tells you what the C function is called |
10:24:09 | FromDiscord | <impbox [ftsf]> (edit) ""import:"" => ""importc:"" |
10:24:29 | FromDiscord | <impbox [ftsf]> winim's `CreatePropertySheetPage` -> `CreatePropertySheetPageA` in C |
10:24:47 | FromDiscord | <enthus1ast> and the dynlib part tells you from which dlls this function is loaded |
10:25:01 | FromDiscord | <impbox [ftsf]> yup |
10:26:40 | FromDiscord | <enthus1ast> what i always forget and must read on winim's docs is how the various winapi strings (chaos) map to nim types |
10:27:50 | FromDiscord | <NullCode> In reply to @impbox "` proc CreatePropertySheetPage*(constPropSheetPage": oh so i can search for that function on msdn |
10:27:56 | FromDiscord | <NullCode> interesting |
10:28:36 | FromDiscord | <impbox [ftsf]> yeah, or search in msdn for what you want to do then you can probably find the matching nim function for it |
10:28:52 | FromDiscord | <NullCode> In reply to @enthus1ast "and the dynlib part": i see |
10:29:12 | FromDiscord | <NullCode> In reply to @impbox "yeah, or search in": yeah |
10:41:16 | NimEventer | New thread by Sdmcallister: Nim js Geolocation API, see https://forum.nim-lang.org/t/8482 |
11:09:07 | * | krux02 joined #nim |
11:26:49 | * | xet7 quit (Remote host closed the connection) |
11:27:54 | * | xet7 joined #nim |
11:57:14 | * | jjido joined #nim |
11:59:35 | * | max22- quit (Ping timeout: 246 seconds) |
12:05:38 | * | stkrdknmibalz joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:10:25 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
12:14:27 | * | Vladar joined #nim |
12:18:28 | * | rockcavera joined #nim |
12:18:28 | * | rockcavera quit (Changing host) |
12:18:28 | * | rockcavera joined #nim |
12:20:50 | FromDiscord | <enthus1ast> is there a better way to create an array than to alloc and cast ? |
12:21:03 | FromDiscord | <enthus1ast> dynamically i mean |
12:21:08 | FromDiscord | <Rika> you alloc and cast arrays? |
12:21:11 | FromDiscord | <Rika> thats wrong is it not |
12:21:50 | FromDiscord | <enthus1ast> for c interopt i do something like\:↵↵var foo = alloc(1024) |
12:22:33 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3B0h |
12:22:54 | FromDiscord | <enthus1ast> but what i originally want, is an array |
12:23:04 | FromDiscord | <enthus1ast> but i do not know the size beforehand |
12:23:12 | FromDiscord | <Rika> just use a seq? |
12:23:22 | FromDiscord | <enthus1ast> mh |
12:23:46 | FromDiscord | <enthus1ast> yeah i could do this |
12:24:05 | FromDiscord | <Rika> if you want a `ptr T` you can just do theSeq[0].addr |
12:24:14 | FromDiscord | <enthus1ast> yes i know |
12:25:32 | * | arkurious joined #nim |
12:27:06 | FromDiscord | <enthus1ast> the thing is, while this work fine, i would rather prefer array semantics |
12:27:37 | FromDiscord | <enthus1ast> alloc cast dealloc works, but 1. more to type, 2. manual dealloc |
12:30:06 | FromDiscord | <Rika> In reply to @enthus1ast "the thing is, while": what does this mean? |
12:30:23 | FromDiscord | <Rika> what specific semantics are differnet between array and seq |
12:30:34 | FromDiscord | <enthus1ast> i can pass an array to a f func without addr for example |
12:30:48 | FromDiscord | <enthus1ast> and withouth [0] |
12:31:15 | FromDiscord | <Rika> and you lose indexing and everything else? |
12:31:23 | FromDiscord | <enthus1ast> yes |
12:31:24 | PMunch | template carray[T](x: seq[T]): ptr T = x[0].addr |
12:31:37 | PMunch | That's your C interop :P |
12:31:47 | FromDiscord | <enthus1ast> yes \:) |
12:49:16 | FromDiscord | <Goel> What is the `self` aprameter into a proc? I don't remember where i've seen it yesterday, but i don't think that was a parameter name, but a `keyword`? |
12:49:22 | FromDiscord | <Goel> (edit) "aprameter" => "parameter" |
12:51:26 | FromDiscord | <impbox [ftsf]> nothing special about it, just a convention |
12:52:22 | PMunch | Well, unless you use {.this: self.} or whatever that pragma was called |
12:52:38 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3B0z |
12:52:59 | FromDiscord | <impbox [ftsf]> yeah `{.this:self.}` is deprecated, not sure if it's removed yet. but even then "self" is just a common convention |
12:53:07 | FromDiscord | <impbox [ftsf]> you can use whatever name |
12:53:11 | FromDiscord | <Goel> I might be wrong but i though it was like `proc name(self) =` |
12:53:42 | FromDiscord | <Goel> (edit) "though" => "think" | "thinkit was like `proc name(self) =` ... " added "If i find it again i'll be sure to check it" |
12:55:47 | FromDiscord | <Rika> probably a `using` |
12:55:50 | FromDiscord | <Rika> above in the file |
12:55:59 | FromDiscord | <Rika> `using self: ...` |
12:56:00 | FromDiscord | <Rika> i think |
13:06:48 | * | NeoCron joined #nim |
13:16:24 | FromDiscord | <gnu+linux user> @Araq please take a look at <https://github.com/nim-lang/csources_v1/pull/3> |
13:24:37 | FromDiscord | <Gumber> Openindiana huh.... |
13:25:41 | FromDiscord | <Gumber> I feel like thre are enough random ass obscure unix OSs that we can learn about a new one every day of the year and not run out |
13:30:12 | FromDiscord | <gnu+linux user> typical gumber reaction to a normie mentioning pull requests |
13:31:47 | nrds | <Prestige99> What's openindiana 🤔 |
13:32:13 | nrds | <Prestige99> Obscure indeed |
13:42:54 | FromDiscord | <Gumber> In reply to @richard stallmen(crazy GNU guy) "typical gumber reaction to": Huh? |
13:43:21 | FromDiscord | <Gumber> I don't really care about the PR I'm just not really shocked it's another Unix OS I've never heard of before |
13:43:38 | FromDiscord | <Gumber> If you're offended by that I'm sorry but I think that's more of your problem than mine |
13:44:07 | FromDiscord | <Gumber> I didn't mean any offense with my comment it was just kind of a joke or a jab at how many random ass Unix operating systems are out there |
13:44:16 | FromDiscord | <Gumber> I use Windows as my daily driver so you really shouldn't care what I think to be honest |
13:45:58 | * | neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat) |
14:05:15 | * | max22- joined #nim |
14:12:51 | FromDiscord | <gnu+linux user> i would like to react but that would get me banned 😏 |
14:13:07 | * | PMunch quit (Quit: Leaving) |
14:14:00 | FromDiscord | <sealmove> @gnu+linux user hey |
14:14:16 | FromDiscord | <sealmove> haven't seen any Hacktoberfest labels yet :\ |
14:14:26 | FromDiscord | <Rika> its october.... |
14:14:32 | FromDiscord | <Rika> what happened to this year |
14:14:38 | FromDiscord | <sealmove> yeah right! |
14:14:47 | FromDiscord | <sealmove> people losing track of time |
14:14:53 | FromDiscord | <Rika> year feels both long and short at the same time |
14:14:59 | nrds | <Prestige99> about to be 2022, wow |
14:15:11 | FromDiscord | <sealmove> mostly felt long for me |
14:15:14 | nrds | <Prestige99> Feels like a futuristic year number |
14:15:40 | FromDiscord | <Yardanico> imagine what would we feel in 2077 |
14:15:46 | FromDiscord | <Rika> oh yeah isnt that two's day year |
14:15:49 | FromDiscord | <Yardanico> If someone from this chat will be alive by then |
14:15:54 | nrds | <Prestige99> hopefully better than the game |
14:16:00 | FromDiscord | <Yardanico> xd |
14:16:08 | FromDiscord | <Rika> In reply to @Yardanico "If someone from this": bruh im pretty sure we've got a few 2000s people here incl me |
14:16:20 | nrds | <Prestige99> :o |
14:16:20 | FromDiscord | <Rika> HOPEFULLY i live to 77 |
14:16:25 | FromDiscord | <Rika> would be fucked if i didnt |
14:16:26 | FromDiscord | <Yardanico> but you shouldn't exclude external factors |
14:16:36 | FromDiscord | <Yardanico> like ww3, but that's more for offtopic |
14:16:40 | nrds | <Prestige99> I'm hoping technology gets me to 2100 but we'll see |
14:16:49 | nrds | <Prestige99> :P |
14:16:56 | FromDiscord | <sealmove> why 77? :P |
14:17:04 | FromDiscord | <Rika> im hoping technology grants us any pleasure we want by 2050 xd 1/2jk |
14:21:53 | FromDiscord | <Schelz> Hi, can someone translate this from python to nim please. |
14:21:54 | FromDiscord | <Schelz> response = requests.get("https://raw.githubusercontent.com/jprichardson/node-jsonfile/master/package.json").json()↵dwEntityList = str(response["repository"]["url"]) |
14:22:09 | FromDiscord | <Schelz> (edit) "requests.get("https://raw.githubusercontent.com/jprichardson/node-jsonfile/master/package.json").json()↵dwEntityList" => "requests.get("https://raw.githubusercontent.com/jprichardson/node-jsonfile/master/package.json").json()↵model" |
14:23:31 | FromDiscord | <haxscramper> https://nim-lang.org/docs/httpclient.html#get%2CAsyncHttpClient%2Cstring with `parseJson()` from `std/json` |
14:23:50 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3B15 |
14:24:00 | FromDiscord | <Schelz> nice thanks |
14:24:36 | FromDiscord | <haxscramper> You can also use treeform/jsony and parse your request directly into data structure, if you will be extracting lots of fields from it |
14:54:38 | FromDiscord | <NullCode> In reply to @รєคɭ๓๏שє "mostly felt long for": here i am thinking how it went from april to october in 5 days |
14:55:10 | FromDiscord | <NullCode> tbh there should be a `py2nim` |
14:56:40 | FromDiscord | <Rika> guess what |
14:56:45 | FromDiscord | <Rika> theres a project regards that |
14:57:16 | FromDiscord | <haxscramper> https://forum.nim-lang.org/t/8379 |
14:58:37 | FromDiscord | <NullCode> In reply to @Rika "theres a project regards": fr? |
14:58:46 | FromDiscord | <NullCode> wait checking forum |
14:58:48 | FromDiscord | <Rika> hax just sent it |
14:58:56 | FromDiscord | <NullCode> (edit) "wait checking ... forumlink" added "hax's" | "hax'sforum ... " added "link" |
15:04:00 | FromDiscord | <NullCode> theres quite a lot of py2nim libs on github tho |
15:04:19 | FromDiscord | <NullCode> (edit) removed "tho" |
15:05:37 | FromDiscord | <haxscramper> Making py2nim in general is an impossible task because there is so much about python code that is never written anywhere |
15:05:55 | FromDiscord | <haxscramper> All of those implicit assumptions about what it the type of the variable, where it is first declared |
15:05:57 | FromDiscord | <haxscramper> And so on |
15:06:05 | FromDiscord | <haxscramper> But simple syntactic translation is possible |
15:06:18 | FromDiscord | <haxscramper> If you add tons of unsafe hacks you cane make it close to python |
15:06:48 | FromDiscord | <haxscramper> Because python is unsafe as it gets, with no type checking anywhere, except for some codebases that use optional type annotations |
15:06:57 | FromDiscord | <NullCode> In reply to @haxscramper "Making py2nim in general": yes |
15:07:06 | FromDiscord | <Rika> and theyre just annotations as well |
15:07:14 | FromDiscord | <Rika> no enforcement xd |
15:07:31 | FromDiscord | <NullCode> well one way to do it would be to force users to write Cython code |
15:07:34 | FromDiscord | <NullCode> and then transpile that |
15:07:49 | FromDiscord | <NullCode> cython has static typing iirc |
15:08:06 | FromDiscord | <haxscramper> At this point you can just write nim directly |
15:08:17 | FromDiscord | <NullCode> true |
15:45:54 | FromDiscord | <Goel> Is it possible to have a `Table` as field type of an `object`? |
15:46:40 | FromDiscord | <Rika> yes? |
15:46:49 | FromDiscord | <Rika> what issues are you getting exactly |
15:47:44 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=3B1v |
15:48:04 | FromDiscord | <enthus1ast> you must define what the table can store |
15:48:14 | FromDiscord | <enthus1ast> Table[string, Color] maybe |
15:48:22 | FromDiscord | <enthus1ast> or whatever you wanna store |
15:48:23 | FromDiscord | <Goel> oh i see |
15:48:37 | FromDiscord | <enthus1ast> the first one is the type of the key though |
15:48:37 | FromDiscord | <Rika> table is a generic like array and seq |
15:53:07 | * | def- quit (Quit: -) |
15:56:03 | * | def- joined #nim |
16:13:26 | * | vicfred joined #nim |
16:20:11 | * | neurocyte0132889 joined #nim |
16:20:12 | * | neurocyte0132889 quit (Changing host) |
16:20:12 | * | neurocyte0132889 joined #nim |
17:06:05 | * | PMunch joined #nim |
17:35:41 | * | jjido joined #nim |
17:54:35 | nixfreak_nim[m]1 | Hey guys good morning , I wanted to get some feedback from the chan about slowly migrating away from python/shell scripts to nim |
17:55:05 | nixfreak_nim[m]1 | I would like to start doing this on staging systems first then production systems |
17:55:43 | nixfreak_nim[m]1 | Does anyone have any experience with this ? |
18:02:05 | supakeen | Yes, what do you want to know? |
18:17:56 | FromDiscord | <el__maco> I suppose there isn't a somewhat less ceremonial way to ignore return value from a function 🤔 |
18:18:26 | FromDiscord | <el__maco> writing tons of ``discard`` everywhere feels like an overkill |
18:19:03 | nrds | <Prestige99> Not that I know of |
18:19:21 | nrds | <Prestige99> I think it's actually a good thing to acknowledge that you're throwing away a return value |
18:21:11 | FromDiscord | <haxscramper> there is a not recommended workaround - adding `{.discardable.}` to the procedure declaration |
18:21:31 | FromDiscord | <haxscramper> But generally it is not recommended to use, since explicitly annotating discarded value is better overall |
18:22:22 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3B2j |
18:22:59 | FromDiscord | <el__maco> idk... one major appeal to me in this language is the signal-to-noise ratio compared to many other languages. The syntax is just so clean without any extra fluff. Discard in particular seems in the "noisy" side, if I ignore the return value I probably don't care about the return value 🤷♂️ |
18:23:44 | FromDiscord | <el__maco> definitely trying this discardable specifier, thanks for the tip |
18:24:32 | FromDiscord | <el__maco> it seems to work, beautiful |
18:25:56 | FromDiscord | <enthus1ast> maybe the api is flawed when you have a ton of discards |
18:26:15 | FromDiscord | <Elegantbeef> Or is a C api |
18:26:22 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/3B2k |
18:26:29 | FromDiscord | <enthus1ast> true |
18:27:42 | FromDiscord | <haxscramper> So it is either API misdesign or misuse, and ignoring return codes sometimes amounts to horrible bugs where system you are interfacing with is not in valid state |
18:28:31 | FromDiscord | <haxscramper> That is - if half of the code is in discard statements all over |
18:28:31 | FromDiscord | <el__maco> many APIs feel obliged to return something from every function |
18:42:31 | FromDiscord | <haxscramper> `#!/usr/bin/env -S nim r` |
18:43:29 | FromDiscord | <haxscramper> I find it good for writing small automation scripts, and you can also make your own helper library for that purpose. |
18:44:32 | FromDiscord | <haxscramper> And there are libraries like cligen if you need to make the script usable as a CLI tool |
18:50:17 | nrds | <Prestige99> There are some libraries that return the same object you passed to it so you can chain function calls, that's usually the only time I use discard |
19:11:04 | FromDiscord | <qb> umm, Is there an xor assignment operator in nim? |
19:21:36 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
19:21:48 | * | Gustavo6046 joined #nim |
19:32:28 | FromDiscord | <Elegantbeef> There is not but you can always make one if you want it |
19:32:37 | FromDiscord | <Elegantbeef> wouldnt be named `xor=` though |
19:34:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3B2F |
19:46:59 | FromDiscord | <Goel> SDL library does that too, returns a -1 almost on all procs to check if it succeeded or not, and in the end it means a lot of ugly `discard` everywhere. Fortunatly `{.discardable.}` cleans it by a lot |
19:48:05 | nrds | <Prestige99> I usually use that return 'code' then display the sdl error message |
19:48:19 | FromDiscord | <Goel> (edit) "lot" => "lot. But in the end is about priority. For example the `-1` on `init()` or other main procs are a must have, while others are not needed at all and just overkill" |
19:50:06 | nixfreak_nim[m]1 | supakeen: did you start porting from shell and python? |
19:55:28 | supakeen | no, i started the rule that any program that could be rewritten within a working day was allowed to be written in any language a programmer likes |
19:55:48 | supakeen | which did indeed mostly involve small shell scripts and assorted tidbits |
19:58:51 | FromDiscord | <sealmove> another perfect use case for Nim seems to be devops |
19:59:39 | supakeen | we mostly had a bunch of small forwarding or information gathering programs that run on a lot of virtual machines, those were historically written in python |
19:59:51 | supakeen | those small programs were easily ported to nim and RES savings were very good :) |
20:00:43 | supakeen | losing 50MB here or there on daemons that run on all VMs is a lot of memory saved even with dedup |
20:17:23 | FromDiscord | <Yardanico> dedup? |
20:17:38 | FromDiscord | <Yardanico> what kind of software allows you to have ram deduplication? |
20:19:16 | FromDiscord | <leorize> linux's ksm can dedup ram |
20:20:07 | FromDiscord | <Yardanico> how well does that work 🤔 |
20:30:41 | supakeen | KSM works 'ok' |
20:34:19 | FromDiscord | <no name fits> I forgot how to find the bleeding edge docs 😓 |
20:38:04 | FromDiscord | <el__maco> hmm↵``fatal error C1001: Internal compiler error.↵(compiler file 'd:\A01\_work\12\s\src\vctools\Compiler\Utc\src\p2\main.c', line 213)`` |
20:39:04 | FromDiscord | <el__maco> sent a code paste, see https://paste.rs/Mak |
20:39:28 | FromDiscord | <no name fits> nvm I found them, srry |
20:39:29 | FromDiscord | <Yardanico> uh |
20:39:38 | FromDiscord | <Yardanico> @elmaco you hit a visual studio internal bug :D |
20:39:53 | FromDiscord | <qb> I've had a website which compares simple python code and on the other end the nim code. Was it on github? Could someone tell me where I can find it? |
20:40:08 | FromDiscord | <Yardanico> c1001 is a compiler crash basically |
20:40:29 | FromDiscord | <Yardanico> a visual studio compiler crash, not nim compiler crash |
20:41:22 | FromDiscord | <qb> nvm, got it https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers` |
20:41:55 | FromDiscord | <Yardanico> @qb just saying, this page isn't really official |
20:42:33 | FromDiscord | <Goel> You can check it out this too, it is helpfull at timesfor comparison even if some examples are very old or not all of them are covered @qb ↵http://rosettacode.org/wiki/Category:Programming_Languages |
20:43:29 | FromDiscord | <Yardanico> too sad that rosettacode is still using this ancient engine and way of sharing code |
20:43:47 | FromDiscord | <Yardanico> there's an announcement from a year ago about "modernizing rosetta code infrastructure", but so far nothing really has come out of it |
20:45:14 | FromDiscord | <Goel> It also says "connection is not secure to this website" probably they forgot to renew their security certificates 😱 |
20:46:12 | FromDiscord | <Yardanico> no |
20:46:25 | FromDiscord | <Yardanico> @Goel that's the way modern browsers say that website doesn't use http |
20:46:25 | FromDiscord | <Yardanico> (edit) "http" => "https" |
20:46:38 | FromDiscord | <Yardanico> rosettacode has https though, but there's no automatic redirect |
20:46:38 | FromDiscord | <Yardanico> https://rosettacode.org/wiki/Category:Programming_Languages |
20:47:30 | FromDiscord | <Yardanico> if the website has an expired certificate any modern browser will first display a big red warning and _only_ if you say that you're certain that it's safe, the browser will let you see the website |
20:48:25 | * | PMunch quit (Quit: leaving) |
20:51:29 | FromDiscord | <Goel> Thats good, smart browsers 😄 By the way Yardanico, earlier i was having a look around github new programming languages and i was curious about one of them called Arturo. I checked it and i was surprized to notice it was made `Nim 56.4%`! |
20:54:54 | FromDiscord | <Yardanico> there are a lot of smallish proglangs made in nim |
21:07:32 | FromDiscord | <tandy> what can you replace `copyMem` and `zeroMem` with for the js backend? |
21:09:05 | FromDiscord | <Yardanico> check out https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/streams.nim for some examples |
21:09:31 | FromDiscord | <tandy> ty |
21:10:32 | FromDiscord | <tandy> looks like `cast`? |
21:11:11 | FromDiscord | <el__maco> I updated msvc but it keeps crashing(?). Only if --opt:speed is provided, e.g. --opt:size is fine 🤔↵do I really have to install gcc 🥺 |
21:14:22 | * | neurocyte0132889 quit (Ping timeout: 265 seconds) |
21:27:07 | * | Gustavo6046 quit (Remote host closed the connection) |
21:27:35 | * | Gustavo6046 joined #nim |
21:28:54 | * | jafarlihi joined #nim |
21:29:57 | * | Vladar quit (Quit: Leaving) |
21:30:22 | FromDiscord | <no name fits> Choosenim does that for you I'm pretty sure |
21:31:32 | FromDiscord | <no name fits> What's a good data structure to use when I have several keys that map to the same value? |
21:34:17 | FromDiscord | <IsaacPaul> I'd just use a dictionary or hashmap |
21:35:06 | * | NeoCron quit (Quit: Leaving) |
21:35:26 | FromDiscord | <IsaacPaul> if memory is an issue id make a dictionary with the content hashed and use that as the key. |
21:35:27 | * | NeoCron joined #nim |
21:36:16 | FromDiscord | <IsaacPaul> if you need several keys to match that 1 key then (dictionary again) lol. If you're asking if there's a well known structure that already does this then "shrug" |
21:36:21 | FromDiscord | <IsaacPaul> (edit) ""shrug"" => "idk 🤷♂️" |
21:38:44 | FromDiscord | <IsaacPaul> https://www.quora.com/What-is-the-best-data-structure-for-mapping-multiple-keys-to-the-same-value↵> One reasonable option is to use a pair of hash tables. The first one maps keys to standardized keys, and the second one maps standardized keys to values.↵Seems like that's what is recommended |
21:39:12 | FromDiscord | <no name fits> I see, thanks |
21:41:25 | FromDiscord | <no name fits> I was hoping there was some weird tree structure or something that fixed it really cleanly. Good old dictionary |
21:42:45 | nrds | <Prestige99> Why are there keys mapping to the same value a lot? |
21:43:04 | nrds | <Prestige99> almost sounds like the map is inverted |
21:53:36 | * | max22- quit (Quit: Leaving) |
21:54:31 | FromDiscord | <rb3.nim> sent a code paste, see https://play.nim-lang.org/#ix=3B36 |
22:10:07 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3B39 |
22:18:42 | FromDiscord | <Elegantbeef> Hmm i can probably help! |
22:18:42 | FromDiscord | <geekrelief> hmm look like my issue might be because the dot operator is inside a macro. |
22:19:11 | FromDiscord | <geekrelief> In reply to @Elegantbeef "Hmm i can probably": Hey beef, you talking to me? |
22:19:20 | FromDiscord | <Elegantbeef> Yes |
22:19:26 | FromDiscord | <geekrelief> I'm think it's something up with the `cOverride` macro from nimterop. |
22:19:37 | FromDiscord | <geekrelief> (edit) "I'm" => "I" |
22:20:08 | FromDiscord | <Elegantbeef> The first block works fine |
22:20:35 | FromDiscord | <geekrelief> yeah it appears to compile |
22:22:29 | FromDiscord | <geekrelief> hmm it's gotta be something with nimterop then 🥲 |
22:23:30 | FromDiscord | <geekrelief> I'm starting to wonder if it's even worth it using nimterop now lol |
22:28:55 | FromDiscord | <geekrelief> maybe it's too soon to jump to that conclusion. |
22:54:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
23:06:09 | * | NeoCron quit (Quit: Leaving) |
23:14:41 | * | jafarlihi quit (Quit: WeeChat 3.3) |
23:26:44 | FromDiscord | <el__maco> how does one go from ``newSeq[cchar]`` to ``string`` |
23:27:01 | FromDiscord | <el__maco> (edit) "``newSeq[cchar]``" => "``seq[cchar]``" |
23:29:37 | * | Zevv quit (Ping timeout: 252 seconds) |
23:30:05 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3B3m |
23:30:06 | FromDiscord | <Elegantbeef> Two methods |
23:32:15 | FromDiscord | <el__maco> ``cast[string]`` seems to work, thanks |
23:56:04 | FromDiscord | <ynfle (ynfle)> @el\_\_maco I wouldn't rely on it. That's an implementation detail. `cast` in nim is a bit cast not a type cast |