00:02:13 | * | yglukhov joined #nim |
00:22:18 | * | _stowa quit (Ping timeout: 265 seconds) |
00:24:26 | * | _stowa_ joined #nim |
00:27:07 | * | yglukhov quit (Remote host closed the connection) |
00:30:50 | * | yglukhov joined #nim |
00:35:51 | * | yglukhov quit (Ping timeout: 268 seconds) |
00:40:41 | * | _stowa_ is now known as _stowa |
00:40:50 | * | devted quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:42:56 | * | nsf quit (Quit: WeeChat 1.6) |
00:43:37 | * | SunDwarf quit (Ping timeout: 260 seconds) |
00:43:37 | * | delian66 quit (Ping timeout: 260 seconds) |
00:43:44 | * | delian66 joined #nim |
00:44:30 | * | SunDwarf joined #nim |
00:49:17 | * | pregressive joined #nim |
00:50:29 | * | pregressive quit (Read error: Connection reset by peer) |
00:50:39 | * | pregressive joined #nim |
00:55:26 | * | pregressive quit (Ping timeout: 250 seconds) |
01:00:22 | * | [ui] joined #nim |
01:04:50 | * | brson quit (Quit: leaving) |
01:06:18 | * | Jesin quit (Quit: Leaving) |
01:12:00 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:30:49 | * | pregressive joined #nim |
01:42:30 | * | pregressive quit () |
01:52:33 | * | Matthias247 quit (Read error: Connection reset by peer) |
01:55:54 | * | pregressive joined #nim |
02:12:16 | * | martinium joined #nim |
02:32:57 | * | yglukhov joined #nim |
02:37:50 | * | yglukhov quit (Ping timeout: 264 seconds) |
02:45:41 | * | dddddd quit (Remote host closed the connection) |
02:51:34 | * | chemist69 quit (Ping timeout: 250 seconds) |
03:05:32 | * | chemist69 joined #nim |
03:06:21 | * | cheatfate quit (Read error: Connection reset by peer) |
03:07:01 | * | cheatfate joined #nim |
03:26:13 | * | cheatfate_ joined #nim |
03:26:42 | * | cheatfate quit (Read error: Connection reset by peer) |
03:56:56 | FromGitter | <vegansk> @Araq , @dom96 , @cheatfate , please look at https://github.com/nim-lang/Nim/issues/5155 |
03:57:44 | * | martinium quit (Ping timeout: 256 seconds) |
04:06:24 | * | [ui] quit (Quit: Connection closed for inactivity) |
04:28:30 | * | renesac quit () |
04:28:35 | * | kulelu88 quit (Quit: Leaving) |
04:55:36 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:26:45 | * | s4 joined #nim |
05:39:00 | * | pregressive quit (Remote host closed the connection) |
05:39:34 | * | pregressive joined #nim |
05:44:02 | * | pregressive quit (Ping timeout: 250 seconds) |
06:17:17 | * | ludocode_ is now known as ludocode |
06:30:07 | * | bjz joined #nim |
06:33:12 | * | Vladar joined #nim |
06:43:18 | * | ludocode quit (Remote host closed the connection) |
06:44:12 | * | ludocode joined #nim |
06:45:27 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
06:52:05 | * | def-pri-pub quit (Quit: leaving) |
06:52:45 | * | cheatfate_ is now known as cheatfate |
07:00:16 | * | bjz joined #nim |
07:04:14 | * | nsf joined #nim |
07:34:42 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:06:56 | * | rokups joined #nim |
08:25:35 | * | yglukhov joined #nim |
08:26:39 | * | yglukhov quit (Remote host closed the connection) |
08:54:45 | * | confundus joined #nim |
09:12:48 | * | NimBot joined #nim |
09:13:13 | * | NimBot joined #nim |
09:13:28 | * | NimBot joined #nim |
09:13:48 | * | NimBot joined #nim |
09:14:13 | * | NimBot joined #nim |
09:32:13 | * | nsf quit (Quit: WeeChat 1.6) |
09:47:34 | * | yglukhov joined #nim |
09:48:31 | * | yglukhov quit (Remote host closed the connection) |
09:49:04 | * | Arrrr joined #nim |
09:50:41 | * | yglukhov joined #nim |
10:28:00 | * | Ven joined #nim |
10:47:26 | * | confundus quit (Quit: leaving) |
11:36:05 | * | nsf joined #nim |
12:02:12 | * | Snircle joined #nim |
12:17:51 | * | bjz_ joined #nim |
12:19:28 | * | bjz quit (Ping timeout: 268 seconds) |
12:27:06 | * | yglukhov_ joined #nim |
12:28:03 | * | yglukho__ joined #nim |
12:28:03 | * | yglukhov_ quit (Read error: Connection reset by peer) |
12:30:05 | * | yglukhov quit (Ping timeout: 258 seconds) |
12:32:01 | * | chemist69 quit (Ping timeout: 258 seconds) |
12:32:47 | * | yglukho__ quit (Remote host closed the connection) |
12:58:58 | * | chemist69 joined #nim |
13:25:56 | * | yglukhov joined #nim |
13:26:52 | * | yglukhov quit (Remote host closed the connection) |
13:29:24 | * | yglukhov joined #nim |
13:30:02 | * | Arrrr quit (Ping timeout: 264 seconds) |
13:30:59 | * | bjz joined #nim |
13:31:17 | * | bjz_ quit (Ping timeout: 248 seconds) |
13:32:35 | * | s4 quit (Quit: Konversation terminated!) |
14:00:57 | dom96 | Araq: What we need to discuss is how I should modify Nimble's CI config. |
14:01:09 | dom96 | It's currently tested against the latest Nim release. |
14:12:55 | dom96 | hrm, something like rustup for Nim would be nice |
14:17:58 | FromGitter | <martinium> Are there plans to bring nimble up to the level of Rust's cargo? |
14:18:43 | FromGitter | <martinium> There are good things that should be emulated from it. Then again I still need to read a bit more on it |
14:21:27 | dom96 | What good things would that be? |
14:22:00 | dom96 | There are plans of course. |
14:22:13 | dom96 | I've been improving nimble for the past few days actually. |
14:22:41 | FromGitter | <martinium> Cargo manages all project dependencies and can create new projects both libs and binaries |
14:22:54 | dom96 | Check and check |
14:23:01 | dom96 | Nimble does that too |
14:23:03 | FromGitter | <martinium> You can run, compile and even test code with it |
14:23:13 | dom96 | Again, Nimble does that too :) |
14:23:18 | FromGitter | <martinium> Perfect |
14:23:33 | FromGitter | <martinium> Like I said I need to read up on all the features still |
14:23:34 | FromGitter | <martinium> Lol |
14:23:42 | dom96 | You should try it out |
14:23:50 | dom96 | I'm sure you'll find a bug or two. |
14:23:59 | dom96 | That's probably the main difference between Nimble and Cargo |
14:24:12 | FromGitter | <martinium> I plan to do so today |
14:24:19 | FromGitter | <martinium> See if anythnig breaks |
14:24:29 | FromGitter | <martinium> Anything* |
14:26:22 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:27:03 | dom96 | great |
14:29:24 | FromGitter | <martinium> Are there any benchmarks of Rust vs Nim? I am pretty sure Nim is faster on top of being more pleasant to code in. |
14:30:01 | * | pregressive joined #nim |
14:30:46 | FromGitter | <raydf> https://github.com/kostya/benchmarks |
14:30:59 | FromGitter | <raydf> They are very similar |
14:31:49 | * | pregressive quit (Client Quit) |
14:34:45 | dom96 | Yeah, I think that once you get such similar results that you may as well consider their speed to be the same. |
14:37:21 | * | chemist69 quit (Ping timeout: 258 seconds) |
14:37:40 | FromGitter | <martinium> Unless you factor in coding speed/time . Nim wins there hands down. |
14:38:05 | FromGitter | <raydf> Almost all the compiled languages performs alike, Nim, Rust, D, C, Go, Crystal. Just pick the one that you love more. |
14:39:36 | FromGitter | <raydf> The only advantage is related to ecosystem, C, golang and rust have a clear adavantage. But nim can bind any c lib. |
14:40:10 | dom96 | Almost every compiled language can bind any c lib though |
14:40:25 | FromGitter | <raydf> true :) |
14:40:26 | dom96 | The question is, where is it easiest? I think with Nim it is extremely easy. |
14:40:55 | FromGitter | <raydf> @dom96, does jester has namespaces for the url? are you covering this in your book? |
14:41:23 | dom96 | Don't think so. Not sure what namespaces for a URL are? |
14:42:18 | * | chemist69 joined #nim |
14:42:34 | FromGitter | <raydf> something like grouping url routes |
14:42:45 | FromGitter | <raydf> and applying code based on this groups |
14:43:21 | FromGitter | <raydf> https://github.com/andreaferretti/rosencrantz calls it pathChunk |
14:46:17 | dom96 | hrm, well you can specify an `appName` https://github.com/dom96/jester/blob/master/tests/alltest.nim#L7 |
14:48:15 | FromGitter | <martinium> How many years has nimble package manager been around? |
14:49:09 | dom96 | 2011 |
14:49:18 | dom96 | Was when development started |
14:49:29 | dom96 | https://github.com/nim-lang/nimble/graphs/contributors |
14:51:10 | * | dddddd joined #nim |
14:51:38 | dom96 | why? |
14:52:40 | FromGitter | <martinium> Nice |
14:53:13 | dom96 | Keep in mind, I wasn't actively developing it all that time |
14:53:13 | FromGitter | <martinium> Was just curious as many projects like this take sometime to be stable. |
14:55:10 | dom96 | Cargo in comparison was started in 2014 https://github.com/rust-lang/cargo/graphs/contributors |
14:55:36 | dom96 | But has the benefit of being worked on full-time by a Mozilla employee |
14:55:59 | dom96 | Must be nice... |
14:56:07 | FromGitter | <martinium> Was just going to say, they have waayyy more contributors |
14:56:16 | FromGitter | <martinium> So comparison isn't same |
14:56:35 | FromGitter | <martinium> They have corporate backing so it is diff |
14:57:04 | FromGitter | <martinium> Many people use this language and tools but many don't contribute back to it |
14:57:21 | FromGitter | <martinium> Not that they have to but would be nice... |
14:57:36 | dom96 | indeed :) |
14:57:50 | dom96 | Hopefully Nimble isn't too bad, especially if you consider that I built it in my spare time |
14:58:04 | dom96 | For free ;) |
14:58:34 | FromGitter | <martinium> No, Nimble works well and is quite quick in my limited usage |
14:59:41 | FromGitter | <raydf> @dom96, how much compilation time does nim compiler and std libs takes? |
15:00:27 | dom96 | raydf: Bootstrapping the compiler takes like a minute or so IIRC |
15:00:38 | dom96 | On my MacBook |
15:00:59 | FromGitter | <raydf> i love the speed of the nim compiler, that for me is a plus against other compiled languages |
15:07:23 | FromGitter | <martinium> @raydf Yes, I noticed that as well even with simple programs. It is quick and keeps you in coding rhythm |
15:12:31 | dom96 | It's only going to get faster as well :) |
15:23:08 | mjanssen | any reason why the xmldom module getElementsByTagName(NS) returns a seq of PNode instead of a seq of PElement, because all other methods are defined on PElement. |
15:25:19 | mjanssen | or maybe more accurate, why for example getAttribute is defined on PElement instead of PNode |
15:26:55 | Araq | it's according to the DOM spec iirc. |
15:27:09 | Araq | the spec makes no sense, surprise. |
15:28:18 | * | space-wizard joined #nim |
15:28:26 | dom96 | Indeed, I wrote that module a long time ago and based it on the DOM spec. |
15:28:27 | mjanssen | hmm so even though the attributes field is defined on the PNode, you'll need to cast to PElement to actually use the getAttribute proc. Spec be damned that's just odd |
15:28:46 | dom96 | feel free to create a PR to improve this module. |
15:29:01 | mjanssen | ok I will when I have some time. |
15:29:11 | dom96 | I don't think it's used very often though. xmltree is much nicer. |
15:32:34 | mjanssen | strange thing, hasAttribute is defined on PNode |
15:32:43 | mjanssen | anyway will look into creating a PR |
15:32:48 | mjanssen | and look at xmltree |
15:39:58 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:42:09 | * | nsf quit (Quit: WeeChat 1.6) |
15:57:03 | dom96 | Something like this would be awesome for Nim: http://hyperpolyglot.org/c |
16:07:36 | FromGitter | <raydf> @dom96, any discount codes for your book :) |
16:07:41 | FromGitter | <raydf> ? |
16:07:51 | dom96 | nope, sorry |
16:08:02 | FromGitter | <raydf> :), thanks anyway |
16:13:30 | * | space-wizard joined #nim |
16:24:17 | * | azur_kind joined #nim |
16:26:17 | FromGitter | <raydf> Any template engine for nim? |
16:26:38 | FromGitter | <raydf> like https://github.com/Shopify/liquid? |
16:28:04 | Araq | there is some implemenation for this strange "mustache" thingie iirc |
16:28:43 | Araq | and a couple of others, but actually a templating system is built into the compiler via "source code filters" |
16:29:16 | FromGitter | <raydf> any example of the source code filters? |
16:30:24 | Araq | http://nim-lang.org/docs/filters.html |
16:31:06 | Araq | https://github.com/nim-lang/Nim/blob/devel/tools/niminst/buildsh.tmpl |
16:31:55 | Araq | https://github.com/nim-lang/Nim/blob/devel/tools/website.tmpl |
16:32:18 | FromGitter | <raydf> nice, thanks |
16:34:20 | * | irrequietus joined #nim |
16:36:35 | * | Vladar quit (Ping timeout: 258 seconds) |
16:36:39 | * | acidx quit (Quit: Lost terminal) |
16:42:40 | * | acidx joined #nim |
16:50:57 | * | yglukhov quit (Ping timeout: 250 seconds) |
16:51:22 | * | brson joined #nim |
16:51:50 | * | yglukhov joined #nim |
16:53:22 | * | nsf joined #nim |
16:53:47 | * | yglukhov_ joined #nim |
16:55:54 | * | Matthias247 joined #nim |
16:56:20 | * | yglukhov quit (Ping timeout: 256 seconds) |
16:57:00 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:58:29 | * | yglukhov_ quit (Ping timeout: 260 seconds) |
17:00:21 | * | irrequietus quit (Ping timeout: 248 seconds) |
17:05:14 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:20:06 | * | acidx quit (Ping timeout: 246 seconds) |
17:20:15 | * | _stowa quit (K-Lined) |
17:37:27 | mjanssen | dom96, Araq : https://github.com/nim-lang/Nim/pull/5160 |
17:47:15 | * | Jesin joined #nim |
17:49:46 | mjanssen | for the record, the treexml solution is slightly faster than the xmldom solution |
17:54:03 | * | Trustable joined #nim |
17:56:22 | * | Gonzih quit (Quit: WeeChat 1.6) |
18:01:58 | * | rokups quit (Quit: Connection closed for inactivity) |
18:13:59 | * | yglukhov joined #nim |
18:18:12 | * | yglukhov quit (Ping timeout: 246 seconds) |
18:23:51 | * | space-wizard joined #nim |
18:26:30 | * | mjanssen quit (Disconnected by services) |
18:26:49 | * | mjanssen joined #nim |
18:31:11 | * | mjanssen quit (Read error: Connection reset by peer) |
18:31:39 | * | mjanssen joined #nim |
18:47:57 | * | azur_kind quit (Remote host closed the connection) |
18:50:01 | Trustable | I found a bug: Compiler SIGSEGV when mixing method and proc https://github.com/nim-lang/Nim/issues/5161 |
18:59:37 | FromGitter | <martinium> in order to use asynchttpclient it has to run inside an async proc correct? |
18:59:52 | FromGitter | <martinium> that means a procedure with {.async.} at the end? |
19:00:03 | FromGitter | <martinium> before the proc body |
19:15:03 | * | irrequietus joined #nim |
19:20:52 | Araq | yes |
19:21:58 | * | pregressive joined #nim |
19:22:57 | FromGitter | <martinium> thanks @Araq |
19:24:43 | * | gangstacat quit (Quit: Ĝis) |
19:30:55 | * | schuuu joined #nim |
19:33:58 | * | pregress_ joined #nim |
19:34:00 | * | pregressive quit (Read error: Connection reset by peer) |
19:35:28 | * | irrequietus quit (Ping timeout: 245 seconds) |
19:38:28 | * | acidx joined #nim |
19:39:14 | * | gangstacat joined #nim |
19:44:21 | * | brson quit (Quit: leaving) |
19:48:14 | * | schuuu left #nim (#nim) |
19:52:50 | * | pregress_ quit (Read error: Connection reset by peer) |
19:53:04 | * | pregressive joined #nim |
19:53:59 | * | pregressive quit (Remote host closed the connection) |
19:54:31 | * | pregressive joined #nim |
19:55:42 | * | pregressive quit (Read error: Connection reset by peer) |
19:56:02 | * | pregressive joined #nim |
19:59:29 | FromGitter | <martinium> currently getting this error ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=586419a19d4cc4fc534f9033] |
19:59:39 | FromGitter | <martinium> for this code: |
19:59:47 | * | yglukhov joined #nim |
19:59:54 | FromGitter | <martinium> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=586419ba7a3f79ef5daf709c] |
20:00:12 | FromGitter | <martinium> can someone point on my error when they get a chance? |
20:04:05 | * | bjz joined #nim |
20:17:21 | FromGitter | <dom96> You can only await futures |
20:18:05 | FromGitter | <martinium> futures is a module for future things that will be added to lang or? |
20:19:50 | FromGitter | <martinium> if you could show me an example it would be a big help |
20:25:14 | FromGitter | <martinium> actually nevermind I’ll get to async later on |
20:26:17 | * | pregressive quit (Read error: Connection reset by peer) |
20:26:28 | FromGitter | <martinium> @dom96 how would I access a specific json object that is from a parseJson response? |
20:26:46 | * | pregressive joined #nim |
20:32:07 | * | pregressive quit (Remote host closed the connection) |
20:32:28 | * | pregressive joined #nim |
20:32:43 | * | pregressive quit (Remote host closed the connection) |
20:35:50 | * | brson_ joined #nim |
20:36:12 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:37:01 | * | kulelu88 joined #nim |
20:42:17 | * | brson_ quit (Quit: leaving) |
20:42:24 | * | brson joined #nim |
20:45:25 | * | bjz joined #nim |
20:51:19 | FromGitter | <dom96> @martinium why did you remove your messages :\ |
20:52:13 | dom96 | Anyway, if I remember your code correctly: just move the 'await' to the line with getContent() |
20:53:53 | FromGitter | <martinium> @dom96 going to try this ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58642661058ca96737a00eb6] |
20:54:53 | dom96 | that should work |
20:55:36 | FromGitter | <martinium> it needs to me to add discard to the function call |
20:56:14 | FromGitter | <martinium> (11, 14) Error: value of type 'Future[system.void]' has to be discarded |
20:56:20 | FromGitter | <martinium> so I did that and it compiles |
20:56:29 | FromGitter | <martinium> but doesn’t display any output |
20:58:22 | dom96 | Okay, so, in this case you need to use 'asyncCheck' instead of 'discard' |
20:58:36 | dom96 | Your bitmexFunding function returns a Future |
20:58:47 | dom96 | (because every {.async.} proc does) |
20:58:58 | FromGitter | <martinium> I have to read the docs on futures |
20:59:03 | dom96 | and you shouldn't discard futures |
20:59:12 | dom96 | This may change in the future. |
20:59:23 | dom96 | This 'asyncCheck' business is ugly and I did have an idea on how to get rid of |
20:59:25 | dom96 | *of it |
20:59:32 | dom96 | that said |
20:59:46 | dom96 | your no output may be a different problem |
21:00:05 | FromGitter | <martinium> without async code it works fine |
21:00:15 | FromGitter | <martinium> with async doesn’t output |
21:00:19 | FromGitter | <martinium> but it does compile |
21:00:22 | FromGitter | <martinium> displays |
21:00:23 | FromGitter | <martinium> ha |
21:00:35 | dom96 | oh right, you need to run the asyncdispatch event loop |
21:00:39 | dom96 | You can do that in two ways |
21:00:46 | dom96 | Either replace 'asyncCheck' with 'waitFor' |
21:00:59 | dom96 | or add 'runForever()' at the bottom of your script |
21:01:30 | FromGitter | <martinium> I recognize runForever() from you jester example |
21:01:52 | dom96 | 'waitFor' will run the event loop until the future you pass to it finishes, so 'waitFor bitmexFunding()' will run the event loop (and thus your program) until bitmexFunding finishes |
21:02:05 | dom96 | runForever() will... run the event loop forever :) |
21:02:16 | dom96 | So it's better for server-type apps |
21:03:08 | FromGitter | <martinium> waitFor seems a better fit for this use case but thanks for telling me about those |
21:03:24 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:04:59 | FromGitter | <martinium> now what I am trying to figure out is how to access specific parts of the returned json array object |
21:05:08 | dom96 | ahh yes. |
21:05:24 | dom96 | jsonObj["field"].getStr() # if the "field" is a string |
21:05:41 | FromGitter | <martinium> can it be done by index position? |
21:05:42 | dom96 | jsonObj["field"].getNum() # if "field" is an int etc |
21:05:51 | dom96 | only if jsonObj is an array |
21:05:57 | FromGitter | <martinium> it is |
21:05:59 | dom96 | then yes |
21:06:13 | FromGitter | <rivasiv> hi |
21:06:18 | dom96 | hi rivasiv |
21:07:38 | FromGitter | <rivasiv> quick question -- Is ## supported in latest c2nim |
21:07:56 | FromGitter | <martinium> so it would be jsonObj[18] as an example or jsonObj[18].getNum() |
21:08:27 | FromGitter | <rivasiv> or it's easier to rewrote all metacode that using it manually ? |
21:09:07 | dom96 | rivasiv: not sure I'm afraid. |
21:09:15 | dom96 | martinium: yes, just try it :) |
21:10:36 | FromGitter | <martinium> got it to work |
21:10:52 | FromGitter | <martinium> had to remove the pretty print from the variable and added it as a method chain to the echo |
21:11:11 | FromGitter | <rivasiv> @dom96 Thanks |
21:13:06 | FromGitter | <martinium> @dom96 this works ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=58642ae29e6f00e74ad128f0] |
21:15:05 | dom96 | great |
21:25:06 | * | bjz joined #nim |
21:31:24 | FromGitter | <martinium> ironically it works for the entire object which is what I want |
21:31:42 | FromGitter | <martinium> but if I want just a key from the json it doesn’t echo the output |
21:33:10 | * | Salewski joined #nim |
21:35:55 | Salewski | I wonder if gcc.options.speed = "-O3 -fno-strict-aliasing" in default nim.cfg should contain always "-march=native". Because most people compile for the local box. |
21:37:03 | Salewski | For my gentoo box -march=native is generally the compiler default, but for people with binary distributions that may be not the case. |
21:38:02 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:38:43 | Salewski | And of course -march=native can make a big difference in performance. |
21:45:50 | * | Trustable quit (Remote host closed the connection) |
21:59:50 | dom96 | martinium: hrm, not sure what you mean |
22:00:10 | FromGitter | <martinium> fundingResp[18].pretty |
22:00:24 | FromGitter | <martinium> prints everything in object I want |
22:01:12 | FromGitter | <martinium> but if I want to narrow to a key : value in that object I tried fundingResp[“symbol”].pretty no output/fails |
22:01:58 | FromGitter | <martinium> actually |
22:02:00 | FromGitter | <martinium> never mind |
22:02:02 | FromGitter | <martinium> just solved it |
22:02:03 | FromGitter | <martinium> ha |
22:02:21 | FromGitter | <martinium> fundingResp[18][“symbol”].pretty worked |
22:02:56 | Araq | Salewski: does -march=native produce measurable differences though? |
22:05:43 | Salewski | Yes. For Gentoo this option is very important, and from what I read at stack overflow it can make a large difference. |
22:07:00 | Salewski | For my recent post a Nim forum, I did a test where I forgott to enable it, makes more than a factor of two for a loop. (the popcount C builtin test.) |
22:07:25 | FromGitter | <martinium> I used to use Arch Linux specifically because the performance differences between a binary distribution vs a native compiled distro were negligible on modern hardware |
22:07:38 | FromGitter | <martinium> there were benchmarks on the net proving this |
22:07:59 | FromGitter | <martinium> at least for a home desktop PC |
22:08:05 | Salewski | Of course portability is a problem, when we compile code for plain x86 boxes. |
22:08:19 | FromGitter | <martinium> if you are talking for HPC or something that performance critical that may matter more |
22:10:12 | Salewski | My estimation is that -march=native on skylake makes a typical difference to plain x86 of about 20 to 30 % in performance. |
22:17:08 | Salewski | http://www.phoronix.com/scan.php?page=article&item=gcc_49_optimizations&num=1 |
22:17:37 | Salewski | So it can make a big difference, but not always. |
22:18:48 | Salewski | And that benchmark is before Skylake -- for latest hardware differences should be larger. |
22:28:36 | Araq | these benchmarks are not representative for my programs, unfortunately |
22:28:59 | Araq | some language compiler/interpreter would be interesting |
22:29:33 | FromGitter | <martinium> @Araq would it be too difficult to create a REPL for nim? |
22:30:14 | Araq | there is 'nim secret' but it's just too limited |
22:46:29 | * | Sentreen quit (Ping timeout: 248 seconds) |
22:49:27 | Salewski | Indeed, my feeling is that for Nim with GCC -flto is even more important. It seems to increase performance and drastically decrease executable size. |
22:52:33 | * | chemist69 quit (Ping timeout: 245 seconds) |
22:53:22 | * | chemist69 joined #nim |
22:53:46 | * | Ven joined #nim |
23:00:45 | * | Sentreen joined #nim |
23:11:41 | FromGitter | <martinium> @Salewski have you tested on several nim apps? |
23:12:08 | FromGitter | <martinium> More performance and smaller executable are always good |
23:15:01 | Salewski | Yes, I have tested link time optimization about a year ago for gcc and clang. While gcc with -O3 without -flto give very large executables, with lto size is much smaller. |
23:15:49 | Salewski | clang with lto gives very small executables, but unfortunately need the gold linker. |
23:16:35 | Salewski | There are some forum posts about this, someone suggested that -flto should be the default for gcc. |
23:17:01 | FromGitter | <Gheoan> can a `Stream` be constructed from an array of bytes? ⏎ something like: ⏎ ⏎ ```import streams ⏎ ⏎ var stream = Stream([0x56, 0x00, 0xF7, 0x7C]);``` [https://gitter.im/nim-lang/Nim?at=586447ec9d4cc4fc53507e08] |
23:17:36 | Salewski | http://forum.nim-lang.org/t/2049#12735 |
23:18:42 | Salewski | So -flto default may be indeed a good option, when it generates no problems. |
23:26:27 | dom96 | Gheoan: I don't think so. You might be able to convert the array into a string and then create a string stream though |
23:34:53 | * | Salewski left #nim (#nim) |
23:38:49 | FromGitter | <Gheoan> I ended up using `newFileStream`. The bytes were coming from a file anyway. Thank you @dom96. |
23:43:19 | * | nsf quit (Quit: WeeChat 1.6) |