00:00:25 | FromGitter | <honewatson> https://gist.github.com/honewatson/583135c1b191119a3b3be3fdbfe8607b#file-concepts3-nim |
00:00:49 | Vantage_ | nice |
00:02:32 | FromGitter | <honewatson> @Vantage_ also an example of object variants with pattern matching from patty library |
00:02:32 | FromGitter | <honewatson> https://gist.github.com/honewatson/6631a96a10996ec9aea72de0fd881729 |
00:03:33 | Vantage_ | you use these often? |
00:06:27 | FromGitter | <honewatson> I was using a manual approach to Object variants but the Patty stuff means less code |
00:06:48 | * | smt_ quit (Read error: Connection reset by peer) |
00:07:18 | * | smt joined #nim |
00:08:10 | FromGitter | <honewatson> I think these libraries are my favourites so far |
00:08:15 | FromGitter | <honewatson> https://github.com/andreaferretti/patty |
00:08:27 | FromGitter | <honewatson> https://github.com/alehander42/zero-functional |
00:08:35 | FromGitter | <honewatson> https://github.com/5paceToast/pipe |
00:08:41 | FromGitter | <honewatson> https://github.com/onionhammer/nim-templates |
00:12:33 | FromGitter | <Bennyelg> Creating a macro which result a nimNode? |
00:17:10 | FromGitter | <krux02> @Bennyelg a macro always returns a nimNode. |
00:22:55 | FromGitter | <Bennyelg> yea I wanted to split my parsing into multiiple macros while iterating a file |
00:27:17 | * | enthus1ast quit (Remote host closed the connection) |
00:39:10 | * | Vantage_ quit (Quit: Leaving) |
00:43:28 | * | Lord_Nightmare2 joined #nim |
00:45:53 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
00:46:15 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
00:48:34 | * | yglukhov joined #nim |
00:53:09 | * | yglukhov quit (Ping timeout: 264 seconds) |
01:04:33 | * | SenasOzys__ quit (Ping timeout: 264 seconds) |
01:13:33 | * | Lord_Nightmare quit (Ping timeout: 264 seconds) |
01:22:33 | * | Lord_Nightmare joined #nim |
01:42:28 | * | athenot quit (Read error: Connection reset by peer) |
01:44:09 | * | athenot joined #nim |
01:47:54 | FromGitter | <Varriount> @honewatson "So I decided to write my own, with blackjack and hookers." |
01:51:15 | FromGitter | <ephja> @honewatson oooh, |> ! |
01:51:47 | FromGitter | <ephja> and `>>`? ;) |
01:56:25 | FromGitter | <ephja> lambda parameters don't seem to have the ability to shadow variables |
02:13:12 | FromGitter | <ephja> the code outline extension for vscode actually does show nim symbols; they're just not indented |
03:02:51 | * | endragor joined #nim |
03:32:23 | * | Sembei joined #nim |
03:33:09 | * | Pisuke quit (Ping timeout: 256 seconds) |
04:00:39 | * | dddddd quit (Remote host closed the connection) |
04:01:36 | * | vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
05:19:13 | * | nsf joined #nim |
05:49:55 | * | nigredo-tori joined #nim |
06:34:32 | FromGitter | <narimiran> @ephja @honewatson is pipe (`|>`) really needed in nim, when we can simply have `a.multi(b).add(c).div(d)`? |
06:44:37 | * | yglukhov joined #nim |
06:49:29 | * | yglukhov quit (Ping timeout: 268 seconds) |
06:53:42 | * | PMunch joined #nim |
07:06:36 | * | Ven`` joined #nim |
07:18:16 | * | jjido joined #nim |
07:19:04 | * | yglukhov joined #nim |
07:31:40 | * | xkapastel quit (Quit: Connection closed for inactivity) |
07:32:28 | FromGitter | <honewatson> Well its personal preference. None of what I listed is really needed |
07:34:38 | * | rokups joined #nim |
07:35:49 | * | Ven` joined #nim |
07:36:05 | * | Ven`` quit (Ping timeout: 240 seconds) |
07:53:30 | * | sendell joined #nim |
07:54:26 | * | Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:57:33 | * | Ven`` joined #nim |
08:02:35 | * | SenasOzys__ joined #nim |
08:12:17 | * | SenasOzys__ quit (Ping timeout: 248 seconds) |
08:15:23 | * | vlad1777d quit (Remote host closed the connection) |
08:15:48 | * | yglukhov quit (Read error: Connection reset by peer) |
08:16:30 | * | yglukhov joined #nim |
08:30:12 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:39:23 | * | jjido joined #nim |
08:39:55 | * | nigredo-tori quit (Quit: Page closed) |
08:44:49 | * | floppydh joined #nim |
08:49:23 | * | max3 quit (Quit: Connection closed for inactivity) |
09:16:15 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:29:44 | * | brainproxy quit (Ping timeout: 260 seconds) |
09:34:20 | * | brainproxy joined #nim |
09:42:50 | * | yglukhov quit (Read error: Connection reset by peer) |
09:42:57 | * | brainproxy quit (Ping timeout: 248 seconds) |
09:43:26 | * | yglukhov joined #nim |
09:46:24 | * | Vladar joined #nim |
10:04:03 | * | SenasOzys__ joined #nim |
10:16:34 | * | xet7 joined #nim |
10:17:41 | FromGitter | <mratsim> Yeah nothing is needed, let’s go back to assembly :P |
10:52:40 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:58:55 | * | brainproxy joined #nim |
11:06:47 | * | Tanger quit (Disconnected by services) |
11:07:14 | * | Tanger joined #nim |
11:09:20 | * | Ven`` joined #nim |
11:22:07 | * | hohlerde joined #nim |
11:23:02 | hohlerde | with the latest devel, passing a var parameter and returning the same parameter as a var from the procedure gives a compile error |
11:23:33 | Araq | hohlerde: interesting, gist/report it please |
11:23:38 | hohlerde | proc test2(s: string, data: var seq[cuchar]): var seq[cuchar] = |
11:23:47 | hohlerde | that doesn't work |
11:23:53 | Araq | yeah, that's expected |
11:23:58 | hohlerde | proc test1(data: var seq[cuchar]): var seq[cuchar] = |
11:24:03 | Araq | works |
11:24:04 | hohlerde | that works |
11:24:23 | Araq | that's the fix for the 'var T' loophole |
11:24:25 | Araq | :-) |
11:27:25 | * | vantage joined #nim |
11:28:05 | hohlerde | so, I need to use ptr if I want to return the same address for convenience reasons? |
11:31:24 | * | xet7 quit (Read error: Connection timed out) |
11:31:38 | * | brainproxy quit (Ping timeout: 276 seconds) |
11:31:45 | * | xet7 joined #nim |
11:31:51 | Araq | make 'data' the first parameter |
11:31:58 | Araq | and then it will compile |
11:32:07 | hohlerde | yea, tried that aswell, works |
11:33:28 | Araq | btw chaining is better done via a chaining macro |
11:33:45 | Araq | not by butchering every proc you write to return things you should already know |
11:33:54 | Araq | just to save some typing. |
11:34:08 | Araq | Nim is not C++. |
11:34:54 | hohlerde | yea, I know. I am not blaming anyone :-) |
11:35:51 | * | rockcavera quit (Ping timeout: 240 seconds) |
11:38:09 | FromGitter | <narimiran> chaining macro? |
11:40:24 | Araq | chain(x, foo(), bar()) --> foo(x); bar(x) for example. |
11:41:29 | Araq | or any other syntax you like to use. |
11:42:16 | FromGitter | <narimiran> god damn, i should really start to learn nim macros :) |
11:42:37 | FromGitter | <narimiran> but i get the idea, and i know what syntax would i like to have :) |
11:49:09 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:01:37 | * | SenasOzys__ quit (Ping timeout: 248 seconds) |
12:03:33 | * | Ven`` joined #nim |
12:05:31 | * | SenasOzys__ joined #nim |
12:06:20 | shashlick | We can now auto create and verify test cases from GitHub issue snippets, including error message detection, next step is to auto commit and PR - that code is already in nimble so should be very quick |
12:13:28 | FromGitter | <Bennyelg> Can I call macro from another macro? |
12:17:02 | PMunch | Bennyelg, sure |
12:17:38 | FromGitter | <Bennyelg> Can some one give me a piace of example code? |
12:25:54 | * | yglukhov quit (Read error: Connection reset by peer) |
12:26:30 | * | yglukhov joined #nim |
12:26:57 | PMunch | Bennyelg, it's just to call it like normal |
12:27:08 | PMunch | Or do you want to call it and get the AST to add to your output result |
12:27:22 | PMunch | Like result.add <output of my macro> |
12:31:45 | shashlick | araq: https://github.com/nim-lang/Nim/issues/2383 no longer crashes but is it fixed and can I create an error test case |
12:36:06 | Araq | shashlick: not that important |
12:36:27 | Araq | these tests we add are regresssion preventions |
12:36:48 | shashlick | it's almost all automated so I just have to run a command |
12:36:50 | Araq | the regression for this is unlikely, it will continue to fail with this error message until perhaps the VM supports deepCopy |
12:37:09 | Araq | everything is a tradeoff. |
12:37:11 | shashlick | ok then we can close the issue as is |
12:37:15 | Araq | yeah. |
12:38:11 | shashlick | ok please close then, i'll find another one to look into to implement the github automation |
12:38:15 | * | yglukhov quit (Remote host closed the connection) |
12:38:19 | Araq | lol ok |
12:38:25 | * | smt` joined #nim |
12:38:47 | * | yglukhov joined #nim |
12:42:21 | * | smt quit (Ping timeout: 264 seconds) |
12:43:13 | * | yglukhov quit (Ping timeout: 248 seconds) |
12:52:26 | * | vivus joined #nim |
12:55:30 | * | SenasOzys__ quit (Remote host closed the connection) |
12:56:38 | * | SenasOzys joined #nim |
13:00:42 | * | yglukhov joined #nim |
13:01:08 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:03:53 | * | xkapastel joined #nim |
13:12:10 | FromGitter | <alehander42> @krux02 I documented my idea for how gen code should look for general value matching |
13:12:41 | FromGitter | <alehander42> I think it should be quite compatible with the current approach |
13:13:11 | FromGitter | <krux02> ok let me have a look |
13:13:19 | * | yglukhov quit (Read error: Connection reset by peer) |
13:13:57 | * | yglukhov joined #nim |
13:13:57 | * | brainproxy joined #nim |
13:19:58 | * | simonsolnes quit (Ping timeout: 256 seconds) |
13:30:31 | * | user1101 joined #nim |
13:33:16 | * | Vladar quit (Quit: Leaving) |
13:33:41 | FromGitter | <krux02> @alehander42 well now it is abuto to extend the matching error type. because that type can tell you only about NimNode matching problems. |
13:35:46 | FromGitter | <krux02> And I would like to see how that generalized matching can be extended to mach something that was not designed for this pattern matching to work. For example some glue code that machs SDL2 events matchable (use SDL2 from here https://github.com/Vladar4/sdl2_nim, that is the superior wrapper. |
13:42:41 | FromGitter | <alehander42> yeah, the errors should be generic probably |
13:42:45 | FromGitter | <alehander42> can you give me an example or such a SDL2 event value? |
13:42:48 | FromGitter | <alehander42> i'll take a look |
13:43:44 | FromGitter | <krux02> well you can look in the exmales that are on Vladar4's sdl2 wrapper |
13:43:56 | FromGitter | <krux02> all of them match on events somewhere |
13:44:26 | * | simonsolnes joined #nim |
13:44:47 | FromGitter | <krux02> I know it's a lot of work to actually write software that is generally usable, in comparison to just barely working proof of concept. |
13:45:37 | FromGitter | <krux02> but if this works for general pattern matching, then it will improve the Nim language by a lot. |
13:46:59 | * | brainproxy quit (Ping timeout: 260 seconds) |
13:48:17 | FromGitter | <mratsim> Oooohh, awesome: https://github.com/nim-lang/Nim/commit/6667362c2f1cd0fc1fdb1dacb486528b928470d5 |
13:48:34 | FromGitter | <alehander42> that's exactly why I wanted to discuss this kind of changes, to make it generally usable, you don't need to remind me :D |
13:48:43 | * | dddddd_ joined #nim |
13:48:43 | FromGitter | <alehander42> i'll take a look a bit later at the examples |
13:49:03 | FromGitter | <alehander42> (I also have a lot of usecases for it in my own code) |
13:49:34 | FromGitter | <krux02> that is good. |
14:04:02 | * | endragor quit (Remote host closed the connection) |
14:09:09 | FromGitter | <alehander42> well sdl events look like ordinary `{.union.}` objects |
14:09:42 | FromGitter | <alehander42> so if the lib has support for `{.union.}` objects one should be able to match on any of the sdl types normally |
14:10:41 | * | xet7 quit (Read error: Connection timed out) |
14:11:15 | * | xet7 joined #nim |
14:11:27 | * | fvs joined #nim |
14:13:28 | FromGitter | <alehander42> btw `$` (unionobject) is broken |
14:14:14 | FromGitter | <alehander42> I am not sure it can have a good default impl anyway, but it shouldn't crash |
14:14:15 | FromGitter | <krux02> how would you define `$` on a unionobject? |
14:14:22 | FromGitter | <alehander42> ^ |
14:14:47 | FromGitter | <krux02> You are right it should not crash. |
14:14:52 | FromGitter | <alehander42> either something like "NameOfType (union)" or I wouldn't define it |
14:15:00 | FromGitter | <alehander42> still I think the first one makes sense |
14:15:13 | FromGitter | <krux02> I think it should produce nothing |
14:15:25 | FromGitter | <alehander42> well that would just be confusing |
14:15:40 | FromGitter | <krux02> the type name? |
14:15:44 | FromGitter | <krux02> or ... |
14:15:45 | FromGitter | <alehander42> one can echo debugging something somewhere and not realize it's actually outputing stuff |
14:15:45 | * | zahary_ joined #nim |
14:16:08 | FromGitter | <alehander42> type name and maybe some indication it's a union (so the user can say "aha, that's why it cant tell me more") |
14:16:22 | FromGitter | <krux02> well the language can't know what is allowed to access in a union and what is nod allowed |
14:16:33 | FromGitter | <alehander42> exactly |
14:17:01 | vantage | what do you guys think of this macro? https://github.com/jyapayne/nim-extensions/blob/master/oop_macro.nim |
14:17:51 | FromGitter | <mratsim> I suppose it’s not possible to define a compiler flag within a library right? I would like to define the noUndefinedBitOpts from: https://nim-lang.org/docs/bitops.html |
14:18:12 | FromGitter | <mratsim> I would have to ship a nim.cfg |
14:18:28 | dom96 | mratsim: I think the usual way to handle this is to give an error if a define isn't specified |
14:19:32 | FromGitter | <mratsim> I see |
14:20:40 | FromGitter | <mratsim> @Vantage, remind me when you learned Nim, wasn’t it like this week? wow awesome |
14:21:44 | FromGitter | <mratsim> it reminds of of Patty in terms of usage: https://github.com/andreaferretti/patty |
14:22:48 | * | endragor joined #nim |
14:23:00 | FromGitter | <mratsim> there is also interfaced that might be relevant: https://github.com/andreaferretti/interfaced/blob/master/test.nim |
14:24:45 | FromGitter | <alehander42> yeah, the variants definitions of patty is something that I would love to see in combo with krux02's pattern matching haha |
14:26:32 | FromGitter | <matrixbot> `ehmry` is there a performance tradeoff between passing an `array[N,X]` and `var array[N,X]` for large arrays? |
14:26:53 | FromGitter | <krux02> no |
14:27:03 | FromGitter | <krux02> but for lange arrays, you should better use `seq` |
14:27:05 | * | endragor quit (Ping timeout: 240 seconds) |
14:27:10 | FromGitter | <mratsim> beyon 3x word size, Nim pass by const ref |
14:27:13 | FromGitter | <krux02> and pass openarray |
14:28:00 | FromGitter | <alehander42> actually @krux02 unions could print their fields, just not their field values(obvs), if just there was a way to check if a type is an union |
14:28:32 | FromGitter | <krux02> @alehander42 what point is it to print field names, when you don't even know if such a filed exists? |
14:28:45 | FromGitter | <matrixbot> `ehmry` I am using large arrays, but I don't want to do any dynamic allocation |
14:29:01 | FromGitter | <matrixbot> `ehmry` and so far I haven't |
14:29:22 | FromGitter | <krux02> @matrixbot yea but arrays are stack allocated, and stack size is very limited, I think 2MB on windows |
14:29:25 | FromGitter | <matrixbot> `ehmry` but large for me is less than 1KIB |
14:29:46 | FromGitter | <krux02> well then it can be ok |
14:29:52 | FromGitter | <mratsim> I pass 256~512 bit arrays just fine for crypto. |
14:29:57 | FromGitter | <alehander42> @krux02 I am just surprised :D , otherwise not very good in this case |
14:30:02 | FromGitter | <krux02> the argument can still be `openarray` |
14:30:13 | FromGitter | <krux02> that doesn't do any dynamic allocation |
14:30:25 | FromGitter | <krux02> it is a pointer size pair |
14:30:52 | FromGitter | <matrixbot> `ehmry` right |
14:30:53 | FromGitter | <matrixbot> `ehmry` I do like openarray |
14:30:56 | FromGitter | <alehander42> one could get more info from typetratis |
14:33:19 | FromDiscord | <claude> i just realized nim's converters are like scala's implicit functions, do you guys think there'll be any other new features like scala's implicits in the future |
14:35:08 | FromGitter | <krux02> claude: no new features for now. The lanugage focuses on cleanung up mess and heading for 1.0 |
14:36:08 | FromGitter | <krux02> claude: the only "features" that is being worked on are concepts. |
14:36:21 | FromDiscord | <claude> yeah thats why i said future |
14:36:40 | FromGitter | <krux02> not really |
14:42:43 | * | xet7 quit (Read error: Connection timed out) |
14:43:15 | * | xet7 joined #nim |
14:45:05 | * | rokups quit () |
14:45:27 | * | rokups joined #nim |
14:49:43 | FromGitter | <krux02> I wonder how I can find of if an object is a union or not |
14:51:14 | FromGitter | <krux02> Araq: how do I know if an object is a union object? |
14:53:09 | * | PMunch quit (Quit: Leaving) |
14:57:29 | * | SenasOzys__ joined #nim |
14:57:38 | * | SenasOzys quit (Remote host closed the connection) |
14:57:55 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:59:35 | * | Ven`` joined #nim |
15:00:19 | * | miran joined #nim |
15:03:28 | * | endragor joined #nim |
15:03:57 | FromGitter | <alehander42> if there is a way to somehow `type.hasPragma` with typetraits on runtime that would work |
15:04:14 | * | endragor quit (Remote host closed the connection) |
15:12:07 | * | xkapastel quit (Quit: Connection closed for inactivity) |
15:14:05 | * | xkapastel joined #nim |
15:17:10 | * | brainproxy joined #nim |
15:20:27 | * | Vladar joined #nim |
15:20:29 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:23:40 | * | r3d9u11 joined #nim |
15:26:59 | * | Vantage_ joined #nim |
15:28:41 | * | dddddd_ is now known as dddddd |
15:39:42 | * | xet7 quit (Read error: Connection timed out) |
15:40:14 | * | xet7 joined #nim |
15:41:35 | * | xet7 quit (Max SendQ exceeded) |
15:41:57 | * | xet7 joined #nim |
15:43:19 | * | xet7 quit (Max SendQ exceeded) |
15:43:42 | * | xet7 joined #nim |
15:45:19 | * | xet7 quit (Max SendQ exceeded) |
15:45:41 | * | xet7 joined #nim |
15:47:26 | * | leorize joined #nim |
15:49:53 | * | brainproxy quit (Ping timeout: 248 seconds) |
15:49:58 | * | sendell quit (Remote host closed the connection) |
15:53:46 | * | arecaceae quit (Remote host closed the connection) |
15:54:05 | * | arecaceae joined #nim |
16:05:46 | Araq | krux02: by some tfUnion type flag internally, it's not (yet) exposed |
16:07:11 | FromGitter | <krux02> Araq: I am thinking if union should have been top level, so that overload resolution can be used |
16:07:52 | FromGitter | <krux02> for example ``proc fooT: union (arg: T)`` |
16:07:58 | FromGitter | <krux02> but I guess it is too late for that |
16:08:14 | Araq | .union is just a hack |
16:08:57 | FromGitter | <krux02> yea that might be, but it is quite important for C interop |
16:09:09 | FromGitter | <krux02> I don't recommend it for actualy software design |
16:09:45 | Araq | C interop doesn't require overloading since C lacks overloading too |
16:09:55 | FromGitter | <krux02> that is true |
16:10:09 | FromGitter | <krux02> I am not sure if it is a good idea |
16:10:22 | Araq | obviously it's very useful which is why it was added |
16:10:37 | Araq | but I don't want to make it an offical type or something like that |
16:11:09 | Araq | and arguably it should just have been a macro that produces accessors |
16:11:23 | Araq | which do 'cast' under the hood |
16:11:27 | FromGitter | <krux02> What is on my mind is just that instead of doing garbage for union types, there would be an error in the overload resolution. |
16:11:37 | FromGitter | <krux02> And that is much nicer to deal with |
16:11:52 | Araq | remove it and replace it by a macro. |
16:12:24 | Araq | whenever we deviated from Nim's core philosophy |
16:12:32 | Araq | the result has been bad. |
16:12:40 | * | athenot joined #nim |
16:13:03 | Araq | Nim is a simple, but not overly simplistic, language core plus a macro system. |
16:13:25 | FromGitter | <krux02> I think the union macro could work |
16:13:36 | FromGitter | <alehander42> @krux02 I thought about it and pattern matching shouldn't threat union objects specially, so just normal object matching should work well for most e.g. sdl types |
16:13:53 | Araq | and we add/change stuff it's for this goal. |
16:14:07 | Araq | for example, a more powerful macro system can slim down the core. |
16:14:37 | FromGitter | <krux02> Araq: yes the macro system is really important for Nim. |
16:14:38 | FromGitter | <alehander42> I am really not sure what do you imagine as "work with something not designed for this pattern matching" |
16:14:55 | FromGitter | <krux02> I don't know any other language that has macros that good as Nim has them |
16:15:16 | Araq | and as I keep saying, the best is yet to come. |
16:15:22 | Araq | :-) |
16:15:24 | FromGitter | <alehander42> as most usual type "shapes" should be flexible to be matched with support for objects/ref objects/variants/enums/seq/array |
16:15:40 | FromGitter | <krux02> today I made a few changes in the macros section of the Nim manual, because I think that part is a bit old. |
16:15:50 | Araq | indeed. |
16:16:06 | FromGitter | <krux02> I am not surce is two sections like statement macros and expression macros are a good idea |
16:16:17 | FromGitter | <krux02> but that part is not what I have changed so far. |
16:16:35 | Araq | yeah, it's basically outdated, describing how Nim used to work. |
16:16:49 | Araq | the expr/stmt split still exists but is relatively minor |
16:17:00 | * | smt` quit (Read error: Connection reset by peer) |
16:17:05 | FromGitter | <krux02> yes |
16:17:33 | FromGitter | <krux02> it should be noted somewher that you can do `foo(arg)` and `foo:\n\targ` |
16:18:02 | FromGitter | <krux02> and I would like to explain better how the types of the macro arguments work |
16:18:29 | Araq | we need the manual to start with Nim's syntax "harmony" idea. |
16:18:41 | FromGitter | <krux02> the types in the arguments are mostly for overload resolution, while in the macro, they are just `NimNodo`, and `static[T]` will be `T` |
16:18:50 | FromGitter | <Bennyelg> Can someone explain to me how come i can pass `nimNode` to a proc if the concept is the working on the AST before compile-time ? ⏎ I am pretty mixing concepts right now but I would like to get my hands on some explanation |
16:19:12 | FromGitter | <Bennyelg> *on compile time |
16:19:19 | FromGitter | <krux02> @Bennyelg you can have a proc that works on compile time |
16:19:26 | Araq | krux02: and typeDesc will be something special too and that's a design bug IMO. |
16:20:31 | FromGitter | <krux02> Araq: I think typeDesc, is a bit weird, too. For the most part I try to avoid using any typeDesc, directly. |
16:21:03 | FromGitter | <Bennyelg> so what is the diff between macro prefix and proc prefix |
16:21:06 | FromGitter | <krux02> I just use ``proc fooT (_ : typedesc[T]): void`` and then I use only `T` for the type |
16:21:09 | Araq | typeDesc is actually quite simple but I didn't understand it when I wrote it |
16:21:09 | * | BitPuffin joined #nim |
16:21:46 | FromGitter | <krux02> @Bennyelg: A macro transforms it's arguments into an abstract syntax tree |
16:22:13 | FromGitter | <krux02> Araq: interesting |
16:22:19 | Araq | I don't mind typeDesc, I understand it. I loathe static[T] fwiw |
16:22:37 | FromGitter | <krux02> fwiw? |
16:22:50 | Araq | for what it's worth |
16:26:23 | * | xet7 quit (Read error: Connection timed out) |
16:26:44 | * | xet7 joined #nim |
16:28:36 | FromGitter | <krux02> Araq: I don't know where the union pragma is defined |
16:29:10 | Araq | gg wUnion compiler |
16:29:20 | Araq | compiler/pragmas.nim |
16:29:20 | Araq | 58: wInheritable, wGensym, wInject, wRequiresInit, wUnchecked, wUnion, wPacked, |
16:29:20 | Araq | 940: of wUnion: |
16:29:49 | FromGitter | <krux02> ok, I'll do git grep :P |
16:30:30 | Araq | your loss. |
16:32:44 | FromGitter | <krux02> well yea it is |
16:33:03 | FromGitter | <krux02> hmm, but replacing {.union.} with a macro seems harder than I thought. |
16:33:26 | Araq | union Foo: |
16:33:31 | Araq | field: int |
16:33:35 | Araq | other: cstring |
16:34:07 | Araq | --> |
16:34:33 | Araq | template field(x: Foo): int = cast[ptr int](unsafeAddr(x)[] |
16:34:51 | FromGitter | <krux02> I mean the macro can't replace {.union.} pragame |
16:35:03 | Araq | who cares :-) |
16:35:16 | Araq | the hard part is how to declare the Foo object type |
16:35:27 | Araq | it needs max(sizeofs) |
16:35:39 | Araq | and that's mostly guessing. |
16:35:49 | Araq | also the alignment must be correct |
16:36:03 | Araq | array[8, byte] is different from 'float' |
16:36:13 | FromGitter | <krux02> I know |
16:36:28 | Araq | easy way out: |
16:36:32 | FromGitter | <krux02> you rememebr I tried (and failed) at implementing alignof and sizeof in the compiler |
16:36:43 | Araq | declare the 'real' field first. |
16:36:53 | Araq | let the programmer solve this problem. |
16:36:56 | FromGitter | <krux02> there are some weird configurations where float64 has 4 byte alignment |
16:36:58 | Araq | (yes, I do remember) |
16:37:27 | Araq | c2nim knows about .union though |
16:37:36 | Araq | argh. |
16:38:00 | FromGitter | <krux02> It wouldn't be hard if float64 had always 4 byte alignment, or always 8 byte alignment. Or on one system 4 byte alignement and on another system 8 byte alignment. But to find out, you have to know soo much |
16:38:37 | Araq | 4 byte alignment for float64 is bonkers |
16:38:40 | FromGitter | <krux02> it is the operationg system, it is C compiler flags, it is the CPU architecture |
16:38:40 | FromGitter | <mratsim> I think I read somewhere that it was 16 bit aligned at the very least |
16:39:02 | FromGitter | <mratsim> I want 8 bytes aligned floats for AVX2. |
16:39:14 | FromGitter | <mratsim> in an array/seq* |
16:39:38 | FromGitter | <krux02> @mratsim all basic types should be self aligned |
16:40:22 | FromGitter | <krux02> @Araq: well we can compile with a C flag for gcc that ensures self alignment |
16:40:42 | FromGitter | <mratsim> float32 should be 8 bytes aligned too, so that AVX2 intrinsics work properly |
16:40:45 | FromGitter | <krux02> I think other compilers have that flag too, because as you said, 4 byte alignment is bonkers. |
16:40:47 | * | r3d9u11 quit (Remote host closed the connection) |
16:41:25 | Araq | even better would be to do without alignment at all. it's outdated IMO. so you need 3 cycles for a Mul instead of 1 cycle for a shift, who cares -- a cache miss is 100 cycles and so packed data wins easily. |
16:41:27 | FromGitter | <krux02> but that would break C interop, when you want to communicate via a C struct that has this weird alignment. |
16:42:00 | FromGitter | <mratsim> @Araq, AVX2 cares ;) |
16:42:12 | Araq | I know but it's stupid. |
16:42:14 | FromGitter | <krux02> ^^ |
16:42:22 | FromGitter | <krux02> and no I don't think it's stupid |
16:42:47 | * | smt joined #nim |
16:42:52 | FromGitter | <krux02> for it is is like the byte size got bigger, but without breaking backwards compatibility |
16:43:34 | Araq | it's an understandable design, yes. |
16:43:42 | FromGitter | <krux02> I think with 64 bit systems we could easiliy make addresses into bit addresses and remove the concept of a byte entirely |
16:43:47 | Araq | but it's not required. |
16:43:55 | FromGitter | <krux02> but then keep alignment |
16:44:23 | FromGitter | <krux02> and then an array of booleans is just an array of bits |
16:44:30 | Araq | I'd rather use the 64bit pointers to to bit addressing |
16:44:36 | Araq | *to do |
16:44:47 | Araq | let me have my int18 |
16:45:12 | FromGitter | <krux02> with 18 bits? |
16:45:12 | Araq | the memory bus has been the bottleneck for over a decade now, might as well adapt to it |
16:45:43 | Araq | ok, maybe not a decade, but you get the point. |
16:45:47 | Araq | (yes, with 18 bits) |
16:46:46 | FromGitter | <krux02> Araq: maybe the concept of putting things into main memory and back should have an abstraction |
16:47:01 | FromDiscord | <claude> zig has int29 |
16:47:43 | FromGitter | <krux02> so that you can design a struct that get alignment when in cache, but as long as it's in main memory it is packed. |
16:48:26 | FromGitter | <krux02> in vhdl you have int18 if you want (I think) |
16:48:39 | FromGitter | <krux02> too long ago since I mad stuff in that. |
16:50:49 | * | vivus quit (Quit: Leaving) |
16:51:16 | Araq | https://i.stack.imgur.com/4Z1nU.png |
16:52:36 | * | max3 joined #nim |
16:53:51 | FromGitter | <mratsim> LLVM allows you to have int18 or uint200 if you want |
16:54:02 | FromGitter | <krux02> Araq: what do you think to enforce in Nim that all small datatypes are self aligned by default. No matter what a C struct would be by default. screw this 4 byte alignment of float64. |
16:54:33 | FromGitter | <krux02> and then when someone actually has to interact with such a weird type, this person has to use the packed pragma and insert the padding manually. |
16:56:23 | * | xet7 quit (Read error: Connection timed out) |
16:56:44 | * | xet7 joined #nim |
16:57:26 | * | rockcavera joined #nim |
16:57:36 | * | Trustable joined #nim |
17:00:40 | * | vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
17:00:49 | * | SenasOzys__ quit (Ping timeout: 248 seconds) |
17:03:50 | * | SenasOzys joined #nim |
17:04:15 | Araq | krux02: fine with me but let's see what arnetheduck says |
17:08:25 | FromDiscord | <treeform> Araq, I would like to fix this issue: https://github.com/nim-lang/Nim/issues/7499 But I would like some guidance on how to do that. I don't understand why repr/jsrepr is platform dependent. It should just turn types into strings? Why C does not appear to have a special $ for uints but js seems to require one? There appears to be a ton of magic in the repr module? I have a two line fix in the issue, but I don't think its a good one but it d |
17:08:26 | FromDiscord | <treeform> k for me. |
17:08:51 | miran | how do i install updated version of nimble package? |
17:10:03 | miran | just `nimble install foo` once again? but now i have two versions installed? |
17:10:32 | dom96 | yes |
17:12:16 | miran | do i need to uninstall the previous version? or will the newest version be automatically used? |
17:13:03 | Araq | treeform: it's hard to say. |
17:13:33 | Araq | the fix works for you but JS lacks unsigned integers (or integers for that matter) |
17:13:52 | Araq | I'm not a fan of emulating a real CPU on top of JS |
17:14:11 | Araq | for me "ugh, doesn't compile on JS" is a fair thing to do. |
17:14:31 | Araq | as long as we lack a real number emulation solution. |
17:14:52 | dom96 | miran: it will be used |
17:14:55 | Araq | people have complained about this but as long as nobody works on it, it's not gonna improve |
17:15:00 | miran | thanks dom96 |
17:16:06 | Araq | repr.nim is *old*, omg it's so bad lol |
17:16:11 | Araq | it uses RTTI. |
17:17:02 | FromGitter | <krux02> Araq: well in my opinion `repr` should be kept around for `NimNodes`, but nothing else |
17:17:17 | FromGitter | <krux02> but for that it can be renamed |
17:20:25 | FromGitter | <mratsim> btw what is the convention, putting the var parameter first or last? |
17:21:17 | miran | i guess it is because of nim case/style insensitivity, but i just figured out i cannot name my variables `foo_` |
17:21:26 | miran | yeah yeah, i know, use a better name.... |
17:21:44 | FromGitter | <mratsim> In python there are a lot of variables that begin or end with an underscore ;) |
17:22:07 | * | xkapastel quit (Quit: Connection closed for inactivity) |
17:22:19 | miran | mratsim: yeah, that's why i wanted to use them in this case :) |
17:22:40 | miran | beginning underscores have special meanings |
17:22:57 | FromDiscord | <treeform> Araq, for int64 and uint* do you think some thing like this is a good way? https://github.com/skilchen/jsInt64 |
17:24:48 | Araq | treeform: It's a start. it looks slow |
17:26:22 | Araq | you need to turn these operations into .compilerProcs and make the JS codegen emit them |
17:28:39 | Araq | do you know how to do this? |
17:34:11 | * | brainproxy joined #nim |
17:37:28 | Araq | https://blogs.msdn.microsoft.com/dotnet/2018/04/18/performance-improvements-in-net-core-2-1/ |
17:37:47 | Araq | so OpenArray[T] should be named Span[T] ? |
17:38:40 | FromGitter | <krux02> Araq: Warning: if you use the -malign-double switch, ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ada25a062316e0505e0d81a] |
17:39:36 | FromGitter | <krux02> I would like to mention that those ABI that rely on the fact that a double is aligned by 4 byes are broken by design. |
17:40:38 | FromDiscord | <treeform> Araq, so they are some thing like inline? Will inline work? |
17:40:40 | FromGitter | <krux02> So I would like to add "-malign-double" to the default flags of gcc |
17:41:00 | FromGitter | <krux02> treeform: inline is just forwarded to C inline (AFAIK) |
17:41:05 | Araq | treeform, no .compilerProc |
17:41:50 | FromDiscord | <treeform> Just add {.compilerproc.} to functions? |
17:42:00 | Araq | proc addInt64(...) {.compilerproc.} |
17:42:07 | Araq | in the JS codegen |
17:42:08 | FromDiscord | <treeform> yeah |
17:42:15 | Araq | "#addInt64(...)" |
17:42:25 | FromGitter | <krux02> span sounds like a good name to be. |
17:42:26 | FromGitter | <krux02> me |
17:43:15 | Araq | there are already examples in the JS codegen and it's got easier to read since somebody removed the PHP backend code |
17:47:59 | FromDiscord | <treeform> So like `toJSStr` is a `{.asmNoStackFrame, compilerproc.}`, but I don't see `#toJSStr` I see `useMagic(p, "toJSStr")`? |
17:48:25 | FromDiscord | <treeform> I don't see some thing like "#***(...)" in js code? |
17:49:55 | Araq | my bad, it's useMagic() then |
17:50:08 | Araq | which is wrongly named, you might want to correct that too. |
17:50:17 | Araq | it's useCompilerProc() |
17:53:56 | FromGitter | <krux02> Araq: I agree on the name ``span`` that is also the name of the _OpenArray |
17:54:00 | FromGitter | <krux02> in C++ |
17:54:58 | FromGitter | <krux02> Just that you people know it, I do like c++ for a lot of reasons, and C++ got a lot of things right, but it also fails at so many levels |
17:58:15 | Araq | Stroustrup is underrated. if that's even possible. :-) |
17:58:52 | FromGitter | <krux02> I am not sure if the good features of c++ came from stroustrup |
18:00:23 | Araq | afaik he invented destructors. |
18:01:25 | FromGitter | <krux02> destructors are a good thing in c++, but there are far too many ways you can get them wrong in combination with exceptions |
18:03:11 | FromGitter | <krux02> I was listening to cppcon talks and when they talk about exception safety you just think, how is anybody supposed to get that right on the first try? It's designed to introduce bugs. |
18:07:34 | * | brainproxy quit (Ping timeout: 264 seconds) |
18:07:37 | * | endragor joined #nim |
18:11:07 | * | endragor quit (Remote host closed the connection) |
18:14:58 | * | nsf quit (Quit: WeeChat 2.0.1) |
18:17:19 | * | DarkArctic joined #nim |
18:21:57 | * | xet7 quit (Read error: Connection timed out) |
18:22:44 | * | xet7 joined #nim |
18:25:38 | Araq | yeah well, I have an alternative exception design... |
18:26:22 | FromGitter | <krux02> since I basically avoid using exceptions everywhere, what is the core difference? |
18:27:01 | Araq | well Nim doesn't have it, but my newer idea is like this. |
18:27:54 | Araq | there is an implicit 'error: var Error' parameter that is passed around. it's implicit in calls, but not in parameter lists |
18:28:52 | Araq | if you are within a proc that has this parameter, it's passed implicitly. |
18:29:08 | Araq | to the procs you call that also have it |
18:29:46 | FromGitter | <krux02> ok |
18:30:03 | Araq | if your proc lacks it, you need to do the calls that have it via a macro |
18:30:14 | Araq | that can do something like: |
18:30:34 | Araq | (var err; foo(parameters; err); if err: quit err) |
18:31:16 | Araq | this implies that destructors can do error handling too |
18:31:28 | * | endragor joined #nim |
18:31:42 | * | endragor quit (Remote host closed the connection) |
18:31:47 | Araq | give the destructor this 'error' parameter and off you go, the destructor injections work with this implicit parameter |
18:32:14 | Araq | this turns the 'raises' effect into an ordinary parameter. |
18:33:04 | FromGitter | <krux02> but isn't it more of an additional result than a parameter? |
18:33:17 | Araq | well it's a 'var T' thingie :P |
18:33:47 | FromGitter | <krux02> yea a result passed as var parameter |
18:33:52 | FromGitter | <krux02> so it's a result |
18:34:01 | FromDiscord | <claude> so syntactic sugar for go's `if err != nil`? |
18:34:33 | Araq | er, no? |
18:35:33 | FromGitter | <krux02> When I wrote my go code, I wished I had some error sentinl that would panic whenever I assigned it something else than nil |
18:35:48 | Araq | it's one use case for implicit parameters. |
18:35:57 | Araq | these can be generalized. |
18:36:01 | FromGitter | <krux02> then I could have spared my if err != nil: panic everywhere |
18:36:11 | * | nsf joined #nim |
18:36:45 | FromGitter | <krux02> Araq before you add implicit parameters, I heared that Scala is so slow in compilation because of them. |
18:37:08 | Araq | I'm not adding anything. |
18:37:19 | FromGitter | <krux02> ok |
18:38:28 | Araq | but it surely is a cool design :P |
18:39:04 | Araq | slow compiles are dealt with by having symbol files btw. |
18:40:15 | FromGitter | <krux02> I wish someday the nim compiler is good enough that it can inrementally compile the nim compile in just a few seconds. |
18:40:38 | FromGitter | <krux02> nim compiler |
18:40:47 | FromGitter | <krux02> but it already got a lot better |
18:44:35 | * | floppydh quit (Quit: WeeChat 2.1) |
18:53:29 | Araq | treeform: please watch out that you don't use overloading for .compilerProcs, the code will be subtly buggy |
18:53:45 | Araq | should probably add a check for that in the compiler |
18:54:11 | * | Vantage_ quit (Quit: Leaving) |
18:59:52 | * | xkapastel joined #nim |
19:05:27 | FromGitter | <krux02> compilerProcs are procs that are callable from the VM but implemented in the compiler? |
19:11:39 | Araq | no, the VM most likely cannot even call them. |
19:11:48 | Araq | compilerProcs are helpers for the codegen. |
19:12:13 | Araq | the codegen says "too complex for me, I give up and let a Nim proc handle it" |
19:12:46 | Araq | like GCC can emulate floating point math by producing calls into some math runtime library. |
19:13:00 | Araq | if the CPU lacks an FPU. |
19:13:07 | Araq | same principle. |
19:13:29 | Araq | a compilerProc is a proc for the compiler, not for the programmer. :-) |
19:14:20 | FromGitter | <krux02> that is the exact reason why I think that WebAssembly will be very important in the future: It will be decited what instructions will be generated, after it is fully know which instructions do exist. |
19:15:12 | FromGitter | <krux02> simd and stuff like that can just be used and WASM will generate a fallback on platforms that doen't support it. I don't need to implement it twice. |
19:15:36 | Araq | it's not a new idea. |
19:16:09 | Araq | wxWidgets does the same, it emulates widgets that don't exist for the chosen target. |
19:16:43 | FromGitter | <krux02> yea but wxWidgets is not so low level as CPU instructions. |
19:17:17 | Araq | lowest-common-denominator vs emulate-what-is-missing |
19:17:31 | FromGitter | <krux02> with wxWidgets generating runtime branches is actually reasonable, with cpu instructions generating branches for each instruction not so much |
19:18:25 | Araq | I'm not convinced we shouldn't just have an x86 emulator in the browser :P |
19:18:40 | FromGitter | <krux02> yea |
19:19:06 | FromGitter | <krux02> I looked at x86 assembler, just trying to understand parameter passing |
19:19:41 | Araq | it's not hard, you're free to do it in any way that makes sense to you. :P |
19:19:42 | FromGitter | <krux02> parameters are put into registers with random names and no pattern behind it. And magically the called function does know in which registers the parameters are. |
19:19:57 | Araq | no, it's a calling convention. |
19:20:07 | Araq | there is no magic involved. |
19:20:19 | FromGitter | <krux02> Araq: and native client for chrome basically was x86 emulation |
19:20:33 | FromGitter | <krux02> it was binary code with some safety belts to not do shit. |
19:20:37 | Araq | it's arbitrary that's why it's so simple to understand :P |
19:20:48 | FromGitter | <krux02> it worked, but it did only do x86 and chrome |
19:21:12 | FromGitter | <krux02> the idea and people behind it are working on WASM now btw |
19:21:18 | * | brainproxy joined #nim |
19:21:35 | Araq | first parameter goes into EAX, then EDX, then ECX and then passed via the stack :P |
19:22:04 | FromGitter | <krux02> yea, I hate those register names |
19:22:23 | Araq | that's Borland's __fastcall which differs from MS's __fastcall, watch out :P |
19:22:25 | FromGitter | <krux02> because I have no idea what their names mean |
19:22:55 | Araq | extended-accumulator-register, destination-register, count-register |
19:23:45 | FromGitter | <krux02> yea still doesn't make any sense to me |
19:23:58 | Araq | extended is for 32bits |
19:24:17 | Araq | originally it was AX, DX, CX |
19:24:21 | FromGitter | <krux02> R0, R1, R2, R3, ... would have made sense to me. But I understand it, it has a lot of historical baggage. |
19:24:31 | Araq | yep. |
19:24:49 | Araq | for 64bits it's RAX, RDX, RCX btw |
19:25:11 | Araq | the R stands for "really extended now". nah, just kidding. |
19:25:37 | FromGitter | <krux02> it almost like c types: long double |
19:25:45 | Araq | yeah |
19:26:09 | Araq | was so hard to port my 16bit asm code to 32bit |
19:26:20 | FromGitter | <krux02> but in c++ I can do this: bool dozer; |
19:26:26 | FromGitter | <krux02> int eger; |
19:26:33 | FromGitter | <krux02> float ing; |
19:27:01 | Araq | only to realize it wouldn't work because the OS was not DOS anymore and stuff was protected in ring-1 |
19:27:04 | FromGitter | <krux02> double whopper; |
19:27:08 | Araq | lol |
19:27:13 | Araq | long double whopper; |
19:28:31 | FromGitter | <krux02> names for these things never realley stood the test of time |
19:28:42 | FromGitter | <krux02> just call them by the spec works best. |
19:29:29 | FromGitter | <krux02> it like calling something HD instead of 1920x1080 |
19:30:09 | FromGitter | <krux02> it's probably because marketing likes fancy names |
19:30:15 | * | brainproxy quit (Ping timeout: 256 seconds) |
19:30:29 | Araq | I like DOS names; executable, dynamic-link library, batch file. |
19:31:04 | Araq | contrast that with Unix: file (no, it's a stream), lib*.so (wtf), binary (as opposed to what? everything is in binary, it's a computer) |
19:31:54 | FromGitter | <krux02> yea I also like DOS names |
19:32:17 | FromGitter | <krux02> but I am ok with sh files |
19:32:29 | FromGitter | <krux02> it's a shell file, and shell is defined |
19:32:37 | FromGitter | <krux02> and it is replacable |
19:33:24 | FromGitter | <krux02> it can have an arbitrary interpreter, and it doesn't have the baggage to be called by something it isn't anymore |
19:33:51 | FromGitter | <krux02> script.sh script.zsh script.fish script.py, everything works |
19:34:28 | Araq | well when you a slogan like "everything is a file" and even that one is wrong, I begin to wonder about the clarity in their thinking. |
19:35:01 | FromGitter | <krux02> Well it was an idea to make everything a file |
19:35:10 | FromGitter | <krux02> It just didn't work out |
19:35:13 | Araq | no, a stream. :P |
19:35:34 | FromGitter | <krux02> yea a stream |
19:35:47 | FromGitter | <krux02> nowadays you should better avoid the stream object when you can. |
19:35:53 | FromGitter | <krux02> Memory map the file |
19:35:58 | * | noonien joined #nim |
19:36:12 | FromGitter | <krux02> almost every system is 64 bit. Mamory mapping large files is absolutely no problem. |
19:36:36 | FromGitter | <krux02> I would really like to memory map the Database. |
19:36:45 | FromGitter | <krux02> I mean the database on the server. |
19:37:11 | Araq | you can't use the cache effectively when you mmap(). |
19:37:24 | FromGitter | <krux02> No I want to do it, is a bit wrong. I would like to experiment with it, is more correct. |
19:37:34 | FromGitter | <krux02> why not? |
19:37:52 | FromGitter | <krux02> just because you mmap doesn't mean do don't cache. |
19:39:34 | FromGitter | <krux02> well maybe a cache miss on data that is on the sever on the other side of the earth is really killing all performane. |
19:39:44 | Araq | not what I mean. |
19:40:00 | Araq | but it's hard to describe and I should work on Nim instead. |
19:40:22 | FromDiscord | <geckojsc> Ok the thing I wish is that there was some accessible guide or something that would explain some of the basics of x86 x86_64 assembly in the same clear and friendly way that Araq just did |
19:40:24 | FromGitter | <krux02> One problem in C/C++ programming is already that it doesn't tell you anything about cach misses. I mean that is also one of it's strengths that you do not need to manually fetch data, but people who are now think that memory is all flat |
19:41:05 | FromGitter | <krux02> they get a wrong idea of how memory is acutally pushed thought the system. |
19:42:43 | FromGitter | <krux02> geckojsc: people say assembly is hard. But they don't say what is hard about it. Understanding Assembly and every assembly instruction is quite easy. The problem is, actually writing usable software in assembly is hard, and undersdanding assembly code written by someone else is even harder. |
19:43:05 | FromGitter | <krux02> but apart from that there is a way of programming in ASM that is very close to C programming. |
19:43:30 | FromGitter | <krux02> just that in ASM you can basically just generate yourself some instructions in a buffer and jump into it. |
19:43:43 | Araq | C has more traps than asm, but ymmv |
19:44:12 | FromGitter | <krux02> ymmv? |
19:44:49 | Araq | your mileage may vary. |
19:46:40 | Araq | C vs asm is an interesting topic, many asm programmers claim(ed) that the C compiler does a better job at translating C code to asm than they are able to. But on the other hand, when they write ASM they don't translate from C to begin with and produce much more efficient designs. |
19:49:16 | Araq | nowadays I should probably have said "transpiling C to ASM" :P it's claimed C is close to ASM, right? nobody uses a "C transpiler" though, they are all called "C compiler" |
19:49:57 | FromGitter | <krux02> you only say "transpiling" if you want to be a hip web developer |
19:50:08 | Araq | ha ha ha. |
19:50:16 | Araq | so true. |
19:54:06 | FromGitter | <krux02> poor web developers. People always make fun of them. |
19:55:18 | Araq | Mitleid gibt's umsonst, Neid muss man sich verdienen. |
19:58:00 | * | brainproxy joined #nim |
20:13:57 | * | r3d9u11 joined #nim |
20:14:27 | FromGitter | <krux02> I wonder if at some point the web will be just: "hey browser I rendered some text here, don't render it for me I already did that, but know that it is here and his this content" |
20:15:11 | * | rokups quit (Quit: Connection closed for inactivity) |
20:16:25 | FromGitter | <krux02> and all this artificial complexity around the DOM and stuff will be a relict from the past. That will work, but it won't change anymore and people will wonder how people where abe in the past to do things on the web with the tools we have today. |
20:17:39 | FromGitter | <krux02> maybe for static websites (hypertext, the original idea behind html) will still continue to exist. |
20:21:45 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
20:24:08 | Araq | isn't that what X11 does? |
20:24:38 | * | xet7 quit (Read error: Connection timed out) |
20:25:00 | Araq | the DOM is stateful and that causes lots of friction with react/Karax |
20:25:14 | * | xet7 joined #nim |
20:25:21 | shashlick | araq: is this fixed and ready to add test case? https://github.com/nim-lang/Nim/issues/2760 |
20:25:46 | Araq | so hopefully it will replaced by something better |
20:26:11 | * | jjido joined #nim |
20:26:36 | * | xet7 quit (Max SendQ exceeded) |
20:26:58 | * | xet7 joined #nim |
20:27:05 | Araq | shashlick: sadly I think this code should compile |
20:29:03 | shashlick | ok I'll comment on the thread stating that |
20:30:35 | Araq | doesn't look too hard to fix |
20:30:45 | Araq | though your tool can't do it :-) |
20:31:16 | shashlick | :D |
20:31:50 | shashlick | hey if it's repetitive, it's automatable |
20:32:33 | * | Vladar quit (Quit: Leaving) |
20:33:43 | FromGitter | <krux02> Araq: I try to work on my sizeof alignof now again |
20:34:01 | FromGitter | <krux02> args, why did you recommend me to put that sizeof alignof into a different file |
20:34:10 | FromGitter | <krux02> that is crap now to merge |
20:34:20 | Araq | because it now causes no merge conflicts? |
20:38:01 | * | SenasOzys quit (Ping timeout: 265 seconds) |
20:39:53 | FromGitter | <krux02> well, I prefer merge conflicts over lost updates |
20:40:25 | * | nsf quit (Quit: WeeChat 2.0.1) |
20:40:40 | FromGitter | <krux02> I will try to rewrite the history of my branch as if I never put stuff into another file and then merge with the deve branch |
20:41:02 | * | jrbrt joined #nim |
20:41:20 | Araq | lost updates? what do you mean |
20:42:40 | FromGitter | <krux02> the function got changed in the development brach of Nim |
20:42:55 | shashlick | dom96: https://github.com/nim-lang/Nim/issues/2650 <= seems fixed? |
20:47:12 | * | miran quit (Ping timeout: 265 seconds) |
20:47:50 | FromDiscord | <treeform> I think I am using templates more and more. At this rate I will not be writing nim code, just the templates I wrote... |
20:48:39 | FromGitter | <krux02> treeform: what are you talking about, `template` is a Nim keyword |
20:48:58 | FromDiscord | <treeform> I am taking about that my code does not look like nim code any more |
20:49:06 | FromDiscord | <treeform> because I use so many template |
20:49:08 | FromDiscord | <treeform> because I use so many templates |
20:49:24 | FromGitter | <krux02> what are you talking about? |
20:49:32 | * | SenasOzys joined #nim |
20:49:38 | FromGitter | <krux02> I use `template` a lot. Still I think it is Nim code |
20:50:00 | FromDiscord | <treeform> example: https://gist.github.com/treeform/4326879f11c809c7a13b886f4524b028 |
20:50:45 | FromGitter | <krux02> bq? |
20:50:50 | FromGitter | <krux02> that looks in fact weird |
20:50:53 | FromDiscord | <treeform> template |
20:50:58 | FromGitter | <krux02> why don't you use `quote`? |
20:51:16 | FromDiscord | <treeform> how would quote help? |
20:52:11 | FromGitter | <krux02> this really looks weird, and not how I would write code |
20:52:17 | FromGitter | <krux02> what are you generating? |
20:52:41 | FromDiscord | <treeform> SQL |
20:52:51 | FromDiscord | <treeform> there is what more nim like version looks like: https://gist.github.com/treeform/4326879f11c809c7a13b886f4524b028 |
20:53:27 | FromGitter | <krux02> no thanks, these integrated gists really crap up the performance of gitter |
20:53:32 | FromGitter | <krux02> barely usable now |
20:54:11 | FromDiscord | <treeform> Sorry man, I just sent a link. I am on discord not gitter. |
20:55:20 | FromDiscord | <treeform> Its actually amazing this bridge to bridge works at all. |
20:55:26 | Araq | treeform: for SQL construction, check out Ormin |
20:55:41 | FromDiscord | <treeform> I did, I don't think it can do what I want it to do. |
20:56:19 | FromDiscord | <treeform> It seems to be more of an ORM. |
20:57:34 | * | xet7 quit (Read error: Connection timed out) |
20:58:15 | * | xet7 joined #nim |
20:58:32 | * | Lord_Nightmare2 joined #nim |
20:59:13 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
20:59:25 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
20:59:37 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:01:55 | * | jjido joined #nim |
21:02:23 | Araq | yes |
21:02:28 | Araq | it cannot do what you need |
21:02:36 | Araq | but you can copy its DSL |
21:03:05 | Araq | because it's easier to work with than your raw AST stuff |
21:06:10 | FromDiscord | <treeform> that is probably true |
21:06:27 | FromDiscord | <treeform> Now that I leveled up my template stuff, maybe I can figure out the DSL code now. |
21:06:40 | FromGitter | <krux02> I know scala has some views on the database that let you do queries like they were basic scala code |
21:06:49 | FromGitter | <krux02> the code is then translated into sql |
21:06:57 | FromGitter | <krux02> pretty cool I think |
21:07:04 | FromGitter | <krux02> but it can't do everything |
21:07:33 | * | Lord_Nightmare2 joined #nim |
21:08:32 | FromGitter | <krux02> I think you can map NimNodes to sql constructs |
21:08:49 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
21:09:05 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
21:11:18 | * | r3d9u11 quit (Remote host closed the connection) |
21:15:18 | * | Jesin joined #nim |
21:20:44 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:25:02 | * | xet7 quit (Remote host closed the connection) |
21:25:50 | * | jjido joined #nim |
21:55:45 | * | Vantage joined #nim |
21:58:01 | * | DarkArctic quit (Disconnected by services) |
21:58:17 | * | juanfra joined #nim |
21:58:26 | * | DarkArctic_ joined #nim |
21:59:59 | * | Jesin quit (Quit: Leaving) |
22:07:46 | * | nsf joined #nim |
22:12:32 | * | Vantage quit (Quit: Leaving) |
22:14:25 | shashlick | araq: I think you might want to check out tissue for debugging nim issues - run `tissue -e issueid` and it will download the snippet from the issue and run it locally in the foreground. You can edit the snippet or nim code and rerun easily |
22:14:33 | shashlick | curious if it helps your workflow |
22:19:02 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:21:15 | * | nsf quit (Quit: WeeChat 2.0.1) |
22:22:44 | Araq | shashlick: is it a nimble package or what? |
22:39:04 | * | Trustable quit (Remote host closed the connection) |
22:48:45 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:51:10 | shashlick | Not yet, I'll make it one |
22:52:02 | shashlick | https://github.com/genotrance/tissue |
22:52:59 | * | simonsolnes quit (Ping timeout: 260 seconds) |
23:00:57 | * | DarkArctic joined #nim |
23:05:37 | FromGitter | <zacharycarter> haha awesome name |
23:06:10 | dom96 | shashlick: Nice. Any reason you're not following code conventions though? :) |
23:06:25 | dom96 | tconfig should be Config |
23:06:30 | dom96 | and CONFIG should be config |
23:07:43 | FromGitter | <zacharycarter> dom96: playground should be ready tomorrow |
23:07:50 | dom96 | great |
23:08:02 | FromGitter | <zacharycarter> also - I think I've been given the greenlight to use Nim at work |
23:08:14 | FromGitter | <zacharycarter> in some capacities |
23:08:22 | FromGitter | <krux02> great |
23:08:37 | Demos[m] | yayayayay! |
23:08:50 | FromGitter | <zacharycarter> I threw a huge fuss yesterday in front of some team members and basically said - I'm not going to be around long |
23:08:57 | FromGitter | <zacharycarter> because of poor engineering standards |
23:09:22 | FromGitter | <zacharycarter> and then the directory of my business unit and my manager met with me yesterday afternoon and today and talked about all my issues and I said we need a native language and a language like go or nim |
23:09:42 | FromGitter | <zacharycarter> and I said go would be useful for certain things and nim could help us use high performant c code without managing memory |
23:10:15 | FromGitter | <krux02> well to be honest, the C interop from Go isn't bad at all. |
23:10:24 | FromGitter | <krux02> They made a very clean intarface. |
23:10:27 | FromGitter | <zacharycarter> so the feedback I got was that these things are very possible - they're not going to happen right away - but in the near future I think we may be writing CLI tools, some SEO tooling, etc... with Nim |
23:10:34 | FromGitter | <zacharycarter> well I know - we're going to use Go too |
23:10:43 | FromGitter | <zacharycarter> I wrote Go all day today |
23:10:49 | FromGitter | <zacharycarter> instead of Java / Groovy for once |
23:10:53 | FromGitter | <zacharycarter> it was glorious! |
23:11:05 | FromGitter | <krux02> Go is great when the altearnative is that |
23:11:10 | FromGitter | <zacharycarter> right! |
23:11:12 | FromGitter | <mratsim> I heard that Go interop has some overhead though (probably only relevant for numerical code) |
23:11:29 | FromGitter | <krux02> I don't know about the overhead I never measured it. |
23:11:46 | FromGitter | <krux02> But the way you interface C is so clean that I just have to like it. |
23:11:51 | FromGitter | <zacharycarter> I need to help @Varriount with the aws stuff - but I've had so much going on in my personal life |
23:12:21 | FromGitter | <zacharycarter> @mratsim - are you at all interested in cloud providers and Nim for work? |
23:12:51 | dom96 | The advantage Nim brings is that you can interface to C++. No other language can do it as well as Nim (except C++ :)) |
23:12:54 | FromGitter | <krux02> it's not that it is super trivial and everything, you still need to write wrappers, but it still has this clearly defined boundary between Go and C code |
23:12:55 | FromGitter | <zacharycarter> I know our BDFL has been working on some stuff - I don't want to spill any details but |
23:13:12 | FromGitter | <krux02> bdfl? |
23:13:13 | dom96 | How clean is Go's C interop compared to Nim's? |
23:13:18 | FromGitter | <mratsim> @Araq, naming openarray span would be an improvement, OpenArray is so strange if you don’t come from Pascal Modulo ... |
23:13:23 | FromGitter | <zacharycarter> benevolent dictator for life |
23:13:28 | dom96 | mratsim: span? |
23:13:32 | Demos[m] | @dom96: Actually .... I think D wins over nim for c++, just because of Calypso |
23:13:42 | dom96 | mratsim: that's an HTML element :P |
23:13:46 | FromGitter | <mratsim> @dom96 span like C++17 ;) |
23:13:47 | FromGitter | <krux02> dom96: very clean, first of all, C interop types are not defined in system, they have their own namespace |
23:13:51 | FromGitter | <krux02> called C |
23:13:51 | dom96 | Demos[m]: How? |
23:13:57 | FromGitter | <krux02> C.int, C.float, etc |
23:13:57 | FromGitter | <zacharycarter> dom96: well - we might be using C++ in the future too who knows |
23:14:06 | FromGitter | <mratsim> @dom96 I believe D has better C++ inter, well marketing wise at least |
23:14:12 | FromGitter | <mratsim> interop |
23:14:16 | FromGitter | <zacharycarter> but D is dead |
23:14:20 | FromGitter | <zacharycarter> deader than dead |
23:14:21 | FromGitter | <krux02> D can link to c++ |
23:14:23 | Araq | lol |
23:14:24 | Demos[m] | Calypso extends the llvm d compiler to actually merge the C++ and D ast |
23:14:29 | dom96 | mratsim: lol, you're saying D's marketing makes you think that? :P |
23:14:40 | FromGitter | <mratsim> :P |
23:14:42 | FromGitter | <zacharycarter> I'm not typing Araq anymore |
23:14:47 | FromGitter | <zacharycarter> besides that one last time |
23:14:52 | FromGitter | <krux02> I know I played a game from the creator of the D language |
23:14:58 | Araq | hey |
23:15:02 | FromGitter | <krux02> Empire: Wargame of the Century. |
23:15:10 | FromGitter | <mratsim> @dom96: Here you go about span - https://github.com/nim-lang/Nim/issues/7337#issuecomment-373580383 |
23:15:13 | Demos[m] | but like Calypso is a massive project |
23:15:21 | FromGitter | <zacharycarter> wut's Calypso? |
23:15:38 | FromGitter | <mratsim> Rust call that “Slice”: https://github.com/nim-lang/Nim/issues/7337#issuecomment-373758177 |
23:15:53 | Demos[m] | https://wiki.dlang.org/Calypso |
23:15:58 | FromGitter | <mratsim> @zacharycarter cloud providers, like AWS? |
23:15:59 | dom96 | krux02: Sure, that's cleaner, but in practice does that really make anything easier/better? |
23:16:08 | FromGitter | <krux02> @mratsim yea but that name is taken. |
23:16:17 | FromGitter | <krux02> dom96: I never said that |
23:16:31 | FromGitter | <krux02> and yes I want the c types to be gone from systeam |
23:16:36 | FromGitter | <mratsim> Ranges is taken as well, so only Span is left :P |
23:16:39 | FromGitter | <zacharycarter> @mratsim yes |
23:16:48 | FromGitter | <krux02> I want them, but they should be required to be imported |
23:16:49 | Araq | I want system.nim to be gone |
23:16:57 | FromGitter | <krux02> cint should not be available right away. |
23:17:07 | Araq | yeah because reasons. |
23:17:27 | FromGitter | <krux02> Araq: I want a pony. |
23:17:38 | FromGitter | <mratsim> @zacharycarter At one point yes, I would love to have easy Arraymancer deployment on AWS GPU instances. |
23:17:41 | FromGitter | <krux02> No honestly I don't want a pony. |
23:17:56 | FromGitter | <krux02> A pony just poops in the garden |
23:18:09 | FromGitter | <mratsim> @krux02 here you go: https://pjreddie.com/static/Redmon%20Resume.pdf |
23:18:10 | dom96 | Demos[m]: That's pretty cool. Nim's approach is surely the best first-party interop though ;) |
23:18:34 | FromGitter | <zacharycarter> @mratsim - well I know you're always busy, but if you get time maybe you, @Varriount and myself can work on this AWS library - @Varriount has already done a ton of work and I've just been lazy |
23:18:40 | FromGitter | <mratsim> Note that this guy is a star in the deep learning world, his repo has 7k+ stars: https://github.com/pjreddie/darknet |
23:19:30 | Demos[m] | yeah probably, although C++/CIL is pretty good as well |
23:19:47 | FromGitter | <mratsim> @zacharycarter can’t promise anything yet, but give me the link I’ll check it out :) |
23:20:11 | Araq | you know what's best for C++ interop? when you have a working destructor system. :P |
23:20:31 | Araq | which D ... has? hasn't? not sure. |
23:20:35 | Demos[m] | :D |
23:20:43 | FromGitter | <zacharycarter> yo wait - is this guy really like one of those MLP lovers? |
23:20:47 | Araq | Rust has it. we are still getting it. |
23:20:49 | dom96 | mratsim: favourite languages: C, Python. Sounds like somebody needs to be introduced to Nim :P |
23:20:50 | FromGitter | <zacharycarter> bronies |
23:20:53 | FromGitter | <zacharycarter> I forgot the name |
23:20:53 | dom96 | I love bronies |
23:20:56 | FromGitter | <zacharycarter> lol |
23:21:04 | FromGitter | <zacharycarter> okay sorry I'm derailing- I'll shut up |
23:21:37 | Demos[m] | imo you really want a good finalizer system as well. There's lots of resources that you really don't need cleaned up immediately |
23:22:26 | FromGitter | <mratsim> “The heap is a lie" |
23:22:40 | dom96 | In any case, I was able to interface with clang's C++ codebase fairly easily |
23:22:57 | FromGitter | <zacharycarter> you know the #1 feature I would love for Nim - a way to do more performant multi-threading without having to resort to channels or locks / mutexes / etc - while still leveraging some sort of managed memory |
23:22:59 | dom96 | It all works beautifully |
23:23:17 | dom96 | zacharycarter: what's your use case? |
23:23:25 | FromGitter | <zacharycarter> I want to leverage things like fibers |
23:23:27 | FromGitter | <krux02> @zacharycarter what do you mean? |
23:23:31 | FromGitter | <krux02> fibers? |
23:23:33 | FromGitter | <krux02> what is that |
23:23:34 | FromGitter | <mratsim> regarding that, WHy was the actor library deprecated? I was looking into that to implement multithreading for my go playing bot |
23:23:49 | FromGitter | <mratsim> @krux02 fibers are fancy coroutines / green threads |
23:23:52 | FromGitter | <zacharycarter> https://en.wikipedia.org/wiki/Fiber_(computer_science) |
23:23:55 | Araq | mratsim: threadpool.nim is just better, that's why. |
23:23:57 | * | krux02 joined #nim |
23:24:08 | dom96 | We don't need fibers. We've got async. |
23:24:26 | Araq | yeah I told him but he isn't convinced. |
23:25:03 | FromGitter | <krux02> @mratsim well that doesn't reall answer what that is |
23:25:10 | FromGitter | <mratsim> @zacharycarter I use OpenMP for performant multithreading without channels or lock :P but that’s for data parallel algos |
23:25:20 | FromGitter | <zacharycarter> I get that - but when you start writing a game engine with a job scheduler it's hard to fit all the functionality needed into a single thread |
23:25:52 | FromGitter | <zacharycarter> you want something to schedule tasks |
23:25:59 | FromGitter | <krux02> Once use OpenMP for multithreading and then took it out, because when you have 16ms for a frams, you don't do OpenMP |
23:26:21 | FromGitter | <zacharycarter> you generally want wokers that are executing tasks |
23:26:24 | Araq | system.nim, 4000 lines of code but boy that 10 lines full of c* types must be erased... |
23:26:32 | FromGitter | <krux02> @zacharycarter what do you really need to do is so many threads? |
23:26:48 | FromGitter | <mratsim> @zacharycarter I asked about multi threading yesterday you might want to check the logs, I got the following links: https://github.com/yglukhov/nimx/blob/master/nimx/private/worker_queue.nim, https://github.com/dom96/nim-in-action-code/blob/b63d8111b65ea4dcb1321a4c4f64807ee0ea62b5/Chapter3/ChatApp/src/client.nim#L42, https://rosettacode.org/wiki/Dining_philosophers#Nim |
23:26:56 | FromGitter | <zacharycarter> alright I'll read these |
23:26:58 | FromGitter | <zacharycarter> thank you |
23:27:29 | FromGitter | <krux02> really people, a single thread has already crazy amounts of computational power, you just need to use it. |
23:27:45 | FromGitter | <zacharycarter> it's not about spreading computational power |
23:27:48 | Araq | krux02 but it does not SCALE |
23:27:50 | FromGitter | <krux02> write efficient code then you don't need crazy amount of processorts |
23:28:29 | FromGitter | <krux02> Araq: a game never scales |
23:29:03 | FromGitter | <zacharycarter> http://etodd.io/2016/01/12/poor-mans-threading-architecture/ |
23:29:27 | Araq | Eve online scales. because it uses Erlang servers. |
23:29:38 | FromGitter | <zacharycarter> they used to use stackless python |
23:29:46 | FromGitter | <zacharycarter> also they do time dilation or whatever |
23:29:56 | Araq | I wasn't serious. |
23:29:58 | shashlick | Missing the action, in the grocery store |
23:30:00 | FromGitter | <zacharycarter> oh |
23:30:18 | shashlick | dom96 I'll make the changes |
23:30:32 | FromGitter | <zacharycarter> I dunno - I think the BEAM VM has some nice use cases |
23:30:38 | FromGitter | <zacharycarter> especially in enterprise software dev |
23:30:59 | FromGitter | <mratsim> Scotty BEAM me up |
23:31:06 | FromGitter | <mratsim> (sorry couldn’t resist) |
23:32:30 | FromGitter | <zacharycarter> like - if fault tolerance, resiliency, redundancy, etc... are all goals of your architecture |
23:32:40 | FromGitter | <zacharycarter> why not leverage a design that has those goals in mind? |
23:36:34 | FromGitter | <krux02> @zacharycarter well most importantly is that you actually have something that you need parallelization for. When you code runs slow, before you do any multithreading or stuff in that diriction make sure your to know where you spent most of your time. Then do proper layouts in memory and make sure it runs fast. When you did all of that, check if you still need multithreading. |
23:36:53 | FromGitter | <krux02> the only thing where I see multithreading to be really an improvement is in resource loading. |
23:37:35 | dom96 | I know nothing about game engines. But I was able to parallelise httpbeast and it seems to be scaling very well |
23:38:31 | FromGitter | <krux02> dom96: you mean the Nim website can now handle 1000000 calls ber second? |
23:39:04 | dom96 | You can totally implement Google using Nim now |
23:39:08 | dom96 | :D |
23:39:46 | FromGitter | <krux02> I really think 99.9% of all cases where people want to throw threads at solving their problem it just doesn't do it. |
23:41:00 | FromGitter | <mratsim> Araq mentionned that he would like to reimplement Parasail in Nim |
23:41:12 | FromGitter | <krux02> what is parasail? |
23:41:51 | FromGitter | <mratsim> A parallel first programming language: https://parasail-programming-language.blogspot.fr/ |
23:42:14 | FromGitter | <mratsim> by the author of Oberon? |
23:42:17 | FromGitter | <krux02> Well I am a "parallel last" guy |
23:42:19 | FromGitter | <mratsim> I don’t remember |
23:43:32 | FromGitter | <krux02> well when you really want to use "parallel" hardware, you need to program the GPU. |
23:44:26 | FromGitter | <krux02> The GPU has a lot of advantages compared ot the CPU so that it can increase it's porformance much faster than any CPU can. |
23:45:18 | FromGitter | <krux02> I see the CPU only has a controller or manager unit that does not do the heavy lifting of the calculatoins, it just puts the DATA on the CPU and puts in the the right format |
23:45:29 | FromGitter | <krux02> but the actual computation is done on the GPU. |
23:46:02 | FromGitter | <krux02> I have a project where I want to compile Nim code down to the GPU. |
23:46:13 | FromGitter | <krux02> don't expect general Nim code to work on the GPU. |
23:48:01 | FromGitter | <mratsim> GPU (and OpenMP) are good for data parallel cases but it’s harder for task based parallelism |
23:48:43 | FromGitter | <mratsim> jcosborn cudanim can compile to Nim code to Cuda: https://github.com/jcosborn/cudanim |
23:48:59 | Araq | http://etodd.io/2017/03/29/thirteen-years-of-bad-game-code/ |
23:50:28 | Araq | he was one of the authors of the newer Ada standards. |
23:51:54 | * | user1101 quit (Quit: user1101) |
23:53:38 | Araq | I ran into tons of problems. I created binding cycles that caused infinite loops. I found out that initialization order is often important, and initialization is a nightmare with data binding, with some properties getting initialized multiple times as bindings are added." |
23:54:04 | Araq | ^ my vue.js experience |
23:54:18 | Araq | this reactive stuff simply never works. :P |
23:54:44 | FromGitter | <mratsim> Vue like angular has executable code in html comment ... |
23:54:58 | FromGitter | <krux02> yea, I just prefer to order stull and initialize imperatively |
23:55:03 | FromGitter | <krux02> stuff |
23:55:08 | FromGitter | <krux02> i can't type |
23:56:16 | FromGitter | <krux02> Araq: but there are some lazy initialized things in the Nim compiler, too |
23:56:32 | FromGitter | <krux02> just an example, the size of types |
23:56:50 | Araq | don't do what I do, do what I tell you. |
23:57:16 | Araq | also: reactiveness is not at all about laziness. |
23:57:40 | Araq | it's about building a dependency graph that then does things in a semi-smart way |
23:58:14 | FromGitter | <krux02> "semi-smart" |
23:58:18 | FromGitter | <krux02> nice words |
23:59:55 | FromGitter | <krux02> I am reading the article: "GetCenter(); // Gets the center of the mesh" |