<< 22-02-2023 >>

00:08:54FromDiscord<auxym> yeah, but nimx seems pretty active, latest commit 3 days ago
00:17:19FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4oQG
00:17:59FromDiscord<Patitotective> found it, its called clamp :[
00:18:01FromDiscord<Patitotective> (edit) ":[" => ":]"
01:13:22NimEventerNew thread by yalexr: How to declare array (of unknown size) of floats for a webaudio wrapper function signature?, see https://forum.nim-lang.org/t/9925
01:29:14FromDiscord<Dudugz> Any recommended MySQL drivers to use in a project?
01:30:35FromDiscord<Dudugz> Oh nvm I didn't see that ``std/db_mysql`` existed
01:42:54*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
01:43:13*jmdaemon joined #nim
02:05:09FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4oQW
02:07:06FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4oQX
02:08:04FromDiscord<Elegantbeef> It's likely your `Transform[T]()`
02:12:07FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4oQY
02:12:24FromDiscord<Elegantbeef> Like i said it's `Transform[T]()`
02:12:29FromDiscord<Elegantbeef> I do not think that works
02:12:47FromDiscord<Elegantbeef> `T` is not instantiated so it attempts to do `Transform[T]` with an unistantiated T
02:13:04FromDiscord<sOkam!> it has worked before without the type being a ref, but maybe its due to the ref 🤔
02:13:24FromDiscord<sOkam!> or maybe it wasn't a generic
02:14:19FromDiscord<Elegantbeef> Likely best to just make an overload
02:15:41FromDiscord<sOkam!> what do you mean?
02:16:02FromDiscord<Elegantbeef> `proc newRenderBody[T]()`↵`proc newRenderBody[T](mdl: RenderModel)`↵...
02:17:11FromDiscord<sOkam!> oh you mean having two separate versions of the proc without allowing the default value
02:17:18FromDiscord<sOkam!> didn't think about that
02:19:06FromDiscord<sOkam!> sent a code paste, see https://paste.rs/Kzx
02:19:09*xet7 joined #nim
02:23:08FromDiscord<sOkam!> wait, LSP is saying "no parameters allowed for TransformEuler" 🤔 ↵is the generic definition wrong in some way?
02:49:23FromDiscord<Hourglass [She/Her]> I'll probably implement packets manually as I go, trying to auto-generate them is just causing me a headache and burning me out, and I'd like to get a semi-functional product eventually aha
02:54:24*void09_ quit (Ping timeout: 248 seconds)
02:54:49*void09 joined #nim
03:01:07FromDiscord<Dudugz> https://docs.github.com/en/actions/automating-builds-and-tests↵↵Is it possible to have automatic builds for Nim? If yes, could you show an example? I wish I could just commit and then have Github build the artifact
03:05:10FromDiscord<Hourglass [She/Her]> Yeah it's possible, you just need to create a GitHub Action that compiles the code and uploads the binary, I don't have any code for it though
03:26:38FromDiscord<Dudugz> Got it, good for now I'll focus on my project and later I'll see if I make a github action that compiles
03:26:53FromDiscord<Dudugz> (edit) "Got it, good for now I'll focus on my project and later I'll see if I make a github action that compiles ... " added "and upload the artifact"
03:27:59FromDiscord<amadan> There is an example here but its a bit complex↵https://github.com/nim-lang/langserver/blob/master/.github/workflows/binaries.yml
03:28:00FromDiscord<Hourglass [She/Her]> Good luck! I recommend testing in a private repo, it isn't that hard after you figure out how GH Actions work really
03:28:28FromDiscord<huantian> this is the actions i use for buidling <https://github.com/huantianad/levelsync/blob/master/.github/workflows/main.yml>
03:28:35FromDiscord<Dudugz> Thx guys i'll take a look
03:28:59FromDiscord<huantian> probably more complex than necessary but it has cool graph so worth https://media.discordapp.net/attachments/371759389889003532/1077794103514890401/image.png
03:35:27FromDiscord<asgeralstrup> Hi, does anyone know if there is an e-graph library for nim? I.e. like https://egraphs-good.github.io/ for Rust?
03:37:21FromDiscord<Iliketwertles> how could i translate `int uname(struct utsname buf);` ↵to `let kernel = syscall(UNAME)`
03:37:51FromDiscord<Iliketwertles> trying to use the syscall uname with syscall
04:12:29*azimut quit (Ping timeout: 255 seconds)
04:20:31FromDiscord<Hourglass [She/Her]> Is it possible to mark a template as async? Since my template should will call an async proc so i want to ensure any user using my api uses await on it
04:21:21FromDiscord<Elegantbeef> Just make the return type a future and carry on
04:22:33FromDiscord<Hourglass [She/Her]> Sweet thanks!
04:29:25*arkurious quit (Quit: Leaving)
06:22:08FromDiscord<ajusa> Is there a way to pass multiple untyped blocks to a template in Nim?
06:24:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oRr
06:25:15FromDiscord<ajusa> Oh interesting, didn't know I could use `do` like that. I assume there isn't a way to have named blocks that are passed in?
06:25:35FromDiscord<Elegantbeef> A macro can use all the normal `of` `else` and firends
06:25:43FromDiscord<Elegantbeef> You cannot use arbitrary named blocks though
06:26:12FromDiscord<ajusa> gotcha, thanks! I'll probably just adjust my template to take in certain arguments as a string rather than doing everything in a DSL
06:26:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oRs
06:27:31*ltriant quit (Ping timeout: 268 seconds)
06:27:57*xet7 quit (Ping timeout: 255 seconds)
06:31:41FromDiscord<gogolxdong> https://github.com/status-im/nim-graphql
06:31:55FromDiscord<gogolxdong> /home/ubuntu/nim-graphql/playground/swserver.nim(11, 23) Error: cannot open file: chronos
06:32:18FromDiscord<gogolxdong> nimble ethereum with/without nimble.lock
06:32:53FromDiscord<gogolxdong> (edit) "nimble ethereum with/without nimble.lock ... " added "with chronos installed."
06:50:18FromDiscord<amadan> Think Nim doesn't know how to read pkgs2?↵When I update the task to call nimble instead like `nimble c -r -d:release playground/swserver` it can compile fine
06:52:39FromDiscord<gogolxdong> yes, I tried on another server , it compiles instead, the difference is the one errors had choosenim installed, not sure it's relevant.
06:58:32FromDiscord<ajusa> Has anyone tried a couple of the filesystem monitoring packages? I want to detect when a file is changed and run some code accordingly - I tried using https://github.com/paul-nameless/nim-fswatch but that maxed out my CPU
06:59:53FromDiscord<Elegantbeef> I'd say make an issue fswatch
06:59:53FromDiscord<Elegantbeef> Or look at the code yourself 😄
07:00:14FromDiscord<Gumbercules> I've had good luck wrapping: https://github.com/septag/dmon
07:06:37FromDiscord<gogolxdong> oh, not only that, I was updating Nim while compiling nimble etheruem , from Feb. 1 to latest and it errors again on another server.
07:06:56FromDiscord<gogolxdong> In reply to @amadan "Think Nim doesn't know": what's your nim build info
07:09:31FromDiscord<amadan> Basically the same↵nim: devel 1.9.1 (2023-02-21)↵nimble: 0.14.2 ↵choosenim: 0.8.4
07:14:24FromDiscord<gogolxdong> it compiles after rename nimble.lock to some else.
07:17:04FromDiscord<amadan> How did you install nimble?
07:20:03FromDiscord<gogolxdong> build from source ./build_all.sh
07:21:37FromDiscord<4zv4l> is there a better way I can format this line ?↵`let default = (regex: "^Hello$", location: getEnv("PROGRAMDATA")/"evidence", box_title: "warning", box_content: "invalid data went into the clipboard", blame: 10, save: false)`
07:21:52FromDiscord<4zv4l> because it's quite long
07:23:21FromDiscord<amadan> In reply to @gogolxdong "build from source ./build_all.sh": looking at koch.nim it seems to install an older version of nimble than 0.14.2 (Whats the git hash for `nimble --version`?)↵I don't think you have the latest nimble which has some fixes for lock files
07:23:34FromDiscord<Rika> make an object, something that large shouldnt be a tupole
07:23:37FromDiscord<Rika> (edit) "tupole" => "tuple"
07:24:30FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=4oRy
07:28:26FromDiscord<4zv4l> looks alright ?
07:28:28FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4oRz
07:28:39FromDiscord<4zv4l> not sure for the final return
07:29:21FromDiscord<4zv4l> or instead of making another object, I could modify directly the `default` one ?
07:31:40FromDiscord<Rika> make a constructor so you dont have a default config var
07:32:00FromDiscord<Rika> move all the parsing to procs for the object and stuff
07:32:18FromDiscord<Elegantbeef> Remove useless variables
07:32:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oRB
07:32:44FromDiscord<Elegantbeef> Whoops commas required at the end of each field
07:34:22FromDiscord<gogolxdong> https://media.discordapp.net/attachments/371759389889003532/1077855854101020753/image.png
07:34:50FromDiscord<gogolxdong> It seems that 0.14.2 change the behaviour with nimble.lock file
07:34:58FromDiscord<gogolxdong> (edit) "change" => "changes"
07:36:06FromDiscord<gogolxdong> yes, build from source gets 0.14.0, 0.14.2 is download installed.
07:36:19FromDiscord<gogolxdong> (edit) "yes, build from source gets 0.14.0, ... 0.14.2" added " my"
07:36:27FromDiscord<4zv4l> In reply to @Elegantbeef "This can be rewritten": will try this, looks better indeed
07:39:33FromDiscord<Arathanis> How come functions can raise Exceptions? surely that is considered a side effect
07:39:36FromDiscord<Arathanis> (edit) "effect" => "effect."
07:39:43FromDiscord<Arathanis> (edit) "Exceptions?" => "exceptions?"
07:39:51FromDiscord<Arathanis> (edit) "surely" => "Surely"
07:41:14FromDiscord<Rika> it is tracked as a separate kind of effect
07:41:41FromDiscord<Arathanis> Not sure I understand what that means
07:41:44FromDiscord<Rika> if you want to enforce no catchables are thrown use `{.raises: [].}`
07:41:47FromDiscord<Arathanis> It just doesn't count?
07:42:07FromDiscord<Elegantbeef> It's not a side effect in Nim's mind
07:42:08FromDiscord<Rika> its tracked by a different system
07:42:22FromDiscord<Elegantbeef> You can argue all day about what a side effect is, Nim has specific ideas of what one is
07:42:28FromDiscord<Rika> side effects are strictly non-local variable access
07:42:50FromDiscord<Arathanis> I am not trying to argue, just seeking to understand what is and is not considered a side effect for the purposes of functions
07:43:02FromDiscord<Arathanis> Trying to improve my skill with the language.
07:43:03FromDiscord<Elegantbeef> hey you can grow the stack or heap allocate inside a function
07:43:29FromDiscord<Rika> beef is just tired of certain other people arguing about what a side effect is
07:43:33FromDiscord<Rika> forgive him for being so wary
07:43:34FromDiscord<Arathanis> Are there any other "side effects" I should be aware of that are allowed in functions?
07:43:58FromDiscord<Arathanis> Certain people don't want to admit haskell is only interesting academically 😎
07:44:01FromDiscord<Elegantbeef> Nim's default side effect tracking is "mutating any value type that isnt passed in as a `var`
07:44:24FromDiscord<Elegantbeef> Stricfuncs in 2.0+ disallow mutating any reference inside a func
07:44:27FromDiscord<Rika> any function that does `{.cast(nosideeffect).}: ...` will be treated as no side effect, up to your interpretation whether you agree or not
07:44:42FromDiscord<Rika> i forgot if thats the real syntax
07:44:48FromDiscord<Rika> but its to the tune of what i wrote
07:45:01FromDiscord<Elegantbeef> `{.noSideEffect.}:`
07:45:02FromDiscord<Elegantbeef> Do not think it requires a cast oddly
07:45:13FromDiscord<Elegantbeef> I might be misremembering
07:45:18FromDiscord<Elegantbeef> I use funcs so seldomly
07:45:25FromDiscord<Rika> ah yes the two of us not remembering
07:45:29FromDiscord<Rika> what a great scenario
07:45:35FromDiscord<Elegantbeef> ` {.cast(noSideEffect).}:`
07:45:37FromDiscord<Elegantbeef> That's correct
07:46:02FromDiscord<Arathanis> ok i understand now
07:46:03FromDiscord<Rika> what would you consider as a side effect arathanis
07:46:12FromDiscord<Arathanis> in large part func means it wont mutate global state
07:46:13FromDiscord<Rika> just so we can say if it is considered by nim or not
07:46:15FromDiscord<Rika> yes
07:46:17FromDiscord<Arathanis> or thread local state
07:46:24FromDiscord<Rika> not sure about that one
07:46:36FromDiscord<Arathanis> im reading the docs on noSideEffect
07:46:38FromDiscord<Rika> anything that isnt accessible by the parameters of the function
07:46:46FromDiscord<Arathanis> it says it cant access globals or threadlocals
07:50:55*PMunch joined #nim
07:52:12FromDiscord<Gumbercules> https://media.discordapp.net/attachments/371759389889003532/1077860343134564403/fps_camera_demo.gif
07:52:51FromDiscord<Gumbercules> tessellation and LODing via compute shader
07:52:57*kenran joined #nim
07:53:06FromDiscord<Elegantbeef> I appreciate the hmm.nim
07:53:15FromDiscord<Gumbercules> \o/
07:53:38FromDiscord<Gumbercules> at this point it's basically a port of handmade math
07:53:47FromDiscord<Gumbercules> although I only have the SSE2 implementations ported
07:54:14FromDiscord<Elegantbeef> Oh i take it back, i thought it was just a dummy file of you toying with something
07:54:25FromDiscord<Gumbercules> nah
07:54:31FromDiscord<Arathanis> it stands for heavy macro mutation
07:54:38FromDiscord<Gumbercules> if only
07:54:43FromDiscord<Gumbercules> I think now it's time to do some shadow mapping
07:55:29FromDiscord<Gumbercules> that or more brushes now that I have this tessellation + picking thing sorted out
08:46:40*Notxor joined #nim
08:59:43*kenran quit (Remote host closed the connection)
09:22:34*jmdaemon quit (Ping timeout: 246 seconds)
09:38:57PMunchOoh, the error I was facing with rewriting `echo` actually didn't have anything to do with that part
09:39:03PMunchIt's just a random ORC bug
09:39:33PMunchSo httpbeast doesn't work on devel
09:44:16FromDiscord<Elegantbeef> cry with `--mm:refc`
09:44:43*NimEventer quit (Remote host closed the connection)
09:44:57*NimEventer joined #nim
09:46:30PMunchAha, it's actually a `--threads:on --gc:orc` bug
09:46:52FromDiscord<I have 50GB of nothing on my PC> will variable overloading be implemented anywhere in the near future?
09:46:54PMunchWith `--threads:off --gc:orc` or `--threads:on --gc:refc` everything works fine
09:47:04FromDiscord<I have 50GB of nothing on my PC> sent a code paste, see https://play.nim-lang.org/#ix=4oS5
09:47:04FromDiscord<I have 50GB of nothing on my PC> this kind
09:47:06PMunch@I_have_50GB_of_nothing_on_my_PC, variable overloading?
09:47:23FromDiscord<Elegantbeef> Nim already has shadowing in scopes
09:47:25PMunchI highly doubt it, and personally would be against it
09:47:40FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oS6
09:48:06FromDiscord<Elegantbeef> Anything other than scope based is just awful
09:48:29FromDiscord<I have 50GB of nothing on my PC> I respectfully disagree
09:48:54FromDiscord<Elix> Hey, i having some issues.↵I cant get an output when using echo, am i doing something wrong? https://media.discordapp.net/attachments/371759389889003532/1077889713307930674/image.png
09:49:00PMunchWhy do you think that would be a desirable feature?
09:49:02FromDiscord<Elegantbeef> Templates/macros could introduce variables with the same name as a variable already declared and you wouldnt know that you now have a string
09:49:29FromDiscord<Rika> In reply to @Elix "Hey, i having some": What’s the source?
09:49:35PMunch@Elix, kinda hard to tell what's wrong without any code
09:49:57FromDiscord<Elix> just ``echo "Hello World"``lol
09:50:40FromDiscord<Rika> Did you save the file after making it
09:50:52FromDiscord<Rika> Check using cat
09:50:54PMunchYeah that sounds incorrect
09:51:09FromDiscord<Rika> You mean the behaviour is incorrect
09:51:13FromDiscord<Rika> The code is right
09:51:25FromDiscord<Elix> In reply to @Rika "Did you save the": omg, that was the issue
09:51:31FromDiscord<Elix> first time using vs code
09:51:32FromDiscord<Rika> Haha
09:51:45FromDiscord<Rika> Yeah no auto save by default
09:51:49FromDiscord<Rika> Gotta turn it on iirc
09:52:14FromDiscord<I have 50GB of nothing on my PC> sent a code paste, see https://play.nim-lang.org/#ix=4oSb
09:52:24FromDiscord<I have 50GB of nothing on my PC> btw should I paste code blocks here, given IRC doesn't support those well?
09:52:31FromDiscord<Rika> Why are your stacks all different types?
09:52:38FromDiscord<Rika> It’s fine
09:52:47FromDiscord<Rika> The bot translates them into abetter format for IRC
09:52:53FromDiscord<Rika> (edit) "abetter" => "a better"
09:52:54PMunchYeah, the bridge bot creates links out of them :)
09:53:10PMunchUnfortunately it's not smart enough to extract mentions..
09:53:29FromDiscord<Rika> Replies more of
09:53:32PMunchSo if you reply to people on IRC you should put their mention in a separate message
09:57:17PMunch@I_have_50GB_of_nothing_on_my_PC, well it helps if you structure your code a bit better: https://play.nim-lang.org/#ix=4oSd
09:59:24PMunchOr if you want to keep your structure and not pollute your namespace with a bunch of variables (and keep `stack` immutable): https://play.nim-lang.org/#ix=4oSf
10:11:05NimEventerNew thread by shirleyquirk: Ffi: how to pass a value to c?, see https://forum.nim-lang.org/t/9926
10:12:49FromDiscord<Rika> Oh cool someone trying to run Nim on an FPGA
10:25:00FromDiscord<Tanguy> Or properly name your variables↵stack2 -> formattedStack↵stack3 -> stackAsString↵Or whatever
10:26:25FromDiscord<Elegantbeef> I personally name my variables `variablei` where `i` is a constantly incrementing value that i keep track of
10:27:17FromDiscord<Elegantbeef> Fuck that's a fantastic troll language feature 😄
10:27:24FromDiscord<Rika> Just name them single letters though
10:27:26FromDiscord<Tanguy> That's too clear, you are giving the fact that it's a variable, just `v1`, `v2`, etc
10:27:36FromDiscord<ieltan> random library that doesnt work with devel :/
10:27:43FromDiscord<Elegantbeef> `Error: Expected a v3, but got v5`
10:27:44FromDiscord<ieltan> i hope v2 comes soon
10:27:49FromDiscord<Rika> Which
10:28:01FromDiscord<Rika> Oh you mean a random number library?
10:28:17FromDiscord<ieltan> no
10:28:24FromDiscord<ieltan> db_common import
10:28:33FromDiscord<ieltan> (edit) "db_common" => "std/db_common"
10:28:42FromDiscord<ieltan> which got its own nimble package now
10:28:54FromDiscord<ieltan> and libraries using it naturally wont compile
10:28:56FromDiscord<Elegantbeef> So what's the issue?
10:29:02FromDiscord<Elegantbeef> Ah
10:29:11FromDiscord<ieltan> nothing i just switched to 1.6.10
10:29:38FromDiscord<ieltan> i was just saying that i hope v2 comes soon so that libraries can finally support it
10:29:40FromDiscord<ieltan> :p
10:29:40FromDiscord<Elegantbeef> I'd say make a PR
10:29:48FromDiscord<Elegantbeef> Libraries can presently support it
10:30:15FromDiscord<ieltan> it already has a pr i think
10:30:17FromDiscord<ieltan> https://github.com/xzfc/ndb.nim/pull/23
10:30:32FromDiscord<ieltan> dead project ? 😢
10:30:51FromDiscord<ieltan> the author also have low activity
10:30:56FromDiscord<ieltan> welp cant be helped
10:32:33FromDiscord<ieltan> by author i mean the repo maintainer
10:32:37FromDiscord<ieltan> had to specify that
10:33:01FromDiscord<ieltan> oh, seems like the reviewer is quite active
10:47:40*xet7 joined #nim
10:49:05*advesperacit joined #nim
10:50:14FromDiscord<amadan> lowdb is a fork of it that works with devel
10:50:34FromDiscord<amadan> https://github.com/PhilippMDoerner/lowdb
10:52:19NimEventerNew thread by sgmoore: How do I detect/guess the encoding used in a text file?, see https://forum.nim-lang.org/t/9927
10:56:09FromDiscord<Phil> Pretty much, I contribute to norm occassionally and the fact that ndb wasn't nim 2.0 compatible was really grating on me, as that meant norm wasn't nim 2.0 compatible which I needed because I was using it in a project that required nim 2.0
10:56:19FromDiscord<Phil> Thus the fork, norm will soon-ish follow suite
10:59:30FromDiscord<ieltan> yeah, i used yesterday norm and thats how i found out ndb doesnt support 2.0
11:00:36FromDiscord<Phil> If you want to have a 2.0 compatible norm version now I have a fork I currently use
11:00:38FromDiscord<ieltan> eventually switched to ponairi because it's too awesome of a library for me to use for what im doing but ended up importing ndb anyways because the db connector function doesnt support mariadb's so i rolled my own with it
11:01:37FromDiscord<ieltan> In reply to @Isofruit "If you want to": well i dont need it a 2.0 compatible norm just a ndb one
11:01:39FromDiscord<Phil> https://github.com/PhilippMDoerner/norm/tree/nim2↵There, my private fork I currently use that eventually will get bumped into norm when I can find the time
11:01:44FromDiscord<Phil> Ah, in that case just use lowdb
11:01:46FromDiscord<ieltan> but thanks i will keep it in mind
11:01:52FromDiscord<ieltan> alright
11:01:55FromDiscord<ieltan> thanks man
11:01:59FromDiscord<Phil> 👍
11:02:06FromDiscord<ieltan> btw
11:02:24FromDiscord<ieltan> Is it good practice to use `include` ?
11:02:29FromDiscord<Phil> NO!
11:02:31FromDiscord<ieltan> I have to cope with my
11:02:37FromDiscord<ieltan> ide screwing up
11:02:37FromDiscord<Phil> Avoid, steer clear, do not use unless necessary
11:02:53FromDiscord<ieltan> Well here's my answer 😂
11:03:05FromDiscord<Phil> Include is basically copy-pasting code, but in a sense that any copy does not recognize another copy
11:03:27FromDiscord<Phil> As in, if you define `type A = object` in a file and include it, you now have 2 `type A = object` definitions that are not compatible with one another
11:03:35FromDiscord<ieltan> I wasn't sure why my IDE was screwing basic hover informations
11:03:44FromDiscord<ieltan> In reply to @Isofruit "As in, if you": what about function overloading
11:04:07FromDiscord<ieltan> because it's kind of the reason why i needed the include
11:04:11FromDiscord<Phil> Include is a way to split files that otherwise would be gargantuan into smaller source files and combine them all in a single file that includes all the smaller files and then you just import this "combiner" file
11:04:18FromDiscord<Phil> But I have yet to encounter a usecase where that would actually be necessary
11:05:16FromDiscord<Phil> In reply to @ieltan "what about function overloading": there's a lot of overloading you can do.↵Do you mean you want to have 2 procs with the same name and the same parameters?
11:05:23NimEventerNew thread by sls1005: Garbage Collectors and Shared Libraries, see https://forum.nim-lang.org/t/9928
11:06:19FromDiscord<ieltan> In reply to @Isofruit "there's a lot of": actually i am not sure if its overloading, basically i am making a discord bot with `dimscord` and `dimscmd` and theres lots of `cmd.addChat()` and it uses `do` notation
11:06:29FromDiscord<ieltan> dont really know what it does
11:06:41FromDiscord<Phil> I still don't know where you want to go 😛
11:06:46FromDiscord<ieltan> but thats not important, i want to organize my code
11:06:50FromDiscord<ieltan> yeah i am getting to that
11:08:45FromDiscord<ieltan> i have a feature folder at the root of my project where each file implement a command and everything related to it so for example i have `feature/ping.nim`, i put in a `cmd.addChat("ping")` blablabla
11:09:27FromDiscord<ieltan> at the root of my project i have `discordbot.nim`, i want it to be the main file
11:10:15FromDiscord<ieltan> i want to "import ping", so that its like its part of `discordbot.nim` but if i just use a bare `import` it says 'import not used' or something
11:11:16FromDiscord<ieltan> if i use `include` instead it doesnt say it but the price for this is total obliteration of my IDE and potentially lots of 'multiple import' warnings
11:11:47FromDiscord<ieltan> so is there a clean solution to my problem or do i have to cope with a gigormous `discordbot.nim`
11:11:49FromDiscord<ieltan> ?
11:15:32*ltriant joined #nim
11:27:29FromDiscord<ieltan> looks like my beginner comprehension of Nim is showing up, i imagined a problem where there was actually none https://media.discordapp.net/attachments/371759389889003532/1077914520443424788/image.png
11:28:15FromDiscord<ieltan> seems like i could ignore the warnings
11:28:23FromDiscord<ieltan> i'll run tests and see
11:36:13FromDiscord<Phil> While semi distracted at work I can fundamentally not get the issue.↵I only see at a glance that you never typically just use a blank `import`, it's always `import <package/module>`
12:13:14*Notxor quit (Remote host closed the connection)
12:13:40*Notxor joined #nim
12:29:53*azimut joined #nim
12:38:44FromDiscord<ieltan> In reply to @Isofruit "While semi distracted at": it's okay i got it
12:38:56FromDiscord<ieltan> err on the other hand my nimsuggest has completely died
12:39:56FromDiscord<ieltan> no more linting even though i should have blatant errors
12:40:31FromDiscord<ieltan> turned one of my `const` to `consté` and yup, nothing
12:41:47FromDiscord<Phil> I will admit that I don't use nimsuggest... I think
12:41:55FromDiscord<Phil> Honestly I never get how people even notice it's on
12:42:04FromDiscord<Phil> The compiler finds my naming problems
12:43:23FromDiscord<ieltan> i think having linting ahead of compile is pretty nice but i could just compile, yeah
12:43:57FromDiscord<ieltan> i mean, it's kinda annoying to compile everytime i want to check something now
12:44:20FromDiscord<ieltan> it worked minutes ago
12:44:34FromDiscord<ieltan> why did it die on me, trying pkill doesnt work it seems 😢
12:50:47FromDiscord<4zv4l> can I include a dll inside of my nim program ?↵so I don't need to give the dll with it ?
12:52:35FromDiscord<demotomohiro> How about to use static link library instead of dll in that case?
12:53:10FromDiscord<4zv4l> because it seems that most `.lib` I find out there don't have the function label so I can't use them correctly
12:56:11FromDiscord<demotomohiro> If you can get source code and right build tools you can build `.lib` file that can be statically linked.
12:57:30FromDiscord<Phil> In reply to @ieltan "i mean, it's kinda": I have not known another way, I just always compile on save.↵With nimsuggest my experience was that I was always waiting anyway, with the compile-always approach I at least got proper text in the terminal telling me the error ^^
12:57:37FromDiscord<4zv4l> but I don't have visual studio↵so if I can use the `.lib` would be nice
12:57:50FromDiscord<4zv4l> how would I do to compile with the ´.lib´ ?
12:58:14FromDiscord<4zv4l> `{.passL="mylib.lib".}` ?↵and the proc imported↵`{.importc.}` ?
13:01:43FromDiscord<Hourglass [She/Her]> https://github.com/JorySchossau/bitset gonna be using the library because it looks simple and does what I need
13:02:49FromDiscord<demotomohiro> In reply to @4zv4l "but I don't have": I wrote an article about how to use C static library from NIm:↵https://internet-of-tomohiro.netlify.app/nim/clibrary.en.html
13:03:50FromDiscord<Hourglass [She/Her]> In reply to @Hourglass, When the Hour Strikes "https://github.com/JorySchossau/bitset gonna be usi": Actually nvm
13:08:04FromDiscord<4zv4l> In reply to @demotomohiro "I wrote an article": well I quickly read it↵I get an error like in your article with `undefined reference`↵but there is no order to give since there is only my `.nim` and the `.lib`
13:10:37FromDiscord<4zv4l> now I'm trying with `vcc` since I had more luck with this one↵but it takes ages to compile
13:11:20FromDiscord<4zv4l> what happened before is that↵with `gcc`: didn't compile due to `undefined reference`↵with `vcc`: compiled but segfault when calling function from the lib
13:12:11FromDiscord<theSherwood> Is there a way to get the signature of closure as a runtime value? And is there a simpler way to do that than writing a custom macro?
13:12:44FromDiscord<demotomohiro> Nim add passL options after compiled Nim code so you can call C functions in static libraries from Nim.
13:13:54PMunch@theSherwood, this question sounds like you're doing something wrong. What are you actually trying to do?
13:14:12FromDiscord<4zv4l> I saw this from a stackoverflow post about `another` static library↵> open your static library (soloud_static_x64.lib) with some text/hex editor and search for "Soloud_create". i guess you will not find anything. so why is that? because for some reason author decided to not include "C interfacing" in a static library project. so it contains only C++ symbols and not pure C symbols that are needed for our solouddotnim.nim module.↵maybe th
13:14:52FromDiscord<demotomohiro> There are two kind of `.lib` files on windows, one for static link and another is for link dll.↵Maybe you are trying to link `.lib` file for dll, not for static link.
13:15:07FromDiscord<4zv4l> I am making a dll indeed
13:15:21FromDiscord<4zv4l> but I wanna use the function from the `.lib` in my dll
13:15:37FromDiscord<theSherwood> @PMunch I want to be able to write commands that a user can dispatch by string and see the signature when they do so as to decide which arguments to pass. Sort of a user-programming thing.
13:17:06FromDiscord<4zv4l> In reply to @4zv4l "but I wanna use": that's a problem ? 🥹
13:17:13FromDiscord<Nerve> Is the author of the `docopt` package in this Discord?
13:17:31FromDiscord<demotomohiro> In reply to @4zv4l "I am making a": Do you making a dll that call functions in other dll?↵And you want to link statically these dlls in your dll?
13:18:28FromDiscord<4zv4l> a process will call my dll↵my dll shouldn't require another dll except kernel32
13:18:41FromDiscord<4zv4l> I wanna use code from the `.lib`
13:18:43FromDiscord<4zv4l> in my dll
13:19:02PMunch@theSherwood, I see, what I would do is generate an array indexed by an enum of your procs which holds the signatures and proc pointer. Of course the easiest would be to generate it from a macro
13:19:38PMunchSomething similar to what I did in this article: https://peterme.net/metaprogramming-and-read-and-maintainability-in-nim.html
13:19:53PMunchBut instead of hard-coded explanations grab the signature
13:20:32FromDiscord<theSherwood> That sounds like what I had in mind. Thanks for the examples
13:20:38PMunchTo answer your original question, no there is no way of getting the type information at runtime. Nim throws away this information during compilation. What you need to do is tell Nim to keep it somehow through the use of a macro
13:21:16PMunchIt's a bit unfamiliar if you're coming from a dynamic language, but it makes sense once you get used to it
13:21:24FromDiscord<theSherwood> That's what I figured. I wanted to double-check if there was some ready-made reflection tooling or if I needed to write something myself.
13:21:55FromDiscord<4zv4l> sent a long message, see http://ix.io/4oTn
13:23:10FromDiscord<theSherwood> In reply to @PMunch "It's a bit unfamiliar": The codebase is currently javascript/typescript. I'm considering rewriting bits in a piecemeal fashion in Nim, and compiling to modules to javascript until the whole thing is ported over.
13:23:29FromDiscord<theSherwood> (edit) "to" => "the Nim"
13:23:54PMunchAh I see, sounds fun
13:24:08FromDiscord<theSherwood> Yeah. Thanks for your help
13:24:32PMunchI'm not aware of any reflection libraries unfortunately. But there seems to be some demand for it, so if you want to give it a go it should become a fairly popular library
13:25:57FromDiscord<demotomohiro> In reply to @4zv4l "a process will call": If you want to link `.lib` file statically, these `.lib` files must be compiled from C/C++ code and linked with `ar` in binutils or `lib` in vcc to generate static link library.
13:26:46FromDiscord<demotomohiro> You cannot link `.lib` file statically if it was built to link a dll file.
13:30:31FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4oTr
13:31:24FromDiscord<demotomohiro> Is `NtHookEngine.lib` is a `.lib` file for static link or dynamic link?
13:31:24FromDiscord<4zv4l> I have to compile my Nim lib to object file↵then use `ar` to link them together `.o` with `.lib` ?
13:31:39FromDiscord<4zv4l> In reply to @demotomohiro "Is `NtHookEngine.lib` is a": how can I see that ?
13:31:54FromDiscord<4zv4l> https://github.com/raigorx/nthookengine
13:31:59FromDiscord<4zv4l> NtHookEngine my bad
13:32:23FromDiscord<demotomohiro> `ar` command is used for generating static link library.
13:32:31FromDiscord<4zv4l> oh
13:32:34FromDiscord<4zv4l> then vcc ?
13:34:44FromDiscord<demotomohiro> https://github.com/raigorx/nthookengine/tree/main/nthookengine_modified/NtHookEngine/x64/Release↵There are `.dll` and `.lib`. That `.lib` file probably for dynamic link.
13:35:14FromDiscord<4zv4l> I thought `dll` was for dynamic link↵and `lib` for static link
13:35:29FromDiscord<demotomohiro> In reply to @4zv4l "oh": You probably need to open `.sln` file with vcc and build static link library.
13:35:45FromDiscord<4zv4l> so I cannot avoid using visual studio right ?
13:36:00FromDiscord<demotomohiro> There are two kind of .lib files on windows, one for static link and another is for link dll.
13:36:20FromDiscord<4zv4l> so that's a parameter to give when compiling the `.lib` ?
13:39:07FromDiscord<demotomohiro> For example, C programs that use functions in kernel32.dll links kernel32.lib. That program links kernel32.dll at runtime and cannot run without kernel32.dll.
13:39:18FromDiscord<Hourglass [She/Her]> I'm loading Nim shared libraries in Nim, and I'm wondering if it'd be possible to use the async pragma on them, anything that could cause issues?
13:39:23FromDiscord<4zv4l> In reply to @demotomohiro "For example, C programs": yes right
13:39:34FromDiscord<4zv4l> oh wait
13:39:49FromDiscord<4zv4l> why `kernel32.lib` ?
13:40:05*crem joined #nim
13:40:20FromDiscord<demotomohiro> In reply to @4zv4l "so that's a parameter": If I remember correctly, you can add configurations for building static library on vcc ide.
13:41:51FromDiscord<4zv4l> sent a long message, see http://ix.io/4oTt
13:42:31FromDiscord<4zv4l> In reply to @demotomohiro "If I remember correctly,": alright and if I can give the `.lib` with my dll, is it easier ?
13:43:07FromDiscord<4zv4l> I just don't understand why the program load my dll the hook works↵but when I inject it, it doesn't work
13:43:11FromDiscord<4zv4l> so many questions
13:43:12FromDiscord<4zv4l> xD
13:43:26FromDiscord<jmgomez> Bare in mind that .lib can also contain "weak symbols" for your dll and you will need it at link time
13:43:47FromDiscord<4zv4l> In reply to @jmgomez "Bare in mind that": link time is no issue↵what about runtime ?
13:44:03FromDiscord<4zv4l> I can even give the `.lib` with my dll if that's easier
13:44:08FromDiscord<4zv4l> I just want it to work at this point xD
13:44:15FromDiscord<jmgomez> no need for lib at runtime
13:44:54FromDiscord<4zv4l> sent a code paste, see https://paste.rs/zRF
13:44:58FromDiscord<jmgomez> how are you using it? Take a look at this: https://github.com/jmgomez/NimForUE/blob/master/src/nimforue/ffinimforue.nim
13:45:30FromDiscord<jmgomez> why not just pass the library to the nim compiler?
13:45:47FromDiscord<demotomohiro> In reply to @4zv4l "I just don't understand": This document might help you to understand about dlls:↵https://learn.microsoft.com/en-us/windows/win32/dlls/about-dynamic-link-libraries
13:45:51FromDiscord<jmgomez> anyways, if the c/cpp linker doesnt complain you should be fine
13:46:22FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4oTy
13:46:34FromDiscord<4zv4l> In reply to @jmgomez "how are you using": I'll check that
13:46:38FromDiscord<4zv4l> In reply to @demotomohiro "This document might help": and that
13:47:09FromDiscord<demotomohiro> On windows, both static link library and import library have same extension `.lib` that makes confusions for beginers.
13:47:54FromDiscord<jmgomez> Yes..
13:48:05PMunchUgh, there BareExcept warnings are spamming my output..
13:48:30FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4oTA
13:48:32FromDiscord<jmgomez> I dont get what are you trying to do, long story short there are two ways of using a dynamic library, with the pragma or loading it explicitally with loadLib
13:48:40FromDiscord<4zv4l> In reply to @demotomohiro "On windows, both static": I don't know import library
13:48:54FromDiscord<4zv4l> I just know about library you use at runtime dynamically↵and static that you include in your code directly
13:48:55FromDiscord<jmgomez> the pragma works for exporting and importing
13:49:38FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4oTC
13:49:50FromDiscord<4zv4l> so for that I need to compile using their library↵so it is included in my dll
13:50:11FromDiscord<4zv4l> so I import them
13:50:23FromDiscord<jmgomez> I dont think this is the correct way to hook the library. Either use dynlib or loadlib
13:50:38FromDiscord<4zv4l> I don't wanna hook the library
13:50:44FromDiscord<4zv4l> I wanna use the library to hook a program
13:50:55FromDiscord<jmgomez> Then how do you expect to call the library from Nim?
13:51:13FromDiscord<4zv4l> the library contains code that allows to hook functions
13:51:18FromDiscord<4zv4l> I try to use that library in my dll
13:51:24FromDiscord<4zv4l> to do the hook part
13:51:40FromDiscord<4zv4l> since `nimhook`/`minhook` nim library didn't work
13:51:56FromDiscord<demotomohiro> sent a long message, see http://ix.io/4oTE
13:53:48FromDiscord<4zv4l> so it's not like a `.o` file that I can link with my dll and the code is all included inside of it ?
13:54:15FromDiscord<4zv4l> I need to give `clib.dll` and `clib.lib`↵and when the `clib.dll` will be loaded↵it will search for `clib.lib` ?
13:55:04FromDiscord<4zv4l> it is so confusing
13:56:16FromDiscord<demotomohiro> https://learn.microsoft.com/en-us/windows/win32/dlls/load-time-dynamic-linking
13:57:30FromDiscord<4zv4l> that is how dll are loaded when the program starts right ?
13:59:00FromDiscord<demotomohiro> When you write a program that uses `clib.dll` in "load-time dynamic linking", you specify `clib.lib` to a linker to build your program.↵When you run that program, OS automatically search for `clib.dll` and link to the program.↵`clib.lib` is used only when build that program, not used at runtime.
14:00:15FromDiscord<4zv4l> alright, the dll is not load-time dynamic linking
14:00:32FromDiscord<4zv4l> I inject it to the process↵creating a thread and calling `LoadLibrary()`
14:01:49NimEventerNew thread by jhgalino: New vs object literal for ref objects, see https://forum.nim-lang.org/t/9929
14:03:52FromDiscord<Hourglass [She/Her]> Is it possible to check if a function is asynchronous? The way i can access it is via the pointer
14:06:31FromDiscord<Dudugz> https://luau-lang.org/↵Does anyone know if there are any bindings being developed for Nim? I would like to implement Luau in a project in the future, but for what I'm going to have to create the bindings myself.
14:06:51FromDiscord<Dudugz> (edit) "https://luau-lang.org/↵Does anyone know if there are any bindings being developed for Nim? I would like to implement Luau in a project in the future, but for what ... I'm" added "i saw"
14:07:38FromDiscord<Dudugz> The issue is that Luau is safer than Lua due to several factors besides being typeable.
14:08:09FromDiscord<Dudugz> (edit) "issue" => "thing"
14:08:51*Notxor quit (Remote host closed the connection)
14:15:19FromDiscord<4zv4l> how do I get the type of a proc ?
14:15:27FromDiscord<4zv4l> so it easier to cast pointer to function pointer
14:16:56FromDiscord<Phil> In reply to @4zv4l "how do I get": In what sense?↵Like how do you do the type annotation easily?
14:17:35FromDiscord<4zv4l> I cannot like `cast[tye(myProc)](fptr)(3)`
14:17:42FromDiscord<4zv4l> if the proc is `proc (x: int)`
14:17:58FromDiscord<4zv4l> (edit) "`cast[tye(myProc)](fptr)(3)`" => "`cast[type(myProc)](fptr)(3)`"
14:18:00FromDiscord<Phil> So you have a pointer and you want to cast it to something executable?
14:18:10FromDiscord<4zv4l> to a function yes
14:18:53FromDiscord<Phil> Generally I'd write the proc-type out by hand.↵So `cast[proc(x: int)](fptr)(3)`
14:19:02FromDiscord<4zv4l> but that's a long type proc
14:19:04FromDiscord<Phil> Though for readability I recommend always throwing proc types behind alias
14:19:19FromDiscord<4zv4l> `(hWnd: HWND, lpText: LPCWSTR, lpCaption: LPCWSTR, uType: UINT): int32{.stdcall.}`
14:19:22FromDiscord<4zv4l> that is the proc type lol
14:19:26FromDiscord<Phil> Yeah, alias that shit
14:19:49FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4oTJ
14:19:50FromDiscord<Phil> And that for your long-ass super-proc
14:21:03FromDiscord<Phil> I make copious usage of type aliasing whenever I start using procs as variables that can be passed around
14:22:39FromDiscord<4zv4l> I'm gonna ↵break my head jeez
14:23:12FromDiscord<4zv4l> would be much simpler if `rdpclip` was using `GetMessage`
14:29:07FromDiscord<I have 50GB of nothing on my PC> how to show the user fzf in an interactive way?
14:29:25FromDiscord<I have 50GB of nothing on my PC> I think my script just doesn't show the output from fzf
14:32:42PMunchpoParentStreams I believe
14:33:45FromDiscord<4zv4l> anyone knows why a hooked function would segfault when it's injected using thread↵meanwhile when the program directly load it using `LoadLibrary` the hook works ?
14:34:58FromDiscord<Airbus5717> if i have a string and ↵i want to make a ref to it↵how do i do it?
14:35:09PMunchYou can't
14:35:18PMunchWell, you'd have to create a ref string and then copy it over
14:35:38PMunchBut it does sound like you're doing things incorrectly, what are you trying to do?
14:37:14FromDiscord<Airbus5717> i read a file
14:37:26FromDiscord<Airbus5717> and i want an object to hold a reference to it
14:38:22FromDiscord<Rika> to what? the file or the contents?
14:39:40FromDiscord<Airbus5717> contents
14:48:58FromDiscord<Dudugz> sent a code paste, see https://play.nim-lang.org/#ix=4oTU
14:49:33FromDiscord<Rika> `nums[1..^1]` will make a copy
14:49:40FromDiscord<Dudugz> Thx ^^
14:49:59FromDiscord<Rika> it is likely better to use delete or so, but i guess that would also shift all elemetns anyway
14:50:33FromDiscord<Dudugz> No need, the seq will be discarded as I am using concat
15:09:56*PMunch quit (Quit: Leaving)
15:09:58FromDiscord<Airbus5717> In reply to @Rika "to what? the file": if i assign a string to another variable ↵will it reference it or copy?
15:10:03FromDiscord<Rika> copy
15:10:34FromDiscord<Rika> strings and seqs use value semantics, but i dont recall if they are copy-on-write (i think they are?)
15:10:44FromDiscord<Rika> but they will copy nonetheless
15:10:48FromDiscord<Airbus5717> is there any way to pass a reference?
15:11:00FromDiscord<Rika> make a reference and put the string in there, then use only that reference
15:21:12FromDiscord<I have 50GB of nothing on my PC> what do when `p.errorStream.atEnd` makes for an infinite loop?
15:26:38FromDiscord<I have 50GB of nothing on my PC> when I try tog et the position: `cannot retrieve file position`
15:26:51FromDiscord<I have 50GB of nothing on my PC> how do i at least check if my stream is fucked
15:28:29FromDiscord<I have 50GB of nothing on my PC> juding by error code, the stream was closed because of oom
15:28:53FromDiscord<I have 50GB of nothing on my PC> ok, but how do i check that, other than knowing the code beforehand
15:29:13FromDiscord<Gumbercules> show us some code
15:29:15*azimut quit (Remote host closed the connection)
15:29:43*azimut joined #nim
15:30:59*rez joined #nim
15:34:35*arkurious joined #nim
15:35:39*Notxor joined #nim
15:41:55FromDiscord<4zv4l> will `warn` from `std/logging` raise an error if it fails writing to the file or it will just skip it ?
15:43:43*rez quit (Quit: much snoozes...)
16:11:20FromDiscord<Dudugz> ``could not load: (libmysql.dll|libmariadb.dll)``↵I have mysql server installed so why was it not able to find the dlls? Do I need to have libmysql.dll in the project folder?
16:16:27FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "``could not load: (libmysql.dll|libmariadb.dll)``": Is it in the file path? Also what's the exact code?
16:17:22FromDiscord<Hourglass [She/Her]> (edit) "in the" => "on"
16:17:35FromDiscord<Dudugz> sent a code paste, see https://play.nim-lang.org/#ix=4oUg
16:17:43FromDiscord<Hourglass [She/Her]> Ah
16:17:45FromDiscord<Dudugz> I'm running ``nimble run``
16:18:20FromDiscord<Hourglass [She/Her]> Hm then I'm not sure, only thing I think it could be is related to the path, but I'm not a windows user so maybe something funky happening there?
16:18:58FromDiscord<Dudugz> Hm, maybe it's because Nim is installed on D:? My system is on C: and MySQL didn't give me the option to install on D:
16:19:30FromDiscord<Dudugz> Or maybe the dll needs to be linked when using nimble run
16:21:11FromDiscord<Hourglass [She/Her]> sorry, maybe ask in a forum post? ¯\\_(ツ)\_/¯
16:21:21FromDiscord<Dudugz> 😅
16:22:29FromDiscord<Hourglass [She/Her]> Or on reddit, or even both
16:22:38FromDiscord<Hourglass [She/Her]> Someone is bound to see it in one of the locations :p
16:22:42FromDiscord<Dudugz> https://github.com/nim-lang/Nim/issues/15720↵↵Old but yea, i think i must put libmysql.dll on the project folder
16:23:25FromDiscord<Hourglass [She/Her]> Yeah it talks about the path, that must be an issue, but putting it into the project folder should work yeah
16:24:12FromDiscord<Dudugz> Hm... I think i got it
16:24:22FromDiscord<Dudugz> MySQL path is not on the environment variables
16:24:27FromDiscord<Dudugz> Maybe that's it
16:25:28FromDiscord<Hourglass [She/Her]> Yeah, try that
16:27:30*Notxor quit (Remote host closed the connection)
16:29:07*rez joined #nim
16:30:20FromDiscord<demotomohiro> If you want to learn how windows search dll: https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
16:30:22FromDiscord<Dudugz> It worked, the mysql installer had not added the mysql lib folder which is where the dll is
16:30:45FromDiscord<Dudugz> (edit) "It worked, the mysql installer had not added the mysql lib folder ... which" added "to the path env"
16:32:47FromDiscord<Hourglass [She/Her]> Neat!
16:34:34FromDiscord<Hourglass [She/Her]> If I'm inheriting from a ref object, do I need to do `ref object of MyRefType`?
16:39:47FromDiscord<demotomohiro> In reply to @Hourglass, When the Hour Strikes "Neat!": Sample code from Nim manual:↵https://nim-lang.org/docs/manual.html#methods
16:43:53FromDiscord<Hourglass [She/Her]> Ah alright then
17:17:27FromDiscord<Dudugz> sent a long message, see http://ix.io/4oUx
17:24:05FromDiscord<enthus1ast> the nimble develop ist completely broken in devel
17:24:27FromDiscord<enthus1ast> it does not work as advertised nor does the old style work correctly
17:33:19FromDiscord<demotomohiro> @Dudugz https://nim-lang.org/docs/strutils.html
17:41:40FromDiscord<Coachonko> Thought of the day: I think Nim overuses `:`
17:41:58FromDiscord<ieltan> Is there a runtime `fmt`?
17:42:34*jmdaemon joined #nim
17:42:38FromDiscord<Phil> Yes
17:43:06FromDiscord<Phil> STD/strformat I assume you're already using?
17:43:13FromDiscord<ieltan> Yes
17:46:19FromDiscord<Phil> That also works at runtime, do you have errors with it,?
17:47:21FromDiscord<ieltan> Yeah :/ I don't have my laptop with me right now I'll show you later
17:48:29FromDiscord<Phil> I'm on phone anyway so I can only try later too 😄
17:49:30FromDiscord<Rika> In reply to @Coachonko "Thought of the day:": Why is that
17:50:19FromDiscord<Phil> In reply to @Coachonko "Thought of the day:": Now I'm curious
17:51:50FromDiscord<Dudugz> In reply to @demotomohiro "<@265937132886032407> https://nim-lang.org/docs/str": I didn't find anything useful... I need a proc that extracts a substring as exemplified
17:52:50FromDiscord<Dudugz> Normally in other languages ​​I would use regexp but here re.match doesn't return the substring and group doesn't seem to contain the fetched text but rather the boundaries
17:56:59FromDiscord<demotomohiro> @ieltan↵This works for runtime strings https://nim-lang.org/docs/strutils.html#%25%2Cstring%2CopenArray%5Bstring%5D
17:57:07FromDiscord<Zoom> You examples are not substrings, you're building a new string there. So just iterate and filter.↵(@Dudugz)
17:57:49FromDiscord<ieltan> In reply to @Isofruit "That also works at": according to https://nim-lang.org/docs/strformat.html, it seems like everything `fmt` is marked as `static` except the `&` operator, so I suppose this is what I should use right?
17:58:19FromDiscord<Phil> I use it for runtime string interpolation all the time, I'd say it's fine
17:59:14FromDiscord<ieltan> In reply to @demotomohiro "<@256520101015060480> This works for": Oh. This. That's good.
17:59:18FromDiscord<demotomohiro> @Dudugz You can iterate each char of a string like seq[char] and you can add it to another string with `add` proc like seq[char].
17:59:20FromDiscord<ieltan> Thanks for the heads up
18:00:02FromDiscord<Dudugz> Sure
18:06:02FromDiscord<Hourglass [She/Her]> In reply to @Coachonko "Thought of the day:": Examples?
18:06:15FromDiscord<Hourglass [She/Her]> I don't think it overuses it, just is different from other langs
18:10:08FromDiscord<Zoom> May be don't limit yourself to one thought per day and all will be swell
18:14:19FromDiscord<Phil> The approach of not thinking much has served me well, how dare you question it! 😄
18:25:27FromDiscord<enthus1ast> @ieltan\: this or that\: https://github.com/enthus1ast/formatja
18:45:48FromDiscord<enthus1ast> what is the concept syntax for testing if the concept has a `+`(MyConcept, MyConcept)\: MyConcept ?
18:46:26FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4oV3
18:46:32FromDiscord<enthus1ast> but this brings the compiler in an endless loop
18:52:42FromDiscord<enthus1ast> so for example this
18:52:42FromDiscord<enthus1ast> https://play.nim-lang.org/#ix=4oV6
19:18:12FromDiscord<Rika> In reply to @enthus1ast "https://play.nim-lang.org/#ix=4oV6": It kinda doesn’t make sense that you define a + for the concept when the concept itself requires that it already has + defined
19:18:22FromDiscord<Rika> Which is prolly why the nesting problem happens
19:18:32*Notxor joined #nim
19:32:03FromDiscord<System64 ~ Flandre Scarlet> Is it possible to use C++ libraries on Nim?
19:33:37FromDiscord<demotomohiro> Yes
19:34:42FromDiscord<System64 ~ Flandre Scarlet> In reply to @demotomohiro "Yes": Oh alright↵https://github.com/thedmd/imgui-node-editor↵So would it work on Nim?
19:35:34FromDiscord<4zv4l> any idea why `warn` from `logging` doesn't add newline on Windows ?
19:35:40FromDiscord<4zv4l> it put everything on the same line
19:38:42FromDiscord<demotomohiro> @System64 ~ Flandre Scarlet Nim can use most of C++'s template classes and functions but I dont know if Nim supports all C++ features. C++ is complicated language.
19:39:02FromDiscord<Nerve> In reply to @System64 "Is it possible to": Yes, and I've done it quite easily with C. All you need is a compiler flag and a pragma'd proc definition for any given function call.
19:39:45FromDiscord<Nerve> Also keep in mind, when you see `cint` and `string`, etc., these are not C language types per se. The c stands for "compatible"
19:39:55FromDiscord<Nerve> (edit) "`string`," => "`cstring`,"
19:40:04FromDiscord<Nerve> (edit) ""compatible"" => ""compatible"."
19:40:18FromDiscord<Nerve> These are used in all the foreign language interfaces.
19:40:42FromDiscord<Nerve> (edit) "In reply to @System64 "Is it possible to": Yes, and I've done it quite easily with C. All you need is a ... compilerflag," added "single" | "flag" => "flag," | "any" => "each"
19:41:23FromDiscord<demotomohiro> There is Nim Bindings for C++ STL: https://github.com/Clonkk/nim-cppstl
19:42:04FromDiscord<System64 ~ Flandre Scarlet> Oh alright!↵And in my case, how can I port this node editor to Nim?
19:45:40*PMunch joined #nim
19:52:04FromDiscord<demotomohiro> Learn how to use `importcpp` pragma: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma
19:53:01FromDiscord<System64 ~ Flandre Scarlet> Oh alright, good to know↵Does Futhark also work with CPP?
19:53:14PMunchNo, unfortunately not
19:53:52PMunchThere's no reason why it shouldn't be possible to make it work, I just haven't gotten around to wrap all the C++ features to Nim features yet
19:54:31FromDiscord<jmgomez> Start by importing the bare minimum and build from there, if you see somewhere the API exposed, try to use it as a source and generate code from it
19:55:20FromDiscord<enthus1ast> Yes I had a misconception about how they work↵(@Rika)
19:56:30FromDiscord<jmgomez> In reply to @PMunch "There's no reason why": I know a few guys outside the Nim community that tried in the past to use clang tooling and it fails hard in projects that heavily use templates/macros
19:56:37FromDiscord<jmgomez> bare in mind templates are turing complete
19:56:49PMunchOh really?
19:57:13PMunchThat's one of the big benefits of using libclang over c2nim or the other one
19:57:33PMunchBasically clang is able to figure out the macros for me, so I don't have to
19:57:40FromDiscord<jmgomez> yeah, in order to fully parse them you need to get around the halting problem
19:58:03FromDiscord<jmgomez> but for sure you can go far with it, with manual tweaking here and there
19:58:28PMunchHmm, I mean for the projects I've used Futhark on I haven't had any issues with it
19:58:53FromDiscord<jmgomez> yeah, but there arent templates in C
19:58:56PMunchSure they would halt if you put a broken macro in there, but most header files don't do that for obvious reasons :P
19:59:06PMunchOh, C++ templates :P
20:00:12*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
20:01:25*ehmry joined #nim
20:03:15FromDiscord<jtv> Parsing templates is not an undecidable problem. That doesn't make sense.
20:05:36FromDiscord<jtv> And, even I didn't understand the context well enough, with undecidable problems, or np-hard problems, it is often relatively easy to solve all practical instances, or at least provide approximate answers that are going to work well for anything that isn't intentionally trying to f with the algorithm.
20:06:10FromDiscord<jmgomez> It's a form of the halt problem I didnt said it cant be parsed I said clang doesnt provide the info that you need in order to make automatic bindings from it
20:06:28FromDiscord<jtv> For instance, I once wrote a static analysis tool for C that computed all the constraints in the preprocessor, so it could analyze each possible build. Never found a piece of real-world software where it wasn't efficient.
20:07:23FromDiscord<jmgomez> they can expand indefinitely if you want to be complete about them
20:09:00FromDiscord<jtv> Yup and that's true with lots of things like, evaluating prolog predicates. Yet, stack-depth heuristics for those kinds of issues have been good enough for like 60 years 🙂
20:11:14ZevvPMunch: I nimmed a new toy https://github.com/zevv/memgraph
20:13:09PMunchOooh, nice
20:13:26PMunchIt uses something like LD_PRELOAD to slip the dynamic library in there?
20:13:26FromDiscord<Airbus5717> what is the fastest way to check if a string matches a specific string in seq
20:14:26ZevvPMunch: yes, exactly that. it's nothing fancy, but the colors are nice
20:15:22FromDiscord<jtv> @zevv You know there's a pretty big name collision there, yes? https://memgraph.com/
20:15:55PMunch@Airbus5717, quickest as in to type the code, or quickest as in fastest
20:16:16FromDiscord<jtv> It's basically an up-and-coming Neo4J competitor
20:16:22PMunchZevv, yeah it looks neat. I'm going to try it out on something
20:16:24Zevvjtv: nah who cares, this is just my personal toy. given a big enough world, collisions are inevitable
20:16:44ZevvPMunch: results might vary; let me know if it explodes in your face
20:16:47FromDiscord<jtv> That's cool
20:17:07FromDiscord<Airbus5717> In reply to @PMunch "<@792407211620040705>, quickest as in": fast
20:17:26FromDiscord<Airbus5717> gotta go fast
20:17:37FromDiscord<Airbus5717> 😏
20:18:07FromDiscord<jtv> It is a super cool util though... does "fairly recent" include 1.6.10 or just development branches?
20:18:21Zevvi have no clue, i'm always on devel
20:18:31Zevvbut i think I didnt use anything fancy
20:18:37Zevvlet me know if it barfs on older nims
20:19:13Zevvalso i didn't test the .nimble because my nimble has been broken for weeks
20:19:54FromDiscord<jtv> Will do
20:20:03Zevvty
20:25:46*vsantana joined #nim
20:26:05*vsantana left #nim (#nim)
20:27:21FromDiscord<carsonfarmer> sent a long message, see http://ix.io/4oVp
20:27:26FromDiscord<carsonfarmer> (edit) "http://ix.io/4oVp" => "http://ix.io/4oVq"
20:30:08FromDiscord<carsonfarmer> I don't really want to have all implementations to derive from some base class, as they'll likely have very little logic in common. And since I don't know ahead of time all the variants, the object variant pattern doesn't quite seem right? But it is possible that my Typescript and Go experience is clouding my judgement?
20:31:36ZevvWell, lack of traityness or protocoliness is a bit of a hiatus in num
20:33:48PMunchZevv, did you see my latest experiment? https://github.com/pmunch/echooverride
20:33:55PMunchFinally a way to grab all echo statements :)
20:35:16FromDiscord<jtv> If you want something more like traditional interfaces, then I think there is a good third party interface lib, but generally there's plenty of code / data separation in nim already, the only time you might need to use interfaces is if you really need to keep an array of items that only implement the interface that you then are going to HAVE to cast back to their actual type to be able to call them if you don't use objects, since you're onl
20:36:12FromDiscord<jtv> It's generally preferable for your routines to be generic and try to not do that... but to each his own
20:36:27ZevvPMunch: but what does it *do* :)
20:38:04FromDiscord<jtv> Though you could have them pass you functions to call with their object if you really want to kludge it. I assume that's what any interface library is likely to wrapper
20:38:51PMunchZevv, in uses `--import` and term rewriting macros to rewrite every echo and write (to stdout) in your program
20:39:01Zevvyeah, it's nitfy
20:39:05Zevvi never used term rewrites
20:39:13Zevvbut using the --import like that is smart
20:39:27PMunchYeah it felt pretty clever :)
20:39:55PMunchSeems to work pretty well, planning on using it in my superlog-based logging library
20:40:00Zevvit could be of use for CPS I think
20:40:09FromDiscord<Elegantbeef> Hey this is already what i've suggested for linting!
20:40:24Zevvtoo bad, PMunch just won and you lost
20:40:25PMunchFor linting?
20:40:37FromDiscord<Elegantbeef> Yes you can use TRM for linting
20:40:42FromDiscord<Elegantbeef> In the same manner you did
20:41:03FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/9739#64098
20:41:46FromDiscord<Elegantbeef> TRMs really are the best linters now that `noRewrite` works
20:42:07FromDiscord<Elegantbeef> You can use AST matching in Nim to make Nim errors without having to use your own parser
20:45:14PMunchAah I see
20:45:19PMunchThat's pretty neat
20:45:55FromDiscord<Hourglass [She/Her]> I need to rewrite my code for parsing bytes from the socket directly into parsing bytes one at a time
20:46:06FromDiscord<Hourglass [She/Her]> I am annoyed
20:49:46*Notxor quit (Remote host closed the connection)
20:51:36*Notxor joined #nim
21:00:09FromDiscord<jtv> @PMunch I like that. Basically have wanted something more AOP-like where I can externally specify how to transform modules... would love a first class feature to do stuff like this personally
21:03:37PMunch@jtv, hmm not quite sure what kind of stuff you're thinking about
21:13:33FromDiscord<jtv> Well, for instance, we see people here frequently using detours on windows for observability, instrumentation, etc. Never mind to enhance the behavior of 3rd party code w/ extra error checking or output manipulation. But in the AOP paradigm, you can basically say, "change all my echos to this", or "wrap any socket calls with a logging function"
21:14:11FromDiscord<jtv> Without having to worry about being able to add a decorator to each function you want to wrap or anything like that.
21:14:46PMunchAah, I see what you mean
21:14:55PMunchYeah this approach could definitely be used to do that
21:16:21FromDiscord<jtv> I did a C AOP extension like 25 years ago that added bounds checking to array accesses if my static analyzer couldn't prove it didn't need it 🙂
21:23:31FromDiscord<Elegantbeef> I'd also love something like `import std/strutils[string: MyString]`
21:23:37FromDiscord<Elegantbeef> Where it replaces all instances of `string` with MyString
21:25:01FromDiscord<Elegantbeef> But that only works if it was more generic friendly
21:25:53PMunchI believe that would be possible
21:29:36FromDiscord<ieltan> This is probably a noob question but I need my discord bot to restart if it crashes or if given a command, like a daemonizer or something, any tips?
21:29:40FromDiscord<Elegantbeef> It's only possible in a hacky world
21:31:52FromDiscord<Elegantbeef> There are a multitude of tools depending on your OS
21:32:08FromDiscord<ieltan> Linux
21:32:35FromDiscord<ieltan> I never did that so I'm not sure how to approach this
21:32:49FromDiscord<Elegantbeef> Just search "Linux restart process if it dies"
21:32:53FromDiscord<Elegantbeef> This is unrelated to Nim really
21:33:17FromDiscord<ieltan> Alright, thanks for the pointers and sorry
21:33:46FromDiscord<Elegantbeef> I wasnt being a dick, just saying it's not something you really do inside Nim 😄
21:35:15*advesperacit quit (Ping timeout: 268 seconds)
21:35:38FromDiscord<carsonfarmer> In reply to @jtv "If you want something": Ok, this seems reasonable, and this works for most usage patterns I currently have. So what should I do if I _do_ need to keep an array or table of items that aren't all the same concrete/base type?
21:35:59FromDiscord<Elegantbeef> Use inheritance or object variants
21:36:23FromDiscord<Elegantbeef> https://internet-of-tomohiro.netlify.app/nim/faq.en.html#coding-how-to-store-different-types-in-seqqmark
21:36:32*advesperacit joined #nim
21:37:01FromDiscord<carsonfarmer> ok yeh figured, that's _probably_ going to be fine, because my primary usecase for the table setup described above is tests... which i don't mind doing that way
21:37:22FromDiscord<jtv> Yeah, it's possible to get crazy w/ it but simpler is better
21:39:32FromDiscord<Hourglass [She/Her]> I know sequences can't directly be casted to a type like an integer, but could arrays be casted using `cast[uint16]([255'u8, 255])`?
21:40:03FromDiscord<carsonfarmer> In reply to @Elegantbeef "https://internet-of-tomohiro.netlify.app/nim/faq.en": I like that boxed type example, very simple and easy to work with for my case
21:40:04FromDiscord<carsonfarmer> cheers!
21:42:22FromDiscord<Hourglass [She/Her]> In reply to @Hourglass, When the Hour Strikes "I know sequences can't": Okay that works
21:42:56FromDiscord<Hourglass [She/Her]> But now how would I create an array at runtime lmao
21:43:05FromDiscord<Elegantbeef> Just for performance sake remember that `ref` is a pointer so doing that will cause more cache fragmentation
21:43:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oVE
21:44:22FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oVF
21:48:23FromDiscord<huantian> In reply to @Elegantbeef "I wasnt being a": That’s a first
21:48:39FromDiscord<huantian> I just assumed that was part of your personality
21:49:14FromDiscord<Elegantbeef> y'know just for that, fuck you!
22:00:06*rez quit (Quit: much snoozes...)
22:00:37FromDiscord<Hourglass [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4oVI
22:00:58FromDiscord<Hourglass [She/Her]> While I could use a sequence, an array would make casting a bit nicer
22:01:01FromDiscord<Elegantbeef> `seq[byte]`
22:01:26FromDiscord<Hourglass [She/Her]> byte yeah not bytes, but yeah what i said above
22:01:42FromDiscord<Elegantbeef> Of course it's not possible
22:01:54FromDiscord<Elegantbeef> Types cannot be created at runtime, and one should not use stack allocate
22:02:10FromDiscord<Hourglass [She/Her]> Alright then thanks anyway
22:02:18FromDiscord<Hourglass [She/Her]> Code will be a bit more tedious now f
22:03:07*advesperacit quit (Ping timeout: 246 seconds)
22:03:32*PMunch quit (Quit: leaving)
22:03:43*advesperacit joined #nim
22:05:12FromDiscord<Elegantbeef> It shouldnt be much more tedious
22:06:29FromDiscord<Hourglass [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4oVJ
22:06:43FromDiscord<Hourglass [She/Her]> I may or may not be committing warcrimes with my horrid code
22:06:58FromDiscord<Elegantbeef> It should be the exact same code except instead of the array address it's the element of the first element
22:07:23FromDiscord<Hourglass [She/Her]> What?
22:07:35FromDiscord<Hourglass [She/Her]> Wait I have all this code already in my original attempt for the server software
22:07:50FromDiscord<Elegantbeef> Like how does the seq make this much more tedious
22:07:58FromDiscord<Elegantbeef> It's a `newSeq[byte](size)`
22:08:43FromDiscord<Hourglass [She/Her]> Hold on
22:09:35FromDiscord<Hourglass [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4oVK
22:09:44FromDiscord<Hourglass [She/Her]> That's what I had before
22:09:53FromDiscord<Elegantbeef> So nothing much changes
22:11:09FromDiscord<Hourglass [She/Her]> How so? Casting a sequence to a number type doesn't exactly play nice because of how sequences work
22:11:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oVL
22:11:40FromDiscord<Hourglass [She/Her]> I need to remove the use of the socket completely
22:12:21FromDiscord<Hourglass [She/Her]> I'm reading the bytes from a sequence instead of changing the container that `data` is stored in
22:12:31FromDiscord<Elegantbeef> It's the same shit
22:12:39FromDiscord<Elegantbeef> You just move the index
22:14:55FromDiscord<Hourglass [She/Her]> Yeah my brain isn't comprehending that, I'm gonna rewrite that anyway so I'll figure out what you mean like that
22:15:07FromDiscord<Hourglass [She/Her]> My brain is worse than a brick wall currently
22:15:26FromDiscord<Elegantbeef> Just use `std/stream`
22:15:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4oVN
22:16:03FromDiscord<Hourglass [She/Her]> Aaah
22:16:18FromDiscord<Hourglass [She/Her]> I completely forgot about the existence of streams :p
22:16:35FromDiscord<Hourglass [She/Her]> Thanks beef for putting up with the mess called my brain :p
22:19:21FromDiscord<Hourglass [She/Her]> `s.readData` instead of `s.readInto`
22:25:18FromDiscord<Hourglass [She/Her]> Assuming I should just cast `seq[byte]` into a string and use it as a StringStream
22:25:35FromDiscord<Elegantbeef> Or just read it as a string
22:26:05FromDiscord<Hourglass [She/Her]> Yeah I can do that too, probably better :p
22:26:32FromDiscord<Elegantbeef> Well there is a non zero chance you accidentally deallocate memory you do not own with the cast
22:27:04FromDiscord<Elegantbeef> Actually nevermind that's not a problem
22:27:08*advesperacit quit ()
22:27:19FromDiscord<Elegantbeef> Forgot how allocators worked for a second
22:30:31FromDiscord<Hourglass [She/Her]> :p
22:30:46FromDiscord<Yepoleb> In reply to @ieltan "This is probably a": i recommend using a systemd unit https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6
22:31:48FromDiscord<Hourglass [She/Her]> I have decided to just make it so instead of returning a stream, i should just have a stream for each packet of data i need to read myself
22:32:07FromDiscord<Hourglass [She/Her]> (edit) removed "myself"
22:32:18FromDiscord<Hourglass [She/Her]> I am clearly sleep deprived because i barely understand what i just said
22:40:38FromDiscord<Hourglass [She/Her]> How would i cast a datatype to a string?
22:41:49FromDiscord<Elegantbeef> I'm going to say you dont
22:42:01FromDiscord<Elegantbeef> But i'm also going to say `StringStream` exists
22:44:11FromDiscord<Hourglass [She/Her]> Ah just saw this https://nim-lang.org/docs/streams.html#write%2CStream%2CT
22:44:21FromDiscord<Hourglass [She/Her]> I didn't see it until i scrolled a bit further :p
22:45:13FromDiscord<ieltan> In reply to @Elegantbeef "I wasnt being a": It's alright bro i didnt take it badly lol
22:45:32FromDiscord<ieltan> In reply to @Yepoleb "i recommend using a": yeah i went with that but thanks !
22:54:38FromDiscord<Iliketwertles> anyone here have knowledge with illwill?
22:55:01FromDiscord<Iliketwertles> i want to make a fullscreen thing but the text and everything is displayed in the middle instead of the top left
23:03:48FromDiscord<Iliketwertles> like i kinda want all the text here in the middle with a box around it https://media.discordapp.net/attachments/371759389889003532/1078089755541123213/screenshot_2023-02-22-180310.png
23:11:19FromDiscord<Elegantbeef> Doesnt it allow setting the cursor?
23:20:06FromDiscord<Iliketwertles> In reply to @Elegantbeef "Doesnt it allow setting": yea i think
23:20:17FromDiscord<Elegantbeef> Well there you go
23:20:42FromDiscord<Iliketwertles> how does that help me put it in the center of the terminal tho?
23:20:56FromDiscord<Elegantbeef> `terminalWidth` and `terminalHeight` exist
23:21:08FromDiscord<Hourglass [She/Her]> For cleaner API use I may need to make a distinct but the semantics are all the same as the original type
23:21:47FromDiscord<Iliketwertles> In reply to @Elegantbeef "`terminalWidth` and `terminalHeight` exist": right but `var tb = newTerminalBuffer(terminalWidth(), terminalHeight())`
23:22:11FromDiscord<Elegantbeef> Ok so you now can figure out where centre is and how long your lines are
23:22:20FromDiscord<Iliketwertles> ohhh
23:22:24FromDiscord<Iliketwertles> i think i get it?
23:23:42FromDiscord<Iliketwertles> so for example, lets say its 10x10 for simplicity ↵`tb.write(2, 1, fgWhite, "What we doin?")` -- takes 2 and 1 from height and width right?
23:23:54FromDiscord<Elegantbeef> RTFM
23:23:57FromDiscord<Iliketwertles> so middle would then be 5 5
23:24:02*Notxor quit (Remote host closed the connection)
23:42:04FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4oW3
23:51:50FromDiscord<Nilts> I want to get the similarity between to sentences (strings) using an arraymancer neural network, i found some code to turn strings into tensors but beyond that i am lost. Please help and ping on reply :)
23:54:30FromDiscord<Hourglass [She/Her]> https://nim-lang.org/docs/streams.html#read%2CStream%2CT doesn't seem to support reading a string with a size param?
23:54:40FromDiscord<Hourglass [She/Her]> Nvm
23:54:44FromDiscord<Hourglass [She/Her]> It's `readStr`