<< 06-12-2022 >>

00:57:35FromDiscord<brendo-m> sent a code paste, see https://play.nim-lang.org/#ix=4hQM
00:57:54FromDiscord<Elegantbeef> nimsuggest sometimes says false positives
00:59:28FromDiscord<Rika> maybe save again
01:03:13FromDiscord<brendo-m> I tried, it reliably flags this one as an error. I think it's probably this: https://github.com/nim-lang/nimsuggest/issues/127
01:19:39FromDiscord<albassort> i want to do thiis
01:19:56FromDiscord<albassort> 1. Have a variable declared on compile↵2. Mutated on compile↵3. static in runtime
01:20:19FromDiscord<albassort> oh wait, const function
01:20:24FromDiscord<albassort> thanks me
01:30:57*rockcavera joined #nim
01:45:21FromDiscord<etra> sent a code paste, see https://play.nim-lang.org/#ix=4hQP
01:45:47FromDiscord<etra> (edit) "https://play.nim-lang.org/#ix=4hQP" => "https://play.nim-lang.org/#ix=4hQQ"
01:45:48FromDiscord<Boston> if im receiving a UDP packet and i know which ip and port it's coming from but I do not know the size of the packet coming which proc do I use
01:45:53FromDiscord<Elegantbeef> No etra
01:46:40FromDiscord<Elegantbeef> Assuming `Stack` is an `array` or `seq` `a[b..c]` heap allocates a new sequence
01:46:59FromDiscord<Elegantbeef> `other.inner.toOpenArray(other.head, other.head + n)` would be more equivlent
01:47:32FromDiscord<etra> yes, `Stack.inner` is an array
02:00:00FromDiscord<etra> In reply to @Elegantbeef "`other.inner.toOpenArray(other.head, other.head + n": you're right, using this, it went from 0.749 to 0.401
02:00:02FromDiscord<etra> nice!
02:00:22FromDiscord<etra> how would you know that'd be optimized that way?
02:00:35FromDiscord<Elegantbeef> cause `toOpenArray` doesnt copy
02:00:48FromDiscord<Elegantbeef> It's a 0 cost slice
02:00:57FromDiscord<etra> oh, ok, good to know
02:01:34FromDiscord<Elegantbeef> It's practically a safe `ptr, len`
02:01:35FromDiscord<EOF> quick question, if I have a sequence of sequences, how do I split on an empty sequence?
02:02:19FromDiscord<etra> In reply to @Elegantbeef "It's practically a safe": I have trouble assigning it into a variable, though, I can't do either `let`, `var` nor `const`, but I can use it as rvalue
02:02:29FromDiscord<Elegantbeef> Correct
02:02:44FromDiscord<etra> oh, that's a feature?
02:02:48FromDiscord<Elegantbeef> It must be consumed cause it's memory safe
02:02:53FromDiscord<Elegantbeef> Yes
02:02:58FromDiscord<Elegantbeef> Nim doesnt have a borrow checker
02:03:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4hQT
02:03:29FromDiscord<Elegantbeef> Which is a dangling pointer
02:03:56FromDiscord<Elegantbeef> It has an experimental view system which has a borrow checker not dissimilar to rust's
02:04:04FromDiscord<Elegantbeef> But it's very experimental
02:06:08*disso_peach joined #nim
02:10:47FromDiscord<etra> gotchu, I'm pretty happy with the results, one person did AOC in rust and optimized it a bit and got 370ms for a more heavy case, and with this solution, which is very readable, with types and all, it takes 402ms, nice!
02:10:58FromDiscord<Elegantbeef> What day is this?
02:11:03FromDiscord<etra> day 5
02:11:14FromDiscord<Elegantbeef> You sure you mean `ms`?
02:11:17FromDiscord<etra> https://www.reddit.com/r/adventofcode/comments/zd1hqy/comment/iyzvsnp/?utm_source=reddit&utm_medium=web2x&context=3
02:11:29FromDiscord<etra> yes, I'm using a more heavy input, 6mb
02:11:36FromDiscord<Elegantbeef> Ah
02:13:32FromDiscord<Elegantbeef> my solution would take eons to solve 😄
02:14:12FromDiscord<Elegantbeef> Yep `Answer: Part1 - GATHERING Part2 - DEVSCHUUR | 24 seconds, 56 milliseconds, 971 microseconds, and 150 nanoseconds` 😄
02:14:34FromDiscord<Elegantbeef> Turns out parsing and processing at the same time is slow
02:15:55FromDiscord<etra> haha, mine took a long time too, because I was using linked list as stack, lol, then I remembered that you can do a silly array for stacks, it's been ages since I implemented primitive types
02:16:11FromDiscord<Elegantbeef> Ugh
02:16:12FromDiscord<Elegantbeef> Your parsing!
02:16:24FromDiscord<etra> yeah, wildly unsafe, I know :laugh:
02:16:33FromDiscord<Elegantbeef> No not unsafe
02:16:36FromDiscord<Elegantbeef> It's fugly
02:16:46FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/aoc2022/day5/day5.nim#L12
02:17:06FromDiscord<etra> wtf what is that kind of magic
02:17:12FromDiscord<Elegantbeef> It's scanf
02:17:32FromDiscord<etra> damn, thanks for the tip
02:18:10FromDiscord<etra> I've been using nim for this week only and it's been pretty cool, and I'm in awe with the results for this problem
02:18:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4hQY
02:20:46FromDiscord<Elegantbeef> I still dont know if pop is slower than the allocation + reversing
02:20:54FromDiscord<Elegantbeef> also what're your compile flags?
02:23:22FromDiscord<etra> I was trusting god, `nim c -d:danger aoc5.nim`
02:23:40FromDiscord<Elegantbeef> also throw `--mm:arc` or `--mm:orc` if you want to live happier
02:24:05FromDiscord<etra> sent a code paste, see https://play.nim-lang.org/#ix=4hQZ
02:24:07FromDiscord<Elegantbeef> and maybe `-d:lto` or `--passC:"-flto" --passL:"-flto"` if your C compiler dont like it
02:24:08FromDiscord<Elegantbeef> yes it does
02:24:29FromDiscord<etra> https://bpa.st/B5QQ
02:24:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4hR0
02:24:42FromDiscord<etra> I tried `other.inner.toOpenArray(other.head, other.head + n - 1).reverse()`
02:24:46FromDiscord<etra> oh, it's reverseD
02:26:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4hR1
02:26:30FromDiscord<Elegantbeef> Is faster or slower than your allocating/sorting
02:27:40FromDiscord<etra> oh, that's surprising, doing openarray.reversed is slower than doing a copy and reverse the slice
02:29:47FromDiscord<Elegantbeef> Finally a pointless addition `me: var Stack[T], other: var Stack[T]` can be written `me, other: var Stack[T]` 😄
02:30:47FromDiscord<etra> oh right i forgot about that, in rust land we don't have that 😔
02:32:23FromDiscord<Elegantbeef> Are you timing parsing aswell?
02:32:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4hR3
02:34:34FromDiscord<Elegantbeef> \I'd argue the whole `split("\n\n")` is another issue if you are
03:10:26FromDiscord<voidwalker> I can't do `it = if it>0: 1 else: 0` inside the mapIt template ?
03:11:17FromDiscord<Gumbercules> sent a code paste, see https://play.nim-lang.org/#ix=4hRf
03:11:20FromDiscord<Elegantbeef> `applyIt`
03:11:34FromDiscord<Elegantbeef> `cast[cstring](myPtrChar)`
03:11:39FromDiscord<Gumbercules> thanks
03:12:05FromDiscord<Elegantbeef> Dont know if `cstring(myPtrChar)` works
03:12:22FromDiscord<Gumbercules> yeah that's what I tried first, still wasn't happy
03:12:31FromDiscord<Gumbercules> the cast worked
04:11:35FromDiscord<Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=4hRr
04:11:48FromDiscord<Tuatarian> the part the compiler dislikes here is the fact that the case statement doesn't have a known type at comptime right?
04:12:05FromDiscord<Tuatarian> one branch is a `HvNum` and the other an `HvExpr`
04:12:26FromDiscord<Tuatarian> I didn't quite provide enough context I now realize, but the first part of the cast statement returns a `HvNum` and the second `HvExpr`s
04:12:42FromDiscord<Elegantbeef> The issue is that the return type hast to be homgenous
04:12:43FromDiscord<Elegantbeef> has\
04:12:59FromDiscord<Elegantbeef> You have a generic type class as a return, that's still only a single possible value for the entire expression
04:13:02*vicecea quit (Remote host closed the connection)
04:13:02FromDiscord<Tuatarian> yeah so we can't have different things in different parts of the case statements
04:13:10FromDiscord<Elegantbeef> Of course not
04:13:23FromDiscord<Tuatarian> ok just confirming
04:13:36FromDiscord<Tuatarian> trying to evade static typing is really not fun
04:13:45FromDiscord<Elegantbeef> Especially since it's impossible to
04:14:00FromDiscord<Tuatarian> you can definitely violate the spirit of it
04:14:12FromDiscord<Tuatarian> but it's not particularly easy or clean
04:14:28FromDiscord<Tuatarian> (understandably, but I definitely want to here, it would make this a thousand times easier to do )
04:14:31FromDiscord<jtv> Well, you can check out the Any type if you really are carrying around enough context dynamically
04:14:47FromDiscord<Tuatarian> would that solve this problem at all?
04:14:49FromDiscord<Elegantbeef> We dont talk about RTTI 😄
04:15:06FromDiscord<Elegantbeef> Yea you'd be generating everything at runtime
04:15:14FromDiscord<Elegantbeef> It's not easy nor elegant, but it's doable
04:15:29FromDiscord<jtv> Well, it's useful enough in small doses for writing other compilers where I'm carrying around my own type info
04:16:04FromDiscord<Elegantbeef> I've personally never used `std/typeinfo` it's just much nicer to have code evaluated statically to do the reflection
04:16:13FromDiscord<Tuatarian> I'm writing an interpreter here
04:16:23FromDiscord<Tuatarian> yes but the problem is that none of my type info is known till runtime
04:16:45FromDiscord<Elegantbeef> Well the problem is you're attempting to minimise code that cannot be minimised
04:17:08FromDiscord<Tuatarian> I'd imagine it should be possible, but probably not in a particularly pleasant
04:17:11FromDiscord<Tuatarian> pleasant way
04:22:46*rockcavera quit (Remote host closed the connection)
04:44:27*ltriant quit (Changing host)
04:44:27*ltriant joined #nim
05:00:55FromDiscord<voidwalker> In reply to @Elegantbeef "`applyIt`": was this reply for me ?
05:02:38FromDiscord<voidwalker> I want to run mapIt on a sequence, but ommit some elements if some condition is not satisfied (leave it as is). Tried it like `it = if it.scheme.startsWith("http")... else: it` but it seems it is outside the template's scope if I write it like that. Alternatives/
05:02:42FromDiscord<voidwalker> (edit) "Alternatives/" => "Alternatives?"
05:04:05FromDiscord<Elegantbeef> I dont do FP so i say use a loop
05:05:14FromDiscord<Rika> Use the filter one too then
05:05:38FromDiscord<Rika> Similarly named
05:08:23FromDiscord<voidwalker> filterIt.. filters. returns same elements as in the original seq, if they meet the condition
05:09:37FromDiscord<Rika> You filter then you map
05:12:40FromDiscord<voidwalker> but filter would change the length of the sequence to map
05:13:44FromDiscord<Rika> I misunderstood
05:13:52FromDiscord<Rika> Your current sample should work as is
05:14:09FromDiscord<Rika> Actually no
05:14:20FromDiscord<Rika> Remove the it = then it should work
05:14:26FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4hRC
05:14:27FromDiscord<voidwalker> ` Error: undeclared identifier: 'it'`
05:15:41FromDiscord<Rika> In reply to @Rika "Remove the it =": Yeah this
05:16:23FromDiscord<Rika> The expression return value is what is used for map, the it value is just a read value
05:18:29FromDiscord<voidwalker> hm you are right, how could I have missed that.. bonobo
06:12:54*arkurious quit (Quit: Leaving)
06:33:28*pbotfullerton quit (Quit: WeeChat 3.7.1)
06:52:04*systemdsucks quit (Ping timeout: 248 seconds)
07:02:53*systemdsucks joined #nim
07:32:05*kenran joined #nim
07:34:22*kenran quit (Remote host closed the connection)
07:43:09*PMunch joined #nim
07:56:17*droidrage joined #nim
08:29:38*Vladar joined #nim
08:44:42*pro joined #nim
08:47:05*pro left #nim (#nim)
09:35:34*vicecea joined #nim
10:32:19*Guest82 joined #nim
10:33:01*Guest82 left #nim (#nim)
12:05:49*ltriant quit (Ping timeout: 260 seconds)
12:06:20FromDiscord<b1rdf00d> does nim have an equivalent (to c++) of returning a const reference? Or is making a copy the better appraoch?
12:10:02FromDiscord<b1rdf00d> sent a code paste, see https://play.nim-lang.org/#ix=4hSP
12:10:48FromDiscord<Rika> it is not a reference, you're returning a value
12:11:00FromDiscord<Rika> mutability is not inherent to the type in nim
12:11:21FromDiscord<Rika> only outside of views, i guess
12:11:33FromDiscord<Rika> (edit) "only outside of views," => "(if it's not a view," | "guess" => "guess)"
12:12:17FromDiscord<b1rdf00d> sent a code paste, see https://play.nim-lang.org/#ix=4hSQ
12:12:50FromDiscord<b1rdf00d> (trying to understand your second point) you need to specify mutability, it's not encoded in the type?
12:13:54FromDiscord<b1rdf00d> is it always a value type, the compiler won't make the decision to use a reference?
12:14:44FromDiscord<Rika> In reply to @b1rdf00d "(trying to understand your": the type cannot transmit mutability, so "var seq" as a return type doesnt make sense
12:14:58FromDiscord<Rika> mutability is up to holders like parameters or arguments
12:15:08FromDiscord<Rika> i mean, parameters or variables
12:16:09FromDiscord<Rika> In reply to @b1rdf00d "is it always a": you require explicit `ref` if you want to ("actually always") return a reference, and mutability of such returned reference is not up to the return type or the function
12:21:44FromDiscord<b1rdf00d> okay cool, thanks Rika 🙂
12:22:20FromDiscord<Rika> In reply to @b1rdf00d "yes like this (not": in this case, there's a copy
12:23:17FromDiscord<Hamid_Bluri> Hey, is there any library for `YAML` like `std/json` that parses the string to YAML nodes?
12:23:29FromDiscord<Hamid_Bluri> seems like https://nimble.directory/pkg/yaml is for aliens
12:29:37FromDiscord<Rika> That package has a node style version for YAML too
12:35:46FromDiscord<Hamid_Bluri> In reply to @Rika "That package has a": it's not documented
12:36:24FromDiscord<Hamid_Bluri> found it thanks
12:37:23FromDiscord<Rika> its really hidden
12:37:32FromDiscord<Rika> i was troubleshooting smth sorry
13:16:04*ltriant joined #nim
13:22:15*ltriant quit (Ping timeout: 268 seconds)
13:28:05FromDiscord<Goat> sent a code paste, see https://play.nim-lang.org/#ix=4hT5
13:30:10*rockcavera joined #nim
13:33:48*jmdaemon quit (Ping timeout: 256 seconds)
13:48:19FromDiscord<hmmm> broskis how do I check if something is of type int
13:48:55FromDiscord<hmmm> hmm maybe I should just try / except parseint
14:03:59FromDiscord<ChocolettePalette> typeof↵(@hmmm)
14:04:20FromDiscord<hmmm> I tried, I got a weird typedesc error bro
14:04:42FromDiscord<ChocolettePalette> Nvm, this is the thinghttps://nim-lang.org/docs/typeinfo.html
14:08:54*TakinOver quit (Ping timeout: 260 seconds)
14:11:31*TakinOver joined #nim
14:19:11FromDiscord<demotomohiro> !eval echo 1 is int, 1.0 is int
14:19:16NimBottruefalse
14:22:55FromDiscord<rutenl> hope this is the right channel, I'm trying to figure out if I'm doing something wrong in this jetbrains nim plugin run/debug configuration. It gives an error at the bottom about the working directory but I did specify it. Should i make an issue for this on the plugin issue tracker or am I doing it wrong https://media.discordapp.net/attachments/371759389889003532/1049692416044699748/image.png
14:26:07FromDiscord<Yardanico> In reply to @ChocolettePalette "Nvm, this is the": this is not the thing
14:26:09FromDiscord<starch> what does 'git' not in PATH mean
14:26:15FromDiscord<Yardanico> you need to install git
14:26:19FromDiscord<starch> how
14:26:24FromDiscord<starch> nimble install git
14:26:26FromDiscord<Yardanico> In reply to @ChocolettePalette "Nvm, this is the": typeinfo is only for runtime type info with RTTI
14:26:36FromDiscord<Yardanico> In reply to @starch "nimble install git": install it via your system package manager if you're on linux
14:26:41FromDiscord<Yardanico> otherwise download git for windows if you're on windows
14:26:53FromDiscord<Yardanico> https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
14:26:54FromDiscord<starch> alright
14:27:58FromDiscord<demotomohiro> Or install package manager for windows like scoop or msys2 and run `scoop install git` or `pacman -S git`.
14:33:44FromDiscord<rutenl> anyone using the jetbrains nim plugin here? does the run/debug config work?
14:33:45FromDiscord<starch> i installed git but what do i add in the PATH
14:34:40FromDiscord<Yardanico> it should've added itself automatically
14:34:45FromDiscord<hmmm> In reply to @demotomohiro "!eval echo 1 is": SO CONFY! ty demo 💓
14:34:52FromDiscord<Yardanico> In reply to @hmmm "SO CONFY! ty demo": that won't work for what you want though
14:34:57FromDiscord<Yardanico> I assume you want to parse strings at runtime
14:34:57FromDiscord<hmmm> wot
14:35:06FromDiscord<Yardanico> then you do need to try parseInt except ValueError
14:35:08FromDiscord<Yardanico> or use parseutils
14:35:42FromDiscord<starch> In reply to @Yardanico "it should've added itself": oh nvm it worked after i restarted the thing
14:35:44FromDiscord<hmmm> I want to check if something after a string is an int, so "examplestring456" should check true
14:35:45FromDiscord<starch> thanku
14:35:54FromDiscord<Yardanico> In reply to @hmmm "I want to check": yes, so the best way is parseutils
14:36:02FromDiscord<Yardanico> then you can also use parseInt from strutils with try/except ValueError
14:36:03FromDiscord<hmmm> so I split the string and check the second part I guess
14:36:06FromDiscord<Yardanico> `is int` won't help you there at all
14:36:10FromDiscord<hmmm> ah ok ok
14:36:12FromDiscord<Yardanico> because types don't exist at runtime
14:36:17FromDiscord<Yardanico> In reply to @hmmm "ah ok ok": or strscans actually
14:36:26FromDiscord<Yardanico> https://nim-lang.org/docs/strscans.html
14:36:30FromDiscord<Yardanico> if your examplestring is static
14:36:40FromDiscord<hmmm> no it's not
14:37:09FromDiscord<Yardanico> and how do you get where the string ends?
14:37:17FromDiscord<Yardanico> you find the first digit?
14:37:35FromDiscord<hmmm> I know that the identifier is exactly examplestring
14:37:48FromDiscord<Yardanico> oh, so just use strscans if you know `examplestring` at compile-time
14:37:54FromDiscord<hmmm> ah ok
14:38:14FromDiscord<hmmm> I'll check it, ty yardy
14:38:44FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4hTu
14:39:03FromDiscord<hmmm> CONFY
14:39:27FromDiscord<Yardanico> n?
14:39:33FromDiscord<hmmm> M COMFY
14:40:32arkanoidI have question about stack+recursion+arc. If I have a recursive function that calls itself as last statement, will all the stack variables created in the above scope be freed before entering the new recursion?
14:41:22FromDiscord<Yardanico> i don't know, but you can always write a custom destructor and see if it gets executed
14:41:34FromDiscord<Yardanico> or try `--expandArc:yourprocname` to see how the transformed code looks like (with all destructors injected)
14:41:52arkanoidgood idea
14:47:17FromDiscord<demotomohiro> How about to make a scope to make sure variables in stack are freed before entering the new recursion?:
14:47:59FromDiscord<Phil> In reply to @rutenl "anyone using the jetbrains": I am, but I'm currently at work and I use it with intellij ^^'
14:48:57FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4hTz
14:49:39FromDiscord<Phil> I'd need to check on my private hardware what I do there. But generally I'd simply use nimble tasks for everything.↵I'd argue you may want some compiler parameters in there such as -d:release for when you compile actual release binaries because those are around 10x faster than binaries not compiled with it
14:49:45FromDiscord<demotomohiro> But stacks used to pass parameters to new recursion cannot be freed.
14:50:09FromDiscord<rutenl> In reply to @Isofruit "I'd need to check": oh so you dont use the plugin's built in run config?
14:50:14FromDiscord<Phil> Depending on what exactly you want to do/use other parameters may also be helpful, such as turning of/on specific warnings
14:50:42FromDiscord<Phil> In reply to @rutenl "oh so you dont": I prefer CLI generally, I use the nim plugin mostly for the better auto-completion
14:50:56FromDiscord<Phil> Or rather, I prefer CLI with nim
14:51:06FromDiscord<rutenl> In reply to @Isofruit "I prefer CLI generally,": i'll have to do that as well for now :p thx for replying
14:51:08FromDiscord<Phil> I can not be bothered to learn that stuff for java so I use proper run configs there
14:51:14arkanoidnot sure if I'm reading the result of this experiment correctly, but it seems to me that vars are not freed before the recursive calls: https://play.nim-lang.org/#ix=4hTA
14:51:40FromDiscord<Yardanico> what do you expect to be freed here?
14:51:48FromDiscord<Phil> In reply to @rutenl "i'll have to do": Happy to help.↵Another side benefit of using nimble tasks is that you can do a lot more and they integrate nicely with, e.g. github CI pipelines
14:51:55FromDiscord<Yardanico> normal stack variables like ints get thrown out automatically, they don't need destructors
14:52:01FromDiscord<Yardanico> since they're value types without a destructor
14:53:03FromDiscord<starch> where can i get the nim ide
14:53:05FromDiscord<Phil> See for example, norm or prologue packages, those automatically run nimble tasks in their github CI pipelines
14:53:13FromDiscord<Phil> nim ide?
14:53:18arkanoidYardanico: when are they "thrown out"? consider a very very deep recursion
14:53:20FromDiscord<starch> yah
14:53:27FromDiscord<Phil> There's VSCode with a nim plugin and Intellij with a nim plugin
14:53:33FromDiscord<Yardanico> In reply to @arkanoid "<@177365113899057152>: when are they": I mean that's not specific to Nim at all, it would work just like it does in C
14:53:34FromDiscord<starch> nono
14:53:37FromDiscord<starch> nim ide
14:53:43FromDiscord<starch> or editor
14:53:43FromDiscord<Phil> Those are your main options, though naturally vim/neovim with nimlsp exist
14:53:52FromDiscord<Yardanico> In reply to @starch "or editor": https://github.com/fox0430/moe
14:53:57FromDiscord<starch> nimedit was the thing i saw
14:54:03FromDiscord<starch> but it doesnt work
14:54:04FromDiscord<Yardanico> it was a very old experiment
14:54:06arkanoidYardanico: sure, I'm not blaming Nim at all, it's just I don't even know how it would work in C :P
14:55:08arkanoidYardanico: also, in my example `v` is a string. I know it has value semantics, but shouldn't it be freed anyway?
14:55:53FromDiscord<Yardanico> no, because the proc doesn't own it
14:56:04FromDiscord<Yardanico> and actually just a literal string doesn't even need a destructor with arc/orc iirc
14:56:36FromDiscord<Yardanico> even if it's in a separate variable, as long as you don't mutate it
14:56:47FromDiscord<Yardanico> because string literals with arc/orc are CoW
14:56:57*pro joined #nim
14:58:02FromDiscord<Yardanico> try
14:58:08FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4hTF
14:58:15FromDiscord<Yardanico> and then
14:58:21FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4hTG
14:58:24FromDiscord<Yardanico> and check expandArc for main in both of those
14:58:30FromDiscord<Yardanico> in the former it won't destroy v, in the latter it will
15:02:39*PMunch quit (Quit: Leaving)
15:03:54FromDiscord<demotomohiro> Variables passed to a proc are freed only when the proc is returned. So stacks and heaps used for `a&a` should increase everytime you call the recursive proc.
15:07:20arkanoidYardanico: you're right, but this doesn't answer the question about recursion, let me move it inside the recursion
15:10:14*pro left #nim (#nim)
15:10:33arkanoidhttps://play.nim-lang.org/#ix=4hTQ if I move bif outside the block, it would be freed only after recursion, so making a block scope is essential
15:10:45arkanoidI would really like to read something about how to make recursion fast
15:11:08arkanoidor have general rules: for example, should I try to have as few as possible arguments?
15:19:32FromDiscord<starch> In reply to @Yardanico "https://github.com/fox0430/moe": how do i open it
15:20:45FromDiscord<demotomohiro> @Arkanoid How about to use loop instead of recursion?
15:21:45FromDiscord<demotomohiro> If possible
15:28:08arkanoiddemotomohiro: I'd like to, but the algorithm does naturally fit into a recursion (I'm dealing with a random-walk like problem, basically)
15:28:53arkanoidbasically a point generates N new points according to some rules, then each new points generates new point according to same rules, and so on
15:29:17arkanoidit's a O(X^N) problem
15:29:40arkanoidthat's why I need very fast recursion and max speed
15:34:49*Phytolizer joined #nim
15:39:40*ehmry joined #nim
15:39:46FromDiscord<EchoPouet> In reply to @starch "how do i open": I use VScode with this extension -> https://marketplace.visualstudio.com/items?itemName=nimsaem.nimvscode
15:45:50Phytolizerany reason deque doesn't support [] with HSlice? would it be a good idea to PR?
15:47:47FromDiscord<starch> In reply to @PotAuFeu "I use VSCode with": how do i use it on atom
15:47:58FromDiscord<starch> (please dont make fun of me for using atom)
15:53:09FromDiscord<EchoPouet> I don't know sorry
15:53:10FromDiscord<demotomohiro> @Arkanoid↵You might be able to write such a code in loop using seq as stack:↵https://play.nim-lang.org/#ix=4hTX
15:54:35FromDiscord<EchoPouet> (edit) "sorry" => "sorry, maybe with OpenVX -> https://open-vsx.org/extension/nimsaem/nimvscode"
15:54:47FromDiscord<EchoPouet> (edit) "OpenVX" => "OpenVSX"
15:59:00arkanoiddemotomohiro, kinda yes, but I have to drop some useful domain-specific metadata that recurision was generating, but yes I think I can manage it
16:05:13*Phytolizer quit (Ping timeout: 260 seconds)
16:14:28*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:15:30FromDiscord<deeuu> Hey,↵when using `nimble`, is it possible to specify the compiler path of the mingw toolchain? I'm building from osx and mingw is under my local user's homebrew directory
16:15:49*ehmry joined #nim
16:21:52FromDiscord<starch> The term 'nim' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, ↵verify that the path is correct and try again.
16:22:11*Phytolizer joined #nim
16:25:43FromDiscord<demotomohiro> try `echo %PATH%` to see path env var.
16:25:53FromDiscord<demotomohiro> Or `echo $PATH` on linux.
16:27:35FromDiscord<demotomohiro> Or your anti-virus software blocks or removed nim.
16:31:19FromDiscord<starch> In reply to @demotomohiro "Or your anti-virus software": nvm i just had to restard vcs
16:31:22FromDiscord<starch> now it shows
16:31:28FromDiscord<starch> Error: undeclared identifier: 'nimble'
16:31:38FromDiscord<starch> (edit) "restard" => "restart"
16:32:55FromDiscord<demotomohiro> nimble and nim should be in same directly.
16:33:41nisstyreis there a library for querying parsed html from htmlparser using XPath or something similar?
16:33:46nisstyrecouldn't find anything from googling
16:33:54FromDiscord<huantian> I know there's one for CSS selectors
16:34:02FromDiscord<huantian> but I couldn't find one for XPath last I checked
16:34:11nisstyremaybe cssselect will be enough
16:34:31nisstyreI understand xpath is really hard to fully implement
16:35:00nisstyreor maybe I could just use selenium or some JS engine
16:35:19FromDiscord<starch> In reply to @demotomohiro "nimble and nim should": nvm another stupid thing i didnt see
16:35:23FromDiscord<starch> sorry
16:35:24FromDiscord<starch> it works now
16:37:22arkanoiddemotomohiro: why did you use "while stack.len < 1000"?
16:37:40arkanoidsorry, wrong paste. Real is "while stack.len != 0:"
16:40:34arkanoidnevermind, got it
16:58:00FromDiscord<starch> how do i run nim files with python
17:00:15FromDiscord<Phil> Nimpy
17:00:41FromDiscord<Phil> The readme of that projects repo should have enough info to get you started, it's fairly simple
17:01:03FromDiscord<demotomohiro> There are also:↵https://github.com/treeform/genny↵https://github.com/Pebaz/nimporter
17:01:09FromDiscord<Phil> That is, if you want to use Nim as a python lib
17:06:26*Phytolizer quit (Remote host closed the connection)
17:06:48*Phytolizer joined #nim
17:11:53*ltriant joined #nim
17:12:14NimEventerNew post on r/nim by BigPotato2: Overloading equality operator with macro?, see https://reddit.com/r/nim/comments/zec57i/overloading_equality_operator_with_macro/
17:17:00*ltriant quit (Ping timeout: 264 seconds)
17:25:29FromDiscord<auxym> In reply to @starch "how do i run": `subprocess.run("yourNimExec.exe")`
17:43:01*PMunch joined #nim
17:44:44FromDiscord<emanresu3> Can I get information of a proc signature? Like the type of the the parameters and return?
17:45:17PMunchYes
17:45:35FromDiscord<emanresu3> how?
17:45:53PMunchstd/macros getTypeImpl I believe it is
17:47:00PMunchBy the way, getting ready for day 6 AoC streaming. I don't have a lot of time today so it'll be a bit of a whirlwind
17:47:04PMunchHopefully it's an easy one
17:51:04FromDiscord<emanresu3> what are you streaming?
17:53:20Phytolizeradvent of code is what AoC stands for
17:54:00FromDiscord<Phil> Is such a thing as module wide concepts feasible? Essentially defining what procedures a given module after code generation must provide and maybe arbitrary conditions they must fulfill.↵↵I will admit this is basically the idea of java interfaces in order to be able to exchange modules seamlessly with one another
17:54:30FromDiscord<Phil> Maybe even write unit tests against the hypothetical procs of the module concept
17:55:37FromDiscord<auxym> In reply to @PMunch "Hopefully it's an easy": it is (IMO)
17:56:47FromDiscord<Phil> I'm also wondering about general testing of nim code, because things start to get tricky when you just want to test the code of one proc, but that proc calls another proc of another module, meaning you now need to take that logic in there into account as well etc. That makes unit testing pretty difficult, kinda leaving you with only integration tests
17:59:38FromDiscord<auxym> "write tests, not too many, mostly integration" 😉 (can't remember where the quote is from however)
18:01:16FromDiscord<Phil> So the general idea for testing in Oop is integration or bust?
18:01:31FromDiscord<Phil> Procedural, not oop
18:01:43FromDiscord<Phil> Damn my brain, semi distracted by sports
18:05:35FromDiscord<Phil> Just basically how to isolate procedures is the core question for me I guess
18:06:46FromDiscord<Phil> Since e.g. in webdev you will test a controller proc at some point and if you can't isolate it you must integration test essentially... Or are so close you may as well go the extra step to boot up a server and actually integration test instead of just calling the proc
18:09:13FromDiscord<QuiteQuietQ> sent a code paste, see https://play.nim-lang.org/#ix=4hUu
18:09:50FromDiscord<QuiteQuietQ> without using `HashSet`
18:11:24FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=4hUv
18:11:51FromDiscord<demotomohiro> In reply to @QuiteQuietQ "is there a better": I think you can use this std proc:https://nim-lang.org/docs/setutils.html#toSet.t,untyped
18:12:26FromDiscord<huantian> oh that's a thing
18:12:30*Vladar quit (Remote host closed the connection)
18:12:30FromDiscord<huantian> yeah that probably works the best
18:14:49FromDiscord<QuiteQuietQ> In reply to @demotomohiro "I think you can": damn, i missed this, thanks!
18:15:32FromDiscord<Phil> @treeform what's your stance for testing in procedural programming?↵Integration tests and nothing else?
18:16:00*ehmry quit (Ping timeout: 256 seconds)
18:19:47PMunchAlright, stream is up: https://www.twitch.tv/pmunche https://www.youtube.com/watch?v=DM0TgDOGTpo
18:20:38FromDiscord<QuiteQuietQ> In reply to @huantian "I'd do it imperatively:": how does the `result` work? is it a builtin thing that can be used in every proc as some kind of return generic?
18:21:08*Phytolizer quit (Ping timeout: 260 seconds)
18:24:26FromDiscord<auxym> yes, in fact it's the idiomatic way to return in nim
18:26:15*ehmry joined #nim
18:26:39FromDiscord<auxym> https://nim-lang.org/docs/nep1.html#introduction-coding-conventions
18:28:39FromDiscord<treeform> In reply to @Isofruit "<@107140179025735680> what's your stance": I am not a fan of TDD or test everything, test small functions, test every function, because 1. its really boring to write tests. 2. its really hard to change anything because you have to rewrite the boring tests.
18:29:02FromDiscord<treeform> But I am huge fan of testing the public interface of things. To make sure new things did not change functionality. Most of my repos have some thing like that.
18:29:49FromDiscord<treeform> Test has helped me catch countless bugs
18:29:55FromDiscord<treeform> (edit) "Test" => "Testing"
18:30:11FromDiscord<treeform> Testing is a tool, it helps in some areas and does not help in others
18:30:22FromDiscord<treeform> like testing UI is really hard and kind of pointless
18:30:32FromDiscord<treeform> while testing compilers is a hard requirement
18:30:51FromDiscord<QuiteQuietQ> In reply to @auxym "yes, in fact it's": cool! thanks for pointing me to the docs↵so I don't even have to declare `result`? it is just there and i can just specify the type by initializing it
18:31:11FromDiscord<arkanoid> The test everything thing popped up with dynamic languages, and it makes sense
18:31:29FromDiscord<treeform> yes dynamic languages require more testing
18:31:37FromDiscord<treeform> static typing is almost kind of a test
18:31:41FromDiscord<arkanoid> Lots of it
18:32:24FromDiscord<treeform> I am huge fan of gold master testing see: https://en.wikipedia.org/wiki/Characterization_test
18:32:34FromDiscord<treeform> take output your program produced and save it as a test
18:32:45FromDiscord<treeform> when output differs figure out why
18:32:53FromDiscord<treeform> and accept new output or change your code
18:34:40FromDiscord<arkanoid> Does this have a name? I basically have been doing this forever
18:34:53FromDiscord<treeform> i called it print testing
18:34:57FromDiscord<treeform> or output testing for a while
18:35:10FromDiscord<auxym> In reply to @QuiteQuietQ "cool! thanks for pointing": yes, it's a variably automatically created in each proc, with the proc's return type. It is also automatically returned when the proc exits, unless you used `return`
18:35:28FromDiscord<arkanoid> I call it\: finally it works let's save this
18:35:49FromDiscord<treeform> ... so it never changes again!
18:36:07FromDiscord<treeform> I am a huge fan of this type of test
18:36:15FromDiscord<treeform> because its easy
18:36:22FromDiscord<treeform> your program generates it
18:36:40FromDiscord<arkanoid> Exactly
18:39:23FromDiscord<huantian> In reply to @auxym "yes, it's a variably": it's also used if you use `return` but don't provide a value to `return`
18:39:39FromDiscord<arkanoid> Actually, it would be nice to have a lib that takes an input, a function, and writes a test to match output
18:43:55FromDiscord<Phil> In reply to @treeform "your program generates it": But also if you overlooked unintended buggy behaviour you're now declaring it intended behaviour, hmm
18:44:13FromDiscord<Phil> I'll need to meditate about that one
18:44:32FromDiscord<Phil> I do like tests as a definition of how my system should behave
18:44:51FromDiscord<Phil> Unit Vs integration tests just defines how granular you go
18:48:42FromDiscord<Phil> The nice thing with unit testing is that you have a much more detailed explanation on how the system should work.↵The drawback is that it can lead to specifying meaningless behaviour that can not occur during actual usage, providing no benefit but still slowing down development
18:49:05FromDiscord<Phil> (edit) "work.↵The" => "work in case something breaks.↵↵The"
18:49:37FromDiscord<arkanoid> Phil, to solve that, you end up on the other edge, where you find contracts
18:58:54FromDiscord<Phil> In reply to @arkanoid "Phil, to solve that,": That doesn't ring a bell I don't think.↵Like, I know concepts related to that, like that names are contracts as to what's inside of them and that tests are contracts as to how a piece of code must behave to fulfill the task assigned, but this feels like you mean a bigger idea
19:01:53*PMunch quit (Quit: leaving)
19:05:42FromDiscord<Phil> I feel like we should have some kind of helper lib for prologue testing either way, at the very least so I can just call "start up my server" and fire http client calls from there... Well I guess that's my next package then
19:06:01FromDiscord<Phil> (edit) "there..." => "there instead of having to do some semi-complicated setup..."
19:08:47*arkurious joined #nim
19:14:18FromDiscord<Phil> In reply to @arkanoid "Phil, to solve that,": Is this the concept?↵https://pactflow.io/what-is-contract-testing-page/↵That kind of matches my previous understanding of BDD / the general purpose that I understood to be behind integration testing
19:14:20FromDiscord<jmgomez> In reply to @treeform "static typing is almost": plus in langs like Nim you can compile time assert I would add
19:14:44FromDiscord<Phil> In reply to @jmgomez "plus in langs like": God I love the fact that is possible, I make copious amounts of usage of that feature
19:16:23FromDiscord<Phil> I love being able to make the compiler scream at you if you use my lib code wrong
19:16:39FromDiscord<Phil> ~~Definitely a healthy dev attitude~~
19:38:08arkanoidis an inline iterator == for loop performance wise?
19:43:30FromDiscord<Cheesy Brik> If I wanna build a data type similar to a Python List (mostly for the challenge not necessarily for a use case) should I use a sequence of pointers or is there a faster way of doing that?
19:43:55FromDiscord<Phil> In reply to @Cheesy Brik "If I wanna build": List as in linked list?
19:44:54FromDiscord<Phil> I'm not quite seeing what aspects of a python list is missing for you in just a seq, thus my question
19:48:09FromDiscord<Cheesy Brik> In reply to @Isofruit "I'm not *quite* seeing": Really it’s just the multiple type functionality
19:55:57FromDiscord<Phil> So like, a list that can contain multiple types at once?↵That...errr... I don't actually see that being possible outside of using an object variant or JSON, which both feel like they kinda render the point moot, specifically JSON would likely be slow
19:57:04FromDiscord<Phil> Basically you'd need to store all data as the same type so you don't violate the rule of one-seq one-type.↵Then you'd need to define procs to convert to/from whatever you're storing.
20:04:48*kenran joined #nim
20:04:56*kenran quit (Remote host closed the connection)
20:05:23FromDiscord<Horizon [She/Her]> I don't get what the `ev` parameter is supposed to be in the `addEventListener` proc, in the `std/dom` module
20:05:33FromDiscord<Horizon [She/Her]> (I'm working with the JS backend)
20:06:03FromDiscord<Horizon [She/Her]> Anyone able to point it out to me? I don't know the equivalent
20:06:33FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4hUM
20:09:45FromDiscord<Phil> Wouldn't ev be the event that gets thrown?
20:10:04FromDiscord<huantian> ^
20:10:23FromDiscord<Phil> in JS you just get away with ignoring that parameter because... well... JS
20:11:55FromDiscord<Horizon [She/Her]> JS doesn't even have that param in the docs?
20:12:06FromDiscord<huantian> It’s the type string
20:12:27FromDiscord<huantian> addEventListener(type, listener)
20:12:34FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4hUN
20:12:36FromDiscord<huantian> > A case-sensitive string representing the event type to listen for.
20:13:20FromDiscord<Horizon [She/Her]> In reply to @huantian "> A case-sensitive string": Ah
20:14:41FromDiscord<Horizon [She/Her]> In reply to @Event Horizon "Also, `addEventListener(DragStart, "dragstart".cstr": I don't understand the issue here at all 😅
20:14:56FromDiscord<Require Support> is there a websockets library that doesnt use async? or where i can disable async
20:16:11FromDiscord<huantian> In reply to @Event Horizon "I don't understand the": You need to give it an EventTarget, but you gave it DragStart which is a DragEventType
20:16:36*tiorock joined #nim
20:16:36*tiorock quit (Changing host)
20:16:36*tiorock joined #nim
20:16:36*rockcavera is now known as Guest2272
20:16:36*Guest2272 quit (Killed (silver.libera.chat (Nickname regained by services)))
20:16:36*tiorock is now known as rockcavera
20:17:05FromDiscord<huantian> It should be something like elem.addEventListener(DragEvent, (_) => discard)
20:17:08FromDiscord<huantian> I think
20:19:45FromDiscord<hotdog> In reply to @Event Horizon "I don't understand the": What is DragStart? It should be an element/node
20:20:42FromDiscord<hotdog> Yeah like @huantian said, didn’t see those messages before
20:22:02*anddam quit (Quit: WeeChat 3.7.1)
20:23:36FromDiscord<Horizon [She/Her]> In reply to @huantian "You need to give": Ooh, i didn't get that before haha
20:36:35*ltriant joined #nim
20:41:36*ltriant quit (Ping timeout: 264 seconds)
20:44:28*anddam joined #nim
20:45:34FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4hUT
20:45:50FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4hUU
20:47:07FromDiscord<Horizon [She/Her]> Compiling the file works just fine
20:47:20FromDiscord<Horizon [She/Her]> That's... Really odd
20:48:00FromDiscord<Horizon [She/Her]> How would i suppress that individual error? Seems to be misleading
20:49:49FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4hUW
20:51:59FromDiscord<Horizon [She/Her]> No errors on stable
20:52:15FromDiscord<Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4gkR
20:52:34FromDiscord<Horizon [She/Her]> Looks like something broke nimsuggest on devel?
20:52:48*anddam quit (Quit: WeeChat 3.7.1)
20:54:56*oprypin quit (Quit: Bye)
20:55:13*oprypin joined #nim
20:59:33*jmdaemon joined #nim
21:09:02FromDiscord<hmmm> uh oh times format("dd/MM/yy") assumes that 06/12/99 it's 06/12/2099 🧐
21:09:36FromDiscord<hmmm> [karen face intensifies] I desire to speak to the nim manager
21:12:46*rockcavera quit (Remote host closed the connection)
21:19:23FromDiscord<hmmm> very modernly 😃 I asked ChatGPT to :"write a python script to set a string var "061299" parse it in ddMMyy format and reformat it to dd/MM/yyyy"
21:19:37FromDiscord<hmmm> and it works as I expected
21:20:05FromDiscord<hmmm> sent a code paste, see https://paste.rs/cgb
21:20:45FromDiscord<hmmm> outputting 06/12/1999
21:26:48FromDiscord<hmmm> apparently it doesn't know the nim lang very well because the nim version of the above doesn't compile 🤨 we are AI proof bois
21:33:09*junaid_ joined #nim
21:33:41FromDiscord<Yardanico> In reply to @hmmm "uh oh times format("dd/MM/yy")": "The last two digits of the year. When parsing, the current century is assumed. "
21:33:53FromDiscord<hmmm> hmmmmmm
21:34:08FromDiscord<Yardanico> how would it know what century you want specifically if it just gets a string
21:34:21FromDiscord<hmmm> and why python assumes the sane default century? 😃
21:34:34FromDiscord<Yardanico> who knows?
21:34:37FromDiscord<Yardanico> nim is not python
21:34:42*rockcavera joined #nim
21:34:53FromDiscord<hmmm> yea but sane defaults are better than futurama defaults 🧐
21:35:30FromDiscord<Yardanico> so we should assume that 061215 is 1915 ?
21:35:41FromDiscord<hmmm> this is a very interesting question
21:35:45FromDiscord<hmmm> 😃
21:35:52FromDiscord<hmmm> let's see what python does
21:36:31FromDiscord<Yardanico> we don't need to
21:36:32FromDiscord<hmmm> nu python has actually super magicks
21:36:41FromDiscord<hmmm> it detects always the right century
21:37:12FromDiscord<Yardanico> In reply to @hmmm "it detects always the": anyway, what's the issue?
21:37:20FromDiscord<Yardanico> you can just use std/times and subtract 100 years
21:37:25*junaid_ quit (Remote host closed the connection)
21:37:48FromDiscord<hmmm> absolutely none, it was just funny and I wanted to know the whys and why nots 🥳
21:42:01FromDiscord<Yardanico> i just feel like python behaviour is much more prone to surprising errors
21:43:18FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1049803239610134588/image.png
21:43:23FromDiscord<Yardanico> this is python's behaviour
21:43:36FromDiscord<Yardanico> <https://github.com/python/cpython/blob/main/Lib/_strptime.py#L380>
21:43:44FromDiscord<hmmm> wow, that's interesting
21:43:53FromDiscord<hmmm> 69 99
21:43:55FromDiscord<hmmm> hmm
21:43:56FromDiscord<Elegantbeef> always 1900 is just the wrong behaviour
21:44:00FromDiscord<hmmm> ty yardy very interesting
21:44:11FromDiscord<Yardanico> @beef well, nim defaults to the current century
21:44:16FromDiscord<Yardanico> and python uses this check
21:44:17FromDiscord<Elegantbeef> That's better
21:45:13FromDiscord<Elegantbeef> really though the century used should be the one closest to
21:45:31FromDiscord<Elegantbeef> if it's 2022 and you have 99 that's the last century not 2099
21:45:35FromDiscord<Yardanico> in Python that behaviour was implemented in 2.3
21:45:36FromDiscord<Yardanico> <https://github.com/python/cpython/commit/08e54270f2dae5014f04d627739f71ecce5ad19e>
21:45:48FromDiscord<Yardanico> and no docs actually specify it as far as I searched
21:45:56FromDiscord<Yardanico> datetime python docs don't say anything about this behaviour
21:45:58FromDiscord<Yardanico> very nice
21:46:33FromDiscord<Yardanico> actually sorry, it does, but in the time module
21:46:34FromDiscord<Yardanico> https://docs.python.org/3/library/time.html
21:46:37FromDiscord<Yardanico> "Function strptime() can parse 2-digit years when given %y format code. When 2-digit years are parsed, they are converted according to the POSIX and ISO C standards: values 69–99 are mapped to 1969–1999, and values 0–68 are mapped to 2000–2068."
21:47:48FromDiscord<hmmm> well from a practical point of view if you have 15/12/89 it's much more probable that it's 1989 than 2089. On the other hand a simple rule like nim is easy to remember so you can make preparation for it I guess
21:48:58FromDiscord<Elegantbeef> It's more sensible to a programmer to do the closest, but parsing based off the users time isnt the greatest
21:49:22FromDiscord<Elegantbeef> custom parser per decade when!
22:19:05*anddam joined #nim
22:19:55*anddam quit (Client Quit)
22:30:01FromDiscord<hmmm> broskis any magical incantation to echo all the proc names in a project?
22:33:11*anddam joined #nim
23:01:26arkanoidmost efficient way to have a fifo with a seq? is there a "pop head"?
23:01:49FromDiscord<! Nilts> Is there any way to import procs types and constants from a pre-compiled file and create these pre-compiled files in nim
23:02:28FromDiscord<Elegantbeef> Seq's are not efficient FIFO queues
23:02:40FromDiscord<Elegantbeef> They're efficient FILO queues
23:03:21FromDiscord<hmmm> well if you reverse them they become FIFO efficient 😃
23:03:40FromDiscord<hmmm> or so pmunchie told me years ago
23:03:42FromDiscord<Elegantbeef> Uhh
23:03:50arkanoidnope, a stack is a stack
23:04:16FromDiscord<Elegantbeef> If you have to reverse them you lose your efficiency
23:05:03FromDiscord<Elegantbeef> There is std/deque
23:05:12arkanoidI'll use deque then
23:05:14FromDiscord<hmmm> yea that strange thingy
23:14:25*ltriant joined #nim
23:14:30arkanoidhmmm, your username check's out most of the times you write something, you know
23:16:48*genpaku quit (Remote host closed the connection)
23:20:42*genpaku joined #nim
23:22:39FromDiscord<auxym> In reply to @arkanoid "most efficient way to": std/deques
23:23:24FromDiscord<AmjadHD> @ElegantBeef are you planning to add support for `openarray[char]` to `strutils` procedures ?
23:23:36FromDiscord<Elegantbeef> Araq said no
23:23:46FromDiscord<AmjadHD> In reply to @Elegantbeef "Araq said no": Why ?
23:35:01FromDiscord<robdog> you awake ??
23:35:43FromDiscord<Elegantbeef> No clue why