00:05:51 | FromGitter | <Varriount> Araq, dom96: IRC logs are down. :( |
00:07:03 | dom96 | No they aren't |
00:07:14 | dom96 | They just break when nobody says anything after midnight |
00:12:28 | * | theelous3 quit (Read error: Connection reset by peer) |
00:14:02 | * | thomasross joined #nim |
00:27:33 | FromDiscord_ | <Avatarfighter> weird |
00:31:48 | * | erik_ joined #nim |
00:39:50 | libman | anything after midnight |
00:58:29 | FromDiscord_ | <libman> Tiobe updated - https://www.tiobe.com/tiobe-index/ - still no Nim. I always like to make observations compared to previous month ( https://archive.fo/nTt2r ), let's see... |
01:00:10 | * | zachk quit (Quit: night all) |
01:03:44 | FromDiscord_ | <libman> Winners: Dlang and VB.net are up?! Losers: Java, C, C++, Python, C#, PHP, Ruby, Go, Dart, Rust, Julia are all down?! |
01:07:32 | * | erik_ quit (Quit: leaving) |
01:17:55 | ng0 | Tiobe is kinda irrelevant noise professors like to point at or something. amplified google searches etc |
02:33:45 | FromDiscord_ | <libman> They must have changed their methodology, because C# and VB.net numbers don't make sense unless there's another planet we don't know about and everyone there codes VB. |
02:34:20 | * | ng0_ joined #nim |
02:35:02 | * | ng0_ quit (Client Quit) |
02:37:47 | * | ng0 quit (Ping timeout: 256 seconds) |
03:02:27 | * | banc quit (Quit: Bye) |
03:21:08 | * | Tyresc quit (Remote host closed the connection) |
03:23:28 | * | banc joined #nim |
03:42:17 | FromGitter | <MisterBianco> Whats the correct way to check for superuser priviledges in nim? |
03:55:03 | FromGitter | <MisterBianco> Nm got it figured out, for anyone else: ⏎ ⏎ ```import posix ⏎ ⏎ echo geteuid()``` [https://gitter.im/nim-lang/Nim?at=5c5fa097253c2b5ea3e78a64] |
04:12:52 | * | dddddd quit (Remote host closed the connection) |
04:23:24 | FromDiscord_ | <juan_carlos> https://github.com/nim-lang/Nim/pull/10618#issue-251693718 |
04:24:23 | FromDiscord_ | <libman> https://www.phoronix.com/scan.php?page=news_item&px=HTML5-Golang-Desktop-Apps |
04:30:10 | * | noonien quit (Quit: Connection closed for inactivity) |
05:11:18 | disruptek | anything after midnight |
05:16:11 | * | nsf joined #nim |
05:20:03 | * | vlad1777d quit (Ping timeout: 245 seconds) |
05:39:57 | * | ashirase_ joined #nim |
06:15:16 | * | vlad1777d joined #nim |
06:56:13 | * | narimiran joined #nim |
07:38:03 | * | nsf quit (Quit: WeeChat 2.3) |
07:50:56 | * | vlad1777d quit (Remote host closed the connection) |
07:51:57 | * | vlad1777d joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:42 | * | gmpreussner joined #nim |
08:33:19 | * | yitshak joined #nim |
08:33:43 | * | yitshak quit (Remote host closed the connection) |
08:41:17 | * | vlad1777d quit (Ping timeout: 244 seconds) |
08:45:16 | * | nsf joined #nim |
09:11:02 | narimiran | Zevv: you here? |
09:36:18 | * | nsf quit (Quit: WeeChat 2.3) |
10:04:37 | * | ashirase_ quit (Ping timeout: 268 seconds) |
10:06:26 | * | vlad1777d joined #nim |
10:13:14 | * | aguspiza joined #nim |
10:13:27 | * | ashirase joined #nim |
10:16:22 | * | neceve joined #nim |
10:16:37 | * | neceve quit (Client Quit) |
10:16:59 | * | neceve joined #nim |
10:30:27 | * | Vladar joined #nim |
10:33:34 | Zevv | yes kind of |
10:33:43 | Zevv | traveliing, properly online in an hour or so |
10:33:45 | * | vlad1777d quit (Ping timeout: 246 seconds) |
10:33:48 | narimiran | ok, no hurry |
10:34:02 | Zevv | k |
10:58:48 | * | aguspiza quit (Ping timeout: 245 seconds) |
11:00:58 | * | nsf joined #nim |
11:16:39 | * | ng0 joined #nim |
11:17:48 | * | Perkol joined #nim |
11:18:44 | * | aguspiza joined #nim |
11:28:31 | * | yunfan left #nim ("leave for finding the question of 42") |
11:41:49 | Zevv | narimiran: sup? |
11:41:58 | narimiran | not much, you? :P |
11:42:19 | Zevv | same here, slow sunday :) |
11:42:42 | * | dddddd joined #nim |
11:45:08 | * | aguspiza quit (Ping timeout: 268 seconds) |
11:46:28 | narimiran | ok, nuff small talk :P |
11:46:36 | Zevv | tell me |
11:47:04 | narimiran | yesterday we talked about pascal-nim connection. and i haven't touched pascal in 15+ years. |
11:47:25 | narimiran | and then this morning i stumble upon this "modern pascal" tutorial: https://castle-engine.io/modern_pascal_introduction.html |
11:47:53 | narimiran | i scrolled through it, and if one is not careful enough, one could think he's reading nim tutorial |
11:47:58 | Zevv | "object" pascal |
11:48:07 | * | Zevv reading |
11:49:02 | narimiran | btw, it has nicer `case` syntax that i would really like to see in nim |
11:49:57 | Zevv | I'd love to have "end"s at the end of each block scope, but lets concentrate on the positives :) |
11:50:11 | Zevv | so, this is like nim, minus the metaprogramming |
11:51:18 | Zevv | I must admit a lot has changed in pascal land |
11:51:38 | Zevv | for me its also 25 years ago, I think |
11:51:55 | narimiran | ok, grampa |
11:52:30 | Zevv | Nah, i just was *very* young when doing pascal :) |
11:55:54 | Zevv | Must admit indeed, I never realized how pascallish Nim is |
11:55:57 | Zevv | nice find, thanks |
11:57:07 | Zevv | I got infected with C before starting Pascal, so I never seriously use it |
13:00:44 | Zevv | yeah funny how the nim case syntax is just a bit different from pascal. Maybe araq acidentally messed up the parser and decided its better to keep it like this :) |
13:00:52 | narimiran | :) |
13:06:14 | * | nsf quit (Quit: WeeChat 2.3) |
13:33:04 | Araq | no. |
13:33:18 | Araq | I improved the syntax because Pascal's sucks |
14:00:01 | * | noonien joined #nim |
14:27:46 | Zevv | :) |
14:29:18 | * | Perkol quit (Quit: Leaving) |
14:30:29 | FromDiscord_ | <hotdog> Does anyone have a way of parsing json at compile time? I only found a forum thread about it where it doesn't look possible |
14:33:54 | Zevv | I think I heard it's not possible (IIRC the JSON parser relies on object variants which are not supported in the Nim VM) |
14:35:09 | leorize | Zevv: NimNodes are object variants... |
14:38:07 | FromDiscord_ | <hotdog> Currently I get "VM is only allowed to 'cast' between integers of same size" |
14:48:54 | * | Cthalupa quit (Ping timeout: 246 seconds) |
14:50:05 | * | Cthalupa joined #nim |
14:50:48 | FromGitter | <Vindaar> @hotdog: It's not quite possible. But the reason is the handling of the string, since `parsejson` uses `lexbase` (makes use of e.g. `moveMem`, which isn't supported at compile time). I once hacked in a "lexbase CT". It did work, but it was horribly slow (esp. because of my string handling in my fake stream, heh). I guess it's certainly possible to properly support |
14:51:17 | * | nsf joined #nim |
14:53:20 | * | NimBot joined #nim |
14:53:21 | Zevv | leorize: yes of course, sorry about that |
14:54:03 | Zevv | there is some similar reason why pegs can not compile patterns at compile time |
14:54:14 | Zevv | so the whole peg interpreter has to go in the binary |
14:56:13 | Araq | Vindaar: oh, PR please? |
14:56:39 | Araq | hotdog: marshal uses json and parts of it work at compile-time |
15:02:03 | FromGitter | <Vindaar> @Araq: I still have the code. I can try to clean it up sometime soon |
15:02:05 | FromGitter | <arnetheduck> ok, finally found an `nlvm` gc bug that I've been thinking slowly about for months.. turns out that sometimes nlvm will stick stuff into `RBP`, like for instance temporaries that are pointers to heap objects.. this would be fine, except that `setjmp` applies "encryption" to `rbp` to prevent some obscure attacks, meaning that when mark-and-sweep uses `setjmp` to copy the registers, anything in `rbp` will be |
15:02:05 | FromGitter | ... obfuscated, and therefor the value pointed-to will be released... lovely. |
15:06:48 | FromGitter | <arnetheduck> this is pretty nasty - the `c` gen gets away by being inefficient and storing the temporary on the stack instead of a register :/ if there's interest, I can do a quick post on the forum outlining the code gen difference |
15:09:29 | FromGitter | <kayabaNerve> @arnetheduck Sounds fascinating |
15:15:34 | FromGitter | <arnetheduck> @kayabaNerve that's not the word that first came to mind when I finally realized what was going on |
15:35:20 | * | vlad1777d joined #nim |
15:42:19 | * | aguspiza joined #nim |
15:46:21 | * | Ven`` joined #nim |
16:21:21 | * | stefanos82 joined #nim |
16:41:20 | Araq | arnetheduck: I've read about setjmp "encryption" but didn't know that this has been implemented |
16:41:57 | * | neceve quit (Read error: Connection reset by peer) |
16:43:49 | FromGitter | <arnetheduck> been around in glibc since 2006ish |
16:45:25 | FromGitter | <arnetheduck> what's worse, I'm not quite sure what to do about it :/ using a temporary is actually no guarantee, compilers are too smart these days.. otoh, making everything volatile feels a bit like overreacting |
16:50:53 | FromGitter | <mratsim> @narimiran I'm around |
16:53:53 | narimiran | hey @mratsim! |
16:54:53 | narimiran | we tried to build Arraymancer with Nim 0.19.9 (as a part of our Nimble testing) and were greeted with two errors |
16:55:19 | narimiran | one is: you're relying on the long-deprecated `sequtils.map`, which is now removed in devel |
16:55:45 | FromGitter | <mratsim> fixed |
16:56:01 | narimiran | second one is: `$(Tensor)` is somehow confused with `$(HSlice)` |
16:56:42 | FromGitter | <mratsim> iirc the first issue is something related to sugar: https://github.com/mratsim/Arraymancer/issues/348 |
16:56:58 | FromGitter | <mratsim> a type resolution issue in `=>` |
16:57:24 | FromGitter | <mratsim> anyway, it compiles on my machine and passes Linux/Mac/Windows CI on both Nim stable and devel |
16:57:52 | FromGitter | <mratsim> PR with CI: https://github.com/mratsim/Arraymancer/pull/349 |
16:58:30 | narimiran | i tested arraymancer on friday, this PR is 3 hours old |
16:59:31 | FromGitter | <mratsim> yes it was broken by a devel change between my previous commit (Dec 23) and the current devel |
17:01:01 | FromGitter | <Varriount> @arnetheduck araq: https://stackoverflow.com/questions/28059021/what-are-the-actual-stuff-in-the-jmp-buf-when-using-setjmp-and-longjmp/28059176#28059176 |
17:01:48 | narimiran | @mratsim yes, just re-run the tests and that is now passing, but i now get "could not import: cblas_dgemm" :/ |
17:04:00 | FromGitter | <mratsim> you need to install openblas in the CI |
17:04:53 | FromDiscord_ | <exelotl> I managed to parse JSON at compile time with https://github.com/OpenSystemsLab/jsmn.nim but it's pretty cumbersome |
17:05:00 | FromGitter | <mratsim> once Laser is done this will be optional but right now there is too much perf diff |
17:05:05 | narimiran | hmm, this is on my machine, where i have installed blas and cblas (but not openblas) |
17:05:43 | FromGitter | <mratsim> actually I guess most popular libs will wrap/use complex libs at one point |
17:05:55 | narimiran | on the positive side, there are no more these map/=>/$ regressions! (cc Araq) |
17:08:51 | FromGitter | <mratsim> can you clone nimblas and run `nimble test`: https://github.com/unicredit/nimblas |
17:09:35 | narimiran | yep, the same error |
17:10:03 | narimiran | oops, not the same: "could not import: cblas_ddot" |
17:10:24 | FromGitter | <mratsim> that's the same error |
17:10:45 | FromGitter | <mratsim> cblas is just a common API and it should dispatch to a BLAS library I think |
17:10:54 | FromGitter | <mratsim> try installing openblas and it should fix this |
17:11:01 | FromGitter | <mratsim> are you on Mac or Linux? |
17:11:35 | narimiran | linux, and i'd rather not do that because i remember the last time i did that some other things broke (don't remember the details anymore) |
17:12:01 | FromGitter | <deansher> I just wandered through a fairly tortured trail trying to find out the best way to start using the nightlies. I wound up with `choosenim devel`. Is that best? ⏎ ⏎ It certainly isn't something a newbie will readily find. ⏎ Starting by googling *nim install nghtlies*, I went through "We currently don't offer nightly builds"; ⏎ then a Nim forum post with a github-API/wget one-liner that gives me a .tgz file with |
17:12:02 | FromGitter | ... no instructions; ... [https://gitter.im/nim-lang/Nim?at=5c605b61adf6cb0b2c966a93] |
17:12:32 | FromGitter | <mratsim> I've been using choosenim devel for months without issues |
17:12:54 | FromGitter | <kaushalmodi> "We currently don't offer nightly builds" <- that is now obsolete |
17:13:08 | FromGitter | <kaushalmodi> narimiran? dom96? |
17:13:11 | narimiran | already fixed in the website repo, but not yet pushed to the server |
17:13:38 | FromGitter | <kaushalmodi> @deansher See https://github.com/nim-lang/nightlies/releases |
17:14:23 | FromGitter | <mratsim> @narimiran I tried with blas + cblas and I get could not import: cblas_dgemm |
17:14:47 | FromGitter | <deansher> @kaushalmodi I did find that page through google, but then didn't know how to install them. |
17:14:51 | narimiran | @deansher as usual, our documentation/instructions sucks. but `choosenim` is great, you can easily switch between stable and devel |
17:14:56 | FromGitter | <arnetheduck> @Varriount yeah, though `getcontext` doesn't really say what it puts in the given variable either, from what I can tell.. the `setjmp` trick is ugly, but the same as `boehm` uses.. I guess this kind of code generation is less common if you go via `c` because of the way `clang` generates bytecode, so it doesn't happen that often, in practice.. in fact, even in `nlvm` it's very very rare and requires some pretty |
17:14:56 | FromGitter | ... special code |
17:15:04 | FromGitter | <deansher> @mratsim That certainly encourages me that life with `choosenim devel` will be good! |
17:15:05 | FromGitter | <kaushalmodi> @deansher what is your OS? |
17:15:14 | FromGitter | <deansher> osx |
17:15:54 | narimiran | @deansher you can periodically do `choosenim update devel`, and that's it. quite easy and friendly. |
17:16:01 | FromGitter | <kaushalmodi> you just download the osx tar.gz, extract and run install.sh |
17:16:10 | FromGitter | <kaushalmodi> but yes, if choosenim works for you, go for that |
17:16:27 | FromGitter | <arnetheduck> `choosenim` is great, until it's not.. tends to mess up the library path when compiling the compiler, so if you get weird stuff happening while using it, removing it from `PATH` usually solves things |
17:16:35 | narimiran | @mratsim should we open an issue in the nimblas repo? |
17:16:46 | FromGitter | <kaushalmodi> also choosenim doesn't yet work on grandpa systems like mine |
17:16:57 | FromGitter | <mratsim> I never had an issue with the library path |
17:17:29 | FromGitter | <deansher> Seems like the point of convergence would be to prominently point folks to choosenim and then harden choosenim? |
17:17:30 | narimiran | @arnetheduck: yep, i've experienced that recently and decided to abandon `choosenim`, but for someone who is just *using* nim, it should be the easiest way to switch between the versions and update |
17:17:42 | FromGitter | <deansher> :-) Or the other way around? |
17:18:28 | FromGitter | <mratsim> @narimiran I think it's the default BLAS that is broken or is missing procs, I'm trying to compare with `nm -D /usr/lib/libcblas.so` and `nm -D /usr/lib/libblas.so` |
17:18:53 | FromGitter | <kaushalmodi> on another note, looks like nightlies builds for osx/linux is failing for past two days: https://travis-ci.org/nim-lang/nightlies/builds |
17:19:42 | FromGitter | <mratsim> ah I have an idea |
17:21:15 | FromGitter | <mratsim> I have the fix @narimiran |
17:21:32 | narimiran | ok, i'll still report it to Andrea, just in case |
17:22:26 | narimiran | https://github.com/unicredit/nimblas/issues/3 |
17:25:08 | FromGitter | <mratsim> fix: https://github.com/unicredit/nimblas/pull/4 |
17:45:03 | * | Ven`` quit (Ping timeout: 245 seconds) |
18:03:58 | shashlick | @kaushalmodi we need better notification |
18:09:55 | FromGitter | <kaushalmodi> I agree |
18:30:29 | Araq | kaushalmodi: I know, I've been restarting the builds but nothing changed |
18:30:49 | Araq | it could be caused by my commit, but that only affects the Travis Windows instances which are green |
18:47:55 | * | nsf quit (Quit: WeeChat 2.3) |
19:03:35 | FromGitter | <brentp> bools in nim are 1 byte? or is sizeof incorrect? |
19:04:14 | Araq | 1 byte, yes |
19:04:38 | Araq | you cannot address single bits easily on today's machines, the memory uses byte addressing |
19:05:29 | Araq | (which is pretty stupid in this age where computing power is limited by memory access times) |
19:06:16 | dom96 | arnetheduck: narimiran: where are your issue reports? :) |
19:06:45 | * | abm joined #nim |
19:07:11 | FromGitter | <brentp> ok. I implemented something using seq[bool] and then was trying to cast to uint8 to get 8 values at a time--which can't work. |
19:11:56 | FromGitter | <akavel> Hi! What's the "devel" branch vs "0.19.x" policy in Nim? a.k.a. release schedule or something? |
19:13:02 | FromGitter | <akavel> I just realized the subsequent 0.19.x are not "devel" snapshots, but the branches diverged ~0.19.1 |
19:13:13 | FromGitter | <akavel> or .0 |
19:21:29 | FromGitter | <arnetheduck> @dom96 I'm just waiting for a some of my `nimble` reports to be fixed before issuing more ;) gotta prioritize.. |
19:28:08 | Araq | akavel: well the 0.19.x releases are pure bugfix releases, development moved over to 0.19.9 which will be 0.20 |
19:30:33 | FromGitter | <akavel> Araq: Ok, thx! Do the 0.20 etc. releases have some kind of a rough schedule, or is it mostly when you feel they're ready? (not meant in a bad way!) |
19:31:46 | dom96 | arnetheduck: Either you create a PR, someone else will, or you'll need to be very patient :) |
19:31:57 | FromGitter | <arnetheduck> pretty neat - qt creator debugging nlvm-compiled app... note the source code and disassembly intertwined - supports all the fancy breakpoints, memory views, etc: https://imgur.com/a/sQMgv8K |
19:32:37 | Araq | akavel: april seems realistic, but don't quote me on that |
19:33:48 | FromGitter | <arnetheduck> and yeah, can skip the disassembly and just step through source.. but I sometimes like to know how what's actually going on - can't trust these high-level languages :) |
19:34:46 | FromGitter | <akavel> Araq: thanks! Anyway generally are you trying to do them at some specific pace, or something? just trying to get a feel how this works |
19:38:59 | dom96 | narimiran: Araq: Can you guys send me your public SSH keys? I'll create an account for website pushes and then we won't have this bottleneck |
19:39:56 | Araq | akavel: https://github.com/nim-lang/Nim/milestone/6 we need to create issues for the bullet points |
19:40:48 | FromGitter | <akavel> Araq: thanks! |
19:41:06 | Araq | dom96: sure thing |
19:42:41 | * | Tyresc joined #nim |
19:47:32 | narimiran | dom96: "where are your issue reports? :)" i've reported it to you the other day, remember? ;) |
19:48:04 | dom96 | if it's not in the issue tracker it doesn't exist in my mind :) |
19:50:58 | Zevv | dom96: I messed up with Nimble in a creative way the other day: I forgot to add the .nimble file to git. Package got published but was very broken. |
19:51:36 | Zevv | I'm looking to add a check to nmble for this; does nimble know about all files that are supposed to go in the package from a PackageInfo? |
19:52:01 | Zevv | So that `git ls-files` at least matches the expected list of files |
19:52:34 | * | sealmove joined #nim |
19:55:16 | dom96 | `nimble check` is a thing, but it expects to see the package on the file system |
19:55:18 | dom96 | might be able to make use of it though |
19:55:20 | Zevv | ok, ta |
19:55:40 | Zevv | well, having the package on the filesystem seems like a sane prerequisite for publishing, I guess |
19:59:00 | dom96 | narimiran: can you PM me your ssh key? |
20:03:38 | FromDiscord_ | <demotomohiro> arnetheduck, your screenshot looks pretty nice! |
20:10:34 | * | kungtotte quit (Ping timeout: 250 seconds) |
20:21:01 | * | vlad1777d quit (Remote host closed the connection) |
20:23:17 | shashlick | dom96 - how does the init.sh for choosenim get updated on the website? |
20:23:33 | * | vlad1777d joined #nim |
20:26:38 | Araq | http://jultika.oulu.fi/files/nbnfioulu-201302081026.pdf fyi confirms TLSF was a good choice |
20:30:25 | Zevv | well well, that might come handy; I'm having similar Lua fragmentation issues on a low-memory device |
20:39:39 | FromGitter | <brentp> where can I find the code for iterating over system.sets? I'm hitting a bottleneck with that. |
20:41:18 | Araq | I think it's just an items in system.nim |
20:42:56 | dom96 | shashlick: manually, by me |
20:42:58 | dom96 | I'll do it later |
20:44:13 | shashlick | Ok then I can start using choosenim on windows Travis as well |
20:47:48 | FromGitter | <brentp> ok. I see it. thanks @Araq |
20:48:47 | FromGitter | <mratsim> iterating over sets is slow because you need to iterate over the whole range |
20:50:21 | FromGitter | <brentp> aye. but I sped up `card` 3X yesterday and got another 3X today. Hoping there is something similar for iteration. |
20:51:04 | Araq | yeah you can use 'scan for next set bit' instructions |
20:51:08 | FromGitter | <mratsim> for card, you can just store set + len in a wrapper type |
20:51:24 | FromGitter | <mratsim> would be instant speed :p |
20:51:38 | Araq | system.nim uses the most stupid algorithm for it and hopes the C optimizer detects the pattern |
20:52:17 | FromGitter | <brentp> this additional change to `card` gives the extra 3X: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c608f014003460b2d2b5141] |
21:01:10 | xace_ | any reason why these paste links from gitter get surrounded in brackets? really anyoying that you have to filter them out when you double click to select the url |
21:02:11 | Araq | because of our gitter bridge |
21:12:52 | FromGitter | <arnetheduck> @brentp why are you casting each byte to `int32` one by one if you've already resorted to pointer casts to `uint64` just above? also, your code will likely crash on some platforms (due to alignment issues).. also.. if you really care about performance, `unlikely` is a pretty blunt tool for it (vs PGO for example) |
21:18:20 | Araq | PGO is hard to use |
21:23:23 | FromGitter | <arnetheduck> like I said.. if you care about performance ;) mozilla manages to, with firefox - if they can.. it would be trivial to add to nim bootstrap for example - could compile itself and the newly added top-20 nimble packages or whatever to produce the release build for a free 10-15% boost |
21:26:08 | Araq | be my guest, I'm working on a 25% boost fwiw, indirectly |
21:26:19 | Araq | and slowly :-) |
21:26:30 | FromGitter | <arnetheduck> I wonder if `unlikely` breaks pgo / which takes precedence.. I can imagine that if I had an app where I specifically wanted some case to be faster, even if it's not the most common case (as pgo determines), I'd decorate with `likely` (I've been in that situation where the common case was uninteresting for a perf pov) |
21:27:35 | FromGitter | <arnetheduck> you mean the incremental compile stuff? |
21:28:44 | Araq | no, I mean my work on memory regions for Nim |
21:29:58 | FromGitter | <arnetheduck> right.. did you try with `--gc:none`? given that the compiler is fairly shortlived, that could work too, with some care ;) |
21:34:23 | Araq | iirc 400MB vs 16GB |
21:34:37 | Araq | --gc:none is crap |
21:35:16 | * | ashirase quit (Remote host closed the connection) |
21:40:13 | * | aguspiza quit (Ping timeout: 268 seconds) |
21:57:21 | * | wildlander quit (Quit: Konversation terminated!) |
21:59:35 | FromGitter | <mratsim> likely/unlikely is most likely placebo |
22:00:12 | * | qwertfisch is now known as qwerfich |
22:03:55 | Araq | maybe not for ARM, mratsim |
22:04:14 | * | sealmove quit (Quit: WeeChat 2.3) |
22:04:40 | * | sealmove joined #nim |
22:05:50 | * | qwerfich is now known as qwerzfichk |
22:08:10 | * | narimiran quit (Remote host closed the connection) |
22:09:13 | FromGitter | <mratsim> in doubt I use them ;) |
22:10:13 | Araq | they also improve readability IMO |
22:10:43 | Araq | I like to know the common cases |
22:10:54 | FromGitter | <mratsim> btw, do you have an example of expression templates in Nim? I'm hitting bindSym, {.compileTime.} and macros edge cases. |
22:11:18 | Araq | != is an expression template |
22:12:25 | FromGitter | <mratsim> I'm talking about C++-like expression template >_> |
22:12:41 | * | Vladar quit (Remote host closed the connection) |
22:13:45 | Araq | why would you use them? Use TR macros instead |
22:14:24 | * | qwerzfichk is now known as qwertfisch |
22:16:04 | FromGitter | <mratsim> I want to build a computation graph with delayed execution. |
22:16:28 | FromGitter | <mratsim> i.e. describe the operations (like + * -) and then eval them |
22:16:59 | FromGitter | <mratsim> similar to this: https://github.com/mratsim/compute-graph-optim/blob/master/e03_expr_macro.nim |
22:17:51 | FromGitter | <mratsim> bindSym doesn't work though with {.compileTime.}: https://github.com/nim-lang/Nim/issues/10628 |
22:18:43 | FromGitter | <brentp> @arnetheduck because countBits32 requires a an int32 |
22:19:45 | Araq | that's beyond my knowledge, but you're misusing bindSym afaict |
22:19:55 | shashlick | How many of you use the command line actively during development |
22:20:00 | FromGitter | <mratsim> I do |
22:20:37 | Araq | bindSym should be used inside a macro |
22:20:50 | FromGitter | <mratsim> a computation graph is just an AST, leafs are "variable" |
22:20:56 | shashlick | Versus a gui / ide F5 to build and run type of approach |
22:21:08 | FromGitter | <mratsim> but I'd like to build the AST block by block. |
22:21:35 | FromGitter | <mratsim> a macro forces me to build everything in single block. |
22:21:51 | Araq | that's kinda the point |
22:22:36 | Araq | "wash me but don't make me wet" |
22:22:51 | sealmove | does nimscript support shebang? |
22:23:21 | FromGitter | <mratsim> I need some composability, i.e. assign the AST produced to an intermediate variable. |
22:23:48 | Araq | sealmove: even better, Nimscript supports gangbang |
22:24:02 | sealmove | :d |
22:24:27 | Araq | #! is a comment, so yeah it does |
22:25:13 | FromGitter | <mratsim> because after I have some processing to do on the AST: broadcast it on an input tensor, parallelize it with OpenMP and vectorize it on whatever SIMD x86/ARM/MIPS support. |
22:25:31 | Araq | mratsim: well you can wrap the bindSym in a dummy macro |
22:25:58 | FromGitter | <mratsim> ah good hack :p |
22:26:28 | * | PMunch joined #nim |
22:27:30 | FromGitter | <mratsim> I also need to check compiler/* because I'm pretty sure there are alternative in there that I can use instead of those bindSym and {.compileTime.} hack |
22:30:22 | FromGitter | <mratsim> actually the dummy macro doesn't work same error (got int expected NimNode) |
22:30:24 | FromGitter | <arnetheduck> @brentp the point is that if you're locking your impl down to support 64-bit x86_64 only, you might as well count bits by 8-byte chunks (using countbits64) - it has the added bonus that at least it won't crash on other platforms, just be slow on <64-bit.. once you've done that, the next natural step is to make sure you use the right instructions for the problem, and then see if by removing the if == 0, you get |
22:30:24 | FromGitter | ... better or worse results... some compilers do pattern recognition and that countbits32/64 function just *might* be standard enough that it'll smartly turn it into the right instruction.. |
22:31:09 | xace_ | shashlick: i use the terminal pretty much exclusively. so mostly command line... but occassionally i setup a key to make/run the code... i like nimcr, but i feel like it needs a patch to speedup when it doesnt need recompiling |
22:31:35 | sealmove | Araq/dom is it possible to change nickname in forum? |
22:32:10 | xace_ | sealmove: you could also #!/usr/bin/env nimcr # for full nim code (dont forget to chmod +x) |
22:33:05 | Araq | sealmove: no, I don't think so |
22:33:32 | sealmove | xace_: oh! thanks! (why the name nimcr?) |
22:34:12 | sealmove | @Araq: Ok... I'll make a new account (old one was "rect0x51") |
22:34:37 | Araq | what's wrong with rect0x51? |
22:35:06 | xace_ | sealmove: nim c -r => nimcr |
22:35:18 | sealmove | nothing, I just love this new nickname that I came up with (I can tell you meaning if you like to hear a story) |
22:35:45 | sealmove | xace_: sweet! |
22:36:18 | PMunch | xace_, sealmove, yeah I didn't care to be too inventive with that name :P |
22:36:30 | FromGitter | <brentp> @arnetheduck . I know very little about this stuff, but how is it locking into support 64bit only? and you mean countBits32 could get turned into builtin popcount? |
22:37:07 | shashlick | thanks xace_ |
22:37:15 | sealmove | PMunch: nah, lack of imagination by me |
22:37:18 | sealmove | name is fine |
22:37:25 | PMunch | I meant nimcr |
22:38:00 | * | stefanos82 quit (Remote host closed the connection) |
22:38:41 | shashlick | my running theory for my text editor is that you use an editor for editing but spend a lot of time in the command line doing things |
22:38:56 | shashlick | so might as well make the command line an interface for the editor |
22:39:07 | PMunch | With vim you can spend all your time in the command line :) |
22:40:08 | shashlick | no doubt |
22:40:24 | sealmove | do you know xonsh? |
22:40:25 | shashlick | but vim, emacs and others have created a while world inside their editor |
22:40:55 | xace_ | PMunch: dw about it, its a good one imho... a problem though. i feel like it is really slow to detect if the code needs to recompile or not... basically there's a significant delay until it runs the actual executable, eventough its up to date (my best guess atm is that nimcr recompiles it eventough it shouldnt, ill debug it and let you know later) |
22:41:22 | PMunch | xace_, hmm that sounds strange |
22:41:31 | PMunch | It should be pretty instant |
22:41:51 | FromGitter | <arnetheduck> @brentp you're increasing i by 1 (sometimes), then using it as an offset and a pointer dereference - that will cause an unaligned memory read which causes crashes on some platforms, slowness on others (and mostly nothing on x86_64 where the slowness only happens when you cross a cache line).. all that is to say that optimization is easy to get wrong once you get into casts and points (which is why they're |
22:41:51 | FromGitter | ... discouraged).. what many implementations of bitsets do instead is to use an array of the natural int type - then they can avoid these pitfalls and still enjoy the benefits |
22:41:59 | xace_ | PMunch: yeah, i re-read your wording in the readme.md several times to make sure i didnt misunderstand the script. but i guess ill have to hack on it to figure it out |
22:42:12 | xace_ | PMunch: also another possibility, my machine belongs to a museum |
22:42:16 | PMunch | Do you have an example? |
22:42:46 | xace_ | PMunch: even a `echo hello world` would take more than 1 seconds to run on my pc |
22:43:05 | xace_ | its faster than nim c -r, but slower than ./helloworld |
22:43:23 | FromGitter | <arnetheduck> also, once you get to popcount, there's no speed difference between calling it for 1 and 8 bytes, so by simply doing 8 bytes at a time, you speed up by 8x.. also, if you use popcount, the if will slow you down - the reason it's *maybe* helpful in the other case is because countbits32 calculates the count using bit tricks and not popcount instruction |
22:45:11 | FromGitter | <brentp> ah. understood. and its is using bit tricks currently. |
22:45:36 | xace_ | PMunch: my best guess atm is that it has to do with my computer being "special", so dont spend your time on it, i will figure it out and let you know if it would be of interest for you |
22:45:58 | Araq | here is how to fix it: create an llvm/clang issue that the for+if doesn't generate a popcount instruction :P |
22:46:05 | PMunch | xace_, on my machine it adds about 0.002 seconds to the execution |
22:46:23 | FromGitter | <brentp> :| |
22:46:49 | PMunch | xace_, that's with the entire path of the executable, no options |
22:46:53 | xace_ | PMunch: yeah, no in my case its much more than just running it, i dont mind 0.002 difference, but 1-5 seconds is a measurable difference and a bit of annoyance at times... |
22:47:08 | PMunch | Yeah that's way too long |
22:47:22 | xace_ | PMunch: yeah, something is most likely wrong with my setup... |
22:47:58 | FromGitter | <arnetheduck> @brentp afair, yes.. https://github.com/nim-lang/Nim/blob/devel/lib/system/sets.nim |
22:51:21 | FromGitter | <brentp> yeah. I was stating. here's the change I made yesterday that does the opposite of what you say, that gave good speed improvement: https://github.com/nim-lang/Nim/pull/10619/files |
22:53:31 | * | Marumoto joined #nim |
22:53:39 | Marumoto | /msg nickserv identify macewindu |
22:53:52 | * | Marumoto quit (Remote host closed the connection) |
22:54:00 | FromGitter | <arnetheduck> yeah, so you're most likely not getting a popcount in that case, but it's easy to verify with https://gcc.godbolt.org/ |
22:55:40 | FromGitter | <arnetheduck> also, at what bit set rates did you get the speedup? 0%? 50%? 100%? |
22:56:56 | FromGitter | <brentp> closer to 0. |
22:58:28 | FromGitter | <arnetheduck> wonder what the tipover point is, where the extra branch becomes more expensive |
23:00:13 | FromGitter | <arnetheduck> with all that said, bitsets is one of those things I wouldn't mind if they moved into a library, with some minimal glue in compiler :) would be easier to optimize, and wouldn't have to be reimplemented in every backend |
23:01:47 | * | ng0 quit (Ping timeout: 256 seconds) |
23:02:18 | * | PMunch quit (Read error: Connection reset by peer) |
23:02:43 | FromGitter | <brentp> and I would be happy to use such a library. :) |
23:07:14 | FromGitter | <brentp> can sets use the builtin popcnts from lib/pure/bitops ? |
23:10:34 | Araq | with some effort. |
23:10:57 | Araq | system.nim refactorings are on-going and may might it easier |
23:17:00 | Araq | *may make |
23:17:53 | * | Jesin quit (Quit: Leaving) |
23:19:41 | FromGitter | <brentp> ok. I'll open a tracking issue unless that's just adding noise. |
23:19:42 | * | sealmove quit (Quit: WeeChat 2.3) |
23:20:34 | Araq | please don't |
23:21:03 | Araq | fix it or don't, but yesterday I closed a couple of issues in an attempt to find a certain one |
23:21:14 | Araq | and failed to find it. |
23:21:32 | FromGitter | <brentp> ok |
23:22:39 | * | Jesin joined #nim |