<< 08-07-2021 >>

00:13:29*PersonMcGuy joined #nim
00:14:52PersonMcGuyHello all. Quick question. Would an async proc referencing a global variable be considered gcsafe if the program running it is single-threaded?
00:55:22*luis_ quit (Remote host closed the connection)
01:00:04*PersonMcGuy quit (Quit: Client closed)
01:35:44FromDiscord<timotheecour> gcsafety depends on whether the type of that variable (int ok, string or seq not ok, IIRC)
01:35:50*justsomeguy joined #nim
01:35:59FromDiscord<timotheecour> (edit) "gcsafety depends on whether the type of that variable (int ok, string or seq ... not" added " or ref int"
01:36:13FromDiscord<timotheecour> (edit) "gcsafety depends on whether the type of that variable ... (int" added "and whether it involves GC"
01:36:29FromDiscord<timotheecour> (edit) "ok, IIRC)" => "ok)"
02:49:12fn<ForumUpdaterBot99> New thread by Bung: Integrate with dll's procs that returns gced types, see https://forum.nim-lang.org/t/8210
03:25:08*arkurious quit (Quit: Leaving)
04:06:02*supakeen quit (Quit: WeeChat 3.2)
04:06:38*supakeen joined #nim
04:59:21*rockcavera quit (Remote host closed the connection)
06:15:46FromDiscord<RattleyCooper> Anybody know if I can do a binary left shift like `1 << 0` would do in python?
06:15:58FromDiscord<Elegantbeef> `1 shl 0`
06:16:04FromDiscord<RattleyCooper> Thanks 😄
06:16:18FromDiscord<Elegantbeef> bet you cannot guess what is shift right
06:16:26FromDiscord<RattleyCooper> shr?
06:16:32FromDiscord<Rika> Sure it is
06:16:35FromDiscord<Elegantbeef> Damn you're a rocket scientist
06:16:39FromDiscord<RattleyCooper> lol
06:38:58FromDiscord<Bung> @ElegantBeef Nimscripter dont handle import in nims file ?
06:39:17FromDiscord<Elegantbeef> It's supposed to
06:42:56FromDiscord<Elegantbeef> Got a sample of what you're doing so i can see what i fucked up?
06:43:37FromDiscord<Bung> sure
06:44:59FromDiscord<Bung> https://github.com/bung87/dllgen/blob/scripted/src/dllgen.nim
06:45:37FromDiscord<Bung> am trying switch my dll gen to nimscripter implement a theme system
06:46:52FromDiscord<Bung> after fixed problems I still cant get ref T from outside proc's returns
06:47:22FromDiscord<Bung> that's impossible in theory I guess
06:49:18FromDiscord<Elegantbeef> I mean you're using the `{.cdecl.}` in the same as a file with `{.exportToNim.}`
06:49:53FromDiscord<Elegantbeef> Are you using `libcffi`?
06:51:11FromDiscord<Bung> no, that proc did not used so may not affect anything
06:52:37FromDiscord<Bung> your loadscript stdpath param why not point to findNimStdLibCompileTime ?
06:53:03FromDiscord<Elegantbeef> So you can distribute binaries with their own select stdlib
06:53:43FromDiscord<Bung> I mean you can take it as default value
06:55:09FromDiscord<Bung> I dont need custom stdlib , I just want to see how it works , so `./stdlib` does not usefull to me
06:56:31FromDiscord<Elegantbeef> Hmm i really should clean it up
06:56:43FromDiscord<Elegantbeef> Add more docs in code, remove stupid stuff
06:58:35FromDiscord<Bung> I think you can do de ref automatically if ref not possible
06:58:46FromDiscord<Elegantbeef> Dont know what you mean
06:58:49FromDiscord<Bung> when I call invoke memthod
06:59:17FromDiscord<Elegantbeef> Well references are not passed as is
06:59:38FromDiscord<Elegantbeef> They're serialized and reconstructed
06:59:43FromDiscord<Bung> I mean the invoke method return types
07:00:19FromDiscord<Elegantbeef> I dont follow
07:00:41FromDiscord<Bung> the method returns a ref T , in the main program you invoke, you get nil
07:03:01*sagax quit (Excess Flood)
07:10:57FromDiscord<Elegantbeef> That doesnt sound right
07:12:40FromDiscord<Bung> it's same behavior when I call proc from dll proc
07:14:04FromDiscord<Bung> guess I need wirte a macro transform returns types to object type
07:14:35FromDiscord<Elegantbeef> Well if you want to use nimscripter no, it's an issue i need to fix
07:16:08FromDiscord<Elegantbeef> oh your issue is something i did dumb and now just realize how dumb it is
07:16:25FromDiscord<Elegantbeef> it's `newSubModuleExported` due to my stupidity
07:17:10FromDiscord<Bung> It supposed to handle returns ref type ? I do some work in dll version, that it has self contained gc process
07:17:36FromDiscord<Elegantbeef> Yes it's supposed to handle ref types, but it copies them
07:18:26FromDiscord<Bung> oh, that's sounds good
07:18:49FromDiscord<Bung> when you fix all tell me, I'll try it
07:18:53FromDiscord<Elegantbeef> I know it was working at one point with refs, but i may have broke it
07:19:38FromDiscord<Bung> I looked video , does not show pass arg and return ref types
07:19:49FromDiscord<Bung> so you may add more test cases.
07:20:02FromDiscord<Elegantbeef> Well it didnt show it but i know it worked then
07:22:30FromDiscord<Bung> another thing could it handle import in script related to the script file path or provide a cwd arg I think
07:23:02FromDiscord<Elegantbeef> Yea so the issue is just that whole "Exported" being appened which i should just handle
07:23:47FromDiscord<Bung> cool
07:24:52FromDiscord<Bung> it also not parse export symbol I faced the problem.
07:25:49*neceve joined #nim
07:26:06FromDiscord<Elegantbeef> Well i dont know how easily that can be supported since it needs to be serialized between nimscript and nim
07:26:11FromDiscord<Elegantbeef> But yea i'll have a update out shortly being `0.3.0`
07:27:35FromDiscord<Elegantbeef> This isnt seamless communication, everything is serialized from one side to the other due to VM limitations i hit
07:27:55FromDiscord<Elegantbeef> Though i do wonder how @drsw handles it
07:28:57FromDiscord<Bung> disruptek also have a serialize lib clam handle any type
07:29:34FromDiscord<Elegantbeef> Except doesnt work in the VM
07:30:12FromDiscord<Bung> okay, good to know
07:30:32FromDiscord<Elegantbeef> I originally was going to use frosty but i hit the wall of VM is limited
07:30:45FromDiscord<Elegantbeef> So until libcffi becomes standard this will persist
07:33:25FromDiscord<Elegantbeef> Well there you go 0.3.0 just released
07:33:35FromDiscord<Elegantbeef> So now you dont need to do `yourNimScriptProcExported`
07:33:44FromDiscord<Elegantbeef> I realize now that was dumber than imaginable
07:35:54FromDiscord<Bung> I dont get it, my procs in nims did not exported
07:36:26FromDiscord<Elegantbeef> no they did but my dumbass though it was smart to require programmers to write `"newSubModuleExported"` for the proc name
07:37:33FromDiscord<Elegantbeef> Look at tests for examples
07:38:22FromDiscord<Elegantbeef> I really think i need to take a look at nimscripter again and clean it to a fantastic library instead of whatever this is 😛
07:39:11FromDiscord<Elegantbeef> I can remove the import order issue and also make it support multiple modules/intepreters but just havent got around to it
07:44:18FromDiscord<Bung> hmm I still get nil access
07:45:43FromDiscord<Bung> oh, I commented another proc , it works.
07:45:54FromDiscord<Elegantbeef> Ah was just about to test it
07:48:31FromDiscord<Bung> guess you did thought user just feed their old nim file to nimscripter.
07:50:40FromDiscord<Bung> now am wating for the import things solved. so my theme file just need small changes.
07:52:10FromDiscord<Bung> it's usefull to be a plugin system.
07:52:37FromDiscord<Elegantbeef> By import thing do you mean working relative to .nims file?
07:53:34FromDiscord<Bung> yeah ,atleast if user provide absolute file path
07:54:03fn<ForumUpdaterBot99> New thread by Halloleo: In the JavaScript backend how to pass a array back as sequence?, see https://forum.nim-lang.org/t/8211
07:58:13FromDiscord<Elegantbeef> Not great but presently you can just change the directory before and after loading the interpreter
08:06:38FromDiscord<Bung> searchPaths add projectFile parent Dir I think
08:06:59*stkrdknmibalz quit (Ping timeout: 252 seconds)
08:32:12*PMunch joined #nim
09:01:24*xet7 quit (Remote host closed the connection)
09:02:14*xet7 joined #nim
09:03:02*xet7 quit (Read error: Connection reset by peer)
09:04:10*xet7 joined #nim
09:12:11*max22- joined #nim
09:12:28*max22- quit (Remote host closed the connection)
09:12:47FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3shF
09:12:51*max22- joined #nim
09:18:13PMunchNim doesn't like {} IIRC
09:18:26PMunchI seem to remember having issues with it when I was doing genui
09:18:54PMunchIt is overloaded in your code, but the syntax parser struggles with figuring out what you're trying to do
09:19:26FromDiscord<ElegantBeef> well hax is doing `echo somStuff = y` which is turned into `asgn(echo(somStuff), y)`
09:19:59FromDiscord<ElegantBeef> But even wrapping with pars has an issue
09:20:15PMunchYeah, but try to wrap it in parenthesis and you see what I mean
09:20:43FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3shH
09:20:47FromDiscord<haxscramper> Well, I can live with that, so `echo {}=` is probably weird thing anyway
09:21:23PMunchWell it was broken because you tried to return something from the {}= proc
09:21:34FromDiscord<ElegantBeef> yea it's broken even with `[]=`
09:21:57FromDiscord<ElegantBeef> the curlies were not the issue it was the return type really confuses the parser
09:22:01FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3shI
09:22:15FromDiscord<haxscramper> parser should have nothing to do with return type
09:22:36FromDiscord<ElegantBeef> I use terms very loosely
09:22:38FromDiscord<ElegantBeef> 😛
09:22:57FromDiscord<haxscramper> well, anyway, TIL you can overload `from`, `as`, `{}` and `{}=`
09:23:14FromDiscord<haxscramper> Would be nice if we got `to` operator
09:23:40FromDiscord<Rika> you can prolly just use a normal proc and mcs it
09:23:40FromDiscord<Rika> (for now)
09:31:13FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3shK
09:56:59FromDiscord<vindaar> what's the point of that thing [haxscramper](https://matrix.to/#/@haxscramper:matrix.org) ? 😅 reminds me of my first ideas about the ggplotnim formulas, i.e. allowing `~` to be used to construct formulas with untyped identifiers as column references and this kind of stuff. The fun part is that `~` has lower precedence than most things that might appear on the RHS, so I needed to reorder the tree 🤭
09:57:57FromDiscord<haxscramper> No point, just realized you could do this
09:58:09FromDiscord<haxscramper> Well, custom `[]<XXX>` operators
09:58:18FromDiscord<vindaar> ah, I see. It's neat to be able to do this stuff
10:00:06FromDiscord<vindaar> also the whole matching specific nim nodes in an untyped setting is really nice
10:02:56FromDiscord<haxscramper> Yes, it is really nice
10:03:20FromDiscord<haxscramper> The main problem - I almost never reach to it for some reason, and this is not particularly buggy feature either
10:03:31FromDiscord<vindaar> same here
10:03:32FromDiscord<haxscramper> All of this TRM-related stuff is very cool
10:03:48FromDiscord<haxscramper> Even without rewriting macros themselves
11:19:32FromDiscord<Bung> @haxscramper your pasePNodeStr need update https://github.com/bung87/nimlsp/blob/check/src/nimlsppkg/pnode_parse.nim
11:20:45FromDiscord<haxscramper> Can you PR a fix?
11:20:59FromDiscord<haxscramper> Still don't understand why can't just use my library as is
11:21:25FromDiscord<Bung> ok, then later I'll create PR
11:21:32FromDiscord<haxscramper> Also, why mImport?
11:21:41FromDiscord<Bung> yours still install nimble ?
11:21:50FromDiscord<haxscramper> Doesn't regular import work just fine?
11:22:22FromDiscord<Bung> you have custom `/` operator
11:22:49FromDiscord<haxscramper> And?
11:22:52FromDiscord<Bung> I mean `os.joinPath`
11:23:25FromDiscord<Bung> mimport is join to explicitSourcePath
11:23:50FromDiscord<Bung> so I dont install compiler either
11:24:29FromDiscord<Bung> me dont install nimble and compiler , yours does.
11:26:09FromDiscord<haxscramper> Anyway, I don't think I need changes like this - `raise` and catch in the same proc and then return error directly, support for nimpretty, hardocded absolute paths to compiler tec.
11:26:34arkanoidRika: I've opened an issue on GH and yeah it went down the rabbit hole. I's just way easier to avoid sugar
11:27:12FromDiscord<Bung> the main point is move up pars.lex.errorHandler =
11:28:18FromDiscord<haxscramper> Doesn't `openParser` mutate parser in-place? The parsing happens in `parseAll`
11:31:26FromDiscord<haxscramper> And `parsePnodeStr` is not exactly the thing you should be building logic on, just like `compileString` it is a hack for quick testing
11:33:01FromDiscord<haxscramper> Do you plan to use submodules?↵(@Bung)
11:33:17FromDiscord<haxscramper> Git submodules for a compiler instead of installing it
11:34:02FromDiscord<Bung> sent a long message, see http://ix.io/3si6
11:34:55FromDiscord<Bung> openParser will parse first token
11:35:38FromDiscord<Bung> in this lib , no , I just use it check syntax.
11:36:36FromDiscord<Bung> feed a tab easily trigger error
11:49:22*max22- quit (Ping timeout: 240 seconds)
11:51:33*luis_ joined #nim
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:37*supakeen joined #nim
12:16:47*justsomeguy quit (Quit: WeeChat 3.0.1)
12:51:14*luis_ quit (Quit: luis_)
12:58:33*luis_ joined #nim
13:19:53*arkurious joined #nim
13:21:30FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=3sio
13:21:48FromDiscord<lqdev> is there anything extra i need to do before reading from a connected client?
13:31:48*arkurious quit (Ping timeout: 258 seconds)
13:34:06*arkurious joined #nim
13:50:58fn<ForumUpdaterBot99> New thread by JPLRouge: Help Json , see https://forum.nim-lang.org/t/8212
13:58:16*luis_ quit (Quit: luis_)
14:10:45*rockcavera joined #nim
14:10:46*rockcavera quit (Changing host)
14:10:46*rockcavera joined #nim
14:15:08*rockcavera quit (Remote host closed the connection)
14:22:16*max22- joined #nim
14:32:58*max22- quit (Ping timeout: 240 seconds)
14:35:13*fn quit (Remote host closed the connection)
14:35:26*fn joined #nim
15:04:19*clemens3 left #nim (WeeChat 2.7)
15:28:05*max22- joined #nim
15:30:27FromDiscord<RattleyCooper> I'm getting `nan` value back from some math operations on `float64` values. Looks like docs say to use `complex` module but I'm unsure how to fix this specific problem..
15:33:23FromDiscord<Rika> whats the problem
15:38:15FromDiscord<RattleyCooper> I need to do math that works
15:38:32FromDiscord<Rika> uh specifics
15:38:42FromDiscord<Rika> we cant tell what youre doing that results in a nan
15:39:09FromDiscord<RattleyCooper> `dot = dot + gradient[i] (point[i] - grid_point[i])`
15:39:25FromDiscord<Rika> nothing here seems like it would give a nan
15:39:36FromDiscord<RattleyCooper> in a loop where `i` is the index of the 3 `seq[float64]`
15:40:04FromDiscord<RattleyCooper> That's the operation that results in the `nan` though. When I look at the sequences they're all floats
15:42:06FromDiscord<vindaar> given that the word `gradient` appears, it seems much more likely that your numerical computation of a gradient before this divides by 0 somewhere
15:44:08FromDiscord<Rika> or that you somehow stored a nan in either point or grid_point
15:45:14FromDiscord<RattleyCooper> I checked the sequences I'll check my gradient function as well
15:45:51FromDiscord<RattleyCooper> For some reason this pc can't find the `guass` function so I'm having to debug on the nim-lang website
15:45:57FromDiscord<vindaar> I just had to check whether doing math with an `inf` produces a nan. Apparently not directly 😅
15:46:28FromDiscord<vindaar> if you mean the `gauss` in the `random` module, it was only added relatively recently↵(@RattleyCooper)
15:46:49FromDiscord<RattleyCooper> I'm honestly not great at math, I'm trying to port a Perlin noise algorithm to nim
15:47:12FromDiscord<vindaar> if you can share more of the code, we can help you better though
15:53:45FromDiscord<vindaar> I suppose you're porting that to learn it rather than to have an implementation, right? Because there's ↵https://github.com/guzba/noisy↵and↵https://github.com/Nycto/PerlinNim
15:58:54FromDiscord<RattleyCooper> Yeah, just learning
15:59:21FromDiscord<RattleyCooper> I'm new to nim and trying to get used to using the different types and whatnot. Learn the standard library
16:01:58FromDiscord<vindaar> (to add to this\: if your `point[i] - grid_point[i]` were 0, you could have `inf 0`, which does produce nan)
16:03:14FromDiscord<RattleyCooper> Ok, I will do some testing here when I have more time and see if either of those things are happening.
16:04:21FromDiscord<vindaar> feel free to ping me if I should look over your code or something
16:07:22FromDiscord<whyy cant i install choosenim> noise generation lol
16:09:15FromDiscord<RattleyCooper> Cool, I appreciate the help and will take you up on it if I can't figure it out
16:16:28*stkrdknmibalz joined #nim
16:17:23FromDiscord<dom96> In reply to @lqdev "i'm trying to make": can you share code?
16:19:19FromDiscord<lqdev> In reply to @dom96 "can you share code?": i already solved my problem differently, but sure. i do actually want to know why this error occured https://media.discordapp.net/attachments/371759389889003532/862729571379838996/syncserver.nim
16:21:04FromDiscord<dom96> You're calling `recvLine` on the server not the client
16:21:17FromDiscord<lqdev> ohhh damn
16:21:45FromDiscord<lqdev> that was a bit dumb
16:22:09FromDiscord<lqdev> sometimes you just need a second pair of eyes to look at your code 🙃
16:38:09FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3sjx
16:41:59FromDiscord<RattleyCooper> In reply to @vindaar "(to add to this\:": This is at least part of it
16:42:25FromDiscord<RattleyCooper> (edit) "it" => "the problem."
16:47:18FromDiscord<RattleyCooper> I also have `nan`s in my gradient
16:49:12FromDiscord<vindaar> possibly from essentially having 0 / 0
16:54:52FromDiscord<RattleyCooper> I'm adding checks for 0. Just taking more time than necessary bc I'm working and also using play.nim-lang.org lol
16:55:07FromDiscord<vindaar> why are you not just updating your local nim version?
16:57:00FromDiscord<RattleyCooper> Can I just download the new version and install over the old version?
16:57:12FromDiscord<vindaar> it kind of depends on how you installed the old version
16:57:23FromDiscord<vindaar> in general \~yes, if you use the same approach
16:57:25FromDiscord<RattleyCooper> I don't know tbh. I don't think I used choosenim
16:57:32FromDiscord<vindaar> otherwise you might run into issues with multiple installations and different paths
16:57:43FromDiscord<RattleyCooper> Gotcha, I have no clue tbh.
16:57:44FromDiscord<vindaar> are you on windows or linux?
16:57:58FromDiscord<RattleyCooper> Might have used VSCode or installed from the exe
16:58:00FromDiscord<RattleyCooper> windows
16:58:16FromDiscord<vindaar> then I suppose installing the newest version from the website should work out fine
16:58:24FromDiscord<vindaar> (will be afk for a bit)
16:58:36FromDiscord<RattleyCooper> OK, I'll give it a shot. Thanks for all the help!
17:17:36*Guest28 joined #nim
17:17:54*Guest28 left #nim (#nim)
17:25:10*dmu joined #nim
17:52:01FromDiscord<treeform> I am trying to do very unsafe thing. I get an image array of bytes from openGL, can I manually make it part of a seq? Some thing like seq.intenraldataptr = openGLArrayPointer?
17:52:41FromDiscord<Rika> I doubt because a seq is garbage collected
17:52:55FromDiscord<Rika> Just use the unchecked array type
17:53:08FromDiscord<treeform> I need it on an object that's a seq
17:53:23FromDiscord<treeform> I can memcopy it but that is slow
17:53:27FromDiscord<treeform> I know its not safe
17:53:30FromDiscord<treeform> but I want to try
17:54:32FromDiscord<vindaar> I'd say you might run into issues that possibly break the GC (or do bad things to the data)
17:54:33FromDiscord<vindaar> might work better with arc
17:54:33FromDiscord<vindaar> but also there I've seen weird things
17:54:33FromDiscord<Rika> Is it a good idea
17:54:37FromDiscord<vindaar> why do you need a seq specifically though?
17:56:08FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3sjS
17:56:42FromDiscord<treeform> I need to know the layout of the seq
17:56:45FromDiscord<treeform> (using refc for now)
17:56:58FromDiscord<treeform> I think arc puts the cap and len as first entries in the pointer
17:57:20FromDiscord<vindaar> I'm confused. Do you need a seq or is such an `UnsafeSeq` fine?
17:57:47FromDiscord<treeform> well unsafeSeq is seq
17:57:49FromDiscord<treeform> just casted
18:18:43*PMunch quit (Quit: leaving)
18:23:08FromDiscord<JonasL> `proc foo[T](self: T) =`
18:26:10FromDiscord<JonasL> how do i call proc on generics? e.g.
18:26:19FromDiscord<JonasL> `proc foo[T](self: T) : Position =↵ result self.getPosition()`
18:27:30FromDiscord<JonasL> (edit) "`proc foo[T](self: T) : Position =↵ result ... self.getPosition()`" added "="
18:32:45FromDiscord<ynfle (ynfle)> What do you mean?
18:38:56FromDiscord<JonasL> something similar to Rust generics or C++ templates
18:40:31FromDiscord<Hi02Hi> have you tried `foo[T](arg)` ?
18:41:32FromDiscord<Hi02Hi> note: nim's type inference means you don't have to put the `[T]` part
18:44:30FromDiscord<ynfle (ynfle)> What do you want to do?
18:45:06FromDiscord<konsumlamm> oh, i think they're looking for something like Rust's traits
18:46:22FromDiscord<konsumlamm> Nim uses SFINAE (like C++), so you can just call functions on generic parameters and only when instantiated with a concrete type, it is type checked
18:46:31FromDiscord<JonasL> something similar yeah
18:47:08FromDiscord<konsumlamm> although there are concepts, which let you specify constraints on the generic parameters (like what functions it should support), but they're still experimental
18:47:30FromDiscord<JonasL> so i have to go the c++ way
18:47:31FromDiscord<konsumlamm> currently, you usually just use normal generic parameters though
18:47:37FromDiscord<konsumlamm> ye
18:47:47FromDiscord<konsumlamm> unless you wanna use concepts
18:48:43FromDiscord<JonasL> yeah tried it but got an error, but thanks for the advice. Learning by doing i guess
18:48:44FromDiscord<codic> also there are libraries that simulate it
18:49:28FromDiscord<codic> like this https://github.com/yglukhov/iface
18:49:30fn<R2D299> itHub: 7"<No Description>"
18:49:33FromDiscord<Alea> Would nim be any faster for building a matplotlib point cloud via nimpy?
18:49:46FromDiscord<Alea> Or would it spend all it's time in python code anyway
18:50:37FromDiscord<vindaar> how many data points are you talking about and how slow is matplotlib for you?
18:50:37FromDiscord<vindaar> unless the limiting factor is the generation of the data or something, no. The plotting will take \~the same time↵(@Alea)
18:52:11FromDiscord<ynfle (ynfle)> @\_discord\_678286491234992178\:t2bot.io What are you trying to do?
18:53:02FromDiscord<JonasL> In reply to @JonasL "yeah tried it but": works now. Thanks
18:53:41FromDiscord<ynfle (ynfle)> \:thumbsup\:
19:02:23FromDiscord<Alea> In reply to @vindaar "how many data points": 2.7M↵It takes a while to read them from xml to the scatter data, but the actual rendering is unusably slow
19:04:44FromDiscord<vindaar> regular plotting libraries simply aren't built to deal with that kind of data (especially in an interactive way).↵I'd propose to plot using nim, but to be fair, `ggplotnim` isn't really faster than matplotlib to plot a huge number of points. Last time I compared plotting 1 mio. points comparing with matplotlib it was similar in speed
19:04:46FromDiscord<vindaar> but the thing is, usually you don't want to plot this much data
19:04:49FromDiscord<vindaar> that's what heatmaps are for
19:08:51FromDiscord<Alea> Is there a way to do 3d heat maps?
19:09:17FromDiscord<Alea> Also pretty sure this is some kind of molecular data, so it should be discreet
19:10:09FromDiscord<vindaar> if you really want to plot such data as a point cloud though, you should probably look into something like vispy\: https://vispy.org/↵↵a heatmap is technically 3D by definition (color is a 3rd dimension)
19:12:02*neceve quit (Ping timeout: 252 seconds)
19:17:22FromDiscord<vindaar> an additional problem presents itself if you store plots with that many objects. If you store it as a vector graphic, most viewers will choke on that kind of data tooo
19:18:29FromDiscord<vindaar> compare these
19:18:30FromDiscord<vindaar> axion\_image\_2018.png https://media.discordapp.net/attachments/371759389889003532/862774666824908810/axion_image_2018.png
19:18:31FromDiscord<vindaar> xy\_2018.png https://media.discordapp.net/attachments/371759389889003532/862774668914065408/xy_2018.png
19:20:20FromDiscord<vindaar> that's \~750,000 points in that point cloud. The two aren't exactly the same, because the latter one is weighted by something. The input data is the same aside from that. Converting the scatter plot from a PDF to png took inkscape... 80 s
19:21:10FromDiscord<Vindaar> (on the discord side it's the former plot... the heatmap that is weighted)
19:26:04FromDiscord<haxscramper> Close but I think not exactly correct (part about SFINAE) - nim considers all overload candidates at once in `pickBestCandidate` https://github.com/nim-lang/Nim/blob/devel/compiler/semcall.nim#L76 that iterates through all overloads. So it is functionally similar, since you can write `[T: not proc]` and `[T]`, and it would choose by going through alternatives↵(@konsumlamm)
19:27:22FromDiscord<haxscramper> Though it is mostly terminological difference I suppose
19:46:58*SebastianM joined #nim
19:47:13*SebastianM quit (Client Quit)
19:47:13*neceve joined #nim
19:55:53FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3skm
20:09:07FromDiscord<Bung> is it about neovim or nimlsp server, if server you need clone nimlsp run `nimble debug` see what happens
20:17:15FromDiscord<Bung> how to convert utf16 to utf8 ?
20:19:31FromDiscord<Bung> fond iconv.`convert(original, "utf-16", "utf-8")`
21:16:51FromDiscord<System64 ~ Flandre Scarlet> Is it normal I don't have the stacktrace? https://media.discordapp.net/attachments/371759389889003532/862804365822394408/unknown.png
21:17:57FromDiscord<dom96> did you build in release/danger mode?
21:19:44FromDiscord<System64 ~ Flandre Scarlet> just did nim compile -r myprogram.nim
21:22:56FromDiscord<RattleyCooper> Are you trying to access an object attribute that doesn't have a value? I get that same error when I create a ref object of RootObj and then try to access an attribute that hasn't been set.
21:24:08FromDiscord<System64 ~ Flandre Scarlet> it crashes at random times↵Sometime directly after the boot, sometime 1 minute after, sometime 10 seconds after, ...
21:30:49FromDiscord<Bung> guess you'll need import segfaults module
21:40:00FromDiscord<System64 ~ Flandre Scarlet> weird, I don't have any problems with the danger flag
21:42:33FromDiscord<Bung> @ElegantBeef have you thought make nimscripter no compiler package dependency and no `stdlib` dir ?
21:46:37FromDiscord<System64 ~ Flandre Scarlet> well my theory is the garbage collector collects something it shouldn't collect
21:49:14FromDiscord<Bung> write some GC_ref might help
21:54:31FromDiscord<System64 ~ Flandre Scarlet> what's that?
21:56:41FromDiscord<Bung> https://nim-lang.org/docs/system.html#GC_ref%2Cref.T
21:59:43FromDiscord<System64 ~ Flandre Scarlet> the problem is I dunno what's deleted, will inspect that
22:00:52FromDiscord<ElegantBeef> In reply to @Bung "<@!145405730571288577> have you thought": Considering the compiler has the VM no, and no i want to enable a redistributable environment and removing that will ruin the purpose
22:01:16FromDiscord<ElegantBeef> Say you are pmunch and want to enable a config using nims without the shippable stdlib, you now have to have Nim installed, it just makes it silly
22:01:38FromDiscord<ElegantBeef> If you dont like those two ideas might i suggest a fork?
22:03:49FromDiscord<ElegantBeef> afaik if i dont use the compiler package i'd have to use `nim e` which puts a reliance on having nim installed
22:05:44*neceve quit (Ping timeout: 252 seconds)
22:05:46FromDiscord<Bung> I dont get the idea, redistributable in what format ? you still need nim and nimble right ?
22:05:54FromDiscord<Bung> https://github.com/bung87/rehighlite/blob/master/src/rehighlite/pnode_parse.nim
22:05:57FromDiscord<ElegantBeef> Not if you build a program
22:06:22FromDiscord<ElegantBeef> If you make a binary you can redistribute it without `nim` or `nimble` installed
22:06:34FromDiscord<ElegantBeef> You ship an authored stdlib you want to enable
22:06:45FromDiscord<ElegantBeef> And there you go now a safeish environment for your evaluation
22:07:52FromDiscord<Bung> for that purpose you dont need them.
22:08:05FromDiscord<ElegantBeef> And that's the purpose of nimscripter
22:08:23FromDiscord<ElegantBeef> Nim <-> Nimscript interop for a portable environment
22:09:46FromDiscord<ElegantBeef> Relying on Nim being installed is completely against my view of nimscripter
22:10:39FromDiscord<ElegantBeef> At that point i'd probably just use Nim and use some IPC to communicate between the "plugin" and main file
22:16:34*xet7 quit (Ping timeout: 246 seconds)
22:29:29*xet7 joined #nim
22:29:33*supakeen quit (Remote host closed the connection)
22:29:57*supakeen joined #nim
22:34:20FromDiscord<Bung> I've forked https://github.com/bung87/nimscripter/tree/slim I dont need them for what purpose.
22:36:20*max22- quit (Remote host closed the connection)
22:36:27FromDiscord<talaing> https://media.discordapp.net/attachments/371759389889003532/862824481285603358/MXpv3YC5.png
22:36:34FromDiscord<talaing> How can I fix this?
22:36:47FromDiscord<talaing> It just happened, I haven't used nimble for a while but I remember it worked before.
22:37:22fn<ForumUpdaterBot99> New thread by Niminem: How to export a prefix to an ref object type? (JSFFI), see https://forum.nim-lang.org/t/8213
22:42:30FromDiscord<ElegantBeef> Windows defender may have removed it, so you can reinstall using choosenim
22:46:39FromDiscord<talaing> In reply to @ElegantBeef "Windows defender may have": Yes, that might be the issue, windows defender really often removes my stuff, sometimes even during coding (it just deletes the compiled .exe file). How can I do so?
22:46:59FromDiscord<talaing> `choosenim` command seems to work properly
22:48:17FromDiscord<ElegantBeef> well you can try `choosenim remove stable` then `choosenim stable`
22:48:30FromDiscord<talaing> https://media.discordapp.net/attachments/371759389889003532/862827510185459713/HnwoJQO3.png
22:48:38FromDiscord<talaing> translation: "Couldn't find requested file"
22:49:15FromDiscord<talaing> Should I disable windows defender for now?
22:51:52FromDiscord<ElegantBeef> Atleast add nim's software to the "allowed software list"
22:52:17FromDiscord<talaing> I disabled windows defender entirely. Nothing changed, still the same issue
22:52:19FromDiscord<System64 ~ Flandre Scarlet> sent a long message, see http://ix.io/3skQ
22:54:29FromDiscord<ElegantBeef> Well you'll have to reinstall
22:54:36FromDiscord<talaing> Alright
22:54:45FromDiscord<talaing> Is there any uninstaller for nim?
22:54:53FromDiscord<ElegantBeef> Well you dont need one 😄
22:55:10FromDiscord<talaing> oh
22:55:18FromDiscord<ElegantBeef> Remember all the important files were removed by your antivirus
22:55:30FromDiscord<ElegantBeef> So just download the choosenim file from the github and run it again
22:55:44FromDiscord<talaing> from here? https://github.com/dom96/choosenim/releases
22:56:36FromDiscord<talaing> Yeah there's instruction on the main page https://github.com/dom96/choosenim
22:56:38fn<R2D299> itHub: 7"Tool for easily installing and managing multiple versions of the Nim programming language."
22:56:43FromDiscord<@bracketmaster-5a708063d73408ce4> I want to create a repl for my program that lets you issue commands and do operations
22:56:49FromDiscord<@bracketmaster-5a708063d73408ce4> is there any nim tooling for this?
22:58:59FromDiscord<ElegantBeef> You could use IPC, or your favourite scripting language(include nimscript)
23:01:04FromDiscord<talaing> https://media.discordapp.net/attachments/371759389889003532/862830671185051688/LCm2AMPB.png
23:01:45FromDiscord<ElegantBeef> Uhh
23:01:54FromDiscord<ElegantBeef> No clue then
23:02:27FromDiscord<talaing> Okay, thanks for help though
23:02:29FromDiscord<talaing> I'll figure this out
23:03:40FromDiscord<Bung> @ElegantBeef I think I need api check method exists
23:07:51FromDiscord<ElegantBeef> `selectRoutine` is it but it returns nil if overloaded or if it doesnt exist
23:09:32FromDiscord<Bung> oh , that can be wraped as a api with proc name + postfix
23:09:55*rockcavera joined #nim
23:09:55*rockcavera quit (Changing host)
23:09:55*rockcavera joined #nim
23:10:51FromDiscord<ElegantBeef> Yea like i said i probably will have a significant rewrite of nimscripter soon
23:10:51FromDiscord<ElegantBeef> If you keep bugging me really soon 😄
23:18:42FromDiscord<Bung> who knows any other problem will occurs while using nimscripter , guess I'll archive my goal very soon.
23:28:10FromDiscord<RattleyCooper> I'm messing with generating perlin noise to learn standard library and types better. Is there an image library that makes it easy to create a png?
23:28:17FromDiscord<ElegantBeef> pixie!
23:28:18FromDiscord<RattleyCooper> I want to see if my noise tiles like I want it to
23:28:25FromDiscord<RattleyCooper> Sweet, thanks Beef!
23:30:45FromDiscord<ElegantBeef> https://nimdocs.com/treeform/pixie/pixie/images.html#%5B%5D%3D%2CImage%2Cint%2Cint%2CSomeColor rather simple api
23:30:46FromDiscord<RattleyCooper> Oh wow yeah that looks dead simple
23:30:46FromDiscord<RattleyCooper> I'll find a way to f@! it up
23:30:47FromDiscord<ElegantBeef> then you can just do `writeFile(yourImage, "name.png")`
23:30:52FromDiscord<RattleyCooper> niiccceeeee
23:30:53FromDiscord<ElegantBeef> (edit) ""name.png")`" => ""name.png", ffPng)`"
23:31:14FromDiscord<ElegantBeef> Pixie is a full drawing api though so tons of stuff in it
23:31:21FromDiscord<ElegantBeef> Image handling is one small part of it 😛
23:33:23FromDiscord<RattleyCooper> I see that on the github. Looks awesome! Def gonna use this for something
23:34:09FromDiscord<RattleyCooper> It can even handle drawing svgs? That's dope af