<< 29-09-2017 >>

00:10:44*couven92 quit (Quit: Client Disconnecting)
00:21:27*zachk quit (Quit: zzzz)
00:37:00*ipjk quit (Read error: Connection reset by peer)
01:03:22*Serenitor joined #nim
01:03:31*Serenitor quit (Client Quit)
01:11:05*chemist69 quit (Disconnected by services)
01:11:10*chemist69_ joined #nim
01:14:13*jsgrant quit (Quit: jsgrant)
01:14:45*jsgrant joined #nim
01:23:53*endragor joined #nim
01:24:32FromGitter<mohamedmoussa89> whats equivalent of python's 'range' in Nim?
01:24:39*endragor_ joined #nim
01:25:45FromGitter<mohamedmoussa89> e.g. I want a sequence from 1 to 100
01:25:59*Serenitor joined #nim
01:26:46FromGitter<mohamedmoussa89> nm... got it... to_seq(1..100)
01:27:36*endragor_ quit (Remote host closed the connection)
01:28:31*endragor quit (Ping timeout: 248 seconds)
01:29:32Serenitorwhen passing a proc, can you have a default proc for that argument? this looks silly, but something like that:
01:29:32Serenitorproc test (callback: proc = (proc = discard)) = callback()
01:29:32Serenitorso that it would be valid to call test() without arguments
01:33:26*Snircle joined #nim
01:46:06FromGitter<mohamedmoussa89> alright. what about a range for even numbers?
01:47:31*vivus quit (Quit: Leaving)
01:51:52*plexigras quit (Ping timeout: 260 seconds)
01:56:07FromGitter<mohamedmoussa89> hmm.. seems i need to use count_up/count_down
02:09:56subsetparkSerenitor - you don’t have to declare the type of arguments with default values
02:09:58*def-pri-pub joined #nim
02:10:04subsetparkSo it should be fairly straightforward
02:14:19*Nobabs27 quit (Quit: Leaving)
02:18:37Serenitorah, thanks for the hint
02:19:10*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:27:29*dddddd quit (Remote host closed the connection)
02:27:51*relax joined #nim
02:29:48relaxwhy are typedesc proc parameters treated specially? Why not say they need to be in the normal generic square brackets?
02:34:35*jjido quit (Ping timeout: 240 seconds)
02:36:22*jjido joined #nim
02:48:10*Serenit0r joined #nim
02:51:29*Serenitor quit (Ping timeout: 258 seconds)
03:02:06*Ven`` joined #nim
03:06:28*jjido quit (Remote host closed the connection)
03:08:53*def-pri-pub quit (Quit: Leaving.)
03:40:49*Ven`` quit (Ping timeout: 248 seconds)
03:49:59*yglukhov joined #nim
03:54:39*yglukhov quit (Ping timeout: 248 seconds)
04:24:28*def-pri-pub joined #nim
04:42:01*def-pri-pub left #nim (#nim)
04:43:01*relax quit (Ping timeout: 240 seconds)
04:43:35*miran joined #nim
04:50:39*rauss quit (Quit: WeeChat 1.9)
04:51:52*rauss joined #nim
04:59:10*endragor joined #nim
04:59:33FromGitter<superfunc> @Varriount Sorry for not getting back to you yet about nimlime, we've been cutting a release this week at work. Should get to it this weekend.
05:11:30FromGitter<Varriount> @superfunc I know the feeling.
05:12:19FromGitter<superfunc> Multi-platform testing is not fun
05:12:29FromGitter<superfunc> Also, having a gui written in python is literal refactoring hell
05:16:11*Nobabs27 joined #nim
05:39:50*kunev joined #nim
05:53:03*yglukhov joined #nim
05:53:03*miran quit (Ping timeout: 248 seconds)
05:57:21*yglukhov quit (Ping timeout: 248 seconds)
06:11:07*jsgrant quit (Quit: jsgrant)
06:12:23*PMunch joined #nim
06:15:42*solitudesf joined #nim
06:16:32*claudiuinberlin joined #nim
06:26:07FromGitter<krux02> @superfunc that is why I like very well developed cross platform API's
06:34:12*nsf joined #nim
07:00:04*Ven joined #nim
07:00:27*Ven is now known as Guest55182
07:06:34*Guest55182 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:08:25*Nobabs27 quit (Quit: Leaving)
07:09:01*Vladar joined #nim
07:39:35*ShalokShalom joined #nim
07:41:59*Ven`` joined #nim
07:46:28*yglukhov joined #nim
07:47:54*Arrrr joined #nim
07:49:15*PMunch_ joined #nim
07:49:41*PMunch_ quit (Remote host closed the connection)
07:50:52*yglukhov quit (Ping timeout: 258 seconds)
07:51:49*PMunch quit (Ping timeout: 255 seconds)
08:01:43*endragor quit (Quit: Leaving...)
08:11:34*Ven`` quit (Ping timeout: 258 seconds)
08:25:44*Ven joined #nim
08:26:07*Ven is now known as Guest7163
08:27:49*solitudesf quit (Ping timeout: 255 seconds)
08:42:44*yglukhov joined #nim
08:45:50*yglukhov_ joined #nim
08:46:16*yglukhov quit (Read error: Connection reset by peer)
08:57:03*gmpreussner quit (Ping timeout: 248 seconds)
09:02:33*Guest7163 quit (Ping timeout: 258 seconds)
09:04:49*Ven joined #nim
09:05:12*Ven is now known as Guest95458
09:05:52*libman quit (Quit: Connection closed for inactivity)
09:06:51*gmpreussner joined #nim
09:21:42FromGitter<Grabli66> Hi. Can i compile with nim for device without OS? :)
09:25:40*Guest95458 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:28:12*plexigras joined #nim
09:34:58Araqgrabli66: yes
09:39:50*Arrrr quit (Read error: Connection reset by peer)
09:44:45*Ven_ joined #nim
09:45:22*Ven_ quit (Client Quit)
10:07:28*rauss quit (Ping timeout: 248 seconds)
10:08:58*Serenit0r quit (Quit: Leaving)
10:09:17FromGitter<Grabli66> That's good.
10:09:36*rauss joined #nim
10:11:18FromGitter<Grabli66> But can i use async/await on that device?
10:11:54FromGitter<Yardanico> if you will implement an async loop for it, then yes
10:12:28FromGitter<Grabli66> And can i use GC?
10:12:53FromGitter<Yardanico> well, maybe memory regions, depends on how much your device has RAM
10:13:54*PMunch joined #nim
10:14:13FromGitter<Grabli66> Ok
10:14:49FromGitter<Yardanico> how much ram does it haev?
10:17:53FromGitter<Grabli66> I dont know, right now
10:20:27*enthus1ast quit (Ping timeout: 252 seconds)
10:22:33*enthus1ast joined #nim
10:28:55*enthus1a1t joined #nim
10:32:05*enthus1ast quit (Ping timeout: 240 seconds)
10:33:40*Ven joined #nim
10:34:05*Ven is now known as Guest2731
10:40:32*Guest2731 quit (Ping timeout: 248 seconds)
10:51:05*xet7 quit (Quit: Leaving)
11:02:05*PMunch quit (Ping timeout: 255 seconds)
11:02:30*PMunch joined #nim
11:03:29*Snircle joined #nim
11:10:50*dddddd joined #nim
11:13:24FromGitter<Yardanico> hmm, I want to try GC v2 on my small (<2kloc) project :P
11:15:03FromGitter<Yardanico> Hmm, it seems it compiles and runs fine
11:15:35FromGitter<Yardanico> (I use async heavily, also httpclient, json, strtabs, tables, etc etc)
11:25:32Araqyardanico: it's slower than M&S though
11:25:40Araqby 20%
11:25:55Araqat least it's realtime...
11:27:15FromGitter<krux02> I really like the nim sdl2 webassembly demos
11:29:48FromGitter<Yardanico> Araq: at least it works! maybe it uses less RAM?
11:30:12Araqas I said, it's realtime.
11:30:29Araqtell it to never run for more than 1ms and it adheres to this deadline
11:31:01Araqcycles are irrelevant for its operation.
11:34:08FromGitter<Yardanico> do I need to report issues if I see "collectCycles: introduced bug E 1" in gc2? or not yet?
11:34:20FromGitter<Yardanico> with gc:v2
11:55:36Araqoh yes, report it
11:56:55Araqbut this message is not part of gc:v2
11:57:00Araqoutdated version?
12:01:45FromGitter<gogolxdong> @krux02 will you show the link of the demos?
12:02:04FromGitter<krux02> https://github.com/Jipok/Nim-SDL2-and-Emscripten
12:06:23FromGitter<gogolxdong> Thanks for sharing.
12:24:47*obadz quit (Ping timeout: 260 seconds)
12:26:16FromGitter<Yardanico> BTW, why "with" is reserved? What are plans for it?
12:27:09*obadz joined #nim
12:28:23euantorHopefully something like C#'s `using` - that would be nice and should be possible with anything with a `close()` proc
12:33:21FromGitter<zacharycarter> @krux02: there are differences for opengl and webassembly just FYI
12:33:28FromGitter<zacharycarter> you have to use the webgl friendly subset of OpenGL
12:33:36FromGitter<zacharycarter> in case you didn't know this already
12:34:05FromGitter<krux02> I did know that
12:34:09FromGitter<krux02> openglES afaik
12:34:59FromGitter<krux02> euantor: that is easy to build with a macro
12:35:09FromGitter<krux02> I even think a template is enough
12:35:53FromGitter<krux02> template using(arg): untyped = arg.use; defer: arg.close
12:36:44euantorSure, having it in the stdlib would be nice though rather than library authors re-implementing it every time
12:37:05FromGitter<Yardanico> @krux02 well maybe "with" would be something like "with" in D?
12:37:19dom96add it, but model it after python
12:37:34FromGitter<krux02> I don't know with in D
12:38:00euantorCould go the Java route - "try with resources" ;)
12:38:01*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:38:08euantor(or not)
12:38:22FromGitter<Yardanico> @krux02 https://dlang.org/spec/statement.html#WithStatement
12:38:29FromGitter<krux02> I like the c++ route deterministic destructors
12:38:54FromGitter<Yardanico> The with statement is a way to simplify repeated references to the same object.
12:38:57euantorAh, similar to `With` in Visual basic then
12:39:57FromGitter<krux02> my visual basic is 15 years old has was just a few weeks of experience
12:40:05FromGitter<krux02> so no I also don't know that
12:40:20euantorhttps://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/with-end-with-statement
12:41:47FromGitter<Yardanico> can be useful sometimes :)
12:41:52FromGitter<Yardanico> but it's similar to {.this: self.}
12:41:58FromGitter<Yardanico> but works not only in procs
12:44:00*ShalokShalom_ joined #nim
12:47:09*ShalokShalom quit (Ping timeout: 240 seconds)
12:48:36Araqdom96: I think they mean "with" shouldn't be a keyword
12:50:02*ipjk joined #nim
12:51:53euantorexactly
12:55:41*PMunch_ joined #nim
12:58:09*PMunch quit (Ping timeout: 248 seconds)
13:02:54dom96okay, I agree.
13:03:50FromGitter<krux02> I think a lot in the language should not be a keyword
13:04:22FromGitter<krux02> defer
13:04:25FromGitter<krux02> end
13:08:12*PMunch_ quit (Quit: Leaving)
13:18:30FromGitter<krux02> @zacharycarter can you help me?
13:18:41FromGitter<krux02> I try to compile the examples on my own
13:18:50FromGitter<krux02> but I hate the webassembly toolchain
13:19:22FromGitter<krux02> there are simply too many points of failure
13:22:46*qwertfisch is now known as eihwftcsqr
13:23:38FromGitter<zacharycarter> I can but I have a meeting to go to @krux02 I can help out in about 2 hours or so if you'd be around
13:23:52FromGitter<zacharycarter> what error are you running into right now?
13:23:58FromGitter<zacharycarter> maybe I have a quick solution
13:24:58FromGitter<krux02> how do I start the emscripten builds?
13:25:51FromGitter<zacharycarter> you need a nim.cfg file somewhere that looks something like this -
13:26:39FromGitter<krux02> I have a nim config file
13:26:46FromGitter<krux02> I use the one from the demos repo
13:26:58FromGitter<krux02> to be honest I am in the demos repo you showed me
13:27:06FromGitter<zacharycarter> okay let me look at the demos repo
13:27:07FromGitter<krux02> but I don't know how to start them
13:27:31FromGitter<zacharycarter> it should just be - nim c -d:emscripten -d:release main.nim
13:27:47FromGitter<zacharycarter> do you have emscripten installed?
13:27:47FromGitter<krux02> yes
13:27:50FromGitter<krux02> yes
13:27:51FromGitter<zacharycarter> and do you have emcc etc on your path?
13:27:55FromGitter<krux02> yes
13:28:02FromGitter<krux02> and then?
13:28:31FromGitter<krux02> I have to change import sdl to import ../sdl
13:28:38FromGitter<krux02> otherwise it doesn't work
13:28:48FromGitter<zacharycarter> weird...
13:28:49FromGitter<krux02> and then I have to call the compiler from the root of the project
13:28:53FromGitter<krux02> otherwise it doesn't work
13:28:57FromGitter<zacharycarter> you also need to specify an out file
13:29:13FromGitter<krux02> and then I had to fix some c++ files in emscripten ports
13:29:19FromGitter<krux02> otherwise it didn't work
13:29:22FromGitter<zacharycarter> wtf you shouldn't have to do that!
13:29:28FromGitter<krux02> well I had
13:29:32FromGitter<krux02> it was simple though
13:29:36FromGitter<zacharycarter> okay
13:29:42FromGitter<zacharycarter> I have to go to this meeting I'll be back soon
13:29:54FromGitter<krux02> it compiled with -Werror for some reason, and my compiler had some warnings
13:30:10FromGitter<krux02> I am on arch, always newest compilers
13:30:14FromGitter<krux02> more warnings
13:30:28FromGitter<krux02> I won't be here then anymore
13:32:25*Ven joined #nim
13:32:49*Ven is now known as Guest65998
13:40:29*Guest65998 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:41:46FromGitter<gogolxdong> how to install sdl
13:43:32FromGitter<krux02> pacman -S sdl2
13:43:43FromGitter<krux02> nimble install sdl2_nim
13:48:15FromGitter<gogolxdong> Error: redefinition of 'GL_CONTEXT_RESET_NOTIFICATION'
13:48:33*solitudesf joined #nim
13:48:38FromGitter<krux02> context?
13:48:54FromGitter<gogolxdong> nim c -d:emscripten -d:release -d:wasm .\ex202_transformations.nim
13:50:21FromGitter<krux02> just tried it, I don't have that error
13:53:16*ShalokShalom_ is now known as ShalokShalom
13:54:52*Ven_ joined #nim
13:56:39*PMunch joined #nim
14:08:15*TjYoco joined #nim
14:14:18*eihwftcsqr is now known as qwertfisch
14:15:18*Sentreen quit (Ping timeout: 252 seconds)
14:16:14FromGitter<krux02> Is there a way to map ``foo.bar = baz`` to ``dynamicCall(foo, "bar", baz)``?
14:19:05FromGitter<krux02> I know scala has something like that
14:20:06FromGitter<krux02> it would help for "dynamic" language bindings
14:24:06FromGitter<razuit> is there a way for httpClient to not follow redirects?
14:26:07FromGitter<Yardanico> yes
14:26:17FromGitter<Yardanico> https://nim-lang.org/docs/httpclient.html#newHttpClient
14:26:21FromGitter<Yardanico> you can specify max redirects
14:26:40FromGitter<razuit> thanks @Yardanico - don’t know how I missed that
14:28:30*Sentreen joined #nim
14:28:46Araqkrux02: you can overload `.=`
14:29:11FromGitter<krux02> oh, thanks
14:29:15FromGitter<krux02> forgot about that
14:31:35*gokr joined #nim
14:34:45FromGitter<krux02> is there an example for `.=` overload?
14:36:05FromGitter<Yardanico> @Araq but "Warning: overloaded '.' and '()' operators are now .experimental; .= is deprecated [Deprecated]" ?
14:36:07*oprypin quit (Quit: Bye)
14:36:09FromGitter<Yardanico> .= is deprecated?
14:36:22*oprypin joined #nim
14:36:39FromGitter<krux02> yes, and how do I use it?
14:37:04FromGitter<krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59ce5a90bac826f054145459]
14:37:10FromGitter<Yardanico> ```code paste, see link``` ⏎ ⏎ ? [https://gitter.im/nim-lang/Nim?at=59ce5a9632fc8b7e4055c14c]
14:37:22FromGitter<Yardanico> can you show your code?
14:37:28FromGitter<Yardanico> well I just did a template here, you can use a proc too
14:37:29FromGitter<krux02> ah thanks
14:40:52FromGitter<krux02> this works nicely with everything ⏎ ⏎ ```proc `.=`[T](a: MyType, b: string, c: T): void = ⏎ discard``` [https://gitter.im/nim-lang/Nim?at=59ce5b74b59d55b82351aa03]
14:41:27FromGitter<Yardanico> yay
14:41:32FromGitter<Yardanico> you can remove "void" btw
14:41:38FromGitter<Yardanico> or you just like it?
14:41:42FromGitter<krux02> I just like it
14:41:53FromGitter<krux02> I actually prefer it
14:42:08subsetparkYou must be a C++ programmer...
14:42:14FromGitter<krux02> I come from scalar, and there the default is whas is called auto in nim
14:42:25FromGitter<krux02> C++ and Scala mostly
14:47:54*FromGitter quit (Remote host closed the connection)
14:47:54*oprypin quit (Quit: Bye)
14:48:08*FromGitter joined #nim
14:48:15*oprypin joined #nim
14:53:16*Ven joined #nim
14:53:39*Ven is now known as Guest32422
14:54:09*Ven_ quit (Ping timeout: 240 seconds)
14:57:41FromGitter<Jipok> @gogolxdong solution to your problem: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59ce5f65614889d47554d50d]
15:00:55FromGitter<gogolxdong> @Jipok Error: undeclared identifier: 'RendererAccelerated'
15:05:25*BitPuffin|osx quit (Remote host closed the connection)
15:08:42*arnetheduck quit (Ping timeout: 260 seconds)
15:10:38*miran joined #nim
15:11:41*Trustable joined #nim
15:13:10*Guest32422 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:28:15*jsgrant joined #nim
15:30:03*adeohluwa joined #nim
15:31:10adeohluwa<span Id="company_name">kiddies party planner </span>
15:31:20*yglukhov_ quit (Remote host closed the connection)
15:31:23adeohluwaI'm using nim query
15:33:13adeohluwahow do u extract just the text
15:33:53adeohluwaxml.querySelector("#xxxxxx")
15:34:05*yglukhov joined #nim
15:38:34FromGitter<Yardanico> check https://nim-lang.org/docs/xmltree.html docs?
15:38:41FromGitter<Yardanico> https://nim-lang.org/docs/xmltree.html#text,XmlNode
15:39:58*yglukhov quit (Ping timeout: 264 seconds)
15:42:39*yglukhov joined #nim
15:43:45FromGitter<Yardanico> libman: are you around ? :) just wanted to ask if it would be possible to license code ported to C from Nim as MIT - original C code licensed as BSD-2-Clause
15:43:54FromGitter<Yardanico> oh, sorry
15:44:01FromGitter<Yardanico> from C to Nim
15:45:00*claudiuinberlin joined #nim
15:46:48*yglukhov quit (Ping timeout: 240 seconds)
15:49:06*Pisuke joined #nim
15:50:32*MyMind quit (Ping timeout: 246 seconds)
15:57:40FromGitter<GULPF> @adeohluwa: nimquery returns normal xml nodes, you can use the procs from the xmltree module
15:57:44FromGitter<GULPF> https://nim-lang.org/docs/xmltree
16:01:53FromGitter<GULPF> so getting the text content would be `node.innerText`
16:02:45*Sembei joined #nim
16:03:08*Pisuke quit (Ping timeout: 240 seconds)
16:05:47adeohluwaGULPF: thanks for the hand holding :)
16:18:59*relax joined #nim
16:19:43FromGitter<GULPF> np, I'm just happy someone is using nimquery :D
16:36:23*Arrrr joined #nim
16:36:23*Arrrr quit (Changing host)
16:36:23*Arrrr joined #nim
16:42:07*TjYoco quit (Ping timeout: 248 seconds)
16:43:36FromGitter<Yardanico> Why "someInt += if true: 1 else: 2" doesn't work?
16:43:43FromGitter<Yardanico> just some limitation?
16:44:46Araqit requires ()
16:45:24FromGitter<Yardanico> ah
16:48:30*nsf quit (Quit: WeeChat 1.9)
16:52:15FromGitter<mratsim> Generic generics are not possible? ⏎ ⏎ ```type ⏎ Gate[AnyTensor[T]] = ref object {.inheritable.}``` [https://gitter.im/nim-lang/Nim?at=59ce7a3f177fb9fe7e1b37f5]
16:52:20*yglukhov joined #nim
16:52:35FromGitter<Yardanico> should be possible
16:52:52FromGitter<Yardanico> or wait
16:52:54FromGitter<Yardanico> I don't know :P
16:53:55Arrrrmaybe += is a tempalte
16:53:57Arrrr*template
16:54:12FromGitter<Yardanico> yeah, it is probably
16:54:49*relax quit (Ping timeout: 258 seconds)
16:56:41*yglukhov quit (Ping timeout: 255 seconds)
17:04:46*couven92 joined #nim
17:05:10*TjYoco joined #nim
17:06:26*libman joined #nim
17:08:38FromGitter<Jipok> @gogolxdong what and how are you trying to compile?
17:09:51*solitudesf quit (Remote host closed the connection)
17:12:24miranhow to initialize an empty Table?
17:14:06Arrrrtable = initTable[A, B]()
17:14:17mirancurrently i have `bots: Table[int, seq[int]]`, but that produces SIGSEGV
17:15:47Arrrrreplace that with `bots = initTable[int, seq[int]]()`
17:16:12miranArrrr: just did that, based on your previous comment - works, thank you!
17:20:01*obadz quit (Ping timeout: 240 seconds)
17:21:17*obadz joined #nim
17:28:24FromGitter<Jipok> @krux02 Fixed https://github.com/Jipok/Nim-SDL2-and-Emscripten/issues/1
17:30:06FromGitter<genotrance> does Nimble support dependencies on a C repo without a .nimble file? Like I have a module that depends on the code in another repo that I don't own?
17:30:44couven92@gentrance, you could use a git submodule for that and use the regular exec in a nimble task
17:31:47FromGitter<genotrance> is there any documentation for this?
17:32:19FromGitter<mratsim> Any way to get a subtype from a Generic Generic? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ TT is a Tensor[T] or CudaTensor[T] or anything[T] and I want to extract T. instead of “float32" [https://gitter.im/nim-lang/Nim?at=59ce83a2614889d47555b4cd]
17:32:51FromGitter<mratsim> @genotrance use gitsubmodule and {.compile.} ? That’s what I’m planning to do
17:33:32FromGitter<mratsim> I remember seeing surprised on the forum that submodule were pulled by nimble on user install
17:38:51FromGitter<genotrance> thanks @mratsim @couven92
17:40:15FromGitter<genotrance> how about stuff not in github, stuff in SF.net for example
17:40:42*zachk joined #nim
17:41:20couven92@genotrance, then write a nimble task that downloads from SF.net
17:41:44couven92Remember: a nimble file is just a regular nimscript file!
17:42:35*m712 quit (Ping timeout: 255 seconds)
17:43:14libmanGitHub is the new Microsoft!
17:43:51FromGitter<genotrance> @couven92: makes sense, thanks!
17:44:20libman<sing parodyOf="Richard Stallman" nasally="500%">Join us now and IPFS the source codes! You'll be free, Nimmers, you'll be freeee-ee-eeee!</sing>
17:47:19*m712 joined #nim
17:51:45FromGitter<mratsim> @Yardanico you can’t do generic generics :/ https://github.com/nim-lang/Nim/issues/3856
17:52:42*m712 quit (Ping timeout: 258 seconds)
17:52:53ArrrrIs github the new microsoft?
17:53:11couven92without nothing works
17:54:13FromGitter<mratsim> Is there an equivalent to type traits “genericHead” that returns the subtype? ⏎ ⏎ > seq[int].genericHead will be just seq
17:56:07*m712 joined #nim
18:09:34*m712 quit (Ping timeout: 258 seconds)
18:13:30*m712 joined #nim
18:22:13*nsf joined #nim
18:30:02*yglukhov joined #nim
18:30:07*ofelas joined #nim
18:37:29*Nobabs27 joined #nim
18:43:09*Sentreen quit (Ping timeout: 240 seconds)
18:53:12*Nobabs27 quit (Quit: Leaving)
18:56:12*Sentreen joined #nim
19:02:58*salewski joined #nim
19:05:07salewskiI have this proc header:
19:05:15salewskiproc xgetSelected*(self: TreeSelection; model: var (TreeModel | TreeStore | TreeModelSort | gtk.ListStore | TreeModelFilter); iter: var TreeIter): bool =
19:05:43salewskiThe opening bracket after var is desired and necessary?
19:06:21salewskiIt compiles without, I assumed bracket was not necessary, but seems that my expectation was wrong.
19:09:01salewskiInteresting and nice is, that the next line in the proc compiles and seems to work:
19:09:05salewskiif model.isNil: model = new type(model)
19:09:50*adeohluwa quit (Quit: Connection closed for inactivity)
19:10:03FromGitter<mratsim> it’s necessary otherwise `var TreeModel | var TreeStore | var TreeModelSort`works too
19:11:01FromGitter<mratsim> or you can do AnyTree = TreeModel | TreeStore | TreeModelSort | gtk.ListStore | TreeModelFilter ⏎ ⏎ and in your proc sig: var AnyTree
19:11:39salewskiOK, thanks.
19:13:29*salewski quit (Quit: WeeChat 1.9)
19:16:25*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:28:14*Vladar quit (Remote host closed the connection)
19:29:03*Jesin quit (Quit: Leaving)
19:32:45*Jesin joined #nim
19:34:40dom96lol come on. The `&` operator is used for multiplication in the basic2d module?!
19:46:53*Arrrr quit (Quit: Leaving.)
19:49:43*solitudesf joined #nim
19:58:29PMunchHaha, who figured that would be a good idea? :P
19:59:14*claudiuinberlin joined #nim
20:00:48*claudiuinberlin quit (Client Quit)
20:01:55federico3wat
20:02:09*claudiuinberlin joined #nim
20:05:25TjYocoI is I translate something under BSD 2-clause license into nim, can I use a different license?
20:05:37TjYocoif I*
20:05:41federico3translate? yes
20:05:46federico3as in: rewrite
20:05:59TjYocookay just making sure, thanks
20:07:25PMunchHINAL though
20:07:40PMunchHe Is Not A Lawyer (AFAIK)
20:07:56PMunchJust don't blame us if you get sued for it :P
20:08:06TjYocoyeah, Its a very permissive license I'm just not sure what falls under "modification"
20:08:23PMunchWell, a total rewrite would definitely count as modification :P
20:08:45*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
20:08:51PMunchBut it's a strange domain. Since you're probably keeping the implementation as-is, but changing the way you express it.
20:09:04federico3PMunch: no - but I took exams on software law and did work on compliance...
20:09:14FromGitter<Yardanico> TjYoco: you're asking the same question as me today :D
20:09:18PMunchOh really? Cool!
20:09:41PMunchI tend to stay away from that as much as possible. Hairy subject..
20:10:01TjYocoYardanico, what a coincidence! I didn't see it lol
20:13:08FromGitter<Yardanico> "libman: are you around ? just wanted to ask if it would be possible to license code ported to C from Nim as MIT - original C code licensed as BSD-2-Clause ⏎ oh, sorry ⏎ from C to Nim"
20:13:16FromGitter<Yardanico> This is my question :P
20:14:14libmanI am not a license expert. I am a license crybaby. But I don't imagine why that would be a problem.
20:16:33libmanIf by "code ported" you mean a rewrite, then it being a "derivative work" is more questionable than a fork in the same language, so maybe you can use any license you want. But BSD-2-Clause and MIT are very close, and both are a-OK.
20:19:34libmanSpeaking of licenses, the tragedy of Julia became even more ironic this month...
20:20:03libmanYou can see my (very crude and unfinished) language module ecosystem license estimates at https://github.com/lbmn/libman.org/blob/master/piki/tiole.md
20:20:29libmanhttps://pkg.julialang.org/ went from 92.662% packages being copyfree on 2017-09-08 to now 97.473%!
20:21:32libmanBUT, since Julia is just a silly scripting language married to LLVM, and not very portable or suitable for general purpose or systems programming, Nim retains its freedom crown - for now.
20:23:54*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
20:27:43*miran quit (Ping timeout: 248 seconds)
20:28:00*yglukhov quit (Remote host closed the connection)
20:30:36*Guest99393 joined #nim
20:35:29*Guest99393 quit (Quit: Guest99393)
20:36:32*Guest99393 joined #nim
20:39:26FromGitter<Yardanico> Main compiler used with nim is gcc :P
20:39:37FromGitter<Yardanico> Also clang
20:39:52couven92VCC :D
20:39:58*Guest99393 quit (Client Quit)
20:40:13*Guest99393 joined #nim
20:40:24PMunchGCC is GPL I assume?
20:40:24FromGitter<Yardanico> Well it's even worse :P
20:40:29FromGitter<Yardanico> Yes
20:40:39FromGitter<Yardanico> So not "copyfree"
20:40:56PMunchWhat's stopping it from being considered copyfree?
20:41:21libmanNim is copyfree because it will always be able to use an older version of clang.
20:41:45federico3*facepalm*
20:42:12libmanEven after LLVM's Apache Tragedy. But that would be harder with Rust, Julia, etc.
20:45:29*Demos joined #nim
20:49:37*Guest99393 quit (Ping timeout: 248 seconds)
20:50:26*Demos quit (Quit: Demos)
20:51:37*Demos joined #nim
20:54:58*Demos quit (Client Quit)
20:56:44PMunchWhy did LLVM decide to relicense with Apache? And what were they using before?
20:57:24*Demos joined #nim
21:00:36libmanBefore they were using a copyfree BSD-like license with a home baked patent grant. Because everyone is living in fear of being sued, someone didn't find the patent grant sufficiently reassuring.
21:02:06libmanOne popular permissive license with a patient grant that's actually been tested in court is Apache, but tragically it adds some additional restrictions.
21:03:11libmanhttp://lists.llvm.org/pipermail/llvm-dev/2017-August/116266.html
21:04:35libmanSo us copyfree people (including some in the BSD camp) will probably fork and maintain an old version of Clang.
21:05:23libman(Not "old" yet, it hasn't happened yet.)
21:06:08*Demos quit (Quit: Demos)
21:06:11PMunchYeah I read up on it a bit, and Apache has those pesky "must include this and that" in modifications..
21:06:42libmanThis doesn't concern Nim. It actually only strengthens it against competitors that embed LLVM.
21:09:21libmanBy the time Clang 6 (or whatever the last copyfree version will be) becomes noticably slower than the evolving competition, some copyfree alternative will evolve as well.
21:12:08*gokr quit (Ping timeout: 240 seconds)
21:19:14*adeohluwa joined #nim
21:21:41FromGitter<Varriount> Hrm, copyleft licenses are always very contentious
21:23:02FromGitter<Varriount> I don't mind applications being copyleft, but it's always a pain when libraries (especially small utility libraries) are under the GPL.
21:23:57*ofelas quit (Quit: shutdown -h now)
21:25:02*manjaro-kde5__ quit (Remote host closed the connection)
21:29:17*solitudesf quit (Ping timeout: 258 seconds)
21:37:22*Trustable quit (Remote host closed the connection)
21:38:02*salewski joined #nim
21:39:01salewskiwhen a proc gets a ref parameter with value nil, there may be two sources for that nil value:
21:40:19salewski1. The user passes an actual valiable which has still value nil. 2. The user passes no variable, but nil is the default value.
21:40:51salewskiCan I find out in the proc which of these two cases has occured?
21:41:08FromGitter<zacharycarter> def-pri-pub: are you around?
21:41:29salewski(I guess not, so I need overloaded procs)
21:44:42Araqyou can't.
21:46:13salewskiExample: proc p(x: var ref RootObj = nil) # when the user passes an actual variable with value nil, he may want the proc to allocate it.
21:46:51salewskiThank Araq, so I have to generate overloaded procs for these rare cases.
21:48:09Araqhow does Rust wrap GTK3?
21:48:59salewskiRust has a not too tiny GTK3 community.
21:49:10Araqexactly.
21:49:45salewskiI have looked only on some examples and did notb like it too much. It was not really high level.
21:50:55salewskiBut Rust people try to replace GTK's C code partly with Rust. That is interesting but difficult.
21:55:21Araqwell you know my opinion. I don't see a growing GTK3 community for Nim with types like AnyTree = TreeModel | TreeStore | TreeModelSort | gtk.ListStore | TreeModelFilter
21:58:33Araqor maybe to keep it fair let me rant about that newer Win API wrapper instead.
21:58:45salewskiI try to make Nim GTK3 similar to Ruby GTK3 -- and that was not bad.
21:59:26salewskiYour example -- the reason is that GTK uses interfaces and types who provide that interfaces.
21:59:55Araqyes, I'm sure it supports most of the Win API. but it's also with a VB like DSL, no documentation and hard to follow code.
21:59:56salewskiThe type that provides the functionality are drop in replacements for the interface types.
22:00:29salewskiI try to hide all that for the user. Wich works fine with Nim's or types.
22:00:55Araqwrappers are not the place to innovate. build useful things on top of the boring wrappers instead.
22:01:19PMunchLooking forward to see what might become of NiGui for example
22:01:39AraqRuby and Python are dynamically typed.
22:01:43libmanWidget toolkits (ex. GTK) are rarely the ideal form of human-computer interaction. Intelligent users do better entering commands and editing files.
22:01:48salewskiYes, at the beginning I was hoping that someone other does the wrappers. It is not too much fun.
22:02:31PMunchlibman, yeah I recently discovered sc/sc-im and now I'm fully terminal based for work tools. It's great :)
22:02:39PMunchBrowser is still an issue though..
22:02:46Araqthis dynamic typing changes everything for GTK3.
22:03:07PMunchI'm actually thinking about trying my hand at tackling the beast that is cross-platform native UI
22:03:09Araqthey do not even have to document the types, the docs stay slim, the error pop up at runtime
22:03:16libmanI just gotta invent a new terminal that makes entering commands easier than widgets by showing you live help and shortcuts as you type.
22:03:23salewskiGTK has of course the problem that the developer and user community is very small.
22:03:29Araqthat's ok because that's what Ruby and Python users are used to
22:04:13Araqbut you seem to use a very complex approach and then you want to "hide" it
22:04:35libmanAnd commands should output a smarter format than ANSI terminal text. HTML is a good display protocol.
22:05:06PMunchThe idea is to define a matrix of "qualities". These qualities would uniquely define each widget by it's functional differences from other things. Then write a macro that will convert something like the GenUI "language" to a set of these matrix definitions and have plugable backends that define their own widgets in the matrix.
22:05:28salewskiI think my gintro Nim GTK3 bindings are very small compared to other languages.
22:06:00PMunchlibman, HTML is a horrible display protocol full of strange legacy things..
22:06:01Araqplease give me a link
22:06:08salewskiRuby glue code is large and complicated. I think it is the same for Python and even C++
22:06:39Araqsalewski: it's not about the glue code
22:06:48Araqit's about the user experience
22:07:35*Demos joined #nim
22:07:36libmanHTML is a terrible document format and an even worse app development mechanism, but it has the things a modern display protocol would need.
22:08:01salewskiAraq, what do you not like about the examples at http://ssalewski.de/gintroreadme.html
22:09:57FromGitter<zacharycarter> marko has an interesting syntax
22:10:02FromGitter<zacharycarter> it's like yaml + html made a lil baby
22:10:09FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cec4c1614889d475571f95]
22:11:02PMunchlibman, that is true
22:11:27*plexigras quit (Ping timeout: 258 seconds)
22:11:40PMunchzacharycarter, that looks interesting
22:11:45FromGitter<zacharycarter> http://markojs.com/
22:12:49salewskiUsing gintro will be very similar to the Ruby example like https://ruby-gnome2.osdn.jp/hiki.cgi?tut-gtk2-numtxt-entry
22:14:04*Demos quit (Quit: Demos)
22:15:18Araqsalewski: as I predicted 'connect' is a design mistake, it takes a string that describes the event kind, not good. that's however a minor point.
22:15:52Araqmy major point would be: what if things go wrong?
22:16:13Araqcan I debug and fix problems easily?
22:17:29Araqmaybe I'm unfair and I should shut up until I tried to run your examples.
22:18:27salewskiYes -- not only you. I have a user who has ported a larger GTK2 app -- he has reported some issues and fixed many himself.
22:19:08Araqbtw superb work on the documentation
22:19:11salewskiNim GTK3 is much easier than Ruby GTK, for using it, and for fixing bugs.
22:19:58salewskiHave to sleep now, bye.
22:20:07*salewski quit (Quit: WeeChat 1.9)
22:21:03*Demos joined #nim
22:23:55*Demos quit (Client Quit)
22:24:09*skrylar joined #nim
22:24:12skrylarboop
22:24:51FromGitter<zacharycarter> boop beep bop bope
22:32:14*PMunch quit (Quit: leaving)
22:41:09*skrylar quit (Quit: Leaving)
22:41:35*skrylar joined #nim
23:03:16*nsf quit (Quit: WeeChat 1.9)
23:29:38*couven92 quit (Quit: Client Disconnecting)
23:30:45*TjYoco quit (Quit: Leaving)
23:30:45*adeohluwa quit (Quit: Connection closed for inactivity)
23:31:01FromGitter<gogolxdong> @Jipok nim c -d:emscripten -d:release -d:wasm .\ex202_transformations.nim
23:48:56*def-pri-pub joined #nim
23:55:15skrylarzacharycarter: nvidia has an interesting set of sildes on ptex if you haven't looked in to it already
23:55:39skrylara thing disney does to avoid uv mapping, some engineers found it might actually be more efficient than uv maps lol
23:57:41def-pri-pubzacharycarter: heyas
23:59:00FromGitter<zacharycarter> hey all
23:59:38FromGitter<zacharycarter> def-pri-pub: I think we should ditch the timer object in favor of a module - so basically just move the vars under the object into global scope and then remove the object from the proc signatures
23:59:41FromGitter<zacharycarter> I did it in my wasm branch
23:59:58FromGitter<zacharycarter> if people want an additional timer they can use something like your stopwatch module