| 00:01:19 | FromGitter | <ephja> Araq: I can't find where, but I wonder if I need to skip nkPragmaExpr |
| 00:01:51 | Araq | no. |
| 00:02:00 | Araq | you only need to patch the codegen |
| 00:02:12 | Araq | so that sfCompileTime gets no special treatment |
| 00:02:17 | Araq | that's it, I hope |
| 00:03:11 | FromGitter | <ephja> I looked at all occurrences but I couldn't find anything obvious |
| 00:04:25 | * | user__ quit (Remote host closed the connection) |
| 00:12:18 | FromGitter | <ephja> lfNoDecl |
| 00:16:12 | Araq | of wCompileTime: |
| 00:16:12 | Araq | noVal(it) |
| 00:16:12 | Araq | incl(sym.flags, sfCompileTime) |
| 00:16:13 | Araq | incl(sym.loc.flags, lfNoDec |
| 00:16:22 | Araq | in pragmas.nim, sorry about that |
| 00:17:20 | FromGitter | <ephja> I just located it |
| 00:24:15 | * | adeohluwa joined #nim |
| 00:25:05 | * | yglukhov quit (Remote host closed the connection) |
| 00:25:49 | FromGitter | <ephja> the ordering is relevant regardless, but at least a codegen bug has been fixed. it might lead to bloat though with this approach, but it shouldn't matter much |
| 00:37:19 | FromGitter | <ephja> np btw. I'm not going to figure out much unless I frantically look at anything that appears to be relevant :p |
| 00:40:11 | FromGitter | <zacharycarter> o/ |
| 00:41:08 | FromGitter | <ephja> hi |
| 00:41:13 | FromGitter | <zacharycarter> howdy |
| 00:47:55 | * | gmpreussner quit (Ping timeout: 255 seconds) |
| 00:48:50 | * | gmpreussner joined #nim |
| 01:22:16 | * | bjz joined #nim |
| 01:28:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 01:46:12 | * | bjz joined #nim |
| 01:46:22 | * | AckZ joined #nim |
| 01:49:46 | * | chemist69 quit (Ping timeout: 276 seconds) |
| 01:56:01 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 02:03:25 | * | chemist69 joined #nim |
| 02:18:52 | * | def-pri-pub joined #nim |
| 02:32:19 | * | bjz joined #nim |
| 02:40:05 | * | onionhammer1 quit (Ping timeout: 240 seconds) |
| 02:43:03 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
| 03:05:32 | * | def-pri-pub quit (Quit: leaving) |
| 03:08:03 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 03:22:41 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 03:26:54 | FromGitter | <Varriount> @zacharycarter I like your avatar. |
| 03:28:26 | FromGitter | <zacharycarter> @Varriount thanks! |
| 03:29:13 | * | yglukhov joined #nim |
| 03:33:20 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 03:39:58 | * | bjz joined #nim |
| 03:42:14 | * | onionhammer1 joined #nim |
| 03:53:08 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 03:55:22 | * | bjz joined #nim |
| 04:02:18 | libman | https://www.reddit.com/r/ProgrammingLanguages/comments/6kkxls/five_programming_languages_you_should_really_try/ |
| 04:05:57 | * | SusWombat_ quit (Quit: Leaving) |
| 04:06:36 | FromGitter | <zacharycarter> @lbmn probably should xpost to /r/programming |
| 04:24:17 | * | pilne quit (Quit: Quitting!) |
| 04:27:52 | * | shashlick quit (Ping timeout: 260 seconds) |
| 04:31:17 | * | yglukhov joined #nim |
| 04:35:48 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 04:45:23 | FromGitter | <Varriount> shashlick: Any progress on memory mapping? |
| 05:43:31 | * | arnetheduck joined #nim |
| 05:54:23 | * | aerx quit (Quit: WeeChat 1.9) |
| 06:21:37 | * | ShalokShalom joined #nim |
| 06:26:49 | ShalokShalom | Nim looks very promising to me, since it looks very easy and can compile to C++ |
| 06:27:03 | ShalokShalom | Some questions: Can it compile to "itself" as well? |
| 06:27:52 | ShalokShalom | Are all C++ features supported? Does such a compilation mean source code as a result or a binary? |
| 06:30:20 | ShalokShalom | And i see that there are C, C++ and Objective C Wrappers for Nim |
| 06:31:08 | ShalokShalom | Is there any intention to support Qt directly as well, so easy as possible? |
| 06:33:12 | * | yglukhov joined #nim |
| 06:37:49 | * | yglukhov quit (Ping timeout: 268 seconds) |
| 07:15:46 | * | adeohluwa joined #nim |
| 07:21:12 | * | nsf joined #nim |
| 07:30:22 | libman | https://forum.nim-lang.org/t/2586 - Nim and Qt |
| 07:45:29 | * | yglukhov joined #nim |
| 07:48:25 | * | yglukhov quit (Remote host closed the connection) |
| 08:04:45 | * | yglukhov joined #nim |
| 08:10:34 | dom96 | ShalokShalom: What does compiling to "itself" mean? |
| 08:10:47 | dom96 | ShalokShalom: Compiling to C++ give you both the C++ source code and binary. |
| 08:10:55 | ShalokShalom | oh fine |
| 08:10:58 | dom96 | I don't think all features of C++ are supported |
| 08:11:14 | ShalokShalom | i like to use Nim in place of C++ for Qt |
| 08:11:28 | dom96 | Somebody needs to take the time to write a Qt wrapper for Nim |
| 08:11:34 | ShalokShalom | ah ok i see |
| 08:11:43 | ShalokShalom | i think there is much potential |
| 08:11:46 | dom96 | or find an existing one and improve it |
| 08:12:02 | dom96 | Yep :) |
| 08:12:03 | ShalokShalom | Qt itself is written in C++ |
| 08:12:20 | ShalokShalom | C++ is such a complicated language and Qt/QML so easy |
| 08:12:39 | ShalokShalom | there is currently no easy method (for me) to write the logic for QML |
| 08:13:09 | ShalokShalom | which is why i looked for languages which are able to compile into JavaScript |
| 08:13:11 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 08:13:23 | ShalokShalom | while, Nim can even compile to C++ ^-^ |
| 08:13:50 | ShalokShalom | Compile to "itself" means instead to C++, C and JavaScript |
| 08:13:57 | ShalokShalom | is there a native Nim build as well? |
| 08:21:39 | FromGitter | <indy9000_twitter> is the ternary operator (a = b ? c : d) in nim-lang ? |
| 08:23:24 | yglukhov | indy9000_twitter yes. if a == b: c else: d |
| 08:30:45 | * | yglukhov quit (Remote host closed the connection) |
| 08:34:11 | * | bjz joined #nim |
| 08:48:04 | * | v17d joined #nim |
| 08:50:54 | ShalokShalom | https://github.com/nim-lang/Nim/issues/6043 |
| 09:00:09 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 09:03:59 | * | bjz joined #nim |
| 09:06:54 | * | salewski joined #nim |
| 09:07:59 | salewski | ShalokShalom, we all know Qt, so there is not really a reason to open an issue... |
| 09:08:09 | ShalokShalom | ah i see |
| 09:08:29 | ShalokShalom | i thought Qt would be already implemented |
| 09:08:43 | salewski | libman gave you a link to the forum |
| 09:08:52 | ShalokShalom | ah |
| 09:09:16 | salewski | QML is available, but I dont know how complete. |
| 09:09:31 | ShalokShalom | the mark from dom`s mention covered it for me |
| 09:09:40 | ShalokShalom | oh ^-^ |
| 09:09:43 | ShalokShalom | thanks a lot |
| 09:09:47 | ShalokShalom | i will read that link |
| 09:09:53 | salewski | A complete Qt wrapper is difficult and very much work unfortunately. |
| 09:10:42 | salewski | As you may know, only very few other languages beside native C++ support Qt. |
| 09:10:54 | * | yglukhov joined #nim |
| 09:11:47 | salewski | Bye... |
| 09:11:51 | * | salewski quit (Quit: WeeChat 1.4) |
| 09:17:28 | ShalokShalom | Go, Rust, Python and Ring at least |
| 09:17:34 | ShalokShalom | PHP i think so too |
| 09:18:45 | ShalokShalom | When we compile Nim into C++ should that work, or? |
| 09:18:45 | ShalokShalom | Means, i have to edit the resulting C++ code then, to implement the Qt elements? |
| 09:27:12 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
| 09:32:19 | * | salewski joined #nim |
| 09:33:24 | ShalokShalom | This here is 3 years old, still working? https://github.com/PhilipWitte/NimKate |
| 09:33:33 | salewski | ShalokShalom, I think Rust supports still only QML. Go may have more Qt support, see |
| 09:33:37 | ShalokShalom | I mean, changed anything on the syntax since then? |
| 09:33:39 | salewski | https://en.wikipedia.org/wiki/List_of_language_bindings_for_Qt_5 |
| 09:33:45 | ShalokShalom | salewski: there are different bindings |
| 09:34:35 | ShalokShalom | here are 4 different crates: https://github.com/rust-qt/cpp_to_rust |
| 09:34:53 | ShalokShalom | anyway, i dont care for them |
| 09:34:56 | salewski | And the fact that Nim has C++ backend does not mean that we have all C++ libs for free. |
| 09:35:03 | ShalokShalom | Rust is by far too complicated for me |
| 09:35:12 | ShalokShalom | salewski: i dont say this |
| 09:35:24 | ShalokShalom | i just think its very nice to combine them |
| 09:35:44 | ShalokShalom | qmlrs is outdated, by the way |
| 09:35:56 | ShalokShalom | the implementation of white oak makes more sense, imho |
| 09:36:39 | ShalokShalom | what can you say me about the Syntax |
| 09:36:45 | ShalokShalom | if this still works? https://github.com/PhilipWitte/NimKate |
| 09:37:13 | salewski | I did the GTK3 bindings -- low level c2nim generated and now the high level. Both much work. But Qt will be much much more work. |
| 09:37:19 | ShalokShalom | why this? |
| 09:37:37 | * | v17d quit (Ping timeout: 248 seconds) |
| 09:37:47 | salewski | Because Qt is C++ with MOC and very big. |
| 09:37:48 | ShalokShalom | so what is the most easy solution? |
| 09:38:06 | ShalokShalom | there is https://woboq.com/blog/verdigris-qt-without-moc.html |
| 09:40:08 | * | gokr joined #nim |
| 09:41:51 | * | libman quit (Quit: Connection closed for inactivity) |
| 09:42:00 | * | salewski quit (Quit: WeeChat 1.4) |
| 09:49:21 | * | Snircle joined #nim |
| 10:08:38 | ShalokShalom | Nor the FAQ, neither the Github Wiki mention this new IDE: https://nim-lang.org/nimedit/ |
| 10:08:58 | ShalokShalom | Its part of Nim itself? |
| 10:09:51 | ShalokShalom | How to start? |
| 10:15:10 | * | skrylar joined #nim |
| 10:23:38 | * | bjz_ joined #nim |
| 10:25:27 | * | bjz quit (Ping timeout: 260 seconds) |
| 10:47:41 | * | v17d joined #nim |
| 10:50:38 | * | Trustable joined #nim |
| 10:54:11 | * | ShalokShalom_ joined #nim |
| 10:56:42 | * | bjz joined #nim |
| 10:57:23 | * | ShalokShalom quit (Ping timeout: 258 seconds) |
| 10:58:08 | * | bjz_ quit (Ping timeout: 260 seconds) |
| 11:01:40 | * | ShalokShalom_ is now known as ShalokShalom |
| 11:02:26 | Araq | ShalokShalom it's abandoned :-) |
| 11:02:45 | Araq | but I might continue to work on it, eventually, was really fun to hack it together |
| 11:04:14 | skrylar | Araq wotsit? |
| 11:04:48 | ShalokShalom | Araq: ah ok |
| 11:05:13 | ShalokShalom | did you use any toolkit? |
| 11:06:01 | * | skrylar quit (Quit: Textual IRC Client: www.textualapp.com) |
| 11:07:23 | Araq | nope, it's an immediate mode UI built on top of SDL2 |
| 11:10:42 | FromGitter | <TiberiumN> About Rust: it really feels like some low-level language, and Nim feels to me like some high-level language like typescript or even Python (because I came from python) |
| 11:11:13 | ShalokShalom | ok, fine |
| 11:16:03 | * | couven92 joined #nim |
| 11:35:52 | ShalokShalom | makes Nim any approach to avoid errors, similar to Rust? |
| 11:36:24 | Araq | it uses a low latency thread local GC to get memory safety |
| 11:36:50 | Araq | manual memory management is as error prone as in C :-) |
| 11:37:34 | Araq | but I'm working on a Rust-like lifetime system, won't be in Nim v1 and is still in the design phase |
| 11:39:04 | Araq | that said, we have a unique way to deal with data races and deadlocks too. it's however dificult to leverage because the GC is thread local ;-) |
| 11:39:23 | Araq | but we can prove deadlock freedom at compiletime, Rust can't. |
| 11:39:31 | Araq | (yay ... :D ) |
| 11:46:19 | FromGitter | <konqoro> I wish I could update the Nim Kate syntax file but I have no idea what to do... |
| 11:46:24 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 11:48:08 | ShalokShalom | fine ^^ |
| 11:48:16 | ShalokShalom | might be more easy to compile to Rust? |
| 11:48:49 | FromGitter | <TiberiumN> compile nim to rust? |
| 11:48:52 | FromGitter | <TiberiumN> wow |
| 11:50:43 | ShalokShalom | yeah |
| 11:50:47 | ShalokShalom | whats about this? |
| 11:50:56 | ShalokShalom | think this will find many fans :D |
| 11:51:13 | FromGitter | <TiberiumN> but another level of overhead maybe |
| 11:51:18 | FromGitter | <TiberiumN> ah, no |
| 11:51:28 | FromGitter | <TiberiumN> anyway someone can try to make rust backend |
| 11:51:36 | FromGitter | <TiberiumN> there's LLVM backend already |
| 11:51:55 | ShalokShalom | yes |
| 11:52:03 | ShalokShalom | And Go too :P |
| 11:52:23 | ShalokShalom | Nim can be 'compile to everything' language |
| 11:52:34 | ShalokShalom | I guess you all know Haxe? |
| 11:52:51 | Araq | yeah, but no. |
| 11:52:54 | FromGitter | <TiberiumN> Yeah, I know Haxe, but you still need to write some language dependent code |
| 11:53:02 | FromGitter | <TiberiumN> and what about C FFI? |
| 11:53:13 | FromGitter | <TiberiumN> maintaining it in different compiled languages can be sooo hard |
| 11:53:17 | ShalokShalom | of course |
| 11:53:22 | Araq | too many backends are not maintainable |
| 11:53:30 | ShalokShalom | just guessing, for Rust it can make sense |
| 11:53:57 | FromGitter | <TiberiumN> to make people migrate from Rust to Nim while they can use all Rust libraries? |
| 11:54:06 | ShalokShalom | for its memory savety and can make less work as implementing all this in Nim itself |
| 11:54:17 | ShalokShalom | and will make the Rust people stunning? |
| 11:54:38 | Araq | Rust is not a good compiler target. |
| 11:55:00 | ShalokShalom | why? |
| 11:55:23 | Araq | neither is C++ btw but C++ offers many unmatched libraries/frameworks to warrant the insane complexity in the Nim compiler to target it |
| 11:55:55 | Araq | Rust has a type system that differs from Nim's |
| 11:56:04 | Araq | and it's not low level either. |
| 11:56:17 | ShalokShalom | i see |
| 11:56:25 | ShalokShalom | so it would make work? |
| 11:56:30 | ShalokShalom | much of it |
| 11:57:26 | Araq | well you can perhaps use 'unsafe' everywhere and treat Rust like C as a compiler target |
| 11:57:38 | Araq | that won't convince anybody :P |
| 12:05:29 | ShalokShalom | of course |
| 12:05:36 | ShalokShalom | i mean save Rust |
| 12:30:55 | Trustable | I have published the first preview version of NiGui, a Cross-platform, desktop GUI toolkit written in Nim: https://github.com/trustable-code/NiGui Feedback is welcome :) |
| 12:31:39 | FromGitter | <TiberiumN> is it based on libui or not? |
| 12:32:36 | FromGitter | <TiberiumN> btw, Is there any possibility to create GUI editor to create GUI design for your library? |
| 12:32:51 | FromGitter | <TiberiumN> sadly there's almost no gui frameworks with that feature |
| 12:33:00 | FromGitter | <TiberiumN> Only WPF in C# and Qt AFAIK |
| 12:33:20 | FromGitter | <TiberiumN> but anyway, examples look veryyy cool |
| 12:35:08 | FromGitter | <TiberiumN> Trustable: submit it to nimble! would be useful to have it in nimble |
| 12:35:09 | FromGitter | <dom96> Trustable: that looks awesome, bit why isn't it a nimble package? |
| 12:35:52 | * | notbarton joined #nim |
| 12:35:53 | FromGitter | <dom96> @TiberiumN it doesn't depend on libui by the looks of it. |
| 12:36:16 | FromGitter | <TiberiumN> yeah, I see that too |
| 12:36:19 | FromGitter | <TiberiumN> it's very cool |
| 12:36:45 | FromGitter | <dom96> The examples are beautiful. |
| 12:37:25 | FromGitter | <dom96> Maybe I'll help out by implementing macOS support :) |
| 12:37:28 | FromGitter | <TiberiumN> it looks a bit like ui (based on libui) written by Araq |
| 12:37:38 | FromGitter | <TiberiumN> I mean high-level usage of ui library |
| 12:37:49 | ShalokShalom | and a simple FFI? |
| 12:38:02 | ShalokShalom | for Rust functions |
| 12:38:07 | ShalokShalom | would this help? |
| 12:38:19 | FromGitter | <dom96> Yes, but this looks much better because it's dependency free. |
| 12:38:40 | FromGitter | <TiberiumN> I'll see how big .exe is :) compiled with visual studio compiler |
| 12:39:02 | FromGitter | <dom96> That really shouldn't matter. |
| 12:39:22 | FromGitter | <dom96> Unless it's gigabytes, which it won't be. |
| 12:39:31 | ShalokShalom | https://youtu.be/ON0A1dsQOV0 |
| 12:39:47 | FromGitter | <TiberiumN> @dom96 I know that it doesn't matter, just curious |
| 12:40:01 | FromGitter | <dom96> ShalokShalom: rust can export to C, there is no need for a Rust FFI. |
| 12:41:07 | FromGitter | <TiberiumN> 532kb without upx, just 158kb!!! with upx |
| 12:41:29 | FromGitter | <TiberiumN> ah sorry |
| 12:41:33 | FromGitter | <TiberiumN> It doesn't work with upx |
| 12:42:25 | FromGitter | <TiberiumN> Trustable: I get a runtime error trying to run first example: ⏎ "could not import: SetWindowLongPtrW" ⏎ Windows 10 x64 Creators Update |
| 12:43:00 | FromGitter | <zacharycarter> morning |
| 12:43:00 | * | cspar_ quit (Ping timeout: 260 seconds) |
| 12:43:23 | Trustable | TiberiumN: uhh, it works for me under windows 10 |
| 12:43:55 | FromGitter | <TiberiumN> Trustable: I compile it with visual studio compiler though |
| 12:44:17 | Trustable | I use MinGW |
| 12:46:10 | Trustable | Maybe we can have a chat tomorrow afternoon (Germany). Then I can answer your questions and hear your feedback. (Today I have no time.) |
| 12:49:32 | FromGitter | <TiberiumN> hmm, it's not a nim specific issue |
| 12:49:33 | FromGitter | <TiberiumN> https://groups.google.com/forum/#!topic/golang-nuts/pkmwc8k0DpU |
| 12:49:42 | FromGitter | <TiberiumN> Trustable: ⏎ https://stackoverflow.com/questions/24664245/attributeerror-function-getwindowlongptrw-not-found |
| 12:50:27 | FromGitter | <TiberiumN> "You need to use GetWindowLongW in a 32-bit process, and GetWindowLongPtrW in a 64-bit process." |
| 12:50:45 | ShalokShalom | dom96: i mean the other way around |
| 12:51:03 | FromGitter | <TiberiumN> ah, sorry, it's Get, but I think it would be the same for Set |
| 12:52:29 | FromGitter | <dom96> ShalokShalom: rust can import C libraries... |
| 12:53:42 | ShalokShalom | so its possible already? |
| 12:53:53 | ShalokShalom | to integrate Rust features in Nim |
| 12:54:01 | ShalokShalom | for memory savety? |
| 12:54:09 | ShalokShalom | and so on |
| 12:54:55 | * | rxi joined #nim |
| 12:57:25 | * | bjz joined #nim |
| 12:58:08 | rxi | I'm getting some warnings I can't make sense of, is this an ok place to ask about it? |
| 12:58:16 | FromGitter | <TiberiumN> yes |
| 13:00:10 | * | v17d quit (Ping timeout: 240 seconds) |
| 13:00:23 | rxi | https://hastebin.com/fujewogozo.coffeescript |
| 13:01:52 | FromGitter | <TiberiumN> Trustable: so it seems like you'll need to make some "when defined" stuff to support both 32bit and 64bit windows |
| 13:06:21 | FromGitter | <TiberiumN> Trustable: this will help you it seems - https://github.com/jangko/nimCEF/blob/0946c0b39b1cc4976923a8af4dfc779bb9f6b70b/platform/winapi.nim |
| 13:07:56 | FromGitter | <TiberiumN> especially code starting from this: ⏎ https://github.com/jangko/nimCEF/blob/0946c0b39b1cc4976923a8af4dfc779bb9f6b70b/platform/winapi.nim#L1103 |
| 13:19:20 | * | samuell joined #nim |
| 13:21:38 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 13:22:32 | euantor | `that said, we have a unique way to deal with data races and deadlocks too. it's however dificult to leverage because the GC is thread local ;-)` - from the wording of the recent Nim survey it sounds that may change slightly at some point in the future? I can't remember the exact question, but it was related to what people would like to see regarding memory management. I like the current GC personally |
| 13:26:21 | FromGitter | <zacharycarter> I'd like to see improvements in the ability to share memory between threads |
| 13:33:56 | * | bjz joined #nim |
| 13:34:52 | FromGitter | <TiberiumN> me too |
| 13:36:48 | FromGitter | <TiberiumN> eunator: ⏎ "Which direction should Nim’s GC/memory management take? ⏎ ⏎ 1) Keep the GC as it is, it's fine. ⏎ 2) Make the GC thread-safe, not thread-local. Introduce optimizations later for this model. ... [https://gitter.im/nim-lang/Nim?at=5957a570c101bc4e3a3e1e52] |
| 13:40:14 | FromGitter | <zacharycarter> Pony has another model too |
| 14:01:01 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 14:02:50 | * | bjz_ joined #nim |
| 14:02:57 | * | rxi quit (Quit: Leaving) |
| 14:03:13 | * | bjz quit (Ping timeout: 248 seconds) |
| 14:07:16 | * | Trustable quit (Remote host closed the connection) |
| 14:07:31 | * | ofelas joined #nim |
| 14:13:54 | * | Serenitor joined #nim |
| 14:14:20 | FromGitter | <TiberiumN> Also, Araq - is it possible to add possibility to run build.sh from csources with multiple jobs? it would be a nice addition |
| 14:15:17 | FromGitter | <TiberiumN> so 16 threads - run 16 parallel jobs |
| 14:15:38 | * | PMunch joined #nim |
| 14:19:21 | Serenitor | how would I go about setting a key on a table of sequences? my type decl looks like Table[string, seq[ref bool]]] |
| 14:19:21 | Serenitor | I can't call newSeq on a table element that doesn't exist yet, and I can't use []= or add on the table because... well what would I put as value for an un-initialized sequence? |
| 14:21:53 | FromGitter | <TiberiumN> empty sequence? |
| 14:21:56 | subsetpark | Serenitor: not sure I understand... Why can't you use newSeq? |
| 14:22:05 | subsetpark | Or even @[] |
| 14:22:43 | FromGitter | <TiberiumN> yeah, I thought about @[] too |
| 14:29:46 | * | nsf quit (Quit: WeeChat 1.7.1) |
| 14:31:12 | Serenitor | subsetpark, because |
| 14:31:12 | Serenitor | aTable["test"].newSeq(0) |
| 14:31:12 | Serenitor | would yield |
| 14:31:12 | Serenitor | Error: unhandled exception: key not found: test [KeyError] |
| 14:31:12 | Serenitor | ah, @[] compiles, thanks. though now I get illegal storage access without traceback... may not be connected to your solution though |
| 14:32:53 | subsetpark | Serenitor - you can also specify the type of newSeq, like newSeq[ref bool]() |
| 14:35:35 | Serenitor | oh great, that looks even better |
| 14:47:06 | Araq | aTable["test"] = newSeq[ref bool]() |
| 14:49:34 | Serenitor | yea, that's exactly what I have now, thanks subsetpark & Araq |
| 15:05:35 | * | pilne joined #nim |
| 15:13:29 | * | Ven joined #nim |
| 15:13:52 | * | Ven is now known as Guest79326 |
| 15:19:23 | * | PMunch quit (Quit: leaving) |
| 15:19:31 | * | Guest79326 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:19:39 | FromGitter | <ephja> https://github.com/nim-lang/Nim/blob/devel/compiler/types.nim#L1117 where is tyBuiltInTypeClass? 樂 |
| 15:20:09 | FromGitter | <ephja> there's no 'else' branch, right? |
| 15:22:16 | * | chemist69 quit (Ping timeout: 276 seconds) |
| 15:22:24 | * | Ven_ joined #nim |
| 15:24:37 | * | chemist69 joined #nim |
| 15:31:03 | * | kapil___ joined #nim |
| 15:31:59 | * | kapil___ quit (Client Quit) |
| 15:45:34 | * | nsf joined #nim |
| 15:55:16 | * | stisa_ joined #nim |
| 15:56:40 | * | stisa_ quit (Client Quit) |
| 16:04:37 | * | bjz joined #nim |
| 16:05:32 | * | bjz_ quit (Ping timeout: 260 seconds) |
| 16:08:10 | * | yglukhov quit (Remote host closed the connection) |
| 16:26:00 | * | SusWombat joined #nim |
| 16:26:05 | * | SusWombat quit (Client Quit) |
| 16:27:55 | * | couven92 quit (Ping timeout: 276 seconds) |
| 16:38:22 | * | bjz quit (Quit: Textual IRC Client: www.textualapp.com) |
| 16:49:32 | * | yglukhov joined #nim |
| 16:51:19 | * | bjz joined #nim |
| 16:53:53 | * | yglukhov quit (Ping timeout: 248 seconds) |
| 16:59:34 | * | v17d joined #nim |
| 17:03:42 | * | nsf quit (Quit: WeeChat 1.7.1) |
| 17:03:45 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:22:29 | * | ofelas quit (Remote host closed the connection) |
| 17:23:48 | * | yglukhov joined #nim |
| 17:24:03 | * | ofelas joined #nim |
| 17:26:34 | * | couven92 joined #nim |
| 17:28:07 | * | yglukhov quit (Remote host closed the connection) |
| 17:31:42 | * | bjz quit (Quit: Textual IRC Client: www.textualapp.com) |
| 17:33:03 | * | nsf joined #nim |
| 17:33:25 | * | bjz joined #nim |
| 17:35:28 | * | nhywyll joined #nim |
| 17:43:32 | * | tankfeeder joined #nim |
| 17:43:41 | * | yglukhov joined #nim |
| 17:47:25 | * | yglukhov quit (Remote host closed the connection) |
| 17:51:14 | * | nhywyll left #nim (#nim) |
| 17:52:31 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 17:53:16 | * | bjz joined #nim |
| 18:00:50 | * | yglukhov joined #nim |
| 18:03:33 | * | tankfeeder quit (Quit: Leaving) |
| 18:04:54 | * | AckZ quit () |
| 18:08:23 | Araq | ephja: of tyTypeClasses: # part of this |
| 18:08:28 | Araq | mostly likely |
| 18:08:37 | * | couven92 quit (Ping timeout: 260 seconds) |
| 18:10:45 | * | xet7 joined #nim |
| 18:11:30 | * | smt joined #nim |
| 18:12:39 | * | xet7 quit (Client Quit) |
| 18:16:03 | * | aerx joined #nim |
| 18:19:24 | * | tankfeeder joined #nim |
| 18:20:14 | * | Ven joined #nim |
| 18:20:37 | * | Ven is now known as Guest28990 |
| 18:21:15 | * | Guest28990 quit (Client Quit) |
| 18:23:45 | * | notbarton quit (Quit: Leaving) |
| 18:23:49 | * | qwertfisch quit (Quit: ZNC - http://znc.in) |
| 18:27:37 | FromGitter | <indy9000_twitter> can the generics accept a constant, for example: `proc get_random_vectorT,C ():array[C, T] =` |
| 18:27:58 | FromGitter | <indy9000_twitter> where C is an const Int |
| 18:28:21 | FromGitter | <indy9000_twitter> or any other way to do this? |
| 18:35:14 | yglukhov | indy9000_twitter: proc foo[I: static[int]]() or proc foo(i: static[int]) |
| 18:36:49 | * | Jesin quit (Ping timeout: 240 seconds) |
| 18:37:20 | * | tankfeeder_ joined #nim |
| 18:37:52 | * | Jesin joined #nim |
| 18:38:18 | * | tankfeeder_ quit (Client Quit) |
| 18:40:01 | * | tankfeeder quit (Ping timeout: 248 seconds) |
| 18:42:05 | * | Serenitor quit (Ping timeout: 240 seconds) |
| 18:44:33 | * | yglukhov quit (Remote host closed the connection) |
| 18:49:39 | * | Serenitor joined #nim |
| 18:51:06 | * | chemist69 quit (Ping timeout: 255 seconds) |
| 18:53:31 | * | chemist69 joined #nim |
| 19:00:47 | ShalokShalom | Araq: You wrote "too many backends are not maintainable" |
| 19:00:55 | ShalokShalom | How does Haxe that? |
| 19:01:05 | ShalokShalom | With one maintainer per language? |
| 19:01:21 | ShalokShalom | So too less maintainers here? |
| 19:14:50 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 19:16:12 | subsetpark | The more backends there are, the more manpower is required to iron them all out, rather than work on the language itself... |
| 19:22:58 | * | yglukhov joined #nim |
| 19:24:32 | * | yglukhov quit (Remote host closed the connection) |
| 19:28:03 | * | Sembei joined #nim |
| 19:33:39 | * | FromGitter * Varriount wishes that the JS backend could be dumped in favor of a dedicated webassembly backend |
| 19:39:23 | * | tankfeeder joined #nim |
| 19:41:42 | * | ShalokShalom quit (Remote host closed the connection) |
| 19:44:26 | federico3 | Varriount why? |
| 19:47:13 | * | madgoat joined #nim |
| 19:49:44 | * | madgoat left #nim (#nim) |
| 19:58:20 | FromGitter | <RSDuck> is it somehow possible to take a reference to a sequenced stored in table? |
| 20:04:47 | subsetpark | You can always declare a reference, allocate, and assign it to the value |
| 20:06:52 | FromGitter | <ephja> why a reference? what about creating a shallow copy? |
| 20:08:52 | FromGitter | <RSDuck> in my situation I have a procedure which grabs a tuple of a sequence and a custom object from a table(or creates a new object of both) and returns it |
| 20:09:27 | FromGitter | <RSDuck> if I return the shallow copy and modify it, does these changes occur on the original object too? |
| 20:11:10 | * | xet7 joined #nim |
| 20:12:32 | subsetpark | Sounds like you might just need a `var`? |
| 20:13:45 | FromGitter | <RSDuck> yes, but if I return a var, only operations on the direct expression will effect the original value |
| 20:25:23 | Araq | addr()? |
| 20:25:46 | FromGitter | <RSDuck> doesn't work |
| 20:25:57 | FromGitter | <RSDuck> atleast in the Nim repl |
| 20:27:03 | FromGitter | <indy9000_twitter> what's the correct way to pass in and return arrays from a proc ? |
| 20:27:32 | FromGitter | <indy9000_twitter> are openArray interchangeable with array ? |
| 20:31:36 | subsetpark | openArray procs will accept either arrays or seqs |
| 20:31:48 | subsetpark | Though you can't perform seq-specific operations within them |
| 20:37:38 | FromGitter | <RSDuck> so, yes. The following script doesn't work on the NimScript backend, but surprisingly it does on the JS backend ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=595808123230e14f3a156634] |
| 20:40:04 | * | dddddd joined #nim |
| 20:40:45 | FromGitter | <Varriount> @RSDuck The NimScript backend has limited support for pointers. |
| 20:42:43 | FromGitter | <RSDuck> wouldn't it be useful to have some kind of warning by the compiler in this case? |
| 20:49:47 | * | tankfeeder quit (Quit: Leaving) |
| 20:57:46 | * | Jesin quit (Quit: Leaving) |
| 21:05:34 | * | salewski joined #nim |
| 21:07:17 | salewski | In C, the main() function generally returns an error code (return 0;) to the OS. How do we that in Nim? |
| 21:13:25 | * | Snircle joined #nim |
| 21:18:03 | * | ofelas quit (Quit: shutdown -h now) |
| 21:18:15 | salewski | Another question, when x is a cstring, then ($x).add('y') works. But the following calls seems not to work: |
| 21:19:16 | salewski | $x.add('y'); x.$.add('y'); x.string.add('y') |
| 21:19:46 | salewski | Is there a good reason that none of the last 3 works? |
| 21:22:47 | salewski | Well, I think add() was a bad example, as it works in place. But I think I saw that behaviour by a proc which returs a string lately. |
| 21:25:51 | salewski | It was indeed this call: if ($gBaseInfoGetName(info)).endsWith("Flags"): echo "compiles" |
| 21:26:26 | salewski | Putting the $ in front surrounded by () is the only option... |
| 21:35:56 | * | def-pri-pub joined #nim |
| 21:39:24 | FromGitter | <Varriount> @RSDuck Usually it produces them. It throws an error when pointers are used in an unsupported way. |
| 21:46:43 | Araq | salewski: by using quit(1) |
| 21:47:03 | Araq | or rather quit "error message here" |
| 21:47:24 | Araq | (this returns 1 as the error code and output the error message in one step) |
| 21:47:49 | Araq | >Is there a good reason that none of the last 3 works? |
| 21:48:23 | Araq | yes, basic operator precedence parsing logic |
| 21:48:38 | Araq | $obj.field # toString(obj.field) |
| 21:49:21 | Araq | $obj.field # toString(obj).field wut? |
| 21:50:07 | Araq | and even our beloved C does the same: |
| 21:50:27 | Araq | &obj.field # ok, &(obj.field) give me address of the field |
| 21:50:51 | Araq | &obj.field # (&obj).field wut? |
| 21:51:30 | * | arnetheduck quit (Remote host closed the connection) |
| 21:52:24 | salewski | Araq, thanks for the info. |
| 21:52:25 | Araq | gBaseInfoGetName(info).`$`.endsWith("Flags") # also possible |
| 21:53:43 | * | Trustable joined #nim |
| 21:54:02 | salewski | I was wondering that there is indeed only the $ operator for toString conversion, but no "string" or "toString". |
| 21:54:44 | salewski | While for most other types there is one, like x = float(1) |
| 21:56:20 | salewski | OK, `$` is also a interesting option. |
| 21:57:12 | salewski | Bye... |
| 21:58:49 | Araq | yeah, well. toString is $, toInt is int() |
| 21:59:43 | Araq | but that's because int() is a type conversion and there is no type conversion from cstring to string in Nim, so string(x) can't work |
| 22:02:17 | * | nsf quit (Quit: WeeChat 1.7.1) |
| 22:02:50 | salewski | Well, that makes sense. But in the past sometimes I forgott about the $ operator and tried string(x) or x.string. |
| 22:03:01 | salewski | Good night! |
| 22:03:13 | * | salewski quit (Quit: WeeChat 1.4) |
| 22:17:34 | * | xet7 quit (Quit: Leaving) |
| 22:20:55 | * | Trustable quit (Remote host closed the connection) |
| 22:30:23 | * | samuell quit (Quit: Hejdå) |
| 22:33:46 | * | dom96|w joined #nim |
| 22:33:52 | * | bjz joined #nim |
| 22:34:52 | FromGitter | <barcharcraz> id there an idiomatic way to get a full set |
| 22:34:57 | FromGitter | <barcharcraz> of a given type |
| 22:40:48 | * | chemist69 quit (Ping timeout: 258 seconds) |
| 22:41:15 | * | gokr quit (Quit: Leaving.) |
| 22:41:58 | * | chemist69 joined #nim |
| 22:44:53 | * | madmalik joined #nim |
| 22:44:55 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 22:50:30 | * | dom96|w quit (Ping timeout: 255 seconds) |
| 22:54:17 | * | shashlick joined #nim |
| 22:54:30 | FromGitter | <Varriount> @barcharcraz What do you mean? Like all the complete types created by a given generic? |
| 22:57:31 | FromGitter | <barcharcraz> like a set with all values of an enum in it {low(type)..high(type)} |
| 22:58:32 | * | onionhammer1 quit (Ping timeout: 260 seconds) |
| 23:01:17 | FromGitter | <ephja> @barcharcraz that will do if there are no holes |
| 23:03:41 | FromGitter | <ephja> otherwise you can use the code for this PR https://github.com/nim-lang/Nim/pull/5947 |
| 23:06:49 | * | Ven joined #nim |
| 23:07:13 | * | Ven is now known as Guest98263 |
| 23:08:46 | * | couven92 joined #nim |
| 23:12:05 | * | Guest98263 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 23:39:22 | * | shashlick quit (Ping timeout: 260 seconds) |
| 23:48:18 | * | libman joined #nim |
| 23:48:46 | * | bjz joined #nim |
| 23:53:05 | * | fredrik92 joined #nim |
| 23:53:47 | * | shashlick joined #nim |
| 23:57:04 | * | couven92 quit (Ping timeout: 276 seconds) |