<< 07-05-2023 >>

00:15:42NimEventerNew thread by archnim: Package update issue, see https://forum.nim-lang.org/t/10179
01:08:18FromDiscord<voidwalker> Anyone got a tutorial for integrating github (pushing commits) in vscode(ium)
01:10:01FromDiscord<voidwalker> there seems to be a source control tab, do I use that or some other extension ?
01:12:16FromDiscord<Chronos [She/Her]> Iirc there was Git Lens...?
01:12:47FromDiscord<Elegantbeef> Sane people use the terminal for git
01:13:18FromDiscord<huantian> The source control tab is the default git client for vscode
01:24:21FromDiscord<voidwalker> well, somehow managed it, have no idea what I was doing, ended up in a different branch, but it's good for now. I really have to learn all this git hype some day : )
01:36:51FromDiscord<michaelb.eth> In reply to @Elegantbeef "Sane people use the": and happy people use magit
01:38:21FromDiscord<michaelb.eth> even if I switched off emacs for some other editor/s, I'd almost certainly keep it around just so I could use magit
02:14:10FromDiscord<Elegantbeef> @michaelb.eth\: Hey i'm happy and use just git through cli, though i have looked at lazygit
02:22:06FromDiscord<michaelb.eth> lazygit looks pretty cool
02:22:51FromDiscord<Elegantbeef> I use a GUI text editor and use it's attached terminal for git so these all seem in the way to me
02:23:15FromDiscord<Elegantbeef> I have considered trying to go full nvim but such a headache to learn properly
02:26:37*obir_ joined #nim
02:27:25FromDiscord<j-james> looks like alaviss finished the grammar rewrite, nice
02:27:56FromDiscord<j-james> a > 100mb parser though 💀
02:28:14FromDiscord<Elegantbeef> That's a lot of Nim
02:28:16FromDiscord<j-james> i always forget that generated code can just... be that big
02:28:39FromDiscord<Elegantbeef> Yea he was concerned about the size
02:28:47*demetera quit (Ping timeout: 256 seconds)
02:29:57FromDiscord<j-james> yea it's a lot, depending on how ides pull in the grammars
02:32:23FromDiscord<j-james> i wonder if a separate pass over the parser itself could help lower the size
02:37:55NimEventerNew thread by slangmgh: Is it bug of pragma nodecl?, see https://forum.nim-lang.org/t/10180
03:14:39FromDiscord<leorize> @j-james I spent the last few days trying to optimize the size but it didn't work out quite well
03:15:34FromDiscord<leorize> it mostly have to do with the fact that I have to outsource to a lot of external tokens
03:15:49FromDiscord<leorize> add one and the grammar grows by a factor of 4
03:18:07FromDiscord<leorize> right now the parser is on the edge of what's possible
03:18:41FromDiscord<leorize> enable any of the disabled stuff within the grammar and you get an unusable parser due to the number of states exceeding uint16
04:02:28*obir_ quit (Remote host closed the connection)
04:03:33*demetera joined #nim
04:08:29FromDiscord<decoded> How do I get the nth character of a string?
04:08:43FromDiscord<decoded> In python it would be string[5]
04:10:26FromDiscord<Elegantbeef> Same thing in Nim
04:10:51FromDiscord<decoded> No, it's not
04:11:01FromDiscord<Elegantbeef> It is indeed
04:11:10FromDiscord<decoded> what abt string[5:]
04:11:23FromDiscord<Rika> [5..^1]
04:11:26FromDiscord<decoded> ty
04:23:44*azimut quit (Ping timeout: 240 seconds)
04:49:55*lucasta quit (Remote host closed the connection)
05:01:10*derpydoo joined #nim
06:28:16FromDiscord<Dudugz> include in Nim is quite strange, if you declare the type in ``foo.nim`` and below the declaration put ``include bar`` and then in ``bar.nim`` you put ``import foo`` to declare the procs it gives error of cyclic import, but removing the ``import foo`` gives error that the type is not found.
06:28:37FromDiscord<Dudugz> It's sad to have to make spaghetti ;-; I like organization.
06:29:27FromDiscord<Dudugz> If it was just a type with several procs, it would be fine the problem is that they are interconnected types, they have reference fields between them.
06:32:09FromDiscord<Rika> include is just like copying contents
06:32:17FromDiscord<Rika> what you essentially made is a foo that imports foo
06:32:41FromDiscord<Dudugz> Makes sense, but then there's no way to do it, right?
06:32:57FromDiscord<Rika> im not sure what causes the type not to be found from lack of info
06:33:23FromDiscord<Dudugz> Nimsuggest says so lol so would it compile normally?
06:33:47FromDiscord<Dudugz> I guess I should have tried compiling 😅
06:34:19FromDiscord<Rika> nimsuggest lol
06:35:58FromDiscord<Dudugz> sent a code paste, see https://play.nim-lang.org/#ix=4vmL
06:36:17FromDiscord<Rika> importing foo would not allow using the proc
06:36:20FromDiscord<Dudugz> (edit) "https://play.nim-lang.org/#ix=4vmL" => "https://play.nim-lang.org/#ix=4vmM"
06:36:23FromDiscord<Rika> export marker
06:36:34FromDiscord<Dudugz> ops
06:36:51FromDiscord<Dudugz> (edit) "https://play.nim-lang.org/#ix=4vmM" => "https://play.nim-lang.org/#ix=4vmN"
06:37:02FromDiscord<Dudugz> Fixed, now would it work then?
06:37:42FromDiscord<Rika> yeah
06:37:43FromDiscord<Dudugz> There must probably be something to remove the warning in the IDE about the type not being found
06:38:29FromDiscord<Rika> no
06:38:32FromDiscord<Rika> well yes
06:38:35FromDiscord<Rika> dont use include 🙂
06:38:46FromDiscord<Dudugz> ;-;
06:39:56FromDiscord<Dudugz> It's pretty tricky to do these things without events but beef says callbacks in Nim are slow.
06:40:23FromDiscord<Rika> beef would also tell you to not use include
06:40:31FromDiscord<Dudugz> Probably
06:40:35FromDiscord<Rika> no
06:40:37FromDiscord<Rika> im sure of it
06:40:52FromDiscord<Elegantbeef> "says callbacks are slow"
06:40:59FromDiscord<Elegantbeef> No i said they're slower than generic interfaces
06:41:00FromDiscord<Rika> speak of the devil lo
06:41:04FromDiscord<Dudugz> lol, yea I can imagine him saying "You should never use include"
06:41:13FromDiscord<Rika> i dont even know what you're building to be real
06:41:17FromDiscord<Elegantbeef> You should never use include unless it's the only solution
06:41:32FromDiscord<Dudugz> In reply to @Elegantbeef "No i said they're": Got it
06:43:20FromDiscord<Dudugz> In reply to @Rika "i dont even know": Precisely a server but not something that simple, I have a packet handler, an object for the client and an object for the server. This is necessary since there is information that belongs to the server and information that belongs to the client itself. The problem is to make this interconnection between client and server since sometimes the server may need data from the client and vice versa.
06:44:21FromDiscord<Dudugz> I mean there are client procs that need to call server procs just as the opposite can happen. I'm still trying to figure out what would be the best design for this in Nim.
06:45:08FromDiscord<Dudugz> I even thought about trying to imitate some games that use ``TheServer.proc`` but I need a map from the clients to the server.
06:47:04FromDiscord<Dudugz> One thing I still don't understand in Nim is if it generates only one instance of a module or if each import generates a new module. If it's like JS that generates an instance for each module it's easy to implement something like TheServer.doStuff and then remove the ambiguity between client and server
06:47:25FromDiscord<Dudugz> Although for the server to have procs that receive the client this would still generate cyclic imports
06:48:00FromDiscord<Elegantbeef> Unlike JS it has to have a single module for types
06:49:50FromDiscord<Dudugz> sent a code paste, see https://play.nim-lang.org/#ix=4vmQ
06:50:07FromDiscord<Elegantbeef> No like i said it has to generate one
06:50:07FromDiscord<Dudugz> (edit) "https://play.nim-lang.org/#ix=4vmQ" => "https://play.nim-lang.org/#ix=4vmR"
06:51:15FromDiscord<Dudugz> In reply to @Elegantbeef "No like i said": Got it, well looks like I'll have to study a pattern that fits better.
06:51:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4vmS
07:42:24FromDiscord<j-james> hmm
07:42:58FromDiscord<j-james> is there an option to read the stdout/stderr of a process in std/osproc that i'm missing
07:46:01FromDiscord<j-james> well looks like i can get away without needing it but that seems to be a weird gap
07:48:31FromDiscord<kots> outputStream and errorStream?
07:49:04FromDiscord<j-james> ohh you're very right
07:49:06FromDiscord<j-james> i need sleep
07:55:29*lucasta joined #nim
08:29:47*Notxor joined #nim
09:26:08*rmnmjw joined #nim
09:39:00NimEventerNew Nimble package! openaiClient - Openai API client For Nim, see https://github.com/Uzo2005/openai
09:46:41*rmnmjw quit (Remote host closed the connection)
09:46:58*rmnmjw joined #nim
09:54:58*junaid_ joined #nim
10:10:53FromDiscord<Ariel <Mirage>> how do i run a .nims file from nimscript?
10:13:31FromDiscord<mratsim> In reply to @Ariel <Mirage> "how do i run": nim myfile.nims
10:25:21*PMunch joined #nim
11:01:05NimEventerNew thread by inv2004: Why `!=` is template and not a func?, see https://forum.nim-lang.org/t/10181
11:15:55*rmnmjw quit (Ping timeout: 248 seconds)
11:21:57*azimut joined #nim
11:29:05*rmnmjw joined #nim
11:31:59*azimut quit (Remote host closed the connection)
11:33:39*azimut joined #nim
12:46:59*junaid_ quit (Quit: leaving)
12:58:01*lucasta quit (Remote host closed the connection)
13:00:08*lucasta joined #nim
13:00:40FromDiscord<Chronos [She/Her]> Is there a way for my nimble file to depend on a module, but only if the Nim version is higher than 1.7.3?
13:01:00FromDiscord<Chronos [She/Her]> And is it also possible to check that within when blocks?
13:03:50PMunchYes
13:03:58PMunchIt should be possible
13:04:34PMunchNimble files are just NimScript
13:04:44PMunchSo you can put pretty much whichever logic
13:04:45FromDiscord<Chronos [She/Her]> Ah yeah there's nimVersion, right? Just need to check that in the nimble file which should be the same too
13:13:37FromDiscord<jmgomez> Is it just me or the fórums doesn’t work on mobile/iOS?
13:13:57PMunchRight now, or in general?
13:14:40*derpydoo quit (Ping timeout: 248 seconds)
13:15:04FromDiscord<jmgomez> I think I saw the error before but can’t recall ‘This site can’t provide a secure connection↵↵forum.nim-lang.org sent an invalid response.↵ERR_SSL_PROTOCOL_ERROR’
13:16:29PMunchHmm, that sounds like something which should affect more than just mobile
13:17:46FromDiscord<jmgomez> Not sure iOS is pretty strict on that
13:18:43FromDiscord<TurtleP> Heya, I'm trying to do an https POST request on a URL with an AsyncHttpClient. This kind of works, but when I run it, I end up with "Future still in progress." printing out. Any idea how to fix this?
13:24:14FromDiscord<Marcus> Works for me in mobilesafari to read at least. Or is it posting you have trouble with?↵(@jmgomez)
13:27:05PMunch@TurtleP, hard to tell what you're doing wrong without code
13:27:25PMunchBut it sounds a bit like you don't properly await something
13:27:45FromDiscord<TurtleP> In reply to @PMunch "<@114901354924867584>, hard to tell": yeah lemme toss my gist up real fast
13:27:55FromDiscord<TurtleP> should be properly awaiting afaict
13:28:29FromDiscord<TurtleP> https://gist.github.com/TurtleP/3b7a6890f717d1999e66014de02de6f1
13:35:56PMunchHmm, not sure where that message comes from..
13:50:21FromDiscord<kots> try awaiting body() on line 58
13:51:31FromDiscord<kots> (edit) "try awaiting body() on line 58 ... " added "and 62"
13:56:33FromDiscord<TurtleP> like so? `let content = await response.body()`
13:56:47FromDiscord<TurtleP> `.choosenim\toolchains\nim-1.6.12\lib\pure\asyncmacro.nim(130, 3) Error: 'yield' only allowed in an iterator`
13:57:07FromDiscord<kots> sorry, waitFor, since sendData isnt async
13:59:15FromDiscord<TurtleP> seems to work!
13:59:17FromDiscord<TurtleP> thanks~
13:59:19FromDiscord<TurtleP> (edit) "thanks~" => "thanks!"
14:08:24FromDiscord<TurtleP> In reply to @kots "sorry, waitFor, since sendData": would it be smarter/better for it to be? (dumb question, but I don't really dabble in async stuff much)
14:12:14NimEventerNew post on r/nim by AbbreviationsJust336: Net nor Sockets libraries are preinstalled and when installing wont install, see https://reddit.com/r/nim/comments/13aos88/net_nor_sockets_libraries_are_preinstalled_and/
14:24:24PMunchHmm, have anyone written an ergonomic IPC thing in Nim yet?
14:25:16FromDiscord<kots> In reply to @TurtleP "would it be smarter/better": it would let you do multiple network requests concurrently or start zipping the next archive while waiting for the previous sendData's network request to finish, for example↵if you're only doing one sendData at a time then it doesn't matter
14:43:29FromDiscord<TurtleP> yeah I only do one at a time, iterating whichever target I have in a sequence
14:44:44FromDiscord<decoded> const dlls = slurp("dependancies.zip")↵var z = ZipArchive()↵↵I'm trying to extract "sqlite3_64.dll" from dependencies.zip. I need them to be in the same directory as the executable. I need this to happen without any external dependencies. How would I do this?
14:45:46FromDiscord<voidwalker> In reply to @decoded "const dlls = slurp("dependancies.zip")": https://github.com/guzba/zippy/blob/8d75e3d7c010dcd5d050ea04cbdb5d64e0b6cf6a/examples/ziparchive_explore.nim#L13
14:46:07FromDiscord<decoded> Would it work for a slurp?
14:51:12FromDiscord<ajusa> In reply to @TurtleP "yeah I only do": If you're just doing one at a time, you could just use httpclient directly and not worry about async I believe: https://nim-lang.org/docs/httpclient.html
14:55:31FromDiscord<decoded> sent a code paste, see https://play.nim-lang.org/#ix=4vof
14:57:24FromDiscord<TurtleP> In reply to @ajusa "If you're just doing": fair, though I might want to keep async just to be safe? (~~also hey you're alive!~~)
14:57:46FromDiscord<voidwalker> I don't think zippy works at compile time
14:58:00FromDiscord<decoded> It does. You can extract all of the shit in the archive to a folder
14:58:37FromDiscord<decoded> sent a code paste, see https://play.nim-lang.org/#ix=4vog
14:58:40FromDiscord<decoded> This works
14:58:57FromDiscord<ajusa> In reply to @TurtleP "fair, though I might": (hey you're alive too!)↵If by safe you mean, running multiple requests in parallel then yes you should keep it in. If you have no plans of doing that, I'd recommend just sticking to the simpler synchronous httpclient
14:59:02FromDiscord<decoded> (edit) "https://play.nim-lang.org/#ix=4vog" => "https://play.nim-lang.org/#ix=4voh"
14:59:19FromDiscord<decoded> (edit) "https://play.nim-lang.org/#ix=4voh" => "https://play.nim-lang.org/#ix=4voj"
14:59:28FromDiscord<decoded> I just can't extract to my current directory
14:59:32FromDiscord<decoded> because it's not empty
14:59:51FromDiscord<TurtleP> I was thinking that data might possibly be mis-sent if I don't wait per-request, e.g. I get one binary's data saved to another's, which would be bad
15:00:00FromDiscord<TurtleP> but I'm not well versed here
15:04:39*derpydoo joined #nim
15:07:49FromDiscord<ajusa> In reply to @TurtleP "I was thinking that": Ah no that wouldn't happen - the way the synchronous httpclient works is by waiting for the request to complete anyway
15:12:16*lucasta quit (Remote host closed the connection)
15:20:23FromDiscord<wick3dr0se> sent a long message, see https://paste.rs/ZK1
15:20:50FromDiscord<wick3dr0se> (edit) "http://ix.io/4voF" => "http://ix.io/4voE"
15:21:10FromDiscord<wick3dr0se> (edit) "http://ix.io/4voE" => "http://ix.io/4voG"
15:25:03FromDiscord<michaelb.eth> In reply to @wick3dr0se "How should I deal": what's the context? are you defining a `func`, and if so can you try defining it as a `proc` instead?
15:26:11FromDiscord<wick3dr0se> I'm defining a func called getHost which simply does result = open("/etc/hostname").readLine
15:28:16FromDiscord<wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4voI
15:28:30FromDiscord<ajusa> That's a side effect
15:28:44FromDiscord<ajusa> Call it proc instead?
15:29:01FromDiscord<wick3dr0se> I thought it was the opposite?
15:29:37FromDiscord<ajusa> Funcs can't have side effects, procs can
15:29:48FromDiscord<wick3dr0se> Oh so it's acceptable to allow it
15:29:53FromDiscord<wick3dr0se> I misinterpreted that
15:30:08FromDiscord<wick3dr0se> Should I generally use procs?
15:32:17FromDiscord<Andreas> In reply to @wick3dr0se "Should I generally use": yes
15:37:48*om3ga quit (Read error: Connection reset by peer)
15:39:09*om3ga joined #nim
15:47:35FromDiscord<wick3dr0se> Thanks guys
15:49:27FromDiscord<Nlits (Ping on reply)> what are the other speed flags for nim. Other than -d:release opt:speed and d:danger
15:54:30FromDiscord<wick3dr0se> Wouldn't -d:danger just build a faster version of -d:release?
15:55:01FromDiscord<wick3dr0se> (edit) "of" => "than"
15:55:14FromDiscord<michaelb.eth> In reply to @wick3dr0se "Wouldn't -d:danger just build": possibly faster, and definitely less safe, as no runtime checks are performed
15:56:07FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4voM
15:57:41*rmnmjw quit (Quit: Leaving)
15:58:37FromDiscord<michaelb.eth> eh, you said "speed flags", I was thinking of "size flags", sorry, read too fast
16:02:36FromDiscord<wick3dr0se> I would also be interested in other flags that would possibly increase the compile or execution time. Definitely stealing some of your config.nims setup lol
16:04:44FromDiscord<wick3dr0se> Actually just going to add the flags to a bash script instead
16:05:16FromDiscord<demotomohiro> --passC:"-march=native" can also generates faster executable but that executable uses any instructions available in build machine and it might not work on older CPU.
16:07:51FromDiscord<demotomohiro> -flto, -s or -march=native are actually GCC's flag. They might not work if you use other backend C compiler.
16:08:48Amun-Raand clang
16:10:57*derpydoo quit (Quit: derpydoo)
16:13:51*jmdaemon quit (Ping timeout: 256 seconds)
16:19:41*om3ga quit (Ping timeout: 240 seconds)
16:21:01*om3ga joined #nim
16:25:02FromDiscord<michaelb.eth> In reply to @demotomohiro "-flto, -s or -march=native": fair point
16:26:40*PMunch quit (Quit: leaving)
16:38:25*xet7 quit (Read error: Connection reset by peer)
16:41:37*xet7 joined #nim
16:57:27NimEventerNew thread by blackmius: Pure nim io_uring library, see https://forum.nim-lang.org/t/10182
17:00:02FromDiscord<Rika> In reply to @NimEventer "New thread by blackmius:": woah
17:00:05FromDiscord<JeanCareau> sent a long message, see http://ix.io/4voX
17:00:55FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=
17:01:03FromDiscord<Rika> (edit)
17:01:58FromDiscord<JeanCareau> Ah. Now it works. Thank you.
17:07:40*om3ga_ joined #nim
17:14:56*om3ga quit (*.net *.split)
17:16:29FromDiscord<wick3dr0se> Is there a simple way to capitalize the first letter of a var?
17:23:30FromDiscord<Rika> what?
17:31:57FromDiscord<tyooo> !!! Enjoy the most profitable financial market (crypto market ) as you get 100% profit...and you can also make up to $100k or more in 3days send me a private message and ask me HOW on TG↵↵https://t.me/FloraGordon
17:35:28FromDiscord<Marcus> frickin' spammers 😕
17:39:16FromDiscord<that_dude> <@&371760044473319454> Got a spam
17:43:23FromDiscord<wick3dr0se> Curious why use nimscript over bash? Running a simple `echo(getEnv("USER")` takes ~.3 seconds on my machine and the equivalent is over 2x faster in bash. Would nimscript outperform bash in other areas? Although nim script doesn't need to be compiled, it still needs nim installed which isn't widely available. Just confused really what use case it would have
17:44:00FromDiscord<Elegantbeef> Write statically typed script in bash
17:44:53FromDiscord<Elegantbeef> Or parse json
17:45:37FromDiscord<wick3dr0se> Well bash handles type on runtime. I can write a script to handle json pretty easily or since its a command language, just fallback to `jq`
17:45:56FromDiscord<Elegantbeef> So you're not using bash to parse json
17:45:58FromDiscord<Elegantbeef> Damn that was a short lived usage of bash
17:46:14FromDiscord<wick3dr0se> I did mention I can write it in pure BASH
17:46:37FromDiscord<Phil> In reply to @that_dude "<@&371760044473319454> Got a spam": Were they already nuked?
17:46:40FromDiscord<wick3dr0se> Bash easily parses strings
17:46:43FromDiscord<Elegantbeef> How does one parse a complex object using bash then access fields from it
17:47:27FromDiscord<wick3dr0se> Check out any of my bash projects for examples. Not many people have extensive knowledge of how to actually use bash https://github.com/wick3dr0se/fml
17:47:30FromDiscord<Elegantbeef> Not shelling out to external programs it's a crazy to do anything with bash
17:48:19FromDiscord<wick3dr0se> That's a TUI file manager written in bash which takes quite a bit of parsing
17:49:16FromDiscord<Nlits (Ping on reply)> sent a long message, see https://paste.rs/VvX
17:49:25FromDiscord<Nlits (Ping on reply)> (edit) "http://ix.io/4vpc" => "http://ix.io/4vpd"
17:49:32FromDiscord<Elegantbeef> I'd argue it's unmaintainable but that's between you and your god
17:49:42FromDiscord<Nlits (Ping on reply)> (edit) "long message," => "code paste," | "http://ix.io/4vpf" => "https://play.nim-lang.org/#ix=4vpe"
17:49:44FromDiscord<Elegantbeef> Personally I would never use bash or nimscript, I'd just use Nim
17:50:02FromDiscord<Elegantbeef> `myString.replace(" ", "G")`
17:50:08FromDiscord<wick3dr0se> Unmaintainable? It's bug free and I just rewrote the ~200 LOC script in one night
17:50:30FromDiscord<wick3dr0se> I can agree with just Nim
17:51:46FromDiscord<Elegantbeef> I mean it's unmaintainable in that it's relatively hard to read and understand what's going on
17:52:01FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vpg
17:52:04FromDiscord<Elegantbeef> Though that's coming from someone that's written bash for all of 2 seconds before deciding it's awful
17:52:10FromDiscord<wick3dr0se> Yea that's what I mean by not many have deep bash knowledge. For me it's super readable
17:52:23FromDiscord<Elegantbeef> How was I supposed to know you had spaces there
17:52:43FromDiscord<Elegantbeef> `myString.replace("X X", "XGX")`
17:52:48FromDiscord<wick3dr0se> When people post in r/bash, I have to be the one to answer usually 🙃
17:53:03FromDiscord<Elegantbeef> Plus I use fish so i'd rather use it's scripting
17:53:08FromDiscord<wick3dr0se> Yikes
17:53:16FromDiscord<Elegantbeef> It at least supports more sane types
17:54:32*fallback quit (Ping timeout: 246 seconds)
17:54:48FromDiscord<Elegantbeef> You say yikes, but using Bash invokes the same feelings to me
17:55:29FromDiscord<wick3dr0se> Types are uncessesary but easily defined by local/declare. Fish is just much slower and bloated. I use bash because it's widely installed nearly everywhere. When you run ./script.sh, it typically runs on most machines without needing a compiler. If nim was included everyshere than I would make an exception. If fish was included, I'd delete it. Writing a bash prompt is stupid simple, fish is lazy
17:56:00FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://paste.rs/Adv
17:56:03FromDiscord<Elegantbeef> Yea I do not care if something is installed everywhere
17:56:20FromDiscord<Elegantbeef> If you want my software compile it for your hardware
17:56:26FromDiscord<Elegantbeef> It's open source as is Nim, ez pz
17:56:33FromDiscord<wick3dr0se> Yea I wrote open source utilites for Linux, so I kind of have to prioritize that
17:56:53FromDiscord<Nlits (Ping on reply)> In reply to @not logged in "Lets try that with": I need a 1x1 no-outlet corridor finder basically
17:57:08FromDiscord<Elegantbeef> You keep making the problem more elaborate
17:58:29FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/4rc
17:58:32FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "You keep making the": No, I keep on giving more detail from my mind to you
17:58:34FromDiscord<Elegantbeef> If that doesnt work i'm going to tell you to solve it yourself
17:58:53FromDiscord<Elegantbeef> Perhaps there is a way to accurately describe the problem in detail before hitting 'enter'
17:59:38FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "Perhaps there is a": what do you mean?
18:00:09FromDiscord<Elegantbeef> Write out the entire problem before hitting enter and explain all the caveats
18:00:20FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "Write out the entire": I will try
18:00:21FromDiscord<Elegantbeef> If you do this well enough you might not even hit enter
18:00:41FromDiscord<Dudugz> lol
18:04:00FromDiscord<Nlits (Ping on reply)> Problem:↵> You have a 11x11 grid with essentially random "filled" boxes. These "filled" box are stored in a `seq[(int, int)]`. The goal is to fill in 1x1 corridors with no outlet. The corridors can curve and bend. The corridors are defined by have "filled" boxes on 2 sides and one at either but not both ends.↵↵How did i do?
18:04:42FromDiscord<that_dude> In reply to @Isofruit "Were they already nuked?": Looks like they were. Some other mod sniped you lol
18:05:07FromDiscord<Elegantbeef> Now that you have written out the problem what have you thought of to resolve it
18:06:49FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "Now that you have": idk where to start, so nothing really. Ig i could try to follow corridors to see if the end/follow the rules.
18:08:36FromDiscord<Elegantbeef> Well try that and see what happens
18:08:53FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "Well try that and": Even with that, idk where to start
18:09:30FromDiscord<Elegantbeef> Well your first problem is how do you know what a corridor is
18:09:42FromDiscord<Elegantbeef> So figure that one out
18:15:43FromDiscord<Nlits (Ping on reply)> In reply to @Elegantbeef "Well your first problem": Ig before that I need to find the "end" of a corridor
18:17:14FromDiscord<jmgomez> what a friendly guy
18:17:16FromDiscord<jmgomez> 😛
18:17:26FromDiscord<Nlits (Ping on reply)> In reply to @jmgomez "what a friendly guy": who?
18:18:47FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://paste.rs/ZbK
18:18:47FromDiscord<Nlits (Ping on reply)> ig
18:18:59FromDiscord<Nlits (Ping on reply)> to find a beggining
18:19:55FromDiscord<Nlits (Ping on reply)> (edit) "https://play.nim-lang.org/#ix=4vpq" => "https://play.nim-lang.org/#ix=4vpp"
18:22:14FromDiscord<that_dude> tbh those numbers don't look right to me
18:22:39FromDiscord<Nlits (Ping on reply)> In reply to @that_dude "tbh those numbers don't": why?
18:22:49FromDiscord<that_dude> Aren't you checking diagonals?
18:25:51FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vps
18:26:09FromDiscord<that_dude> Oh you're going that way
18:26:18FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vpu
18:26:28FromDiscord<that_dude> Wouldn't it be easier to find dead ends and start there?
18:26:40FromDiscord<Nlits (Ping on reply)> In reply to @that_dude "Wouldn't it be easier": that is what I am doing?
18:27:17FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vpv
18:27:20FromDiscord<that_dude> Yeah like that
18:27:39FromDiscord<Nlits (Ping on reply)> In reply to @that_dude "Yeah like that": probably. Let my try smth.
18:28:18FromDiscord<that_dude> sent a code paste, see https://play.nim-lang.org/#ix=4vpw
18:28:44FromDiscord<that_dude> ignore that one
18:30:38FromDiscord<that_dude> The magic of programming is that there are infinite ways to do things. It's just up to preference
18:30:52FromDiscord<that_dude> (edit) "preference" => "preference. I don't want to force you into what I would to for my solution"
18:31:02FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vpx
18:31:17FromDiscord<Nlits (Ping on reply)> In reply to @that_dude "The magic of programming": you are right tho, it is probably eaiser
18:31:46FromDiscord<that_dude> sent a code paste, see https://play.nim-lang.org/#ix=4vpy
18:32:02FromDiscord<that_dude> If not, you probably don't ever need to do diagonal checks
18:32:06FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://paste.rs/c1U
18:33:09FromDiscord<that_dude> If you chose good starting coordinates to start your checks from
18:35:27FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vpz
18:35:57FromDiscord<Rika> what an elaborate issue
18:37:33FromDiscord<that_dude> sent a code paste, see https://play.nim-lang.org/#ix=4vpB
18:37:49FromDiscord<that_dude> Gl :)
18:38:26FromDiscord<Nlits (Ping on reply)> The next big issue would be turns.
18:38:57FromDiscord<that_dude> In reply to @Rika "what an elaborate issue": It's a tough balance between walking someone through a though process and not doing the whole thing myself lol
18:43:31FromDiscord<that_dude> Thinking about it, `return result` is terrible form right? I mean it should work but should be considered a sin right?
18:44:34FromDiscord<Elegantbeef> Correct
18:49:52FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vpF
18:50:32FromDiscord<Nlits (Ping on reply)> Can't do corners but that is ok
18:53:59FromDiscord<Nlits (Ping on reply)> for now
18:54:53FromDiscord<Rika> why is it async
18:55:12FromDiscord<Rika> the fact that its async kinda terrifies me a little
18:56:15FromDiscord<Nlits (Ping on reply)> In reply to @Rika "why is it async": I use jester earlier on and it is prob better to be async
18:56:21FromDiscord<Rika> ???
18:56:25FromDiscord<Rika> there is no reason for that to be async
18:56:40FromDiscord<Nlits (Ping on reply)> And guess what! it does not work
19:02:42FromDiscord<Nlits (Ping on reply)> wait, it kind of does
19:03:19FromDiscord<that_dude> Does it break on corners?
19:03:45FromDiscord<that_dude> But yeah, I saw the Future and had to take a step back lol
19:03:50FromDiscord<Nlits (Ping on reply)> In reply to @that_dude "Does it break on": Idk, have not tested corners. That might be a later thing
19:06:30FromDiscord<that_dude> In the last 2 lines, direction never gets updated. I bet that's an issue
19:06:34FromDiscord<that_dude> gotta go th
19:11:02FromDiscord<Nlits (Ping on reply)> In reply to @that_dude "In the last 2": I does not need too if we are not doing curves
19:20:14*xaltsc quit (Quit: WeeChat 3.7.1)
19:23:55*jkl quit (Quit: Gone.)
19:25:40*jkl joined #nim
20:07:18FromDiscord<Dudugz> sent a code paste, see https://paste.rs/zDq
20:08:33FromDiscord<Dudugz> (edit) "https://play.nim-lang.org/#ix=4vpT" => "https://play.nim-lang.org/#ix=4vpS"
20:08:46FromDiscord<Dudugz> (edit) "https://play.nim-lang.org/#ix=4vpV" => "https://play.nim-lang.org/#ix=4vpU"
20:13:50*derpydoo joined #nim
20:17:08FromDiscord<jmgomez> that should be trivial to implement, IIRC there is all in the std, look at how is done `and` change and for `or`
20:17:38FromDiscord<jmgomez> (edit) "that should be trivial to implement, IIRC there is all in the std, look at how is done ... `and`" added "and change" | removed "change and"
20:17:57FromDiscord<Dudugz> actually i found the answer
20:17:58FromDiscord<Dudugz> https://nim-lang.org/docs/asyncfutures.html#all%2Cvarargs%5BFuture%5BT%5D%5D
20:18:05FromDiscord<Dudugz> asyncfutures has ``any`` proc
20:18:21FromDiscord<Dudugz> (edit) "actually i ... found" added "almost"
20:18:35FromDiscord<jmgomez> I just told you that
20:18:45FromDiscord<Dudugz> yea
20:19:01FromDiscord<Dudugz> i'll do it with or, thx
20:19:31FromDiscord<voidwalker> hm that should have been in the lib
20:20:29FromDiscord<jmgomez> yes, and also `flatMap` althoug any and all IMO should be a template where you write down a bunch of futures and it does its thing
20:21:20FromDiscord<Dudugz> I thought it was in the library so I went looking but I didn't find anything. I thought they would have implemented something like that since JS has it.
20:21:39FromDiscord<Arathanis> sent a code paste, see https://paste.rs/Y8m
20:22:16FromDiscord<jmgomez> In reply to @Dudugz "I thought it was": oh you in js. Yeah you will need to do it yourself, I dont understand why they didnt make the shape identical and reuse the functions
20:22:16FromDiscord<Dudugz> i think the return can be auto, but yea seems resonable
20:24:27FromDiscord<Dudugz> In reply to @Arathanis "<@265937132886032407> Probably something like": this would work, but only if i needed one of them, if more then one completes at the same time i'll need all of the completed ones
20:24:47FromDiscord<Arathanis> what is the use case here?
20:25:25FromDiscord<Dudugz> In reply to @Arathanis "what is the use": Let's say I'm waiting for resources in parallel
20:25:26FromDiscord<Arathanis> because they aren't going to complete "at the same time"
20:25:42FromDiscord<Arathanis> sounds like you actually want "asCompleted"
20:25:54FromDiscord<Arathanis> an iterator returning completed futures as they return
20:26:00FromDiscord<Arathanis> (edit) "return" => "finish"
20:26:06FromDiscord<Arathanis> so you can process them
20:26:38FromDiscord<Dudugz> They can still complete at the same time, i mean, they are futures they don't have to wait for one to complete for the other to complete. if both resources are ready at the same time then both will be completed.
20:26:54FromDiscord<Arathanis> they wont complete at the same time because async is cooperative multitasking
20:27:15FromDiscord<Arathanis> they might complete before the proc checks them and more than one is now done but they wont be set to completed at the same time
20:27:49FromDiscord<Dudugz> In reply to @Arathanis "<@265937132886032407> Probably something like": so i may use your method then without problem?
20:28:16FromDiscord<Arathanis> its an important distinction to prevent timing bugs when writing async code, its all still serial computing
20:28:31FromDiscord<Arathanis> In reply to @Dudugz "so i may use": combine it with an iterator and you can probably get something you want
20:28:48FromDiscord<Arathanis> what i wrote will return the first future that completed
20:29:11FromDiscord<Arathanis> if you wrap that in an iterator that returns the completed one, then for the next element waits for the next completed future you can do something like:
20:29:27FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4vpW
20:29:31FromDiscord<Arathanis> and as they finish you will enter the loop body and can do what you need
20:29:42FromDiscord<Dudugz> sure
20:30:06FromDiscord<Arathanis> oim honestly surprised a proc does not already exist for this
20:30:13FromDiscord<Arathanis> im trying to find one and not finding one lol
20:32:15FromDiscord<Arathanis> might be slightly more complex, i dont know if nim has an async for loop
20:33:10FromDiscord<Arathanis> or async iterators
20:45:27FromDiscord<Arathanis> if that is the case @Dudugz you might just use a while loop w/ explicit break statement
20:46:32FromDiscord<Arathanis> (edit) "if that is the case @Dudugz you might just ... use" added "have to"
20:56:41FromDiscord<guttural666> how can I update the Nim version if i get this?↵/tmp/nimble_22901/githubcom_nimlangNimgit_#head/compiler/nim.nim(13, 13) Error: cannot open file: std/assertions
20:57:02FromDiscord<guttural666> when nimble install nim
21:03:42FromDiscord<Dromedario de Chapeu> sent a long message, see http://ix.io/4vpY
21:04:35FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://play.nim-lang.org/#ix=4vpZ
21:05:25FromDiscord<Elegantbeef> @Dromedario de Chapeu\: nim-results exist
21:05:45FromDiscord<Nlits (Ping on reply)> ah, ik how. I have 2 vars named the same thing XD
21:09:03FromDiscord<Dromedario de Chapeu> In reply to @Elegantbeef "<@859698655929434122>\: nim-results exist": I know, but since it's a guide, i'm trying to make the things in the most native way possible, i not even talk about nimble yet. And after find this post i'm trying to get this to work
21:09:07FromDiscord<Nlits (Ping on reply)> also i need to postprocess some other stuff
21:09:40FromDiscord<Elegantbeef> Ok so Dromedario what are you trying to represent exactly
21:10:03FromDiscord<Dromedario de Chapeu> will past the code, a moment
21:10:59FromDiscord<Dromedario de Chapeu> https://pastebin.com/kj9E8hjH this is the code from the answer
21:11:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4vq1
21:12:38FromDiscord<Dromedario de Chapeu> sorry, i don't get, can you use in a example pls?
21:15:12FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Gnl
21:16:05FromDiscord<Dromedario de Chapeu> ok ok, i get now, thanks, i'll try with this
21:16:14FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4vq3
21:16:39FromDiscord<Elegantbeef> I'm uncertain where in the example code you provided one would use a result
21:20:51FromDiscord<auxym> so, can I somehow make a `var openArray[byte]` from a pointer?
21:31:27FromDiscord<Elegantbeef> `cast[ptr UncheckedArray[byte]](myPointer).toOpenArray(0, len)`
21:35:38*demetera quit (Remote host closed the connection)
21:38:52FromDiscord<guttural666> In reply to @guttural666 "when nimble install nim": can I easily update to a new Nim version?
21:43:15FromDiscord<Elegantbeef> Use choosenim or git nim
21:45:11*Notxor quit (Remote host closed the connection)
21:48:49FromDiscord<acornes> if someone made an implementation of python in nim would interop between the languages be easier and more efficient or would it be the same as using nimporter or nimpy?
21:49:57FromDiscord<guttural666> In reply to @Elegantbeef "Use choosenim or git": just fails every time with choosenim update nim, choosenim updaten etc
21:50:28FromDiscord<guttural666> god this is a pain ita
21:50:49FromDiscord<guttural666> (edit) "updaten" => "update"
21:51:34FromDiscord<guttural666> I request the newest Nim version in my project, how do I update it on my machine
21:51:52*lucasta joined #nim
21:52:04FromDiscord<Elegantbeef> Depends on how designed but likely easier
21:54:31FromDiscord<guttural666> what would be the command to update the Nim version?
21:57:15FromDiscord<Elegantbeef> `choosenim update stable`
22:00:54FromDiscord<guttural666> In reply to @Elegantbeef "`choosenim update stable`": well that was easy, thanks
22:01:44FromDiscord<that_dude> Or if you want an experience closer to nim2.0, use `devel` instead
22:02:27FromDiscord<guttural666> I would love to experience a release version of 2.0
22:02:57FromDiscord<Elegantbeef> Squint and do `choosenim devel`
22:03:05FromDiscord<Elegantbeef> it's hardly different
22:04:50FromDiscord<guttural666> what kind of keyboard do you use? I have been using this layout for while and it seems awesome https://www.cherry.de/g80-1800
22:05:52FromDiscord<guttural666> cherry black switches seem unacceptable to my colleagues
22:06:16FromDiscord<that_dude> I mean I use reds, but I'm pretty sure those are the same as blacks just a bit lighter
22:06:47FromDiscord<guttural666> problem is, my colleagues complain in the office
22:06:48FromDiscord<that_dude> I've been told, red for gaming, blue for best feel (but also loudest), brown for the inbetween
22:06:58FromDiscord<that_dude> What's the complaint?
22:07:31FromDiscord<guttural666> too loud, I have tried the cherry mx blacks on my boss and he said gtfo ^^
22:07:40FromDiscord<Elegantbeef> I have a reddragon 70% keyboard which has knockoff blue switches
22:07:57FromDiscord<guttural666> In reply to @Elegantbeef "I have a reddragon": in the office?
22:07:57FromDiscord<Elegantbeef> I'd still be using a membrane keyboard if my friend didnt gift me this
22:08:04FromDiscord<Elegantbeef> "Office"
22:08:13FromDiscord<Elegantbeef> What do you take me for a productive member of society
22:08:19FromDiscord<guttural666> hahahaha
22:08:33FromDiscord<that_dude> Membrane if you need quiet imo
22:09:12FromDiscord<guttural666> I have the Mountain Keyboard which is kind of a hybrid for gaming
22:09:33FromDiscord<that_dude> https://www.cherrymx.de/en/cherry-mx/mx-original/mx-silent-black.html It looks like there are silent variants if you want to look into those
22:09:44FromDiscord<Elegantbeef> I'm not one for caring about keyboard quality really, if it doesnt feel like absolute garbage i'm fine
22:09:58FromDiscord<guttural666> but for coding I use the G80-1800 from cherry at home, which is just awesome
22:10:03FromDiscord<Elegantbeef> Plus this is the most expensive keyboard i've used so I've got a very low bar
22:11:59FromDiscord<guttural666> In reply to @that_dude "https://www.cherrymx.de/en/cherry-mx/mx-original/mx": probably don't have those on the G80, the noise is just coming from me hammering on that bad boy like a cave man
22:12:52FromDiscord<guttural666> looking for the best of both worlds, silent like a flat keyboard they give me at work, which are shit
22:13:04FromDiscord<acornes> im adopting magnetic switches soon
22:13:08FromDiscord<guttural666> dunno if that exists
22:13:08FromDiscord<acornes> seems cool for me
22:13:30FromDiscord<guttural666> In reply to @acornes "im adopting magnetic switches": seen that, the kind of levitating switches?
22:13:47FromDiscord<that_dude> https://mechanicalkeyboards.com/shop/index.php?l=product_list&c=475 I don't think I can do much more than send this your way
22:14:36FromDiscord<acornes> In reply to @guttural666 "seen that, the kind": no its a switch that uses hall effect sensors to detect a magnet thats on the switch, making the actuation point modifiable thru software with the minimum being 0.1mm and having a latency of less than 1ms
22:15:11FromDiscord<acornes> https://media.discordapp.net/attachments/371759389889003532/1104894221661507726/lekker_switch_gif-u2316.gif
22:15:28*om3ga_ quit (Ping timeout: 240 seconds)
22:16:01FromDiscord<guttural666> In reply to @acornes "no its a switch": yeah I know the hall effect, but I think I saw people using this with the switch being suspended by magnets yknow?
22:16:44FromDiscord<guttural666> hall effect switches should be quasi analog as well I think
22:16:44FromDiscord<acornes> as in the switch is dangling off of a magnet?
22:16:50FromDiscord<guttural666> yeah
22:16:50FromDiscord<acornes> it is analog
22:19:26FromDiscord<guttural666> have the Everest Max rn onn my gaming pc https://mountain.gg/
22:21:00FromDiscord<guttural666> but the Cherry G80-1800 is so gud on my dev pc
22:33:39FromDiscord<huantian> Ooh keebs? Im rocking a nibble65 with boba U4s
22:38:06FromDiscord<⃟⃟> im thinking the irc link should be severed
22:38:22FromDiscord<⃟⃟> it seems like a way for spam bots to bypass discord anti spam
22:43:14FromDiscord<Elegantbeef> Irc spam bots happen?
22:46:02*om3ga joined #nim
22:51:23FromDiscord<Nlits (Ping on reply)> sent a code paste, see https://paste.rs/jN7
22:53:12FromDiscord<Elegantbeef> That's being reverted
22:53:14FromDiscord<Elegantbeef> So disregard it
22:53:36FromDiscord<michaelb.eth> In reply to @not logged in "These warnings are really": In next point release of 1.6 and next 2.0 release candidate (or 2.0 itself) those bare except warnings will be off by default
23:05:47FromDiscord<auxym> sent a code paste, see https://play.nim-lang.org/#ix=4vqn
23:06:09FromDiscord<Elegantbeef> is the `ptr` a `var ptr`?
23:06:11FromDiscord<Elegantbeef> There is a bug
23:06:30FromDiscord<Chronos [She/Her]> Var ptr?
23:06:45FromDiscord<Elegantbeef> yes `var ptr T`
23:08:00FromDiscord<Elegantbeef> Works
23:08:02FromDiscord<Elegantbeef> The issue is the `ptr` that `p` is has to be mutable
23:08:03FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/gGK
23:09:01FromDiscord<Chronos [She/Her]> Hm
23:17:44FromDiscord<auxym> yeah I also don't understand what's going on, but uh if it works it works?
23:19:07FromDiscord<Elegantbeef> The value going to `toOpenArray` needs to be variable otherwise it emits an immutable openarray
23:20:09FromDiscord<auxym> ah i see
23:20:13FromDiscord<Elegantbeef> It's a bug but with a easy work around so not high priority of course
23:31:34*fallback joined #nim
23:32:10*fredrikhr quit (Read error: Connection reset by peer)
23:32:55*fredrikhr joined #nim