<< 10-06-2022 >>

00:00:19FromDiscord<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:36FromDiscord<j-james> cool cool
00:00:40FromDiscord<j-james> kate seems nice so far
00:01:00FromDiscord<j-james> it seems i've been sleeping on a lot of kde apps
00:13:11FromDiscord<Elegantbeef> Yea it's nice
00:17:40FromDiscord<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:11FromDiscord<Elegantbeef> Hey remove that classifier, it's a nice editor! 😛
00:34:26*noeontheend quit (Ping timeout: 244 seconds)
00:34:29FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3ZOe
00:34:35FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3ZOe" => "https://play.nim-lang.org/#ix=3ZOf"
00:34:40FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3ZOf" => "https://play.nim-lang.org/#ix=3ZOg"
00:35:17FromDiscord<Elegantbeef> Overload the macro
00:35:24FromDiscord<Elegantbeef> Macros still have overload semantics
00:35:45FromDiscord<Elegantbeef> otherwise you can do `getType` and `typeKind`
00:36:37FromDiscord<!Patitotective> 🧠
00:36:40FromDiscord<!Patitotective> thanks
00:37:44FromDiscord<Girvo> @ElegantBeef asyncnet will handle UDP no worries? ooooooh
00:37:49FromDiscord<Girvo> I've been doing std/net for now haha
00:39:55FromDiscord<Elegantbeef> I think it works with udp
00:40:01FromDiscord<Girvo> I'll have a play
00:40:01FromDiscord<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:50FromDiscord<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:35FromDiscord<Yardanico> https://forum.nim-lang.org/t/9168
01:27:56FromDiscord<Girvo> Definitely use `choosenim` if you can, makes life a lot easier
01:28:10FromDiscord<Girvo> Speaking of, I need to see if `choosenim` on Windows still has issues with the VSCode extension
01:30:30FromDiscord<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:43FromDiscord<Girvo> (edit) "somewhere" => "via `nimsuggest`"
01:35:29FromDiscord<Yardanico> In reply to @Girvo "Definitely use `choosenim` if": won't help
01:35:46FromDiscord<Yardanico> ubuntu 22.04 only has openssl 3 installed by default which Nim's SSL wrapper doesn't currently support
01:39:27FromDiscord<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:34FromDiscord<Girvo> In reply to @Yardanico "ubuntu 22.04 only has": Ah right, so gotta recompile it or?
01:45:59FromDiscord<Yardanico> install openssl1 manually
01:56:45FromDiscord<Pixtum> In reply to @Girvo "Definitely use `choosenim` if": I need nim to use choose nim....
01:56:49FromDiscord<Pixtum> (edit) "choose nim...." => "choosenim...."
02:04:46FromDiscord<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:56FromDiscord<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:51FromDiscord<treeform> In reply to @Girvo "I'm having a lot": What are you doing with UDP?
04:31:17FromDiscord<Elegantbeef> IOT things iirc
04:38:58FromDiscord<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:33FromDiscord<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:04FromDiscord<treeform> neat
04:41:15FromDiscord<Girvo> On SIMCom SIM7000 modems, also on a firmware written in Nim 🙂
04:41:22FromDiscord<treeform> Never really done sensor or UPD stuff
04:41:30FromDiscord<treeform> (edit) "or UPD" => "udp"
04:42:00FromDiscord<Girvo> its super fun. way different constraints to nearly anything else I've worked on
04:43:40FromDiscord<Girvo> going to be super fun too: I'm implementing CPace passcode-authed key exchange to do encrypted packets later on, too
04:44:14FromDiscord<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:08FromDiscord<Elegantbeef> If security through obscurity isnt your security method you're doing something wrong 😛
04:45:16FromDiscord<Girvo> bro its so bad hahaha
04:45:46FromDiscord<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:02FromDiscord<Rika> Lol
05:19:18FromDiscord<Spectre> i really like the shorthand for cou tup a..b
05:19:29FromDiscord<Spectre> (edit) "cou tup" => "countup"
05:19:43FromDiscord<Spectre> why isnt there one for countdown?
05:20:40FromDiscord<Spectre> it would be nice if .. could be overloaded
05:20:56FromDiscord<Spectre> to support count down
05:21:03FromDiscord<Elegantbeef> You'd need to check if the first is less than the latter so it's generally an iffy case
05:22:10FromDiscord<Elegantbeef> you could always make like `-..`
05:27:29FromDiscord<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:13FromDiscord<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:24FromDiscord<Rika> It’s not like you need to check every time you loop
05:35:55FromDiscord<Elegantbeef> Distracted people shouldnt be allowed to type
05:36:23FromDiscord<Elegantbeef> I think the reason is actually catch bad loops
05:39:33FromDiscord<Rika> How do you determine intent in such a case
05:40:47FromDiscord<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:42FromDiscord<Elegantbeef> But also if you consider `..` as a shortcut to `countUp` then it's "correct"
05:43:29FromDiscord<Elegantbeef> I dont know how you alias `countdown` ergonomically so uhh i'll go be silly
05:44:48FromDiscord<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:15FromDiscord<Rika> No I don’t think it’s a good idea
05:48:39FromDiscord<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:26FromDiscord<ezquerra> What about adding a “step” modifier (defaulting to 1) which could be negative?
06:54:49FromDiscord<ezquerra> For example: 7..0|-1
06:55:02FromDiscord<ezquerra> I think that arraymancer supports that syntax?
06:55:37FromDiscord<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:01FromDiscord<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:38FromDiscord<Elegantbeef> `doThis[myType]()`
07:18:43FromDiscord<Elegantbeef> It's a generic procedure that takes in any object
07:19:55FromDiscord<Xzayler> why isn't it written like `proc doThis(T: Object) : T =`
07:19:59FromDiscord<Xzayler> (edit) "=`" => "=`?"
07:20:21FromDiscord<Elegantbeef> Cause it doesnt take an instance it returns one
07:22:22FromDiscord<Elegantbeef> Or do you mean `T: typedesc[Object]`
07:26:24FromDiscord<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:38Amun-Raare nim strings cow?
07:28:08FromDiscord<Yardanico> with arc/orc actually yes as far as I know
07:28:23FromDiscord<Elegantbeef> Only literals
07:28:45FromDiscord<Elegantbeef> Atleast i think, i could be wrong
07:38:31FromDiscord<xflywind> --nimMainPrefix doesn't seem to work for https://github.com/nim-lang/Nim/issues/15955
07:39:05FromDiscord<Yardanico> there's a different issue about it I think
07:39:18FromDiscord<Yardanico> https://github.com/nim-lang/Nim/issues/19830
07:39:40FromDiscord<xflywind> Yeah, I'm working on #19830
07:45:40FromDiscord<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:45FromDiscord<xflywind> https://media.discordapp.net/attachments/371759389889003532/984725039297495060/unknown.png
07:48:38FromDiscord<Yardanico> very weird, have you tried other examples?
07:49:18FromDiscord<xflywind> Yeah I tried all of the examples.
07:55:38FromDiscord<Yardanico> very weird
08:01:36FromDiscord<treeform> In reply to @Elegantbeef "If security through obscurity": Security by obscurity still security?
08:01:44FromDiscord<Yardanico> In reply to @flywind "Yeah I tried all": idk, maybe we mis-minimized it
08:01:51FromDiscord<Yardanico> it fails with refc + exceptions:goto but works with arc
08:01:53FromDiscord<Yardanico> weird stuff
08:02:05FromDiscord<treeform> (edit) "security?" => "security..."
08:02:14FromDiscord<treeform> (edit) "In reply to @Elegantbeef "If security through obscurity": Security by obscurity ... still" added "is"
08:02:35FromDiscord<Elegantbeef> Disagree but you do you↔(@treeform)
08:03:08FromDiscord<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:51FromDiscord<treeform> In reply to @Elegantbeef "Disagree but you do": Isn't all security by obscurity?
08:04:14FromDiscord<Elegantbeef> No
08:04:49FromDiscord<xflywind> In reply to @Yardanico "it fails with refc": Yeah, the second example failed with refc + exceptions:goto
08:05:43FromDiscord<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:47NimEventerNew Nimble package! pixels - Toy support library for primitive graphics programming., see https://github.com/Araq/pixels
08:08:05FromDiscord<Yardanico> @xflywind can you try https://discord.com/channels/371759389889003530/755344160592101389/981584440411185162 ?
08:08:18FromDiscord<fbpyr> ah -now I found it. 🙂 it was winim\: https://github.com/khchen/winim
08:09:49FromDiscord<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:27FromDiscord<FireLite> How can I create a vtable with nim?
08:21:37FromDiscord<untoreh> get I import/include a file by reading an env var?
08:21:43FromDiscord<untoreh> (edit) "get" => "can"
08:22:54*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz
)
08:23:31FromDiscord<untoreh> dont think so
08:24:32FromDiscord<Yardanico> In reply to @FireLite "How can I create": github.com/yglukhov/iface
08:24:45FromDiscord<Yardanico> (edit) "github.com/yglukhov/iface" => "https://GitHub.com/yglukhov/iface"
08:25:04FromDiscord<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:43FromDiscord<FireLite> In reply to @Yardanico "https://GitHub.com/yglukhov/iface": Can I use this to create dll?
08:26:12FromDiscord<Yardanico> yes, but those vtables won't be compatible with C++ vtables or some other ones
08:26:45FromDiscord<FireLite> Ohhh, I need to create a dll for c++ program.
08:26:51FromDiscord<FireLite> Is there any solution?
08:27:10FromDiscord<Yardanico> https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim
08:27:41FromDiscord<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:29Amun-Rawhich variant would you choose? https://play.nim-lang.org/#ix=3ZPQ
10:46:50FromDiscord<Rika> Range
10:46:58Amun-Rathanks
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:48FromDiscord<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:29FromDiscord<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:05FromDiscord<FireLite> How do I define a static constant? `static const` just refuses to work...
15:41:33FromDiscord<huantian> All consts should be static
15:41:56FromDiscord<huantian> If I’m understanding what static means in this context
15:46:09FromDiscord<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:13FromDiscord<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:53FromDiscord<huantian> Const already has that meaning, the right side has to be known or evaluated at compile-time
15:49:01FromDiscord<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:01FromDiscord<FireLite> Well, `szSignature` is a function parameter defined like `szSignature: string = ""`
15:49:47FromDiscord<huantian> So if you want the function parameter to be known at compile time, use `szSignature: static string`
15:50:21FromDiscord<FireLite> Ok, thanks. I will try this
16:00:07*kenran joined #nim
16:01:25FromDiscord<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:53PMunch@FireLite, a template
16:04:55FromDiscord<dom96> In reply to @FireLite "Also, what is the": https://nim-lang.org/docs/manual.html#templates
16:05:29PMunch`template inrange(x, a, b: untyped): untyped = x >= a and x<= b`
16:06:11FromDiscord<FireLite> Ok, thanks)
16:18:28FromDiscord<capocasa> sent a long message, see http://ix.io/3ZR5
16:18:54FromDiscord<capocasa> (edit) "http://ix.io/3ZR5" => "http://ix.io/3ZR6"
16:19:07FromDiscord<capocasa> (edit) "http://ix.io/3ZR6" => "https://paste.rs/g9a"
16:19:42FromDiscord<capocasa> (edit) "http://ix.io/3ZR8" => "http://ix.io/3ZR7"
16:30:21FromDiscord<NiChrosia> sent a code paste, see https://play.nim-lang.org/#ix=3ZRb
16:31:54FromDiscord<capocasa> In reply to @NiChrosia "is code along the": Oh maybe it is let me check
16:32:04FromDiscord<NiChrosia> it prints 'value'
16:32:18FromDiscord<NiChrosia> not sure if it works cross-module though
16:32:51FromDiscord<NiChrosia> in any case, consider reading https://nim-lang.org/docs/manual.html#templates
16:45:51FromDiscord<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:29FromDiscord<NiChrosia> out of curiosity, what need do you have to use a generic proc cross-module?
16:46:53FromDiscord<NiChrosia> (edit) "a generic" => "an arbitrary"
16:51:31FromDiscord<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:24FromDiscord<NiChrosia> and why doesn't
16:52:36FromDiscord<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:54FromDiscord<NiChrosia> (edit) "and why doesn't" => "sent a code paste, see https://play.nim-lang.org/#ix=3ZRf"
16:53:00FromDiscord<NiChrosia> ah I see
16:54:12FromDiscord<capocasa> sent a code paste, see https://play.nim-lang.org/#ix=3ZRg
16:54:27FromDiscord<NiChrosia> to work generically with a table of any type, yeah
16:55:10FromDiscord<capocasa> Correction: Table or table-like object, including frusion/btreetable or from nimble packages
16:55:19FromDiscord<NiChrosia> sent a code paste, see https://paste.rs/gff
16:55:28FromDiscord<NiChrosia> (edit) "to work generically with" => "sent" | "table of any type, yeah" => "code paste, see https://play.nim-lang.org/#ix=3ZRi"
16:55:29FromDiscord<NiChrosia> ah
16:56:01FromDiscord<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:24FromDiscord<NiChrosia> sent a code paste, see https://paste.rs/dvF
16:57:29FromDiscord<NiChrosia> if there is no `hash` function it doesn't compile
16:57:44FromDiscord<capocasa> Nice. So actually like what you mentioned first
16:57:49FromDiscord<NiChrosia> yeah, templates
16:58:17FromDiscord<capocasa> With the template doing the call. Perfect.
16:58:28FromDiscord<capocasa> Thanks, that was a huge short cut
16:58:52FromDiscord<NiChrosia> np, although you should consider just reading the entire manual at some point
16:59:19FromDiscord<huantian> Reading the entire manual is a bit dull 😛
16:59:22FromDiscord<NiChrosia> aye
16:59:33FromDiscord<huantian> Like there’s like a bunch of pragmas that you’ll never use
16:59:47FromDiscord<NiChrosia> skim over it, then
16:59:50FromDiscord<huantian> Also you might wanna check out concepts, based on the little I read of this convo
17:00:02FromDiscord<capocasa> In reply to @NiChrosia "np, although you should": I did! I just didn't make the connection
17:00:11FromDiscord<NiChrosia> ah, I see
17:00:30FromDiscord<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:25FromDiscord<capocasa> (edit) "tried" => "try"
17:03:54FromDiscord<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:39FromDiscord<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:18FromDiscord<huantian> In reply to @capocasa "Yeah I went for": Heh yea
17:31:39FromDiscord<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:51FromDiscord<Rika> idk if someone said that already but i didnt see anyone say it
17:32:24FromDiscord<Rika> @capocasa i probably should have pinged you for this: ^ it's "better" than a template because you dont lose proc semantics
17:36:06FromDiscord<capocasa> It's easy to get lost in Nim because there's so much cool stuff there, but
17:36:48NimEventerNew 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:09FromDiscord<capocasa> In reply to @Rika "you can just put": Nice!!! I'll look it up!
17:37:22FromDiscord<capocasa> In reply to @Rika "idk if someone said": Nope, no one else did
17:38:02FromDiscord<Rika> mixin means "this symbol isnt defined yet at my point, leave it open for resolution at call sites"
17:38:19FromDiscord<huantian> In reply to @NimEventer "New post on r/nim": Framework like the laptop no way
17:47:01FromDiscord<demotomohiro> In reply to @FireLite "Also, what is the": You can write it as `x in a..b`.
17:47:44FromDiscord<FireLite> In reply to @demotomohiro "You can write it": Wdym?
17:49:54FromDiscord<demotomohiro> `x in a..b` in Nim is same to `x >= a and x <= b`.
17:52:57FromDiscord<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:28FromDiscord<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:22FromDiscord<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:32NimEventerNew thread by Niminem: Help with converting Nim to JS at runtime, see https://forum.nim-lang.org/t/9221
19:21:20NimEventerNew 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:23NimEventerNew 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:11FromDiscord<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:20FromDiscord<demotomohiro> !eval typeof(0..7, typeOfProc)
19:35:24NimBotCompile 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:53FromDiscord<demotomohiro> !eval echo typeof(0..7, typeOfProc)
19:35:58NimBotHSlice[system.int, system.int]
19:36:06FromDiscord<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:34FromDiscord<Alea> so it would be a bit slower than the if
19:50:53FromDiscord<huantian> It should be optimized away by the compiler
19:53:29FromDiscord<demotomohiro> In reply to @Alea "so it would be": https://godbolt.org/z/M3cPsaGda
19:56:16FromDiscord<Alea> In reply to @demotomohiro "https://godbolt.org/z/M3cPsaGda": cool
19:56:18FromDiscord<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:49FromDiscord<FireLite> Is `std/logging` good for logging from dll?
21:09:35*pro quit (Ping timeout: 256 seconds)
21:13:07Amun-Rajust 'const'
21:13:35Amun-Ra(I was way back in my backlog)
21:23:08FromDiscord<golova> In reply to @FireLite "Is `std/logging` good for": Dont you have problems with AllocConsole?
21:23:43FromDiscord<golova> Or, perhaps, you log to the file?
21:25:45*jjido joined #nim
21:29:25*noeontheend joined #nim
21:37:51FromDiscord<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:06FromDiscord<FireLite> And I need a method to do it from dll.
21:47:09*noeontheend quit (Ping timeout: 258 seconds)
21:55:57NimEventerNew thread by Severak: How to have same version of dependencies on two different machines?, see https://forum.nim-lang.org/t/9222
21:59:17FromDiscord<huantian> uhh use nix or something
22:01:45FromDiscord<golova> In reply to @FireLite "I have problems with": So basically you inject DLL?
22:01:56FromDiscord<FireLite> In reply to @golova "So basically you inject": yes
22:02:21FromDiscord<golova> Awesome. Currently working on this as well.
22:02:49FromDiscord<golova> In reply to @FireLite "I have problems with": What kind of block it is? Like anti debug or what?
22:03:50FromDiscord<FireLite> Wdym? App just do not allow to create a console via `AllocConsole` or create pop ups via `MessageBox`.
22:04:06FromDiscord<FireLite> And I need to somehow debug
22:04:16FromDiscord<FireLite> Ig file logging is my only option
22:05:00*noeontheend joined #nim
22:05:12FromDiscord<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:44FromDiscord<Elegantbeef> anticheat? 😄
22:05:52FromDiscord<FireLite> In reply to @golova "I don't understand how": Ig they only allow one window opened. It is a game.
22:05:54FromDiscord<golova> If you already obtained handle to process then....
22:06:11FromDiscord<FireLite> In reply to @Elegantbeef "anticheat? 😄": Anticheat in MINECRAFT!?
22:06:30FromDiscord<FireLite> 😂
22:06:45FromDiscord<golova> DLL injection in JVM? Man...
22:07:06FromDiscord<FireLite> In reply to @golova "DLL injection in JVM?": Nah, not java edition, bedrock edition
22:07:11FromDiscord<FireLite> It is written in c++
22:07:37FromDiscord<golova> Soo then just hook the one windows check idk
22:07:46FromDiscord<golova> (edit) "windows" => "window"
22:08:31FromDiscord<FireLite> So much effort... I need to find the signature which is not easy...
22:08:45FromDiscord<FireLite> So anyways, how do I file log from dll?
22:09:05FromDiscord<golova> writefile
22:09:09FromDiscord<Elegantbeef> Well @huantian i fixed the issue I had though no clue how intelligent it is, so I guess PR time?
22:09:26FromDiscord<huantian> if the tests pass itl's good right?
22:09:29FromDiscord<huantian> 😛
22:10:14FromDiscord<FireLite> In reply to @golova "writefile": Basic but prolly for now ok
22:10:46FromDiscord<FireLite> Also, to import function from another file I should use `import` or `include`?
22:10:54FromDiscord<Elegantbeef> Import
22:11:11FromDiscord<golova> In reply to @FireLite "Basic but prolly for": Or try to use winapi
22:12:44FromDiscord<FireLite> In reply to @golova "Or try to use": Not sure there is logging feature
22:13:00FromDiscord<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:52FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZSu
22:15:53FromDiscord<sOkam!> (edit) "https://paste.rs/sjM" => "https://play.nim-lang.org/#ix=3ZSv"
22:16:22FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZSv" => "https://play.nim-lang.org/#ix=3ZSw"
22:16:32FromDiscord<Elegantbeef> You add `path`
22:16:35FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=3ZSw" => "https://play.nim-lang.org/#ix=3ZSx"
22:16:59FromDiscord<sOkam!> yeah but those are system wide, aren't they?
22:17:50FromDiscord<Elegantbeef> No clue
22:18:18*PMunch quit (Quit: leaving)
22:18:27*xet7 quit (Remote host closed the connection)
22:18:45FromDiscord<sOkam!> was gonna ping PMunch, but there are two ids đŸ‘€â†”which one is the real one?
22:19:03FromDiscord<Elegantbeef> Neither he's asleep
22:19:25FromDiscord<sOkam!> ?
22:19:36*PMunch joined #nim
22:19:42FromDiscord<Elegantbeef> He uses irc mainly
22:20:03FromDiscord<sOkam!> Ah i see. so a ping wouldn't do anything then?
22:20:28FromDiscord<Elegantbeef> I mean he might check it
22:22:51FromDiscord<Elegantbeef> Shit he just responded in offtopic so i'm wrong
22:22:52FromDiscord<Elegantbeef> He's alive
22:23:20*noeontheend quit (Ping timeout: 248 seconds)
22:23:37FromDiscord<sOkam!> PMunch, send help đŸ„ș
22:24:02PMunchHuh?
22:24:20FromDiscord<Elegantbeef> They're wrapping .c files with futhark
22:24:34PMunch.c files?
22:24:38PMunch.h files I hope
22:24:41FromDiscord<sOkam!> This file:↔https://github.com/ec-/Quake3e/blob/master/code/unix/unix_main.c
22:24:43FromDiscord<Elegantbeef> Still on their quest of shoehorning Nim into a C game
22:24:49FromDiscord<sOkam!> it starts with a ton of std headers
22:25:01PMunchAnd?
22:25:01FromDiscord<Elegantbeef> Nope they want to use Nim with that quake engine for some god unknown reason
22:25:11PMunchOh right
22:25:19FromDiscord<sOkam!> that I don't know if I should wrap those or ignore
22:25:24PMunchI mean sometimes the question isn't why, but rather why not :P
22:25:41PMunchI assume you are trying to port unix_main.c?
22:25:49PMunchInto unix_main.nim
22:25:57FromDiscord<sOkam!> yes, so i can wrap all local headers with futhark
22:26:04FromDiscord<sOkam!> and start from there
22:26:45FromDiscord<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:29PMunchWell 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:05FromDiscord<huantian> In reply to @Elegantbeef "Well huan i added": why clear?
22:30:38FromDiscord<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:01FromDiscord<Elegantbeef> What do you mean "why"↔(@huantian)
22:31:25FromDiscord<huantian> I mean what does clear mean lol
22:31:29FromDiscord<Elegantbeef> Sometimes you want unexpanded AST
22:31:30PMunchsOkam, well you don't really have to inspect them..
22:31:53FromDiscord<Elegantbeef> I mean it'd make it so your code shows expanded ast instead of unexpanded ast
22:32:01FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3ZSB
22:32:15FromDiscord<huantian> oh I see↔yeah that seems good
22:32:39FromDiscord<Elegantbeef> `expandedFrom` is the name i gave the source PNode
22:33:34FromDiscord<Elegantbeef> It's nice to see things like `discard await doThing()` appear in compiler errors
22:33:50FromDiscord<huantian> instead of a bunch of gensym-ed code
22:34:40FromDiscord<Elegantbeef> Instead of non verbatim code 😛
22:38:07PMunchsOkam, well assuming you've added the paths correctly you just do "stdio.h" in the importc black
22:38:09PMunchblock*
22:44:14*krux02 quit (Remote host closed the connection)
22:45:02*krux02 joined #nim
22:46:54PMunchHmm, interesting
22:47:01PMunchSome old code I wrote just doesn't work any longer
22:47:35PMunchI 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:22PMunchWorst part is, I don't remember whether it worked or not when I left it..
22:52:57FromDiscord<Elegantbeef> Assume it didnt and fire past you
23:04:02PMunchPast me should learn how to document his stuff..
23:04:23FromDiscord<Elegantbeef> Documentation smockumentation
23:07:28PMunchThe worst part is that it is able to communicate with the device
23:07:38PMunchBut it seems to report all 0's..
23:13:17PMunchAha, it was a poorly implemented swapping procedure
23:13:36FromDiscord<Elegantbeef> This is why `swap` exists 😛
23:15:22PMunchI was using swapEndian32
23:42:38*jmdaemon joined #nim
23:46:05FromDiscord<Luckayla> I make a point to document everything as I write it
23:46:22FromDiscord<Luckayla> And write tests as I go, these days
23:46:32FromDiscord<Luckayla> It leads to far slower development
23:46:39FromDiscord<Luckayla> But way better experience
23:47:02FromDiscord<Luckayla> Especially since my with schedule means I have to drop programming for long periods of time without notice
23:47:46FromDiscord<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)