<< 01-07-2017 >>

00:01:19FromGitter<ephja> Araq: I can't find where, but I wonder if I need to skip nkPragmaExpr
00:01:51Araqno.
00:02:00Araqyou only need to patch the codegen
00:02:12Araqso that sfCompileTime gets no special treatment
00:02:17Araqthat's it, I hope
00:03:11FromGitter<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:18FromGitter<ephja> lfNoDecl
00:16:12Araq of wCompileTime:
00:16:12Araq noVal(it)
00:16:12Araq incl(sym.flags, sfCompileTime)
00:16:13Araq incl(sym.loc.flags, lfNoDec
00:16:22Araqin pragmas.nim, sorry about that
00:17:20FromGitter<ephja> I just located it
00:24:15*adeohluwa joined #nim
00:25:05*yglukhov quit (Remote host closed the connection)
00:25:49FromGitter<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:19FromGitter<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:11FromGitter<zacharycarter> o/
00:41:08FromGitter<ephja> hi
00:41:13FromGitter<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:54FromGitter<Varriount> @zacharycarter I like your avatar.
03:28:26FromGitter<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:18libmanhttps://www.reddit.com/r/ProgrammingLanguages/comments/6kkxls/five_programming_languages_you_should_really_try/
04:05:57*SusWombat_ quit (Quit: Leaving)
04:06:36FromGitter<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:23FromGitter<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:49ShalokShalomNim looks very promising to me, since it looks very easy and can compile to C++
06:27:03ShalokShalomSome questions: Can it compile to "itself" as well?
06:27:52ShalokShalomAre all C++ features supported? Does such a compilation mean source code as a result or a binary?
06:30:20ShalokShalomAnd i see that there are C, C++ and Objective C Wrappers for Nim
06:31:08ShalokShalomIs 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:22libmanhttps://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:34dom96ShalokShalom: What does compiling to "itself" mean?
08:10:47dom96ShalokShalom: Compiling to C++ give you both the C++ source code and binary.
08:10:55ShalokShalomoh fine
08:10:58dom96I don't think all features of C++ are supported
08:11:14ShalokShalomi like to use Nim in place of C++ for Qt
08:11:28dom96Somebody needs to take the time to write a Qt wrapper for Nim
08:11:34ShalokShalomah ok i see
08:11:43ShalokShalomi think there is much potential
08:11:46dom96or find an existing one and improve it
08:12:02dom96Yep :)
08:12:03ShalokShalomQt itself is written in C++
08:12:20ShalokShalomC++ is such a complicated language and Qt/QML so easy
08:12:39ShalokShalomthere is currently no easy method (for me) to write the logic for QML
08:13:09ShalokShalomwhich 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:23ShalokShalomwhile, Nim can even compile to C++ ^-^
08:13:50ShalokShalomCompile to "itself" means instead to C++, C and JavaScript
08:13:57ShalokShalomis there a native Nim build as well?
08:21:39FromGitter<indy9000_twitter> is the ternary operator (a = b ? c : d) in nim-lang ?
08:23:24yglukhovindy9000_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:54ShalokShalomhttps://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:59salewskiShalokShalom, we all know Qt, so there is not really a reason to open an issue...
09:08:09ShalokShalomah i see
09:08:29ShalokShalomi thought Qt would be already implemented
09:08:43salewskilibman gave you a link to the forum
09:08:52ShalokShalomah
09:09:16salewskiQML is available, but I dont know how complete.
09:09:31ShalokShalomthe mark from dom`s mention covered it for me
09:09:40ShalokShalomoh ^-^
09:09:43ShalokShalomthanks a lot
09:09:47ShalokShalomi will read that link
09:09:53salewskiA complete Qt wrapper is difficult and very much work unfortunately.
09:10:42salewskiAs you may know, only very few other languages beside native C++ support Qt.
09:10:54*yglukhov joined #nim
09:11:47salewskiBye...
09:11:51*salewski quit (Quit: WeeChat 1.4)
09:17:28ShalokShalomGo, Rust, Python and Ring at least
09:17:34ShalokShalomPHP i think so too
09:18:45ShalokShalomWhen we compile Nim into C++ should that work, or?
09:18:45ShalokShalomMeans, 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:24ShalokShalomThis here is 3 years old, still working? https://github.com/PhilipWitte/NimKate
09:33:33salewskiShalokShalom, I think Rust supports still only QML. Go may have more Qt support, see
09:33:37ShalokShalomI mean, changed anything on the syntax since then?
09:33:39salewskihttps://en.wikipedia.org/wiki/List_of_language_bindings_for_Qt_5
09:33:45ShalokShalomsalewski: there are different bindings
09:34:35ShalokShalomhere are 4 different crates: https://github.com/rust-qt/cpp_to_rust
09:34:53ShalokShalomanyway, i dont care for them
09:34:56salewskiAnd the fact that Nim has C++ backend does not mean that we have all C++ libs for free.
09:35:03ShalokShalomRust is by far too complicated for me
09:35:12ShalokShalomsalewski: i dont say this
09:35:24ShalokShalomi just think its very nice to combine them
09:35:44ShalokShalomqmlrs is outdated, by the way
09:35:56ShalokShalomthe implementation of white oak makes more sense, imho
09:36:39ShalokShalomwhat can you say me about the Syntax
09:36:45ShalokShalomif this still works? https://github.com/PhilipWitte/NimKate
09:37:13salewskiI 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:19ShalokShalomwhy this?
09:37:37*v17d quit (Ping timeout: 248 seconds)
09:37:47salewskiBecause Qt is C++ with MOC and very big.
09:37:48ShalokShalomso what is the most easy solution?
09:38:06ShalokShalomthere 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:38ShalokShalomNor the FAQ, neither the Github Wiki mention this new IDE: https://nim-lang.org/nimedit/
10:08:58ShalokShalomIts part of Nim itself?
10:09:51ShalokShalomHow 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:26AraqShalokShalom it's abandoned :-)
11:02:45Araqbut I might continue to work on it, eventually, was really fun to hack it together
11:04:14skrylarAraq wotsit?
11:04:48ShalokShalomAraq: ah ok
11:05:13ShalokShalomdid you use any toolkit?
11:06:01*skrylar quit (Quit: Textual IRC Client: www.textualapp.com)
11:07:23Araqnope, it's an immediate mode UI built on top of SDL2
11:10:42FromGitter<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:13ShalokShalomok, fine
11:16:03*couven92 joined #nim
11:35:52ShalokShalommakes Nim any approach to avoid errors, similar to Rust?
11:36:24Araqit uses a low latency thread local GC to get memory safety
11:36:50Araqmanual memory management is as error prone as in C :-)
11:37:34Araqbut I'm working on a Rust-like lifetime system, won't be in Nim v1 and is still in the design phase
11:39:04Araqthat 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:23Araqbut we can prove deadlock freedom at compiletime, Rust can't.
11:39:31Araq(yay ... :D )
11:46:19FromGitter<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:08ShalokShalomfine ^^
11:48:16ShalokShalommight be more easy to compile to Rust?
11:48:49FromGitter<TiberiumN> compile nim to rust?
11:48:52FromGitter<TiberiumN> wow
11:50:43ShalokShalomyeah
11:50:47ShalokShalomwhats about this?
11:50:56ShalokShalomthink this will find many fans :D
11:51:13FromGitter<TiberiumN> but another level of overhead maybe
11:51:18FromGitter<TiberiumN> ah, no
11:51:28FromGitter<TiberiumN> anyway someone can try to make rust backend
11:51:36FromGitter<TiberiumN> there's LLVM backend already
11:51:55ShalokShalomyes
11:52:03ShalokShalomAnd Go too :P
11:52:23ShalokShalomNim can be 'compile to everything' language
11:52:34ShalokShalomI guess you all know Haxe?
11:52:51Araqyeah, but no.
11:52:54FromGitter<TiberiumN> Yeah, I know Haxe, but you still need to write some language dependent code
11:53:02FromGitter<TiberiumN> and what about C FFI?
11:53:13FromGitter<TiberiumN> maintaining it in different compiled languages can be sooo hard
11:53:17ShalokShalomof course
11:53:22Araqtoo many backends are not maintainable
11:53:30ShalokShalomjust guessing, for Rust it can make sense
11:53:57FromGitter<TiberiumN> to make people migrate from Rust to Nim while they can use all Rust libraries?
11:54:06ShalokShalomfor its memory savety and can make less work as implementing all this in Nim itself
11:54:17ShalokShalomand will make the Rust people stunning?
11:54:38AraqRust is not a good compiler target.
11:55:00ShalokShalomwhy?
11:55:23Araqneither is C++ btw but C++ offers many unmatched libraries/frameworks to warrant the insane complexity in the Nim compiler to target it
11:55:55AraqRust has a type system that differs from Nim's
11:56:04Araqand it's not low level either.
11:56:17ShalokShalomi see
11:56:25ShalokShalomso it would make work?
11:56:30ShalokShalommuch of it
11:57:26Araqwell you can perhaps use 'unsafe' everywhere and treat Rust like C as a compiler target
11:57:38Araqthat won't convince anybody :P
12:05:29ShalokShalomof course
12:05:36ShalokShalomi mean save Rust
12:30:55TrustableI 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:39FromGitter<TiberiumN> is it based on libui or not?
12:32:36FromGitter<TiberiumN> btw, Is there any possibility to create GUI editor to create GUI design for your library?
12:32:51FromGitter<TiberiumN> sadly there's almost no gui frameworks with that feature
12:33:00FromGitter<TiberiumN> Only WPF in C# and Qt AFAIK
12:33:20FromGitter<TiberiumN> but anyway, examples look veryyy cool
12:35:08FromGitter<TiberiumN> Trustable: submit it to nimble! would be useful to have it in nimble
12:35:09FromGitter<dom96> Trustable: that looks awesome, bit why isn't it a nimble package?
12:35:52*notbarton joined #nim
12:35:53FromGitter<dom96> @TiberiumN it doesn't depend on libui by the looks of it.
12:36:16FromGitter<TiberiumN> yeah, I see that too
12:36:19FromGitter<TiberiumN> it's very cool
12:36:45FromGitter<dom96> The examples are beautiful.
12:37:25FromGitter<dom96> Maybe I'll help out by implementing macOS support :)
12:37:28FromGitter<TiberiumN> it looks a bit like ui (based on libui) written by Araq
12:37:38FromGitter<TiberiumN> I mean high-level usage of ui library
12:37:49ShalokShalomand a simple FFI?
12:38:02ShalokShalomfor Rust functions
12:38:07ShalokShalomwould this help?
12:38:19FromGitter<dom96> Yes, but this looks much better because it's dependency free.
12:38:40FromGitter<TiberiumN> I'll see how big .exe is :) compiled with visual studio compiler
12:39:02FromGitter<dom96> That really shouldn't matter.
12:39:22FromGitter<dom96> Unless it's gigabytes, which it won't be.
12:39:31ShalokShalomhttps://youtu.be/ON0A1dsQOV0
12:39:47FromGitter<TiberiumN> @dom96 I know that it doesn't matter, just curious
12:40:01FromGitter<dom96> ShalokShalom: rust can export to C, there is no need for a Rust FFI.
12:41:07FromGitter<TiberiumN> 532kb without upx, just 158kb!!! with upx
12:41:29FromGitter<TiberiumN> ah sorry
12:41:33FromGitter<TiberiumN> It doesn't work with upx
12:42:25FromGitter<TiberiumN> Trustable: I get a runtime error trying to run first example: ⏎ "could not import: SetWindowLongPtrW" ⏎ Windows 10 x64 Creators Update
12:43:00FromGitter<zacharycarter> morning
12:43:00*cspar_ quit (Ping timeout: 260 seconds)
12:43:23TrustableTiberiumN: uhh, it works for me under windows 10
12:43:55FromGitter<TiberiumN> Trustable: I compile it with visual studio compiler though
12:44:17TrustableI use MinGW
12:46:10TrustableMaybe 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:32FromGitter<TiberiumN> hmm, it's not a nim specific issue
12:49:33FromGitter<TiberiumN> https://groups.google.com/forum/#!topic/golang-nuts/pkmwc8k0DpU
12:49:42FromGitter<TiberiumN> Trustable: ⏎ https://stackoverflow.com/questions/24664245/attributeerror-function-getwindowlongptrw-not-found
12:50:27FromGitter<TiberiumN> "You need to use GetWindowLongW in a 32-bit process, and GetWindowLongPtrW in a 64-bit process."
12:50:45ShalokShalomdom96: i mean the other way around
12:51:03FromGitter<TiberiumN> ah, sorry, it's Get, but I think it would be the same for Set
12:52:29FromGitter<dom96> ShalokShalom: rust can import C libraries...
12:53:42ShalokShalomso its possible already?
12:53:53ShalokShalomto integrate Rust features in Nim
12:54:01ShalokShalomfor memory savety?
12:54:09ShalokShalomand so on
12:54:55*rxi joined #nim
12:57:25*bjz joined #nim
12:58:08rxiI'm getting some warnings I can't make sense of, is this an ok place to ask about it?
12:58:16FromGitter<TiberiumN> yes
13:00:10*v17d quit (Ping timeout: 240 seconds)
13:00:23rxihttps://hastebin.com/fujewogozo.coffeescript
13:01:52FromGitter<TiberiumN> Trustable: so it seems like you'll need to make some "when defined" stuff to support both 32bit and 64bit windows
13:06:21FromGitter<TiberiumN> Trustable: this will help you it seems - https://github.com/jangko/nimCEF/blob/0946c0b39b1cc4976923a8af4dfc779bb9f6b70b/platform/winapi.nim
13:07:56FromGitter<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:32euantor`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:21FromGitter<zacharycarter> I'd like to see improvements in the ability to share memory between threads
13:33:56*bjz joined #nim
13:34:52FromGitter<TiberiumN> me too
13:36:48FromGitter<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:14FromGitter<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:20FromGitter<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:17FromGitter<TiberiumN> so 16 threads - run 16 parallel jobs
14:15:38*PMunch joined #nim
14:19:21Serenitorhow would I go about setting a key on a table of sequences? my type decl looks like Table[string, seq[ref bool]]]
14:19:21SerenitorI 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:53FromGitter<TiberiumN> empty sequence?
14:21:56subsetparkSerenitor: not sure I understand... Why can't you use newSeq?
14:22:05subsetparkOr even @[]
14:22:43FromGitter<TiberiumN> yeah, I thought about @[] too
14:29:46*nsf quit (Quit: WeeChat 1.7.1)
14:31:12Serenitorsubsetpark, because
14:31:12SerenitoraTable["test"].newSeq(0)
14:31:12Serenitorwould yield
14:31:12SerenitorError: unhandled exception: key not found: test [KeyError]
14:31:12Serenitorah, @[] compiles, thanks. though now I get illegal storage access without traceback... may not be connected to your solution though
14:32:53subsetparkSerenitor - you can also specify the type of newSeq, like newSeq[ref bool]()
14:35:35Serenitoroh great, that looks even better
14:47:06AraqaTable["test"] = newSeq[ref bool]()
14:49:34Serenitoryea, 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:39FromGitter<ephja> https://github.com/nim-lang/Nim/blob/devel/compiler/types.nim#L1117 where is tyBuiltInTypeClass? 樂
15:20:09FromGitter<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:23Araqephja: of tyTypeClasses: # part of this
18:08:28Araqmostly 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:37FromGitter<indy9000_twitter> can the generics accept a constant, for example: `proc get_random_vectorT,C ():array[C, T] =`
18:27:58FromGitter<indy9000_twitter> where C is an const Int
18:28:21FromGitter<indy9000_twitter> or any other way to do this?
18:35:14yglukhovindy9000_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:47ShalokShalomAraq: You wrote "too many backends are not maintainable"
19:00:55ShalokShalomHow does Haxe that?
19:01:05ShalokShalomWith one maintainer per language?
19:01:21ShalokShalomSo too less maintainers here?
19:14:50*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
19:16:12subsetparkThe 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:26federico3 Varriount why?
19:47:13*madgoat joined #nim
19:49:44*madgoat left #nim (#nim)
19:58:20FromGitter<RSDuck> is it somehow possible to take a reference to a sequenced stored in table?
20:04:47subsetparkYou can always declare a reference, allocate, and assign it to the value
20:06:52FromGitter<ephja> why a reference? what about creating a shallow copy?
20:08:52FromGitter<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:27FromGitter<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:32subsetparkSounds like you might just need a `var`?
20:13:45FromGitter<RSDuck> yes, but if I return a var, only operations on the direct expression will effect the original value
20:25:23Araqaddr()?
20:25:46FromGitter<RSDuck> doesn't work
20:25:57FromGitter<RSDuck> atleast in the Nim repl
20:27:03FromGitter<indy9000_twitter> what's the correct way to pass in and return arrays from a proc ?
20:27:32FromGitter<indy9000_twitter> are openArray interchangeable with array ?
20:31:36subsetparkopenArray procs will accept either arrays or seqs
20:31:48subsetparkThough you can't perform seq-specific operations within them
20:37:38FromGitter<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:45FromGitter<Varriount> @RSDuck The NimScript backend has limited support for pointers.
20:42:43FromGitter<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:17salewskiIn 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:15salewskiAnother question, when x is a cstring, then ($x).add('y') works. But the following calls seems not to work:
21:19:16salewski$x.add('y'); x.$.add('y'); x.string.add('y')
21:19:46salewskiIs there a good reason that none of the last 3 works?
21:22:47salewskiWell, 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:51salewskiIt was indeed this call: if ($gBaseInfoGetName(info)).endsWith("Flags"): echo "compiles"
21:26:26salewskiPutting the $ in front surrounded by () is the only option...
21:35:56*def-pri-pub joined #nim
21:39:24FromGitter<Varriount> @RSDuck Usually it produces them. It throws an error when pointers are used in an unsupported way.
21:46:43Araqsalewski: by using quit(1)
21:47:03Araqor rather quit "error message here"
21:47:24Araq(this returns 1 as the error code and output the error message in one step)
21:47:49Araq>Is there a good reason that none of the last 3 works?
21:48:23Araqyes, basic operator precedence parsing logic
21:48:38Araq$obj.field # toString(obj.field)
21:49:21Araq$obj.field # toString(obj).field wut?
21:50:07Araqand even our beloved C does the same:
21:50:27Araq&obj.field # ok, &(obj.field) give me address of the field
21:50:51Araq&obj.field # (&obj).field wut?
21:51:30*arnetheduck quit (Remote host closed the connection)
21:52:24salewskiAraq, thanks for the info.
21:52:25AraqgBaseInfoGetName(info).`$`.endsWith("Flags") # also possible
21:53:43*Trustable joined #nim
21:54:02salewskiI was wondering that there is indeed only the $ operator for toString conversion, but no "string" or "toString".
21:54:44salewskiWhile for most other types there is one, like x = float(1)
21:56:20salewskiOK, `$` is also a interesting option.
21:57:12salewskiBye...
21:58:49Araqyeah, well. toString is $, toInt is int()
21:59:43Araqbut 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:50salewskiWell, that makes sense. But in the past sometimes I forgott about the $ operator and tried string(x) or x.string.
22:03:01salewskiGood 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:52FromGitter<barcharcraz> id there an idiomatic way to get a full set
22:34:57FromGitter<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:30FromGitter<Varriount> @barcharcraz What do you mean? Like all the complete types created by a given generic?
22:57:31FromGitter<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:17FromGitter<ephja> @barcharcraz that will do if there are no holes
23:03:41FromGitter<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)