00:04:55 | * | jinshil joined #nim |
00:13:15 | * | def-pri-pub quit (Quit: leaving) |
00:30:39 | * | yingjun_ joined #nim |
00:34:50 | * | yingjun_ quit (Ping timeout: 240 seconds) |
00:56:45 | * | mahtob joined #nim |
01:14:39 | * | sz0 quit (Quit: Connection closed for inactivity) |
01:32:55 | * | chemist69 quit (Ping timeout: 255 seconds) |
01:36:15 | * | Serenitor joined #nim |
01:38:57 | * | ftsf quit (Ping timeout: 268 seconds) |
01:39:56 | Serenitor | would you guys say it makes sense to log this here as an issue? https://forum.nim-lang.org/t/3070 |
01:40:07 | Serenitor | I can't find any docs or threads on nimrtl + missing stacktrace so I've got no idea if that behavior is to be expected.. |
01:46:43 | * | chemist69 joined #nim |
01:47:32 | * | def-pri-pub joined #nim |
01:49:47 | * | yingjun_ joined #nim |
02:03:19 | * | yingjun_ quit (Remote host closed the connection) |
02:03:30 | * | yingjun_ joined #nim |
02:14:43 | * | yingjun_ quit (Remote host closed the connection) |
02:16:27 | * | endragor joined #nim |
02:17:41 | * | pilne joined #nim |
02:17:46 | * | def-pri-pub quit (Quit: Lost terminal) |
02:20:17 | * | yingjun_ joined #nim |
02:23:57 | * | mahtob quit (Ping timeout: 260 seconds) |
02:30:45 | * | yingjun_ quit (Remote host closed the connection) |
02:35:52 | * | yingjun_ joined #nim |
03:17:19 | * | krux02 quit (Remote host closed the connection) |
03:22:37 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:45:24 | * | rauss joined #nim |
03:57:20 | * | dankrad quit (Ping timeout: 240 seconds) |
03:59:30 | * | dankrad joined #nim |
04:01:01 | * | Serenitor quit (Quit: Leaving) |
04:13:13 | * | yingjun_ quit (Remote host closed the connection) |
04:13:22 | * | yingjun_ joined #nim |
04:14:46 | * | yingjun_ quit (Remote host closed the connection) |
04:35:15 | * | mahtob joined #nim |
04:41:57 | FromGitter | <Varriount> Serenitor: Well, stack traces are tricky |
04:42:30 | FromGitter | <Varriount> Especially across DLL boundaries, as they would have to communicate in order to tell which stack traces to use. |
04:58:38 | * | mahtob quit (Remote host closed the connection) |
05:00:52 | * | dankrad quit (Ping timeout: 260 seconds) |
05:02:41 | * | dankrad joined #nim |
05:15:10 | * | yingjun_ joined #nim |
05:19:31 | * | yingjun_ quit (Ping timeout: 246 seconds) |
05:22:01 | * | yingjun_ joined #nim |
05:29:47 | * | rauss quit (Quit: WeeChat 1.9) |
05:47:39 | * | vivus quit (Quit: Leaving) |
06:05:50 | * | pilne quit (Quit: Quitting!) |
06:17:13 | * | andrzejku joined #nim |
06:20:08 | * | planhths joined #nim |
06:23:10 | * | nsf joined #nim |
06:34:12 | * | andrzejku quit (Ping timeout: 260 seconds) |
06:44:44 | * | andrzejku joined #nim |
06:46:59 | * | yglukhov joined #nim |
06:49:32 | * | ShalokShalom quit (Remote host closed the connection) |
06:50:35 | * | user0 quit (Ping timeout: 240 seconds) |
06:51:19 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:54:44 | * | user0 joined #nim |
06:58:34 | * | Matthias247 joined #nim |
06:59:11 | * | Vladar joined #nim |
07:01:17 | * | big_num joined #nim |
07:01:24 | * | big_num left #nim (#nim) |
07:09:17 | * | djellemah joined #nim |
07:30:31 | * | yingjun_ quit (Remote host closed the connection) |
07:30:40 | * | yingjun_ joined #nim |
07:30:45 | * | ftsf joined #nim |
07:30:45 | * | ftsf quit (Read error: Connection reset by peer) |
07:32:10 | * | yingjun_ quit (Remote host closed the connection) |
07:34:19 | * | yingjun_ joined #nim |
07:36:43 | * | yglukhov joined #nim |
07:40:21 | * | ftsf joined #nim |
07:44:54 | * | andrzejku quit (Quit: Textual IRC Client: www.textualapp.com) |
07:45:58 | * | ShalokShalom joined #nim |
07:48:13 | * | yglukhov quit () |
07:58:22 | * | Andris_zbx joined #nim |
07:58:38 | * | yglukhov joined #nim |
08:18:49 | * | v17d joined #nim |
08:34:14 | * | djellemah_ joined #nim |
08:36:05 | * | enthus1a1t- quit (Ping timeout: 240 seconds) |
08:37:19 | * | djellemah quit (Ping timeout: 240 seconds) |
08:51:47 | * | yingjun_ quit (Remote host closed the connection) |
08:51:57 | * | yingjun_ joined #nim |
08:52:54 | * | yingjun_ quit (Remote host closed the connection) |
08:55:48 | * | yingjun_ joined #nim |
08:56:10 | * | dom96|w joined #nim |
08:56:13 | * | yingjun_ quit (Remote host closed the connection) |
08:58:27 | * | yingjun_ joined #nim |
09:02:57 | * | jinshil quit (Quit: Good-bye!) |
09:05:10 | * | dom96|w quit (Read error: Connection reset by peer) |
09:09:47 | * | dom96|w joined #nim |
09:11:55 | * | yingjun_ quit (Remote host closed the connection) |
09:12:55 | * | yingjun_ joined #nim |
09:12:56 | * | yingjun_ quit (Remote host closed the connection) |
09:13:25 | * | yingjun_ joined #nim |
09:23:19 | * | planhths quit (Ping timeout: 240 seconds) |
09:26:17 | * | planhths joined #nim |
09:35:38 | * | Tiberium joined #nim |
09:38:19 | * | v17d quit (Ping timeout: 240 seconds) |
09:50:46 | * | v17d joined #nim |
09:56:31 | * | yingjun_ quit (Remote host closed the connection) |
09:57:28 | FromGitter | <AlexKotik> Is there a way to generate random number in NimScript during compile-time and pass it to the compiled program? It seems randomize() is not available for NimScript. |
10:00:43 | * | v17d quit (Remote host closed the connection) |
10:04:42 | * | yingjun_ joined #nim |
10:06:51 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
10:13:27 | FromGitter | <TiberiumN> you can take a seed from somewhere else |
10:13:43 | FromGitter | <TiberiumN> e.g. you can call randomize(123123) ⏎ ⏎ but instead of 123123 use some source of seed |
10:15:46 | * | krux02 joined #nim |
10:27:37 | FromGitter | <AlexKotik> I think I just use `hash(CompileDate & CompileTime)` as a seed. What is the best way to pass these random integers to compiled program? Basically I need to define a constant with some name and integer value, so the compiler could see it. Can I do it with switch("d", <something>)? |
10:28:10 | federico3 | Nim 0.17 just entered Debian stretch-backports |
10:50:30 | * | v17d joined #nim |
11:04:52 | * | yingjun_ quit (Remote host closed the connection) |
11:09:08 | * | yingjun joined #nim |
11:14:47 | * | xet7 quit (Read error: Connection timed out) |
11:15:18 | * | xet7 joined #nim |
11:31:18 | * | krux02 quit (Remote host closed the connection) |
11:36:21 | * | Tiberium quit (Remote host closed the connection) |
11:40:28 | * | yingjun quit (Remote host closed the connection) |
11:41:06 | * | yingjun joined #nim |
11:46:10 | * | xet7 quit (Read error: Connection timed out) |
11:46:47 | * | xet7 joined #nim |
11:46:48 | * | xet7 quit (Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number) |
11:47:17 | * | xet7 joined #nim |
11:47:17 | * | xet7 quit (Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number) |
11:47:43 | * | xet7 joined #nim |
11:47:43 | * | xet7 quit (Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number) |
11:48:13 | * | xet7 joined #nim |
11:48:13 | * | xet7 quit (Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number) |
11:48:34 | * | yingjun quit (Remote host closed the connection) |
11:48:42 | * | xet7 joined #nim |
11:48:42 | * | xet7 quit (Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number) |
11:48:44 | * | yingjun joined #nim |
11:48:48 | * | yingjun quit (Remote host closed the connection) |
11:59:13 | * | planhths quit (Ping timeout: 276 seconds) |
12:02:46 | * | yingjun joined #nim |
12:03:41 | * | yingjun quit (Remote host closed the connection) |
12:03:52 | * | Snircle joined #nim |
12:04:07 | * | yingjun joined #nim |
12:04:32 | yuken | well, I got the full nim suite setup on my windoge machine. guess i'll start development later today once I finish muh DOTA |
12:09:33 | crem | Is it possible to finish DOTA? |
12:13:51 | FromGitter | <TiberiumN> Lol |
12:31:39 | * | SunDwarf joined #nim |
12:35:44 | * | yingjun quit (Remote host closed the connection) |
12:36:34 | * | arnetheduck joined #nim |
12:36:57 | * | yingjun joined #nim |
12:37:31 | * | krux02 joined #nim |
12:37:44 | FromGitter | <krux02> yes it is possible. Just quit the game, and it finished. |
12:37:53 | FromGitter | <krux02> or don't start |
12:38:12 | FromGitter | <krux02> best tactic to not loose Tetris is to not play the game |
12:39:39 | * | yingjun quit (Remote host closed the connection) |
12:39:44 | * | dddddd joined #nim |
12:39:48 | * | yingjun joined #nim |
12:39:54 | * | yingjun quit (Remote host closed the connection) |
12:41:25 | * | Serenitor joined #nim |
12:47:27 | * | v17d quit (Ping timeout: 240 seconds) |
13:00:45 | * | v17d joined #nim |
13:06:35 | * | dom96|w joined #nim |
13:10:19 | * | yingjun joined #nim |
13:13:22 | niv | dom96: marketing idea: do a weekly/bi-monthly newsletter of new developments, submitted packages/libraries, media content. i'd subscribe immediately |
13:13:47 | dom96|w | niv: do it :P |
13:13:51 | crem | hourly! |
13:14:16 | niv | dom96: i might consider it if you ever fix try/await |
13:14:36 | federico3 | niv: do it and it will be published on https://planet.nim-lang.org/ |
13:14:49 | * | yingjun quit (Ping timeout: 240 seconds) |
13:14:50 | FromGitter | <krux02> I like the to read the factorio friday facts, some news on the development every friday |
13:15:04 | niv | yep, that's what gave me the idea actually |
13:15:36 | dom96|w | niv: If anything I will remove the edge cases that fail. |
13:15:53 | dom96|w | There is no easy fix for try await, unless 'yield' is supported in a try stmt. |
13:16:54 | niv | yeah, it's yield that doesn't work for me :( so i can't even wait for the future manually |
13:17:28 | dom96|w | that definitely shouldn't be a problem |
13:17:38 | dom96|w | oh but you need to use an if stmt |
13:17:40 | niv | "cannot yield in a non-inlined iterator" |
13:17:41 | dom96|w | instead of a try |
13:18:00 | dom96|w | if myFut.failed: # handle error |
13:18:06 | * | rauss joined #nim |
13:19:03 | niv | mm that didn't work last time i tried. |
13:19:14 | niv | i had to yield to get the future to complete, and that errored |
13:23:45 | * | sz0 joined #nim |
13:31:10 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:33:44 | dom96|w | niv yielding won't read the future and so shouldn't fail |
13:34:49 | FromGitter | <TiberiumN> niv: maybe you've put yield in except statement? |
14:25:27 | * | dankrad quit (Ping timeout: 240 seconds) |
14:34:39 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
14:41:01 | * | acidx_ is now known as acidx |
14:41:30 | * | acidx is now known as Guest52923 |
14:47:33 | * | Guest52923 is now known as acidx |
14:51:10 | FromGitter | <TiberiumN> what would happen if I have a "var bot = VkBot()", VkBot is a "ref object", and I want to use it from another variable? ⏎ ⏎ Would "var myBot = bot" copy object or copy the reference? |
14:55:19 | * | Arrrr joined #nim |
14:55:19 | * | Arrrr quit (Changing host) |
14:55:19 | * | Arrrr joined #nim |
14:59:56 | * | salewski joined #nim |
15:00:49 | * | v17d quit (Ping timeout: 240 seconds) |
15:01:18 | salewski | TiberionM, "var myBot = bot" copies the reference of course. |
15:01:26 | FromGitter | <TiberiumN> ok, thanks |
15:02:12 | salewski | But strings and seq behave differently -- they have copy semantic, |
15:02:34 | salewski | so while they are pointers, assignment copied the content. |
15:07:09 | * | salewski quit (Quit: WeeChat 1.4) |
15:12:38 | * | yingjun joined #nim |
15:16:57 | * | yingjun quit (Ping timeout: 240 seconds) |
15:24:15 | * | Andris_zbx quit (Remote host closed the connection) |
15:24:19 | * | dankrad joined #nim |
15:28:49 | * | dom96|w joined #nim |
15:30:58 | * | user0 quit (Ping timeout: 246 seconds) |
15:38:29 | * | Matthias247 quit (Read error: Connection reset by peer) |
15:39:39 | FromGitter | <zacharycarter> I'm thinking about writing a flux implementation in Nim for my demo next week |
15:40:04 | FromGitter | <krux02> a flux implementation? |
15:40:26 | FromGitter | <zacharycarter> it's a front-end architecture for state management that all the js fanboys love |
15:40:31 | FromGitter | <zacharycarter> but I think it'd help win my argument |
15:40:33 | FromGitter | <zacharycarter> if I could write one in an hour |
15:41:17 | FromGitter | <krux02> well you can train writing one :P |
15:41:23 | FromGitter | <zacharycarter> yup |
15:42:16 | FromGitter | <krux02> code becomes better when it has less clutter and when you train to do something fast you automatically leave out all the unnecessary clutter and keep focus on the important |
15:50:03 | * | nhywyll joined #nim |
16:03:02 | yuken | zacharycarter, time for me to get started with Nim. |
16:03:06 | * | yuken scratches his head |
16:03:12 | yuken | i have no clue what i'm doing |
16:03:24 | FromGitter | <krux02> well, programming |
16:03:36 | FromGitter | <krux02> just do it a lot and you will become better at it |
16:03:45 | yuken | oh no, I know the basics of programming |
16:03:49 | yuken | no clue how to start with Nim specifically. |
16:03:56 | FromGitter | <krux02> well just do it |
16:04:02 | FromGitter | <krux02> get yourself a goal |
16:04:03 | dom96|w | yuken: buy Nim in Action ;) |
16:04:11 | yuken | > books |
16:04:14 | dom96|w | j/k. Read the tutorial. |
16:04:22 | FromGitter | <krux02> dom96 is the book in print already? |
16:04:22 | dom96|w | Ask questions here. |
16:04:36 | FromGitter | <krux02> yea pretty active here |
16:04:37 | dom96|w | krux02: It's being printed as we speak :) |
16:04:39 | FromGitter | <krux02> great support |
16:04:43 | FromGitter | <krux02> cool |
16:04:49 | yuken | Hm. |
16:04:49 | FromGitter | <TiberiumN> yeah I've learned a lot here |
16:04:51 | dom96|w | Also, I got some new Nim stickers. |
16:04:55 | FromGitter | <TiberiumN> and I was being annoying |
16:04:55 | FromGitter | <TiberiumN> wow! |
16:05:02 | dom96|w | I'll be creating a marketplace on sticker mule so you guys can buy some as well |
16:05:04 | * | v17d joined #nim |
16:05:05 | FromGitter | <krux02> a log time ago someone who bought the book promised me to forward the book to me |
16:05:18 | FromGitter | <krux02> I wonder if that actually will happen |
16:06:04 | FromGitter | <TiberiumN> by secret: there would be an email address of the person, tho bought the book (on all pages) |
16:06:26 | FromGitter | <TiberiumN> but yeah, since we're all developers, one can easily change that |
16:07:54 | FromGitter | <TiberiumN> one a little bit sad thing: no HTTPS support in asynchttpserver or jester :( ⏎ now I have WSL( bash on windows), and I'm running NGINX here, which acts like a proxy and redirects to http://localhost:5000, which is my app, launched from window |
16:07:58 | FromGitter | <TiberiumN> windows |
16:10:51 | FromGitter | <TiberiumN> but overall the main reason why I choose Nim was indentation and python-like syntax (in many places) |
16:11:11 | FromGitter | <TiberiumN> I didn't knew about the macros stuff at all :) |
16:11:31 | FromGitter | <TiberiumN> and never used them in another languages |
16:12:17 | FromGitter | <krux02> well I don't know about any other useful language that has macros |
16:12:25 | FromGitter | <krux02> I only know about emacs lisp |
16:12:59 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:13:01 | FromGitter | <krux02> and that language is only to develop emacs |
16:13:15 | FromGitter | <krux02> and emacs is only good to develop emacs lisp |
16:13:28 | FromGitter | <TiberiumN> Honestly lisp looks like something very hard to understand for me |
16:13:31 | FromGitter | <krux02> therefore both emacs lisp and emacs are very important products |
16:13:36 | FromGitter | <krux02> well it's not |
16:13:42 | FromGitter | <krux02> the syntax is trivial |
16:13:49 | FromGitter | <krux02> and then it just like any other language |
16:14:20 | FromGitter | <krux02> istead of this: |
16:14:49 | FromGitter | <krux02> if <cond>: <a> else: <b> |
16:14:52 | FromGitter | <krux02> it is this: |
16:15:12 | FromGitter | <krux02> (if <cond> <a> <b>) |
16:15:44 | FromGitter | <krux02> but yea some things particular in emacs lisp are very wonky |
16:15:59 | FromGitter | <krux02> for example the dynamic stack |
16:16:01 | * | yglukhov quit (Remote host closed the connection) |
16:17:10 | FromGitter | <krux02> called function see local variables from the context of calling functions. |
16:18:19 | yuken | In my previous language, I could've done this: https://gist.github.com/YukenK/032ddf8918d9861307b7b5ff461b2407 |
16:18:25 | FromGitter | <krux02> not good for static code analysis, but it allows to override the value of global variables locally for the duration of a funtion call |
16:18:26 | yuken | How would I do something similar with Nim o-o? |
16:18:48 | FromGitter | <krux02> I don't know what that means |
16:20:14 | FromGitter | <krux02> in nim the functions you can call on a type are not declared in the block of the type |
16:20:19 | yuken | krux02, I can define procs under an object type, and then the proc will have access to all of the variables on that type. |
16:20:21 | FromGitter | <krux02> a lot of freedom |
16:20:32 | FromGitter | <krux02> ah |
16:20:39 | yuken | Sorry if that's a bit of a poor explanation :p |
16:20:44 | FromGitter | <krux02> well there is a this pragma for that |
16:21:08 | FromGitter | <krux02> but before you do that, try to get used to not use it for a while and see if you like it |
16:21:36 | yuken | Well, I don't understand how I'd modify an object then :p. |
16:22:31 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=597b64c7a7b406262d3be60f] |
16:23:05 | yuken | So I'd just be passing through the object as an argument to procs? |
16:23:15 | FromGitter | <krux02> yes |
16:23:23 | yuken | Makes sense, you can do that in the language I used before. |
16:23:49 | * | yglukhov joined #nim |
16:23:53 | FromGitter | <krux02> you can do that in any language, but nim has static dispatch and allow to call it like a "method" |
16:24:27 | * | Trustable joined #nim |
16:25:18 | yuken | https://gist.github.com/YukenK/2a316ee968e71bf50b5729c62ce76837 is what I wrote then, for my first... thing. |
16:25:48 | FromGitter | <krux02> well remove the "ref" |
16:26:11 | FromGitter | <krux02> just "mob = object" |
16:26:31 | FromGitter | <krux02> using ref types is a waste most of the time |
16:27:08 | FromGitter | <krux02> even non ref types are passed by reference to functions for performance reasons, so don't worry about too much copy |
16:27:40 | nhywyll | krux02: elisp has lexical binding for 5+ years now, fwiw |
16:28:37 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:30:25 | yuken | Now, my previous language was synchronous, and allowed for sleeping. So I could do this, to loop this proc forever, looping it once every second: https://gist.github.com/YukenK/e44b2e841b9d2fd977117c3d12993590 |
16:30:30 | yuken | I assume this is a bit different in Nim? |
16:31:43 | FromGitter | <krux02> not really, you can still do the same I guess |
16:31:51 | FromGitter | <krux02> I just don't know the << operator |
16:32:00 | FromGitter | <krux02> or what it means to you |
16:32:27 | yuken | Just output, basically. A << B causes B to be outputted to everything in A. |
16:32:40 | yuken | My previous language was meant for easy networking & multiplayer, it was designed around games. |
16:37:40 | * | dom96|w joined #nim |
16:39:56 | FromGitter | <krux02> what language was that? |
16:40:00 | yuken | BYOND. |
16:40:07 | FromGitter | <krux02> never heared of it |
16:40:12 | yuken | http://www.byond.com |
16:40:26 | FromGitter | <krux02> I like nim because it provides me the low level contral that c++ does plus macros and stuff |
16:41:10 | FromGitter | <krux02> so it's not one of those scripting/toy languages it can actually output fast code |
16:41:19 | FromGitter | <krux02> and memory efficient code |
16:42:00 | yuken | oddly enough |
16:42:09 | yuken | BYOND uses proc like Nim, which I didn't expect. |
16:43:12 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:43:17 | * | endragor quit (Remote host closed the connection) |
16:44:52 | * | endragor joined #nim |
16:45:06 | FromGitter | <krux02> well if you want to, you can also define yourself the ``<<`` operator |
16:45:25 | * | dom96|w joined #nim |
16:49:09 | yuken | Hm, I've come across a bug and figured out why. I'm trying to call two procs, but the first one starts a loop, so the code seems to pause at that loop and not start the 2nd one. Any ideas? https://gist.github.com/YukenK/13b350e83ea07f6d7861c97f55f92506 |
16:49:46 | * | endragor quit (Ping timeout: 276 seconds) |
16:52:29 | * | arnetheduck quit (Read error: Connection reset by peer) |
16:56:11 | * | nsf quit (Quit: WeeChat 1.9) |
17:00:17 | dom96|w | yuken: Both procs start an infinite loop. The `worldLoop` never exits. |
17:00:35 | dom96|w | So your program is stuck in the `worldLoop` proc forever |
17:01:03 | yuken | dom96|w, I know that, same issue with BYOND, which is fixed by spawn (not the same as spawn in Nim, not multithreadded). |
17:01:11 | yuken | Not sure what I should change to do it here. |
17:01:12 | dom96|w | Not sure what you're trying to do so can't advise more. |
17:01:38 | dom96|w | If you want to run `worldLoop` in a new thread then you spawn a new thread. |
17:01:47 | dom96|w | with `spawn` |
17:02:34 | yuken | dom96|w, I'd like them to be able to both run at the same time, essentially, without stopping the other or causing any issues. |
17:03:41 | dom96|w | you probably want `createThread` instead. |
17:06:55 | yuken | I'm reading the docs on that and have quite literally zero clue how that works, never touched multithreading |
17:10:35 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:14:25 | * | yingjun joined #nim |
17:19:08 | * | yingjun quit (Ping timeout: 260 seconds) |
17:20:51 | * | sakalli joined #nim |
17:21:02 | FromGitter | <TiberiumN> Maybe byond uses async? |
17:22:34 | * | v17d is now known as vlad1777d |
17:26:22 | * | sakalli quit (Quit: leaving) |
17:27:19 | * | sakalli joined #nim |
17:28:54 | * | yglukhov joined #nim |
17:29:36 | subsetpark | So I'd like to get vim omnicomplete from nim working |
17:29:57 | subsetpark | Do you think it makes sense to try to fix up baabelfish's fork of zah's vim plugin, or start a new small one that only does omnicomplete? |
17:29:58 | FromGitter | <krux02> yea completion would be nice |
17:30:13 | FromGitter | <krux02> I have emacs, and from time to time it have completion but it is unusably slow |
17:30:20 | FromGitter | <krux02> so I deactivate it always |
17:30:30 | FromGitter | <krux02> at least flycheck works often |
17:30:37 | FromGitter | <krux02> not reliably though |
17:30:40 | FromGitter | <krux02> too many crashes |
17:32:34 | subsetpark | so... no opinion, then? |
17:35:06 | * | Snircle joined #nim |
17:36:40 | FromGitter | <timmyjose> Hello, folks. Just trying out Nim after a long while... hopefully it will be interesting! Wanted to drop by and say "Hi!" |
17:37:01 | FromGitter | <krux02> well hi, then |
17:37:32 | FromGitter | <timmyjose> :-) |
17:37:40 | FromGitter | <krux02> I am sure Nim is "iteresting", I have little doubt you will be disappointed if that is your only concern |
17:40:08 | FromGitter | <timmyjose> Yeah, had worked through Part I of the official tutorials a while back, and liked its intuitive nature... but then didn't progress onto higher concepts. Hoping to work through it, do a few projects, and then maybe have a better assessment for myself! It does look very clean though. |
17:40:58 | FromGitter | <timmyjose> Any advice for a beginner? :-) |
17:56:58 | ehmry | timmyjose: avoid the low-level details at first and look at how the standard library presents high-level interfaces |
17:57:51 | ehmry | if you start casting pointers and try to do C stuff right away its not going to be fun |
18:03:18 | FromGitter | <krux02> ehmry: well that depends, if you know how to do C stuff it won't be fun to do the stuff with "high-level" interfaces |
18:04:09 | ehmry | that is if you do C stuff but don't realize what a waste of time it can be |
18:07:22 | FromGitter | <timmyjose> @ehmry Thanks for the tips! |
18:07:58 | FromGitter | <krux02> ehmry well I think it's the opposite but yea |
18:08:11 | FromGitter | <krux02> in nim I feel productive doing cool stuff |
18:08:20 | FromGitter | <krux02> with cool I mean control over memory |
18:08:40 | FromGitter | <krux02> C has the problem that it is not very good at abstractions |
18:09:00 | FromGitter | <krux02> c++ has the problem of being horrible in a lot of ways |
18:09:08 | FromGitter | <krux02> and Nim combines the best of borth worlds |
18:09:11 | FromGitter | <timmyjose> Just curious about the metaprogramming in Nim... I am used to Lisp-style macros... any similarities? |
18:09:19 | FromGitter | <krux02> so I program Nim like I used to program C++ |
18:09:34 | Xe | timmyjose: it's basically lisp macros |
18:09:35 | FromGitter | <krux02> well I don't lisp style macros too well |
18:09:46 | FromGitter | <timmyjose> @Xe yeah? Wow.... that's sweet! :D |
18:09:54 | FromGitter | <krux02> well I think it's better than lisp macros |
18:10:03 | FromGitter | <timmyjose> @krux02 Hahaha! |
18:10:03 | FromGitter | <krux02> because Nim as a type system |
18:10:10 | Xe | krux02: tl;dr it's the same basic idea tho |
18:10:28 | FromGitter | <krux02> yes the same idea, but in a language that has static type information |
18:10:37 | FromGitter | <krux02> I think that's in important improvement |
18:10:43 | FromGitter | <timmyjose> For prototyping, dynamic languages can be very handy! Though I do prefer static langs for production systems... hence Lisp->Haskell over some time now |
18:10:49 | FromGitter | <timmyjose> (for me that is) |
18:10:52 | FromGitter | <krux02> nodes are not just ast nodes, they can have a type |
18:11:06 | dom96 | Nim is very good for prototyping too, the static typing doesn't hold you back a lot of the time. |
18:11:45 | FromGitter | <krux02> well in emacs I see the benefits of a dynamic language |
18:11:53 | FromGitter | <timmyjose> @dom96 Interesting! It does indeed look like I will have a lot of fun over the next couple of weeks. Thanks for all the suggestions and feedback, guys! |
18:12:14 | FromGitter | <krux02> but reall I do like type checkers |
18:12:32 | FromGitter | <krux02> told you |
18:12:43 | FromGitter | <krux02> when it is about being interesting, Nim is a great language |
18:12:44 | FromGitter | <timmyjose> Static Types + Full Type Inference is pretty awesome! And yeah, you did, @krux02 ;-) |
18:13:01 | FromGitter | <krux02> well Nim does not have Full type inference |
18:13:11 | FromGitter | <krux02> I've seen languages with better type inference |
18:13:17 | FromGitter | <krux02> but it is pretty good |
18:13:47 | FromGitter | <krux02> Haskell for example |
18:13:53 | FromGitter | <timmyjose> Yup... I was talking about Haskell too! |
18:14:12 | FromGitter | <timmyjose> Yeah, even without full type inference, anything beats Java-level verbosity! :D |
18:14:21 | FromGitter | <timmyjose> Hell, even C++11 is much better now |
18:14:26 | FromGitter | <krux02> There is no language without type inference is some way left, except Java |
18:14:33 | FromGitter | <timmyjose> Hahaha! |
18:15:14 | FromGitter | <krux02> c++ has a lot of great language design features |
18:15:24 | FromGitter | <krux02> but sadly c++ is fundamentally flawed |
18:15:36 | FromGitter | <krux02> I seriously hate programming in that language |
18:15:42 | FromGitter | <timmyjose> LOL! |
18:15:53 | FromGitter | <krux02> well no that is not true I do too much like a lot of c++ stuff |
18:16:10 | * | big_num joined #nim |
18:16:15 | FromGitter | <krux02> it is complicated |
18:16:27 | * | big_num left #nim (#nim) |
18:16:28 | FromGitter | <timmyjose> What about Rust (mentioning which appears to be fast becoming a bit of a meme in itself). I like it well enough, but its metaprogramming is quite primitive |
18:16:38 | FromGitter | <krux02> but sometimes it is just painful, and then it is really painful |
18:16:54 | FromGitter | <krux02> well yea I tried rust for a day |
18:17:03 | FromGitter | <krux02> I wanted to do a metaprogramming project |
18:17:10 | FromGitter | <krux02> and then I tried to do it in rust macros |
18:17:14 | FromGitter | <timmyjose> Ah ha! |
18:17:18 | FromGitter | <krux02> then I stopped using rust |
18:17:24 | FromGitter | <timmyjose> Hahahaha... :D |
18:17:26 | FromGitter | <timmyjose> Man... |
18:17:30 | FromGitter | <timmyjose> That is rough! |
18:17:50 | FromGitter | <krux02> Rust is also super verbose |
18:18:09 | FromGitter | <krux02> it has too much visual noise if you ask me |
18:18:13 | Xe | it has more tokens than a chuck-e-cheese |
18:18:15 | Xe | :D |
18:18:15 | FromGitter | <timmyjose> Agreed... anything more than basic programs, and you get Java-looking code with all the traits |
18:18:19 | FromGitter | <timmyjose> Yup... |
18:18:20 | FromGitter | <krux02> sorry verbose is the wrong word |
18:18:28 | FromGitter | <krux02> it uses too many operators |
18:18:38 | FromGitter | <krux02> too much move semantic operators |
18:18:58 | FromGitter | <timmyjose> In fact, it used to be even worse before... now things have stabilised, but I agree, it's not very easy to read Rust code written by someone else |
18:19:10 | FromGitter | <krux02> all this move semantics stuff is nice and all, but I think it should happen nicely in the background and it should not be in your face all the time |
18:19:44 | FromGitter | <krux02> well Nim code is not easy to read either |
18:19:50 | FromGitter | <timmyjose> yeah... that definitely takes some time to get used to. I mean, I like it, but sometimes a lot of things happen in the background, and you have pretty much no idea why your damned code is not working! |
18:19:53 | FromGitter | <krux02> especially when people abuse the nim syntax |
18:20:02 | FromGitter | <krux02> what does this mean: ```nim |
18:20:04 | FromGitter | <timmyjose> normal Nim code or when using macros? |
18:20:35 | FromGitter | <krux02> ```foo bar baz, buff``` |
18:20:43 | FromGitter | <krux02> normal nim code |
18:21:21 | Araq | foo bar(baz), buff |
18:21:24 | FromGitter | <krux02> macros can obfuscate the code arbitrarily, but they can also be used to clean up a lot of mess |
18:21:27 | FromGitter | <timmyjose> That's interesting... has there been some community movement to get some sort of coding guidelines/style in place? |
18:21:50 | FromGitter | <timmyjose> Like some idomatic style? |
18:21:54 | FromGitter | <timmyjose> idiomatic* |
18:21:58 | Araq | Nim is easy to read. you need to know that the command syntax in an expression context can only take a single argument |
18:21:59 | FromGitter | <krux02> Araq: you don't count, I would guess you came up with that parsing rule |
18:22:19 | Araq | the parsing rule is simple, it's just that you don't know it. at all. |
18:23:05 | dom96 | IMO it's taking it too far. |
18:23:09 | Araq | also the parsing rule came from extensive discussions and experiments |
18:23:13 | FromGitter | <krux02> well I can obfuscate my code if I want to a lot. But that is possible everwhere, I also have a lot of freedom to write it nicely |
18:23:13 | dom96 | foo bar # fine |
18:23:21 | Araq | I haven't pulled it out of my ass. |
18:23:26 | FromGitter | <timmyjose> LOL |
18:24:42 | FromGitter | <krux02> well my coding rule, command syntax only top level or at the last argument |
18:26:40 | FromGitter | <timmyjose> Right guys. I've got to go now, but it's been an interesting discussion right off the bat! Nice to meet you all, hope to have some real solid questions as I delve into Nim deeply. Cheers! |
18:27:18 | dom96 | timmyjose: feel free to ping me if you need any help! :) |
18:35:02 | FromGitter | <TiberiumN> @krux02 I also use something like "int someJson["number"].num" |
18:35:07 | FromGitter | <TiberiumN> because BiggestInt is not int |
18:35:33 | FromGitter | <TiberiumN> ah it is int64 |
18:36:06 | * | nsf joined #nim |
18:38:35 | * | arnetheduck joined #nim |
18:39:20 | * | notbarton joined #nim |
18:39:27 | * | notbarton quit (Remote host closed the connection) |
18:39:41 | * | tanguy joined #nim |
18:41:23 | * | tanguy quit (Remote host closed the connection) |
18:45:14 | dom96 | oh look, a Rust in Action book. |
18:45:33 | FromGitter | <TiberiumN> lol :) |
18:45:45 | dom96 | It describes Rust as the following: "Rust is a new systems programming language that gives you the low-level power of C with the elegance and ease of languages like Ruby and Python." |
18:45:46 | FromGitter | <TiberiumN> well it has simpler chapter names |
18:45:51 | FromGitter | <TiberiumN> WAT |
18:45:52 | dom96 | Doesn't that sound familiar? |
18:45:52 | FromGitter | <TiberiumN> ???? |
18:46:00 | dom96 | It seems completely wrong for Rust, no? |
18:46:16 | FromGitter | <TiberiumN> yeah I think so |
18:47:01 | FromGitter | <TiberiumN> "High-level, expressive feel. Rust programs are able to feel ergonomic and yet ⏎ achieve bare metal performance" |
18:47:15 | FromGitter | <TiberiumN> it throws you into Rust immediatly |
18:51:06 | FromGitter | <TiberiumN> dom96: why it's cheaper by 5 dollars? because it's not complete yet? |
18:51:11 | * | yglukhov quit (Remote host closed the connection) |
18:51:18 | FromGitter | <TiberiumN> (2 out of 15 chapters) |
18:52:23 | * | Nimbecile joined #nim |
18:53:24 | FromGitter | <krux02> well there is nothing that beats the flexibility of the Nim procs |
18:53:38 | dom96 | TiberiumN: shorter planned page count probably |
18:54:00 | FromGitter | <krux02> I fell so relieved after I got rid of thinking object oriented |
18:54:33 | FromGitter | <krux02> it feels like a life long I tried to push the rectangle in the star shaped hole |
18:54:47 | FromGitter | <TiberiumN> well, it turned out for me that I don't even need OOP 0_0 (because I almost never use inheritance in python lol) |
18:54:54 | FromGitter | <TiberiumN> *used |
18:55:06 | FromGitter | <krux02> I don't use inheritance at all |
18:55:08 | FromGitter | <krux02> anymore |
18:55:18 | FromGitter | <krux02> I don't think it enables me anything |
18:55:44 | FromGitter | <krux02> it just makes me busy thinking about object hierachies |
19:00:30 | * | kunev quit (Ping timeout: 268 seconds) |
19:00:58 | * | kunev joined #nim |
19:02:47 | Nimbecile | I hope it's ok to ask this question here...not sure if it's particular to nim or a general programming thing...in example code I see statements like "discard &IID_IDispatch"...what does the "&" mean? I thought it was the string concatenate operator? Only other thing in docs that I saw that used that symbol was a lookahead operator (don't know what that is) |
19:03:52 | FromGitter | <krux02> well I don't know what it does, Nim allows to define operators so it is propably defined in your context |
19:04:02 | FromGitter | <TiberiumN> where did you find this code? |
19:04:04 | FromGitter | <TiberiumN> can you give a link? |
19:04:11 | Araq | yup, the new winapi wrappers use '&' |
19:04:22 | FromGitter | <krux02> and that is a good example why operators should not be decared arbitrarily |
19:04:39 | FromGitter | <krux02> it just mecomes readable like APL |
19:04:46 | Nimbecile | yes, it was in the winim module |
19:04:49 | FromGitter | <krux02> (executable line noise) |
19:04:58 | Araq | and APL is unreadable because you never learned it? |
19:08:20 | Araq | I don't like winapi's usage of '&' either fwiw, but "there is bad code out there" is never an argument against language features |
19:08:55 | FromGitter | <krux02> no it's not against the language feature |
19:08:59 | Araq | I know code that nests 'if' statements 20 levels deep. I never ever read "let's kill if statements, they are bad" |
19:09:00 | FromGitter | <krux02> it's against the way it is used |
19:09:33 | FromGitter | <krux02> I like operator overloading, but I think it should be done with caution |
19:09:56 | Araq | agreed. but! |
19:10:32 | FromGitter | <krux02> I already said it, I would really like to see ¬∨∧ as an alias for "not" "or" "and" |
19:10:42 | Araq | ' "discard &IID_IDispatch"...what does the "&" mean?' is a biased question. |
19:10:57 | FromGitter | <krux02> no idea |
19:11:24 | Araq | not only the '&' is mysterious, the IID_IDispatch is also troublesome and why is it discarded? |
19:13:26 | Araq | ¬∨∧ are hard to memoize :P |
19:13:55 | Araq | you could use '+' for 'or' and '*' for 'and' perhaps |
19:14:44 | subsetpark | krux02, you're gonna love this new language i've got, it's called Haskell |
19:15:02 | Araq | but the partial evaluation properties warrant keywords. |
19:15:14 | * | yglukhov joined #nim |
19:15:23 | Araq | 'and' is much more like 'if' than an "ordinary" operator |
19:15:30 | Araq | same for 'or' |
19:15:43 | FromGitter | <krux02> well ¬∨∧ are the operators that are taught in math for logical oparations |
19:15:48 | FromGitter | <krux02> it school |
19:16:00 | Araq | I know, but math often uses bad notation. |
19:16:09 | Araq | or logic for that matter. |
19:16:16 | FromGitter | <krux02> they are hard to type on most keyboards, but they are the offical symbol for logical operations |
19:16:58 | Nimbecile | I looked in the imported modules for the definition of "&" in this context...is that correct approach? |
19:17:12 | Araq | logical operations do not have sideeffects, programming languages have, so 'a and b and c' is not the same as 'a and c and b' |
19:17:16 | FromGitter | <krux02> No overloading '+' and '*' does not work, because it has already a meaning for ints |
19:17:29 | Araq | but not for bools :P |
19:17:31 | FromGitter | <krux02> and the logic operators are defined to be bitwise operators on integer types |
19:17:34 | Araq | it would work. |
19:17:53 | Araq | I would like to kill the bitwise ops ;-) |
19:18:06 | FromGitter | <krux02> well I do like them |
19:18:24 | Araq | IMHO it should use 'band', 'bor' and 'bnot' |
19:18:50 | FromGitter | <krux02> no don't introduce yet another operator symbol to the language |
19:18:57 | * | nhywyll quit (Ping timeout: 260 seconds) |
19:18:58 | Araq | it's not operators |
19:19:06 | FromGitter | <krux02> it's functions? |
19:19:06 | Araq | it would be ordinary functions. |
19:19:17 | FromGitter | <krux02> I don't like it. |
19:19:21 | * | yglukhov quit (Remote host closed the connection) |
19:19:22 | Araq | lol. |
19:19:41 | FromGitter | <krux02> what is the problem with the overload of and or not? |
19:19:54 | * | yglukhov joined #nim |
19:20:05 | Araq | well anyway, I rest my case. bool 'and' is brilliant as it's closer to 'if' than to ∧ |
19:20:50 | Araq | (and easy to use/read too) |
19:21:09 | FromGitter | <krux02> I definitively prefer 'and' over '&&' |
19:21:11 | * | yglukhov quit (Remote host closed the connection) |
19:21:21 | FromGitter | <krux02> && and || appear so random |
19:21:34 | * | yglukhov joined #nim |
19:21:49 | FromGitter | <krux02> it feels like there is desperate need to use some ascii oparators when the real operators are not available |
19:23:48 | Araq | dunno, I don't see "desparate" needs. I see language designers optimize for having few keywords in the language so that the language appears superficially easy. heck it's even used as an idiotic measure of "language complexity" |
19:25:23 | yuken | I have zero clue how spawn & threading in general works with Nim o-o. |
19:28:25 | FromGitter | <zacharycarter> man react and redux and this whole way of building applications needs to die |
19:28:39 | FromGitter | <zacharycarter> an ugly painful death |
19:28:50 | * | xet7 joined #nim |
19:29:34 | yuken | ... Hold on |
19:29:39 | yuken | is Nim synchronous? |
19:32:54 | FromGitter | <TiberiumN> Ehm, what do you mean? |
19:33:07 | FromGitter | <TiberiumN> Like all languages, yes by default |
19:33:15 | * | nhywyll joined #nim |
19:33:21 | FromGitter | <TiberiumN> You can use threads and async thought |
19:33:35 | FromGitter | <TiberiumN> *or |
19:34:48 | FromGitter | <krux02> it does make a lot of sense to be synchronous by default |
19:35:43 | FromGitter | <TiberiumN> Maybe "like almost all languages" |
19:35:49 | dom96 | zacharycarter: what's wrong with React? |
19:38:00 | FromGitter | <krux02> yuken: for what do you need threading? I am programmer for a while now, and there is no need for threading at all |
19:38:30 | subsetpark | well, thats a bit of an overstatement... |
19:38:48 | yuken | probably terrible but https://gist.github.com/YukenK/13b350e83ea07f6d7861c97f55f92506 is what I'm trying to do right now. |
19:39:18 | FromGitter | <TiberiumN> Why you can't use one global loop? |
19:39:19 | dom96 | Araq: Thought you were going to add a warning/error when 'not' is used without parens? |
19:39:21 | FromGitter | <krux02> well I have an idea for you |
19:39:29 | FromGitter | <TiberiumN> And call other procs from here |
19:39:29 | dom96 | I dislike bnot/band etc. |
19:39:40 | yuken | TiberiumN, I can't exactly pause that global loop, while having other parts of it active, can I? |
19:40:05 | dom96 | It's also a big breaking change, I'm certain that people have used a variable named 'band' somewhere. |
19:40:13 | Araq | dom96: given up on that, it's hard to do in the compiler and a bad inconsistency |
19:40:25 | dom96 | and it's not immediately obvious that 'band' should be read as 'b_and' |
19:40:37 | Araq | dom96: no, it's system.band, your code can continue to use it |
19:40:51 | FromGitter | <zacharycarter> dom96: react isn't opinionated enough and putting together a react app is like rocket sciencew |
19:41:43 | FromGitter | <zacharycarter> also my company is mandating its use and we have this library of components that we're supposed to reuse and apparently none of them work |
19:41:56 | FromGitter | <TiberiumN> https://github.com/search?utf8=✓&q=language%3Anim+band&type=Code |
19:42:01 | FromGitter | <TiberiumN> Not much of this |
19:42:13 | dom96 | zacharycarter: my view is probably skewed since I started using React at Facebook :) |
19:42:47 | dom96 | Araq: oh okay. |
19:43:19 | dom96 | Well, think some more about this. |
19:43:29 | dom96 | It will deprecate/break a lot of code regardless. |
19:43:51 | FromGitter | <krux02> well you can use threads, but I discourage to do it |
19:44:20 | dom96 | yuken: You likely don't need threads. |
19:44:30 | dom96 | You just need to rethink your program |
19:44:51 | yuken | If you can figure out how I'd pause, sure. |
19:44:56 | Xe | YAGNI: thread edition |
19:45:03 | dom96 | You can for example check when a second has passed in your playerLoop proc. |
19:45:13 | dom96 | instead of creating another while loop and sleeping in it |
19:45:25 | yuken | w |
19:45:31 | FromGitter | <krux02> yuken: threads will bring you all kinds of problems with locking stuff. what you can do though, is do it all single threaded and then abuse iterators as resumable functions |
19:45:47 | * | arnetheduck quit (Ping timeout: 260 seconds) |
19:45:48 | FromGitter | <krux02> would be an adventure to do so |
19:45:54 | yuken | That's how BYOND actually handles threads, since it isn't a multithreaded engine. |
19:46:05 | dom96 | First time I've heard of BYOND |
19:46:13 | FromGitter | <krux02> and I would probably just do a sigle loop that updates both the world and the player |
19:46:21 | * | cspar__ quit (Read error: Connection reset by peer) |
19:46:35 | yuken | How would I pause one part while continuing the other, though? |
19:46:38 | FromGitter | <krux02> well I know wesnoth |
19:46:46 | FromGitter | <krux02> abuse iterators |
19:46:54 | * | Nimbecile left #nim (#nim) |
19:47:01 | yuken | I've never used iterators, ;p. |
19:47:10 | * | tankfeeder left #nim (#nim) |
19:47:28 | * | cspar__ joined #nim |
19:47:48 | krux02 | well an iterator is basically a function you can implement that has a yield statement |
19:48:05 | dom96 | yuken: BYOND seems like something that is incredibly specialised (for games) |
19:48:11 | yuken | It is, dom96. |
19:48:17 | krux02 | whenever you call yield, the function is frozen in it's state, and the calling function can do stuff with the yielded object |
19:48:40 | dom96 | Unfortunately applying the same style of programming to Nim probably won't work. |
19:48:58 | krux02 | so you can have two closure iterators as an object |
19:49:10 | dom96 | I wouldn't complicate this stuff with 'yield' |
19:49:24 | dom96 | Having two procedures running concurrently is far more complex than one. |
19:49:36 | dom96 | Creating a game doesn't require concurrency. |
19:49:38 | krux02 | dom96: you haven't done it yet, but I thought about it , it is pretty amazing what you can do with it |
19:49:55 | krux02 | it.s not super nice in the syntax, but very flexible in it's use case |
19:50:06 | dom96 | krux02: huh? what haven't I done yet? |
19:50:34 | krux02 | abusing iterators, or did you? |
19:50:34 | yuken | I'd like to have a variable called "time", which will update once every 100ms by +1. Don't care how I have to do it really. |
19:50:59 | krux02 | every 100ms by 1, why? |
19:51:11 | dom96 | krux02: async await abuses iterators |
19:51:32 | dom96 | it is precisely what you should use instead of messing with iterators yourself. |
19:51:54 | FromGitter | <TiberiumN> also |
19:52:21 | krux02 | yuken: using iterators might just confuse you, so maybe that is not what you should do |
19:52:24 | dom96 | yuken: That's simple (you can do that with one loop and a sleep). You surely have more requirements though. |
19:52:29 | FromGitter | <TiberiumN> Why you can't use async with threads of another thread will not access async features? |
19:52:34 | krux02 | I just had a funny idea that I want to try out one day |
19:52:34 | FromGitter | <TiberiumN> In Nim |
19:52:38 | yuken | krux02, measuring time in 1/10th seconds for various things I'd like to do |
19:52:39 | krux02 | don't you you should do it that wa |
19:52:40 | krux02 | y |
19:52:42 | yuken | I can write up a quick example if you'd like. |
19:53:08 | dom96 | krux02: wat? |
19:53:29 | * | derlafff quit (Remote host closed the connection) |
19:53:32 | dom96 | TiberiumN: Your sentence broke a bit there, but I think I can guess what you mean. |
19:53:52 | krux02 | dom96: I think the idea to abuse iterators very interesting and they can do more things than just async stuff |
19:54:04 | dom96 | TiberiumN: async await + threads is tough. Mainly because memory cannot be shared between threads easily. |
19:54:20 | FromGitter | <TiberiumN> Well how to use utilize multiple cores with async? |
19:54:41 | * | derlafff joined #nim |
19:54:48 | dom96 | SO_REUSE_PORT + multiple processes :P |
19:55:11 | dom96 | That's one solution, but in general this isn't a solved problem (yet) for Nim. |
19:55:12 | yuken | krux02, one example of using a time variable like that is setting the next time a player is allowed to use a skill. I can write up a quick example of that if you'd like, to see how I use it. |
19:55:21 | krux02 | for example I could implement my own visual debugger in nim with a macro that transforme a procedure to an iterator, each breakpoint into a yield, and debugging doesn't stop the interactive program, but only that single function |
19:55:53 | dom96 | yuken: BYOND likely offers this for you, but in Nim you'll need to implement it yourself: an event system. |
19:56:14 | dom96 | It's basically a single while loop that handles everything for you. |
19:56:26 | yuken | dom96, BYOND doesn't do that for you, no. |
19:56:44 | krux02 | yuken: http://ix.io/yIX |
19:56:50 | krux02 | that is what I use to measure time |
19:57:09 | Araq | err, krux02, I looked at your gist |
19:57:23 | krux02 | what gist? |
19:57:27 | Araq | it's specially created to break the reorder pass |
19:57:34 | dom96 | You should look up how to implement an event loop or something like it in Python to get an idea how it's done. |
19:57:40 | krux02 | ah, yes of course |
19:57:55 | krux02 | that was my goal |
19:58:09 | krux02 | I can hide it a bit better that it is specially created to break the preorder pass |
19:58:37 | krux02 | but it shows that generally a preorder pass is not generally safe |
19:59:28 | krux02 | yuken: that thing I sent you uses the sdl2 timer. |
19:59:58 | krux02 | the advantage is, that a timer object is tiny you can create as many as you want and no matter if they are running or not they don't consume processing time |
20:01:26 | krux02 | so each player, even each skill can have it's own timer object |
20:02:31 | yuken | krux02, right now in BYOND, I handle skills timers by having an array which is just an associative list, and each skill has a cooldownID. I set the value in that array to be equal to world.time (how long the world has been running) plus the cooldown time on the skill |
20:02:37 | yuken | and they can't use it if world.time is below that value |
20:03:46 | krux02 | well then you can do that |
20:03:56 | yuken | https://gist.github.com/YukenK/1f13e194b933bed1ec76194be4206c5d |
20:04:01 | krux02 | let worldtimer = newStopWatch(true) |
20:04:31 | krux02 | each frame: let time = worldtimer.time |
20:05:39 | krux02 | echo skill: let canUse = skill.cooldown < time: |
20:07:30 | * | mahtob joined #nim |
20:07:45 | krux02 | for skill in user.skills: if skill.cooldown < time: canUse = true |
20:08:02 | krux02 | you don't need assoc array |
20:08:35 | yuken | well in that case |
20:08:48 | yuken | I used an associative array because all skills were shared between players, noit new objects for each player. |
20:11:15 | FromGitter | <TiberiumN> You can have s |
20:11:53 | FromGitter | <TiberiumN> You can have array of skills on each player object |
20:11:54 | FromGitter | <TiberiumN> Ah |
20:12:02 | FromGitter | <TiberiumN> You did it exactly like that |
20:13:20 | FromGitter | <krux02> I think it's easier if each player his this seq[tuple[skillId: int; cooldown: float64]] |
20:14:37 | FromGitter | <krux02> and then there is a global value let skills: array[SkillKind, Skill] = [...] |
20:16:47 | * | yingjun joined #nim |
20:17:14 | yuken | well so far, a lot of new stuff that I barely understand, but it's coming along nicely. |
20:17:27 | yuken | Nim's syntax seems really similar to BYOND, but there are still a ton of differences so far. |
20:21:22 | * | yingjun quit (Ping timeout: 260 seconds) |
20:21:55 | * | Jesin quit (Quit: Leaving) |
20:22:03 | dom96 | You might be interested in taking a look at how other games are developed in Nim. |
20:23:02 | dom96 | https://github.com/ftsf/ld38-smalltrek/blob/master/src/main.nim |
20:23:12 | dom96 | As an example (this won LD38 IIRC) |
20:24:52 | * | rauss quit (Quit: WeeChat 1.9) |
20:25:30 | dom96 | And here is my Snake game https://github.com/dom96/snake |
20:26:17 | dom96 | It's much simpler, but runs in the browser so it might be a bit difficult to understand some of it (due to the web crap ;)) |
20:26:59 | * | nsf quit (Quit: WeeChat 1.9) |
20:27:56 | * | user0 joined #nim |
20:31:39 | FromGitter | <cabhishek> Hi everyone! A noob generics question ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Why can't I do ``` v.locationstring ()``` ? [https://gitter.im/nim-lang/Nim?at=597b9f2b4bcd78af56f4b7bf] |
20:32:35 | FromGitter | <zacharycarter> dom96: I'm not sure if you already read or not but I'm doing a presentation on Nim next week at my workplace |
20:32:48 | FromGitter | <zacharycarter> I was thinking about writing an implementation of flux in Nim |
20:32:53 | dom96 | zacharycarter: oohh, nope, haven't read it. Nice! |
20:33:07 | dom96 | If you want I can take a look at your slides |
20:33:42 | FromGitter | <krux02> @cabhishek well that is a good question, it just doesn't work |
20:33:42 | FromGitter | <zacharycarter> that would be wonderful, as soon as I have them ready I will toss them your way |
20:34:00 | FromGitter | <krux02> I think it is parser related, and there is a workaround |
20:35:55 | Araq | it's actually logic related. x.y[z] can only mean (x.y)[z] (Nim's interpretation) or x.(y[z]) |
20:35:56 | FromGitter | <krux02> http://ix.io/yL6 |
20:38:43 | FromGitter | <cabhishek> @krux02 Ah I see! Thanks for the link |
20:39:21 | Araq | I don't really understand why so many people have trouble with this. it's not even Nim specific, C uses the very same parsing rule in this case. |
20:39:44 | Araq | or JavaScript. or Java. or ... |
20:39:58 | * | Vladar quit (Remote host closed the connection) |
20:40:39 | * | Arrrr quit (Read error: Connection reset by peer) |
20:40:51 | FromGitter | <krux02> well a method in c++ with a generic argument can be call v.foobar<T>(); |
20:41:10 | FromGitter | <krux02> and that is what people are used to |
20:41:15 | Araq | yeah but that uses angle brackets |
20:41:31 | FromGitter | <krux02> it's not about the brackets |
20:41:37 | Araq | it is. |
20:41:53 | Araq | I voted for different brackets but people declined. |
20:42:20 | FromGitter | <krux02> I like these brackets |
20:42:31 | FromGitter | <krux02> but I think they are a bit overloaded too much |
20:42:38 | Araq | they are ambiguous and suck |
20:42:41 | FromGitter | <krux02> arrays, indexing and generics all use [] |
20:42:55 | Araq | arrays and indexing is fine, generics should have used something else |
20:43:09 | Araq | not <> because these suck too, but something like [. .] |
20:43:18 | FromGitter | <krux02> what do you think of |
20:43:20 | FromGitter | <krux02> ‹› |
20:43:35 | Araq | Unicode, meh. |
20:43:39 | FromGitter | <krux02> ⟨⟩ |
20:43:54 | Araq | [. .] can be rendered differently by your font |
20:44:10 | FromGitter | <krux02> ⊂⊃≪≫ |
20:44:22 | FromGitter | <TiberiumN> Lol |
20:44:26 | FromGitter | <TiberiumN> I like |
20:44:40 | FromGitter | <TiberiumN> I like ⊂⊃ actually |
20:44:55 | FromGitter | <TiberiumN> Ah, no |
20:45:05 | FromGitter | <krux02> ≤⊂≥⊃≫≪∩≫⊂⊶⊃≤∪≥⌊⋃⌋⊆⊷⊇⌈⋂⌉⊆⊷⊇ |
20:46:03 | FromGitter | <krux02> well [. .] is fine, but then I would like it for arrays |
20:46:23 | FromGitter | <krux02> [.1, 2,3,4,5.] |
20:46:32 | FromGitter | <krux02> arrays are rare |
20:46:42 | FromGitter | <krux02> or [[ for arrays ]] |
20:47:19 | FromGitter | <krux02> scala uses () for indexing |
20:47:19 | Araq | it's not about array construction, it's about array indexing which is everywhere in my code |
20:47:56 | Araq | () for indexing, meh. creates the ambiguities elsewhere |
20:48:11 | FromGitter | <krux02> so if it should be changed, then with a tool that understands the language and fixes all occurences of [] |
20:49:42 | FromGitter | <krux02> I like that <> is not for generics those are comparison operators |
20:49:55 | FromGitter | <krux02> I think we are stuck with what we have |
20:50:02 | FromGitter | <krux02> and it's not bad |
20:52:42 | euantor | vb uses () for indexing and it's awful |
20:53:52 | Araq | I also came up with x.foo(:T)(z) |
20:53:52 | Araq | new type of brackets: (: ) |
20:53:53 | Araq | only required for the case where x.y[z] gets the array indexing precedence, the rest of the generic use cases can continue to use [] |
20:53:53 | Araq | it's growing on my since ':' is obviously about types |
20:53:53 | Araq | *on me |
20:54:58 | FromGitter | <krux02> well I don't like the idea to introduce (:) |
20:55:22 | FromGitter | <krux02> if would confuse people who see it first time a lot |
20:55:41 | FromGitter | <krux02> it's too many variations of doing the same thing |
20:56:13 | FromGitter | <krux02> eather change to a superior notation and make the old deprecated, or stick with the old one |
20:57:05 | FromGitter | <krux02> that is one of the reasons why I don't like c++ as a language at all |
20:57:33 | FromGitter | <krux02> it never get's rid of stuff, only introduces now syntax that solve things, but nobody knows about |
20:57:46 | FromGitter | <krux02> and new people are instictively lead to use the wrong tools |
20:59:06 | * | yglukhov quit (Remote host closed the connection) |
20:59:07 | dom96 | Araq: You may as well just go with (.)(.) :P |
20:59:07 | Araq | I'm sick and tired of the "it would confuse people" argument. what doesn't confuse people? |
20:59:47 | Araq | yes, learning something new can be confusing. it can also enable you to do new things. |
20:59:54 | dom96 | I like (:) |
20:59:56 | FromGitter | <krux02> ( . Y . ) please |
20:59:58 | dom96 | in fact, I love it. |
21:00:08 | dom96 | krux02: your ASCII game is far better than mine |
21:00:19 | FromGitter | <cabhishek> if its documented then "it would confuse people" is not harmful |
21:00:28 | FromGitter | <krux02> I don't like gaps in between |
21:00:32 | dom96 | Araq: You've got my approval on (: ) for the cases where disambiguation is required. |
21:00:46 | FromGitter | <krux02> ( o | o ) |
21:01:10 | dom96 | Although it is a fair thing to be worried about. Having two different ways to do things increases the amount of things people have to learn. |
21:01:52 | FromGitter | <krux02> really I don't like it, Nim has already too many different node kinds and weird things in the languge |
21:01:57 | FromGitter | <krux02> less is more |
21:02:17 | FromGitter | <krux02> don't clutter the language with things it doesn't need |
21:02:33 | Araq | that's a general argument, but in this concrete case there are no other options. |
21:02:50 | Araq | [] is a gotcha. we need to use something else. |
21:03:07 | Araq | something else used consistently everywhere requires a deprecation path |
21:03:14 | FromGitter | <cyberlis> if i want return value from thread (not threadpool) i have to use channels? or there is another way? |
21:03:22 | Araq | and is more verbose. |
21:03:22 | FromGitter | <krux02> what about :[ ] ? |
21:03:36 | * | Matthias247 joined #nim |
21:03:46 | FromGitter | <krux02> or ![ ] |
21:03:57 | ehmry | i don't think a comparision to C++ is fair, i find the confusing syntax to be constructors, lambdas, and templates, with Nim does better on all those |
21:04:05 | Araq | I want you to write const foo: array[.30, int.] = [0, 1, ...] a couple of times |
21:04:31 | Araq | you will *curse* your very own desire for "consistency" soon enough |
21:04:40 | FromGitter | <krux02> const foo: array[.30,int.] = [0,1,...] |
21:04:49 | dom96 | Yay. Not long now until Nim in Action is printed! |
21:05:08 | FromGitter | <TiberiumN> @cyberlis afaik yes |
21:05:14 | FromGitter | <krux02> (| banana clip |) |
21:05:17 | Araq | <operator> [] has the obvious downsides. |
21:05:45 | Araq | the others are the same as [. .] or (: ) |
21:05:59 | Araq | it doesn't really matter which one you pick, it's |
21:06:11 | FromGitter | <krux02> well it does matter |
21:06:12 | Araq | a) a massive change if applied consistently everywhere |
21:06:13 | dom96 | cyberlis: you can also write into a shared global variable (but that's not memory safe) |
21:06:20 | Araq | b) longer than [] |
21:06:48 | FromGitter | <krux02> I would like the indexing operator to be changed, not generics |
21:06:49 | FromGitter | <cyberlis> thank you |
21:07:00 | * | BitPuffin|osx joined #nim |
21:07:30 | Araq | and to what? () is ambiguous and makes me barf |
21:07:48 | Araq | and then let's see, a) and b) apply too. |
21:07:56 | FromGitter | <krux02> getElementAtIndex |
21:08:08 | FromGitter | <krux02> (that is ObjectiveC) |
21:09:00 | Araq | that's funny but not helpful. |
21:09:04 | FromGitter | <krux02> I would really like to have something that is symetric |
21:09:12 | FromGitter | <krux02> I am thinking |
21:09:48 | FromGitter | <krux02> or at lest something that seems symetric |
21:10:49 | dom96 | actually, can we do [:T, Y]? |
21:11:30 | FromGitter | <TiberiumN> Y? |
21:11:46 | FromGitter | <krux02> well I think () is not too bad. when x.foo(i) cannot be resolved, it just tries to resolve x.foo.apply(i) |
21:11:54 | dom96 | TiberiumN: just a random type name |
21:12:05 | dom96 | what? () is for proc calls |
21:12:15 | dom96 | It seems even more ambiguous to me |
21:12:26 | FromGitter | <krux02> no new parsing rule, just a new rule for overloading |
21:13:12 | FromGitter | <krux02> well () is actually quite nice, when you have some experience with scala |
21:13:24 | FromGitter | <krux02> scala is a very nice language |
21:14:23 | FromGitter | <krux02> the language is desigend, so that ``proc(int): T`` and ``seq[T]`` have the same interface |
21:15:06 | Araq | dom96: [:T, Y] will work, yes |
21:15:11 | Araq | *would work |
21:16:07 | FromGitter | <krux02> so whenever you need to pass a proc somewhere, a seq does have the same interface and can be passed directory, without constructing a wrapping function object for it |
21:16:55 | * | Trustable quit (Remote host closed the connection) |
21:17:05 | * | nhywyll quit (Quit: nhywyll) |
21:17:07 | dom96 | Araq: So maybe we could offer that for disambiguation? |
21:17:19 | dom96 | Over time we could even start encouraging people to use that syntax from the get-go |
21:17:29 | dom96 | and then deprecate [T] |
21:17:36 | FromGitter | <krux02> myseq.map(mypermutation) simply works |
21:18:33 | Araq | dom96: proc foo[:T](a: seq[:tuple[:a, b: int; z: T]]) |
21:19:44 | dom96 | oh :\ |
21:19:55 | dom96 | yeah, that sucks |
21:20:27 | dom96 | Good to support both then |
21:20:45 | Araq | krux02: I find that totally confusing... :P |
21:21:03 | krux02 | well it isn't |
21:21:38 | krux02 | I worked some years in scala, and that is one of the things I would port instantly in my programming language if I would write my own |
21:21:49 | dom96 | So I'm considering creating some sort of marketing campaign for my book (by offering some books for free) |
21:22:21 | dom96 | You know, the usual: RT and follow @nim_lang and you will have a chance to win 1 out of 10 books! |
21:22:25 | dom96 | Thoughts? |
21:22:40 | Araq | dom96: [: ] sucks though for font patches |
21:22:54 | ehmry | dom96: I plan on lending my out whenever I can |
21:22:55 | krux02 | dom96: it is hard to sell a book about a programming language when they are not interested in that language, so get people interested and then show them the solution to their need for information: your book |
21:22:59 | dom96 | Araq: Nobody cares about font patches |
21:23:29 | Araq | dom96: != is already rendered differently for many people |
21:23:40 | dom96 | Who? |
21:23:53 | Araq | everybody who installed that new programming font, forgot its name |
21:23:58 | krux02 | dom96: would it make you excited if you could win a book about Forth? |
21:24:13 | dom96 | krux02: of course |
21:24:15 | dom96 | It's a free book! |
21:24:41 | krux02 | well yea |
21:24:50 | dom96 | Yeah :P |
21:25:26 | krux02 | or if you can win a book about tax returns? |
21:26:23 | krux02 | I am sorry, but I think your book is boring to most people, but if you can show them that your book contains something special, then people will be interested |
21:26:56 | * | sakalli quit (Ping timeout: 260 seconds) |
21:27:18 | dom96 | Come on, most developers are interested in new languages |
21:27:28 | krux02 | well not really |
21:27:30 | dom96 | enough to warrant wanting a free book |
21:27:38 | krux02 | most developers are interested in their own language |
21:27:45 | dom96 | okay fine, enough developers are interested in new languages |
21:28:10 | krux02 | and developers that only know one language and are heavily invested in that language demonize every other programming language |
21:29:07 | dom96 | I don't really think that's a valid reason not to do this. |
21:29:27 | krux02 | wasn't there once a feature in nem that allowed me to specify replacement patterns? |
21:29:44 | krux02 | dom96: true |
21:30:14 | krux02 | I am not an export in selling, but make a presentation somewhere |
21:30:20 | krux02 | talk about the programming language |
21:30:29 | krux02 | tell people what you can do with it |
21:30:36 | krux02 | and then show them your book at the end |
21:30:55 | dom96 | I do these things |
21:31:12 | dom96 | All. The. Time. |
21:31:16 | krux02 | ask zachery nicely if he will link your book in his presentation (maybe he will do it) |
21:31:22 | krux02 | ok |
21:31:26 | krux02 | then I am out of information |
21:32:01 | dom96 | Also, the first chapter of Nim in Action is named "Why Nim?" |
21:32:03 | krux02 | then do your "win a free book" challenge |
21:32:43 | krux02 | well I have a chapter on why c++ is broken and we need to search for a new language |
21:34:47 | * | rauss joined #nim |
21:39:46 | FromGitter | <TiberiumN> dom96: what tweet i need to RT ? :) |
21:40:53 | dom96 | TiberiumN: heh, no tweet yet. It'll definitely be tweeted by @nim_lang, and i'll try to remind you but I'll likely forget. |
21:41:04 | FromGitter | <TiberiumN> Ok :) |
21:44:38 | * | nsf joined #nim |
21:47:16 | dom96 | wow, this is awesome https://github.com/simply-jos/darwintiler |
21:47:58 | FromGitter | <TiberiumN> Yeah, saw this on Reddit |
21:56:43 | FromGitter | <cyberlis> dom96, i've read you book. i didn't find anything about `var`keyword in function params. i thought it is important |
21:57:11 | FromGitter | <cyberlis> or i missed |
21:58:12 | dom96 | It's definitely mentioned in chapter 6 |
21:58:29 | dom96 | But to be fair I didn't focus on it too much. |
21:58:31 | FromGitter | <cyberlis> will look right now |
22:04:14 | FromGitter | <cyberlis> but in general this book is good enough. it gave me enough know |
22:04:23 | dom96 | that's good :) |
22:04:34 | dom96 | 'var' in general isn't too difficult to grasp I hope |
22:08:27 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:18:19 | * | yingjun joined #nim |
22:20:16 | * | nsf quit (Quit: WeeChat 1.9) |
22:22:42 | * | yingjun quit (Ping timeout: 260 seconds) |
22:37:06 | * | cyberlis joined #nim |
22:42:24 | * | cyberlis quit (Quit: Leaving) |
22:54:05 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
22:57:45 | FromGitter | <zacharycarter> dom96: do you think something like redux lends itself well to karax? |
22:58:56 | FromGitter | <zacharycarter> it looks like right now when something like a entry is added in the todo app, the dom is just directly manipulated |
22:59:36 | Araq | it's not. there is a shadow DOM, it's diff'ed, a patch set is computed, the real DOM is patched |
23:00:43 | FromGitter | <zacharycarter> gotcha |
23:00:54 | FromGitter | <zacharycarter> Araq: what do you think for complex application state management? |
23:01:34 | FromGitter | <zacharycarter> I know you threw up at the flux video I linked you but when I make this presentation next week the question will come up |
23:02:43 | Araq | I have no idea what it means |
23:03:11 | Araq | you have state, you render it to a DOM, the state changes, it gets re-rendered |
23:03:13 | FromGitter | <zacharycarter> okay so flux and all of its implementations are basically just trying to solve the problem of what to do with application state |
23:03:29 | FromGitter | <zacharycarter> right but if all of these components have their own state |
23:03:47 | FromGitter | <zacharycarter> it can become messy quickly |
23:04:05 | Araq | then you have completely misunderstood the point of a DOM diff'ing design. |
23:04:19 | Araq | you don't have stateful components. |
23:04:27 | Araq | you avoid them. |
23:04:35 | Araq | like the fucking plague. |
23:04:58 | FromGitter | <zacharycarter> okay can you say then what karax is analogous to |
23:05:02 | FromGitter | <zacharycarter> what other framework |
23:05:06 | Araq | Elm. |
23:05:11 | FromGitter | <zacharycarter> thank you |
23:05:57 | Araq | btw Karax supports stateful components ;-) |
23:06:21 | Araq | and it took 4 iterations to get a design that works for complex stuff, ymmv |
23:06:37 | FromGitter | <zacharycarter> well then it may warrant something like flux |
23:06:43 | FromGitter | <zacharycarter> when those are used |
23:07:05 | FromGitter | <zacharycarter> but I'll stick with talking about dom diffing once I understand it more |
23:07:39 | Araq | maybe, but I still think stateful components rape the whole DOM diff idea, which is about re-inventing the immediate mode UI. |
23:07:57 | Araq | where *all* of your state is not in the UI. |
23:08:17 | FromGitter | <zacharycarter> yeah they do go against that concept I agree |
23:09:06 | * | pilne joined #nim |
23:09:18 | FromGitter | <zacharycarter> but if you're going to support stateful components you might as well support a flux implementation too since it seems that it's the JS community's preferred way of dealing with the state |
23:10:00 | FromGitter | <zacharycarter> I'm honestly extremely glad to now understand that karax ditches all that state management in favor of what you're doing |
23:10:28 | FromGitter | <zacharycarter> because christ almighty building a react app with redux and all the other shit that goes along with it, like webpack, etc... is an effing nightmare |
23:10:45 | dom96 | zacharycarter: no idea what redux is :\ |
23:11:05 | FromGitter | <zacharycarter> dom96: http://redux.js.org/ |
23:11:44 | FromGitter | <zacharycarter> it's the popular state container / management / whatever library that has emerged in the react ecosystem |
23:12:52 | dom96 | But react itself has a concept of state. Is that not enough? |
23:13:54 | FromGitter | <zacharycarter> for a lot of people apparently not |
23:14:15 | Araq | the problem is that 'react' is not 'reactive' (oh the irony) |
23:14:28 | krux02 | what is 'reactive'? |
23:15:40 | FromGitter | <zacharycarter> http://www.reactivemanifesto.org/ |
23:16:06 | FromGitter | <zacharycarter> but I mean |
23:16:18 | dom96 | "Data is measured in Petabytes." |
23:16:47 | dom96 | Yeah... for 99.9% (probably even more .9) of developers this is not the case. |
23:17:04 | Araq | no, not that one |
23:17:14 | Araq | https://en.wikipedia.org/wiki/Incremental_computing that one. |
23:17:21 | FromGitter | <TiberiumN> Because |
23:17:42 | FromGitter | <TiberiumN> Sorry, mobile gitter sucks a lot |
23:18:20 | dom96 | huh, I'm pretty sure React does that. |
23:18:20 | Araq | instead of detecting that item X was inserted into the list, the full list is rendered into a virtual DOM (O(n) instead of O(1)) and that then produces an O(1) real DOM update. (simplified to make a point) |
23:18:53 | Araq | it's an incomplete solution to the problem. |
23:19:24 | dom96 | btw React tutorial has a nice step-by-step implementation of tic-tac-toe. It'd be awesome to see how that is implemented in karax. |
23:19:53 | krux02 | <insert smart comment here> |
23:20:41 | dom96 | But yeah, I'm fairly sure that React computes which elements have changed and only performs an update on those elements. |
23:20:58 | dom96 | otherwise performance would be incredibly bad, no? |
23:21:35 | dom96 | So far from what I've used of React I ran into one gotcha. |
23:21:44 | Araq | dom96: no, it works as I wrote it works and so does karax because you need to start from reactive/incremental data structures to do better than that |
23:21:49 | dom96 | Apart from that everything worked nicely. |
23:22:03 | krux02 | I am surprised again and again on how slow some software is |
23:22:30 | dom96 | Araq: huh? I'm confused. So both Karax and React work the same way? But they are not "reactive"? |
23:22:41 | Araq | yes, that is correct. |
23:23:05 | dom96 | okay, and do you plan to fix that in karax? |
23:25:03 | Araq | yeah but not sure how |
23:26:19 | Araq | I don't see it as a big problem, but I can imagine it's one reason why people use "flux" |
23:28:04 | FromGitter | <zacharycarter> Araq: I've never done server side rendering before in a web app but I imagine it'd be possible with Nim |
23:28:13 | FromGitter | <zacharycarter> I imagine it's another question that will be asked |
23:29:45 | Araq | we're developing a native version of karax |
23:30:08 | Araq | but it's still in the design phase |
23:30:27 | FromGitter | <zacharycarter> hrm I think that's different from what I'm talking about |
23:31:57 | FromGitter | <zacharycarter> I don't think Elm handles this |
23:32:18 | FromGitter | <brimbur> Hi, is nimsuggest working for anyone in nim 17.0? |
23:32:19 | dom96 | Interesting. The developer of Factor wishes he didn't create its UI in OpenGL but used WebKit instead (https://twitter.com/slava_pestov/status/891075788413345792). |
23:32:31 | FromGitter | <zacharycarter> https://medium.com/walmartlabs/the-benefits-of-server-side-rendering-over-client-side-rendering-5d07ff2cefe8 |
23:32:47 | FromGitter | <TiberiumN> @brimbur why it shouldn't? |
23:32:54 | dom96 | Araq: Shouldn't you establish Karax first? |
23:33:25 | dom96 | It would be nice to get at least 1% of the traction of React before committing to another project (a native version of karax). |
23:34:30 | FromGitter | <zacharycarter> dom96: maybe there is already need for it? |
23:36:00 | FromGitter | <zacharycarter> dom96: do you guys think you could update the link to frag on the main page to zengine? |
23:36:12 | dom96 | zacharycarter: PR nim-lang/website |
23:36:13 | FromGitter | <zacharycarter> or just replace it with a link to someone else's library |
23:36:24 | FromGitter | <zacharycarter> will do thanks |
23:36:24 | * | dankrad_ joined #nim |
23:37:23 | * | dankrad quit (Ping timeout: 268 seconds) |
23:37:42 | Araq | dom96: that's not for me to decide. |
23:40:38 | FromGitter | <brimbur> It broke my editor after 15.something so I have been using an the old version of nimsuggest.exe that works, but the old one does not work with 17 anymore, so before I start debugging my own code I would like to know if anyone has used nimsuggest with v17 or if it is a known issue. |
23:41:18 | krux02 | well my nimsuggest fails all the time |
23:41:36 | FromGitter | <TiberiumN> You need to use the same versions of nimsuggest and compiler |
23:41:58 | FromGitter | <brimbur> Well the old one worked up until 17.0 |
23:42:23 | FromGitter | <TiberiumN> And I don't have that issue on devel with vscode-nim plugin (both on Linux and Windows) |
23:42:28 | * | itseris quit (Quit: Konversation terminated!) |
23:43:06 | FromGitter | <brimbur> But is it supposed to work? or is it a known problem? |
23:43:13 | dom96 | brimbur: what editor are you using? |
23:43:26 | FromGitter | <brimbur> my own custom |
23:43:43 | FromGitter | <TiberiumN> pH |
23:43:44 | FromGitter | <TiberiumN> Oh |
23:44:02 | dom96 | hrm. Well, what do you mean that Nimsuggest doesn't work? |
23:44:09 | dom96 | It can't answer simple queries after 0.17.0? |
23:44:16 | dom96 | gives errors? or what? |
23:44:54 | FromGitter | <brimbur> it just crashes I have not inestigated at all, just want to check if it is a known problem before I do :) |
23:45:13 | FromGitter | <brimbur> investigated |
23:45:27 | dom96 | I don't really use it to be honest :) |
23:45:31 | dom96 | Any ideas Araq ? |
23:45:33 | Araq | zacharycarter: oh that thing ... seems easy to provide for karax too, right?# |
23:45:44 | Araq | dom96: works for me |
23:46:05 | FromGitter | <TiberiumN> Hmm, I use nimsuggest all the time, and it crashed for me only once (taking up all the RAM) |
23:46:19 | FromGitter | <TiberiumN> I mean it doesn't do that usually |
23:46:51 | FromGitter | <brimbur> ok, thanks, so it should work then |
23:46:56 | FromGitter | <TiberiumN> And it's very useful - much like an IDE |
23:48:20 | FromGitter | <TiberiumN> Maybe you can debug what does your editor send to nimsuggest |
23:49:29 | FromGitter | <brimbur> I think it cant connect since 15 or something, has the connection method changed in the last years? |
23:50:11 | Araq | it did change, yeah, in particular 0.17.0 introduce multi threading |
23:50:18 | Araq | *introduced |
23:50:52 | Araq | but report it properly please, have to sleep here now |
23:50:57 | Araq | good night |
23:51:07 | Xe | sleep well Araq |
23:51:34 | FromGitter | <brimbur> Any readme or comments or docs anywhere what changed? |
23:53:29 | FromGitter | <brimbur> It feels wrong to bug report if it is not a bug, but just an undocumented change |
23:53:43 | FromGitter | <TiberiumN> Well, I don't know since I've joined Nim when it was 0.16 already |
23:53:44 | Xe | an undocumented change is a bug |
23:56:55 | * | Jesin joined #nim |
23:58:01 | * | vlad1777d quit (Remote host closed the connection) |