<< 09-04-2024 >>

00:02:14FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "You can use those": sometimes it can be useful, in order to access your own code from other files, but also expose those files to the user without needing to separate the code into some `/private/blabla.nim` set of tiny files that have a single or two functions and nothing else
00:03:28FromDiscord<Elegantbeef> Got an concrete example?
00:03:54FromDiscord<Elegantbeef> a\
00:20:30FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "Got an concrete example?": implementing internal procs for a type with private fields, where the typedefs are in one file and the procs in another one, but the types are exposed to the user as they need some of the fields but not all
00:20:43FromDiscord<sOkam! 🫐> (edit) removed "internal"
00:21:30FromDiscord<sOkam! 🫐> and if you say "well, have the typedefs and the procs in the same file".... you won't get anything remotely complex without landing on cyclic dependencies sooner rather than later 😦
00:22:05FromDiscord<sOkam! 🫐> having typedefs separate pretty much solves cyclics for 99% of the cases
00:29:45*nazgulsenpai_ quit (Ping timeout: 252 seconds)
00:29:47*jkl quit (Ping timeout: 252 seconds)
00:30:48*nazgulsenpai joined #nim
00:31:45*jkl joined #nim
00:35:33*via quit (Ping timeout: 252 seconds)
00:35:41*via joined #nim
03:22:25FromDiscord<TӨMΛ ☠> In reply to @Elegantbeef "You can use those": Yeah, I'm not planning on using those, it was more like curiosity given I had talk with friends about Java and using private methods and how mixins are important with those↵Thank you @vindaar and @Robyn [She/Her] for those ❤️ intriguing how easy it seems now 😅
03:24:24FromDiscord<TӨMΛ ☠> sent a code paste, see https://play.nim-lang.org/#pasty=hCedpsdBbsFh
03:52:31*SchweinDeBurg joined #nim
04:21:36FromDiscord<vagous> So I got this error when trying to compile for web on nim:↵Error: unhandled exception: FAILED: nim c -d:debug -d:emscripten -o:Vagous.html src/main.nim [OSError]↵Even though I have emscripten installed the way emscripten instructed
04:21:49FromDiscord<vagous> (edit) "So I got this error when trying to compile ... for" added "nico"
04:22:09FromDiscord<Elegantbeef> There's a bug with nico that needs fixed
04:22:34FromDiscord<Elegantbeef> You can either use older Nim or fix the bug
04:23:31FromDiscord<vagous> In reply to @Elegantbeef "You can either use": Wow, what version, and is it reccomended to downgrade?
04:23:57FromDiscord<Elegantbeef> It's recommended to fix the bug 😄
04:24:13FromDiscord<vagous> In reply to @Elegantbeef "It's recommended to fix": How?
04:24:43FromDiscord<Elegantbeef> Fork the nico project run nim directly instead of using nimble and find why it's erroring
04:24:50FromDiscord<Elegantbeef> `nim c -d:debug -d:emscripten -o:Vagous.html src/main.nim` will tell you the error
04:40:47*KhazAkar quit (Ping timeout: 264 seconds)
05:13:13FromDiscord<vagous> In reply to @Elegantbeef "Fork the nico project": It doesn't, it just says that it failed
05:13:32FromDiscord<Elegantbeef> Run the command directly like I said
05:14:52FromDiscord<vagous> In reply to @Elegantbeef "Run the command directly": rror: type mismatch: got '(int, int, int32, int32)' for '(int(x), int(y), src.w scale, src.h scale)' but expected 'Rect = tuple[x: int, y: int, w: int, h: int]'
05:15:12FromDiscord<Elegantbeef> Well there you go you need to do `int(src.w scale)` and the same for h
05:33:16FromDiscord<ringabout> Is there a way to know whether a function is a closure or a normal function ?
05:33:40FromDiscord<ringabout> (edit) "?" => "using macros?"
05:33:54FromDiscord<Elegantbeef> Check the type's calling convention
05:34:11FromDiscord<Elegantbeef> it's the 3rd spot inside the `ntyProc`
05:35:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=XjuyljryMyIH
05:39:36FromDiscord<Elegantbeef> https://github.com/beef331/seeya/blob/master/seeya.nim#L231-L255 Is one way of doing it 😄
05:41:27FromDiscord<ringabout> In reply to @Elegantbeef "https://github.com/beef331/seeya/blob/master/seeya.": Thank you, I think I will use this one having to deal with hacks with `jsffi`, which I suppose I will disable closure support for `bindMethod`
05:41:38FromDiscord<ringabout> (edit) removed "I think"
05:52:13FromDiscord<ringabout> Well, it's beyond repair. I will simply deprecate it
06:01:23*ntat joined #nim
06:10:09*ntat quit (Read error: Connection reset by peer)
06:11:40*ntat joined #nim
06:49:08FromDiscord<vagous> How do I look at the C or whatever language nim produces?
06:51:13FromDiscord<Elegantbeef> You can do `--nimcache:....` and point it where to generate otherwise it's inside your temp files
06:51:13FromDiscord<Elegantbeef> On linux this is `.cache` on windows it's somewhere
06:54:53FromDiscord<vagous> In reply to @Elegantbeef "On linux this is": who knows where
06:55:31FromDiscord<Elegantbeef> https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory the documentation
07:48:20*xet7 quit (Ping timeout: 260 seconds)
07:59:23anddamdumb question but while using the examples from https://github.com/neroist/nim-tcl how do I let the runtime know where my tcl/tk setup is?
07:59:54anddamoh, this is on windows11, I figure I am asking what the equivalent to ld.so is
08:00:23FromDiscord<epicvon2468> sent a long message, see https://pasty.ee/ipSFwIUrbRGV
08:00:24*xet7 joined #nim
08:00:54FromDiscord<Elegantbeef> You didn't add it to your path?
08:00:55FromDiscord<Elegantbeef> Or you need to restart
08:02:18FromDiscord<epicvon2468> In reply to @Elegantbeef "You didn't add it": I'm new to this (Today new), so unclear what ``add it to your path`` means, however I will try the restart as you've mentioned below.
08:02:36FromDiscord<Elegantbeef> If you do not know what adding to your path means you did not add it
08:03:04FromDiscord<Elegantbeef> You need to add to your PATH environmental variable the path of that folder
08:15:33*ntat quit (Quit: Leaving)
08:18:39FromDiscord<epicvon2468> In reply to @Elegantbeef "You need to add": (Bear with me here, I have ADHD and ASD so I don't always get things communicated first try)↵Firstly, which folder are we talking about, as I've shown two so far.↵Secondly, what is a ``PATH environmental variable`` (Tried looking through this channel for an explanation but couldn't find anything, so I've no clue, because, very new to this)
08:20:26FromDiscord<Elegantbeef> https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/
08:21:20FromDiscord<epicvon2468> taking a look at that now
08:29:53anddamElegantbeef: because I had no idea I had to
08:30:07anddamoh you meant epicvon2468
08:30:30*anddam oopses
08:30:45anddamElegantbeef: in my case I installed the only Tcl/Tk package I found in winget
08:31:09FromDiscord<Elegantbeef> Probably a same problem that the dlls are not in your programs search path
08:31:13anddamthat would be a Magicsplat Tcl/Tk
08:32:53*Mister_Magister quit (Quit: bye)
08:34:22FromDiscord<epicvon2468> In reply to @epicvon2468 "taking a look at": I've found the PATH environmental variable, however I'm confused as to what I'm adding https://media.discordapp.net/attachments/371759389889003532/1227174755988406273/image.png?ex=6627728d&is=6614fd8d&hm=4f79e6fe8f15a2600d1ef9f2d2db72560698acaf08eaa53987833955c081be51&
08:34:41FromDiscord<Elegantbeef> Should be adding the path to where all your Nim .exe's live
08:34:44FromDiscord<nnsee> In reply to @epicvon2468 "(Bear with me here,": when you type `nimble.exe` (or just `nimble`) in a cmd window, windows needs to know where to look for that `nimble.exe` file. This is what the `PATH` environment variable is for - it lists all of the directories where binaries that you might want to execute reside. If a directory is not in `PATH`, the full file path to the exe must be specified, not just `nimble.exe`
08:34:45*Mister_Magister joined #nim
08:34:46FromDiscord<nnsee> hence
08:34:53FromDiscord<epicvon2468> In reply to @Elegantbeef "Should be adding the": ah.
08:35:02FromDiscord<nnsee> you have to add the directory where `nimble.exe` and the rest of the binaries reside
08:35:12FromDiscord<epicvon2468> In reply to @nnsee "when you type `nimble.exe`": ah, thx for explanation
08:35:35FromDiscord<epicvon2468> I'll try it now
08:36:10FromDiscord<nnsee> you will need to log out and back in again for the changes to take effect (as far as I know, I'm somewhat unfamiliar with windows)
08:36:16FromDiscord<epicvon2468> In reply to @nnsee "you will need to": ah
08:36:18FromDiscord<epicvon2468> right
08:36:22FromDiscord<epicvon2468> I'll be back in a second then!
08:36:39FromDiscord<Elegantbeef> I say kick the computer until it learns how to read from the path you just set
08:36:39FromDiscord<Elegantbeef> YMMV
08:38:08FromDiscord<epicvon2468> In reply to @Elegantbeef "I say kick the": 🔥
08:38:40FromDiscord<epicvon2468> ~~actually we used to do that to our old ipad when it wouldn't work, and surprisingly it fixed it once~~
08:38:53FromDiscord<nnsee> good old percussive maintenance
08:39:21FromDiscord<epicvon2468> yeah i may need to kick it
08:46:51FromDiscord<epicvon2468> so uhh... i got... somewhere https://media.discordapp.net/attachments/371759389889003532/1227177895047204895/image.png?ex=6627757a&is=6615007a&hm=f9eb75235aff054b5f5883aeeaa8a5f0ff67ace8d1e641ff9923fd3bbac76ca9&
08:47:07FromDiscord<epicvon2468> (CCC is the admin account on my pc)
08:48:51FromDiscord<epicvon2468> ~~All in favour of kicking my pc say I~~
08:49:30FromDiscord<Elegantbeef> Probably a windows user account issue or similar
08:49:35FromDiscord<epicvon2468> In reply to @epicvon2468 "so uhh... i got...": wait↵maybe i just have to install nim onto the other account?
08:49:39FromDiscord<Elegantbeef> No resolution from me
08:49:42FromDiscord<epicvon2468> WE'LL BE RIGHT BACK
08:50:09FromDiscord<Robyn [She/Her]> In reply to @epicvon2468 "~~All in favour of": I!
08:50:10FromDiscord<Robyn [She/Her]> Lmao
08:56:46FromDiscord<lomineheck> In reply to @epicvon2468 "so uhh... i got...": seems to be an issue with permissions, make sure youre opening cmd in administrator
08:57:05FromDiscord<epicvon2468> In reply to @lomineheck "seems to be an": It was
08:57:38FromDiscord<epicvon2468> ALRIGHT
08:57:53FromDiscord<epicvon2468> installed nim on both users
08:58:07FromDiscord<epicvon2468> WOOOOOOOOOOOOOOOOOOOOOO
08:58:20FromDiscord<epicvon2468> wait nevermind
08:58:55FromDiscord<epicvon2468> WHAT DOES IT MEAN GIT ISN'T IN MY PATH!?↵I SET THAT UP LIKE A BILLION YEARS AGO :(↵rip
08:59:05FromDiscord<epicvon2468> https://media.discordapp.net/attachments/371759389889003532/1227180977047081020/image.png?ex=66277858&is=66150358&hm=32dbb5c59d87082d1d8812cb529a71d58a34dfd68ac6f753b9e27791277d7147&
08:59:13*Mister_Magister quit (Quit: bye)
08:59:57FromDiscord<epicvon2468> WAIT
08:59:58FromDiscord<epicvon2468> doesn't matter
09:00:00FromDiscord<epicvon2468> because
09:00:02FromDiscord<epicvon2468> IT WORKS
09:00:08FromDiscord<epicvon2468> thanks everyone
09:00:10FromDiscord<epicvon2468> 💜
09:00:43FromDiscord<epicvon2468> wait nevermind
09:00:50FromDiscord<epicvon2468> My computer can't make up it's mind
09:01:07*Mister_Magister joined #nim
09:02:11FromDiscord<lomineheck> In reply to @epicvon2468 "WHAT DOES IT MEAN": try reinstalling git
09:02:20FromDiscord<epicvon2468> no im just going to set it up in the path
09:02:26FromDiscord<epicvon2468> it's not there
09:02:30FromDiscord<epicvon2468> i have it in teh files thou
09:03:05FromDiscord<epicvon2468> wait do i
09:03:08FromDiscord<epicvon2468> ill re do just to be safe
10:15:40NimEventerNew thread by Hobbyman: How do I keep track of changing standard-libs?, see https://forum.nim-lang.org/t/11396
10:16:49FromDiscord<.lisuwu_> In reply to @nnsee "you will need to": FYI windows users don't need to log out and back in for environment variables to apply, just that currently running programs will have old environment variables but if you close and reopen them, they will have updated one
10:18:01FromDiscord<.lisuwu_> so if you want your cmd to have updated variables for example, just close and reopen cmd and boom it's there
10:24:27FromDiscord<nnsee> well good to know
10:24:34FromDiscord<nnsee> i haven't touched windows with a 10 foot pole in years
10:24:40FromDiscord<.lisuwu_> fair
10:41:28FromDiscord<0b110111101> where can i see the number of functions available in winim package ?
10:41:40FromDiscord<0b110111101> as well as nigui ?
10:41:46FromDiscord<0b110111101> (edit) removed "?"
11:05:49FromDiscord<daksh1907> When TGE
11:13:39FromDiscord<raycatwhodat> Damn, they really just dropped that message and left
13:06:49*pmp-p_ quit (Ping timeout: 256 seconds)
13:09:08*pmp-p joined #nim
13:13:54*xet7 quit (Remote host closed the connection)
13:40:12*lucasta joined #nim
13:43:16*rockcavera quit (Remote host closed the connection)
13:54:41*beholders_eye joined #nim
14:00:24NimEventerNew thread by Cnerd: Nim's equivalent of kwargs, see https://forum.nim-lang.org/t/11400
14:23:24*ntat joined #nim
14:36:22*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
14:36:39*SchweinDeBurg joined #nim
14:49:14*xutaxkamay quit (Read error: Connection reset by peer)
14:49:38*xutaxkamay joined #nim
15:00:22*krux02_ quit (Remote host closed the connection)
15:43:22FromDiscord<gogolxdong666> https://github.com/Tencent/ncnn
15:48:41om3gaHello! Plotly users anyone? I need to create min-max-avg graph with shadow for min-max range, plotly has it, but I'm not sure if nim-plotly supports it. Here is example how it looks like https://i.stack.imgur.com/jfryT.png
15:50:38FromDiscord<vindaar> You explicitly want a band and not error bars for each point, yes? At the moment I don't think we directly support it. I suppose it's easy to add though
15:54:16FromDiscord<vindaar> Ah, apparently plotly doesn't have any explicit API for this either? According to https://plotly.com/python/continuous-error-bars/ it is done indirectly (by filling a polygon of x\_0 -\> x\_N -\> x\_0 with first y + Δy and then y - Δy values)
15:55:31FromDiscord<vindaar> that should mean you should be able to create it using the `fill` attribute already present in `nim-plotly`
15:56:47om3gavindaar: unfortunately I need error bars for each average point
15:59:15FromDiscord<vindaar> your message rather confused me more. Error bars or bands?
15:59:37om3gaIdk how properly call it
16:00:02om3gaI have 3 values per X, avg, max and min
16:00:30om3gamax-min is a with of the shadow, and avg is a line
16:00:42FromDiscord<vindaar> the thing in your example image is what I'd call an "error band" (it might be a confidence interval or whatever in practice). Error bars would just refer to having bars on each data point
16:01:10om3gaaha, so yeah, I need band
16:02:54om3gais it possible with nim-plotly? or I have no luck ?
16:03:56FromDiscord<vindaar> matrix ⇔ discord bridge is slow / not working fully. Reposting here: ↵↵ok. You should be able to do it like in that first link I sent. Just have another Trace, where the x data is duplicated (first increasing and then decreasing) and with the first y values being y + Δy and then y - Δy ( or vice versa ) and setting the fill attribute to something slightly transparent
16:05:28om3gavindaar, thanks! I will try!
16:11:40FromDiscord<vindaar> ok. You should be able to do it like in that first link I sent. Just have another `Trace`, where the x data is duplicated (first increasing and then decreasing) and with the first y values being `y + Δy` and then `y - Δy` ( or vice versa ) and setting the fill attribute to something slightly transparent
16:11:40FromDiscord<vindaar> bridge is very slow
16:12:54FromDiscord<norax.2> https://media.discordapp.net/attachments/371759389889003532/1227290149419749456/image.png?ex=6627de05&is=66156905&hm=6f0aca94400ec0615f33a36ca5110cf5f3dd04598c1b7625167053f4c691f648&
16:12:55FromDiscord<norax.2> what
16:12:58FromDiscord<norax.2> does this
16:12:59FromDiscord<norax.2> even
16:13:01FromDiscord<norax.2> mean
16:15:28om3gavindaar: yeah, network lag probably
16:16:38*lucasta quit (Quit: Leaving)
16:22:54FromDiscord<grumblygibson> In reply to @vindaar "You explicitly want a": ugh, I have an old PR I need to resurrect... 😅
16:23:28FromDiscord<grumblygibson> (edit) "resurrect..." => "resurrect and fix..."
16:25:18FromDiscord<vindaar> In reply to @grumblygibson "ugh, I have an": for plotly or ggplotnim? there's an open ggplotnim PR for `geom_ribbon` 🤭
16:29:44FromDiscord<grumblygibson> yeah, we ended up dropping the project we needed it for, so the time allocation disappeared.
16:31:31FromDiscord<vindaar> sent a code paste, see https://play.nim-lang.org/#pasty=auXKwUKwtIAj
16:32:55FromDiscord<vindaar> In reply to @grumblygibson "yeah, we ended up": ah, so you're guy from the `geom_ribbon` PR? Cool! I could also fix it up, but of course feel free to look into it yourself again! Surprisingly enough I never had any real need for a ribbon plot 😅
16:44:31FromDiscord<vindaar> here's a PR with an example om3ega : https://github.com/SciNim/nim-plotly/pull/85
16:54:51*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
17:01:47FromDiscord<planetis_m> You can't attach the .noalias pragma to for loops, right?
17:03:24FromDiscord<norax.2> https://media.discordapp.net/attachments/371759389889003532/1227302857376530492/image.png?ex=6627e9db&is=661574db&hm=0e0bd389d85546847c2c9a11e079071f8f547ac167b11389e0165ae6bdb472d6&
17:03:31FromDiscord<norax.2> MHHHH i love running in to compiler errors
17:04:15FromDiscord<norax.2> and doesnt matter what i trowh in line 32
17:04:19FromDiscord<norax.2> i will always get that
17:05:27FromDiscord<vindaar> in your screenshot you're looking at `core.nim`, but your error is in `nimlings.nim`
17:11:13FromDiscord<norax.2> In reply to @vindaar "in your screenshot you're": ohhh
17:11:16FromDiscord<norax.2> man
17:11:21FromDiscord<norax.2> ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
17:11:26FromDiscord<norax.2> ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
17:11:30FromDiscord<norax.2> ohhhhhhhhhhhhhhhhhhhhhhhhhhhh
17:17:12*rockcavera joined #nim
17:25:16FromDiscord<vindaar> om3ga, the PR is merged and a new version tagged. See the example (`examples/fig21_error_band.nim`). Should be easy to adjust to your use case. Ping me if something is unclear / you need anything else
17:42:22*xet7 joined #nim
17:51:54*advesperacit joined #nim
17:52:39FromDiscord<ayakasakura> https://sakuraayaka.bandcamp.com/track/-
17:55:11*beholders_eye quit (Ping timeout: 264 seconds)
18:20:39*xet7 quit (Remote host closed the connection)
19:25:28NimEventerNew question by Muhit Raihan: How to serve acme-challenge file dynamically with Jester REST API?, see https://stackoverflow.com/questions/78300687/how-to-serve-acme-challenge-file-dynamically-with-jester-rest-api
19:34:54*ntat quit (Quit: Leaving)
19:37:09*xet7 joined #nim
19:55:51*beholders_eye joined #nim
20:55:15FromDiscord<grumblygibson> In reply to @vindaar "ah, so you're guy": I'd love to! Give me some to get to it.↵Funny you never fever needed it - It's so different in each domain. In our replication experiments most figures rely on those kind of error plots because the density of points is so high if we include all the data that we might as well just make a shaded error region (ribbon) otherwise the figure is a mess to look at.
20:55:28FromDiscord<grumblygibson> (edit) "In reply to @vindaar "ah, so you're guy": I'd love to! Give me some ... to" added "time"
20:55:44FromDiscord<grumblygibson> (edit) removed "fever"
21:02:03FromDiscord<ebahi> sent a code paste, see https://play.nim-lang.org/#pasty=ZGzZotqUKrfx
21:03:52FromDiscord<ebahi> sent a code paste, see https://play.nim-lang.org/#pasty=heYdGSFFRjcX
21:04:43FromDiscord<ebahi> (edit) "https://play.nim-lang.org/#pasty=CFGVjVDbVkld" => "https://play.nim-lang.org/#pasty=gwJRkCyGAcNe"
21:06:29FromDiscord<ebahi> i tried importing segfaults but it caused the compilation to just stop and be blank
21:12:57*krux02 joined #nim
21:13:50FromDiscord<Elegantbeef> Use nim directly and see what happens
21:16:52FromDiscord<ebahi> In reply to @Elegantbeef "Use nim directly and": how?
21:17:17*krux02 quit (Ping timeout: 240 seconds)
21:18:18FromDiscord<Elegantbeef> nim c -r your.nim
21:19:28FromDiscord<ebahi> `syncio.nim(767) open↵Error: unhandled exception: cannot open: ~/.mozilla/firefox/profiles.ini [IOError]↵Error: execution of an external program failed: '/home/ebahi/Documents/ks_pm/src/ks_pm.out'`
21:19:34FromDiscord<ebahi> but i can access profiles.ini
21:24:42FromDiscord<Elegantbeef> probably need to call `expandTilde`
21:27:28*advesperacit quit ()
21:32:20FromDiscord<ebahi> In reply to @Elegantbeef "probably need to call": it worked! thank you
21:40:49FromDiscord<ebahi> but now i get a warning: `Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]`↵on the linuxProfiles variable
21:46:26*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
21:47:26*xutaxkamay joined #nim
23:16:19*rockcavera quit (Read error: Connection reset by peer)
23:17:12*rockcavera joined #nim