<< 28-02-2023 >>

00:11:28*rez quit (Quit: much snoozes...)
00:25:34*tanami quit (Ping timeout: 252 seconds)
00:42:54FromDiscord<eyes> is it currently possible to do realtime 3D physics in nim
00:43:09FromDiscord<eyes> the only thing i can think of is like writing bindings for open dynamics engine myself
00:43:11FromDiscord<eyes> which is awful
00:43:42FromDiscord<Elegantbeef> You either bind a 3D physics engine or write your own
00:43:59FromDiscord<Elegantbeef> Do not know if there are any bullet bindings
00:46:22FromDiscord<eyes> Damn
00:46:38FromDiscord<eyes> might fuck around and try to bind one I guess
00:47:03FromDiscord<Elegantbeef> If you find one with a C-api you can use futhark or c2nim to make it easier
00:48:27*rockcavera quit (Ping timeout: 252 seconds)
00:54:43FromDiscord<eyes> yeah that’s where I’m going to start
01:26:14*rockcavera joined #nim
02:07:27*tanami joined #nim
02:56:34FromDiscord<ringabout> https://www.youtube.com/watch?v=rYDRCNFtRq0
03:15:10*rez joined #nim
03:35:17*rez quit (Quit: l8r)
03:41:40*rockcavera quit (Remote host closed the connection)
04:02:49FromDiscord<etra> sent a code paste, see https://play.nim-lang.org/#ix=4pqx
04:03:24FromDiscord<etra> oh wait, `Foo` couldn't be a ref right? that breaks nim safety
04:05:01FromDiscord<etra> sent a code paste, see https://play.nim-lang.org/#ix=4pqA
04:05:04FromDiscord<etra> (edit) "https://play.nim-lang.org/#ix=4pqA" => "https://paste.rs/SjK"
04:06:53FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=4pqB
04:07:03FromDiscord<amadan> (edit) "https://play.nim-lang.org/#ix=4pqB" => "https://play.nim-lang.org/#ix=4pqC"
04:09:16FromDiscord<Elegantbeef> That should be cdecl
04:18:37FromDiscord<etra> In reply to @amadan "You could write it": this works! yay
04:18:40FromDiscord<etra> thanks!
04:24:47*arkurious quit (Quit: Leaving)
04:29:00FromDiscord<etra> is there a way to define a constant from nimble? like, to change the dynlib path depending on the OS
04:29:37FromDiscord<etra> oh wait, that doesn't needs to live in nimble now that I think of it
04:33:21FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4pqH
04:40:26FromDiscord<etra> nice. I'm trying to write an arboard wrapper (<https://github.com/1Password/arboard>) because afaik is the only clipboard library that handles images in both windows and macOS. Here's a very rough WIP <https://github.com/etra0/pastenim> if anyone is interested in following the progress
04:40:42FromDiscord<etra> (edit) "macOS." => "macOS (and I think they now fixed linux?)."
04:41:22FromDiscord<etra> (I'm very new to nim as well)
04:47:04FromDiscord<ringabout> Nice work!
05:12:09FromDiscord<virdisn> I tried fidget demo.nim and nimlsp. However getting errors like root.box.w root not defined which is part of the template. So does nimlsp have issues with macros cause the code compiles just fine.
05:17:37NimEventerNew thread by yalexr: Compilation error (type mismatch), see https://forum.nim-lang.org/t/9952
05:26:39NimEventerNew thread by mohan24: How to make web component to run Nim code inside a web page and by using some npm pakage only, see https://forum.nim-lang.org/t/9953
06:02:58FromDiscord<I have 50GB of nothing on my PC> how do most people give their editor access to external packages and stdlib in the editor? just create symlinks, bro?
06:03:22FromDiscord<Elegantbeef> nimble
06:03:49*dv^_^ quit (Remote host closed the connection)
06:04:17FromDiscord<I have 50GB of nothing on my PC> and it just goes to the files for reference automatically when needed, etc?
06:04:48FromDiscord<Elegantbeef> It's a package manager so it makes it easy
06:20:36FromDiscord<I have 50GB of nothing on my PC> is `nim r` supposed to be faster? it doesn't feel any faster than `nim c`
06:20:46FromDiscord<Elegantbeef> Nope
06:28:50*azimut quit (Ping timeout: 255 seconds)
07:01:54FromDiscord<ieltan> Hello everyone, does someone knows if the `{.goto.}` pragma has been documented (I think not but I may have overlooked it)
07:03:04FromDiscord<ieltan> I kind of want to experiment with it, I have been thinking about how people use `goto` in C for error handling, I could try to replicate this and see how it works out (with no intent to replace exceptions with them of course)
07:04:16FromDiscord<ieltan> Seems like Araq likes this feature a lot based on this one comment in the post
07:04:26FromDiscord<ringabout> Nim uses `goto` to handle exceptions/
07:04:34*advesperacit joined #nim
07:05:01FromDiscord<ieltan> Yes, I think you guys call them... goto-exceptions
07:05:06FromDiscord<ieltan> But it isn't what I am talking
07:05:22FromDiscord<ieltan> (edit) "But it isn't what I am talking ... " added "about"
07:05:46FromDiscord<ieltan> https://forum.nim-lang.org/t/8963#58594
07:07:06FromDiscord<ieltan> Note: I don't intend to replace exceptions with them in my code
07:07:14FromDiscord<ieltan> I just want to experiment with it
07:07:20FromDiscord<ieltan> 🙂
07:07:30FromDiscord<ringabout> `{.goto.}` sounds like a rarely used feature. I never see any documentation or code.
07:07:56FromDiscord<Elegantbeef> Yea it's not documented
07:08:10FromDiscord<ieltan> I see
07:08:50FromDiscord<Elegantbeef> If it's not in either of these it's has not been documented since 1.6.x↵https://nim-lang.github.io/Nim/manual.html↵https://nim-lang.github.io/Nim/manual_experimental.html
07:13:54FromDiscord<I have 50GB of nothing on my PC> how do I tell saem's vscod extension to not wrap my lines?
07:40:06*Notxor joined #nim
07:44:05*xet7 quit (Quit: Leaving)
07:45:45*cnx quit (Remote host closed the connection)
07:46:33*cnx joined #nim
09:11:39FromDiscord<Phil> That extension wraps your lines?
09:13:09FromDiscord<I have 50GB of nothing on my PC> the formatter does
09:13:19FromDiscord<I have 50GB of nothing on my PC> but im pretty sure the formatter is part of it
09:14:29FromDiscord<Phil> ... I have not once received such a thing, and I like formatting.↵Are you maybe just running nimpretty in the background?↵Or maybe nimsaem's extension is running nimpretty in the background, in which case you're out of luck, nimpretty doesn't provide many ways of configuration
09:14:35FromDiscord<pmunch> Oh fun\: `Error: expression 'drawcircle(canvas, 40, 40, 30, RED)' is of type 'void' and has to be used (or discarded)`
09:14:54FromDiscord<Phil> Ah yes, why void is not a good return type
09:19:02FromDiscord<ringabout> `void` type is buggy
09:20:36NimEventerNew thread by nimnam: Anonymous records / subtyping ?, see https://forum.nim-lang.org/t/9955
10:22:29FromDiscord<luteva> Hi! Is there a radix sorting algorithm in nim? I only saw a wrapper to the rax lib (which is wirtten in c).
10:22:37FromDiscord<luteva> (edit) "wirtten" => "written"
10:47:49FromDiscord<Hourglass [She/Her]> In Java, exceptions have a lot of overhead because of how they work, but Nim is a compiled language so do Nim exceptions have issues compared to just returning a `Result` type?
10:48:04FromDiscord<Hourglass [She/Her]> Also, is it better to use `Result`s for control flow handling?
10:56:06FromDiscord<Diogenes of Toronto> Coming from go where we don't have exceptions really I could not be happier without having them. I prefer to use option in nim. Whereever I can to get similar results.
10:58:32FromDiscord<Diogenes of Toronto> Or return a tuple with an error struct
11:07:12FromDiscord<Phil> In reply to @Hourglass, When the Hour Strikes "Also, is it better": In my personal opinion, having decent pattern matching syntax with Result-types (basically how Rust does it) is the way to go.↵But to me that is not quite the nim way because it doesn't express beautifully in nim's syntax.↵So I go with exceptions and use the `raises` pragma to ensure I know all the things my procs can raise.
11:08:48FromDiscord<Phil> Though I guess you could argue that you should not be capable to returning more than 3 different types of exceptions, which is a manageable amount and for that you could pre-define your necessary object-variant-result-types and that would make it workable again
11:09:14FromDiscord<Phil> Haven't tried that out yet
11:10:20FromDiscord<pmunch> Trying to wrap something without the declaration guards, I knew I had added them for a reason \:P
11:10:21FromDiscord<pmunch> Ah, it was actually because my Futhark wrapper had a `type void = distinct object`
11:13:43FromDiscord<Hourglass [She/Her]> In reply to @Isofruit "Though I guess you": Fair, may do that if I can ever get my system to work lol
11:17:47*xet7 joined #nim
11:18:51*azimut joined #nim
12:31:40FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#ix=4ptg
12:31:48FromDiscord<ezquerra> (edit) "https://play.nim-lang.org/#ix=4ptg" => "https://play.nim-lang.org/#ix=4pth"
12:34:37FromDiscord<jtv> You can use _ to discard stuff in nim
12:38:55FromDiscord<Phil> In reply to @ezquerra "Is there an equivalent": `_` is only discouraged to use for names in your generics (as of nim 2.0 that's a compiler error).↵To name unimportant values it is perfectly fine
12:41:03FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4ptj
12:46:26FromDiscord<ezquerra> Thanks a lot! I didn’t know that!
12:47:31FromDiscord<ezquerra> I’m converting some Python code to nim and it’s pretty amazing how little I need to change to get something working (performance is not super important for this particular case)
12:48:37FromDiscord<ezquerra> I mean, I’d still prefer to make the code efficient but I don’t need to squeeze every last drop of performance from it
12:49:04NimEventerNew Nimble package! ants - ANT: statically typed configurations for Nim (and others), see https://github.com/elcritch/ants
12:55:55*ltriant quit (Ping timeout: 252 seconds)
13:00:12*xet7 quit (Remote host closed the connection)
13:00:24FromDiscord<pmunch> @ezquerra\: would be interesting to see how a Python -\> Nim 1\:1 conversion actually does performance wise
13:07:23FromDiscord<Hourglass [She/Her]> I wonder what syntax from Python is completely invalid in Nim (and can't be implemented via macros)
13:07:52FromDiscord<Hourglass [She/Her]> 'Native Python' code would be funny lol
13:13:32*kenran joined #nim
13:17:59FromDiscord<ShalokShalom> In reply to @pmunch "<@974046326088163438>\: would be interesting": that could attract a lot of people
13:18:13FromDiscord<ShalokShalom> I doubt it would loose much
13:18:18FromDiscord<ShalokShalom> compare to native Nim
13:18:38FromDiscord<Nerve> In reply to @pmunch "<@974046326088163438>\: would be interesting": I've done that in a professional engineering context at work. Roughly 10x across the board.
13:19:13FromDiscord<Nerve> And I haven't lost much other than easy access to absolutely bloated general-purpose scientific libraries. I was able to extract the algorithms I needed and keep those particular functions lean.
13:19:53FromDiscord<Nerve> People don't realize just how much switching and configuration is happening for their particular scenario and data type when they call a function in SciPy.
13:23:03FromDiscord<federico3> +1 it does not have to be beautiful and expressive code as long as it's correct and allows developers to incrementally cleanup and rewrite the generate code↵(@ShalokShalom)
13:24:51FromDiscord<Rika> In reply to @Hourglass, When the Hour Strikes "I wonder what syntax": Decorators (as is) may be difficult
13:25:06FromDiscord<Rika> Naturally there’s pragmas as a replacement but yeah
13:28:03FromDiscord<Hourglass [She/Her]> And `eval`/`exec` code could probably be done via NimScript and a custom API
13:28:07FromDiscord<Hourglass [She/Her]> In reply to @Rika "Decorators (as is) may": Hm
13:29:23FromDiscord<Hourglass [She/Her]> In reply to @Rika "Decorators (as is) may": Hm
13:33:27FromDiscord<federico3> you don't to translate everything including eval
13:34:43FromDiscord<Hourglass [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4ptv
13:34:46FromDiscord<Hourglass [She/Her]> This works so shouldn't be much issue
13:35:01FromDiscord<Hourglass [She/Her]> In reply to @federico3 "you don't to translate": Yeah but would be cool for 'complete' parity
13:35:06FromDiscord<Hourglass [She/Her]> Wonder what would break though tbh
13:35:13FromDiscord<Hourglass [She/Her]> Probably async related stuff would be the most likely?
13:35:21FromDiscord<Hourglass [She/Her]> And the AST module probably
13:36:30FromDiscord<Phil> In reply to @Hourglass, When the Hour Strikes "I wonder what syntax": Nims version of list comprehensions is not as nice
13:36:47FromDiscord<Hourglass [She/Her]> Can always implement it via macros or something, right?
13:36:59FromDiscord<Hourglass [She/Her]> Since a lot would need to be parsed within a macro to be fair
13:37:00FromDiscord<Dudugz> sent a code paste, see https://play.nim-lang.org/#ix=4ptA
13:37:09FromDiscord<Dudugz> How would that work?
13:37:43FromDiscord<Phil> In reply to @Nerve "And I haven't lost": Not even that, you can still use those, it just turns the distribution of your program from being simple to requiring you to install python libs
13:37:53FromDiscord<Dudugz> python decorators allow you to replace a function or class entirely if you wish
13:38:12FromDiscord<Phil> (edit) "In reply to @Nerve "And I haven't lost": Not even that, you can still use those, it just turns the distribution of your program from being ... simple"here" added "a" | "asimple ... to" added ""here is the binary""
13:38:29FromDiscord<ShalokShalom> In reply to @federico3 "you don't to translate": you could always use Nimpy
13:38:36*ltriant joined #nim
13:38:36FromDiscord<federico3> A translation has to be practically useful. What matters is correctness and the ability to review the code and improve it. Being 100% compatible by generating code that is extremely complex/unreadable/slow is not very useful - you have to rewrite it anyways.
13:40:14FromDiscord<ShalokShalom> Ah, PMunch wrote 1:1 conversation
13:40:27FromDiscord<ShalokShalom> I understood idiomatic
13:40:46NimEventerNew thread by ringabout: My Nim Progress tracking everyday, see https://forum.nim-lang.org/t/9956
13:41:12FromDiscord<ShalokShalom> But Python -> readable Nim + Nimpy for the edge cases solves the practical performance problem of many Python projects
13:41:27FromDiscord<ShalokShalom> I would immediately know a couple of projects, I would like to translate
13:41:41FromDiscord<ShalokShalom> I can imagine, that the Synapse guys might be interested
13:42:19FromDiscord<Nerve> In reply to @Isofruit "Not even that, you": In my scenario where my program will be run on workstations and invoked on servers, this is impractical, partly for reasons @federico3 brought up. Having interop is nice when it can be compiled with your own code, i.e. C/C++/Obj-C. But having to pull in and entire other runtime and toolchain i.e. Python is a recipe for nightmares when it comes to distribution.
13:42:32FromDiscord<Nerve> (edit) "and" => "an"
13:43:18FromDiscord<Nerve> It's part of why I ditched Python. I got the thing working and realized distributing it was going to be a colossal headache versus a compiled binary. Nim was the obvious choice, because I also needed some speedup.
13:43:25FromDiscord<Nerve> The translation was surprisingly painless.
13:44:11FromDiscord<Nerve> (edit) "The translation was surprisingly painless. ... " added "Nim really is quite close to just being native-compiled Python."
13:44:35FromDiscord<Rika> In reply to @Hourglass, When the Hour Strikes "This works so shouldn't": It wouldn’t capture the function below it
13:47:00FromDiscord<ShalokShalom> In reply to @Nerve "It's part of why": do you know Conda?
13:47:24FromDiscord<ShalokShalom> Sorry, not Conda.
13:47:36FromDiscord<ShalokShalom> There is a 'make a binary' implementation for Python
13:47:44*ltriant quit (Ping timeout: 248 seconds)
13:48:47FromDiscord<Phil> I did google that for a stint, I gave up on that rather quickly when all of the things I read about it were "Not all that easy to get going"
13:49:02FromDiscord<Phil> (edit) "stint," => "stint before I landed on nim,"
13:52:00FromDiscord<ShalokShalom> https://github.com/exaloop/codon
13:52:05FromDiscord<ShalokShalom> Codon, Conda
13:52:18FromDiscord<ShalokShalom> Somebody should pay penalties for these names ✌🏻😅
13:53:30FromDiscord<Rika> codoff
13:54:09FromDiscord<Rika> It’s not completely compatible with CPython
13:54:19FromDiscord<Rika> It’s essentially another python implementation so
13:55:17FromDiscord<Phil> ~~And in the end I want static typing because ducktyping isn't nice, to deal with~~
13:55:18FromDiscord<Nerve> In reply to @ShalokShalom "do you know Conda?": I tried both Nuitka and pyinstaller. Both left a lot to be desired. I was surprised that Nuitka pretty much "just worked" but the binaries were huge and I saw speed regressions across the board from already slow-ish raw Python.
13:55:42FromDiscord<Phil> ... How is acompiled binary slower than interpreted python?
13:55:58FromDiscord<Phil> Wonders of technology
13:56:05FromDiscord<Rika> In reply to @Isofruit "... How is a**compiled**": What he said were packagers
13:56:07FromDiscord<Rika> Not compilers
13:56:18FromDiscord<Rika> So it is still CPython, packaged into a binary
13:56:27FromDiscord<ShalokShalom> In reply to @Nerve "I tried both Nuitka": i meant codon
13:56:38FromDiscord<ShalokShalom> I have not worked with anything of that
13:57:13FromDiscord<Phil> In reply to @Rika "So it is still": So basically it's still interpreted in a sense, but now in a binary?
13:57:19FromDiscord<frobnicate> How do I know if I'm getting `&lt;` or `<`?
13:57:24FromDiscord<ShalokShalom> In reply to @Rika "What he said were": I think Nuika is both? https://github.com/Nuitka/Nuitka
13:57:27FromDiscord<Phil> I'm struggling to wrap my head around how that all works
13:57:37FromDiscord<Phil> (edit) "works" => "is supposed to work"
13:57:41FromDiscord<Phil> Oh well, either way not my beer.
13:57:43FromDiscord<ShalokShalom> In reply to @Isofruit "So basically it's still": Yes. They usually ship the runtime with it
13:58:00FromDiscord<ShalokShalom> I mean, there is a JS to Cpp compiler, that does it quite similar
13:58:09FromDiscord<ShalokShalom> dotnet ships the entire runtime in their wasm
13:58:09FromDiscord<Rika> In reply to @frobnicate "How do I know": What do you mean
13:58:15FromDiscord<ShalokShalom> that's not really a new thing
13:58:25FromDiscord<ShalokShalom> Graal does ship native images, who are JIT
13:59:25FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4ptI
13:59:35FromDiscord<ShalokShalom> Ruby 1.8 was the last popular 'interpreted' language
13:59:52FromDiscord<Phil> In reply to @ShalokShalom "And nothing of that": Them is fighting words that half the internet would disagree with you on
13:59:58FromDiscord<Nerve> In reply to @ShalokShalom "i meant codon": Codon seemed too early for me to use, and wouldn't be able to compile some of the SciPy stuff I was making use of. The translation work to get the most out of Codon was probably close to the Nim translation already. And I've gained some very big architectural benefits from Nim's static typing.
14:00:40FromDiscord<ShalokShalom> I would love such a Nim conversation
14:00:54FromDiscord<ShalokShalom> I actually see a lot of benefits for the Nim community
14:01:31FromDiscord<ShalokShalom> And I wasn't meaning to drift you away from Nim, more interested in how the different tools work comparatively 🙂
14:01:41FromDiscord<Rika> The “meaning” of interpreted to most people no longer agrees with the “real meaning” nowadays so
14:02:02FromDiscord<Nerve> In reply to @ShalokShalom "And nothing of that": Python may compile to bytecode but that bytecode is still interpreted
14:02:27FromDiscord<ShalokShalom> In reply to @Isofruit "Them is fighting words": Interpreted languages existed. Then VM languages came along. Implementing an interpreter is still someone else as transpiling a language into an intermediate language and then running it.
14:02:45FromDiscord<Rika> To most people, even if they don’t admit it, interpreted means you commonly run an extra “programming language binary” to then run the source code, regardless of what really happens behind the scenes
14:02:47FromDiscord<ShalokShalom> In reply to @Rika "The “meaning” of interpreted": Yeah, absolutely
14:06:10FromDiscord<ShalokShalom> In reply to @Nerve "Python may compile to": Yeah. I was more saying, the old meaning of the world is not really representative of what is going on, actually.↵↵Particularly since 'interpreted' is often used in a demeaning sense, imho
14:06:33*Notxor quit (Remote host closed the connection)
14:06:36FromDiscord<ShalokShalom> I read this mostly in communities of statically compiled languages
14:07:04FromDiscord<ShalokShalom> (edit) "world" => "word"
14:07:25FromDiscord<enthus1ast> my cpu interprets my c bytecode
14:07:32FromDiscord<ShalokShalom> (edit) "on, actually.↵↵Particularly" => "on ↵↵Particularly"
14:07:44FromDiscord<ShalokShalom> Yeah. I mean Java also translates to machine code
14:08:00FromDiscord<ShalokShalom> And Java is far more 'low level' interpreted than Python
14:08:16FromDiscord<ShalokShalom> Comparing Python and Java still shows vast differences.
14:08:34FromDiscord<ShalokShalom> The world is not so small, that we can put all languages into one of two boxes. 🙂
14:09:16FromDiscord<enthus1ast> in the end it does not really matter, it mostly boils down to\: Good enough + i can work with it
14:16:26FromDiscord<Phil> I can't say I've read a lot of negative subconnotation behind the word "interpreted", then again I'm not active in C/C++ communities
14:18:50FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4ptN
14:19:45FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "python decorators allow you": Macros
14:19:56FromDiscord<Hourglass [She/Her]> Decorators are basically just macros when you think about it
14:20:17FromDiscord<Dudugz> Yes they are, but is Nim's macros powerful enough for this?
14:20:23FromDiscord<Hourglass [She/Her]> In reply to @ShalokShalom "you could always use": Point here is 'native Python' lol, would be interesting
14:20:32FromDiscord<Dudugz> The closest we have to decorators are pragmas
14:22:09FromDiscord<Hourglass [She/Her]> In reply to @Rika "It wouldn’t capture the": Could likely just check for the function below it? You'd have to read a string of python code, parse it and stuff then create a Nim AST from that probably
14:23:12FromDiscord<Hourglass [She/Her]> In reply to @ShalokShalom "https://github.com/exaloop/codon": Interesting
14:26:01FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "Yes they are, but": Probably not with just implementing an `@` macro, you'd probably have to make a lexer and parser for Python in Nim and generate an AST from that
14:27:13FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "The closest we have": Pragmas just use macros (or templates I believe?) which manipulate the AST so, I'd imagine just making decorators pass themselves to nim procs with pragmas)
14:29:25FromDiscord<Hourglass [She/Her]> Wonder what benefits you could even get with that besides speed benefits and the ability to distribute a binary
14:32:45FromDiscord<Rika> In reply to @Hourglass, When the Hour Strikes "Could likely just check": yes, but then that's just a transpiler
14:38:12*jmdaemon quit (Ping timeout: 252 seconds)
14:52:29*jmcantrell quit (Ping timeout: 256 seconds)
14:52:46*alice quit (Read error: Connection reset by peer)
14:54:11*alice joined #nim
14:59:21FromDiscord<Hourglass [She/Her]> You're not converting it to source code directly though, are you?
14:59:31FromDiscord<Hourglass [She/Her]> Well
14:59:40FromDiscord<Hourglass [She/Her]> Maybe this counts as a transpiler actually yeah
14:59:46FromDiscord<Hourglass [She/Her]> Similar high-level stuff
15:06:39FromDiscord<Hourglass [She/Her]> I don't think all of Python syntax is doable in Nim macros rip
15:06:59FromDiscord<Hourglass [She/Her]> Unless there's a parser for Python code and then we spit out Nim AST
15:07:13FromDiscord<Hourglass [She/Her]> Mainly because of the `@` symbol
15:29:23FromDiscord<jtv> I mean, you can do all kinds of dynamic stuff in Python that would take a lot of library work to support in Nim, even simple stuff like putting items of different kinds in a list. The "Any" type isn't really good enough for that. You'd have to carry around full run time type info
15:36:20FromDiscord<Nerve> I found that when converting from Python, if you're doing a lot of heterogenous data structure shenanigans (using dicts as records/structs/objects), the JsonNode type in Nim acts as a really good gradual typing tool for getting immediate compatibility so your stuff can run, and you can coalesce static types later.
15:37:09FromDiscord<frobnicate> In reply to @Rika "What do you mean": Sorry for late reply. Am parsing XML and sometimes it's an "<" and other times it's "&lt;", same with "&amp;". It seems to get converted to the char when I read it
15:37:41FromDiscord<Nerve> (edit) "I found that when converting from Python, if you're doing a lot of heterogenous data structure shenanigans (using dicts as records/structs/objects), the JsonNode type in Nim acts as a really good gradual typing tool for getting immediate compatibility so your stuff can run, and you can coalesce static types later. ... " added "This of course incurs the runtime risk of dereferencing keys improperly or which aren't there."
15:37:59FromDiscord<Rika> in what circumstances is it < or &lt;
15:38:05FromDiscord<Nerve> (edit) "aren't there." => "are absent."
15:45:49*jmcantrell joined #nim
15:48:45FromDiscord<Hourglass [She/Her]> In reply to @jtv "I mean, you can": Custom `PyObject`s could probably fit
15:58:01*Notxor joined #nim
16:01:41*azimut quit (Ping timeout: 255 seconds)
16:02:17*azimut joined #nim
16:08:47FromDiscord<frobnicate> sent a code paste, see https://play.nim-lang.org/#ix=4pun
16:10:08FromDiscord<frobnicate> Or xmlparse. Whichever one is the manual one
16:14:23NimEventerNew post on r/nim by nimuru_: Thoughts on compiling to Zig?, see https://reddit.com/r/nim/comments/11eckfp/thoughts_on_compiling_to_zig/
16:18:45*arkurious joined #nim
16:30:07*Zevv_ joined #nim
16:30:36*def-- joined #nim
16:30:37*ltriant joined #nim
16:35:32*ltriant quit (Ping timeout: 252 seconds)
16:36:25*nyeaa49284230 quit (*.net *.split)
16:36:25*cornfeedhobo quit (*.net *.split)
16:36:26*attah quit (*.net *.split)
16:36:26*madprops quit (*.net *.split)
16:36:26*Ekho quit (*.net *.split)
16:36:26*Zevv quit (*.net *.split)
16:36:26*def- quit (*.net *.split)
16:36:26*krydos quit (*.net *.split)
16:36:26*def-- is now known as def-
16:37:36*nyeaa49284230 joined #nim
16:37:36*cornfeedhobo joined #nim
16:37:36*Ekho joined #nim
16:37:36*attah joined #nim
16:37:36*madprops joined #nim
16:37:36*krydos joined #nim
16:51:31FromDiscord<Hourglass [She/Her]> Still have no idea to how I'm supposed to pass anything to due with async networking to the shared library's proc rip
16:51:58FromDiscord<Hourglass [She/Her]> Maybe an object 'proxy' or something? But that's not exactly ideal
17:04:44Amun-Ra"Thoughts on compiling to Zig?" ← deleted
17:16:38*kenran quit (Remote host closed the connection)
17:32:54*Notxor quit (Remote host closed the connection)
17:35:18FromDiscord<Dudugz> &lt is a representation of the character ``<``
17:36:31FromDiscord<Dudugz> I think you won't know after using the parser, as &lt will be converted to ``<`` after the xml is parsed
17:36:49FromDiscord<Dudugz> it's like a placeholder
17:37:05*jmdaemon joined #nim
17:37:31FromDiscord<Dudugz> In reply to @Hourglass, When the Hour Strikes "Still have no idea": Couldn't you have used a separate server and made the plugin connect to it to exchange data?
17:50:51*rockcavera joined #nim
18:00:56FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "Couldn't you have used": So another socket but between the plugin and the main app?
18:01:33FromDiscord<Hourglass [She/Her]> When I already have to handle multiple connections to different clients? And the plugin is supposed to be processing the packets and stuff?
18:01:58FromDiscord<Hourglass [She/Her]> That just sounds like a recipe for code with horrible speed in the future and hard to change design
18:02:17FromDiscord<Hourglass [She/Her]> Plugins are supposed to be just that, plug-in
18:08:06FromDiscord<Dudugz> yea
18:08:29FromDiscord<enthus1ast> have you tried to pass async sockets to a plugin?
18:08:31FromDiscord<Dudugz> local net doesn't have that issue with speed if well done
18:11:54FromDiscord<Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4pv3
18:14:04FromDiscord<etra> In reply to @Hourglass, When the Hour Strikes "Still have no idea": just ooc is that code open source?
18:17:40FromDiscord<Hourglass [She/Her]> In reply to @etra "just ooc is that": Yep it is https://github.com/Nimberite-Development/Nimberite
18:18:03FromDiscord<enthus1ast> i know i've done it once
18:18:08FromDiscord<Hourglass [She/Her]> In reply to @enthus1ast "have you tried to": Yeah, i get a segfault saying I'm accessing a null value even though `socket == nil` is false
18:18:16FromDiscord<enthus1ast> i've also build a plugin system
18:18:23FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "local net doesn't have": It'd still introduce latency though?
18:18:32FromDiscord<Hourglass [She/Her]> In reply to @enthus1ast "i've also build a": I'm using shared libraries for Nim code specifically
18:18:41FromDiscord<enthus1ast> yes
18:18:57FromDiscord<Hourglass [She/Her]> Oh? You've done the same?
18:19:16FromDiscord<Hourglass [She/Her]> The actual plugin loading code is a non-issue, it's trying to pass certain objects rip
18:19:20FromDiscord<Hourglass [She/Her]> AsyncSockets are an example
18:19:35FromDiscord<enthus1ast> mh i don't kno for witch project i did it
18:19:37FromDiscord<enthus1ast> w
18:19:46FromDiscord<Hourglass [She/Her]> Passing `AsyncFD`s also segfault when I use those to read and write data or read from it directly
18:21:33FromDiscord<Hourglass [She/Her]> I think it's just an issue with how shared libraries works tbh
18:21:39FromDiscord<Hourglass [She/Her]> (edit) "works" => "work"
18:27:43*ltriant joined #nim
18:30:32FromDiscord<Hourglass [She/Her]> Ugh this is... Annoying as hell
18:31:08FromDiscord<Hourglass [She/Her]> I could probably have something for storing values within the core and then have procs to run actions in the core, but then that's just tedious and horribly annoying
18:32:55*ltriant quit (Ping timeout: 256 seconds)
18:35:03FromDiscord<djazz> Trying to call a C macro on the generated nim code, but emit adds newlines...↵This is the wanted codegen output: `bi_decl(bi_2pins_with_func(PICO_DEFAULT_I2C_SDA_PIN, PICO_DEFAULT_I2C_SCL_PIN, ((enum gpio_function) 3)));`↵I have tried this, but it crashes the nim compiler (SIGSEGV), guessing because it cant convert body to string?↵`template bi_decl(body: untyped) = {.emit: ["bi_decl(", body, ");"].}`
18:35:25FromDiscord<djazz> the C macro https://github.com/raspberrypi/pico-sdk/blob/426e46126b5a1efaea4544cdb71ab81b61983034/src/common/pico_binary_info/include/pico/binary_info/code.h#L31-L35
18:37:41FromDiscord<djazz> atleast I think thats why it fails
18:37:52FromDiscord<djazz> (due to the newlines)
18:43:57*dv^_^ joined #nim
18:45:45FromDiscord<djazz> yep seems to be the newlines... https://github.com/raspberrypi/pico-sdk/issues/867
18:52:39*Notxor joined #nim
18:52:50FromDiscord<djazz> sent a code paste, see https://play.nim-lang.org/#ix=4pve
18:53:27FromDiscord<djazz> i tried this with a void type for BiDecl, same result↵`proc bi_decl(decl: BiDecl) {.importc: "bi_decl", inline.}`
18:55:23*junaid_ joined #nim
19:10:41FromDiscord<djazz> uh, nvm, it still used the template, forgot to comment it out
19:12:47FromDiscord<djazz> and codegenDecl doesnt seem to work together with importc, it does nothing?
19:17:06FromDiscord<arkaroo> ah, darn, as usual explaining it makes it obvious. should be\:↵ """↵ sql.exec(sqlString, arg)
19:17:16FromDiscord<arkaroo> good rubber duck session everyone 🦆
19:19:04FromDiscord<Phil> Happy to quack
19:19:16FromDiscord<djazz> ugh, might aswell convert the c macro stuff to nim
19:40:14FromDiscord<Hourglass [She/Her]> Ugh I'm in pain lmao
19:42:23FromDiscord<Hourglass [She/Her]> I could probably provide a way to call the procs within the core to get the data from my shared library's
19:42:27FromDiscord<Hourglass [She/Her]> Library
19:42:42FromDiscord<Hourglass [She/Her]> But also that's annoying and tedious, I shouldn't have to do this
19:47:28FromDiscord<etra> have you hooked a debugger just in case to check?
19:49:08FromDiscord<Hourglass [She/Her]> I... Haven't actually, idk how they work but I can try now
19:55:01FromDiscord<etra> also since you're dynamically loading shared libraries, how would the garbage collector know the boundaries? when to free stuff? that sounds like a hazard into itself
19:56:08FromDiscord<Hourglass [She/Her]> I'm using `arc` here for the memory management, most of what I'm using has been working fine before AsyncSocket was introduced
19:58:10FromDiscord<etra> I think if you have to deal with anything that's not POD you'll have issues in the boundary
19:59:05FromDiscord<etra> I can imagine some sort of message system or callback design, I don't think there's any ABI that good to pass more complex data when using shared libs but I could be wrong
20:01:17FromDiscord<Hourglass [She/Her]> I think the issue is with the allocator as you said
20:01:23FromDiscord<Hourglass [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4pvA
20:10:44FromDiscord<etra> I guess the other option is to heap allocate manually? but I'm not sure you can do that with stuff like AsyncFD?
20:11:17FromDiscord<etra> (edit) "the other" => "another"
20:11:27FromDiscord<Hourglass [She/Her]> In reply to @etra "I guess another option": I'm not even sure how to do that either aha
20:11:40FromDiscord<Hourglass [She/Her]> Ig using a proxy or something is my only option
20:12:26FromDiscord<Hourglass [She/Her]> I wish there was a better way to do this though...
20:12:50FromDiscord<enthus1ast> @Hourglass [She/Her]\: I got it working \:)
20:12:56FromDiscord<enthus1ast> but it requires devel
20:12:59FromDiscord<Hourglass [She/Her]> Oh?
20:13:08FromDiscord<Hourglass [She/Her]> What changes do devel make to make it work?
20:14:43FromDiscord<enthus1ast> i'll clean up and test a little then i share
20:16:15FromDiscord<Hourglass [She/Her]> Alright ^^
20:16:29FromDiscord<Hourglass [She/Her]> I am now on Matrix haha
20:17:03FromDiscord<enthus1ast> so this seems to work\: https://play.nim-lang.org/#ix=4pvB
20:17:10FromDiscord<enthus1ast> i register the global dispatcher in the dll
20:17:15FromDiscord<enthus1ast> but it was not working with 1.6.10
20:20:07FromDiscord<enthus1ast> is this for your minecraft server?
20:22:18FromDiscord<enthus1ast> i also found my thread in the forum back then \:D
20:22:18FromDiscord<enthus1ast> https://forum.nim-lang.org/t/3382
20:22:19FromDiscord<enthus1ast> basically the same error
20:25:38*junaid_ quit (Remote host closed the connection)
20:27:18FromDiscord<ranok (Jacob Torrey)> Any tips for accessing an object's fields in a macro?
20:27:30FromDiscord<ranok (Jacob Torrey)> https://forum.nim-lang.org/t/3928 looks like it would be useful but it's spinning forever
20:29:41FromDiscord<enthus1ast> Hourglass [She/Her]\: @Hourglass [She/Her] i also found one of my module systems
20:29:43FromDiscord<enthus1ast> (than i can share)
20:29:43FromDiscord<enthus1ast> mhh, the public code is quite to old, the code went proprietary
20:30:28FromDiscord<enthus1ast> https://github.com/enthus1ast/nimPepper/tree/master/src/nimPepper/modules
20:36:14FromDiscord<Hourglass [She/Her]> In reply to @enthus1ast "Hourglass [She/Her]\: <@909883978717204561> ": Oh cool!
20:37:25FromDiscord<Hourglass [She/Her]> In reply to @enthus1ast "i register the global": Issue is, I'll likely have different connections handled from different shared libraries, I doubt this would work well in that situation aha
20:37:39FromDiscord<Hourglass [She/Her]> In reply to @enthus1ast "is this for your": Yep!
20:39:26FromDiscord<Hourglass [She/Her]> @enthus1ast
20:39:53FromDiscord<Hourglass [She/Her]> Huh that's annoying, discord fills pings in even if i dont select ne
20:42:40FromDiscord<enthus1ast> i honestly don't know↵(@Hourglass [She/Her])
20:43:16FromDiscord<Hourglass [She/Her]> Fair
20:43:35FromDiscord<Hourglass [She/Her]> I'll try it, but hopefully it'll be fine
20:44:43FromDiscord<enthus1ast> maybe, a sync server could be better
20:44:44FromDiscord<enthus1ast> then you could spawn a thread for each client
20:44:44FromDiscord<enthus1ast> i think you do some heavy lifting later
20:44:45FromDiscord<enthus1ast> but idk whats better
20:47:49FromDiscord<Hourglass [She/Her]> In reply to @enthus1ast "then you could spawn": Wouldn't a thread per client not work for if the server has more clients than (threads available on device)?
20:49:19FromDiscord<Hourglass [She/Her]> Oh wow that worked
20:49:29FromDiscord<Hourglass [She/Her]> Thanks enthus1ast!
20:50:43FromDiscord<Hourglass [She/Her]> Now I get a different error but at least it's my custom error xD
20:58:24FromDiscord<Hourglass [She/Her]> Seems like my code does not like `isClosed` hm
20:59:33FromDiscord<Hourglass [She/Her]> `isClosed` (from `AsyncSocket`) returns false even though trying to read more crashes the server
21:00:53FromDiscord<enthus1ast> is it a catchable error?
21:01:57FromDiscord<Hourglass [She/Her]> It's my own custom error, it's catchable yeah but I can't read any more from the stream for some odd reason
21:02:05FromDiscord<Hourglass [She/Her]> First packet seems to be read just fine but
21:02:15FromDiscord<enthus1ast> from the dll?
21:02:55FromDiscord<Hourglass [She/Her]> Yep
21:04:32FromDiscord<Hourglass [She/Her]> First packet - Main app, read fine↵Second packet - From plugin, read fine, write presumed fine since the future completes?↵Third packet - Never gets sent from the client despite socket not closing?
21:17:24FromDiscord<Dudugz> I still think you should use ``buffered=false`` at least on my server there was no packet loss, when this option was active I couldn't receive/send anything.↵↵Also do you have ``inheritable=true``? https://media.discordapp.net/attachments/371759389889003532/1080237305949847572/Screenshots_2023-02-28-17-17-09.png
21:18:54FromDiscord<Hourglass [She/Her]> Not sure how to set inheritable to be true
21:19:19FromDiscord<Dudugz> ``let socket = newAsyncSocket(inheritable=true)``
21:19:23FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "I still think you": Ig i can try turning the buffer off but idk what difference it'll make aha
21:19:56FromDiscord<Hourglass [She/Her]> In reply to @Dudugz "``let socket = newAsyncSocket(inheritable=true)``": I'm getting the connection from `await srv.socket.accept()` tho
21:20:17FromDiscord<Hourglass [She/Her]> Wait
21:20:19FromDiscord<Hourglass [She/Her]> Im stupid
21:20:20FromDiscord<Hourglass [She/Her]> Sorry
21:20:21FromDiscord<Dudugz> Your sending the client conn to the plugin?
21:20:23FromDiscord<Dudugz> lol
21:20:53FromDiscord<Hourglass [She/Her]> I'm so dumb at times :p
21:22:03FromDiscord<Dudugz> https://media.discordapp.net/attachments/371759389889003532/1080238479193157672/Screenshots_2023-02-28-17-21-53.png
21:22:13FromDiscord<Dudugz> That's fine, i'm also dumb sometimes
21:22:16FromDiscord<Hourglass [She/Her]> The buffer being false completely kills the code
21:22:26FromDiscord<Dudugz> Oh, so that's a no no for you
21:22:40FromDiscord<Hourglass [She/Her]> Wait
21:22:46FromDiscord<Hourglass [She/Her]> is that inheritable killing it?
21:23:04FromDiscord<Dudugz> Idk lol
21:23:11FromDiscord<Dudugz> Maybe it is, test one and then other
21:23:16FromDiscord<Dudugz> Try just buffered=false
21:23:17FromDiscord<Hourglass [She/Her]> Wait both do
21:23:24FromDiscord<Dudugz> Bruh
21:23:45FromDiscord<Hourglass [She/Her]> uh wait no
21:23:48FromDiscord<Dudugz> I like Nim but I don't like that the errors are not very clear
21:23:56FromDiscord<Hourglass [She/Her]> Now the code just dies no matter what??
21:24:02FromDiscord<Dudugz> Wtf lol
21:24:06FromDiscord<Dudugz> Some issue with the code then
21:24:25FromDiscord<Dudugz> What's the error?
21:24:38FromDiscord<Hourglass [She/Her]> It just does nothing
21:24:41FromDiscord<Hourglass [She/Her]> I am so confused
21:24:58FromDiscord<Hourglass [She/Her]> Maybe it's my client
21:25:03FromDiscord<Dudugz> Maybe
21:25:05FromDiscord<Hourglass [She/Her]> Wait
21:25:08FromDiscord<Hourglass [She/Her]> god damn it
21:25:13FromDiscord<Hourglass [She/Her]> I am such an idiot
21:25:16FromDiscord<Dudugz> lol
21:25:21FromDiscord<Hourglass [She/Her]> Before I tried using a proxy
21:25:26FromDiscord<Hourglass [She/Her]> So I had to change the port
21:25:30FromDiscord<Dudugz> Ah... lol
21:25:39FromDiscord<Hourglass [She/Her]> and i forgot to change it back 🤦‍♀️
21:25:49FromDiscord<Dudugz> Makes sense lol, diff ports would never work
21:27:50FromDiscord<Iliketwertles> im confused on how to use this https://nim-lang.org/docs/posix.html#Utsname
21:28:11FromDiscord<Iliketwertles> moreso this tho https://nim-lang.org/docs/posix.html#uname%2CUtsname
21:28:23FromDiscord<Iliketwertles> im trying to get kernel verison
21:29:11FromDiscord<Iliketwertles> i dont know what its asking for `a1: var Utsname`
21:30:44FromDiscord<Hourglass [She/Her]> Okay so turning the buffer off gives an indexdefect
21:31:06FromDiscord<Dudugz> Hmm
21:31:15FromDiscord<Hourglass [She/Her]> https://www.toptal.com/developers/hastebin
21:32:14FromDiscord<jtv> sent a code paste, see https://play.nim-lang.org/#ix=4pw4
21:33:12FromDiscord<Iliketwertles> ok so what i was trying was way off lol
21:37:01FromDiscord<Hourglass [She/Her]> Wait I just realised it seems like my json data isn't getting sent?
21:38:43FromDiscord<Hourglass [She/Her]> This is so odd?
21:45:46FromDiscord<Hourglass [She/Her]> Yeah this isn't something I know the cause of...
21:46:06FromDiscord<Hourglass [She/Her]> `await socket.send` does not send anything, with the buffer on and off
21:46:31FromDiscord<Hourglass [She/Her]> (edit) "and" => "or"
21:47:12FromDiscord<Hourglass [She/Her]> Yep, I'm lost, no idea why this isn't working
21:48:10FromDiscord<Iliketwertles> with if
21:48:10FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4pww
21:48:54FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4pwx
21:48:56FromDiscord<Iliketwertles> but its not working
21:49:11FromDiscord<Iliketwertles> (edit) "https://play.nim-lang.org/#ix=4pwx" => "https://play.nim-lang.org/#ix=4pwz"
21:49:23FromDiscord<Iliketwertles> but if i make it single quotes it wont compile
21:58:31FromDiscord<jtv> Sure,
21:58:52FromDiscord<jtv> sent a code paste, see https://play.nim-lang.org/#ix=4pwC
22:00:16*ltriant joined #nim
22:00:18FromDiscord<jtv> stdlib just returns 255 byte arrays that are null-initialized; so in C it's basically a C string already, you just need to tell nim that, then $() will turn it into a proper string
22:01:06FromDiscord<Jessa> for whatever reason, `client.getContent(url)` is painfully slow↵↵to a webserver hosted on the same device, it takes 2 seconds to fetch the result
22:01:10FromDiscord<Jessa> what is going on?
22:08:59*advesperacit quit ()
22:10:11FromDiscord<Jessa> sent a code paste, see https://play.nim-lang.org/#ix=4pwE
22:13:59FromDiscord<Elegantbeef> You are also benchmarking parsing
22:15:40FromDiscord<Jessa> Yes, but that should not take 2 seconds-↵it's like 15 lines of json to parse
22:20:48FromDiscord<Hourglass [She/Her]> Oh Beef, hello
22:21:15FromDiscord<Hourglass [She/Her]> Earlier the feasibility of making macros to allow for Python syntax to work nearly complete in Nim, thoughts?
22:21:37FromDiscord<Hourglass [She/Her]> (Then I went off on a tangent about an actual python parser and generating an AST from that but that's irrelevant)
22:21:43FromDiscord<Hourglass [She/Her]> In reply to @Hourglass, When the Hour Strikes "Earlier the feasibility of": Was discussed
22:22:22FromDiscord<Elegantbeef> yardanico has a library that does aid that
22:22:23FromDiscord<Elegantbeef> But just write Nim
22:23:16FromDiscord<Elegantbeef> https://github.com/Yardanico/nimpylib#usage
22:29:39FromDiscord<Hourglass [She/Her]> We were talking about 1:1 Python code compiling in Nim
22:30:09FromDiscord<Hourglass [She/Her]> In reply to @Elegantbeef "But just write Nim": It was mainly talked about because people would be interested in speed benefits of 1:1 ports and how it could attract newcomers (probably for gradual migration)
22:30:48FromDiscord<Elegantbeef> But you can just get performance using a different runtime
22:30:48FromDiscord<Elegantbeef> Make a python compiler
22:39:59FromDiscord<Jessa> ...why do i need to wait for an async proc to be called-??↵like, isn't the entire pointi of async, to not have to wait?
22:40:41FromDiscord<Jessa> sent a code paste, see https://paste.rs/5xI
22:42:46FromDiscord<huantian> no the point of async is to wait intelligently
22:43:20FromDiscord<Jessa> ugh
22:44:20FromDiscord<Yepoleb> there's a big pile of failed python compiler projects \:D
22:44:58FromDiscord<Dudugz> ``asyncCheck getParam()``
22:45:17FromDiscord<Dudugz> would work but the process would exit before finishing processing
22:45:29FromDiscord<Elegantbeef> The entire point of async is to give up your cpu at specific points to do other operations
22:45:36FromDiscord<Dudugz> Yea
22:46:26FromDiscord<Dudugz> I use async for network operations too as they can be time consuming, for example requesting the content of a web page
22:46:53FromDiscord<Dudugz> If you need to wait for the page to respond with the information and then use that information you need async await
22:47:05FromDiscord<Jessa> In reply to @Dudugz "would work but the": so if i use this when it doesn't matter if it exits or not
22:47:11FromDiscord<Jessa> it'd be fine
22:47:41FromDiscord<huantian> generally, you should use `waitFor` when calling async code from non async code, kinda like an "entrypoint"
22:47:57FromDiscord<huantian> use `await` for calling async code inside other async code
22:48:17FromDiscord<Elegantbeef> Depending on the behaviour you're after of course 😄
22:48:22FromDiscord<huantian> yeah
22:48:30FromDiscord<Dudugz> sent a code paste, see https://paste.rs/ddM
22:48:57FromDiscord<Jessa> i just want to call a line, and not have to wait for it
22:49:06FromDiscord<huantian> sent a code paste, see https://paste.rs/TnT
22:49:23FromDiscord<Dudugz> In reply to @huantian "I don't think that": Oh actually it would have to be await instead of asyncCheck
22:49:25FromDiscord<Jessa> idc if the process exits before it actually does something, just need to not wait for it
22:49:28FromDiscord<huantian> yeah
22:49:54FromDiscord<Hourglass [She/Her]> In reply to @Elegantbeef "But you can just": Obviously but that wasn't the main point here lol
22:49:54FromDiscord<Dudugz> Then do a synchronous function...
22:50:09FromDiscord<Jessa> In reply to @Dudugz "Then do a synchronous": that's the problem, i still need to call `waiitfor`?!?!!
22:50:40FromDiscord<Dudugz> For a synchronous function you don't need it, it would just ``discard getParam()``
22:50:52FromDiscord<Jessa> but-
22:50:53FromDiscord<Jessa> then it blocks
22:51:03FromDiscord<Jessa> cus waiting for it
22:51:07FromDiscord<huantian> Can you describe the exact behavior you want
22:51:09FromDiscord<Dudugz> Something has to hold your program's thread, it won't magically run if it doesn't have something saying "hey wait, before you exit do this"
22:51:31FromDiscord<Jessa> omfg
22:51:37FromDiscord<Elegantbeef> People that write python want to write python, so I do not see how they'd migrate
22:51:45FromDiscord<Dudugz> That's how all programs work lol
22:51:57FromDiscord<huantian> I think we're just misunderstanding what you want
22:51:57FromDiscord<Elegantbeef> You're just after writing a new python backend
22:51:57FromDiscord<Elegantbeef> There is no benefit in doing that for adoption
22:52:14FromDiscord<Jessa> i'm running a bigger program, and in the middle of it, i want to run a line, like a post request, then have it not block, and just continiue
22:52:27FromDiscord<Hourglass [She/Her]> People who want to use Nim and gradually move their codebases over would be one ig? But I'm not actually interested in it myself so idk why I'm trying to sell the idea to you lmao
22:52:28FromDiscord<Dudugz> So just asyncCheck?
22:52:35FromDiscord<Elegantbeef> If python programmers cared about performance they wouldnt write python, they'd write julia or another alternative
22:52:43FromDiscord<Jessa> In reply to @Dudugz "So just asyncCheck?": No, because asyncCheck gets blatantly ignored
22:52:54FromDiscord<Jessa> The request does not go through
22:53:15FromDiscord<huantian> if you asyncCheck, you have to be polling the event loop sometime during your program
22:53:15FromDiscord<Dudugz> In reply to @Jessa "i'm running a bigger": asyncCheck will run an asynchronous operation without blocking the program
22:53:22FromDiscord<Elegantbeef> Nimpy exists, so they can just use python
22:53:24FromDiscord<Hourglass [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4pwT
22:53:27FromDiscord<Dudugz> In reply to @Jessa "The request does not": Hmm
22:53:30FromDiscord<Jessa> In reply to @Hourglass, When the Hour Strikes "That's because you program": ...in the bigger program
22:53:31FromDiscord<Hourglass [She/Her]> In reply to @Elegantbeef "Nimpy exists, so they": Fair enough
22:53:36FromDiscord<Hourglass [She/Her]> In reply to @Jessa "...in the bigger program": Ah
22:53:52FromDiscord<huantian> in your bigger program, you'd want to call `poll` every so often to give tiem for the async loop to run
22:53:52FromDiscord<Hourglass [She/Her]> Not sure then
22:54:10FromDiscord<Jessa> so it'll block anyway? xD
22:56:09FromDiscord<Elegantbeef> I mean async is cpu sharing
22:56:30FromDiscord<Elegantbeef> You need to have a place to give up your cpu
22:56:49FromDiscord<Elegantbeef> If you want to have a non main thread blocking operation, you'd use threading
22:56:56FromDiscord<Dudugz> If you wanted to make the program make a request and then consume the information your entire handler would have to be asynchronous and called by asyncCheck
22:57:13FromDiscord<Dudugz> E.g a proc that makes the request and consumes the information as soon as it is ready
22:57:19FromDiscord<Elegantbeef> Use a channel to send the message to a secondary thread that then uses async to send the mesage
22:57:22FromDiscord<Jessa> welp
22:57:28FromDiscord<Jessa> In reply to @Dudugz "If you wanted to": guess i'm rewriting
22:58:18FromDiscord<Dudugz> You can also work with event emitters + async if you want but yeah... For this kind of thing it doesn't make sense
22:58:28FromDiscord<huantian> In reply to @Elegantbeef "Use a channel to": yeah having a separate download thread might be a good solution
23:02:21FromDiscord<Iliketwertles> sent a code paste, see https://play.nim-lang.org/#ix=4pwW
23:06:45*oprypin quit (Quit: Bye)
23:06:56*oprypin joined #nim
23:20:41FromDiscord<Hourglass [She/Her]> In reply to @Hourglass, When the Hour Strikes "Yep, I'm lost, no": Oh yeah I can't actually test anything now but anyone know why?
23:20:49FromDiscord<Hourglass [She/Her]> Let me get the exact code hold on
23:23:13*Notxor quit (Remote host closed the connection)
23:25:27FromDiscord<Hourglass [She/Her]> Relevant lines:↵https://github.com/Nimberite-Development/Nimberite/blob/develop/src/nimberite/plugins/networking/n1_19_3.nim#L121↵https://github.com/Nimberite-Development/Nimberite/blob/develop/src/nimberite/plugins/networking/n1_19_3/parsing.nim#L215-L220
23:25:54FromDiscord<Hourglass [She/Her]> My issue is that `socket.send` doesn't seem to send any data to the Minecraft client which is very odd
23:51:39*jmdaemon quit (Ping timeout: 248 seconds)
23:52:10*jmdaemon joined #nim
23:56:39*jmdaemon quit (Ping timeout: 260 seconds)