00:05:33 | * | jrbrt joined #nim |
00:21:49 | * | jrbrt quit (Quit: Oíche mhaith) |
00:30:13 | * | jrbrt joined #nim |
00:31:29 | * | jrbrt quit (Client Quit) |
00:51:39 | * | dddddd quit (Remote host closed the connection) |
00:52:38 | * | enthus1ast joined #nim |
00:54:25 | * | enthus1a1t quit (Ping timeout: 248 seconds) |
00:57:38 | FromGitter | <AjBreidenbach> is there a syntax for instantiating a `ptr object` |
01:01:01 | * | vlad1777d joined #nim |
01:10:33 | * | vlad1777d quit (Ping timeout: 265 seconds) |
01:12:11 | * | S1t1Schu joined #nim |
01:14:53 | FromGitter | <AjBreidenbach> nvm it's probably better to just use ref |
01:15:27 | * | S1tiSchu quit (Ping timeout: 240 seconds) |
01:38:09 | * | tiocavera joined #nim |
01:38:09 | * | tiocavera quit (Changing host) |
01:38:09 | * | tiocavera joined #nim |
01:38:09 | * | rockcavera is now known as Guest93566 |
01:38:09 | * | Guest93566 quit (Killed (rajaniemi.freenode.net (Nickname regained by services))) |
01:38:09 | * | tiocavera is now known as rockcavera |
02:04:38 | * | smt` joined #nim |
02:04:54 | * | smt` quit (Max SendQ exceeded) |
02:05:28 | * | smt` joined #nim |
02:06:21 | * | smt` quit (Remote host closed the connection) |
02:06:48 | * | smt` joined #nim |
02:08:45 | * | smt quit (Ping timeout: 264 seconds) |
02:43:29 | * | smt_ joined #nim |
02:47:15 | * | smt` quit (Ping timeout: 256 seconds) |
03:13:31 | * | NimBot joined #nim |
03:21:08 | * | vivus quit (Quit: Leaving) |
03:21:26 | * | endragor joined #nim |
04:08:07 | * | Tanger joined #nim |
04:53:49 | * | leorize joined #nim |
05:03:18 | Tanger | Hey folks! I'm looking at nim's Emerald DSL to see if I can fix up it's issue on 0.18.0. I think the issue lies in calling `quit` within a {.compiletime.} pagrama'd proc |
05:05:11 | Tanger | Error message suggests quit gets evaluated to a NimNode at compile time |
05:06:24 | * | smt_ quit (Read error: Connection reset by peer) |
05:06:43 | * | smt_ joined #nim |
05:07:55 | * | smt` joined #nim |
05:11:01 | * | smt joined #nim |
05:11:17 | Tanger | Thought about replacing the quit's with .fatal. pragmas, but I gotta look more into getting node data at compile time |
05:12:04 | * | smt_ quit (Ping timeout: 256 seconds) |
05:13:12 | * | smt` quit (Ping timeout: 256 seconds) |
05:13:33 | * | smt` joined #nim |
05:16:02 | * | smt quit (Ping timeout: 256 seconds) |
05:17:49 | * | r3d9u11 joined #nim |
05:32:22 | * | xet7 joined #nim |
05:42:41 | * | yglukhov quit (Read error: Connection reset by peer) |
05:43:33 | * | yglukhov joined #nim |
05:58:47 | * | leorize quit (Ping timeout: 256 seconds) |
06:06:45 | * | nsf joined #nim |
06:07:06 | * | r3d9u11 quit (Remote host closed the connection) |
06:12:23 | * | leorize joined #nim |
06:14:05 | FromGitter | <diegogub> Hi guys, any way to to avoid null values when marshaling ref objects JSON ? |
06:14:19 | FromGitter | <diegogub> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac31bbb270d7d370888a202] |
06:25:37 | * | smt_ joined #nim |
06:29:21 | * | smt` quit (Ping timeout: 248 seconds) |
06:33:03 | * | user1101 quit (Quit: user1101) |
06:52:54 | * | Vladar joined #nim |
07:05:19 | * | PMunch joined #nim |
07:29:25 | * | yglukhov quit (Remote host closed the connection) |
07:29:45 | * | yglukhov joined #nim |
07:36:19 | * | floppydh joined #nim |
07:37:03 | * | Lysenkoism joined #nim |
07:37:20 | * | gokr joined #nim |
07:38:12 | * | rokups joined #nim |
07:40:06 | FromGitter | <Varriount> @diegogub Not off the top of my head, you could try looking at the marshalling code |
07:46:31 | * | smt` joined #nim |
07:49:03 | * | yglukhov quit (Read error: Connection reset by peer) |
07:49:37 | * | yglukhov joined #nim |
07:50:25 | * | smt_ quit (Ping timeout: 248 seconds) |
07:53:07 | FromGitter | <survivorm> Hrm. Just read an article about truely hellish management. Glad, I'm not working here: https://projectfailures.wordpress.com/2008/06/24/project-from-hell/ |
08:00:05 | FromGitter | <diegogub> @survivorm sounds like hell |
08:00:40 | FromGitter | <diegogub> @Varriount I'm on it..but first week of nim, still struggling |
08:01:21 | * | jaco60 joined #nim |
08:03:03 | * | gmpreussner quit (Ping timeout: 268 seconds) |
08:04:02 | PMunch | What is the proper way to deprecate a proc? |
08:04:24 | * | smt joined #nim |
08:05:18 | * | gmpreussner joined #nim |
08:07:44 | * | smt` quit (Ping timeout: 256 seconds) |
08:11:18 | FromGitter | <mratsim> {.deprecated: “your reason”.} |
08:12:12 | FromGitter | <mratsim> @survivorm this website also has a good selection of projects from hell: https://thedailywtf.com/ :) |
08:14:44 | FromGitter | <survivorm> @mratsim Thanks god i'm not in one of them. My work problems suddenly seem so little. |
08:15:23 | FromGitter | <mratsim> actually dailywtf is mentionned at the bottom of project from hell, I’m pretty sure I read that piece on some other website without a black background |
08:15:59 | FromGitter | <mratsim> You should also read tales from tech support: https://www.reddit.com/r/talesfromtechsupport/ :D |
08:16:24 | FromGitter | <survivorm> Actually, i've read a translation in russian. It just contained a link there |
08:17:08 | FromGitter | <survivorm> Ok, i'll do. But support is not only about depressing stories, it also is funny sometimes |
08:17:45 | FromGitter | <survivorm> I may retell my sister's husband support story here if people are interested |
08:21:08 | PMunch | mratsim, oh nice you can give a reason as well. The documentation for deprecated is a bit lacking: https://nim-lang.org/docs/manual.html#pragmas-deprecated-pragma |
08:21:23 | PMunch | I tried to use the list of renamings for a proc, but that didn't work well |
08:21:43 | FromGitter | <mratsim> I actually learned that yesterday as well ;) |
08:22:03 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/issues/7468 |
08:27:59 | * | smt` joined #nim |
08:30:37 | * | AndroUser2 joined #nim |
08:32:01 | * | smt quit (Ping timeout: 248 seconds) |
08:33:53 | * | Lysenkoism quit (Ping timeout: 276 seconds) |
08:38:24 | * | Arrrr joined #nim |
08:41:00 | PMunch | Man, this timothecourr guy is all over the place lately |
08:43:05 | FromGitter | <Varriount> @mratsim Have you tried the new toOpenArray proc yet? |
08:43:06 | * | dddddd joined #nim |
08:43:23 | FromGitter | <mratsim> Not yet |
08:43:28 | FromGitter | <Varriount> I'm having great fun with it for string manipulation. |
08:43:35 | FromGitter | <mratsim> @Pmunch I’m pretty sure I was the same when i started :P |
08:44:38 | PMunch | Haha, I kept my head down a bit more. Really liking his ideas with the generic stuff by the way |
08:45:22 | FromGitter | <mratsim> Well, I wanted to use “static” right from the get go, so …. |
08:45:40 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:47:46 | * | AndroUser2 quit (Ping timeout: 264 seconds) |
09:34:38 | FromGitter | <alehander42> that feel when you have 20 `of` branches and nim says "not all cases are covered" |
09:34:47 | FromGitter | <alehander42> do we have a way to show which one ? |
09:35:20 | FromGitter | <survivorm> Yeah, funny |
09:37:08 | FromGitter | <survivorm> I recall a task our team had a task of re-writing perl program which processed a data on mobile operators short-numbers and it's routing and it was about 1000 cases of if's |
09:37:36 | FromGitter | <survivorm> which became a hell to maintain, of cause |
09:37:55 | FromGitter | <alehander42> well it's a simplish REPL so it doesn't seem too bad |
09:40:04 | FromGitter | <survivorm> The program original developers thought so too, i think. And it was, then the cases were 20. May be 50. Or even 100. But then there were more then few hundreds... |
09:41:20 | FromGitter | <survivorm> So think future and try not to make life harder for people wich will come after you ;) |
09:43:51 | FromGitter | <alehander42> the problem is Nim doesn't have good support for "polymorphism" on variant objects |
09:44:17 | FromGitter | <alehander42> so if I decide to make a different proc for each kind of "operation" |
09:44:47 | FromGitter | <alehander42> I have to use some macro magic to dispatch (basically to generate a `case .. of : ..` on compile to or to write it manually) |
09:45:14 | FromGitter | <alehander42> and then I have to still do `expectKind` or `assert` in each procedure to help Nim recognize which fields are valid there |
09:45:25 | FromGitter | <alehander42> if we could do stuff like |
09:47:17 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac34da5e3d0b1ff2c97601a] |
09:47:22 | FromGitter | <alehander42> which expands to ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac34da9e4ff28713aa15207] |
09:47:27 | FromGitter | <alehander42> that would be interesting |
09:47:51 | FromGitter | <alehander42> but maybe that can be solved with a good pattern matching lib again |
09:50:06 | FromGitter | <alehander42> of course, you can also use inheritance & methods but variant objects are better for some things |
09:56:54 | FromGitter | <alehander42> you can do it with macros |
10:02:51 | * | leorize quit (Ping timeout: 240 seconds) |
10:20:59 | FromGitter | <mratsim> @dom96 @Araq Can we reopen #6700, I think we should keep #7250 about package users and #6700 about package providers, see my last comment: https://github.com/nim-lang/Nim/issues/7250#issuecomment-378200483 |
10:51:17 | FromGitter | <alehander42> ok i did it |
11:04:56 | * | smt_ joined #nim |
11:08:57 | * | smt` quit (Ping timeout: 256 seconds) |
11:19:13 | * | skelett joined #nim |
11:21:53 | FromGitter | <krux02> @alehander42 I just started a project do do ast pattern matching here: https://github.com/krux02/ast-pattern-matching/blob/master/matching.nim |
11:22:22 | FromGitter | <krux02> keep in mind I just started this. It is not a nimble package. |
11:23:27 | FromGitter | <krux02> All it does at the moment is, it generates a lot of `expectKind` and `expectLen` statements |
11:33:26 | girvo | What I would love to see is zero-overhead pattern matching ;) Mmmmm pipe-dreams... |
11:34:06 | * | xet7 quit (Quit: Leaving) |
11:34:29 | * | Vladar quit (Quit: Leaving) |
11:35:34 | FromGitter | <alehander42> @girvo I don't see why zero-overhead pattern matching should be impossible |
11:37:36 | * | xet7 joined #nim |
11:38:06 | * | leorize joined #nim |
11:39:46 | dom96 | mratsim: #6700 has turned out quite long already though |
11:40:41 | dom96 | but okay, if you'll repost your comment there, I think it will be better. |
11:40:47 | FromGitter | <mratsim> Should i start a new one otherwise? |
11:41:38 | dom96 | Yeah, start a fresh one. |
11:41:53 | dom96 | I think it'll be easier that way for others to contribute |
11:42:21 | * | xet7 quit (Read error: Connection reset by peer) |
11:42:28 | * | xet7_ joined #nim |
11:42:35 | dom96 | But I already have an answer for you |
11:42:44 | * | xet7_ is now known as xet7 |
11:44:20 | dom96 | brb |
11:50:45 | * | user1101 joined #nim |
11:55:27 | * | yglukhov quit (Remote host closed the connection) |
11:55:45 | FromGitter | <alehander42> @survivorm I published my macro for overloading based on variant, thanks for the idea |
11:56:14 | FromGitter | <alehander42> @Araq , @dom96 do you think the syntax in https://github.com/alehander42/poly or something similar would be useful for stdlib ? |
11:57:08 | FromGitter | <alehander42> @krux02 looks great, I can't wait to use something like this in my macros |
11:57:22 | FromGitter | <mratsim> @dom96, cleaned up, opened #7485 |
11:59:20 | FromGitter | <alehander42> @krux02 btw I had the idea to generalize some kind of matching syntax on proc level as in poly (the previous link): something like ⏎ ⏎ ```poly: ⏎ proc display*(a: A{e: 4, h > 2}) = ⏎ echo a.e``` ⏎ ⏎ so you can have many overloads with different conditions directly in the signature and the dsl will generate a single proc with `case`/`ifs` ... [https://gitt |
11:59:20 | FromGitter | ... er.im/nim-lang/Nim?at=5ac36c98270d7d37088a284f] |
12:00:53 | * | SenasOzys quit (Ping timeout: 256 seconds) |
12:03:18 | * | Vladar joined #nim |
12:04:44 | girvo | alehander42: Me either! Which is why I'd love to see it |
12:08:50 | FromGitter | <alehander42> at least in my pattern matching DSL-s I am trying to generate optimal code |
12:12:23 | * | SenasOzys joined #nim |
12:12:51 | * | smt` joined #nim |
12:17:04 | * | smt_ quit (Ping timeout: 256 seconds) |
12:17:55 | * | SenasOzys quit (Read error: Connection reset by peer) |
12:18:10 | * | SenasOzys joined #nim |
12:19:14 | dom96 | alehander42: I dunno, I'd rather keep it out of the stdlib until it stabilises and is used by more people. |
12:19:31 | * | Lysenkoism joined #nim |
12:21:01 | dom96 | mratsim: replied |
12:22:35 | Araq | problem is that many do not want a nimble dependency for pattern matching |
12:25:46 | FromGitter | <alehander42> @dom96 absolutely, I wanted to just demonstrate how the syntax would work with poly (and to use it in my projects) |
12:26:18 | FromGitter | <alehander42> I just wondered why Nim itself doesn't have such syntax (but maybe it's not too often needed) |
12:28:31 | FromGitter | <alehander42> @Araq I agree, if eventually a Nim lib manages to provide good solutions for most pattern matching usecases, it might be better to include it as several competing 3rd party pattern matching syntaxes can be confusing (this sounded like some kind of anti-market soc speech hahaha) |
12:29:02 | FromGitter | <alehander42> btw is there a reason `{.push.}` doesn't really work with all pragmas |
12:29:49 | Araq | .push is messy to implement and it's yet another of these features I wish we lacked. |
12:30:01 | Araq | should have be done with a macro |
12:30:12 | * | donotturnoff joined #nim |
12:30:59 | FromGitter | <alehander42> so you'd prefer something like ⏎ ⏎ ```push(pragma): ⏎ proc .. ⏎ ⏎ proc ..``` ⏎ ⏎ ? [https://gitter.im/nim-lang/Nim?at=5ac37403bb1018b37a54127d] |
12:31:31 | Araq | sure |
12:31:33 | FromGitter | <alehander42> I can't see how can you do with a macro otherwise |
12:34:28 | FromGitter | <alehander42> I am still using `using` proudly .. :D |
12:35:06 | Araq | hmm I removed this feature, how can you use it? |
12:36:29 | FromGitter | <alehander42> o.O when did you remove it |
12:36:46 | Araq | one year ago or something |
12:36:47 | FromGitter | <alehander42> my devel should be ~= middle of march |
12:37:07 | Yardanico | Araq, you didn't remove `using`, and why would you? |
12:37:07 | Araq | so you mean the new 'using' statement? |
12:37:09 | FromGitter | <alehander42> you mean, know one needs to use `{.experimental.}` ? |
12:37:16 | Araq | well |
12:37:25 | Araq | 'using' is two unrelated features |
12:37:28 | FromGitter | <alehander42> are there two different `using` ? :D |
12:37:49 | Araq | it once was a Pascal like 'with' statement |
12:37:55 | Yardanico | wow |
12:38:01 | Araq | now it's used for parameter type inference |
12:38:14 | FromGitter | <alehander42> yeah yeah I use the parameter type thing |
12:38:24 | FromGitter | <alehander42> haha, I didn't know about the `with` thing |
12:38:27 | Araq | oh ok. |
12:38:57 | FromGitter | <alehander42> hahahah I read `with` definition now |
12:39:05 | FromGitter | <alehander42> I actually implemented that myself this year |
12:39:24 | FromGitter | <alehander42> and I use it but with a different name, I even suggested including it in `sugar.nim` |
12:39:57 | * | sendell joined #nim |
12:40:33 | FromGitter | <alehander42> ok, my version goes only one level deep |
12:40:33 | * | smt` quit (Ping timeout: 248 seconds) |
12:42:55 | FromGitter | <zacharycarter> anyone good with nginx / Jester? |
12:43:23 | dom96 | certainly not me :P |
12:43:45 | FromGitter | <zacharycarter> :P well... I was kind of hoping you were around anyway because I wanted to ask you something Jester related |
12:44:11 | FromGitter | <zacharycarter> I set up a post route of "/compile" - and I noticed that if I post to "/compile/" the request isn't handled - is Jester really that picky? |
12:44:18 | FromGitter | <zacharycarter> and if it is - should it be? |
12:47:02 | dom96 | yes |
12:47:07 | dom96 | "/compile/?" |
12:47:09 | dom96 | is what you want |
12:47:18 | FromGitter | <zacharycarter> ah okay thanks |
12:47:45 | FromGitter | <zacharycarter> I'll flail around a bit more before asking my next question - I'm sure I'm doing something stupid |
12:48:16 | dom96 | just ask :) |
12:52:20 | FromGitter | <zacharycarter> okay well - I have this nginx config - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac379042b9dfdbc3a4f392e] |
12:52:42 | FromGitter | <zacharycarter> but when I try to hit http://localhost/compile |
12:52:50 | FromGitter | <zacharycarter> with a post request |
12:52:58 | FromGitter | <zacharycarter> my jester handler isn't hit :/ |
12:56:06 | * | kier quit (Remote host closed the connection) |
12:56:54 | FromGitter | <zacharycarter> I'm running all of this with docker compose (attempting to re-write the playground to be easier to maintain / deploy and manage) - so it might be an issue w/ that as well |
12:57:39 | * | kier joined #nim |
13:04:00 | FromGitter | <Yardanico> strange |
13:04:06 | FromGitter | <Yardanico> https://github.com/samdmarshall/pewpewthespells-com/blob/master/configuration/etc/nginx/nginx.conf it looks the same as yours |
13:08:26 | FromGitter | <zacharycarter> yeah - I'm guessing it's something I'm doing wrong w/ docker or docker-compose |
13:09:22 | * | leorize quit (Ping timeout: 260 seconds) |
13:10:04 | * | leorize joined #nim |
13:13:39 | dom96 | zacharycarter: hrm, since you're working on this, maybe you could deploy it on our VPS? |
13:13:57 | FromGitter | <zacharycarter> https://github.com/nemui-fujiu/docker_compose_nim_jester - should help me |
13:13:59 | dom96 | I can make you an account |
13:14:06 | FromGitter | <zacharycarter> dom96 - I think you already did and yeah that's my plan |
13:14:11 | FromGitter | <zacharycarter> I want to just be able to ship a docker image though |
13:14:21 | FromGitter | <zacharycarter> so I'm not sure if I'll be able to use the current VPS |
13:14:41 | dom96 | :/ |
13:15:07 | dom96 | It should just be a case of creating a systemd service file on the VPS |
13:16:22 | * | BitPuffin joined #nim |
13:16:33 | FromGitter | <zacharycarter> well... here's my thing - it's a pita to update the playground when the solution isn't dockerized |
13:16:51 | dom96 | git pull && nim build? |
13:16:55 | dom96 | *nimble build |
13:17:03 | FromGitter | <zacharycarter> it's not that simple when your solution relies on docker being installed on the machine |
13:17:09 | FromGitter | <zacharycarter> and files being written to directories that need permissions |
13:17:10 | FromGitter | <zacharycarter> etc |
13:17:19 | FromGitter | <zacharycarter> so like - the environment needs to be prepped first |
13:17:22 | dom96 | hrm |
13:17:28 | FromGitter | <zacharycarter> and then I've run into situations where my verison of karax or something is so old |
13:17:31 | FromGitter | <zacharycarter> I go to make an update |
13:17:46 | FromGitter | <zacharycarter> and the app just stops working - and then I have to figure out what versinon of karax worked and roll back to that - it's just a headache |
13:17:53 | dom96 | You should pin the commit: karax@commitHash |
13:17:55 | FromGitter | <zacharycarter> I'd rather just have one command to run that spins up the environment and the app in a container |
13:18:02 | FromGitter | <zacharycarter> that I can deploy |
13:18:02 | dom96 | *karax@#commitHash |
13:18:09 | FromGitter | <zacharycarter> and run when I want to work on the app |
13:18:16 | dom96 | but anyway, if you do that won't it be trivial to deploy on our VPS? |
13:18:19 | FromGitter | <zacharycarter> I know digitial ocean supports deploying containerized apps |
13:18:27 | dom96 | also, how does a docker container within a docker container work? |
13:18:27 | FromGitter | <zacharycarter> if your VPS is running docker I imagine it would be |
13:18:39 | FromGitter | <zacharycarter> well I'm going to figure that one out today :) |
13:18:53 | FromGitter | <zacharycarter> the last time I attempted to get it to work - I couldn't - but I'm going to give it another shot |
13:19:08 | dom96 | I'm happy to install docker on the VPS |
13:19:34 | FromGitter | <zacharycarter> alright - I'm going to finish getting the app in better shape and I'll let you know when I'm ready to deploy / start testing stuff |
13:19:46 | dom96 | ok |
13:20:00 | dom96 | I should make an account for federico3 too |
13:20:14 | FromGitter | <zacharycarter> I think you made myself and someone else an account at one point |
13:20:18 | FromGitter | <zacharycarter> it may very well have been federico3 |
13:20:20 | dom96 | federico3: PM me your public SSH key when you have a minute :) |
13:20:31 | FromGitter | <zacharycarter> also - my public ssh key most likely changed as I got a new laptop |
13:20:32 | dom96 | I think Yardanico was the other person |
13:20:37 | FromGitter | <zacharycarter> yeah you're right |
13:20:49 | dom96 | feel free to PM me your new SSH key |
13:20:53 | FromGitter | <zacharycarter> will do |
13:20:58 | Yardanico | dom96, yeah, it was me |
13:21:58 | FromGitter | <zacharycarter> dom96: going to PM you on gitter as I'm not on IRC and don't think I can PM from gitter -> irc |
13:22:42 | dom96 | sure |
13:23:02 | Yardanico | yeah, sadly you can't because there's no first-class gitter-freenode bridge (at IRC server level) |
13:24:20 | livcd | is there a performant web server pkg for nim that i could use without relying on reverse proxy ? |
13:24:39 | Yardanico | livcd, probably httpbeast/mofuw |
13:24:56 | Yardanico | IDK really |
13:26:02 | PMunch | Hmm, mratsim you on? |
13:26:19 | FromGitter | <mratsim> always |
13:26:25 | FromGitter | <mratsim> I work on Nim everyday now :P |
13:26:38 | PMunch | Oh yeah that's true. Lucky you :P |
13:26:52 | PMunch | I'm trying to incorporate your genAccessors thing |
13:27:03 | PMunch | But I've run into an issue |
13:27:25 | PMunch | Since it now generates a proc for each field I can't use those fields as names for say a variable |
13:28:34 | livcd | Yardanico: mofuw has more commits :D |
13:29:37 | PMunch | http://ix.io/16a7/Nim |
13:30:05 | dom96 | httpbeast isn't ready at all :) |
13:30:17 | dom96 | the stdlib asynchttpserver isn't that bad though |
13:30:22 | PMunch | That last line throws an error saying "Error: redefinition of 'fieldNull'" |
13:31:32 | * | arecaceae quit (Remote host closed the connection) |
13:31:58 | * | arecaceae joined #nim |
13:32:37 | dom96 | zacharycarter: updated your key |
13:35:25 | PMunch | mratsim, have you run into similar issues? |
13:36:13 | FromGitter | <mratsim> wait I’m on the phone |
13:36:41 | FromGitter | <mratsim> It expects the fields to be named Ffield |
13:36:51 | PMunch | Yeah I know |
13:37:04 | PMunch | I changed mine to expect "private_field" |
13:37:24 | PMunch | The issue is that it creates a top level proc.. |
13:37:35 | PMunch | Which takes up a symbol |
13:37:42 | * | athenot joined #nim |
13:37:56 | FromGitter | <zacharycarter> thanks dom96 |
13:39:31 | FromGitter | <mratsim> @PMunch, you can prefix with get and set. (I hear Java calling in the background btw). |
13:39:49 | PMunch | Well, then I'm back to square one |
13:39:59 | PMunch | I wanted to create a transparent interface for this |
13:41:49 | FromGitter | <mratsim> The only alternative I see is by using include, so that the private fields are usable within the package but not directly outside. |
13:42:19 | FromGitter | <mratsim> but I for me include is kind of a last resort |
13:45:46 | PMunch | This is unfortunately going to be spit out from a macro, meaning it will all be inserted into the users code |
13:47:03 | dom96 | yay for more people using Nim at work https://github.com/nim-lang/nimble/issues/456#issuecomment-378255753 |
13:47:06 | FromGitter | <mratsim> I could see namespacing helping somehow. (i think) but it’s not there. |
13:51:34 | PMunch | Playing around with the special `.` operator now |
13:53:36 | * | r2 joined #nim |
13:54:29 | * | yglukhov joined #nim |
13:57:57 | * | leorize quit (Quit: WeeChat 2.1) |
13:58:56 | dom96 | man, so many RFCs these days |
13:59:06 | dom96 | At this rate we'll never release v1 |
13:59:38 | * | yglukhov quit (Ping timeout: 276 seconds) |
14:00:48 | FromGitter | <narimiran> thanks for reminding me i should write one too :) |
14:00:55 | dom96 | hah |
14:01:08 | dom96 | I mean, it's a good thing that we're discussing these things :) |
14:05:36 | FromGitter | <mratsim> Well the hard thing now is closing those RFCs |
14:08:39 | FromGitter | <survivorm> @alehander42 You're welcome. Though I don't remember giving you any ideas 😄 |
14:08:41 | FromGitter | <mratsim> Should we schedule a regular review of RFCs (every x weeks) and a report on the forums? ⏎ ⏎ 1) More people will get exposed to them ⏎ 2) It makes sure that what is important doesn’t get stalled. [https://gitter.im/nim-lang/Nim?at=5ac38ae97685a046389d4370] |
14:10:08 | FromGitter | <gogolxdong> knows how to make this right? |
14:10:19 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac38b4b27c509a774d21c03] |
14:11:36 | dom96 | mratsim: sure, are you volunteering to perform this review? ;) |
14:13:19 | FromGitter | <mratsim> @dom96 Why not. I can pick 3 hot RFCs and 3 stale RFCs every 3 weeks for a start. |
14:14:04 | dom96 | Extra points for writing an article on nim-lang.org ;) |
14:14:22 | dom96 | although I suppose forum might be better to foster a discussion |
14:14:57 | PMunch | Proque no les dos? |
14:15:10 | PMunch | Porque* |
14:15:24 | PMunch | Well, I guess there are more spelling mistakes there :P |
14:15:49 | PMunch | My point is that it wouldn't be that much extra work to word it in such a way that they could be copy-pasted into both locations |
14:16:49 | FromGitter | <zacharycarter> maybe an article to bring attention to the forum post :P |
14:17:07 | FromGitter | <mratsim> I think more people read the forum than the blog |
14:17:28 | federico3 | nothing wrong with posting on both |
14:18:12 | FromGitter | <Vindaar> People tend to read the forums more than the blog, simply because there's more activity there I'd wager. Both is imo the way to go (it's a good idea!) |
14:19:12 | dom96 | It's more likely that blog will be posted on HN/Reddit |
14:20:19 | FromGitter | <narimiran> @mratsim instead of 3 RFC every 3 weeks - 1 RFC per week? ;) |
14:21:26 | FromGitter | <Vindaar> @dom96 Indeed. And cross posting to HN/Reddit is a good way to promote that Nim's development is indeed very active and ongoing |
14:21:34 | FromGitter | <mratsim> The thing is, when I’m in something it’s easier to do more in one go. But if multiple people alternate it can be done |
14:22:18 | FromGitter | <narimiran> @Vindaar no posting on HN, please, to not be accused of nim-whoring, or whatever @dom96 received the other day :D |
14:22:38 | FromGitter | <Vindaar> What, I missed that. What happened? :O |
14:22:39 | dom96 | narimiran: that's only if you comment on Rust threads :) |
14:22:43 | FromGitter | <zacharycarter> only rustaceans seem to be annoyed about hearing about Nim |
14:22:49 | FromGitter | <zacharycarter> so IMO post more about Nim in rust threads |
14:22:51 | FromGitter | <zacharycarter> and in general |
14:23:32 | FromGitter | <narimiran> i usually post about nim in python threads, as this is how i found out about nim |
14:23:54 | FromGitter | <narimiran> and i think pythonistas are nice target group for nim |
14:24:12 | FromGitter | <Vindaar> agreed |
14:24:25 | FromGitter | <zacharycarter> so are people considering Rust :P |
14:24:43 | FromGitter | <mratsim> Btw, is there a Nim nightly builds for Windows? When trying to use koch in Appveyor, I have a strange issues where `nimble test`run the test files in for Nim instead of for my project …: https://ci.appveyor.com/project/jarradh/nim-ttmath/build/12/job/5um6l9idts1gl0ky#L1260 |
14:25:57 | FromGitter | <zacharycarter> @mratsim - https://github.com/nim-lang/Nim/blob/devel/appveyor.yml |
14:26:20 | FromGitter | <zacharycarter> I don't think there are any nightly builds of Nim |
14:26:21 | FromGitter | <zacharycarter> atm |
14:26:26 | dom96 | mratsim: why are you running `nimble test` in the compiler dir? |
14:26:35 | FromGitter | <mratsim> I’m not |
14:26:49 | * | yglukhov joined #nim |
14:27:08 | FromGitter | <mratsim> line 1255 there is a cd %CD% that takes me back to the project root and off the compiler dir (I think) |
14:29:18 | FromGitter | <mratsim> well I’ll put cd %CD% everywhere and pray |
14:30:32 | FromGitter | <narimiran> here you go @dom96 - another RFC :D |
14:32:41 | dom96 | mratsim: you must be, the above line installs the 'compiler' package |
14:32:46 | dom96 | I don't see how else it could do so |
14:33:39 | * | smt joined #nim |
14:36:10 | * | smt` joined #nim |
14:37:02 | * | athenot_ joined #nim |
14:38:37 | * | athenot quit (Ping timeout: 276 seconds) |
14:40:01 | * | smt quit (Ping timeout: 248 seconds) |
14:46:18 | * | endragor quit (Remote host closed the connection) |
14:46:45 | * | endragor joined #nim |
14:47:05 | * | skelett1 joined #nim |
14:48:56 | * | skelett quit (Ping timeout: 276 seconds) |
14:50:57 | * | endragor quit (Ping timeout: 240 seconds) |
15:00:02 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:01:01 | * | miran joined #nim |
15:01:45 | * | PMunch quit (Quit: Leaving) |
15:09:05 | Yardanico | I started to seeing much more notifications from nim repo (in issues/pr's), that's a good sign! |
15:09:48 | miran | Yardanico: and forum seems more lively to me |
15:10:15 | Yardanico | sadly I don't read nim forum anymore :/ should start reading it again |
15:11:20 | federico3 | Yardanico: could this be of help? https://github.com/nim-lang/nimforum/issues/57 |
15:13:28 | Yardanico | federico3, well, I've meant reading threads on the forum, but OK :) |
15:13:51 | Yardanico | I've never really did any web development in nim :D |
15:18:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
15:20:46 | FromGitter | <mratsim> I feel naked without a trusty castptr UncheckedArray[Foo (bar) |
15:24:32 | * | floppydh quit (Quit: WeeChat 2.1) |
15:24:51 | * | xkapastel joined #nim |
15:25:19 | dom96 | FromGitter really butchers the brackets |
15:26:44 | * | aguspiza joined #nim |
15:27:23 | FromGitter | <mratsim> It tries to be helpful. Yesterday I used `s/foo/bar/` and it actually replaced foo in my previous message :O |
15:27:48 | FromGitter | <mratsim> it’s Gitter itself that does the weird formatting |
15:28:21 | dom96 | yeah, it's a good bot |
15:28:34 | dom96 | Many moons ago its author was a Nim developer :'( |
15:30:12 | FromGitter | <zacharycarter> who? |
15:30:20 | dom96 | oprypin |
15:30:26 | FromGitter | <zacharycarter> oh yeah |
15:30:26 | dom96 | (sorry for highlight) |
15:30:40 | FromGitter | <zacharycarter> I was always curious what happened to him / her as well as fowl |
15:31:06 | dom96 | Hrm, I wonder what happened to fowl too |
15:32:55 | FromGitter | <zacharycarter> if - Billingsly Wetherfordshire - is fowl's real name |
15:32:56 | FromGitter | <zacharycarter> lolol |
15:33:00 | FromGitter | <zacharycarter> so awesome |
15:42:22 | * | Trustable joined #nim |
15:42:56 | * | yglukhov joined #nim |
15:43:29 | * | aguspiza quit (Ping timeout: 248 seconds) |
15:53:41 | * | smt joined #nim |
15:56:49 | * | smt` quit (Ping timeout: 248 seconds) |
16:01:33 | * | smt_ joined #nim |
16:01:34 | * | smt_ quit (Remote host closed the connection) |
16:04:46 | * | r3d9u11 joined #nim |
16:05:38 | * | smt quit (Ping timeout: 276 seconds) |
16:19:56 | * | sendell quit (Remote host closed the connection) |
16:21:01 | * | jrbrt joined #nim |
16:26:46 | * | SenasOzys quit (Ping timeout: 264 seconds) |
16:38:24 | * | r3d9u11 quit (Remote host closed the connection) |
16:44:02 | * | jaco60 quit (Ping timeout: 260 seconds) |
16:45:53 | * | Vladar quit (Ping timeout: 248 seconds) |
16:46:19 | * | Vladar joined #nim |
16:49:45 | * | Lysenkoism quit (Quit: ...is discredited) |
16:56:45 | * | nsf joined #nim |
17:00:24 | * | SenasOzys joined #nim |
17:01:36 | * | SenasOzys quit (Read error: Connection reset by peer) |
17:01:37 | * | SenasOzys_ joined #nim |
17:19:53 | * | Em_ joined #nim |
17:22:49 | * | Em_ quit (Client Quit) |
17:29:14 | * | aguspiza joined #nim |
17:30:04 | subsetpark | dom96: my understanding of `nimble test` is apparently imperfect. `nimble init` creates a test/ directory with test1.nim; however if i put something like `doAssert(false)` in that file and run `nimble test`, It still just prints out about verifying dependencies and then exits successfully. |
17:38:46 | * | qwertfisch joined #nim |
17:39:01 | dom96 | subsetpark: bug? Dunno |
17:42:29 | * | ofelas quit (Quit: shutdown -h now) |
17:43:09 | FromGitter | <Vindaar> @subsetpark: I was pretty confused about `nimble test` too. I also thought that there should be a default `test` task, which runs all tests in `./tests`, but it didn't work for me either. So in all my projects I simply define the `test` task myself as mentioned on the github page of Nimble https://github.com/nim-lang/nimble#tests |
17:43:47 | FromGitter | <Vindaar> So @dom96 it should actually still work? I thought it was maybe changed recently |
17:44:11 | dom96 | it should |
17:44:25 | FromGitter | <Vindaar> Hm, interesting |
17:44:39 | dom96 | Here is the code: https://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L1019 |
17:59:11 | FromGitter | <mratsim> it tests all files that start with a `t` iirc, like koch |
17:59:46 | FromGitter | <Vindaar> Huh, now I'm really confused. Just compiled nimble again from source and it works with that version. Tried again with the version in my PATH and suddenly that works too? I don't get it. @mratsim yep, that's true |
18:01:28 | FromGitter | <Vindaar> Ahh, no! It seems to be a problem with some projects |
18:01:34 | FromGitter | <mratsim> otherwise I use this test proc as a template: https://github.com/status-im/nim-rocksdb/blob/eb2bd02c5adf128fe9fe08b83dea0908257078c8/rocksdb.nimble#L11-L22 |
18:01:39 | FromGitter | <Vindaar> In one it works, in the other it doesn't |
18:02:12 | FromGitter | <mratsim> this way you call `test “your_test_file_without_extension” and it will compile it (and put the binary and nimcache in their proper place) |
18:03:20 | FromGitter | <Vindaar> ahh, thanks. that's nice! |
18:12:15 | FromGitter | <Vindaar> For some reason the `execBackend(optsCopy)` line breaks from the for loop in one of my projects |
18:12:41 | * | endragor joined #nim |
18:12:48 | * | jrbrt quit (Quit: Oíche mhaith) |
18:14:31 | FromGitter | <Vindaar> Hm, I have to leave now. I'll try to find out what's causing it tomorrow :) |
18:17:09 | * | endragor quit (Ping timeout: 256 seconds) |
18:19:53 | * | r3d9u11 joined #nim |
18:21:56 | * | jrbrt joined #nim |
18:24:16 | * | yglukhov quit (Remote host closed the connection) |
18:24:53 | * | yglukhov joined #nim |
18:29:45 | * | yglukhov quit (Ping timeout: 264 seconds) |
18:32:43 | FromGitter | <zacharycarter> interview with CSE went well - they said if I get the job I can't work on any side projects related to gaming |
18:32:48 | FromGitter | <zacharycarter> so no more nim game dev :/ |
18:35:04 | Yardanico | some NDA-related stuff? |
18:35:16 | * | ofelas joined #nim |
18:35:22 | FromGitter | <zacharycarter> I guess it's just a company policy |
18:35:32 | FromGitter | <alehander42> but why related to gaming |
18:35:36 | FromGitter | <alehander42> are they a gaming company? |
18:35:37 | FromGitter | <zacharycarter> it's a game dev studio |
18:35:38 | FromGitter | <zacharycarter> yeah |
18:35:41 | FromGitter | <alehander42> ah |
18:35:52 | FromGitter | <zacharycarter> http://citystateentertainment.com/ |
18:36:23 | FromGitter | <krux02> sorry to hear that |
18:36:33 | FromGitter | <zacharycarter> well - I have to get the job first :P |
18:37:35 | FromGitter | <zacharycarter> but thank you for the optimisim! |
18:38:28 | FromGitter | <alehander42> that's just @zacharycarter 's time to shine in compiler side projects! |
18:38:50 | FromGitter | <zacharycarter> +1 ^ |
18:39:10 | FromGitter | <krux02> well good luck with it. dont let yourself get exploited. |
18:39:19 | FromGitter | <zacharycarter> thank you! I'll try not to |
18:39:45 | * | skelett2 joined #nim |
18:40:56 | FromGitter | <krux02> well maybe people there will be like "wait in Nim you can do that. It is so simple? We need to change to Nim." and then it is a Nim full time job related to game development :P |
18:42:51 | FromGitter | <zacharycarter> this is the pipe dream |
18:42:57 | * | hogeland_ joined #nim |
18:44:19 | FromGitter | <wu-lee> newbie question: seems like a) You can't take a ref of a var. b) Object method polymorphism requires a ref. Therefore c) you can't have polymorphic var objects. Correct? |
18:45:12 | FromGitter | <krux02> well yea, but it is unrealistic. |
18:45:35 | FromGitter | <krux02> I have never heared of camelot unchained, but it reminds of of "Everquest Next" |
18:46:12 | * | avsej_ joined #nim |
18:46:12 | * | avsej_ quit (Changing host) |
18:46:12 | * | avsej_ joined #nim |
18:46:14 | * | vegax87_ joined #nim |
18:47:12 | FromGitter | <krux02> @wu-lee a ref is a pointer to something on the GC heap. a ref can only point to something that has been allocated on the GC heap. |
18:47:25 | FromGitter | <krux02> a var is on the stack |
18:47:45 | FromGitter | <krux02> therefore a var can't be transformed into a ref |
18:47:49 | * | skelett1 quit (*.net *.split) |
18:47:49 | * | dddddd quit (*.net *.split) |
18:47:50 | * | pqflx3[m] quit (*.net *.split) |
18:47:55 | * | vegax87 quit (*.net *.split) |
18:47:55 | * | avsej quit (*.net *.split) |
18:47:55 | * | hogeland quit (*.net *.split) |
18:47:55 | Yardanico | wu-lee why would you need a var for a ref though? you can modify ref values |
18:47:56 | FromGitter | <wu-lee> yep, what I thought |
18:48:04 | Yardanico | I mean ref variables :) |
18:48:06 | FromGitter | <krux02> but you can have polymorphic var objects. |
18:48:06 | * | avsej_ is now known as avsej |
18:48:27 | FromGitter | <krux02> it is just a different kind of polymorphism |
18:49:09 | FromGitter | <krux02> that pattern is known from C as tagged union. |
18:49:48 | FromGitter | <krux02> but it's not like virtual methods where the language automatically solves the molymorphism for you |
18:49:59 | FromGitter | <krux02> you would have to write your own branching statement |
18:52:00 | FromGitter | <wu-lee> @krux02 object variants, right? |
18:52:04 | FromGitter | <alehander42> or to write a macro that generates the branching for you |
18:52:52 | FromGitter | <krux02> @alehander42 let macros be for later |
18:53:01 | FromGitter | <krux02> @wu-lee yes |
18:53:15 | FromGitter | <wu-lee> @Yardanico, I might have an object I want to pass to a function accepting an immutable parameter |
18:53:58 | * | dddddd joined #nim |
18:54:42 | FromGitter | <wu-lee> (I think I can deref when passing, but not sure if that has a copying overhead) |
18:54:45 | miran | in CountTable, i have to manually check if a key exists, and if not - initialize it to zero? |
18:54:52 | * | pqflx3[m] joined #nim |
18:55:24 | FromGitter | <krux02> @wu-lee it is a hard problem to understand what is going on in your head. And it is hard for you to describe it. The most precise way to do it, post your code |
18:55:34 | FromGitter | <krux02> I prefer posting code on ix.io |
18:55:47 | * | nsf quit (Quit: WeeChat 2.0.1) |
18:56:06 | FromGitter | <krux02> but there are alternatives, a very good one is directly on github called gist |
18:56:12 | FromGitter | <alehander42> @krux02 I just did such a macro for object variants today, exactly because I didn't want to use methods & inh https://github.com/alehander42/poly#example ⏎ but still I think often one can relax the need for `var` and use methods |
18:56:15 | FromGitter | <wu-lee> Mainly I'm just trying to clear up the rules, when defining data. I am discovering I need to be more careful with my method signatures than I expected. |
18:56:31 | Yardanico | wu-lee: you can modify ref variable even if you've declared it with `let` |
18:56:41 | Yardanico | because `let` means that reference is immutable, not the value |
18:56:46 | Yardanico | (for ref type) |
18:57:20 | FromGitter | <alehander42> exactly ^ |
18:57:45 | FromGitter | <alehander42> I did use `var A` for that before because I just assumed it needs it to mutate fields |
18:57:48 | FromGitter | <wu-lee> @Yardanico, can a function declare it won't modify an object parameter? |
18:58:22 | FromGitter | <wu-lee> (function or method) |
18:59:48 | FromGitter | <krux02> @alehander42 that is interesting |
19:00:04 | FromGitter | <krux02> but I think I would prefer to have full pattern matching |
19:00:32 | FromGitter | <krux02> I mean a really good pattern matching library |
19:00:47 | FromGitter | <krux02> I think I have to write it on my own |
19:00:57 | FromGitter | <krux02> currently I write ast pattern matching |
19:04:36 | FromGitter | <data-man> @miran: You can just do ```yourtable.inc(value)``` |
19:11:58 | miran | data-man: nice! i've been trying to use `inc mytable[key]` and this throws an error, so i had made `if not mytable.haskey(key): ....` - your version is much nicer! |
19:13:38 | subsetpark | dom96: looks like the `nimble test` issue is a bug... here's the tail output with --verbose: |
19:13:41 | subsetpark | Setting Nim stdlib prefix to |
19:13:43 | subsetpark | Setting Nim stdlib path to /home/zax/.choosenim/toolchains/nim-0.18.0/lib |
19:13:45 | subsetpark | Info ???(???, 0) Error: internal error: n is not nil |
19:16:20 | dom96 | subsetpark: see here https://github.com/nim-lang/nimble/issues/456 |
19:16:31 | dom96 | weird issue |
19:17:05 | subsetpark | Hey, speak of the devil... |
19:18:29 | FromGitter | <krux02> @alehander42 did you know that this works: http://ix.io/16fu |
19:20:45 | * | Arrrr quit (Ping timeout: 264 seconds) |
19:23:14 | * | Pwntus quit (Ping timeout: 268 seconds) |
19:23:31 | * | Pwntus joined #nim |
19:33:58 | * | jrbrt quit (Quit: Oíche mhaith) |
19:48:10 | * | jrbrt joined #nim |
19:55:01 | * | athenot_ quit (Read error: Connection reset by peer) |
19:55:32 | * | rokups quit (Quit: Connection closed for inactivity) |
19:56:07 | * | athenot joined #nim |
20:02:18 | * | SenasOzys_ quit (Ping timeout: 256 seconds) |
20:05:16 | * | SenasOzys_ joined #nim |
20:21:15 | FromGitter | <zetashift> @zacharycarter good luck and if youg et in try to sneak in some Nim tools |
20:24:33 | FromGitter | <krux02> I heared it helps to say "it's just a prototype" and then in the end you would not want to port it to anything. |
20:28:21 | * | gokr quit (Ping timeout: 240 seconds) |
20:28:29 | * | r3d9u11 quit (Remote host closed the connection) |
20:29:09 | FromGitter | <zacharycarter> 😃 thanks! you know I will! 😉 |
20:37:33 | * | miran quit (Ping timeout: 264 seconds) |
20:37:36 | * | miran_ joined #nim |
20:41:38 | * | nsf joined #nim |
20:43:53 | * | yglukhov joined #nim |
20:44:13 | * | miran_ quit (Quit: Konversation terminated!) |
20:45:20 | * | Trustable quit (Remote host closed the connection) |
20:54:05 | * | r2 quit (Ping timeout: 240 seconds) |
21:01:17 | * | xet7 quit (Ping timeout: 260 seconds) |
21:02:30 | * | jrbrt quit (Quit: Oíche mhaith) |
21:06:55 | * | jrbrt joined #nim |
21:08:42 | * | Vladar quit (Quit: Leaving) |
21:10:20 | * | jrbrt quit (Client Quit) |
21:11:14 | * | xet7 joined #nim |
21:24:52 | * | donotturnoff quit (Ping timeout: 276 seconds) |
21:42:57 | * | jrbrt joined #nim |
21:43:43 | FromGitter | <krux02> What is with the builtin optional type? is that still relevant? |
21:50:56 | * | jrbrt quit (Quit: Oíche mhaith) |
21:52:07 | * | libman_ joined #nim |
21:53:41 | Araq | no. |
22:00:03 | subsetpark | No because we gave up on it, or no because it got superceded by something more general? |
22:03:02 | * | jrbrt joined #nim |
22:03:41 | * | nsf quit (Quit: WeeChat 2.0.1) |
22:08:03 | * | jrbrt quit (Quit: Oíche mhaith) |
22:08:44 | Araq | superceded by something more general, I guess. |
22:08:52 | Araq | a bit complex to explain |
22:09:58 | FromGitter | <zacharycarter> errr is this the Option type being referred to> |
22:10:38 | FromGitter | <krux02> nope, it is the system.opt type |
22:10:58 | FromGitter | <krux02> that has as special type kind |
22:11:00 | FromGitter | <krux02> tyOpt |
22:11:54 | FromGitter | <zacharycarter> oh |
22:12:05 | FromGitter | <krux02> Araq: in the macros package, why is there no way to get the symbol kind of a symbol? |
22:12:52 | FromGitter | <krux02> @zacharycarter I am just curious, what was for you the reason to learn and use Nim instead of Rust? |
22:12:56 | FromGitter | <mratsim> @krux02 Please vote: https://github.com/nim-lang/Nim/issues/7366 |
22:14:19 | * | yglukhov quit (Read error: Connection reset by peer) |
22:14:22 | FromGitter | <krux02> @mratsim I actually just started to create a pull request to fix that, because it is bothering me for quite a while now |
22:14:51 | * | yglukhov joined #nim |
22:14:59 | FromGitter | <krux02> I just forgot again how that `when` statement looked, so that I don't break bootstrapping |
22:16:03 | FromGitter | <zacharycarter> @krux02 - I wanted to write a game / game engine and do something beyond using UE4 / Unity / etc... ⏎ ⏎ So my options basically boiled down to C++ and SDL2 or using something like Allegro / Coscos etc... and I wasn't happy with those either. |
22:16:37 | FromGitter | <zacharycarter> I had heard / written hello world with Nim in the past, and when I started exploring Rust as an alternative I felt like I was writing C++ again |
22:17:20 | FromGitter | <zacharycarter> I was venting my frustrations with rust in a roguelike gamedev channel and someone brought up Nim - and that was the catalyst I guess |
22:18:05 | FromGitter | <zacharycarter> I was coming from other high level programming languages so, but I had experience with C/C++ programming in the past |
22:18:29 | FromGitter | <zacharycarter> Rust felt like I was swimming in complexity of C/C++ with extra layers added on top |
22:18:47 | FromGitter | <zacharycarter> Nim felt like something I was unfamiliar with but at the same time kind of used to |
22:19:23 | FromGitter | <krux02> that is interesting, do you still remember what your frustration with Rust was? |
22:22:20 | FromGitter | <zacharycarter> I was just now trying to find the tutorial that I had read originally when exploring Rust so I could try to figure out what was bugging me - but obviously it just gets harder and harder to find such a thing with the popularity |
22:23:05 | FromGitter | <zacharycarter> I have to guess - but I'm fairly confident it was the fact that a lot of concerns Rust addresses you don't deal with in higher level programming languages |
22:23:42 | FromGitter | <zacharycarter> so when I was directed to read a manual about a bunch of concepts that didn't necessarily apply to me getting started with a new language |
22:24:08 | FromGitter | <zacharycarter> I felt overwhelmed - and I also felt like I was just transitioning from struggling with C++ to Rust |
22:24:16 | FromGitter | <krux02> well rust has basically just one concept, borrowing and move semantics |
22:24:36 | FromGitter | <zacharycarter> yes but the explanation isn't that concise or clear is it? |
22:24:40 | FromGitter | <krux02> and different defaults than c++ (but still the wrong defaults) |
22:24:44 | FromGitter | <zacharycarter> instead we have to learn about the borrow checker |
22:25:16 | FromGitter | <zacharycarter> @krux02 - keep in mind I was a history major in college |
22:25:27 | FromGitter | <krux02> well I did not have that problem at all in Rust, because I knew c++ with move semantics already |
22:25:34 | FromGitter | <zacharycarter> so move semantics and borrowing weren't necessarily clear to me when I stumbled upon Rust / Nim |
22:26:36 | FromGitter | <krux02> there is something in Rust that I do not like, I can't implement an interface for a forein type. |
22:27:41 | FromGitter | <zacharycarter> I hadn't heard of a forein type before you mentioned it - just looking it up now |
22:27:57 | FromGitter | <mratsim> For me it was trying to use a tree data structure in Rust |
22:28:05 | FromGitter | <krux02> what I mean is a type that you do not own |
22:28:11 | FromGitter | <krux02> a type from a different package |
22:28:13 | FromGitter | <zacharycarter> gotcha |
22:28:27 | * | aguspiza quit (Ping timeout: 240 seconds) |
22:28:36 | FromGitter | <krux02> in nim I can just add procs to it, and generics will then eat the type and stop complaining |
22:28:41 | FromGitter | <krux02> in rust that's not possible |
22:29:21 | FromGitter | <zacharycarter> maybe we should create a website that highlights these issues w/ Rust and evangelizes Nim's solutions |
22:29:32 | FromGitter | <krux02> yea |
22:29:39 | FromGitter | <zacharycarter> then we'd really piss off the rustaceans on HN :P |
22:29:50 | FromGitter | <krux02> best approach: watch rust introduction videos, and show the Nim alternative |
22:29:58 | FromGitter | <krux02> btw that also works very well with python |
22:30:25 | FromGitter | <zacharycarter> yeah - if we could get someone producing videos for Nim comparing it to Rust / Python that'd be heaven for Nim I think |
22:30:42 | FromGitter | <mratsim> I would just focus on people pain points. |
22:30:54 | FromGitter | <mratsim> Python slow? —> Nim |
22:31:05 | FromGitter | <krux02> I recently saw a python talk that showcased new features of python3 with metaclasses and how awesome it is. And all I though was, good that I am in nim where I don't need metaclasses and all that crap in the video just to get a little bit of type safety. |
22:31:16 | FromGitter | <zacharycarter> I think the problem also is like - you can't just slap Nim in as a replacement for Python |
22:31:23 | FromGitter | <mratsim> Tired of C++ verbosity but want to keep memory under control —> Nim |
22:31:29 | FromGitter | <zacharycarter> currently I can't use Nim at work, because we can't talk to AWS w/ Nim |
22:31:39 | FromGitter | <krux02> it wasn't about performance even though it is at least as important |
22:31:46 | FromGitter | <data-man> D flexible? —> Nim :) |
22:31:47 | FromGitter | <krux02> AWS? |
22:31:53 | FromGitter | <zacharycarter> amazon web services |
22:32:04 | FromGitter | <mratsim> subsetpark has a good talk on how to use Nim on the critical path, and there is blog post about using Nim instead of Ruby for the hot path as well |
22:32:22 | FromGitter | <zacharycarter> what is hot vs critical path? |
22:32:27 | FromGitter | <zacharycarter> sorry <- newb |
22:32:28 | FromGitter | <mratsim> same* |
22:32:36 | FromGitter | <zacharycarter> oh okay |
22:32:55 | FromGitter | <mratsim> http://pyvideo.org/pygotham-2017/nim-a-new-option-for-optimizing-inner-loops.html |
22:33:04 | FromGitter | <krux02> well I think the most important construction sites in Nim are the bridges to other languages. |
22:33:08 | FromGitter | <mratsim> http://www.rubyflow.com/p/1j08ef-nim-for-the-discerning-rubyist |
22:33:25 | FromGitter | <krux02> I can imagine that at some point in time people can just use Rust packages from Nim and vice versa |
22:33:30 | FromGitter | <mratsim> Or a killer app that Nim does really well compared to other language |
22:33:50 | FromGitter | <mratsim> we need a better exportc for generics then |
22:33:50 | FromGitter | <zacharycarter> I don't know - people bitch about maintaining Python codebases |
22:34:13 | FromGitter | <krux02> I am developing a killer app: shaders in nim with closure |
22:34:14 | FromGitter | <zacharycarter> I think Nim really shines in that space |
22:34:15 | FromGitter | <mratsim> I agree, Python is a pain in production or to develop a test suite for |
22:34:39 | FromGitter | <data-man> killer app: shell written on Nim |
22:34:41 | FromGitter | <zacharycarter> I think bridging w/ other programming languages is good |
22:34:42 | FromGitter | <mratsim> the scientific packages are littered with “if isInstance(int) |
22:34:51 | FromGitter | <zacharycarter> but I think if you build a SDK like boto3 w/ Nim ppl will come |
22:34:55 | FromGitter | <krux02> I don't really understand why people started to like python in the first place |
22:35:13 | FromGitter | <mratsim> Because it’s rapid to prototype in |
22:35:18 | FromGitter | <mratsim> you get results fast |
22:35:28 | FromGitter | <zacharycarter> it's why nodejs has taken over |
22:35:49 | FromGitter | <mratsim> and a lot of people using Python are not software engineer but mechanical engineer or researcher in academia |
22:35:56 | FromGitter | <zacharycarter> yeah that too |
22:36:21 | FromGitter | <mratsim> Python is much better than Matlab once it got the equivalent packages |
22:36:25 | FromGitter | <krux02> nodejs has taken over because people are tired of using two programming languages at the same time and they thought: "which one can we throw out?" |
22:36:56 | FromGitter | <mratsim> I’m amazed at the number of CSS derivatives or compilers as well ... |
22:37:05 | federico3 | nah |
22:37:05 | FromGitter | <mratsim> and now the “CSS-in-JS” movement |
22:37:38 | FromGitter | <krux02> but Matlab has a really great documentation. The documentation was always a weak spot to open source matlab alternatives, but I never used the python matrix libraries. |
22:38:10 | FromGitter | <krux02> I just used matlab for a while. And then I saw some fortran functions and thought: "hmm, this matlab really got some inspiration from fortran" |
22:38:22 | FromGitter | <mratsim> docs bring people through organic Google search |
22:38:44 | FromGitter | <krux02> in the web word there is also this framework hell |
22:38:58 | FromGitter | <krux02> thousands of frameworks that all want to be the next big thing. |
22:39:08 | FromGitter | <mratsim> Matlab manage to get as mandatary in many engineering school. I know I had to learn Matlab for mechanical engineering |
22:39:16 | FromGitter | <krux02> but frameworks are all crap, because they are frameworks. |
22:39:22 | FromGitter | <mratsim> managed to get as mandatory* |
22:39:49 | FromGitter | <krux02> I had to use it for "Computer Vision" and "Machine Learning" courses. |
22:40:05 | FromGitter | <krux02> horrible university licenso that only worked when you were online |
22:40:10 | FromGitter | <krux02> no work on the train possible. |
22:40:26 | FromGitter | <krux02> but yea enough bashing matlab i think. this is the Nim char :P |
22:40:41 | FromGitter | <zacharycarter> you'd be surprised - very little JS code gets reused b/w the client and server w/ Node apps |
22:41:12 | FromGitter | <zacharycarter> I mean, thinking about it critically - how much could really be reused? type definitions? helper functions - maybe? |
22:41:20 | FromGitter | <krux02> @zacharycarter I have no idea what b/w and w/ means |
22:41:29 | FromGitter | <zacharycarter> b/w = between |
22:41:31 | FromGitter | <zacharycarter> w/ = with |
22:41:46 | FromGitter | <krux02> where do these come from? |
22:41:49 | FromGitter | <zacharycarter> my head |
22:42:05 | FromGitter | <krux02> I think it is really hard to read that |
22:42:08 | FromGitter | <zacharycarter> but I'm not that creative - so I'm sure I've stolen them from elsewhere |
22:42:53 | FromGitter | <krux02> yea if you want to use them, write a browser plugin for you that automatically replaces them for you with the corresponding words ;) |
22:42:58 | FromGitter | <zacharycarter> hahaha |
22:44:06 | FromGitter | <krux02> and honestly I have no idea how much code between client and server could be shared. |
22:44:39 | FromGitter | <krux02> but from gpu programming I know that sometimes I just want to move some calculation from client to server and vice versa. |
22:45:26 | FromGitter | <krux02> i would still just want to use that functionality at one position in the code base. |
22:45:28 | FromGitter | <zacharycarter> very little can - that's useful anyway |
22:45:58 | FromGitter | <krux02> but then there is also the reduction of coplexity when you only need to think in one language. |
22:46:18 | FromGitter | <krux02> just think about it, how cool is it in Nim that you can write marcros in nim as well? |
22:46:20 | FromGitter | <zacharycarter> also you fall into the pit of each browser using its own JS engine - and then having to use something like babel to produce ES to overcome that |
22:46:27 | FromGitter | <krux02> and then soon you can also write shaders in Nim |
22:46:35 | FromGitter | <zacharycarter> and then - node js supports different features than browser based JS |
22:46:40 | FromGitter | <krux02> and everything else, too. |
22:46:46 | FromGitter | <krux02> one language to program it all. |
22:46:54 | FromGitter | <zacharycarter> going to program myself in Nim |
22:47:08 | FromGitter | <mratsim> oh I saw a blog post from the guy who wrote babel. He was underage at the time |
22:47:11 | FromGitter | <krux02> well if you have a programming interface, then go ahead. |
22:47:23 | FromGitter | <zacharycarter> babel is probably my most hated enemy at this point |
22:47:27 | subsetpark | BTW y'all - at work I'm translating a simple pubsub system we're building into Nim. Check it out: https://github.com/makingspace/pubnub |
22:47:31 | FromGitter | <zacharycarter> I kind of want to do battle with this underage kid you're referring to |
22:47:39 | FromGitter | <krux02> I am not going to replace my neural network with a CPU and main memory :P |
22:48:24 | FromGitter | <krux02> I have no idea what pubnub is |
22:48:43 | FromGitter | <mratsim> @zacharycarter here you go: https://medium.com/@sebmck/2015-in-review-51ac7035e272 |
22:50:45 | dom96 | subsetpark: oooh, looks beautiful |
22:52:09 | FromGitter | <zacharycarter> subsetpark: looks sweet - what communication protocols will you end up supporting do you think? |
22:53:18 | FromGitter | <zacharycarter> @mratsim - babel is like a giant band-aid on top of JS |
22:53:30 | FromGitter | <zacharycarter> and it's a shitty off-brand one at that |
22:55:09 | FromGitter | <mratsim> it’s a band-aid because companies are stuck with Firefox 4 while devs want to move to the new shiny thing |
22:56:18 | FromGitter | <zacharycarter> I just don't think it's the right solution for the problem at hand - Nim, Typescript, etc... fine |
22:56:20 | FromGitter | <zacharycarter> babel is hell |
22:56:26 | * | jrbrt joined #nim |
22:57:05 | FromGitter | <zacharycarter> let's just all admin JavaScript is the common denominator and it sucks and there's no making it better |
22:59:22 | * | jrbrt quit (Client Quit) |
23:00:33 | FromGitter | <mratsim> WASM ! |
23:00:37 | FromGitter | <mratsim> the holy grail |
23:04:25 | FromGitter | <zacharycarter> heh |
23:04:58 | * | jrbrt joined #nim |
23:06:06 | * | jrbrt quit (Client Quit) |
23:06:09 | * | Sentreen quit (Ping timeout: 248 seconds) |
23:06:10 | FromGitter | <wu-lee> is there a way to clone a ref? like deepCopy but creates a destination ref of the right type? |
23:06:20 | * | xet7 quit (Remote host closed the connection) |
23:11:49 | FromGitter | <zacharycarter> subsetpark: not to kill the name for your project, but there already is a sass offering with the same name: https://www.pubnub.com/ - I thought I recognized pubnub from somewhere... |
23:12:16 | FromGitter | <zacharycarter> unless this is an implementation for their API - in that case disregard my message |
23:19:05 | * | jrbrt joined #nim |
23:19:48 | shashlick | wow majority of messages are from gitter |
23:21:40 | FromGitter | <zacharycarter> yah gitter! |
23:23:26 | * | Sentreen joined #nim |
23:23:59 | * | jrbrt quit (Client Quit) |
23:25:33 | FromGitter | <krux02> yes I used irc |
23:25:38 | FromGitter | <krux02> it really feels a bit old |
23:25:55 | FromGitter | <krux02> I preferr to have pictures and some embedding of stuff |
23:26:13 | shashlick | I've been using weechat for the last few days since matrix/riot is delayed and unreliable off late |
23:26:21 | FromGitter | <krux02> and the usage and setup of IRC is just horrible |
23:26:30 | shashlick | glowing-bear.org is pretty nice |
23:27:04 | FromGitter | <krux02> @mratsim WASM is not yet suitable for NIM. |
23:27:37 | FromGitter | <krux02> wasm is not for GC languages. So my suggestion is to improve usability of nim when GC is disabled |
23:29:28 | dom96 | IRC4Life |
23:29:42 | dom96 | I'm going to get that tattoo at some point |
23:30:00 | FromGitter | <krux02> by the way for everybody who cares I just created the pull request the exposes the kind of nim symbols |
23:30:57 | FromGitter | <zacharycarter> you can still use the GC w/ Nim |
23:31:02 | FromGitter | <zacharycarter> you just have to manually cycle it |
23:31:14 | FromGitter | <zacharycarter> nim and wasm I mean |
23:31:32 | FromGitter | <zacharycarter> you don't have to disable the GC - you just need to enable realtime gc support |
23:31:44 | FromGitter | <zacharycarter> @krux02 ^ |
23:33:54 | FromGitter | <zacharycarter> dom96: I'm going to get the ICQ4Lyfe tat and 1 up you |
23:34:34 | dom96 | :o |
23:34:57 | dom96 | I guess i'll have to get a BBS4LYFE tattoo then |
23:35:02 | FromGitter | <zacharycarter> hahaha |
23:36:44 | FromGitter | <krux02> https://github.com/nim-lang/Nim/pull/7491 |
23:38:13 | FromGitter | <krux02> am I correct that every thread has it's own GC and that when I want one thread to be realtime I can just make that one not allocate anything on the heap and when the other threads need a gc pause that one thread will just be able to contiue? |
23:38:43 | FromGitter | <krux02> I mean that's the advantage of thread local storage, isn't it? |
23:39:20 | dom96 | yep |
23:39:26 | dom96 | no stop-the-world :D |
23:39:59 | FromGitter | <krux02> well stop the thread |
23:40:12 | FromGitter | <krux02> but that's much better than stop the world |
23:41:13 | * | user1101 quit (Ping timeout: 260 seconds) |
23:41:56 | dom96 | Yeah, but you can explicitly call the GC |
23:42:07 | dom96 | so you know when the stop happens |
23:43:41 | FromGitter | <krux02> i mean there is still a way to create shared objects |
23:43:54 | dom96 | yeah, but they aren't controlled by the GC |
23:44:04 | dom96 | so you have to manage that memory yourself |
23:44:14 | FromGitter | <zacharycarter> https://github.com/yglukhov/nimx/blob/22289de7252d39e9be77f698dfa9aec522ec7fa8/nimx/private/windows/emscripten_window.nim#L404-L421 |
23:45:22 | FromGitter | <zacharycarter> I find the whole - you can rely on shared memory to alleviate the local thread heap / gc thing to be confusing |
23:46:11 | FromGitter | <krux02> yea I think that needs to be a bit more explicit. |
23:46:32 | FromGitter | <Varriount> @zacharycarter You up? |
23:46:45 | dom96 | 'night guys |
23:46:46 | FromGitter | <krux02> with explicit I mean better documented |
23:46:55 | FromGitter | <krux02> night to you |
23:46:58 | FromGitter | <krux02> thanks |
23:47:07 | FromGitter | <zacharycarter> like let's say I have the following code - ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ and I want to allocate this in shared memory [https://gitter.im/nim-lang/Nim?at=5ac4127a92f5d620578ee89a] |
23:48:05 | FromGitter | <zacharycarter> does that mean I'm calling `createShared` for foo.bar too? |
23:48:09 | FromGitter | <zacharycarter> and the string parameters? |
23:48:14 | FromGitter | <zacharycarter> Hi @Varriount - yes I am |
23:51:25 | FromGitter | <Varriount> @zacharycarter https://gist.github.com/Varriount/b4c817b46ea5c1b141af7791ff2dbcf7 |
23:51:55 | FromGitter | <Varriount> @zacharycarter It's an interesting challenge, trying to do the v4 signing process with as little memory allocation as possible. |
23:52:13 | FromGitter | <zacharycarter> I was about to say - no type defs |
23:52:27 | FromGitter | <zacharycarter> wow I'm impressed :D |
23:52:46 | FromGitter | <Varriount> It's not finished, but I'm getting there. |
23:53:03 | FromGitter | <zacharycarter> it's definitely looking good |
23:55:06 | FromGitter | <zacharycarter> @Varriount: what about https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L3241 ? |
23:55:52 | FromGitter | <zacharycarter> https://github.com/nim-lang/Nim/blob/d55e02ddf12662781cf89e2fd91473dbf7552e5a/lib/system/ansi_c.nim#L20 |
23:57:51 | FromGitter | <zacharycarter> also - I don't know if you like this style better or not but, you can do (I'm sure you already know this) - ⏎ ⏎ ```import ⏎ strutils ⏎ tables ⏎ algorithm ⏎ httpcore``` [https://gitter.im/nim-lang/Nim?at=5ac414ffc574b1aa3e63fa65] |
23:58:05 | FromGitter | <zacharycarter> I think anyway |
23:58:11 | FromGitter | <Varriount> @zacharycarter I'm using memcmp, not momcpy |
23:59:09 | FromGitter | <zacharycarter> I thought I linked to memcopy |
23:59:12 | FromGitter | <zacharycarter> oh |
23:59:14 | FromGitter | <zacharycarter> memcpm |
23:59:14 | FromGitter | <zacharycarter> sorry |
23:59:20 | FromGitter | <zacharycarter> > memcmp |