<< 07-10-2022 >>

00:03:26FromDiscord<Rika> So many wow
00:05:38FromDiscord<Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuq
00:05:48FromDiscord<Rika> What if my wallet wasn’t 0 BTC
00:06:14FromDiscord<Elegantbeef> Atleast 0.15 btc in 9.3 hours
00:06:32FromDiscord<Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk
00:06:45FromDiscord<Elegantbeef> The worst part will always be this isnt a bot spamming
00:07:11FromDiscord<Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk
00:07:28FromDiscord<Elegantbeef> I think i'll pass thanks though
00:07:46FromDiscord<Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk
00:08:21FromDiscord<Elegantbeef> Lol they finally left
00:08:43FromDiscord<RattleyCooper> What is `internal error: inconsistent environment type`?
00:08:49FromDiscord<Elegantbeef> "My life has been fulfilled being a scummy spammer, I must go my people need me"
00:08:51FromDiscord<Elegantbeef> A compiler bug
00:08:57FromDiscord<RattleyCooper> oof
00:09:13FromDiscord<Elegantbeef> Seems like a closure issue, what's the code you've got
00:09:25FromDiscord<Elegantbeef> Can always use a debug compiler to see the real cause
00:10:00FromDiscord<RattleyCooper> I'm using wNim/wAuto and trying to iterate over all the window handles
00:10:53FromDiscord<RattleyCooper> The error comes from the `wAuto`'s `window.nim` . I'll make an issue in the repo but not sure what else to do. Maybe I need to update my nim
00:10:54FromDiscord<Rika> Anything with internal error is essentially a compiler issue
00:11:04FromDiscord<Rika> I’m not really aware of any case where it isn’t xd
00:11:50FromDiscord<Elegantbeef> It always is either a case of 'Compiler doesnt support valid code' or 'Compiler accepts invalid code'
00:13:37FromDiscord<RattleyCooper> I think it's because I'm using `wNim` and `wAuto` together
00:13:56FromDiscord<Elegantbeef> Using libraries together shouldnt cause an isssue
00:15:07FromDiscord<RattleyCooper> Well using the `allWindows` iterator within a `Button` callback will cause a compiler error
00:15:30FromDiscord<RattleyCooper> If I don't use the iterator my callback works fine and if I compile my iterator code separately it works just fine
00:16:07FromDiscord<Elegantbeef> What is the type of the Button callback?
00:16:44FromDiscord<RattleyCooper> `wEvent_Button`
00:16:54FromDiscord<Elegantbeef> No what's the real type
00:17:50FromDiscord<RattleyCooper> `wButton`?
00:18:20FromDiscord<Elegantbeef> It's likely a type alias to a procedure
00:20:39FromDiscord<RattleyCooper> Like the type definition of the callback?
00:20:48FromDiscord<Elegantbeef> Yes
00:22:53FromDiscord<RattleyCooper> Oh it's just a `proc ()` or `proc (event: wEvent)`
00:23:02FromDiscord<Elegantbeef> Ok so it's a closure
00:23:35FromDiscord<Elegantbeef> Does it automatically wrap teh `proc()` with `proc(event: wEvent)`?
00:24:35FromDiscord<Elegantbeef> I just assume there is some funky closure thing going on
00:25:23FromDiscord<RattleyCooper> I'm trying to find the code. I had it pulled up last night but now i'm having trouble finding the definition in wNim
00:26:47FromDiscord<RattleyCooper> I'm using the `proc(event: wEvent)` version so i'll try the other? Idk. I can always just make the `wAuto` part a separate process with command line arguments. I just need to send keys to a window
00:27:16FromDiscord<Elegantbeef> Yea i'm just curious how they handle the fact it can be either
00:27:34FromDiscord<Elegantbeef> If they wrap it ina closure that does `proc(_: wEvent) = myProc()` or what
00:29:41FromDiscord<RattleyCooper> https://github.com/khchen/wNim/blob/320b0a0282f4b7e77df17d5066896983c27e35f5/wNim/private/wTypes.nim#L141
00:30:58FromDiscord<Elegantbeef> Ok so it's just `poc(event: wEvent)`
00:31:12FromDiscord<Elegantbeef> So then how do you declare yours?
00:31:20FromDiscord<RattleyCooper> There is another one you can use defined right under it. They both work
00:31:56FromDiscord<Elegantbeef> I wonder if that's the problem then
00:32:16FromDiscord<RattleyCooper> It's just a matter of using the iterator from `wAuto` within the closure. It's odd because some other things from wAuto work within the closure
00:34:29FromDiscord<Elegantbeef> Yea i'm just trying to figure out what causes it
00:34:42FromDiscord<Elegantbeef> Dont really see anything that'd cause it
00:39:47FromDiscord<RattleyCooper> Well that's no fun lol
00:42:19FromDiscord<RattleyCooper> What is the easiest way for communicating between processes in nim?
00:44:19FromDiscord<Elegantbeef> Sockets are easy
00:44:27FromDiscord<Elegantbeef> Stdin/stdout is easy
00:48:45FromDiscord<RattleyCooper> Yeah imma just use nettyrpc xD
00:53:16FromDiscord<albassort> why isn't beef a mod
00:53:23FromDiscord<albassort> hes almost always here and is extremely mature
00:53:40FromDiscord<albassort> and is a face of community
00:53:45FromDiscord<albassort> and is respected and looked up to
00:54:18FromDiscord<albassort> and is always helpful and compassionate
00:55:57FromDiscord<Elegantbeef> > compassionate↵> Doubt
00:56:09FromDiscord<RattleyCooper> I have learned a lot from the beef lol. Many thanks, seriously
00:56:52FromDiscord<albassort> In reply to @Elegantbeef "> compassionate > Doubt": you insult me less than Yard on average
00:57:03FromDiscord<albassort> which isn't saying much but still
00:57:04FromDiscord<Elegantbeef> Who are you?
00:57:35FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1027746478111862834/unknown.png
00:58:09FromDiscord<albassort> i had the username retkid#9135 for a few years
00:58:16FromDiscord<huantian> ohhhhhhhh
00:58:29FromDiscord<Elegantbeef> Jesus christ you people need to pick a name and stick with it 😄
00:58:42FromDiscord<Elegantbeef> Forrest also changes their name like 100 times per day
00:59:32FromDiscord<albassort> In reply to @Elegantbeef "Jesus christ you people": https://hastebin.com/uremuwoxit
00:59:39FromDiscord<albassort> i wrote a little thing about my name change
00:59:42FromDiscord<Elegantbeef> Nice dead link
00:59:56FromDiscord<albassort> kek
01:00:00FromDiscord<albassort> well i guess its dead
01:00:06*genpaku quit (Remote host closed the connection)
01:00:31FromDiscord<albassort> basically i, i had a good reason to change it
01:00:49*genpaku joined #nim
01:00:57FromDiscord<Rika> I also wondered who you were
01:01:01FromDiscord<Rika> Since it was a dead link
01:01:41FromDiscord<albassort> basically my old name was calling myself the r-slur because some 30 year old people called me that when i didn't learn music quickly enough
01:01:48FromDiscord<albassort> and i want to move away from self hatred
01:02:09FromDiscord<albassort> and to be fair i had stuck to the name since like 2017
01:18:28*CyberTailor joined #nim
01:24:01*arkurious quit (Quit: Leaving)
01:39:25FromDiscord<Patitotective> In reply to @Elegantbeef "Jesus christ you people": Elegantsteak
01:45:55FromDiscord<Elegantbeef> ElegantPoisson
01:52:19*vicecea quit (Remote host closed the connection)
02:25:19*xet7 joined #nim
02:25:56*xet7 quit (Remote host closed the connection)
02:56:47*elph quit (Quit: Connection closed for inactivity)
03:01:16FromDiscord<RattleyCooper> How do I make something distinct if it expects it to be distinct? `Window = distinct HWND` but when I try to assign a `HWND` it tells me it should be distinct
03:01:46FromDiscord<Elegantbeef> `Window(myHwnd)` though generally there exist procedures for htis
03:02:04FromDiscord<Elegantbeef> The entire point of distinct is that the value should be a known type of value
03:02:40FromDiscord<RattleyCooper> It is, it's an int
03:02:53FromDiscord<RattleyCooper> int->HANDLE->HWND->Window
03:03:35FromDiscord<Elegantbeef> So then get converting
03:06:06FromDiscord<RattleyCooper> I'm either missing something or the `Window` procedure from wNim is interfering
03:06:36FromDiscord<Elegantbeef> You may have to d o`winim.Window(myHwnd)` then
03:08:19FromDiscord<Elegantbeef> Without the compiler error i cannot say much
03:09:26FromDiscord<RattleyCooper> oml, thank you haha
03:51:41*xcodz-dot joined #nim
03:53:16xcodz-dothello, i just encountered a problem. I am creating a nimble package but I need to pack in some resources into the executable that will ship with my package. What is the correct way to read those resources?
04:29:49FromDiscord<RattleyCooper> You looking for `staticRead`?
04:41:05*CyberTailor quit (Remote host closed the connection)
04:43:40*CyberTailor joined #nim
04:48:33*CyberTailor left #nim (#nim)
04:54:15*vicecea joined #nim
05:08:05*kenran joined #nim
06:28:02NimEventerNew thread by halloleo: How to declare a varible in a case statement for use afterwrads, see https://forum.nim-lang.org/t/9509
06:44:31FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "Is there the possibility": Anyone know?
06:45:35*xcodz-dot quit (Quit: Leaving)
07:12:46*rockcavera quit (Remote host closed the connection)
09:30:42FromDiscord<impbox [ftsf]> is there a way I can get (at compile time) the offset of a field in an object?
09:31:39FromDiscord<impbox [ftsf]> eg `var offsetOfFoo = offsetOf(MyType.foo)`
09:31:51FromDiscord<impbox [ftsf]> ohh.. offsetOf exists
09:31:52FromDiscord<impbox [ftsf]> wow
09:33:09FromDiscord<impbox [ftsf]> that was easy
09:33:11FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=4cvC
09:34:14FromDiscord<Rika> Lol
09:34:50FromDiscord<Rika> Always funny when I see someone ask a question with a code example and the answers just “have you tried it?”
10:06:06FromDiscord<ChocolettePalette> offsetOf could also be a rm -rf /\ patch
10:06:20FromDiscord<ChocolettePalette> So it's good they asked
10:16:51*dnh joined #nim
11:10:00NimEventerNew thread by drkameleon: Selecting/installing older nim package on FreeBSD, see https://forum.nim-lang.org/t/9510
11:13:00FromDiscord<gibson> sent a code paste, see https://paste.rs/F4s
11:14:03FromDiscord<gibson> However, transposing the first 2 definitions in the generated cpp files completely solves the issue. So it's like the `emit` is being ignore and Nim's own type is getting shoehorned into the wrong place ahead of the `emit`.
11:14:17FromDiscord<gibson> (edit) "ignore" => "ignored"
11:15:32FromDiscord<gibson> (edit) "However, transposing the first 2 definitions in the generated cpp files completely solves the issue. So it's like the ... `emit`" added "location of the "
11:38:17FromDiscord<Horizon [She/Her]> Hmmmmm should i port https://github.com/wasm3/wasm3 to Nim?
11:38:27FromDiscord<Horizon [She/Her]> No actual goal besides me just being bored lmao
11:38:51FromDiscord<Horizon [She/Her]> Hm nah
11:38:59FromDiscord<Horizon [She/Her]> I'll do a basic brainfuck interpreter
11:47:23FromDiscord<Horizon [She/Her]> Would a 2D sequence in Nim that's just empty, use much memory? For 30000 sequences
11:48:52FromDiscord<Anna Aurora 🇪🇺🏳🌈> [I wrote my own snake game in Nim](https://codeberg.org/annaaurora/snekim). Is the code good? Any critique?
11:51:06FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "Would a 2D sequence": Doesn't look like it does, nice
12:05:26*arkurious joined #nim
12:19:47*jmdaemon quit (Ping timeout: 265 seconds)
12:22:18*xet7 joined #nim
12:26:27NimEventerNew thread by catswhiskers: Reworking "c things" like static const unsigned char clcidx[19] =, see https://forum.nim-lang.org/t/9511
12:29:28FromDiscord<Rika> In reply to @Event Horizon "Would a 2D sequence": That would be 30000 pointer-sizes even if they are empty I believe
12:36:34FromDiscord<coinbase_nft> sent a long message, see http://ix.io/4cn1
12:37:15FromDiscord<Horizon [She/Her]> <@&371760044473319454> ^^
12:37:24FromDiscord<Horizon [She/Her]> In reply to @Rika "That would be 30000": Ah alright
12:54:16*xet7 quit (Quit: Leaving)
13:44:34*derpydoo joined #nim
13:53:56FromDiscord<ChocolettePalette> > No registration fee↵Every time you sign up using your phone number, you pay with your privacy but most importantly you also pay with your soul by supporting people implementing such vile authorization methods
14:01:36*derpydoo quit (Ping timeout: 264 seconds)
14:26:52*kenran quit (Remote host closed the connection)
14:37:57FromDiscord<Phytolizer> sent a code paste, see https://play.nim-lang.org/#ix=4cwm
14:38:48FromDiscord<mratsim> In reply to @gibson "How can I force": https://github.com/SciNim/flambeau/blob/df44de237c3564517f34c99b4797c2f578e21c54/flambeau/raw/cpp/emitters.nim#L3-L13
14:43:10*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:43:10*rockcavera joined #nim
14:43:10*rockcavera quit (Changing host)
14:43:10*rockcavera joined #nim
15:37:12FromDiscord<gibson> @mratsim That doesn't solve the problem? Nim places the typedef for the wrapped `Vector::Iterator` BEFORE any other code in the cpp. It's quite annoying because that's what is causing the problem. `codereordering` does nothing for this, either.
15:37:36FromDiscord<gibson> I did try out making the emit template, and it falls to the same fate.
16:04:45*dnh joined #nim
16:10:20FromDiscord<Horizon [She/Her]> How do i delete the last item in a Nim sequence?
16:11:34FromDiscord<gibson> @Horizon [She/Her] `del` or `delete` or `pop` I think?
16:11:46FromDiscord<gibson> maybe you also want to import `sequtils`
16:11:53FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "How do i delete": ...i'm dumb, i realised i could do `seq.len-1`
16:12:23FromDiscord<Horizon [She/Her]> I was talking about how to specifically delete the last value, since i found out that `myseq.delete(^1)` doesn't work
16:12:25FromDiscord<gibson> Oh reverse indexing in python `[-1]` in nim `[^1]`
16:12:49FromDiscord<Horizon [She/Her]> Imo, it should be allowed since you can do `myseq[^1]`
16:12:57FromDiscord<gibson> Yeah, sounds like an oversight.
16:13:01FromDiscord<Horizon [She/Her]> Yeah Nim doesn't support deleting a value with a backwards index
16:13:41FromDiscord<gibson> I wish the Nim foundation (wait, was that ever made?) could hire someone to just go through and smooth out the std lib.
16:14:27FromDiscord<Horizon [She/Her]> Nimskull exists, they're a fork of Nim that has the goal of making Nim in general, more consistent
16:14:54FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "Imo, it should be": I should also make an issue on GitHub for it, I'll do it in a bit
16:14:58FromDiscord<huantian> In reply to @Event Horizon "I was talking about": Should be easy to make yourself
16:15:02FromDiscord<huantian> Just make an overload
16:15:15FromDiscord<Horizon [She/Her]> Yeah, just thought it was odd, it should be included by default really
16:15:29FromDiscord<huantian> PRs welcome 😛
16:15:33FromDiscord<Horizon [She/Her]> Just makes sense logically
16:15:38FromDiscord<dom96> In reply to @gibson "I wish the Nim": It isn’t a thing unfortunately
16:15:40FromDiscord<Horizon [She/Her]> Lmao
16:16:46*crem quit (Ping timeout: 268 seconds)
16:16:49FromDiscord<gibson> In reply to @Event Horizon "I should also make": I bet you could actually fix it for nearly the same amount of effort.
16:17:20FromDiscord<gibson> (edit) "In reply to @Event Horizon "I should also make": I bet you could actually fix it for nearly the same amount of effort. ... " added ":p"
16:17:27FromDiscord<dom96> Setting up a foundation outside the US is tricky sadly
16:19:07FromDiscord<Horizon [She/Her]> In reply to @gibson "I bet you could": Probably haha
16:19:55FromDiscord<gibson> Oh, I'd forgotten "outside the US" was a requirement. Why was that?
16:20:15FromDiscord<gibson> (edit) "was" => "ius"
16:20:19FromDiscord<gibson> (edit) "ius" => "is"
16:20:26FromDiscord<dom96> I don't think it is a requirement, it's just that "foundations" aren't really a thing in the EU
16:20:34FromDiscord<dom96> charities are I guess the closest thing
16:20:59FromDiscord<dom96> and they don't have the same advantages as US Foundations IIRC
16:21:10FromDiscord<dom96> there is a thread on the forum about it somewhere
16:21:55FromDiscord<gibson> What I'm hearing is that maybe we don't have enough of a senior admin footprint in the US to be able to make this happen? Because someone needs to actually live in the US to make a foundation - is my guess.
16:21:58FromDiscord<Phil> I kinda wish I could have a seq of types
16:22:14FromDiscord<gibson> @Phil other than the any type?
16:22:22FromDiscord<dom96> In reply to @gibson "What I'm hearing is": yeah, I'd say so
16:22:55FromDiscord<Phil> In reply to @gibson "<@180601887916163073> other than the": Yeah, I'd love for the user to be able to go "here is 20 different norm models" and I generate them craptons of code that create webserver routes to administrate these mdoels
16:23:08FromDiscord<Phil> Sadly I can only do "call this proc 20 times, each time with a different model"
16:23:52FromDiscord<gibson> @Phil yeah, best you can do is use OOP - that's actually one of the few cases where OOP rocks.
16:24:20FromDiscord<gibson> (or a giant variant???)
16:24:49FromDiscord<Phil> I'm writing a lib, object variants aren't an option that is intuitive I don't think
16:25:08FromDiscord<Phil> I'd rather let the user call a proc 20 times than force them to write me an object variant
16:25:19FromDiscord<Phil> Which will have double the loc
16:26:04FromDiscord<Horizon [She/Her]> Is there a way to have a sequence type that automatically creates X values as it's accessed? And if it goes beyond a limit, give an error? Don't wanna make a constructor for my type if avoidable
16:26:12FromDiscord<Horizon [She/Her]> In reply to @Isofruit "I'm writing a lib,": Can't macros do the job?
16:26:20FromDiscord<Horizon [She/Her]> That's probably overkill tho
16:26:39FromDiscord<Phil> In reply to @Event Horizon "Can't macros do the": They might, but I am but an idiot
16:27:00FromDiscord<Horizon [She/Her]> Can't you make a generic varargs param or something? Or use the `any` type and check if it's a valid type?
16:27:09FromDiscord<Horizon [She/Her]> (That your program accepts)
16:27:51FromDiscord<gibson> @dom96 that's unfortunate. Well, I'm trying my best to spread the word of Nim here in the US every time someone excitedly starts talking about Carbon, Val, CPP2, etc. where I work 🙂
16:29:27FromDiscord<Horizon [She/Her]> Val?
16:30:50FromDiscord<gibson> @Horizon [She/Her] yeah you can look it up. But the really neat one is CPP2 by Herb Sutter. Spoiler, it's very much like Nim.
16:31:24FromDiscord<Horizon [She/Her]> Oh hm, neat
16:50:20*crem joined #nim
16:52:23FromDiscord<gibson> @mratsim Oh my god, "TYPESECTION" is a magic string that Nim understands? I did NOT see that one coming. You were right, and that solves my problem.
16:53:05*wallabra_ joined #nim
16:53:15FromDiscord<gibson> And there it is in the manual - it flew right by men.
16:53:20FromDiscord<gibson> (edit) "men." => "me."
16:55:19*wallabra quit (Ping timeout: 252 seconds)
16:55:19*wallabra_ is now known as wallabra
16:59:49FromDiscord<Takemichi Hanagaki> sent a long message, see http://ix.io/4cwP
17:01:02FromDiscord<Takemichi Hanagaki> I think that Nim have a good chance to grow.↵The other languages doesn't provide what Nim does.
17:03:57FromDiscord<gibson> Also, all those others in the list are still heavily in early development, but Nim is here now and covers most of their design goals and features. (Beating the dead horse): It would be great to somehow get more corporate backing -> dev base like what Carbon achieved in its short life so far.
17:05:17FromDiscord<Takemichi Hanagaki> This is true!
17:05:43FromDiscord<Horizon [She/Her]> How would i increment and decrement memory pointers?
17:06:05FromDiscord<gibson> @Horizon [She/Her] case to int, increment, cast back to pointer.
17:06:22FromDiscord<Horizon [She/Her]> How would i get empty pointers then, in that case?
17:08:54FromDiscord<gibson> `create`?
17:09:29FromDiscord<gibson> sorry, `createU` is zeroed out
17:09:36FromDiscord<Horizon [She/Her]> Ah thanks!
17:10:02FromDiscord<enthus1ast> What is an empty pointer?
17:10:14FromDiscord<enthus1ast> O e that points to 0?
17:10:15FromDiscord<gibson> Also, don't trust `resize` because it's not the same as the C resize - misleading.
17:10:29FromDiscord<Horizon [She/Her]> Also what would the type be for an empty pointer? Aha
17:10:35FromDiscord<Horizon [She/Her]> In reply to @enthus1ast "O e that points": Yeah
17:10:41FromDiscord<Horizon [She/Her]> In reply to @gibson "Also, don't trust `resize`": Ah alright!
17:10:46FromDiscord<enthus1ast> Then just set it to 0
17:12:08FromDiscord<Horizon [She/Her]> Using `ptr int` for the type
17:12:45FromDiscord<gibson> In reply to @Event Horizon "Also what would the": Whatever you want to use the pointer for.
17:12:46FromDiscord<Horizon [She/Her]> Invalid type
17:13:12FromDiscord<Horizon [She/Her]> `/data/data/com.termux/files/home/NimBrainFuck/main.nim(39, 33) Error: type mismatch: got 'seq[ptr int]' for 'newSeq(maxCells)' but expected 'seq[int]'`
17:14:02FromDiscord<Evissim> Is there a way to set stride length for `for`s? I thought it was something like `for i in 0..length, 2:` but now I can't find an example
17:14:02FromDiscord<gibson> Looks like you didn't convert all the code to expecting `seq[ptr int]`
17:14:33FromDiscord<Horizon [She/Her]> Oh that's make sense
17:14:35FromDiscord<gibson> @Evissim `countUp` `countDown`
17:14:35FromDiscord<Horizon [She/Her]> That'd
17:15:08FromDiscord<Evissim> In reply to @gibson "<@658029954017001473> `countUp` `countDown`": Thank you!
17:17:24FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cwY
17:17:45FromDiscord<Horizon [She/Her]> Is this not doable? Do i need to manually set the pointer value?
17:19:24*wallabra_ joined #nim
17:20:59*wallabra quit (Ping timeout: 268 seconds)
17:21:12*wallabra_ is now known as wallabra
17:21:18FromDiscord<gibson> In short you need to cast your `ptr cell` (or whatever it is) to `ptr int` instead, then it would have an address you can pass. Instead, when you cast to an int, you get back a temporary value.
17:22:41FromDiscord<gibson> I gather (lol) you basically want to "sometimes treat this thing as a cell and sometimes treat it as an int" and for that you need pointers all the time.
17:22:55FromDiscord<Horizon [She/Her]> Ah alright, thanks!
17:24:23FromDiscord<Horizon [She/Her]> In reply to @gibson "I gather (lol) you": Yeah, I'm just messing around with the BrainFuck specification to make my code conform more haha
17:32:07FromDiscord<Horizon [She/Her]> https://haste.powercord.dev/ojihufolan
17:32:29FromDiscord<Horizon [She/Her]> Unsure why I'm getting this error: `/data/data/com.termux/files/home/NimBrainFuck/main.nim(39, 33) Error: type mismatch: got 'seq[ptr int]' for 'newSeq(maxCells)' but expected 'seq[int]'`
17:32:30FromDiscord<gibson> Neat FYI: you could use a Variant[cell,int] and force changing its type at runtime, but it's slightly tricky and feels dirty. Of course, so is handling raw pointers, so 🤷‍♂️
17:33:03FromDiscord<Horizon [She/Her]> I'm just using an ptr int currently, but probably will look at that if i wanna do more stuff
17:33:38FromDiscord<gibson> Is `newSeq` your own proc?
17:34:43FromDiscord<Horizon [She/Her]> Nope, built-in Nim procedure for creating sequences with preinitialised values
17:36:22FromDiscord<Horizon [She/Her]> Oh my god I'm so dumb
17:36:38FromDiscord<gibson> newSeq[ptr int](maxCells)?
17:37:01FromDiscord<gibson> You need to tell it what type you want back.
17:37:18FromDiscord<Horizon [She/Her]> I figured out the issue
17:37:34FromDiscord<Horizon [She/Her]> I didn't change the `cells` field to the type `ptr int`
17:37:40FromDiscord<Horizon [She/Her]> It was still `int`
17:39:01FromDiscord<Horizon [She/Her]> In reply to @gibson "You need to tell": Wdym?
17:40:44*derpydoo joined #nim
17:40:53FromDiscord<gibson> `newSeq(maxCells)` is not valid and will produce a compiler error.
17:41:21FromDiscord<gibson> `var s = newSeq(maxCells)` is not valid, for instance.
17:43:12FromDiscord<Horizon [She/Her]> Yeah, I'm doing `newSeq[ptr int](maxCells)`
17:43:19FromDiscord<Horizon [She/Her]> It's valid and I've used it before
17:43:52FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cx1
17:45:24FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "Yeah, I'm doing `newSeq[ptr": I think it's because it's literally a pointer to null, probably
17:45:32FromDiscord<gibson> In reply to @Event Horizon "Yeah, I'm doing `newSeq[ptr": Oh good, that's not what you showed before! 💦
17:46:11FromDiscord<Horizon [She/Her]> In reply to @gibson "Oh good, that's not": It is? On line 39
17:46:32*jmdaemon joined #nim
17:47:27FromDiscord<gibson> In reply to @Event Horizon "Unsure why I'm getting": This is all you shared.
17:48:22FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "https://haste.powercord.dev/ojihufolan": I shared the code here :p
17:48:22FromDiscord<gibson> Anyway, now you get to learn GDB! because pointers thar be dragons yay.
17:48:30FromDiscord<Horizon [She/Her]> In reply to @gibson "Anyway, now you get": Oh god xD
17:48:38FromDiscord<gibson> In reply to @Event Horizon "I shared the code": Oh I nvr saw that, apologies.
17:48:53FromDiscord<Horizon [She/Her]> Fair aha
17:50:51FromDiscord<Horizon [She/Her]> Aha! Fixed!
17:51:21FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cx2
17:51:22FromDiscord<Horizon [She/Her]> Didn't even have to use the debugger haha
19:01:48*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:06:21*dnh joined #nim
19:20:59*estiquelapice quit ()
19:51:23*xet7 joined #nim
20:14:27FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cxi
20:21:51FromDiscord<Elegantbeef> `{.error: "norlogue requires you to specify which database type you use via a defined flag. Please specify either '-d:sqlite' or '-d:postgres'".}`
20:23:26FromDiscord<Horizon [She/Her]> Is there a clean way to quit a program with an optional way to handle it so it doesn't trigger a quit?
20:23:39FromDiscord<Horizon [She/Her]> ...exceptions exist
20:23:40FromDiscord<Horizon [She/Her]> I'm dumb
20:28:19FromDiscord<albassort> @amyyyy https://github.com/planety/prologue
20:28:27FromDiscord<albassort> wrong server
20:28:29FromDiscord<albassort> fuck
20:43:54FromDiscord<Phil> In reply to @Elegantbeef "`{.error: "norlogue requires you": So basically, if I need the user to tell me which module to use for compilation it's them giving me compiler flags or choosing an entirely different approach (like generating entire modules via templates where you pass in a lib I guess) ?
20:44:07FromDiscord<Phil> Though I'll definitely take that nice error pragma!
20:48:30FromDiscord<Elegantbeef> Is there anyway you can just use types though
20:48:59FromDiscord<Elegantbeef> I guess not since you only want to import the postgress/sqlite modules if they want them
20:55:30FromDiscord<Phil> Pretty much, there's basically 2 places where db interactions happen: Their project and my lib at that point
20:55:56FromDiscord<Phil> And I can't hook into the hosts project place of db interaction because I can't know what or how they do things other than that they use norm
20:56:35FromDiscord<Phil> So I need them to tell me what lib they use for db interaction, which is either norm/sqlite or norm/postgres (atop of which I have setup my 2 service modules)
20:58:47FromDiscord<JustADigimon (she/her)> sent a code paste, see https://play.nim-lang.org/#ix=4cxp
21:01:06FromDiscord<Phil> In reply to @JustADigimon (she/her) "Hey! so uh im": You defined a proc in the config module called "readJsonConfig".↵That proc states it takes in a parameter "configCtx" of type string.↵You then call that proc in your main nim file and don't pass it a parameter 😛
21:01:24FromDiscord<Phil> (edit) removed "😛"
21:02:10FromDiscord<JustADigimon (she/her)> oh
21:02:12FromDiscord<JustADigimon (she/her)> im dumb
21:02:40FromDiscord<Phil> That's where the type mismatch comes from.↵The error reads pretty much like this:↵"You put nothing in, the procs with the closest matching signatures are this one here, did you mean this one? If so, adjust how you're calling things"
21:02:50FromDiscord<Phil> (edit) "in," => "in (the <>),"
21:03:23FromDiscord<Phil> In reply to @JustADigimon (she/her) "im dumb": We all have our silly moments, happens daily ^^
21:04:17FromDiscord<Phytolizer> In reply to @Phytolizer "i have a q": hey can anyone help me understand this snippet?
21:04:25*kenran joined #nim
21:04:47FromDiscord<Phytolizer> i understand what it does but i don't understand why the closures need `ticker: int` as an argument
21:12:07FromDiscord<JustADigimon (she/her)> In reply to @Isofruit "We all have our": ye, btw, im going from Go and Java, like i chose Nim becuz i used it like when it was some type of 1.0.0 version or older and becuz i was bored 😗
21:15:56FromDiscord<Horizon [She/Her]> Nim is great
21:16:31FromDiscord<Horizon [She/Her]> Also we have a small example project of using Go with Nim, but i think there's a way to do it better without exporting types manually sooo
21:26:40FromDiscord<JustADigimon (she/her)> is there way that i could open a file in the default text editor?
21:26:45FromDiscord<JustADigimon (she/her)> (edit) "editor?" => "editor of user?"
21:27:50FromDiscord<JustADigimon (she/her)> or nvm
21:37:15*rockcavera quit (Read error: Connection reset by peer)
21:37:34*rockcavera joined #nim
21:37:34*rockcavera quit (Changing host)
21:37:34*rockcavera joined #nim
21:45:38FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cxx
21:45:51FromDiscord<Horizon [She/Her]> been poking around for a while but just, do not understand why it keeps going out of bounds
21:55:23*kenran quit (Remote host closed the connection)
21:55:57FromDiscord<Elegantbeef> Line 92
22:13:49FromDiscord<Horizon [She/Her]> Yeah ik, but literally have a check there? The code to decrement shouldn't happen
22:14:23FromDiscord<Horizon [She/Her]> But it's fine, i'll fix it another day
22:37:20*derpydoo quit (Quit: derpydoo)
22:54:28*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:08:23*xet7 quit (Remote host closed the connection)
23:27:28FromDiscord<Rika> In reply to @Phytolizer "i understand what it": https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-firstminusclass-iterators
23:27:35FromDiscord<Rika> Explained there
23:28:21FromDiscord<Phytolizer> In reply to @Rika "https://nim-lang.org/docs/manual.html#iterators-and": i must have missed the explanation, my snippet is from that exact section
23:28:59FromDiscord<Rika> It’s explained lower there
23:29:03FromDiscord<Rika> “Closure iterators are resumable functions and so one has to provide the arguments to every call. To get around this limitation one can capture parameters of an outer factory proc:”
23:29:25FromDiscord<Phytolizer> i see, but the iterator doesn't use the arguments which is why im confused
23:29:46FromDiscord<Rika> Even if it doesn’t use the arguments you made it so that it has an argument so you have to pass it nonetheless
23:29:58FromDiscord<Phytolizer> ok just a confusing example then ig :P
23:30:13FromDiscord<Phytolizer> thanks
23:30:25FromDiscord<Rika> Probably was edited a few times
23:30:33FromDiscord<Rika> And the original use for ticker was removed
23:30:38FromDiscord<Phytolizer> yep that seems likely