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:32 | FromGitter | <mohamedmoussa89> whats equivalent of python's 'range' in Nim? |
01:24:39 | * | endragor_ joined #nim |
01:25:45 | FromGitter | <mohamedmoussa89> e.g. I want a sequence from 1 to 100 |
01:25:59 | * | Serenitor joined #nim |
01:26:46 | FromGitter | <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:32 | Serenitor | when passing a proc, can you have a default proc for that argument? this looks silly, but something like that: |
01:29:32 | Serenitor | proc test (callback: proc = (proc = discard)) = callback() |
01:29:32 | Serenitor | so that it would be valid to call test() without arguments |
01:33:26 | * | Snircle joined #nim |
01:46:06 | FromGitter | <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:07 | FromGitter | <mohamedmoussa89> hmm.. seems i need to use count_up/count_down |
02:09:56 | subsetpark | Serenitor - you don’t have to declare the type of arguments with default values |
02:09:58 | * | def-pri-pub joined #nim |
02:10:04 | subsetpark | So it should be fairly straightforward |
02:14:19 | * | Nobabs27 quit (Quit: Leaving) |
02:18:37 | Serenitor | ah, 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:48 | relax | why 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:33 | FromGitter | <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:30 | FromGitter | <Varriount> @superfunc I know the feeling. |
05:12:19 | FromGitter | <superfunc> Multi-platform testing is not fun |
05:12:29 | FromGitter | <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:07 | FromGitter | <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:42 | FromGitter | <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:58 | Araq | grabli66: 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:17 | FromGitter | <Grabli66> That's good. |
10:09:36 | * | rauss joined #nim |
10:11:18 | FromGitter | <Grabli66> But can i use async/await on that device? |
10:11:54 | FromGitter | <Yardanico> if you will implement an async loop for it, then yes |
10:12:28 | FromGitter | <Grabli66> And can i use GC? |
10:12:53 | FromGitter | <Yardanico> well, maybe memory regions, depends on how much your device has RAM |
10:13:54 | * | PMunch joined #nim |
10:14:13 | FromGitter | <Grabli66> Ok |
10:14:49 | FromGitter | <Yardanico> how much ram does it haev? |
10:17:53 | FromGitter | <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:24 | FromGitter | <Yardanico> hmm, I want to try GC v2 on my small (<2kloc) project :P |
11:15:03 | FromGitter | <Yardanico> Hmm, it seems it compiles and runs fine |
11:15:35 | FromGitter | <Yardanico> (I use async heavily, also httpclient, json, strtabs, tables, etc etc) |
11:25:32 | Araq | yardanico: it's slower than M&S though |
11:25:40 | Araq | by 20% |
11:25:55 | Araq | at least it's realtime... |
11:27:15 | FromGitter | <krux02> I really like the nim sdl2 webassembly demos |
11:29:48 | FromGitter | <Yardanico> Araq: at least it works! maybe it uses less RAM? |
11:30:12 | Araq | as I said, it's realtime. |
11:30:29 | Araq | tell it to never run for more than 1ms and it adheres to this deadline |
11:31:01 | Araq | cycles are irrelevant for its operation. |
11:34:08 | FromGitter | <Yardanico> do I need to report issues if I see "collectCycles: introduced bug E 1" in gc2? or not yet? |
11:34:20 | FromGitter | <Yardanico> with gc:v2 |
11:55:36 | Araq | oh yes, report it |
11:56:55 | Araq | but this message is not part of gc:v2 |
11:57:00 | Araq | outdated version? |
12:01:45 | FromGitter | <gogolxdong> @krux02 will you show the link of the demos? |
12:02:04 | FromGitter | <krux02> https://github.com/Jipok/Nim-SDL2-and-Emscripten |
12:06:23 | FromGitter | <gogolxdong> Thanks for sharing. |
12:24:47 | * | obadz quit (Ping timeout: 260 seconds) |
12:26:16 | FromGitter | <Yardanico> BTW, why "with" is reserved? What are plans for it? |
12:27:09 | * | obadz joined #nim |
12:28:23 | euantor | Hopefully something like C#'s `using` - that would be nice and should be possible with anything with a `close()` proc |
12:33:21 | FromGitter | <zacharycarter> @krux02: there are differences for opengl and webassembly just FYI |
12:33:28 | FromGitter | <zacharycarter> you have to use the webgl friendly subset of OpenGL |
12:33:36 | FromGitter | <zacharycarter> in case you didn't know this already |
12:34:05 | FromGitter | <krux02> I did know that |
12:34:09 | FromGitter | <krux02> openglES afaik |
12:34:59 | FromGitter | <krux02> euantor: that is easy to build with a macro |
12:35:09 | FromGitter | <krux02> I even think a template is enough |
12:35:53 | FromGitter | <krux02> template using(arg): untyped = arg.use; defer: arg.close |
12:36:44 | euantor | Sure, having it in the stdlib would be nice though rather than library authors re-implementing it every time |
12:37:05 | FromGitter | <Yardanico> @krux02 well maybe "with" would be something like "with" in D? |
12:37:19 | dom96 | add it, but model it after python |
12:37:34 | FromGitter | <krux02> I don't know with in D |
12:38:00 | euantor | Could go the Java route - "try with resources" ;) |
12:38:01 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:38:08 | euantor | (or not) |
12:38:22 | FromGitter | <Yardanico> @krux02 https://dlang.org/spec/statement.html#WithStatement |
12:38:29 | FromGitter | <krux02> I like the c++ route deterministic destructors |
12:38:54 | FromGitter | <Yardanico> The with statement is a way to simplify repeated references to the same object. |
12:38:57 | euantor | Ah, similar to `With` in Visual basic then |
12:39:57 | FromGitter | <krux02> my visual basic is 15 years old has was just a few weeks of experience |
12:40:05 | FromGitter | <krux02> so no I also don't know that |
12:40:20 | euantor | https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/with-end-with-statement |
12:41:47 | FromGitter | <Yardanico> can be useful sometimes :) |
12:41:52 | FromGitter | <Yardanico> but it's similar to {.this: self.} |
12:41:58 | FromGitter | <Yardanico> but works not only in procs |
12:44:00 | * | ShalokShalom_ joined #nim |
12:47:09 | * | ShalokShalom quit (Ping timeout: 240 seconds) |
12:48:36 | Araq | dom96: I think they mean "with" shouldn't be a keyword |
12:50:02 | * | ipjk joined #nim |
12:51:53 | euantor | exactly |
12:55:41 | * | PMunch_ joined #nim |
12:58:09 | * | PMunch quit (Ping timeout: 248 seconds) |
13:02:54 | dom96 | okay, I agree. |
13:03:50 | FromGitter | <krux02> I think a lot in the language should not be a keyword |
13:04:22 | FromGitter | <krux02> defer |
13:04:25 | FromGitter | <krux02> end |
13:08:12 | * | PMunch_ quit (Quit: Leaving) |
13:18:30 | FromGitter | <krux02> @zacharycarter can you help me? |
13:18:41 | FromGitter | <krux02> I try to compile the examples on my own |
13:18:50 | FromGitter | <krux02> but I hate the webassembly toolchain |
13:19:22 | FromGitter | <krux02> there are simply too many points of failure |
13:22:46 | * | qwertfisch is now known as eihwftcsqr |
13:23:38 | FromGitter | <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:52 | FromGitter | <zacharycarter> what error are you running into right now? |
13:23:58 | FromGitter | <zacharycarter> maybe I have a quick solution |
13:24:58 | FromGitter | <krux02> how do I start the emscripten builds? |
13:25:51 | FromGitter | <zacharycarter> you need a nim.cfg file somewhere that looks something like this - |
13:26:39 | FromGitter | <krux02> I have a nim config file |
13:26:46 | FromGitter | <krux02> I use the one from the demos repo |
13:26:58 | FromGitter | <krux02> to be honest I am in the demos repo you showed me |
13:27:06 | FromGitter | <zacharycarter> okay let me look at the demos repo |
13:27:07 | FromGitter | <krux02> but I don't know how to start them |
13:27:31 | FromGitter | <zacharycarter> it should just be - nim c -d:emscripten -d:release main.nim |
13:27:47 | FromGitter | <zacharycarter> do you have emscripten installed? |
13:27:47 | FromGitter | <krux02> yes |
13:27:50 | FromGitter | <krux02> yes |
13:27:51 | FromGitter | <zacharycarter> and do you have emcc etc on your path? |
13:27:55 | FromGitter | <krux02> yes |
13:28:02 | FromGitter | <krux02> and then? |
13:28:31 | FromGitter | <krux02> I have to change import sdl to import ../sdl |
13:28:38 | FromGitter | <krux02> otherwise it doesn't work |
13:28:48 | FromGitter | <zacharycarter> weird... |
13:28:49 | FromGitter | <krux02> and then I have to call the compiler from the root of the project |
13:28:53 | FromGitter | <krux02> otherwise it doesn't work |
13:28:57 | FromGitter | <zacharycarter> you also need to specify an out file |
13:29:13 | FromGitter | <krux02> and then I had to fix some c++ files in emscripten ports |
13:29:19 | FromGitter | <krux02> otherwise it didn't work |
13:29:22 | FromGitter | <zacharycarter> wtf you shouldn't have to do that! |
13:29:28 | FromGitter | <krux02> well I had |
13:29:32 | FromGitter | <krux02> it was simple though |
13:29:36 | FromGitter | <zacharycarter> okay |
13:29:42 | FromGitter | <zacharycarter> I have to go to this meeting I'll be back soon |
13:29:54 | FromGitter | <krux02> it compiled with -Werror for some reason, and my compiler had some warnings |
13:30:10 | FromGitter | <krux02> I am on arch, always newest compilers |
13:30:14 | FromGitter | <krux02> more warnings |
13:30:28 | FromGitter | <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:46 | FromGitter | <gogolxdong> how to install sdl |
13:43:32 | FromGitter | <krux02> pacman -S sdl2 |
13:43:43 | FromGitter | <krux02> nimble install sdl2_nim |
13:48:15 | FromGitter | <gogolxdong> Error: redefinition of 'GL_CONTEXT_RESET_NOTIFICATION' |
13:48:33 | * | solitudesf joined #nim |
13:48:38 | FromGitter | <krux02> context? |
13:48:54 | FromGitter | <gogolxdong> nim c -d:emscripten -d:release -d:wasm .\ex202_transformations.nim |
13:50:21 | FromGitter | <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:14 | FromGitter | <krux02> Is there a way to map ``foo.bar = baz`` to ``dynamicCall(foo, "bar", baz)``? |
14:19:05 | FromGitter | <krux02> I know scala has something like that |
14:20:06 | FromGitter | <krux02> it would help for "dynamic" language bindings |
14:24:06 | FromGitter | <razuit> is there a way for httpClient to not follow redirects? |
14:26:07 | FromGitter | <Yardanico> yes |
14:26:17 | FromGitter | <Yardanico> https://nim-lang.org/docs/httpclient.html#newHttpClient |
14:26:21 | FromGitter | <Yardanico> you can specify max redirects |
14:26:40 | FromGitter | <razuit> thanks @Yardanico - don’t know how I missed that |
14:28:30 | * | Sentreen joined #nim |
14:28:46 | Araq | krux02: you can overload `.=` |
14:29:11 | FromGitter | <krux02> oh, thanks |
14:29:15 | FromGitter | <krux02> forgot about that |
14:31:35 | * | gokr joined #nim |
14:34:45 | FromGitter | <krux02> is there an example for `.=` overload? |
14:36:05 | FromGitter | <Yardanico> @Araq but "Warning: overloaded '.' and '()' operators are now .experimental; .= is deprecated [Deprecated]" ? |
14:36:07 | * | oprypin quit (Quit: Bye) |
14:36:09 | FromGitter | <Yardanico> .= is deprecated? |
14:36:22 | * | oprypin joined #nim |
14:36:39 | FromGitter | <krux02> yes, and how do I use it? |
14:37:04 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59ce5a90bac826f054145459] |
14:37:10 | FromGitter | <Yardanico> ```code paste, see link``` ⏎ ⏎ ? [https://gitter.im/nim-lang/Nim?at=59ce5a9632fc8b7e4055c14c] |
14:37:22 | FromGitter | <Yardanico> can you show your code? |
14:37:28 | FromGitter | <Yardanico> well I just did a template here, you can use a proc too |
14:37:29 | FromGitter | <krux02> ah thanks |
14:40:52 | FromGitter | <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:27 | FromGitter | <Yardanico> yay |
14:41:32 | FromGitter | <Yardanico> you can remove "void" btw |
14:41:38 | FromGitter | <Yardanico> or you just like it? |
14:41:42 | FromGitter | <krux02> I just like it |
14:41:53 | FromGitter | <krux02> I actually prefer it |
14:42:08 | subsetpark | You must be a C++ programmer... |
14:42:14 | FromGitter | <krux02> I come from scalar, and there the default is whas is called auto in nim |
14:42:25 | FromGitter | <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:41 | FromGitter | <Jipok> @gogolxdong solution to your problem: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59ce5f65614889d47554d50d] |
15:00:55 | FromGitter | <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:10 | adeohluwa | <span Id="company_name">kiddies party planner </span> |
15:31:20 | * | yglukhov_ quit (Remote host closed the connection) |
15:31:23 | adeohluwa | I'm using nim query |
15:33:13 | adeohluwa | how do u extract just the text |
15:33:53 | adeohluwa | xml.querySelector("#xxxxxx") |
15:34:05 | * | yglukhov joined #nim |
15:38:34 | FromGitter | <Yardanico> check https://nim-lang.org/docs/xmltree.html docs? |
15:38:41 | FromGitter | <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:45 | FromGitter | <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:54 | FromGitter | <Yardanico> oh, sorry |
15:44:01 | FromGitter | <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:40 | FromGitter | <GULPF> @adeohluwa: nimquery returns normal xml nodes, you can use the procs from the xmltree module |
15:57:44 | FromGitter | <GULPF> https://nim-lang.org/docs/xmltree |
16:01:53 | FromGitter | <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:47 | adeohluwa | GULPF: thanks for the hand holding :) |
16:18:59 | * | relax joined #nim |
16:19:43 | FromGitter | <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:36 | FromGitter | <Yardanico> Why "someInt += if true: 1 else: 2" doesn't work? |
16:43:43 | FromGitter | <Yardanico> just some limitation? |
16:44:46 | Araq | it requires () |
16:45:24 | FromGitter | <Yardanico> ah |
16:48:30 | * | nsf quit (Quit: WeeChat 1.9) |
16:52:15 | FromGitter | <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:35 | FromGitter | <Yardanico> should be possible |
16:52:52 | FromGitter | <Yardanico> or wait |
16:52:54 | FromGitter | <Yardanico> I don't know :P |
16:53:55 | Arrrr | maybe += is a tempalte |
16:53:57 | Arrrr | *template |
16:54:12 | FromGitter | <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:38 | FromGitter | <Jipok> @gogolxdong what and how are you trying to compile? |
17:09:51 | * | solitudesf quit (Remote host closed the connection) |
17:12:24 | miran | how to initialize an empty Table? |
17:14:06 | Arrrr | table = initTable[A, B]() |
17:14:17 | miran | currently i have `bots: Table[int, seq[int]]`, but that produces SIGSEGV |
17:15:47 | Arrrr | replace that with `bots = initTable[int, seq[int]]()` |
17:16:12 | miran | Arrrr: 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:24 | FromGitter | <Jipok> @krux02 Fixed https://github.com/Jipok/Nim-SDL2-and-Emscripten/issues/1 |
17:30:06 | FromGitter | <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:44 | couven92 | @gentrance, you could use a git submodule for that and use the regular exec in a nimble task |
17:31:47 | FromGitter | <genotrance> is there any documentation for this? |
17:32:19 | FromGitter | <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:51 | FromGitter | <mratsim> @genotrance use gitsubmodule and {.compile.} ? That’s what I’m planning to do |
17:33:32 | FromGitter | <mratsim> I remember seeing surprised on the forum that submodule were pulled by nimble on user install |
17:38:51 | FromGitter | <genotrance> thanks @mratsim @couven92 |
17:40:15 | FromGitter | <genotrance> how about stuff not in github, stuff in SF.net for example |
17:40:42 | * | zachk joined #nim |
17:41:20 | couven92 | @genotrance, then write a nimble task that downloads from SF.net |
17:41:44 | couven92 | Remember: a nimble file is just a regular nimscript file! |
17:42:35 | * | m712 quit (Ping timeout: 255 seconds) |
17:43:14 | libman | GitHub is the new Microsoft! |
17:43:51 | FromGitter | <genotrance> @couven92: makes sense, thanks! |
17:44:20 | libman | <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:45 | FromGitter | <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:53 | Arrrr | Is github the new microsoft? |
17:53:11 | couven92 | without nothing works |
17:54:13 | FromGitter | <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:07 | salewski | I have this proc header: |
19:05:15 | salewski | proc xgetSelected*(self: TreeSelection; model: var (TreeModel | TreeStore | TreeModelSort | gtk.ListStore | TreeModelFilter); iter: var TreeIter): bool = |
19:05:43 | salewski | The opening bracket after var is desired and necessary? |
19:06:21 | salewski | It compiles without, I assumed bracket was not necessary, but seems that my expectation was wrong. |
19:09:01 | salewski | Interesting and nice is, that the next line in the proc compiles and seems to work: |
19:09:05 | salewski | if model.isNil: model = new type(model) |
19:09:50 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
19:10:03 | FromGitter | <mratsim> it’s necessary otherwise `var TreeModel | var TreeStore | var TreeModelSort`works too |
19:11:01 | FromGitter | <mratsim> or you can do AnyTree = TreeModel | TreeStore | TreeModelSort | gtk.ListStore | TreeModelFilter ⏎ ⏎ and in your proc sig: var AnyTree |
19:11:39 | salewski | OK, 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:40 | dom96 | lol 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:29 | PMunch | Haha, who figured that would be a good idea? :P |
19:59:14 | * | claudiuinberlin joined #nim |
20:00:48 | * | claudiuinberlin quit (Client Quit) |
20:01:55 | federico3 | wat |
20:02:09 | * | claudiuinberlin joined #nim |
20:05:25 | TjYoco | I is I translate something under BSD 2-clause license into nim, can I use a different license? |
20:05:37 | TjYoco | if I* |
20:05:41 | federico3 | translate? yes |
20:05:46 | federico3 | as in: rewrite |
20:05:59 | TjYoco | okay just making sure, thanks |
20:07:25 | PMunch | HINAL though |
20:07:40 | PMunch | He Is Not A Lawyer (AFAIK) |
20:07:56 | PMunch | Just don't blame us if you get sued for it :P |
20:08:06 | TjYoco | yeah, Its a very permissive license I'm just not sure what falls under "modification" |
20:08:23 | PMunch | Well, a total rewrite would definitely count as modification :P |
20:08:45 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
20:08:51 | PMunch | But it's a strange domain. Since you're probably keeping the implementation as-is, but changing the way you express it. |
20:09:04 | federico3 | PMunch: no - but I took exams on software law and did work on compliance... |
20:09:14 | FromGitter | <Yardanico> TjYoco: you're asking the same question as me today :D |
20:09:18 | PMunch | Oh really? Cool! |
20:09:41 | PMunch | I tend to stay away from that as much as possible. Hairy subject.. |
20:10:01 | TjYoco | Yardanico, what a coincidence! I didn't see it lol |
20:13:08 | FromGitter | <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:16 | FromGitter | <Yardanico> This is my question :P |
20:14:14 | libman | I am not a license expert. I am a license crybaby. But I don't imagine why that would be a problem. |
20:16:33 | libman | If 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:34 | libman | Speaking of licenses, the tragedy of Julia became even more ironic this month... |
20:20:03 | libman | You 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:29 | libman | https://pkg.julialang.org/ went from 92.662% packages being copyfree on 2017-09-08 to now 97.473%! |
20:21:32 | libman | BUT, 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:26 | FromGitter | <Yardanico> Main compiler used with nim is gcc :P |
20:39:37 | FromGitter | <Yardanico> Also clang |
20:39:52 | couven92 | VCC :D |
20:39:58 | * | Guest99393 quit (Client Quit) |
20:40:13 | * | Guest99393 joined #nim |
20:40:24 | PMunch | GCC is GPL I assume? |
20:40:24 | FromGitter | <Yardanico> Well it's even worse :P |
20:40:29 | FromGitter | <Yardanico> Yes |
20:40:39 | FromGitter | <Yardanico> So not "copyfree" |
20:40:56 | PMunch | What's stopping it from being considered copyfree? |
20:41:21 | libman | Nim is copyfree because it will always be able to use an older version of clang. |
20:41:45 | federico3 | *facepalm* |
20:42:12 | libman | Even 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:44 | PMunch | Why did LLVM decide to relicense with Apache? And what were they using before? |
20:57:24 | * | Demos joined #nim |
21:00:36 | libman | Before 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:06 | libman | One 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:11 | libman | http://lists.llvm.org/pipermail/llvm-dev/2017-August/116266.html |
21:04:35 | libman | So us copyfree people (including some in the BSD camp) will probably fork and maintain an old version of Clang. |
21:05:23 | libman | (Not "old" yet, it hasn't happened yet.) |
21:06:08 | * | Demos quit (Quit: Demos) |
21:06:11 | PMunch | Yeah I read up on it a bit, and Apache has those pesky "must include this and that" in modifications.. |
21:06:42 | libman | This doesn't concern Nim. It actually only strengthens it against competitors that embed LLVM. |
21:09:21 | libman | By 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:41 | FromGitter | <Varriount> Hrm, copyleft licenses are always very contentious |
21:23:02 | FromGitter | <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:01 | salewski | when a proc gets a ref parameter with value nil, there may be two sources for that nil value: |
21:40:19 | salewski | 1. 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:51 | salewski | Can I find out in the proc which of these two cases has occured? |
21:41:08 | FromGitter | <zacharycarter> def-pri-pub: are you around? |
21:41:29 | salewski | (I guess not, so I need overloaded procs) |
21:44:42 | Araq | you can't. |
21:46:13 | salewski | Example: 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:51 | salewski | Thank Araq, so I have to generate overloaded procs for these rare cases. |
21:48:09 | Araq | how does Rust wrap GTK3? |
21:48:59 | salewski | Rust has a not too tiny GTK3 community. |
21:49:10 | Araq | exactly. |
21:49:45 | salewski | I have looked only on some examples and did notb like it too much. It was not really high level. |
21:50:55 | salewski | But Rust people try to replace GTK's C code partly with Rust. That is interesting but difficult. |
21:55:21 | Araq | well 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:33 | Araq | or maybe to keep it fair let me rant about that newer Win API wrapper instead. |
21:58:45 | salewski | I try to make Nim GTK3 similar to Ruby GTK3 -- and that was not bad. |
21:59:26 | salewski | Your example -- the reason is that GTK uses interfaces and types who provide that interfaces. |
21:59:55 | Araq | yes, 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:56 | salewski | The type that provides the functionality are drop in replacements for the interface types. |
22:00:29 | salewski | I try to hide all that for the user. Wich works fine with Nim's or types. |
22:00:55 | Araq | wrappers are not the place to innovate. build useful things on top of the boring wrappers instead. |
22:01:19 | PMunch | Looking forward to see what might become of NiGui for example |
22:01:39 | Araq | Ruby and Python are dynamically typed. |
22:01:43 | libman | Widget toolkits (ex. GTK) are rarely the ideal form of human-computer interaction. Intelligent users do better entering commands and editing files. |
22:01:48 | salewski | Yes, at the beginning I was hoping that someone other does the wrappers. It is not too much fun. |
22:02:31 | PMunch | libman, yeah I recently discovered sc/sc-im and now I'm fully terminal based for work tools. It's great :) |
22:02:39 | PMunch | Browser is still an issue though.. |
22:02:46 | Araq | this dynamic typing changes everything for GTK3. |
22:03:07 | PMunch | I'm actually thinking about trying my hand at tackling the beast that is cross-platform native UI |
22:03:09 | Araq | they do not even have to document the types, the docs stay slim, the error pop up at runtime |
22:03:16 | libman | I 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:23 | salewski | GTK has of course the problem that the developer and user community is very small. |
22:03:29 | Araq | that's ok because that's what Ruby and Python users are used to |
22:04:13 | Araq | but you seem to use a very complex approach and then you want to "hide" it |
22:04:35 | libman | And commands should output a smarter format than ANSI terminal text. HTML is a good display protocol. |
22:05:06 | PMunch | The 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:28 | salewski | I think my gintro Nim GTK3 bindings are very small compared to other languages. |
22:06:00 | PMunch | libman, HTML is a horrible display protocol full of strange legacy things.. |
22:06:01 | Araq | please give me a link |
22:06:08 | salewski | Ruby glue code is large and complicated. I think it is the same for Python and even C++ |
22:06:39 | Araq | salewski: it's not about the glue code |
22:06:48 | Araq | it's about the user experience |
22:07:35 | * | Demos joined #nim |
22:07:36 | libman | HTML 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:01 | salewski | Araq, what do you not like about the examples at http://ssalewski.de/gintroreadme.html |
22:09:57 | FromGitter | <zacharycarter> marko has an interesting syntax |
22:10:02 | FromGitter | <zacharycarter> it's like yaml + html made a lil baby |
22:10:09 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cec4c1614889d475571f95] |
22:11:02 | PMunch | libman, that is true |
22:11:27 | * | plexigras quit (Ping timeout: 258 seconds) |
22:11:40 | PMunch | zacharycarter, that looks interesting |
22:11:45 | FromGitter | <zacharycarter> http://markojs.com/ |
22:12:49 | salewski | Using 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:18 | Araq | salewski: 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:52 | Araq | my major point would be: what if things go wrong? |
22:16:13 | Araq | can I debug and fix problems easily? |
22:17:29 | Araq | maybe I'm unfair and I should shut up until I tried to run your examples. |
22:18:27 | salewski | Yes -- 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:08 | Araq | btw superb work on the documentation |
22:19:11 | salewski | Nim GTK3 is much easier than Ruby GTK, for using it, and for fixing bugs. |
22:19:58 | salewski | Have 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:12 | skrylar | boop |
22:24:51 | FromGitter | <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:01 | FromGitter | <gogolxdong> @Jipok nim c -d:emscripten -d:release -d:wasm .\ex202_transformations.nim |
23:48:56 | * | def-pri-pub joined #nim |
23:55:15 | skrylar | zacharycarter: nvidia has an interesting set of sildes on ptex if you haven't looked in to it already |
23:55:39 | skrylar | a thing disney does to avoid uv mapping, some engineers found it might actually be more efficient than uv maps lol |
23:57:41 | def-pri-pub | zacharycarter: heyas |
23:59:00 | FromGitter | <zacharycarter> hey all |
23:59:38 | FromGitter | <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:41 | FromGitter | <zacharycarter> I did it in my wasm branch |
23:59:58 | FromGitter | <zacharycarter> if people want an additional timer they can use something like your stopwatch module |