| 00:00:14 | * | PMunch quit (Remote host closed the connection) |
| 00:18:18 | * | zachk quit (Quit: Leaving) |
| 00:24:20 | FromGitter | <zacharycarter> @Epictek I was using kakoune - but I think I'm switching to windows soon |
| 00:24:35 | FromGitter | <zacharycarter> not sure what editor I'm going to use when I make that switch |
| 00:24:42 | FromGitter | <zacharycarter> I haven't used windows in a while |
| 00:29:53 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
| 00:54:17 | FromGitter | <zacharycarter> @rayman22201 - https://twitter.com/Hahaitsfunny/status/1056337504016719872 |
| 01:00:25 | theelous3 | if I have a param xs: openArray[T] and I want to algorithm.reverse it in the proc, what do I need to do, shadow wise? |
| 01:00:55 | theelous3 | from what I'm putting together from the tut, I should have var xs = xs[] |
| 01:01:00 | theelous3 | but doesn't seem to be good |
| 01:03:29 | FromGitter | <Vindaar> not quite sure I'm following you. You want to define a var with the same name as the argument in the proc? But the `xs[]` syntax would be to deref a `ref` or a `ptr` |
| 01:03:54 | theelous3 | I'm terribly new so bear with me :P |
| 01:04:04 | theelous3 | I'm pretty much just writing a wrapper on reverse |
| 01:04:11 | FromGitter | <Vindaar> haha, no worries :) |
| 01:04:29 | theelous3_ | http://dpaste.com/0C8K7R4 |
| 01:05:05 | theelous3_ | I initially got a complaint that xs was immutable, as the tut says all args to params are |
| 01:05:40 | theelous3_ | so I was like 'oh hey, the tut says to shadow things we want mutable in the proc body, so I'll look at what they did there' |
| 01:06:00 | FromGitter | <Vindaar> so yes. In that example your argument is immutable, because it's not a `var` argument, like `xs: var openArray` |
| 01:06:22 | theelous3_ | well, in the tut they pass say, a sequence, but what they really want is the len so it ends up being like, var xs = xs.len |
| 01:06:27 | theelous3_ | which is clearer cut |
| 01:06:46 | theelous3_ | so I thought maybe I needed to point to a value rather than just point xs at xs, and deref was the way to go |
| 01:06:54 | theelous3_ | but this thinking seems to be wrong |
| 01:07:11 | FromGitter | <Vindaar> yes, you seem to be overthinking, hehe |
| 01:08:05 | theelous3 | :P |
| 01:08:23 | theelous3 | so what should I be doing? I'm just passing a seq literal, so I don't think a var arg is what I want? |
| 01:08:52 | FromGitter | <Vindaar> exactly, if passing a literal is to be allowed, you cannot have a `var` arg, because a literal is immutable |
| 01:09:01 | theelous3 | :D |
| 01:09:07 | theelous3 | ok, so far so good |
| 01:09:09 | FromGitter | <yyyc514> any ideas about what i’m seeing? |
| 01:09:21 | FromGitter | <Vindaar> do you just want to return a reversed version of the input? |
| 01:09:28 | theelous3 | yes |
| 01:10:23 | FromGitter | <Vindaar> ok, then first of all I assume you're aware that there is `reversed` in addition to `reverse` in `algorithm`, yes? That does what you want. But to implement it manually: |
| 01:10:38 | theelous3 | oh, I didn't see that |
| 01:10:43 | theelous3 | is reverse in place then? |
| 01:10:50 | theelous3 | which is why I was having issues with mutability |
| 01:10:51 | theelous3 | ? |
| 01:11:24 | FromGitter | <Vindaar> yes, reverse is in place and reversed returns a copy |
| 01:11:26 | theelous3 | oh, yep, looking at the description, that is exactly the problem |
| 01:11:48 | theelous3 | so I was doing two things wrong initally |
| 01:12:02 | theelous3 | 1. not returning anything and 2. trying to mutate an immutable |
| 01:12:57 | theelous3 | so this should work if I then return my shadowed xs, as a first fix |
| 01:13:02 | theelous3 | and as a second fix, use reversed |
| 01:13:12 | theelous3 | quick game of rocket league first :P |
| 01:13:23 | FromGitter | <Vindaar> http://ix.io/1qeZ/nim ⏎ sorry, had to get `ix` on this pc |
| 01:13:42 | FromGitter | <Vindaar> haha, have fun. I need to go to bed :) |
| 01:13:55 | theelous3 | thanks @vindarr :) |
| 01:14:13 | FromGitter | <Vindaar> @yyyc514 sorry, I have no clue :( |
| 01:20:19 | FromGitter | <yyyc514> grrr |
| 01:20:23 | FromGitter | <yyyc514> i think it’s nim’s renaming of things |
| 01:20:32 | FromGitter | <yyyc514> but it will do it to one func but then not the next |
| 01:34:51 | FromGitter | <citycide> @alehander42 `comprehensions` is looking really good, feels more at home in Nim than `sugar.lc` |
| 01:57:51 | theelous3 | ok, my solution for this isn't working. What does var xs = xs[] do, if anything? |
| 01:58:20 | theelous3 | where xs is a param, xs: openArray[T] |
| 01:59:01 | theelous3 | I thought that this would create xs as a mutable var, pointing to the underlying value of the original xs |
| 02:03:57 | theelous3_ | ok, that was a bit of an xy problem question, so ignore it |
| 02:06:01 | theelous3_ | my real question, is why the first proc works, but the second does not: http://dpaste.com/1ZJ8FMT |
| 02:06:28 | theelous3_ | openArray[T] is not a valid return type? |
| 02:13:58 | FromGitter | <zacharycarter> theelous3_: no - openArrays can only be passed used as argument types |
| 02:14:20 | FromGitter | <zacharycarter> https://nim-lang.org/docs/tut1.html#advanced-types-open-arrays |
| 02:31:14 | theelous3_ | @zacharycarter so if I have a proc that's taking an openArray, and returning whatever the argument was |
| 02:31:19 | theelous3_ | what's my return type/ |
| 02:31:19 | theelous3_ | ? |
| 02:31:29 | FromGitter | <zacharycarter> a sequence |
| 02:31:32 | FromGitter | <zacharycarter> or an array |
| 02:31:40 | FromGitter | <zacharycarter> probably a sequence |
| 02:32:04 | FromGitter | <zacharycarter> the point of open array is |
| 02:32:19 | FromGitter | <zacharycarter> you can pass either a sequence to it or an array - it doesn't matter |
| 02:32:43 | theelous3_ | what if I don't know if I'm passing it a sequence or an array? |
| 02:32:45 | FromGitter | <zacharycarter> an array has to have its size determined at compile time, a sequence doesn't have that restriction, but is heap allocated |
| 02:32:54 | FromGitter | <zacharycarter> well - then you probably would return a sequence |
| 02:33:07 | theelous3_ | ok, so if I wanted to be able to pass a seq or array |
| 02:33:07 | FromGitter | <zacharycarter> since you'd fail the qualification I just mentioned about arrays |
| 02:33:15 | theelous3_ | I'd have to make sure I always return a seq |
| 02:33:42 | theelous3_ | (and I couldn't make sure I'm always returning an array, because .len is unknown?) |
| 02:33:54 | FromGitter | <zacharycarter> well - you can't create an array at compile time |
| 02:33:58 | FromGitter | <zacharycarter> err excuse me |
| 02:34:01 | theelous3_ | runtime |
| 02:34:03 | theelous3_ | ? |
| 02:34:05 | FromGitter | <zacharycarter> at runtime - without knowing its size |
| 02:34:08 | FromGitter | <zacharycarter> right |
| 02:34:09 | theelous3_ | aye |
| 02:34:20 | FromGitter | <zacharycarter> so if your goal is to return another collection |
| 02:34:31 | FromGitter | <zacharycarter> sequence is probably your best bet |
| 02:34:39 | theelous3_ | alright :) |
| 02:34:48 | FromGitter | <zacharycarter> not exactly sure what you're trying to do - but bear in mind the restrictions on opena rrays |
| 02:34:51 | FromGitter | <zacharycarter> they can't be multi-dimensional |
| 02:34:52 | FromGitter | <zacharycarter> etc |
| 02:35:00 | theelous3_ | oh I'm just doing nonsense to get to know the lang |
| 02:35:10 | FromGitter | <zacharycarter> this is a great starter |
| 02:35:12 | theelous3_ | just started playing with it earlier so idk what I'm doing |
| 02:35:20 | FromGitter | <zacharycarter> https://narimiran.github.io/nim-basics/ |
| 02:35:24 | FromGitter | <zacharycarter> from one of our community members |
| 02:35:28 | FromGitter | <zacharycarter> welcome btw :) glad to have you |
| 02:35:42 | theelous3_ | yes :) the man himself linked it earlier |
| 02:35:48 | FromGitter | <zacharycarter> ah cool! |
| 02:35:50 | theelous3_ | nice bunch here |
| 02:35:52 | FromGitter | <zacharycarter> he's a good guy :) |
| 02:35:59 | theelous3_ | everyone seems to be |
| 02:36:03 | theelous3_ | must be hiding something eh? |
| 02:36:10 | FromGitter | <zacharycarter> haha - we do have our spats |
| 02:36:26 | FromGitter | <zacharycarter> and some of us suffer fools more greatly than others |
| 02:36:34 | theelous3_ | I'll test that |
| 02:36:37 | FromGitter | <zacharycarter> by that - I mean - some folks will be more curt or brunt with their responses |
| 02:36:37 | theelous3_ | and report finding |
| 02:36:41 | theelous3_ | findings* |
| 02:36:47 | FromGitter | <zacharycarter> but I guarantee you - the best thing about Nim is it's community |
| 02:37:22 | FromGitter | <zacharycarter> and its desire to see the language grow and thrive, and at the same time, be a place of learning that fosters friendship and new connections |
| 02:37:23 | theelous3_ | I've been on the other end of this for a few years now in python channels so I take no offence in getting a nice blunt "wtf are you even doing" |
| 02:37:26 | FromGitter | <zacharycarter> and I think we do that rather well :) |
| 02:37:43 | FromGitter | <zacharycarter> haha - well - if you get one of those, please don't take it too personally |
| 02:37:48 | theelous3_ | never |
| 02:37:56 | theelous3_ | is only silly compooper languages |
| 02:37:59 | theelous3_ | can't be upset |
| 02:38:01 | FromGitter | <zacharycarter> :) |
| 02:38:06 | FromGitter | <zacharycarter> good way to look at it |
| 02:38:09 | * | vlad1777d_ quit (Ping timeout: 252 seconds) |
| 02:38:21 | FromGitter | <zacharycarter> we don't have a CoC |
| 02:38:28 | FromGitter | <zacharycarter> I think the general philosophy is - don't be a dick :) |
| 02:38:28 | theelous3_ | my missus is a total neo-luddite |
| 02:38:43 | theelous3_ | seeing her absolutely not care at all about anything that happens on a computer |
| 02:38:54 | FromGitter | <zacharycarter> heh |
| 02:39:00 | FromGitter | <zacharycarter> sometimes I wish I was one |
| 02:39:06 | theelous3_ | is interesting, in that it's a fresh perspective to me |
| 02:39:22 | theelous3_ | heh, yeah. but you just end up with all of your complexity elsewhere |
| 02:39:34 | theelous3_ | so silly computer languages will do just fine |
| 02:39:42 | FromGitter | <zacharycarter> very true |
| 02:39:45 | theelous3_ | even better, you can turn them off! |
| 02:39:56 | theelous3_ | not like a cat lady |
| 02:39:59 | FromGitter | <zacharycarter> hahaha |
| 02:40:00 | theelous3_ | can't turn off cats |
| 02:40:04 | FromGitter | <zacharycarter> very good point |
| 02:40:09 | theelous3_ | (well you can but... laws) |
| 02:40:14 | FromGitter | <zacharycarter> lol |
| 02:40:30 | FromGitter | <zacharycarter> oh - btw - most of the Nim community, is Europe based |
| 02:40:38 | theelous3_ | oh yeah? that's interesting |
| 02:40:48 | theelous3_ | why is that do you think? |
| 02:40:56 | theelous3_ | I'm eu as well, Dublin |
| 02:41:00 | FromGitter | <zacharycarter> well Andreas aka araq invented the language, and he's based in Germany |
| 02:41:34 | FromGitter | <zacharycarter> Dominik is based in the UK atm I believe |
| 02:42:02 | FromGitter | <zacharycarter> and there are a lot of Nim users who live in Italy, Germany, Bulgaria, Spain, etc... |
| 02:42:02 | theelous3_ | ah cool |
| 02:42:17 | FromGitter | <zacharycarter> I'm in the US - and we're a rare breed |
| 02:42:19 | theelous3_ | nice that the core devs hang out in irc/gitter |
| 02:42:36 | FromGitter | <zacharycarter> oh yes - they're available daily for the most part to discuss and help out |
| 02:42:39 | theelous3_ | usually they hide away deep in mailing lists |
| 02:42:39 | FromGitter | <zacharycarter> which is amazing |
| 02:42:58 | FromGitter | <zacharycarter> it is very refreshing :) |
| 02:43:39 | FromGitter | <zacharycarter> and there are some very very smart people involved with Nim - I'm quite the dummy and I am constantly learning things from folks that work on the language and compiler, as well as those who just use the language for X Y or Z |
| 02:43:50 | FromGitter | <zacharycarter> it's a great time to be involved with Nim IMO |
| 02:44:17 | FromGitter | <zacharycarter> and I've felt that way for 2+ years now |
| 02:44:34 | theelous3_ | you contrib to the lang or? |
| 02:46:35 | theelous3_ | question about tooling actually |
| 02:47:01 | theelous3_ | I noticed that vscode doesn't do introspection for stuff in stdlib. is there something to enable that? |
| 02:47:10 | theelous3_ | i have the general nim extension |
| 02:48:07 | theelous3_ | like, sequtils and so on |
| 02:49:16 | * | revere quit (Ping timeout: 264 seconds) |
| 02:49:42 | FromGitter | <zacharycarter> nimsuggest I think? |
| 02:50:25 | * | revere joined #nim |
| 02:50:46 | FromGitter | <zacharycarter> you can probably see if it's running in your process manager - not sure what OS you're on |
| 02:50:56 | theelous3_ | linux |
| 02:51:02 | FromGitter | <zacharycarter> I don't contribute to tooling no - I've built quite a few things w/ nim though - https://github.com/zacharycarter/ |
| 02:51:33 | FromGitter | <zacharycarter> also built - https://play.nim-lang.org - but it needs major updating |
| 02:51:42 | FromGitter | <zacharycarter> speaking of which - need dom96 to get in touch with me somehow... |
| 02:52:00 | FromGitter | <zacharycarter> and PMunch if he still wants to take over the project -although I'd like to be a contributor in some capacity |
| 02:52:06 | FromGitter | <zacharycarter> not sure what he has in mind for the FE of things |
| 02:52:26 | FromGitter | <zacharycarter> theelous3_: I would think nimsuggest would provide code completion |
| 02:52:42 | FromGitter | <zacharycarter> as far as intellisense goes - I think that would be the VS Code plugin |
| 02:52:49 | FromGitter | <zacharycarter> although I know there are quirks / bugs with both |
| 02:52:52 | FromGitter | <zacharycarter> at least I think there are? |
| 02:53:08 | FromGitter | <zacharycarter> I haven't used VSCode in a minute - I've been using kak lately |
| 02:54:16 | theelous3_ | hm, don't see one in the marketplace by that name |
| 02:54:33 | theelous3_ | no biggie, something to look for later :) |
| 02:57:11 | FromGitter | <zacharycarter> oh haha, kak is kakoune |
| 02:57:15 | FromGitter | <zacharycarter> it's not VSCode related, sorry |
| 02:57:23 | FromGitter | <zacharycarter> and intellisense is just a general IDE feature |
| 02:57:31 | theelous3_ | yeah I had a google there |
| 02:57:37 | FromGitter | <zacharycarter> :) |
| 02:57:54 | theelous3_ | no I meant tbe nimsuggest :P wasn't in vscode extens |
| 02:57:55 | FromGitter | <zacharycarter> but the Nim language vs-code extension should provide that stuff |
| 02:57:58 | FromGitter | <zacharycarter> ahh gotcha |
| 02:58:03 | FromGitter | <zacharycarter> nimsuggest should come with Nim |
| 02:58:11 | FromGitter | <zacharycarter> not sure how you installed Nim though |
| 02:58:17 | theelous3_ | choosenim? |
| 02:58:21 | theelous3_ | something like that |
| 02:58:28 | FromGitter | <zacharycarter> okay then - check in ~/.nimble/bin |
| 02:58:32 | FromGitter | <zacharycarter> see if you have a nimsuggest binary |
| 02:58:52 | theelous3_ | hm yep, nimsuggest is there |
| 02:58:59 | theelous3_ | odd |
| 02:59:09 | FromGitter | <zacharycarter> the Nim VS Code extension should be starting it |
| 02:59:26 | FromGitter | <zacharycarter> whatever linux's process manager is - you should be able to see if it's running alongside vs code or not |
| 02:59:32 | FromGitter | <zacharycarter> if it's not - then somethings amuck |
| 02:59:40 | theelous3_ | yeah have a nimsuggest process |
| 02:59:46 | FromGitter | <zacharycarter> hrmmm |
| 02:59:57 | theelous3_ | I get suggestions for the builtins |
| 03:00:01 | FromGitter | <zacharycarter> right |
| 03:00:07 | theelous3_ | but not anything I've imported from stdlib |
| 03:00:11 | FromGitter | <zacharycarter> just not the stdlib - which is weird - I think those should be present too |
| 03:00:14 | theelous3_ | aye |
| 03:00:21 | FromGitter | <zacharycarter> yeah - this is out of my wheelhouse noww |
| 03:00:26 | theelous3_ | yeah it's all good |
| 03:00:36 | FromGitter | <zacharycarter> when I was learning Nim that stuff was crucial though - so I can relate |
| 03:00:46 | theelous3_ | kak looks nuts |
| 03:00:51 | theelous3_ | what drew you to it? |
| 03:00:52 | FromGitter | <zacharycarter> hopefully someone with more knowledge can help you out more |
| 03:01:15 | FromGitter | <zacharycarter> one of my buddies that works on Roguelike games and works on a lot of C code for amazon was telling me about it |
| 03:01:37 | FromGitter | <zacharycarter> and I had used Vim before and tmux a few times, so the concepts weren't that foreign to me |
| 03:02:02 | FromGitter | <zacharycarter> and the multi-selection feature seemed really cool - at that point I needed to learn a new modal editor anyway |
| 03:02:07 | FromGitter | <zacharycarter> it was vim or kak, so I went with kak |
| 03:02:14 | theelous3_ | fair nuff :) |
| 03:02:26 | FromGitter | <zacharycarter> but I'm probably moving to windows shortly - once I quit my job |
| 03:02:33 | FromGitter | <zacharycarter> and at that point I'm not sure what I'm going to use |
| 03:02:36 | FromGitter | <zacharycarter> maybe just visual studio c++ |
| 03:02:49 | theelous3_ | o boy |
| 03:03:02 | FromGitter | <zacharycarter> or whatever they call that compiler now days |
| 03:03:05 | FromGitter | <zacharycarter> err ide I mean |
| 03:03:11 | theelous3_ | for game dev tooling I take it? judging by your github |
| 03:03:17 | theelous3_ | the move to windys, that is |
| 03:03:30 | FromGitter | <zacharycarter> yeah - plus I don't have any need for expensive hardware anymore |
| 03:03:39 | FromGitter | <zacharycarter> I imagine I'll do a lot of Hyper-V to test on linux |
| 03:03:46 | FromGitter | <zacharycarter> I might just abandon support for OSX in my projects |
| 03:03:49 | FromGitter | <zacharycarter> because fuck apple - really |
| 03:03:54 | theelous3_ | +1 |
| 03:04:04 | FromGitter | <zacharycarter> I love their security practices - but everything else about the company I abhor |
| 03:04:10 | theelous3_ | not much of a market there for games anyway |
| 03:04:13 | FromGitter | <zacharycarter> and I'm not even so confident in my love with the former |
| 03:04:14 | FromGitter | <zacharycarter> truth |
| 03:04:24 | theelous3_ | supporting it is a black hole for gamedev |
| 03:04:29 | theelous3_ | unless you're at dota scale |
| 03:04:45 | theelous3_ | then some hats will make it worth |
| 03:04:45 | FromGitter | <zacharycarter> yeah - I've made it my primary target since I've worked with macs for work |
| 03:04:47 | FromGitter | <zacharycarter> and it's not a big deal |
| 03:05:04 | FromGitter | <zacharycarter> but I also haven't built anything with an editor yet - that's the next engine I plan on working on |
| 03:05:08 | * | banc quit (Quit: ZNC - http://znc.in) |
| 03:05:14 | FromGitter | <zacharycarter> PBR rendering pipeline and editor |
| 03:06:11 | FromGitter | <zacharycarter> and plus - I'm about to embark on the whole digital nomad lifestyle thing - so my plan is to go to a mini ITX and use that |
| 03:06:43 | FromGitter | <zacharycarter> ohhh man I can't wait to quit my job :P just need this stupid house to sell |
| 03:06:47 | theelous3_ | heh |
| 03:07:12 | theelous3_ | will a full system not be a pain? monitors etc? |
| 03:07:29 | theelous3_ | if you're moving a ot |
| 03:07:31 | theelous3_ | lot* |
| 03:08:03 | theelous3_ | I suppose you'd probably want to drag around a second one anyway even with a laptop |
| 03:08:14 | theelous3_ | life too good with multiple |
| 03:09:26 | FromGitter | <zacharycarter> yeah |
| 03:09:37 | FromGitter | <zacharycarter> I think a lot of things are going to have to be wall mounted |
| 03:09:41 | FromGitter | <zacharycarter> in whatever structure I end up with |
| 03:09:46 | FromGitter | <zacharycarter> debating the whole tiny home vs trailer thing |
| 03:09:57 | FromGitter | <zacharycarter> it will be weird / different for sure |
| 03:10:04 | FromGitter | <zacharycarter> but I'm looking forward to figuring it all out |
| 03:10:06 | theelous3_ | people might get pissed if you bolt monitors on to a bus shelter |
| 03:10:45 | FromGitter | <zacharycarter> lmao very true |
| 03:10:47 | theelous3_ | be one of those van guys |
| 03:10:54 | theelous3_ | those are very chic these days |
| 03:10:56 | FromGitter | <zacharycarter> haha - I'm trying to avoid vans |
| 03:11:04 | FromGitter | <zacharycarter> stickers too |
| 03:11:23 | FromGitter | <zacharycarter> man, it was a rough week - not very many good feelz :( |
| 03:11:27 | FromGitter | <zacharycarter> especially today |
| 03:11:48 | theelous3_ | well, sounds like you'll be away soon enough |
| 03:11:53 | theelous3_ | if it's something you can get away fro |
| 03:11:54 | theelous3_ | m |
| 03:12:23 | FromGitter | <zacharycarter> :/ yeah - at least I'll be further from DC than I am now (which is 45 mins west) - and away from some of the craziness |
| 03:12:38 | FromGitter | <zacharycarter> being able to just go wherever though, within reason, is the most exciting prospect |
| 03:12:56 | FromGitter | <zacharycarter> I imagine I'll take at least one week a month, at first anyway, and just disconnect completely |
| 03:13:10 | FromGitter | <zacharycarter> maybe start walking the Appalachian trail or something |
| 03:13:14 | theelous3_ | you do any soloable sporty kind of things? mtb? surf? |
| 03:13:23 | theelous3_ | walking :) that's a good one too |
| 03:13:26 | FromGitter | <zacharycarter> I snowboard |
| 03:13:29 | theelous3_ | ah cool |
| 03:13:39 | FromGitter | <zacharycarter> and skateboard a lot - I have one of those onewheel things |
| 03:13:47 | FromGitter | <zacharycarter> which is super fun - but I constantly hurt myself on it |
| 03:14:01 | theelous3_ | ^ this is the point of skateboarding |
| 03:14:06 | theelous3_ | the sucesses are accidental |
| 03:14:13 | theelous3_ | the failure is the norm |
| 03:14:21 | FromGitter | <zacharycarter> yes very true - although I hurt myself just riding it |
| 03:14:28 | FromGitter | <zacharycarter> not even trying to do tricks |
| 03:14:35 | theelous3_ | still worth it :DD |
| 03:14:38 | FromGitter | <zacharycarter> but in my defense, it does go almost 20 MPH |
| 03:14:55 | FromGitter | <zacharycarter> and it's pretty easy to just launch yourself of of if you're not careful |
| 03:15:19 | FromGitter | <zacharycarter> I have a lot more success on traditional skateboards - but future n stuff, ya know? |
| 03:15:35 | FromGitter | <zacharycarter> brb - need to run to the store real quick before it closes |
| 03:15:39 | theelous3_ | o/ |
| 03:15:46 | theelous3_ | use the future board |
| 03:16:01 | theelous3_ | kid you would have his mind blown |
| 03:16:48 | theelous3_ | these ligature enabled programming fonts are fun |
| 03:17:04 | theelous3_ | trying out fira code |
| 03:21:11 | * | banc joined #nim |
| 03:26:11 | * | RatRiot joined #nim |
| 03:31:44 | * | RatRiot quit (Quit: Leaving) |
| 03:45:28 | FromGitter | <zacharycarter> oh yeah they are |
| 03:45:35 | FromGitter | <zacharycarter> fira code is excellent |
| 04:32:03 | * | chemist69 quit (Ping timeout: 250 seconds) |
| 04:33:57 | * | chemist69 joined #nim |
| 04:34:12 | * | darithorn joined #nim |
| 04:45:53 | * | theelous3 quit (Ping timeout: 245 seconds) |
| 04:46:50 | * | kapil____ joined #nim |
| 05:13:43 | * | nsf joined #nim |
| 05:28:44 | * | darithorn quit () |
| 05:52:27 | * | Trustable joined #nim |
| 06:01:06 | * | theelous3_ quit (Ping timeout: 246 seconds) |
| 06:49:18 | * | hoijui joined #nim |
| 06:55:39 | * | gangstacat quit (Quit: Ĝis!) |
| 07:03:52 | * | mech422__ quit (Ping timeout: 272 seconds) |
| 07:13:42 | * | smt quit (Read error: Connection reset by peer) |
| 07:18:38 | * | narimiran joined #nim |
| 07:22:57 | * | nsf quit (Quit: WeeChat 2.2) |
| 07:46:09 | * | hoijui quit (Ping timeout: 252 seconds) |
| 07:55:41 | * | Sembei joined #nim |
| 07:56:03 | * | Pisuke quit (Ping timeout: 252 seconds) |
| 08:01:10 | * | wildlander joined #nim |
| 08:07:22 | * | craigger_ quit (Read error: Connection reset by peer) |
| 08:07:33 | * | craigger joined #nim |
| 08:10:15 | * | Trustable quit (Remote host closed the connection) |
| 08:19:37 | * | stefanos82 joined #nim |
| 08:51:09 | * | hoijui joined #nim |
| 08:51:12 | * | hoijui quit (Remote host closed the connection) |
| 08:55:58 | * | kapil____ quit (Quit: Connection closed for inactivity) |
| 09:00:32 | FromGitter | <tim-st> How does this work? https://nim-lang.org/docs/macros.html#astGenRepr%2CNimNode |
| 09:04:12 | FromGitter | <tim-st> I got it `dumpAstGen` was the correct one, the docs are not specific here (the exampe should be part of `dumpAstGen`) |
| 09:47:57 | * | chemist69 quit (Ping timeout: 250 seconds) |
| 09:49:09 | * | chemist69 joined #nim |
| 10:11:41 | FromGitter | <dom96> theelous3_: oooh. Another device from Dublin huh? I used to live in Northern Ireland but I'm now in London. Federico3 lives in Dublin though :) |
| 10:12:02 | FromGitter | <dom96> Device lol. Stupid auto complete. I meant "dev" |
| 10:15:58 | FromGitter | <alehander42> I thought device is some weird irish slang |
| 10:16:16 | FromGitter | <tim-st> Is it possible to build the NimNode tree/stmtList at runtime only as a format without using the nodes at runtime? |
| 10:16:22 | FromGitter | <alehander42> but I thought bloke == block for some time :D |
| 10:17:49 | * | krux02 joined #nim |
| 10:18:33 | FromGitter | <tim-st> this fails `var stmtList = newStmtList()` but I dont know why when I just wan to echo it at runtime |
| 10:19:24 | FromGitter | <alehander42> what are you trying to do |
| 10:19:37 | FromGitter | <alehander42> huuh the go2nim tool? |
| 10:19:55 | FromGitter | <tim-st> yes, first steps only :) |
| 10:19:59 | FromGitter | <alehander42> ok great! |
| 10:20:02 | * | Vladar joined #nim |
| 10:20:03 | FromGitter | <tim-st> the data is runtime dependent |
| 10:20:14 | FromGitter | <alehander42> so, I guess you're trying to use the macro api |
| 10:20:16 | FromGitter | <alehander42> for generating code? |
| 10:20:18 | FromGitter | <tim-st> yes |
| 10:20:22 | FromGitter | <alehander42> that's what I tried first in py2nim |
| 10:20:27 | FromGitter | <alehander42> but it's not the right approach |
| 10:20:30 | FromGitter | <tim-st> why? |
| 10:20:32 | FromGitter | <alehander42> instead, you should use |
| 10:20:34 | FromGitter | <alehander42> renderer.nim |
| 10:20:36 | FromGitter | <alehander42> from the compiler |
| 10:20:42 | FromGitter | <alehander42> well, because it's not possible on runtime |
| 10:21:17 | FromGitter | <tim-st> but it could be possible, when the NimNode are not used and compiled in a second pass |
| 10:22:03 | FromGitter | <tim-st> like building the Nodes at runtime dump them to a file; compile this file using `nim c dumpFile.nim` the second one is at compile time then |
| 10:22:40 | FromGitter | <alehander42> you can take a look at https://github.com/metacraft-labs/py2nim/blob/master/generator.nim |
| 10:22:47 | FromGitter | <alehander42> yes, but this is a complicated approach |
| 10:22:57 | FromGitter | <tim-st> ok, thanks! |
| 10:23:14 | FromGitter | <alehander42> PNode-s is afaik what the compiler *actually* uses |
| 10:23:17 | FromGitter | <alehander42> for the ast |
| 10:23:36 | FromGitter | <tim-st> did you use Pythons ast and translated it? |
| 10:23:38 | FromGitter | <alehander42> and renderer.nim should be well suited for printing it (it's very close to NimNode as an API) |
| 10:23:50 | FromGitter | <alehander42> well, kinda |
| 10:24:09 | FromGitter | <tim-st> can this translate all pure python code? |
| 10:24:15 | FromGitter | <alehander42> basically zah & I wrote a python lib which collects type info and annotates the python AST |
| 10:24:25 | FromGitter | <alehander42> and then serializes it to json |
| 10:24:32 | FromGitter | <tim-st> I tried a once but compile error at nim side |
| 10:24:36 | FromGitter | <tim-st> it |
| 10:24:39 | FromGitter | <alehander42> and then we do load this ast and gradually convert it |
| 10:24:44 | FromGitter | <alehander42> no, it doesn't |
| 10:24:58 | FromGitter | <alehander42> it wouldn't be realistically possible |
| 10:25:04 | FromGitter | <tim-st> why? |
| 10:25:16 | FromGitter | <alehander42> because there is a lot of dynamic stuff that you can't express well |
| 10:25:20 | FromGitter | <alehander42> and more importantly |
| 10:25:28 | FromGitter | <alehander42> you don't want to as the code would be very un-nim-ish |
| 10:25:39 | FromGitter | <tim-st> ok, so go could work better? |
| 10:25:55 | FromGitter | <alehander42> yes, I think go2nim could be much closer to auto-translation |
| 10:26:01 | FromGitter | <alehander42> so the other problem was |
| 10:26:10 | FromGitter | <alehander42> renderer.nim is still not great |
| 10:26:22 | FromGitter | <alehander42> as it sometimes renders nodes not correctly |
| 10:26:32 | FromGitter | <alehander42> (you can see similar thing in macro repr) |
| 10:26:40 | FromGitter | <alehander42> so basically we need to improve renderer.nim too |
| 10:27:08 | FromGitter | <alehander42> but this should be useful, as it can be reused by go2nim, py2nim, eventually ts2nim and formatters etc |
| 10:27:35 | FromGitter | <tim-st> yes, makes sense, thanks :) |
| 10:28:39 | FromGitter | <alehander42> another thing we had in py2nim was mapping "idioms" |
| 10:28:53 | FromGitter | <alehander42> like patterns or mostly stdlib methods/types to nim one-s |
| 10:29:21 | FromGitter | <alehander42> so you have to think of a simple way to do this too |
| 10:29:22 | FromGitter | <tim-st> yes, I saw this good, but for go the style is very similar and interface can be easy translated to Concept |
| 10:29:53 | FromGitter | <alehander42> yes, but go code uses stdlib functions which Nim should be able to translate |
| 10:30:05 | FromGitter | <alehander42> do you plan on translating all the dependent stdlib modules too first? |
| 10:31:19 | FromGitter | <tim-st> no later, I would fist look if it works for code without stdlib (only depending on interfaces) |
| 10:31:42 | FromGitter | <tim-st> Also I think the harder problems are Channels etc that are allowed quite globally in nim this is not allowed |
| 10:31:45 | FromGitter | <alehander42> ok |
| 10:32:18 | FromGitter | <alehander42> are you planning to map them on the channels from the lib from yesterday |
| 10:32:55 | FromGitter | <tim-st> I wasnt sure, the problem is that this lib starts an endless main loop and would have downsides |
| 10:33:42 | FromGitter | <alehander42> you have to also think about error handling: but I think this is easier for ya. Once I was making a restricted python2go transpiler |
| 10:33:53 | FromGitter | <alehander42> and exceptions to error codes is hard, I never did it |
| 10:34:18 | FromGitter | <tim-st> error handling should be easy in go |
| 10:34:26 | FromGitter | <tim-st> it just a tuple |
| 10:34:43 | FromGitter | <alehander42> yep |
| 10:35:04 | FromGitter | <alehander42> and panic can still be mapped to an exception I think |
| 10:35:33 | FromGitter | <tim-st> yes, I think even a subset without channels would be very good to translate libs like `crypto` |
| 10:36:09 | FromGitter | <dom96> Interfaces are quite different to concepts |
| 10:36:40 | FromGitter | <tim-st> Interfaces are a subset of concepts afaik |
| 10:37:01 | FromGitter | <tim-st> so Interfaces can be emulated using Concepts |
| 10:37:10 | FromGitter | <tim-st> Empty Interface = `any` |
| 10:37:14 | leorize | concepts are strictly compile time only |
| 10:37:26 | FromGitter | <alehander42> yep you need vtables |
| 10:37:31 | FromGitter | <alehander42> or something different |
| 10:37:37 | leorize | vtref |
| 10:37:42 | FromGitter | <alehander42> ah yeah |
| 10:38:00 | leorize | Has it been implemented yet? |
| 10:38:16 | FromGitter | <tim-st> why are interfaces not compile time only? |
| 10:38:53 | narimiran | haha, just found an open issue with milestone 0.9.6 :D :D |
| 10:42:34 | leorize | tim-st: see this example: https://play.golang.org/p/yGTd4MtgD5 (source: Internet) |
| 10:43:05 | leorize | for that loop to work, the procs must be resolved at runtime |
| 10:43:05 | * | stefanos82 quit (Quit: Quitting for now...) |
| 10:44:12 | FromGitter | <tim-st> I dont think so |
| 10:44:58 | FromGitter | <tim-st> this can be easy translated to nim code at compile time |
| 10:46:37 | FromGitter | <tim-st> oh, I didnt saw this complete code^^ will have a look again |
| 10:48:05 | FromGitter | <tim-st> I think nims methods would work here |
| 10:48:18 | FromGitter | <tim-st> together with object variant |
| 10:48:25 | FromGitter | <tim-st> or object variant only |
| 10:49:55 | FromGitter | <tim-st> or just dont allow this and allow compile time only, who uses this? :D |
| 10:59:09 | * | shpx joined #nim |
| 11:03:38 | dom96 | You can emulate interfaces in Nim and I guess that is how you should do this |
| 11:03:50 | dom96 | concepts are still experimental too |
| 11:04:57 | FromGitter | <alehander42> @tim-st you should allow this, it's a realistic situation |
| 11:30:29 | * | nsf joined #nim |
| 11:33:51 | * | narimiran quit (Ping timeout: 252 seconds) |
| 11:44:52 | * | shpx quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:51:12 | * | Perkol joined #nim |
| 11:51:52 | Perkol | I use https://github.com/enthus1ast/nimSocks How do import it for usage? |
| 11:52:10 | Perkol | import nimsocks not working |
| 11:54:07 | dom96 | There is no `nimsocks.nim` file in there |
| 11:54:53 | dom96 | Looks like you import one of the files in the nimsocks directory |
| 11:55:03 | dom96 | import nimsocks/client |
| 11:55:17 | dom96 | Btw why do you need to use this package? Stdlib not good enough? |
| 12:11:51 | FromGitter | <yyyc514> https://github.com/nim-lang/Nim/issues/9544 if i’m missing something easy i’d love to know |
| 12:25:46 | * | elrood joined #nim |
| 12:30:35 | * | stefanos82 joined #nim |
| 13:05:24 | * | skellock joined #nim |
| 13:26:05 | Perkol | dom96: Stdlib has socks implementation? |
| 13:32:59 | FromGitter | <yyyc514> like the proxy? |
| 13:51:56 | * | kapil____ joined #nim |
| 13:55:32 | * | enthus1ast joined #nim |
| 13:56:21 | Perkol | Yes, proxy client |
| 13:56:38 | Perkol | Which lets me send requests through proxy |
| 13:59:15 | enthus1ast | Perkol, have not testet it in a while |
| 13:59:35 | enthus1ast | but could fix it for you :) |
| 14:00:20 | enthus1ast | the problem is, that the stdlib normally creates a socket internally, for example asyncHttpClient |
| 14:00:34 | enthus1ast | so we could not feed a connected socket to it |
| 14:02:10 | FromGitter | <yyyc514> `[Raw (insert)] 6.134s - 1630.27 ops/s ⏎ [ORM (insert)] 6.393s - 1564.24 ops/s` not terrible |
| 14:02:15 | FromGitter | <yyyc514> for a first pass |
| 14:03:22 | Perkol | So your package don't work? |
| 14:04:16 | enthus1ast | i see there is an compilation error caused by a newer nim version, this is easy to fix (and i can do it in a minute) but the problem is for example when you want to do an http request with the stdlib. |
| 14:05:16 | enthus1ast | if you write an client for an custom protocol (or patch httpClient) to accept a socket then it would also work. |
| 14:06:21 | FromGitter | <yyyc514> seems strings are much faster than in ruby, lol |
| 14:07:44 | enthus1ast | Perkol, this is because the current "client" (doSocksConnect) just do the SOCKS handshake, after this call you speak to the desired server |
| 14:10:25 | Perkol | By the way, your client example need to be wrapped in async function to work? |
| 14:11:02 | enthus1ast | Perkol, should compile now (could not test it...) |
| 14:12:29 | * | vlad1777d_ joined #nim |
| 14:13:32 | enthus1ast | Perkol, yeah normal async function, so `await` in an async proc |
| 14:17:34 | enthus1ast | i must go now (must vote for my favourite political party ;) ) but if you have troubles useing it, write it and i could help you later |
| 14:23:19 | FromGitter | <yyyc514> ok so db_sqlite is slow :) |
| 14:31:43 | * | rockcavera quit (Ping timeout: 245 seconds) |
| 14:32:38 | * | smt joined #nim |
| 14:37:44 | * | Ven`` joined #nim |
| 14:42:25 | * | Ven` joined #nim |
| 14:46:06 | * | Ven`` quit (Ping timeout: 246 seconds) |
| 14:48:49 | * | Ven`` joined #nim |
| 14:51:18 | * | Ven` quit (Ping timeout: 244 seconds) |
| 14:59:42 | * | Ven`` quit (Read error: Connection reset by peer) |
| 15:02:34 | * | Ven`` joined #nim |
| 15:05:03 | FromGitter | <yyyc514> https://gist.github.com/yyyc514/fb488f5dbf21db80270ac380324646ec thoughts on syntax? |
| 15:05:37 | FromGitter | <yyyc514> (https://files.gitter.im/nim-lang/Nim/azy9/Screen-Shot-2018-10-28-at-11.05.24-AM.png) |
| 15:05:49 | FromGitter | <yyyc514> wish i thought of some creative nim keywords to overload for notNull to get colorign without extra work |
| 15:05:58 | FromGitter | <yyyc514> not nil ? |
| 15:06:05 | FromGitter | <yyyc514> but nil vs null |
| 15:07:36 | leorize | not DbNull()? :P |
| 15:07:51 | FromGitter | <tim-st> is there an stdlib algo / package to create all combinations from string `abc[de]f[g]` (would create 4 variants)? |
| 15:08:14 | leorize | looks like bash expansion to me |
| 15:08:17 | FromGitter | <yyyc514> ah that is a db_common thing isn’t it |
| 15:08:33 | leorize | yyyc514: that's a ndb thing |
| 15:08:58 | leorize | db_sqlite and friends are rather outdated atm... |
| 15:09:06 | FromGitter | <yyyc514> how so? |
| 15:09:18 | leorize | NULL = empty string is a no-go for me |
| 15:10:16 | FromGitter | <yyyc514> because Row is a seq[string] ? |
| 15:10:23 | FromGitter | <yyyc514> yeah i wouldn’t be hapy with that either |
| 15:10:31 | FromGitter | <yyyc514> but i watched a video the other day making me rethink having NULL columns at all :) |
| 15:10:36 | FromGitter | <yyyc514> so no issue if everything is NOT NULL |
| 15:10:59 | FromGitter | <yyyc514> not dbNull is ok |
| 15:20:29 | * | Ven` joined #nim |
| 15:20:29 | * | Ven`` quit (Read error: Connection reset by peer) |
| 15:27:13 | * | theelous3 joined #nim |
| 15:28:22 | * | dddddd joined #nim |
| 15:29:23 | * | theelous3_ joined #nim |
| 15:30:18 | * | PMunch joined #nim |
| 15:33:35 | * | nc-x joined #nim |
| 15:35:05 | * | Vladar quit (Remote host closed the connection) |
| 15:35:10 | * | narimiran joined #nim |
| 15:35:45 | nc-x | dom96, shashlick: I made some PRs to c2nim. Please review when you get time. |
| 15:36:13 | * | nc-x quit (Client Quit) |
| 15:37:50 | * | darithorn joined #nim |
| 15:39:50 | * | Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:40:06 | * | edcragg quit (Quit: ZNC - http://znc.in) |
| 15:41:25 | * | edcragg joined #nim |
| 15:47:59 | narimiran | dom96: are you here? |
| 15:59:42 | * | Ven`` joined #nim |
| 16:02:22 | * | gangstacat joined #nim |
| 16:06:13 | * | Ven`` quit (Quit: Textual IRC Client: www.textualapp.com) |
| 16:24:48 | * | enthus1ast quit (Ping timeout: 246 seconds) |
| 17:20:46 | * | platoff joined #nim |
| 17:22:25 | narimiran | anybody here? there was a discussion/example how to mark your PR so CI is not run. anybody remembers how to do that? |
| 17:25:03 | * | Sembei quit (Ping timeout: 245 seconds) |
| 17:29:00 | FromGitter | <SolitudeSF> append `[ci skip]` to commit message |
| 17:29:55 | narimiran | eh, too late it, it seems |
| 17:30:44 | FromGitter | <kaushalmodi> narimiran: you can amend that commit and force push |
| 17:31:03 | narimiran | how to have an empty commit? |
| 17:31:10 | FromGitter | <kaushalmodi> Also that needs to go to commit *title* else Appveyor doesn't understand that |
| 17:31:27 | FromGitter | <kaushalmodi> You need to *amend* that last commit |
| 17:31:49 | narimiran | yeah, but i have to have something to amend, no? |
| 17:32:16 | FromGitter | <kaushalmodi> In Magit (Emacs), the binding is easy (`c a`). Sorry, don't know the CLI way |
| 17:32:35 | FromGitter | <SolitudeSF> no, you dont, you can use amend just to change message |
| 17:32:41 | FromGitter | <kaushalmodi> You just amend the last commit and choose to amend just the commit message |
| 17:34:22 | narimiran | thanks, it worked! https://github.com/nim-lang/Nim/pull/9546 |
| 17:34:42 | FromGitter | <tim-st> can someone help :\ ? https://gist.github.com/tim-st/977a0829e643997e715bed1793786437 |
| 17:39:04 | * | jankenpon joined #nim |
| 17:50:09 | * | PMunch quit (Remote host closed the connection) |
| 17:50:45 | narimiran | @tim-st from the top of my head: you'll need another field in the tuple, which will store "UID" of each optional part |
| 17:51:09 | narimiran | UIDs are: 1, 2, 4, 8, .... |
| 17:51:16 | FromGitter | <tim-st> narimiran: yes, thought the same some seconds ago^^ |
| 17:51:33 | FromGitter | <tim-st> I hoped there was a stdlib helper that makes it work in one line :\ |
| 17:51:35 | narimiran | and then you want the sum of the optional parts to be: 1, 2, 3, 4, 5, 6, 7, ..... 15 |
| 17:51:44 | FromGitter | <tim-st> nice |
| 17:52:21 | narimiran | probably there's a better way, but this is what i came up with in a minute or two looking at your code :) |
| 17:52:49 | FromGitter | <tim-st> Ok, thanks :) |
| 17:53:54 | FromGitter | <xmonader> shouldn't logging error proc log to `stderr` not `stdout` ? |
| 18:05:03 | * | skellock quit (Ping timeout: 244 seconds) |
| 18:17:44 | * | rockcavera joined #nim |
| 18:20:31 | FromDiscord_ | <deech> JJ |
| 18:21:26 | krux02 | xmonader: that is pretty much an opinion |
| 18:22:00 | * | theelous3_ quit (Ping timeout: 252 seconds) |
| 18:22:44 | krux02 | but maybe your opinion is the objectively better one |
| 18:22:46 | krux02 | ;R |
| 18:23:01 | krux02 | :P |
| 18:24:14 | * | mech422 joined #nim |
| 18:27:01 | * | skellock joined #nim |
| 18:28:33 | krux02 | yay no new notifications on github. |
| 18:28:59 | * | stefanos82 quit (Quit: Quitting for now...) |
| 18:29:00 | krux02 | Since I am a member of Nim now, it really takes a long time, and github is sloooowwww |
| 18:29:34 | FromGitter | <Clyybber> Since you are a member of Nim now, may I ask you a question :P |
| 18:29:54 | FromGitter | <Clyybber> What should I use instead of C-Enums in nim? |
| 18:30:25 | FromGitter | <Clyybber> I cant use Nims enums, because of duplicates |
| 18:30:26 | leorize | what are C-Enums? |
| 18:30:37 | FromGitter | <Clyybber> I mean enums as they are in C |
| 18:30:53 | leorize | you mean a bunch of constants disguised as enum? |
| 18:30:59 | FromGitter | <Clyybber> Yeah |
| 18:31:16 | * | skellock quit (Ping timeout: 246 seconds) |
| 18:31:26 | leorize | so, any example that you think can't be done in Nim? |
| 18:31:37 | FromGitter | <Clyybber> The new vulkan headers |
| 18:31:53 | FromGitter | <Clyybber> I modified c2nim to convert enums always to const |
| 18:32:18 | FromGitter | <Clyybber> but the problem I face then, is that I loose all the type safety of nim. |
| 18:32:21 | leorize | a small snippet please? |
| 18:33:06 | FromGitter | <Clyybber> Its not small but this is the thing I am trying to convert: https://github.com/KhronosGroup/Vulkan-Headers/blob/master/include/vulkan/vulkan_core.h |
| 18:33:26 | FromGitter | <Clyybber> I can extract a snippet that illustrates the problem |
| 18:34:39 | leorize | please do, this sea of enums is quite hard to navigate around |
| 18:34:58 | FromGitter | <Clyybber> On my way :D |
| 18:36:47 | FromGitter | <xmonader> @krux02 isn't everything an opinion :P Congrats on the position and looking forward to seeing more awesome contributions |
| 18:40:34 | FromGitter | <kaushalmodi> @xmonader I agree about errors going to stderr |
| 18:40:46 | FromGitter | <kaushalmodi> I see that inconsistency in unittest too |
| 18:41:00 | FromGitter | <Clyybber> @leorize ```typedef enum VkStructureType { ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5bd602bcab17df2631058c0b] |
| 18:41:13 | FromGitter | <kaushalmodi> \* agree that errors should go to stderr |
| 18:42:31 | leorize | Clyybber: seriously, who thought that was a good idea? |
| 18:42:41 | leorize | sorry, only const are usable for now |
| 18:42:43 | FromGitter | <Clyybber> Heres the snippet: ``` ⏎ typedef enum VkStructureType { ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5bd60323ae7be94016ceae6e] |
| 18:43:03 | FromGitter | <Clyybber> leorize Yeah I figured |
| 18:43:09 | leorize | they wrote an enum with const schematic |
| 18:43:12 | leorize | wonderful design |
| 18:43:57 | leorize | actually, there might be a way out |
| 18:44:05 | leorize | write a `converter` |
| 18:44:10 | FromGitter | <Clyybber> Would be cool if nim had a {dirty} pragma for enums |
| 18:44:18 | FromGitter | <Clyybber> leorize Did that already |
| 18:45:17 | FromGitter | <Clyybber> Do you mean from enum to int, or from int to enum? |
| 18:45:31 | leorize | enum -> int |
| 18:45:43 | FromGitter | <Clyybber> Yep, thats what I did |
| 18:46:02 | leorize | well then, it's certainly better than nothing |
| 18:46:27 | leorize | you could even write a macro that'd generate those `converter` for you |
| 18:46:30 | FromGitter | <Clyybber> Problem is that then, the enums are not ordered correctly |
| 18:46:58 | leorize | what do you mean? |
| 18:47:34 | FromGitter | <Clyybber> For example VK_STRUCTURE_TYPE_RANGE_SIZE ⏎ evaluates to a value less than its predecessor |
| 18:47:45 | FromGitter | <Clyybber> And nim requires enums to be in order |
| 18:48:22 | leorize | is that even matter? |
| 18:48:26 | leorize | does* |
| 18:48:29 | FromGitter | <xmonader> created an issue for it https://github.com/nim-lang/Nim/issues/9547 |
| 18:48:49 | FromGitter | <Clyybber> leorize: Yes it does |
| 18:48:56 | FromGitter | <Clyybber> Its an requirement for nim |
| 18:49:05 | FromGitter | <Clyybber> It wouldnt matter for me :P |
| 18:49:26 | leorize | then why wouldn't plain ol' converters work? |
| 18:49:43 | leorize | you just need to write an enum, any order that you'd like |
| 18:49:44 | FromGitter | <Clyybber> Because the enum does not compile |
| 18:49:48 | leorize | don't assign them anything |
| 18:49:56 | FromGitter | <Clyybber> Ah |
| 18:50:03 | FromGitter | <Clyybber> Now I understand |
| 18:50:09 | FromGitter | <Clyybber> what you meant |
| 18:50:53 | FromGitter | <Clyybber> So basically a converter which maps my nim enums to their respective vulkan values |
| 18:51:01 | leorize | yep |
| 18:51:02 | FromGitter | <xmonader> @kaushalmodi ikr?please open an issue for the testing one too |
| 18:51:08 | leorize | Clyybber: IIRC a similar approach was used for `nativesockets`/`net` |
| 18:52:02 | FromGitter | <Clyybber> Are converters applied at compile time? |
| 18:52:05 | leorize | yep |
| 18:52:19 | FromGitter | <Clyybber> So performance shouldnt be impacted. |
| 18:52:52 | leorize | it'd only impact compile time, but for `enum -> int` converter it shouldn't be a prob |
| 18:53:21 | FromGitter | <Clyybber> Problem is, with such a converter I'd loose the type safety |
| 18:53:34 | FromGitter | <Clyybber> Which is the problem I am currently facing |
| 18:54:39 | leorize | do a low-level binding first |
| 18:54:48 | leorize | then write a bunch of helper procs |
| 18:55:00 | leorize | to preserve the "type safety" |
| 18:55:22 | FromGitter | <Clyybber> Yeah, I guess I can forget type safety |
| 18:55:30 | FromGitter | <Clyybber> Vulkan isnt safe anyways |
| 18:56:20 | FromGitter | <Clyybber> That vulkan header is far too big for me to write those helper procs. |
| 18:56:27 | FromGitter | <Clyybber> And I want to keep it low level |
| 18:56:37 | leorize | templates to the rescue :) |
| 18:57:00 | leorize | c2nim can run templates as well |
| 18:57:28 | FromGitter | <Clyybber> It can even convert some preprocessor pragmas to templates |
| 18:58:22 | FromGitter | <Clyybber> Still would be cool if Nim could support "dirty" enums |
| 18:58:32 | FromGitter | <Clyybber> To easily interface with C |
| 18:58:55 | leorize | how would the compiler generates code for it then? |
| 18:59:10 | leorize | `succ`, `pred` wouldn't work on those enums |
| 18:59:19 | FromGitter | <Clyybber> It doesn't have to |
| 18:59:24 | FromGitter | <Clyybber> It would be unsafe |
| 19:01:24 | FromGitter | <Clyybber> Because as of now, my wrapper will be more "type unsafe" than the C header itself |
| 19:01:32 | FromGitter | <Clyybber> Which is kind of funny |
| 19:03:32 | FromGitter | <Clyybber> Oh, wait |
| 19:03:40 | FromGitter | <Clyybber> I could use a distinct int |
| 19:03:58 | * | skellock joined #nim |
| 19:05:31 | leorize | moment of realization :P |
| 19:05:35 | narimiran | krux02: now that you're part of nim (congrats!), do you have any short- or long-term goals/focus? |
| 19:06:10 | FromGitter | <tim-st> @Clyybber I think you can use `{size: sizeof(int)}` for enum to make it safe |
| 19:06:11 | krux02 | well my goals are removing bugs and unmaintainable features |
| 19:06:30 | FromGitter | <Clyybber> @tim-st Already doing that |
| 19:07:18 | FromGitter | <Clyybber> @tim-st Problem is nim's enums are more limited/logical than C's |
| 19:07:28 | FromGitter | <tim-st> ok |
| 19:08:28 | * | skellock quit (Ping timeout: 264 seconds) |
| 19:10:33 | shashlick | @krux02: I have all my http://github.com notifications forwarded to slack |
| 19:10:34 | narimiran | krux02: anything in particular? |
| 19:11:08 | krux02 | shashlick, I don't have slack |
| 19:11:16 | krux02 | narimiran, no not really |
| 19:11:44 | shashlick | https://github.com/genotrance/notipy |
| 19:11:54 | shashlick | Can forward elsewhere too if you need |
| 19:11:55 | * | shpx joined #nim |
| 19:11:59 | krux02 | I have my project where I compile nim to glsl to simplyfiy the process to program visual gpu driven applications |
| 19:12:42 | krux02 | I want that project to grow and I will improve in Nim everything where also that project would benefit from |
| 19:12:47 | krux02 | that would be macros |
| 19:12:50 | krux02 | reflection |
| 19:13:02 | krux02 | (for example sizeof alignof) |
| 19:14:06 | FromGitter | <Clyybber> krux02 Thats so cool |
| 19:19:50 | Perkol | Is there example TCP client for asyncnet? |
| 19:28:13 | * | shpx quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 19:28:23 | FromGitter | <alehander42> @krux02 what are examples of unmaintainable features |
| 19:28:33 | narimiran | list comprehension :) |
| 19:29:32 | FromGitter | <Clyybber> Is that really the source of your issue with imports? |
| 19:30:01 | narimiran | i have no idea. people just started talking about removing LC |
| 19:30:12 | FromGitter | <alehander42> yeah, I'd also remove it from sugar |
| 19:30:56 | * | kapil____ quit (Quit: Connection closed for inactivity) |
| 19:33:06 | narimiran | but that should be done for 0.20, not 0.19.2 |
| 19:33:12 | * | shpx joined #nim |
| 19:43:21 | FromGitter | <Clyybber> Yeah, I agree |
| 19:43:33 | FromGitter | <Clyybber> Also list comprehensions are kind of useful |
| 19:43:37 | FromGitter | <Clyybber> If they work |
| 19:43:44 | Perkol | https://github.com/dom96/nim-in-action-code/tree/master/Chapter3/ChatApp |
| 19:43:49 | Perkol | Found it |
| 19:44:18 | FromGitter | <Clyybber> But why cant we change the syntax of lc from using [] to normal call syntax? |
| 19:44:37 | FromGitter | <Clyybber> I think i saw a PR which did that |
| 19:45:22 | * | kungtotte quit (Quit: WeeChat 2.3) |
| 19:48:59 | FromGitter | <alehander42> we also have an alternative dsl http://github.com/alehander42/comprehension |
| 19:49:20 | FromGitter | <alehander42> as a 3rd party option |
| 19:49:37 | FromGitter | <alehander42> but the final api is still ? |
| 19:49:55 | narimiran | @alehander42 so we have to have `comp` two times there? :( |
| 19:51:16 | * | kungtotte joined #nim |
| 19:51:42 | narimiran | i was hoping for something like `<keyword>{for k, v in a: if k == v: k}` |
| 19:54:01 | FromDiscord_ | <Shield> what's the best way to keep a consistent ABI? and how can I exportc a type? |
| 19:54:42 | * | nsf quit (Quit: WeeChat 2.2) |
| 19:54:57 | FromGitter | <alehander42> oh nope |
| 19:55:01 | FromGitter | <alehander42> the readme is wrong |
| 19:55:07 | FromGitter | <alehander42> it's only comp in front of it |
| 19:55:18 | * | krux02 quit (Remote host closed the connection) |
| 19:55:36 | narimiran | what about parentheses around `if`? necessary? |
| 19:56:03 | * | krux02 joined #nim |
| 19:58:16 | * | theelous3_ joined #nim |
| 19:59:57 | FromGitter | <dawkot> can you tell nimsuggest to treat code as if it was going to be compiles to js? |
| 20:00:42 | narimiran | @dawkot i'm not sure (i don't use JS), but some flag in .cfg might do that :/ |
| 20:02:52 | FromGitter | <dawkot> you mispelled .nims :P |
| 20:02:59 | narimiran | :P |
| 20:03:16 | FromGitter | <alehander42> yes otherwise nim gets a syntax error |
| 20:03:19 | FromGitter | <alehander42> (the if ()) |
| 20:03:33 | narimiran | ah, shame |
| 20:16:55 | FromGitter | <dawkot> can you get the target platform in code at compile time? |
| 20:20:15 | FromGitter | <dawkot> I see that there's `system.hostOS`, but I don't see `js` among possible values... |
| 20:22:30 | FromGitter | <Varriount> I believe it's `when defined(js)` or something |
| 20:22:37 | * | SenasOzys joined #nim |
| 20:22:38 | * | SenasOzys quit (Client Quit) |
| 20:24:18 | * | Sembei joined #nim |
| 20:24:36 | krux02 | dawkot: just look in system.nim there are many of these target platform checks |
| 20:25:21 | FromGitter | <dawkot> @Varriount : yeah, that seems to work, but nimsuggest doesn't take code in a `when defined(js):` body into account |
| 20:25:21 | * | Perkol quit (Quit: Leaving) |
| 20:26:31 | FromGitter | <dawkot> but at least it works, so thanks |
| 20:26:48 | * | dom96_w joined #nim |
| 20:31:08 | * | dom96_w quit (Remote host closed the connection) |
| 20:33:13 | * | krux02_ joined #nim |
| 20:34:29 | * | skellock joined #nim |
| 20:36:26 | * | krux02 quit (Ping timeout: 276 seconds) |
| 20:39:44 | * | krux02_ is now known as krux02 |
| 20:48:05 | FromGitter | <DanielSokil> `smtp.connect` procedure is throwing an error saying: `Error: type mismatch: got <Smtp, string, Port> but expected one of: Handler` ⏎ It seems to me that I'm using it properly, based on docs. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bd620841c100a4f29fbb296] |
| 21:32:39 | * | narimiran quit (Remote host closed the connection) |
| 21:41:53 | * | enthus1ast joined #nim |
| 21:43:37 | enthus1ast | DanielSokil, maybe old nim version? |
| 22:00:12 | * | bozaloshtsh quit (Quit: ZNC 1.7.1 - https://znc.in) |
| 22:00:22 | * | bozaloshtsh joined #nim |
| 22:00:29 | * | bozaloshtsh quit (Changing host) |
| 22:00:29 | * | bozaloshtsh joined #nim |
| 22:04:55 | * | jankenpon quit (Ping timeout: 256 seconds) |
| 22:06:07 | * | wildlander quit (Quit: Konversation terminated!) |
| 22:15:09 | * | theelous3_ quit (Ping timeout: 246 seconds) |
| 22:28:05 | * | bozaloshtsh quit (Quit: ZNC 1.7.1 - https://znc.in) |
| 22:28:23 | * | bozaloshtsh joined #nim |
| 22:28:23 | * | bozaloshtsh quit (Changing host) |
| 22:28:23 | * | bozaloshtsh joined #nim |
| 22:32:39 | * | voiceftp quit (Remote host closed the connection) |
| 22:34:42 | * | bozaloshtsh quit (Quit: ZNC 1.7.1 - https://znc.in) |
| 22:34:51 | * | bozaloshtsh joined #nim |
| 22:34:52 | * | bozaloshtsh quit (Changing host) |
| 22:34:52 | * | bozaloshtsh joined #nim |
| 22:37:28 | * | bozaloshtsh quit (Client Quit) |
| 22:37:37 | * | bozaloshtsh joined #nim |
| 22:37:37 | * | bozaloshtsh quit (Changing host) |
| 22:37:37 | * | bozaloshtsh joined #nim |
| 22:38:55 | * | bozaloshtsh quit (Client Quit) |
| 22:40:05 | * | bozaloshtsh joined #nim |
| 22:40:05 | * | bozaloshtsh quit (Changing host) |
| 22:40:05 | * | bozaloshtsh joined #nim |
| 22:40:10 | * | voiceftp joined #nim |
| 22:40:52 | * | bozaloshtsh quit (Client Quit) |
| 22:42:23 | * | bozaloshtsh joined #nim |
| 22:46:43 | * | bozaloshtsh quit (Changing host) |
| 22:46:43 | * | bozaloshtsh joined #nim |
| 22:56:48 | FromGitter | <DanielSokil> I have tried it with latest stable version and devel version, both produce same results. |
| 23:01:17 | * | smitop_ joined #nim |
| 23:01:39 | dom96 | DanielSokil: what's your code? |
| 23:03:03 | FromGitter | <DanielSokil> I have a `contact.nim` module that looks like this: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ When I put the `sendMail` procedure in a separate module, it compiles. [https://gitter.im/nim-lang/Nim?at=5bd640261c100a4f29fc6ded] |
| 23:06:03 | FromGitter | <DanielSokil> `utilities.nim` if that helps ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bd640db1c100a4f29fc70f5] |
| 23:15:40 | * | d10n-work joined #nim |
| 23:17:16 | dom96 | hrm, I dunno |
| 23:17:17 | dom96 | strange |
| 23:21:58 | * | aziz joined #nim |
| 23:24:46 | * | elrood quit (Quit: Leaving) |
| 23:25:25 | * | flyx quit (Quit: ZNC - http://znc.in) |
| 23:25:39 | * | flyx joined #nim |
| 23:27:06 | * | aziz quit (Quit: Ex-Chat) |
| 23:33:15 | * | theelous3_ joined #nim |
| 23:35:52 | * | tobbez quit (Ping timeout: 252 seconds) |
| 23:37:08 | * | platoff quit (Ping timeout: 245 seconds) |
| 23:39:03 | FromGitter | <DanielSokil> Well a solution is to put the `sendMail` procedure inside the `utilities.nim` module, and keep going. (: |
| 23:42:07 | * | vlad1777d_ quit (Ping timeout: 240 seconds) |
| 23:48:49 | * | platoff joined #nim |
| 23:51:07 | FromGitter | <DanielSokil> Am I able to test the `smtp` module from a local IP, or test it from a server? |
| 23:53:34 | * | tobbez joined #nim |