<< 11-04-2022 >>

00:00:04*lumidify quit (*.net *.split)
00:00:04*vicecea quit (*.net *.split)
00:00:05*mal`` quit (*.net *.split)
00:00:05*NimEventer quit (*.net *.split)
00:00:05*meowray quit (*.net *.split)
00:00:15*tk quit (Quit: Well, this is unexpected.)
00:00:43*meowray joined #nim
00:00:45FromDiscord<Elegantbeef> Odd
00:01:03*NimEventer joined #nim
00:01:08FromDiscord<huantian> are you trying to build choosenim? or
00:01:40*tk joined #nim
00:02:19FromDiscord<huantian> wait no nvm ighnore me
00:02:19fallbacktrying to build nim
00:03:15*meowray quit (Changing host)
00:03:15*meowray joined #nim
00:03:20fallbackshould i git checkout origin/version-1-6
00:04:07*mal`` joined #nim
00:05:17*lumidify joined #nim
00:06:19fallbacki installed git curl wget gmake pcre libsass
00:06:38fallbackis something missing?
00:06:53fallbackidk what is std/os
00:07:06FromDiscord<Elegantbeef> It's a library
00:07:13FromDiscord<Elegantbeef> Did you try using choosenim? Or just going to build from source?
00:07:54termerDoes anyone know how to create an array literal with macros? I can't find any examples on it, and there's no constructor for bracket expr other than newNimNode
00:08:10termerI need to create an array literal based on the contents of a file
00:08:33FromDiscord<Elegantbeef> you emit a `nnkBracket` with the contents you want
00:08:50termerhow would I do that
00:08:58termerI'm just now learning macros
00:09:16FromDiscord<Elegantbeef> read the file then do `result = nnkBracket.newTree` then `result.add element`
00:09:27termerthanks
00:10:34fallbackmaybe i need to install old nim 1.2 first?
00:10:52FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3UNH
00:11:40FromDiscord<Elegantbeef> What are you presently doing fallback
00:11:48FromDiscord<Elegantbeef> Are you installing from source or using choosenim?
00:12:35FromDiscord<Elegantbeef> Either way uninstall the version you have installed
00:12:39fallbacki have nim source from git clone https://github.com/nim-lang/Nim
00:12:54FromDiscord<Elegantbeef> Ok and you ran `./build_all.sh`?
00:13:02fallbacki uninstall nim 1.2 from openbsd pkg_add
00:13:04fallbackyes
00:13:24fallbackbuild_all.sh has that failure
00:13:26FromDiscord<Elegantbeef> I highly suggest using choosenim if it works for you. Though no clue if it works with BSD
00:13:50FromDiscord<Elegantbeef> Ok that's an odd error
00:14:25FromDiscord<Elegantbeef> does there exist an `os.nim` inside `lib/pure`?
00:14:26fallbackwhen i google for std/os it looks like c standard library
00:14:53FromDiscord<Elegantbeef> `std/os` is the Nim os library
00:14:56termerchoosenim is what you should use
00:15:16termeranything in `std` is part of the nim stardard library
00:15:24FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/releases/tag/v1.6.4 is what you should download anyway
00:15:24fallbackhttps://github.com/nim-lang/Nim
00:15:26FromDiscord<Elegantbeef> Stable Nim
00:15:28termereverything in std/system.nim is implicitly imported
00:15:32fallbackoops
00:15:37fallbacksorry wrong paste
00:16:07fallback-rw-r--r-- 1 root wsrc 130147 Apr 10 20:04 os.nim
00:16:15FromDiscord<Elegantbeef> Eh termer we're just trying to get the compiler to work no need for that explanation yet 😛
00:16:25termerlol fair enough
00:16:26FromDiscord<Elegantbeef> Ok
00:16:41FromDiscord<Elegantbeef> So then i'd say either get that release or checkout version 1-5
00:16:41FromDiscord<Elegantbeef> 1-6 i mean
00:17:30FromDiscord<Elegantbeef> I've never hadd this lacking `std/os` issue before, you're certain `nim` isnt in your path right?
00:18:36fallbacki did git checkout origin/version-1-6
00:18:52fallbackright nim is not installed
00:19:11fallback> nim
00:19:11fallback-bash: nim: command not found
00:20:05fallbackSorry, your platform ($platform) is not supported by choosenim.
00:20:17FromDiscord<Elegantbeef> Ah ok thought it wasnt
00:20:31FromDiscord<Elegantbeef> Dont know why BSD isnt supported but meh
00:22:23fallbackthere is version 1.2 supported but it is too old
00:22:26FromDiscord<Elegantbeef> Same issue on 1.6?
00:22:57fallbackif i install 1.2 can i use that to build 1.6?
00:23:17FromDiscord<Elegantbeef> Building from source bootstraps
00:23:35FromDiscord<Elegantbeef> So there is no reason to have Nim installed to build from source
00:23:38FromDiscord<Elegantbeef> If it doesnt work it should
00:24:37fallbackhm
00:25:07FromDiscord<Elegantbeef> What's the entire output from the `build_all.sh`?
00:27:02fallbackone sec plz
00:27:18fallbackthis is a long pastebin :)
00:27:39fallbackhm i think it is too long
00:30:58fallbackhttps://paste.ircnow.org/0pez8t67c1irclun8huf
00:31:04fallbacki hope that works :)
00:31:35FromDiscord<Elegantbeef> Yep
00:31:38fallbacki think it works
00:31:44fallbackok good :)
00:31:57fallbackfirst time failed
00:34:21fallbacki found something
00:34:26fallbackhttps://github.com/nim-lang/Nim/issues/12103
00:34:29FromDiscord<Elegantbeef> Hmphh seems for some reason the `std/os` import isnt working probably due to the config
00:36:28fallbackthis vps is very new
00:37:01fallbacki only install updates and git curl wget gmake pcre libsass
00:37:37fallbackand bash so i can have shell history :)
00:38:44FromDiscord<huantian> I have no idea how openbsd works, can you just download the newer compiled version onto an older version of openbsd?↵I see nim was updated to 1.6.4 late last month
00:39:15fallbacki don't think that is for openbsd 7.0
00:39:34fallbackmaybe 1.6.4 will be in 7.1?
00:39:48fallback> ls lib/std/os*
00:39:48fallbackls: lib/std/os*: No such file or directory
00:40:14FromDiscord<huantian> looks like it, just browsing in <https://ftp.openbsd.org/pub/OpenBSD/7.1/packages/amd64/>
00:40:24FromDiscord<huantian> It seems nim has been updated to 1.6.4
00:40:37fallbackbright future :)
00:41:09fallbacki will be happy if that is supported in 7.1
00:41:30fallbackmaybe now i just wait for 7.1
00:45:33FromDiscord<huantian> I mean they were able to build nim somehow, there has to be a way to do it
00:47:20FromDiscord<!Patitotective> (someone knows why nimlime cant find `nim` in the PATH but if i type `nim` in the terminal works? :C)↵(and why even if i change `nim.executable` nimlime still calls `nim`)
00:47:44FromDiscord<!Patitotective> (why is it overwriting `nim_exe` https://github.com/nim-lang/NimLime/blob/master/core/configuration.py#L24 😕 )
00:51:25*SamuelMarks joined #nim
00:51:39FromDiscord<ratapenado> Hi, on the scale from impossible to doable, how difficult it would be to generate nim bindings from c/c++/rust code by someone who is learning nim and don't especially know c/c++/rust ?
00:52:40FromDiscord<Elegantbeef> You can use `futhark` for C
00:52:56FromDiscord<Elegantbeef> There is https://github.com/arnetheduck/nbindgen for rust
00:53:15FromDiscord<Elegantbeef> And then for C++ there is c2nim/nimterop but they require tinkering
00:53:30FromDiscord<Elegantbeef> You can generally ask for help around here to get some things explained
00:53:47FromDiscord<Elegantbeef> But ideally you know lowlevel Nim to make this easier
00:55:10FromDiscord<Elegantbeef> Fallback i'd suggest making an issue, or forum post to atleast get some movement towards support
00:55:36FromDiscord<Elegantbeef> You might be the one that gets it supported following suggestions by others
00:56:37*SamuelMarks quit (Ping timeout: 260 seconds)
00:59:17FromDiscord<ratapenado> Thanks @ElegantBeef ! I'm learning nim by writing a small app for managing ebooks, and I will probably need to call some not-nim library at one point
00:59:34FromDiscord<ratapenado> I will try to avoid it though
00:59:45FromDiscord<Elegantbeef> Me or someone else around can always help 😀
01:00:20FromDiscord<Elegantbeef> Eh if a library exists it makes more sense to use it than reimplement it if it's easier/faster
01:03:30FromDiscord<Elegantbeef> Really though if you want to use a library it should have a C-api
01:03:42FromDiscord<Elegantbeef> Otherwise i'd argue it's not aiming to be reused
01:05:20FromDiscord<ratapenado> Thanks !
01:05:50FromDiscord<!Patitotective> In reply to @Patitotective "(someone knows why nimlime": (i must have messed up something to make the best way to install nim not to work)
01:08:18FromDiscord<Elegantbeef> nimline might not use path
01:09:01FromDiscord<!Patitotective> (i think its an issue with my sublime config cause running sublime in safe mode worked as expected)
01:09:22FromDiscord<!Patitotective> (so nvm, choosenim is great)
01:14:45*elph quit (Quit: Connection closed for inactivity)
01:23:18FromDiscord<Elegantbeef> You either choosenim or gitnim
01:25:25FromDiscord<!Patitotective> (the problem is that when i launch sublime from its icon the path is wrong, if i launch sublime from the terminal it works)
01:25:46FromDiscord<Elegantbeef> The CWD isnt set properly
01:26:14FromDiscord<Elegantbeef> `setCurrendDir(getAppDir())`
01:26:21*lumo_e quit (Quit: Quit)
01:30:57*SamuelMarks joined #nim
01:38:34*SamuelMarks quit (Ping timeout: 272 seconds)
01:40:22FromDiscord<!Patitotective> (got it working by hardcoding the path in my own sublime build file https://forum.sublimetext.com/t/why-doesnt-sublime3-use-global-path-variable-and-how-can-i-force-it-to-use-it/39392/16 lol)
01:44:40*arkurious quit (Quit: Leaving)
01:49:18termerhow would I create a new object instance with macros?
01:49:25termerI don't know the term Nim uses for that
01:49:40termerlike MyObject(property: "value", prop2: "another value)
01:49:57FromDiscord<Elegantbeef> It's a nnkobjectconstr with nnkEqColonEq iirc
01:50:02FromDiscord<Elegantbeef> Dumptree is your friend
02:04:53*zeus-supreme1 joined #nim
02:07:42*zeus-supreme quit (Ping timeout: 246 seconds)
02:08:06FromDiscord<aph> sent a code paste, see https://paste.rs/g7h
02:08:15FromDiscord<Elegantbeef> arrays are static
02:08:17FromDiscord<Elegantbeef> So no
02:08:20FromDiscord<aph> sad
02:08:37FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/EGH
02:08:48FromDiscord<aph> yay
02:08:49FromDiscord<Elegantbeef> What you want seems to be a fixed size seq
02:09:18FromDiscord<Elegantbeef> In nim `static` generics are distinct types so `Foo[10] isnot Foo[1]`
02:10:01FromDiscord<aph> In reply to @Elegantbeef "What you want seems": i'm not sure if it's really "fixed size", because `baz` relies on `bar` and if `bar`'s value is different it isn't static hehe (oh no i dont know what i'm talking about)
02:10:19FromDiscord<aph> In reply to @Elegantbeef "In nim `static` generics": ohh
02:10:34FromDiscord<Elegantbeef> You want `bar` to be dynamic influencing the size of `baz`?
02:10:39FromDiscord<Elegantbeef> Or is this only assigned at compile time?
02:11:35FromDiscord<aph> In reply to @Elegantbeef "You want `bar` to": yes
02:12:15FromDiscord<aph> its not like `baz` will change though, `bar` depends on what the file defines
02:12:33FromDiscord<Elegantbeef> So then static will work
02:12:39FromDiscord<aph> 👍
02:12:42FromDiscord<aph> thanks
02:27:26*vicfred quit (Quit: Leaving)
02:33:40*vicfred joined #nim
02:36:21*vicfred_ joined #nim
02:38:51*vicfred quit (Ping timeout: 246 seconds)
03:17:20*wyrd quit (Quit: leaving)
03:35:34*kayabaNerve joined #nim
04:19:32FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/zyw
04:20:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3UOz
05:06:15*slowButPresent quit (Quit: leaving)
05:29:50*wyrd joined #nim
05:31:48*nisstyre quit (*.net *.split)
05:31:48*systemdsucks quit (*.net *.split)
05:31:48*nullsh quit (*.net *.split)
05:31:49*xaltsc quit (*.net *.split)
05:31:49*ormiret quit (*.net *.split)
05:31:58*systemdsucks joined #nim
05:32:05*ormiret joined #nim
05:32:21*nisstyre joined #nim
05:32:28*nisstyre quit (Signing in (nisstyre))
05:32:28*nisstyre joined #nim
05:32:34*xaltsc joined #nim
05:32:38*xaltsc quit (Changing host)
05:32:38*xaltsc joined #nim
05:33:35*nullsh joined #nim
05:34:12FromDiscord<Solitude> i like your prs, beef. somehow every other fixes some annoyance ive already encountered in my own code.
05:36:34FromDiscord<Elegantbeef> Thanks, i fix stuff that's wrong
05:37:22FromDiscord<Elegantbeef> This stuff for some reason goes unnoticed i guess, small fixes that make the language nicer to use
05:42:21NimEventerNew thread by Miran: Nim 1.6.6 release candidate, see https://forum.nim-lang.org/t/9100
05:43:09FromDiscord<Elegantbeef> Ah nice, let's hope my two open PRs can land for 1.6.6 🙂
05:43:26*NimBot joined #nim
05:43:58FromDiscord<Elegantbeef> Well solitude if you have any issues you want to get fixed i can look
05:44:08*dom96 joined #nim
05:44:29FromDiscord<narimiran> In reply to @Elegantbeef "Ah nice, let's hope": which ones?
05:44:44FromDiscord<narimiran> ok, i think i found them 🙂
05:44:56*drewr joined #nim
05:45:32*reversem3[m] joined #nim
05:45:40FromDiscord<morgan> ok so i have a variable storing a proc, how do i call it? it seems to not be being called
05:45:44FromDiscord<Elegantbeef> The streams and openarray
05:45:48FromDiscord<creikey> `var consoleLog = newConsoleLogger(fmtStr=fmtStr)`↵any way to use a console logger like this across threads without passing it?
05:45:50FromDiscord<Elegantbeef> `myVar()`
05:45:56FromDiscord<huantian> I should get that await error wrapped up lmao
05:46:19FromDiscord<Elegantbeef> make them on the threads is the only way i know of crikey
05:46:29FromDiscord<creikey> In reply to @Elegantbeef "make them on the": oh I can just make this in a proc
05:46:31FromDiscord<creikey> that's not too bad
05:46:36FromDiscord<morgan> In reply to @Elegantbeef "`myVar()`": hm so i'm doing that but it looks like it's not being called
05:46:45FromDiscord<Elegantbeef> Code?
05:46:59FromDiscord<creikey> but var rollingLog = newRollingFileLogger("rolling.log", fmtStr=fmtStr)
05:47:00FromDiscord<creikey> will that work
05:47:03FromDiscord<creikey> like calling it twice
05:47:05FromDiscord<creikey> correctly use the log
05:47:06FromDiscord<Elegantbeef> File loggers will not
05:47:22FromDiscord<morgan> wait one sec i think the problem is elsewhere
05:47:33FromDiscord<Elegantbeef> The logging api is not thread safe really, i'd suggest making a thread that handles the logging that your others call
05:47:48FromDiscord<Elegantbeef> so a `Channel[(LogLevel, string)]`
05:47:56FromDiscord<huantian> Beef stole my words :p
05:48:01FromDiscord<Elegantbeef> Then you log and it sends it to the logging thread
05:49:21FromDiscord<creikey> In reply to @Elegantbeef "so a `Channel[(LogLevel, string)]`": this gets rid of the nice varargs
05:49:34FromDiscord<creikey> like `info "Some information: ", myVar`
05:49:37FromDiscord<creikey> & is a curse
05:49:50FromDiscord<Elegantbeef> You can always make it work that way
05:49:54FromDiscord<creikey> will this be better in nim 2 or is multithreaded logging never threadsafe
05:49:55FromDiscord<Elegantbeef> You drongo
05:49:58FromDiscord<creikey> In reply to @Elegantbeef "You drongo": drongo???
05:50:03FromDiscord<Elegantbeef> Yes
05:50:08FromDiscord<Elegantbeef> Nim
05:50:13FromDiscord<creikey> In reply to @Elegantbeef "You can always make": I don't want to ask how because I think that's too general of a question
05:50:13FromDiscord<Elegantbeef> This is down to the logging API
05:50:29FromDiscord<creikey> is it just like
05:50:34FromDiscord<creikey> how do you varargs
05:50:35FromDiscord<creikey> of any type
05:50:49FromDiscord<Elegantbeef> Consider looking at the source of `std/logging`
05:50:56FromDiscord<creikey> wait I got it
05:51:51FromDiscord<creikey> sent a code paste, see https://paste.rs/zne
05:51:58FromDiscord<Elegantbeef> Should be yep
05:52:17FromDiscord<creikey> In reply to @Elegantbeef "Consider looking at the": why do they use template instead of proc?
05:52:19FromDiscord<creikey> is template always inlined
05:52:47FromDiscord<Elegantbeef> Yes
05:53:25FromDiscord<Elegantbeef> Logging is relatively small so you could change it to be a thread safe api
05:56:36FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/tg2
05:56:40FromDiscord<Elegantbeef> Instead of all the top level API
05:57:36FromDiscord<Elegantbeef> Actually i guess you dont even really need to modify it since it's all thread vars
05:57:49FromDiscord<huantian> Threading so fun!
05:58:22FromDiscord<Elegantbeef> Eh this isnt too bad to be fair
06:01:08FromDiscord<morgan> In reply to @MorganAlyssa "wait one sec i": yep fixed it
06:01:26FromDiscord<morgan> :rubberduck:
06:02:00FromDiscord<huantian> In reply to @Elegantbeef "Eh this isnt too": True
06:08:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3UOZ
06:09:33FromDiscord<Elegantbeef> You then import that library and ensure you call create thread before you log and you're golden
06:10:51FromDiscord<Elegantbeef> Guess you dont even need the channel exported
06:11:02FromDiscord<Elegantbeef> And see how simple this is huan, threading is fun when it's' this simple 😛
06:12:29*rockcavera quit (Remote host closed the connection)
06:20:28FromDiscord<huantian> Clean 👌
06:22:30*SamuelMarks joined #nim
06:27:11*SamuelMarks quit (Ping timeout: 256 seconds)
06:50:01*vicfred_ quit (Quit: Leaving)
06:53:28*jjido joined #nim
07:07:40*PMunch joined #nim
07:09:41*ltriant quit (Ping timeout: 256 seconds)
07:28:33*gsalazar joined #nim
07:39:37*ltriant joined #nim
07:43:10*kayabaNerve quit (Read error: Connection reset by peer)
07:43:30*kayabaNerve joined #nim
07:51:52*kayabaNerve quit (Remote host closed the connection)
07:53:04PMunchHmm, anyone here familiar with plotly?
07:53:17*kayabaNerve joined #nim
07:57:17*kayabaNerve quit (Remote host closed the connection)
07:57:57*kayabaNerve joined #nim
07:59:33PMunchI just want to control the colour of each line in my graph :(
08:10:19*jmdaemon quit (Ping timeout: 256 seconds)
08:15:50FromDiscord<jmgomez> https://plotly.com/python/discrete-color/ (Explicitly Constructing a Color Sequence) see if that works↵I hate pandas, numpy, etc. apis
08:19:04FromDiscord<jmgomez> sent a code paste, see https://paste.rs/GSJ
08:19:38FromDiscord<jmgomez> Am I missing something?
08:23:20PMunchI'm using the nim-plotly wrapper
08:23:55PMunch@jmgomez, you need to compile Nim with `nim cpp` by the looks of it
08:24:50FromDiscord<jmgomez> Oh never use it, doesnt it respect the api?
08:24:57FromDiscord<jmgomez> Yeah, Im compiling it with nim cpp
08:25:24FromDiscord<jmgomez> still got the error, I think it's because it's trying to export it via extern C. Not sure why though
08:25:32PMunchIt does, but I don't think it has the whole API wrapped
08:25:42FromDiscord<Elegantbeef> `dynlib`
08:26:07FromDiscord<Elegantbeef> I feel like dynlib makes it think it's outputting C compliant code\\
08:27:15*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
08:30:30FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3UPz
08:31:15FromDiscord<jmgomez> In reply to @PMunch "It does, but I": I think in the python API there is a sort of dictionary to set confs of the chart as string. Maybe that's expose?
08:35:06*zeus-supreme joined #nim
08:37:57*zeus-supreme1 quit (Ping timeout: 246 seconds)
08:56:47FromDiscord<jmgomez> In reply to @jmgomez "that was it but": agh I think the problem is in the Unreal Engine side not on nim's side of things https://forums.unrealengine.com/t/cant-link-a-library/396690/9
08:57:34PMunchHmm, anyone here know perl?
09:13:12*jjido joined #nim
09:18:29FromDiscord<jmgomez> In reply to @Elegantbeef "`dynlib`": is that what takes care about the mangle?
09:18:47FromDiscord<jmgomez> Im starting to think that's the problem
09:18:56FromDiscord<Elegantbeef> I do not know for C++ interop
09:19:12FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3UPS
09:19:19FromDiscord<Elegantbeef> Nice compiler error hmmm
09:20:13FromDiscord<hmmm> hey I didn't break it, I won't pay for damages 🧐
09:20:37FromDiscord<Elegantbeef> No ii mean no context
09:20:43FromDiscord<Elegantbeef> No code no full message
09:24:04FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3UPU
09:24:08FromDiscord<hmmm> and made it for i,v
09:24:18FromDiscord<hmmm> wanted to use the counter and the line
09:24:21FromDiscord<Elegantbeef> well there you go
09:24:43FromDiscord<hmmm> hmm usually it works when I do it lol 🤔
09:24:49FromDiscord<Elegantbeef> `import std/enumerate` `for i, line in enumerate bunchalines.splitlines`
09:24:52FromDiscord<Elegantbeef> No it doesnt
09:25:01FromDiscord<hmmm> I mean, not for splitlines,
09:25:09FromDiscord<Elegantbeef> It normally works when you allow it to implicitly calls `pairs`
09:25:12FromDiscord<hmmm> I just assumed it would work with splitlines too
09:25:19FromDiscord<Elegantbeef> `splitlines` is an iterator that yields `int`
09:25:21FromDiscord<Elegantbeef> string i mean
09:25:27FromDiscord<hmmm> hmm
09:25:44FromDiscord<Elegantbeef> Use enumerate and be happy
09:25:55FromDiscord<Elegantbeef> It's better than implicit (x, y) anyway
09:25:57FromDiscord<hmmm> works like for i,v?
09:26:19FromDiscord<Elegantbeef> no i lied cause i wanted to wast your time
09:26:23FromDiscord<Elegantbeef> Yes it works for i, v
09:26:36FromDiscord<hmmm> hehe beefy you ol doggy ❤️
09:27:28*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
09:32:57*m5zs7k quit (Ping timeout: 272 seconds)
09:37:42*m5zs7k joined #nim
09:40:15*kayabaNerve quit (Read error: Connection reset by peer)
09:41:06*kayabaNerve joined #nim
09:43:07FromDiscord<hmmm> it worked beefy 👑
09:45:47*kayabaNerve quit (Ping timeout: 240 seconds)
09:46:08*kayabaNerve joined #nim
09:48:56*kayabaNerve quit (Read error: Connection reset by peer)
09:49:09*kayabaNerve_ joined #nim
09:50:58*noxnivi joined #nim
09:51:03noxnivigood day
09:52:01FromDiscord<Rika> Good day to you too, what's up?
09:58:46*SamuelMarks joined #nim
10:02:59FromDiscord<untoreh> sent a code paste, see https://paste.rs/muL
10:03:04*SamuelMarks quit (Ping timeout: 248 seconds)
10:09:22FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3UQc
10:10:22FromDiscord<exelotl> https://nim-lang.org/docs/manual.html#templates-varargs-of-untyped
10:11:29FromDiscord<Rika> I didn’t know you could declare a default for a parameter that gets its type later, though I should have expected it I guess
10:12:05FromDiscord<exelotl> I don't think the `: int` determines the type of `a`
10:13:02FromDiscord<exelotl> `proc f(a=0, b: uint): int = a + b` doesn't compile because a is an `int` and b is a `uint`
10:16:44*kayabaNerve_ quit (Remote host closed the connection)
10:16:53*kayabaNerve joined #nim
10:19:47FromDiscord<Rika> Really
10:20:07FromDiscord<Rika> I think I just forgot then
10:25:32*jjido joined #nim
10:27:40*kayabaNerve quit (Ping timeout: 250 seconds)
10:30:51*kayabaNerve joined #nim
10:47:10*kayabaNerve quit (Ping timeout: 250 seconds)
10:47:22*kayabaNerve joined #nim
10:48:57FromDiscord<Solitude> sent a code paste, see https://paste.rs/e5c
10:52:49FromDiscord<exelotl> lol
10:53:08FromDiscord<exelotl> I've been using it for years xD https://media.discordapp.net/attachments/371759389889003532/963028923715829800/Screenshot_from_2022-04-11_11-52-47.png
10:56:57FromDiscord<exelotl> oh wait I cropped out the version of `setup` that's actually used
10:57:33FromDiscord<exelotl> but yeah `varargs[untyped]` is pretty good... though I've had instances where it crashed the compiler :x
10:58:17FromDiscord<Solitude> yeah, man, you're walking on the edge
11:10:37*kayabaNerve quit (Remote host closed the connection)
11:10:45*kayabaNerve_ joined #nim
11:16:25*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
11:29:05*kayabaNerve joined #nim
11:30:30*kayabaNerve_ quit (Ping timeout: 246 seconds)
11:32:44*kayabaNerve_ joined #nim
11:34:07*kayabaNerve quit (Ping timeout: 240 seconds)
11:41:49FromDiscord<Phil> In reply to @PMunch "Hmm, anyone here know": Not anymore, that knowledge went down the drain 5 years ago
11:41:53FromDiscord<Recruit_main707> In reply to @exelotl "`proc f(a=0, b: uint):": isnt that wrong?
11:44:13PMunch@Phil, I think I managed to figure it out :)
11:45:03FromDiscord<Phil> In Biology perl used to be so damn ubiquitous
11:45:21FromDiscord<Phil> NCBI still maintains its perl-code-examples to talk to their API
11:46:30*kayabaNerve_ quit (Remote host closed the connection)
11:46:41*kayabaNerve_ joined #nim
11:46:56FromDiscord<exelotl> no, it's correct. The parameters of a proc are a list of 1 or more `IdentDefs` (identifier definitions).↵Each identdefs has the following form (square brackets meaning "optional")↵`name1 [, name2 [, ...]] [: type] [= value]`
11:47:29FromDiscord<exelotl> so `a = 0` is one identdefs, `b: uint` is another
11:48:03FromDiscord<Recruit_main707> id say thats misleading, i may open an issue/rfc later
11:48:08*xet7 joined #nim
11:51:27*kayabaNerve_ quit (Ping timeout: 240 seconds)
11:51:37PMunchHmm, there are a couple small things I'd like from Perl in Nim now that I've used it a little bit
11:51:46*kayabaNerve joined #nim
11:52:04FromDiscord<Zoom> Let's hear it↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:53:14PMunch`rint` is nice, having to do `round.int` is annoying. Unpacking and repacking of tuples and arrays are nice (although might have been possible to do cleaner if it all was written in Nim from the beginning). Neo is a nice library, but it lacks features to easily create matrices from columns (at least that I could find)
11:53:40PMunchFor the most part though Nim is much nicer :)
11:54:11PMunchAlthough I've run into style insensitivity being annoying for the first time ever when dealing with colour spaces..
11:54:30FromDiscord<exelotl> In reply to @Recruit_main707 "id say thats misleading,": pretty sure it's working as intended. Keep in mind that a default parameter followed by a non-default parameter is very uncommon, so if you're writing code that looks like this you should know how the compiler will parse it
11:55:16*noxnivi quit (Quit: Leaving)
11:57:26PMunchWell we have unpacking of tuples, but unpacking arrays would be nice, after all they are static in size
11:57:52PMunchTo be honest I would like to have unpacking of sequences as well
12:00:13*sagax joined #nim
12:00:50FromDiscord<Recruit_main707> sent a long message, see http://ix.io/3UQF
12:03:27NimEventerNew thread by Archnim: Strange ambiguous call error, see https://forum.nim-lang.org/t/9101
12:07:20*kayabaNerve quit (Ping timeout: 250 seconds)
12:16:02*kayabaNerve joined #nim
12:29:43FromDiscord<frobnicate> How is it unrolling loops works, or whatever it's called?
12:35:24FromDiscord<Zoom> You mean manual&↵(@frobnicate)
12:37:54FromDiscord<frobnicate> Probably? I know the compiler does it to some degree, but I'm mostly working on vector math, so I have vectors that do the same operations and scale linearly, so I was wondering if there's even any point in implementing something on my side?
12:38:22FromDiscord<Zoom> sent a code paste, see https://play.nim-lang.org/#ix=3UQM
12:38:43FromDiscord<frobnicate> I see
12:39:11FromDiscord<frobnicate> There's no generic way of implementing it without using a macro to change the AST?
12:39:30FromDiscord<Rika> Why the macro avoidance?
12:39:41FromDiscord<frobnicate> Because I'm bad at it 🙃
12:39:58FromDiscord<Solitude> if you avoid it for a bit longer, youll become good for sure
12:40:04FromDiscord<frobnicate> Thanks
12:40:11FromDiscord<frobnicate> I'll look into it
12:42:34FromDiscord<Zoom> I don't think you really need to make a macro for it, as you're not supposed to do it often. Unrolling can actually have negative perf. effect, so you need to apply it discriminatingly and only combined with benchmarking.
12:44:04FromDiscord<frobnicate> I see
12:44:35FromDiscord<Rika> thats a good point
12:45:18FromDiscord<Zoom> Well, if your macro can gen two versions of the loop and measure both of them, then we're talking \:P
12:45:31FromDiscord<exelotl> there was an {.unroll.} pragma but it never got implemented and was eventually removed
12:46:00FromDiscord<exelotl> macro-wise a very simple one would be something like this: https://play.nim-lang.org/#ix=3xc6
12:46:00FromDiscord<frobnicate> I'm already struggling enough with the math as is, I think I'm trying to find a balance between performance and what I actually have brains for
12:46:25FromDiscord<exelotl> (I couldn't make it work for any iterable though because generic macros aren't a thing)
12:46:37FromDiscord<Zoom> Does your program use threading?
12:46:42FromDiscord<frobnicate> That's a http for python
12:46:57FromDiscord<frobnicate> In reply to @Zoom "Does your program use": Not yet 😕
12:47:00FromDiscord<exelotl> uuuh wtf
12:47:13FromDiscord<exelotl> playground is bugging out lol
12:47:21FromDiscord<Zoom> If not, and it's theoretically can be paralleled, the gains are much higher there. I wouldn't care about loop unrolling then
12:47:44PMunch@exelotl, I'm on it
12:47:47FromDiscord<frobnicate> I see
12:47:58FromDiscord<exelotl> In reply to @frobnicate "That's a http for": https://play.nim-lang.org/#ix=3UQN
12:48:07FromDiscord<frobnicate> Is there a "baby's first threading" for Nim?
12:49:37FromDiscord<Zoom> Do you have any previous experience with it? The official docs are very sparse on the topic. There's a few words on the topic in Nim In Action book.
12:49:44*kayabaNerve_ joined #nim
12:49:55PMunch@frobnicate, not yet
12:50:10FromDiscord<Zoom> Anyway, there's a couple of examples there https://nim-lang.org/docs/threads.html
12:50:11FromDiscord<frobnicate> I've used Actions and such in C#
12:50:19FromDiscord<frobnicate> But that's not threading
12:50:32*kayabaNerve quit (Ping timeout: 248 seconds)
12:50:35PMunchI have been meaning to write one, but I'm waiting for more information on ARC..
12:50:52FromDiscord<xflywind> In reply to @frobnicate "How is it unrolling": you can also use gcc unroll
12:51:05FromDiscord<xflywind> sent a code paste, see https://paste.rs/fcp
12:51:08FromDiscord<xflywind> generate
12:51:22*kayabaNerve_ quit (Remote host closed the connection)
12:51:22FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=3UQO
12:51:41*kayabaNerve_ joined #nim
12:52:16FromDiscord<Zoom> May be if you could explain what your program does, where's the performance bottleneck and what you're trying to achieve, we could help you↵(@frobnicate)
12:52:56FromDiscord<frobnicate> Oh yeah sorry. Just writing an OpenGL renderer, and wanted to do the math myself to force myself to learn it. So I'm just making a math pckg
12:53:42FromDiscord<Rika> threading for opengl kind of math?
12:53:52FromDiscord<frobnicate> I should probably try to move some of the math over to shaders honestly
12:54:28FromDiscord<frobnicate> In reply to @Rika "threading for opengl kind": Yeah like transforms, perspective, scaling, all that jazz
12:54:43FromDiscord<Rika> doesnt sound like something that would need threading
12:54:48FromDiscord<frobnicate> alright
12:55:15FromDiscord<Rika> is this for learning or you're looking for performacne
12:55:30FromDiscord<Rika> if its for learning then ok, but if you're improving performance i think you should go the shader route instead
12:56:03FromDiscord<frobnicate> Learning mostly, but I'm also trying to do the performance improvements I read about. I also don't have a solid benchmarking setup so I know it's kinda stupid
12:57:47FromDiscord<exelotl> PMunch: I think it's an ix issue? First it generated me a URL with a space in it, then it generated me a URL for somebody else's code
12:59:35FromDiscord<Zoom> https://github.com/treeform/shady↵https://github.com/yglukhov/nimsl↵(@frobnicate)
13:00:09FromDiscord<frobnicate> awesome! thanks
13:04:16PMunch@exelotl, yeah I've seen ix doing weird stuff lately
13:06:45*rockcavera joined #nim
13:06:45*rockcavera quit (Changing host)
13:06:45*rockcavera joined #nim
13:22:25*SamuelMarks joined #nim
13:33:43FromDiscord<d4rckh> can i have a proc return multiple stuff? e.g. a sequence and an integer?
13:34:32FromDiscord<Rika> put it in a tuple
13:34:40FromDiscord<d4rckh> oh yeah thanks
13:34:41PMunch@d4rckh, sure just use an anonymous tuple
13:34:51FromDiscord<d4rckh> figured out
13:34:53FromDiscord<d4rckh> tysm
13:41:24*SamuelMarks quit (Ping timeout: 246 seconds)
13:49:23FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3UQZ
13:49:38FromDiscord<TryAngle> is the channel initilized?
13:50:04FromDiscord<d4rckh> yes, forgot to include `chan.open()` right after i defined it
13:50:17FromDiscord<TryAngle> but that's a diff error nvm.
13:50:18FromDiscord<d4rckh> i was able to send and receive strings, but not custom types
13:50:46FromDiscord<Rika> what is the type def
13:51:05FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3UR0
13:55:47*arkurious joined #nim
13:56:00FromDiscord<d4rckh> oof, sorry for not sending the full error
13:56:23FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3UR1
13:57:14FromDiscord<TryAngle> `Channel[void]` 🤔
13:57:33FromDiscord<Rika> Channel[void]?? how in the fuck
13:58:07FromDiscord<d4rckh> my channel is `var chan: Channel[VafFuzzResult]`
13:58:13FromDiscord<d4rckh> <:big_think:729161514899996744>
13:58:35FromDiscord<Rika> thats weirdddd
13:58:55FromDiscord<Rika> can you show the whole code?
13:59:07FromDiscord<d4rckh> one sec, let me push on github
14:00:24FromDiscord<d4rckh> @Rika https://github.com/d4rckh/vaf/blob/vaf-threads/src/vaf.nim#L109
14:00:24FromDiscord<d4rckh> here
14:02:24FromDiscord<Rika> it might be because its not a global (because it is inside the try except)
14:03:16FromDiscord<d4rckh> It works completely fine when I'm using string
14:05:36*PMunch quit (Quit: Leaving)
14:07:11FromDiscord<Rika> let me look hader
14:07:12FromDiscord<Rika> harder
14:07:15*nrds quit (Remote host closed the connection)
14:07:44FromDiscord<Rika> i have a guess
14:07:49FromDiscord<Rika> its because you named your modules uppercase
14:07:57FromDiscord<Rika> and its mistaking the module for the type
14:08:45*nrds joined #nim
14:10:15FromDiscord<d4rckh> that... worked
14:10:33FromDiscord<d4rckh> wow
14:10:45FromDiscord<TryAngle> hmm I tried uppercase module also now and it works for me 🤔
14:11:48*kayabaNerve joined #nim
14:12:02FromDiscord<Rika> not uppercase module
14:12:02FromDiscord<Rika> i mean
14:12:06FromDiscord<Rika> same name for module and type
14:12:39FromDiscord<TryAngle> ah true
14:12:59*kayabaNerve_ quit (Ping timeout: 256 seconds)
14:13:40*tiorock joined #nim
14:13:40*tiorock quit (Changing host)
14:13:40*tiorock joined #nim
14:13:40*rockcavera is now known as Guest3665
14:13:40*tiorock is now known as rockcavera
14:14:07*Guest3665 quit (Ping timeout: 256 seconds)
14:19:12*kayabaNerve quit (Ping timeout: 246 seconds)
14:19:19*djanatyn quit (Ping timeout: 250 seconds)
14:20:28*djanatyn joined #nim
14:26:25*SamuelMarks joined #nim
14:26:51*kayabaNerve joined #nim
14:30:46om3gahow to pass more than 2 parameters to threads? Just don't get it by reading manual. I need to pass 5 params with type string, and one seq[string]
14:31:11FromDiscord<d4rckh> is there any way of converting a duration into a string of HH:MM:SS duration?
14:31:20*SamuelMarks quit (Ping timeout: 248 seconds)
14:31:33om3gaCompiler writes warning: got: <typedesc[string], typedesc[string], typedesc[string], typedesc[string], typedesc[string]>, but expected: <TArg>
14:32:04FromDiscord<Yardanico> In reply to @om3ga "how to pass more": use tuples
14:32:19FromDiscord<Yardanico> so Thread[(string, string, string, string, string)]
14:32:25FromDiscord<Yardanico> or you can just make a proper object with those fields and pass it instead
14:32:39om3gaYardanico, like this? - thr: array[1, Thread[tuple[param1: string, param2: string, param3 string,param4 string, param5: string]]]
14:33:00FromDiscord<Yardanico> yes, my example works too (it's anonymous tuples)
14:33:17om3gaYardanico, thanks I will try right now
14:37:57*SamuelMarks joined #nim
14:38:15FromDiscord<Rika> In reply to @d4rckh "is there any way": write your own in that case i believe
14:40:30FromDiscord<d4rckh> thats unfortunate
14:46:49FromDiscord<Yardanico> In reply to @d4rckh "is there any way": as a workaround you can just create a zero DateTime and add your duration to it
14:47:18FromDiscord<d4rckh> yeah thats what im doing rn
14:50:25FromDiscord<d4rckh> how do you get a zero datetime?
14:51:17FromDiscord<Daan Breur> i was thnking make a `DateTime` with the millis as time and then format it
14:51:51FromDiscord<Daan Breur> sent a code paste, see https://play.nim-lang.org/#ix=3UR8
14:52:05FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3UR9
14:55:19FromDiscord<Yardanico> In reply to @d4rckh "did it with this": you don't need this "parse"
14:55:24FromDiscord<Yardanico> just `newDateTime(0, 0)` is enough
14:55:25FromDiscord<Yardanico> and faster
14:55:41FromDiscord<Yardanico> sorry, initDateTime(
14:55:58FromDiscord<d4rckh> thanks!!!
14:56:00FromDiscord<Yardanico> ah nvm, i used time
14:56:48FromDiscord<Yardanico> although you might need to call `.utc` as well, not sure if you can do without it
14:56:59FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3URb
14:58:38FromDiscord<d4rckh> great
14:58:49FromDiscord<Yardanico> or you can just format manually
14:59:47FromDiscord<Rika> cant you just `initTime(0, 0).utc + a`
15:00:08*kayabaNerve quit (Ping timeout: 248 seconds)
15:01:09FromDiscord<huantian> Huh does Nim not have a equivalent to pythons TimeDelta?
15:01:41FromDiscord<Yardanico> TimeInterval ?
15:03:32*kayabaNerve joined #nim
15:05:01FromDiscord<huantian> Hm I have no idea where I was going with this
15:05:10FromDiscord<Daan Breur> kek
15:05:19*zeus-supreme1 joined #nim
15:08:40*zeus-supreme quit (Ping timeout: 248 seconds)
15:09:48*slowButPresent joined #nim
15:24:53*justsomeguy joined #nim
15:35:30*justsomeguy quit (Quit: WeeChat 3.4)
15:35:50*kayabaNerve quit (Ping timeout: 272 seconds)
15:37:21FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3URD
15:38:28nrds<Prestige99> Do you want like a 2 way map? Not sure what you want here
15:39:22FromDiscord<TryAngle> In reply to @nrds "<Prestige> Do you want": yes
15:39:27FromDiscord<TryAngle> also imagine I wrote : instead of =
15:39:37FromDiscord<TryAngle> (edit) "imagine" => "act like"
15:41:24FromDiscord<TryAngle> oh, this doesn't even work normally o_O
15:41:59nrds<Prestige99> https://nim-lang.org/docs/tables.html if you want a table but don't really know what you're trying to accomplish
15:43:34nrds<Prestige99> or maybe https://nim-lang.org/docs/manual.html#types-enumeration-types
15:45:08FromDiscord<huantian> You can just use parseEnum
15:45:10FromDiscord<huantian> https://nim-lang.org/docs/strutils.html#parseEnum%2Cstring
15:45:19FromDiscord<Phil> Enums are great
15:45:21FromDiscord<Phil> Enums are your friend
15:45:22FromDiscord<TryAngle> In reply to @nrds "<Prestige> https://nim-lang.org/docs/tables.html if": well I'm working with an external api where I often have ids that are different then the ones I use, so I want to convert between them without writing two maps
15:45:25FromDiscord<huantian> If your associated string is always the same as the name
15:45:47FromDiscord<TryAngle> In reply to @huantian "You can just use": not sadly because ↵1. the api is not consistent with its namings↵2. I have different namings
15:46:12nrds<Prestige99> Yeah an enum would probably work then
15:46:50FromDiscord<huantian> Well maybe you can just use your const Enum indexed array
15:47:00FromDiscord<huantian> Then make a compile time proc that inverts it
15:47:08FromDiscord<TryAngle> I still don't understand how riot games is able to go that inconsistent with their api types between their endpoints 😐
15:47:16FromDiscord<huantian> In reply to @huantian "Then make a compile": Into a table
15:47:26FromDiscord<TryAngle> biggest single game compay besides mojang
15:47:31FromDiscord<TryAngle> and they do this
15:47:32FromDiscord<TryAngle> 😐
15:48:54nrds<Prestige99> Riot has done some questionable stuff so I'm not surprised
15:49:13FromDiscord<huantian> You can probably like iterator over pairs of your enum indexed array, and inverse each pair and then toTable
15:50:19FromDiscord<huantian> `const StringToSummenor = summonerToString.pairs.toSeq.mapIt((it[1], it[0])).toTable`
15:50:22FromDiscord<huantian> Maybe this will work
15:51:20FromDiscord<TryAngle> In reply to @huantian "`const StringToSummenor = summonerToString.pairs.to": o_O
15:51:24FromDiscord<TryAngle> thanks I'll try that later
16:02:53FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3URK
16:04:02FromDiscord<exelotl> no need to generate the table yourself when `parseEnum` exists
16:04:47FromDiscord<TryAngle> In reply to @exelotl "no need to generate": nono they use multiple different ids / names at different places for the same thing
16:04:53FromDiscord<exelotl> ahh ok
16:05:08FromDiscord<TryAngle> It's pretty annoying 😐
16:05:17FromDiscord<TryAngle> and then ingame they use different names agian
16:05:17FromDiscord<TryAngle> XD
16:20:10FromDiscord<d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3URO
16:23:01FromDiscord<d4rckh> ok, it does, but slow, i wanna have a progress bar which updates every second, but also receive all messages instantly, not sure what to do
16:24:26FromDiscord<TryAngle> In reply to @d4rckh "ok, it does, but": u can do another loop
16:25:30FromDiscord<Rika> maybe sleep less long?
16:25:51FromDiscord<Rika> why the long sleep anyway? if you have code that executes for a long time, try having more than one thread processing
16:26:36FromDiscord<TryAngle> In reply to @TryAngle "u can do another": I mean another loop in that while loop that goes as long as tryRecv() returns something
16:27:03FromDiscord<TryAngle> sadly nim has no while let 😦
16:29:07om3gaheh, fun time with threads :) error: incompatible types when assigning to type ‘tySequence__sM4lkSb7zS6F7OVMvW9cffQ *’ from type ‘tySequence__sM4lkSb7zS6F7OVMvW9cffQ’. Can I pass IDs: var seq[string] to multiple thread?
16:31:25FromDiscord<d4rckh> In reply to @Rika "why the long sleep": actually, i changed the flow of the code a bit and achieved what i wanted without any sleep 😄
16:31:33FromDiscord<d4rckh> now its so fast
16:31:40om3gaYardanico, it worked after I switched to createThread[ThreadData] proc, as I understand createThread* expects no args to the threaded function
16:34:00*xet7 quit (Ping timeout: 248 seconds)
16:47:12*xet7 joined #nim
16:52:08*xet7 quit (Ping timeout: 260 seconds)
16:57:06*xet7 joined #nim
16:59:07FromDiscord<planetis> no it takes an args tuple
16:59:25FromDiscord<planetis> and a var seq[string] isn't going to work
17:00:33FromDiscord<planetis> you need to either use low level pointers provided you know what you're doing or a global or a sharedptr
17:00:41*xet7 quit (Remote host closed the connection)
17:01:00FromDiscord<planetis> all require some form of synchronization lock or atomic
17:01:13*xet7 joined #nim
17:03:32*Gustavo6046 joined #nim
17:03:37*jjido joined #nim
17:05:05om3gaplanetics, I did it using poiners before
17:05:26om3gaonly just difference was - the proc was void
17:05:57om3gaoh... bad news
17:06:31om3gaI need exactly sequences...
17:06:48*Gustavo6046 quit (Max SendQ exceeded)
17:07:19*Gustavo6046 joined #nim
17:10:04om3gawell, I may store that seq's in DB, and fetch them every time thread starts... may work as solution
17:13:45om3gaplanetics, what if I declare global seq, and global lock. when it would be required expanding tat seq's array, I just will use lock then. What you think?
17:14:33FromDiscord<Yardanico> that would work, but only with arc/orc
17:14:56om3gaYardanico_, great! yeah sure. I use orc
17:15:32om3gaso it seems threads in nim is just wrapper to posix threads? right?
17:16:03FromDiscord<Yardanico> well, they're not wrappers for posix threads specifically
17:16:05FromDiscord<Yardanico> they're wrappers for OS threads
17:16:23om3gaaha, thanks for explanation
17:24:32*sagax quit (Ping timeout: 250 seconds)
17:26:12FromDiscord<tandy> is there a way to concatenate `varargs[(string, string)]`?
17:26:37FromDiscord<leorize> varargs are openArray
17:27:30FromDiscord<leorize> so concat can just be done via a seq beforehand
17:28:28FromDiscord<tandy> thanks!
17:30:18*PMunch joined #nim
17:32:05*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
17:34:57*Lord_Nightmare joined #nim
17:37:28NimEventerNew thread by Arnetheduck: Nlvm updated, see https://forum.nim-lang.org/t/9102
17:43:56*xet7 quit (Remote host closed the connection)
17:45:04*xet7 joined #nim
17:45:20*xet7 quit (Remote host closed the connection)
18:07:28*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:29:22FromDiscord<jmgomez> How do you skip the ssl verification on a request with nim? (cert in the backend is invalid)
18:31:54*SamuelMarks quit (Ping timeout: 272 seconds)
18:39:01FromDiscord<morgan> is it possible to have a variant type switched with a bool or do i need to make a two value enum?
18:44:05FromDiscord<morgan> i switched it to an enum
18:44:47FromDiscord<morgan> i have so much variant-ness in this type lol
18:46:03FromDiscord<Solitude> you can switch with a bool
18:46:26FromDiscord<morgan> i was getting errors in vscode tho i didn't try to run it
18:46:37FromDiscord<morgan> this is in a type not in a proc
18:46:53FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#ix=3USy
18:47:19FromDiscord<Solitude> damn, that works?
18:47:25FromDiscord<morgan> yea
18:47:45FromDiscord<Solitude> i didnt know we can have nested cases in types
18:47:49PMunchWhy wouldn't it? :)
18:47:53FromDiscord<morgan> was working before i added the last 3 cases at the bottom, still gotta add stuff to other procs to make it work
18:48:08FromDiscord<Solitude> In reply to @PMunch "Why wouldn't it? :)": if i dont need it, i assume its not possible
18:48:27FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/963148538433376326/unknown.png
18:48:30*jmdaemon joined #nim
18:48:39FromDiscord<morgan> that
18:48:48FromDiscord<morgan> (edit) "that" => "that's weird it;'s shifted from what i selected"
18:49:01FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/963148683975753749/unknown.png
18:49:26FromDiscord<Solitude> you sure love indentation
18:49:29FromDiscord<morgan> i do
18:50:32PMunchMay I interest you in some style-guide compliant 2-space indents?
18:50:38FromDiscord<morgan> no
18:50:42PMunchSaves you from having to buy an ultrawide monitor
18:51:03FromDiscord<Solitude> perhaps `of` aligned with `case` may interest you?
18:51:23FromDiscord<morgan> i could fit that three times on just my larger monitor
18:51:52FromDiscord<morgan> i don't even have the vscode window full screened so i can see a bit of older code i sometimes reference for this
18:52:22FromDiscord<morgan> nah i like the ofs indented
18:53:09FromDiscord<morgan> here's some more code of mine :) https://media.discordapp.net/attachments/371759389889003532/963149723492048987/unknown.png
18:53:20FromDiscord<!Patitotective> 💀
18:54:08FromDiscord<morgan> i think the most indented anything is in this project is 13 levels
18:54:33FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/963150079169028136/unknown.png
18:54:39FromDiscord<morgan> i like indentation
18:54:47FromDiscord<Solitude> you even ran out of colors...
18:54:59PMunchWell, I'm not going to kind-shame
18:55:00FromDiscord<morgan> i have it looping i think 6 colors
18:55:15FromDiscord<morgan> and the whole set including the first one loops after 25 levels
18:56:23FromDiscord<Solitude> yeah, thats understandable, but one thing cant be forgiven - echo with parens...
18:56:39FromDiscord<morgan> In reply to @MorganAlyssa "": i think this is so 3\5\2\2 or 60 variations
18:56:46*SamuelMarks joined #nim
18:57:06FromDiscord<morgan> echo or any function without parens looks weird to me
18:58:05FromDiscord<!Patitotective> i dont write parens to almost any procedure cause its soooo tiring
18:58:36FromDiscord<!Patitotective> specifically echo, that should be for debug
18:58:47FromDiscord<morgan> oh yea that's all for debugging
18:58:51FromDiscord<morgan> the echos will be removed
18:59:45FromDiscord<morgan> tho i may have some verbose mode idk
19:00:47FromDiscord<morgan> i often use more parens than i need because it's easier to make sure math works the way i want that way, tho i do leave them off for conditionals (unless i have more than one condition and i wanna make sure it's executing right)
19:01:12*SamuelMarks quit (Ping timeout: 248 seconds)
19:01:42FromDiscord<jmgomez> can you add pragmas to test? or maybe overload somehow the template?
19:02:32FromDiscord<!Patitotective> @morgan that moment when you use another computer and need to reconfigure e v e r y t h i n g 💀
19:02:40FromDiscord<morgan> In reply to @jmgomez "can you add pragmas": oh so it could be compiled in a test mode with debug echoing?
19:03:41FromDiscord<jmgomez> no more like for example creating a test that handles async by using await instead of waitFor. Im ok with it, but just wondering
19:04:02PMunchPatiodetective, put all your config files in a git repo. git clone and you're done :)
19:04:19FromDiscord<morgan> oh yea that's a fancy way of doing it
19:04:21FromDiscord<morgan> reminds me i might make some more changes to saem's nim extension
19:04:45FromDiscord<morgan> wanna get it highlighting result and \`stuff\`
19:04:46FromDiscord<!Patitotective> In reply to @PMunch "Patiodetective, put all your": you have solved my life
19:05:44PMunchThen of course share them with us :) https://github.com/PMunch/Configuration
19:05:54PMunch(That is an old configuration)
19:06:16FromDiscord<!Patitotective> vim? 💀
19:06:42PMunchOf course
19:07:36FromDiscord<morgan> you could store a vscode settings json in github/whatever
19:07:43FromDiscord<Rika> It’s either vim, emacs, or wrong
19:07:54FromDiscord<Rika> I’m joking
19:07:56FromDiscord<!Patitotective> In reply to @Rika "It’s either vim, emacs,": wrong 😃
19:09:13PMunch@Rika, I'd accept Kakoune or Moe as well
19:10:29FromDiscord<Rika> ok
19:11:33FromDiscord<!Patitotective> just wrote an emoji as a commit message 🤡
19:21:36PMunchYou monster!
19:24:43FromDiscord<!Patitotective> i think i broke github 💀 https://media.discordapp.net/attachments/371759389889003532/963157668904730624/unknown.png
19:52:43*sagax joined #nim
19:53:49*kayabaNerve joined #nim
19:59:20*SamuelMarks joined #nim
20:01:26FromDiscord<Yardanico> you probably enabled RTL somewhere on github on in your browser/OS
20:03:23FromDiscord<gerwy> quick question↵Does choosenim needs admin privileges on Windows?
20:05:01*SamuelMarks quit (Ping timeout: 272 seconds)
20:06:06FromDiscord<Yardanico> probably, because it modifies PATH
20:06:14FromDiscord<Yardanico> but not 100% sure
20:08:06*kayabaNerve_ joined #nim
20:10:36*kayabaNerve quit (Ping timeout: 240 seconds)
20:11:33FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3USR
20:12:12*jjido joined #nim
20:13:05FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3USS
20:13:14FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#templates-identifier-construction
20:13:37FromDiscord<creikey> In reply to @Yardanico "https://nim-lang.org/docs/manual.html#templates-ide": was about to ask for the man page thanks
20:18:54*neurocyte8614492 joined #nim
20:24:10FromDiscord<dom96> In reply to @Yardanico "probably, because it modifies": it doesn't modify the PATH and it doesn't need admin privs
20:24:29FromDiscord<dom96> In reply to @Life Sucks "quick question Does choosenim": so no in answer to your question 🙂
20:30:59FromDiscord<Yardanico> @dom96 do you know any reason https://forum.nim-lang.org/t/6295 doesn't want to shop my thread starting post?
20:31:05FromDiscord<Yardanico> I didn't use any special stuff in the rst - https://forum.nim-lang.org/post.rst?id=38822
20:31:41FromDiscord<Yardanico> time to spin up a local nimforum instance
20:32:30FromDiscord<dom96> yes, I fixed it
20:33:08FromDiscord<dom96> it's because there is a regression in the new rst gen which breaks when you don't put a newline between text and a code-block
20:34:31FromDiscord<Yardanico> oh
20:37:33*kayabaNerve_ quit (Read error: Connection reset by peer)
20:38:22*SamuelMarks joined #nim
20:38:33*kayabaNerve joined #nim
20:39:41FromDiscord<gerwy> In reply to @dom96 "so no in answer": Niceee, thanks :>>
20:39:56FromDiscord<gerwy> i want to install nim on my school computer
20:40:02FromDiscord<gerwy> (edit) removed "my"
20:40:31FromDiscord<dom96> Your school's anti-virus might not like that
20:41:03FromDiscord<dom96> Nim at this point gets falsely flagged practically all the time on windows :/
20:41:56FromDiscord<Yardanico> at least it doesn't get flagged if you self-compile, at least not in my experience
20:42:54FromDiscord<gerwy> In reply to @dom96 "Your school's anti-virus might": thats true too
20:43:05FromDiscord<gerwy> but it was nimble that was flagged right?
20:43:20FromDiscord<gerwy> to be honest i only need compiler
20:43:33FromDiscord<Yardanico> In reply to @Life Sucks "but it was nimble": nope
20:43:44FromDiscord<Yardanico> other things get flagged sometimes as well, even the compiler itself
20:43:49FromDiscord<gerwy> and can stay the same version (i doubt i would need to update it)
20:48:30*PMunch quit (Quit: leaving)
20:55:43FromDiscord<ratapenado> Hi, what is the prefered way for parsing command line arguments ? std/parseopt or something else ?
20:56:00*kayabaNerve quit (Ping timeout: 250 seconds)
20:56:57FromDiscord<Yardanico> there's no "preferred way" really, for simple stuff (or if you don't want to depend on third party packages) it's usually std/parseopt
20:57:16FromDiscord<Yardanico> otherwise there's a lot of choice - cligen (seems to be the most popular choice for CLI arguments parsing), argparse, docopt
20:57:24FromDiscord<Yardanico> i probably missed a few as well
20:57:49*vicfred joined #nim
20:59:24FromDiscord<morgan> i think i need to learn macros so i can simplify a bunch of procs
20:59:36FromDiscord<morgan> already have 30 of one set and now it's gotta be 60
21:09:22FromDiscord<ratapenado> In reply to @Yardanico "otherwise there's a lot": thanks !
21:09:47FromDiscord<Yardanico> i personally prefer https://github.com/iffy/nim-argparse because it's pluggable and not tied to actual CLI
21:09:56FromDiscord<Yardanico> you can use it to e.g. implement command parsing for a telegram bot
21:20:49*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:21:51FromDiscord<morgan> im writing my own and yea being able to plug it into something else is def something it's gonna have
21:22:28FromDiscord<morgan> like for a multiplayer game, it'll include optional permissions so you can separate out admin commands from user commands for example
21:23:25FromDiscord<morgan> once it's in a stable state maybe it'll work well for you if you don't like the other options
21:34:35*zeus-supreme joined #nim
21:37:24*zeus-supreme1 quit (Ping timeout: 246 seconds)
21:58:47*SamuelMarks quit (Ping timeout: 256 seconds)
21:59:41*SamuelMarks joined #nim
22:02:36*xet7 joined #nim
22:13:42FromDiscord<morgan> welp this is gonna be a long macro
22:13:51FromDiscord<morgan> sent a code paste, see https://play.nim-lang.org/#ix=3UTj
22:14:39FromDiscord<morgan> and ofc different variants for each bit of it
22:14:39FromDiscord<Elegantbeef> Uh oh i see the "addIntFlag" still
22:14:55FromDiscord<morgan> yeah for now im keeping them
22:15:31FromDiscord<morgan> but i decided 60 similar proc defs was too much so i'm going to write a macro
22:15:50FromDiscord<morgan> 30 was ok but 60 is too much
22:16:00FromDiscord<morgan> still gonna be 60 calls to the macro
22:16:02FromDiscord<Elegantbeef> Imagine not just having 1
22:16:11FromDiscord<Elegantbeef> This brought to you by a single add proc
22:16:21FromDiscord<Elegantbeef> Nim isnt C so dont writei t as such!
22:16:40FromDiscord<morgan> hmm i could make the macro be what you use to assign, right?
22:16:53FromDiscord<Elegantbeef> No clue what you mean
22:17:07FromDiscord<Elegantbeef> You're making quite an elaborate system instead of just using the procedure i suggested
22:17:13FromDiscord<Elegantbeef> So i shush and go "yep carry on"
22:17:29FromDiscord<morgan> so the macro takes a simpler set of inputs and creates AST for the full object construction
22:18:59FromDiscord<morgan> anyways i'll think about this while i eat dinner and drive to and from d&d
22:19:28FromDiscord<Elegantbeef> Why dont you use what i suggested again, i dont recall
22:20:05FromDiscord<morgan> i don't really like using sometype.theproc
22:20:06FromDiscord<morgan> idk
22:20:13FromDiscord<morgan> idr all of it
22:20:24FromDiscord<Elegantbeef> so then just do `intFlag`
22:20:46FromDiscord<Elegantbeef> Though i hardly think that's a good reason to avoid it, but YMMV
22:21:22FromDiscord<morgan> lemme look back at it
22:23:59FromDiscord<Elegantbeef> It was just make a constructor for your flags using optional parameters so you dont have to have custom adds
22:24:56*kayabaNerve joined #nim
22:32:13FromDiscord<yoyojambo> Can I give the executable of a nimble project a name in the .nimble file?
22:32:58FromDiscord<Elegantbeef> Do not think so
22:36:40FromDiscord<yoyojambo> sent a code paste, see https://play.nim-lang.org/#ix=3UTo
22:39:47*kayabaNerve quit (Ping timeout: 240 seconds)
22:45:26FromDiscord<spoon> err
22:45:44FromDiscord<Elegantbeef> rre
22:48:23FromDiscord<Yardanico> rer
22:51:29*SamuelMarks quit (Ping timeout: 256 seconds)
22:56:58FromDiscord<yoyojambo> what does `{.inline.}` mean when declaring a proc?
22:57:19FromDiscord<Yardanico> "The inline convention means the caller should not call the procedure, but inline its code directly. Note that Nim does not inline, but leaves this to the C compiler; it generates inline procedures. This is only a hint for the compiler: it may completely ignore it and it may inline procedures that are not marked as inline."
22:57:22FromDiscord<Elegantbeef> The procedure is suggested to be inlined
22:57:27FromDiscord<Elegantbeef> Which means it's pasted in place at the call site
22:57:31FromDiscord<Yardanico> Manual is pretty helpful for a lot of stuff like this :)
22:57:47FromDiscord<Elegantbeef> Yardanico i'm the one with bot next to me!
22:57:58FromDiscord<Elegantbeef> Also hello, been a while since i've seen you active 😀
22:58:07FromDiscord<Yardanico> hello, i've been active again since a few days ago
23:00:08FromDiscord<exelotl> In reply to @yoyojambo "what does `{.inline.}` mean": I wrote a more thorough explanation on the forums the other day if that helps: https://forum.nim-lang.org/t/9081#59189
23:00:17FromDiscord<yoyojambo> In reply to @Yardanico ""The inline convention means": thanks a lot
23:00:47FromDiscord<yoyojambo> In reply to @Yardanico "Manual is pretty helpful": yeah was looking for it in the wrong place
23:03:51NimEventerNew question by PreFiXAUT: How to generate C headers from Nim, see https://stackoverflow.com/questions/71835238/how-to-generate-c-headers-from-nim
23:04:07FromDiscord<yoyojambo> In reply to @exelotl "I wrote a more": It totally helps, thank you
23:42:56*SamuelMarks joined #nim
23:47:07*SamuelMarks quit (Ping timeout: 240 seconds)
23:48:04*SamuelMarks joined #nim
23:55:49*Gustavo6046 quit (Ping timeout: 240 seconds)
23:56:58*Gustavo6046 joined #nim
23:58:39FromDiscord<!Patitotective> testing github actions... https://media.discordapp.net/attachments/371759389889003532/963226605193400330/Screenshot_from_2022-04-11_18-57-52.png