00:00:19 | FromDiscord | <Elegantbeef> Did want to try that new lsp to see if it works a bit better, but couldnt get kate to like it |
00:00:36 | FromDiscord | <j-james> cool cool |
00:00:40 | FromDiscord | <j-james> kate seems nice so far |
00:01:00 | FromDiscord | <j-james> it seems i've been sleeping on a lot of kde apps |
00:13:11 | FromDiscord | <Elegantbeef> Yea it's nice |
00:17:40 | FromDiscord | <Luckayla> Kate is really nice for a built-in editor |
00:17:54 | * | toluene quit (Ping timeout: 244 seconds) |
00:23:20 | * | genpaku joined #nim |
00:31:11 | FromDiscord | <Elegantbeef> Hey remove that classifier, it's a nice editor! đ |
00:34:26 | * | noeontheend quit (Ping timeout: 244 seconds) |
00:34:29 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZOe |
00:34:35 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3ZOe" => "https://play.nim-lang.org/#ix=3ZOf" |
00:34:40 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3ZOf" => "https://play.nim-lang.org/#ix=3ZOg" |
00:35:17 | FromDiscord | <Elegantbeef> Overload the macro |
00:35:24 | FromDiscord | <Elegantbeef> Macros still have overload semantics |
00:35:45 | FromDiscord | <Elegantbeef> otherwise you can do `getType` and `typeKind` |
00:36:37 | FromDiscord | <!Patitotective> đ§ |
00:36:40 | FromDiscord | <!Patitotective> thanks |
00:37:44 | FromDiscord | <Girvo> @ElegantBeef asyncnet will handle UDP no worries? ooooooh |
00:37:49 | FromDiscord | <Girvo> I've been doing std/net for now haha |
00:39:55 | FromDiscord | <Elegantbeef> I think it works with udp |
00:40:01 | FromDiscord | <Girvo> I'll have a play |
00:40:01 | FromDiscord | <Elegantbeef> IIRC i was using it for my editor |
00:43:07 | * | vicfred quit (Quit: Leaving) |
00:44:11 | * | toluene joined #nim |
01:02:31 | * | xet7 joined #nim |
01:26:50 | FromDiscord | <Pixtum> It seems the nim package for ubuntu doesn't exist anymore, manually installing though when I try to run `nimble` I get the error `could not import: SSL_get_peer_certificate` |
01:27:35 | FromDiscord | <Yardanico> https://forum.nim-lang.org/t/9168 |
01:27:56 | FromDiscord | <Girvo> Definitely use `choosenim` if you can, makes life a lot easier |
01:28:10 | FromDiscord | <Girvo> Speaking of, I need to see if `choosenim` on Windows still has issues with the VSCode extension |
01:30:30 | FromDiscord | <Girvo> Nope, but it looks like we've narrowed down the issue: something with `msys` on windows, `choosenim` and how it sets path, and the `saem` extension relying on it somewhere |
01:30:43 | FromDiscord | <Girvo> (edit) "somewhere" => "via `nimsuggest`" |
01:35:29 | FromDiscord | <Yardanico> In reply to @Girvo "Definitely use `choosenim` if": won't help |
01:35:46 | FromDiscord | <Yardanico> ubuntu 22.04 only has openssl 3 installed by default which Nim's SSL wrapper doesn't currently support |
01:39:27 | FromDiscord | <ajusa> In reply to @dom96 "Can you repro with": Yes, opened an issue! Might be an httpbeast problem, though it did work under Prologue. Forcing asynchttpserver in Jester works as well though... |
01:44:34 | FromDiscord | <Girvo> In reply to @Yardanico "ubuntu 22.04 only has": Ah right, so gotta recompile it or? |
01:45:59 | FromDiscord | <Yardanico> install openssl1 manually |
01:56:45 | FromDiscord | <Pixtum> In reply to @Girvo "Definitely use `choosenim` if": I need nim to use choose nim.... |
01:56:49 | FromDiscord | <Pixtum> (edit) "choose nim...." => "choosenim...." |
02:04:46 | FromDiscord | <Girvo> Well you need nim compiled binaries to work yeah đ as Yardanico said, install the openssl1 and `choosenim` should now work nicely. You don't need a working nim install to use choosenim though -- we use it to bootstrap brand new developer machines here at work |
02:04:56 | FromDiscord | <Girvo> Unless of course you want to compile it! |
03:09:40 | * | arkurious quit (Quit: Leaving) |
04:16:45 | * | rockcavera quit (Remote host closed the connection) |
04:30:51 | FromDiscord | <treeform> In reply to @Girvo "I'm having a lot": What are you doing with UDP? |
04:31:17 | FromDiscord | <Elegantbeef> IOT things iirc |
04:38:58 | FromDiscord | <Girvo> In reply to @treeform "What are you doing": Very weird IoT comms đ small sensor packets across LTE Cat-M1 but also in some other super weird places |
04:39:33 | FromDiscord | <Girvo> It might not stay as UDP in the future, but for now it's easier for us to sling bytes across the network with it, and we don't need a lot of the guarantees that TCP gives us |
04:41:04 | FromDiscord | <treeform> neat |
04:41:15 | FromDiscord | <Girvo> On SIMCom SIM7000 modems, also on a firmware written in Nim đ |
04:41:22 | FromDiscord | <treeform> Never really done sensor or UPD stuff |
04:41:30 | FromDiscord | <treeform> (edit) "or UPD" => "udp" |
04:42:00 | FromDiscord | <Girvo> its super fun. way different constraints to nearly anything else I've worked on |
04:43:40 | FromDiscord | <Girvo> going to be super fun too: I'm implementing CPace passcode-authed key exchange to do encrypted packets later on, too |
04:44:14 | FromDiscord | <Girvo> Which most IoT platforms... er... do not do lol. At least in the industrial area, where we work in. It's all just yeeted over the net in the clear đ |
04:45:08 | FromDiscord | <Elegantbeef> If security through obscurity isnt your security method you're doing something wrong đ |
04:45:16 | FromDiscord | <Girvo> bro its so bad hahaha |
04:45:46 | FromDiscord | <Girvo> like the reason our platform exists is our parent company went to license stuff, but then found out how cooked all our now-competitors are |
04:47:02 | FromDiscord | <Rika> Lol |
05:19:18 | FromDiscord | <Spectre> i really like the shorthand for cou tup a..b |
05:19:29 | FromDiscord | <Spectre> (edit) "cou tup" => "countup" |
05:19:43 | FromDiscord | <Spectre> why isnt there one for countdown? |
05:20:40 | FromDiscord | <Spectre> it would be nice if .. could be overloaded |
05:20:56 | FromDiscord | <Spectre> to support count down |
05:21:03 | FromDiscord | <Elegantbeef> You'd need to check if the first is less than the latter so it's generally an iffy case |
05:22:10 | FromDiscord | <Elegantbeef> you could always make like `-..` |
05:27:29 | FromDiscord | <Elegantbeef> You could make a `..` that takes `static int` for both, but otherwise yea most people dont need backwards iterators i'd argue ymmv |
05:28:13 | FromDiscord | <Rika> In reply to @Elegantbeef "You'd need to check": So what? Itâs a single check at the instantiating of the iterator or the start of the loop |
05:28:24 | FromDiscord | <Rika> Itâs not like you need to check every time you loop |
05:35:55 | FromDiscord | <Elegantbeef> Distracted people shouldnt be allowed to type |
05:36:23 | FromDiscord | <Elegantbeef> I think the reason is actually catch bad loops |
05:39:33 | FromDiscord | <Rika> How do you determine intent in such a case |
05:40:47 | FromDiscord | <Elegantbeef> I just assume it's not due to ill intent and then in that case it makes sense that you'd disallow `..` working on bad loops |
05:41:42 | FromDiscord | <Elegantbeef> But also if you consider `..` as a shortcut to `countUp` then it's "correct" |
05:43:29 | FromDiscord | <Elegantbeef> I dont know how you alias `countdown` ergonomically so uhh i'll go be silly |
05:44:48 | FromDiscord | <Elegantbeef> I guess `>..` and `<..` could be used hmmm `0>..<10` seems ok |
05:44:58 | * | Guest40 joined #nim |
05:45:46 | * | TUNTAN joined #nim |
05:46:55 | * | Guest40 quit (Client Quit) |
05:48:15 | FromDiscord | <Rika> No I donât think itâs a good idea |
05:48:39 | FromDiscord | <Rika> It would be confused with exclusive start (sure doesnât exist, but itâs the same idea as exclusive end) |
06:34:55 | * | jjido joined #nim |
06:54:26 | FromDiscord | <ezquerra> What about adding a âstepâ modifier (defaulting to 1) which could be negative? |
06:54:49 | FromDiscord | <ezquerra> For example: 7..0|-1 |
06:55:02 | FromDiscord | <ezquerra> I think that arraymancer supports that syntax? |
06:55:37 | FromDiscord | <ezquerra> This is the way that Python and Matlab support counting down by the way (although with a colon based syntax) |
06:58:10 | * | PMunch joined #nim |
07:18:01 | FromDiscord | <Xzayler> `proc doThis[T: Object](): T =`â”How is this function supposed to be called? why're the normal brackets empty and the argument's in square brackets? |
07:18:38 | FromDiscord | <Elegantbeef> `doThis[myType]()` |
07:18:43 | FromDiscord | <Elegantbeef> It's a generic procedure that takes in any object |
07:19:55 | FromDiscord | <Xzayler> why isn't it written like `proc doThis(T: Object) : T =` |
07:19:59 | FromDiscord | <Xzayler> (edit) "=`" => "=`?" |
07:20:21 | FromDiscord | <Elegantbeef> Cause it doesnt take an instance it returns one |
07:22:22 | FromDiscord | <Elegantbeef> Or do you mean `T: typedesc[Object]` |
07:26:24 | FromDiscord | <Xzayler> well it's this func actually, the one we talked about in #gamedev â”`proc gdnew[T: NimGodotObject](): T =`â”and it's giving me a type mismatch when I doâ”`gdnew Directory` because I'm giving it `type Directory` instead of what it's asking for. So I wanted to understand what exactly it's asking for when it has the square brackets. |
07:27:38 | Amun-Ra | are nim strings cow? |
07:28:08 | FromDiscord | <Yardanico> with arc/orc actually yes as far as I know |
07:28:23 | FromDiscord | <Elegantbeef> Only literals |
07:28:45 | FromDiscord | <Elegantbeef> Atleast i think, i could be wrong |
07:38:31 | FromDiscord | <xflywind> --nimMainPrefix doesn't seem to work for https://github.com/nim-lang/Nim/issues/15955 |
07:39:05 | FromDiscord | <Yardanico> there's a different issue about it I think |
07:39:18 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/issues/19830 |
07:39:40 | FromDiscord | <xflywind> Yeah, I'm working on #19830 |
07:45:40 | FromDiscord | <xflywind> @Yardanico I cannot reproduce https://github.com/nim-lang/Nim/issues/19857 on windows and wsl2(latest devel or 1.6), is there something I miss? |
07:45:45 | FromDiscord | <xflywind> https://media.discordapp.net/attachments/371759389889003532/984725039297495060/unknown.png |
07:48:38 | FromDiscord | <Yardanico> very weird, have you tried other examples? |
07:49:18 | FromDiscord | <xflywind> Yeah I tried all of the examples. |
07:55:38 | FromDiscord | <Yardanico> very weird |
08:01:36 | FromDiscord | <treeform> In reply to @Elegantbeef "If security through obscurity": Security by obscurity still security? |
08:01:44 | FromDiscord | <Yardanico> In reply to @flywind "Yeah I tried all": idk, maybe we mis-minimized it |
08:01:51 | FromDiscord | <Yardanico> it fails with refc + exceptions:goto but works with arc |
08:01:53 | FromDiscord | <Yardanico> weird stuff |
08:02:05 | FromDiscord | <treeform> (edit) "security?" => "security..." |
08:02:14 | FromDiscord | <treeform> (edit) "In reply to @Elegantbeef "If security through obscurity": Security by obscurity ... still" added "is" |
08:02:35 | FromDiscord | <Elegantbeef> Disagree but you do youâ”(@treeform) |
08:03:08 | FromDiscord | <fbpyr> there is a nim lib to access .net dlls on win10, right? â”or do I remember this incorrectly? đ€ â”I was not able to remember its name or find it on the awesome list.. |
08:03:51 | FromDiscord | <treeform> In reply to @Elegantbeef "Disagree but you do": Isn't all security by obscurity? |
08:04:14 | FromDiscord | <Elegantbeef> No |
08:04:49 | FromDiscord | <xflywind> In reply to @Yardanico "it fails with refc": Yeah, the second example failed with refc + exceptions:goto |
08:05:43 | FromDiscord | <xflywind> (edit) "In reply to @Yardanico "it fails with refc": Yeah, the second example failed with refc + exceptions:goto ... " added "and the third example," |
08:06:47 | NimEventer | New Nimble package! pixels - Toy support library for primitive graphics programming., see https://github.com/Araq/pixels |
08:08:05 | FromDiscord | <Yardanico> @xflywind can you try https://discord.com/channels/371759389889003530/755344160592101389/981584440411185162 ? |
08:08:18 | FromDiscord | <fbpyr> ah -now I found it. đ it was winim\: https://github.com/khchen/winim |
08:09:49 | FromDiscord | <xflywind> In reply to @Yardanico "<@658563905425244160> can you try": thanks, it doesn't work with arc or gotoexception. |
08:19:14 | * | jmdaemon quit (Ping timeout: 255 seconds) |
08:20:27 | FromDiscord | <FireLite> How can I create a vtable with nim? |
08:21:37 | FromDiscord | <untoreh> get I import/include a file by reading an env var? |
08:21:43 | FromDiscord | <untoreh> (edit) "get" => "can" |
08:22:54 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
08:23:31 | FromDiscord | <untoreh> dont think so |
08:24:32 | FromDiscord | <Yardanico> In reply to @FireLite "How can I create": github.com/yglukhov/iface |
08:24:45 | FromDiscord | <Yardanico> (edit) "github.com/yglukhov/iface" => "https://GitHub.com/yglukhov/iface" |
08:25:04 | FromDiscord | <Yardanico> In reply to @untoreh "can I import/include a": You can if you read it at compile time, but using defines will be easier IMO |
08:25:43 | FromDiscord | <FireLite> In reply to @Yardanico "https://GitHub.com/yglukhov/iface": Can I use this to create dll? |
08:26:12 | FromDiscord | <Yardanico> yes, but those vtables won't be compatible with C++ vtables or some other ones |
08:26:45 | FromDiscord | <FireLite> Ohhh, I need to create a dll for c++ program. |
08:26:51 | FromDiscord | <FireLite> Is there any solution? |
08:27:10 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim |
08:27:41 | FromDiscord | <FireLite> Thanks |
08:28:59 | * | vicecea quit (Remote host closed the connection) |
08:29:31 | * | vicecea joined #nim |
08:51:49 | * | Goodbye_Vincent quit (Quit: Ping timeout (120 seconds)) |
08:54:27 | * | Goodbye_Vincent joined #nim |
09:16:16 | * | jjido joined #nim |
10:03:04 | * | om3ga quit (Ping timeout: 248 seconds) |
10:43:29 | Amun-Ra | which variant would you choose? https://play.nim-lang.org/#ix=3ZPQ |
10:46:50 | FromDiscord | <Rika> Range |
10:46:58 | Amun-Ra | thanks |
13:09:56 | * | om3ga joined #nim |
13:18:07 | * | arkurious joined #nim |
14:07:02 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
14:08:35 | * | rockcavera joined #nim |
14:08:35 | * | rockcavera quit (Changing host) |
14:08:35 | * | rockcavera joined #nim |
14:24:15 | * | xet7 quit (Remote host closed the connection) |
14:25:55 | * | xet7 joined #nim |
14:33:40 | * | vicfred joined #nim |
14:39:56 | * | krux02 joined #nim |
14:40:48 | FromDiscord | <jmgomez> In reply to @Yardanico "https://github.com/nim-lang/Nim/wiki/Playing-with-C": Looks cool, cant that use case be accomplish by defining animal as concept though? |
15:15:15 | * | fowl quit (Read error: Connection reset by peer) |
15:17:25 | * | fowl joined #nim |
15:35:29 | FromDiscord | <dom96> wish there was a way to easily run a piece of code in all threads, without one it makes logging.setLogFilter a little unusable |
15:41:05 | FromDiscord | <FireLite> How do I define a static constant? `static const` just refuses to work... |
15:41:33 | FromDiscord | <huantian> All consts should be static |
15:41:56 | FromDiscord | <huantian> If Iâm understanding what static means in this context |
15:46:09 | FromDiscord | <FireLite> In reply to @huantian "All consts should be": They are not.â”`static const pattern = szSignature` gives error `cannot evaluate at compile time`.â”`static` keyword should solve the problem (at least in c++ it works, so I need help with nim :) ) |
15:47:13 | FromDiscord | <huantian> Iâm nim static is usually used in things like parameters and genetics to notate the parameter should be known at compile time |
15:47:53 | FromDiscord | <huantian> Const already has that meaning, the right side has to be known or evaluated at compile-time |
15:49:01 | FromDiscord | <huantian> If you would want szSignatire to be evaluated at compile time and immutable, just use constâ”If you want it to be evaluated at runtime and immutable, use let |
15:49:01 | FromDiscord | <FireLite> Well, `szSignature` is a function parameter defined like `szSignature: string = ""` |
15:49:47 | FromDiscord | <huantian> So if you want the function parameter to be known at compile time, use `szSignature: static string` |
15:50:21 | FromDiscord | <FireLite> Ok, thanks. I will try this |
16:00:07 | * | kenran joined #nim |
16:01:25 | FromDiscord | <FireLite> Also, what is the nim alternative for c++ `#define` thing? Need to translate this `#define INRANGE(x, a, b) (x >= a && x <= b)`. |
16:01:53 | * | TUNTAN quit (Ping timeout: 256 seconds) |
16:04:53 | PMunch | @FireLite, a template |
16:04:55 | FromDiscord | <dom96> In reply to @FireLite "Also, what is the": https://nim-lang.org/docs/manual.html#templates |
16:05:29 | PMunch | `template inrange(x, a, b: untyped): untyped = x >= a and x<= b` |
16:06:11 | FromDiscord | <FireLite> Ok, thanks) |
16:18:28 | FromDiscord | <capocasa> sent a long message, see http://ix.io/3ZR5 |
16:18:54 | FromDiscord | <capocasa> (edit) "http://ix.io/3ZR5" => "http://ix.io/3ZR6" |
16:19:07 | FromDiscord | <capocasa> (edit) "http://ix.io/3ZR6" => "https://paste.rs/g9a" |
16:19:42 | FromDiscord | <capocasa> (edit) "http://ix.io/3ZR8" => "http://ix.io/3ZR7" |
16:30:21 | FromDiscord | <NiChrosia> sent a code paste, see https://play.nim-lang.org/#ix=3ZRb |
16:31:54 | FromDiscord | <capocasa> In reply to @NiChrosia "is code along the": Oh maybe it is let me check |
16:32:04 | FromDiscord | <NiChrosia> it prints 'value' |
16:32:18 | FromDiscord | <NiChrosia> not sure if it works cross-module though |
16:32:51 | FromDiscord | <NiChrosia> in any case, consider reading https://nim-lang.org/docs/manual.html#templates |
16:45:51 | FromDiscord | <capocasa> In reply to @NiChrosia "not sure if it": it's conceivable it might, which is a lot better than what I have! |
16:46:29 | FromDiscord | <NiChrosia> out of curiosity, what need do you have to use a generic proc cross-module? |
16:46:53 | FromDiscord | <NiChrosia> (edit) "a generic" => "an arbitrary" |
16:51:31 | FromDiscord | <capocasa> I have a module I want to publish that operates on several tables. I thought there is no need to limit it to one kind of table.â”â”But then there |
16:52:24 | FromDiscord | <NiChrosia> and why doesn't |
16:52:36 | FromDiscord | <capocasa> (edit) "I have" => "sent" | "module I want to publish that operates on several tables. I thought there is no need to limit it to one kind of table.â”â”But then there" => "long message, see https://paste.rs/isK" |
16:52:54 | FromDiscord | <NiChrosia> (edit) "and why doesn't" => "sent a code paste, see https://play.nim-lang.org/#ix=3ZRf" |
16:53:00 | FromDiscord | <NiChrosia> ah I see |
16:54:12 | FromDiscord | <capocasa> sent a code paste, see https://play.nim-lang.org/#ix=3ZRg |
16:54:27 | FromDiscord | <NiChrosia> to work generically with a table of any type, yeah |
16:55:10 | FromDiscord | <capocasa> Correction: Table or table-like object, including frusion/btreetable or from nimble packages |
16:55:19 | FromDiscord | <NiChrosia> sent a code paste, see https://paste.rs/gff |
16:55:28 | FromDiscord | <NiChrosia> (edit) "to work generically with" => "sent" | "table of any type, yeah" => "code paste, see https://play.nim-lang.org/#ix=3ZRi" |
16:55:29 | FromDiscord | <NiChrosia> ah |
16:56:01 | FromDiscord | <capocasa> In reply to @NiChrosia "to work generically with": Yeah that would limit it to known tables. But what I liked so much about the table implementation itself is that you can use anything as a key, as long as you implement your own hash function. But I can't figure out how it was done. |
16:57:24 | FromDiscord | <NiChrosia> sent a code paste, see https://paste.rs/dvF |
16:57:29 | FromDiscord | <NiChrosia> if there is no `hash` function it doesn't compile |
16:57:44 | FromDiscord | <capocasa> Nice. So actually like what you mentioned first |
16:57:49 | FromDiscord | <NiChrosia> yeah, templates |
16:58:17 | FromDiscord | <capocasa> With the template doing the call. Perfect. |
16:58:28 | FromDiscord | <capocasa> Thanks, that was a huge short cut |
16:58:52 | FromDiscord | <NiChrosia> np, although you should consider just reading the entire manual at some point |
16:59:19 | FromDiscord | <huantian> Reading the entire manual is a bit dull đ |
16:59:22 | FromDiscord | <NiChrosia> aye |
16:59:33 | FromDiscord | <huantian> Like thereâs like a bunch of pragmas that youâll never use |
16:59:47 | FromDiscord | <NiChrosia> skim over it, then |
16:59:50 | FromDiscord | <huantian> Also you might wanna check out concepts, based on the little I read of this convo |
17:00:02 | FromDiscord | <capocasa> In reply to @NiChrosia "np, although you should": I did! I just didn't make the connection |
17:00:11 | FromDiscord | <NiChrosia> ah, I see |
17:00:30 | FromDiscord | <capocasa> In reply to @huantian "Also you might wanna": I did! I tried quite a few times to wrap my head around them |
17:01:22 | * | pro joined #nim |
17:02:25 | FromDiscord | <capocasa> (edit) "tried" => "try" |
17:03:54 | FromDiscord | <capocasa> In reply to @huantian "Like thereâs like a": Yeah I went for a lot of advanced stuff for a while just to have tried it but I found it's good to just stick to types and procs until you feel an itch if you just want to get things done. Here I felt an itch. |
17:05:39 | FromDiscord | <capocasa> In reply to @NiChrosia "ah, I see": Or to be more precise, I jumped to conclusions and assumed that this would have to be have done only with generics, so I didn't look at templates |
17:06:18 | FromDiscord | <huantian> In reply to @capocasa "Yeah I went for": Heh yea |
17:31:39 | FromDiscord | <Rika> In reply to @capocasa "Is there a way": you can just put `mixin bar` before the echo in foo (but within the body) |
17:31:51 | FromDiscord | <Rika> idk if someone said that already but i didnt see anyone say it |
17:32:24 | FromDiscord | <Rika> @capocasa i probably should have pinged you for this: ^ it's "better" than a template because you dont lose proc semantics |
17:36:06 | FromDiscord | <capocasa> It's easy to get lost in Nim because there's so much cool stuff there, but |
17:36:48 | NimEventer | New post on r/nim by infoatone: What Is NIM Programming Language? Know Its Frameworks, see https://reddit.com/r/nim/comments/v9d2iv/what_is_nim_programming_language_know_its/ |
17:37:09 | FromDiscord | <capocasa> In reply to @Rika "you can just put": Nice!!! I'll look it up! |
17:37:22 | FromDiscord | <capocasa> In reply to @Rika "idk if someone said": Nope, no one else did |
17:38:02 | FromDiscord | <Rika> mixin means "this symbol isnt defined yet at my point, leave it open for resolution at call sites" |
17:38:19 | FromDiscord | <huantian> In reply to @NimEventer "New post on r/nim": Framework like the laptop no way |
17:47:01 | FromDiscord | <demotomohiro> In reply to @FireLite "Also, what is the": You can write it as `x in a..b`. |
17:47:44 | FromDiscord | <FireLite> In reply to @demotomohiro "You can write it": Wdym? |
17:49:54 | FromDiscord | <demotomohiro> `x in a..b` in Nim is same to `x >= a and x <= b`. |
17:52:57 | FromDiscord | <demotomohiro> See also:â”https://nim-lang.org/docs/system.html#..,sinkT,sinkUâ”https://nim-lang.org/docs/system.html#in.t,untyped,untypedâ”https://nim-lang.org/docs/system.html#contains,HSlice%5BU,V%5D,W |
17:57:28 | FromDiscord | <capocasa> In reply to @Rika "mixin means "this symbol": Aw that's awesome, that's purpose built for what I needed. |
18:58:53 | * | kenran quit (Ping timeout: 258 seconds) |
18:59:38 | * | kenran joined #nim |
19:11:22 | FromDiscord | <Alea> In reply to @demotomohiro "`x in a..b` in": Doesn't x in have to build a range, whereas option 2 doesn't? |
19:13:32 | NimEventer | New thread by Niminem: Help with converting Nim to JS at runtime, see https://forum.nim-lang.org/t/9221 |
19:21:20 | NimEventer | New post on r/nim by BeyondExistenz: Best Web Scraping Library for Nim?, see https://reddit.com/r/nim/comments/v9fcnd/best_web_scraping_library_for_nim/ |
19:33:23 | NimEventer | New post on r/nim by hc0re: Is there a possibility to use iterator with while?, see https://reddit.com/r/nim/comments/v9fkm1/is_there_a_possibility_to_use_iterator_with_while/ |
19:35:11 | FromDiscord | <demotomohiro> In reply to @Alea "Doesn't x in have": `..` operator in `x in a..b` creates `HSlice`:â”https://nim-lang.org/docs/system.html#..,sinkT,sinkU |
19:35:20 | FromDiscord | <demotomohiro> !eval typeof(0..7, typeOfProc) |
19:35:24 | NimBot | Compile failed: /usercode/in.nim(1, 7) Error: expression 'typeof(0 .. 7)' is of type 'typedesc[HSlice[system.int, system.int]]' and has to be used (or discarded) |
19:35:53 | FromDiscord | <demotomohiro> !eval echo typeof(0..7, typeOfProc) |
19:35:58 | NimBot | HSlice[system.int, system.int] |
19:36:06 | FromDiscord | <demotomohiro> `in` operator in `x in a..b` calls `contains` procâ”https://nim-lang.org/docs/system.html#in.t,untyped,untypedâ”https://nim-lang.org/docs/system.html#contains,HSlice%5BU,V%5D,W |
19:39:19 | * | kenran quit (Quit: WeeChat info:version) |
19:41:34 | FromDiscord | <Alea> so it would be a bit slower than the if |
19:50:53 | FromDiscord | <huantian> It should be optimized away by the compiler |
19:53:29 | FromDiscord | <demotomohiro> In reply to @Alea "so it would be": https://godbolt.org/z/M3cPsaGda |
19:56:16 | FromDiscord | <Alea> In reply to @demotomohiro "https://godbolt.org/z/M3cPsaGda": cool |
19:56:18 | FromDiscord | <Alea> Thanks! |
20:04:59 | * | vicfred quit (Ping timeout: 256 seconds) |
20:20:32 | * | wallabra quit (Ping timeout: 260 seconds) |
20:24:14 | * | wallabra joined #nim |
21:00:49 | FromDiscord | <FireLite> Is `std/logging` good for logging from dll? |
21:09:35 | * | pro quit (Ping timeout: 256 seconds) |
21:13:07 | Amun-Ra | just 'const' |
21:13:35 | Amun-Ra | (I was way back in my backlog) |
21:23:08 | FromDiscord | <golova> In reply to @FireLite "Is `std/logging` good for": Dont you have problems with AllocConsole? |
21:23:43 | FromDiscord | <golova> Or, perhaps, you log to the file? |
21:25:45 | * | jjido joined #nim |
21:29:25 | * | noeontheend joined #nim |
21:37:51 | FromDiscord | <FireLite> In reply to @golova "Dont you have problems": I have problems with console. I am making dll for an app which blocks console and pop up messages. So I have to log to the file. |
21:38:06 | FromDiscord | <FireLite> And I need a method to do it from dll. |
21:47:09 | * | noeontheend quit (Ping timeout: 258 seconds) |
21:55:57 | NimEventer | New thread by Severak: How to have same version of dependencies on two different machines?, see https://forum.nim-lang.org/t/9222 |
21:59:17 | FromDiscord | <huantian> uhh use nix or something |
22:01:45 | FromDiscord | <golova> In reply to @FireLite "I have problems with": So basically you inject DLL? |
22:01:56 | FromDiscord | <FireLite> In reply to @golova "So basically you inject": yes |
22:02:21 | FromDiscord | <golova> Awesome. Currently working on this as well. |
22:02:49 | FromDiscord | <golova> In reply to @FireLite "I have problems with": What kind of block it is? Like anti debug or what? |
22:03:50 | FromDiscord | <FireLite> Wdym? App just do not allow to create a console via `AllocConsole` or create pop ups via `MessageBox`. |
22:04:06 | FromDiscord | <FireLite> And I need to somehow debug |
22:04:16 | FromDiscord | <FireLite> Ig file logging is my only option |
22:05:00 | * | noeontheend joined #nim |
22:05:12 | FromDiscord | <golova> In reply to @FireLite "Wdym? App just do": I don't understand how app could forbid LoadLibrary and GetProcAddress in injected thread. |
22:05:44 | FromDiscord | <Elegantbeef> anticheat? đ |
22:05:52 | FromDiscord | <FireLite> In reply to @golova "I don't understand how": Ig they only allow one window opened. It is a game. |
22:05:54 | FromDiscord | <golova> If you already obtained handle to process then.... |
22:06:11 | FromDiscord | <FireLite> In reply to @Elegantbeef "anticheat? đ": Anticheat in MINECRAFT!? |
22:06:30 | FromDiscord | <FireLite> đ |
22:06:45 | FromDiscord | <golova> DLL injection in JVM? Man... |
22:07:06 | FromDiscord | <FireLite> In reply to @golova "DLL injection in JVM?": Nah, not java edition, bedrock edition |
22:07:11 | FromDiscord | <FireLite> It is written in c++ |
22:07:37 | FromDiscord | <golova> Soo then just hook the one windows check idk |
22:07:46 | FromDiscord | <golova> (edit) "windows" => "window" |
22:08:31 | FromDiscord | <FireLite> So much effort... I need to find the signature which is not easy... |
22:08:45 | FromDiscord | <FireLite> So anyways, how do I file log from dll? |
22:09:05 | FromDiscord | <golova> writefile |
22:09:09 | FromDiscord | <Elegantbeef> Well @huantian i fixed the issue I had though no clue how intelligent it is, so I guess PR time? |
22:09:26 | FromDiscord | <huantian> if the tests pass itl's good right? |
22:09:29 | FromDiscord | <huantian> đ |
22:10:14 | FromDiscord | <FireLite> In reply to @golova "writefile": Basic but prolly for now ok |
22:10:46 | FromDiscord | <FireLite> Also, to import function from another file I should use `import` or `include`? |
22:10:54 | FromDiscord | <Elegantbeef> Import |
22:11:11 | FromDiscord | <golova> In reply to @FireLite "Basic but prolly for": Or try to use winapi |
22:12:44 | FromDiscord | <FireLite> In reply to @golova "Or try to use": Not sure there is logging feature |
22:13:00 | FromDiscord | <Elegantbeef> Well huan i added a nice `expandedFrom=` property to solve the issue, no clue if it's actually beneficial or if it should be `clearExpandedFrom` |
22:14:52 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZSu |
22:15:53 | FromDiscord | <sOkam!> (edit) "https://paste.rs/sjM" => "https://play.nim-lang.org/#ix=3ZSv" |
22:16:22 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZSv" => "https://play.nim-lang.org/#ix=3ZSw" |
22:16:32 | FromDiscord | <Elegantbeef> You add `path` |
22:16:35 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZSw" => "https://play.nim-lang.org/#ix=3ZSx" |
22:16:59 | FromDiscord | <sOkam!> yeah but those are system wide, aren't they? |
22:17:50 | FromDiscord | <Elegantbeef> No clue |
22:18:18 | * | PMunch quit (Quit: leaving) |
22:18:27 | * | xet7 quit (Remote host closed the connection) |
22:18:45 | FromDiscord | <sOkam!> was gonna ping PMunch, but there are two ids đâ”which one is the real one? |
22:19:03 | FromDiscord | <Elegantbeef> Neither he's asleep |
22:19:25 | FromDiscord | <sOkam!> ? |
22:19:36 | * | PMunch joined #nim |
22:19:42 | FromDiscord | <Elegantbeef> He uses irc mainly |
22:20:03 | FromDiscord | <sOkam!> Ah i see. so a ping wouldn't do anything then? |
22:20:28 | FromDiscord | <Elegantbeef> I mean he might check it |
22:22:51 | FromDiscord | <Elegantbeef> Shit he just responded in offtopic so i'm wrong |
22:22:52 | FromDiscord | <Elegantbeef> He's alive |
22:23:20 | * | noeontheend quit (Ping timeout: 248 seconds) |
22:23:37 | FromDiscord | <sOkam!> PMunch, send help đ„ș |
22:24:02 | PMunch | Huh? |
22:24:20 | FromDiscord | <Elegantbeef> They're wrapping .c files with futhark |
22:24:34 | PMunch | .c files? |
22:24:38 | PMunch | .h files I hope |
22:24:41 | FromDiscord | <sOkam!> This file:â”https://github.com/ec-/Quake3e/blob/master/code/unix/unix_main.c |
22:24:43 | FromDiscord | <Elegantbeef> Still on their quest of shoehorning Nim into a C game |
22:24:49 | FromDiscord | <sOkam!> it starts with a ton of std headers |
22:25:01 | PMunch | And? |
22:25:01 | FromDiscord | <Elegantbeef> Nope they want to use Nim with that quake engine for some god unknown reason |
22:25:11 | PMunch | Oh right |
22:25:19 | FromDiscord | <sOkam!> that I don't know if I should wrap those or ignore |
22:25:24 | PMunch | I mean sometimes the question isn't why, but rather why not :P |
22:25:41 | PMunch | I assume you are trying to port unix_main.c? |
22:25:49 | PMunch | Into unix_main.nim |
22:25:57 | FromDiscord | <sOkam!> yes, so i can wrap all local headers with futhark |
22:26:04 | FromDiscord | <sOkam!> and start from there |
22:26:45 | FromDiscord | <sOkam!> i understand i will need to translate the file from .c to .nim, but dunno what to do with the std headers |
22:27:29 | PMunch | Well if you need them, tell Futhark to wrap them for you. But if they offer the same functionality that a Nim library does then use that instead |
22:30:05 | FromDiscord | <huantian> In reply to @Elegantbeef "Well huan i added": why clear? |
22:30:38 | FromDiscord | <sOkam!> In reply to @PMunch "Well if you need": So will need to inspect each one by one? damn, thats a lot of work even to put a foot in the door â°ïžâ”will do, thxâ”How would I wrap them, when they are in a system folder? |
22:31:01 | FromDiscord | <Elegantbeef> What do you mean "why"â”(@huantian) |
22:31:25 | FromDiscord | <huantian> I mean what does clear mean lol |
22:31:29 | FromDiscord | <Elegantbeef> Sometimes you want unexpanded AST |
22:31:30 | PMunch | sOkam, well you don't really have to inspect them.. |
22:31:53 | FromDiscord | <Elegantbeef> I mean it'd make it so your code shows expanded ast instead of unexpanded ast |
22:32:01 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZSB |
22:32:15 | FromDiscord | <huantian> oh I seeâ”yeah that seems good |
22:32:39 | FromDiscord | <Elegantbeef> `expandedFrom` is the name i gave the source PNode |
22:33:34 | FromDiscord | <Elegantbeef> It's nice to see things like `discard await doThing()` appear in compiler errors |
22:33:50 | FromDiscord | <huantian> instead of a bunch of gensym-ed code |
22:34:40 | FromDiscord | <Elegantbeef> Instead of non verbatim code đ |
22:38:07 | PMunch | sOkam, well assuming you've added the paths correctly you just do "stdio.h" in the importc black |
22:38:09 | PMunch | block* |
22:44:14 | * | krux02 quit (Remote host closed the connection) |
22:45:02 | * | krux02 joined #nim |
22:46:54 | PMunch | Hmm, interesting |
22:47:01 | PMunch | Some old code I wrote just doesn't work any longer |
22:47:35 | PMunch | I had written a small library to interface with an ePaper display, but now it's not able to read out the size of the display any longer.. |
22:48:22 | PMunch | Worst part is, I don't remember whether it worked or not when I left it.. |
22:52:57 | FromDiscord | <Elegantbeef> Assume it didnt and fire past you |
23:04:02 | PMunch | Past me should learn how to document his stuff.. |
23:04:23 | FromDiscord | <Elegantbeef> Documentation smockumentation |
23:07:28 | PMunch | The worst part is that it is able to communicate with the device |
23:07:38 | PMunch | But it seems to report all 0's.. |
23:13:17 | PMunch | Aha, it was a poorly implemented swapping procedure |
23:13:36 | FromDiscord | <Elegantbeef> This is why `swap` exists đ |
23:15:22 | PMunch | I was using swapEndian32 |
23:42:38 | * | jmdaemon joined #nim |
23:46:05 | FromDiscord | <Luckayla> I make a point to document everything as I write it |
23:46:22 | FromDiscord | <Luckayla> And write tests as I go, these days |
23:46:32 | FromDiscord | <Luckayla> It leads to far slower development |
23:46:39 | FromDiscord | <Luckayla> But way better experience |
23:47:02 | FromDiscord | <Luckayla> Especially since my with schedule means I have to drop programming for long periods of time without notice |
23:47:46 | FromDiscord | <Luckayla> Getting back into code 6 months after working on a project that has very little test coverage and little to no or poor documentation is not a fun time |
23:48:16 | * | PMunch quit (Quit: leaving) |