<< 12-04-2021 >>

00:01:50*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:02:11*njoseph joined #nim
00:10:48FromDiscord<Nisha's alt> What's a compiler for nim that uses incremental building? :P
00:13:28FromDiscord<sealmove> hmm I am trying to use `scanTuple` and I am getting `Error: attempting to call undeclared routine: 'scanTuple'`
00:13:31FromDiscord<rosewood> ok now it is working but I can't do a `nimble build` :/
00:14:07FromDiscord<ElegantBeef> Add `compiler` to your nimble file
00:14:15FromDiscord<ElegantBeef> Scantuple is only in devel
00:14:22FromDiscord<ElegantBeef> Update to devel and it'll be in `strscan`
00:14:32FromDiscord<ElegantBeef> Also it warms my heart to see you attempt to use it
00:14:35FromDiscord<sealmove> will it be in 1.4.6?
00:14:40FromDiscord<ElegantBeef> Dont think so
00:14:44FromDiscord<sealmove> why not
00:14:53FromDiscord<ElegantBeef> I dont know how stdlib additions propagate
00:15:02FromDiscord<ElegantBeef> Dont think they add anything only fix them per version
00:15:43FromDiscord<sealmove> ah, so 1.5.0
00:16:32FromDiscord<ElegantBeef> well 1.6.0 when it hits stable
00:16:37FromDiscord<ElegantBeef> 1.5.1 is devel atm
00:17:54FromDiscord<sealmove> I see. Ok πŸ˜… I accept that.
00:23:58FromDiscord<ElegantBeef> Yea you can imagine how impatient i am considering i've stuff to the stdlib which is pretty useful πŸ˜›
00:25:45FromDiscord<ElegantBeef> (edit) "Yea you can imagine how impatient i am considering i've ... stuff" added "added"
00:39:24FromDiscord<konsumlamm> just always use latest devel, problem solved
00:39:38FromDiscord<ElegantBeef> ^
00:39:55FromDiscord<ElegantBeef> Plus you get features like a better doc gen and `spellSuggest`
00:39:58FromDiscord<ElegantBeef> so it's just how to live
00:40:17FromDiscord<Rika> So how’s them stability yo
00:42:22FromDiscord<konsumlamm> in the worst case there are some regressions
00:42:35FromDiscord<konsumlamm> but there are also a lot of bugfixes
00:46:36*vicfred quit (Quit: Leaving)
00:51:27FromDiscord<sealmove> I have 1 c program and 1 nim program and I am trying to connect the stdin/stdout of the c program with the nim program so I can send/receive data to/from it. Any hints?
00:56:11FromDiscord<ElegantBeef> `osproc`
00:56:29FromDiscord<Rika> You mean one program is running the other or
00:56:33FromDiscord<Rika> Individual binaries
00:56:38FromDiscord<ElegantBeef> `startProcess` is non blocking iirc
00:56:40FromDiscord<sealmove> no, they are running separately
00:56:41FromDiscord<Rika> Individual binaries you use shell utilities
00:56:50FromDiscord<ElegantBeef> Well time for IPC!
00:56:56FromDiscord<Rika> Or that yes
00:57:03FromDiscord<sealmove> IPC?
00:57:11FromDiscord<ElegantBeef> Interprocess communication
00:57:12FromDiscord<Rika> If you can’t pipe use inter process communication
00:57:21FromDiscord<Rika> Fuck you beef
00:57:27FromDiscord<Rika> Smh
00:57:30FromDiscord<ElegantBeef> Sockets, mmap, or your favourite version
00:57:50FromDiscord<ElegantBeef> There are many ways to do IPC, so have fun with it πŸ˜›
00:58:13FromDiscord<sealmove> Yeah I was thinking Sockets. But I can't modify the C program, so I was hopping I could connect to its stdin/stdout with a socket from the Nim program.
00:58:26FromDiscord<ElegantBeef> well you can launch the program from nim
00:58:28FromDiscord<ElegantBeef> using osproc
00:58:41FromDiscord<ElegantBeef> then you can write to the stdin and read the stdout
00:59:05FromDiscord<sealmove> If I launch it separately, can't I use its pid somehow to connect?
00:59:31FromDiscord<ElegantBeef> Possibly though there is no global method of doing such
00:59:50FromDiscord<Rika> Maybe? But it’s not portable
01:00:08FromDiscord<Rika> There’s probably a file somewhere in /proc or something that allows you to do so
01:00:09FromDiscord<sealmove> i don't care for portability at this point πŸ˜… I am on Linux
01:00:11FromDiscord<ElegantBeef> Start the program from the nim binary is my view
01:00:28FromDiscord<Rika> Yeah
01:00:28FromDiscord<ElegantBeef> Well then yes you should be able to `/proc/pid/0` iirc is stdin
01:00:50FromDiscord<sealmove> oh right, and I just write to it
01:01:30FromDiscord<Rika> Smh why can’t you just pipe
01:01:37FromDiscord<Rika> Does it have to be two way?
01:01:49FromDiscord<sealmove> yes, it's back-and-forth
01:01:56FromDiscord<Rika> I see
01:03:31FromDiscord<sealmove> It would be nice if there was a socket-like interface for connecting to a local processes via their pid.
01:03:52FromDiscord<ElegantBeef> I mean that's what starting a process kinda gives you
01:04:13FromDiscord<ElegantBeef> But time for you to make a library for it and expose the API using extern to change the world πŸ˜›
01:05:13FromDiscord<ElegantBeef> like you can `proccess.inputStream.write("Hello world")`
01:05:34FromDiscord<Rika> Can’t you make one of the programs open a socket
01:05:44FromDiscord<ElegantBeef> and also `proccess.peakableOutputStream.peek`
01:05:47*vicfred joined #nim
01:06:00FromDiscord<ElegantBeef> Cant modify the C source so wouldnt be overly useful
01:06:08FromDiscord<sealmove> In reply to @Rika "Can’t you make one": yes, the Nim program I can
01:07:08FromDiscord<ElegantBeef> What program are you communicating with?
01:08:53*Tlangir joined #nim
01:09:24FromDiscord<sealmove> It's a program generates and outputs graphs
01:09:32FromDiscord<sealmove> (edit) "It's a program ... generates" added "that"
01:10:30FromDiscord<sealmove> I know, very general sentence πŸ˜… if I knew why you ask I could be more specific prbly
01:11:10FromDiscord<ElegantBeef> Was just curious if there was any alternatives to it
01:12:38FromDiscord<sealmove> ah, hmm, well, my main goal is to make the Nim program such as using it to connect to the c process locally needs minimal changes compared to when using it to connect to the same program running remotely.
01:12:48FromDiscord<sealmove> so i can test it locally
01:13:01FromDiscord<sealmove> (edit) "process" => "program"
01:13:42FromDiscord<sealmove> basically i need a uniform interface for connecting to local/remote process
01:14:46FromDiscord<ElegantBeef> Ok so then a program which launches a binary and exposes a socket to send strings/recieve strings from it would work?
01:15:28FromDiscord<sealmove> Yes, it sounds good
01:16:10FromDiscord<sealmove> I am looking for that socket exposition :P
01:16:34FromDiscord<ElegantBeef> Well it's not an overly complex program
01:18:54FromDiscord<ElegantBeef> a program that takes a port, a binary name, and arguments for that binary, launches the binary, opens a socket on the port then you have your simple packets which would be 0, 1, 2 which is write to stdin, read output, read error πŸ˜„
01:19:14*krux02 quit (Remote host closed the connection)
01:19:37FromDiscord<ElegantBeef> Atleast that's all it sounds like, no clue the actual complexity πŸ˜„
01:22:18FromDiscord<sealmove> I still don't get it, how do you associate the socket with the process?
01:23:04FromDiscord<ElegantBeef> I'm going to quickly write the server logic πŸ˜„
01:24:01FromDiscord<j-james> What's wrong with my object inheritance here?
01:24:12FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=2VNl
01:24:33FromDiscord<j-james> And would it be possible to tell an openArray to start indexing at a particular number?
01:24:50FromDiscord<sealmove> In reply to @j-james "And would it be": yes
01:25:03FromDiscord<Rika> No because sequences cannot index from another number..? What you can?
01:25:42FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2VNm
01:25:52FromDiscord<Rika> But vector is not a generic type
01:26:25FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2VNo
01:26:27FromDiscord<ElegantBeef> `OpenArray[int]` isnt an allowed type definition so that shouldnt be allowed
01:26:29FromDiscord<Rika> No it is not
01:26:36FromDiscord<Rika> Did they change it?
01:26:39FromDiscord<ElegantBeef> Nah
01:26:40FromDiscord<ElegantBeef> It's lower
01:26:48FromDiscord<ElegantBeef> UncheckedArray is upper
01:26:51FromDiscord<sealmove> oh, my bad
01:27:10FromDiscord<Rika> In reply to @ElegantBeef "`OpenArray[int]` isnt an allowed": Isn’t it allowed if you were using views
01:27:36FromDiscord<ElegantBeef> Yes
01:29:06FromDiscord<sealmove> how comes you can index `array`s however you want, but not `openArray`s?
01:29:36FromDiscord<ElegantBeef> cause arrays let you use any ordinals openArray is an abstraction over `seq[T]` and all `arrays[size, T]`
01:30:00FromDiscord<ElegantBeef> `array[3..3, int]` is valid and indexed with `arr[3]`
01:30:29FromDiscord<ElegantBeef> to index when you are using non 0indexed arrays with open you should do `[oa.low + i]`
01:39:06FromDiscord<j-james> In reply to @ElegantBeef "to index when you": I'm a little bit confused - is changing the indexing of openArrays (or an equivalent just for array types) possible at all?
01:39:16FromDiscord<Rika> No
01:39:24FromDiscord<ElegantBeef> Sequences are by default 0 indexed
01:39:29FromDiscord<Rika> Sequences cannot have index changes so open arrays cannot as well
01:39:39FromDiscord<ElegantBeef> arrays are the only type that can be accessed non 0'd
01:43:35FromDiscord<j-james> I see, thanks
01:44:32FromDiscord<j-james> There's something still wrong with my inheritance code, though - it seems to be telling me that an array doesn't count as a Vectored array
01:44:34FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2VNq @sealmove this is the basis of it still not nearly usable but might give you an indication
01:44:34FromDiscord<j-james> `<type array[0..1, int]> but expected 'Vector = openArray[int]'`
01:44:50FromDiscord<ElegantBeef> well the way nim's oop work is `object of Parent`
01:45:15FromDiscord<ElegantBeef> Also why do you even want to use `1..2` for the array
01:45:56FromDiscord<ElegantBeef> Seal i do suppose it still lacks a `ip port` which it'd connect to aswell
01:46:18FromDiscord<ElegantBeef> Can we see an attempted use case of this james or is this all you have sofar?
01:46:39FromDiscord<ElegantBeef> I tried to avoid assuming what people want and just want to see what they want
01:46:40FromDiscord<j-james> Yeah, no problem
01:46:50FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=2VNr
01:46:58FromDiscord<j-james> I'm throwing out the `1..2` thing
01:47:05FromDiscord<ElegantBeef> Ok so no reason for the open array
01:47:12FromDiscord<j-james> This is me writing a terrible linear algebra library to teach myself linear algebra
01:47:48FromDiscord<j-james> Sorry, here's where the openArray is helpful
01:47:56FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=2VNs
01:48:08FromDiscord<ElegantBeef> still really not πŸ˜„
01:48:21FromDiscord<j-james> So I'd like to have it so that some methods are generally applicable to any vector, while others like the cross product only take a 3d vector
01:48:30FromDiscord<j-james> Still kinda not, yeah
01:48:39FromDiscord<ElegantBeef> Well a generic would work there
01:48:39FromDiscord<j-james> (edit) removed "a" | "vector" => "vectors"
01:50:29FromDiscord<ElegantBeef> @j-james something ike this https://play.nim-lang.org/#ix=2VNt
01:50:48FromDiscord<ElegantBeef> shouldnt be a second when should be `elif`
01:50:54FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2VNu like this πŸ˜›
01:52:39FromDiscord<j-james> Oh interesting
01:53:20FromDiscord<ElegantBeef> Forgot to implement the `+` op https://play.nim-lang.org/#ix=2VNv
01:54:17FromDiscord<ElegantBeef> Could use a concept for `twoComp` and `ThreeComp`
01:55:06FromDiscord<j-james> That `or` syntax is really cool
01:55:49FromDiscord<j-james> The other reason I was trying to do it with `openArray`s was to generalize it to VectorDs
01:56:17FromDiscord<j-james> Would something like `Vector = Vector2d or Vector3d or seq[int]` work?
01:56:28FromDiscord<ElegantBeef> It'd work yes
02:03:35*Tlanger joined #nim
02:05:41*Tlangir quit (Ping timeout: 240 seconds)
02:07:18FromDiscord<Gary M> can you use a case for object type like you'd do `if a is B`
02:29:36*Jesin joined #nim
02:41:36*rockcavera joined #nim
02:46:20FromDiscord<Rika> Not that I know of
03:01:21FromDiscord<Gary M> is there an easy way of getting the number of digits in an int?
03:29:49FromDiscord<Rika> Increment a counter then do div 10 on it until 0 I don’t know
03:35:14FromDiscord<InventorMatt> It would also be easy to convert to a string and get the length of it. It is probably very inefficient though
03:37:08*spiderstew joined #nim
03:37:41*spiderstew_ quit (Ping timeout: 240 seconds)
03:56:56FromDiscord<ElegantBeef> `log10(3).int + 1.
03:56:58FromDiscord<ElegantBeef> (edit) "1." => "1`"
03:57:10FromDiscord<ElegantBeef> I mean `log10(num) + 1`
03:57:11*vicfred quit (Quit: Leaving)
04:00:20*vicfred joined #nim
04:09:42*rockcavera quit (Remote host closed the connection)
04:13:14FromDiscord<Rika> Uses float unnecessarily
04:17:52*dom96_ joined #nim
04:20:24*Simon[m]6 quit (*.net *.split)
04:20:25*fbpyr[m] quit (*.net *.split)
04:20:25*m33[m] quit (*.net *.split)
04:20:25*jfondren[m] quit (*.net *.split)
04:20:27*Northstrider[m] quit (*.net *.split)
04:20:27*dom96 quit (*.net *.split)
04:34:41*Northstrider[m] joined #nim
04:35:22*fbpyr[m] joined #nim
04:35:31*m33[m] joined #nim
04:37:53*Simon[m]6 joined #nim
04:42:05*jfondren[m] joined #nim
04:57:44*vicfred quit (Quit: Leaving)
05:10:19FromDiscord<ajusa> Weird question but does inheritance use less memory than variant objects in Nim?
05:14:34FromDiscord<ElegantBeef> variants use unions so only take up the largest variant type, so probably the same
05:14:46FromDiscord<ElegantBeef> Highly depends on your variant vs, your inherited object
05:14:53ForumUpdaterBotNew thread by Halloleo: Library for generating a DOM table from a Nim Table? (JS backend), see https://forum.nim-lang.org/t/7780
05:16:21ForumUpdaterBotNew Nimble package! streamfix - FIX Protocol streaming parser (Financial Information eXchange), see https://github.com/inv2004/streamfix
05:20:04*narimiran joined #nim
06:53:36*fredrikhr joined #nim
06:58:08*PMunch joined #nim
07:05:55*Vladar joined #nim
08:19:49PMunchCan anyone figure out why these two are different? http://ix.io/2VOm
08:20:09PMunchHere's the generated C code as well: http://ix.io/2VOn
08:22:19PMunchAh damn it..
08:22:22PMunchNever mind..
08:22:50PMunchIt was because that sizeof(Descriptor) turned into an 8, but the C definition turned into a 7
08:23:09PMunchAdding {.packed.} to the object type definition fixed it
08:37:23Clonkk[m]I hate code based on sizeof in C for this exact reason
08:38:24PMunchYeah, I'll be rewriting this in better Nim style now that it works
08:38:39PMunchI just didn't want to start a major refactor before I had some working Nim code I could work with
08:40:49PMunchHmm, I have a vague memory about talk of allowing other keywords than `do` for passing multiple blocks to a macro/template. Did that ever go anywhere?
08:44:45Clonkk[m]Are you talking about ``with`Γ¨ ?
08:44:51Clonkk[m] * Are you talking about ``with`` ?
08:45:00Clonkk[m]Not sure what that became
08:45:00PMunchHmm, I don't think so
08:46:09PMunchMore things like turning `macro myMacro(body, else: untyped): untyped` invocation from `myMacro: echo "hello world" do: echo "otherwise"` into `myMacro: echo "hello world" else: echo "otherwise"`
08:46:22Clonkk[m]Ah it wasn't part of stdlib it's a Zevv project https://github.com/zevv/with
08:46:44Clonkk[m]<PMunch "More things like turning `macro "> No idea
08:46:58PMunchI know about `with`, look at the contributor list ;)
08:47:52Clonkk[m]Haha, fair enough
08:48:08PMunchI basically rewrote the whole thing :P
08:48:35PMunchOnly three lines of the original remained https://github.com/zevv/with/pull/2/files
08:57:01FromDiscord<j-james> So either my grasp of advanced types or my grasp of how procedures can work is shaky (or both), but there's something fundamentally wrong with this code that I'm overlooking
08:57:13FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=2VOL
08:59:53FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2VON here you go
09:00:09*Vladar quit (Read error: Connection reset by peer)
09:00:17PMunchDamn it, beat me to it :P
09:00:33FromDiscord<ElegantBeef> Too busy coding keyboard to use yours
09:01:00PMunchHaha, right now I'm just having something to eat :P
09:01:34FromDiscord<ElegantBeef> Also can you please just put all those types in a single type block thanks πŸ˜„
09:02:06*Vladar joined #nim
09:02:20FromDiscord<j-james> Haha πŸ˜…
09:02:25FromDiscord<ElegantBeef> "Hey i want to add a new type, i have to newline and write `type` yet again"
09:02:40Clonkk[m]Why does C++ code generation tries to use Nim fields ?
09:02:44FromDiscord<Gary M> Oh hey, Vectors
09:02:54FromDiscord<ElegantBeef> also with that version a, b will always be the same type
09:03:57FromDiscord<j-james> _poorly done vectors_
09:04:53FromDiscord<Gary M> Want to see some fast as fuck vectors πŸ˜„ I'm working on simd optimized game math with stuff in #gamedev
09:05:11FromDiscord<j-james> So with that `+` overloading, is the syntax `param + param` exclusive to operators?
09:05:13FromDiscord<Rika> slam them vectors yo
09:07:45FromDiscord<ElegantBeef> @j-james realistically you can just do https://play.nim-lang.org/#ix=2VOU
09:08:21FromDiscord<ElegantBeef> The Vector2 and Vector3 types dont matter much when you're allowing interop with any collection of equal size
09:09:24FromDiscord<Gary M> Beef you forgot the type block
09:09:47FromDiscord<j-james> I'll read up on generics, thanks @ElegantBeef
09:09:51FromDiscord<ElegantBeef> I only did the let one since i had to write another variable πŸ˜„
09:09:58FromDiscord<j-james> And thanks for finding my problems πŸ˜„
09:21:28FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=2VOW
09:22:12FromDiscord<Rika> make a macro that generate procs d0 and d1 etcif you like
09:23:09FromDiscord<ElegantBeef> nah
09:23:17FromDiscord<ElegantBeef> Update to devel and use `setutils`
09:23:28FromDiscord<ElegantBeef> we have `set[d1] = true` there
09:24:30FromDiscord<ElegantBeef> Or if you dont want to update just copy this macro somewhere https://github.com/nim-lang/Nim/blob/devel/lib/std/setutils.nim#L65
09:24:41FromDiscord<ElegantBeef> (edit) "macro" => "func"
09:25:33FromDiscord<jtiai> That's better because I have tons of if-else blocks for bits.
09:26:22FromDiscord<jtiai> Though I still wish dot notation. πŸ™‚
09:26:58FromDiscord<ElegantBeef> well you can either make a macro to generate the procs or use a macro + dotoperators to implement it
09:27:19FromDiscord<ElegantBeef> And it's too late for me to throw the latter together 😦
09:27:33FromDiscord<ElegantBeef> So on that note i'm outta here
09:28:42FromDiscord<jtiai> Given that I'm on day 6 with my Nim adventure I think I'll settle for premade stuff...
09:29:57*jaens[m] joined #nim
09:44:36*l1x quit (Quit: Connection closed for inactivity)
09:57:47FromDiscord<j-james> So generics are only useful in this case because of the flexibility of the openArray type, right?
09:57:48FromDiscord<j-james> https://play.nim-lang.org/#ix=2VP2
10:00:53*lritter joined #nim
10:04:46FromDiscord<GE> I asked earlier for a cross platform GUI, but the suggested one doesn't work on BSD. Any other well usable GUI libraries for nim?
10:07:06FromDiscord<InventorMatt> Depending on how many features you need NiGUI could work
10:18:26FromDiscord<jtiai> btw, why Nim language was original created for?
10:18:32FromDiscord<jtiai> (edit) "original" => "originally"
10:19:03FromDiscord<GE> Nim was created to be a language as fast as C, as expressive as Python, and as extensible as Lisp. According to wikipedia at least.
10:20:21FromDiscord<jtiai> At least Python part is still... a bit lagging. πŸ™‚
10:20:56FromDiscord<Solitude> nah
10:21:11FromDiscord<Solitude> (edit) "nah ... " added "πŸ™‚"
10:21:26FromDiscord<Rika> In reply to @jtiai "At least Python part": why so?
10:22:26FromDiscord<jtiai> Well statically typed and compiled language really can't do all the magic Python can. And it doesn't because it's fast and usable on other parts.
10:22:47FromDiscord<Rika> it said expressive, as in "the code looks clean"
10:22:53FromDiscord<Rika> not "as able as python"
10:23:07FromDiscord<jtiai> Well "clean" is quite subjective term...
10:23:33*qwr prefers compile-time macro magic to runtime magic, imho easier to reason without running to observe behaviour
10:23:40FromDiscord<Rika> a lot of things are subjcetive
10:25:16*tane joined #nim
10:25:41*l1x joined #nim
10:26:01qwrand python is imho terrible in letting you know of errors in latest possible time (maybe TCL is worse in this part)
10:26:15FromDiscord<jtiai> what is tcl?
10:26:24FromDiscord<GE> TCL is a scripting language
10:26:30FromDiscord<GE> and TK is for GUIs
10:26:37FromDiscord<GE> commonly referred to as TCL/TK
10:26:43FromDiscord<jtiai> ah. that. never used.
10:27:06FromDiscord<GE> It's pretty obscure nowadays. I wouldn't expect you to know it. It's rarely used outside of UNIX world.
10:28:11FromDiscord<jtiai> I guess debian counts as unix world?
10:28:28FromDiscord<GE> Yeah. Debian is linux and linux is unix-like. And TCL/TK is in the debian repos too.
10:30:51FromDiscord<jtiai> but anyway never user tcl/tk. Probably heard of years ago.
10:31:02FromDiscord<GE> It used to be pretty popular in the 90s.
10:31:13FromDiscord<jtiai> Don't recall. πŸ™‚
10:31:20FromDiscord<GE> But has fallen out of favor with GTK, Qt, and other toolkits taking over it.
10:32:42qwrtoday it isn't much used except maybe for the TK ui part (and I discovered sometime ago that bitkeeper guys wrote http://www.little-lang.org/ for TK that compiles to TCL bytecode...)
10:33:51FromDiscord<Rika> prolly python and tkinte
10:33:52FromDiscord<Rika> r
10:34:06FromDiscord<GE> tkinter is more popular than tcl/tk itself.
10:34:15FromDiscord<Rika> well yeah
10:37:29PMunchHmm, for some reason my C procedure re-implemented in Nim is about 10% smaller in program size
10:37:38narimiranis @treeform maybe on discord/matrix?
10:38:40FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=2VP9
10:39:38FromDiscord<Solitude> https://nim-lang.org/docs/manual.html#generics
10:43:45FromDiscord<jtiai> Ooo... πŸ’‘
10:47:27FromDiscord<Gennadiy> How do I specify a couple of C libs to the Nim compiler?
10:51:00PMunch@Gennadiy, what do you mean?
10:51:23FromDiscord<demotomohiro> passL↡https://nim-lang.org/docs/nimc.html↡https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-passl-pragma
10:53:49FromDiscord<Gennadiy> gsl-nim wraps the GSL library but I belive it is built with libslang.so in its lib directory. ↡I want to use libgsl and libgslcblas that I have built on Windows.
10:56:53FromDiscord<demotomohiro> If it wraps C functions with dynlib pragma, you don't need to pass any compiler options to Nim for the C library. Just put the .dll files where your executable can find.
10:59:36FromDiscord<Gennadiy> I imagine this wouldn't wotk for static libraries: libgsl.lib and libgslcblas.lib?
11:01:28FromDiscord<Gennadiy> Thanks @demotomohiro . Found the dlls and it's worked.
11:01:29FromDiscord<demotomohiro> Try DynlibOverride:
11:01:30FromDiscord<demotomohiro> https://nim-lang.org/docs/nimc.html#dynliboverride
11:02:33FromDiscord<Gennadiy> Excellent. Thanks for the `dynliboverride` tip. Might need that for the future.
11:20:41FromDiscord<Yardanico> In reply to @narimiran "is <@107140179025735680> maybe on": He's on Discord, yes, but seems away right now
11:20:54narimiranthanks, Yardanico!
11:39:38FromDiscord<Goel> @Yardanico Do you use Discord directly? Like the webversion or with the installer or through a bridge?
11:40:18FromDiscord<Yardanico> Through the application, why do you ask though? If I used the bridge you would see me as "IRC"
11:40:56FromDiscord<Goel> I don't know if its a bug with my version or its like this, but i noticed if i click the [IRC] users in this chat, it shows me the previous [IRC] user that sent that message, and not the current users that actually wrote it
11:41:43FromDiscord<Goel> (edit) "users" => "user"
11:42:17FromDiscord<Goel> (edit) "it" => "it. (For example, if i click on narimiran[IRC] discord shows me its qwr[IRC]"
11:45:26*PMunch quit (Ping timeout: 240 seconds)
11:46:52liblq-devit's a discord bug
11:47:11liblq-devit's been broken like this for years
11:49:21FromDiscord<Yardanico> yep
11:49:27FromDiscord<Yardanico> nothing we can do about it
11:57:59*PMunch joined #nim
12:05:58*krux02 joined #nim
12:15:33FromDiscord<Gennadiy> What is wrong with this and/or is there an alternative way to construct it?↡`var table_of_tables: Table[Table[string, int], float] = { {"a": 1, "b": 1}.toTable: 0.2, {"a": 1, "b": 2}.toTable: 0.8 }.toTable`
12:21:05PMunch@Gennadiy, the key of a table needs to have `hash` a `==` procedures
12:21:19PMunchSome default ones are provided, but not one for `Table`
12:25:28liblq-devi see that the keys among the keys are the same, couldn't you get away with using a tuple then?
12:26:04liblq-dev`{ (a: 1, b: 1): 0.2, (a: 1, b: 2): 0.8 }.toTable`
12:27:45*PMunch quit (Ping timeout: 260 seconds)
12:27:48*sacredfrog quit (Quit: ZNC 1.8.2 - https://znc.in)
12:28:09*sacredfrog joined #nim
12:32:23FromDiscord<Gennadiy> I see. Thanks @PMunch
12:33:15FromDiscord<Gennadiy> @liblq-dev[IRC] I guess I could but it seems that it also needs a hash.
12:33:29liblq-devtuples have a built-in hash
12:35:21FromDiscord<Gennadiy> Ah, works. Thanks.
12:40:22*PMunch joined #nim
12:47:20*rockcavera joined #nim
13:04:39FromDiscord<GE> Has anyone made CAD or 3D imaging software using just nim?
13:06:29PMunchNot that I know of
13:06:45FromDiscord<GE> Can I make 3D software with nim?
13:07:19PMunchSure
13:07:44PMunchYou can make anything in Nim :)
13:15:30FromDiscord<GE> How complete is the GTK bindings for nim?
13:16:01PMunchThey're auto-generated from the C sources, so they should be pretty complete
13:46:33*Clonkk[m] < https://matrix.org/_matrix/media/r0/download/matrix.org/FHuKUxiFQKzWhssCpmYkJDMd/message.txt >
13:47:00FromDiscord<platycat> is there any easy way to browse the list of procedures a module exports?
13:47:43narimirancreate docs and search for `proc`? :D
13:47:46FromDiscord<Clonkk> sent a code paste, see https://play.nim-lang.org/#ix=2VPV
13:50:47FromDiscord<platycat> well, I'm talking about gintro, which generates bindings, so I can't ctrl+f, and calling `nim doc` on any of the source files fails
13:51:02FromDiscord<platycat> (edit) "bindings," => "bindings using some macros or whatnot,"
13:57:31FromDiscord<Solitude> In reply to @platycat "well, I'm talking about": grep
13:57:50FromDiscord<platycat> In reply to @Solitude "grep": no, the relevant identifiers don't exist in the source, because it's translating it
13:57:58FromDiscord<platycat> this doesn't seem to work either huh https://media.discordapp.net/attachments/371759389889003532/831166254571061298/unknown.png
13:58:33FromDiscord<Solitude> ?
13:59:47FromDiscord<Solitude> In reply to @platycat "no, the relevant identifiers": how can they not exist
13:59:59FromDiscord<Solitude> In reply to @platycat "this doesn't seem to": what are you trying to do with this?
14:00:20*clyybber joined #nim
14:00:26FromDiscord<platycat> In reply to @Solitude "how can they not": https://github.com/StefanSalewski/gintro/tree/master/gintro I am not sure, you tell me
14:00:41FromDiscord<Solitude> In reply to @platycat "https://github.com/StefanSalewski/gintro/tree/maste": the repo contains only generator
14:00:53FromDiscord<Solitude> when you nimble install it the bindings get generated
14:00:58FromDiscord<Solitude> and they contain all symbols you need
14:01:01FromDiscord<platycat> thanks
14:01:03*PMunch quit (Quit: leaving)
14:01:04FromDiscord<platycat> I will look there
14:04:36FromDiscord<platycat> I found it there, thank you
14:07:32FromDiscord<treeform> In reply to @narimiran "is <@107140179025735680> maybe on": I am here a lot.
14:09:28narimiranhey @treeform!
14:10:02narimirani've seen that you've updated `fidget`, but is there some other package of yours which can demonstrate the nimble problem you talked about on friday?
14:11:03FromDiscord<treeform> at the moment no, I went over every project and made sure it works with all the current libs.
14:11:43FromDiscord<treeform> I can probably create a fake set of projects.
14:12:00FromDiscord<treeform> or maybe you can install older fidget?
14:12:08FromDiscord<treeform> and older pixie had this issue
14:12:38FromDiscord<treeform> right before this commit: https://github.com/treeform/fidget/commit/1d7de0e9bc6157b4195e34faa3e52918fd262b73
14:13:07narimiranok, i'll try to play with those two packages (and their old versions)
14:14:19FromDiscord<treeform> the idea is to have nested project, first nested project has lib > 1.0.0 and the later one have lib = 1.0.0 and they will not work
14:14:59FromDiscord<treeform> as nimble only installs by the first rule, while uses the other rules as more of an assert
14:31:01FromDiscord<treeform> order of requires and what you already have installed is dependent
14:39:20FromDiscord<dom96> It's probably best to repro this in isolation with dummy packages
14:39:31FromDiscord<dom96> although I'm not sure what your goal is narimiran πŸ™‚
14:40:19Clonkk[m]If you're refererring to this issue : https://github.com/treeform/fidget/issues/145 ; the result of nimble dependencies resolution was dependent on what you had previously installed as well
14:40:31Clonkk[m]So reproducing in isolation might be hard
14:56:06FromDiscord<GE> How easily could a C++ programmer learn nim?
15:05:18FromDiscord<treeform> In reply to @GE "How easily could a": I think it depends on many factors. Nim is easy to learn. I think how many years experience programming and how many other languages they know would be a bigger factor. Nim is similar to C++ in some ways but not in others. C++ is a complex language some one who knows C++ well could probably learn any language pretty easy.
15:05:44FromDiscord<treeform> I don't know of any other top 20 language that is more complex then C++.
15:06:35FromDiscord<treeform> ... Haskell maybe more complex?
15:06:45FromDiscord<GE> Assembly.
15:07:04FromDiscord<treeform> I find Assembly to be very easy to learn. Hard to build big software in.
15:07:12Clonkk[m]Assemble isn't complex to learn
15:07:18FromDiscord<GE> The x86 manual is over 1,000 pages long.
15:07:27FromDiscord<treeform> When I was just starting out programming I learned QBASIC, then tried learning C.
15:07:29Clonkk[m]So ?
15:07:39FromDiscord<treeform> But C was so hard, I learned assembly instead.
15:08:12FromDiscord<treeform> You only use like 1% of all possible assembly instructions day to day.
15:09:44Clonkk[m]I'd say that If you exclude macros, a C++ developer can be proficient in Nim in about a month or two (depending how long per day you spend on it).
15:10:00FromDiscord<GE> I find C very easy to learn. What's difficult is learning how to not shoot yourself in the foot with things like pointers and whatever.
15:10:34FromDiscord<treeform> I was learning C with Turbo C and the errors I was getting were very strange.
15:10:51FromDiscord<treeform> I found Turbo Assembler easier at the time.
15:10:56Clonkk[m]<FromDiscord "<GE> I find C very easy to learn"> C is easy to learn but hard to build complex stuff with without mistake.
15:11:28FromDiscord<GE> That's more or less what I said Clonkk.
15:11:46Clonkk[m]Yes, I was agreeing with you
15:12:40FromDiscord<GE> Hey zetashift, I was meaning to ask you a question. How good are the nim bindings for godot? Are they good enough to make full games with them?
15:13:44FromDiscord<zetashift> I saw this tweet: https://twitter.com/convexcollider/status/1375765660219887621 and I wonder what we could do to put out there that Nim isn't _that_ complicated
15:14:29FromDiscord<zetashift> Metaprogramming is basically the most advanced thing in Nim's arsenal but I don't see languages like Elixir succumbing to being complex
15:15:12Clonkk[m]Complexity in a language is not inherently bad if it allows to simplify designs
15:16:20FromDiscord<zetashift> In reply to @GE "Hey zetashift, I was": Ah, what a coincedence, I'm busy with Godot and Nim right now haha, I'm using https://github.com/geekrelief/gdnim to make a tetris clone. It's neat, and yes I think they are good enough to make full games, with the big caveat that there is little GDNative documentation
15:16:41FromDiscord<GE> How can documentation be improved?
15:18:09FromDiscord<zetashift> Well for now the bindings need some work to be stable, after that some docs can be made, for now I find the best way to just look at some GDScript samples and convert them using Nim. The low level workings of the bindings are WIP because there might also be a jump to Godot 4.0 happening
15:18:35FromDiscord<GE> I thought the bindings already were stable.
15:19:00FromDiscord<zetashift> In reply to @GE "I thought the bindings": They are stable in that, you can work with them now, but gdnim is also focused on getting Godot 4.0 support
15:19:11FromDiscord<zetashift> You can work with them now and be productive
15:21:06*fredrikhr quit (Quit: Client Disconnecting)
15:21:36FromDiscord<zetashift> In reply to @Clonkk "Complexity in a language": I agree, but currently there seems to be a push to have "simple" languages like Go or Zig, that have a minimalistic design. Nim is getting categorized as a "big" language, I don't really think that's entirely true and especially for low level stuff I think it's important to market Nim as a solid fundamentals language.
15:22:07FromDiscord<zetashift> In reply to @GE "I thought the bindings": The bindings also have been used in production for an Android/iOS game, which one I sadly don't know.
15:22:28FromDiscord<GE> Do you happen to have your tetris clone available online? I would like to use them as a possible reference if it's clean and well commented as necessary.
15:22:57FromDiscord<zetashift> I just started like an hour ago with a repo haha, I'll post it when it's done
15:23:00FromDiscord<zetashift> I'll try to document it
15:23:16FromDiscord<GE> Cool. Take your time. there's no rush here.
15:23:23FromDiscord<zetashift> In the meantime you could look at: https://github.com/geekrelief/gdnim_hb_arpg
15:23:33FromDiscord<zetashift> (It works with hot code reloading!)
15:23:40FromDiscord<GE> hot code reloading?
15:24:24FromDiscord<zetashift> Basically when you press 'F5' in Godot, your game is running. If you then alt-tab and change some code, the editor will automatically pickup your code changes and reflect it in the running game
15:24:38FromDiscord<GE> Sounds very convenient.
15:24:57FromDiscord<zetashift> https://defold.com/manuals/hot-reload/
15:25:03FromDiscord<zetashift> best explanation I could google
15:38:24FromDiscord<GE> What I like about nim is how readable the syntax is. What you read is exactly what will happen. Nothing is a mystery like C++ is.
15:43:42giaco__I want to switch from unittest to testament, what's the best way to separate different tests like suite/test in unittest?
15:45:14giaco__is one test per nim file the way to go?
15:47:04FromDiscord<GE> If I was to make a compile/build script with compile flags, should I just make a regular script for that? Or us nmake?
15:47:42FromDiscord<GE> (edit) "us" => "use"
15:52:15liblq-devnim.cfg?
15:53:01FromDiscord<Yardanico> @GE as liblq-dev said, nim.cfg for most flags is enough, although if you're using nimble it's better to specify it as a build task there
15:53:11FromDiscord<Yardanico> also, nim.cfg doesn't honor -d:release and -d:danger, so keep that in mind
15:53:33FromDiscord<GE> Would it be okay if I made a shell script to compile with options?
15:53:44FromDiscord<Yardanico> if you prefer that, sure
15:54:18Clonkk[m]Isn't config.nims preferred to nim.cfg ?
15:54:35FromDiscord<Yardanico> yes, that too, but there's no big difference between then for compilation flags
16:00:11*solitudesf quit (Quit: Idle for 30+ days)
16:00:11*sekao[m] quit (Quit: Idle for 30+ days)
16:06:56FromDiscord<treeform> In reply to @liblq-dev "nim.cfg?": maybe? configure.nims
16:11:14ForumUpdaterBotNew Nimble package! graphql - GraphQL parser, server and client implementation, see https://github.com/status-im/nim-graphql
16:15:48FromDiscord<Nisha's alt> What's the link for the Nim manual?
16:15:55FromDiscord<Nisha's alt> Preferably up-to-date :p
16:16:12FromDiscord<Nisha's alt> It's someone who's checking out Nim for the first time so
16:16:12FromDiscord<zetashift> https://nim-lang.org/docs/manual.html latest stable
16:16:19FromDiscord<Nisha's alt> Thanks
16:16:33FromDiscord<zetashift> Might be better to link this then: https://nim-lang.org/documentation.html ?
16:17:12FromDiscord<Nisha's alt> Uh https://media.discordapp.net/attachments/371759389889003532/831201294676394045/Screenshot_20210412_171705_com.android.chrome.jpg
16:17:42FromDiscord<zetashift> oh yikes
16:17:57FromDiscord<zetashift> I am getting that too with firefox
16:18:00FromDiscord<Nisha's alt> Lmao
16:18:05FromDiscord<zetashift> (edit) "I am getting that too with firefox ... " added "android"
16:20:43FromDiscord<zetashift> Well tell your contact to check it out on desktop πŸ˜›
16:47:36FromDiscord<Nisha's alt> Lmao sure
16:48:26ForumUpdaterBotNew thread by Jasonfi: Opinions on ordering parameters, see https://forum.nim-lang.org/t/7783
16:53:43*haxscramper joined #nim
17:13:23FromDiscord<carpal> could someone send me an example of the nim's ir?
17:13:39FromDiscord<carpal> that nim uses as intermediate language?
17:14:16FromDiscord<Yardanico> Currently it's the same AST
17:14:33FromDiscord<Yardanico> With all types and stuff resolved
17:16:13FromDiscord<Mustache Man> any ideas how to improve the performance of this? https://play.nim-lang.org/#ix=2VR1
17:17:05FromDiscord<Mustache Man> i've looked into some reservoir sampling, but i'm not sure it's any improvement to memory or cpu cycles
17:17:28FromDiscord<Mustache Man> (edit) "cycles" => "cycles. my implementation might have sucked, though."
17:30:15FromDiscord<carpal> In reply to @Yardanico "With all types and": resolved means that are evaluated to the effective structure or primitive or that type checking is done?
17:35:02FromDiscord<haxscramper> Identifiers are replaced with symbols that have information about type
17:35:19FromDiscord<haxscramper> https://github.com/nim-lang/Nim/blob/8b5769133cf30dae2a6ed15aa3ba9d2f2be713ec/compiler/ast.nim#L763
17:35:42FromDiscord<haxscramper> You can print `treeRepr()` of `typed` macro argument - that is what compiler operates on (roughly speaking)
17:36:14FromDiscord<haxscramper> nim IR is mostly via macro API, though some details are hidden to make it easier to write macro
17:49:02*haxscram` joined #nim
17:49:11*haxscram` left #nim (#nim)
17:50:31*haxscramper quit (Ping timeout: 260 seconds)
17:53:05FromDiscord<0xc45> sent a code paste, see https://play.nim-lang.org/#ix=2VRb
17:54:33FromDiscord<Yardanico> when defined(A) or defined(B)
17:54:40FromDiscord<Yardanico> if that's what you meant
17:54:43FromDiscord<Nisha's alt> Was abiut to say that
17:55:38FromDiscord<0xc45> It is! Thanks much! πŸ˜„
17:55:40FromDiscord<0xc45> I feel dumb now lol
18:09:28*abm joined #nim
18:14:07*vicfred joined #nim
18:15:58*NimBot joined #nim
18:17:03FromDiscord<Nisha's alt> Lmao don't worry about it
18:17:12FromDiscord<Nisha's alt> Even the best programmers make small mistakes lol
18:17:45FromDiscord<0xc45> Ain't that the truth. The longer I stare at my screen, the dumber my mistakes get πŸ˜›
18:18:33FromDiscord<Nisha's alt> Mooood a f
18:51:04FromDiscord<Hi02Hi> In reply to @Mustache Man "any ideas how to": I came up with https://play.nim-lang.org/#ix=2VRq, basically exp(0.5) -> sqrt, and arr.take(x) -> arr[0..<x]
18:53:25FromDiscord<Hi02Hi> although it feels wierd to say exp(0.5) is sqrt(), since exp() usually means e^x
19:05:29*vicfred quit (Quit: Leaving)
19:08:39*Jesin quit (Ping timeout: 268 seconds)
19:09:03FromDiscord<Mustache Man> In reply to @Hi02Hi "although it feels wierd": they are the same
19:09:18FromDiscord<Mustache Man> e^0.5 is the same as sqrt
19:10:11FromDiscord<Mustache Man> i didn't know Nim could subset a sequence this way, that's cool!
19:15:42liblq-deve^0.5 is the same as sqrt of what
19:15:52liblq-devyou mean sqrt e?
19:15:58FromDiscord<Mustache Man> ys
19:16:00FromDiscord<Mustache Man> (edit) "ys" => "yes"
19:17:27FromDiscord<Mustache Man> sorry, shouldn't have used 'e'
19:18:27*abm quit (Quit: Leaving)
19:30:55*lritter quit (Ping timeout: 252 seconds)
19:39:48FromDiscord<Mustache Man> In reply to @Hi02Hi "I came up with": thanks! this is a fair amount faster. it's about the same speed as the reservoir sampling that i tried, but it's much more readable
19:40:15FromDiscord<Hi02Hi> πŸ™‚
19:43:51*clyybber quit (Quit: WeeChat 3.1)
19:44:35*clyybber joined #nim
19:47:54*junland quit (Quit: %ZNC Disconnected%)
19:48:41*junland joined #nim
19:59:35ForumUpdaterBotNew Nimble package! aria - Aria2 API lib for Nim for any backend https://aria2.github.io, see https://github.com/juancarlospaco/aria
20:11:38FromDiscord<GE> What's the least complicated way to make command line arguments for nim?
20:12:06FromDiscord<exelotl> uuuh any idea what I'm doing wrong here? πŸ€” https://play.nim-lang.org/#ix=2VRS
20:13:21FromDiscord<Rika> `.Fixed[:T,N]`
20:13:25FromDiscord<Rika> i think
20:13:33FromDiscord<Rika> yup
20:13:36FromDiscord<exelotl> ohhhh
20:13:38FromDiscord<exelotl> ty
20:16:43FromDiscord<exelotl> oops my maths was wrong too lol
20:18:59FromDiscord<GE> What is the recommend way in nim to make command line arguments?
20:19:55FromDiscord<exelotl> depends how complex your program is and whether you want any dependencies or not
20:20:25FromDiscord<exelotl> @GE personally I like to just use parseopt: https://nim-lang.org/docs/parseopt.html
20:20:25Prestigemaybe https://nim-lang.org/docs/parseopt.html
20:20:35FromDiscord<exelotl> booya
20:20:38Prestigehehe
20:21:19FromDiscord<GE> Can I enforce usage of parameters? Like give an error if none were provided?
20:23:29FromDiscord<exelotl> yes, for example you can assign them to `Option` types and then check if they're `none` afterwards: https://github.com/exelotl/natu/blob/devel/tools/gbafix.nim#L99-L104
20:23:42FromDiscord<exelotl> (or in this case I just check for empty string)
20:23:59FromDiscord<TennisBowling> hey everyone, I'm just getting into nim, and I have some packages in python that I was wondering how I could import them into a nim program (can I even?)
20:24:07FromDiscord<exelotl> (edit) "yes, for example you can assign them to ... `Option`type" added "variables of the" | "types" => "type"
20:24:36FromDiscord<Yardanico> In reply to @TennisBowling "hey everyone, I'm just": https://github.com/yglukhov/nimpy
20:25:01FromDiscord<TennisBowling> wow
20:25:06FromDiscord<TennisBowling> thanks!
20:26:19FromDiscord<TennisBowling> also, I read that you can compile nim to c++. how can I do this?
20:26:26FromDiscord<Yardanico> `nim cpp`
20:26:32FromDiscord<Yardanico> or `nimble cpp` if you're using nimble
20:26:49FromDiscord<Yardanico> but C++ still acts as a backend for Nim, so don't expect perfect human-readable C++
20:27:05FromDiscord<exelotl> @Rika any idea why it would fail when I change it from `func` to `template`? πŸ€”
20:27:12FromDiscord<exelotl> https://play.nim-lang.org/#ix=2VRW
20:34:46FromDiscord<haxscramper> In reply to @Yardanico "but C++ still acts": IMHO it is safe that you can expect code that is more readable than most C++
20:34:52FromDiscord<Yardanico> In reply to @haxscramper "IMHO it is safe": XD
20:34:52FromDiscord<haxscramper> (edit) "In reply to @Yardanico "but C++ still acts": IMHO it is safe ... that" added "to say"
20:35:11FromDiscord<Yardanico> I mean surely, because nim's C++ backend doesn't use any complex C++ features
20:36:05FromDiscord<Rika> generic template be funky
20:36:08FromDiscord<haxscramper> Yes, from what I can tell the only thing that makes it not-very-readable is reliance on gotos (for inlined templates and other constructs that cannot really be mapped to "native" C++)
20:36:14FromDiscord<haxscramper> (edit) "Yes, from" => "From"
20:40:26*Vladar quit (Quit: Leaving)
20:45:40FromDiscord<SivadNai> Anyone a wiz with winim? I wanted to use nim to adjust display resolution, but i don't get how to use EnumDisplaySettings()
21:02:40ForumUpdaterBotNew question by SlightlyKosumi: How to resize display resolution on windows with nim, see https://stackoverflow.com/questions/67065630/how-to-resize-display-resolution-on-windows-with-nim
21:06:20*Jesin joined #nim
21:10:04FromDiscord<ElegantBeef> I dont even see what module that procedure comes from sivad
21:10:23FromDiscord<ElegantBeef> winim docs dont list it anywhere
21:10:36FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/831275130516275220/unknown.png
21:11:09FromDiscord<ElegantBeef> Hey it has docs, if it's not there it should be πŸ˜›
21:12:11*narimiran quit (Ping timeout: 240 seconds)
21:12:24FromDiscord<Yardanico> In reply to @ElegantBeef "Hey it has docs,": i only trust source code :)
21:12:42FromDiscord<ElegantBeef> Well the docs are source code
21:12:59FromDiscord<Yardanico> not when some project says that they have some specific feature in readme
21:13:01FromDiscord<Yardanico> but it's not in source code
21:13:13FromDiscord<Yardanico> so they just lied to me
21:13:17FromDiscord<ElegantBeef> Eitherway we can both agree the docs should list it
21:13:23FromDiscord<Yardanico> they probably do
21:13:23FromDiscord<Solitude> In reply to @ElegantBeef "Well the docs are": source code is docs
21:13:40FromDiscord<ElegantBeef> I checked every module on their docs it's not there
21:14:22FromDiscord<Yardanico> well I guess that generating docs for all of the win api in a single file might be a little bit bad
21:14:40FromDiscord<ElegantBeef> Informative though
21:14:49FromDiscord<Yardanico> In reply to @ElegantBeef "Informative though": except that your browser will not open it :)
21:14:58FromDiscord<TennisBowling> okay one last question from me (I promise!) is there any way to port all my python code to nim without needing to rewrite it all?
21:15:01FromDiscord<Yardanico> https://github.com/khchen/winim/blob/master/winim/inc/winuser.nim look how many exported stuff are there
21:15:03FromDiscord<Yardanico> In reply to @TennisBowling "okay one last question": no
21:15:05FromDiscord<SivadNai> I kind of expect winim to be light on documentation, considering what it is doind
21:15:15FromDiscord<Yardanico> In reply to @SivadNai "I kind of expect": yeah, most of the stuff there is just plain win api
21:15:17FromDiscord<ElegantBeef> Dynamic typed -> Static typed is a pain in the ass
21:15:18FromDiscord<Yardanico> it doesn't need "documentation"
21:15:28FromDiscord<TennisBowling> In reply to @Yardanico "no": okay, thats fine
21:15:29FromDiscord<Yardanico> msdn already documents everything
21:17:46*clyybber quit (Ping timeout: 252 seconds)
21:24:29FromDiscord<SivadNai> the python example dressed up enumDisplaySettings() and changeDisplaySettings() in romper suits
21:39:27*tane quit (Quit: Leaving)
21:50:04ForumUpdaterBotNew post on r/nim by phpOstrich: Nimext, see https://reddit.com/r/nim/comments/mpo8lc/nimext/
22:06:21*haxscramper joined #nim
22:06:23*haxscramper quit (Remote host closed the connection)
22:11:09FromDiscord<pointystick> @SivadNai here's an example of using ChangeDisplaySettings. I wrote it a couple of years ago (before Nim 1.0) but it should still work. https://play.nim-lang.org/#ix=2VSz
22:25:41*leorize quit (Remote host closed the connection)
22:26:15*leorize joined #nim
22:49:12ForumUpdaterBotNew thread by Deech: Perceus: Optimized Ref Counting For Koka, see https://forum.nim-lang.org/t/7784
22:52:48*abm joined #nim
23:02:47FromDiscord<Gennadiy> The `product` proc in `algorithm` produces the cartesian product of an array. It is defined like so:↡`proc product[T](x: openArray[seq[T]]): seq[seq[T]]`↡How would I get the cartesian product of two arrays/sequences of different types, e.g., `proc product[T, R]`?
23:06:39FromDiscord<Rika> in that case what would the return type be
23:13:33FromDiscord<Gennadiy> Good question. A seq of tuples: seq[seq[(T,R)]]. I hope I wrote that correctly.
23:14:38FromDiscord<Rika> seq[seq[tuple[a: T, b: R]]]
23:15:37FromDiscord<Gennadiy> Thanks, that makes more sense.
23:22:36FromDiscord<Gennadiy> sent a long message, see http://ix.io/2VST
23:29:42FromDiscord<InventorMatt> you could easily create that like this https://play.nim-lang.org/#ix=2VSV
23:40:16FromDiscord<Gennadiy> That could work. Thanks @InventorMatt .
23:41:14*xet7 quit (Remote host closed the connection)
23:42:26*wasted_youth2 joined #nim