<< 22-09-2022 >>

00:00:48FromDiscord<Elegantbeef> I always just joke about haskell that rebuilding the world is slow
00:31:31FromDiscord<Patitotective> there really should be a `quoted` procedure that just `result.addQuoted(x)`s
00:33:44FromDiscord<Elegantbeef> What?
00:47:14*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
00:51:56FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4b5e
00:54:14FromDiscord<Elegantbeef> Yay allocate more!
00:59:06FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4b5j
01:09:01FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4b5o
01:09:11FromDiscord<Patitotective> but typedesc is not an ordinal type, so no sets
01:09:24FromDiscord<Patitotective> (edit) "is" => "are"
01:09:27FromDiscord<Patitotective> (edit) removed "an" | "type," => "types,"
01:10:51FromDiscord<Patitotective> nvm
01:10:59FromDiscord<Patitotective> `foo[T: SomeNumber or bool]`
01:34:15FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4b5r
01:34:30FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=4b5r" => "https://play.nim-lang.org/#ix=4b5s"
01:41:26FromDiscord<Elegantbeef> I wouldnt use curlies but you do you
01:42:33FromDiscord<Patitotective> then?
01:42:50FromDiscord<Patitotective> i was just copying KDL syntax making sure the AST was parsable
01:43:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4b5t
01:43:09FromDiscord<Patitotective> hmmm 🤔
01:43:14FromDiscord<Elegantbeef> whoops should be `node1`
01:44:11FromDiscord<Patitotective> hMmMmmm
01:44:37FromDiscord<Elegantbeef> M indeed
01:46:04FromDiscord<Patitotective> tough decision
02:02:19FromDiscord<proton> Is there any method to get the fields number of an object besides fields?
02:02:54FromDiscord<Elegantbeef> You could use a macro like disruptek's assume.typeit
02:19:23*derpydoo quit (Quit: derpydoo)
02:23:30FromDiscord<Patitotective> since macros cant be recursive (i think), is it okay to `newCall("myMacro", x)`? :p
02:23:57FromDiscord<Elegantbeef> Yes that's how you make them "recursive"
02:24:21FromDiscord<Patitotective> :]
02:25:35FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4b5B
03:18:38FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4b5H
03:18:50FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=4b5H" => "https://play.nim-lang.org/#ix=4b5I"
03:18:58FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=4b5I" => "https://play.nim-lang.org/#ix=4b5J"
03:26:29FromDiscord<Rika> In reply to @Patitotective "is there a way": Doesn’t what you wrote work
03:27:03FromDiscord<Stuffe> what does this error mean? `required type for item: sink T`
03:28:17FromDiscord<Elegantbeef> It's related to move semantics but the fact that's the error is disconcerting
03:28:31FromDiscord<Patitotective> In reply to @Rika "Doesn’t what you wrote": huh, now it does
03:28:42FromDiscord<Stuffe> i am iterating over a tree of nodes, and trying to edit the node I am currently visiting
03:28:52FromDiscord<Stuffe> something about that doesn't work
03:29:22FromDiscord<Elegantbeef> Ah `items` now returns `lent T` which is incompatible with `sink` i assume is the issue
03:29:57FromDiscord<Stuffe> and the lent T means it's immutable?
03:30:08FromDiscord<Elegantbeef> Correct
03:30:20FromDiscord<Elegantbeef> It's an immutable borrow
03:30:30FromDiscord<Elegantbeef> If you can share the full code i can probably give a solution
03:30:37FromDiscord<Stuffe> but I am passing it as a `var` argument
03:30:47FromDiscord<Stuffe> hmm let me try to reduce it then
03:31:04FromDiscord<Rika> Don’t you need to use the mutable items iterator
03:31:18FromDiscord<Stuffe> also the playground hasn't worked for a few days it seems
03:31:32FromDiscord<Elegantbeef> Yea no one has yelled at pmunch
03:32:03FromDiscord<Rika> A lot of people have
03:32:07FromDiscord<Rika> He’s just unavailable
03:32:26FromDiscord<Elegantbeef> Ah my bad
03:33:12FromDiscord<Rika> Yeah you’re bad
03:33:37FromDiscord<Elegantbeef> Yes
03:35:17FromDiscord<Stuffe> sent a long message, see http://ix.io/4b5M
03:36:32FromDiscord<Stuffe> Not sure how easy it is to grasp at a glance. But can you spot where it adds the lent restriction?
03:36:52FromDiscord<Stuffe> (edit) "http://ix.io/4b5M" => "http://ix.io/4b5N"
03:37:06FromDiscord<Rika> Nested procedures with closure 😨
03:37:31FromDiscord<Stuffe> I wish I was working on a simple problem
03:38:20FromDiscord<Rika> Don’t we all
03:38:36FromDiscord<Elegantbeef> What line errors?
03:39:45FromDiscord<Stuffe> so the line error corresponds to this line in my code: `input.children.insert(nodes_to_lift, i)`
03:47:13FromDiscord<Elegantbeef> Ah yea then it seems i'm kinda right
03:47:30FromDiscord<Stuffe> yeah?
03:47:47FromDiscord<Stuffe> where does it become lent?
03:48:02FromDiscord<Elegantbeef> might\
03:48:08FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4b5S
03:48:49FromDiscord<Elegantbeef> sorry that should be `insert(a, i)`
03:49:02FromDiscord<Elegantbeef> I think the issue is likely you cannot sink the local variable
03:49:19FromDiscord<Stuffe> hmm still the same error
03:50:01FromDiscord<Stuffe> `required type for item: sink T↵but expression 'a' is of type: seq[my_node]`
03:50:29FromDiscord<Elegantbeef> do `insert(move a, i)`
03:50:29FromDiscord<Elegantbeef> Also `nim -v`?
03:51:05FromDiscord<Stuffe> let me try
03:51:36FromDiscord<Stuffe> actually it seems to work if I iterate over nodesToLift and insert them one by one
03:51:41FromDiscord<Stuffe> but let me try what you just said also
03:52:51FromDiscord<Stuffe> wait is the error simply that insert doesn't insert one seq of values into another...
03:52:56FromDiscord<proton> Is there any method to get typedesc from a string?
03:53:01FromDiscord<Stuffe> and I got thrown off by the error message
03:53:16FromDiscord<Elegantbeef> Oh you might be able to remove the `var` input
03:53:24FromDiscord<Elegantbeef> I mean the error message is completely wrong so perhaps
03:53:42FromDiscord<Stuffe> lol it works if I import sequtils at the top...
03:54:02FromDiscord<Elegantbeef> a macro can do this in a second it's just `macro getIdent(s: static string): untyped = ident(myString)`↵(@proton)
03:54:30FromDiscord<Stuffe> thanks for the help though @ElegantBeef
03:54:30FromDiscord<Elegantbeef> Hmm sink mismatch error winning out over overload error
03:54:32FromDiscord<Elegantbeef> Interesting
03:54:36FromDiscord<Elegantbeef> Sorry i was useless 😛
03:54:50FromDiscord<Stuffe> haha well we tried
03:55:01FromDiscord<Stuffe> I wish there was a little more emphasis on error messages in nim
03:55:21FromDiscord<Elegantbeef> Eh this is more of a bug then an error message issue
03:55:27FromDiscord<Elegantbeef> What version of Nim are you on?
03:56:04FromDiscord<Stuffe> 1.6.6
03:56:14FromDiscord<Stuffe> [MacOSX: arm64]
03:56:25FromDiscord<Elegantbeef> Wait you lied about the error
03:56:35FromDiscord<Stuffe> eh?
03:56:37FromDiscord<Elegantbeef> It's a proper overload error
03:57:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4b5T
03:57:30FromDiscord<Stuffe> thats what i get
03:57:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4b5U
03:57:43FromDiscord<slymilano> What's the standard for documentation/comments on a Type's fields?
03:57:52FromDiscord<proton> What if the string is runtime dependent?
03:57:57FromDiscord<Elegantbeef> No↵(@proton)
03:58:14FromDiscord<slymilano> I want to make sure I support the docgen standards if any for fields. https://nim-lang.org/docs/docgen.html#introduction-documentation-comments
03:58:19FromDiscord<Elegantbeef> You need a table and handle the flow control
03:58:39FromDiscord<Stuffe> sent a code paste, see https://play.nim-lang.org/#ix=4b5V
03:58:54FromDiscord<Elegantbeef> I mean you provided that it just complained about sink T
03:58:54FromDiscord<Rika> Beef you ain’t reading the error smh
03:59:13FromDiscord<Elegantbeef> Maybe it didnt propagate to matrix
03:59:15FromDiscord<Stuffe> well maybe the real issue is its unreadable
03:59:24FromDiscord<Stuffe> i assumed something wrong
03:59:39FromDiscord<Rika> It ain’t readable for a beginner, yes I agree
03:59:45FromDiscord<Rika> Probably needs some revision somehow
04:00:01FromDiscord<Elegantbeef> Remove `sink` annotations in rendertree, problem solved 😄
04:00:13FromDiscord<Rika> Maybe the generic T part should be clarified further
04:00:23FromDiscord<Stuffe> I am not a beginner but the `sink T` threw me off
04:00:47FromDiscord<Elegantbeef> The T should be replaced for the type T
04:00:53FromDiscord<Elegantbeef> We know the seq matched so we should be able to replace that generic parameter in the message
04:01:15FromDiscord<Rika> Yes
04:01:27FromDiscord<huantian> what if you have `foo[T](a: T, b: T)`? ig you just say `T` in that case?
04:01:31FromDiscord<Elegantbeef> Do we ping Bung since they're on a quest of removing bad error messages
04:01:40FromDiscord<Elegantbeef> What do you mean huan?
04:01:54FromDiscord<Elegantbeef> T is only boundable to a single type there
04:02:10FromDiscord<huantian> right so if I do `foo("a", 1)` which parameter is wrong?
04:02:16FromDiscord<Elegantbeef> The second
04:02:34FromDiscord<Elegantbeef> If the first is properly constrained the second is wrong
04:03:02FromDiscord<proton> @ElegantBeef means there is no way right?
04:03:03FromDiscord<Elegantbeef> In the case you have a constraint and there is an error you can replace the generic parameter with the constraint
04:03:05FromDiscord<Stuffe> honestly a lot could be done to improve readability. I basically don't read the errors, I just check the line number
04:03:28FromDiscord<Stuffe> like why does it have a line that says: `expected one of:` when there is only 1
04:03:32FromDiscord<Elegantbeef> There is a way but you have to either make a macro or manually do it
04:03:46FromDiscord<Stuffe> if you have a list of them, it would be cool if they were right below each other so you could compare which one it was
04:03:54FromDiscord<huantian> In reply to @Stuffe "like why does it": it expects one thing of type `string` for example
04:03:54FromDiscord<Stuffe> and use colors to emphasize etc
04:04:14FromDiscord<huantian> which I mean ig makes sense in some perspective lol
04:04:21FromDiscord<huantian> In reply to @Elegantbeef "If the first is": mm ig
04:04:24FromDiscord<proton> What does manually do it mean.
04:04:26FromDiscord<Elegantbeef> Fucking tedious to do well imo
04:04:26FromDiscord<Elegantbeef> Colour error messages is a whole ordeal
04:04:50FromDiscord<huantian> In reply to @huantian "mm ig": but that means if you accedentally pass the wrong type for the first thing it'll complain about the second thing
04:04:55FromDiscord<huantian> but i agree it's the best thing to do
04:05:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4b5X
04:05:24FromDiscord<Elegantbeef> Huan remember that the error message only gives the first mismatch
04:05:32FromDiscord<huantian> ah true
04:06:32FromDiscord<Elegantbeef> Nim is statically typed so it's not easy to do this stuff dynamically
04:06:45FromDiscord<Elegantbeef> Anywho yea removing `sink` and replacing generic parameters makes the most sense
04:07:07FromDiscord<Elegantbeef> The nice part is since you know which parameters are bound you should be able to do it easily
04:07:19FromDiscord<Elegantbeef> The only issue is that it requires changing rendertree and that whole part of the compiler
04:07:32FromDiscord<proton> sent a code paste, see https://play.nim-lang.org/#ix=4b5Y
04:07:35FromDiscord<Elegantbeef> You cannot return typedesc
04:07:45FromDiscord<proton> sent a code paste, see https://play.nim-lang.org/#ix=4b5Y
04:07:45FromDiscord<Elegantbeef> Nim is statically typed, and types do not exist at runtime
04:07:59FromDiscord<Elegantbeef> You have to handle this typing using flow control
04:08:46FromDiscord<huantian> what a scam why don't we just copy paste C# reflection to Nim
04:09:04FromDiscord<Elegantbeef> We have RTTI but you still cannot generate code at compile time
04:09:04FromDiscord<huantian> then I can abuse runtime typing all I want
04:09:29FromDiscord<Elegantbeef> Proton what's the actual problem you're trying to solve?
04:10:52FromDiscord<proton> nim-web3 Sender[T] needs a type , which I want to build it according to runtime string.
04:11:28FromDiscord<proton> contractSender
04:12:02FromDiscord<proton> sent a code paste, see https://play.nim-lang.org/#ix=4b61
04:14:11FromDiscord<Elegantbeef> Yea you're not going to be able to do that without something like `JsonNode`
04:14:11FromDiscord<Elegantbeef> Why does this need to happen at runtime is my question
04:15:18FromDiscord<proton> sent a code paste, see https://play.nim-lang.org/#ix=4b63
04:15:27FromDiscord<proton> or I have to do this.
04:16:15FromDiscord<Elegantbeef> You could make a macro make that case statement from an array
04:17:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4b64
04:17:23FromDiscord<Elegantbeef> No clue if writing a macro is sane here, but i'm just saying
04:17:36FromDiscord<proton> names might be extended.
04:18:08FromDiscord<Elegantbeef> You could allow `(Azuki, "Azuki")` if you really needed it
04:18:42FromDiscord<Elegantbeef> You could just use a template for the internal calls
04:19:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4b65
04:19:46FromDiscord<Elegantbeef> It's still redundant but it's less work
04:20:25FromDiscord<Elegantbeef> Unless you have a lot i'd just manually write them probably
04:20:25FromDiscord<Elegantbeef> Less of a headache to maintain
04:22:28FromDiscord<proton> yes, it's better
04:24:52FromDiscord<deadmeme77> Anyone playing around with OpenAI new speech->text Whispers model yet? I think I'm going to update my voice app to use the Small model. Now it's using GTranslate API for speech to text part which limits me from deploying them offline
06:34:33FromDiscord<Bung> when field name conflicts with proc call name(expr end with `()`) , should nim auto pick proc call ?
06:35:18FromDiscord<Elegantbeef> Does the manual mention this case?
06:35:32FromDiscord<Elegantbeef> I know it mentions the case of MCS command syntax
06:36:25FromDiscord<Bung> doesn't call from my memory, but I remenber other language does so ?
06:36:57FromDiscord<Bung> since it's end with `()`
06:38:30FromDiscord<Bung> that's the idea coming to my head when I was very new come to nim, and face the problem in my code.
06:40:33FromDiscord<Rika> In reply to @Bung "when field name conflicts": Are you saying that as a proposition or as a question
06:42:04FromDiscord<Bung> I mean the designed behavior
06:42:30FromDiscord<Rika> Current behaviour I believe is to use fields iirc
06:42:58FromDiscord<Elegantbeef> Yea the manual doesnt specify that it should be a valid call, so it's a question to araq
06:42:59FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#procedures-properties it's mentioned her somewhat but not `host()` vs `.host`
06:43:54FromDiscord<Bung> yeah, it pick feilds , I debugging into resolveOverloads return earlier , it does like that
06:45:17FromDiscord<Elegantbeef> I think realistically if you have a field and procedure named the same the best to do is emit a hint that tells you how to do the other
06:45:51FromDiscord<Elegantbeef> "expr.field is a field access if you want a call the procedure do field(expr)"
06:46:35FromDiscord<Bung> from the comments says, the current behavior is by designed.
06:47:05FromDiscord<Bung> so maybe we just improve the error message let user handle it.
06:47:34FromDiscord<Elegantbeef> It doesnt mention `.host()` vs `.host`
06:56:03FromDiscord<Bung> hmm, maybe ` Error: expression 'result.bar' cannot be called` is sufficient otherwise need add new state to `TCandidate`
07:26:40*rockcavera quit (Remote host closed the connection)
07:42:22FromDiscord<proton> Is Weave unmaintained?
07:43:12FromDiscord<proton> Is there any good parallelism library?
07:43:42FromDiscord<proton> (edit) "parallelism" => "parallel"
08:32:27FromDiscord<Forest [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4b6B
08:33:02FromDiscord<Elegantbeef> By giving it a generic parameter
08:33:12FromDiscord<Forest [She/Her]> I'm trying to load a Java class dynamically since at runtime i won't know the class
08:36:33FromDiscord<Forest [She/Her]> Ah sweet it compiles now!
08:38:13NimEventerNew thread by drkameleon: High-to-low range in slice, see https://forum.nim-lang.org/t/9485
08:47:02*jmdaemon quit (Ping timeout: 260 seconds)
08:57:57FromDiscord<whisper> I am having an issue with vscode...It does not seem to start nimsuggest? I dont get any intellisense
09:01:58*qwestion quit (Ping timeout: 268 seconds)
09:31:08*jjido joined #nim
09:32:47FromDiscord<Prestige> nimsuggest is very buggy and crashes a lot, that might be what's going on
09:39:17FromDiscord<Forest [She/Her]> I can't get my code working rip
09:39:27FromDiscord<Forest [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4b6M
09:39:48FromDiscord<Forest [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4b6N
09:40:21FromDiscord<Forest [She/Her]> In Java to get the class (like i'm trying to do in Nim) it's `Class<?> cls = Class.forName("java.lang.Object")`
09:40:43FromDiscord<Forest [She/Her]> The `<?>` is because at runtime you don't know the type
09:49:06FromDiscord<Forest [She/Her]> Oh sweet i think i figured it out?
09:49:18FromDiscord<Forest [She/Her]> Using JNim's built-in `findCLass`
09:49:24FromDiscord<Forest [She/Her]> `findClass`
09:49:33FromDiscord<Kiloneie> why can't you just import karax ? You gotta import karax / [karaxdsl, vdom] instead ?
09:53:55*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:23:15*xet7 joined #nim
10:26:20FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4b6X
10:26:31FromDiscord<ravinder387> this code now not working ...
10:27:30FromDiscord<ravinder387> nim generate unreliable code code works or not work https://media.discordapp.net/attachments/371759389889003532/1022454080762814515/2022-09-22.png
10:27:58FromDiscord<ravinder387> some day i run the code it worked but now it didn't
11:02:29*arkurious joined #nim
11:32:29FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=4b7b
11:33:45FromDiscord<Goel> (edit) "https://play.nim-lang.org/#ix=4b7b" => "https://play.nim-lang.org/#ix=4b7c"
11:34:51FromDiscord<Bung> `removeSuffix(s, "_1")` ?
11:35:16FromDiscord<Goel> What?
11:35:48FromDiscord<Goel> (edit) "What? ... " added "Thats a func in strutils"
11:37:16FromDiscord<Bung> doesn't func means only care about string ends ?
11:37:49FromDiscord<Goel> removeSuffix() Remove the first matching suffix (in-place) from a string.
11:38:49FromDiscord<Goel> (edit) "string." => "string↵But thats not the problem because for all other filenames it works just like that. I think the problem is with `_` but i'm not sure why"
11:40:45FromDiscord<Bung> no idea, that func name make me confusing with file suffix
11:41:58*ttkap joined #nim
11:51:06FromDiscord<Bung> `const something: ProcType = proc() = discard` does const proc has meaning ?
11:52:22*termer quit (Quit: ZNC 1.7.5+deb4 - https://znc.in)
11:59:15*termer joined #nim
12:26:05Amun-Rait's guaranteed to be used in compile time
12:28:28FromDiscord<Bung> it shows `Error: VM problem: dest register is not set` when I assign to a variable
12:29:21FromDiscord<Bung> I only see const proc in one issue so far
12:30:43Amun-Racould you paste relevant code somewhere online? preferably a test case one could build
12:31:05FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/16736 see this issue
12:31:47FromDiscord<Bung> I simply eval it as `let a = something()`
12:32:18FromDiscord<Forest [She/Her]> In reply to @Goel "I'm doing some file": You're not removing the suffix
12:32:28FromDiscord<anthonyderk22> Thank me later. https://t.me/+UI7SZ3fhpUkyMjg8
12:32:47FromDiscord<Forest [She/Her]> Use `s.replace("_1", "")` instead
12:33:09FromDiscord<Forest [She/Her]> The reason why removeSuffix didn't work is because your string ends with `_1.png`, not `_1`
12:33:19FromDiscord<Forest [She/Her]> @Goel
12:33:19Amun-RaBung: ah, so it's a bug and prette old one
12:34:11FromDiscord<Forest [She/Her]> In reply to @anthonyderk22 "Thank me later. ": <@&371760044473319454>
12:34:24FromDiscord<Bung> In reply to @Amun-Ra "<@714152700920594493>: ah, so it's": yeah, the related issue point out the callconv thing, but I think it goes too far
12:34:28FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/16737
12:38:06*neceve quit (Quit: ZNC - https://znc.in)
12:44:14FromDiscord<Goel> In reply to @Dreamer (Previously Forest) "The reason why removeSuffix": Thanks 🙂
12:53:23FromDiscord<Forest [She/Her]> Np!
13:02:52*jjido joined #nim
13:05:45FromDiscord<proton> What does this mean `Error: illegal capture 'collectionAddress' because 'weaveParallelForSection' has the calling convention: <inline>`
13:06:08arkanoidfor asyncsocket I see readLine, but not equivalent with custom terminator
13:22:36*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:27:12FromDiscord<Forest [She/Her]> Okay how would i make `Class.forName("className")` work in Nim with JNI? I Can't figure out how to wrap it at all, nothing i'm doing is working
13:35:35*dnh joined #nim
13:37:07FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4b7w
13:37:28FromDiscord<ravinder387> but why add0 2,3 not work it is also a function
13:43:33FromDiscord<huantian> Echo has no return value
13:43:39FromDiscord<huantian> But add has a return value
14:10:09FromDiscord<proton> Has anyone used taskpools saw error like this `'=copy' is not available for type <Task>; requires a copy because it's not the last read of ':envP.task50'; routine: getterIter`
14:19:13*arkurious quit (Remote host closed the connection)
14:21:15*arkurious joined #nim
14:26:30*xaltsc quit (Quit: WeeChat 3.5)
15:22:07FromDiscord<jmgomez> In reply to @proton "Has anyone used taskpools": Didnt use taskPools but it seems like a move semantics issue
15:22:12FromDiscord<jmgomez> are you in orc?
15:22:40FromDiscord<proton> yes, and tried arc , default GC
15:23:26FromDiscord<proton> @mratsim
15:45:59*LuxuryMode quit (Quit: Connection closed for inactivity)
15:48:12*derpydoo joined #nim
15:56:12*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:09:56*wallabra_ joined #nim
16:11:48*wallabra quit (Ping timeout: 264 seconds)
16:11:50*wallabra_ is now known as wallabra
16:35:09*jjido joined #nim
16:36:24*jjido quit (Client Quit)
16:50:57*dnh joined #nim
16:51:06*jjido joined #nim
16:59:23FromDiscord<planetis> share your code if you can
17:14:32*derpydoo quit (Ping timeout: 244 seconds)
17:14:43*krux02 joined #nim
17:53:38FromDiscord<Yardanico> @dom96 about arc/orc "locking" - it's not because of them, it's because of the Nim allocator
17:53:45FromDiscord<Yardanico> https://github.com/nim-lang/Nim/blob/devel/lib/system/alloc.nim search for `heapLock`
17:54:39FromDiscord<Yardanico> or maybe it's only for regions here, hmm
17:57:35FromDiscord<Yardanico> ah no it's correct, this is used with arc/orc
17:57:59FromDiscord<Yardanico> https://github.com/nim-lang/Nim/blob/devel/lib/system/mmdisp.nim#L84
17:59:26*jmdaemon joined #nim
18:02:37FromDiscord<Kiloneie> Anyone with nimib experience here ?
18:02:56FromDiscord<Yardanico> In reply to @Kiloneie "Anyone with nimib experience": @pietroppeter probably, since he created it :P
18:03:09FromDiscord<Yardanico> @pietroppeter this one
18:03:22FromDiscord<Yardanico> can you just ask your question right away?
18:03:27FromDiscord<Yardanico> and also nimib has https://github.com/pietroppeter/nimib/discussions
18:03:28FromDiscord<Yardanico> and issues
18:03:48FromDiscord<Kiloneie> Having some trouble with it, like when i put some text in another line, sometimes it does not go to another line
18:04:55FromDiscord<Kiloneie> if you look at nbTextWithCode: """ part,↵both links appear on the same line https://media.discordapp.net/attachments/371759389889003532/1022569197106102292/unknown.png
18:05:26FromDiscord<Kiloneie> https://media.discordapp.net/attachments/371759389889003532/1022569328392015902/unknown.png
18:06:19FromDiscord<Yardanico> but that's just how markdown works
18:06:31FromDiscord<Yardanico> for a newline in markdown you have to have an empty line between the two things
18:06:43FromDiscord<Yardanico> so you need to have an empty line after the `lol` link
18:07:17FromDiscord<Kiloneie> hmm, it's been a decade since i did anything with web stuff
18:08:22FromDiscord<Kiloneie> should i post in the disscusion or make a PR if i would like the flag nbShow to just reload the page or something like that?
18:09:02FromDiscord<Yardanico> make an issue probably? nimib people won't mind
18:09:49FromDiscord<Kiloneie> where can i find stuff like, needs an empty line in order to go to another line ?
18:10:00*wallabra quit (Ping timeout: 264 seconds)
18:11:46*wallabra joined #nim
18:15:04*rockcavera joined #nim
18:15:05*rockcavera quit (Changing host)
18:15:05*rockcavera joined #nim
18:18:04*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:26:06FromDiscord<Kiloneie> never mind i found it
18:31:06FromDiscord<Phil> In reply to @Kiloneie "Anyone with nimib experience": Some, since I wrote norm docs
18:32:39FromDiscord<Phil> Also, at a glance:↵The last line is missing a `-` and the second to last line that has a `-` should have a space after it.↵At least assuming those `-` are there to denote elements of an unordered list
18:33:08FromDiscord<Kiloneie> okay
18:33:35FromDiscord<Kiloneie> used wrong amount of spaces
18:33:38FromDiscord<Kiloneie> 2 and 4
18:33:52FromDiscord<Phil> Just to be on the safe side, it might be that you need an empty line between the first `-` and "to this video subject:" , at least that's an issue in prologue's markdown, that might not transfer to nimib
18:34:20FromDiscord<Phil> In prologue's markdown, if there's no empty line before the start of a list, it doesn't get interpreted as a list
18:35:25FromDiscord<Kiloneie> is it normal that there is so much space between lines ? https://media.discordapp.net/attachments/371759389889003532/1022576870576902204/unknown.png
18:36:10FromDiscord<flywind> In reply to @Isofruit "In prologue's markdown, if": It is probably caused by the dialect of mkdocs https://github.com/planety/prologue/blob/devel/mkdocs.yml It is possible to have settings to make things desirable I guess
18:36:42FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4b9G
18:37:32FromDiscord<Phil> In reply to @Kiloneie "is it normal that": Pretty much, see example in norm with the same styling:↵https://norm.nim.town/index.html
18:38:14FromDiscord<Kiloneie> oh i already do that, i was just trying something that i can't recall what 😛
18:38:30FromDiscord<Kiloneie> i indent the sht out of my script
18:38:43FromDiscord<Kiloneie> so i can use VS Code to close parts of it
18:38:58FromDiscord<Kiloneie> as if it was a proc or block of code
18:44:59FromDiscord<Kiloneie> Where is this markdown mode that nimiboost talks about ? or how do you enable it, i checked the settings but...Code as in Source ?...
18:49:03FromDiscord<Phil> In reply to @Kiloneie "Where is this markdown": That is a really good question, I never tried it, literally just wrote my stuff down and committed
18:51:13FromDiscord<Kiloneie> I am glad i found nimib a few months ago, will make my scripts a billion times more readable to me, actually be able to have working code to copy paste, have an actual written tutorial version of the videos i make, instead of the VS Code mess. Might even use it for presentation...
18:53:40FromDiscord<Phil> In reply to @Kiloneie "I am glad i": Not sure about presentation, but I entirely agree about it turning low-effort write-ups into actual docs is incredibly useful
18:54:50FromDiscord<Kiloneie> Just gotta learn it a bit more, i am gonna convert the almost finished script of another video
19:01:57FromDiscord<Kiloneie> Is there really now way of having end of the line so both TITLES are in their own line ? https://media.discordapp.net/attachments/371759389889003532/1022583549368483892/unknown.png
19:02:10FromDiscord<Kiloneie> https://media.discordapp.net/attachments/371759389889003532/1022583601604337784/unknown.png
19:06:32*jjido joined #nim
19:08:03FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4b9O
19:08:50FromDiscord<Phil> Also, maybe `- ALT` instead of `-ALT` , I keep being suspicious about whitespace situations like that
19:09:08FromDiscord<hugogranstrom> sent a code paste, see https://play.nim-lang.org/#ix=4b9P
19:16:09NimEventerNew thread by morturo: Using pragmas to generate methods, see https://forum.nim-lang.org/t/9486
19:16:10*NimEventer quit (Remote host closed the connection)
19:16:22*NimEventer joined #nim
19:16:24FromDiscord<Kiloneie> sent a code paste, see https://play.nim-lang.org/#ix=4b9S
19:17:13FromDiscord<Kiloneie> In reply to @hugogranstrom.nim "Add `hlMd` in front": i so forgot to read the page of nimiboost, thank you
19:43:44FromDiscord<Iliketwertles> is there a way to return a sequence that holds all the output from a for loop?
19:45:20FromDiscord<Kiloneie> sent a long message, see http://ix.io/4b9Z
19:45:37FromDiscord<Kiloneie> how do you emmit code in discord ? i forgot.
19:46:04FromDiscord<Iliketwertles> wrap code in ` ` `
19:46:10FromDiscord<Iliketwertles> (edit) "wrap code in ... `" added "three" | removed "` `"
19:46:31FromDiscord<Iliketwertles> example
19:46:33FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4ba0
19:46:48FromDiscord<Kiloneie> sent a code paste, see https://play.nim-lang.org/#ix=
19:46:51FromDiscord<Kiloneie> okay
19:48:53FromDiscord<Kiloneie> sent a code paste, see https://play.nim-lang.org/#ix=4ba1
19:49:07FromDiscord<Iliketwertles> you can do like `data.del i` aswell?
19:49:23FromDiscord<Iliketwertles> not completly knowing of the syntax yet lol
19:50:02FromDiscord<Kiloneie> gimme a sec, i did something weird
19:50:10FromDiscord<Kiloneie> too reliant on auto complete
19:57:01FromDiscord<Kiloneie> sent a code paste, see https://play.nim-lang.org/#ix=4ba5
19:57:35FromDiscord<Kiloneie> when using .del don't forget to use it on an element that exists, like deleting 100th element of a 10 element sequence will result in an error
20:04:56FromDiscord<Iliketwertles> why is it saying total is void? https://media.discordapp.net/attachments/371759389889003532/1022599398607294484/screenshot_2022-09-22-160440.png
20:07:20FromDiscord<Kiloneie> that last line doesn't like right to me
20:08:11FromDiscord<Kiloneie> the contents of word,
20:09:56FromDiscord<Kiloneie> can you put the code in here: https://wandbox.org/ ?
20:18:08*kenran joined #nim
20:19:04FromDiscord<Iliketwertles> https://wandbox.org/permlink/wJQU69gr7HbbQsgQ
20:21:40FromDiscord<Kiloneie> well you are trying to convert string into integer then use that to delete string
20:23:50FromDiscord<Iliketwertles> workspacesSplit has strings in it, some are ints but counted as strings, what im trying to do it remove the ints that are in workspacesSplit from total
20:24:20FromDiscord<Generic> delete doesn't return anything
20:24:24FromDiscord<Phil> In reply to @Iliketwertles "why is it saying": I would assume that delete does not create a copy of "total" and returns that to echo it out, it likely takes the existing seq and modifies that.↵It's typically a good practice to either do a side-effect (manipulate a seq for example) or return a value
20:24:28FromDiscord<Phil> Thus delete returns nothing
20:24:33FromDiscord<Phil> As it follows that convention
20:24:47FromDiscord<Phil> (edit) "As it follows that convention ... " added "and chose to have a side-effect instead of copying the seq and removing an entry"
20:25:15FromDiscord<Phil> (edit) "In reply to @Iliketwertles "why is it saying": I would assume that delete does not create a copy of "total" and ... returnsanything" added "thus does not" | "that" => "anything" | removed "it"
20:25:42FromDiscord<Phil> so "total.delete(bla)" evaluates to "void"
20:26:16FromDiscord<Phil> (edit) "so "total.delete(bla)" evaluates to "void" ... " added "(because delete has no return)"
20:27:18FromDiscord<Iliketwertles> i think i understand what your saying
20:33:26FromDiscord<Iliketwertles> i think this is gonna work now
20:43:32*krux02 quit (Remote host closed the connection)
20:43:36FromDiscord<Iliketwertles> it always seems to return 3 instead of anything else
20:44:24FromDiscord<Iliketwertles> (edit) "it" => "~~it" | "else" => "else~~"
20:45:09*kenran quit (Quit: WeeChat info:version)
20:45:54FromDiscord<Iliketwertles> now only 2?
20:45:57FromDiscord<Iliketwertles> sums wrong
20:46:39FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4bak
20:47:20FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4bal
20:47:39FromDiscord<Iliketwertles> `hyprctl dispatch workspace {total[0]}` sends me to the workspace it sets
20:50:05FromDiscord<dom96> In reply to @Yardanico "https://github.com/nim-lang/Nim/blob/devel/lib/syst": Interesting, but kind of odd, since you still cannot use arc/orc managed memory across threads because it's not atomic RC.
20:50:28FromDiscord<Elegantbeef> But you can if you do it safely
20:50:46FromDiscord<Yardanico> also you can move memory around between threads as well in addition to what beef said
20:51:00FromDiscord<Yardanico> In the ownership sense
20:51:13FromDiscord<Elegantbeef> Is isolated functional yet?
20:51:41FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4bam
20:52:19FromDiscord<dom96> what does "do it safely" mean?
20:53:08FromDiscord<Elegantbeef> Ensuring the GC'd memory doesnt outlive the the allocating thread, and also ensuring you do not allocate from another thread and return memory to the primary thread
20:53:53FromDiscord<Elegantbeef> With isolated you can move memory ownership between threads which solves the latter
20:54:01FromDiscord<Elegantbeef> And kinda the former aswell
21:00:50NimEventerNew thread by alexgustafson: Passing pointer from nim dynlib to c host application, see https://forum.nim-lang.org/t/9487
21:05:30FromDiscord<Forest [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4baq
21:10:10FromDiscord<Iliketwertles> why is it not deleting both 1 and 2 from `total`? https://media.discordapp.net/attachments/371759389889003532/1022615814614036531/screenshot_2022-09-22-170921.png
21:10:31FromDiscord<Elegantbeef> delete removes an index
21:10:40FromDiscord<Elegantbeef> What are you even trying to do?
21:11:54FromDiscord<Iliketwertles> remove any instance of `word` (int 1-9) from total, then getting lowest number in total
21:12:50FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bav
21:12:52NimEventerNew thread by CircArgs: CodeGenDecl expressions and monomorphization, see https://forum.nim-lang.org/t/9488
21:13:38FromDiscord<Iliketwertles> In reply to @Elegantbeef "In that case you": this will cover multiple instances of word right?↵like it commonly outputs 1 and 2
21:13:51FromDiscord<Elegantbeef> It will find the value in the sequence then remove it
21:14:25FromDiscord<Elegantbeef> If you want to remove all iterate the sequence backwards and remove entries as you go
21:15:58FromDiscord<Iliketwertles> dont understand, its still only removing the first output of word
21:16:39FromDiscord<Elegantbeef> Like i said you need to iterate the entire collection removing the word
21:17:17FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4bay
21:21:17FromDiscord<Patitotective> countdown looks nicer in lower case :p
21:21:17*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:22:11FromDiscord<Iliketwertles> isnt working and im lost ↵braincell count low today lmao
21:30:35FromDiscord<Raynei486> what are the restrictions when you disable gc
21:31:43FromDiscord<Elegantbeef> Disabled GC just means `ref` `string` and `seq` will leake
21:31:44FromDiscord<Elegantbeef> there are no restrictions
21:31:44FromDiscord<Elegantbeef> Or anything built on them
21:32:03FromDiscord<Raynei486> can't you manually free those?
21:32:45FromDiscord<Elegantbeef> There is no point really to disable GC just use Arc and be merry
21:32:47FromDiscord<Elegantbeef> Nope
21:33:12FromDiscord<Raynei486> damn that's a nice feature you miss out on without gc
21:33:20FromDiscord<Elegantbeef> Well just use arc
21:33:22FromDiscord<Elegantbeef> Problem solved
21:34:26FromDiscord<Raynei486> is it something similar to like RAII in C++?↵I know it's related to reference counting
21:34:48FromDiscord<Elegantbeef> Yes it's identical it's RAII and smartpts
21:36:06FromDiscord<Raynei486> 👍
21:36:27FromDiscord<Raynei486> I want to see if Nim can run on something ridiculous like a calculator so just asking around
21:36:40FromDiscord<Elegantbeef> It most likely can
21:36:51FromDiscord<Elegantbeef> People do use it for embedded programming
21:44:45*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:56:37*neceve joined #nim
22:01:45FromDiscord<Raynei486> ok with further testing it seems like not having a std clib doesn't play well with nim
22:01:53FromDiscord<Raynei486> but that's not really nim's fault
22:02:13FromDiscord<auxym> i think calculators, like the cheapo scientific ones, actually use dirt-cheap COB asics
22:02:21FromDiscord<auxym> probably not programmable
22:03:08FromDiscord<Raynei486> im using the most relevant 84+ CE
22:03:58FromDiscord<Elegantbeef> If you're doing something no one else has done you'll likely have to wrap the needed C code
22:04:01FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4baC
22:04:26FromDiscord<auxym> yeah nim needs a few basic things from libc. malloc for one if you'll be allocating. on ARM there's newlib, avr-libc for avr, etc.
22:04:43FromDiscord<auxym> In reply to @Raynei486 "im using the most": is it even possible to run C on a ti84?
22:04:48FromDiscord<Elegantbeef> Cause `person name` can be a accessor that returns `var T`
22:05:24FromDiscord<Patitotective> oh
22:05:28FromDiscord<Raynei486> In reply to @auxym "is it even possible": there is a toolchain on github that uses a LLVM fork to generate ez80 assembly from C so kinda
22:05:36FromDiscord<Patitotective> hmm, then :[
22:06:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4baE
22:06:54FromDiscord<Elegantbeef> You're probably wiser to do `person (name: "alex")` but that likely will have the same issue
22:07:23FromDiscord<huantian> C is probably the best way to write for the ti 84 plus ce
22:08:15FromDiscord<Patitotective> In reply to @Elegantbeef "You're probably wiser to": maybe `person(name="alex")`
22:08:22FromDiscord<Patitotective> 🤔
22:09:41FromDiscord<Elegantbeef> Find whatever makes you happy
22:09:57FromDiscord<Elegantbeef> Could also do `person {name: "alex", ...}:`
22:10:05FromDiscord<Patitotective> In reply to @Elegantbeef "Find whatever makes you": and works ;]
22:10:06FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4baG
22:10:16FromDiscord<Elegantbeef> jesus that's some dark KDL
22:10:18FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=4baG" => "https://play.nim-lang.org/#ix=4baH"
22:10:23FromDiscord<auxym> @Raynei486 this post talks about implementing basic stubs for some minimal libc functions on embedded, it might be of interest to you: https://interrupt.memfault.com/blog/boostrapping-libc-with-newlib
22:10:31FromDiscord<Elegantbeef> Rika is going to have a kid by the time they're 28 and it's going to be dead
22:10:40FromDiscord<Elegantbeef> @Rika\: sorry for your loss 😛
22:10:54FromDiscord<Patitotective> no kid = win
22:12:34FromDiscord<Raynei486> In reply to @auxym "<@733059160924749855> this post talks": thanks i'll check it out
23:09:19*sagax quit (Excess Flood)
23:11:14FromDiscord<Rika> Jesus lol
23:24:16FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4baU
23:24:51FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=4baU" => "https://play.nim-lang.org/#ix=4baV"
23:37:10arkanoidI'm trying to run a nim binary compiled in ubuntu 22.04 into a docker container, I'm using 22.04 as base image, but I'm getting could not load: libcrypto.so(.1.1|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|.48|.47|.46|.45|.44|.43|.41|.39|.38|.10|)
23:37:31arkanoidit was working with 20.04, I've been away from nim for a while, what's new=
23:40:04FromDiscord<Elegantbeef> Ubuntu updated libraries i think
23:41:26FromDiscord<Elegantbeef> https://github.com/dom96/choosenim/issues/297 related, openssl update means a lot of issues i think
23:42:25FromDiscord<Rika> Is Ubuntu really the only one that switched completely to OpenSSL 3
23:43:01FromDiscord<Elegantbeef> Think mac also has a similar issue
23:43:13arkanoidoh, that's the issue. Got it, thanks
23:43:24arkanoidI'll downgrade ssl inside the docker container
23:45:18FromDiscord<Rika> I don’t know I find it weird that a breaking change like this didn’t seem to have a migration period, unless I completely missed the news about it which is more likely
23:57:38*arkurious quit (Quit: Leaving)