<< 18-11-2023 >>

00:00:06FromDiscord<odexine> In reply to @sys64 "> Note: Channels are": means "might work, no support if it does"
00:13:06FromDiscord<System64 ~ Flandre Scarlet> In reply to @odexine "means "might work, no": Ah alright↵Because I usually use Spawn (easier to use)
00:14:06FromDiscord<Elegantbeef> Sure but channels are a data type
00:14:40FromDiscord<Elegantbeef> I think the modern suggestion is to use weave, taskpoles, malebolgia
00:15:56FromDiscord<Elegantbeef> taskpools even
00:26:57FromDiscord<System64 ~ Flandre Scarlet> Oh alright, quite interesting
00:47:19*jmdaemon joined #nim
00:47:32FromDiscord<guttural666> anybody know what's going on here? already tried using a ref and the compiler option nimNoLentIterators https://media.discordapp.net/attachments/371759389889003532/1175235807024517180/image.png?ex=656a7ea3&is=655809a3&hm=aa1db67f5a0c0deb71da95d6e8dea10d76729d8f1edbfe5fe6913e48763d89d8&
00:47:47FromDiscord<Elegantbeef> remove `var`
00:48:00FromDiscord<Elegantbeef> `rev var T` makes no sense presently, you cannot capture mutable variables
00:48:03FromDiscord<guttural666> and return the values I want to change?
00:48:16FromDiscord<guttural666> oh
00:48:17FromDiscord<Elegantbeef> Quite literally remove `var` and it'll just work
00:49:33FromDiscord<guttural666> hm, why did it complain then, because the pointer / ref was mutable?
00:51:09FromDiscord<Elegantbeef> cause you had `ref var T`
00:51:10FromDiscord<Elegantbeef> `var`s cannot be captured by closures
01:00:24*rockcavera quit (Remote host closed the connection)
01:20:31FromDiscord<treeform> In reply to @guttural666 "btw. I am pretty": This is exactly what debby does: https://github.com/treeform/debby
01:28:13*nyeaa4928423010 quit (Read error: Connection reset by peer)
01:28:43*nyeaa4928423010 joined #nim
01:42:19FromDiscord<guttural666> my async proc seems to be giving back a 200 len seq, but I am receiving len 0 in my caller, anybody got ideas why that could be
01:43:23FromDiscord<odexine> Which proc are you referring to
01:43:25FromDiscord<odexine> The items one?
01:43:48FromDiscord<guttural666> I may have it
01:44:03FromDiscord<odexine> You don’t return it so
01:44:10FromDiscord<guttural666> c+p error
01:44:11FromDiscord<odexine> In the picture it’s not being returned at least
01:45:16FromDiscord<odexine> In reply to @guttural666 "c+p error": What does this mean if you don’t mind me asking
01:46:13FromDiscord<guttural666> nah, I just copy pasted a non async proc to make it async, and that proc was originally an iterator that explicitly defined result
01:46:41FromDiscord<guttural666> forget it
01:47:00FromDiscord<guttural666> (edit) "proc" => "iterator"
01:47:13FromDiscord<guttural666> (edit) "async," => "an async proc,"
01:48:49FromDiscord<odexine> Okay
01:55:54FromDiscord<ringabout> In reply to @isofruit "So... <@658563905425244160> when you're": I'm not sure, but msys2 is not official supported. Besides, without snapshot or error messages, I have no idea about what happened.
01:57:03FromDiscord<odexine> WSL should have worked no problem though
01:59:18FromDiscord<gogolxdong666> m3 compiles really fast🥹
02:02:35FromDiscord<ezzypooofnazareth> I tried it on my laptop and everything worked fine right off the bat, seems like it might be a problem specific to my desktop
02:26:36*jkl quit (Quit: Gone.)
02:27:51*jkl joined #nim
02:44:22FromDiscord<bootymonster69> In reply to @Elegantbeef "Right Nim does not": does this extend to enums?
02:45:31FromDiscord<Elegantbeef> Indeed
02:46:42FromDiscord<bootymonster69> very sad
02:46:59FromDiscord<bootymonster69> now i have to name things
02:47:01FromDiscord<Elegantbeef> Why do you want an anonymous type so badly?
02:47:20FromDiscord<Elegantbeef> Oh no explicit types‽
02:47:43FromDiscord<Elegantbeef> You technically can use subrange types but what even is an anonymous enum?
02:47:44FromDiscord<bootymonster69> sometypes I you have one-off types, in this case an enum of an object variant
02:47:56FromDiscord<bootymonster69> (edit) "of" => "for"
02:48:04FromDiscord<bootymonster69> (edit) "sometypes" => "sometimes"
02:48:18FromDiscord<Elegantbeef> You can use integers for variant branches
02:48:46FromDiscord<Elegantbeef> If you want anonymous unions look at Leorize's union package https://github.com/alaviss/union
02:49:42FromDiscord<bootymonster69> In reply to @bootymonster69 "very sad": hopefully this didnt come off as too serious. i don't think its a big deal
02:50:00FromDiscord<Elegantbeef> I'm trying to grok what it even means to have an anonymous enum really
03:00:59*xutaxkamay_ quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
03:01:15*xutaxkamay joined #nim
03:52:01FromDiscord<bootymonster69> it probably doesn't make sense.
03:58:39*edr quit (Quit: Leaving)
04:03:23*derpydoo quit (Ping timeout: 256 seconds)
04:09:53FromDiscord<bootymonster69> sent a code paste, see https://play.nim-lang.org/#ix=4LNJ
04:10:20FromDiscord<bootymonster69> what other ways could the inside of the brackets be written?
04:10:42FromDiscord<Elegantbeef> Not in type definitions
04:11:43FromDiscord<bootymonster69> so, you can't use a colon to constrain what can be instantiated, for example?
04:12:20FromDiscord<Elegantbeef> Uncertain what you're asking
04:13:59FromDiscord<bootymonster69> sorry. It is implied by the usage of the parameters in the type itself what the parameters are supposed to do. Its implied that N is some nonnegative whole number for example and that T is a type
04:14:10FromDiscord<bootymonster69> if I wanted to be explicit, how would I do that
04:15:16FromDiscord<Elegantbeef> `List[N: static Natural, T]`
04:16:01FromDiscord<bootymonster69> and what about T?
04:16:43FromDiscord<Elegantbeef> It's already constrained to all possible types
04:18:54FromDiscord<Elegantbeef> I guess you could do `T: typedesc` but that's redundant
04:19:05FromDiscord<bootymonster69> alright. is it possible to constrain it to some subset of types?
04:19:33FromDiscord<Elegantbeef> Depends what you mean
04:20:17FromDiscord<bootymonster69> In reply to @Elegantbeef "I guess you could": see, I tried that. when I attempted to instantiate a List, it said the list was not a concrete type
04:20:38FromDiscord<bootymonster69> (edit) "the list was" => "List is"
04:20:46FromDiscord<Elegantbeef> Actually yea `T: typedesc` is wrong
04:20:55FromDiscord<Elegantbeef> There is no constraint there
04:22:05FromDiscord<bootymonster69> In reply to @bootymonster69 "alright. is it possible": for example, only numeric types
04:22:23FromDiscord<bootymonster69> I understand that this doesn't make sense for a `List`
04:22:26FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4LNN
04:22:39FromDiscord<Elegantbeef> `T: SomeNumver`
04:22:40FromDiscord<Elegantbeef> SomeNumber\
04:22:56FromDiscord<bootymonster69> I hadn't thought that that would work. let me try it out
04:23:12FromDiscord<Elegantbeef> generic parameters can be constrained to any typeclass
04:23:25FromDiscord<Elegantbeef> Concepts, and, or, not, all of them
04:23:28FromDiscord<Elegantbeef> `T: not int` works
04:23:49FromDiscord<Elegantbeef> `T: ref and not ref SomeInteger`
04:23:54FromDiscord<bootymonster69> very cool!
04:25:21FromDiscord<bootymonster69> it does feel like sugar though, doesn't it? you can use a typeclass as a type and as a value
04:25:32FromDiscord<odexine> Not sure but you can even call a proc if it can be evaluated on CT and returns a type desc
04:25:44FromDiscord<odexine> It’s not sugar from what I know
04:26:36FromDiscord<Elegantbeef> You cannot use it for a value
04:27:02FromDiscord<Elegantbeef> Nim typeclasses are just constraints they do nothing else
04:32:43FromDiscord<bootymonster69> sent a code paste, see https://play.nim-lang.org/#ix=4LNO
04:32:52FromDiscord<Elegantbeef> Right the first is syntax sugar for the latter
04:32:58FromDiscord<Elegantbeef> And often breaks
04:33:28FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LNO" => "https://paste.rs/u0ax8"
04:33:31FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LNP" => "https://paste.rs/RNFJC"
04:33:47FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LNR" => "https://play.nim-lang.org/#ix=4LNP"
04:33:50FromDiscord<bootymonster69> oh okay
04:33:53FromDiscord<bootymonster69> thank you!
04:35:45FromDiscord<odexine> In reply to @Elegantbeef "And often breaks": Implicit generics moment
04:37:13FromDiscord<bootymonster69> the reasoning behind the original question was that don't want the compiler to get confused when the first parameter is an arbitrary type and the second is explicit
04:38:04FromDiscord<bootymonster69> sent a code paste, see https://play.nim-lang.org/#ix=4LNS
04:39:50FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LNS" => "https://play.nim-lang.org/#ix=4LNT"
04:40:41FromDiscord<odexine> I’d say that would be a bug
04:40:53FromDiscord<odexine> Oh
04:40:56FromDiscord<odexine> I didn’t read
04:41:05FromDiscord<odexine> Use ; to separate instead of ,
04:41:20FromDiscord<bootymonster69> damn
04:41:23FromDiscord<odexine> Nim interprets that as both T and N being a static natural
04:41:24FromDiscord<bootymonster69> so simple
04:41:56FromDiscord<odexine> I think it should be made idiomatic to use semicolons by default instead of commas in the documentation
04:42:08FromDiscord<odexine> To prevent this confusion
04:43:06FromDiscord<odexine> The rule is kinda that commas propagate the first rightwards type unless there is none
04:43:24FromDiscord<odexine> So N, M: int, T would be N M are int and T is unbound
04:43:46FromDiscord<odexine> If you use semicolons N would be unbound instead
04:44:18FromDiscord<odexine> It’s the same with argument lists for procedures
04:44:53FromDiscord<odexine> a, b: int, x would be a and b are int and x is unbound (which is invalid of course, IIRC)
04:45:04FromDiscord<Elegantbeef> `T; N: static Natural`
04:45:09FromDiscord<Elegantbeef> Nope
04:45:19FromDiscord<odexine> Is the bridge slow
04:45:21FromDiscord<bootymonster69> if i could be explicity with T that its unbounded, then I wouldn't use semicolons, since commas look nicer, but its a nonissue
04:45:22FromDiscord<odexine> What did you say no to
04:45:37FromDiscord<bootymonster69> (edit) "explicity" => "explicit"
04:46:12FromDiscord<Elegantbeef> You saying it was a bug
04:46:22FromDiscord<odexine> Yes I didn’t read carefully my bad lol
04:46:42FromDiscord<bootymonster69> thanks a bunch guys!
04:46:42FromDiscord<Elegantbeef> Here it was as soon as you said it
04:47:13FromDiscord<odexine> Yeah bridge was slow I asked what you meant by no because it just sent then
04:47:58FromDiscord<Elegantbeef> I know!
04:48:06FromDiscord<odexine> Do you now
04:48:12FromDiscord<Elegantbeef> Yes!
04:48:24FromDiscord<odexine> Unbelievable
05:12:49FromDiscord<bootymonster69> sent a code paste, see https://play.nim-lang.org/#ix=4LNZ
05:13:01FromDiscord<bootymonster69> I don't even know if this'll behave the way that I expect
05:13:21FromDiscord<bootymonster69> but imagine that i could just declare that enum right at the site where i use it
05:13:29FromDiscord<bootymonster69> and not give it a name
05:13:38FromDiscord<bootymonster69> that would be an anonymous enum
05:14:17FromDiscord<bootymonster69> (not suggesting a feature!)
05:15:47FromDiscord<bootymonster69> sent a code paste, see https://play.nim-lang.org/#ix=4LO0
05:15:57FromDiscord<bootymonster69> something like that, if that illuminates anything
05:16:12FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LO0" => "https://play.nim-lang.org/#ix=4LO1"
05:16:22FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LO1" => "https://play.nim-lang.org/#ix=4LO2"
05:17:23FromDiscord<odexine> Nope
05:17:26FromDiscord<odexine> Not possible
05:19:32FromDiscord<bootymonster69> ye i've been told
05:19:45FromDiscord<bootymonster69> I really like the language so far
05:20:25FromDiscord<bootymonster69> I found a compiler bug
05:20:28FromDiscord<odexine> Oh I thought that you asked if it was possible
05:20:37FromDiscord<odexine> Hit us with it
05:21:18FromDiscord<bootymonster69> sent a code paste, see https://play.nim-lang.org/#ix=4LO3
05:21:24termernice username
05:21:30FromDiscord<bootymonster69> (edit)
05:21:38FromDiscord<bootymonster69> thank you
05:22:45FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LO3" => "https://play.nim-lang.org/#ix=4LO4"
05:23:00FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LO4" => "https://play.nim-lang.org/#ix=4LO5"
05:23:18FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LO5" => "https://play.nim-lang.org/#ix=4LO6"
05:23:34FromDiscord<odexine> That doesn’t seem like an error of the compiler but of the code
05:24:43FromDiscord<bootymonster69> I'm sure the code is malformed somehow, but that is the output when i `nim c file.nim`
05:24:51FromDiscord<odexine> Oh
05:24:56FromDiscord<odexine> I’m blind again sorry
05:25:04FromDiscord<bootymonster69> you're good
05:25:23FromDiscord<odexine> I have bets it’s because of the field name being an underscore
05:25:28FromDiscord<Elegantbeef> Yea I see there is a macro somewhere that does it
05:25:34FromDiscord<Elegantbeef> I assume it's the `U = void` but idk
05:25:36FromDiscord<ElegantBeef> Bridge delay
05:26:00FromDiscord<odexine> lol
05:26:06FromDiscord<bootymonster69> In reply to @Elegantbeef "I assume it's the": is that syntax illegal?
05:26:24FromDiscord<ElegantBeef> No clue
05:29:09FromDiscord<bootymonster69> sent a code paste, see https://play.nim-lang.org/#ix=4LO7
05:29:24FromDiscord<Elegantbeef> There is the results libraray
05:29:27FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LO7" => "https://play.nim-lang.org/#ix=4LO8"
05:30:21FromDiscord<bootymonster69> (edit) "https://play.nim-lang.org/#ix=4LO8" => "https://play.nim-lang.org/#ix=4LO9"
05:30:32FromDiscord<bootymonster69> oh I only knew about the Optional library
05:30:51FromDiscord<bootymonster69> this is me playing with the type system, not implementing anything quite yet
05:31:16FromDiscord<Elegantbeef> I meant for reference
05:31:22FromDiscord<bootymonster69> ahhh
05:31:24FromDiscord<bootymonster69> sorry
05:55:53FromDiscord<bootymonster69> Thanks for indulging me
05:59:18*Guest42 joined #nim
06:00:12Guest42Hii
06:01:45FromDiscord<Elegantbeef> Hello
06:02:06*Guest42 quit (Client Quit)
06:02:48*Rifan joined #nim
06:02:51*Rifan quit (Client Quit)
06:03:10*Rifan joined #nim
06:03:18*Rifan quit (Client Quit)
06:03:47*Rifan joined #nim
06:04:03RifanHi
06:04:17RifanNim
06:04:58*Rifan quit (Client Quit)
06:05:15*Rifan joined #nim
06:07:15RifanWait
06:08:08*Rifan quit (Client Quit)
06:08:21*Rifan joined #nim
06:10:51*Rifan quit (Client Quit)
06:11:04*Rifan joined #nim
06:11:10RifanHi
06:13:41*Rifan97 joined #nim
06:14:38FromDiscord<Elegantbeef> Uh huh
06:33:53*Rifan quit (Quit: Client closed)
06:33:53*Rifan97 quit (Quit: Client closed)
07:36:11*tinytoast joined #nim
07:36:58FromDiscord<griffith1deadly> can the zigcc correctly crosscompile from windows dynamic library that contains jni and opengl related code?
07:37:12*mahlon_ joined #nim
07:37:29*om3ga_ joined #nim
07:38:01FromDiscord<griffith1deadly> (edit) "can the zigcc correctly crosscompile ... from" added "(to linux, macosx)"
07:39:05*MightyJoe joined #nim
07:40:27*via_ joined #nim
07:44:42*cyraxjoe quit (*.net *.split)
07:44:42*mahlon quit (*.net *.split)
07:44:42*tinystoat quit (*.net *.split)
07:44:42*cornfeedhobo quit (*.net *.split)
07:44:43*om3ga quit (*.net *.split)
07:44:43*via quit (*.net *.split)
07:45:32*cornfeedhobo_ joined #nim
07:57:59FromDiscord<Elegantbeef> Probably
10:07:53FromDiscord<ezquerra> @treeform is there a way to convert a pixie image into an Arraymancer Tensor? I'd like to resize an image before processing it with Arraymancer, but I don't know if that is possible
10:26:21NimEventerNew thread by takekikuchi: How to switch implementations with compiler flags., see https://forum.nim-lang.org/t/10648
11:56:46*lucasta joined #nim
12:34:06*fishman420 joined #nim
12:36:17*fishman420 left #nim (#nim)
13:43:43*jmdaemon quit (Ping timeout: 276 seconds)
13:47:32*_________ quit (Quit: leaving)
13:49:17*_________ joined #nim
13:51:30*derpydoo joined #nim
13:52:16*via_ is now known as via
15:04:45NimEventerNew thread by dadadanix: Exceptions not being handled with libuv: bug or what?, see https://forum.nim-lang.org/t/10649
16:22:07*marcus quit (Server closed connection)
16:22:36*marcus joined #nim
17:03:01*antranigv quit (Ping timeout: 268 seconds)
17:04:26*antranigv joined #nim
17:40:44*lucasta quit (Remote host closed the connection)
17:41:49NimEventerNew question by Nino van Hooff: Nim: lambdas with void return type cause compiler crash, see https://stackoverflow.com/questions/77508031/nim-lambdas-with-void-return-type-cause-compiler-crash
17:58:18*krux02 joined #nim
19:07:37*deadmarshal_ quit (*.net *.split)
19:12:57*deadmarshal_ joined #nim
19:39:39*Jjp137 quit (Ping timeout: 268 seconds)
19:48:45*Jjp137 joined #nim
21:45:00*gooba quit (Remote host closed the connection)
21:45:23*gooba joined #nim
23:09:43*cornfeedhobo_ is now known as cornfeedhobo
23:14:59*derpydoo quit (Ping timeout: 264 seconds)
23:57:04NimEventerNew thread by isaiah: Please who can explain this code, see https://forum.nim-lang.org/t/10651