00:00:02 | * | junland quit (Quit: %ZNC Disconnected%) |
00:01:21 | * | junland joined #nim |
00:15:25 | * | Hideki_ joined #nim |
00:29:52 | * | krux02 joined #nim |
00:33:55 | * | Hideki_ quit (Remote host closed the connection) |
00:37:41 | * | dddddd quit (Remote host closed the connection) |
00:37:44 | * | Hideki_ joined #nim |
00:42:40 | * | Hideki_ quit (Ping timeout: 268 seconds) |
01:05:32 | * | Hideki_ joined #nim |
01:27:20 | * | owl joined #nim |
01:40:21 | * | Hideki_ quit (Remote host closed the connection) |
01:40:39 | * | Hideki_ joined #nim |
01:53:43 | * | rayman22201 joined #nim |
01:54:07 | rayman22201 | Hi, been a while. @dom96 would you happen to still be awake? |
01:54:42 | rayman22201 | 3 am there. probably not. damn |
01:55:15 | rayman22201 | any other nim people awake right now? lol |
02:28:51 | leorize | am I counted as nim people? :P |
02:29:07 | rayman22201 | maybe. :-P |
02:29:23 | rayman22201 | how good is your knowledge of the async code leorize? |
02:29:48 | * | Hideki_ quit (Remote host closed the connection) |
02:31:37 | leorize | enough to use it :P |
02:32:03 | * | Hideki_ joined #nim |
02:33:22 | rayman22201 | lol. That may not be enough |
02:34:11 | rayman22201 | I am finally doing the big AsyncEvent refactor that I promised to finish a month ago... Somehow, I got into a situation where asyncDispatch is eating exceptions and I have no freaking clue why. |
02:34:28 | rayman22201 | I'm deeeeeep down the rabbit hole here lol |
02:34:35 | leorize | try --expandMacros to get the generated code? |
02:34:56 | leorize | --expandMacro I mean |
02:35:08 | rayman22201 | did that. All looks good. I didn't change the macro generation anyway, so that shouldn't matter... |
02:36:04 | rayman22201 | I'm printf debugging. The exception callback gets put on the callback queue correctly, then it suddenly disappears when the runloop actually goes to run it. |
02:36:06 | rayman22201 | very strange |
02:36:17 | * | Hideki_ quit (Ping timeout: 246 seconds) |
02:39:44 | leorize | is your code up somewhere? I might be able to take a look |
02:41:23 | rayman22201 | Not yet. It's kind of a mess with print statements right now lol |
02:42:09 | rayman22201 | I could screen share if you are up for it |
02:49:37 | * | theelous3 quit (Ping timeout: 245 seconds) |
03:04:23 | * | krux02 quit (Remote host closed the connection) |
03:06:02 | * | lritter quit (Ping timeout: 240 seconds) |
03:06:58 | * | lritter joined #nim |
03:09:03 | disruptek | exceptions in async are a mess, afaik. i think dom told me recently that they were fixed, but i honestly did not notice a change to the good. |
03:09:26 | rayman22201 | They are a mess. but in his defense it's a hard problem. |
03:09:57 | disruptek | i know, but i guess what i'm saying is "fixed" is a frame of reference that may well vary even among nimmers. |
03:10:39 | rayman22201 | I think that is true for most things in life. "fixed" is relative to the amount of BS you are willing to put up with. |
03:10:50 | * | Hideki_ joined #nim |
03:10:53 | disruptek | my solution is to remove exceptions from all my code, but that's partly motivated by bugs (read: feelings) about current exception handling. |
03:11:18 | rayman22201 | I can't disagree with you. |
03:11:33 | rayman22201 | unfortunately I'm working on stdlib code, so I have to account for them :-( |
03:24:18 | rayman22201 | I'm beginning to wonder if this is a bug, or if I fixed a bug... |
03:24:22 | rayman22201 | look at this: https://github.com/nim-lang/Nim/blob/devel/tests/async/t8982.nim |
03:24:48 | rayman22201 | Would expect the exception in failingAwaitable() to fire? |
03:24:54 | rayman22201 | would you* |
03:26:29 | disruptek | no, because the program ends after the shorter future completes. |
03:27:07 | * | Hideki_ quit (Ping timeout: 245 seconds) |
03:27:27 | rayman22201 | exactly. |
03:27:42 | rayman22201 | but the test expects the exception to be thrown? |
03:28:37 | rayman22201 | also, "runForever()" is an infinite loop.... if anything bad were to happen in this test (like say swallowing exceptions...) this test will just hang and run forever?? |
03:29:07 | rayman22201 | hrmmm.... I think this may be a bad test |
03:29:07 | disruptek | i think we spoke about exceptions earlier. 😉 |
03:30:03 | disruptek | what are you trying to exercise? |
03:30:18 | disruptek | sorry, i guess i'm coming in late and missed the backstory. |
03:31:36 | disruptek | what i mean is, are you looking for different behavior? |
03:32:07 | rayman22201 | This is a complete tangent. I am rewriting the AsyncEvent implementation b/c of this: https://github.com/nim-lang/Nim/pull/11724#issuecomment-522113239 |
03:32:16 | rayman22201 | and in the course of my rewrite, I broke this test |
03:32:59 | rayman22201 | specifically, I'm doing "#2. The stdlib ioselectors needs to be fixed so that it does not eat up all of the socket fd's on your system." |
03:34:16 | disruptek | okay. |
03:34:21 | rayman22201 | The more I think about it, the more I'm confused about how that test worked in the first place... |
03:36:13 | rayman22201 | essentially, the future inside "failingAwaitable" was able to continue to run even though the 'or' completed.... |
03:36:16 | disruptek | it's not swallowing anything. |
03:36:35 | disruptek | or, at least, it shouldn't be. it should not run because it should get torn down when main leaves scope. |
03:36:57 | rayman22201 | but it does run. look at the expected output of the test |
03:37:10 | rayman22201 | it does not run on my branch with the rewrite though :-P |
03:37:34 | rayman22201 | the problem is, I don't know exactly why! And that scares me... |
03:38:11 | disruptek | i'm not familiar with the impl, but how/where does it deregister? |
03:38:40 | rayman22201 | part of the issue here, is that Nim futures don't have a "cancel".... I think that is a huge flaw in the design... but I digress... |
03:38:46 | disruptek | my expectation is that without a destructor mechanism... |
03:39:46 | disruptek | wow, i don't think i've ever seen these docs. i wonder how i ever managed to use this thing. |
03:40:42 | rayman22201 | lol |
03:41:56 | disruptek | well, to me, your code is correct. |
03:42:41 | disruptek | it seems like we expected the exception due to the circumstances and merely ack it and move on. but, it's obviously not ideal. the only concern i have is, can you confirm that the failableFuture is running? |
03:45:10 | rayman22201 | aha! good point. It is in fact running in both cases. There is something else going on here |
03:45:25 | rayman22201 | I think I know what it is too. running a test. hold on |
03:45:53 | disruptek | well, it runs, it gets deregistered (somehow), and all is right in the world. except what? |
03:48:05 | rayman22201 | It's a completely different exception. "No handles or timers registered in dispatcher." |
03:48:25 | rayman22201 | an internal exception gets thrown when the async Dispatcher has nothing to dispatch |
03:48:37 | disruptek | you mean in your code or in trunk? |
03:48:48 | rayman22201 | that's in trunk. |
03:49:01 | rayman22201 | but in my fork, it always has something to dispatch because I keep an internal global handle that it listens on. |
03:49:13 | disruptek | ah, so that's fine. |
03:49:28 | rayman22201 | It's multiplexer pattern. One real file handler -> many virtual file handles |
03:49:46 | disruptek | so, easy to complete your impl. |
03:50:28 | rayman22201 | I have to fix that test, and any other test that relies on the behavior from trunk. |
03:50:53 | rayman22201 | but at least I think my impl is good now. I thought I was going crazy.... thanks for your help |
03:50:57 | disruptek | this is breaking for code in the wild. |
03:51:07 | disruptek | i mean, the test isn't the main worry, right? |
03:51:29 | rayman22201 | hrmmm. true |
03:52:00 | disruptek | your impl needs to change to not throw at count=1 or w/e semantic you detour to. |
03:52:30 | disruptek | or throw at 1. whatever. only you know how your thing works. :-D |
03:52:32 | rayman22201 | yeah... |
03:52:54 | rayman22201 | ugghhh.... I love when I have put bugs back in to maintain compatibility |
03:52:59 | disruptek | ikr? |
03:53:17 | disruptek | when bugs become technical debt. |
03:53:46 | rayman22201 | shhh.... while Dom is sleeping.... another reason Chronos is better :-P |
03:54:06 | disruptek | maybe you can have a different runForever or something; a new interface. |
03:54:52 | rayman22201 | nah. I'm just going to keep it bug compatible. |
04:00:32 | disruptek | well, happy birthday, nim, and congrats. |
04:02:00 | rayman22201 | Here is the shitty part... I don't know if the current api will let me easily do this :-( |
04:02:27 | * | chemist69 quit (Ping timeout: 264 seconds) |
04:03:55 | * | chemist69 joined #nim |
04:07:45 | rayman22201 | well, time to add a new proc to the selectors api. Happy birthday indeed lol |
04:13:49 | FromGitter | <ShieldHero> is there a reason why repr isn't working with newruntime? |
04:14:46 | disruptek | yes. |
04:15:16 | FromGitter | <ShieldHero> what is it? D: |
04:20:49 | disruptek | of that, i'm afraid, i have no idea. |
05:18:45 | Araq | ShieldHero: repr relies on the old RTTI and I replaced the RTTI subsystem by something much smaller |
05:19:22 | * | owl quit (Read error: Connection reset by peer) |
05:19:49 | * | owl joined #nim |
05:21:45 | * | bozaloshtsh_ quit (Quit: ZNC 1.7.2 - https://znc.in) |
05:21:53 | * | bozaloshtsh joined #nim |
05:21:54 | * | bozaloshtsh quit (Changing host) |
05:21:54 | * | bozaloshtsh joined #nim |
05:28:14 | * | Hideki_ joined #nim |
05:31:10 | Zevv | oi rayman22201, still stuck? |
05:36:10 | rayman22201 | Hi @Zevv. I think I got it. I'm now curious about this: https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L1206 |
05:36:42 | rayman22201 | why should we not call other callbacks? |
05:36:56 | Zevv | pff dropping cold in, let me see what that's all about :) |
05:38:18 | rayman22201 | lmao |
05:38:26 | Zevv | yeah sure :) |
05:38:32 | rayman22201 | actually, I think I convinced myself it's correct |
05:38:39 | rayman22201 | :-P |
05:39:49 | rayman22201 | fun fact. Did you know there are no tests for AsyncEvent? |
05:40:26 | Zevv | I suspected something along that lines. It is pretty hard to efficiently test those with real time and real events. |
05:40:46 | rayman22201 | I'm writing some now, and then I think I will finally be able to make a PR for this thing. |
05:41:19 | Zevv | I suggested yesterday that we should add a simulation of the lowest primitives, for example make a 'test ioselector'. That could fake time and I/O and would allow testing of all the layers above. |
05:41:22 | rayman22201 | iirc you actually did a version of this fix right, but you never pushed it anywhere? or I forgot where it was anyway :-P |
05:41:58 | Zevv | hm let me check my stale branches |
05:42:18 | rayman22201 | So, in my version, I actually did it at the asyncDispatch level, and not at the ioselector level. That way it's abstract enough to work with all the selector backends |
05:42:52 | Zevv | so the selector backends can now have different behaviour without anyone noticing :/ |
05:43:13 | rayman22201 | lol, that is the point of abstraction right :-P |
05:43:44 | Zevv | I have three branches with 'event' in the name, but none of them make sense to me now |
05:44:05 | rayman22201 | lol. It's ok. I will hopefully push soon, and you can just tear my version apart in code review |
05:44:20 | * | Hideki_ quit (Remote host closed the connection) |
05:44:27 | Zevv | good work dude |
05:44:55 | rayman22201 | sorry I didn't get it in earlier :-/ work has been crazy. This is the first Saturday I have had free. |
05:44:58 | Zevv | PMunch was also bughunting async stuff the other day, the infamous 500msec thingy |
05:45:29 | * | Hideki_ joined #nim |
05:45:37 | FromGitter | <ShieldHero> was this issue fixed? ⏎ https://github.com/nim-lang/Nim/issues/3900 |
05:45:53 | rayman22201 | @Zevv I think I saw the PR for that come through. looked like a "fun" bug hunt... |
05:46:33 | FromGitter | <ShieldHero> when I was testing dll i never considered inheritance |
05:50:17 | * | Hideki_ quit (Ping timeout: 265 seconds) |
06:12:56 | rayman22201 | apparently the locks module has a dependency on threads:on, and just doesn't tell you. instead you linker error :-) |
06:13:58 | rayman22201 | locks depending on threads makes sense, but it's just weird because threadpool gives you a nice, "you must have threads:on" compiler warning |
06:17:35 | rayman22201 | well, that's fixed in my branch now too |
06:22:22 | * | Hideki_ joined #nim |
06:31:38 | * | Hideki_ quit (Ping timeout: 240 seconds) |
06:34:25 | Zevv | wasn't threads:on supposed to become the default one day |
06:44:53 | * | Vladar joined #nim |
06:46:14 | rayman22201 | idk, but that day is not today lol |
06:47:47 | rayman22201 | I just finished puking `when compilerOption("threads")` all over my code... ugly, but necessary since async has to work in both contexts |
06:49:38 | * | narimiran joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:55 | * | gmpreussner joined #nim |
07:10:48 | FromGitter | <arnetheduck> rayman22201, fwiw cancellation support is in chronos futures |
07:11:04 | rayman22201 | I know :-) |
07:12:20 | FromGitter | <arnetheduck> and fwiw, not even interfaces need to be in stdlib - if there's a library that's dominant it can offer an extensible interface on its own without tying it to specific nim versions.. that of course requires there's good package management available so the difference in "difficulty" to start using the library is comparable to using the stdlib |
07:14:15 | * | nif quit (Quit: ...) |
07:14:25 | * | nif joined #nim |
07:15:06 | FromGitter | <arnetheduck> Araq, got a link to the smaller RTTI commit? I'm probably going to ditch stuff like `genericReset` in `nlvm`, it's really slow and I'm not sure there's really that much economy in it (specially because it prevents inlining and other tricks) |
08:15:32 | * | nsf joined #nim |
08:19:19 | FromGitter | <mratsim> when you inline you actually also get genericReset |
08:19:24 | rayman22201 | @arnetheduck are you trying to tell me to stop contributing to the stdlib? lol |
08:19:43 | FromGitter | <mratsim> sometimes I used templates specifically to avoid genericReset being added at the beginning of my proc |
08:22:06 | FromGitter | <mratsim> the issue is when there are conflicting interfaces between that library and the standard library. And I'm not talking about chronos because the interface is the same, but more about streams for example |
08:25:55 | rayman22201 | I don't really understand the context of @arnetheduck's interface comment? |
08:29:08 | FromGitter | <mratsim> the discussion from yesterday |
08:29:47 | * | owl quit (Ping timeout: 265 seconds) |
08:29:53 | FromGitter | <mratsim> https://irclogs.nim-lang.org/21-09-2019.html#22:29:46 |
08:30:53 | FromGitter | <mratsim> irc rendering is incredibad: https://gitter.im/nim-lang/Nim?at=5d86ad09a38dae3a63951bf8] |
08:36:13 | rayman22201 | thanks @mratsim |
08:36:43 | * | laaron quit (Remote host closed the connection) |
08:41:08 | * | thomasross quit (Remote host closed the connection) |
08:41:31 | * | navin joined #nim |
08:41:34 | * | thomasross joined #nim |
08:52:36 | dom96 | how is that rendering bad on IRC? |
08:55:21 | dom96 | rayman22201, what are you working on? |
08:55:42 | dom96 | oh, you're rewriting AsyncEvent |
08:55:44 | rayman22201 | the thing I promised a 3 weeks ago lol. better AsyncEvents |
08:56:04 | dom96 | Will it require breakage? |
08:56:10 | rayman22201 | It's pretty much done. I'm just writing tests now. |
08:56:13 | dom96 | if yes then you need to get it in Nim ASAP |
08:56:22 | dom96 | cool |
08:56:26 | rayman22201 | No. I think it should be compatible |
08:56:44 | dom96 | even better :) |
08:57:06 | * | rayman22201 crosses my fingers |
08:58:29 | rayman22201 | this will make the flowVar PR work, but idk if there is enough time to get both this in, and the flowVar PR in. |
08:58:54 | dom96 | if neither cause breaking changes then that's fine |
08:59:30 | rayman22201 | the flowVar PR is just a new feature I guess, so sure? |
09:14:53 | * | narimiran quit (Ping timeout: 245 seconds) |
09:42:38 | * | PMunch joined #nim |
10:05:26 | rayman22201 | https://github.com/nim-lang/Nim/pull/12232 |
10:05:34 | rayman22201 | 🎉 |
10:08:05 | PMunch | Hmm, I get warning saying isSpaceAscii has been deprecated from v0.20, but it's not mentioned in the docs |
10:09:07 | rayman22201 | is there no networkStream or socketStream in the stdlib? I thought there was? |
10:12:14 | Yardanico | AFAIK there's no such a thing, I used stringStream for my needs (for a simple android debug bridge IP scanner), but I think that it's possible to implement them without too much hassle even outside of stdlib |
10:16:03 | rayman22201 | yeah. it's no problem. I just thought I saw it in the docs at one point. thanks :) |
10:17:23 | dom96 | are you thinking of asyncstreams? |
10:19:18 | rayman22201 | probably. It's really late for me lol |
10:19:46 | PMunch | Yeah there are network and socket streams in asyncstreams I think |
10:23:39 | shashlick | @dom96 looks like you are going thru nimble like a boss |
10:23:46 | dom96 | :D |
10:23:58 | dom96 | Doing my best :) |
10:24:32 | shashlick | Looks like we still don't have a windows CI |
10:24:36 | rayman22201 | https://nim-lang.github.io/Nim/asyncstreams.html no socket streams that I can see? |
10:26:13 | rayman22201 | lol. Nim 1.0 feels like college. The weekend before the final project is due everybody is scrambling to finish their projects :-P |
10:26:25 | dom96 | hah |
10:27:18 | shashlick | That's why I am pushing back for any last minute stuff since it will surely break something |
10:28:58 | * | Hideki_ joined #nim |
10:29:03 | shashlick | @dom96 I'm looking at your changes and issue comments |
10:29:11 | dom96 | that's where 1.0.2 comes in ;) |
10:29:20 | shashlick | Anything specific I could help with? |
10:30:37 | dom96 | Wanna give one of the issues a go? For example this one: https://github.com/nim-lang/nimble/issues/525 (yeah, it's a new feature but it shouldn't affect anything else) |
10:31:17 | lqdev[m] | rayman22201: not me, lol |
10:32:36 | shashlick | @dom96 https://github.com/nim-lang/nimble/commit/445ecfe9461029184c1e710902262e2149a3564b#diff-1c237a28a78549fe7b135026560d6efaL90 |
10:33:03 | shashlick | You removed the code but didn't add isSuppressed - is that intentional? |
10:33:22 | dom96 | yes, it's handled in displayLine now |
10:34:09 | shashlick | But all that processing for nothing |
10:34:11 | * | Hideki_ quit (Ping timeout: 276 seconds) |
10:34:13 | shashlick | Anyway |
10:36:16 | * | krux02 joined #nim |
10:36:48 | dom96 | shashlick, feel free to implement Windows CI if you're up for it, that will probably be the most impactful |
10:39:11 | shashlick | @dom96 - https://github.com/nim-lang/nimble/commit/36c4a39674c0f81baa87d930265f5903d7a32fed#diff-207d4044eeccdbc778987497fffd081eR39 |
10:39:26 | shashlick | NimsOutfile is in the project directory |
10:39:44 | shashlick | It is present in the temp folder and just copied over |
10:40:03 | shashlick | Instead you could just print the temp file location in debug mode |
10:40:28 | shashlick | Else you can end up with multiple nims files in the project dir |
10:40:38 | dom96 | fair, but this is for debugging anyway |
10:40:47 | dom96 | doesn't have to be perfect |
10:41:39 | shashlick | Could just print nimsFile |
10:41:42 | shashlick | https://github.com/nim-lang/nimble/commit/36c4a39674c0f81baa87d930265f5903d7a32fed#diff-207d4044eeccdbc778987497fffd081eR35 |
10:43:00 | shashlick | Every nimble invocation results in a unique filename since it uses the process id |
10:43:50 | shashlick | So you run debug multiple times or run recursively, will end up with a flood |
10:45:18 | shashlick | out File contents also returned, could just print it if debug |
10:45:57 | dom96 | the debug switch is for debugging, people shouldn't use it in scripts |
10:47:07 | dom96 | the idea is to keep files that are used by nimble |
10:47:20 | dom96 | so that I can copy and paste the command it invokes |
10:47:22 | dom96 | and it'll just work |
10:47:34 | dom96 | (or much more likely not work since I am debugging an issue) |
10:48:31 | dom96 | so, are you able to tackle any of these issues? |
10:48:37 | Zevv | "thanks for giving it a shot :)", hehe |
10:48:40 | dom96 | and/or Windows CI |
10:49:13 | dom96 | it looks like I'm going to need to redirect the output of `nim e` btw |
10:49:33 | dom96 | that's the only way to workaround https://github.com/nim-lang/nimble/pull/711 |
10:49:50 | dom96 | and it seems that stdout/stderr redirection syntax is at least consistent between windows cmd and bash |
10:51:01 | shashlick | If it runs in the foreground why doesn't it print the error right there |
10:51:15 | dom96 | yeah, it does, but it prints it in random places |
10:51:17 | dom96 | that's not good UX |
10:51:29 | shashlick | What do you mean by random |
10:51:47 | dom96 | I mean it's not in the error message that people read |
10:52:01 | dom96 | You get "Failed to parse .nimble file; because nimscript eval failed with:" |
10:52:05 | dom96 | and then it's just empty |
10:54:13 | shashlick | is this the part where we get package info? |
10:54:22 | dom96 | I ask once again, are you able to help with any issues/Windows CI or not? |
10:54:33 | dom96 | it's fine if not, just say so |
10:55:21 | shashlick | i'm reviewing your code changes right now |
10:55:29 | shashlick | i can do windows CI or issues |
10:55:38 | PMunch | Hmm, going through all my packages making sure that they work with 1.0. I hit this error with binaryparse: Error: internal error: environment misses: :tmp |
10:55:42 | shashlick | was looking into this issue you brought up |
10:55:46 | PMunch | Anyone got a clue on what that might be about |
10:56:00 | dom96 | shashlick, okay, please do windows CI, i'll work through the issues |
10:56:10 | PMunch | It is reported from a line `let ii = genSym(nskVar)` but I think the actual error occurs somewhere else |
10:56:41 | dom96 | PMunch, that suggests it cannot capture whatever `:tmp` is in a closure |
10:59:49 | PMunch | Hmm |
11:01:30 | dom96 | Anyone want to help me out by going through my Nimble projects to make sure they work for 1.0? :) |
11:02:23 | rayman22201 | So this is interesting: https://travis-ci.org/nim-lang/Nim/jobs/588053879 |
11:02:51 | rayman22201 | It looks like several tests that should be compiled with threads:on were not compiled with threads, and everything still worked? |
11:03:32 | * | owl_000 joined #nim |
11:05:57 | owl_000 | float(num), num.float(), num.float is really convenient. though they are doing same things but give different feels. first i thought it is awkard, but it is awesome. |
11:06:03 | rayman22201 | sharedlist.nim without threads:on doesn't make a lot of sense... |
11:06:52 | Yardanico | owl_000 yeah, I like UFCS a lot and miss it in other languages |
11:07:36 | PMunch | Aha, figured out what the issue was (expandMacros is pretty neat by the way). The `ii` variable was used for iterating over stuff. But I used the same genSym'ed variable in both the reader and the writer, which Nim seems to now dislike |
11:07:52 | PMunch | Created one iiRead and one iiWrite fixed the issue |
11:07:59 | rayman22201 | ok. gn. It's 4am for me. Good luck before the 1.0 release everybody :-) |
11:08:19 | * | rayman22201 quit () |
11:08:21 | PMunch | Oh wow, good night ra |
11:08:24 | owl_000 | 7 PM HERE |
11:08:30 | PMunch | It's 1PM here.. |
11:09:10 | Yardanico | 2PM here :) |
11:09:34 | PMunch | It's a bit unfortunate though. I mean for this use case it's fine, just add a second variable. But if you needed to create lots of them, or dynamic ones, or want to reuse the same body across many procs, this probably won't work properly.. |
11:09:44 | PMunch | And the error is really hard to understand.. |
11:11:31 | shashlick | @dom96 - tests are failing on HEAD |
11:14:20 | shashlick | @dom96 - you really need to update https://nim-lang.org/choosenim/init.sh with the latest in the choosenim repo |
11:14:28 | shashlick | https://github.com/dom96/choosenim/blob/master/scripts/choosenim-unix-init.sh |
11:21:04 | * | navin quit (Remote host closed the connection) |
11:24:01 | PMunch | Hmm, related issue to this (I think) is that if you want to forward declare a proc in two different "quote do" statements all the arguments must use the exact same identifiers.. |
11:24:50 | PMunch | Otherwise you get errors with ambiguous call between the forward decl and the procedure decl |
11:26:15 | shashlick | @dom96 `--warning[UnusedImport]:off` breaks on 0.19.6 and 0.20.2 |
11:29:01 | PMunch | Great, now I get "Error: attempt to redefine `:tmp`".. It should really specify which :tmp.. |
11:30:26 | PMunch | Oh well, got to go |
11:30:27 | * | PMunch quit (Remote host closed the connection) |
11:40:10 | dom96 | argh, I thought that might happen |
11:42:13 | dom96 | it still annoys me that GitHub shows cancelled CIs as a fail |
11:45:56 | * | ng0 joined #nim |
11:45:57 | shashlick | can you please update the choosenim init file as well, i added msys support in april |
11:47:41 | dom96 | I thought I updated that already |
11:48:00 | * | Hideki_ joined #nim |
11:48:31 | dom96 | updated |
11:49:19 | shashlick | awesome |
11:53:15 | dom96 | oh boy, so it looks like this is a `nim e` bug |
11:53:25 | dom96 | it stalls if I redirect its output to a file |
11:53:26 | dom96 | even in bash |
11:53:29 | shashlick | looks like i still need https://github.com/dom96/choosenim/commit/121133ba06b0954e058d38743a18fe1ad1f817f2 to get choosenim working in windows git bash |
11:53:53 | shashlick | latest release binary doesn't have that fix |
11:54:07 | shashlick | will have to use my custom build like i did for feud - https://github.com/genotrance/feud/blob/master/.travis.yml |
11:54:17 | dom96 | oh, no, I'm just being stupid it looks like |
11:56:11 | * | navin joined #nim |
11:57:38 | * | thomasross quit (Remote host closed the connection) |
11:58:03 | * | thomasross joined #nim |
12:00:39 | * | navin quit (Ping timeout: 264 seconds) |
12:01:51 | * | gangstacat quit (Ping timeout: 252 seconds) |
12:04:01 | lqdev[m] | does Nim have support for filesystem events? |
12:04:19 | lqdev[m] | or is there a library for that? |
12:05:36 | shashlick | fswatch or something right |
12:05:44 | lqdev[m] | yeah |
12:06:00 | lqdev[m] | basically, something that would allow me to trigger a resource reload when a file is changed |
12:07:17 | lqdev[m] | seems like federico3 has a wrapper for that library |
12:09:34 | dom96 | You should get your hands dirty and implement one that works for asyncdispatch :) |
12:09:49 | dom96 | I created a linux-only module that worked with the old asyncio module we had |
12:10:22 | dom96 | https://forum.nim-lang.org/t/3159 |
12:11:55 | lqdev[m] | dom96: I already have enough projects I'm working on :P |
12:12:01 | lqdev[m] | maybe someday |
12:13:08 | lqdev[m] | dang it, seems like fswatch is blocking |
12:13:25 | lqdev[m] | guess I'll just implement a keyboard shortcut or dev command that'll be used for reloading |
12:15:22 | lqdev[m] | imagine Vim-like commands in a game lol |
12:44:02 | * | Perkol joined #nim |
12:47:52 | owl_000 | i want to make a simple package, so that i can import it like other packages. so what should i choose in "nimble init package type", binary or library |
12:48:27 | dom96 | library |
12:49:07 | Yardanico | owl_000: binary is needed if you create a tool which will be used by itself (not from other libraries), library is for usage in other libraries, hybrid is both I think |
12:50:14 | FromGitter | <de-odex> is there a reason to want a heap allocated object (ref object) over a stack allocated one? |
12:50:40 | Yardanico | for example if you want to pass it to other functions/have it in other objects as a reference |
12:51:03 | Yardanico | for recursive dependencies (e.g. a Node object which has two fields of type Node) |
12:51:33 | FromGitter | <de-odex> cant you still pass stack allocated objects to functions? |
12:51:35 | Yardanico | well, you can pass stack-allocated objects to functions as well via "var MyType" type |
12:51:49 | Yardanico | (that's if you want to modify it) |
12:52:02 | * | oculux quit (Ping timeout: 240 seconds) |
12:52:06 | Yardanico | if you just need to read it, you can just pass it as "MyType" type |
12:52:10 | FromGitter | <mratsim> somehow I managed to "trick" Nim into generating int instead of NI32 and it breaks with the C++ backend :/: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d876e7ae45b6d473238b574] |
12:53:03 | FromGitter | <mratsim> use ref object when you want reference semantics |
12:54:55 | * | Kaivo joined #nim |
13:01:21 | * | oculux joined #nim |
13:01:54 | * | gangstacat joined #nim |
13:02:07 | dom96 | 10 down, 5 more to go :O |
13:02:38 | dom96 | Could really use some testers, if you're around and want to test the latest Nimble release, please do so |
13:05:22 | lqdev[m] | is there a replaceAll for strings? I need to remove all whitespace from a string. |
13:05:59 | Yardanico | lqdev[m]: I think multiReplace is the closest you can get |
13:07:43 | shashlick | @dom96 - can you please use branches? if master is broken i cannot get windows CI working |
13:08:32 | lqdev[m] | Yardanico: yeah, that seems to work |
13:08:42 | lqdev[m] | I thought it'd only replace one occurrence of each word |
13:08:57 | Yardanico | ah, no, replace and multiReplace replace all occurences |
13:08:57 | dom96 | shashlick, why can't you? |
13:09:24 | lqdev[m] | yeah I just checked that and that's true |
13:10:12 | shashlick | no way to tell if the break is windows specific or related to your changes |
13:10:49 | shashlick | besides i'm working in parallel, do you really want me to sit and look at your every commit and travis run |
13:11:29 | dom96 | no, what I don't understand is why you're worrying about master anyway |
13:11:39 | dom96 | you should pick a commit that passed travis and get CI working off it |
13:14:33 | shashlick | do i really need to justify not using master? anyway, its your project |
13:15:01 | * | federico3_ is now known as federico3 |
13:16:01 | dom96 | why would you follow a moving target? |
13:16:21 | dom96 | even if I made sure to push all commits that pass travis to master who knows, they might still break windows in some way |
13:17:11 | shashlick | that's exactly what i should focus on - master should pass all tests that exist today, not break on the existing test matrix |
13:18:54 | dom96 | You should first set up a foundation, once a known good commit of Nimble works you can rebase on whatever new commits have been made on master |
13:19:54 | dom96 | What is your actual approach here because I don't understand. Are you pushing Ci changes directly to master on your fork? |
13:20:20 | shashlick | i'm working on a branch which is tested on my instance of nimble on travis |
13:20:48 | shashlick | you can do the same - if you create a branch and push, it will get tested on travis |
13:21:10 | shashlick | why would you use master to test |
13:22:10 | dom96 | I know I can do the same. But I want to move fast today so I don't want to be creating multiple branches that I then need to keep track of. |
13:22:44 | dom96 | There should be nothing wrong with master being broken for a couple of hours. |
13:23:17 | shashlick | i understand and don't want to slow you down but you can get the same effect working on one branch and push it when you are satisfied |
13:23:51 | shashlick | anyway, go ahead, i'll have to create a new branch from an older commit now to figure this out |
13:24:14 | dom96 | Yes, I can, but you can also work off a known working commit |
13:24:20 | shashlick | and then afterwards, will have to again check that your passing code works on windows |
13:24:55 | dom96 | And you should be doing that anyway |
13:26:32 | shashlick | i don't think you get the point but anyway, i'd rather work on getting something working |
13:27:32 | * | navin joined #nim |
13:27:47 | dom96 | Even if I were to work on another branch, eventually it would end up in master and you or I would need to again check that it passes on Windows. |
13:29:11 | shashlick | but my windows CI PR won't get merged until everything passes |
13:29:31 | shashlick | which means while you are moving fast, you won't have any benefit of any windows testing |
13:32:55 | * | owl_000 quit (Remote host closed the connection) |
13:33:03 | dom96 | Yes, but to be honest I would rather leave all Windows-related fixes till the end. |
13:33:14 | * | owl_000 joined #nim |
13:34:04 | * | owl_000 quit (Remote host closed the connection) |
13:34:28 | * | owl_000 joined #nim |
13:36:21 | dom96 | Argh, the fact that there are compiler messages mixed with messages from Nimble scripts is annoying |
13:42:16 | * | navin quit (Remote host closed the connection) |
13:50:08 | * | thomasross quit (Remote host closed the connection) |
13:50:33 | * | thomasross joined #nim |
13:51:48 | * | solitudesf joined #nim |
13:57:49 | * | elrood joined #nim |
13:59:35 | * | navin joined #nim |
14:01:14 | owl_000 | is it possible to set default value of "type object", for e.g "type RGBA = object r:,g:,b:,a:", this case i want to set a = 255 |
14:01:42 | Yardanico | I don't think so, you need to set default values in a constructor |
14:02:02 | Yardanico | You can basically give almost any name to a constructor proc, but the conventional names are newType for ref object and initType for object |
14:02:28 | Yardanico | so you'll need to create a initRGBA or initRgba proc and write defaults values in procedure arguments here |
14:03:23 | owl_000 | oh i see, then i prefer not to do for that simple things |
14:03:26 | owl_000 | thanks |
14:04:11 | Yardanico | well it'll be 1 line : proc initRGBA(r, g, b: int, a = 255): RGBA = RGBA(r: r, g: g, b: b, a: a) |
14:05:04 | * | owl_000 quit (Remote host closed the connection) |
14:05:08 | Yardanico | :( |
14:05:23 | * | navin_ joined #nim |
14:05:29 | * | owl_000 joined #nim |
14:06:23 | * | Hideki_ quit (Remote host closed the connection) |
14:07:11 | * | Hideki_ joined #nim |
14:08:43 | * | navin quit (Ping timeout: 252 seconds) |
14:10:28 | * | Perkol quit (Remote host closed the connection) |
14:11:56 | * | Hideki_ quit (Ping timeout: 276 seconds) |
14:12:51 | * | navin_ quit (Remote host closed the connection) |
14:14:30 | * | navin joined #nim |
14:18:49 | * | Hideki_ joined #nim |
14:18:55 | lqdev[m] | owl_000: creating constructors for each object is a common convention, no matter what the object is |
14:19:01 | lqdev[m] | it just has so many advantages |
14:19:04 | * | navin quit (Remote host closed the connection) |
14:19:10 | * | navin joined #nim |
14:20:05 | * | navin quit (Remote host closed the connection) |
14:20:14 | owl_000 | give me link to study about it. |
14:20:32 | * | navin joined #nim |
14:20:47 | owl_000 | ok i got it. |
14:22:45 | owl_000 | i make a `proc newColor(rgba=(int,int,int,int)):RGBA` and another overloaded proc to handle `rgb=(3int)` |
14:23:00 | Yardanico | why? |
14:23:34 | Yardanico | maybe you didn't see my message: proc initRGBA(r, g, b: int, a = 255): RGBA = RGBA(r: r, g: g, b: b, a: a) |
14:23:56 | Yardanico | you can have default values for proc arguments in Nim |
14:24:37 | * | theelous3 joined #nim |
14:24:53 | * | navin quit (Ping timeout: 245 seconds) |
14:26:11 | owl_000 | yes, i know, but somehow my brain can't remember it. strange |
14:26:48 | * | navin joined #nim |
14:27:04 | owl_000 | such a simple thing. |
14:30:09 | * | navin quit (Remote host closed the connection) |
14:37:38 | lqdev[m] | owl_000: it's not a study, it's my own experience and the experience of others |
14:38:00 | lqdev[m] | 1. you can have default parameters |
14:38:05 | lqdev[m] | 2. you can overload such a constructor |
14:38:11 | lqdev[m] | 3. the constructor can have side effects |
14:40:32 | * | navin joined #nim |
14:42:14 | * | dddddd joined #nim |
14:44:39 | * | navin quit (Ping timeout: 250 seconds) |
14:56:11 | * | kungtotte quit (Quit: WeeChat 2.5) |
14:58:48 | * | elrood quit (Remote host closed the connection) |
15:18:53 | * | navin joined #nim |
15:19:11 | * | navin quit (Remote host closed the connection) |
15:20:00 | * | navin joined #nim |
15:20:21 | * | navin quit (Remote host closed the connection) |
15:22:07 | * | PMunch joined #nim |
15:22:12 | * | Trustable joined #nim |
15:23:48 | PMunch | Hmm, trying to get my protobuf library up and running on devel. But something with macros have changed.. Before you could use "quote do" to create small snippets of code and then later glue them together. But now I just get a lot of errors saying that my variables aren't defined.. |
15:24:35 | PMunch | But that might come from the fact that I changed my genSym calls to newIdentNode to avoid another issue I was having.. |
15:24:55 | lqdev[m] | can someone help me with writing a good game loop which adjusts the game speed depending on the framerate? |
15:25:50 | lqdev[m] | my current (bad) implementation is based on http://gameprogrammingpatterns.com/game-loop.html, and can be found here https://github.com/liquid600pgm/rapid/blob/master/src/rapid/gfx.nim#L954 |
15:26:08 | lqdev[m] | for some reason, the game runs too slow when I unlock the framerate |
15:27:50 | disruptek | PMunch: i don't know if it's new, but you have to create idents and then backquote them in the quote do: block. i've long had a suspicion that this was unintentional, but i really dunno since i'm new to macros. |
15:28:35 | disruptek | (otherwise they get gensym'd to foo`23423432 or whatever...) |
15:28:54 | PMunch | Yeah, that's the first thing I noticed as well. It's really annoying.. |
15:29:39 | disruptek | yeah, just look at how verbose this is: https://github.com/disruptek/openapi/blob/master/src/openapi/codegen.nim#L1052 |
15:31:14 | * | owl_000 quit (Ping timeout: 276 seconds) |
15:33:50 | * | PMunch quit (Remote host closed the connection) |
15:34:18 | * | PMunch joined #nim |
15:36:55 | PMunch | I try with genSym(nskParam, "someName") and then I get `internal error: environment misses "someName"` (although echoing out the generated code with .repr looks fine. If I change to use newIdentNode I get errors from various quote do statements saying that the "someName" is undeclared.. |
15:37:31 | PMunch | disruptek, yeah exactly.. Not pretty |
15:38:55 | PMunch | Creating the code manually without quote do works fine.. |
15:41:45 | dom96 | 80% complete |
15:41:48 | dom96 | https://github.com/nim-lang/nimble/milestone/2 |
15:41:51 | dom96 | I think i'll leave it there |
15:44:37 | PMunch | Hmm, there must be more to this. A small trivial example works fine.. |
15:45:12 | FromGitter | <mratsim> @brentp I've merged QR Decomposition in Arraymancer |
15:48:36 | PMunch | https://play.nim-lang.org/#ix=1Wpz |
15:48:46 | PMunch | Okay, so the forward decl thing just doesn't work at all.. |
15:51:12 | FromGitter | <de-odex> what are the constructor naming conventions? |
15:51:27 | disruptek | i do a forward decl in that same codegen file. |
15:51:40 | Yardanico | @de-odex initType for "object" types, newType for "ref object" types |
15:51:57 | FromGitter | <de-odex> ok another question |
15:51:59 | FromGitter | <de-odex> uh |
15:52:08 | disruptek | PMunch: https://github.com/disruptek/openapi/blob/master/src/openapi/codegen.nim#L1236 |
15:52:13 | FromGitter | <de-odex> how do i name a proc that converts a string to an enum value |
15:52:22 | PMunch | In thet example it works to change it to a newIdentNode by the way, but that doesn't actually work for protobuf for some reason.. |
15:52:35 | FromGitter | <mratsim> @de-odex it's called parseEnum |
15:52:41 | lqdev[m] | de-odex: `parseT`? |
15:52:53 | FromGitter | <mratsim> https://nim-lang.org/docs/strutils.html#parseEnum%2Cstring |
15:52:56 | disruptek | you can probably see that i've started removing quote do just because it seems it's ripe for overhaul and i don't want to have to worry about it. |
15:52:59 | lqdev[m] | and yeah `strutils.parseEnum` is a thing |
15:53:26 | FromGitter | <de-odex> nice thanks |
15:53:47 | PMunch | disruptek, yeah the way it is now seems pretty broken.. |
15:53:49 | FromGitter | <mratsim> @disruptek, I don't think I have a single library without quote do :/ |
15:54:07 | * | Hideki_ quit (Remote host closed the connection) |
15:54:20 | * | endragor joined #nim |
15:54:35 | disruptek | i have the full range, even dropped to parseStmt when i get really lazy. probably should just use `include`. |
15:55:10 | * | Hideki_ joined #nim |
15:55:23 | PMunch | Haha, haven't quite dropped to parseStmt yet |
15:56:07 | PMunch | Tried to use quote do everywhere for a while, it really makes the code more readable. But with these changes I seem to have to switch back.. |
15:56:26 | disruptek | right, it gives you pause. |
15:57:06 | PMunch | Hmm, I can't reproduce the bug I'm facing with protobuf though.. |
15:57:20 | PMunch | And the codebase for it is rather complex.. |
15:57:56 | FromGitter | <mratsim> wait what are the changes to quote do? |
15:59:28 | * | Hideki_ quit (Ping timeout: 245 seconds) |
16:01:55 | * | endragor quit (Remote host closed the connection) |
16:18:55 | PMunch | Don't know exactly.. |
16:19:06 | PMunch | But something has changed, and it has broken a lot of my macro code.. |
16:26:08 | shashlick | @dom96 - any idea on this? https://travis-ci.org/genotrance/nimble/jobs/588137223#L411 |
16:28:15 | * | narimiran joined #nim |
16:33:33 | dom96 | It's probably got an .exe extension or something |
16:33:40 | dom96 | check out nimble.nim:1094 |
16:34:29 | FromGitter | <arnetheduck> rayman22201, contribute away ;) though generally libraries are more flexible for everyone involved (you as a dev because you can move faster, nim as a language because you don't clog the PR queue and users because they can update components individually).. ie even the nim team could develop nim / stdlib parts as separate libraries and curate parts of it that are "high-impact" to guide beginners to the right places, |
16:34:29 | FromGitter | ... if the tooling was there.. |
16:36:46 | dom96 | arnetheduck: if you're around can you test the latest Nimble on your/Status' projects? |
16:39:15 | FromGitter | <arnetheduck> we don't use nimble any more |
16:40:37 | shashlick | @dom96 - why so many repeats? https://github.com/nim-lang/nimble/blob/master/tests/tester.nim#L942 |
16:40:54 | FromGitter | <arnetheduck> we have a contraption based on makefiles and git submodules instead (both status projects and my own) |
16:41:26 | shashlick | okay never mind |
16:41:43 | dom96 | shashlick, regarding https://github.com/dom96/choosenim/pull/135/files |
16:41:50 | dom96 | Does getBinDir return ~/.nimble/bin? |
16:42:52 | dom96 | I don't understand why needsDLLInstall would return false during an initial install when those libeasy32/ssleay32 DLLs are not in ~/.nimble/bin |
16:43:16 | shashlick | ya but the code checks with findExe as well |
16:43:23 | shashlick | so the files in the local path get detected |
16:43:26 | shashlick | so it doesn't copy |
16:43:30 | shashlick | since choosenim ships with those dlls |
16:43:41 | dom96 | oooh |
16:43:52 | shashlick | i just picked two other dlls and it works now |
16:44:27 | planetis[m] | lqdev: still looking for a game loop? |
16:44:33 | dom96 | yeah, but these DLLs are not required for choosenim |
16:44:53 | shashlick | the dlls you were checking for are part of the zip |
16:45:03 | shashlick | choosenim needs the ssl dlls to download |
16:45:13 | dom96 | I know |
16:45:38 | shashlick | then which dlls are you talking about |
16:45:43 | * | elrood joined #nim |
16:45:46 | dom96 | the ones you've specified |
16:45:58 | dom96 | pdcurses64 and sqlite3_32 |
16:46:20 | shashlick | well, choosenim is checking for dlls to decide whether it should download dlls.tar.gz |
16:46:27 | shashlick | which contains these files |
16:47:03 | dom96 | I think we can just remove the findExe check to be honest |
16:47:20 | planetis[m] | try this one: https://gist.github.com/b3liever/1e9faf735b737bc67d8827646736d495 |
16:49:22 | * | Hideki_ joined #nim |
16:49:32 | shashlick | well the dlls could be in the nim bin directory too |
16:49:38 | shashlick | per the instructions on the website |
16:49:43 | shashlick | so it could be in the path |
16:52:24 | dom96 | Another alternative is to just check if they're beside the running .exe |
16:52:37 | dom96 | that would fix this problem too |
16:52:58 | dom96 | hrm, no |
16:53:05 | dom96 | they get copied beside the .exe in ~/.nimble/bin |
16:54:16 | dom96 | I can't accept your PR though, it checks for DLLs that choosenim does not care about |
16:54:29 | shashlick | choosenim is installing those dlls for Nim, not for itself |
16:54:39 | shashlick | the DLL check is for the dlls in the dlls.tar.gz |
16:54:41 | dom96 | it'll cause DLLs to be downloaded even if the SSL DLLs are present in PATH or NImble bin |
16:54:49 | * | PMunch quit (Remote host closed the connection) |
16:55:04 | lqdev[m] | planetis: yes |
16:55:18 | lqdev[m] | OK, I'll go see it |
16:55:22 | dom96 | That's not the intention I had when I wrote that |
16:55:24 | shashlick | choosenim cannot download the ssl dlls - it needs ssl to download them in the first place |
16:55:35 | Yardanico | lol |
16:56:11 | shashlick | that's why your choosenim zip has the ssl dlls in it |
16:56:18 | lqdev[m] | planetis: well it's not quite what I'm looking for. a constant tick rate is nice but results in choppy movement, and my engine doesn't really support interpolation very well |
16:56:27 | shashlick | https://github.com/dom96/choosenim/blob/master/src/choosenim/download.nim#L278 |
16:56:56 | dom96 | but fine, in that case we should check for all DLLs inside dlls.zip |
16:57:33 | shashlick | i picked random ones which are unlikely to be on windows |
16:57:38 | shashlick | hence ncurses and sqlite |
16:57:57 | dom96 | unlikely is not impossible |
16:58:20 | shashlick | hmm |
16:59:18 | shashlick | by the way, just try `nimble run` => http://ix.io/1Wqc |
16:59:37 | planetis[m] | I see, though for my game it worked fine (without cuts) |
16:59:50 | dom96 | thanks, that's a bug :) |
17:00:38 | dom96 | maybe if I have energy tomorrow I'll release a new choosenim too |
17:04:22 | * | hpyc9 joined #nim |
17:05:38 | * | Hideki_ quit (Ping timeout: 240 seconds) |
17:07:04 | lqdev[m] | just reading the section 'Interpolation and Prediction', I think I could implement this with a simple function |
17:07:15 | lqdev[m] | on the base sprite object |
17:12:32 | leorize | narimiran, Zevv, disruptek: is the refactoring branch of nim.nvim doing well for you? |
17:13:00 | leorize | I'm gonna merge it to master if there aren't any problems |
17:13:00 | narimiran | do it :) |
17:13:00 | Zevv | lemme upgrade |
17:13:13 | * | NimBot joined #nim |
17:14:10 | * | bozaloshtsh quit (Quit: ZNC 1.7.2 - https://znc.in) |
17:14:18 | * | bozaloshtsh joined #nim |
17:14:18 | * | bozaloshtsh quit (Changing host) |
17:14:18 | * | bozaloshtsh joined #nim |
17:16:07 | Zevv | worked fine over the last days for me. My highlighting settings are pretty minimalistic, so not sure if that is all still ok |
17:20:21 | leorize | well some error messages were omitted, but no one noticed :P |
17:22:32 | Zevv | I'm already happy the "killed nimsuggest" message at exit is gone :) |
17:23:28 | leorize | technically it's not my bug :P neovim displays the last message emitted on exit |
17:24:04 | Zevv | I have one question, but not sure if it should be a feature: if my syntax highlighting indicates there's an error, is there a way to get the error message somehow? That would save me an alt-tab-up-enter-alt-tab-wait-cycle |
17:24:41 | leorize | :make |
17:24:49 | leorize | or use one of those automated linter plugins |
17:25:06 | Zevv | yeah, but there is already an indication of the error - does nimsuggest not tell you that somehow? |
17:25:18 | leorize | orrr, bug me enough so I add support for nimsuggest `chk` :P |
17:25:34 | leorize | the `highlight` command only said to highlight it as error |
17:25:41 | Zevv | nah, first concentrate on vim8 :) |
17:26:17 | Zevv | I now switched to nvim on all my machines, but it bugs me that it is slow on huge files and crashes on my at least once a week |
17:26:57 | leorize | you'll be missing out on the highlighting until vim9 :P |
17:27:14 | Zevv | ah didn't know that. |
17:27:21 | leorize | neovim really pressures vim to actually step up |
17:27:31 | leorize | there's an experimental api for semantic highlighting now |
17:28:26 | Zevv | So much for my highlighting: http://zevv.nl/div/highlight.png :) |
17:29:00 | leorize | you do use the red text error highlighting :P |
17:29:14 | Zevv | oh yeah I do use that. But my code *never* has errors |
17:29:33 | Zevv | it's always perfectly fine :) |
17:29:52 | Zevv | nah, nevermind me, just merge your branch, stuff works like a charm! |
17:31:13 | leorize | writing a nice commit message rn :P |
17:31:45 | Zevv | git commit -am "merged stuff" && git push |
17:34:03 | * | drewr quit (Ping timeout: 246 seconds) |
17:37:33 | narimiran | Zevv: jesus christ man, introduce some colors in your life |
17:37:57 | narimiran | and no, your two-and-a-half colors don't count |
17:41:34 | Zevv | I like to work in a dark environment, so I can't use a light background comfortably. On black, green is the obvious choice because eyes are most sensitive to green, and monochromic green avoids chromatic aberration, especially more off-center of my glasses. |
17:41:59 | Zevv | More importantly, I still am the coolest kid on the block because my terminal looks like the matrix |
17:42:28 | Zevv | and not like a candy shop at christmas eve |
17:42:41 | narimiran | i feel personally attacked!! :P |
17:42:57 | Zevv | you should |
17:45:23 | disruptek | is it me or is `var x {.used.}: SomeType = SomeVal` syntax a little odd? |
17:45:53 | Zevv | why is it? That's just where the pragmas go? |
17:47:08 | disruptek | not on a proc. |
17:48:11 | Zevv | you'd prever var x: SomeType = {.used.} SomeVal? |
17:48:42 | Zevv | and yet |
17:48:43 | disruptek | i expected `var x: SomeType {.used.} = ...` and got an indentation error when i tried it. |
17:49:01 | disruptek | procs are `proc foo(): ReturnType {.pragma.} = ...` |
17:49:28 | Zevv | yeah that's what I ment of course |
17:49:33 | disruptek | right. |
17:50:13 | Zevv | it does make sense indeed, but there's probably a good reason for that. ask the boss? |
17:51:32 | leorize | narimiran, Zevv, disruptek: please pull the latest commits from nim.nvim's master branch :) |
17:52:13 | disruptek | woohoo |
17:52:37 | * | zedeus quit (Quit: WeeChat 2.5) |
17:52:38 | disruptek | hmm, i'm already up-to-date. |
17:52:39 | narimiran | done. i'll test it tomorrow. now it is time to relax and watch some tv series |
17:52:50 | Zevv | heu did you flatten the commits? |
17:52:53 | disruptek | wow, that's a huge git log. |
17:53:13 | leorize | yea, I squashed 'em all |
17:53:40 | disruptek | i can't believe you're monochromatic, zevv. |
17:54:02 | disruptek | aste the rainbow12wheee |
17:54:17 | * | zedeus joined #nim |
17:54:59 | Zevv | Well, I started with highlighting when switching the nvim, but it bothered the hell out of me. I started tuning stuff down and adjusting and this is were I ended up. |
17:55:07 | Zevv | highlighting clashes with my synesthesia |
17:55:15 | Zevv | oh no, wait, I don't have that |
17:55:18 | disruptek | ah, that's a great reason to disable it. |
17:55:19 | disruptek | bwaah |
17:55:20 | Zevv | it just bugs the hell out of my I guess :) |
17:56:12 | disruptek | i find solarized to be pretty great. |
17:56:42 | narimiran | i can't stand its bluish background |
17:56:55 | leorize | Zevv: you might like my rainbow vomit on top of pure black background colorscheme :P |
17:57:12 | Zevv | whee \o/ |
17:57:28 | * | snooptek joined #nim |
17:57:56 | leorize | I used to be a solarized fan |
17:58:09 | leorize | until I discovered that black background exists |
18:10:06 | * | zedeus quit (Quit: WeeChat 2.5) |
18:10:16 | * | zedeus joined #nim |
18:16:36 | * | navin joined #nim |
18:22:48 | * | ng0 quit (Ping timeout: 260 seconds) |
18:32:51 | * | gangstacat quit (Ping timeout: 246 seconds) |
18:36:30 | disruptek | cannot find any documentation for dead code elimination. searched cli, experimental section, manual search box, pragmas section. i found the syntax in the forum. the syntax passes, but i cannot provoke differenting output either in debug or release or danger modes. my code just imports other modules. >600k binary, optimized. |
18:39:50 | * | Kaivo quit (Quit: WeeChat 2.6) |
18:42:34 | * | kungtotte joined #nim |
18:54:51 | * | laaron joined #nim |
19:06:13 | * | al_ joined #nim |
19:16:05 | FromGitter | <mratsim> dead code elimination is now default |
19:16:23 | FromGitter | <mratsim> but AFAIK it doesn't do dead module elimination so you still end up with empty module files |
19:25:53 | * | navin quit (Ping timeout: 250 seconds) |
19:29:42 | disruptek | ah, thanks. |
19:31:20 | disruptek | so even though it marks a module as "unused" and my entire source is "import thatmodule", it won't remove it? i guess what i'm asking is, under what circumstances does it omit something? |
19:34:10 | disruptek | i'm asking because if i import my entire api, it's already >1MM loc. |
19:35:08 | * | Ven`` joined #nim |
19:35:25 | Zevv | MM? |
19:36:31 | Zevv | how long does that take to compile? |
19:40:35 | * | ng0 joined #nim |
19:41:26 | disruptek | i don't have the stones to find out. |
19:42:52 | FromGitter | <brentp> @mratsim cheers. I was following on git, a bit. will check it out. |
19:46:50 | * | gmpreussner quit (Ping timeout: 240 seconds) |
19:50:53 | disruptek | 1186065 lines compiled; 160.284 sec total; 2.316GiB peakmem; Dangerous Release Build |
19:52:36 | * | gmpreussner joined #nim |
20:03:37 | Zevv | That's 160 times slower then vlang |
20:03:51 | disruptek | i have a long way to go, it's true. |
20:04:12 | Zevv | That was tongue-in-cheek |
20:05:07 | disruptek | i know. if my code is as fast as vlang, i know i'm moving in the wrong direction. 😉 |
20:05:56 | * | rayman22201 joined #nim |
20:12:23 | * | nsf quit (Quit: WeeChat 2.5) |
20:17:39 | * | vegax87 joined #nim |
20:21:03 | dom96 | shashlick, any progress with windows CI? |
20:21:40 | * | al_ quit (Quit: al_) |
20:23:26 | shashlick | Was debugging the nimble run bug |
20:23:38 | shashlick | Otherwise is working decent |
20:24:08 | rayman22201 | testament question. Can you set the compile flags for a single test? |
20:24:31 | shashlick | https://github.com/nim-lang/nimble/compare/master...genotrance:winci2 |
20:28:02 | rayman22201 | nvm. got it |
20:28:46 | * | elrood quit (Remote host closed the connection) |
20:36:11 | dom96 | cool |
20:40:27 | * | narimiran quit (Ping timeout: 245 seconds) |
20:43:47 | rayman22201 | different related question now: the ci runs this `./testament/testament --nim:./bin/nim pcat lib` |
20:44:18 | rayman22201 | which looks like it compiles the each lib module individually? |
20:44:56 | rayman22201 | but `lib/pure/collections/sharedlist.nim` and `sharedtables.nim` both require `--threads:on` |
20:45:40 | rayman22201 | This makes sense, but testament used to not complain. |
20:45:55 | rayman22201 | I added extra checks here: https://github.com/nim-lang/Nim/pull/12231 |
20:45:58 | rayman22201 | and now it complains |
20:46:58 | disruptek | [GC] cannot register global variable; too many global variables⏎ 😢 |
20:49:26 | Zevv | that'll teach you. every global is one to many! |
20:56:31 | rayman22201 | I guess the answer is just skip them? lol: https://github.com/nim-lang/Nim/blob/devel/testament/testament.nim#L561 |
20:56:40 | dom96 | Went through the Nimble chapter of my book. Brings back so many memories, and surprisingly it's still 100% compatible with latest Nimble :D |
20:57:01 | rayman22201 | woot! |
20:59:57 | Zevv | that's pretty sweet indeed |
21:03:00 | * | Hideki_ joined #nim |
21:07:07 | * | Hideki_ quit (Ping timeout: 245 seconds) |
21:07:08 | dom96 | Tweeter (TM) still works: https://i.imgur.com/8ATgyfX.png |
21:07:25 | dom96 | :D |
21:07:33 | dom96 | Considering spruicing up the CSS |
21:14:04 | rayman22201 | Hey @Zevv, have time to code review this? https://github.com/nim-lang/Nim/pull/12232 |
21:14:25 | rayman22201 | you too @Dom96, but I know you are busy with nimble stuff |
21:15:43 | dom96 | oooh fancy, but yeah, I'm way too burned out to review this properly tonight :) |
21:16:12 | rayman22201 | yeah, I figured. no worries :-) |
21:16:37 | * | solitudesf quit (Ping timeout: 268 seconds) |
21:26:13 | dom96 | I knew putting the Nim in Action code into the test suite would pay off. All code samples I've tried so far are working fine. |
21:26:27 | dom96 | There isn't even that many deprecations |
21:26:44 | shashlick | @dom96 what do you want to do with the choosenim pr? |
21:27:49 | dom96 | make it check for all DLLs in the zip? |
21:27:59 | dom96 | or at least the pcre + ssl DLLs |
21:28:04 | * | krux02 quit (Remote host closed the connection) |
21:28:16 | dom96 | that way you'll fix the issue and there won't be risk that this will break if someone decides to remove some DLLs from the zip |
21:28:59 | shashlick | Do you want it smart enough to only copy those that are missing |
21:29:24 | shashlick | I don't think it is worth it but ya |
21:30:13 | dom96 | nope |
21:30:17 | shashlick | I am 95% closer to getting libarchive done so we can add 7z and xz support to choosenim |
21:30:24 | Zevv | rayman22201: quite a diff you did there. I'd get anxiety problems for that, given there are no proper unit tests :) |
21:31:20 | shashlick | We could also statically link the ssl libs on windows at some point |
21:32:42 | rayman22201 | That's why I wrote tests to go with it! (Probably not enough, but a start) |
21:33:21 | rayman22201 | I don't think there was anyway to do this as a "small" diff lol |
21:33:21 | Zevv | can't you make a block template that locks the lock if needed, or otherwise just does the passed block? That would save repetition here and there |
21:34:13 | rayman22201 | Good idea. I didn't think of that |
21:34:59 | shashlick | did leorize merge his nim.nvim branch to master? |
21:35:03 | Zevv | he did |
21:35:20 | Zevv | he squashed it all, so it's only one commit |
21:36:09 | Zevv | rayman22201: I see what you solved here, but all in all the whole async stuff is getting hearier then my |
21:37:59 | rayman22201 | Lol. I want you to finish that sentence @Zevv |
21:39:37 | * | Vladar quit (Remote host closed the connection) |
21:39:46 | Zevv | hairier then my Medicinal Fried Chicken. |
21:40:40 | * | ng0 quit (Ping timeout: 260 seconds) |
21:42:02 | rayman22201 | Hahaha. Excellent |
21:43:06 | Zevv | It all feels very virtual and all, but this does seem to efix the problems with our first try |
21:45:19 | dom96 | shashlick, any luck with the `run` problem on Windows? |
21:45:25 | rayman22201 | It's not "the most efficient" solution. But it works with all the poll back ends, is cross platform, and correct (modulo any bugs I may have missed). |
21:45:26 | dom96 | I'd like to tag the release soon |
21:45:28 | * | ng0 joined #nim |
21:47:43 | Zevv | rayman22201: How would these changes affect code that does only normal fd and timer waiting, but no other event stuff? |
21:47:57 | Zevv | Like, 95% of the apps that are currently using async |
21:48:59 | rayman22201 | Well, all the tests pass. The CI ran important packages on it I believe. It shouldn't affect them afaik. |
21:49:25 | rayman22201 | @Zevv I agree though. I have "async fatigue" as well. Araq and Dom seem to be looking forward to this though. I didn't want to disappoint them. I felt I should at least finish this project. |
21:49:39 | Zevv | Yeah, sorry for bailing out :( |
21:49:58 | Zevv | I have these flares of enthausiasm of picking up things, and then life and work comes along and I just drop it all again |
21:50:01 | rayman22201 | No worries! You have been a great help! |
21:50:27 | Zevv | anyway, the work you did is not trivial, and properly reviewing isn't either |
21:51:00 | rayman22201 | Story of my life. I had to shut off irc for two weeks because work got so busy. This is the first free weekend I've had. |
21:52:18 | rayman22201 | I agree. I wish I could have gotten the PR finished earlier. I'm sad because It probably won't make 1.0. but oh well. Life happens. I would rather it be properly vetted. |
21:52:27 | Zevv | Same here. One of my customers had to show up with nifty new toch at some yearly big event, so that took some time |
21:53:03 | Zevv | Most important is probably to get a good idea of the impact and risk of the majority of 'normal' async users |
21:53:07 | Zevv | but this seems pretty much safe |
21:53:59 | shashlick | @dom96 - not yet |
21:55:19 | dom96 | what have you tried? |
21:55:33 | * | Zevv -> bed. laters rayman22201! |
21:55:48 | rayman22201 | Gn! |
21:55:48 | dom96 | did you check what `binary` is equal to? https://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L1100 |
22:02:36 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
22:02:51 | * | pbb joined #nim |
22:04:07 | shashlick | not yet, need to setup on my windows machine |
22:07:56 | dom96 | okay, well, I'll have to tag this in an hour before heading to bed |
22:08:05 | dom96 | make a PR if you can :) |
22:10:15 | shashlick | okay cool |
22:10:34 | * | Trustable quit (Remote host closed the connection) |
22:11:46 | shashlick | updated the choosenim PR, ptal |
22:11:56 | * | ng0 quit (Ping timeout: 260 seconds) |
22:13:13 | shashlick | `nimble run` is fixed 🙂 |
22:16:42 | shashlick | on windows, binary = the nims file name |
22:19:51 | zedeus | dom96: Tweeter was the inspiration for this project https://github.com/zedeus/nitter |
22:24:55 | * | rupertdev quit (Quit: The Lounge - https://thelounge.chat) |
22:30:29 | * | Jjp137 quit (Ping timeout: 276 seconds) |
22:31:01 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:34:07 | * | Jjp137 joined #nim |
22:37:06 | * | vegax87 quit (Read error: Connection reset by peer) |
22:37:34 | * | vegax87 joined #nim |
22:37:34 | * | vegax87 quit (Changing host) |
22:37:34 | * | vegax87 joined #nim |
22:42:17 | shashlick | dom96 - found a fix for nimble run |
22:52:23 | * | Jjp137 quit (Read error: Connection reset by peer) |
22:54:18 | * | vegax87 quit (Quit: Leaving) |
22:56:54 | * | Hideki_ joined #nim |
23:00:20 | FromGitter | <mratsim> @brentp I had a look into some papers for randomized PCA, specifically Halko 2009, Martinsson 2011, Witten 2013 and Szlam 2014 (especially this one). Seems like LU Factorization is faster than QR Factorization for randomized PCA. Also I really need to implement SVD (PR coming, only the tests are missing), and I can probably reimplement normal PCA using SVD, and also review the return matrix shape. |
23:00:45 | * | lritter quit (Ping timeout: 265 seconds) |
23:03:23 | dom96 | shashlick, what is it? |
23:04:20 | dom96 | zedeus, oooh, that's awesome :O |
23:05:44 | * | lritter joined #nim |
23:05:58 | dom96 | very stylish |
23:06:31 | shashlick | bin = ["run.exe"] but getCompilationBinary() = run without the exe |
23:06:56 | shashlick | i'm fixing it in my PR |
23:07:42 | shashlick | just need to changeFileExt("") => ExeExt |
23:08:06 | zedeus | dom96: thanks! |
23:08:16 | dom96 | shashlick, okay, i'll just cherry pick this |
23:08:29 | shashlick | go ahead and fix it then, i'll pull your fix in |
23:09:09 | shashlick | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/options.nim#L523 change ("") => (ExeExt) |
23:09:14 | shashlick | am still testing it though |
23:10:24 | dom96 | it makes sense |
23:10:35 | dom96 | and on non-Windows ExeExt is "" so it shouldn't break things any more :) |
23:10:43 | dom96 | I'm going to tag now |
23:10:50 | shashlick | hold on |
23:10:55 | shashlick | let it run thru windows CI |
23:11:10 | dom96 | I need to go now, so can't wait |
23:11:22 | shashlick | i have all your changes |
23:11:36 | dom96 | We can release 0.11.2 if there is time tomorrow |
23:12:04 | shashlick | i can tag later if it passes |
23:12:22 | shashlick | anyway everyone is sleeping |
23:13:02 | dom96 | Meh, it's fine. I doubt there is anything too broken on Windows |
23:13:14 | dom96 | if there is we can release 0.11.2 |
23:13:16 | dom96 | 'night |
23:13:55 | dom96 | and thanks for looking into this btw :) |
23:41:23 | FromGitter | <brentp> @mratsim, that would be awesome! I just saw default looked like QR in scikit-learn |
23:45:17 | * | rockcavera joined #nim |
23:53:47 | * | Hideki_ quit (Remote host closed the connection) |
23:56:00 | * | owl_000 joined #nim |