<< 29-09-2023 >>

00:00:23FromDiscord<odexine> You’d be typing nodes differently in Nim I assume
00:00:27FromDiscord<Elegantbeef> I mean I don't know the issue
00:00:38*krux02 quit (Remote host closed the connection)
00:00:47FromDiscord<my.narco> In reply to @Elegantbeef "I mean I don't": the fact that left recursion is basically impossible because each node is a different ype
00:00:48FromDiscord<my.narco> type
00:01:00FromDiscord<my.narco> and i will need to reassign a expr node to a binop node
00:01:06FromDiscord<odexine> I assume he wouldn’t know why that’s an issue as well
00:01:29FromDiscord<my.narco> In reply to @odexine "I assume he wouldn’t": well its obviously due to typing because you cant assign an already typed variable to a different type
00:01:41FromDiscord<my.narco> is there any way i can work arround this in nim?
00:01:45FromDiscord<Elegantbeef> You just use a tagged union
00:01:52FromDiscord<Elegantbeef> Or object variant in Nim's case
00:01:57FromDiscord<odexine> You wouldn’t use types in this case for here in Nim yes
00:02:15FromDiscord<my.narco> In reply to @odexine "You wouldn’t use types": what would i use?
00:02:27FromDiscord<odexine> In reply to @Elegantbeef "You just use a": What he just said lol
00:02:34FromDiscord<my.narco> oh my bad
00:02:42FromDiscord<Elegantbeef> You don't even need to use Nim here
00:02:52FromDiscord<Elegantbeef> You can just use Odin's built in union typesx
00:02:55FromDiscord<Elegantbeef> types\
00:03:09FromDiscord<odexine> I can imagine it would need a lot of rework though
00:03:15FromDiscord<Elegantbeef> You AST in Odin should be pretty much the union of all types
00:03:18FromDiscord<Elegantbeef> Your\
00:03:22FromDiscord<odexine> I didn’t take a peek at your code aside from the image
00:03:50FromDiscord<my.narco> im so stupid.
00:04:20FromDiscord<my.narco> i really need a rubber duck
00:04:25FromDiscord<odexine> Foresight would be a nice superpower to have
00:04:29FromDiscord<my.narco> yeah.
00:04:31FromDiscord<Elegantbeef> Eh it happens
00:04:41FromDiscord<Elegantbeef> Rewrite it in Nim though now that you're here 😛
00:04:48FromDiscord<odexine> Lol
00:04:57FromDiscord<my.narco> ive been tempted to due to how much more mature it is
00:05:12FromDiscord<Elegantbeef> Like I said it also seems to be faster right now
00:05:19FromDiscord<Elegantbeef> Atleast in my fractal tree example
00:05:35FromDiscord<my.narco> yeah, i feel like it would be worth it, but i also wrote a vm for my language in odin, which i would need to rewrite
00:05:38FromDiscord<my.narco> cant be that hard though i guess
00:05:54FromDiscord<odexine> Well
00:06:00FromDiscord<Elegantbeef> Just change the VM to use bytecode if not and use it as a system library until your there
00:06:02FromDiscord<odexine> At least trial it
00:06:16FromDiscord<my.narco> In reply to @Elegantbeef "Just change the VM": it is infact a bytecode vm
00:06:22FromDiscord<Elegantbeef> Well they're using Odin, Nim is Odin but more friendly imo
00:06:42FromDiscord<my.narco> i would rather rewrite it sooner than later
00:07:22FromDiscord<my.narco> ill rewrite the vm in nim and see how that goes first
00:08:37FromDiscord<Elegantbeef> I was in the Odin discord when someone asked about a way to safely convert Union types to other Union types invariantly and gingerbill's response denying it kinda put a lid on any interest I had in Oddin
00:08:39FromDiscord<Elegantbeef> Odin\
00:08:57FromDiscord<my.narco> ah i understand
00:09:04FromDiscord<my.narco> who is the owner of nim?
00:09:19FromDiscord<Elegantbeef> Such a simple and nice feature to be able to convert a `{u32, f32}` to `{f32, u32, SomeOtherType}` was denied and there is no way of doing it in the language cause it's purposely simple
00:09:21FromDiscord<Elegantbeef> Araq
00:09:47FromDiscord<Elegantbeef> I don't mind the denying in the case it can be done in user space, but it cannot be
00:09:54FromDiscord<my.narco> ah ok
00:12:03FromDiscord<Elegantbeef> Though I do think that Odin's simplicity does make it so it's tooling is better
00:12:30FromDiscord<my.narco> tbh i have never worked with nim before but i think it looks cool for what im trying to do
00:12:55FromDiscord<Elegantbeef> Well it's also a pascal inspired language indirectly, it just has more bells and whistles
00:13:06FromDiscord<Elegantbeef> So a lot of what you do in Odin(barring the union type) is just there
00:13:25FromDiscord<Elegantbeef> Leorize has a nice union library which works like Odin's union type though
00:13:36FromDiscord<Elegantbeef> https://github.com/alaviss/union
00:13:44FromDiscord<my.narco> is there a good library for parsing flags?
00:14:01FromDiscord<Elegantbeef> there is `std/parseopt` which can be used relatively easily
00:14:07FromDiscord<my.narco> ah ok
00:14:08FromDiscord<Elegantbeef> There are many non stdlib arg parsing libraries
00:14:30FromDiscord<my.narco> see with odin im not really used to using third party libs outside of "vendor"
00:14:46FromDiscord<Elegantbeef> Well Odin doesnt have a package manager so yea
00:14:49FromDiscord<my.narco> even though it limits what i can use, the bindings in there usually work very well
00:14:52FromDiscord<my.narco> In reply to @Elegantbeef "Well Odin doesnt have": what is nims?
00:14:53FromDiscord<Elegantbeef> Gingerbill is against package managers anyway
00:15:03FromDiscord<Elegantbeef> There is Nimble, it mostly works, but it has issues
00:15:13FromDiscord<Elegantbeef> Nimph also exists, as does atlas
00:15:21FromDiscord<Elegantbeef> The latter is not really a package manager but more of a workspace manager
00:15:39FromDiscord<Elegantbeef> Point is though there is a usable way of consuming other packages aside from using git submodules
00:15:48FromDiscord<my.narco> wha tis the most widely used and mature one?
00:16:01FromDiscord<Elegantbeef> Nimble is the official one
00:16:04FromDiscord<Elegantbeef> Atlas is also official tooling
00:16:21FromDiscord<Elegantbeef> It's newer and not really a package manager but can be used for reproducible build and a more stable environment
00:16:40FromDiscord<Elegantbeef> It's more like python's venv from my understanding of python
00:16:48FromDiscord<my.narco> ah ok
00:16:59FromDiscord<my.narco> ill just use nimble considering its alreayd packaged with nim from whati can see
00:17:05FromDiscord<Elegantbeef> Each project(s) can share a workspace of deps and they're tagged so it's got a lockfile fore free
00:17:13FromDiscord<Elegantbeef> Yea Nimble often is more than enough
00:18:00FromDiscord<my.narco> alright thanks for the help
00:18:07FromDiscord<Elegantbeef> As simple as adding a `requires "package >= 1.0.0"` and you're off to the races
00:19:20FromDiscord<Elegantbeef> and if you want a 1\:1 comparisonhttps://play.nim-lang.org/#ix=4HHs↵https://play.nim-lang.org/#ix=4H9b
00:20:09FromDiscord<Elegantbeef> Both implement the same logic and the Nim version is twice as fast
00:20:15FromDiscord<Elegantbeef> Atleast on my machine
00:22:52FromDiscord<my.narco> wow
00:23:00FromDiscord<my.narco> i kinda realyl like now nim look
00:23:01FromDiscord<my.narco> looks
00:46:13FromDiscord<jviega> Or just refactor your grammar to be right recursive instead of left recursive
00:46:40FromDiscord<jviega> Whoops I'm late to that party.
00:46:42FromDiscord<jviega> lol
01:14:54termerNPM got packaging right
01:15:14termerNimble feels like Go's package manager
01:16:17FromDiscord<jviega> Go's package manager on crack cocaine maybe
01:26:27FromDiscord<Elegantbeef> To be fair doing `import "giturl"` is very cracky
01:29:43FromDiscord<jviega> I'm not saying that the go package manager never hits the crack pipe!
01:30:08FromDiscord<jviega> But it's not as crack addled by any means
01:33:06FromDiscord<Elegantbeef> I mean Nimble is crack adjacent due to implementation
01:33:12FromDiscord<Elegantbeef> Go is crack usage by design
01:36:05FromDiscord<my.narco> is there any way i can use C-like enums?"
01:38:36FromDiscord<my.narco> nice one
01:38:37FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HHz
01:40:24FromDiscord<my.narco> i fixed
01:41:13FromDiscord<Elegantbeef> Stop using `include` 😛
01:41:21FromDiscord<my.narco> import is better?
01:41:25FromDiscord<Elegantbeef> Yes
01:41:29FromDiscord<Elegantbeef> Import properly uses modules
01:41:33FromDiscord<Elegantbeef> Include is like C include
01:41:41FromDiscord<Elegantbeef> Inane and in 99% of cases not whwat you want
01:41:46FromDiscord<my.narco> oh ok
01:41:53FromDiscord<my.narco> so even for my own modules i should use import"
01:41:55FromDiscord<my.narco> import?
01:42:03FromDiscord<Elegantbeef> Yes
01:42:06FromDiscord<my.narco> ok
01:42:39FromDiscord<Elegantbeef> The only times you should use `include` is when you want to seperate files but due to Nim's module and cyclical dependencies cannot do it
01:44:05FromDiscord<my.narco> thank you
01:47:09FromDiscord<jviega> Not even then
01:48:19FromDiscord<jviega> I've found the trick for that is to prototype in one file with a `{.importc.}` and then do the right thing on the actual declaration... it gives you the prototype you need w/o having to do unnatural crap
01:49:55FromDiscord<my.narco> awesome
02:47:57termerElegantbeef, "I mean Nimble is crack adjacent due to implementation"
02:48:03termerI wish we had a quote DB here
02:55:37*blop_ joined #nim
02:56:17*blop quit (Remote host closed the connection)
03:04:15FromDiscord<Elegantbeef> They liked him for he spoke the truth
03:35:28*rockcavera quit (Remote host closed the connection)
03:37:02*xet7 quit (Remote host closed the connection)
03:46:01*blop_ quit (Remote host closed the connection)
03:51:43FromDiscord<michaelb.eth> In reply to @termer "NPM got packaging right": there's no PTSD like `node_modules` + `package-lock.json` PTSD
03:53:29FromDiscord<michaelb.eth> mainly from transitive dependency shenanigans
03:57:39termernot that bad
04:02:37*hernan quit (Remote host closed the connection)
04:05:43FromDiscord<michaelb.eth> Maybe it depends on the project, and tooling around JS dep mgmt has probably gotten better, but as recently as 2018 I worked on some Node.js projects involving several hellscapes, one of those owing directly to transitive dependency stuff biting us in the ass over and over again
04:07:12FromDiscord<michaelb.eth> `yarn` helped some, and when I spent a bit of time tinkering with `pnpm` last year that seemed pretty good but I didn't spend enough time with it to know if it's approach would have really solved our problems back then
04:07:29FromDiscord<michaelb.eth> (edit) "it's" => "pnpm's"
04:19:11*xet7 joined #nim
04:50:14termerElegantbeef, Gitea uses a 64 char TOTP secret
04:50:26termerI'm thinking Nim OTP should have 64 as its default, not 32
04:51:48FromDiscord<Elegantbeef> PR's welcome
04:51:57termerAll right
04:51:59FromDiscord<Elegantbeef> Fuck it do 128 by default 😛
04:52:11termerWhy not
04:52:15termermemory is cheap
04:52:29FromDiscord<Elegantbeef> Hey 128 bytes is nothing!
04:52:59FromDiscord<Elegantbeef> If your in theory short lived data type kills your stack, you have bigger problems
04:55:53FromDiscord<odexine> “Let’s go overkill and do 2048”
04:56:28FromDiscord<Elegantbeef> As far as I can think the only time the secret needs to be in memory is when someone is validating or generating
04:56:47FromDiscord<Elegantbeef> So the sensible 128 bytes seems fine
04:57:50FromDiscord<Elegantbeef> Then again I'm a stupid person
05:10:03termerhttps://github.com/OpenSystemsLab/otp.nim/pull/8
05:10:54FromDiscord<Elegantbeef> Lol
05:11:07FromDiscord<Elegantbeef> Cannot even just say "Some services seem to use larger than 32bytes so 128 bytes seems the most sensible"
05:11:28termerno time for that
05:11:40FromDiscord<Elegantbeef> Just throw the guy with cryptography knowledge under the bus!
05:11:44FromDiscord<Elegantbeef> with 0\
05:12:24FromDiscord<Elegantbeef> I couldn't tell you the difference between a nonce or a dunce
05:14:31NimEventerNew Nimble package! unifetch - Multi backend HTTP fetching, see https://github.com/thisago/unifetch
05:19:04*advesperacit joined #nim
05:21:14FromDiscord<odexine> In reply to @Elegantbeef "I couldn't tell you": You’re both of them :baqua:
05:21:35FromDiscord<Elegantbeef> So rude
05:29:47FromDiscord<odexine> That one way to explain nonce for cryptography though, kinda crazy, “n once” as it’s a single use number. Wonder if it’s also the origin of the term
05:41:51*azimut quit (Ping timeout: 252 seconds)
05:57:03*Lord_Nightmare quit (Ping timeout: 240 seconds)
06:31:49*junaid_ joined #nim
06:36:20*junaid_ quit (Remote host closed the connection)
06:42:51*PMunch joined #nim
06:55:36*PMunch quit (Quit: Leaving)
06:56:57*PMunch joined #nim
07:58:29*xet7 quit (Quit: Leaving)
08:01:02FromDiscord<sOkam! 🫐> @toma400 https://github.com/py2many/py2many might be helpful. it can convert to nim apparently 🤔
08:27:50FromDiscord<Chronos [She/Her]> In reply to @heysokam "<@656540400546480128> https://github.com/py2many/py": Why would this be useful?
08:28:51FromDiscord<Chronos [She/Her]> Since it's a transpiler, isn't it just the syntax quirks?
08:29:05FromDiscord<odexine> What’s this even in reply to
08:32:43FromDiscord<toma400> In reply to @heysokam "<@656540400546480128> https://github.com/py2many/py": Oh, that's nice! Not sure where I could use it right now, but it's good to know such tool exist 🥰
08:32:53FromDiscord<toma400> (edit) "nice!" => "nice, thank you!"
08:41:12*Lord_Nightmare joined #nim
08:41:22FromDiscord<Chronos [She/Her]> I do wonder if the Kotlin output it produces is suitable for MC modding :p
08:42:07*xet7 joined #nim
09:07:24FromDiscord<toma400> Yeah, I was wondering just as well, it'd fit for your plans of making Nim compile to JVM 😅
09:14:45FromDiscord<Chronos [She/Her]> Not really because, Python and not Nim-
09:14:48FromDiscord<Chronos [She/Her]> But yeah
09:54:03*lumo_e joined #nim
09:57:35*lucerne quit (Ping timeout: 246 seconds)
10:14:30*lucerne joined #nim
10:44:28*krux02 joined #nim
10:47:46*lumo_e quit (Quit: Quit)
11:56:44*blop_ joined #nim
12:30:29FromDiscord<sOkam! 🫐> In reply to @odexine "What’s this even in": nothing. i knew the guy used python a lot, and i found it randomly looking for other things, so figured he (or maybe someone else) might find it useful
12:37:26FromDiscord<odexine> In reply to @heysokam "nothing. i knew the": Ah I see, I thought it was from a distant conversation as I tried scrolling up pretty far to find the related message
12:44:50FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4HIX
12:45:40FromDiscord<graveflo> (edit) "https://play.nim-lang.org/#ix=4HIX" => "https://play.nim-lang.org/#ix=4HIY"
12:53:47FromDiscord<odexine> The parameters on HSlice do not take statics
12:55:29FromDiscord<graveflo> oh that could be it. There should be a way to unwrap the static types then no?
12:56:27FromDiscord<odexine> HSlice is not for compile time use only, if you would like anotate it as static Slice instead then use that as a CT parameter
12:59:06FromDiscord<odexine> sent a code paste, see https://paste.rs/Z75T0
12:59:16FromDiscord<odexine> Bear with me, I am on mobile so editing code is slow
12:59:46FromDiscord<odexine> I don't know if it works, i just made guesses to how the code should look
13:04:37FromDiscord<graveflo> Thanks. Looks like that `static` was the issue but I haven't made it work the way I want it to yet. I'm going to mess with it a little
13:05:39FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4HJ3
13:09:41FromDiscord<odexine> s.len is equal to sb-s.a IIRC by the way
13:10:38FromDiscord<odexine> Would that work for a slice 5..10? The length of the array will be right but not its indices
13:11:10FromDiscord<odexine> Unless it’s not intended, then that’s fine
13:11:14FromDiscord<vindaar> I assumed the resulting slice is supposed to start at 0
13:12:33FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4HJ5
13:13:21FromDiscord<graveflo> is `[]` a deref + access automatically? Thats just weird
13:13:41FromDiscord<odexine> In reply to @graveflo "alright yea that seems": It does? How do you check? That sounds strange to me
13:13:56FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4HJ7
13:14:30FromDiscord<graveflo> that works but changing the first parameter type to `ptr UncheckedArray[T]` doesn't work. mismatch at position 0. argument 0 type if `UncheckedArray[T]`
13:17:37*blop_ quit (Ping timeout: 252 seconds)
13:19:35*blop_ joined #nim
13:47:04*rockcavera joined #nim
13:52:46FromDiscord<Chronos [She/Her]> Hi I have a question for people- What's the best way to write a function for a synchronous socket and asynchronous socket?
13:53:08FromDiscord<Chronos [She/Her]> Not sure if it's better to do some generic nonsense or if I should write them in separate functions despite the logic being the same
13:57:03FromDiscord<jviega> Generally run things in a select() or epoll/kqueue() loop. You won't block if things are non-blocking, but you can end up with the same logic in any case with the approach
13:58:45FromDiscord<jviega> In that world, limit yourself to BUFSIZ bytes on a write any time you get a ready status on the FD for write
13:59:02FromDiscord<jviega> I think Nim does have a wrapper for epoll/kqueue somewhere
13:59:28FromDiscord<Chronos [She/Her]> I don't need to ensure it's non-blocking aha- Just want to minimise the amount of code I have to write
14:00:20FromDiscord<jviega> Well, you can still use the same code even if it's blocking. It's good for deadlock avoidance anyway
14:00:49FromDiscord<Chronos [She/Her]> :p
14:02:43FromDiscord<jviega> I've seen people, over and over again (me too I'm sure), end up w/ deadlocks where they dump something really large to stdin of a child process that blocks when they don't expect it because the child process isn't going to read more on stdin until you read something it output.
14:03:02FromDiscord<jviega> In a blocking world, the select loop w/ a bufsz limit is MORE important for that reason
14:03:45FromDiscord<jviega> Can happen over sockets just as easily
14:03:45FromDiscord<Chronos [She/Her]> I'm talking about sockets as in over the network, not stdin/stdout? Sorry, I'm confused oof
14:04:03FromDiscord<jviega> It's all the same thing basically... inter-process comms over a file descriptor
14:04:12FromDiscord<Chronos [She/Her]> Fair
14:04:31*PMunch_ joined #nim
14:04:45FromDiscord<Chronos [She/Her]> Though imo it's not my responsibility to manage any deadlocks- I use async sockets anyway but not everyone does so
14:06:46FromDiscord<jviega> async doesn't keep you out of deadlocks, but sure
14:07:18FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4HJj
14:07:37FromDiscord<vindaar> (for example if you were to use `{}` it would work)
14:07:40*PMunch quit (Ping timeout: 255 seconds)
14:08:38FromDiscord<Chronos [She/Her]> In reply to @jviega "async doesn't keep you": Does it not? Oof
14:08:44FromDiscord<Chronos [She/Her]> Welp
14:16:13*PMunch_ quit (Quit: Leaving)
14:30:48FromDiscord<griffith1deadly> In reply to @chronos.vitaqua "Hi I have a": you can use multisock library, it used by anonimongo for Socket | AsyncSocket. just write code for async socket and mark it multisock pragma
14:31:41FromDiscord<griffith1deadly> https://github.com/mashingan/multisock
14:32:33FromDiscord<Chronos [She/Her]> Oh nice! Thanks griff!
14:46:37FromDiscord<my.narco> is there a proc to resize a sequence?
14:46:44FromDiscord<my.narco> like ``resize(sequence, 10)``
14:46:47FromDiscord<my.narco> or something
14:47:43FromDiscord<stoneface86> `setLen`
14:48:48FromDiscord<my.narco> than you!
14:49:02FromDiscord<stoneface86> np
14:54:15FromDiscord<graveflo> In reply to @vindaar "you're right. It seems": Why would `[]` be confusing? It's an array
14:57:35FromDiscord<graveflo> To be clear I don't understand how defrencing an `uncheckedArray` makes any sense in the first place. `ptr uncheckedArray` is it's natural form I believe.
15:03:01FromDiscord<vindaar> "confusing" may be too strong a word. But if I only see the access in a random piece of code I would probably conclude you're working on a `seq` and not a raw pointer. Hence I'd prefer to have a clearer distinction (or better yet wrap that pointer up in something; depends on what you're actually doing)
15:03:10FromDiscord<vindaar> just about expectations etc
15:06:17FromDiscord<graveflo> ok thats makes more sense. I do think that `[]` should not be a seq specific thing, but adding some clarity to code with `uncheckedArray`s makes sense. I guess that's why `system.nim` doesnt define anything too fancy for them
15:24:34FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HJG
15:28:39FromDiscord<odexine> if all the functions are of the same signature, eys
15:28:42FromDiscord<odexine> (edit) "eys" => "yhes"
15:28:42FromDiscord<odexine> (edit) "yhes" => "yes"
15:28:44FromDiscord<odexine> i can type
15:32:28FromDiscord<alohaer> Is there a concept of "types" of functions? So that they have the same signature but are different types?
15:34:03FromDiscord<odexine> yes, there's a common "hidden parameter", let's say, for functions called the calling convention
15:34:26FromDiscord<odexine> functions declared on the top level are of "nimcall", and anonymous functions that are assigned to variables are of "closure"
15:35:17FromDiscord<odexine> In reply to @odexine "yes, there's a common": a parameter commonly missed by most Nim beginners and intermediates
15:40:19FromDiscord<odexine> this "parameter" is set via pragma, forogt to say
15:40:59FromDiscord<odexine> so something like `proc name(...): ... {.nimcall.} =` or `{.closure.}` will change it ~~i forgot if that's correct syntax~~
15:41:59FromDiscord<alohaer> I meant generally in programming. So that you could do `const arithmetic_operators: seq[ArthmeticOpType] = [ add, sub, mul]` but you couldn't stick a `<` funciton in there, even though it could be `(int, int) -> int`
15:42:51FromDiscord<odexine> well, in that case if you want to do that i'd say to not use an int for denoting "lt, eq, gt"
15:43:17FromDiscord<odexine> in which case use an enum
15:47:54FromDiscord<my.narco> what is the problem here? https://media.discordapp.net/attachments/371759389889003532/1157342998191952003/image.png?ex=65184329&is=6516f1a9&hm=ae8a4ba324c76c08da5bf224b28954d74003bc623fa7cdc292e421b5bb08dd9b&
15:48:15FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HJS
15:49:09FromDiscord<nervecenter> Just a note, it's probably better to use `when debugging:` so your debug messages only appear in debug builds
15:49:20FromDiscord<nervecenter> unless that's not your intent
15:49:31FromDiscord<odexine> In reply to @my.narco "what is the problem": can you show the code without the popup?
15:49:38FromDiscord<odexine> unless theres nothing relevant there
15:49:46FromDiscord<odexine> hard to say though
15:50:04FromDiscord<odexine> ah
15:50:36FromDiscord<odexine> yeah no show the code under the popup
15:51:24FromDiscord<my.narco> In reply to @nervecenter "Just a note, it's": thats not my intenet
15:51:52FromDiscord<my.narco> In reply to @odexine "can you show the": its not really relevent, i provided the declaration of ``f`` which is behind the popus
15:51:53FromDiscord<my.narco> popup
15:52:10FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HJU
15:53:22FromDiscord<odexine> its probably erroring out inside that const
15:53:32FromDiscord<odexine> what's the contents of that @[]
15:53:54FromDiscord<my.narco> nothing
15:53:55FromDiscord<my.narco> yet
15:54:22FromDiscord<odexine> oh i thought you omitted it
15:54:35FromDiscord<my.narco> no nothing is there yet
15:55:05FromDiscord<my.narco> sent a code paste, see https://paste.rs/PAyxU
15:55:05FromDiscord<my.narco> but it throws the same error
15:55:24FromDiscord<odexine> i have no idea, i'm sorry
15:55:29FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HJX
15:55:41FromDiscord<odexine> ah
15:55:48*ntat joined #nim
15:55:50FromDiscord<taperfade> i wish i was as smar as yall
15:55:59FromDiscord<odexine> fuck
15:56:01FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4HJY
15:56:11FromDiscord<odexine> it's prolly erroring out because it is an empty seq
15:56:12FromDiscord<odexine> lol
15:58:00FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HJZ
15:58:04FromDiscord<my.narco> why is it expecting a proc as an argument
15:58:16FromDiscord<my.narco> am i doing something wrong?
16:00:09FromDiscord<odexine> honestly i'm just as confused now
16:00:37FromDiscord<my.narco> 😭
16:00:53FromDiscord<odexine> i also have to go to sleep
16:00:56FromDiscord<odexine> sorry x2
16:02:07FromDiscord<vindaar> this compiles just fine https://play.nim-lang.org/#ix=4HK3 so it must be related to what `NoliPU` and `NoliError` actualy are
16:02:11FromDiscord<vindaar> (edit) "actualy" => "actually"
16:05:04*Onionhammer quit (Read error: Connection reset by peer)
16:05:18*Onionhammer joined #nim
16:06:45FromDiscord<Chronos [She/Her]> Anyone know if chronos (the async library) has an alternative to asyncnet?
16:07:59FromDiscord<taperfade> what are u guys working on
16:08:16FromDiscord<taperfade> i had nothing to work on and forgor almost all of what i learned
16:08:27FromDiscord<taperfade> sob
16:08:48FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HK6
16:10:02FromDiscord<my.narco> @vindaar
16:10:19FromDiscord<taperfade> what does enum do
16:10:32FromDiscord<vindaar> Can you post a full snippet that doesn't compile? I don't have much time right now, then I take a look when I can
16:12:51FromDiscord<my.narco> In reply to @vindaar "Can you post a": i cant figure out how to get it to fail on playground for somereason
16:13:59FromDiscord<my.narco> i got it to compile
16:14:04FromDiscord<my.narco> multiple definitions
16:14:05FromDiscord<my.narco> fuck
16:14:06FromDiscord<my.narco> my bad
16:17:56FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "Anyone know if chronos": with that name, you should already know everything about it! :kappa:
16:21:34FromDiscord<taperfade> _ _
16:30:40*hernan joined #nim
16:47:24FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HKd
16:53:34FromDiscord<Chronos [She/Her]> In reply to @heysokam "with that name, you": I do not, unfortunately :p
16:53:54FromDiscord<.aingel.> Is there an mitems iterator equivalent in python?
16:54:06FromDiscord<.aingel.> Just wondering if that's sort of a nim unique feature, it seems really cool
16:59:50FromDiscord<Chronos [She/Her]> Objwcts in lists are mutable by default in Python, iirc
17:01:20FromDiscord<Chronos [She/Her]> Yeah they are
17:01:22FromDiscord<Chronos [She/Her]> @.aingel.
17:08:34FromDiscord<my.narco> In reply to @my.narco "is there a cleaner": _ _
17:14:31*FlyingSquirrelAr joined #nim
17:15:03FromDiscord<.aingel.> In reply to @chronos.vitaqua "<@1152336447467163790>": Oh interesting, thanks
17:15:19FromDiscord<.aingel.> In reply to @chronos.vitaqua "Objwcts in lists are": I mean in for loops though
17:15:48FlyingSquirrelArRead about Edna Skilton date raping Richard Simmons! Exerpt: As the game progressed, Edna couldn't help but notice Richard's perfectly toned physique and his Simmonin buns that looked like they were sculpted by the gods themselves. She found herself getting *** and bothered, and her Canadian beaver started to drip profusely as if it were being teased with melted poutine curds filling it until its
17:15:54FlyingSquirrelArclitoral tongue tingled with ecstasy. https://pastes.io/3zb8ipyqbv
17:16:02*FlyingSquirrelAr quit (K-Lined)
17:16:21FromDiscord<.aingel.> I don't think it works for modifying in a loop
17:28:38FromDiscord<_gumbercules> In reply to @FlyingSquirrelAr "Read about Edna Skilton": the fuck?
17:28:44FromDiscord<_gumbercules> @technorazor ^
17:28:48FromDiscord<_gumbercules> damnit
17:28:52FromDiscord<_gumbercules> <@&371760044473319454>
17:28:58FromDiscord<_gumbercules> @technorazor my bad
17:30:00FromDiscord<Phil> There we go
17:31:29*azimut joined #nim
17:31:46FromDiscord<technorazor> dwai lol
17:52:31FromDiscord<Chronos [She/Her]> In reply to @.aingel. "I mean in for": It does
17:52:41FromDiscord<Chronos [She/Her]> If you iterate through a list via a loop and modify the item given
17:53:38FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4HKm
18:04:23Amun-Rado you see klines on discord?
18:04:38Amun-RaI mean do the bot forward the info
18:14:56FromDiscord<my.narco> is this not how to use bitwise operators? https://media.discordapp.net/attachments/371759389889003532/1157380002191528007/image.png?ex=6518659f&is=6517141f&hm=8131612f7c1bc41f4d983b1083727f288a9a993efc0b19f33b10ca96dc620bcf&
18:15:46FromDiscord<dissolved.girl> Is that comic sans?
18:16:14FromDiscord<my.narco> In reply to @dissolved.girl "Is that comic sans?": comic mono
18:16:24FromDiscord<dissolved.girl> Thanks, I hate it
18:16:39FromDiscord<voidwalker> yeah, unserious funny code
18:18:03FromDiscord<Langosta> I think its cool
18:18:06FromDiscord<my.narco> In reply to @my.narco "is this not how": anyways is this not how its used?
18:18:08FromDiscord<Langosta> just hard to read for me
18:18:27FromDiscord<Langosta> Are you asking about the error, or are you asking about its usage
18:18:33FromDiscord<my.narco> both
18:18:38FromDiscord<my.narco> i swear im using it correctly
18:19:10FromDiscord<Yardanico> In reply to @my.narco "is this not how": no, that's not how you use them
18:19:18FromDiscord<Yardanico> you said yourself - "operator", but you're calling it like a function
18:19:30FromDiscord<Yardanico> `r1 and r2` would be valid syntax
18:19:45FromDiscord<my.narco> oh
18:19:53FromDiscord<my.narco> im so retarded sorry 😭
18:19:56FromDiscord<my.narco> so tired
18:19:59FromDiscord<Yardanico> or you can use https://nim-lang.org/docs/bitops.html#bitand.m%2CT%2CT%2Cvarargs%5BT%5D, but there's no reason here really
18:20:14FromDiscord<dissolved.girl> You could probably implement a proc \`and\` that does that, though
18:20:18Amun-Ramy.narco: either 1 and 2 or `and`(1, 2)
18:20:26FromDiscord<my.narco> i figured it out
18:20:28FromDiscord<my.narco> thanks
18:20:58Amun-Rathe latter is pretty unorthodox
18:21:31Amun-Rathere's another way: 1.`and` 2
18:21:41Amun-Raor 1.`and`(2)
18:22:02FromDiscord<Langosta> In reply to @my.narco "im so retarded sorry": Youre trying to learn. Learning isnt retarded, You’re good.
18:22:50FromDiscord<my.narco> yeah your right
18:34:05*rockcavera quit (Remote host closed the connection)
18:36:27FromDiscord<Phil> In reply to @my.narco "im so retarded sorry": This is the struggle in programming, it's always the dumb mistakes that get you even 5 years later when you've acquired what reasonably could be declared as a pretty decent chunk of experience
18:37:19FromDiscord<Chronos [She/Her]> Not sure how multisock is supposed to work- If I provide it a sync socket, will it just, work?
18:37:22FromDiscord<Phil> Prime example:↵Me today, I forgot that there's actually also the need to think about what a UI would need to look like in a chat between 2 users when one of them deleted their account.↵Overall pretty obvious usecase in our org, completely flubbed on remembering it.
18:37:35FromDiscord<Phil> I see socket talk that isn't websocket, I bail
18:39:05FromDiscord<Phil> Question to the folks here about documentation
18:39:17FromDiscord<Phil> More in your role as readers of docs rather than writers of docs
18:41:16FromDiscord<Phil> sent a long message, see http://ix.io/4HKz
18:48:03*rockcavera joined #nim
18:48:44FromDiscord<toma400> Tbh Owlkettle docs are pretty great, so I think it's enough, but additional info is always a plus. Main reason is that names pretty clear and whenever there's some field with ambiguity, there's at least short description making this more precise.
18:59:02FromDiscord<Phil> The main reason I'm asking is that I'm pretty decent at pointing out and vocalizing all the nuances and things to keep in mind when looking at a widget.↵I'm not particularly great at trimming that to only the information "interesting" to the user
19:01:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4HKF
19:05:02FromDiscord<Phil> I swear at this point I might be interested in taking a class about writing documentation more effectively because I keep finding myself in positions where I have to write them all over the place
19:14:51FromDiscord<Chronos [She/Her]> I'm trying to import a module relative to my other module but the compiler doesn't seem to like it?
19:16:15FromDiscord<Phil> Examples or it didn't happen 😛
19:17:25*Mister_Magister quit (Ping timeout: 255 seconds)
19:18:11FromDiscord<Chronos [She/Her]> It was a mistake on my part :p
19:27:14*ntat quit (Quit: leaving)
19:39:36*alphacentauri quit (Quit: WeeChat 4.0.5)
19:41:18*alphacentauri joined #nim
19:44:50FromDiscord<.aingel.> Is there a way to suppress Declared But Not Used warnings from nimlsp?
19:44:54FromDiscord<.aingel.> @pmunch
19:54:18FromDiscord<my.narco> what did i do https://media.discordapp.net/attachments/371759389889003532/1157405007457554473/image.png?ex=65187ce9&is=65172b69&hm=b4478692350af50703c7bbc1c5a08463d57cad20d4f6cd7616b159bddb718a13&
19:59:56FromDiscord<nasuray> In reply to @.aingel. "Is there a way": You can suppress the hint either in the file itself with `{.hint[XDeclaredButNotUsed]:off.}` or from a `nim.cfg`/`config.nims` for the project
20:05:58FromDiscord<demotomohiro> In reply to @my.narco "what did i do": You probably need to read generated C code to check type of T2_ and check_error_() is same.↵And also check your Nim code correctly imports C types and functions.
20:06:49FromDiscord<my.narco> In reply to @demotomohiro "You probably need to": i import NO ctypes or functions
20:07:41FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HL7
20:08:35FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HL8
20:09:00FromDiscord<my.narco> well
20:09:02FromDiscord<my.narco> i fixed my problem
20:09:04FromDiscord<demotomohiro> Why do you need to add nimcall calling convension to each proc?↵Are they declared inside other proc?
20:09:20FromDiscord<my.narco> In reply to @demotomohiro "Why do you need": because i am using a seq to store them, and call them
20:09:51FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HL9
20:09:58*alphacentauri quit (Read error: Connection reset by peer)
20:10:03FromDiscord<demotomohiro> In reply to @my.narco "i import NO ctypes": Are you sure all module you imports not use any C lib?
20:10:05*alphacen1 joined #nim
20:10:44FromDiscord<my.narco> In reply to @demotomohiro "Are you sure all": yeah, i fixed my problem,
20:10:58FromDiscord<my.narco> fixed it
20:11:02FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HLa
20:11:07FromDiscord<my.narco> i removed the ``var NoliError``
20:11:18FromDiscord<my.narco> and replaced it with just ``NoliError``
20:12:08FromDiscord<demotomohiro> I usually get compile error from backend compiler when I import C things incorrectly or Nim compiler bug.
20:12:28FromDiscord<my.narco> it was a compiler bug not giving me usefull error messages
20:12:30FromDiscord<my.narco> i fixed it tho8ugh
20:28:39FromDiscord<bostonboston> Anyone know of libraries for talking to MSSQL dbs
20:40:06FromDiscord<my.narco> is anyone able to walk me through how to compile for linux from a windows host?
20:41:28FromDiscord<griffith1deadly> wsl
20:42:33FromDiscord<my.narco> alright
20:48:01*Mister_Magister joined #nim
20:48:07FromDiscord<Elegantbeef> Alternatively you could use zigcc
20:54:32FromDiscord<my.narco> is there a way i could add tasks to my nimble file?
20:54:47FromDiscord<my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4HLv
21:02:05FromDiscord<raynei486> yeah you can define tasks
21:02:06FromDiscord<.aingel.> Oh cool @nasuray is there a way to do this system wide though?
21:02:17FromDiscord<raynei486> https://nim-lang.org/docs/nimscript.html#task.t%2Cuntyped%2Cstring%2Cuntyped
21:02:23FromDiscord<my.narco> oh ok thanks
21:04:17FromDiscord<nasuray> In reply to @.aingel. "Oh cool <@372579559645773828> is": Absolutely! See [here](https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files) for more info about nim config files
21:04:46FromDiscord<.aingel.> Thanks!
21:07:40FromDiscord<.aingel.> hmm @nasuray so I added `{.hint[XDeclaredButNotUsed]:off.}` in my config.nims which I believe is global cause that's where I've added global nimble tasks but I still get those lsp warnings
21:10:03FromDiscord<.aingel.> I've installed nim via choosenim
21:10:11FromDiscord<.aingel.> Do you know where the config file would be then?
21:11:34FromDiscord<nasuray> That's disabling it within that file you can set flags with switch the compiler flag has a different syntax. To add a compiler flag in nim script you can use switch
21:11:58FromDiscord<.aingel.> Okay i found it
21:12:12FromDiscord<nasuray> (edit) removed "you can set flags with switch"
21:12:17FromDiscord<.aingel.> It was `~/.choosenim/toolchains/nim-2.0.0/config/`
21:12:31FromDiscord<.aingel.> I added it to `configs.nims` and it works now!
21:16:50FromDiscord<nasuray> In reply to @.aingel. "It was `~/.choosenim/toolchains/nim-2.0.0/config/`": Usually you would edit your personal config not the compilers. So `~/.config/nim/config.nims`
21:16:59FromDiscord<bostonboston> Do converters not do their implicit thing inside of `[]`s
21:17:09FromDiscord<bostonboston> (edit) "`[]`s" => "`[]`'s"
21:23:11*advesperacit quit ()
21:32:33NimEventerNew thread by RedDevil: ZIP32, see https://forum.nim-lang.org/t/10521
21:37:26FromDiscord<.aingel.> In reply to @nasuray "Usually you would edit": When I edited that, the lsp didn't pick it up
21:39:14FromDiscord<sOkam! 🫐> In reply to @my.narco "is anyone able to": zigcc
21:39:16FromDiscord<.aingel.> Ooh wiat
21:39:35FromDiscord<.aingel.> (edit) "Ooh wiat" => "Oh wait, the lsp isn't picking it up regardless.."
21:39:42FromDiscord<sOkam! 🫐> (edit) "In reply to @my.narco "is anyone able to": zigcc ... " added "https://github.com/enthus1ast/zigcc"
21:45:30FromDiscord<my.narco> In reply to @heysokam "zigcc https://github.com/enthus1ast/zigcc": i got wsl to work :D
21:53:58*krux02 quit (Remote host closed the connection)
22:08:43FromDiscord<Elegantbeef> They should do implicit conversions everywhere if there is no ambiguous overload↵(@bostonboston)
22:16:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4HLQ
22:19:10FromDiscord<nasuray> In reply to @.aingel. "When I edited that,": the syntax for inclusion in a `config.nims` is `switch("hint","[XDeclaredButNotUsed]:off")`
22:40:50FromDiscord<.aingel.> In reply to @nasuray "the syntax for inclusion": Ahh
22:41:47FromDiscord<.aingel.> In reply to @nasuray "the syntax for inclusion": Works, thanks!!
23:24:05*Mister_Magister quit (Ping timeout: 240 seconds)
23:32:11NimEventerNew thread by daylinmorgan: Nimble badge (shields.io) with latest version tag , see https://forum.nim-lang.org/t/10522
23:54:20FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4HMh
23:54:40FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4HMi
23:54:58FromDiscord<ravinder387> nim c hello.nim -- gives me error
23:55:10FromDiscord<ravinder387> how to use .nims file