00:03:26 | FromDiscord | <Rika> So many wow |
00:05:38 | FromDiscord | <Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuq |
00:05:48 | FromDiscord | <Rika> What if my wallet wasn’t 0 BTC |
00:06:14 | FromDiscord | <Elegantbeef> Atleast 0.15 btc in 9.3 hours |
00:06:32 | FromDiscord | <Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk |
00:06:45 | FromDiscord | <Elegantbeef> The worst part will always be this isnt a bot spamming |
00:07:11 | FromDiscord | <Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk |
00:07:28 | FromDiscord | <Elegantbeef> I think i'll pass thanks though |
00:07:46 | FromDiscord | <Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk |
00:08:21 | FromDiscord | <Elegantbeef> Lol they finally left |
00:08:43 | FromDiscord | <RattleyCooper> What is `internal error: inconsistent environment type`? |
00:08:49 | FromDiscord | <Elegantbeef> "My life has been fulfilled being a scummy spammer, I must go my people need me" |
00:08:51 | FromDiscord | <Elegantbeef> A compiler bug |
00:08:57 | FromDiscord | <RattleyCooper> oof |
00:09:13 | FromDiscord | <Elegantbeef> Seems like a closure issue, what's the code you've got |
00:09:25 | FromDiscord | <Elegantbeef> Can always use a debug compiler to see the real cause |
00:10:00 | FromDiscord | <RattleyCooper> I'm using wNim/wAuto and trying to iterate over all the window handles |
00:10:53 | FromDiscord | <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:54 | FromDiscord | <Rika> Anything with internal error is essentially a compiler issue |
00:11:04 | FromDiscord | <Rika> I’m not really aware of any case where it isn’t xd |
00:11:50 | FromDiscord | <Elegantbeef> It always is either a case of 'Compiler doesnt support valid code' or 'Compiler accepts invalid code' |
00:13:37 | FromDiscord | <RattleyCooper> I think it's because I'm using `wNim` and `wAuto` together |
00:13:56 | FromDiscord | <Elegantbeef> Using libraries together shouldnt cause an isssue |
00:15:07 | FromDiscord | <RattleyCooper> Well using the `allWindows` iterator within a `Button` callback will cause a compiler error |
00:15:30 | FromDiscord | <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:07 | FromDiscord | <Elegantbeef> What is the type of the Button callback? |
00:16:44 | FromDiscord | <RattleyCooper> `wEvent_Button` |
00:16:54 | FromDiscord | <Elegantbeef> No what's the real type |
00:17:50 | FromDiscord | <RattleyCooper> `wButton`? |
00:18:20 | FromDiscord | <Elegantbeef> It's likely a type alias to a procedure |
00:20:39 | FromDiscord | <RattleyCooper> Like the type definition of the callback? |
00:20:48 | FromDiscord | <Elegantbeef> Yes |
00:22:53 | FromDiscord | <RattleyCooper> Oh it's just a `proc ()` or `proc (event: wEvent)` |
00:23:02 | FromDiscord | <Elegantbeef> Ok so it's a closure |
00:23:35 | FromDiscord | <Elegantbeef> Does it automatically wrap teh `proc()` with `proc(event: wEvent)`? |
00:24:35 | FromDiscord | <Elegantbeef> I just assume there is some funky closure thing going on |
00:25:23 | FromDiscord | <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:47 | FromDiscord | <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:16 | FromDiscord | <Elegantbeef> Yea i'm just curious how they handle the fact it can be either |
00:27:34 | FromDiscord | <Elegantbeef> If they wrap it ina closure that does `proc(_: wEvent) = myProc()` or what |
00:29:41 | FromDiscord | <RattleyCooper> https://github.com/khchen/wNim/blob/320b0a0282f4b7e77df17d5066896983c27e35f5/wNim/private/wTypes.nim#L141 |
00:30:58 | FromDiscord | <Elegantbeef> Ok so it's just `poc(event: wEvent)` |
00:31:12 | FromDiscord | <Elegantbeef> So then how do you declare yours? |
00:31:20 | FromDiscord | <RattleyCooper> There is another one you can use defined right under it. They both work |
00:31:56 | FromDiscord | <Elegantbeef> I wonder if that's the problem then |
00:32:16 | FromDiscord | <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:29 | FromDiscord | <Elegantbeef> Yea i'm just trying to figure out what causes it |
00:34:42 | FromDiscord | <Elegantbeef> Dont really see anything that'd cause it |
00:39:47 | FromDiscord | <RattleyCooper> Well that's no fun lol |
00:42:19 | FromDiscord | <RattleyCooper> What is the easiest way for communicating between processes in nim? |
00:44:19 | FromDiscord | <Elegantbeef> Sockets are easy |
00:44:27 | FromDiscord | <Elegantbeef> Stdin/stdout is easy |
00:48:45 | FromDiscord | <RattleyCooper> Yeah imma just use nettyrpc xD |
00:53:16 | FromDiscord | <albassort> why isn't beef a mod |
00:53:23 | FromDiscord | <albassort> hes almost always here and is extremely mature |
00:53:40 | FromDiscord | <albassort> and is a face of community |
00:53:45 | FromDiscord | <albassort> and is respected and looked up to |
00:54:18 | FromDiscord | <albassort> and is always helpful and compassionate |
00:55:57 | FromDiscord | <Elegantbeef> > compassionate↵> Doubt |
00:56:09 | FromDiscord | <RattleyCooper> I have learned a lot from the beef lol. Many thanks, seriously |
00:56:52 | FromDiscord | <albassort> In reply to @Elegantbeef "> compassionate > Doubt": you insult me less than Yard on average |
00:57:03 | FromDiscord | <albassort> which isn't saying much but still |
00:57:04 | FromDiscord | <Elegantbeef> Who are you? |
00:57:35 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1027746478111862834/unknown.png |
00:58:09 | FromDiscord | <albassort> i had the username retkid#9135 for a few years |
00:58:16 | FromDiscord | <huantian> ohhhhhhhh |
00:58:29 | FromDiscord | <Elegantbeef> Jesus christ you people need to pick a name and stick with it 😄 |
00:58:42 | FromDiscord | <Elegantbeef> Forrest also changes their name like 100 times per day |
00:59:32 | FromDiscord | <albassort> In reply to @Elegantbeef "Jesus christ you people": https://hastebin.com/uremuwoxit |
00:59:39 | FromDiscord | <albassort> i wrote a little thing about my name change |
00:59:42 | FromDiscord | <Elegantbeef> Nice dead link |
00:59:56 | FromDiscord | <albassort> kek |
01:00:00 | FromDiscord | <albassort> well i guess its dead |
01:00:06 | * | genpaku quit (Remote host closed the connection) |
01:00:31 | FromDiscord | <albassort> basically i, i had a good reason to change it |
01:00:49 | * | genpaku joined #nim |
01:00:57 | FromDiscord | <Rika> I also wondered who you were |
01:01:01 | FromDiscord | <Rika> Since it was a dead link |
01:01:41 | FromDiscord | <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:48 | FromDiscord | <albassort> and i want to move away from self hatred |
01:02:09 | FromDiscord | <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:25 | FromDiscord | <Patitotective> In reply to @Elegantbeef "Jesus christ you people": Elegantsteak |
01:45:55 | FromDiscord | <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:16 | FromDiscord | <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:46 | FromDiscord | <Elegantbeef> `Window(myHwnd)` though generally there exist procedures for htis |
03:02:04 | FromDiscord | <Elegantbeef> The entire point of distinct is that the value should be a known type of value |
03:02:40 | FromDiscord | <RattleyCooper> It is, it's an int |
03:02:53 | FromDiscord | <RattleyCooper> int->HANDLE->HWND->Window |
03:03:35 | FromDiscord | <Elegantbeef> So then get converting |
03:06:06 | FromDiscord | <RattleyCooper> I'm either missing something or the `Window` procedure from wNim is interfering |
03:06:36 | FromDiscord | <Elegantbeef> You may have to d o`winim.Window(myHwnd)` then |
03:08:19 | FromDiscord | <Elegantbeef> Without the compiler error i cannot say much |
03:09:26 | FromDiscord | <RattleyCooper> oml, thank you haha |
03:51:41 | * | xcodz-dot joined #nim |
03:53:16 | xcodz-dot | hello, 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:49 | FromDiscord | <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:02 | NimEventer | New 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:31 | FromDiscord | <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:42 | FromDiscord | <impbox [ftsf]> is there a way I can get (at compile time) the offset of a field in an object? |
09:31:39 | FromDiscord | <impbox [ftsf]> eg `var offsetOfFoo = offsetOf(MyType.foo)` |
09:31:51 | FromDiscord | <impbox [ftsf]> ohh.. offsetOf exists |
09:31:52 | FromDiscord | <impbox [ftsf]> wow |
09:33:09 | FromDiscord | <impbox [ftsf]> that was easy |
09:33:11 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=4cvC |
09:34:14 | FromDiscord | <Rika> Lol |
09:34:50 | FromDiscord | <Rika> Always funny when I see someone ask a question with a code example and the answers just “have you tried it?” |
10:06:06 | FromDiscord | <ChocolettePalette> offsetOf could also be a rm -rf /\ patch |
10:06:20 | FromDiscord | <ChocolettePalette> So it's good they asked |
10:16:51 | * | dnh joined #nim |
11:10:00 | NimEventer | New thread by drkameleon: Selecting/installing older nim package on FreeBSD, see https://forum.nim-lang.org/t/9510 |
11:13:00 | FromDiscord | <gibson> sent a code paste, see https://paste.rs/F4s |
11:14:03 | FromDiscord | <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:17 | FromDiscord | <gibson> (edit) "ignore" => "ignored" |
11:15:32 | FromDiscord | <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:17 | FromDiscord | <Horizon [She/Her]> Hmmmmm should i port https://github.com/wasm3/wasm3 to Nim? |
11:38:27 | FromDiscord | <Horizon [She/Her]> No actual goal besides me just being bored lmao |
11:38:51 | FromDiscord | <Horizon [She/Her]> Hm nah |
11:38:59 | FromDiscord | <Horizon [She/Her]> I'll do a basic brainfuck interpreter |
11:47:23 | FromDiscord | <Horizon [She/Her]> Would a 2D sequence in Nim that's just empty, use much memory? For 30000 sequences |
11:48:52 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> [I wrote my own snake game in Nim](https://codeberg.org/annaaurora/snekim). Is the code good? Any critique? |
11:51:06 | FromDiscord | <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:27 | NimEventer | New thread by catswhiskers: Reworking "c things" like static const unsigned char clcidx[19] =, see https://forum.nim-lang.org/t/9511 |
12:29:28 | FromDiscord | <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:34 | FromDiscord | <coinbase_nft> sent a long message, see http://ix.io/4cn1 |
12:37:15 | FromDiscord | <Horizon [She/Her]> <@&371760044473319454> ^^ |
12:37:24 | FromDiscord | <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:56 | FromDiscord | <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:57 | FromDiscord | <Phytolizer> sent a code paste, see https://play.nim-lang.org/#ix=4cwm |
14:38:48 | FromDiscord | <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:12 | FromDiscord | <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:36 | FromDiscord | <gibson> I did try out making the emit template, and it falls to the same fate. |
16:04:45 | * | dnh joined #nim |
16:10:20 | FromDiscord | <Horizon [She/Her]> How do i delete the last item in a Nim sequence? |
16:11:34 | FromDiscord | <gibson> @Horizon [She/Her] `del` or `delete` or `pop` I think? |
16:11:46 | FromDiscord | <gibson> maybe you also want to import `sequtils` |
16:11:53 | FromDiscord | <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:23 | FromDiscord | <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:25 | FromDiscord | <gibson> Oh reverse indexing in python `[-1]` in nim `[^1]` |
16:12:49 | FromDiscord | <Horizon [She/Her]> Imo, it should be allowed since you can do `myseq[^1]` |
16:12:57 | FromDiscord | <gibson> Yeah, sounds like an oversight. |
16:13:01 | FromDiscord | <Horizon [She/Her]> Yeah Nim doesn't support deleting a value with a backwards index |
16:13:41 | FromDiscord | <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:27 | FromDiscord | <Horizon [She/Her]> Nimskull exists, they're a fork of Nim that has the goal of making Nim in general, more consistent |
16:14:54 | FromDiscord | <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:58 | FromDiscord | <huantian> In reply to @Event Horizon "I was talking about": Should be easy to make yourself |
16:15:02 | FromDiscord | <huantian> Just make an overload |
16:15:15 | FromDiscord | <Horizon [She/Her]> Yeah, just thought it was odd, it should be included by default really |
16:15:29 | FromDiscord | <huantian> PRs welcome 😛 |
16:15:33 | FromDiscord | <Horizon [She/Her]> Just makes sense logically |
16:15:38 | FromDiscord | <dom96> In reply to @gibson "I wish the Nim": It isn’t a thing unfortunately |
16:15:40 | FromDiscord | <Horizon [She/Her]> Lmao |
16:16:46 | * | crem quit (Ping timeout: 268 seconds) |
16:16:49 | FromDiscord | <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:20 | FromDiscord | <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:27 | FromDiscord | <dom96> Setting up a foundation outside the US is tricky sadly |
16:19:07 | FromDiscord | <Horizon [She/Her]> In reply to @gibson "I bet you could": Probably haha |
16:19:55 | FromDiscord | <gibson> Oh, I'd forgotten "outside the US" was a requirement. Why was that? |
16:20:15 | FromDiscord | <gibson> (edit) "was" => "ius" |
16:20:19 | FromDiscord | <gibson> (edit) "ius" => "is" |
16:20:26 | FromDiscord | <dom96> I don't think it is a requirement, it's just that "foundations" aren't really a thing in the EU |
16:20:34 | FromDiscord | <dom96> charities are I guess the closest thing |
16:20:59 | FromDiscord | <dom96> and they don't have the same advantages as US Foundations IIRC |
16:21:10 | FromDiscord | <dom96> there is a thread on the forum about it somewhere |
16:21:55 | FromDiscord | <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:58 | FromDiscord | <Phil> I kinda wish I could have a seq of types |
16:22:14 | FromDiscord | <gibson> @Phil other than the any type? |
16:22:22 | FromDiscord | <dom96> In reply to @gibson "What I'm hearing is": yeah, I'd say so |
16:22:55 | FromDiscord | <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:08 | FromDiscord | <Phil> Sadly I can only do "call this proc 20 times, each time with a different model" |
16:23:52 | FromDiscord | <gibson> @Phil yeah, best you can do is use OOP - that's actually one of the few cases where OOP rocks. |
16:24:20 | FromDiscord | <gibson> (or a giant variant???) |
16:24:49 | FromDiscord | <Phil> I'm writing a lib, object variants aren't an option that is intuitive I don't think |
16:25:08 | FromDiscord | <Phil> I'd rather let the user call a proc 20 times than force them to write me an object variant |
16:25:19 | FromDiscord | <Phil> Which will have double the loc |
16:26:04 | FromDiscord | <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:12 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "I'm writing a lib,": Can't macros do the job? |
16:26:20 | FromDiscord | <Horizon [She/Her]> That's probably overkill tho |
16:26:39 | FromDiscord | <Phil> In reply to @Event Horizon "Can't macros do the": They might, but I am but an idiot |
16:27:00 | FromDiscord | <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:09 | FromDiscord | <Horizon [She/Her]> (That your program accepts) |
16:27:51 | FromDiscord | <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:27 | FromDiscord | <Horizon [She/Her]> Val? |
16:30:50 | FromDiscord | <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:24 | FromDiscord | <Horizon [She/Her]> Oh hm, neat |
16:50:20 | * | crem joined #nim |
16:52:23 | FromDiscord | <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:15 | FromDiscord | <gibson> And there it is in the manual - it flew right by men. |
16:53:20 | FromDiscord | <gibson> (edit) "men." => "me." |
16:55:19 | * | wallabra quit (Ping timeout: 252 seconds) |
16:55:19 | * | wallabra_ is now known as wallabra |
16:59:49 | FromDiscord | <Takemichi Hanagaki> sent a long message, see http://ix.io/4cwP |
17:01:02 | FromDiscord | <Takemichi Hanagaki> I think that Nim have a good chance to grow.↵The other languages doesn't provide what Nim does. |
17:03:57 | FromDiscord | <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:17 | FromDiscord | <Takemichi Hanagaki> This is true! |
17:05:43 | FromDiscord | <Horizon [She/Her]> How would i increment and decrement memory pointers? |
17:06:05 | FromDiscord | <gibson> @Horizon [She/Her] case to int, increment, cast back to pointer. |
17:06:22 | FromDiscord | <Horizon [She/Her]> How would i get empty pointers then, in that case? |
17:08:54 | FromDiscord | <gibson> `create`? |
17:09:29 | FromDiscord | <gibson> sorry, `createU` is zeroed out |
17:09:36 | FromDiscord | <Horizon [She/Her]> Ah thanks! |
17:10:02 | FromDiscord | <enthus1ast> What is an empty pointer? |
17:10:14 | FromDiscord | <enthus1ast> O e that points to 0? |
17:10:15 | FromDiscord | <gibson> Also, don't trust `resize` because it's not the same as the C resize - misleading. |
17:10:29 | FromDiscord | <Horizon [She/Her]> Also what would the type be for an empty pointer? Aha |
17:10:35 | FromDiscord | <Horizon [She/Her]> In reply to @enthus1ast "O e that points": Yeah |
17:10:41 | FromDiscord | <Horizon [She/Her]> In reply to @gibson "Also, don't trust `resize`": Ah alright! |
17:10:46 | FromDiscord | <enthus1ast> Then just set it to 0 |
17:12:08 | FromDiscord | <Horizon [She/Her]> Using `ptr int` for the type |
17:12:45 | FromDiscord | <gibson> In reply to @Event Horizon "Also what would the": Whatever you want to use the pointer for. |
17:12:46 | FromDiscord | <Horizon [She/Her]> Invalid type |
17:13:12 | FromDiscord | <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:02 | FromDiscord | <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:02 | FromDiscord | <gibson> Looks like you didn't convert all the code to expecting `seq[ptr int]` |
17:14:33 | FromDiscord | <Horizon [She/Her]> Oh that's make sense |
17:14:35 | FromDiscord | <gibson> @Evissim `countUp` `countDown` |
17:14:35 | FromDiscord | <Horizon [She/Her]> That'd |
17:15:08 | FromDiscord | <Evissim> In reply to @gibson "<@658029954017001473> `countUp` `countDown`": Thank you! |
17:17:24 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cwY |
17:17:45 | FromDiscord | <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:18 | FromDiscord | <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:41 | FromDiscord | <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:55 | FromDiscord | <Horizon [She/Her]> Ah alright, thanks! |
17:24:23 | FromDiscord | <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:07 | FromDiscord | <Horizon [She/Her]> https://haste.powercord.dev/ojihufolan |
17:32:29 | FromDiscord | <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:30 | FromDiscord | <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:03 | FromDiscord | <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:38 | FromDiscord | <gibson> Is `newSeq` your own proc? |
17:34:43 | FromDiscord | <Horizon [She/Her]> Nope, built-in Nim procedure for creating sequences with preinitialised values |
17:36:22 | FromDiscord | <Horizon [She/Her]> Oh my god I'm so dumb |
17:36:38 | FromDiscord | <gibson> newSeq[ptr int](maxCells)? |
17:37:01 | FromDiscord | <gibson> You need to tell it what type you want back. |
17:37:18 | FromDiscord | <Horizon [She/Her]> I figured out the issue |
17:37:34 | FromDiscord | <Horizon [She/Her]> I didn't change the `cells` field to the type `ptr int` |
17:37:40 | FromDiscord | <Horizon [She/Her]> It was still `int` |
17:39:01 | FromDiscord | <Horizon [She/Her]> In reply to @gibson "You need to tell": Wdym? |
17:40:44 | * | derpydoo joined #nim |
17:40:53 | FromDiscord | <gibson> `newSeq(maxCells)` is not valid and will produce a compiler error. |
17:41:21 | FromDiscord | <gibson> `var s = newSeq(maxCells)` is not valid, for instance. |
17:43:12 | FromDiscord | <Horizon [She/Her]> Yeah, I'm doing `newSeq[ptr int](maxCells)` |
17:43:19 | FromDiscord | <Horizon [She/Her]> It's valid and I've used it before |
17:43:52 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cx1 |
17:45:24 | FromDiscord | <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:32 | FromDiscord | <gibson> In reply to @Event Horizon "Yeah, I'm doing `newSeq[ptr": Oh good, that's not what you showed before! 💦 |
17:46:11 | FromDiscord | <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:27 | FromDiscord | <gibson> In reply to @Event Horizon "Unsure why I'm getting": This is all you shared. |
17:48:22 | FromDiscord | <Horizon [She/Her]> In reply to @Event Horizon "https://haste.powercord.dev/ojihufolan": I shared the code here :p |
17:48:22 | FromDiscord | <gibson> Anyway, now you get to learn GDB! because pointers thar be dragons yay. |
17:48:30 | FromDiscord | <Horizon [She/Her]> In reply to @gibson "Anyway, now you get": Oh god xD |
17:48:38 | FromDiscord | <gibson> In reply to @Event Horizon "I shared the code": Oh I nvr saw that, apologies. |
17:48:53 | FromDiscord | <Horizon [She/Her]> Fair aha |
17:50:51 | FromDiscord | <Horizon [She/Her]> Aha! Fixed! |
17:51:21 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cx2 |
17:51:22 | FromDiscord | <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:27 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cxi |
20:21:51 | FromDiscord | <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:26 | FromDiscord | <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:39 | FromDiscord | <Horizon [She/Her]> ...exceptions exist |
20:23:40 | FromDiscord | <Horizon [She/Her]> I'm dumb |
20:28:19 | FromDiscord | <albassort> @amyyyy https://github.com/planety/prologue |
20:28:27 | FromDiscord | <albassort> wrong server |
20:28:29 | FromDiscord | <albassort> fuck |
20:43:54 | FromDiscord | <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:07 | FromDiscord | <Phil> Though I'll definitely take that nice error pragma! |
20:48:30 | FromDiscord | <Elegantbeef> Is there anyway you can just use types though |
20:48:59 | FromDiscord | <Elegantbeef> I guess not since you only want to import the postgress/sqlite modules if they want them |
20:55:30 | FromDiscord | <Phil> Pretty much, there's basically 2 places where db interactions happen: Their project and my lib at that point |
20:55:56 | FromDiscord | <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:35 | FromDiscord | <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:47 | FromDiscord | <JustADigimon (she/her)> sent a code paste, see https://play.nim-lang.org/#ix=4cxp |
21:01:06 | FromDiscord | <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:24 | FromDiscord | <Phil> (edit) removed "😛" |
21:02:10 | FromDiscord | <JustADigimon (she/her)> oh |
21:02:12 | FromDiscord | <JustADigimon (she/her)> im dumb |
21:02:40 | FromDiscord | <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:50 | FromDiscord | <Phil> (edit) "in," => "in (the <>)," |
21:03:23 | FromDiscord | <Phil> In reply to @JustADigimon (she/her) "im dumb": We all have our silly moments, happens daily ^^ |
21:04:17 | FromDiscord | <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:47 | FromDiscord | <Phytolizer> i understand what it does but i don't understand why the closures need `ticker: int` as an argument |
21:12:07 | FromDiscord | <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:56 | FromDiscord | <Horizon [She/Her]> Nim is great |
21:16:31 | FromDiscord | <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:40 | FromDiscord | <JustADigimon (she/her)> is there way that i could open a file in the default text editor? |
21:26:45 | FromDiscord | <JustADigimon (she/her)> (edit) "editor?" => "editor of user?" |
21:27:50 | FromDiscord | <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:38 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cxx |
21:45:51 | FromDiscord | <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:57 | FromDiscord | <Elegantbeef> Line 92 |
22:13:49 | FromDiscord | <Horizon [She/Her]> Yeah ik, but literally have a check there? The code to decrement shouldn't happen |
22:14:23 | FromDiscord | <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:28 | FromDiscord | <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:35 | FromDiscord | <Rika> Explained there |
23:28:21 | FromDiscord | <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:59 | FromDiscord | <Rika> It’s explained lower there |
23:29:03 | FromDiscord | <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:25 | FromDiscord | <Phytolizer> i see, but the iterator doesn't use the arguments which is why im confused |
23:29:46 | FromDiscord | <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:58 | FromDiscord | <Phytolizer> ok just a confusing example then ig :P |
23:30:13 | FromDiscord | <Phytolizer> thanks |
23:30:25 | FromDiscord | <Rika> Probably was edited a few times |
23:30:33 | FromDiscord | <Rika> And the original use for ticker was removed |
23:30:38 | FromDiscord | <Phytolizer> yep that seems likely |