00:10:37 | * | stkrdknmibalz joined #nim |
00:31:13 | FromDiscord | <HPaulson> Hey all — am very new to nim dev, building a learning project. Does anyone know of a solid crypto lib I could use for things like generating entropy’s? |
00:33:27 | FromDiscord | <ElegantBeef> https://github.com/cheatfate/nimcrypto is probably the best crypto library to use |
00:33:30 | fn | <R2D299> itHub: 7"Nim cryptographic library" |
00:33:37 | FromDiscord | <HPaulson> Doesn’t have what I need |
00:33:59 | FromDiscord | <HPaulson> Checked it out -/ seems it only really does hashes and such |
00:45:07 | * | stkrdknmibalz quit (Remote host closed the connection) |
00:50:39 | * | stkrdknmibalz joined #nim |
00:53:57 | FromDiscord | <bernardo> In reply to @HPaulson "Hey all — am": https://github.com/oprypin/nim-random |
00:53:59 | fn | <R2D299> itHub: 7"Random number generation library for Nim" |
00:55:49 | FromDiscord | <HPaulson> ???? |
00:55:52 | FromDiscord | <HPaulson> I mean ok lmfao |
00:57:23 | FromDiscord | <bernardo> In reply to @HPaulson "I mean ok lmfao": sorry, I guess? |
00:57:50 | FromDiscord | <HPaulson> Hahaha, just very confused why you sent a numbers lib when I was tryna find a crypto lib 🤣 |
00:58:27 | FromDiscord | <bernardo> > I could use for things like generating entropy |
00:58:47 | FromDiscord | <HPaulson> Correct, looking to generate entropy’s from mnemonics my guy |
00:59:18 | FromDiscord | <bernardo> 👍 good luck, sorry for adding noise to your quest |
00:59:23 | FromDiscord | <HPaulson> Haha all go do |
00:59:27 | FromDiscord | <HPaulson> (edit) "go do" => "good" |
01:00:04 | FromDiscord | <HPaulson> My startup was planning to use Nim in prod, slowly realizing thata prolly not the best choice… assumed support would be larger |
01:01:38 | FromDiscord | <ElegantBeef> Well i dont touch crypto so waiting for someone that does probably will give better suggestions 😄 |
01:01:55 | FromDiscord | <HPaulson> Yeah I feel |
01:01:59 | FromDiscord | <HPaulson> Appreciate the help |
01:02:29 | FromDiscord | <HPaulson> Am just playing around atm, our CTO recommended the Lang over rust & I’m just rolling with his choice |
01:02:43 | FromDiscord | <HPaulson> But lack of pkgs worries me, even with solid bindings to c |
01:15:30 | FromDiscord | <Bung> @ElegantBeef oh, I see the process , it currently support primtive and plain objects now |
01:23:00 | FromDiscord | <ElegantBeef> Lol really watching it arent you 😄 |
01:23:09 | FromDiscord | <ElegantBeef> Case objects and unexported fields are going to be tricky |
01:26:25 | FromDiscord | <Bung> yeah, I read the source code last night , know the idea how it works, well , string -> PNode maybe complex, like a json parser that produce PNode |
01:28:11 | FromDiscord | <Bung> with the macro cache store proc signature, so addToBuffer no more needs |
01:36:01 | * | arkurious quit (Quit: Leaving) |
01:49:35 | FromDiscord | <ElegantBeef> Yep the big issue though is i dont know how to do cross module accessing of fields |
01:57:12 | FromDiscord | <Bung> what's the old way , how it iterate fields of imported types ? |
01:57:31 | FromDiscord | <ElegantBeef> Yea |
01:58:26 | FromDiscord | <Bung> if that's problem so you even cant properly constructe that type's instance right ? |
01:58:45 | FromDiscord | <ElegantBeef> Dont follow |
01:59:34 | FromDiscord | <ElegantBeef> I should be able to instantiate any type since i have the symbol of that type |
01:59:54 | FromDiscord | <ElegantBeef> That means regardless where it's declared it should be instantiable |
02:00:08 | FromDiscord | <Bung> including private fields ? |
02:00:17 | FromDiscord | <ElegantBeef> No, that's what i just said is an issue |
02:00:36 | FromDiscord | <ElegantBeef> I dont know if one can get symbols for field names so it's an issue |
02:01:47 | FromDiscord | <ElegantBeef> For normal objects i can just use the field iterator i assume |
02:01:58 | FromDiscord | <Bung> assign private fields by memory aligment possible ? |
02:02:11 | FromDiscord | <ElegantBeef> Rather complicated for object variants |
02:04:04 | FromDiscord | <ElegantBeef> I probably should just fix hminast for devel so this works |
02:04:23 | FromDiscord | <Bung> well, I dont know the other way, since the big issue is private fields are not visible, you get data but have yet found way assign that data to private fields |
02:04:49 | FromDiscord | <timotheecour> `privateAccess` in devel |
02:06:33 | FromDiscord | <ElegantBeef> Nice |
02:07:54 | FromDiscord | <Bung> oh importutils.nim module, hope module symbols get merged soon, currently I track module path by myself. |
02:11:49 | FromDiscord | <ElegantBeef> Works beautifully thanks 😄 |
03:43:19 | FromDiscord | <HPaulson> Does `$` actually change a vars value to a string, or does it just return such stringed? |
03:43:28 | FromDiscord | <HPaulson> (edit) "stringed?" => "stringified?" |
03:43:39 | FromDiscord | <HPaulson> (Also didn’t see any questions channel so hope this is okay here) |
03:45:09 | FromDiscord | <ElegantBeef> Yea it's fine here, it calls the `$` proc for the value |
03:45:27 | FromDiscord | <HPaulson> So just grabs the Val rather that reassigning, correct? |
03:45:47 | FromDiscord | <ElegantBeef> It does whatever the `$` proc says to do |
03:45:49 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/dollars.html |
03:45:56 | FromDiscord | <ElegantBeef> For primitives they're implemented there |
03:46:09 | FromDiscord | <HPaulson> 👍 |
03:46:20 | FromDiscord | <ElegantBeef> like `$100 == "100"` |
03:56:51 | FromDiscord | <HPaulson> What would be the equivalent to JS Buffer? |
03:57:13 | FromDiscord | <HPaulson> (edit) "JS Buffer?" => "node’s Buffer api?" |
04:04:41 | FromDiscord | <Bung> std has simlar but not very close I remenber ? I have one https://github.com/bung87/buffer |
04:04:44 | fn | <R2D299> itHub: 7"buffer module write in Nim provide api similar to Nodejs buffer module. " |
04:04:55 | FromDiscord | <ElegantBeef> string stream? |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:02 | FromDiscord | <HPaulson> In reply to @Bung "std has simlar but": Awesome thx |
04:06:38 | * | supakeen joined #nim |
04:17:51 | * | tiorock joined #nim |
04:17:51 | * | rockcavera quit (Killed (calcium.libera.chat (Nickname regained by services))) |
04:17:51 | * | tiorock is now known as rockcavera |
04:20:31 | * | rockcavera quit (Remote host closed the connection) |
04:37:53 | FromDiscord | <gogolxdong (liuxiaodong)> Any blake3 library in Nim? |
04:38:30 | FromDiscord | <gogolxdong (liuxiaodong)> and chacha8 |
04:51:42 | FromDiscord | <Jasmine and Don't Forget!~> I'm having an issue with cmake, if anyone wants to help |
04:52:46 | FromDiscord | <Jasmine and Don't Forget!~> I'm trying to build nlvm |
04:53:02 | FromDiscord | <Jasmine and Don't Forget!~> here's the error message |
04:53:03 | FromDiscord | <Jasmine and Don't Forget!~> sent a code paste, see https://play.nim-lang.org/#ix=3sWf |
04:53:54 | FromDiscord | <ElegantBeef> Seems you just need to set your compiler |
04:54:06 | FromDiscord | <Jasmine and Don't Forget!~> I tried looking for cxx using apt search, but there were a lot of options |
04:54:11 | FromDiscord | <Jasmine and Don't Forget!~> So do I just install clang? |
04:54:19 | FromDiscord | <Rika> cxx == c++ compiler i believe |
04:54:21 | FromDiscord | <ElegantBeef> It's a C++ compiler afaik |
04:54:35 | FromDiscord | <Rika> set it to gcc as well |
04:54:51 | FromDiscord | <Jasmine and Don't Forget!~> I believe I have gcc installed, how to I set it so cmake can see it? |
04:55:05 | FromDiscord | <Rika> in cli `CXX=gcc cmake ...` |
04:55:09 | FromDiscord | <Rika> i believe? |
04:55:17 | FromDiscord | <Rika> oh yeah its on the error |
04:55:23 | FromDiscord | <Jasmine and Don't Forget!~> I always love a copy paste, lmao |
04:55:24 | FromDiscord | <Jasmine and Don't Forget!~> thank you |
04:55:25 | FromDiscord | <Rika> `Tell CMake where to find the compiler by setting either the environment variable "CXX" ` |
04:55:31 | FromDiscord | <Jasmine and Don't Forget!~> Ye |
04:55:36 | FromDiscord | <ElegantBeef> Should be right |
04:56:15 | FromDiscord | <Jasmine and Don't Forget!~> So I just paste that into the terminal? |
04:56:27 | FromDiscord | <Jasmine and Don't Forget!~> because it complained when I did that |
04:56:31 | FromDiscord | <ElegantBeef> well the `...` is whatever you were sending |
04:56:42 | FromDiscord | <Jasmine and Don't Forget!~> Oh, lol |
04:56:47 | FromDiscord | <ElegantBeef> should be `CXX=gcc` followed by `cmake args` |
04:57:08 | FromDiscord | <ElegantBeef> all on a single line since you didnt `export` the environment |
04:58:33 | FromDiscord | <Jasmine and Don't Forget!~> Okay, I didn't have any args for cmake, so I just put in `CCX=gcc cmake` |
04:58:39 | FromDiscord | <Jasmine and Don't Forget!~> And then that game me this |
04:58:55 | FromDiscord | <Jasmine and Don't Forget!~> sent a code paste, see https://play.nim-lang.org/#ix=3sWg |
04:59:00 | FromDiscord | <Jasmine and Don't Forget!~> So I was like, okay, just do |
04:59:06 | FromDiscord | <ElegantBeef> How did you run cmake before? |
04:59:46 | FromDiscord | <Jasmine and Don't Forget!~> I just did `cmake`, but that had issues with CCX, so then I did `cmake CCX=gcc`, but then it gave me this |
05:00:01 | FromDiscord | <Jasmine and Don't Forget!~> sent a code paste, see https://play.nim-lang.org/#ix=3sWh |
05:00:09 | FromDiscord | <Jasmine and Don't Forget!~> sorry, that's the same one, the first one was a typo |
05:00:10 | FromDiscord | <ElegantBeef> Why are you even using cmake? |
05:00:21 | FromDiscord | <Jasmine and Don't Forget!~> because I want to make nlvm |
05:00:26 | FromDiscord | <ElegantBeef> but it uses make |
05:00:34 | FromDiscord | <ElegantBeef> clone it then run `make` |
05:00:49 | FromDiscord | <Jasmine and Don't Forget!~> I am... silly, sorry, lmao |
05:01:57 | FromDiscord | <ElegantBeef> Yea you best apologize that's my territory, cannot have interlopers |
05:02:36 | FromDiscord | <Jasmine and Don't Forget!~> lol, I'm having more errors because I'm bad at following instructions |
05:03:25 | FromDiscord | <ElegantBeef> Did you install all deps, and clone submodules? |
05:03:32 | FromDiscord | <Jasmine and Don't Forget!~> this is the error, if you want to help agian https://media.discordapp.net/attachments/371759389889003532/864733835392843776/bash.txt |
05:03:49 | FromDiscord | <ElegantBeef> Same issue |
05:04:14 | FromDiscord | <Jasmine and Don't Forget!~> I tried giving it the variable |
05:04:16 | FromDiscord | <ElegantBeef> `CXX=gcc make` |
05:04:59 | * | SebastianM joined #nim |
05:05:41 | FromDiscord | <Rika> In reply to @Jasmine and Don't Forget!~ "I just did `cmake`,": backwards |
05:05:47 | FromDiscord | <Rika> `CXX=gcc cmake` |
05:05:52 | FromDiscord | <Jasmine and Don't Forget!~> Yeah, I did that |
05:05:55 | FromDiscord | <Jasmine and Don't Forget!~> thank you |
05:06:36 | FromDiscord | <Jasmine and Don't Forget!~> It's still not compiling, it said that it was an issue with the compiler, so I'm going to try clang now |
05:06:45 | FromDiscord | <Jasmine and Don't Forget!~> I can give the error log if you want it |
05:07:31 | FromDiscord | <ElegantBeef> Maybe it's supposed to be `g++` 😄 |
05:07:42 | FromDiscord | <Jasmine and Don't Forget!~> lol |
05:08:52 | FromDiscord | <Jasmine and Don't Forget!~> sent a code paste, see https://play.nim-lang.org/#ix=3sWn |
05:13:44 | FromDiscord | <Tuatarian> hey everyone |
05:13:48 | FromDiscord | <ElegantBeef> Hello |
05:13:51 | FromDiscord | <Tuatarian> hody |
05:13:53 | FromDiscord | <Tuatarian> howdy |
05:13:58 | FromDiscord | <ElegantBeef> I have 0 clue how to resolve that issue jasmine |
05:14:22 | FromDiscord | <Tuatarian> does anybody remember that one website (can't remember the name, best website ever or something like that) which basically said that the best website design was simple pure html |
05:14:44 | FromDiscord | <Tuatarian> completely forgot what the site is |
05:14:52 | FromDiscord | <Tuatarian> been trying to find it for a bit |
05:15:31 | FromDiscord | <Jasmine and Don't Forget!~> You're good, I'm using windows subsystem for linux |
05:15:36 | FromDiscord | <Jasmine and Don't Forget!~> Gosh, I really don't like windows |
05:15:48 | FromDiscord | <Jasmine and Don't Forget!~> Honestly thinking about just going back to linux |
05:15:50 | FromDiscord | <ElegantBeef> I dont tautarian 😄 |
05:15:53 | FromDiscord | <ElegantBeef> You should |
05:16:02 | FromDiscord | <Tuatarian> linux is great |
05:16:07 | FromDiscord | <Tuatarian> but I do things other than code on my computer |
05:16:08 | FromDiscord | <Jasmine and Don't Forget!~> Yes I should, but I also like video games |
05:16:13 | FromDiscord | <Tuatarian> and windows is infinitely better for general use |
05:16:19 | FromDiscord | <Tuatarian> not really a competition imo |
05:16:33 | FromDiscord | <ElegantBeef> ~~Is a gamer but still doesnt touch windows~~ |
05:16:34 | FromDiscord | <Tuatarian> I tried installing linux on this computer |
05:16:35 | FromDiscord | <Jasmine and Don't Forget!~> And I'd have to backup all of my minecraft worlds, and projects, and it just seems like a hassle rn |
05:16:44 | FromDiscord | <Jasmine and Don't Forget!~> Oh no, I was like you |
05:16:44 | FromDiscord | <Tuatarian> had some crazy audio issues, gave up and just went back to windows |
05:16:51 | FromDiscord | <Jasmine and Don't Forget!~> I used to game exclusively on linux |
05:16:52 | FromDiscord | <Tuatarian> my laptop has linux |
05:17:00 | FromDiscord | <Tuatarian> It's not terrible, but it's pretty bad |
05:17:12 | FromDiscord | <Jasmine and Don't Forget!~> but then this game from my favorite game studio came out, apex |
05:17:18 | FromDiscord | <Jasmine and Don't Forget!~> and it uses easy anti cheat |
05:17:23 | FromDiscord | <Jasmine and Don't Forget!~> so I had to use windows to play |
05:17:35 | FromDiscord | <ElegantBeef> Yea i still have a windows partition for anti cheat games but hardly touch it |
05:36:20 | fn | <ForumUpdaterBot99> New Nimble package! globby - Glob pattern matching for Nim., see https://github.com/treeform/globby |
05:36:21 | fn | <R2D299> itHub: 7"Glob pattern matching for Nim." |
05:46:05 | FromDiscord | <ElegantBeef> At what point does treeform make `stdliby` so people can use all of his libraries easily 😄 |
06:33:50 | arkanoid | this thing that proc in module root can't have closure calling conversion is making proc type comparison harder than it should |
06:38:04 | FromDiscord | <ElegantBeef> I dont use closures so uncertain how |
06:44:32 | fn | <ForumUpdaterBot99> New thread by Sixte: Contexts, scopes and intrinsic types, see https://forum.nim-lang.org/t/8231 |
06:56:23 | FromDiscord | <treeform> In reply to @ElegantBeef "At what point does": I don't think my packages provide a very uniform coverage you need for stdlib |
06:57:09 | * | SebastianM quit (Quit: Bye) |
07:20:35 | arkanoid | is it possible to test for pragma? for example test if proc has {.noSideEffect.} |
07:21:00 | FromDiscord | <arnetheduck> In reply to @treeform "I don't think my": they certainly provide the quality 😉 coverage is earier to fix |
07:21:00 | * | max22- joined #nim |
07:21:06 | FromDiscord | <arnetheduck> (edit) "earier" => "easier" |
07:21:17 | * | max22- quit (Remote host closed the connection) |
07:21:41 | * | max22- joined #nim |
07:22:46 | FromDiscord | <ElegantBeef> Test in what way, a macro can |
07:25:53 | arkanoid | ElegantBeef I'm actually writing a concept that should match proc types that: get 1 input A gives 1 output B so f(A) is B, is total function (has noSideEffect) |
07:26:09 | FromDiscord | <arnetheduck> sent a code paste, see https://play.nim-lang.org/#ix=3sWD |
07:26:12 | FromDiscord | <ElegantBeef> ah so yes a macro can be used here |
07:26:12 | arkanoid | so the general question is: how to test if a proc has {.noSideEffect.} |
07:26:29 | FromDiscord | <ElegantBeef> https://github.com/beef331/oopsie/blob/master/src/oopsie.nim#L21 |
07:26:38 | FromDiscord | <ElegantBeef> To show how you can use a macro in a concept |
07:27:27 | FromDiscord | <ElegantBeef> i'd normally write it for you, but presently dealing with my own macro madness 😄 |
07:27:55 | arkanoid | no, problem, I'm training, so it's actually good thing :D |
07:29:48 | FromDiscord | <ElegantBeef> @Bung well i do support variant objects with a caveat they dont have descrims at the same level, but eh progress 😄 |
07:30:53 | FromDiscord | <ElegantBeef> but this works now https://media.discordapp.net/attachments/371759389889003532/864770913642610688/unknown.png |
07:32:22 | FromDiscord | <Bung> I see two "but" words, does not show any bad news ? |
07:32:35 | FromDiscord | <ElegantBeef> well there is that caveat |
07:33:05 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3sWH |
07:34:07 | FromDiscord | <Bung> the problem is two case or one else branch does not have field ? |
07:34:29 | FromDiscord | <ElegantBeef> Two cases on the same level |
07:34:42 | FromDiscord | <ElegantBeef> Relatively rare thing of course |
07:35:08 | FromDiscord | <Bung> oh, sound good to me , jsonnode only use one case. |
07:35:27 | FromDiscord | <ElegantBeef> Oh you and your selfish view! 😄 |
07:36:50 | FromDiscord | <Bung> yeah, I only wait this feature, so I can have plugin system in my static site generator, and I will migrate my hexo blog to this. |
07:37:53 | FromDiscord | <ElegantBeef> Well i guess next thing will be ref objects and seqs |
07:38:00 | FromDiscord | <ElegantBeef> though i think i know how ref objects work |
07:38:02 | * | max22- quit (Remote host closed the connection) |
07:38:49 | * | max22- joined #nim |
07:40:00 | FromDiscord | <treeform> In reply to @arnetheduck "btw, <@!107140179025735680> how did": Just with the -d: release, all computers should show same general differences, but different absolute numbers. |
07:43:15 | * | Vladar joined #nim |
07:56:03 | FromDiscord | <PressF> Quick question. Can nim be used as a functional language like Haskell?↵With this I mean no side effects, recursion over loops, higher order function.... |
07:56:42 | FromDiscord | <PressF> BTW currently finishing my first nim project and loving it so far |
07:56:55 | FromDiscord | <PressF> (edit) "BTW" => "BTW" | "far" => "far" |
08:00:29 | FromDiscord | <ElegantBeef> Well with strict funcs the pure functions are more pure, but i dont know about the remainder, not a FP user |
08:19:45 | arkanoid | PressF, I'm not a FP but I'm learning a bit of it. You have side effects free func, higher order function, closures, function composition. What you don't get for free are persistent data structures, but you can add them |
08:21:56 | FromDiscord | <arnetheduck> In reply to @treeform "Just with the -d:": sure - what I mean is jsony vs nim-json-ser is roughly 1.2x when I run it, whereas on the site, it's more like 1.7x - for the std lib comparison, I see 8x, while on github it's .. closer to 4x if I'm reading it right |
08:22:51 | FromDiscord | <arnetheduck> I was thinking it might orc vs normal gc or something like that |
08:30:30 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
08:40:08 | FromDiscord | <haxscramper> Editing forum thread title after posting is not possible, correct? |
08:40:53 | fn | <ForumUpdaterBot99> New thread by Haxscramper: Declare `[]` iterator, see https://forum.nim-lang.org/t/8232 |
08:48:10 | FromDiscord | <ElegantBeef> Ah i hit a simpler problem relatively recently opted to `slice(a..b)` 😄 |
08:52:42 | * | max22- quit (Remote host closed the connection) |
08:52:52 | FromDiscord | <haxscramper> In the end I can just overload `items`, but if possible I would prefer to use `object[start .. end]` syntax without paying for intermedite allocations |
08:52:59 | * | max22- joined #nim |
09:07:54 | * | neceve joined #nim |
09:11:41 | * | max22- quit (Remote host closed the connection) |
09:14:13 | * | max22- joined #nim |
09:22:16 | FromDiscord | <Rika> prolly would be possible once views are stable |
09:34:08 | FromDiscord | <haxscramper> It is not about view types, overload resolution just seems to be broken |
09:35:27 | FromDiscord | <Bung> @ElegantBeef is it ready for use now ? |
09:35:40 | FromDiscord | <ElegantBeef> Nope |
09:35:45 | FromDiscord | <ElegantBeef> Still doesnt handle refs |
09:35:58 | FromDiscord | <ElegantBeef> Or seqs |
09:36:11 | FromDiscord | <Bung> okay |
09:45:16 | FromDiscord | <PressF> In reply to @arkanoid "<@391274926541373441>, I'm not a": Thx. I'll need to look into that |
09:52:07 | arkanoid | PressF, I'm also playing around with FP and nim, actually testing the limits of nim type system when dealing with proc types. For example: https://play.nim-lang.org/#ix=3sUb |
09:52:11 | FromDiscord | <konsumlamm> In reply to @PressF "Quick question. Can nim": you can, but it's definitely not intended and you will likely run into problems |
09:53:18 | FromDiscord | <konsumlamm> also see the `zero_functional` package for efficient iterator combinators |
09:53:47 | * | max22- quit (Quit: Leaving) |
09:56:20 | arkanoid | After successfull implementation of function composition using "real types", I'm now trying to reimplement same thing with nim concepts, but I'm facing some compiler errors. Do you see any concept trivial issue in my code? https://play.nim-lang.org/#ix=3sXb |
09:59:11 | FromDiscord | <konsumlamm> i'm not sure how making concepts for that makes any sense |
09:59:23 | FromDiscord | <konsumlamm> also, those are old-style concepts |
09:59:58 | arkanoid | I've just started with concepts, I'm following the manual. What does make them "old"? |
10:01:13 | FromDiscord | <konsumlamm> there being new-style concepts |
10:01:43 | arkanoid | I'm on nim devel and following https://nim-lang.org/docs/manual_experimental.html#concepts |
10:01:53 | FromDiscord | <konsumlamm> see https://github.com/nim-lang/RFCs/issues/168 |
10:04:30 | arkanoid | interesting |
10:06:17 | arkanoid | are they already implemented? |
10:06:49 | FromDiscord | <konsumlamm> partially |
10:07:30 | FromDiscord | <konsumlamm> you can see my issues marked with [Conceotd[ for problems with them |
10:07:39 | FromDiscord | <konsumlamm> (edit) "[Conceotd[" => "[Concepts]" |
10:13:19 | fn | <ForumUpdaterBot99> New thread by Ingo: Yield tuple: Error: invalid type, see https://forum.nim-lang.org/t/8233 |
10:19:50 | arkanoid | do you know if it is possible to augment real type with a concept? I mean, add compile time checks to a real type in the concept way |
10:42:42 | FromDiscord | <Rika> Enforce a type to always match a concept? |
10:43:02 | FromDiscord | <Rika> Not that I know of |
10:43:27 | FromDiscord | <Rika> Rather not if the type isn’t controlled by you |
10:43:53 | FromDiscord | <Rika> You can limit functions to always match types that match concepts, I don’t really understand what you want |
10:44:42 | arkanoid | Rika, I'm fixing a testcase, I'll share asap |
10:58:45 | FromDiscord | <konsumlamm> In reply to @Rika "Enforce a type to": you can do that, with `static: assert Type is Concept` |
11:06:20 | FromDiscord | <Rika> In reply to @Rika "Rather not if the": . |
11:08:07 | FromDiscord | <konsumlamm> the above still works tho |
11:10:04 | FromDiscord | <Rika> Maybe see definition of "rather" |
11:10:16 | arkanoid | here's my playground. I've both the real type version and the concept one with a compile time switch. The concept version fails to compile and I'm trying to understand why https://play.nim-lang.org/#ix=3sXv |
11:16:00 | FromDiscord | <konsumlamm> @Rika i fail to see what you're trying to say |
11:20:45 | FromDiscord | <konsumlamm> arkanoid: you realize that a concept doesn't make much sense here, because there is only one `func` type? your concept will only be implemented by very specific functions, which can be better expressed by using a type alias |
11:29:00 | arkanoid | konsumlamm, the non-concept branch is using type aliases: "type Function[A, B] = proc(x: A): B {.noSideEffect.}" |
11:29:52 | arkanoid | exercise here is making real/alias branch equivalent to concept one. For equivalent I mean compile and pass test |
11:32:14 | arkanoid | real deal is the error: "/usercode/in.nim(42, 43) Error: cannot instantiate: 'compose[int, float, string]'; got 3 typeof(s) but expected 6". I have no idea where the 3 more typeof are coming from, considering the fact that the real/alias version works |
11:34:31 | arkanoid | there are also warnings that puzzles me when compiling the concept branch: fconcept.nim(7, 5) Hint: 'B' is declared but not used |
11:34:46 | arkanoid | but concept check is f(A) is B |
11:54:07 | FromDiscord | <konsumlamm> In reply to @arkanoid "real deal is the": ye, idk what that's supposed to mean, sorry |
11:54:44 | arkanoid | np |
11:58:05 | arkanoid | btw this is what I'm revolving around: https://wiki.haskell.org/Functor, and nim manual makes explicit examples of concept functors https://nim-lang.org/docs/manual_experimental.html#concepts |
12:03:11 | FromDiscord | <Rika> you dont declare the function type as a concept usually |
12:03:20 | FromDiscord | <Rika> its usually the actual type that's a concept |
12:03:21 | FromDiscord | <AKDev> hi |
12:03:27 | FromDiscord | <AKDev> i just downloaded nim for opengl |
12:03:34 | FromDiscord | <Rika> see how there's not "proc" or "func" in the functor concept |
12:04:52 | arkanoid | Rika, yeah not common to work with proc types, but makes perfect sense when type + concepts wants to be used for domain driven design or stuff like that |
12:05:41 | FromDiscord | <Rika> so what do you really want |
12:05:49 | FromDiscord | <Rika> the type version works does it not? |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:38 | * | supakeen joined #nim |
12:10:23 | arkanoid | the type version works, the concept version raises strange errors. Considering the fact that functions are first class in nim, they should be 1:1 |
12:10:50 | arkanoid | I have the feeling that I'm dealing with some details related to Generic |
12:12:07 | FromDiscord | <Rika> its a concept thing, the way concepts work arent the same as what you're thinking is the issue i feel |
12:12:52 | FromDiscord | <Rika> like `c is func; c(Function[A, B], Function[B, C]) is Function[A, C]` doesnt mean what i think youre thinking |
12:14:48 | arkanoid | no? So what is "c"? Manual says that it should represent an instance of the currently matched type |
12:15:18 | FromDiscord | <Rika> yes, but `c()` is a function called c, unrelated to the `c` in c is func |
12:15:40 | arkanoid | O_o |
12:16:02 | FromDiscord | <Rika> look at one of the concept examples |
12:16:17 | arkanoid | I've read dozen, I've in front of me the first one of the manual |
12:16:20 | FromDiscord | <Rika> the functor one |
12:16:24 | FromDiscord | <Rika> ` map(f, A -> T) is MatchedGenericType[T]` |
12:16:38 | FromDiscord | <Rika> `map(...)` function called map |
12:16:51 | FromDiscord | <Rika> apply the same thought process to the concept you made |
12:16:52 | FromDiscord | <Rika> therefore |
12:16:58 | FromDiscord | <Rika> `c(...)` function called c |
12:17:44 | arkanoid | but in "f.val as A" f is an instance of the Functor |
12:18:01 | arkanoid | s/as/is |
12:18:07 | FromDiscord | <Rika> yes |
12:18:11 | FromDiscord | <Rika> but its not called |
12:18:28 | FromDiscord | <Rika> `c.call is A` would work, but then you need a proc/field called `call` |
12:19:00 | arkanoid | so concept doesn't work with proc types, basically |
12:19:04 | arkanoid | what's the point |
12:19:26 | FromDiscord | <Rika> or you can do `c is Function[Function[A, B], Function[Function[B, C], Function[A, C]]]` which is basically the same as the type version |
12:19:35 | FromDiscord | <Rika> for non proc types |
12:19:50 | FromDiscord | <Rika> if you want static duck typing basically |
12:20:38 | FromDiscord | <Rika> i dont even know why you need compose as a proc type |
12:20:52 | FromDiscord | <Rika> a regular proc would work pretty much perfectly, |
12:20:55 | FromDiscord | <Rika> ah |
12:21:03 | FromDiscord | <Rika> i guess if you're gonna use that proc as a value |
12:21:13 | FromDiscord | <Rika> but still, a concept isnt needed here |
12:22:38 | FromDiscord | <konsumlamm> arkanoid: honestly, if you're trying to do type shenanigans, Nim isn't the right language for that, i'd rather use Haskell (given that you're following the Haskell wiki) |
12:22:58 | FromDiscord | <Rika> i agree |
12:23:07 | FromDiscord | <Rika> nim's type system isnt as sophisticated as other languages |
12:23:19 | arkanoid | A Function and a Composition are two basic blocks of category theory. I've proved that a "real type/alias" version is possible, was just playing around with concepts to achieve the same given the fact that procs should be first class |
12:24:31 | FromDiscord | <konsumlamm> sure, i'm just saying that if you want to do category theory, Haskell is way better suited |
12:25:33 | arkanoid | sure, but I don't see much sheningans here. I'ts barebone functor and compositor, the shenanigans would be trying to push a Monoidal Category into nim, which I have no intention to do |
12:26:37 | FromDiscord | <Rika> you usually make the value type the concept, not the function type |
12:27:10 | FromDiscord | <konsumlamm> even a barebone Functor can make problems in Nim, it doesn't have first-class HKT support |
12:27:44 | arkanoid | konsumlamm all the type inference is forward in my case, that's why the "real type" version works without problems |
12:27:48 | FromDiscord | <Rika> In reply to @konsumlamm "even a barebone Functor": maybe one day ill have the time and knowhow to help with adding such a thing |
12:28:50 | arkanoid | here is just concept syntax and possible limitations (and obvious noob error I might be typing like considerin "c" the instantiated thing) |
12:30:12 | arkanoid | my general feeling is that is just me not good yet in writing concepts |
12:33:39 | arkanoid | and also I'm quite surprised that is not possible to execute a function on the instantiated object |
12:40:43 | FromDiscord | <Rika> wdym? |
12:49:38 | * | mahlon quit (Ping timeout: 256 seconds) |
12:52:02 | * | arkurious joined #nim |
12:53:53 | arkanoid | that in the concept body of the aforementioned example "c" should be the non-generic proc, so doing "c(A) is B" should call that "c", not an external one |
12:54:24 | FromDiscord | <Rika> but that's not consistent with the syntax |
12:54:57 | FromDiscord | <Rika> are you saying nim should special case when `concept c` is referring to a function type? |
12:56:24 | arkanoid | function call is not a "special case". c() means call c, and if c is defined as non-generic proc in concept body, why should it be considered something else |
12:57:08 | FromDiscord | <Rika> so a special case indeed, because if c is not a function there is no possibility that `c()` would mean call concept instance c |
12:58:20 | FromDiscord | <Rika> and that is confusing, what if concept instance c isnt constrained like `c is Function` or whatever, and it matches a function type by chance or w/e? that would mean anything `c()` would mean something else |
12:59:55 | arkanoid | it is always possible to design a "catch all" concept, so that is not an argument |
13:00:59 | arkanoid | question is: if the type I want to match is a function type, how to match if it wants one argument of type A and outputs a B? |
13:01:16 | FromDiscord | <Rika> it is possible, is it practical |
13:01:27 | FromDiscord | <Rika> do we have the resources to do so |
13:02:15 | FromDiscord | <Rika> well we already are throwing the current impl now |
13:02:30 | FromDiscord | <Rika> but the new impl wont help you here |
13:03:30 | FromDiscord | <Rika> feel free to comment on the new-style concepts rfc about it then i guses |
13:03:32 | FromDiscord | <Rika> (edit) "guses" => "guess" |
13:03:39 | arkanoid | btw this is my first experiment with concepts, I've neved used them before. Still I don't feel like asking rocket science |
13:04:13 | FromDiscord | <Rika> what do you want us to say other than "you're using it wrong and its not supposed to be used like that"? |
13:05:33 | arkanoid | nothing, I'm ok with that. I do see it now. I was just confused by the fact that c(..) was ignored and not raising any error |
13:06:44 | arkanoid | there's no "c" function in namespace, so the concept should not match anything, but it does somehow (the "function" test set succeeds even with concepts) |
13:08:12 | FromDiscord | <Rika> so that means either im wrong or the old concepts are buggy (theyve been observed countless times to be buggy so im pretty sure its the latter) |
13:11:56 | arkanoid | basically I'm playing around with concepts for the first time on a buggy implementation and ideas considered sci-fi for now |
13:12:50 | arkanoid | still, I'm happy to have finally grasped at least something about them. I'm planning to use them in next project but yet unsure where |
13:20:24 | arkanoid | with some black magic it might be possible though https://github.com/nim-lang/Nim/issues/5650#issuecomment-860227825 |
13:24:49 | arkanoid | yet I don't understand what "mapto" and "default" are here https://play.nim-lang.org/#ix=3pPI |
13:26:36 | FromDiscord | <Rika> i dont see a default |
13:26:48 | arkanoid | "proc mapto[T](x:t):MatchedGenericType[T] = map(f,default(A->T))" |
13:27:08 | FromDiscord | <Rika> ah okay |
13:27:38 | arkanoid | you can also find the comments here: https://stackoverflow.com/questions/67958826/trouble-defining-a-nim-concept-with-an-auto-type-inside |
13:27:54 | arkanoid | but I miss the point of declaring a proc into a concept |
13:30:16 | FromDiscord | <Rika> In reply to @arkanoid "yet I don't understand": thats still an old-style concept |
13:30:51 | arkanoid | ok, let's restart from scratch. How to learn writing new concepts? |
13:31:06 | FromDiscord | <Rika> read the rfc |
13:31:06 | FromDiscord | <Rika> https://github.com/nim-lang/RFCs/issues/168 |
13:31:31 | FromDiscord | <Rika> its not a complete implementation yet |
13:31:32 | FromDiscord | <Rika> but it exists |
13:33:52 | arkanoid | this new kind of concepts really reminds me "Interfaces" |
13:35:11 | FromDiscord | <Rika> they are not, they are still strictly compiletime |
13:39:13 | FromDiscord | <theangryepicbanana> interfaces have been proposed though |
13:40:38 | arkanoid | the example given by araq in rfc doesn't cover type checking like on current(old) concept version, but in the second post by Andrea Ferretti it seems to check them anyway (see "self is AdditiveMonoid") |
13:47:46 | arkanoid | would you explan what "map(f,default(A->T))" means? I've tried repr on kinda "default(A->T)" and I'm getting "[Field0 = nil, Field1= nil]". What does it mean to map a function to the "default of a proc type"? |
13:48:17 | * | rockcavera joined #nim |
13:48:17 | * | rockcavera quit (Changing host) |
13:48:17 | * | rockcavera joined #nim |
13:50:43 | FromDiscord | <haxscramper> !eval import std/sugar; echo default(int -\> int).isNil() |
13:50:49 | NimBot | Compile failed: /usercode/in.nim(1, 36) Error: undeclared identifier: '-\>' |
13:51:08 | FromDiscord | <haxscramper> big brain time v9000 |
13:51:25 | FromDiscord | <haxscramper> Anyway, default of a procedure seems to be `nil` |
13:51:25 | FromDiscord | <haxscramper> Anyway, `default` of a procedure seems to be `nil` |
13:53:34 | arkanoid | !eval import sugar; type A = object; type B = object; type F = A -> B; echo default(F).repr |
13:53:38 | NimBot | [Field0 = nil,↵Field1 = nil]↵ |
13:55:17 | FromDiscord | <Rika> !eval import sugar; type A = object; type B = object; type F = A -> B; echo default(F) |
13:55:20 | NimBot | Compile failed: /usercode/in.nim(1, 71) Error: type mismatch: got <F> |
13:55:39 | FromDiscord | <Rika> ok |
13:55:53 | FromDiscord | <Rika> field0 should be either the proc pointer or the environment pointer |
13:56:02 | FromDiscord | <Rika> same with 1 (the other_ |
13:56:04 | FromDiscord | <Rika> (edit) "other_" => "other)" |
13:59:35 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3sZm |
14:27:54 | arkanoid | ok so that means that's a closure |
14:28:21 | arkanoid | so what is "map(f,default(A->T))" ? |
14:47:19 | FromDiscord | <hamidb80> hey |
14:55:15 | * | mahlon joined #nim |
15:13:31 | FromDiscord | <Jasmine and Don't Forget!~> hi |
15:19:28 | FromDiscord | <hamidb80> how can i copy a `ref` object ? |
15:20:45 | FromDiscord | <Rika> deepcopy |
15:22:25 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3t0q |
15:23:38 | FromDiscord | <enthus1ast> but f2 is no ref anymore then |
15:24:11 | FromDiscord | <Rika> var f2 = new f1.type↵f2[] = f1[] |
15:24:15 | FromDiscord | <Rika> perhaps. |
15:24:20 | FromDiscord | <Rika> but this is a shallow copy |
15:24:28 | FromDiscord | <Rika> deep copies would copy refs in refs as well |
15:51:43 | FromDiscord | <Hi02Hi> Is there a way to "restart" a closure iterator? |
15:56:44 | FromDiscord | <Jasmine and Don't Forget!~> I'm having an issue with the nim bindings in godot, I've practically written the exact same program in nim and gdscript and for some reason the nim version isn't working |
15:56:55 | FromDiscord | <Jasmine and Don't Forget!~> I can paste the code if you want to see |
15:57:20 | FromDiscord | <Rika> In reply to @Hi02Hi "Is there a way": no |
16:23:07 | * | max22- joined #nim |
16:41:11 | * | stkrdknmibalz joined #nim |
16:52:58 | FromDiscord | <RattleyCooper> In reply to @Jasmine and Don't Forget!~ "I'm having an issue": Are you using `gdNim` or `godot-nim`? |
16:53:11 | FromDiscord | <Jasmine and Don't Forget!~> I'm using godot-nim, I believe |
16:54:09 | FromDiscord | <RattleyCooper> Can you send the script? |
16:54:14 | FromDiscord | <Jasmine and Don't Forget!~> ofc, one sec |
16:54:43 | arkanoid | shoudn't {.raises: [].} be implicit with func/{.noSideEffect.} ? |
16:55:09 | FromDiscord | <Jasmine and Don't Forget!~> sent a code paste, see https://play.nim-lang.org/#ix=3t0V |
16:55:14 | FromDiscord | <Jasmine and Don't Forget!~> this is the script in nim |
16:56:09 | FromDiscord | <Jasmine and Don't Forget!~> and here's the gdscript that I did a little bit ago https://media.discordapp.net/attachments/371759389889003532/864913171369164880/message.txt |
16:56:30 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3t0X |
16:56:43 | FromDiscord | <RattleyCooper> In reply to @geekrelief "What's the issue?": They're using `godot-nim` |
16:57:13 | FromDiscord | <Jasmine and Don't Forget!~> When I use the transform.basis in gdscript, it sets the direciton of the player. But in nim it goes off in random directions |
16:57:14 | FromDiscord | <geekrelief> but what issue are you running into? She just says it isn't working. |
16:57:21 | FromDiscord | <RattleyCooper> (edit) "In reply to @geekrelief "What's the issue?": They're using `godot-nim` ... " added "and I don't remember if godot-nim needs gdExport" |
16:58:18 | FromDiscord | <RattleyCooper> In reply to @geekrelief "but what issue are": Does `godot-nim` need `{.gdExport}` for procs? |
16:58:38 | FromDiscord | <Hi02Hi> In reply to @Rika "no": i mean create a var that is a restarted version of the closure iterator, but i dont think thats possible either |
16:58:39 | FromDiscord | <RattleyCooper> (edit) "In reply to @geekrelief "but what issue are": Does `godot-nim` need `{.gdExport}` for procs? ... " added " If so, that seems like the problem" |
16:58:42 | FromDiscord | <haxscramper> No, raises is related to exception tracking↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>) |
16:58:54 | FromDiscord | <haxscramper> Exception and effect tracking |
16:59:04 | FromDiscord | <haxscramper> Not all effects are side effects IIRC |
16:59:25 | FromDiscord | <geekrelief> In reply to @Jasmine and Don't Forget!~ "When I use the": Maybe your basis access is transposed? |
16:59:25 | FromDiscord | <Rika> @Hi02Hi no you need to run the function that makes the iterator again |
16:59:41 | FromDiscord | <Jasmine and Don't Forget!~> How would I fix that? |
17:00:18 | FromDiscord | <geekrelief> check to see if you can do `basis.z` instead of `basis[2]` |
17:00:46 | FromDiscord | <Jasmine and Don't Forget!~> I tried that, but it didn't like it |
17:00:48 | FromDiscord | <geekrelief> https://github.com/pragmagic/godot-nim/commit/f3da1c6ee5331592ee4755ac97e09e94a94a6c0f |
17:01:32 | FromDiscord | <Jasmine and Don't Forget!~> I'm using a release, should I build the newer version? |
17:02:02 | FromDiscord | <geekrelief> you mean from nimble? |
17:02:27 | FromDiscord | <Jasmine and Don't Forget!~> I think so, I mean gic cloning it and following the instructions on the site for how to build it |
17:02:35 | FromDiscord | <Jasmine and Don't Forget!~> (edit) "gic" => "git" |
17:03:00 | FromDiscord | <geekrelief> that should be fine. just try changing your basis access from using numbers to `x,y,z` first to see if that solves your issue |
17:03:46 | FromDiscord | <Jasmine and Don't Forget!~> I already did that, and it was throwing errors. I'll do it on a fresh build, thank you |
17:04:09 | FromDiscord | <geekrelief> ok if it was throwing errors then you don't have the commit that implements it |
17:04:40 | FromDiscord | <geekrelief> so you can try accessing the `elements` of `basis` create a new vector from that just like it's shown in the commit |
17:04:59 | FromDiscord | <geekrelief> if that fixes it, then you just need to update godot-nim to get the accessors |
17:07:17 | * | pro joined #nim |
17:13:08 | FromDiscord | <ajusa> Is there a zero copy way to go from cstring to string if I know the length as well? |
17:15:35 | FromDiscord | <@bracketmaster-5a708063d73408ce4> is there an wasy way to access just the last element of an array in nim?element |
17:17:28 | FromDiscord | <geekrelief> In reply to @@bracketmaster-5a708063d73408ce4 "is there an wasy": Use `^`, the BackwardsIndex |
17:17:44 | FromDiscord | <konsumlamm> specifically `arr[^1]` |
17:18:09 | FromDiscord | <@bracketmaster-5a708063d73408ce4> !nim var a = [1,2,3,4,5]; a[^1]; |
17:18:14 | FromDiscord | <Rika> eval lol |
17:18:22 | FromDiscord | <@bracketmaster-5a708063d73408ce4> !eval var a = [1,2,3,4,5]; a[^1]; |
17:18:22 | NimBot | Compile failed: <no output> |
17:18:29 | FromDiscord | <Rika> !eval var a = [1,2,3,4,5]; echo a[^1]; |
17:18:29 | NimBot | Compile failed: <no output> |
17:18:59 | FromDiscord | <Rika> no output? lol |
17:19:27 | fn | <Prestige99> weird |
17:19:45 | FromDiscord | <pointystick> !eval [1,2,3,4,5][^1] |
17:19:45 | NimBot | Compile failed: <no output> |
17:19:52 | FromDiscord | <Rika> needs to echo |
17:19:58 | FromDiscord | <pointystick> oops |
17:20:01 | FromDiscord | <Hi02Hi> In reply to @Rika "<@!787421416227995699> no you need": yeah that makes sense but the problem is that the iterator is passed as a parameter, so i dont know that function |
17:20:08 | FromDiscord | <@bracketmaster-5a708063d73408ce4> !eval echo "hello" |
17:20:08 | FromDiscord | <pointystick> !eval echo [1,2,3,4,5][^1] |
17:20:08 | NimBot | Compile failed: <no output> |
17:20:08 | NimBot | Compile failed: <no output> |
17:20:16 | fn | <Prestige99> uhh |
17:20:23 | FromDiscord | <Rika> In reply to @Hi02Hi "yeah that makes sense": just so you know python also does not have this feature |
17:20:24 | fn | <ForumUpdaterBot99> New question by shuji: How to write accesors for kind Variants in Nim, see https://stackoverflow.com/questions/68382552/how-to-write-accesors-for-kind-variants-in-nim |
17:20:29 | fn | <Prestige99> bot is broken? |
17:20:29 | FromDiscord | <Rika> the playground is probably down |
17:20:34 | fn | <Prestige99> !eval echo "hello" |
17:20:34 | NimBot | Compile failed: <no output> |
17:20:35 | fn | <R2D299> <no output> |
17:20:40 | fn | <Prestige99> yeah.. |
17:20:41 | FromDiscord | <@bracketmaster-5a708063d73408ce4> what feature? |
17:20:59 | fn | <Prestige99> Yep the playground site is down |
17:21:02 | FromDiscord | <Rika> i reply to hi02hi |
17:21:07 | FromDiscord | <Rika> iterator restarting |
17:21:11 | FromDiscord | <@bracketmaster-5a708063d73408ce4> o |
17:21:13 | FromDiscord | <@bracketmaster-5a708063d73408ce4> oh |
17:21:29 | FromDiscord | <Rika> checked playground |
17:21:32 | FromDiscord | <Rika> its indeed down |
17:21:39 | FromDiscord | <@bracketmaster-5a708063d73408ce4> was about to say, a[-1] definitely works in Python |
17:22:49 | FromDiscord | <Rika> the also should have hinted that i wasnt talking about that tho xd |
17:34:07 | FromDiscord | <Hi02Hi> In reply to @Rika "just so you know": i wasnt expecting it, i was asking if i missed anything |
17:34:13 | FromDiscord | <Rika> o ok |
17:45:19 | * | rockcavera quit (Remote host closed the connection) |
17:55:37 | fn | <ForumUpdaterBot99> New post on r/nim by shujidev: How to write accesors for kind Variants in Nim, see https://reddit.com/r/nim/comments/ok9qoe/how_to_write_accesors_for_kind_variants_in_nim/ |
18:10:30 | FromDiscord | <haxscramper> Where does this `type Value=object` style comes from? Almost all tutorials documentation indent after `type` and put all objects (even non-recursive ones) in a single section |
18:11:06 | FromDiscord | <theangryepicbanana> probably people who aren't familiar with nim (or pascal) |
18:12:35 | FromDiscord | <theangryepicbanana> their code isn't very good either, so they're probably new to nim |
18:17:11 | FromDiscord | <dom96> it's not just people who aren't familiar, there are some who prefer that style |
18:17:29 | FromDiscord | <dom96> and probably look at it in the same way as `proc blah ...` |
18:21:30 | * | max22- quit (Ping timeout: 268 seconds) |
18:56:22 | * | max22- joined #nim |
19:05:15 | * | pro quit (Ping timeout: 258 seconds) |
19:07:10 | fn | <ForumUpdaterBot99> New thread by Sdmcallister: Nimpy pandas slicing/indexing, see https://forum.nim-lang.org/t/8234 |
19:08:22 | * | max22- quit (Ping timeout: 268 seconds) |
19:18:25 | * | max22- joined #nim |
19:33:04 | * | max22- quit (Remote host closed the connection) |
19:41:05 | * | max22- joined #nim |
20:00:10 | * | max22- quit (Ping timeout: 268 seconds) |
20:07:40 | * | max22- joined #nim |
20:48:12 | * | rockcavera joined #nim |
20:48:12 | * | rockcavera quit (Changing host) |
20:48:12 | * | rockcavera joined #nim |
20:54:41 | * | max22- quit (Remote host closed the connection) |
20:55:05 | * | max22- joined #nim |
21:16:47 | * | neceve quit (Ping timeout: 245 seconds) |
21:27:51 | * | max22- quit (Quit: Leaving) |
21:43:03 | * | max22- joined #nim |
22:01:07 | * | Vladar quit (Quit: Leaving) |
22:02:59 | * | max22- quit (Quit: Leaving) |
22:32:05 | FromDiscord | <Ayy Lmao> What do you all use for text editing? Is there anything good that has good autocomplete and definition finding? |
22:34:24 | FromDiscord | <theangryepicbanana> In reply to @Ayy Lmao "What do you all": I think there's some lsp extensions for nim in vscode |
22:40:13 | FromDiscord | <ElegantBeef> I use saems extension for vscode |
22:46:30 | FromDiscord | <Ayy Lmao> That seems good. I've found the syntax highlighting in the vscode extensions to be a bit wonky sometimes however |
22:55:45 | FromDiscord | <Ayy Lmao> Having the lsp installed is really good though, I didn't have that before |
23:07:04 | FromDiscord | <System64 ~ Flandre Scarlet> Is it possible to use C code in Nim or I have to port it? |
23:09:34 | FromDiscord | <Ayy Lmao> You can use C code, there's an example in here https://nim-lang.org/docs/backends.html |
23:10:39 | FromDiscord | <theangryepicbanana> In reply to @Ayy Lmao "That seems good. I've": yeah I'm hoping to work on the syntax highlighting soon-ish |
23:10:44 | FromDiscord | <theangryepicbanana> it kinda sucks |
23:11:47 | FromDiscord | <System64 ~ Flandre Scarlet> Ooooh alright that's cool! |
23:12:45 | FromDiscord | <System64 ~ Flandre Scarlet> this language is neat |
23:14:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Ayy Lmao "You can use C": and if there is multiple files for my C code, is that a problem too? |
23:14:40 | FromDiscord | <Ayy Lmao> It is. I hope it gains popularity. I have found it to be a great language to work with for pretty much all of my needs so far |
23:14:56 | FromDiscord | <Ayy Lmao> In reply to @System64 "and if there is": It shouldn't be a problem |
23:15:05 | FromDiscord | <System64 ~ Flandre Scarlet> alright should try that |
23:16:22 | FromDiscord | <Ayy Lmao> You can also link compiled c libs, dynamic and static |
23:16:32 | FromDiscord | <System64 ~ Flandre Scarlet> Yeah I know that |
23:16:47 | FromDiscord | <System64 ~ Flandre Scarlet> that's what I did with GameMusicEmu and Tilengine |
23:30:08 | FromDiscord | <ElegantBeef> @garett you know you starred the completely wrong `hottie` mine was just for porting it to linux 😄 |
23:30:34 | FromDiscord | <garett> Thanks for the heads up |
23:31:27 | FromDiscord | <ElegantBeef> It was just so i could delete it without confusing you |
23:31:48 | FromDiscord | <garett> Now I’ve starred treeform’s repo |
23:41:16 | FromDiscord | <theangryepicbanana> what's the operator precedence of the deref operator? I can't find it in the docs |