00:03:04 | FromGitter | <timotheecour> @zetashift ⏎ ⏎ > @timotheecour how are you liking karax? Pros/cons considering you also use react? ⏎ ⏎ I need to use it more to get a better answer but haven’t hit a brick wall yet; one minor con is lack of JSX (maybe would be worth supporting via a DSL stored as a string?); another con is I now have 2 react logic interacting (nim’s and react’s builtin one), and the “main” one needs to refresh |
00:03:04 | FromGitter | ... the “slave” one manually; it’s doable; maybe this approach could be improved. Obvious pro is it allows pushing more logic into Nim [https://gitter.im/nim-lang/Nim?at=5bbbf0386e5a401c2d3ab46c] |
00:05:00 | * | abm quit (Read error: Connection reset by peer) |
00:09:54 | * | NimBot joined #nim |
00:14:57 | FromGitter | <timotheecour> @exelotl indeed, I think we need “one true regex library” that covers all the feature set currently available to avoid duplicating effort; having it in a separate repo makes improvements easier than if it were in stdlib though (breaking changes are less damaging) ; eg of feature in nim-regex that’s not in re/nre: it allows defining a regex pattern at CT |
00:16:00 | FromGitter | <kayabaNerve> @timotheecour Can we get a one true game engine while we're at? |
00:16:21 | FromGitter | <kayabaNerve> https://imgs.xkcd.com/comics/standards.png |
00:26:49 | flaviu | I'd like to say that nre is fairly well decoupled from PCRE, and comes with an extensive test suite :) |
00:27:02 | * | ftsf joined #nim |
00:28:03 | flaviu | and that find/replace are surprisingly hard to get right |
00:32:02 | FromGitter | <timotheecour> @kayabaNerve a regex engine is not comparable to a game engine ; having 2 standard library modules re, nre is definitely not a common thing amongst other languages; btw I didn’t mean let’s create a 3rd regex stdlib module; instead I recommend merging whatever features from re that are missing from nre into nre (rather than other way around as I’ve argued in https://githu |
00:32:02 | FromGitter | ... b.com/nim-lang/Nim/issues/7278#issuecomment-427689302 ) |
00:33:33 | FromGitter | <timotheecour> @flaviu I think we should write somewhere (in https://github.com/nim-lang/Nim/issues/7278 or https://github.com/nim-lang/Nim/issues/8150) the features from re that aren’t in nre; do you have a list? |
00:34:01 | * | opi_ quit (Quit: ZNC - http://znc.in) |
00:34:41 | * | opi_ joined #nim |
00:39:07 | flaviu | @timotheecour I do not, but the main one would be multiReplace. |
00:40:40 | flaviu | nre has no need for `=~` because of how it works; startsWith and endsWith are not needed since this can be done with '^' and '$'. cstrings are not supported by pcre because they are easy to turn into strings and I didn't want to bother |
00:40:43 | FromGitter | <kayabaNerve> @timotheecour 1) I know. 2) I agree. 3) Sounds like a good plan. 4) You can't meet everyone's needs. |
00:41:45 | flaviu | @kayabaNerve when it comes to regex matching, I believe you can. it's a contained problem |
00:42:33 | flaviu | if you have some need that isn't being met, let me know and I'll see what I can figure out. |
00:46:01 | FromGitter | <zetashift> Any macro-gods here? I got an error saying: ```..\..\..\..\..\.nimble\pkgs\godot-0.7.17\nim\godotmacros.nim(514, 23) Error: type mismatch: got <int literal(0)> but expected 'bool' ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbbfa49e65a634336a5b277] |
00:46:10 | FromGitter | <zetashift> trying my hand at getting it to work with 0.19 |
00:54:48 | FromGitter | <kayabaNerve> #L 493: `for meth in obj.methods:` I told them they HAD to stay clean after rehab. They're no longer welcome in my house! |
00:55:01 | FromGitter | <kayabaNerve> @zetashift ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbbfc65e65a634336a5c105] |
00:55:31 | FromGitter | <kayabaNerve> I'm pretty sure the `else` is the issue. I'm looking into what they were trying to do. |
00:56:00 | * | vlad1777d quit (Remote host closed the connection) |
00:56:42 | FromGitter | <kayabaNerve> `for string in refClasses` when refClasses is only used there on that one line and has no declaration. 0_o |
00:56:50 | * | vlad1777d joined #nim |
00:59:19 | * | arecaceae quit (Ping timeout: 246 seconds) |
01:01:24 | * | arecaceae joined #nim |
01:04:11 | FromGitter | <zetashift> it's declared in godotnim no? |
01:05:28 | FromGitter | <zetashift> I changed the isNil to `== ""` |
01:13:10 | * | vivus quit (Remote host closed the connection) |
01:14:36 | * | darithorn joined #nim |
01:24:04 | FromGitter | <kayabaNerve> I only looked over the one file |
01:26:39 | * | endragor joined #nim |
01:27:56 | FromGitter | <kayabaNerve> It's a seq[string]. The code is trying to use this: https://nim-lang.org/docs/system.html#in.t%2Cuntyped%2Cuntyped |
01:27:58 | FromGitter | <kayabaNerve> So never mind. |
01:28:51 | FromGitter | <kayabaNerve> Eh. The docs may not be updated. The else is the line of the error. |
01:31:17 | * | endragor quit (Ping timeout: 252 seconds) |
01:53:08 | * | vlad1777d quit (Ping timeout: 268 seconds) |
02:04:22 | * | banc quit (Quit: ZNC - http://znc.in) |
02:09:38 | * | Elronnd is now known as math |
02:09:47 | * | math is now known as Elronnd |
02:16:56 | * | endragor joined #nim |
02:21:05 | * | banc joined #nim |
02:47:25 | FromGitter | <gogolxdong> What's the difference between libagar and nuklear? |
03:09:46 | bozaloshtsh | gogolxdong: they're different GUI libraries? |
03:10:23 | enthus1ast | libagar has more build in widgets and also some other stuff like socket handling etc |
03:13:26 | FromGitter | <gogolxdong> does this mean libagar is better? |
03:15:33 | FromGitter | <gogolxdong> It could handle event loop like keyboard as nuklear doesn't right? |
03:16:24 | * | darithorn quit () |
03:18:27 | * | darithorn joined #nim |
03:22:24 | * | chemist69 quit (Ping timeout: 252 seconds) |
03:24:00 | enthus1ast | afaik libagar was made for a game |
03:24:12 | * | chemist69 joined #nim |
03:24:15 | enthus1ast | sorry must sleep 5 am here |
03:24:46 | enthus1ast | n8 |
03:24:59 | * | enthus1ast quit (Remote host closed the connection) |
03:27:22 | * | rockcavera quit (Remote host closed the connection) |
03:32:27 | FromGitter | <gogolxdong> good night! |
03:45:16 | * | alexnask joined #nim |
03:48:32 | FromGitter | <zacharycarter> Agar looks like a retained GUI mode solution |
03:48:43 | FromGitter | <zacharycarter> where as nuklear / imgui are immediate mode GUI solutions |
03:49:17 | FromGitter | <zacharycarter> @gogolxdong - I'm a bit surprised you're having this much difficulty getting nuklear's input capabilities to work - I know they're not ideal and they rely on C buffers if I recall, but they do work and i have gotten input to work in nuklear before |
03:49:34 | FromGitter | <zacharycarter> unfortunately GUI is like the last thing on my plate atm in regards to game dev stuff I need to figure out |
03:50:07 | FromGitter | <zacharycarter> but once I get to the point where I need nuklear - which shouldn't be TOO to far off - i'll need to start working on an editor before too long here - I can share whatever I learn / remember |
03:53:38 | FromGitter | <gogolxdong> https://github.com/gogolxdong/guardian |
03:54:17 | FromGitter | <zacharycarter> let me take a quick look - maybe I'll spot something I can recognize as being an issue |
03:55:10 | AlexMax | @zacharycarter I know somebody who used agar in production and ended up regretting it |
03:55:28 | FromGitter | <zacharycarter> well - they're just totally different modes of GUI |
03:55:30 | AlexMax | I'm not sure why or how exactly, but agar doesn't seem like an especially active project |
03:55:43 | FromGitter | <zacharycarter> retained mode GUI solutions retain their state from frame to frame |
03:55:53 | FromGitter | <zacharycarter> and only re-draw what changes |
03:56:14 | FromGitter | <zacharycarter> immediate mode GUIs aren't concerned with that - they just re-draw everything every frame |
03:56:28 | FromGitter | <zacharycarter> at a basic level anyway - there are a lot of nuances there between implementations |
03:56:38 | AlexMax | I don't think it was a matter of immediate vs retained, I think it was just a buggy project and didn't give the kind of customization necessary |
03:56:47 | FromGitter | <zacharycarter> gotcha - I can buy that |
03:56:58 | AlexMax | last i checked it still used subversion |
03:57:08 | FromGitter | <zacharycarter> I mean - tbh - I may not even end up using nuklear |
03:57:19 | FromGitter | <zacharycarter> I might end using imgui - because bgfx seems to prefer it |
03:57:28 | FromGitter | <zacharycarter> but I'll cross that road when I come to it |
03:58:13 | AlexMax | I've been lazy and putting off continuing work on nuklear |
03:58:17 | AlexMax | and my own project :P |
03:58:37 | FromGitter | <zacharycarter> it's tough to stay motivated |
04:03:46 | FromGitter | <zacharycarter> @gogolxdong - working on getting guardian compiling - almost there |
04:09:52 | FromGitter | <zacharycarter> welp - I got it to CTD :) - I'm just missing a font-related file I think |
04:10:05 | FromGitter | <zacharycarter> unfortunately - I forgot my power cord at my parents house, so I won't be of much more help for a few hours |
04:10:20 | FromGitter | <zacharycarter> I'm going to drive over there and get it - I need it for the morning anyway. guess I'm sleeping over there tonight |
04:10:23 | FromGitter | <zacharycarter> be back on in a bit |
04:10:31 | FromGitter | <gogolxdong> imgui is a bit higher stared than nuklear. |
04:14:23 | * | ftsf_ joined #nim |
04:14:23 | * | ftsf quit (Read error: Connection reset by peer) |
04:16:13 | FromGitter | <gogolxdong> What's CTD? I used Deng.ttf file of Windows .What's it like for you? |
04:17:38 | FromGitter | <gogolxdong> learned a lot of GUI library recently so far, sdl, wxWidgets, nuklear, agar, imgui, endless... |
04:30:30 | FromGitter | <gogolxdong> Is that Crash To Desktop (CTD)? |
04:32:07 | * | alexnask quit (Ping timeout: 246 seconds) |
04:36:29 | * | ftsf__ joined #nim |
04:40:15 | * | ftsf_ quit (Ping timeout: 268 seconds) |
05:41:14 | * | nsf joined #nim |
05:45:22 | * | darithorn quit () |
05:56:00 | * | MyMind joined #nim |
05:56:43 | * | Sembei quit (Ping timeout: 245 seconds) |
06:05:24 | * | krux02 joined #nim |
06:08:47 | FromGitter | <zacharycarter> @gogolxdong - I'm pretty sure I know what your problem is without having run the code |
06:08:55 | FromGitter | <zacharycarter> @gogolxdong - well it's been around quite a bit longer |
06:09:30 | FromGitter | <zacharycarter> and yeah- CTD = crash to desktop |
06:09:52 | FromGitter | <zacharycarter> I'm not on windows - so I probably don't have Deng.ttf available |
06:10:04 | FromGitter | <zacharycarter> although I see it's included in the repo |
06:10:08 | FromGitter | <zacharycarter> so I'm not sure what the CTD is all about |
06:11:01 | FromGitter | <zacharycarter> Assertion failed: (atlas->temporary.alloc), function nk_font_atlas_clear, file nimnuklear/src/nuklear_font.c, line 3344. |
06:11:37 | FromGitter | <zacharycarter> `NK_ASSERT(atlas->temporary.alloc);` |
06:14:46 | FromGitter | <gogolxdong> I tried Windows and Linux . |
06:14:51 | FromGitter | <zacharycarter> ah |
06:14:56 | FromGitter | <zacharycarter> I see you're targeting cpp |
06:14:58 | FromGitter | <zacharycarter> that might be the problem |
06:15:27 | FromGitter | <zacharycarter> but I get different errors with cpp |
06:15:44 | FromGitter | <zacharycarter> hrm |
06:16:12 | FromGitter | <zacharycarter> yeah I'm on osx so that could also be an issue |
06:18:16 | FromGitter | <zacharycarter> I wonder if the bindings are working |
06:18:33 | FromGitter | <zacharycarter> this define - `NK_INCLUDE_DEFAULT_ALLOCATOR`- is supposed to set whether or not the default allocator is included |
06:19:32 | FromGitter | <zacharycarter> there definitely appear to be some issues with these bindings |
06:20:10 | FromGitter | <zacharycarter> for instance - https://github.com/gogolxdong/guardian/blob/master/nimnuklear/nuklear.nim#L239 - is going to be an issue |
06:20:29 | FromGitter | <gogolxdong> where invokes this def? |
06:20:48 | FromGitter | <zacharycarter> just search for - NK_INCLUDE_DEFAULT_ALLOCATOR - in your project |
06:20:55 | FromGitter | <zacharycarter> you'll see it's in the nuklear source |
06:20:57 | FromGitter | <zacharycarter> and in the bindings |
06:21:57 | FromGitter | <zacharycarter> also |
06:22:15 | FromGitter | <zacharycarter> make sure you're paying credence to this warning - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbc4917271506518ddd62ec] |
06:25:03 | FromGitter | <gogolxdong> yes, I see them , it's all #ifdef NK_INCLUDE_DEFAULT_ALLOCATOR but where `defines` NK_INCLUDE_DEFAULT_ALLOCATOR? |
06:25:26 | FromGitter | <zacharycarter> it looks like it's defined as an include flag here |
06:25:44 | FromGitter | <zacharycarter> https://github.com/gogolxdong/guardian/blob/master/nimnuklear/nuklear.nim#L10-L13 |
06:25:48 | FromGitter | <zacharycarter> which I'm not sure is sufficient |
06:27:37 | FromGitter | <gogolxdong> you can try to remove the flag and run. |
06:27:50 | FromGitter | <tim-st> @Araq I saw string matches openArray[char], so it would be easy to change strutils to work on openArray[char] where resizing to bigger size is not possible and otherwise stay with string only match. That would allow zero copying buffers with toOpenArray and use them as strings. Would you allow this change? |
06:27:55 | FromGitter | <zacharycarter> well - it's this whole bit here |
06:28:03 | FromGitter | <zacharycarter> The following flags if defined need to be defined for both header and implementation: |
06:28:11 | FromGitter | <zacharycarter> this is why if you look at my old bindings |
06:28:14 | FromGitter | <zacharycarter> I did things this way |
06:28:49 | FromGitter | <zacharycarter> https://github.com/zacharycarter/nuklear-nim/blob/master/src/bind.c |
06:29:32 | FromGitter | <zacharycarter> because like it says - it needs to be defined for the header AND implementation |
06:29:43 | FromGitter | <zacharycarter> well - it's not that it's defined / needing to remove the define |
06:29:52 | FromGitter | <zacharycarter> it's that the define needs to be at the implementation level - not the include level |
06:30:57 | FromGitter | <gogolxdong> means need an implementation of NK_INCLUDE_DEFAULT_ALLOCATOR? |
06:31:12 | FromGitter | <zacharycarter> no |
06:31:25 | FromGitter | <zacharycarter> it just means that it needs to defined both in a header file and in whatever file includes that header file |
06:31:29 | FromGitter | <zacharycarter> if you want to use that feature |
06:31:41 | FromGitter | <zacharycarter> in other words - if you somehow defined that flag in the C code that gets generated by nim |
06:31:45 | FromGitter | <zacharycarter> everything would probably be fine |
06:32:04 | FromGitter | <zacharycarter> I don't think including it as a compiler / linker flag though - is going to be sufficient |
06:32:06 | FromGitter | <zacharycarter> is what I'm trying to say |
06:32:15 | FromGitter | <gogolxdong> ok |
06:32:25 | * | alexnask joined #nim |
06:33:06 | krux02 | good morning |
06:33:16 | FromGitter | <zacharycarter> hi! |
06:33:35 | FromGitter | <gogolxdong> Is #define NK_INCLUDE_DEFAULT_ALLOCATOR in nuklear.h sufficient? |
06:33:35 | krux02 | I guess it is late your you now |
06:34:02 | FromGitter | <gogolxdong> and all c source code? |
06:34:29 | FromGitter | <zacharycarter> well - I'm not sleeping tonight anyway so it's all the same :P |
06:34:38 | FromGitter | <zacharycarter> @gogolxdong - you shouldn't need to touch nuklear.h |
06:34:46 | FromGitter | <zacharycarter> you just need some source file that includes nuklear.h |
06:34:50 | FromGitter | <zacharycarter> that also has a #define NK_INCLUDE_DEFAULT_ALLOCATOR |
06:34:52 | FromGitter | <zacharycarter> inside of it |
06:34:54 | FromGitter | <zacharycarter> like a .c file |
06:35:03 | FromGitter | <zacharycarter> that's why I linked to that bind.c file I did |
06:35:22 | FromGitter | <zacharycarter> because it shows how I worked through this - thanks to krux02's help - way back in the day |
06:35:26 | FromGitter | <zacharycarter> like 2 years ago :P |
06:35:59 | FromGitter | <zacharycarter> brb - I need to run to the store and get some heartburn meds, indigestion is killing me |
06:36:29 | krux02 | zacharycarter:, you are welcome |
06:38:27 | * | Vladar joined #nim |
06:41:19 | FromGitter | <tim-st> is there a proc that copies array[char] to string? |
06:55:38 | FromGitter | <gogolxdong> added #define NK_INCLUDE_DEFAULT_ALLOCATOR where includes "nuklear.h" , sufficent? |
07:01:37 | FromGitter | <gogolxdong> heartburn ? need sleep at night, don't stay up too late. |
07:01:58 | krux02 | tim-st: yes |
07:02:25 | krux02 | tim-st: $cast[cstring](arr[0].addr) |
07:06:51 | FromGitter | <zacharycarter> @gogolxdong meh - I slept after work today, that was undoing - and I slept too much this past eekend |
07:07:10 | FromGitter | <zacharycarter> @gogolxdong - heartburn = common word in the US for indigestion |
07:07:44 | FromGitter | <zacharycarter> @gogolxdong should be - if you want to put up a PR or something I can reproduce manually on my end and test - or just let me know what file you changed and what you added |
07:07:59 | FromGitter | <zacharycarter> I don't know why I just pinged you three times in a row lol - sorry |
07:08:50 | FromGitter | <technicallyagd> Hi guys, nice to meet you all. |
07:09:00 | FromGitter | <zacharycarter> howdy |
07:09:14 | FromGitter | <gogolxdong> no problem. |
07:10:15 | FromGitter | <technicallyagd> I just discovered Nim about a week ago while searching for a language to build games from scratch |
07:10:39 | FromGitter | <zacharycarter> ah cool |
07:11:03 | FromGitter | <timotheecour> welcome @technicallyagd :) |
07:11:10 | FromGitter | <zacharycarter> not sure what you mean by - from scratch - I think that's probably somewhat of a subjective term - but I assume you mean without the aid of a game engine like unity / UE4 / godot etc |
07:11:23 | FromGitter | <zacharycarter> either way - glad to have you aboard :) |
07:11:25 | FromGitter | <technicallyagd> @timotheecour thanks :D |
07:11:47 | FromGitter | <technicallyagd> Yep I have tried all three of them already |
07:12:24 | * | ftsf__ quit (Quit: Leaving) |
07:12:35 | FromGitter | <gogolxdong> pushed, so that you can try and see whether works on MacOS. |
07:13:12 | FromGitter | <zacharycarter> well - depending on the complexity of the game / whatever you're trying to build - it can be an easier or more difficult road to plow - sometimes both |
07:13:23 | FromGitter | <zacharycarter> row to plow |
07:13:25 | FromGitter | <zacharycarter> whatever the term is |
07:13:45 | FromGitter | <zacharycarter> I think I had it right the first time :p |
07:13:51 | FromGitter | <technicallyagd> lol |
07:14:05 | FromGitter | <zacharycarter> @gogolxdong - pulling |
07:15:57 | FromGitter | <zacharycarter> hrm - @gogolxdong - no I don't think what you did is going to help - let me try to fix this and push up a PR |
07:16:35 | FromGitter | <gogolxdong> ok, thanks, seems I didn't understand well. |
07:17:07 | FromGitter | <zacharycarter> np - if you don't do a lot of C programming / work with single header libs a lot, it 's not the most straightforward thing in the world |
07:17:56 | * | stefanos82 quit (Quit: Quitting for now...) |
07:21:58 | FromGitter | <technicallyagd> Does anyone have experience working with Vulkan API with Nim? |
07:22:16 | FromGitter | <zacharycarter> nope :/ I don't target specific graphics APIs anymore |
07:22:27 | FromGitter | <technicallyagd> bgfx? |
07:22:33 | FromGitter | <zacharycarter> yup |
07:23:28 | FromGitter | <technicallyagd> I was going to use it as well, but it doesn't seem to have very robust testing, so it feels a bit icky |
07:23:53 | FromGitter | <zacharycarter> most graphics libraries like that won't have traditional unit tests |
07:24:14 | FromGitter | <zacharycarter> and if they do - it's was probably a waste of time to autho rthem |
07:24:17 | FromGitter | <zacharycarter> author* |
07:24:23 | FromGitter | <technicallyagd> really? how so? |
07:24:55 | FromGitter | <zacharycarter> well - because you're writing against a standardized API - and you're very close to the hardware / software interface |
07:25:07 | FromGitter | <zacharycarter> assuming you're using the specification correctly - you should be able to rely on the specification |
07:25:16 | FromGitter | <zacharycarter> you could spend time writing tests to ensure your code is correct |
07:25:19 | FromGitter | <zacharycarter> or you could just write correct code |
07:25:26 | FromGitter | <zacharycarter> there's not a lot of business logic per se - to test |
07:26:01 | FromGitter | <zacharycarter> also - the author of BGFX is a very good developer, and IMO writes some of the best C++ code I've read in a while |
07:26:14 | FromGitter | <zacharycarter> his project is constantly updated and improved upon and has stayed that way since its inception |
07:26:26 | FromGitter | <zacharycarter> so I have mucho faith when it comes to BGFX |
07:26:48 | FromGitter | <gogolxdong> sounds good. |
07:26:54 | FromGitter | <technicallyagd> Hmm I think I am convinces lol |
07:27:18 | FromGitter | <zacharycarter> I'm not saying use bgfx - it adds complexity in certain aspects |
07:27:39 | FromGitter | <zacharycarter> but I'd much rather not be caught in the situation where some major OS vendor decides to start supporting a graphics API all of a sudden |
07:27:50 | FromGitter | <zacharycarter> or decides that in order to work with one you need some type of bridge to their proprietary API |
07:27:51 | FromGitter | <technicallyagd> lol |
07:28:00 | FromGitter | <zacharycarter> done with that sort of nonsense |
07:28:00 | FromGitter | <technicallyagd> OpenGL and Apple |
07:28:32 | FromGitter | <zacharycarter> I feel like my mac book pro might blow up if I actually type in the name after writing all of that |
07:28:47 | FromGitter | <technicallyagd> LOL |
07:29:53 | FromGitter | <technicallyagd> Did you read your EULA fully? It might be legal for them to do that |
07:30:03 | FromGitter | <zacharycarter> probably |
07:30:28 | FromGitter | <zacharycarter> if south park taught us anything - it's that we could all one day become part of a humancentipad |
07:31:58 | krux02 | fish or ice cream? |
07:32:03 | FromGitter | <zacharycarter> haha |
07:32:42 | krux02 | I had to see the movie that episode was based on. |
07:33:07 | FromGitter | <technicallyagd> God, no. |
07:33:07 | FromGitter | <zacharycarter> @gogolxdong - ooph this is not going so great - I eliminated the CTD but introduced a host of other errors - but I think I know how to fix maybe - we'll see :P |
07:33:18 | FromGitter | <zacharycarter> haha - yeah that was one I tried to duck seeing krux02 |
07:33:20 | krux02 | that is a movie, where you can just watch the trailer, and you know everything. THe movie is just a longer version of that. |
07:33:29 | FromGitter | <zacharycarter> lol exactly |
07:33:37 | krux02 | "duck seeing" ? |
07:33:46 | FromGitter | <zacharycarter> or like dodge |
07:33:46 | FromGitter | <zacharycarter> avoid |
07:33:51 | FromGitter | <technicallyagd> I think knowing the movie title gives you 90% of the plot already |
07:33:54 | krux02 | ok |
07:33:55 | FromGitter | <zacharycarter> I need to stop using US slang |
07:35:23 | krux02 | the evil doctor in human centipede is an actor that is sometimes here and there on public television doing boring movies. |
07:35:36 | FromGitter | <technicallyagd> Anyways, another tiny problem I had with bgfx was its own shader language, which I couldn't find good extension on vscode to support it |
07:36:01 | FromGitter | <zacharycarter> it's very close to GLSL |
07:36:08 | krux02 | I don't know if you have the same kind of boring movies in the us as we have here in Germany |
07:36:18 | FromGitter | <zacharycarter> but yeah - I wouldn't expect to find a VS code extension for it |
07:36:21 | FromGitter | <technicallyagd> Sharknado? |
07:36:46 | krux02 | but knows human centipede changed the way I see him in other movies now. |
07:38:11 | * | platoff joined #nim |
07:38:20 | krux02 | well not really that important. but no not sharknado. |
07:38:58 | FromGitter | <technicallyagd> I meant boring movies like sharknado? or the slow-paced academic kind of movie? |
07:40:21 | krux02 | I mean Rosamunde Pilcher kind of movies |
07:41:19 | FromGitter | <technicallyagd> @zacharycarter I could only get basic syntax high lighting by using GLSL syntax. Do you have suggestion on authoring bgfx's shader code? |
07:45:24 | FromGitter | <technicallyagd> I don't think I have watched any movie based on her work, but I think I get what you mean now |
07:56:12 | FromGitter | <zacharycarter> ooph - it seems like there is a LOT of confusion around nuklear in our community and it's implementation |
07:56:45 | FromGitter | <zacharycarter> I would urge folks to read the docs - because I think there's a misconception about how the library works - but I'm just basing things off what I've read and heard recently about the lib |
07:56:51 | FromGitter | <zacharycarter> it doesn't work in a single header / split up format |
07:57:03 | FromGitter | <zacharycarter> the author has simply moved the implementation into separate source files |
07:57:22 | FromGitter | <zacharycarter> you still include the library - as a single header - in fact @gogolxdong - it appears you're missing an entire.h file :P |
07:57:30 | FromGitter | <zacharycarter> the one at the root of the nuklear repo |
07:57:32 | FromGitter | <zacharycarter> which pulls in everything else |
07:57:52 | FromGitter | <zacharycarter> @technicallyagd - I would look at other projects using BGFX / the examples and start there |
07:58:10 | FromGitter | <zacharycarter> it really is extremely similar to GLSL - there is helper stuff built in to make your life easier |
07:58:25 | FromGitter | <zacharycarter> but I don't think it's so far off / different that you'll need any sort of special tool to bridge the gap |
07:58:50 | FromGitter | <zacharycarter> and tbh - I don't know what the ideal way to author shaders is - I generally have just kind of worked with them / recompiled until i've gotten the correct result - which isn't ideal |
07:58:59 | FromGitter | <gogolxdong> which file, it's the repository of submodule updated. |
07:59:06 | FromGitter | <technicallyagd> @zacharycarter Oh sorry, I meant to ask what editor has the best support for it? |
07:59:08 | FromGitter | <zacharycarter> probably the best info you can get in this area - is to hop into bgfx's gitter channel and ask there - I'm sure branimir has some insight |
07:59:32 | FromGitter | <zacharycarter> ah - not sure there either - I usually use an online interactive shader editor and just use GLSL till I get the shader I want - and then adapt to bgfx |
07:59:49 | FromGitter | <zacharycarter> http://www.kickjs.org/example/shader_editor/shader_editor.html - is one I've used before |
08:00:04 | FromGitter | <zacharycarter> @gogolxdong this one - https://github.com/vurtun/nuklear/blob/master/nuklear.h |
08:00:09 | FromGitter | <technicallyagd> Cool! thank you |
08:00:32 | FromGitter | <zacharycarter> it seems the confusion - is that folks saw - https://github.com/vurtun/nuklear/tree/master/src - which contains a nuklear.h file |
08:00:40 | FromGitter | <zacharycarter> along with all the other .c files |
08:00:45 | FromGitter | <zacharycarter> and thought that suddenly the library had been modularlized |
08:00:55 | FromGitter | <zacharycarter> it's still a single header file - just the source has been broken out into multiple source files is all |
08:01:17 | FromGitter | <zacharycarter> you still interact with the library in the same way - as when I originally authored the bindings |
08:01:26 | FromGitter | <zacharycarter> so like - all those compile pragmas at the top of your nuklear nim file are wrong |
08:01:36 | FromGitter | <zacharycarter> basically the library should be included - exactly as I had done it - in my repo |
08:01:40 | FromGitter | <zacharycarter> otherwise things aren't going to work |
08:02:07 | FromGitter | <zacharycarter> @technicallyagd np! I have quite a bit of experience in BGFX - and hope to be gaining a lot more in the next few weeks, so please poke at me if you have questions or need help |
08:02:56 | FromGitter | <zacharycarter> @gogolxdong - regarding your text editor thing - I want to guess at what was going on - my guess is that every frame the buffer was getting overridden and what had been typed into the text box previously was lost? |
08:03:05 | FromGitter | <zacharycarter> is that assumption correct at all? |
08:03:06 | * | gmpreussner_ quit (Ping timeout: 252 seconds) |
08:03:38 | FromGitter | <gogolxdong> It's by design for now. |
08:03:58 | * | gmpreussner joined #nim |
08:04:01 | FromGitter | <zacharycarter> well yes - the thing is because nuklear is immediate mode - it's not going to do any state retention |
08:04:17 | FromGitter | <zacharycarter> so you're responsible for maintaining the state from one draw call to the next |
08:04:35 | FromGitter | <zacharycarter> it's very weird / not normally how you would expect a library to behave and takes getting used to |
08:04:40 | FromGitter | <gogolxdong> I'm confused by your words, what is all wrong at the top of the nim file? |
08:05:02 | FromGitter | <zacharycarter> all of the {.compile.} pragmas that are compiling the c files |
08:05:09 | FromGitter | <zacharycarter> all you need is one C source file |
08:05:33 | FromGitter | <zacharycarter> that looks like - https://github.com/zacharycarter/nuklear-nim/blob/master/src/bind.c |
08:06:03 | FromGitter | <zacharycarter> and the file it needs to include is - https://github.com/vurtun/nuklear/blob/master/nuklear.h |
08:06:20 | FromGitter | <zacharycarter> you can just git submodule nuklear wherever you create that C file |
08:06:24 | FromGitter | <zacharycarter> if you look at my repo - that's exactly what I did |
08:09:21 | FromGitter | <zacharycarter> I'll try to make a PR that fixes it |
08:09:53 | FromGitter | <gogolxdong> shashlick and Alex mentioned to generate nuklear bindings by nimgen,(didn't remember exact words), and I met issue with your bindings at editString , so I tried the new generated . |
08:10:02 | FromGitter | <zacharycarter> gotcha |
08:10:15 | FromGitter | <zacharycarter> yeah - all this is fixable - just getting it right |
08:10:28 | FromGitter | <zacharycarter> I think Alex and Shashlick may be a bit confused about how Nuklear works |
08:11:40 | FromGitter | <gogolxdong> you say you are going to work on bgfx+imgui? |
08:12:01 | FromGitter | <zacharycarter> well - potentially - I know that BGFX has built in support for imgui |
08:12:08 | FromGitter | <zacharycarter> so I'm not sure if it will end up being an easier road or not to go down |
08:12:59 | FromGitter | <gogolxdong> what kind of game are you going to develop? Have you tried any AR game? |
08:13:18 | FromGitter | <zacharycarter> nope! I don't have much interest in AR / VR - at least not in making games using those tecs |
08:13:19 | FromGitter | <zacharycarter> techs |
08:13:37 | FromGitter | <zacharycarter> I'm going to focus on RTS games primarily - but my ambitions are to build an engine, not so much a singular title |
08:13:59 | FromGitter | <zacharycarter> I want to solve problems I've had in prior iterations of my engine, add an editor, and add a PBR rendering pipeline |
08:14:07 | FromGitter | <zacharycarter> I also want the entire thing to be easier to get up and running with |
08:16:24 | FromGitter | <gogolxdong> Is there a RTS game name you want to spell? |
08:18:37 | FromGitter | <zacharycarter> sure - age of empires, warcraft2 |
08:18:55 | FromGitter | <zacharycarter> hrm - I'm not quite sure about all these `importc` pragmas next to all these type definitions |
08:18:59 | FromGitter | <mratsim> Command and Conquer, Red Alert :P |
08:19:03 | FromGitter | <zacharycarter> they're causing me errors when trying to compile the bindings |
08:19:23 | FromGitter | <zacharycarter> I didn't have these in my original set of bindings - which could be an omission on my part |
08:19:23 | FromGitter | <gogolxdong> we are the same age people I think. |
08:19:53 | FromGitter | <gogolxdong> which I played. |
08:20:52 | FromGitter | <zacharycarter> unfortunately - I don't have time to fix all of these type defs - assuming they're problematic |
08:21:00 | FromGitter | <zacharycarter> I have to get ready to leave for work in a bit |
08:21:32 | FromGitter | <zacharycarter> @gogolxdong - I can't promise you that I will get the nuklear bindings working - but I can say that within the next month I plan to be starting work on the editor for the engine |
08:21:45 | FromGitter | <zacharycarter> and by then I'll need to have some sort of immediate mode GUI solution figured out |
08:22:01 | FromGitter | <zacharycarter> whether it be nuklear or imgui |
08:22:19 | FromGitter | <gogolxdong> no problem, I will manage by myself. |
08:22:20 | FromGitter | <zacharycarter> I do think you can do what you're trying to do - I'm not sure if you'd be better served or not by a retained mode solution |
08:22:44 | FromGitter | <zacharycarter> well - I can certainly try to help when I have more bandwidth - I think others can probably help too - because I know there is quite a bit of interest in nuklear |
08:22:54 | FromGitter | <zacharycarter> the best path might to just be to get the existing bindings working with the latest version of nuklear |
08:22:58 | FromGitter | <zacharycarter> which I don't imagine - would be too much work |
08:23:07 | FromGitter | <zacharycarter> and then to go from there - that way at least you have SOMETHING that works |
08:23:32 | FromGitter | <zacharycarter> and I think that would probably be a much easier task for me to take on - rather than trying to fix bindings that I didn't produce / aren't even sure that they work entirely in the first place |
08:24:13 | FromGitter | <dandevelo> What convention do you use to name private members? I used to prefix them with _ in C/C++ but I can not do this in Nim. What is your alternative? |
08:24:31 | FromGitter | <zacharycarter> don't have a convention? |
08:24:34 | FromGitter | <gogolxdong> no worry, it's generated by nimgen and better be solved automatically too. |
08:25:29 | FromGitter | <zacharycarter> I never really understood the need for such a convention in the first place |
08:25:49 | FromGitter | <zacharycarter> but I never wrote much C++ so don't listen to me either :P |
08:26:02 | FromGitter | <zacharycarter> I just haven't needed anything like that for Nim - at least to make my life easier |
08:26:04 | FromGitter | <gogolxdong> all I know is NEP-1. https://nim-lang.org/docs/nep1.html |
08:26:53 | FromGitter | <zacharycarter> @gogolxdong - I agree it would be better to auto-generate them, but if the automatic generation is borked / isn't proven to work - it's not worth automatic |
08:27:08 | FromGitter | <zacharycarter> better to get it right manually first - and then worry about automating |
08:27:42 | FromGitter | <dandevelo> @zacharycarter this might be useful when you have a method setting a private member. e.g: I have an url: string field and want to set it using object.url = "https..." and also do some validation when setting it so i declare a method url=( |
08:28:17 | FromGitter | <zacharycarter> yeah - I guess this is more of a OOP problem than anything else |
08:28:20 | FromGitter | <zacharycarter> or at least that's how it sounds |
08:29:23 | FromGitter | <narimiran> @dandevelo private members don't have `*` at the end, so they are kept private? :) |
08:29:52 | FromGitter | <narimiran> `myPublicMember*: int`; `myPrviateMember: int` |
08:30:03 | FromGitter | <zacharycarter> but that's not a convention for naming |
08:30:06 | FromGitter | <dandevelo> @narimiran please read above regarding the method for setting the private member |
08:30:44 | FromGitter | <narimiran> ok, sorry, didn't read carefully |
08:31:12 | FromGitter | <zacharycarter> https://forum.nim-lang.org/t/1092 |
08:31:17 | FromGitter | <zacharycarter> is a topic on the subject |
08:31:42 | FromGitter | <dandevelo> @zacharycarter yes, read that one before asking here |
08:31:55 | FromGitter | <dandevelo> doesn't seem to have an answer |
08:34:43 | FromGitter | <zacharycarter> can't you do like - `m_` with Nim? |
08:34:55 | FromGitter | <zacharycarter> I know it's not what you want - but I think there are workarounds to your problem |
08:35:14 | FromGitter | <Bennyelg> @zacharycarter did you try this ⏎ https://elm-lang.org/ ? |
08:35:17 | FromGitter | <zacharycarter> I think this is probably some of the reasoning behind why Nim restricts its syntax like this in the first place |
08:35:37 | * | PMunch joined #nim |
08:35:38 | FromGitter | <zacharycarter> I'm not a big fan of Elm - I mean I like some of its design philosophies but the language is a mess IMO |
08:35:55 | FromGitter | <Bennyelg> looks like f# syntax |
08:36:18 | FromGitter | <zacharycarter> well they're both functional languages so they do have some similarities |
08:36:27 | FromGitter | <zacharycarter> although Elm I believe is strictly geared towards web dev - JS / NodeJS |
08:36:35 | FromGitter | <Bennyelg> yea |
08:36:49 | FromGitter | <zacharycarter> I just wouldn't use Elm - I wouldn't have used it before and I really wouldn't use it now |
08:37:02 | FromGitter | <narimiran> @zacharycarter you can't do `m_` because Nim strips all underscores from the names |
08:37:07 | FromGitter | <zacharycarter> I think there's a lot of internal upheaval in that community / issues with how the language has been progressing |
08:37:15 | FromGitter | <zacharycarter> ah - good point @narimiran |
08:37:18 | FromGitter | <Bennyelg> great |
08:38:08 | FromGitter | <technicallyagd> @narimiran so `m_url` will just become `murl`? |
08:38:16 | FromGitter | <narimiran> @technicallyagd yup |
08:38:56 | FromGitter | <narimiran> you can use `m_url` in your code, but you cannot name *another* variable `murl`, `mUrl`, `mur_l`, `murl_`, etc. |
08:40:34 | PMunch | I've only tried Elm once, but I kinda liked it |
08:41:10 | PMunch | But as zacharycarter said, it's very geared towards webdev and that's not something I do often enough that I cared to try it again |
08:41:51 | PMunch | narimiran, you can't name a variable murl_ at all |
08:42:01 | PMunch | Trailing underscore is not allowe |
08:42:31 | FromGitter | <narimiran> PMunch, yeah, I got a bit carried away with the examples :) |
08:44:45 | * | abm joined #nim |
08:52:45 | * | rokups joined #nim |
09:22:13 | * | SenasOzys joined #nim |
09:25:41 | * | platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:34:12 | * | dddddd joined #nim |
09:40:27 | FromGitter | <xmonader> ipaddress for nim? |
09:41:17 | FromGitter | <zetashift> The net module? |
09:41:31 | FromGitter | <zetashift> https://nim-lang.org/docs/net.html |
09:47:09 | FromGitter | <xmonader> @zetashift nah i'm thinking of someting like netaddr or ipaddress in python lib |
09:48:04 | FromGitter | <xmonader> actually it might just work thanks |
10:21:15 | * | xet7 joined #nim |
10:21:53 | * | platoff joined #nim |
10:30:04 | * | alexnask quit (Ping timeout: 240 seconds) |
10:41:04 | * | elrood joined #nim |
10:47:54 | FromGitter | <zetashift> oh man that godotnim bug I was stumbling on was something that went wrong through the gdobj macro, and reading through the code I know absolutely nothing about it ;P. I'll just 0.18 for now |
11:04:10 | PMunch | zetashift, how is the workflow with Nim and Godot? |
11:04:18 | PMunch | I've been meaning to try it out but never got around to it |
11:06:41 | Araq | zetashift, before giving up, grep for 'nnkPar' |
11:06:57 | Araq | that might be changed to 'nnkTupleConstr', new in 0.19 |
11:07:19 | Araq | and speaking from experience, you can try this code change without thinking about it :-) |
11:13:40 | FromGitter | <zetashift> @PMunch it's great, I use Godot 3.0 with VSCode for the nim editing, basically everything translates from gdscript to nim really well. So you can follow the godot docs really well. Only thing different is signals emitting/receiving but that was a one time learn and endragor was really helpful with it |
11:14:15 | PMunch | Hmm, interesting |
11:14:28 | PMunch | You should do a write-up on how to set it up and the signals trick :) |
11:14:29 | FromGitter | <zetashift> So you just `nake build` and press F5 in the editor to see your changes |
11:14:55 | PMunch | That's pretty neat |
11:15:16 | PMunch | No way to get F5 to run nake for you? |
11:15:27 | FromGitter | <zetashift> that's...pretty genius |
11:15:31 | FromGitter | <zetashift> I wouldn't know how to |
11:16:31 | FromGitter | <zetashift> would probably be better if the nake build also runs the sample in the editor since you press F5 in the editor for checking out other things too |
11:17:31 | PMunch | Hmm |
11:18:26 | FromGitter | <zetashift> Also one thing that I did ran into was `yield`-ing stuff in godot. It don't play well and even the docs mention that things like this is best done in GDScript |
11:18:36 | PMunch | http://docs.godotengine.org/en/3.0/getting_started/editor/command_line_tutorial.html |
11:18:48 | PMunch | According to this that should be as simple as calling "godot" in the project folder |
11:18:52 | FromGitter | <zetashift> thanks! |
11:19:22 | FromGitter | <zetashift> I'm gonna try and get it to work on 0.19 for one more time |
11:22:19 | FromGitter | <zetashift> searching for nnkPar and nnkTuleContr gets me no matches :( |
11:23:04 | Araq | ok, too bad, but it was worth a try |
11:26:34 | FromGitter | <zetashift> the empty string and empty seqs for so easy to fix but damn these I might've did something wrong to the godotmacros.nim so I'll try running through it again |
11:30:35 | * | skelett joined #nim |
11:37:44 | * | SenasOzys quit (Ping timeout: 268 seconds) |
11:40:15 | FromGitter | <zetashift> Should I correct the nil state of string with `""`? E.g. `let s: string = nil` would be `let s: string = ""` |
11:40:16 | endragor | zetashift: I'll work on adapting godot-nim to Nim v0.19 "soon". The important thing is to keep it backward-compatible with v0.17 and v0.18 |
11:41:15 | FromGitter | <zetashift> oh noice you guys use it in production right? I thought I would gave it a whirl instead of not doing anything |
11:42:18 | endragor | I don't care much about 0.19 - too many changes there for our projects to migrate to it, that's why it gets delayed |
11:44:32 | FromGitter | <zetashift> @endragor thanks I didn't know about the backward-compatible goal, I'll just keep use choosenim for now |
11:44:55 | FromGitter | <zetashift> and try out PMunch link to make nake build also run godot |
11:47:01 | FromGitter | <xmonader> Valid bug? ⏎ ⏎ ```"10.147.17.184/24" ⏎ Invalid IP Address. Address contains an invalid character``` [https://gitter.im/nim-lang/Nim?at=5bbc95355331811c2e7414cc] |
11:52:08 | PMunch | xmonader / isn't really part of an IP |
11:53:05 | PMunch | It's denotes the subnet |
11:56:04 | FromGitter | <xmonader> I know but i expected to be able to specify subnets and query the hosts and such not sure if that's how it should be? or even IpNetwork class should be available instead |
11:56:24 | PMunch | What are you trying to parse that string with? |
11:56:37 | FromGitter | <xmonader> parseIpAddress? |
11:56:59 | * | tzui joined #nim |
11:57:53 | PMunch | Yeah, that just parses a single IP address |
11:58:09 | * | tzui left #nim (#nim) |
12:01:21 | * | rockcavera joined #nim |
12:12:04 | * | stefanos82 joined #nim |
12:22:29 | FromGitter | <zacharycarter> planetis[m]: thank you! |
12:50:00 | planetis[m] | actually i also have trouble understanding them, a blog post by their creator would be nice |
12:55:01 | planetis[m] | i am trying to make my matrix library more optimized but so far nothing |
13:25:55 | * | owner_ joined #nim |
13:25:56 | * | Tortice quit (Read error: Connection reset by peer) |
13:26:21 | * | owner_ is now known as Guest51934 |
13:26:29 | * | alexnask joined #nim |
13:30:25 | alexnask | @Araq on cppDefine, should not all the standard C and C++ keywords be automatically mangled using the existing mechanism and then let the user add cppDefines to their nim.cfg for additional ones, or do you suggest that the default nim.cfg include cppDefine's of typeof and restrict and let the rest of the keywords be handled like they are now? |
13:33:45 | Araq | the latter |
13:33:58 | Araq | and also, the list of keywords is constantly changing |
13:35:43 | alexnask | Right,Fair enough |
13:39:30 | FromGitter | <kaushalmodi> Yay! Araq is on a merge spee! 🎉 |
13:39:41 | FromGitter | <kaushalmodi> s/spee/spree |
13:40:57 | * | endragor quit (Remote host closed the connection) |
13:41:11 | * | endragor joined #nim |
13:41:19 | * | endragor quit (Remote host closed the connection) |
13:44:03 | FromGitter | <narimiran> +1 on that yay! |
13:54:56 | * | endragor joined #nim |
13:59:12 | * | floppydh quit (Quit: WeeChat 2.2) |
13:59:54 | * | endragor quit (Ping timeout: 264 seconds) |
14:01:13 | * | alexnask quit (Ping timeout: 246 seconds) |
14:09:49 | krux02 | I have a nice hello world, I didn't know it was valid Nim syntax: http://ix.io/1oMd |
14:11:14 | Araq | I called this feature of Nim "syntax harmony" :P |
14:11:30 | PMunch | Haha, that is a nice one |
14:11:34 | Araq | there is syntax and then there is semantics and Nim decouples them |
14:11:56 | Araq | and this must be great because I used an OO word. |
14:12:18 | PMunch | So what's happening is that echo accepts varargs and get's "hello" and a block which resolves to "a & b" and then echo concatenates them? |
14:12:53 | Araq | yep |
14:13:39 | PMunch | Ah good |
14:13:51 | PMunch | As long as I'm able to explain what's going on I'm happy :P |
14:14:18 | PMunch | I was afraid the string had something to do with it |
14:14:52 | FromGitter | <malkomalko> TIL: http://ix.io/ nice! |
14:17:08 | FromGitter | <kaushalmodi> there's also pbpt.pw that allows linking individual lines: https://ptpb.pw/w3Jg/nim#L-2 |
14:18:17 | FromGitter | <kaushalmodi> krux02: nice snippet, and PMunch, thanks for the explanation :) |
14:18:59 | PMunch | malkomalko, yeah ix is nice. I've set up a keyboard shortcut that sends my current selection to ix.io and puts the link in my clipboard. Super practical for IRC |
14:19:51 | FromGitter | <malkomalko> love all the things |
14:27:12 | * | Vladar quit (Remote host closed the connection) |
14:27:22 | FromGitter | <zacharycarter> okay - destructors and RAII make much more sense to me now |
14:27:48 | FromGitter | <zacharycarter> I'm still not understanding all the copy / move semantics involved - but I guess that's the next step in understanding I need to get to |
14:28:07 | FromGitter | <zacharycarter> https://www.hackcraft.net/raii/#sect0 - was a very good / helpful read |
14:28:13 | * | narimiran joined #nim |
14:29:39 | * | krux02- joined #nim |
14:32:09 | * | krux02- quit (Remote host closed the connection) |
14:32:30 | * | krux02- joined #nim |
14:34:51 | * | PMunch quit (Quit: Leaving) |
14:43:47 | * | TheLemonMan joined #nim |
14:46:32 | TheLemonMan | cool, now that the manual snippets are also run we can expect more CI timeouts :D |
14:48:12 | Araq | hum? they always were run |
14:48:56 | FromGitter | <imdaveho> @Araq for finish.exe on windows, do we have to use MingW? |
14:49:23 | FromGitter | <imdaveho> I have VS 2017 buildtools installed, isn't that sufficient? |
14:49:26 | TheLemonMan | not during the `nim doc` pass though |
14:50:50 | Araq | imdaveho, maybe but then finish.exe doesn't detect it, it only detects mingw |
14:51:05 | Araq | TheLemonMan, the manual uses the 'nim rst2html' command |
14:51:25 | FromGitter | <iffy> I'm having trouble resetting my password on the forum. Is this a common issue? |
14:51:29 | Araq | I recently tested clang v7 on Windows and was surprised how well it works |
14:51:49 | Araq | so maybe we'll ship clang with Nim and drop the finish.exe |
14:52:40 | Araq | but we can't ship VS 2017 buildtools and VS changes so much between its versions |
14:52:54 | Araq | that it's hard to detect |
14:53:21 | Araq | also tbh... it's setup with its env vars and the lack of a builtin assembler is just crap |
14:56:36 | FromGitter | <imdaveho> hmm that's fine -- for a language that *actually* considers the windows devs out there, the setup process is sure clunky -- so if you ship with clangv7 orr whatever to get ppl bootstrapped asap, that would be great |
14:56:55 | FromGitter | <imdaveho> also choosenim...needs 64-bit support and some work to get it up to rustup level... |
14:57:09 | FromGitter | <imdaveho> maybe that's something I could look into contributing...but again, I'm not at your guy's level |
14:57:16 | narimiran | when talking about windows: please make choosenim use 64-bit version |
14:57:53 | narimiran | if there is only one version supported, let it be 64-bit one |
15:01:39 | Araq | but every 64bit windows can run the 32 bit version |
15:01:41 | TheLemonMan | shashlick_ was working on it, it seems ( https://github.com/dom96/choosenim/pull/63 ) |
15:01:55 | * | nsf quit (Quit: WeeChat 2.2) |
15:04:02 | narimiran | Araq: and every 32-bit user (a minority of total users) can install nim via official download, not via choosenim ;) |
15:04:10 | * | shashlick_ quit (Remote host closed the connection) |
15:04:31 | * | shashlick joined #nim |
15:04:36 | * | FromGitter * arnetheduck is accepting patches for `nlvm` windows support :) |
15:04:38 | * | federico3 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
15:05:01 | * | federico3 joined #nim |
15:05:05 | shashlick | well, that choosenim PR also adds ability to install binary on windows, avoiding the full build process |
15:05:11 | shashlick | bunch of other fixes |
15:05:42 | shashlick | will be cool if it got some code reviews |
15:05:46 | Araq | narimiran, fair enough I guess |
15:07:11 | FromGitter | <manterolat> @Araq, for #9154 (pr #9193), should the path creation be done in commands.nim? |
15:07:38 | Araq | nah when writing the file |
15:07:54 | Araq | if there is an error the dirs shouldn't be generated |
15:09:14 | FromGitter | <manterolat> Got it! Should I still check whether the outfile is in fact a directory inside commands.nim? |
15:09:23 | Araq | no. |
15:09:59 | TheLemonMan | that's not in line with what gcc does |
15:14:03 | narimiran | Araq: can you please expand why `rotateLeft` can't be discardable? or: why is the return value of it so important? |
15:14:17 | Araq | I don't like .discardable |
15:14:37 | Araq | proc foo(): auto = discardableProc() # what does it mean? |
15:14:50 | Araq | language features interact. |
15:14:54 | narimiran | ok, there's another solution: proc which mutates its first argument shouldn't return some unexpected int in the first place |
15:15:13 | Araq | yeah but that would be a breaking change |
15:15:27 | Araq | and we need to focus on bugfixes IMO |
15:15:50 | narimiran | i know, that's why i thought discardable could be good idea there (even if it is not generally preferrable) |
15:16:02 | krux02 | Araq: maybe there is a linter tool that automatically reports usages of auto and discardable as bad in a PR |
15:16:06 | krux02 | I think there is |
15:16:24 | TheLemonMan | I hate `auto` |
15:16:37 | FromGitter | <kaushalmodi> krux02: just add a grep command to the script: in travis and fail if match found? :) |
15:16:50 | Araq | gah don't you dare |
15:16:58 | FromGitter | <kaushalmodi> hehe |
15:17:44 | narimiran | krux02: btw, discardable is used twice in the same file, and it is there for the last three years |
15:18:09 | Araq | we don't need no linters, we can use 'grep' instead and Unix is my IDE because I love stringly typed environments that don't work now and didn't work back in the 70ies either |
15:23:08 | narimiran | this is the discardable we're talking about: https://github.com/nim-lang/Nim/pull/9192/commits/7aaceb628fcdb251fe9295bf7b92728fb8f4557a#diff-0496518dc73089ad36ee9fc78572c73eR533 |
15:25:14 | narimiran | can *anybody*, without further investigation, tell what value does this return? and bonus question: would you expect `myCollection.rotateLeft()` to yell at you because you didn't handle some return value? |
15:26:12 | krux02 | narimiran, I know what it does, I implemented it |
15:26:13 | narimiran | (that should have been `myCollection.rotateLeft(myValue)`) |
15:26:58 | narimiran | krux02: why didn't you document the return value? ;) |
15:27:04 | krux02 | it "rotates" the elements in the collection by `myValue` elements to the left, and returns some useless value |
15:27:38 | krux02 | I forgot, I implemented it with the c++ version in mind |
15:27:39 | * | Trustable joined #nim |
15:27:54 | krux02 | and the c++ version returns an iterator |
15:28:01 | narimiran | krux02: https://github.com/nim-lang/Nim/pull/9192#issuecomment-427389720 |
15:28:12 | narimiran | there are two c++ versions |
15:28:12 | krux02 | that "iterator" doesn't exist in Nim, so it returns an index |
15:29:19 | FromGitter | <manterolat> Araq, how should I throw an error in `myClose()` in jsgen.nim for the outFile issue? globalError and localError both seem to need a PProc to be called |
15:30:05 | krux02 | I agree the return value is for the most part not interesting. So discardable is actually ok here. But Araq doesn't like discardable, so it isn't. |
15:30:37 | krux02 | narimiran, are you using rotateLeft? |
15:30:44 | narimiran | yes i am |
15:31:30 | narimiran | well, if you say it is ok here, it might convince Araq :) |
15:31:32 | krux02 | cool, I had to actually argue that rotateLeft is useful |
15:31:59 | krux02 | narimiran: "might" |
15:32:36 | narimiran | "so, you're telling me there's a chance" :) |
15:33:06 | narimiran | i'm sure there are lots of things he don't like/prefer, but.... :) |
15:35:09 | krux02 | I am telling you, if discardable is useful for anything, then it is this procedure |
15:35:33 | narimiran | Araq: ^ |
15:36:07 | krux02 | but I think he doesn't like it, because he doesn't like the implementation of discardable. |
15:36:49 | Araq | alright so use the .discardable here |
15:37:42 | Araq | and I smell another "I hate for loops" in disguise :P |
15:37:56 | narimiran | thank you :) |
15:38:43 | Araq | oh no I take it back, rotateLeft is not just a single for loop |
15:49:43 | Araq | narimiran, https://github.com/nim-lang/Nim/pull/7036 |
15:49:59 | Araq | close/accept? I think these aliases always do more harm than good |
15:50:23 | narimiran | Araq: thank for the reminder! will delete those crazy `-+-=` symbols |
15:50:47 | narimiran | but IMO, `+=` is quite useful (i know i use it quite often) |
15:51:40 | * | hzx joined #nim |
15:52:22 | narimiran | oh, i already deleted those crazies |
15:52:23 | krux02 | Araq: I have seen often, that `+=` is faster that a distinct `+` and `=` |
15:52:46 | * | narimiran should buy krux02 a beer |
15:52:53 | krux02 | and I have seen a lot of generic code that implemented `+` based on `+=` |
15:52:59 | krux02 | (and copy) |
15:53:15 | Araq | yes but look at this PR |
15:53:22 | Araq | it doesn't nothing of these things |
15:53:29 | krux02 | I know |
15:53:53 | krux02 | but for the discussion, I don't think a generic `+=` based on `+` and `=` is better. |
15:54:01 | narimiran | how can i make it better? can *I* make it better, or is somebody more experienced needed for that? |
15:54:28 | krux02 | I think the += should be implemented faster, it shouldn't allocate a new hash set object and then assign it. |
15:54:47 | krux02 | it is misleading, when there as a custom += operator, it should be fast and modifying |
15:55:46 | narimiran | i'm all for it (that fast version), but i'll probably need a guidance how to do it |
15:56:21 | krux02 | those operators should be aliases for incl and excl |
15:56:26 | krux02 | I just looked in the file |
15:56:40 | krux02 | the implementation is stupid |
15:58:18 | krux02 | narimiran, it is already implemented it just has a different name |
15:58:27 | krux02 | look in the source code |
15:58:50 | narimiran | oh sweet |
15:58:54 | narimiran | will make the changes |
16:03:44 | Araq | no, we have incl and add and += and these are never aliases |
16:04:11 | Araq | and yeah, 'incl' should maybe have been 'add' instead but that's a different issue |
16:04:25 | FromGitter | <rokups> got back to coroutines a bit. basic implementation with manual switching (tested only on linux): https://gist.github.com/6b31385af70b71ac5e691aded306ab14 and depends on https://github.com/septag/deboost.context/tree/master/asm |
16:04:42 | Araq | ok probably in system.nim += exists for sets :-/ |
16:04:55 | Araq | https://github.com/nim-lang/Nim/pull/7735 do we want this? |
16:05:28 | FromGitter | <imdaveho> also, @Araq I hate bikeshedding, but is there a reason `*` is used to specify pub methods? since it resembles a common pattern for representing pointers |
16:07:12 | narimiran | Araq: ok, if `+=` shouldn't be alias for `incl` then we can close that old PR of mine, and i won't be making a new one |
16:08:36 | narimiran | btw, impressive rate of resolving PRs/issues! please keep up with this, i'm enjoying it! (and i'm sure i'm not the only one) |
16:11:34 | FromGitter | <mratsim> @imdaveho it’s from Modula, and forcing people to spell ptr is good |
16:11:44 | FromGitter | <manterolat> Is there a better way of showing an error inside jsgen.nim without showing a file/line number? I'm currently doing `newLineInfo(m.config, AbsoluteFile "", 0, 0)`, but it doesn't seem like the best way to do this |
16:12:16 | Araq | it's from Oberon and I wouldn't do it this way today, but it's also not too terrible |
16:13:09 | Araq | and 'T * x' is a multiplication, not a pointer declaration :P |
16:13:22 | FromGitter | <mratsim> for sets, how about `^=` and `v=` ;) |
16:13:30 | Araq | we don't copy mistakes from C here, we make our own mistakes |
16:14:10 | FromGitter | <mratsim> the export marker looks fine to me, maybe the only issue is implementation in the parser |
16:14:11 | FromGitter | <rokups> Araq im curious - how would you do it today? |
16:14:34 | Araq | public by default, trailing underscore for private |
16:14:50 | Araq | but the underscore only at the declaration site, like so: |
16:14:57 | Araq | proc foo_(): string = "hi" |
16:15:07 | Araq | echo foo() # not: echo foo_() |
16:15:31 | FromGitter | <mratsim> python uses starting underscore |
16:16:00 | FromGitter | <mratsim> trailing is used by convention for proc that mutates their input |
16:16:10 | FromGitter | <mratsim> like reverse vs reverse_ |
16:16:18 | FromGitter | <mratsim> instead of reversed ;) |
16:16:31 | narimiran | well, in julia it is denoted by trailing ! |
16:16:34 | FromGitter | <rokups> yeah that does make sense. i prefer leading underscore but got used to trailing one by now. nim2.0 and underscore privates when :trollface: |
16:16:35 | Araq | Python uses sorted though iirc |
16:17:03 | FromGitter | <mratsim> maybe it’s just in numerical libraries then |
16:17:17 | FromGitter | <mratsim> I see that in Torch so it might even come from Lua |
16:18:21 | FromGitter | <bung87> good for non english programmers |
16:18:40 | narimiran | bw, in scikit-learn, trailing _ is used for variables, and it has yet another meaning ;) |
16:19:19 | FromGitter | <bung87> s |
16:19:19 | FromGitter | <bung87> v |
16:19:22 | FromGitter | <rokups> what meaning is that? |
16:21:48 | narimiran | i haven't used it for a long time, so maybe i don't remember exactly, but it has to do with pre- or post- training/fitting, or something like that |
16:22:00 | FromGitter | <alehander42> Araq that would be very confusing, because `_` would be basically an operator (with absolutely similar behavior like `*` but for "make-it-private" instead of public) |
16:22:21 | FromGitter | <alehander42> but people are used to `ident with *` meaning `*` is part of the name |
16:22:42 | Araq | I was asked how I would do it nowadays |
16:22:57 | FromGitter | <alehander42> yeah and I am saying that `_` seems worse to me :D |
16:22:58 | Araq | I am aware that you all like Nim and never what I do |
16:23:55 | FromGitter | <alehander42> you should learn something from Nim, Araq |
16:24:22 | narimiran | :D |
16:24:33 | FromGitter | <zacharycarter> I am fundamentally confused |
16:24:41 | FromGitter | <zacharycarter> I've established that @alehander42 is TheLemonMan |
16:24:45 | FromGitter | <zacharycarter> but who is TheLemonBoy ?> |
16:24:49 | FromGitter | <zacharycarter> and why are there so many lemons? |
16:25:02 | FromGitter | <rokups> Araq its your job as a leader to be not liked ;) |
16:25:04 | TheLemonMan | the fuq? |
16:25:08 | federico3 | alehander12 |
16:25:11 | FromGitter | <kaushalmodi> lol |
16:25:14 | FromGitter | <zacharycarter> oh wait |
16:25:18 | FromGitter | <zacharycarter> oh god |
16:25:19 | FromGitter | <zacharycarter> this is so confusing |
16:25:20 | narimiran | TheLemonMan: oh shut up, alehander! |
16:25:28 | FromGitter | <alehander42> well I was trying to hide it |
16:25:30 | FromGitter | <zacharycarter> lolol |
16:25:39 | FromGitter | <alehander42> but i think the hair gave it out |
16:26:07 | FromGitter | <zacharycarter> I feel like I'm following like three different people in PRs or maybe just one and I never know |
16:27:38 | TheLemonMan | we are two separate entities afaik |
16:27:47 | narimiran | btw, did you know that Araq and dom96 are the same person, too? |
16:28:09 | FromGitter | <bung87> hehe |
16:28:10 | FromGitter | <zacharycarter> well |
16:28:11 | narimiran | Araq was on vacation, and there was no sign of dom96, too. coincidence? i don't think so! |
16:28:17 | FromGitter | <zacharycarter> yeah - that conspiracy theory got leaked the other day |
16:28:21 | FromGitter | <zacharycarter> might still be true |
16:28:25 | FromGitter | <zacharycarter> jury is still out |
16:28:29 | FromGitter | <alehander42> that absolutely makes sense btw was just thinking about that |
16:28:52 | FromGitter | <zacharycarter> I think we need to establish some sort of investigative body to get to the bottom of all these mysteries within the Nim community |
16:28:59 | FromGitter | <alehander42> overally i am not sure if any of you people exist |
16:29:08 | FromGitter | <zacharycarter> and I'm about to make like four more accounts |
16:29:12 | FromGitter | <zacharycarter> and start fixing things and asking questions in irc |
16:29:16 | FromGitter | <zacharycarter> just to compete |
16:30:20 | FromGitter | <alehander42> i've also suspected for a long time that @timotheecour is just a rogue ai |
16:30:36 | FromGitter | <zacharycarter> I buy it |
16:30:48 | FromGitter | <bung87> haha |
16:31:05 | FromGitter | <bung87> intersting |
16:31:33 | FromGitter | <kaushalmodi> btw Araq, any help on what this failure means? https://travis-ci.org/nim-lang/Nim/jobs/439199217 |
16:31:44 | FromGitter | <kaushalmodi> it failed in 37 mins but I don't see an error message |
16:32:17 | FromGitter | <kaushalmodi> and the parallel travis job in the same PR passed |
16:32:45 | TheLemonMan | that's the usual fragment_alloc failure on osx, it's good to go |
16:32:47 | federico3 | search for Gotten on the raw log |
16:33:10 | FromGitter | <alehander42> look at all those people trying to derail the conversation to actual compiler development, typical russian bots |
16:33:46 | FromGitter | <kaushalmodi> federico3: Thanks, would have never occurred to search for that (searched for error, failure, fail, etc. but didn't help_ |
16:35:03 | TheLemonMan | you could also search for `FAIL:` |
16:35:03 | FromGitter | <kaushalmodi> TheLemonMan: hmm so the .2 builds are on osx. TIL |
16:35:51 | FromGitter | <kaushalmodi> TheLemonMan: turns out I hadn't searched for "fail" :) |
16:36:13 | TheLemonMan | all the builds are run on linux and osx (and windows by appvoyeur) |
16:36:41 | * | darithorn joined #nim |
16:36:48 | FromGitter | <mratsim> I gave up on OSX builds, Travis is too random ... |
16:37:02 | FromGitter | <kaushalmodi> I knew that that linus/osx tests were happening, but never took time to figure out the .1 vs .2 Travis jobs |
16:37:13 | FromGitter | <kaushalmodi> .. and that appveyor is just for windows |
16:37:18 | FromGitter | <mratsim> also Ubuntu 14.04 has been end of lifed in July and it’s still the default in Travis |
16:39:05 | TheLemonMan | mratsim, now that I've enabled the caching of the .choosenim folder it works pretty well |
16:39:33 | TheLemonMan | the biggest problems I had (beside a bug in criterion.nim) were the random failures during the toolchain bootstrap |
16:53:15 | narimiran | `expr` is now `untyped`? |
16:53:39 | TheLemonMan | yes |
16:56:02 | FromGitter | <alehander42> wasn't `expr` removed years ago |
16:56:35 | narimiran | @alehander42 i'm going through (very) old issues to see what has already been fixed and what could i tackle |
16:56:54 | * | stefanos82 quit (Quit: Quitting for now...) |
16:57:37 | FromGitter | <alehander42> aahh nice |
17:02:06 | * | arecaceae quit (Remote host closed the connection) |
17:02:28 | * | arecaceae joined #nim |
17:03:55 | FromGitter | <kaushalmodi> I picked up an arbitrary old issue and the issue is still valid. Any term rewriting macro experts here? (I have no clue what those are). But I reran a snippet from the manual and it's not outputting what it says in the manual: https://github.com/nim-lang/Nim/issues/2901 |
17:04:18 | FromGitter | <manterolat> @Araq, should I throw an error if the output file is a directory, or should I just create the directory and leave it at that? |
17:05:04 | Araq | create the directory |
17:05:49 | Araq | this whole mkdir vs mkdir -r vs rmdir -rf is all a design bug because "That wouldn't be a syscall" |
17:06:48 | Araq | and every 'rm' operation that cannot be undone unless the HD was full and so stuff needed to be overwritten is also a design mistake |
17:07:14 | FromGitter | <kdheepak> The httpclient doesn't work in JS, any easy way to make such code portable? |
17:07:38 | leorize | uhmm... write a js backend for it? :P |
17:07:44 | leorize | then everyone profits |
17:07:46 | Araq | only at the app level, use a 'when defined(js): ... else: ...' |
17:08:03 | FromGitter | <manterolat> Alright, should I add it to the current PR, or make a new branch since the previous one has useless commits? |
17:08:18 | FromGitter | <kdheepak> Thanks the `when defined(js)` helps a little. |
17:08:40 | Araq | leorize, that typically is much more work than fixing it in the application layer |
17:08:46 | FromGitter | <kaushalmodi> @manterolat You can force push to the same PR branch |
17:08:55 | leorize | or you can just push it |
17:09:04 | leorize | and the merger will squash them for you |
17:09:15 | FromGitter | <manterolat> Ah, didn't know that, thanks! |
17:09:15 | Araq | yep. |
17:10:54 | Araq | kaushalmodi, https://github.com/nim-lang/obsolete |
17:11:28 | FromGitter | <kaushalmodi> Araq: I'd suggest renaming that repo |
17:11:31 | FromGitter | <kaushalmodi> to obsolete-packages |
17:11:41 | FromGitter | <kaushalmodi> "nim-lang/obsolete" doesn't look good |
17:11:50 | FromGitter | <kaushalmodi> obsolete what? |
17:11:53 | FromGitter | <kaushalmodi> language? |
17:11:57 | FromGitter | <kaushalmodi> packages? |
17:11:58 | Araq | hmm |
17:12:15 | Araq | got a shorter alternative? |
17:12:37 | FromGitter | <kaushalmodi> ex-packages? |
17:12:44 | leorize | "graveyard"? |
17:12:46 | TheLemonMan | obslt-pkgs |
17:12:56 | FromGitter | <kaushalmodi> yeah graveyard +1 |
17:13:03 | Araq | ok |
17:13:16 | narimiran | ...until SJWs see that you're using that :P |
17:13:56 | Araq | huh? how could that be offensive? |
17:13:57 | FromGitter | <kaushalmodi> SJWs? |
17:14:08 | Araq | nah, spare me, I don't even want to know |
17:14:14 | narimiran | Araq: everything is offensive if you try enough :P |
17:14:20 | FromGitter | <zacharycarter> yeah - someone will find a way |
17:14:29 | FromGitter | <zacharycarter> just get fancy with it and use some synonym that no one knows |
17:14:33 | * | shadowbane quit (Quit: Konversation terminated!) |
17:14:40 | FromGitter | <zacharycarter> like |
17:14:40 | FromGitter | <zacharycarter> columbarium |
17:15:01 | narimiran | @zacharycarter i feel offended by that name!!! :P |
17:15:11 | Araq | ok, so let's use nim-lang/concentration-camp |
17:15:14 | FromGitter | <zacharycarter> I was just waiting for everyone to be like - hah stupid |
17:15:18 | FromGitter | <zacharycarter> I know what that means |
17:15:25 | narimiran | Araq: hahahah |
17:15:42 | narimiran | nim would raise to the top spot at HN/reddit, that's for sure |
17:15:58 | * | shadowbane joined #nim |
17:16:19 | Araq | https://github.com/nim-lang/graveyard |
17:17:00 | * | Vladar joined #nim |
17:17:52 | Araq | damn, "coffins" would have been shorter |
17:18:14 | TheLemonMan | well, it's a single coffin for more corpses |
17:18:25 | FromGitter | <kaushalmodi> lol |
17:18:37 | FromGitter | <kaushalmodi> why make it easy to access obsolete packages? |
17:18:50 | TheLemonMan | nostalgia factor |
17:19:02 | FromGitter | <kaushalmodi> I'd make the URL the longest possible.. use that long URL if you are so desperate to use an obsolete pkg :P |
17:19:44 | narimiran | well, you would still use `import longDeadFoo`, not the github link |
17:20:01 | FromGitter | <kaushalmodi> yeah, that too |
17:20:09 | FromGitter | <kaushalmodi> the url is relevant only for the nimble PR |
17:21:09 | FromGitter | <kaushalmodi> actually the url will be used for docs |
17:21:21 | FromGitter | <kaushalmodi> (do we want autogenerated docs for obsolete pkgs?) |
17:22:10 | FromGitter | <kaushalmodi> if so, we can have https://nim-lang.github.io/graveyard/xmldom |
17:23:06 | FromGitter | <alehander42> `/past` would be shortest |
17:23:10 | TheLemonMan | xmldom ... xml _dom_ ... written by dom96 ... coincidence? |
17:23:32 | Araq | yes |
17:24:04 | FromGitter | <kaushalmodi> "past" doesn't give the same meaning as "graveyard" |
17:24:12 | FromGitter | <kaushalmodi> I hope we are sticking with the latter |
17:24:16 | FromGitter | <kaushalmodi> /bikeshedding |
17:27:36 | FromGitter | <alehander42> now I see why unix is full of `kill / zombie / daemon` |
17:28:37 | Araq | yeah but these are ok with me, these have grown vowels |
17:37:36 | TheLemonMan | manterolat, that should also apply to the C backend |
17:37:44 | TheLemonMan | and maybe to the various doc ones too |
17:43:42 | * | kapil____ joined #nim |
17:45:09 | * | hzx quit (Quit: Going offline, see ya! (www.adiirc.com)) |
17:56:13 | * | anamok joined #nim |
17:57:20 | TheLemonMan | Araq, you can pull the trigger on #8723 too if you want |
18:05:18 | FromGitter | <dm1try> Araq, could explain why did you merge #9183? it looks like the most terrible solution from solutions provided earlier |
18:06:12 | FromGitter | <dm1try> the initial problem is not solved(nasty workaround is provided), in addition, the context about this workaround is hidden now |
18:08:54 | * | wildlander joined #nim |
18:09:25 | Araq | dm1try, it looked good to me (TM) |
18:09:39 | Araq | and all you said was "thumbs down" to it |
18:10:04 | FromGitter | <dm1try> yep, I commented in the related issue |
18:10:14 | Araq | plus I share the concerns about "callSoon" |
18:10:35 | Araq | (what does it mean, "soon"? Why can't it be called immediately instead?) |
18:12:04 | * | rokups quit (Quit: Connection closed for inactivity) |
18:16:16 | Araq | link please |
18:16:28 | FromGitter | <dm1try> I'm not sure about the concerns you are talking^ |
18:16:33 | FromGitter | <dm1try> see https://github.com/nim-lang/Nim/pull/9159#issuecomment-426871190, this comment shows that dom96 did not get that he was fixing |
18:17:03 | FromGitter | <dm1try> https://github.com/nim-lang/Nim/pull/9159#issuecomment-426885001 |
18:18:12 | Araq | gah, I misread your answer |
18:18:38 | FromGitter | <dm1try> besides that any provided solution looks like a workaround for current futurestream implementation, I mostly worried about collabaration on the code |
18:18:58 | FromGitter | <dm1try> as the solution from dom96 totally hides the context/problem |
18:19:16 | FromGitter | <dm1try> I don't think this great for the collobaration, IMHO |
18:19:43 | Araq | collaboration? |
18:20:08 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
18:20:14 | FromGitter | <dm1try> If someone will improve/fix the code in the future |
18:20:30 | FromGitter | <dm1try> it might be easier to do with a proper context |
18:21:07 | FromGitter | <dm1try> anyway, I got it, it looks good to you |
18:21:19 | Araq | hey hey |
18:21:37 | Araq | I'm only a human being |
18:21:58 | * | Widdershins quit (Quit: WeeChat 2.1) |
18:22:34 | * | Widdershins joined #nim |
18:23:10 | Araq | and I still don't understand what you dislike about dom's fix |
18:28:49 | FromGitter | <dm1try> the problem did not solved, call to the `complete` still calls the `read` callback. the provided workaround allows to call `read` future many times(this behaviour even contradict this a comment in next line https://github.com/nim-lang/Nim/pull/9183/files#diff-e13cc97dd4bb5249bb6d7aef936700d2R87) |
18:30:07 | Araq | ok, can you please create a PR for it? It's fine to also revert dom's changes if that's what it takes |
18:30:14 | FromGitter | <dm1try> so yes, the reader will actually read the missed data in such way |
18:30:37 | FromGitter | <dm1try> but this behaviour even not documented in any way |
18:35:08 | Araq | ok |
18:38:40 | FromGitter | <kaushalmodi> Araq: https://github.com/nim-lang/Nim/pull/9261 is passing tests on linux and windows (fails on osx because of fragments_nim); ready to merge :) |
18:40:12 | * | darithorn quit () |
18:40:58 | Araq | could also have fixed the trailing commas, they are ugly |
18:41:38 | FromGitter | <kaushalmodi> those were just tests |
18:43:14 | * | amk joined #nim |
18:43:29 | * | BitPuffin joined #nim |
18:43:54 | anamok | hi |
18:44:15 | FromGitter | <iffy> I have some `{.compileTime.}` procs that produce NimNodes. How do I insert those NimNodes into the AST instead of returning the NimNode as a variable? I'm guessing the only way is through a template or macro, correct? |
18:44:39 | Araq | nah |
18:45:06 | anamok | If I want to create a new operator, e.g. "func `+`*(s, t: string): string = s & t", then should it be a func or a template? I never know which one to choose. Could someone explain that to me? |
18:46:10 | Araq | always choose in this order: func, proc, template, macro |
18:46:32 | FromGitter | <iffy> Araq: what's my other option? |
18:46:59 | FromGitter | <iffy> Suppose `var p:NimNode = someCompileTimeProc()` |
18:47:01 | Araq | a NimNode is a ref, you can update it by add'ing a son |
18:47:19 | * | zachk joined #nim |
18:47:23 | FromGitter | <iffy> how would I insert p into the next line, for instance |
18:47:39 | Araq | "next line"? |
18:48:17 | FromGitter | <iffy> Right, so I have a proc that returns a NimNode. Right now, I'm assigning it to p. But rather than do that I'd like to insert the NimNode at the place where the proc was called |
18:48:52 | FromGitter | <iffy> feels like a macro to me... so now I'm wondering what the difference is between a macro and what I'm asking |
18:50:09 | Araq | please describe what you're trying to do at a high level |
18:50:16 | Araq | *on |
18:50:47 | FromGitter | <iffy> Araq: https://forum.nim-lang.org/t/4292 |
18:51:12 | FromGitter | <iffy> You can ignore the title; the first 3 paragraphs describe what I'm trying to do |
18:52:25 | anamok | OK, but what's the difference between a func and a template? If it works with both (in several of my cases), then why is func better than a template? |
18:52:25 | FromGitter | <iffy> I'm now trying to achieve it using `{.compileTime.}` procs (mimicking what the macros library does) |
18:53:18 | FromGitter | <alehander42> @anamoc functions are simpler conceptually, easier to debug |
18:53:50 | FromGitter | <alehander42> sometimes template might make sense as an optimization, but in general you should start with proc |
18:53:57 | Araq | iffy, as a starting point for learning Nim's macros that's way too hard but e.g. the 'cligen' nimble package does just that iirc |
18:54:29 | FromGitter | <iffy> hehe, I'm getting the feeling it's way to hard |
18:54:34 | FromGitter | <iffy> k, I will check out that package |
18:54:47 | Araq | you're asking for a parser generator built via Nim's macro system |
18:55:04 | FromDiscord_ | <Shield> I use templates to force inlining |
18:55:07 | Araq | that's still missing, my currently best attempt is 'scanf' |
18:55:53 | Araq | and it's easier when you don't think about the "Parser" type/object but instead how to produce the parsing proc body |
19:00:00 | FromGitter | <iffy> Araq: I was trying to not build a parser for the body of mkParser, but rather use normal procs/funcs/template/macros in the body |
19:00:34 | FromGitter | <iffy> I'm probably being confusing |
19:01:34 | Araq | here is a good example of a macro for introduction |
19:01:41 | Araq | write a macro 'm' so that |
19:01:48 | Araq | m a, b, c: |
19:01:53 | Araq | someProc |
19:02:00 | Araq | gets transformed into |
19:02:09 | Araq | someProc(a); someProc(b); someProc(c) |
19:02:56 | anamok | I'm just curious: why is string concatenation done with `&` instead of `+`? |
19:03:29 | FromGitter | <alehander42> @iffy something you can do is to define setup code and tmp variable in mkParser and then generate invocations to those flag etc procs with tmpParserVar as argument |
19:04:13 | FromGitter | <iffy> Araq: I'd use a template for that: ⏎ ⏎ ```template m(a:untyped, b:untyped, c:untyped, p:untyped) = ⏎ p(a) ⏎ p(b) ⏎ p(c)``` [https://gitter.im/nim-lang/Nim?at=5bbcfbadbbdc0b250511b2dd] |
19:04:21 | FromGitter | <kaushalmodi> Araq: Should nre, parseutils2, etc. be also moved there? |
19:04:41 | FromGitter | <kaushalmodi> I know there were talks about deprecating those, but not sure on the latest development about those |
19:04:53 | FromGitter | <iffy> @alehander42 instead of generating invocations, I'm looking for a way to just use the invocations within the body of mkParser |
19:05:06 | FromGitter | <iffy> trying to leverage Nim instead of invent my own DSL |
19:05:19 | * | nsf joined #nim |
19:05:20 | FromGitter | <kaushalmodi> s/moved there/moved to the graveyard |
19:05:56 | FromGitter | <alehander42> @iffy you can do this, i am saying to just convert |
19:06:31 | FromGitter | <alehander42> ```flag(..) ⏎ otherstuff(..) ⏎ # to ⏎ flag(tmpParser, ..) ⏎ otherStuff(tmpParser, ..)``` [https://gitter.im/nim-lang/Nim?at=5bbcfc3738449236610ed94f] |
19:06:35 | FromGitter | <manterolat> TheLemonMan: Alright, working on C (is cgen.nim separate from the c++ one?) |
19:08:26 | FromGitter | <iffy> @alehander42 my goal is to define an object type that represents what can be returned from parsing a string. I'm not sure how converting the calls to runtime calls will help me do that. Don't I have to have types defined at/during compile time? |
19:09:39 | Araq | iffy, you cannot do that because 'm' takes a variable number of arguments :P |
19:09:51 | FromGitter | <alehander42> well I thought flag should be a runtime proc |
19:10:20 | Araq | kaushalmodi: yeah but 'nre' probably deserves its own Nimble package and not in 'graveyard' |
19:10:29 | FromGitter | <iffy> that's what I'm trying to say, I want flag to be a compile-time proc (or something) that helps me generate a type definition |
19:10:31 | FromGitter | <alehander42> i'd just use a table of string => string log name, variant with possible values(argInt, argText etc) instead of special type |
19:10:46 | FromGitter | <iffy> Araq: okay, I'll try again :) |
19:11:15 | Araq | anamok, so that @[1, 3] + @[1, 2] can be @[2, 5] |
19:11:33 | Araq | and @[1, 3] & @[1, 2] can be @[1, 3, 1, 2] |
19:11:57 | Araq | which is the only thing that makes sense, I don't understand how other languages *can* use '+' for this |
19:12:38 | Araq | it's like you've only seen dogs in your life and then you see an elephant for the first time and also call it a "dog" |
19:13:35 | anamok | I see, thanks for the explanation |
19:14:22 | * | crem quit (Quit: WeeChat 1.9) |
19:22:02 | * | crem joined #nim |
19:22:46 | anamok | `echo @[1, 2] + @[3, 4]` produces a type mismatch error |
19:23:16 | FromGitter | <iffy> Araq: Not pretty, but I think it fits the bill: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bbd0024c7bf7c3662e1b5ea] |
19:24:14 | narimiran | Araq: should the complete /web folder be deleted? both website.ini and nimblepkglist.nim? |
19:25:40 | * | crem quit (Client Quit) |
19:25:47 | FromGitter | <kaushalmodi> anamok: I would have to guess that Araq was trying to show the difference of what a "+" meant as an idea vs "&" |
19:26:03 | FromGitter | <kaushalmodi> How I see is that "+" adds things |
19:26:12 | FromGitter | <kaushalmodi> concatenation is a bit different than addition |
19:26:24 | anamok | oh, ok |
19:26:32 | FromGitter | <kaushalmodi> So instead of overloading the "+" for string concat, a new op "&" is used |
19:27:04 | FromGitter | <iffy> @alehander42 @Araq I guess the answer I'm hearing is, "no, there's not a way to take the NimNode result of a `{.compileTime.}` proc and insert it into the AST at a particular point." Or, in relation to my forum post: "There's no way for the desired transformation to occur if `mkParser` is a compileTime proc" |
19:27:40 | FromGitter | <iffy> `mkParser` would have to be either a template or macro, correct? |
19:27:50 | FromGitter | <kaushalmodi> anamok: You might find these useful as you are learning Nim: https://narimiran.github.io/nim-basics/, my notes: https://scripter.co/notes/nim/ (still getting updated) |
19:28:13 | FromGitter | <alehander42> @iffy you can call compile time proc-s from other macros and do whatever you want with their return values |
19:28:22 | FromGitter | <alehander42> that's how most bigger macros work |
19:28:37 | FromGitter | <iffy> okay, so it has to start with a macro, though? |
19:28:41 | FromGitter | <iffy> (or template) |
19:28:59 | FromGitter | <manterolat> TheLemonMan, apparently docgen already creates dirs when needed. Just added it to cgen |
19:29:10 | FromGitter | <alehander42> well mkParser has to be a macro, because you invoke it directly in the source code |
19:29:19 | FromGitter | <iffy> okay |
19:29:26 | narimiran | one more closed/merged PR and we'll drop below 100 open PRs! wow, impressive!! |
19:29:53 | FromGitter | <iffy> and that helps make it clearer in my head what's going on; thank you! |
19:29:55 | * | crem joined #nim |
19:29:58 | anamok | kaushalmodi, I started with Nim Baics, I loved it. Scripter's Notes is also on my "to read" list. Thanks. |
19:30:15 | FromGitter | <kaushalmodi> I wouldn't put it on "to read" :P |
19:30:22 | FromGitter | <kaushalmodi> just search it for what you might need |
19:30:28 | narimiran | anamok: thanks for the feedback :) |
19:30:46 | anamok | narimiran: we are waiting for Part 2 ;) |
19:31:10 | narimiran | heh, for part 2 i need to get better first ;) |
19:31:39 | FromGitter | <iffy> As a feature request, it would be really neat if I could insert the result of a compileTime proc into the AST at the point it was called :) |
19:32:22 | FromGitter | <iffy> The difference from macros being: the body of the proc is executed normally as written |
19:32:36 | Araq | iffy, now I understand your question better, yes |
19:32:39 | FromGitter | <alehander42> that wouldn't really make sense for untyped macros: when you invoke a macro, the whole point is that it has full control on what to do with the code block you passed |
19:32:42 | FromGitter | <iffy> But there are probably reasons not to do that that I'm not aware of |
19:32:49 | Araq | you "start" with a template or a macro and these call .compileTime proc helpers |
19:33:00 | * | darithorn joined #nim |
19:33:24 | FromGitter | <alehander42> @iffy but you can easily just include the body in your generated final NimNode |
19:33:40 | FromGitter | <iffy> well, I want the body to be filled with compileTime procs, too |
19:34:35 | FromGitter | <alehander42> ah, so e.g. you want |
19:34:36 | FromGitter | <iffy> something liked `proc mkParser(name:string, p:proc()):NimNode = p()` |
19:34:49 | FromGitter | <iffy> (but it does stuff before and after `p()` |
19:35:55 | FromGitter | <alehander42> is there a reason you insist mkParser to be a compile time proc? |
19:36:33 | FromGitter | <iffy> so I don't have to interpret `flag` but can just let it be called like a normal proc |
19:36:45 | FromGitter | <alehander42> what i got til now is that you'd like ⏎ ⏎ ```mkParser(..): ⏎ flag(..) ⏎ flag(....)``` ⏎ ⏎ to call the macro mkParser, generate some code and then add to that code the NimNode result from each flag(..) ? [https://gitter.im/nim-lang/Nim?at=5bbd034df659e67772893f47] |
19:37:56 | FromGitter | <iffy> yes, I think you're understanding me |
19:38:27 | FromGitter | <alehander42> well, this just requires |
19:38:31 | FromGitter | <alehander42> flag to be a macro too |
19:38:35 | FromGitter | <iffy> I want each flag to influence what mkParser returns (it might do several things to the tree, but in my forum post I tried to limit it to generating an object type def and help text) |
19:38:37 | FromGitter | <alehander42> mkParser generates |
19:39:09 | FromGitter | <alehander42> ```setup code ⏎ flag(..) ⏎ flag(....)``` ⏎ ⏎ and then the flag macros are expanded one by one further [https://gitter.im/nim-lang/Nim?at=5bbd03dde65a634336ad7f8a] |
19:39:31 | FromGitter | <iffy> yes |
19:39:40 | FromGitter | <iffy> and they have access to some variables defined with the setup code |
19:39:50 | FromGitter | <iffy> (probably a fragile design) |
19:40:27 | FromGitter | <alehander42> that's why I suggested you to just rewrite them inside the macro to accept a parser variable |
19:41:23 | FromGitter | <iffy> would I get auto-completion in my editor with those transformations? |
19:41:27 | FromGitter | <alehander42> on the other hand, if you want each flag to influence a type which is generated in the setup code, I think you have to analyze them *while* you're in mkParser |
19:42:45 | FromGitter | <kaushalmodi> Araq: Should there be a small stdlib for XDG dirs? https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html |
19:42:56 | FromGitter | <alehander42> auto-completion for what? for flag or for the custom type? |
19:43:01 | Araq | iffy, there is some nimsuggest support for "inside macro" but it bitrot, sad. |
19:43:05 | FromGitter | <kaushalmodi> then nim core can use that, and so can 3rd party cli apps |
19:43:21 | FromGitter | <iffy> @alehander42 completion for `flag` and it's expected args |
19:43:26 | FromGitter | <iffy> its |
19:43:34 | Araq | in theory macros don't hurt nimsuggest much :-) |
19:44:46 | Araq | kaushalmodi, that's one of these things that make me want to vomit |
19:45:05 | FromGitter | <alehander42> well as I said, you can always define flag noop proc-s with the right signature if you want both autocompletion and max flexibility in the macro |
19:45:06 | FromGitter | <timotheecour> @araq could you please merge https://github.com/nim-lang/Nim/pull/9265 once green ? the regression broke a bunch of my code ; thanks! |
19:45:42 | Araq | instead of fixing their stupid directory hierarchy where everything is spread over every directory, they patch over it |
19:46:25 | * | PMunch joined #nim |
19:47:09 | FromGitter | <kaushalmodi> Well, I feel that the XDG structure puts things where a user expects |
19:48:34 | Araq | timotheecour: consider it done |
19:48:36 | FromGitter | <kaushalmodi> right now we have `getConfigDir`. In the xdg lib, we can instead have `getXdgConfig(app: string)` and make it general purpose |
19:49:10 | FromGitter | <iffy> @alehander42 k, so in your last paste (that starts with `setup code`) each of those flag calls will be expanded *after* `mkParser` has completely finished, right? |
19:49:14 | Araq | nothing in "XDG" is "general purpose", it's lipstick on a pig |
19:49:41 | FromGitter | <kaushalmodi> at have seen quite a many cli apps stick to that convention |
19:49:50 | FromGitter | <kaushalmodi> it makes it easy to arrange my config files |
19:58:15 | * | runvnc joined #nim |
20:00:46 | planetis[m] | @iffy check a post about macros, it might help https://github.com/nim-lang/website/pull/108 |
20:07:56 | * | Guest51934 left #nim (#nim) |
20:08:18 | * | Tortice joined #nim |
20:28:02 | * | runvnc quit (Quit: leaving) |
20:32:22 | * | Trustable quit (Remote host closed the connection) |
20:32:42 | * | runvnc joined #nim |
20:34:51 | * | narimiran quit (Ping timeout: 268 seconds) |
20:37:49 | * | PMunch quit (Remote host closed the connection) |
20:46:18 | FromGitter | <timotheecour> @araq ; existing guide mentions the exact opposite of what you said; see https://github.com/nim-lang/Nim/pull/9221#issuecomment-428336341 : see https://nim-lang.github.io/Nim/contributing.html /cc @Araq ⏎ ⏎ > The preferred documentation style is to begin with a capital letter |
20:46:53 | FromGitter | <timotheecour> I’m writing a PR to do some cleanups in that doc; what should the default be: capital or lowercase? |
20:48:10 | * | Vladar quit (Remote host closed the connection) |
20:48:28 | Araq | just. stop fixing the case. |
20:48:44 | * | shpx joined #nim |
20:49:00 | FromGitter | <timotheecour> well you wrote a comment about that here: https://github.com/nim-lang/Nim/pull/9221#issuecomment-428195658 |
20:49:25 | FromGitter | <timotheecour> which conflicts with guidelines we already have here https://nim-lang.github.io/Nim/contributing.html |
20:49:29 | Araq | the only reason I accepted it is that I want people to get the T-shirts |
20:51:02 | FromGitter | <timotheecour> hacktoberfest aside, we shouldn’t have conflicting guidelines (and I dont’ have PR that fix case btw); so either I remove this guideline from contributing.rst or I change uppercase to lowercase in that rst doc |
20:51:29 | Araq | if you want this settled, count it and see what dominates |
20:54:04 | FromGitter | <iffy> Araq and alehander42 thank you for being patient with my questions. I think I've finally figured out a workable solution: https://forum.nim-lang.org/t/4292#26711 |
21:02:16 | FromGitter | <kaushalmodi> The lowercase starting docstrings look weird to me. |
21:07:57 | * | elrood quit (Quit: Leaving) |
21:12:01 | shashlick | any feedback appreciated - https://github.com/nim-lang/nimble/issues/549 |
21:15:42 | * | zama quit (Ping timeout: 272 seconds) |
21:16:32 | * | zama joined #nim |
21:19:24 | FromGitter | <slomp> Hi there, ⏎ Quick question about push/pop pragmas: ⏎ Is there a way to push/pop a `passC` pragma? ⏎ The main use case I have in mind would be to use it around `compile` pragmas: ⏎ ... [https://gitter.im/nim-lang/Nim?at=5bbd1b5cf659e6777289f9b1] |
21:24:50 | * | nsf quit (Quit: WeeChat 2.2) |
21:30:16 | planetis[m] | how would you call a 'string' concept and its definition? |
21:30:25 | Araq | StringLike |
21:34:46 | FromGitter | <alehander42> @iffy this can be improved |
21:35:26 | FromGitter | <iffy> really? great! |
21:36:06 | * | PrimHelios quit (Read error: Connection reset by peer) |
21:36:10 | FromGitter | <alehander42> https://forum.nim-lang.org/t/4292#26711 |
21:38:32 | FromGitter | <iffy> @alehander42 where does that `block` code go? In the code calling `mkParser` or inside `mkParser`? |
21:38:43 | FromGitter | <alehander42> in the code generated by mkParser |
21:39:04 | FromGitter | <alehander42> i just did it to make sure tmpParser is not clashing with something |
21:39:42 | FromGitter | <iffy> k, I'll try doing it as you suggest and see how it goes; thank you! |
21:40:23 | FromGitter | <alehander42> typicall not needed, because macros are hygienic, but here flag is a different macro, so one needs to hardcode a name , e.g. somethingparser (afaik) |
21:42:26 | * | kapil____ quit (Quit: Connection closed for inactivity) |
21:48:07 | FromGitter | <manterolat> Araq: Just pushed to let the exceptions bubble up. I tested it and it shows an error when you try to create a path that already exists as a file |
21:49:51 | Araq | of course it does, contrary to popular belief exceptions cause "error message could be better" bugs |
21:50:37 | Araq | and cut down the boilerplate, it's a tradeoff and if you do the cost-benefit analysis they will win. |
21:50:55 | Araq | that would be my guess. |
21:53:14 | * | vlad1777d joined #nim |
21:53:48 | FromGitter | <manterolat> I see. I kept trying to get a similar result with `localError`, `globalError` and `internalError`, but completely forgot an exception would appear on the screen |
21:55:40 | * | vegax87 quit (Ping timeout: 250 seconds) |
22:05:39 | * | vegax87 joined #nim |
22:15:39 | * | krux02 quit (Remote host closed the connection) |
22:15:47 | * | krux02- quit (Remote host closed the connection) |
22:26:05 | * | dddddd quit (Read error: Connection reset by peer) |
22:28:19 | FromGitter | <malkomalko> Where is `func` defined? I ripgrep'd over the source and nothing jumped out |
22:30:16 | Araq | it's a keyword, nkFuncDef in the AST |
22:30:29 | Araq | new with 0.19, kind of |
22:30:41 | Araq | so update your source code highlighter |
22:30:44 | Araq | ;-) |
22:31:59 | FromDiscord_ | <exelotl> ahhh the desire for cyclic dependencies has really pierced a gaping hole in my engine plans |
22:33:15 | FromGitter | <malkomalko> thank you |
22:34:19 | FromGitter | <mratsim> func is just sugar for proc {.noSideEffect.} though it might get new stuff in the future regarding purity/memory safety or something |
22:35:51 | FromGitter | <malkomalko> Yup, I was just trying to poke around in the source. I'm watching an older video on oreilly with our very own Araq |
22:36:35 | FromGitter | <mratsim> If you want to own Araq I’m pretty sure there is a lifetime issue |
22:37:47 | FromGitter | <malkomalko> Yahtze! |
22:50:38 | FromGitter | <zacharycarter> can anyone suggest some good reading material on the whole push / deepCopy stuff regarding ownership semantics - I think I understand the basics of RAII now - but there is a lot in the blog post about destructors that I still don't quite understand |
22:51:31 | Araq | hmm well in a nutshell, you take the whole object graph and copy it over to the other thread's heap |
22:51:34 | FromGitter | <zacharycarter> I'm assuming it all ties together somehow - I get that RAII allows you to initialize and then free up resources once something goes out of scope - but I'm still not quite sure how it all plays into parallelism and dealing with Nim's memory model & default GC |
22:52:15 | FromGitter | <zacharycarter> okay - do you just do this on thread creation? and then keep it updated? |
22:52:37 | FromGitter | <zacharycarter> btw - these are going to be very dumb questions |
22:52:41 | FromGitter | <zacharycarter> haha - just forewarning you |
22:53:14 | Araq | I don't think you know what "dumb questions" are :P |
22:53:23 | FromGitter | <zacharycarter> :) that makes me feel better |
22:54:51 | * | BitPuffin quit (Remote host closed the connection) |
22:55:24 | FromGitter | <zacharycarter> is this what copying the object graph is basically? - https://www.justsoftwaresolutions.co.uk/threading/thread-safe-copy-constructors.html |
22:55:46 | FromGitter | <zacharycarter> I'm looking at the last section - where he's describes what he's doing as forwarding constructors |
22:56:22 | FromGitter | <zacharycarter> I'd essentially need to replicate this kind of thing? |
22:56:28 | * | shpx quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:56:53 | Araq | nah, I don't think so |
22:57:08 | FromGitter | <zacharycarter> ah okay |
22:57:20 | Araq | what destructors and moves and assignments give us are the building blocks for atomicPtr and uniquePtr |
22:57:48 | Araq | 'ref' most probably will stay with the current thread-local tracing sematics (allows cycles) |
22:58:23 | Araq | 'string' and 'seq' are getting a hidden "allocator" thing that can be set to "allocate from the shared heap" |
22:58:51 | * | anamok quit (Ping timeout: 252 seconds) |
22:58:57 | Araq | effectively turning Nim into a "shared heap" language |
22:59:02 | * | shpx joined #nim |
22:59:41 | Araq | that covers the memory management aspects, then you still need to cover the application/library level concurrency/parallelism |
23:00:14 | FromGitter | <zacharycarter> well - tbh - my lack of understanding in the former is greatly contributing to my frustration with the latter |
23:00:32 | Araq | and my favourite still is locking via Nim's lock levels and '.guard' annotations for this but many will prefer some Go-like channel thing |
23:00:43 | FromGitter | <zacharycarter> but I think your explanation above - and connecting the dots so to speak - is going to help me greatly |
23:01:08 | FromGitter | <zacharycarter> not having a computing background kills me in these regards |
23:01:21 | FromGitter | <zacharycarter> but when I can kind of see how keywords are related to one another |
23:01:34 | FromGitter | <zacharycarter> it helps me progress down a study path for gaining understanding |
23:01:38 | Araq | and here destructors shine yet again, the channels can be closed automatically when they go out of scope |
23:01:51 | FromGitter | <zacharycarter> when I just am jostling a bunch of terms around - I have no idea wtf I'm doing |
23:02:20 | * | SenasOzys joined #nim |
23:02:33 | FromGitter | <zacharycarter> yeah - destructors and RAII seem very powerful - I have written very small programs / games in C++ - but C++ is also why I failed out of high school comp sci |
23:02:57 | FromGitter | <zacharycarter> and then when I tried to double down - got a 2 on the university placement exam out of 5 - which garnered me zero credit :P |
23:03:23 | * | SenasOzys quit (Remote host closed the connection) |
23:03:25 | Araq | in the pre-destructor Nim these problems were essentially unsolvable IMO and that's why Nim pretty much still sucks at these things |
23:03:29 | FromGitter | <zacharycarter> some of this stuff is definitely starting to click for me though - so thank you for your continued explanations |
23:04:00 | FromGitter | <zacharycarter> well - it's very cool to see a way being figured out - even if I can't understand it through appreciation |
23:04:11 | FromGitter | <zacharycarter> I do get that these things are there with C++ and Rust and other languages |
23:04:19 | FromGitter | <zacharycarter> I also realize that like - Haskell for instance - has nothing comparable |
23:04:41 | FromGitter | <zacharycarter> and based on the article I read today - any language with a non-deterministic GC doesn't really have this either |
23:04:51 | FromGitter | <zacharycarter> and most of the programmers I work with - fail to free anything really |
23:05:00 | * | amk quit (Remote host closed the connection) |
23:05:03 | Araq | so yeah, it's not just the docs that suck here, without the destructors/sinks we were stuck in a local optimum |
23:05:21 | * | amk joined #nim |
23:05:39 | FromGitter | <zacharycarter> well - I will contribute as much as I can to the docs if I can wrangle these concepts |
23:06:06 | FromGitter | <zacharycarter> because I need to get a grip on them in order to do what I want to do with Nim |
23:06:24 | FromGitter | <zacharycarter> which is the only language I really feel like doing this in tbh |
23:06:34 | Araq | he he |
23:06:55 | Araq | https://github.com/nim-lang/Nim/issues/9263 I'm looking at this, exciting times, is my spec wrong or only the implementation... |
23:08:04 | * | SenasOzys joined #nim |
23:08:43 | * | anamok joined #nim |
23:09:39 | FromGitter | <zacharycarter> okay - I am starting to see how sinks play into things - it takes so long for it to click into my head that this what I read when I read the rust docs - or at least the concepts are analogous |
23:10:03 | FromGitter | <zacharycarter> and yes - this doesn't seem like it's fun to debug along with everything else that already is going on with the language |
23:10:15 | FromGitter | <zacharycarter> I imagine it's like maintaining two languages at once in a sense |
23:10:19 | Araq | no, it is fun |
23:10:39 | FromGitter | <zacharycarter> well - I just mean all the upkeep |
23:10:39 | Araq | :-) |
23:10:51 | FromGitter | <zacharycarter> I know the research and toying and playing is fun |
23:11:04 | FromDiscord_ | <treeform> Hmm can I put a some command in "config.nims" that works kind of like 'nimble develop' which forces a packadge to come from a directory. |
23:11:18 | FromDiscord_ | <treeform> I guess kind of like adding stuff to PYTHONPATH works in pythong? |
23:11:31 | FromGitter | <zacharycarter> it'd be great though - if you could be freed up to do most of that and then have other responsibilities lifted off of your plate - but I don't know how that balance works today anyway |
23:11:32 | Araq | treeform --path option |
23:11:53 | FromGitter | <zacharycarter> oh - I want to ask a kind of related question |
23:13:00 | FromGitter | <zacharycarter> https://github.com/zacharycarter/frag/blob/master/src/frag.nim - here I have some templates and macros to basically allow me to import modules at compile time that exist in a subdirectory |
23:13:48 | FromGitter | <zacharycarter> I found this project someone was working on called tart - and forked it and got it working with 0.18.1 - but the project has a lot of neat ideas I'd like to further explore / keep if possible |
23:14:00 | FromGitter | <zacharycarter> one is providing hooks that get implemented inside modules |
23:14:30 | FromGitter | <zacharycarter> but I'm finding that if I want to have a local example modules folder - I need to provide relative paths - which looks really ugly |
23:14:44 | FromGitter | <zacharycarter> like here - https://github.com/zacharycarter/frag/blob/master/modules/game.nim |
23:15:31 | FromGitter | <zacharycarter> the original author didn't seem to have this problem - https://github.com/sheosi/tart/blob/master/modules/testGame.nim |
23:15:41 | FromGitter | <zacharycarter> but I have no idea why his setup works and mine doesn't |
23:15:56 | FromGitter | <zacharycarter> I'm wondering if it's because he has his lib installed |
23:15:57 | * | wildlander quit (Quit: Konversation terminated!) |
23:16:05 | Araq | --path command line option |
23:16:28 | FromGitter | <zacharycarter> ah - okay - yeah I can make that work |
23:16:32 | FromGitter | <zacharycarter> thank you |
23:16:47 | FromDiscord_ | <treeform> Araq, does not appear that --path works the way I want. I added `--path:"/p/andrelytics/chrono/"` where chrono.nim lives, but its still says "Error: cannot open file: chrono" |
23:17:17 | Araq | treeform: The compiler tells you what config files it reads |
23:17:27 | * | amk quit (Quit: Leaving) |
23:19:05 | FromDiscord_ | <treeform> Araq, thanks it was the wrong file, I got it to work now! |
23:19:08 | FromDiscord_ | <treeform> you are the best |
23:19:51 | Araq | the compiler often gets blamed for its verbosity but it helps |
23:24:36 | * | SenasOzys quit (Read error: Connection reset by peer) |
23:24:48 | * | SenasOzys joined #nim |
23:27:39 | FromDiscord_ | <treeform> I been writing nim code 90% of the time for about 6 months now its great. Thank you! |
23:31:59 | * | shpx quit (Read error: Connection reset by peer) |
23:35:40 | Araq | ha, these are always the best comments, thanks :-) |
23:46:10 | FromDiscord_ | <treeform> Araq, I would like to fix this JS issue, but I am not sure how you want to handle the fix? https://github.com/nim-lang/Nim/issues/8367 |
23:50:28 | * | runvnc quit (Quit: Lost terminal) |
23:59:01 | * | anamok quit (Ping timeout: 246 seconds) |
23:59:06 | * | darithorn quit () |