00:02:06 | * | stefanos82 quit (Remote host closed the connection) |
00:03:08 | * | seni joined #nim |
00:03:52 | * | wildlander quit (Quit: Konversation terminated!) |
01:10:47 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
01:23:25 | * | rockcavera quit (Ping timeout: 268 seconds) |
01:37:06 | * | a_b_m quit (Ping timeout: 250 seconds) |
01:43:36 | * | noonien quit (Quit: Connection closed for inactivity) |
02:03:51 | * | seni quit (Quit: Leaving) |
02:12:54 | * | rockcavera joined #nim |
02:51:38 | * | Cthalupa quit (Ping timeout: 250 seconds) |
02:52:58 | * | Cthalupa joined #nim |
03:02:25 | * | banc quit (Quit: Bye) |
03:06:22 | * | Cthalupa quit (Ping timeout: 250 seconds) |
03:08:31 | * | Cthalupa joined #nim |
03:21:08 | * | banc joined #nim |
03:29:45 | FromGitter | <Varriount> @riddl_gitlab Why are you trying to use unsigned integers? |
03:31:06 | shashlick | i'm passing an untyped body to a macro which creates a proc |
03:31:54 | shashlick | i want to refer to params passed to that proc in the body but nim says undeclared identifier |
03:40:57 | leorize | riddl_gitlab try appending `u` to 0 |
03:41:06 | leorize | but you shouldn't use uints in general |
03:43:26 | shashlick | https://github.com/genotrance/feud/blob/master/src/pluginapi.nim#L38 <= that's my macro |
03:43:51 | shashlick | https://github.com/genotrance/feud/blob/master/plugins/file.nim#L92 <= that's how I want to call it |
03:51:31 | leorize | shashlick: try adding `{.inject.}`? |
03:51:59 | leorize | usually the proc and it's param would be gensym-ed |
03:52:41 | shashlick | to the macro? |
03:52:56 | leorize | yea, add it to the generated function signature |
03:55:26 | shashlick | I added it to onLoad and onUnload as a pragma but no luck |
03:56:04 | leorize | try also adding it next to the params? |
03:58:42 | shashlick | nope |
04:04:41 | leorize | shashlick: I think using a `{.dirty.}` template would work best here |
04:05:19 | shashlick | but this isn't a template, it is a macro generating a proc |
04:07:06 | leorize | are you going to use macro functions? |
04:07:15 | * | ryukoposting quit (Quit: WeeChat 1.6) |
04:07:31 | shashlick | ya see the second link where i want to use them |
04:07:53 | * | nsf joined #nim |
04:10:04 | leorize | yes, but you won't need a macro to do that |
04:10:09 | leorize | a template would do just fine |
04:10:39 | leorize | `quote` is basically template with extra steps |
04:12:23 | shashlick | i changed to a template with a body: untyped and it still complains that ctx is undeclared |
04:14:27 | leorize | add `{.dirty.}` to the template |
04:15:21 | shashlick | okay now it is complaining about callbacks which is a const |
04:17:13 | leorize | can you post the errors somewhere? |
04:19:09 | shashlick | ..\src\pluginapi.nim(38, 18) Error: undeclared identifier: 'callbacks' |
04:20:05 | leorize | try adding `mixin callbacks`? |
04:22:58 | shashlick | bind callbacks worked |
04:24:23 | shashlick | why do I have to bind? |
04:25:56 | shashlick | but thanks! it works 😄 |
04:26:29 | leorize | either a bug or it's just how dirty templates work :P |
04:28:46 | shashlick | yay, my plugin infrastructure now works |
04:28:59 | shashlick | i can edit files and things will get rebuilt and loaded automatically |
04:31:25 | * | dddddd quit (Remote host closed the connection) |
04:40:56 | * | leb__ quit (Ping timeout: 240 seconds) |
04:50:57 | * | leb__ joined #nim |
05:13:36 | FromGitter | <Varriount> shashlick: What are you working on? |
06:26:02 | * | kapil____ joined #nim |
06:52:09 | * | narimiran joined #nim |
06:53:16 | * | krux02 joined #nim |
07:01:40 | * | krux02 quit (Remote host closed the connection) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:16 | * | lritter joined #nim |
08:04:52 | * | gmpreussner joined #nim |
08:05:41 | Araq | this explains a lot... |
08:05:48 | Araq | var compilerPrefix* = "compiler" / "nim" ## built via ./koch tests |
08:06:05 | Araq | so tests defaults to some temp compiler in compiler/ ? |
08:07:43 | Araq | terrible. |
08:25:50 | FromGitter | <timotheecour> @araq that dates back from this comment: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c57f70dc2dba5382eda4a60] |
08:26:32 | FromGitter | <timotheecour> i also don’t like it; one option is `getCurrentCompilerExe`, another option is `nim` |
08:27:03 | FromGitter | <timotheecour> But that obviously needs some thought |
08:28:21 | Araq | it should use nim.exe from the PATH unless --nim is used |
08:29:10 | Araq | we can also introduce a NIM_EXE env var that is used by every tool and play the envvar game |
08:29:55 | Araq | where everything depends on global state. But I guess it already does thanks to PATH |
08:30:47 | FromGitter | <timotheecour> here’s a solid argument against PATH: `nim_temp` would never work |
08:31:28 | Araq | yeah the logic would be like: use --nim if exists, else test NIM_EXE, else use nim.exe from PATH |
08:32:03 | FromGitter | <timotheecour> so NIM_EXE is preferable to PATH; but there is another option: `—define:nimCompiler:…` which user can put in his ~/.config/config.nims for eg |
08:32:54 | Araq | no. I don't want a "recursive" nim.exe |
08:33:13 | FromGitter | <timotheecour> what do u mean recursive |
08:33:29 | Araq | config.nims is processed by nim.exe |
08:34:01 | Araq | and I thought you meant that it looks at 'nimCompiler' and delegates to it |
08:34:22 | FromGitter | <timotheecour> no i don’t mean that |
08:35:13 | FromGitter | <timotheecour> what u run on cmd line obviously needs to be in PATH (eg nim or nim_temp or koch or whatever); that’s the program that’ll run and will NOT delgate to nimCompiler |
08:36:27 | FromGitter | <timotheecour> i think this deserves a github issue tho, to make sure all arguments r considered' |
08:36:51 | Araq | please don't |
08:38:00 | Araq | it's really simple, we won't have NIM_EXE, tools default to the nim.exe from PATH as before and testament will be fixed |
08:38:51 | Araq | to override nim.exe globally, mess with the env var PATH instead of a new one |
08:38:58 | FromGitter | <timotheecour> how about: ⏎ use `nimCompiler` from `-d:nimCompiler:nim_temp` if exists, else test NIM_EXE, else use nim.exe from PATH |
08:39:45 | Araq | I don't understand how -d:nimCompiler:nim_temp could work unless you keep recompiling testament |
08:40:24 | FromGitter | <timotheecour> right |
08:41:31 | FromGitter | <timotheecour> > we won't have NIM_EXE, tools default to the nim.exe from PATH as before and testament will be fixed ⏎ ⏎ doesn’t work with `nim_temp` for examples |
08:41:52 | Araq | no for that you use --nim |
08:42:25 | FromGitter | <timotheecour> ok so we still need `—nim`, i thought u wanted to get rid of it |
08:43:00 | Araq | (plus nim_temp is really for something else to begin with...) |
08:43:09 | FromGitter | <timotheecour> but `koch tests` doesnt’ rebuild nim, and `compilerPrefix` is set to `—nim` |
08:43:41 | Araq | here is my workflow in a nutshell |
08:43:55 | Araq | 1. develop stuff with 'koch temp c/doc/cpp testfile' |
08:44:15 | Araq | 2. ensure 'koch boot && koch boot -d:release' still works |
08:44:45 | Araq | 3. run selected tests with testament (can and should use the nim.exe from PATH) |
08:45:11 | Araq | I don't run tests with nim_temp |
08:46:02 | FromGitter | <timotheecour> > plus nim_temp is really for something else to begin with ⏎ ⏎ `nim_temp` is just an example, i often run tests w a `nim_experiment_xyz` |
08:46:48 | FromGitter | <timotheecour> `./koch tests` can just use `nim` from PATH, else from `—nim`; and (new thing) not from `compiler" / “nim` |
08:46:57 | FromGitter | <timotheecour> Yes? |
08:47:01 | Araq | yes |
08:48:17 | FromGitter | <timotheecour> while u’re here, https://github.com/nim-lang/Nim/pull/10545 |
08:54:21 | * | floppydh joined #nim |
09:01:58 | * | JustASlacker joined #nim |
09:04:57 | * | kapil____ quit (Quit: Connection closed for inactivity) |
09:06:44 | * | a_b_m joined #nim |
09:14:33 | * | Vladar joined #nim |
09:29:50 | narimiran | does nimsuggest leak memory? naaaah https://i.imgur.com/NYn5q9O.png :D |
09:31:08 | leorize | yes, and that's not new :P |
09:31:18 | FromGitter | <timotheecour> https://github.com/nim-lang/nimsuggest/issues/75 |
09:32:21 | FromGitter | <timotheecour> which makes me wonder: seems like a stdlib issue (staticRead) rather than nimsuggest issue |
09:33:18 | leorize | well, nimsuggest have to evaluate expressions to highlight code properly :P |
09:36:35 | Araq | narimiran, fix it ;P |
09:40:49 | narimiran | shit, i should have been quiet :D |
09:40:50 | Araq | er ... "I read a 600kB file with staticRead" ... well |
09:41:22 | Araq | maybe don't read a 600kB file then, looks more like a memory fragmentation issue |
09:41:57 | Araq | compiler allocates 600kb, frees it, reuses the memory for smaller objects, allocates another 600kb |
09:41:58 | * | joshbaptiste quit (Ping timeout: 246 seconds) |
09:42:09 | Araq | on the other hand, that's what TLSF was written for |
09:42:14 | FromGitter | <mratsim> I’m more concerned about nimsuggesst 100% CPU usage ... |
09:42:27 | FromGitter | <mratsim> that’s like everytime I use CTFE |
09:42:33 | leorize | I found that nimsuggest only reach that when it starts evaluating a new file |
09:42:58 | leorize | once the results are known nimsuggest won't reevaluate it |
09:43:42 | leorize | solution: lower the cpu priority for nimsuggest |
09:43:52 | leorize | also make sure that your OS have a sane scheduler |
09:43:58 | Araq | that's a hack, not a "solution" |
09:44:02 | leorize | :P |
09:45:06 | Zevv | 100% is not a problem; any process that has to do any work will use 100% of the (a) CPU. The question is "how long" |
09:45:22 | leorize | maybe reduce the iteration limit for nimsuggest? |
09:47:29 | FromGitter | <mratsim> @Zevv, any process that sleeps will use 100% of the CPU as well |
09:48:28 | Araq | "sleeps"? no. |
09:48:35 | Zevv | oh? I always though it will not be scheduled an the kernel will handle the sleeping |
09:48:40 | Zevv | in a low power state, these days |
09:48:47 | leorize | unless by sleep you mean `while a < 1000000: inc a` :P |
09:49:50 | FromGitter | <mratsim> the while foo: polling loop :/ |
09:50:07 | Zevv | mratsim: I once worked on a platform where the CPU would be powered off if all processes were sleeping. After the time was due it would basically do a cold boot, restore all state from SRAM and resume as if nothing happened |
09:50:16 | Araq | the pooling loops get detected by some CPUs iirc |
09:50:21 | FromGitter | <mratsim> you know that when you launch a game and on the main screen the CPU goes 100% … I hate that |
09:50:33 | Araq | and then the CPU powers down anyway |
09:51:04 | Zevv | anyway: if you'd throttle nimsuggest, the result would just be slower operation, and upsetting the user, right? |
09:51:41 | leorize | a way out would be to reduce the iteration limit |
09:52:06 | leorize | that should keep the result usable(?) |
09:54:07 | Araq | the VM has an iteration limit |
09:54:51 | Araq | yeah, that's right, the VM solved the halting problem. Take that, you stupid computer science! |
09:55:57 | Zevv | I've heard the halting problem has been solved using a big stick. Just bang your computer until it stops. |
09:58:10 | Araq | that's the "Turing as an engineer" variant, the VM uses a counter instead |
09:58:19 | Zevv | both effective |
10:03:47 | FromGitter | <timotheecour> @araq ok to split megatest in 2 (by half)? It sometimes causes final link step to fail (with no error messages) ⏎ `Error: execution of an external program failed: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5c580e03f04ef00644d8bd1c] |
10:06:15 | FromGitter | <timotheecour> also https://github.com/nim-lang/Nim/pull/10545 is finally green and i need it for other upcoming PRs |
10:10:35 | * | xet7 quit (Ping timeout: 268 seconds) |
10:20:03 | Araq | IMHO you misuse parentDir, declare it a bug and then you change its behaviour |
10:20:44 | Araq | "/" has no parent directories, it's not its own parent |
10:22:08 | Araq | and why are your paths full of double slashes? before you arrived I didn't even know it's valid |
10:22:30 | * | xet7 joined #nim |
10:24:46 | Araq | and how can this be a prerequisite for upcoming PRs... I'm not trying to mock you, please explain the context |
10:26:15 | Araq | timotheecour: megatest also triggered other new bugs we need to look into. Unfortunately we have enough bugs already. |
10:27:09 | FromGitter | <timotheecour> Ugh, here we go again, the justification time, fine: ⏎ ⏎ > *<Araq>* "/" has no parent directories, it's not its own parent ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c58137c975714406b911db2] |
10:27:30 | * | stefanos82 joined #nim |
10:28:07 | FromGitter | <timotheecour> as well as in bash, directly: ⏎ ⏎ ```dirname / ⏎ /``` ⏎ ⏎ Its the sane behavior [https://gitter.im/nim-lang/Nim?at=5c5813b7f04ef00644d8e861] |
10:28:22 | Araq | dirname is not the same as parentDir |
10:28:44 | Araq | while p.len > 0: p = p.parentDir # yay, you broke it for '/' |
10:29:55 | Araq | and yeah if you break my code it's "justification time" |
10:32:28 | FromGitter | <timotheecour> ok 1 issue at a time; what do u mean by `still has multiple yields` ? |
10:33:39 | Araq | the iterator has multiple 'yield' statements --> code bloat for an inline iterator |
10:33:53 | Araq | as the loop's body is then duplicated |
10:35:28 | Araq | it's hard to do without multiple yields though because this iterator is misdesigned, too many options that control its behaviour |
10:35:36 | * | ng0 joined #nim |
10:36:28 | Araq | which is why I prefer my 'while p.len > 0: p = p.parentDir' loops that you broke with your new parentDir |
10:36:36 | FromGitter | <timotheecour> trying to understand here; that affects performance? or another factor? |
10:36:42 | Araq | code size. |
10:37:17 | FromGitter | <timotheecour> well we need just 1 parentDir, the other 1 is a workaround (or should become the main one) |
10:37:34 | FromGitter | <timotheecour> (typo => parentDirs) |
10:39:18 | FromGitter | <timotheecour> is that an actual bottleneck though ? i’d rather have correctness first and speed can come in future PR if it’s proven a bottleneck ; |
10:39:49 | Araq | it's a standard lib, you don't know the bottlenecks. |
10:40:16 | Araq | also again, for every yield statement the for loop *body* is duplicated |
10:40:39 | Araq | if the body is 100 lines of code and you have 4 yields, that makes 400 lines of code |
10:41:49 | Araq | but ok, correctness first is fine with me, how is parentDir"/" == "/" correct? it's not. |
10:42:54 | FromGitter | <timotheecour> can u write down in PR the list of tests where u disagree with the `expected` i gave ? then i can justify each decision |
10:43:17 | FromGitter | <timotheecour> (there are clear bugs from before PR) |
10:43:46 | Araq | I already replied on the issue |
10:43:47 | narimiran | Araq: what i think @timotheecour is trying to solve/change is the last element `echo toSeq(parentDirs("/a/b/c/d"))` |
10:44:19 | FromGitter | <timotheecour> that’s just one of the things that the PR fixes |
10:44:35 | Araq | toSeq(parentDirs) always was broken but now my while loops are broken |
10:45:12 | narimiran | so, `low priority` label, and let's move on? |
10:46:16 | FromGitter | <timotheecour> not low priority, parentDir and parentDirs are broken and I want to fix it with this PR |
10:48:20 | Araq | then fix it, but don't shift the problem around |
10:48:21 | * | leb__ quit (Ping timeout: 250 seconds) |
10:48:59 | Araq | "works for me, but objectively it broke code that's out there, including the Nim compiler itself" is not a fix |
10:50:27 | FromGitter | <timotheecour> `parentDir("a/b//“)` returns `a/b/` how is this not a bug? |
10:50:46 | FromGitter | <timotheecour> and yes, double paths do happen |
10:51:27 | Araq | that is a bug, yes, but parentDir"/" == "" is by design |
10:51:42 | Araq | and my code relies on it |
10:51:48 | Araq | and it makes sense. |
10:52:18 | narimiran | parentDir("/a") == ? |
10:52:26 | Araq | and the alternative is something like if parentDir() in ["C:", "/", "D:"] |
10:53:07 | Araq | or rather in (when defined(windows): ["C:", "D:"] else ["/"]) |
10:53:20 | FromGitter | <timotheecour> at the very least we need a proc with the semantic that i gave to to `parentDir` in the PR, it could be called `dirName` ; that’s exactly the semantic i expect from it, analog to other languages |
10:53:22 | Araq | and even that would be wrong still |
10:54:21 | Araq | and why would dirname for "foo/bar" not return "foo/bar" if that's a directory? |
10:54:35 | * | leb__ joined #nim |
10:54:55 | FromGitter | <timotheecour> I really don’t understand why `parentDir(“/foo") ` is empty; no other languages does that |
10:55:11 | leorize | because there's no parent for the root dir? |
10:55:29 | Araq | well parent dir for "/foo" should be "/" |
10:55:37 | Araq | but for "/" it should be empty |
10:56:02 | Araq | I agree parentDir is wrong, but the parent dir of "/" is not "/". |
10:56:02 | FromGitter | <timotheecour> yes, but previously u said https://github.com/nim-lang/Nim/issues/8734 is not a valid bug… |
10:56:17 | Araq | not everything in there is a bug |
10:56:48 | Araq | all I really care about is that parentDir"/" keeps returning "" |
10:57:45 | FromGitter | <timotheecour> then we need a bool option as most languages do same as I did; i can try to do research and get back |
10:58:05 | Araq | no ffs. I don't care what dirname does in other langs |
10:58:13 | Araq | it's not "dirname" |
10:58:22 | Araq | it's written as 'parentDir' |
10:58:22 | * | dddddd joined #nim |
10:58:27 | FromGitter | <timotheecour> then would u accept a `dirName` |
10:58:46 | leorize | the `dirname` behavior came from the POSIX spec IIRC |
10:59:14 | Araq | 'dirname' is a misleading name |
10:59:32 | FromGitter | <timotheecour> it’s the name and behavior that everybody else uses though |
10:59:40 | leorize | POSIX isn't the best spec out there :P |
10:59:43 | * | tzui joined #nim |
11:00:11 | leorize | well, but I wouldn't like having a `dirname` in the stdlib |
11:00:28 | leorize | soon people will ask whether they should use `dirname` or `parentDir` |
11:01:50 | FromGitter | <timotheecour> in all OSX i know: ⏎ ⏎ ```cd / ⏎ cd .. ⏎ Pwd ⏎ /``` ⏎ ⏎ => consistent w dirName [https://gitter.im/nim-lang/Nim?at=5c581b9e975714406b9156d2] |
11:01:59 | FromGitter | <timotheecour> (Typo: in all OS ) |
11:02:20 | Araq | who cares we don't have an os.pwd either |
11:03:10 | Zevv | /cc |
11:05:16 | Araq | https://docs.microsoft.com/de-de/dotnet/api/system.io.path.getdirectoryname?view=netframework-4.7.2 |
11:05:26 | Araq | This code produces the following output: |
11:05:26 | Araq | GetDirectoryName('C:\MyDir\MySubDir\myfile.ext') returns 'C:\MyDir\MySubDir' |
11:05:26 | Araq | GetDirectoryName('C:\MyDir\MySubDir') returns 'C:\MyDir' |
11:05:26 | Araq | GetDirectoryName('C:\MyDir\') returns 'C:\MyDir' |
11:05:26 | Araq | GetDirectoryName('C:\MyDir') returns 'C:\' |
11:05:27 | Araq | GetDirectoryName('C:\') returns '' |
11:05:30 | FromGitter | <timotheecour> same thing: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c581c799221b9382d11862b] |
11:05:54 | leorize | ju/ur |
11:05:56 | leorize | oops |
11:06:04 | FromGitter | <timotheecour> so on posix, behavior i have in PR is correct |
11:06:04 | Araq | but notice that parentDir is also not C#'s GetDirectoryName |
11:06:11 | leorize | https://superuser.com/questions/186184/the-parent-of-the-root-directory |
11:06:28 | narimiran | so, EOD? we need to fix `parentDir("/foo")`, and that's it, we can move on? |
11:09:24 | Araq | if I understand the situation correctly dirname is a hack for a missing parentDir operation and the "directory name" of "foo/bar" happens to produce "foo" too, so it's good enough to go up in the tree |
11:11:20 | Araq | " Evaluating as NimScript file failed with: |
11:11:20 | Araq | ... C:\Users\rumpf\projects\nim\lib\pure\os.nim(944, 10) Error: undeclared identifier: 'useWinUnicode'." why? |
11:12:19 | FromGitter | <timotheecour> is that after my PR? |
11:12:25 | Araq | no |
11:12:57 | Araq | I'm re-enabling nimble package testing to testament |
11:14:48 | Araq | but it's ok, it's a regressiong from my os/ospaths reforms |
11:16:36 | Araq | ah it's a Nimble issue |
11:49:00 | * | joshbaptiste joined #nim |
11:58:30 | * | banc quit (Ping timeout: 250 seconds) |
11:58:43 | * | banc joined #nim |
12:05:47 | * | neceve joined #nim |
12:06:44 | * | leb__ quit (Ping timeout: 250 seconds) |
12:11:13 | * | kungtotte joined #nim |
12:17:00 | FromGitter | <timotheecour> @araq for the sake of unblocking that PR, `parentDir(“/“)` is now back to empty, and we can revisit this after that PR is merged so at least the other bugs are fixed in the meantime |
12:18:18 | FromGitter | <timotheecour> > *<Araq>* and the alternative is something like if parentDir() in ["C:", "/", "D:”] ⏎ ⏎ there’s a better alternative: `isRoot(dir)` which would mean exactly that (in a robust way wrt multiple slashes etc) |
12:19:01 | FromGitter | <timotheecour> (`isRootDir` is a completely different animal (and a bit oddly named IMO) but `isRoot` or another name can be used for that) |
12:20:56 | * | jubalh joined #nim |
12:21:54 | Araq | that would still be off as I might want to iterate for the isRoot() case, but *after* it I don't anymore |
12:23:30 | FromGitter | <timotheecour> do u have a code snippet as a concrete use case example? |
12:23:53 | Araq | the one you "fixed" in the compiler |
12:24:12 | Araq | C:\nim.cfg is a perfectly fine config file |
12:24:23 | Araq | and after the C: I'd like to leave the loop |
12:25:27 | Araq | btw fyi: the results for 0.19.9 on "some" Nimble package are a desaster |
12:25:42 | Araq | most stuff is broken in subtle ways |
12:25:52 | Araq | bbl |
12:25:56 | FromGitter | <timotheecour> u mean as a result of that PR ? |
12:28:33 | FromGitter | <timotheecour> > most stuff is broken in subtle ways ⏎ ⏎ that’s what i had observed in https://github.com/nim-lang/Nim/pull/10247 |
12:47:46 | shashlick | @Varriount: yet another text editor |
12:52:13 | * | dom96_w joined #nim |
12:53:28 | * | vlad1777d joined #nim |
12:55:47 | * | d10n-work joined #nim |
13:04:55 | dom96_w | Araq: I thought you got the website push working |
13:20:59 | * | leb__ joined #nim |
13:26:27 | * | tzui quit (Remote host closed the connection) |
13:27:48 | * | tzui joined #nim |
13:29:28 | * | leb__ quit (Ping timeout: 264 seconds) |
13:42:13 | Araq | dom96_w, told you I didn't |
13:42:37 | dom96_w | keep pinging me for stuff like this |
13:42:54 | Araq | you promised you would do it on FOSDEM |
13:44:50 | * | nsf quit (Quit: WeeChat 2.3) |
13:46:33 | Araq | nimble test |
13:46:33 | Araq | Warning: Package 'arraymancer' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'arraymancer', but file 'autograd.nim' is in a directory named 'autograd' instead. This will be an error in the future. |
13:46:33 | Araq | Hint: If 'autograd' contains source files for building 'arraymancer', rename it to 'arraymancer'. Otherwise, prevent its installation by adding `skipDirs = @["autograd"]` to the .nimble file. |
13:48:41 | Araq | https://gist.github.com/Araq/7b7974aaade522157abb0bb4b34d7c5a |
13:48:49 | dom96_w | I said I would try and do it on the train, but the train internet was unusable |
13:49:02 | dom96_w | I didn't have a chance to do it while at FOSDEM |
13:49:11 | Araq | and then you had no internet for 2 days... :P |
13:49:32 | dom96_w | snd then I forgot |
13:49:51 | Araq | anyway, this is bad, I don't understand this error message |
13:50:45 | dom96_w | Why did you post the warning? |
13:50:53 | dom96_w | Is that what you don't understand? |
13:51:01 | Araq | no, then I gisted it instead |
13:51:10 | narimiran | sooo, dom96_w, how was FOSDEM? :) |
13:51:18 | Araq | that's arraymancer with Nim devel |
13:51:28 | Araq | no idea what's wrong |
13:52:01 | dom96_w | narimiran: pretty good. Met krux02, couven92, a guy called Max and a couple other people |
13:53:36 | dom96_w | arnetheduck was pretty elusive though |
13:54:21 | Araq | he always is :-) |
14:01:06 | shashlick | Araq are macros not allowed to be dirty? |
14:01:23 | Araq | what would that even mean |
14:01:55 | * | vlad1777d quit (Ping timeout: 268 seconds) |
14:02:39 | shashlick | Last night I wanted to pass a body to a macro |
14:02:56 | JustASlacker | what would be the nim way of doing something like "lsof -i | grep bacula-fd | grep ESTABLISHED -c" |
14:03:14 | shashlick | The macro generated a proc |
14:03:22 | JustASlacker | use execShellCmd ? |
14:03:27 | shashlick | And I wanted to pass the body into the proc |
14:03:39 | * | vlad1777d joined #nim |
14:03:58 | dom96_w | JustASlacker: yes, or research what APIs `lsof` calls and wrap them in Nim |
14:04:02 | shashlick | So the body contained references to the param of the proc |
14:04:11 | JustASlacker | dom96_w: hm, funky idea |
14:04:15 | dom96_w | It's likely something in POSIX though and so should already be wrapped in the `posix` module |
14:04:16 | shashlick | Nim complains undeclared |
14:04:17 | FromDiscord_ | <juan_carlos> psutil on nimble |
14:04:58 | JustASlacker | oh ,there is a posix module |
14:05:10 | Araq | shashlick, make the macro take an 'untyped' parameter |
14:05:17 | * | kapil____ joined #nim |
14:05:19 | Araq | and ensure it's not overloaded on this position |
14:05:21 | JustASlacker | wow that looks ugly |
14:05:34 | shashlick | Araq I tried that but it didn't work |
14:05:58 | * | dom96_w quit (Quit: Textual IRC Client: www.textualapp.com) |
14:06:08 | Araq | it works, it's used extensively in Karax and elsewhere |
14:06:21 | shashlick | Leorize finally got me up and running with a dirty template |
14:06:27 | shashlick | Ok I'll check Karax |
14:09:47 | * | vlad1777d quit (Ping timeout: 240 seconds) |
14:17:46 | FromGitter | <mratsim> @araq not sure what the error is, but it seems quite recent |
14:18:14 | Araq | mratsim: I managed to fix it but now I'm in blas.dll hell |
14:18:32 | Araq | and I moved on to nimongo |
14:18:36 | FromGitter | <mratsim> which platform are you on? |
14:18:53 | Araq | windows |
14:19:00 | FromGitter | <mratsim> ah yeah windows |
14:19:10 | FromGitter | <mratsim> in the CI I use nuget to download blas |
14:19:50 | FromGitter | <mratsim> hopefully with Laser I can remove that dependency or have a at least a 80% speed fallback |
14:20:21 | Araq | the dependency is ok, I don't expect stuff to work anyway |
14:20:33 | Araq | but Nim's error message sucks |
14:20:42 | Araq | or maybe the regression sucks |
14:21:28 | Araq | theory vs practice. In theory static checking for my tensors is lovely. in practice I cannot get it to compile and would have to use Python instead |
14:21:39 | FromGitter | <mratsim> according to the error message, one tensor became a seq |
14:22:27 | Araq | yeah I fixed it. |
14:29:24 | * | rokups joined #nim |
14:45:06 | narimiran | to continue the discussion about nimsuggest memory consumption from this morning: |
14:45:31 | narimiran | changing these would be a (too) easy fix? :) https://github.com/nim-lang/Nim/blob/devel/nimsuggest/nimsuggest.nim.cfg#L13 |
14:46:46 | Araq | how much RAM do you have? |
14:47:04 | narimiran | plenty, but that's not the point |
14:47:44 | Araq | what is the point? |
14:48:41 | * | aguspiza joined #nim |
14:49:01 | * | plushie joined #nim |
14:54:08 | narimiran | point is that some suggesting tool shouldn't be allowed to take all|half of somebodies RAM |
14:54:33 | narimiran | if it leaks (and it does), we can kill it earlier, before it becomes a monster |
14:55:10 | Araq | so ... if it takes 4GB it's a monster but if it takes 2GB it isn't? |
14:55:28 | narimiran | over 200MB is a monster already :D |
14:56:14 | narimiran | currently i kill all nimsuggest processes several times a day |
14:58:38 | Araq | "all processes"? Why does it start more than one |
15:00:09 | * | ng0 quit (Ping timeout: 256 seconds) |
15:00:26 | FromGitter | <mratsim> vscode plugin once again I guess |
15:00:43 | FromGitter | <mratsim> same, I need to killall nimsuggest quite often |
15:00:50 | narimiran | huh, i thought that's normal and expected :/ let me see if i can narrow it down when a new process appears |
15:00:52 | FromGitter | <mratsim> especially just before benchmarking |
15:00:57 | narimiran | (yes, vscode plugin) |
15:10:05 | narimiran | ok, there are two behaviours i'm experiencing when i try to edit more than one file in vscode: |
15:10:48 | narimiran | either there is a new nimsuggest process for the second file, or i don't have code completition for it |
15:33:38 | narimiran | Araq: here is a screenshot of multiple nimsuggest processes, courtesy of vscode plugin: https://i.imgur.com/W6UFs8z.png |
15:42:35 | * | JustASlacker quit (Remote host closed the connection) |
15:54:16 | * | nsf joined #nim |
16:06:05 | * | plushie quit (Quit: WeeChat 1.9.1) |
16:13:07 | * | leb__ joined #nim |
16:23:16 | * | seni joined #nim |
16:24:09 | * | kapil____ quit (Quit: Connection closed for inactivity) |
16:41:30 | * | gmengano joined #nim |
16:43:47 | * | gmengano quit (Client Quit) |
16:49:50 | * | dom96_w joined #nim |
16:50:08 | dom96_w | https://www.reddit.com/r/nim/comments/aillno/speeding_up_python_with_nim/efq1q23/?context=3 |
16:50:21 | dom96_w | Who was it that said this is a common optimisation problem? Mratsim? :) |
16:50:27 | * | dom96_w quit (Client Quit) |
16:52:07 | FromGitter | <mratsim> yep |
16:53:06 | FromGitter | <mratsim> there is a forum thread about that in the past 6 days too |
16:53:23 | FromGitter | <mratsim> we probably need a dedicated article, similar to faster commend line tools in Nim |
16:53:31 | FromGitter | <mratsim> command* |
16:54:02 | FromDiscord_ | <juan_carlos> I got 3 modules on PyPI, 3~20 X speed, depends how CPU intensive stuff is. |
16:54:34 | FromDiscord_ | <juan_carlos> Some Python modules on C are really manually hand crafted to state of the art after a lot of years to. |
17:00:46 | FromGitter | <mratsim> I’m pretty sure the main issue is intermediate string allocation when people concatenate or loop over a string |
17:04:11 | FromDiscord_ | <juan_carlos> Best is to get all strings and join all them at once, if possible. |
17:04:21 | * | floppydh quit (Quit: WeeChat 2.3) |
17:08:01 | FromGitter | <mratsim> People coming from a language with a GC that also does memory pooling are not trained to do that |
17:09:00 | FromGitter | <mratsim> relevant: https://forum.nim-lang.org/t/2816 |
17:25:57 | * | neceve quit (Ping timeout: 246 seconds) |
18:17:07 | * | chimez joined #nim |
18:17:22 | * | chimez quit (Client Quit) |
18:30:30 | * | vlad1777d joined #nim |
18:49:31 | * | theelous3 joined #nim |
18:51:35 | * | nsf quit (Quit: WeeChat 2.3) |
19:49:09 | Araq | hmm my osx lacks CLOCK_REALTIME |
19:56:43 | Araq | „As FreeBSD and OSX support CLOCK_REALTIME, there's no reason to keep this code around.“ |
19:56:56 | Araq | yes there is, older OSXes still lack it... |
20:00:03 | * | Cthalupa quit (Ping timeout: 245 seconds) |
20:00:59 | leorize | Araq: that's rather weird, what version of OSX are you running? |
20:01:28 | Araq | 10.11.6 El Capitan |
20:02:31 | * | Cthalupa joined #nim |
20:03:41 | leorize | ah, I see, only 10.12+ supports it |
20:03:45 | Araq | and why don't we use mach_absolute_time |
20:03:48 | * | lritter quit (Quit: Leaving) |
20:04:05 | Araq | posix is an illusion, there are only real OSes and we need to target them. |
20:05:31 | leorize | you can try :) I don't have a Mac when I wrote that patch so I just relied on the CI |
20:06:26 | * | rokups quit (Quit: Connection closed for inactivity) |
20:07:57 | Araq | no, I reverted your commit instead, partially for OSX |
20:30:04 | * | Trustable joined #nim |
20:59:28 | dom96 | website deployed |
21:01:27 | * | Trustable quit (Remote host closed the connection) |
21:17:46 | FromGitter | <riddl_gitlab> any sprintf equivalent in nim? |
21:17:59 | dom96 | https://nim-lang.org/docs/strformat.html |
21:19:46 | FromGitter | <riddl_gitlab> thank you, duck duck go should index nim website better;) |
21:20:23 | FromGitter | <kaushalmodi> at least on google, "nim string formatter" returns strformat link |
21:20:49 | FromGitter | <kaushalmodi> well, ddg too: https://duckduckgo.com/?q=nim+string+formatter&t=hk&ia=web |
21:21:06 | FromGitter | <kaushalmodi> ok, 3rd link |
21:21:14 | FromGitter | <riddl_gitlab> yeah, I should look for more generalized term |
21:21:28 | FromGitter | <riddl_gitlab> not "sprintf equivalent nim" ;) |
21:21:58 | FromGitter | <kaushalmodi> heh |
21:23:02 | dom96 | hopefully duck duck go will pick it up in the irc logs :) |
21:23:22 | FromGitter | <riddl_gitlab> :D |
21:24:03 | FromGitter | <Clyybber> I'm trying to build nim on alpine linux, does musl not provide limits.h? |
21:24:33 | FromGitter | <Clyybber> Because building the csources fails with limits.h not being available |
21:25:40 | FromGitter | <riddl_gitlab> install musl-dev |
21:26:15 | FromGitter | <Clyybber> Thank you |
21:27:48 | FromDiscord_ | <juan_carlos> Theres a project named nim_config thats a nimscript with tasks to install musl, compile, etc etc |
21:28:27 | FromGitter | <kaushalmodi> nim_config will sort of evolve into my personal nim config |
21:28:33 | FromGitter | <kaushalmodi> like my emacs config, etc. |
21:28:41 | FromGitter | <kaushalmodi> see the hello_musl project instead: https://github.com/kaushalmodi/hello_musl |
21:28:47 | * | aguspiza quit (Ping timeout: 240 seconds) |
21:29:15 | FromGitter | <kaushalmodi> though, that library requires the user to have the musl library installed on their machine |
21:29:38 | FromGitter | <Clyybber> @kaushalmodi Does nim not compile without such a config? |
21:29:56 | * | leb__ quit (Ping timeout: 240 seconds) |
21:30:20 | FromGitter | <kaushalmodi> the hello_musl is basically a repo to store recipes for compiling various libs using musl + nim |
21:30:24 | FromGitter | <kaushalmodi> like pcre and openssl |
21:30:59 | FromGitter | <kaushalmodi> if you don't plan to statically link those 2 libs, you won't need most of the config in hello_musl |
21:31:19 | FromGitter | <Clyybber> Ah ok. Does the stdlib make use of pcre or openssl/libressl? |
21:31:28 | FromGitter | <kaushalmodi> also, I wanted `nim musl foo.nim` to do the Right Thing(TM) and that's how that hello_musl project was born |
21:32:32 | FromGitter | <kaushalmodi> `httpclient` needs ssl |
21:32:44 | FromGitter | <kaushalmodi> if you are using the inbuilt `re`, you will need pcre |
21:33:17 | FromGitter | <kaushalmodi> (and many other stdlibs use ssl) |
21:33:17 | FromGitter | <Clyybber> Does nre require pcre too? |
21:33:22 | FromGitter | <kaushalmodi> nre is deprecated |
21:33:38 | FromGitter | <kaushalmodi> https://scripter.co/notes/nim/#regex |
21:33:55 | FromGitter | <kaushalmodi> if you don't want to rely on pcre, `nimble install regex` |
21:34:30 | FromGitter | <Clyybber> Thank you |
21:35:54 | FromGitter | <timotheecour> > nre is deprecated ⏎ ⏎ Ugh… not that again; nre has a better API, we have to either keep both or deprecate the other |
21:36:00 | Araq | yay, 0.19.4 is out. thanks dom96 |
21:36:21 | Araq | yes, that again, because that's what we claimed to be the case |
21:37:26 | FromGitter | <Clyybber> I thought nre was the newer one, so thats why I was confused |
21:39:10 | FromGitter | <timotheecour> @Clyybber you have to read the entire thread (eg https://github.com/nim-lang/RFCs/issues/31#issuecomment-427682084) to get a good understanding of re vs nre |
21:43:05 | FromGitter | <Clyybber> Don't know what that is related to, but I'm encountering two new issues rn. |
21:43:39 | FromGitter | <Clyybber> Nimble for some reason keeps downloading a dependency of a package of mine |
21:44:03 | FromGitter | <Clyybber> and linking fails with musl and undefined references to vulkan functions... |
21:44:58 | FromGitter | <Clyybber> @kaushalmodi Do you know what could cause undefined references with musl but not with glibc? |
21:46:06 | * | narimiran quit (Ping timeout: 250 seconds) |
21:46:28 | FromGitter | <Clyybber> Im using {.link:.}, does that not work with musl out of the box? |
21:46:35 | shashlick | use nimpcre if you want to compile it in |
21:47:18 | FromGitter | <Clyybber> I don't use nre or re right now, I'm using my vulkan wrapper |
21:47:30 | FromGitter | <Clyybber> And I'm linking libvulkan.so |
21:47:37 | FromGitter | <Clyybber> but it doesn't work with musl |
21:57:10 | * | Vladar quit (Remote host closed the connection) |
22:26:36 | * | thomasross quit (Remote host closed the connection) |
22:29:23 | * | thomasross joined #nim |
22:30:28 | * | thomasross quit (Max SendQ exceeded) |
22:31:11 | * | thomasross joined #nim |
22:32:43 | * | thomasross quit (Max SendQ exceeded) |
22:33:15 | * | thomasross joined #nim |
22:35:08 | * | thomasross quit (Max SendQ exceeded) |
22:35:34 | * | thomasross joined #nim |
22:36:31 | dom96 | https://news.ycombinator.com/item?id=19081351 |
22:36:38 | dom96 | *cough* |
22:41:51 | FromGitter | <riddl_gitlab> what Status is? some cryptocurrency scam company? |
22:42:09 | FromGitter | <arnetheduck> yep, terrible people |
22:42:10 | xace_ | lol |
23:15:11 | * | flaviu quit (Remote host closed the connection) |
23:15:37 | * | flaviu joined #nim |
23:22:41 | * | flaviu quit (Remote host closed the connection) |
23:44:12 | * | vlad1777d quit (Ping timeout: 244 seconds) |
23:59:57 | * | stefanos82 quit (Remote host closed the connection) |