00:02:58 | FromDiscord | <Goat> Using pararules feels like I'm using some sort of internal database inside of Nim itself |
00:03:36 | FromDiscord | <Goat> Reminds me of Picolisp's integrated database |
00:40:03 | FromDiscord | <auxym> yeah zach's talk was really interesting. out of curiosity, are you using pararules for a game or something else? |
00:58:05 | FromDiscord | <Goat> I am considering using it for another game that isn't NimHack but right now I'm making a simple note managing thign with it to learn the ropes |
01:00:30 | FromDiscord | <Elegantbeef> Anyone have any more entries for TMWN? |
01:19:25 | * | neurocyte8614 joined #nim |
01:21:32 | * | neurocyte861 quit (Ping timeout: 260 seconds) |
01:21:33 | * | neurocyte8614 is now known as neurocyte861 |
01:35:13 | * | lumo_e quit (Ping timeout: 256 seconds) |
01:44:54 | * | Gustavo6046_ joined #nim |
01:47:23 | * | Gustavo6046 quit (Ping timeout: 250 seconds) |
01:48:46 | * | Gustavo6046 joined #nim |
01:49:23 | * | Gustavo6046_ quit (Ping timeout: 252 seconds) |
02:06:28 | FromDiscord | <grubarb> Hi, I'm new here and want to get more involved with the nim language, I have a use case to make a CLI and was wondering if Nim has any popular CLI frameworks like Click in Python? |
02:07:49 | FromDiscord | <Elegantbeef> https://github.com/c-blake/cligen is generally the goto nim CLI helper |
02:08:10 | FromDiscord | <Goat> Nim also has a port of docopt |
02:10:34 | FromDiscord | <Goat> https://github.com/docopt/docopt.nim |
02:10:53 | FromDiscord | <grubarb> awesome, thanks |
02:12:39 | FromDiscord | <huantian> https://github.com/iffy/nim-argparse↵argparse is also a decent one |
02:13:18 | FromDiscord | <ajusa> Nim doesn't have anything for gRPC right, just protobuf? I did a quick search and noticed there was a forum thread related to this recently |
02:13:51 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/959274363633426452/image.png |
02:14:49 | FromDiscord | <ajusa> Rip, thanks for the fairly conclusive answer |
02:15:33 | FromDiscord | <Elegantbeef> Just only use Nim and modify my RPC API |
02:16:02 | FromDiscord | <ajusa> But I want to use protocol buffers |
02:16:15 | FromDiscord | <Elegantbeef> I'm joking |
02:17:25 | FromDiscord | <ajusa> this is a slightly crazy route I'm taking, but rather than writing an openapi -> Nim library, turns out there is already openapi -> protobuf/gRPC. I can get all the types from that using the status library, but was making sure nobody already had a gRPC library. |
02:17:49 | FromDiscord | <ajusa> also I'll have something for TMWN next month probably |
02:30:43 | FromDiscord | <Goat> whats tmwn? |
02:30:56 | FromDiscord | <huantian> This Month With Nim |
02:30:57 | FromDiscord | <huantian> I think |
02:31:04 | FromDiscord | <Elegantbeef> This month with nim, a monthly collection of projects and libraries in development with Nim |
02:32:44 | FromDiscord | <Goat> Ah |
02:33:49 | * | arkurious quit (Quit: Leaving) |
02:42:12 | nrds | <Prestige99> hmm |
02:42:26 | FromDiscord | <Elegantbeef> mmh |
02:42:34 | nrds | <Prestige99> Maybe I should submit something to that, sometime |
02:42:34 | FromDiscord | <huantian> hrmm |
02:43:04 | FromDiscord | <Elegantbeef> Perhaps |
02:46:33 | * | s3govesus joined #nim |
02:57:20 | FromDiscord | <Patitotective> shouldn't `a += 1` be a template for `a = a + 1`? |
02:57:37 | FromDiscord | <Patitotective> so i don't have to define a `+=` proc, only a `+` proc |
02:58:19 | FromDiscord | <Elegantbeef> You know you can do that right? |
02:58:43 | FromDiscord | <Patitotective> yea but, shouldn't that be the default behaviour? |
02:58:49 | FromDiscord | <Patitotective> (edit) "behaviour?" => "behavior?" |
02:59:07 | FromDiscord | <Patitotective> or is there some reason for not doing that |
02:59:12 | FromDiscord | <Elegantbeef> Do you always want a `+=` if `+` is defined is something i'd ask, perhaps i dont know |
03:01:37 | FromDiscord | <Patitotective> hmm, i think i get what are you saying↵maybe it should be in an additional useful templates stdlib |
03:02:57 | FromDiscord | <Patitotective> (edit) "hmm, i think i get what are you saying↵maybe it should be in an additional useful templates stdlib ... " added "(?)" |
03:03:27 | * | s3govesus quit (Remote host closed the connection) |
03:46:55 | * | LuxuryMode joined #nim |
03:48:41 | LuxuryMode | What are the best options for writing REST APIs in Nim. I've seen httpbeast, but not sure what else is out there. |
03:49:50 | FromDiscord | <Elegantbeef> https://nimble.directory/search?query=rest I dont know anything about rest apis so can only point you here |
03:50:17 | LuxuryMode | Thanks |
03:50:40 | LuxuryMode | Looks like I missed jester https://github.com/dom96/jester which is built on top of httpbeast |
03:59:08 | FromDiscord | <spoon> ye, jester is great |
04:06:17 | * | Lord_Nightmare quit (Ping timeout: 246 seconds) |
04:13:06 | * | Lord_Nightmare joined #nim |
04:13:22 | NimEventer | New thread by KerryC: Define proc that is called from imported module, see https://forum.nim-lang.org/t/9063 |
04:16:45 | * | slowButPresent quit (Quit: leaving) |
04:21:47 | FromDiscord | <huantian> You might also find more info somewhere in the webdev channel↵(<@709044657232936960_=4cuxury=4dode=5b=49=52=43=5d>) |
04:54:46 | * | yoyojambo quit (Read error: Connection reset by peer) |
05:15:10 | * | rockcavera quit (Remote host closed the connection) |
05:51:38 | * | Gustavo6046 quit (Ping timeout: 260 seconds) |
06:07:38 | NimEventer | New thread by Araq: SiSix and Nim, see https://forum.nim-lang.org/t/9064 |
06:48:16 | * | PMunch joined #nim |
06:50:07 | * | ltriant quit (Ping timeout: 260 seconds) |
07:13:27 | * | gsalazar joined #nim |
07:18:43 | * | ltriant joined #nim |
07:34:23 | FromDiscord | <aph> is there a nim thing similar to this: https://docs.python.org/3/library/struct.html/ btw |
07:34:36 | FromDiscord | <aph> i wanna rewrite a parser or smth |
07:35:32 | PMunch | binaryparse/binarylang are both similar |
07:35:44 | FromDiscord | <aph> hmm, thanks! will look into it |
07:35:47 | FromDiscord | <aph> (edit) "it" => "it!" |
07:36:15 | PMunch | There's apparently also a struct module based off-on the Python one: https://github.com/OpenSystemsLab/struct.nim |
07:36:41 | FromDiscord | <aph> 👀 |
07:36:45 | FromDiscord | <aph> nice, thanks! |
08:09:54 | FromDiscord | <qb> How would I convert a bytestring to a seq[byte] again? https://play.nim-lang.org/#ix=3TZE |
08:10:15 | FromDiscord | <qb> (edit) "bytestring" => "hex byte string" |
08:10:26 | FromDiscord | <Elegantbeef> you can cast it back |
08:11:19 | PMunch | @qb, why are you converting it to a string in the first place? |
08:11:48 | PMunch | To get that back you'd need a parser |
08:13:34 | FromDiscord | <qb> I'm still on my byte pattern scan thingy. I actually want to pass a hex byte string to that function and compare it to a huge seq[byte]. Casting that huge seq[byte] pages to a hex byte string leads into performance issues |
08:14:54 | FromDiscord | <Elegantbeef> `toOpenArray`? |
08:17:22 | FromDiscord | <Elegantbeef> I dont see why you need to cast it to anything |
08:20:10 | PMunch | @qb, what you should do instead is convert the small pattern to a seq[byte] instead and then write your pattern scanning based on seq[byte] instead |
08:20:54 | FromDiscord | <qb> Yea that's what I'm trying to do 😄 |
08:21:14 | FromDiscord | <qb> So all I need is actually convert a byte hex string to a seq[byte] |
08:21:30 | FromDiscord | <Elegantbeef> What's a "byte hex string" in this case? |
08:21:40 | PMunch | "FA 05 7B" |
08:21:46 | FromDiscord | <qb> cast[string](seq[byte]).toHex() |
08:21:46 | FromDiscord | <Elegantbeef> Ah ok |
08:22:19 | FromDiscord | <Elegantbeef> This is a scanning algo? |
08:22:42 | PMunch | A loop with https://nim-lang.org/docs/strutils.html#parseHexInt%2Cstring where you first check if the two next characters are "??" should get you where you need |
08:23:03 | PMunch | Of course you'd need some way to store ?? positions |
08:23:51 | PMunch | @Elegantbeef, yes, from a previous paste they want to specify a pattern like "FA ?? 05 7B" and then pass in a sequence of bytes and find the first index which matches that. |
08:23:54 | FromDiscord | <qb> Yea I'm reading memory pages from a process and want to scan that memory with patterns. I'm currently using regex and casting the huge pages into string.toHex(). https://github.com/qb-0/PyMeow/blob/master/src/windows/memory.nim#L141 |
08:24:09 | FromDiscord | <qb> Which performs pretty bad |
08:24:31 | PMunch | No surprise there :P |
08:24:51 | FromDiscord | <Elegantbeef> Ah ok |
08:24:57 | FromDiscord | <Elegantbeef> Yea dont use regex everererer 😛 |
08:25:00 | * | Zectbumo joined #nim |
08:25:07 | FromDiscord | <Elegantbeef> I'm kidding, pmunch put the pitchfork away |
08:25:26 | PMunch | Haha :P |
08:25:45 | PMunch | By the way, why did you close my Futhark this month in Nim thing? |
08:26:49 | FromDiscord | <Elegantbeef> Why do you think |
08:26:57 | FromDiscord | <Elegantbeef> I added it and submitted the PR |
08:27:04 | PMunch | Ah right :P |
08:27:13 | PMunch | That's what I expected, just wanted to make sure |
08:27:25 | FromDiscord | <Elegantbeef> qb personally i'd use an iterator for this |
08:28:54 | PMunch | Just make sure not to do the parsing every iteration |
08:32:07 | FromDiscord | <Elegantbeef> Fill in the blank 😛 |
08:32:12 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TZJ |
08:32:52 | FromDiscord | <Elegantbeef> I'd personally make the needle a `seq[Option[byte]]` |
08:33:19 | FromDiscord | <Elegantbeef> pmunch you use arch right? |
08:39:21 | PMunch | Yup |
08:40:19 | FromDiscord | <Elegantbeef> wouldnt want to quickly try to cross compile a owlkettle program would you? |
08:40:27 | PMunch | Sure |
08:41:35 | FromDiscord | <Elegantbeef> You need the mingw-gtk3.0 package(which debian doesnt have, which is why i'm interested in seeing if it is simpler when it's there), but here's the code https://play.nim-lang.org/#ix=3TZL |
08:42:28 | FromDiscord | <Elegantbeef> I did find a bund of the build libraries, and compiled with it, but it didnt run so figured the setup i used was less than ideal |
08:48:17 | PMunch | Okay, installing that package and the trillion dependencies it has now |
08:48:21 | PMunch | Just give me a minute |
08:49:05 | FromDiscord | <Elegantbeef> Always weird hearing someone ask for time when they're doing something they could've said "no" to 😛 |
09:10:44 | FromDiscord | <aph> which IDE do yall use for nim? |
09:11:14 | FromDiscord | <Elegantbeef> I'm presently using Kate with the Nimlsp as my editor, prior i was using vscodium and saem's extension |
09:11:31 | FromDiscord | <aph> hmm |
09:12:08 | * | jmdaemon quit (Ping timeout: 252 seconds) |
09:12:48 | FromDiscord | <Elegantbeef> hmm indeed |
09:15:03 | FromDiscord | <aph> meh, i'ma use the `cat` command to write nim files |
09:15:15 | FromDiscord | <Elegantbeef> Have fun |
09:17:06 | FromDiscord | <aph> "fun" |
09:20:43 | PMunch | I use Vim |
09:20:55 | PMunch | At least use sed :P |
09:21:09 | FromDiscord | <Elegantbeef> Just use echo and pipe to a file |
09:37:39 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3TZQ |
09:40:32 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=3TZR |
09:41:22 | FromDiscord | <hmmm> lol you are right, I returned at the wrong ident point 😃 |
09:41:23 | FromDiscord | <Zoom> It literally says what the matter is. Wording isn't great (you can read that "or" as "code after ... {.noReturn.} proc" ?) |
09:45:11 | FromDiscord | <hmmm> ah guys if I have a path C:\\thing\\file.jpg is there some strutils facility to get the dir C:\\thing |
09:48:11 | FromDiscord | <hmmm> oh we have os splitfile |
10:07:11 | FromDiscord | <enthus1ast> Do you have your vim config up somewhere?↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
10:07:46 | FromDiscord | <enthus1ast> I've only rudimentary nim support in my (n)vim |
10:08:28 | PMunch | Hmm, not really, but there's nothing secret in there so I can share it |
10:09:05 | PMunch | http://ix.io/3TZV |
10:09:27 | PMunch | Obviously a lot of stuff there which isn't Nim related |
10:10:19 | NimEventer | New thread by Didlybom: Choosing the nim installation folder used by choosenim, see https://forum.nim-lang.org/t/9065 |
10:17:42 | FromDiscord | <Phil> beeeeeef (ElegantBeef), I've got a constructor question because I'm getting unexpected behaviour |
10:25:38 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3U01 |
10:53:21 | PMunch | Hmm, I just Ctrl+z to put Vim in the background, then run whatever Nim command I need |
10:53:28 | PMunch | Then fg to bring it back |
10:57:23 | FromDiscord | <fbpyr> ahh.. so that was the "magic" 🪄 ✨ I saw in the aoc streams.. 🙂 |
10:57:44 | PMunch | Magic? |
10:58:03 | PMunch | Oh when Vim just suddenly disappeared and reappeared? |
10:58:37 | FromDiscord | <fbpyr> exactly - well, the reappearing I understood, as I saw `fg` |
10:58:59 | FromDiscord | <fbpyr> but not the ctrl+z |
10:59:09 | PMunch | Yeah seeing people edit in Vim can be a bit confusing sometimes :P |
10:59:49 | PMunch | By the way, ctrl+z works for anything, have a long running process you want to pause for a while? Ctrl+z |
10:59:58 | PMunch | Want to see running tasks in your shell? jobs |
11:00:18 | PMunch | Want to resume a specific one? fg %2 |
11:00:29 | PMunch | Send the current task to the background? bg |
11:00:47 | FromDiscord | <fbpyr> ah nice - thanks for the hint! so far I only hit ctrl+z accidentally.. 😂 |
11:01:03 | PMunch | Haha :P |
11:01:28 | PMunch | By the way, background tasks will still write to the terminal, if you want to stop that you can use `disown -h %1` |
11:01:41 | PMunch | The % numbers are the numbers from `jobs` |
11:03:06 | FromDiscord | <fbpyr> cool! 🙂 now I need to figure out how to use this neat trick with my preferred terminal editor `micro` |
11:03:41 | FromDiscord | <fbpyr> ..it has ctrl+z mapped to undo.. 🙂 |
11:03:54 | FromDiscord | <fbpyr> will fiddle with the keybindings.. |
11:04:11 | PMunch | Ah yeah that won't work :P |
11:04:35 | FromDiscord | <Zoom> I tried to autocmd my Vim for Nim but was not entirely successful and was tired of quickedit popping up. So, back to ctrl-z |
11:24:31 | NimEventer | New thread by Veksha: [Karax] "include" statement doesn't work correctly inside karax DSL, see https://forum.nim-lang.org/t/9066 |
11:54:20 | PMunch | Soo, I just turned this into a library: https://github.com/PMunch/autotemplate |
12:03:04 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3U0m |
12:03:56 | FromDiscord | <Zoom> You don't have a name for your tuple argument |
12:03:57 | FromDiscord | <hmmm> ohhhhhhhhh |
12:03:59 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3U0n |
12:04:00 | FromDiscord | <hmmm> ty |
12:04:48 | * | slowButPresent joined #nim |
12:05:51 | FromDiscord | <Rika> Imagine using burger though |
12:07:58 | FromDiscord | <hmmm> you know what, I'm using burger in production, and leaving a comment #ty exelotl, no one can stop me from doing what is right 😄 |
12:12:31 | FromDiscord | <Zoom> Threading question. I'm passing a basic typed variable to some threads for signalling. The vars are written only by a parent thread and only accessed for reads by all other threads. Am I correct, that using `Atomic` is enough for this, and I can omit locking the vars? |
12:14:35 | FromDiscord | <Zoom> Also, not having explicit ownership or at least views make the code frail, if I ever forget the "one writer multiple readers" relationship. |
12:15:22 | FromDiscord | <Rika> In reply to @Zoom "Threading question. I'm passing": Sounds good to me |
12:20:43 | * | jjido joined #nim |
12:22:48 | PMunch | Yeah that should be fine |
12:38:02 | FromDiscord | <Zoom> The more robust alternative for one-time signal would be waiting on a channel, with non-blocking `tryRecv`, am I right? Since we can't just open/close our impl, what would be the optimal dummy stuff to send? A bool? |
12:38:25 | FromDiscord | <Zoom> We can't use `void` for this... |
12:39:50 | PMunch | Sending a bool over a channel would certainly also work |
12:40:03 | PMunch | Although that probably has a bit more overhead than just setting an atomic bool |
12:49:10 | * | Zectbumo quit (Remote host closed the connection) |
12:56:12 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
13:03:10 | * | jjido joined #nim |
13:04:59 | * | yoyojambo joined #nim |
13:07:03 | * | jjido quit (Client Quit) |
13:09:36 | * | rockcavera joined #nim |
13:09:36 | * | rockcavera quit (Changing host) |
13:09:36 | * | rockcavera joined #nim |
13:11:44 | * | yoyojambo quit (Read error: Connection reset by peer) |
13:16:03 | * | arkurious joined #nim |
13:19:35 | * | xet7 quit (Remote host closed the connection) |
13:21:11 | * | xet7 joined #nim |
13:42:43 | * | xet7 quit (Remote host closed the connection) |
13:54:22 | NimEventer | New Nimble package! gimg - Google Images scraper lib and CLI, see https://gitlab.com/lurlo/gimg |
13:55:15 | * | vicfred quit (Quit: Leaving) |
13:57:57 | PMunch | @Elegantbeef, I'm unable to install the package because the Gnome gitlab instance is currently down.. |
14:01:23 | nrds | <Prestige99> autotemplate looks cool PMunch |
14:01:34 | PMunch | Thanks :) |
14:02:56 | PMunch | It's quite a simple idea, now we only need automatic parsing of requests into types and we can have fully type-safe routes :) |
14:03:49 | PMunch | That is the idea behind this, you would write routes which return a type, not some formatted string. Then the logic for how to turn a type into a formatted string is done via templates |
14:04:04 | PMunch | Of course it could be used for anything, not only web servers |
14:04:16 | FromDiscord | <mratsim> In reply to @PMunch "<@145405730571288577>, I'm unable to": Mmmmh I tried to install a gnome package last weekend and it was already down |
14:04:52 | PMunch | I want to add Nimja support as well, but I'm not sure how I'd do it without requiring Nimja as an import |
14:05:13 | PMunch | Maybe I'll just give the user the ability to pass in any block as the formatter |
14:05:23 | PMunch | @mratsim, really? That's a bit strange |
14:06:25 | nrds | <Prestige99> hm there aren't any nim "linters" are there? |
14:06:32 | nrds | <Prestige99> or am I oblivious |
14:07:17 | * | vicecea quit (Remote host closed the connection) |
14:07:48 | * | vicecea joined #nim |
14:09:57 | PMunch | Depends on how you define linter I guess |
14:12:09 | nrds | <Prestige99> looking for something that can enforce code style; like tell it to use camel case, maximum line length, etc |
14:12:28 | nrds | <Prestige99> Wonder how crazy of a project it would be to try making a very useful linter.. |
14:13:03 | FromDiscord | <enthus1ast> on windows everything (vim at least) will crash↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
14:13:24 | PMunch | nim c --styleCheck:hint project |
14:13:31 | PMunch | I believe that should give you some style hints |
14:14:17 | PMunch | There's also nimpretty |
14:14:27 | * | noeontheend joined #nim |
14:14:52 | nrds | <Prestige99> oh hmm |
14:15:33 | PMunch | @enthus1ast, Vim crashes on Windows? |
14:15:47 | FromDiscord | <Rika> In reply to @nrds "<Prestige> Wonder how crazy": Difficult as of now |
14:15:57 | PMunch | Oh well, I've gotta go |
14:15:58 | * | PMunch quit (Quit: Leaving) |
14:15:59 | FromDiscord | <Rika> Style check isn’t a complete check naturally |
14:16:42 | nrds | <Prestige99> hm would be nice to see these via nimlsp actually. The styleChecks |
14:16:47 | FromDiscord | <enthus1ast> windows cannot do this (is it sighub?) so on ctrl+z vim will suspend somehow, but can never be re awakened |
14:17:06 | FromDiscord | <enthus1ast> so on windows i mapped ctrl+z to noop |
14:28:35 | * | noeontheend quit (Ping timeout: 246 seconds) |
14:31:04 | FromDiscord | <ShalokShalom> @PMunch: May you say something about that? |
14:31:05 | FromDiscord | <ShalokShalom> https://invent.kde.org/utilities/kate/-/merge_requests/680/diffs |
14:31:23 | FromDiscord | <ShalokShalom> Or somebody else, who knows. Its about including Kate LSP support for Nim by default. Thanks |
14:31:45 | FromDiscord | <ShalokShalom> (edit) "Kate" => "Nim" | "Nim" => "Kate" |
14:31:58 | FromDiscord | <hmmm> sent a code paste, see https://paste.rs/jpa |
14:32:16 | FromDiscord | <ShalokShalom> That is the kind of type declaration code smell I mean |
14:32:48 | FromDiscord | <ShalokShalom> Basically renders the top lines close to unreadable 😦 |
14:42:08 | * | Gustavo6046 joined #nim |
14:43:13 | * | Gustavo6046 quit (Remote host closed the connection) |
14:43:33 | * | Gustavo6046 joined #nim |
14:47:59 | FromDiscord | <PMunch> @ShalokShalom if a user has added `.nimble/bin` to their path (as they should do) then just `nimlsp` will suffice |
14:49:02 | FromDiscord | <PMunch> And about that type declaration, definitely not a great way of doing it, that should just return an object.. |
14:49:10 | nrds | <Prestige99> oh he's back |
14:49:35 | FromDiscord | <PMunch> And realistically `burger` should just be replaced by `result` |
14:49:53 | FromDiscord | <ShalokShalom> I have nimble/bin in my PATH and VSCode cant find it |
14:50:15 | FromDiscord | <ShalokShalom> In reply to @PMunch "And about that type": I see these types of things all over the place |
14:50:34 | FromDiscord | <ShalokShalom> I mean, if types could be at least added on top of the actual function, I could look clean. |
14:50:40 | FromDiscord | <ShalokShalom> But that mess.. |
14:51:24 | FromDiscord | <ShalokShalom> Its just not very elegant. |
14:51:45 | FromDiscord | <PMunch> Well then create an issue for VSCode, stuff in the PATH should be executable.. |
14:51:57 | FromDiscord | <PMunch> On top? |
14:51:57 | FromDiscord | <ShalokShalom> Normal Nim code never goes that long and convoluted. |
14:51:58 | FromDiscord | <hmmm> burger is not negotiable since it's exy creation 🧐 |
14:52:24 | FromDiscord | <ShalokShalom> In reply to @PMunch "On top?": Like Haskell |
14:52:37 | FromDiscord | <PMunch> @hmmm I'm pretty sure he'd agree it should be changed to result. His original example was an argument called burger |
14:53:03 | FromDiscord | <PMunch> Sorry, not that familiar with Haskell syntax |
14:53:12 | nrds | <DarthOreo99> o/ Prestige |
14:53:18 | nrds | <Prestige99> Hey DarthOreo, welcome |
14:53:23 | * | vsantana joined #nim |
14:53:47 | FromDiscord | <Rika> ah you're back |
14:54:05 | FromDiscord | <ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/959465683702399017/Screenshot_79.png |
14:54:12 | FromDiscord | <Rika> In reply to @hmmm "ok boys the burger": i really think your tuple should be an object |
14:54:20 | FromDiscord | <ShalokShalom> The first line is the type declaration |
14:54:33 | FromDiscord | <ShalokShalom> So you get your own line for your type declarations |
14:54:47 | FromDiscord | <ShalokShalom> Instead of squeezing them into your code |
14:54:53 | FromDiscord | <Solitude> not once i've see you in this chat and you werent hardcore trolling |
14:55:01 | FromDiscord | <ShalokShalom> Thanks a lot |
14:55:04 | FromDiscord | <ShalokShalom> My pleasure |
14:55:08 | FromDiscord | <ShalokShalom> blushing |
14:55:18 | FromDiscord | <Solitude> respect |
14:55:40 | FromDiscord | <ShalokShalom> I can only give this back |
14:56:37 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
14:58:20 | FromDiscord | <hmmm> In reply to @Rika "i really think your": ty rika, but I'm wondering, what is the way the chaining two objects of the same kind? add or & or somth? |
14:58:32 | FromDiscord | <Rika> what do you mean chaining |
14:58:42 | FromDiscord | <hmmm> like you chain 2 seqs with & |
14:58:47 | FromDiscord | <Rika> yes |
14:59:01 | FromDiscord | <Rika> objects are not something you chain, you cant chain tuples either |
14:59:05 | FromDiscord | <Rika> theyre not "collections" |
14:59:09 | FromDiscord | <hmmm> hmm |
14:59:10 | FromDiscord | <hmmm> I see |
14:59:41 | FromDiscord | <hmmm> what about the fields of the objects? |
14:59:46 | FromDiscord | <hmmm> I can chain the same fields? |
15:00:25 | FromDiscord | <hmmm> can I |
15:00:39 | FromDiscord | <hmmm> lol english is failing me today harder than usual (and the usual is bad) |
15:01:27 | FromDiscord | <huantian> I mean there’s nothing stopping you from `myObj.someSeq & otherObj.someSeq` |
15:01:39 | FromDiscord | <hmmm> yea I was thinking the same |
15:04:07 | * | lumo_e joined #nim |
15:05:01 | * | oprypin quit (Quit: Bye) |
15:05:10 | * | oprypin joined #nim |
15:11:47 | * | vsantana quit (Ping timeout: 260 seconds) |
15:13:49 | FromDiscord | <Rika> if theyre seqs/collections sure |
15:13:57 | FromDiscord | <Rika> what does it mean to chain objects? |
15:23:07 | * | jjido joined #nim |
15:26:08 | FromDiscord | <PMunch> @ShalokShalom well I mean you can kinda do it with `using` https://nim-lang.org/docs/manual.html#statements-and-expressions-using-statement |
15:30:29 | NimEventer | New Nimble package! userdef - A more advanced adduser for your Alpine based Docker images., see https://github.com/theAkito/userdef |
15:40:01 | * | lumidify quit (Remote host closed the connection) |
15:53:58 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
16:05:38 | * | lumidify joined #nim |
16:08:20 | FromDiscord | <slymilano> What is the recommended way to schedule and run background jobs in Nim? Something like Rails' sidekiq |
16:12:17 | * | gsalazar quit (Ping timeout: 260 seconds) |
16:13:26 | * | rez joined #nim |
16:15:39 | FromDiscord | <willyboar> maybe https://github.com/soasme/nim-schedules |
16:32:26 | nrds | <DarthOreo99> i managed to get my bot to connect with sasl on nim |
16:32:35 | nrds | <DarthOreo99> now it nees logic lol. |
16:32:42 | nrds | <DarthOreo99> vs sending raw commands to do it. |
16:32:51 | FromDiscord | <Rika> what does your bot do |
16:32:59 | nrds | <DarthOreo99> absolutely NOTHING! |
16:33:00 | nrds | <DarthOreo99> lol |
16:33:06 | nrds | <DarthOreo99> sorry. &help |
16:33:08 | nrds | <DarthOreo99> thats it |
16:33:10 | nrds | <sorcerer99> LOL |
16:33:27 | nrds | <DarthOreo99> its a "START!" |
16:33:31 | nrds | <sorcerer99> he means nothing yet, we'll find a use for it |
16:33:32 | nrds | <sorcerer99> :P |
16:33:44 | nrds | <DarthOreo99> send sheep to CT 24/7 |
16:33:59 | nrds | <sorcerer99> lol i mean, we could make a ascii trigger for sheep |
16:34:06 | nrds | <sorcerer99> and cue it when computertech chats |
16:34:08 | nrds | <sorcerer99> lolol |
16:37:15 | FromDiscord | <Rika> i didnt know teenagers still used irc |
16:38:23 | nrds | <Prestige99> nice, bout time someone added sasl support |
16:38:36 | nrds | <DarthOreo99> 0.4.1 irc lol |
16:38:39 | nrds | <DarthOreo99> now with sasl! |
16:38:45 | nrds | <DarthOreo99> XD |
16:38:57 | nrds | <DarthOreo99> aleast works with unreal :) |
16:47:42 | * | xet7 joined #nim |
16:55:40 | FromDiscord | <exelotl> what happened to ircord :thonkang: |
16:57:11 | FromDiscord | <Rika> what about? this is a different bot |
16:57:22 | FromDiscord | <Rika> its discord <> irc <> another irc server |
16:57:45 | FromDiscord | <Rika> discord <-ircord-> irc <-nrds-> another irc server |
16:57:56 | FromDiscord | <exelotl> oh.. I thought nrds was a person lol |
16:58:46 | FromDiscord | <exelotl> (a person whos name had accidentally gotten "stuck" as the name of the bot, like what happens when you use Ripcord) |
16:59:04 | FromDiscord | <Rika> i see |
16:59:48 | FromDiscord | <exelotl> In reply to @hmmm "burger is not negotiable": I'm honoured lmao |
16:59:59 | nrds | <sorcerer99> oh no, nerds is my irc network |
17:00:01 | nrds | <sorcerer99> lol |
17:00:07 | nrds | <sorcerer99> well irc-nerds to be precise |
17:00:32 | nrds | <sorcerer99> i started it to gather nerds of all sorts and get a nice nerdy and/or social chats going on |
17:00:43 | nrds | <sorcerer99> real goal was to help newbies in like linux |
17:01:12 | nrds | <sorcerer99> im trying to expand with getting people to host their home channels on the network |
17:01:32 | nrds | <sorcerer99> i got a few devs, and the linux distro; Garuda Linux, are hosted here so far |
17:07:09 | nrds | <DarthOreo99> im a nerd in training.. code wise.. |
17:07:14 | nrds | <DarthOreo99> more admin of sorts :) |
17:09:18 | FromDiscord | <gerwy> guys i have a problem and i wonder how to solve it |
17:09:45 | FromDiscord | <gerwy> basically, lets say that i need to store some sort of virtual variables↵i know their name, their type and default value or value assigned to them |
17:09:52 | nrds | <sorcerer99> im just the fearless skill-less leader ;x |
17:10:50 | FromDiscord | <gerwy> now question is, how would i store them? I thought of having a Table with their names as indexes, but that would be hard to do with multiple types of variables in one table or make it super big↵sooo, what about making that variable in nim and storing a pointer to it? Is it possible? |
17:10:56 | FromDiscord | <Rika> oh ok |
17:11:07 | FromDiscord | <Rika> i didnt actually know what network that bot bridged to |
17:11:20 | FromDiscord | <Rika> ~~not that i cared either, not really something to care too much about honestly~~ |
17:11:54 | FromDiscord | <Rika> In reply to @Life Sucks "now question is, how": think of a different solution before resorting to pointers |
17:11:58 | nrds | <DarthOreo99> now ya do \m/ |
17:12:11 | FromDiscord | <Rika> pointer is almost never the correct option btw |
17:12:17 | FromDiscord | <federico3> the april fool is just... weird... |
17:12:55 | nrds | <Prestige99> What do you mean federico3? |
17:13:08 | Amun-Ra | gerwy: like tables? |
17:13:59 | FromDiscord | <gerwy> In reply to @Rika "pointer is almost never": but for variables it sounds reasonable :// |
17:14:23 | FromDiscord | <Rika> have you tried an object variant? |
17:14:44 | FromDiscord | <Rika> if you know all of the types you can use object variants |
17:14:55 | FromDiscord | <gerwy> In reply to @Amun-Ra "<@347345994217816066>: like tables?": can they store multiple types of data instead of the one specified when declaring it?↵Like i know i could do [string,int] to store ints but what for otherse |
17:15:00 | FromDiscord | <gerwy> (edit) "otherse" => "others" |
17:15:59 | FromDiscord | <Rika> In reply to @Rika "have you tried an": can you look into this? |
17:16:14 | Amun-Ra | gerwy: I think I misunderstood your question |
17:16:15 | FromDiscord | <gerwy> In reply to @Rika "have you tried an": hmm well i thought of having like a Variable, tuple, that will store its actual type (in enum) and value, and the value would be another tuple with all the types i have, like int, float, string, char etc↵all of them being null except the type that the variable actually use with the value for this |
17:16:23 | FromDiscord | <gerwy> Buuut it sounds like it could be a pretty big... |
17:16:29 | FromDiscord | <gerwy> or idk |
17:16:34 | FromDiscord | <Rika> you know whats bigger? dealing with pointers |
17:16:55 | FromDiscord | <gerwy> In reply to @Rika "can you look into": yeah i will, it sounds like something i should do from the start heh, but i don't understand it fully |
17:17:13 | FromDiscord | <gerwy> In reply to @Rika "you know whats bigger?": maybe, dangerous coding is my second name |
17:17:15 | FromDiscord | <Rika> now you have to deal with manual memory and you still have to figure out how to determine what type it is |
17:17:29 | FromDiscord | <Rika> theres no reason here in my opinion |
17:17:32 | FromDiscord | <Rika> to use pointers |
17:17:35 | FromDiscord | <Rika> absolutely none |
17:17:46 | FromDiscord | <gerwy> i mean, they could have been GC'd and i would know which type it is when having a type specified as an enum |
17:18:01 | FromDiscord | <Rika> tell me how that would go |
17:18:06 | FromDiscord | <Rika> oop? |
17:18:12 | FromDiscord | <Rika> that's more annoying to me |
17:18:14 | FromDiscord | <Rika> but you do you ig |
17:18:34 | FromDiscord | <gerwy> no, more like having a table with ID's of variables and that tuple i talked about |
17:18:48 | FromDiscord | <Solitude> what the hell is he talking about |
17:18:52 | FromDiscord | <gerwy> well idk, i will look into Object variants, its a Nim feature or is it like a universal thing among languages? |
17:19:20 | FromDiscord | <Solitude> https://nim-lang.org/docs/manual.html#types-object-variants |
17:19:28 | FromDiscord | <Rika> its a not-so-popular feature across languages |
17:19:35 | FromDiscord | <Rika> the more used name is "tagged union" |
17:20:00 | FromDiscord | <gerwy> oooh you mean the case thingy in object |
17:20:13 | FromDiscord | <gerwy> In reply to @Rika "the more used name": yeah yeah, my friend recommended it to me but i had no idea its this thing |
17:20:41 | FromDiscord | <gerwy> okay i might use it since its exactly what i want, enum of type and the value of that exact type |
17:20:47 | FromDiscord | <gerwy> and nim docs literally show it as an example hah |
17:21:03 | FromDiscord | <gerwy> Thaaanks Rika |
17:22:03 | Amun-Ra | mind you can only set the type during object creation |
17:23:22 | * | jmdaemon joined #nim |
17:23:33 | FromDiscord | <gerwy> yeah but i need to do it run-time, i have no idea what type its gonna be |
17:23:52 | Amun-Ra | that's not a problem |
17:25:14 | FromDiscord | <Rika> you cant do `thingy.kind = tInt` it has to be like `thingy = MyThing(kind: tInt)` |
17:28:34 | * | rockcavera quit (Remote host closed the connection) |
17:32:04 | FromDiscord | <kevin> For Nimscript tasks is there anything special you need to do to run them? |
17:32:16 | FromDiscord | <kevin> I thought it was just `./script.nims <taskname>` |
17:32:43 | FromDiscord | <Rika> `nim e script.nims` |
17:32:54 | FromDiscord | <Rika> or do you mean nimble tasks? |
17:33:00 | FromDiscord | <kevin> nimscript tasks |
17:33:00 | FromDiscord | <Rika> nimble tasks go in the nimble file |
17:33:12 | FromDiscord | <Rika> theres no such thing as a "nimscript task" its just a file |
17:33:27 | FromDiscord | <Rika> its like nim code but run on the nimscript vm |
17:34:20 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3U1M |
17:34:25 | FromDiscord | <kevin> `./build.nims windows` |
17:34:31 | FromDiscord | <kevin> I think I have this all wrong |
17:35:33 | FromDiscord | <kevin> Maybe I have to parse the nimscript args manually and then call the appropriate tasks |
17:35:44 | FromDiscord | <kevin> I thought nimscript tasks did that for you though |
17:42:05 | FromDiscord | <Rika> nimble tasks |
17:42:17 | FromDiscord | <Rika> where did you hear of "nimscript tasks" |
17:45:46 | FromDiscord | <Solitude> In reply to @Rika "where did you hear": https://nim-lang.org/docs/nimscript.html#task.t%2Cuntyped%2Cstring%2Cuntyped one such place |
17:46:02 | FromDiscord | <Rika> let me look |
17:46:25 | FromDiscord | <Rika> oh this is for the config.nims |
17:48:20 | FromDiscord | <Rika> yeah i think this is for config.nims |
17:48:21 | FromDiscord | <Solitude> sent a code paste, see https://paste.rs/HHD |
17:49:25 | FromDiscord | <kevin> ahhhhh okay |
18:15:02 | * | jjido joined #nim |
18:19:30 | * | jjido quit (Client Quit) |
18:34:02 | * | lumo_e quit (Ping timeout: 260 seconds) |
18:34:08 | * | DixieFlatline joined #nim |
18:35:08 | DixieFlatline | A bit of an amateur question: what is the meaning for arrays of arrayName.high ? I've looked and I can't quite find what it means |
18:35:14 | * | Zectbumo joined #nim |
18:37:41 | FromDiscord | <auxym> it's the highest index in the array |
18:38:15 | FromDiscord | <auxym> so eg `arrayName[arrayName.high]` is the last element |
18:41:06 | DixieFlatline | Oh, so if it were C, it's like... array.high is equivalent to sizeof(array(maxLen)-1) [if the array is null terminated, or otherwise terminated] |
18:41:28 | DixieFlatline | erm |
18:42:14 | DixieFlatline | I forgot to cast but yeah, same sort of idea. |
18:44:47 | DixieFlatline | @Auxym: it returns the last element's indice, I assume from how I'm seeing it used. |
18:46:50 | DixieFlatline | if(inBits >= 13) or (i == inArray.high): |
18:49:06 | DixieFlatline | returns it as a integer, I mean. bounds checking it would appear |
18:57:53 | FromDiscord | <auxym> yes, but in Nim array indices can have arbitrary start and end, or even use enums as indices. https://nim-lang.org/docs/tut1.html#advanced-types-arrays |
19:03:41 | FromDiscord | <Rika> DixieFlatline: i see, a vocaloid fan |
19:06:03 | * | rez quit (Quit: much snoozes...) |
19:06:51 | * | rez joined #nim |
19:08:28 | * | vicfred joined #nim |
19:08:48 | DixieFlatline | @Auxym : interesting feature |
19:08:51 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
19:09:53 | DixieFlatline | @Rika I'm afraid I didn't catch that at all. Are you a Higurashi no Naku Koro Ni fan? |
19:10:16 | FromDiscord | <Rika> oh, i believe theres also a producer using that name, might be correlated |
19:11:05 | FromDiscord | <kevin> Anyone run into errors trying to cross compile a Nim binary for `--cpu=i386`? |
19:11:19 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3U2a |
19:11:24 | FromDiscord | <Rika> oh this thing again |
19:11:29 | FromDiscord | <kevin> sorry! 😦 |
19:11:31 | FromDiscord | <Rika> no no |
19:11:44 | FromDiscord | <kevin> this is my first time seeing this error |
19:11:47 | FromDiscord | <Rika> its more like we meet again, nim-c int error |
19:12:03 | FromDiscord | <Rika> it means the c compiler and nim dont agree with integer size |
19:12:12 | FromDiscord | <Rika> or pointer size |
19:12:31 | FromDiscord | <Rika> but idk why that happens since you set the cpu in nim anyway, might need to also set the compiler to a 32 bit one |
19:12:35 | FromDiscord | <Rika> (edit) "but idk why that happens since you set the cpu in nim anyway, ... might" added "you" |
19:12:43 | FromDiscord | <Rika> (edit) "but idk why that happens since you set the cpu in nim anyway, you might need to also set the ... compiler" added "c" |
19:13:28 | FromDiscord | <kevin> Looks like it's just using the standard `gcc` binary in my path |
19:13:38 | FromDiscord | <kevin> Doesn't gcc have an option for i386 already? |
19:13:43 | FromDiscord | <kevin> (edit) "i386" => "i386/x86" |
19:13:58 | FromDiscord | <Rika> not sure |
19:14:09 | FromDiscord | <Rika> ive never tried 32 bit compiling |
19:14:47 | * | rez quit (Quit: much snoozes...) |
19:17:25 | FromDiscord | <auxym> quick google search yields `-m32` argument to gcc. maybe try adding `--passC:-m32` to your nim command line. Unfortunate though, I would've thought nim would have added that automatically based on the cpu option |
19:17:53 | FromDiscord | <auxym> maybe `passL` too |
19:18:32 | * | Gustavo6046 joined #nim |
19:19:40 | * | Gustavo6046 quit (Remote host closed the connection) |
19:19:59 | * | Gustavo6046 joined #nim |
19:23:23 | * | kenran joined #nim |
19:26:19 | FromDiscord | <qb> any vcc optimization flags you guys know? |
19:29:19 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3U2d |
19:30:00 | FromDiscord | <Hamid_Bluri> In reply to @qb "any vcc optimization flags": https://docs.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code?view=msvc-170 |
19:30:58 | Amun-Ra | (no-)ms-bitfields is an x86 only option |
19:33:37 | * | jmdaemon quit (Ping timeout: 250 seconds) |
19:33:50 | * | jmdaemon joined #nim |
19:42:51 | FromDiscord | <Hamid_Bluri> https://github.com/nim-lang/Nim/issues/13259 |
19:43:17 | FromDiscord | <ShalokShalom> In reply to @PMunch "<@208199869301522432> well I mean": that sounds interesting, thanks |
19:43:28 | FromDiscord | <ShalokShalom> I guess this could be enhanced with macros? 😛 |
19:44:14 | FromDiscord | <ShalokShalom> I would also like to default to individual types, so type name is always the same as the key name, unless otherwise specified |
19:44:15 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=3U2j |
19:44:15 | * | turtlebasket joined #nim |
19:46:09 | FromDiscord | <Hamid_Bluri> In reply to @auxym "are you passing `--cpu:arm": seems like it's only happens in windows |
19:46:14 | FromDiscord | <Hamid_Bluri> (edit) "it's" => "it" |
19:47:02 | FromDiscord | <auxym> good point, I don't think I've used arm-none-eabi-gcc on windows |
19:47:04 | * | lumo_e joined #nim |
19:55:53 | * | turtlebasket quit (Remote host closed the connection) |
20:01:47 | * | Zectbumo quit (Read error: Connection reset by peer) |
20:03:33 | * | yoyojambo joined #nim |
20:06:10 | FromDiscord | <exelotl> In reply to @hamidb80 "https://github.com/nim-lang/Nim/issues/13259": yeah, it's a weird issue of the compiler sometimes preserving previous C compiler flags (set by the default nim.cfg) even after you tried to override them |
20:06:37 | * | kenran quit (Ping timeout: 240 seconds) |
20:06:47 | FromDiscord | <exelotl> did my issue help you solve it? |
20:07:47 | * | kenran joined #nim |
20:09:50 | * | rez joined #nim |
20:10:02 | * | rez quit (Client Quit) |
20:11:16 | FromDiscord | <Hamid_Bluri> In reply to @exelotl "did my issue help": yeah. thanks |
20:12:11 | FromDiscord | <exelotl> sweet |
20:12:25 | FromDiscord | <Hamid_Bluri> you did find `gcc.options.always` ?↵i mean it's not documented in https://nim-lang.org/docs/nimc.html |
20:12:32 | FromDiscord | <Hamid_Bluri> (edit) removed "did" |
20:13:40 | * | rez joined #nim |
20:15:40 | FromDiscord | <exelotl> hmm I don't remember, I feel like I saw it in some docs at some point, but it was a few years ago now 😅 |
20:21:13 | FromDiscord | <demotomohiro> https://github.com/nim-lang/Nim/blob/c3f03cfa5dfa2ca47f8e4cf99bbcdbf5a7d16eda/config/nim.cfg#L184 |
20:23:29 | FromDiscord | <demotomohiro> `gcc.options.always` is used even when cross compiling to different cpu/os? |
20:24:02 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/959548719030755389/IMG_1117.png |
20:24:27 | FromDiscord | <retkid> I DONT KNOW IF I QUALIFY |
20:27:12 | FromDiscord | <Rika> what does that mean and what does this have to do with nim\ |
20:30:15 | * | neurocyte861 quit (Ping timeout: 256 seconds) |
20:30:59 | * | neurocyte8614 joined #nim |
20:43:38 | FromDiscord | <auxym> huh? It's passed by the nim compiler to gcc... |
20:43:50 | FromDiscord | <auxym> (edit) "huh? It's ... passed" added "a flag" |
20:49:52 | FromDiscord | <Rika> no, someone deleted a message before mine |
20:49:57 | FromDiscord | <demotomohiro> I show strange picture posted here with text "Do you have valid C++?". But it was removed. I think that is what @Rika talking. |
20:50:02 | FromDiscord | <Rika> yes |
20:50:10 | FromDiscord | <auxym> haha |
20:50:15 | FromDiscord | <Rika> not demo, but someone else |
20:50:19 | FromDiscord | <Rika> i think it was retkid |
21:07:19 | * | kenran quit (Quit: WeeChat info:version) |
21:11:37 | * | yiggityswaps joined #nim |
21:12:48 | * | yiggityswaps quit (Client Quit) |
21:43:35 | * | wyrd quit (Ping timeout: 240 seconds) |
21:45:36 | * | wyrd joined #nim |
21:51:36 | * | lumo_e quit (Ping timeout: 245 seconds) |
21:54:29 | * | lumo_e joined #nim |
21:55:22 | nrds | <Prestige99> is there a recommended lib to compress and decompress files? |
21:57:45 | FromDiscord | <tsoj> I sometimes notice that I would like something like a unique_ptr. refs seem to be roughly equivalent to shared_ptr. Sometimes I used seq[T] with single elements to kind of simulate a non-shared heap resource (for example, when the only reason for not using the stack is that it is not back enough). Is there something like that? |
22:02:26 | FromDiscord | <exelotl> Prestige: https://github.com/guzba/zippy |
22:02:53 | * | lumo_e quit (Ping timeout: 246 seconds) |
22:03:00 | nrds | <Prestige99> sweet, ty |
22:04:41 | * | lumo_e joined #nim |
22:07:36 | FromDiscord | <demotomohiro> @tsoj I think this is like unique_ptr in C++: https://github.com/nim-lang/fusion/blob/master/src/fusion/smartptrs.nim |
22:08:08 | * | jmdaemon quit (Ping timeout: 246 seconds) |
22:08:22 | * | rez quit (Quit: much snoozes...) |
22:08:36 | * | jmdaemon joined #nim |
22:23:16 | FromDiscord | <Patitotective> sent a code paste, see https://paste.rs/DMq |
22:25:40 | FromDiscord | <demotomohiro> I think you can use `cpFile` in nimble file: https://nim-lang.org/docs/nimscript.html#cpFile%2Cstring%2Cstring |
22:43:42 | FromDiscord | <Elegantbeef> Ah no worries pmunch the author responded to my issue and mentioned is super easy to build using fedora, so yea just debian life 😜 |
22:58:06 | * | rez joined #nim |
23:07:51 | FromDiscord | <biz> sent a code paste, see https://paste.rs/GtH |
23:07:59 | FromDiscord | <biz> so `i.data.get` is ambiguous |
23:08:02 | FromDiscord | <biz> (edit) "https://play.nim-lang.org/#ix=3U30" => "https://paste.rs/SI4" |
23:08:02 | FromDiscord | <biz> apparently |
23:08:10 | FromDiscord | <biz> how can i fix this? its from a discord event |
23:08:12 | FromDiscord | <biz> using dimscord |
23:08:42 | FromDiscord | <Rika> full error please |
23:09:03 | FromDiscord | <biz> wait |
23:09:04 | FromDiscord | <biz> i fixed it |
23:09:06 | FromDiscord | <biz> i think |
23:09:14 | FromDiscord | <biz> i see the example imports `options`? |
23:09:50 | FromDiscord | <Elegantbeef> Yes you'll need ti import options |
23:10:09 | FromDiscord | <biz> how does this change anything? |
23:10:13 | FromDiscord | <biz> In reply to @Rika "full error please": https://media.discordapp.net/attachments/371759389889003532/959590535809597550/unknown.png |
23:10:24 | FromDiscord | <Elegantbeef> Compiler error |
23:10:29 | FromDiscord | <Elegantbeef> Give the compiler error |
23:10:31 | FromDiscord | <Elegantbeef> Not tooling error |
23:11:04 | FromDiscord | <biz> https://media.discordapp.net/attachments/371759389889003532/959590750717354004/unknown.png |
23:11:21 | FromDiscord | <biz> this was before i imported options |
23:11:22 | FromDiscord | <Elegantbeef> `import std/options` you do not have the `get` procedure accessible |
23:11:43 | FromDiscord | <Elegantbeef> Nim has only a few type bound operations and they're related with memory management |
23:11:55 | FromDiscord | <biz> oh |
23:12:08 | FromDiscord | <biz> fixed it! |
23:12:09 | FromDiscord | <biz> thanks |
23:31:30 | * | yoyojambo quit (Quit: Leaving) |
23:32:14 | FromDiscord | <biz> https://media.discordapp.net/attachments/371759389889003532/959596080616603648/unknown.png |
23:32:19 | FromDiscord | <biz> i attempted using `some` |
23:32:25 | FromDiscord | <biz> 🤔 |
23:32:52 | FromDiscord | <Elegantbeef> Compiler errors |
23:33:17 | FromDiscord | <Elegantbeef> Tooling is nice and all but the compiler errors explicitly state the issue |
23:33:26 | FromDiscord | <biz> https://media.discordapp.net/attachments/371759389889003532/959596381016825876/unknown.png |
23:33:37 | FromDiscord | <Rika> `data: some ...`? what went wrong there? |
23:33:44 | FromDiscord | <Elegantbeef> So it's an issue of not using Some |
23:33:54 | * | yoyojambo joined #nim |
23:34:07 | FromDiscord | <biz> https://media.discordapp.net/attachments/371759389889003532/959596554837176390/unknown.png |
23:34:17 | FromDiscord | <Rika> import options, again |
23:34:19 | FromDiscord | <Elegantbeef> `import std/options` |
23:34:22 | FromDiscord | <biz> jee |
23:34:24 | FromDiscord | <biz> z |
23:34:39 | FromDiscord | <Elegantbeef> Blame whoever wrote the code not exporting options |
23:34:45 | FromDiscord | <biz> 😭 |
23:34:55 | FromDiscord | <huantian> nah everyone should always import options no matter what |
23:36:30 | FromDiscord | <biz> okay another question bc this is horrid |
23:36:41 | FromDiscord | <biz> is there a way to deal with ambiguous properties? |
23:36:57 | FromDiscord | <Elegantbeef> There is no such thing as ambiguous properties |
23:37:01 | FromDiscord | <Rika> what does that mean |
23:37:02 | FromDiscord | <biz> i meant |
23:37:03 | FromDiscord | <biz> types |
23:37:06 | FromDiscord | <biz> my bad |
23:37:13 | FromDiscord | <biz> or values if u want to prefer that |
23:37:14 | FromDiscord | <biz> https://media.discordapp.net/attachments/371759389889003532/959597335229374474/unknown.png |
23:37:14 | FromDiscord | <Rika> `module.Type` |
23:37:19 | FromDiscord | <biz> so basically |
23:37:27 | FromDiscord | <biz> in the command func, |
23:37:32 | FromDiscord | <Elegantbeef> `myModueleIWantTheTypeFrom.MyType` |
23:37:32 | FromDiscord | <Rika> mmmmm yummy error that one is |
23:37:33 | FromDiscord | <Rika> whats the code |
23:37:49 | FromDiscord | <biz> sent a code paste, see https://play.nim-lang.org/#ix=3U39 |
23:37:52 | FromDiscord | <Elegantbeef> "has no type" |
23:37:56 | FromDiscord | <biz> there |
23:37:58 | FromDiscord | <biz> sent a code paste, see https://play.nim-lang.org/#ix=3U3a |
23:37:58 | FromDiscord | <biz> this is where its being ran |
23:38:00 | FromDiscord | <Rika> `seq[tuple]` is wrong |
23:38:01 | FromDiscord | <huantian> In reply to @Rika "mmmmm yummy error that": that's what you get when you async |
23:38:07 | FromDiscord | <biz> In reply to @Rika "`seq[tuple]` is wrong": what should i use? |
23:38:07 | FromDiscord | <Rika> In reply to @huantian "that's what you get": i know |
23:38:14 | FromDiscord | <Rika> i would know.... 😂 |
23:38:21 | FromDiscord | <Rika> In reply to @biz "what should i use?": specify the tuple |
23:38:31 | FromDiscord | <biz> elaborate |
23:38:34 | FromDiscord | <Rika> `tuple[field: Type, field: Type, ....]` |
23:38:40 | FromDiscord | <biz> oh |
23:38:50 | FromDiscord | <Rika> or just omit the type |
23:38:52 | FromDiscord | <Rika> nim will infer it |
23:39:09 | FromDiscord | <Rika> so `commands = ` |
23:39:35 | FromDiscord | <biz> this is beginning to remind me of golanmg |
23:39:36 | FromDiscord | <biz> sent a code paste, see https://play.nim-lang.org/#ix=3U3b |
23:39:42 | FromDiscord | <Rika> `proc` needs more specification too |
23:39:47 | FromDiscord | <biz> id rather omit it |
23:39:50 | FromDiscord | <biz> the code looks ugly now |
23:40:00 | FromDiscord | <huantian> Maybe move your tuple to a type def |
23:40:06 | FromDiscord | <Rika> yes |
23:40:09 | FromDiscord | <Rika> was gonna say |
23:40:20 | FromDiscord | <Rika> makes little sense to use a tuple here |
23:41:09 | FromDiscord | <biz> :stare: |
23:41:40 | FromDiscord | <biz> oh yes |
23:41:42 | FromDiscord | <biz> now my type is |
23:41:44 | FromDiscord | <biz> ambiguous |
23:41:46 | FromDiscord | <biz> 😊 |
23:42:05 | FromDiscord | <Rika> can you show what you did |
23:42:16 | FromDiscord | <biz> i know im a new nim user but |
23:42:19 | FromDiscord | <biz> im going to fix it first |
23:42:25 | FromDiscord | <biz> 😭 |
23:42:32 | * | yoyojambo quit (Read error: Connection reset by peer) |
23:42:59 | FromDiscord | <biz> nim errors are ugly |
23:43:22 | FromDiscord | <Elegantbeef> Eh async errors are\ |
23:44:18 | FromDiscord | <biz> ok tbh |
23:44:22 | FromDiscord | <biz> im doin g kinda good for a new nim user |
23:44:31 | FromDiscord | <biz> ATE |
23:44:35 | FromDiscord | <biz> sent a code paste, see https://play.nim-lang.org/#ix=3U3c |
23:45:08 | * | vicfred quit (Quit: Leaving) |
23:45:42 | FromDiscord | <huantian> does this work or nah |
23:45:43 | FromDiscord | <Elegantbeef> `InteractionApplicationCommandCallbackData` Who's writing java? |
23:45:47 | FromDiscord | <biz> yes it does work |
23:45:50 | FromDiscord | <biz> just the |
23:45:54 | FromDiscord | <biz> ambiguous thing |
23:45:55 | FromDiscord | <biz> still exists |
23:45:59 | FromDiscord | <biz> for the c.api |
23:46:06 | FromDiscord | <biz> In reply to @Elegantbeef "`InteractionApplicationCommandCallbackData` Who's w": LMFAO |
23:46:42 | FromDiscord | <biz> its so long for what |
23:47:06 | FromDiscord | <huantian> you can ommit the type on `let commands` btw |
23:47:15 | FromDiscord | <biz> In reply to @huantian "you can ommit the": i do it for |
23:47:17 | FromDiscord | <biz> readability |
23:47:35 | FromDiscord | <biz> also for practice |
23:47:44 | FromDiscord | <Elegantbeef> Ah it's readable that we have a 10 line constructor |
23:48:18 | FromDiscord | <biz> shush |
23:48:36 | FromDiscord | <Elegantbeef> Now jokes aside what about the `c.api` issue |
23:48:52 | FromDiscord | <biz> https://media.discordapp.net/attachments/371759389889003532/959600268692033597/unknown.png |
23:50:44 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3U3d |
23:50:53 | * | yoyojambo joined #nim |
23:51:08 | FromDiscord | <Elegantbeef> `static: configPath.slurp().parsePrefs()` |
23:51:57 | FromDiscord | <Elegantbeef> compile time context means it can only run the code statically and `config` being a var means it's a error since it's attempting to assign a runtime value to a static function |
23:52:22 | FromDiscord | <Elegantbeef> You may need to do `static(configPath.slurp()).parsePrefs` |
23:52:31 | * | rez quit (Quit: l8r) |
23:53:38 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3U3e |
23:53:41 | FromDiscord | <huantian> createInteractionResponse returns a void |
23:53:45 | FromDiscord | <huantian> (edit) "void" => "Future[void]" |
23:56:12 | FromDiscord | <huantian> thank you for the wonderful error message |
23:57:58 | FromDiscord | <biz> so why are they |
23:57:59 | FromDiscord | <biz> discarding it |
23:58:01 | FromDiscord | <biz> in the example |
23:58:05 | FromDiscord | <biz> :Thinkeng: |
23:58:19 | FromDiscord | <Elegantbeef> Programmers are humans |
23:58:27 | FromDiscord | <biz> why wouldnt it error for them |
23:58:33 | FromDiscord | <Elegantbeef> Where's the example? |
23:58:56 | FromDiscord | <biz> https://github.com/krisppurg/dimscord/blob/master/examples/user_commands.nim |
23:59:06 | FromDiscord | <biz> only thing i referenced was their sending and |
23:59:19 | FromDiscord | <biz> if it returns that why r they discarding |
23:59:24 | FromDiscord | <huantian> https://media.discordapp.net/attachments/371759389889003532/959602918582009866/unknown.png |
23:59:27 | FromDiscord | <huantian> they aren't |
23:59:28 | FromDiscord | <biz> wait |
23:59:29 | FromDiscord | <biz> no they arent |
23:59:30 | FromDiscord | <biz> HELP IM BLIND |
23:59:33 | FromDiscord | <Elegantbeef> `bulkOverwriteApplicationCommands` returns a `seq` |
23:59:43 | FromDiscord | <biz> i was looking at wrong thing |
23:59:46 | FromDiscord | <biz> <a:Skype_4L:928755115819663380> |