00:00:11 | * | jmdaemon quit (Ping timeout: 264 seconds) |
00:08:43 | * | fallback quit (Ping timeout: 248 seconds) |
00:09:22 | * | jmdaemon joined #nim |
00:28:05 | * | jmdaemon quit (Ping timeout: 246 seconds) |
00:28:47 | * | fallback joined #nim |
00:31:10 | * | jmdaemon joined #nim |
01:15:58 | FromDiscord | <@thatrandomperson5-6310e3b26da03> I wrote an xml parse using only stdlib\: https://gist.github.com/thatrandomperson5/482fb4562b72e46900cf736f72759643 |
01:29:34 | FromDiscord | <pmp-p> if think i've found something to run Nim Wasi target on browser, any chance someone with typescript knowledge can tell me how to build that thing ? https://github.com/qrdate/tinywasi |
01:30:10 | FromDiscord | <pmp-p> (edit) "browser," => "browser with reator model," |
01:32:17 | * | xet7 joined #nim |
01:34:20 | FromDiscord | <pmp-p> hmm maybe `npx tsc --build` |
01:57:31 | * | fallback quit (Ping timeout: 260 seconds) |
02:05:52 | * | fallback joined #nim |
02:16:10 | FromDiscord | <scipio> In reply to @auxym "<@890692135827959919> we have https://scinim.github": or https://github.com/bluenote10/NimData @Saint |
02:18:17 | * | jmdaemon quit (Ping timeout: 246 seconds) |
02:22:31 | * | jmdaemon joined #nim |
02:24:05 | FromDiscord | <T0lk1en> First project. Check it out. https://github.com/ko-mill/NimCrypt Lmk some feedback |
02:25:23 | FromDiscord | <Rika> Remove the debug echo statements lol |
02:26:01 | FromDiscord | <scipio> well it is friendly? I feel welcome reading so many hiiiiiiiii's |
02:26:09 | FromDiscord | <T0lk1en> Oh shit🥲🥲 |
02:26:10 | FromDiscord | <Rika> Lmao |
02:26:27 | FromDiscord | <T0lk1en> Happens to the best |
02:26:51 | FromDiscord | <Elegantbeef> On the plus side you didnt push a binary file |
02:27:09 | FromDiscord | <leetnewb> Feel like the debug messages need to be meaner |
02:27:23 | FromDiscord | <T0lk1en> I like a friendly program |
02:27:41 | FromDiscord | <scipio> I'd throw in a `when` and leave 'em in there as easter eggs |
02:27:49 | FromDiscord | <T0lk1en> In reply to @Rika "Remove the debug echo": Removed them |
02:27:58 | FromDiscord | <scipio> put 'em back |
02:28:00 | FromDiscord | <T0lk1en> What does when do? |
02:28:11 | * | byanka joined #nim |
02:28:16 | FromDiscord | <scipio> `when` is a compile time i`f` |
02:28:21 | FromDiscord | <scipio> (edit) "i`f`" => "`if`" |
02:28:22 | * | jmdaemon quit (Ping timeout: 272 seconds) |
02:28:31 | FromDiscord | <T0lk1en> Purpose? |
02:29:00 | FromDiscord | <scipio> 42 |
02:29:10 | FromDiscord | <Elegantbeef> Optional compilation of logic depending on flags or types |
02:29:20 | FromDiscord | <T0lk1en> Wyd does that mean? |
02:29:23 | FromDiscord | <T0lk1en> Wtf |
02:29:50 | FromDiscord | <Rika> In reply to @leetnewb "Feel like the debug": Like “fuck you”? |
02:30:00 | FromDiscord | <T0lk1en> Like wanting to do logic outside the program during compile time? |
02:30:06 | FromDiscord | <Rika> In reply to @T0lk1en "Like wanting to do": Yes pretty much |
02:30:19 | * | byanka_ quit (Ping timeout: 260 seconds) |
02:30:22 | FromDiscord | <T0lk1en> Why would you want something that does logic on compile time vs when you run it? |
02:30:30 | FromDiscord | <Rika> Like if you want to put debug statements only when compiling a debug binary |
02:30:32 | FromDiscord | <Elegantbeef> When compiled wiht `-d:doEcho` it will print "hello" otherwise it doesnt do anything |
02:30:32 | FromDiscord | <Elegantbeef> This extends to generics and the like |
02:30:41 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/JY2 |
02:30:57 | FromDiscord | <T0lk1en> Ah so basically optional debug statements |
02:31:43 | FromDiscord | <T0lk1en> Cool |
02:32:02 | FromDiscord | <T0lk1en> But lmk what you guys think. I’m trying to learn and get better |
02:32:05 | FromDiscord | <Rika> Not the only use of course |
02:32:09 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kRf |
02:32:30 | FromDiscord | <Elegantbeef> Another usage of `when` |
02:32:30 | FromDiscord | <Elegantbeef> Thinking of it as a compile time `if` is generally sufficient, but it behaves differently |
02:32:30 | FromDiscord | <Elegantbeef> It's not that it runs at compile time |
02:32:31 | FromDiscord | <Elegantbeef> It changes the program based off constant expressions |
02:32:31 | FromDiscord | <Elegantbeef> Which means you can specialise for types or just optionally emit code |
02:32:31 | FromDiscord | <Elegantbeef> One use of using `when` is to include debug statements only if build with the debug flag |
02:32:33 | FromDiscord | <Elegantbeef> Otherwise you dont have the overhead of debug logic |
02:32:45 | FromDiscord | <Rika> Beef typing at the speed of light (joke) |
02:32:55 | FromDiscord | <Rika> Bridge just being slow I assume |
02:33:00 | FromDiscord | <Elegantbeef> There isnt much to comment on |
02:33:00 | FromDiscord | <Elegantbeef> It's 12 loc |
02:33:06 | FromDiscord | <Elegantbeef> Matrix bridge is slow, but i'm fast |
02:33:07 | FromDiscord | <Elegantbeef> Or vice versa |
02:42:41 | FromDiscord | <T0lk1en> Interesting |
02:44:31 | FromDiscord | <scipio> In reply to @T0lk1en "First project. Check it": other than that, 2 things:↵-1- 25 lines of code (which could be rewritten to about half the size) isn't exactly "publishable", right? What kind of feedback would you expect on this? Kind of "storming / kicking in an already open door".↵↵-2- it's good you're learning and having fun! Keep at it! 🙂 |
02:46:33 | FromDiscord | <T0lk1en> Ig I didn’t know what to expect. Maybe something about if it’s actually useful or not. |
02:47:59 | FromDiscord | <scipio> sent a code paste, see https://play.nim-lang.org/#ix=4kRh |
02:48:10 | FromDiscord | <Elegantbeef> Again it's like 12 loc there isnt much to say |
02:48:16 | * | acj joined #nim |
02:48:30 | * | acj quit (Client Quit) |
02:48:37 | FromDiscord | <scipio> It was a joke, not really asking for feedback |
02:48:40 | FromDiscord | <scipio> 😁 |
02:48:43 | FromDiscord | <Elegantbeef> That's not enterprise enoguh sorry scipio |
02:49:02 | FromDiscord | <scipio> In reply to @Elegantbeef "That's not enterprise enoguh": But it is _eloquent_ |
02:49:05 | FromDiscord | <Elegantbeef> I was responding to tolkien about the 12loc |
02:49:06 | FromDiscord | <T0lk1en> Whatever bro. Just trying to learn. |
02:49:11 | FromDiscord | <Elegantbeef> It's really not scipio |
02:49:35 | FromDiscord | <scipio> In reply to @T0lk1en "Whatever bro. Just trying": Like I said: keep at it! iI'm not trying to diss you at all, I'm a beginner in Nim myself |
02:49:55 | FromDiscord | <scipio> In reply to @Elegantbeef "It's really not scipio": Well I like it! :p |
02:50:01 | FromDiscord | <scipio> (edit) ":p" => "😛" |
02:50:27 | FromDiscord | <scipio> In reply to @T0lk1en "Whatever bro. Just trying": You asked for feedback, this is also valid feedback. |
02:50:28 | FromDiscord | <voidwalker> In reply to @scipio "Well I like it!": You're hired |
02:50:51 | FromDiscord | <T0lk1en> Gotchu bro |
02:50:57 | FromDiscord | <T0lk1en> @scipio |
02:52:03 | FromDiscord | <voidwalker> is there any way I can assign to an enum value, a type value of another enum type ? |
02:52:44 | FromDiscord | <Elegantbeef> `myEnum = MyEnumType(myOtherEnum)` |
02:53:14 | FromDiscord | <auxym> wow, I still haven't finished parsing the question |
02:53:31 | FromDiscord | <voidwalker> lol I don't think I wrote it properly |
02:53:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kRi |
02:53:49 | FromDiscord | <Elegantbeef> I assume you want to assign a enum of a different type to a enum of this tpye |
02:54:04 | FromDiscord | <voidwalker> hm no |
02:54:15 | FromDiscord | <Elegantbeef> Well then get to using your words |
02:54:36 | FromDiscord | <voidwalker> I want an enum value to hold, like it can hold a string, the "value" (like in typedesc?) of another Enum type |
02:54:44 | FromDiscord | <voidwalker> so that they are logically linked |
02:55:20 | FromDiscord | <Elegantbeef> I mean you can do `myEnumField = $myOtherEnumField` |
02:55:39 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kRj |
02:55:41 | FromDiscord | <voidwalker> well it's not field to field, it's field to type |
02:55:42 | FromDiscord | <auxym> or `int(myOtherEnumField)` |
02:55:58 | FromDiscord | <Elegantbeef> You need to provide a problem in code |
02:56:07 | FromDiscord | <Elegantbeef> Your words are failing you like i did highschool |
02:56:07 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4kRk |
02:56:11 | FromDiscord | <Elegantbeef> There you go |
02:56:12 | FromDiscord | <voidwalker> I want aom to hold "AomParams" type |
02:56:28 | FromDiscord | <Elegantbeef> Hold it how? |
02:56:33 | FromDiscord | <auxym> types cannot be used as values |
02:56:34 | FromDiscord | <voidwalker> as a value 😄 |
02:56:36 | FromDiscord | <voidwalker> no ? |
02:56:43 | FromDiscord | <voidwalker> I thought that's what typedesc is for |
02:56:56 | FromDiscord | <auxym> as runtime values |
02:57:00 | FromDiscord | <voidwalker> I need it to get rid of a layer of abstraction |
02:57:07 | FromDiscord | <Elegantbeef> Typedescs do not exist at runtime |
02:57:11 | FromDiscord | <Elegantbeef> They're purely a compile time construct |
02:57:15 | FromDiscord | <voidwalker> oh.. |
02:57:20 | FromDiscord | <Elegantbeef> I dont know what relation you're going for still |
02:57:46 | FromDiscord | <voidwalker> related to this: https://forum.nim-lang.org/t/9816 where I have this implemented: https://play.nim-lang.org/#ix=4kRg |
03:00:29 | FromDiscord | <voidwalker> sent a code paste, see https://paste.rs/h9E |
03:00:54 | FromDiscord | <Elegantbeef> The only way around this is a macro of some form |
03:01:00 | FromDiscord | <voidwalker> which adds one more useless layer in the object's nodes of values |
03:01:11 | FromDiscord | <Elegantbeef> You want to conditionally flow types based off runtime value, which means you need branching |
03:02:34 | FromDiscord | <Elegantbeef> Atleast as far as i can tell you want to change types used based off what value is parsed |
03:02:45 | FromDiscord | <Elegantbeef> Alternatively you could just use a `seq[(string, string)]` |
03:02:53 | FromDiscord | <Elegantbeef> Or `(int, string)` |
03:03:23 | FromDiscord | <voidwalker> yeah, I want to be able to pass the proper type based on a value I already know it should point to that type |
03:03:30 | * | argonica quit (Ping timeout: 265 seconds) |
03:03:34 | FromDiscord | <voidwalker> (edit) "a" => "an eum" |
03:04:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/5OT |
03:04:18 | FromDiscord | <voidwalker> In reply to @Elegantbeef "Alternatively you could just": use for/in what ? |
03:04:24 | FromDiscord | <voidwalker> hmm |
03:04:25 | FromDiscord | <Elegantbeef> No clue if you need the int value or what |
03:04:32 | FromDiscord | <voidwalker> no, I really don't |
03:05:02 | FromDiscord | <Elegantbeef> We could do something else aswell |
03:07:45 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4kRn |
03:08:07 | FromDiscord | <pyolyokh> it's an array indexed by Encoders |
03:08:22 | FromDiscord | <voidwalker> ohhh |
03:08:26 | FromDiscord | <Elegantbeef> Then you can do the same of `let myParams = params[aom]` |
03:08:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/DHJ |
03:10:07 | FromDiscord | <scipio> sent a long message, see http://ix.io/4kRo |
03:10:29 | FromDiscord | <Elegantbeef> Well you're a cryptoscammer |
03:10:30 | FromDiscord | <sealmove> Hello. I am trying to run the tests of an old project of mine with testament, and I can't remember the correct command... The documentation is lacking. |
03:10:31 | FromDiscord | <Elegantbeef> 😛 |
03:11:15 | FromDiscord | <sealmove> sent a code paste, see https://play.nim-lang.org/#ix=4kRp |
03:12:07 | FromDiscord | <scipio> In reply to @Elegantbeef "Well you're a cryptoscammer": I made it work anyway https://media.discordapp.net/attachments/371759389889003532/1062569567878127626/image.png |
03:12:28 | FromDiscord | <Rika> That looks pretty nice |
03:14:08 | FromDiscord | <scipio> Thx. My concept of this UI was to remove human trading input (no fat finger data entry, just clicks) as much as possible. Also created a binding to an Elgato StreamDeck, almost like a gaming controller. |
03:15:41 | FromDiscord | <Rika> In reply to @scipio "Thx. My concept of": Now you have accidental click issues lol |
03:16:38 | FromDiscord | <scipio> Actually no! 😁 Because of interfacing over API with this app running client-side, I can add in a bunch of checks and computations on the backend |
03:17:29 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4kRr |
03:23:32 | * | argonica joined #nim |
03:24:45 | FromDiscord | <Elegantbeef> What? |
03:25:08 | FromDiscord | <amadan> sent a code paste, see https://paste.rs/F7F |
03:26:53 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4kRt |
03:27:01 | FromDiscord | <voidwalker> (edit) "https://paste.rs/nB4" => "https://play.nim-lang.org/#ix=4kRu" |
03:27:18 | FromDiscord | <Elegantbeef> They all have to be the same type of `Params` |
03:27:19 | FromDiscord | <voidwalker> different value types, can't mix them |
03:27:27 | FromDiscord | <Elegantbeef> Of course you cannot mix them |
03:27:46 | FromDiscord | <Elegantbeef> That's the point of the set, you can share them if you need but getting which ones are valid are easy |
03:28:33 | FromDiscord | <voidwalker> oh so you mean I should put them all in one big set and separate them in the const array |
03:31:48 | FromDiscord | <Elegantbeef> Yes |
03:55:26 | * | argonica quit (Remote host closed the connection) |
04:13:52 | * | arkurious quit (Quit: Leaving) |
04:14:52 | FromDiscord | <T0lk1en> sent a long message, see http://ix.io/4kRF |
04:15:05 | FromDiscord | <T0lk1en> This is my code and when I run it I get this error |
04:15:37 | FromDiscord | <T0lk1en> ‘Input.Len == 16’ assertion error |
04:15:54 | FromDiscord | <T0lk1en> However I know I’m providing it a valid AES key that is the proper length |
04:16:04 | FromDiscord | <T0lk1en> The example code works fine |
04:16:28 | FromDiscord | <T0lk1en> That is in the libraries readme.md |
04:21:55 | FromDiscord | <T0lk1en> I mean like wth bro. The example code work perfect |
04:35:59 | FromDiscord | <m4ul3r> sent a code paste, see https://paste.rs/OGM |
04:36:25 | FromDiscord | <Rika> It’s not in their code |
04:36:30 | FromDiscord | <Rika> It’s in the functions they call |
04:36:33 | FromDiscord | <Rika> Most likely |
04:37:10 | FromDiscord | <m4ul3r> Ah i see |
04:37:18 | FromDiscord | <T0lk1en> How do you get the code to show up so nice? |
04:37:21 | FromDiscord | <T0lk1en> On discord? |
04:37:41 | * | azimut quit (Ping timeout: 255 seconds) |
04:37:48 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4kRH |
04:37:59 | FromDiscord | <m4ul3r> (edit) "sent a code paste, see https://play.nim-lang.org/#ix=4kRH" => "3 back ticks then nim, close with 3 back ticks" |
04:38:09 | FromDiscord | <m4ul3r> (edit) "ticks" => "ticks↵ex:↵'''nim↵'''" |
04:38:33 | FromDiscord | <m4ul3r> (edit) "ticks↵ex:↵'''nim↵'''" => "ticks↵ex (single for showing):↵'''nim↵'''" |
04:38:39 | FromDiscord | <T0lk1en> Still I don’t u sweat and why my code is t working |
04:38:40 | FromDiscord | <m4ul3r> (edit) "3 back ticks then nim, close with 3 back ticks↵ex (single ... for" added "quote" |
04:38:44 | FromDiscord | <T0lk1en> Understand |
04:39:05 | FromDiscord | <m4ul3r> What args are you giving to encrypt or decrypt? |
04:40:14 | FromDiscord | <T0lk1en> A valid file name and a valid aes 16 length key |
04:40:36 | FromDiscord | <T0lk1en> It’s almost gotta be a problem w the library |
04:41:16 | FromDiscord | <T0lk1en> Yeah it is I’m getting errors on the example code now |
04:43:16 | FromDiscord | <m4ul3r> Just tested it, works for me so it isn't a problem with the library |
04:43:34 | FromDiscord | <T0lk1en> Lemme delete and redownload the library rq |
04:44:25 | FromDiscord | <T0lk1en> Does my code work on your machine? |
04:46:42 | FromDiscord | <m4ul3r> let me test |
04:47:09 | FromDiscord | <T0lk1en> I left my GitHub earlier |
04:48:36 | FromDiscord | <m4ul3r> You're using contents with `aes.encryptECB()` which isn't the key |
04:49:15 | FromDiscord | <m4ul3r> contents is probably not 16 and that's why it is failing |
04:50:55 | FromDiscord | <T0lk1en> I just deleted the portion of code in the library that was cashing me problems and everything works perfect now. Let’s see if I fucked up big or not |
04:53:55 | FromDiscord | <m4ul3r> According to the repo (https://github.com/jangko/nimAES) the implemented AES only works on 1 bock (16 bytes).↵You'd have to implement iteration of each block yourself, |
05:00:07 | * | oprypin quit (Quit: Bye) |
05:07:11 | FromDiscord | <jtv> Wow, the compiler on OS X runs under rosetta? |
05:12:26 | FromDiscord | <jtv> I mean, it definitely does, as I discovered on accident. Why's that the case I guess is the question 🙂 |
05:12:54 | FromDiscord | <T0lk1en> In reply to @m4ul3r "According to the repo": Wdym |
05:14:10 | FromDiscord | <m4ul3r> In reply to @T0lk1en "Wdym": https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation↵ECB is a block cipher, so you would encrypt each block of your data one by one. The library only support 1 block for AES-ECB |
05:14:13 | FromDiscord | <T0lk1en> Do I have to portion out my data into 16 but lengths an encrypt it one by one? |
05:14:33 | FromDiscord | <jtv> Oh my god, if you do that, it's insecure. |
05:14:43 | FromDiscord | <m4ul3r> ecb is insecure yes |
05:14:53 | FromDiscord | <T0lk1en> Wtf what is secure |
05:14:54 | FromDiscord | <jtv> No, ECB mode is just running the block cipher |
05:15:03 | FromDiscord | <jtv> Repeating input, key pairs is insecure |
05:15:08 | FromDiscord | <T0lk1en> It seems every time I ask everything is insecure |
05:15:11 | FromDiscord | <T0lk1en> Rsa |
05:15:12 | FromDiscord | <T0lk1en> AES |
05:15:18 | FromDiscord | <T0lk1en> What IS secure |
05:15:32 | FromDiscord | <Elegantbeef> If you compile from source it runs on arm |
05:15:35 | FromDiscord | <jtv> Right, like I told you, even cryptographers have an incredibly difficult time getting things right. |
05:15:56 | FromDiscord | <T0lk1en> This is fucked I’m writing my own encryption |
05:15:59 | FromDiscord | <jtv> Ahhh, thanks. I figured I'd have to compile the C myself, so that's good to know, will do |
05:16:10 | FromDiscord | <jtv> Yes, rule #1, remember? |
05:16:24 | FromDiscord | <T0lk1en> In reply to @jtv "Yes, rule #1, remember?": Which is? |
05:16:34 | FromDiscord | <jtv> DON'T ROLL YOUR OWN ENCRYPTION |
05:16:38 | FromDiscord | <jtv> You forgot already? 🙂 |
05:16:52 | FromDiscord | <T0lk1en> That’s right |
05:17:45 | FromDiscord | <T0lk1en> Okay here’s 2 questions. What is secure cause y’all got me thinking that encryption just doesn’t exist. #2 what makes something good |
05:17:50 | FromDiscord | <T0lk1en> Encryption wise |
05:18:16 | FromDiscord | <m4ul3r> Looks at the wiki i sent you |
05:18:17 | FromDiscord | <jtv> Well, everything can easily be insecure if you don't use it the way it was intended to be used |
05:18:36 | FromDiscord | <jtv> For password storage, there are a LOT of considerations to doing it right |
05:19:02 | FromDiscord | <jtv> Meaning, I teach a whole 3 hour class and don't scratch the surface on it |
05:19:21 | FromDiscord | <jtv> For most day-to-day stuff, TLS is your best bet. |
05:19:32 | FromDiscord | <m4ul3r> AES-CBC is more secure than AES-ECB, nimAES supports n blocks for AES-CBC |
05:19:37 | FromDiscord | <jtv> Oh my god, no |
05:19:41 | FromDiscord | <T0lk1en> is there a tls nim library? |
05:19:54 | FromDiscord | <jtv> CBC no cryptographer has used for 15+ years, and it was removed from TLS1.3 |
05:20:09 | FromDiscord | <jtv> Just having to pad alone causes problems |
05:20:20 | FromDiscord | <T0lk1en> What’s tls |
05:20:46 | FromDiscord | <jtv> "Transport Layer Security", the protocol that encrypts virtually all encrypted IP-level traffic |
05:20:53 | FromDiscord | <m4ul3r> i didn't say CBC was insecure, just that it's more secure than ECB |
05:21:43 | FromDiscord | <m4ul3r> t0lk1en seems to be working on a project to practice encryption, so i'm just giving them suggests |
05:21:51 | FromDiscord | <T0lk1en> Yerrr |
05:22:17 | FromDiscord | <jtv> Yeah, that'd still be a horrible approach for this problem. |
05:22:17 | FromDiscord | <T0lk1en> Fuck all this noise tho I’m gonna write my own encryption library. |
05:22:20 | FromDiscord | <Rika> I think encryption and security are topics that are not a good idea to self study |
05:22:30 | FromDiscord | <m4ul3r> math is hard |
05:22:36 | FromDiscord | <jtv> Agreed, 1000% which is what I told him before he started the project |
05:22:38 | FromDiscord | <T0lk1en> I’m not. Cyber security major |
05:22:56 | FromDiscord | <Rika> Then what is the course you’re following that makes you write this code? |
05:23:34 | FromDiscord | <T0lk1en> They don’t ig you are right. Just figured I wanna learn more and have a good looking GitHub page |
05:24:07 | FromDiscord | <Rika> Look, sorry that some people here are real aggressive with how they put it |
05:24:22 | FromDiscord | <Rika> But security isn’t easy, it isn’t even just difficult |
05:24:33 | FromDiscord | <jtv> I've still been helping him, just making it clear it's not going to be secure 🙂 |
05:24:44 | FromDiscord | <T0lk1en> Ik it’s not^^^ |
05:25:07 | FromDiscord | <Rika> JTV we know you’re a cryptographer or whatnot but damn can you be a bit more chill |
05:25:09 | FromDiscord | <T0lk1en> I’m on windows rn anyways nothing I do is secure lol |
05:25:14 | FromDiscord | <jtv> Lol |
05:25:24 | FromDiscord | <T0lk1en> lol I think everyone has been chill |
05:25:30 | FromDiscord | <m4ul3r> I think your ECB is a good project to work on. Implement a way to pad your incoming data, then iterate over each block using nimAES to encrypt. Same with decrypting |
05:25:37 | FromDiscord | <T0lk1en> It’s hard to understand tone over text |
05:25:54 | FromDiscord | <jtv> Tolk1en, that library has gcm mode; use that, but make sure you use the version of the API where you store the output PLUS the tag, and check it on decryption |
05:26:07 | FromDiscord | <T0lk1en> In reply to @m4ul3r "I think your ECB": I’m fr gonna write my own encryption library |
05:26:12 | FromDiscord | <jtv> Otherwise you will have problems where the bits can be flipped on you and you won't know it |
05:26:34 | FromDiscord | <Rika> Creating is much harder than using |
05:26:51 | FromDiscord | <m4ul3r> I mean, whatever gets you learning with encryption |
05:26:59 | FromDiscord | <m4ul3r> if that's your end goal |
05:27:03 | FromDiscord | <T0lk1en> Dudes I just realized why the example problem worked. The fucking input was 16 bits holy |
05:27:07 | FromDiscord | <jtv> The nonce is supposed to be a 12 byte random value, which should be the salt for your password. |
05:27:17 | FromDiscord | <T0lk1en> Salt? |
05:27:51 | FromDiscord | <m4ul3r> In reply to @T0lk1en "Dudes I just realized": yes, i said it only worked on one block at a time. It's written with 16 byte blocks (128 bits) |
05:27:59 | FromDiscord | <T0lk1en> I realize now |
05:28:37 | FromDiscord | <m4ul3r> You can implement what I suggested above and encrypt larger data than 1 block at a time |
05:28:39 | FromDiscord | <jtv> Without salt, you're going to be susceptible to precomputed cracking |
05:28:52 | FromDiscord | <T0lk1en> Wdym salt? |
05:28:58 | FromDiscord | <T0lk1en> Like fake data? |
05:28:59 | FromDiscord | <jtv> I just saw you're not using nimcrypto, it's a slightly better library to start with |
05:29:05 | FromDiscord | <T0lk1en> “Salted” over |
05:29:23 | FromDiscord | <T0lk1en> Nim crypto threw errors for me but I’ll give it a look |
05:29:35 | FromDiscord | <jtv> No, it was the state of the art in password management in 1972 |
05:29:43 | FromDiscord | <jtv> But it's the basics. |
05:29:55 | FromDiscord | <jtv> Any article about storing passwords in the world would give you a good intro to salt |
05:29:59 | FromDiscord | <T0lk1en> But also. Why is nothing documented. I have trouble reading code to figure out what something does |
05:30:19 | FromDiscord | <T0lk1en> Like nimAES library |
05:30:37 | FromDiscord | <jtv> That's not a commonly used library. nimcrypto is the one people use most |
05:31:01 | FromDiscord | <m4ul3r> @T0lk1en I recommend checking out https://cryptopals.com/ if you want practice coding crypto stuffs in nim. Start small and work your way up |
05:31:02 | FromDiscord | <T0lk1en> So nimcrypto has docs I can read to know exactly how to use it? |
05:31:37 | FromDiscord | <jtv> I didn't say THAT :). I think it has some docs, but a lot of people here will have used it |
05:32:01 | FromDiscord | <m4ul3r> nimcrypto has examples, here one for ecb https://github.com/cheatfate/nimcrypto/blob/master/examples/ecb.nim |
05:33:11 | FromDiscord | <m4ul3r> nim crypto docs are pretty bare https://cheatfate.github.io/nimcrypto/ |
05:33:48 | FromDiscord | <m4ul3r> nvm, they're fine |
05:35:07 | FromDiscord | <m4ul3r> looking at the examples and docs together would be good |
05:36:21 | FromDiscord | <jtv> Yeah, though there are some things done wrong, like their API doesn't implement the gcm spec properly; the last person here who was using it wasn't actually getting the integrity check on their code because of the way the API is designed ( and I believe the example doesn't get it right either) |
05:37:18 | FromDiscord | <T0lk1en> Gotcha |
05:37:36 | FromDiscord | <T0lk1en> I still think I would be fun to make my own library |
05:38:13 | FromDiscord | <jtv> It would be, sure |
05:42:07 | FromDiscord | <T0lk1en> Here’s a question. If all of our program are compiled to assembly how come some program only work on windows not Linux and some work on ARM but some don’t. |
05:42:11 | * | byanka quit (Read error: Connection reset by peer) |
05:42:31 | FromDiscord | <Elegantbeef> Arm and amd64 are different assembly |
05:42:46 | FromDiscord | <T0lk1en> If it’s all converted to C and assembly can’t any program be compiled for any architecture and OS |
05:43:19 | FromDiscord | <jtv> If the C is portable and the libraries that are dependencies exist on those platforms, then generally |
05:43:44 | FromDiscord | <T0lk1en> Well the dependencies can be converted too correct? |
05:44:11 | FromDiscord | <jtv> Well, sometimes not easily, like if they're heavily dependent on OS-specific functionality |
05:44:19 | FromDiscord | <T0lk1en> Hmm |
05:44:40 | FromDiscord | <T0lk1en> Like the WinGUI library prob would t worn on Linux huh |
05:44:45 | FromDiscord | <T0lk1en> Work |
05:45:57 | FromDiscord | <jtv> Unless you want to install Wine, then some stuff that they emulate would work, etc |
05:50:20 | FromDiscord | <T0lk1en> Got it |
05:50:55 | FromDiscord | <T0lk1en> Ty sm for all your help. It’s prob not fun to answer these easy questions |
05:51:27 | FromDiscord | <jtv> No problem, it's not not fun |
06:02:59 | * | Batzy_ joined #nim |
06:05:43 | * | Batzy quit (Ping timeout: 265 seconds) |
06:06:01 | FromDiscord | <demotomohiro> Executable file formats used in Linux and windows are different (ELF/PE) and how to call functions provided by OS(system calls/win32API) are different.↵If you can somehow unify them, you might be able to create an excutable file that works on both OS as long as same ISA is used. |
06:06:42 | FromDiscord | <jtv> Well, he did specify if you compiled for each platform |
06:07:30 | FromDiscord | <jtv> Cosmopolitan comes closes to unifying modern platforms, but requires a special file handler to be installed on linux |
06:10:49 | * | Batzy_ quit (Ping timeout: 260 seconds) |
06:28:39 | FromDiscord | <ambient> Win32 is probably the best Linux ABI |
06:29:04 | FromDiscord | <ambient> (Use Proton/Wine) |
07:11:47 | * | kenran joined #nim |
07:12:06 | * | ltriant quit (Ping timeout: 272 seconds) |
07:21:12 | FromDiscord | <jos> is there a way to use absolute imports? |
07:21:20 | FromDiscord | <jos> relative to root of src, anyway |
07:27:41 | FromDiscord | <Elegantbeef> For nimble libraries you can technically do \`packageName/subpath/module |
07:28:13 | FromDiscord | <jos> mm |
07:28:16 | FromDiscord | <jos> can i write a macro to do it |
07:28:30 | FromDiscord | <Elegantbeef> Import macros are quite finicky but probably |
08:22:19 | FromDiscord | <Rika> damn that was a very late month post |
08:43:58 | FromDiscord | <willyboar> <@&371760044473319454> link in announcements is broken |
08:44:40 | * | Guest93 joined #nim |
08:45:09 | Guest93 | what is the closest analog to pass in python in Nim? I want to do nothing in certain "of" branches |
08:45:27 | FromDiscord | <pyolyokh> discard |
08:46:54 | FromDiscord | <pyolyokh> that's not called out in <https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers> , but there are mirroring examples that show it |
08:47:13 | FromDiscord | <Gumbercules> In reply to @Guest93 "what is the closest": `discard` |
08:47:51 | FromDiscord | <Gumbercules> whoops I didn't see @pyolyokh's answer |
08:54:03 | FromDiscord | <pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4kSf |
08:54:52 | FromDiscord | <Elegantbeef> `import std/strutils` |
08:54:56 | FromDiscord | <Elegantbeef> sorry `std/strformat` |
08:55:16 | FromDiscord | <pyolyokh> that I get. the errors are in expanding the template. |
08:55:20 | * | koltrast quit (Ping timeout: 272 seconds) |
08:55:42 | * | koltrast joined #nim |
08:55:50 | FromDiscord | <Elegantbeef> Actually you're using a template so you need to use `%` basically |
08:56:01 | FromDiscord | <pyolyokh> an example of an attempt that I came up with after reading the manual is |
08:56:01 | FromDiscord | <pietroppeter> In reply to @Rika "damn that was a": better late than never 🙂 |
08:56:18 | FromDiscord | <pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4kSi |
08:56:22 | FromDiscord | <Elegantbeef> `"$# out of bounds of $# ... $#" % [$n, $l, $h]` |
08:56:29 | FromDiscord | <pyolyokh> but that fails with `Error: type expected, but got symbol 'n' of kind 'param'` |
08:56:37 | FromDiscord | <pietroppeter> In reply to @willyboar "<@&371760044473319454> link in announcements": that's a very weird link indeed, created also a forum thread |
08:57:27 | * | Guest93 quit (Quit: Client closed) |
08:58:43 | FromDiscord | <pyolyokh> the `%` solution works. I just still feel like I'm missing a trick with templates. |
08:59:18 | FromDiscord | <willyboar> In reply to @pietroppeter "that's a very weird": I've seen both. But someone must fix this for the newcomers. |
08:59:26 | FromDiscord | <pyolyokh> but this is weird stuff that has exact expectations about the caller, it makes sense for it not to compose well |
08:59:31 | FromDiscord | <Gumbercules> sent a code paste, see https://play.nim-lang.org/#ix=4kSj |
08:59:43 | FromDiscord | <Elegantbeef> Nope templates are code subsitution so `n`, `l` and `h` do not exist |
09:00:10 | FromDiscord | <Gumbercules> (edit) "https://play.nim-lang.org/#ix=4kSj" => "https://play.nim-lang.org/#ix=4kSk" |
09:01:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kSm |
09:01:47 | FromDiscord | <pyolyokh> In reply to @Gumbercules "what is `ref n`": manual says ... I misread it, and I shouldn't be using ref, but `N = n`. That's why try #8 gets me, trying to get something to work. |
09:02:11 | FromDiscord | <Elegantbeef> The key is `inject` |
09:02:21 | FromDiscord | <Elegantbeef> Symbols inside a template are gensym'd |
09:02:34 | FromDiscord | <Elegantbeef> Which means they're not accessible in any other way except as the symbol name |
09:02:46 | FromDiscord | <Elegantbeef> So you need to tell the compiler "I want this symbol to be inserted verbatim |
09:03:27 | FromDiscord | <Gumbercules> couldn't you mark the template as `dirty` as well? |
09:03:54 | FromDiscord | <Elegantbeef> Correct |
09:03:54 | FromDiscord | <Elegantbeef> I'm just silly and avoid dirty templates |
09:04:05 | FromDiscord | <Gumbercules> clean boi |
09:04:11 | FromDiscord | <pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4kSo |
09:04:33 | FromDiscord | <pyolyokh> so the trick I was missing was `{.inject.}`, just need to be more careful with it. Thanks! |
09:04:41 | FromDiscord | <Elegantbeef> Of course it doesnt |
09:04:42 | FromDiscord | <Elegantbeef> templates replace all usages of their parameters |
09:04:47 | FromDiscord | <Gumbercules> https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates |
09:04:48 | FromDiscord | <Elegantbeef> so if you do `numberBetween("a", 0, 0)` it does `let "a" {.inject.} = "a"` |
09:05:21 | FromDiscord | <pietroppeter> In reply to @willyboar "I've seen both. But": the weird thing is that in the feed.xml https://nim-lang.org/feed.xml the link is correct: https://nim-lang.org//blog/2023/01/11/this-month-with-nim.html maybe some issue on monitorss bot? or is it taking it from somewhere else? |
09:07:35 | FromDiscord | <willyboar> I have no idea. Also #community-events is broken a few days. |
09:07:49 | FromDiscord | <Gumbercules> at least it broke on a good update |
09:07:56 | FromDiscord | <Gumbercules> Qt bindings \o/ |
09:08:01 | FromDiscord | <Gumbercules> I didn't think I'd live to see the day |
09:23:40 | * | PMunch joined #nim |
10:00:33 | * | oddish quit (Quit: nyaa~) |
10:02:26 | FromDiscord | <fbpyr> for `nimble` is there an equivalent to `pip list --outdated` ? |
10:05:32 | FromDiscord | <fbpyr> at first I thought it might be `nimble list --installed --ver` , but that does only seem to show the local version. 🤔 |
10:10:12 | FromDiscord | <pyolyokh> don't believe so. With a localdeps repo you can blow away nimbledeps and run `nimble install -l -d` and then compare versions to see if nimble grabbed newer ones. |
10:14:30 | FromDiscord | <fbpyr> ah I see. thank you @pyolyokh .↵I was pondering over searching a package with --ver and getting the highest version of that to compare vs. installed.↵but maybe `nimble update` followed by a compare via the retrieved packages.json is simpler approach. 🤔 |
10:26:27 | FromDiscord | <fbpyr> ok nope, `packages_official.json` does not have the versions.↵would need to query from each repo then, I guess |
10:30:04 | * | kenran quit (Remote host closed the connection) |
10:31:09 | * | kenran joined #nim |
10:36:05 | * | oddish joined #nim |
10:42:46 | * | ltriant joined #nim |
10:52:13 | * | ltriant quit (Ping timeout: 260 seconds) |
11:05:15 | FromDiscord | <htac> Greetings! I really need some help here as I continue to fail wrapping my head around what might be wrong here on my part: is anyone using Nim 1.6.10 or devel with the C++ backend, VCC (17.4.0+), and STL containers? |
11:05:40 | FromDiscord | <htac> sent a long message, see http://ix.io/4kSP |
11:06:51 | FromDiscord | <htac> oh well, Discord newb here, sorry, how to apply Nim syntax highlighting? |
11:07:19 | FromDiscord | <pyolyokh> \`\`\`nim↵\`\`\` |
11:07:28 | FromDiscord | <htac> Thank you! 😊 |
11:09:02 | FromDiscord | <htac> that's better, thanks! |
11:09:29 | FromDiscord | <htac> I would expect the following output running this program: |
11:09:57 | FromDiscord | <htac> sent a code paste, see https://play.nim-lang.org/#ix=4kSR |
11:10:52 | FromDiscord | <htac> but, iterating over foo the second time in run, ABC becomes garbled, a random memory string |
11:12:08 | FromDiscord | <pyolyokh> what's the /FS flag do? |
11:12:09 | FromDiscord | <htac> any clou why that might be? Iterating over an index always works... |
11:13:43 | FromDiscord | <htac> it shows the same behaviour without it: apparently, VCC's multiprocessor compilation struggles with multiple access to its debug symbol file, /FS regulates access to it. |
11:14:01 | FromDiscord | <htac> In reply to @pyolyokh "what's the /FS flag": it shows the same behaviour without it: apparently, VCC's multiprocessor compilation struggles with multiple access to its debug symbol file, /FS regulates access to it. |
11:14:41 | FromDiscord | <pyolyokh> I'm just trying to replicate what you have on Linux with different flags. With --std=c++14 I get a null pointer dereference on the `s.a = createString("ABC")` |
11:14:58 | * | oprypin joined #nim |
11:15:26 | FromDiscord | <htac> interesting, thanks for trying to replicate it... |
11:17:45 | FromDiscord | <htac> sent a code paste, see https://play.nim-lang.org/#ix=4kSV |
11:17:53 | FromDiscord | <htac> (edit) "https://play.nim-lang.org/#ix=4kSV" => "https://paste.rs/rHz" |
11:18:31 | FromDiscord | <htac> (edit) "https://play.nim-lang.org/#ix=4kSY" => "https://play.nim-lang.org/#ix=4kSX" |
11:18:48 | FromDiscord | <htac> (edit) "https://play.nim-lang.org/#ix=4kSX" => "https://play.nim-lang.org/#ix=4kSZ" |
11:20:08 | FromDiscord | <pyolyokh> yeah. what fixes it is changing `var s: Stuff` to `var s = Stuff()` |
11:20:31 | FromDiscord | <pyolyokh> in `proc run` |
11:21:55 | FromDiscord | <htac> I did try that too, same result for me |
11:22:14 | FromDiscord | <htac> do you always get ABC now? |
11:23:27 | FromDiscord | <pyolyokh> yep, my output is what you expect |
11:23:38 | FromDiscord | <htac> very strange |
11:24:07 | FromDiscord | <htac> you do not have access to MSVC by any chance? 😊 |
11:24:32 | FromDiscord | <htac> as I suspect a problem in regards with the codegen for this compiler... |
11:24:49 | FromDiscord | <pyolyokh> I don't. You have `foo = Vector[Stuff]()` at the toplevel, which differs from `foo: Vector[Stuff]` in `proc run`. How does it work to change proc run to initialize both of them with explicit constructor calls? |
11:25:15 | FromDiscord | <htac> (edit) "in" => "with" | "with" => "to" |
11:26:01 | FromDiscord | <htac> same behaviour, as it should be, since from C++'s side, the default constructor MUST be invoked |
11:26:35 | FromDiscord | <pyolyokh> OK. Well that it matters for Stuff is a bug already on gcc on linux, in my environment. |
11:28:07 | FromDiscord | <pyolyokh> sorry I can't more. My guess is that there are some surprisingly lifetime methods called in the case that you loop over foo's items, instead of looping over indices |
11:28:16 | FromDiscord | <pyolyokh> (edit) "surprisingly" => "surprising" |
11:28:22 | FromDiscord | <pyolyokh> (edit) "sorry I can't ... more." added "help" |
11:28:32 | FromDiscord | <htac> I've also tried these bindings mentioned in the Nim 2 RC post: https://github.com/Clonkk/nim-cppstl |
11:28:33 | FromDiscord | <htac> same trouble |
11:30:07 | FromDiscord | <htac> In reply to @pyolyokh "sorry I can't help": Yes, exactly, I suspect lifetime issues as well. I try to understand the differences between running the code in the implicit main and in run(), but I utterly fail in isolating the cause |
11:31:07 | FromDiscord | <htac> Anyways, thanks a lot for your time and effort! 👍 |
11:31:45 | FromDiscord | <htac> (edit) "cause" => "cause, even in reading the C++ output generated by Nim" |
11:32:19 | FromDiscord | <pyolyokh> toplevel's foo and s aren't created on the stack, but have static locations |
11:38:34 | * | ltriant joined #nim |
11:43:48 | * | ltriant quit (Ping timeout: 272 seconds) |
11:52:38 | FromDiscord | <htac> toplevel's foo and s are statically allocated (globals), yes |
11:52:48 | FromDiscord | <htac> sent a long message, see https://paste.rs/DWY |
11:53:12 | FromDiscord | <htac> (edit) "long message," => "code paste," | "http://ix.io/4kT3" => "https://paste.rs/Dlc" |
11:54:41 | FromDiscord | <htac> Now, the second time I iterate over foo, the first element ABC is garbled, while the second is indeed DEF. Maybe there is something off with the way, the second kind of for loop is set up? |
11:55:05 | FromDiscord | <htac> (edit) "foo," => "foo" | "way," => "way" |
11:55:18 | FromDiscord | <pyolyokh> no, the for loop itself is fine. |
11:55:39 | FromDiscord | <htac> I just don't get it |
11:56:29 | FromDiscord | <pyolyokh> the next thing I'd do is write some C++ classes that announce their lifetime functions, and wrap those in place of std::vector and std::string |
11:57:00 | FromDiscord | <pyolyokh> `printf("string #%d is being copied", id)`, etc. |
11:57:20 | FromDiscord | <htac> yes, good idea, thanks! |
12:03:11 | FromDiscord | <htac> I'll give /fsanitize=address /DEBUG a try first... |
12:08:25 | * | xet7 quit (Quit: Leaving) |
12:08:38 | * | azimut joined #nim |
12:08:44 | * | jjido joined #nim |
12:10:44 | * | cyraxjoe quit (Ping timeout: 255 seconds) |
12:11:04 | * | cyraxjoe joined #nim |
12:13:59 | * | azimut quit (Ping timeout: 255 seconds) |
12:29:25 | * | xet7 joined #nim |
12:30:18 | * | azimut joined #nim |
12:45:11 | FromDiscord | <sOkam!> Is it possible to create a `define` in code? |
12:46:09 | PMunch | sOkam, what do you mean? |
12:46:24 | FromDiscord | <sOkam!> such that when other part of the code does `when defined something: doThing`... it automatically passes as defined without having to add `-d:something` in the compiler |
12:46:27 | PMunch | Like have some condition in your code that triggers eg. -d:ssl? |
12:46:39 | PMunch | Ah, no that's not possible AFAIK |
12:46:50 | PMunch | You can of course do it in a config.nims file |
12:47:17 | PMunch | So you could have e.g. `when defined(windows): <windows specific switches here>` |
12:48:03 | PMunch | Since Nim really only does a single pass over all your sources it would mean that other `when` switches could silently fail and create all sorts of issues |
12:48:04 | FromDiscord | <sOkam!> yeah, but im creating some nimpretty alternative version, and I don't need to specify `-d:nimpretty` because it is assumed in the code that im writing that it will always be active. but the compiler parser needs it to give access to one of the fields |
12:49:48 | FromDiscord | <sOkam!> Here: https://github.com/nim-lang/Nim/blob/b68b28fd2448b15e989b9e8b07e33eee4f9b8822/compiler/parser.nim#L75-L76↵And there are other places in the file where it needs the define |
12:50:28 | * | ltriant joined #nim |
12:50:36 | FromDiscord | <sOkam!> but, as usual, nimsuggest is choking and giving me an error. so wanted to just hardcode it, since my file is not part of the compiler distribution |
12:54:21 | FromDiscord | <sealmove> Hello! Question: Shared field name in object variants. Is it something being considered? Or totally unlikely to change? |
12:55:17 | FromDiscord | <Clonkk> It wasn't mentionned in NIm 2023 roadmap but if you want a definitive answer you should ask in Nim-internal |
12:55:40 | FromDiscord | <sealmove> ok thanks |
12:55:53 | * | ltriant quit (Ping timeout: 260 seconds) |
13:04:39 | FromDiscord | <luteva> Hi! I am searching for a simple example of calling a language server (like @PMunch s nimlsp) using a (terminal) tool like curl or something like this. I want to play around and see the requests and responses in clear text etc.↵Any ideas? any example of how to use curl (or something similar) to call an lsp server? |
13:05:05 | FromDiscord | <arkanoid> @sealmove\: thanks for the updates on binarylang |
13:06:19 | PMunch | @luteva, easiest is probably to have a look at how the log-replay utility does it: https://github.com/PMunch/nimlsp/blob/master/tests/logrunner.nim |
13:07:12 | FromDiscord | <sealmove> In reply to @arkanoid "<@173424250319929344>\: thanks for the": are you still using it? i think i lost you as a binarylang user :p |
13:08:04 | PMunch | Basically if you set your editor to use `nimlsp_debug` instead of the typical `nimlsp` binary it will produce a log that shows all the messages back and forth. Then you can feed such a log-file to that utility and it will start a new nimlsp instance and replay the log. I plan to use this for debugging, people can just record their bug, submit the log, and I can tweak nimlsp until it does the right thing. |
13:08:37 | PMunch | The actual communication is pretty simple, start nimlsp and write commands over stdin to it, then read its stdout to see the reply |
13:10:42 | FromDiscord | <luteva> thx! |
13:14:41 | om3ga | djazz , I found the problem, what causes the code we discussed early to compile |
13:14:57 | om3ga | that function mismatches with the prototype declaration in C header file from the lib |
13:15:10 | om3ga | In header file : LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index); |
13:15:26 | FromDiscord | <arkanoid> Sure, thing! Your lib is processing dozen of messages per second on average on my gps server↵(@sealmove) |
13:15:28 | om3ga | if I comment out it, the lib in nim compiles without any problem. But... absence of prototype affects the result - the lib not loads in the host |
13:15:58 | om3ga | Host reports with expected err: Could not find the LV2 Descriptor in the plugin library |
13:16:14 | om3ga | Directives {.exportc, cdecl.} generate following code: N_LIB_PRIVATE N_CDECL(LV2_Descriptor*, lv2_descriptor)(unsigned int index) what is not the same as prototype: __attribute__ ((visibility ("default"))) const LV2_Descriptor* lv2_descriptor(uint32_t index) |
13:22:55 | FromDiscord | <sealmove> In reply to @arkanoid "Sure, thing! Your lib": wow I am glad it's used in something more than a toy project |
13:36:40 | FromDiscord | <djazz> om3ga: okay, well i dunno |
13:52:43 | * | azimut quit (Remote host closed the connection) |
13:53:16 | * | azimut joined #nim |
13:55:24 | * | kenran quit (Remote host closed the connection) |
13:56:14 | om3ga | djazz: looks like I found solution - {.emit: """ LV2_SYMBOL_EXPORT const lv2_descriptor """.} |
14:02:50 | FromDiscord | <MilaDog> Does Nim have a `pre-commit`? |
14:07:40 | FromDiscord | <leorize> nope |
14:08:07 | FromDiscord | <djazz> In reply to @om3ga "<@81390960805675008>: looks like I": hmm, yeah that should do it |
14:08:23 | FromDiscord | <djazz> codegenDecl might too |
14:09:23 | FromDiscord | <djazz> {.codegenDecl: "LV2_SYMBOL_EXPORT const lv2_descriptor $# $#$#", exportc: "your function".} |
14:09:37 | FromDiscord | <djazz> in the docs it has this example: {.codegenDecl: "interrupt $# $#$#".} |
14:09:39 | om3ga | aha! nice! |
14:09:44 | FromDiscord | <djazz> to generate `interrupt void myinterrupt()` |
14:09:54 | FromDiscord | <djazz> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma |
14:10:01 | FromDiscord | <djazz> bit nicer than emit |
14:10:06 | om3ga | awesome, thanks! |
14:19:30 | FromDiscord | <sealmove> is it possible to have a set of enum values? |
14:20:13 | FromDiscord | <sealmove> sent a code paste, see https://paste.rs/rI2 |
14:30:56 | FromDiscord | <pyolyokh> In reply to @รєคɭ๓๏שє "is it possible to": swap the two definitions |
14:31:38 | FromDiscord | <pyolyokh> devel error: `Error: ordinal type expected; given: Forward` |
14:31:56 | FromDiscord | <pyolyokh> still seems like a bug, but that's at least more suggestive of the workaround |
14:32:06 | FromDiscord | <sealmove> nice, thanks |
14:44:42 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
14:49:46 | * | kenran joined #nim |
14:50:04 | * | kenran quit (Remote host closed the connection) |
14:50:34 | FromDiscord | <arkanoid> You have no idea how neat your design is compared to other DSL-less solution I've tried before↵(@sealmove) |
14:52:02 | * | ltriant joined #nim |
14:52:07 | FromDiscord | <sOkam!> how do you check if a string path is either a folder or a file? |
14:53:22 | FromDiscord | <Gumbercules> isDir |
14:53:29 | FromDiscord | <Gumbercules> Or isFile |
14:53:30 | FromDiscord | <sOkam!> strutils or os? |
14:53:34 | FromDiscord | <Gumbercules> Os |
14:53:51 | FromDiscord | <sOkam!> was searching for that in os and didn't find it. will search better 😔 |
14:53:54 | FromDiscord | <sealmove> In reply to @arkanoid "You have no idea": Ok at least 2 people are still using it actively. This is motivates me sufficiently. I haven't maintained it for 1.5 year, but I guess it's never too late., |
14:54:27 | FromDiscord | <sOkam!> it actually doesn't show in search in the web |
14:54:30 | FromDiscord | <sOkam!> you sure its os? |
14:54:36 | FromDiscord | <Gumbercules> In reply to @sOkam! "was searching for that": Let me find it |
14:55:20 | FromDiscord | <Nilts> In reply to @sOkam! "it actually doesn't show": https://nim-lang.org/docs/os.html#fileExists%2Cstring |
14:55:37 | FromDiscord | <Nilts> https://nim-lang.org/docs/os.html#dirExists%2Cstring |
14:55:45 | FromDiscord | <sOkam!> is that the same thing? |
14:56:47 | FromDiscord | <Gumbercules> Yeah |
14:56:58 | FromDiscord | <sOkam!> i guess it is, and also checks for existance. misleading name, but kindof makes sense |
14:57:00 | FromDiscord | <Nilts> In reply to @sOkam! "is that the same": It checks if the file exists on the system, you would probably have to use a path parsing thing to find out just if it is a dir or not |
14:57:07 | FromDiscord | <Gumbercules> On my phone so I couldn't get there |
14:57:36 | * | ltriant quit (Ping timeout: 272 seconds) |
14:57:46 | FromDiscord | <sOkam!> In reply to @not logged in "It checks if the": in this case, i guess filtering this way could work |
14:57:56 | FromDiscord | <Gumbercules> you can also get a `FileInfo` I believe |
14:57:57 | FromDiscord | <Gumbercules> and check that way |
14:58:05 | FromDiscord | <sOkam!> if the file doesn't exist, just dont add the string to the seq[string] of processing files 🤷♂️ |
14:58:06 | FromDiscord | <Gumbercules> I was getting confused with Odin I guess |
15:10:41 | om3ga | djazz, it worked, only little bit differently I did that.. but, here goes another problem, I printed all the symbols from the dylib |
15:10:45 | om3ga | 00000000000041c8 S _descriptor__correlometer_109 |
15:11:30 | om3ga | and it should be 0000000000000c00 T _lv2_descriptor |
15:13:12 | om3ga | I will try to declare the lv2_descriptor in .emit |
15:14:34 | * | PMunch quit (Quit: Leaving) |
15:21:51 | FromDiscord | <Gumbercules> In reply to @sOkam! "if the file doesn't": just FYI - `fileExists` will also return `true` for symlinks |
15:23:36 | * | ltriant joined #nim |
15:28:28 | * | ltriant quit (Ping timeout: 252 seconds) |
15:32:04 | FromDiscord | <djazz> PMunch: sent you another PR 😂 |
15:32:12 | FromDiscord | <djazz> about enums again |
15:32:17 | FromDiscord | <sealmove> hey @Arkanoid, codegen is now configurable https://github.com/sealmove/binarylang/blob/main/tests/plugins.nim |
15:38:44 | * | Batzy joined #nim |
15:40:15 | * | jmdaemon joined #nim |
15:55:11 | * | ltriant joined #nim |
16:00:18 | * | ltriant quit (Ping timeout: 272 seconds) |
16:00:38 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
16:01:27 | * | jmdaemon joined #nim |
16:08:32 | * | jmdaemon quit (Ping timeout: 272 seconds) |
16:35:52 | * | jmdaemon joined #nim |
16:52:22 | FromDiscord | <sOkam!> How can I turn this: `outFiles = inFiles.mapIt($(outDir.joinPath(it)))`↵Into a loop that only gets the basename+extension of the it file, instead of the full path like it does? |
16:52:39 | FromDiscord | <sOkam!> (edit) "a loop" => "an iterator" |
16:53:04 | FromDiscord | <sOkam!> (edit) "an iterator" => "something" | "does?" => "does now?" |
16:55:05 | * | jmdaemon quit (Ping timeout: 268 seconds) |
16:55:44 | FromDiscord | <Array in ∀ Matrix> is there ∀ nim library for matrix bots/sdk |
17:01:36 | FromDiscord | <sOkam!> vmath ? |
17:14:57 | * | jmdaemon joined #nim |
17:21:36 | * | jmdaemon quit (Ping timeout: 268 seconds) |
17:33:00 | FromDiscord | <Array in ∀ Matrix> no i ment for the matrix protocol lol↵(@sOkam!) |
17:35:02 | FromDiscord | <rakgew> @sOkam! iirc a `splitFie` on the path gives you a tuple like\:↵`(dir, name, ext)` |
17:35:48 | FromDiscord | <rakgew> sry ^^ meant `splitFile` |
17:41:28 | FromDiscord | <deeuu> In reply to @sOkam! "How can I turn": `inFiles.mapIt($(joinPath(outDir, lastPathPart(it))))` |
17:42:16 | FromDiscord | <leetnewb> In reply to @Array in ∀ Matrix "is there ∀ nim": Looks like there is an unfinished one: https://github.com/dylhack/matrix-nim-sdk |
17:45:01 | FromDiscord | <JeysonFlores> Will the Nim language servers still work in Nim 2? |
17:53:24 | FromDiscord | <rakgew> @leetnewb \: seems like that one got forked and continued (?) after being archived \:↵https://github.com/tandy-1000/matrix-nim-sdk |
17:53:24 | FromDiscord | <leetnewb> Good catch! |
17:53:25 | FromDiscord | <auxym> In reply to @JeysonFlores "Will the Nim language": nimlsp is a wrapper around nimsuggest, so it should continue working as-is unless there are major changes to nimsuggest (which are not planned for 2.0,but maybe later, whenever IC comes) |
18:36:37 | FromDiscord | <PMunch> In reply to @auxym "nimlsp is a wrapper": And if something major does happen I'll just update NimLSP |
19:06:41 | * | jjido joined #nim |
19:06:55 | om3ga | djazz: macro .dynlib. does the __attribute__((visibility("default"))) |
19:07:10 | FromDiscord | <djazz> aha |
19:07:21 | om3ga | well, sucessfully compiled the code |
19:07:38 | om3ga | it runs, lv2 audio plugin in nim |
19:07:49 | FromDiscord | <djazz> ayy nice |
19:08:03 | om3ga | correlometer, calculates correlation of phase between 2 inputs |
19:09:00 | om3ga | but it's partially in nim, idk how to avoid using .emit |
19:11:44 | om3ga | the structure of lv2_descriptor should be defined as static const LV2_Descriptor descriptor |
19:14:04 | om3ga | this is what I was unable to translate to nim. const descriptor = LV2_Descriptor(...) not works |
19:15:32 | om3ga | and in case of regular nim default symbol export, the prototype of the lv2_descriptor function should be commented out |
19:16:00 | om3ga | what is not very good, since this is lib code modification |
19:16:38 | om3ga | also plugin "works" but, not really with the real audio data |
19:17:18 | om3ga | I should find the way how to read samples from the buffer provided as void* - data: poiner (in nim) |
19:18:38 | om3ga | I could have ability to read buff as array - var input: ptr float32 |
19:20:43 | om3ga | I tried to use UncheckedArray.. but seems it gets address of buff and tries to calculate the correlation of them |
19:32:34 | * | ltriant joined #nim |
19:37:47 | * | ltriant quit (Ping timeout: 256 seconds) |
19:50:50 | FromDiscord | <Daniel> some1 fix this <@&371760044473319454> https://media.discordapp.net/attachments/371759389889003532/1062820903240597504/image.png |
19:53:12 | om3ga | I was wrong, Untyped array works. haha. nice.. |
19:56:54 | om3ga | plugin really works with audio. performance seems good! And all that without GC |
19:58:45 | FromDiscord | <@thatrandomperson5-6310e3b26da03> How would i turn an xml entity into its unicode repr using xmltree? |
19:58:52 | FromDiscord | <Array in ∀ Matrix> nice il check it out |
20:03:44 | FromDiscord | <sOkam!> sent a code paste, see https://paste.rs/fBy |
20:05:23 | FromDiscord | <sOkam!> (edit) "https://paste.rs/Tv8" => "https://play.nim-lang.org/#ix=4kVC" |
20:50:47 | FromDiscord | <jos> if i do |
20:51:14 | FromDiscord | <jos> sent a code paste, see https://play.nim-lang.org/#ix=4kVK |
20:51:27 | FromDiscord | <jos> with orc, x should always be the same pointer to a heap allocated object right |
20:53:40 | FromDiscord | <jos> or wait, addr x is going to be the address of the pointer itself, right? |
20:54:24 | FromDiscord | <MadScientistCarl> Hello, I just want to ask if there are any good embedded scripting options for Nim |
20:55:19 | FromDiscord | <sOkam!> In reply to @MadScientistCarl "Hello, I just want": I'd argue nim itself counts as a scripting language, because of HotCodeReloading and its python-like syntax |
20:56:16 | FromDiscord | <MadScientistCarl> How to embed it, though |
20:56:30 | FromDiscord | <jos> wasm probably? |
20:56:36 | FromDiscord | <jos> u can also compile to js i guess |
20:56:50 | FromDiscord | <jos> u can also use nimscript |
20:57:14 | FromDiscord | <jos> wasm is probably safer + more portable + more features, but also least developed |
20:57:18 | FromDiscord | <MadScientistCarl> I will be using the C backend |
20:57:35 | FromDiscord | <MadScientistCarl> I mean my main application will be using C backend |
20:57:41 | FromDiscord | <jos> i mean building the "plugins" into wasm modules |
20:57:51 | FromDiscord | <jos> and then embedding a wasm runtime like wasmtime |
20:57:56 | FromDiscord | <jos> i'm not sure if anyone has done this before |
20:58:16 | FromDiscord | <MadScientistCarl> OK, but that might be too complicated a workflow |
20:58:30 | FromDiscord | <MadScientistCarl> Can nimscript VM be embedded directly into a Nim program? |
20:58:36 | FromDiscord | <jos> i think so, yeah |
20:58:36 | FromDiscord | <jos> https://github.com/beef331/nimscripter |
20:58:41 | FromDiscord | <jos> i agree this is probably the lowest effort |
20:58:57 | FromDiscord | <jos> i have no clue what the status of NimScript is |
20:59:06 | FromDiscord | <MadScientistCarl> Surprised this isn't in stdlib 🙂 |
21:10:15 | FromDiscord | <auxym> In reply to @jos "i have no clue": status? nimscript is here to stay, mostly because it is used to evaluate macros |
21:12:59 | FromDiscord | <jos> sure, but it doesn't support a lot of features + doesn't have a lot of pedigree for embedding |
21:13:06 | FromDiscord | <jos> i think it's safe to say "you're on your own" |
21:13:20 | FromDiscord | <MadScientistCarl> Are there anything in stdlib that helps embedding nimscript? |
21:13:21 | FromDiscord | <jos> or at least "it's called _Nim_Script but temper your expectations" |
21:16:17 | FromDiscord | <ShalokShalom> @MadScientistCarl I know you, just not anymore from where |
21:16:21 | FromDiscord | <ShalokShalom> F# or Ruby? |
21:16:43 | FromDiscord | <MadScientistCarl> I am everywhere |
21:16:47 | FromDiscord | <ShalokShalom> Godot |
21:16:52 | FromDiscord | <MadScientistCarl> Probably Ruby, Godot, Rust, eetc... |
21:17:03 | FromDiscord | <ShalokShalom> Welcome 😄 |
21:17:05 | FromDiscord | <MadScientistCarl> (edit) "eetc..." => "etc..." |
21:17:21 | FromDiscord | <MadScientistCarl> Getting my hands on the whole pile of new programming languages |
21:20:46 | FromDiscord | <ShalokShalom> Kotlin is my newest discovery ^^ |
21:21:16 | FromDiscord | <MadScientistCarl> I walked through the LWJGL book using Kotlin |
21:21:25 | FromDiscord | <MadScientistCarl> Kotlin is quite nice too |
21:23:56 | * | ltriant joined #nim |
21:24:03 | FromDiscord | <PMunch> In reply to @Daniel "some1 fix this <@&371760044473319454>": Fix it where? |
21:26:15 | FromDiscord | <Daniel> In reply to @PMunch "Fix it where?": in #announcements |
21:26:25 | * | xet7 quit (Ping timeout: 268 seconds) |
21:26:34 | FromDiscord | <Daniel> In reply to @PMunch "Fix it where?": see this:↵https://discord.com/channels/371759389889003530/711675501722337490/1062647162518913134 |
21:28:44 | FromDiscord | <PMunch> Aha, wasn't even aware we had an announcements channel |
21:29:07 | FromDiscord | <ShalokShalom> In reply to @MadScientistCarl "I walked through the": I am interested, since they seem to be ready with Godot 4, once it is stable |
21:29:15 | FromDiscord | <ShalokShalom> And its one of the few languages doing so |
21:29:27 | FromDiscord | <ShalokShalom> Other than that, we only have GDScript 🤷🏼♂️ |
21:29:49 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
21:29:59 | FromDiscord | <PMunch> Hmm, I apparently can't do much more than delete the message.. Not sure who maintains that bot |
21:30:41 | FromDiscord | <ShalokShalom> Can you edit it? |
21:31:39 | FromDiscord | <MadScientistCarl> What does Kotlin have to do with Godot? |
21:34:22 | * | Lord_Nightmare joined #nim |
21:36:47 | FromDiscord | <PMunch> Nope |
21:37:43 | FromDiscord | <PMunch> Judging by the bots name though I'm pretty sure it just reads the RSS feed for the website |
21:38:13 | FromDiscord | <PMunch> So probably someone messed up the original link there, and once they fixed it it was too late |
21:39:21 | FromDiscord | <ShalokShalom> In reply to @MadScientistCarl "What does Kotlin have": They have their binding almost ready |
21:39:22 | FromDiscord | <ShalokShalom> https://discord.gg/BJx9vJTAd5 |
21:40:39 | FromDiscord | <MadScientistCarl> Um, I am going to use C# if I use Godot |
21:40:43 | FromDiscord | <MadScientistCarl> Or F# |
21:40:51 | FromDiscord | <ShalokShalom> F# would be superb |
21:41:04 | FromDiscord | <ShalokShalom> Sadly, it seems like this is less likely to happen comfortably. |
21:41:08 | FromDiscord | <MadScientistCarl> But this time I am trying to go spartan mode and start from a Vulkan binding of Nim |
21:41:24 | FromDiscord | <ShalokShalom> Vulkan binding? |
21:41:37 | FromDiscord | <MadScientistCarl> Yes |
21:41:39 | FromDiscord | <ShalokShalom> You mean with no dedicated gaming libraries? |
21:41:43 | FromDiscord | <MadScientistCarl> No |
21:41:51 | FromDiscord | <ShalokShalom> But? |
21:42:11 | FromDiscord | <MadScientistCarl> I do too many crazy stuff with graphics pipeline |
21:42:17 | FromDiscord | <MadScientistCarl> A game engine just won't cut it |
21:42:23 | FromDiscord | <ShalokShalom> I see 🙂 |
21:42:30 | FromDiscord | <ShalokShalom> Much fun, then! |
21:42:40 | FromDiscord | <ShalokShalom> Nim has many amazing libraries for this |
21:42:45 | FromDiscord | <MadScientistCarl> So I am sampling a bunch of languages |
21:42:48 | FromDiscord | <ShalokShalom> And Gumber is surely happy to help you 😄 |
21:43:06 | FromDiscord | <MadScientistCarl> I tried plain C, C++, Rust, Kotlin |
21:43:17 | FromDiscord | <MadScientistCarl> I see one Vulkan library |
21:43:21 | FromDiscord | <MadScientistCarl> (in Nim) |
21:43:49 | FromDiscord | <MadScientistCarl> Is it possible to call C without repeating the function definitions by hand? |
21:44:25 | FromDiscord | <Elegantbeef> What? |
21:44:41 | FromDiscord | <Elegantbeef> You mean is it possible to call C without manually making bindings? |
21:45:17 | FromDiscord | <Elegantbeef> https://github.com/PMunch/futhark if so yes |
21:47:06 | FromDiscord | <MadScientistCarl> This is gonna be amazing (or it will blow up my computer) |
21:51:16 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
21:52:46 | * | ehmry joined #nim |
21:59:31 | FromDiscord | <Phil> Futhark is nice, I am however a pansy when it comes to C so I always shied away from using it.↵I don't think I'm as afraid anymore, but trying to make bindings to libwebp still intimidates me because I literally do not comprehend at all how that API is supposed to work |
22:00:26 | FromDiscord | <Elegantbeef> Seems like webp isnt that complex |
22:01:24 | FromDiscord | <Phil> I think I'm just missing a fundamental piece somewhere that should make it click, I don't really have much knowledge of image manipulation in general, other than that the raw form of image data is every pixel being a tuple of RGB data |
22:02:31 | FromDiscord | <Elegantbeef> https://github.com/webmproject/libwebp/blob/main/doc/api.md↵https://github.com/webmproject/libwebp/tree/main/examples |
22:02:37 | FromDiscord | <Elegantbeef> both of those should make life a bit easier |
22:04:40 | FromDiscord | <Elegantbeef> The includes for libwebp only seems to be like 3000 loc with comments |
22:12:22 | * | xet7 joined #nim |
22:14:46 | FromDiscord | <guttural666> can I somehow have that T be either an enum or a seq[string] to loop over and print options? https://media.discordapp.net/attachments/371759389889003532/1062857121370230894/image.png |
22:15:01 | FromDiscord | <Elegantbeef> `T: enum or string` |
22:15:18 | FromDiscord | <Elegantbeef> sorry `seq[string]` |
22:17:13 | FromDiscord | <guttural666> compiler is still mad when I pass this bad boy https://media.discordapp.net/attachments/371759389889003532/1062857739719692339/image.png |
22:17:27 | FromDiscord | <guttural666> type mismatch |
22:19:23 | FromDiscord | <Elegantbeef> Cool now give me the error instead of saying what the compiler said |
22:20:02 | FromDiscord | <guttural666> sent a long message, see http://ix.io/4kW2 |
22:20:54 | FromDiscord | <Elegantbeef> `T: typedesc[enum] or seq[string]` |
22:20:56 | FromDiscord | <Elegantbeef> We did it we read the error message |
22:21:10 | FromDiscord | <Elegantbeef> That sass was uncalled for, but cmon, actually help yourself by giving information instead of making people play blues clues |
22:23:20 | FromDiscord | <guttural666> no problem haha, but same output |
22:24:13 | FromDiscord | <guttural666> I think passing in func_id which is a type func_id = enum is equivalent to the T in proc pls [T: enum]? |
22:25:05 | FromDiscord | <guttural666> required type for list: T: typedesc[enum] or seq[string]↵ but expression 'func_id' is of type: typedesc[func_id] |
22:25:07 | FromDiscord | <guttural666> both times |
22:26:22 | FromDiscord | <guttural666> my goal is to have a generic input that I can iterate over and that should work with values that are either enum types or sequences right |
22:26:24 | FromDiscord | <guttural666> think that makes sense |
22:28:56 | FromDiscord | <Elegantbeef> `T: typedesc[enum] or seq[string]` does not bind how we want |
22:29:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kW6 |
22:29:08 | FromDiscord | <Elegantbeef> So we need to use an implicit generic |
22:30:15 | FromDiscord | <guttural666> In reply to @Elegantbeef "`T: typedesc[enum] or seq[string]`": what do you mean by that? |
22:30:32 | FromDiscord | <scipio> Aloha |
22:30:41 | FromDiscord | <Elegantbeef> I mean `T: typedesc[enum] or seq[string]` is the same as `T: enum or seq[string]` |
22:31:38 | FromDiscord | <Elegantbeef> Anywho just trust the implicit generic works and carry on |
22:31:49 | FromDiscord | <guttural666> In reply to @Elegantbeef "I mean `T: typedesc[enum]": that's what I thought yes |
22:32:38 | FromDiscord | <guttural666> don't get what the difference to my solution is, just syntactic sugar no? |
22:33:12 | FromDiscord | <Elegantbeef> It's supposed to be, but there is some semantic difference to the compiler |
22:36:18 | FromDiscord | <guttural666> that's super confusing |
22:36:48 | FromDiscord | <Elegantbeef> I mean it's a bug |
22:36:58 | FromDiscord | <guttural666> oh okay 😄 |
22:37:28 | FromDiscord | <guttural666> then your sass was indeed uncalled for and I am very upset |
22:37:39 | FromDiscord | <Elegantbeef> Well then sod off |
22:38:05 | FromDiscord | <guttural666> but thanks |
22:38:22 | FromDiscord | <Elegantbeef> The sass was still called for since you didnt give any actual insight |
22:38:41 | FromDiscord | <Elegantbeef> "It no worky, and it say it no worky" is very much the definition of unhelpful |
22:42:23 | FromDiscord | <Elegantbeef> hopefully it's clear i'm joking about it being called for, people just often dont provide enough information and it's like pulling teeth to help |
22:44:39 | * | xet7 quit (Remote host closed the connection) |
22:46:40 | * | xet7 joined #nim |
22:48:27 | FromDiscord | <guttural666> was joking about being upset, I'm not, just thankful that people provide quick help, sorry for not providing a working code sample, didn't think it was relevant, thought I might have missed something fundamental to the languge / stdlib or something |
22:51:26 | FromDiscord | <guzba> i noticed the community-events channel isn't getting updated lately. is this a permanent change or just a temporary thing? |
22:54:27 | FromDiscord | <ShalokShalom> maybe thats related with the broken URL in the last announcement? |
22:54:35 | FromDiscord | <ShalokShalom> very wild guessing |
22:54:59 | FromDiscord | <ShalokShalom> In reply to @MadScientistCarl "This is gonna be": probably both |
22:55:15 | FromDiscord | <ShalokShalom> you could also be interested in Nimskull |
22:55:32 | FromDiscord | <Elegantbeef> Why are you advertising it like it's actively different in that regard |
22:55:47 | FromDiscord | <Elegantbeef> It's not significantly different in C interop presently |
23:10:05 | FromDiscord | <!!sharpcdf!!> can illwill not init and deinit multiple times within a program? |
23:12:40 | FromDiscord | <Elegantbeef> There doesnt seem to be any `once:` inside init |
23:14:49 | FromDiscord | <!!sharpcdf!!> i wonder why my tui doesnt show up after i re init it then |
23:15:10 | FromDiscord | <ambient> sent a code paste, see https://play.nim-lang.org/#ix=4kWd |
23:15:47 | FromDiscord | <ambient> I'm not sure where to search for the documantation for this kind of stuff |
23:15:55 | FromDiscord | <ambient> (my google-fu failed) |
23:18:04 | FromDiscord | <Elegantbeef> I think it's just `s` but remember `s` is not a cstring |
23:18:16 | FromDiscord | <Elegantbeef> Well sorry i mean backticked s |
23:18:39 | FromDiscord | <scipio> https://media.discordapp.net/attachments/371759389889003532/1062873201752944660/image.png |
23:18:44 | FromDiscord | <ambient> In reply to @Elegantbeef "I think it's just": Thanks, that works |
23:19:02 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4kWe |
23:19:20 | FromDiscord | <Elegantbeef> I mean why is that even a template |
23:19:22 | FromDiscord | <scipio> @ElegantBeef if you were to build something like this Cryptowat.ch/ app using Nim, which UI solution would you go for |
23:19:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/XdV |
23:19:38 | FromDiscord | <Elegantbeef> Well you see scipio i'd never make that |
23:20:02 | FromDiscord | <scipio> I was trying to word my question as if you would, but it's actually me |
23:20:05 | FromDiscord | <scipio> 😁 |
23:20:13 | FromDiscord | <Elegantbeef> Dont mistake my 'expertise' as experience |
23:20:33 | FromDiscord | <pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4kWf |
23:20:55 | FromDiscord | <ambient> sent a code paste, see https://play.nim-lang.org/#ix=4kWg |
23:21:19 | FromDiscord | <Elegantbeef> See i personally like owlkettle but i doubt it's as feature complete as you'd need |
23:21:32 | FromDiscord | <Elegantbeef> Same for fidget/nimx |
23:21:42 | FromDiscord | <Elegantbeef> I also dont really write GUI programs |
23:21:57 | FromDiscord | <Elegantbeef> I'm a game developer primarily so that's my main focus |
23:22:02 | FromDiscord | <ambient> Not sure is --gc:arc is actualy doing anything there |
23:22:09 | FromDiscord | <scipio> In reply to @Elegantbeef "Dont mistake my 'expertise'": the JUCE framework on C++, used for audio plugins, also has decent UI capabilities. Would that be somehow usable in NIm? |
23:22:21 | FromDiscord | <Elegantbeef> If you wrapped the C++ library likely |
23:22:33 | FromDiscord | <Nilts> In reply to @Elegantbeef "I mean why is": because nigui sucks at container traversal and because of nim's type system looping does not and will not ever work |
23:22:50 | FromDiscord | <Nilts> (edit) "In reply to @Elegantbeef "I mean why is": because nigui sucks at container traversal and because of nim's type system looping does not and will not ever work ... " added "(in this cse)" |
23:22:55 | FromDiscord | <Nilts> (edit) "cse)" => "case)" |
23:22:57 | FromDiscord | <Elegantbeef> I dont even know what you mean |
23:23:06 | FromDiscord | <Elegantbeef> It being a proc is identical to it being a template except is more proper |
23:23:43 | FromDiscord | <Nilts> In reply to @Elegantbeef "It being a proc": i thought one was compile-time and one was not. Was i mistaken |
23:23:56 | FromDiscord | <Elegantbeef> templates are code subsitution |
23:24:06 | FromDiscord | <Elegantbeef> You're still making a closure procedure regardless |
23:25:45 | FromDiscord | <pyolyokh> In reply to @ambient "Not sure is --gc:arc": there's no allocation, but arc would let you use `=destroy` and the like with new types that you come up with |
23:25:54 | FromDiscord | <pyolyokh> (edit) "allocation," => "allocation in that code," |
23:25:59 | FromDiscord | <Elegantbeef> There is generally no reason to do `--gc:none` |
23:26:42 | FromDiscord | <Elegantbeef> There is no overhead for using arc without using a GC'd type, it allows you to use string/ref and you can as pyolyokh pointed out use hooks |
23:27:20 | FromDiscord | <Phil> I'm getting a weird runtime error that an import from the openssl bindings is failing, I'm not quite sure as to why |
23:27:35 | FromDiscord | <Phil> One sec |
23:28:25 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/I0R |
23:29:44 | FromDiscord | <pyolyokh> `could not import: EVP_MD_size`↵yeah, that doesn't exist |
23:29:55 | FromDiscord | <Phil> But.... one sec |
23:30:20 | FromDiscord | <pyolyokh> ah wait, I checked for that wrong |
23:30:22 | FromDiscord | <Phil> It has in the past |
23:30:30 | FromDiscord | <Phil> That code compiles and works, or worked in the past |
23:30:32 | FromDiscord | <pyolyokh> `proc EVP_MD_size(md: EVP_MD): cint {.lcrypto.}` is indeed there in devel |
23:30:35 | FromDiscord | <Phil> I just copy pasted it into a benchy example |
23:30:56 | FromDiscord | <Phil> Oh yeah, I'm currently on 1.9.1 |
23:31:11 | FromDiscord | <Phil> And I think the code originally was developed under 1.7 something |
23:31:43 | FromDiscord | <pyolyokh> 1.6.10 has got it. You can confirm by grepping for it if it's there or not |
23:32:39 | FromDiscord | <Phil> grep is one of those tools I never learned to deal with. I'm decent generally with the terminal, but I just never learned grep or more complex bash scripting. I basically use sed like once a year for a task I can't do otherwise |
23:37:00 | FromDiscord | <Phil> Also not sure where the openssl binding file is to check it out |
23:37:03 | FromDiscord | <Phil> (edit) "Also not sure where the openssl binding file is to check it out ... " added "with grep" |
23:40:14 | * | ltriant quit (Ping timeout: 268 seconds) |
23:45:16 | FromDiscord | <pyolyokh> it's openssl.nim that you're importing from |
23:45:34 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4kWm |
23:57:29 | FromDiscord | <pyolyokh> sent a code paste, see https://play.nim-lang.org/#ix=4kWt |