00:01:45 | * | Trustable quit (Remote host closed the connection) |
00:03:33 | * | dadada__ joined #nim |
00:15:23 | * | couven92 quit (Ping timeout: 260 seconds) |
00:26:47 | * | dadada__ quit (Ping timeout: 252 seconds) |
00:33:32 | * | dadada joined #nim |
00:33:55 | * | dadada is now known as Guest27287 |
00:56:32 | * | rnrwashere joined #nim |
00:57:14 | * | Guest27287 quit (Ping timeout: 246 seconds) |
00:59:36 | FromGitter | <sealmove> How to do int -> enum? |
01:01:50 | FromDiscord | <Rika> intVar.Enum perhaps? |
01:02:38 | * | dwdv quit (Ping timeout: 256 seconds) |
01:03:44 | * | dadada__ joined #nim |
01:05:15 | FromGitter | <sealmove> almost... you have to do Enum(intVar), that's why I was confused |
01:06:07 | FromDiscord | <Rika> you dont???? |
01:06:21 | FromDiscord | <Rika> UFCS???? |
01:06:38 | FromGitter | <sealmove> for some reason UFCS doesn't work in this case |
01:07:01 | Yardanico | if it's like 5+3.enum then of course |
01:07:06 | FromGitter | <sealmove> or perhaps I used it wrongly, because of complex expression |
01:07:07 | Yardanico | you need to do (5+3).enum |
01:07:16 | FromGitter | <sealmove> yeah, that was my pitfall probably |
01:09:59 | * | rnrwashere quit (Remote host closed the connection) |
01:20:34 | * | lritter quit (Quit: Leaving) |
01:22:07 | * | rnrwashere joined #nim |
01:27:01 | * | rnrwashere quit () |
01:27:48 | * | dadada__ quit (Ping timeout: 256 seconds) |
01:28:26 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:30:54 | * | chemist69 joined #nim |
01:33:34 | * | dadada joined #nim |
01:33:58 | * | dadada is now known as Guest23452 |
01:35:49 | * | flaviu quit (Ping timeout: 258 seconds) |
01:56:32 | * | endragor joined #nim |
01:57:19 | * | Guest23452 quit (Ping timeout: 250 seconds) |
02:03:31 | * | dadada__ joined #nim |
02:08:35 | * | endragor quit (Remote host closed the connection) |
02:14:17 | * | endragor joined #nim |
02:18:37 | * | endragor quit (Ping timeout: 252 seconds) |
02:24:11 | * | rnrwashere joined #nim |
02:27:59 | * | dadada__ quit (Ping timeout: 265 seconds) |
02:33:29 | * | dadada joined #nim |
02:33:52 | * | dadada is now known as Guest91738 |
02:41:05 | * | muffindrake quit (Ping timeout: 240 seconds) |
02:43:28 | * | muffindrake joined #nim |
02:57:14 | * | Guest91738 quit (Ping timeout: 240 seconds) |
03:02:52 | * | rnrwashere quit (Remote host closed the connection) |
03:03:33 | * | dadada__ joined #nim |
03:17:48 | FromDiscord | <Rika> is it possible to "dynamically" generate test cases in |
03:17:51 | FromDiscord | <Rika> in unittest* |
03:23:29 | FromGitter | <sealmove> what do you mean by "dymanically"? |
03:23:42 | * | endragor joined #nim |
03:27:14 | * | dadada__ quit (Ping timeout: 240 seconds) |
03:33:32 | * | dadada joined #nim |
03:33:55 | * | dadada is now known as Guest3872 |
03:38:56 | * | sz0 quit (Quit: Connection closed for inactivity) |
03:39:44 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:53:21 | * | silvernode joined #nim |
03:57:24 | * | Guest3872 quit (Ping timeout: 265 seconds) |
03:58:43 | * | chemist69 quit (Ping timeout: 252 seconds) |
03:59:40 | * | chemist69 joined #nim |
04:00:22 | FromDiscord | <Rika> uh |
04:00:55 | FromDiscord | <Rika> converting a for loop of a file walk into test cases per file |
04:00:59 | FromDiscord | <Rika> or something like that |
04:03:28 | leorize | use testament |
04:03:30 | leorize | or |
04:03:33 | leorize | !repo testutils |
04:03:34 | * | dadada__ joined #nim |
04:03:34 | disbot | https://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 6⭐ 2🍴 |
04:04:09 | FromDiscord | <Rika> are there docs for testament?... |
04:04:36 | leorize | in some contributing documents iirc |
04:04:38 | FromDiscord | <Benumbed> "docs" |
04:05:08 | FromDiscord | <Rika> """docs""" |
04:07:38 | FromDiscord | <Rika> do you recommend testament or testutils |
04:07:47 | FromDiscord | <Benumbed> The main thing I don't like about Status' test runner is that the files have to be named .test |
04:08:00 | FromDiscord | <Benumbed> Like y tho |
04:08:00 | * | silvernode quit (Ping timeout: 256 seconds) |
04:08:22 | FromDiscord | <Rika> ok so testament it is |
04:08:36 | FromDiscord | <Benumbed> Orrr write your own 😉 |
04:09:32 | FromDiscord | <Rika> lolno |
04:09:59 | leorize | testament is not too hard to use tbh |
04:09:59 | disruptek | use testament. i will probably fix it to run async tests before i return to working on testutils. |
04:12:52 | shashlick | disruptek: how are things in nimph land |
04:21:03 | * | opal quit (Ping timeout: 240 seconds) |
04:25:21 | * | sleepyqt joined #nim |
04:27:26 | * | dadada__ quit (Ping timeout: 256 seconds) |
04:31:37 | disruptek | shashlick: i dunno, i guess there might be a bug in how it handles choosenim because maybe choosenim puts packages under $nim, which nimph mistakes for compiler-supplied imports like, say, compiler. |
04:32:03 | disruptek | kungtotte has some sort of problem with mustache and i haven't had time to look at it properly. |
04:32:54 | disruptek | any idea where my extra output came from? |
04:33:32 | * | dadada joined #nim |
04:33:55 | * | dadada is now known as Guest2015 |
04:36:52 | * | rockcavera quit (Remote host closed the connection) |
04:46:48 | * | opal joined #nim |
04:54:02 | * | leorize quit (Remote host closed the connection) |
04:54:02 | * | opal quit (Remote host closed the connection) |
04:54:15 | * | opal joined #nim |
04:55:27 | * | leorize joined #nim |
04:57:23 | * | Guest2015 quit (Ping timeout: 252 seconds) |
05:03:41 | * | dadada__ joined #nim |
05:09:13 | * | thomasross quit (Ping timeout: 264 seconds) |
05:16:31 | FromGitter | <sealmove> Rika I had similar needs and made https://github.com/sealmove/testify |
05:18:45 | leorize | do you feel like making a tool that output junit from testament test results |
05:21:10 | FromGitter | <sealmove> would be awesome |
05:22:06 | FromGitter | <sealmove> but testament is hard to understand for people who have done no work on nim compiler |
05:22:14 | FromGitter | <sealmove> i don't understand it at all |
05:27:47 | * | dadada__ quit (Ping timeout: 265 seconds) |
05:32:17 | * | silvernode joined #nim |
05:33:32 | * | dadada joined #nim |
05:33:55 | * | dadada is now known as Guest2810 |
05:41:06 | * | Asgaroth_ quit (Read error: Connection reset by peer) |
05:42:08 | * | Asgaroth_ joined #nim |
05:43:59 | FromDiscord | <Rika> i think i understand it now |
05:47:04 | FromDiscord | <Rika> okay, so i'm pretty dumb |
05:47:15 | FromDiscord | <Rika> i could actually do what i described in unittest with a template |
05:47:41 | FromDiscord | <Rika> is this what being in the house for weeks does to you |
05:51:43 | FromGitter | <sealmove> unittest's main limitation is that it only works with 1 file. there is no process isolation or anything. |
05:51:56 | * | silvernode quit (Ping timeout: 246 seconds) |
05:56:03 | * | opal quit (Ping timeout: 240 seconds) |
05:57:09 | * | Guest2810 quit (Ping timeout: 252 seconds) |
05:58:14 | FromDiscord | <Rika> i dont think i have an issue with that |
05:59:00 | * | narimiran joined #nim |
05:59:22 | * | opal joined #nim |
05:59:32 | * | crem quit (Ping timeout: 260 seconds) |
05:59:49 | * | crem joined #nim |
06:03:38 | * | dadada__ joined #nim |
06:04:59 | FromGitter | <sealmove> then unittest should be perfect :> |
06:09:39 | * | solitudesf joined #nim |
06:27:13 | * | dadada__ quit (Ping timeout: 252 seconds) |
06:33:35 | * | dadada joined #nim |
06:33:59 | * | dadada is now known as Guest18345 |
06:52:48 | * | tefter joined #nim |
06:57:26 | * | Guest18345 quit (Ping timeout: 256 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:03:38 | * | dadada__ joined #nim |
07:04:35 | * | gmpreussner joined #nim |
07:12:03 | * | PMunch joined #nim |
07:13:14 | axion | Ok I can sleep now. My first piece of nim code is up on nimble.directory. :) |
07:15:41 | PMunch | Link? |
07:16:25 | axion | https://nimble.directory/pkg/origin I'll read the newbie code hate when I wake up |
07:27:05 | * | dadada__ quit (Ping timeout: 250 seconds) |
07:29:40 | leorize[m] | axion: it's full of lisp code? |
07:31:00 | axion | leorize[m]: I sent a PR. It was a typo for the web link. you can click the actual repo link to go to the correct one. |
07:31:38 | leorize | lol |
07:32:20 | axion | I am tired and should have done this when I'm more awake. :( |
07:33:42 | * | dadada joined #nim |
07:34:05 | * | dadada is now known as Guest86397 |
07:57:25 | * | Guest86397 quit (Ping timeout: 252 seconds) |
08:03:33 | * | dadada__ joined #nim |
08:12:07 | * | Asgaroth_ quit (Read error: Connection reset by peer) |
08:12:32 | * | Asgaroth_ joined #nim |
08:20:01 | Araq | I have a minor patch for testament in the pipeline |
08:22:51 | * | couven92 joined #nim |
08:53:24 | * | silvernode joined #nim |
09:08:17 | * | silvernode quit (Ping timeout: 246 seconds) |
09:13:39 | * | NimBot joined #nim |
09:16:44 | * | dwdv joined #nim |
09:18:14 | Araq | most C libraries use pointers for everything and the sizes are irrelevant |
09:19:13 | Araq | I don't see how a "dummy C file" helps with anything |
09:20:02 | * | kenran joined #nim |
09:26:51 | shashlick | which lib is this |
09:29:03 | PMunch | It's Unbound |
09:29:26 | PMunch | Not really a library, but I create a DLL that it interfaces with |
09:29:45 | PMunch | So I get structures that are defined in the program |
09:30:29 | PMunch | Araq, well Nim is probably smarter about the sizes if I define the objects as proper C structs and tell Nim to use that rather than telling Nim the sizes of things. |
09:31:57 | Araq | narimiran, I don't understand https://github.com/nim-lang/Nim/pull/13803/files |
09:31:58 | disbot | ➥ faster CIs |
09:37:01 | narimiran | Araq: i've just answered your question about nightlies. is there something else? |
09:37:23 | shashlick | PMunch: we already spoke about unbound before 🙂 https://irclogs.nim-lang.org/21-10-2019.html#13:46:03 |
09:37:56 | PMunch | Yeah I know :P |
09:38:27 | * | uvegbot joined #nim |
09:38:56 | Araq | narimiran, which tests were removed? |
09:39:03 | Araq | what was the criterion? |
09:39:11 | shashlick | narimiran: only comment on csources, we use it in nightlies to build csources into release |
09:40:04 | Araq | nightlies should really use 'koch nightlies' (which doesn't exist yet) |
09:40:11 | PMunch | shashlick, this is pretty much the stuff I have now: http://ix.io/2fYu |
09:40:14 | PMunch | And it's not great.. |
09:40:24 | shashlick | narimiran: okay saw Araq's comment and your response |
09:40:52 | shashlick | nightlies does all sorts of docker stuff, some portions could go into koch though, yes |
09:41:02 | shashlick | leorize was looking into github actions tho |
09:41:12 | narimiran | shashlick: yeah, i've spoke to him about it |
09:41:41 | shashlick | cool |
09:43:35 | narimiran | Araq: in most of the tests i just lowered the number of iterations and/or slightly reduced sleep time. after that, some tests were merged into one larger test. and the lowest amount of commits are test removals as follows: |
09:44:50 | narimiran | - in 'assert' category, `testhelper.nim` file was removed and the tests that test that file; `tassert2.nim` was modified to work without that helper |
09:46:15 | narimiran | - `tindexerrorformatbounds.nim` was removed as i felt it was not very useful |
09:46:56 | Araq | why was tests/parallel/tdisjoint_slice2.nim removed? |
09:47:02 | * | filcuc joined #nim |
09:47:19 | Araq | ah merged into the first test, got it |
09:47:19 | narimiran | it was merged into `tdisjoint_slice1.nim` |
09:47:20 | Araq | ok |
09:47:25 | * | dadada__ quit (Ping timeout: 252 seconds) |
09:47:36 | * | ganytheodes joined #nim |
09:48:10 | ganytheodes | Hi guys how can I do something like if foo() and bar(): echo "both ok?" |
09:48:16 | narimiran | same for tbitops2, tdeepcopy2, dcollections_to_string, tstreams2, tstreams3 |
09:48:39 | * | dadada joined #nim |
09:48:45 | narimiran | ganytheodes: like you have written it if those procs return bool |
09:49:01 | * | dadada is now known as Guest43612 |
09:49:25 | ganytheodes | both return bool but it does not seem to work |
09:49:44 | narimiran | ganytheodes: can you post your code on https://play.nim-lang.org/ ? |
09:50:20 | shashlick | PMunch: check out http://ix.io/2fYw |
09:50:40 | shashlick | some types are stubbed out but might work for you |
09:50:57 | narimiran | Araq: 'rodfiles' category was removed as i thought "rod" stuff is long gone - if not true, i'll revert that commit |
09:51:25 | ganytheodes | narimiran: i am just checking paths so not sure what's there to post |
09:51:38 | narimiran | ...but the tests there seem to be very basic and (probably) covered by other tests |
09:53:31 | PMunch | shashlick, what's that? |
09:54:03 | shashlick | Wrapper for module.h |
09:54:52 | Araq | narimiran, nah the rest is fine, the question really was about tdisjoint_slice |
10:03:24 | * | krux02 joined #nim |
10:05:50 | * | Guest43612 is now known as dadada |
10:16:01 | PMunch | Hmm |
10:16:28 | PMunch | I won't be able to access any of the fields though will I? |
10:17:58 | Araq | PMunch, your wrapping code looks fine to me |
10:19:39 | PMunch | Yeah, but I struggle with it crashing |
10:19:46 | PMunch | SIGSEGV |
10:20:06 | PMunch | Traced it back earlier to an issue with alignment |
10:20:32 | Araq | we use C's default alignment rules |
10:20:52 | Araq | wrap all the fields inside the struct in the right order and there should be few problems |
10:21:04 | PMunch | And yet there is.. |
10:23:20 | Araq | PMunch, well you can import from the .header |
10:23:40 | Araq | in fact, I think you're confused |
10:23:41 | Araq | {.emit: fmt""" |
10:23:41 | Araq | #include "{here}/config.h" |
10:23:41 | Araq | #include "{here}/../util/module.h" |
10:23:41 | Araq | """} |
10:23:58 | Araq | means that you really want to use .header instead |
10:29:36 | * | ganytheodes quit (Remote host closed the connection) |
10:30:09 | PMunch | Hmm, just tried to remove that and it builds fine |
10:30:17 | PMunch | So that's probably left over from something |
10:38:43 | * | Trustable joined #nim |
10:39:54 | FromGitter | <alehander92> morning |
10:42:25 | * | PMunch quit (Read error: Connection reset by peer) |
10:45:00 | * | liblq-dev joined #nim |
10:45:43 | * | PMunch joined #nim |
10:47:45 | * | solitudesf quit (Remote host closed the connection) |
10:49:28 | * | solitudesf joined #nim |
10:57:54 | * | abm joined #nim |
11:01:51 | * | natrys joined #nim |
11:09:33 | * | sz0 joined #nim |
11:10:22 | * | kenran quit (Quit: leaving) |
11:17:11 | * | Vladar joined #nim |
11:22:11 | FromDiscord | <clyybber> morning |
11:22:35 | FromDiscord | <Recruit_main707> what time is it there? |
11:22:50 | Araq | alehander92: https://github.com/nim-lang/Nim/pull/13743/ |
11:22:51 | disbot | ➥ DrNim (Nim compiler with Z3 integration) |
11:23:14 | Araq | most features have been implemented, now "only" the testing needs to be done |
11:23:37 | * | filcuc quit (Ping timeout: 264 seconds) |
11:32:17 | * | uvegbot quit (Ping timeout: 252 seconds) |
11:35:01 | * | uvegbot joined #nim |
11:35:07 | * | clyybber joined #nim |
11:40:22 | FromGitter | <timotheecour> @araq any other changes need for stacktrace PR https://github.com/nim-lang/Nim/pull/13351 ? I’d really like to have it merged because it helps when debugging code for other PRS |
11:40:24 | disbot | ➥ stacktraces can now show custom runtime msgs per frame ; snippet at 12https://play.nim-lang.org/#ix=2e0u |
11:45:58 | Araq | ok and thank you for pinging me on open PRs |
11:46:27 | clyybber | hey, we got nim music: https://www.youtube.com/watch?v=rJwnWKFb-m8 |
11:46:27 | FromGitter | <timotheecour> yay! thanks |
11:46:34 | Araq | it remains to be the case that I don't get every update |
11:46:39 | Araq | not sure why |
11:49:21 | clyybber | timotheecour: Why are those required in that PR? https://github.com/nim-lang/Nim/pull/13351/files#diff-5cfdfeab79c2d2b7bbc78af7060c38c3R58-R73 |
11:49:23 | disbot | ➥ stacktraces can now show custom runtime msgs per frame ; snippet at 12https://play.nim-lang.org/#ix=2e0u |
11:49:41 | clyybber | To be added to system.nim that is |
11:50:05 | FromDiscord | <Rika> can i use `when` instead of `case` to make a variant object? |
11:51:48 | Araq | clyybber, he only moved the decls around |
11:51:53 | clyybber | oh |
11:51:57 | clyybber | I see |
11:52:43 | * | tane joined #nim |
11:54:05 | * | solitudesf- joined #nim |
11:56:17 | * | solitudesf quit (Ping timeout: 246 seconds) |
12:03:00 | FromGitter | <timotheecour> ya |
12:05:02 | FromGitter | <alehander92> Araq |
12:05:06 | FromGitter | <alehander92> this is good |
12:05:13 | FromGitter | <alehander92> i will like to check it out |
12:05:47 | FromGitter | <alehander92> two questions: cant it be a flag to the compiler: or is it too much to bundle optionally z3 with it (maybe the flag can just invoke the drnim binary) |
12:05:58 | FromGitter | <alehander92> and how do you plan to solve nil checking with it |
12:06:20 | FromGitter | <alehander92> also, i want to make a simple rfc about tracking a single blocking effect, but i want to ask first here |
12:06:40 | FromGitter | <alehander92> for some clarifications (e.g. can i track just a single tag/effect? without having to annotate the other ones) |
12:07:46 | Araq | it's ok as a separate tool IMHO, the dependency is bad for many |
12:08:09 | Araq | nil checking doesn't really benefit from it though and shouldn't be part of my todo |
12:08:45 | FromGitter | <geotre> How do you run a macro on the output of another macro? |
12:09:25 | Araq | getAst(macroCall(...)) iirc |
12:09:43 | Araq | it happens rarely, usually macros only call into .compiletime proc helpers |
12:09:45 | FromGitter | <alehander92> Araq ah ok |
12:10:01 | Araq | but we got .requires and .ensures |
12:10:12 | FromGitter | <alehander92> but the setLen thing |
12:10:15 | FromGitter | <alehander92> seems pretty nice |
12:10:19 | FromGitter | <alehander92> overally good work |
12:10:31 | FromGitter | <alehander92> does it have a lot of overhead? |
12:10:46 | FromGitter | <geotre> Thanks @Araq! |
12:10:47 | Araq | no idea, for now it's opt-in via .push staticBoundChecks |
12:11:05 | FromGitter | <alehander92> and do you guys plan to annotate the stdlib eventually, as one needs that to be able to use the feature well imo |
12:11:30 | Araq | that's why the pragmas are builtin, they should always exist |
12:11:42 | FromGitter | <alehander92> (yeah one can just assert a variable >= n for a cast so maybe not too fatal) |
12:12:33 | Araq | but the stdlib isn't as crucial to annotate as you would think because currently there is little available |
12:12:53 | FromGitter | <alehander92> hm, and can one annotate e.g. requires: a > 0, other > a |
12:13:00 | FromGitter | <alehander92> like args depending on each other |
12:13:00 | Araq | for instance, you cannot write down that e.g. socket.read works on opened sockets |
12:13:22 | FromGitter | <alehander92> ah something like typestate |
12:13:37 | Araq | my goal was to solve range and index checking and so far it supports that really well |
12:13:42 | * | rockcavera joined #nim |
12:13:47 | FromGitter | <alehander92> we imagined a mechanism similar to a generalized version of notnil checking for that once (with zah i think) |
12:14:03 | FromGitter | <alehander92> but it was just a dream :D |
12:14:06 | Araq | once that matured, I will extend it to Nim's "disjoint checking" for threads |
12:14:41 | FromGitter | <alehander92> i havent used that i think |
12:15:02 | * | filcuc joined #nim |
12:15:30 | FromGitter | <alehander92> but the typestate thing: how would you write down expected transitions (e.g. pre: Open, post: Running) |
12:15:43 | FromGitter | <alehander92> would they be based on enums |
12:16:38 | Araq | haven't thought about it but {.requires: f.state == opened.} comes to mind |
12:16:59 | FromGitter | <Clyybber> when you have typestates depend on other typestates |
12:17:00 | Araq | proc open(): File {.ensures: f.state == opened.} |
12:17:09 | FromGitter | <Clyybber> we have type attached proofs |
12:17:18 | Araq | proc close(f: File) {.ensures: f.state == closed.} |
12:17:36 | FromGitter | <alehander92> ha yeah, you might want to ensure the state is just previous toggle of a state or something |
12:17:39 | Araq | pretty easy to do once all the other machinery is in place |
12:17:46 | FromGitter | <alehander92> and probably more complicated case |
12:18:01 | clyybber | ATS does it wonderfully |
12:18:15 | FromGitter | <alehander92> but thats what i wondered before: can we write a > 0, other > a |
12:18:24 | Araq | try it. |
12:18:32 | FromGitter | <alehander92> :D ok, later |
12:19:09 | FromGitter | <alehander92> otherwise, my problem is : i want to annotate `a()` with `Blocking` (but you can imagine it for `IO`): can i somehow check only for that effect without writing down all the others |
12:19:35 | FromGitter | <alehander92> like, having a separate "group" for each effect independently of each other |
12:19:53 | FromGitter | <alehander92> the same way i can track *types* but not *raises* etc |
12:20:19 | FromGitter | <alehander92> i imagined that maybe thats what tags are |
12:20:25 | FromGitter | <alehander92> but it seems tags and effects are the same |
12:20:43 | Araq | they are, yes. |
12:21:54 | FromGitter | <alehander92> so i cant do like `{.exportc, Blocking.}` or something like that |
12:22:44 | FromGitter | <alehander92> or like `{.tag[Blocking].}` |
12:22:52 | * | dadada quit (Ping timeout: 256 seconds) |
12:22:52 | Araq | I still don't care about "blocking", it's stupid :-) |
12:23:08 | FromGitter | <alehander92> and tell the compiler: check only for that in the set of all tags in this function |
12:23:32 | FromGitter | <alehander92> well, i had a case where it would've been possible to tell me that my async function is blocking |
12:23:42 | FromGitter | <alehander92> and i realized after a strange behavior problem |
12:24:05 | FromGitter | <alehander92> like, i agree its not always super useful, but still cool to have |
12:24:23 | Araq | .tags: [not Blocking] |
12:24:27 | * | dadada joined #nim |
12:24:34 | Araq | seems to be what you're asking for |
12:24:50 | * | dadada is now known as Guest28055 |
12:24:56 | Araq | we don't have 'not' for tags though |
12:25:04 | FromGitter | <alehander92> especially if one can easily write something like "await this from a long-running thread" etc |
12:25:14 | FromGitter | <alehander92> well yes |
12:25:55 | Araq | clyybber, how does ATS do it? |
12:26:57 | * | kenran joined #nim |
12:27:18 | clyybber | They have proofs as explicit CT only objects |
12:28:02 | clyybber | I guess we could attach those proofs to the type by default |
12:28:11 | clyybber | s/type/symbol |
12:28:46 | clyybber | For example open() would return a file and a proof that the file is open |
12:29:05 | Araq | what's the difference to .ensures? |
12:29:29 | clyybber | Not a lot, or nothing possibly |
12:30:07 | Araq | https://github.com/nim-lang/Nim/pull/13743/files#diff-f0f01a54ace4713173aa55429f9a7a7dR16-R17 |
12:30:09 | disbot | ➥ DrNim (Nim compiler with Z3 integration) |
12:31:29 | Araq | we need to handle join points in a smart way though |
12:31:58 | clyybber | Yeah, so we have ensures and requires. When f = open {.ensures: f.state == opened.}; ... close(f) {.requires: f.state == openend.} work then there should be no difference |
12:32:01 | Araq | probably replace the sempass2 patches with a new CFG based pass |
12:32:48 | clyybber | Araq: We could attach those ensures (axioms/proofs) to the symbol, here f or f.state |
12:32:53 | clyybber | Like in the ast |
12:33:01 | clyybber | Thats what I meant |
12:33:12 | Araq | they are attached to the proc type |
12:33:19 | Araq | so that even indirect calls work properly |
12:33:40 | clyybber | I mean in the caller scope |
12:33:47 | clyybber | When you do f = open |
12:34:03 | clyybber | then the symbol f has a proof for f.state == opened attached to it |
12:34:04 | Araq | in the caller scope we track the "knowledge", currently via a stack |
12:34:08 | clyybber | Yeah |
12:34:41 | Araq | the stack is good for when you only allow structured programming (no 'break', return etc) |
12:34:46 | Araq | *good enough |
12:34:52 | clyybber | I see |
12:35:02 | FromGitter | <Vindaar> thanks to whoever wrote this little paragraph: https://nim-lang.github.io/Nim/manual.html#closures-creating-closures-in-loops <3 ⏎ I realized what the problem was, but had no idea how to fix it. |
12:35:18 | clyybber | I think it was foldl |
12:36:27 | clyybber | Araq: It would be amazing to give "us" access to the proofs in our code, so that we could manually construct new proofs when needed |
12:37:26 | Araq | but you can, via .assume |
12:37:33 | clyybber | Yeah |
12:37:38 | clyybber | Right |
12:38:26 | clyybber | Really cool |
12:38:58 | clyybber | Araq: Can you do ifs in assume? |
12:39:25 | clyybber | Like: if ensured x > 0: assume x > 1 ? |
12:39:29 | clyybber | stupid example |
12:40:01 | Araq | you can "assume" an implication |
12:40:09 | clyybber | Ah nice |
12:40:18 | clyybber | so we would do {.assume x > 0 -> x > 1 |
12:40:22 | clyybber | right? |
12:40:23 | Araq | .assume: (x >= 0) -> (y == 4) |
12:40:27 | clyybber | cool |
12:43:25 | clyybber | Araq: I think for open; ...; close; to be provable we need to consume proofs by default |
12:43:29 | clyybber | Thats what ATS does too |
12:43:41 | Araq | what does that mean? |
12:44:40 | clyybber | It means that for example in f = open(); close(f); close "consumes" the proof created by open: f.state == opened, and returns a new proof: f.state == closed |
12:46:01 | clyybber | Similarily any call like someProc(f) needs to consume f.state == opened by default |
12:46:45 | clyybber | And when we can prove that someProc(f) doesn't close f, someProc can return a "new" f.state == opened |
12:46:49 | Araq | seems to be covered by .requires and .ensures |
12:47:33 | Araq | the state transitions need to be path sensitive though and we need to document/clean up the rules about locations |
12:47:35 | FromGitter | <alehander92> Araq |
12:47:59 | clyybber | Araq: Yeah, so that we don't get f.state == opened and f.state == closed at the same "time" |
12:48:42 | Araq | well that's the "invalidateFacts" that assignment does |
12:48:51 | Araq | I'm not worried about it, it's simple |
12:49:01 | Araq | I'm worried about things like: |
12:49:06 | Araq | if cond: result = 3 |
12:49:12 | Araq | else: result = 4 |
12:49:17 | Araq | {.ensures: result > 0.} |
12:49:37 | Araq | we need to 'or' together the facts after an 'if' |
12:50:26 | clyybber | Maybe we should give z3 the cond |
12:50:30 | clyybber | and the ifs |
12:50:45 | Araq | we do that |
12:50:50 | clyybber | Oh |
12:50:50 | Araq | but incompletely |
12:51:12 | Araq | but yeah, that's quite do-able when you use structured programming |
12:54:09 | Araq | if a[i] < a[j]: swap(a[i], a[j]) # how to tell Z3 that afterwards a[i] >= a[j] holds? |
12:55:04 | * | dddddd joined #nim |
12:55:38 | * | Kaivo joined #nim |
12:58:53 | clyybber | Araq: I think you must construct a new a |
12:59:16 | clyybber | That has a[i] = oldA[j] and a[j] = oldA[i] |
12:59:59 | clyybber | And have those as implications of the condition |
13:01:39 | clyybber | So you would have a new copy of a that is the old one with (oldA[i] < oldA[j]) -> a[i] == oldA[j] and a[j] == oldA[i] |
13:02:18 | clyybber | Basically invalidatingFacts about parts of a |
13:03:43 | Araq | bbl |
13:03:57 | Araq | clyybber, keep in mind that Z3 has native array support |
13:04:20 | Araq | we can essentially map a[i] to Z3's a[i] and let it deal with it |
13:10:10 | clyybber | ah, cool! |
13:14:40 | * | CcxWrk_ joined #nim |
13:14:40 | * | CcxWrk quit (Killed (weber.freenode.net (Nickname regained by services))) |
13:14:40 | * | CcxWrk_ is now known as CcxWrk |
13:15:48 | * | k0mpjut0r quit (Ping timeout: 240 seconds) |
13:15:48 | * | Cadey quit (Ping timeout: 240 seconds) |
13:15:49 | * | golechwi quit (Ping timeout: 240 seconds) |
13:15:49 | * | gangstacat quit (Ping timeout: 240 seconds) |
13:15:49 | * | drewr quit (Ping timeout: 240 seconds) |
13:15:49 | * | unclechu quit (Ping timeout: 240 seconds) |
13:15:49 | * | lqdev[m] quit (Ping timeout: 240 seconds) |
13:15:49 | * | FromGitter quit (Ping timeout: 240 seconds) |
13:15:52 | * | golechwi1 joined #nim |
13:16:17 | * | FromGitter joined #nim |
13:16:29 | * | waleee-cl joined #nim |
13:16:47 | * | gangstacat joined #nim |
13:17:09 | * | Cadey joined #nim |
13:20:27 | * | k0mpjut0r joined #nim |
13:20:55 | * | lqdev[m] joined #nim |
13:21:54 | * | unclechu joined #nim |
13:29:00 | clyybber | Araq: I think skipConv must be a little smarter. https://github.com/nim-lang/Nim/issues/13780 is caused by this: nkObjDownConv(nkObjUpConv(g.vm)) |
13:29:02 | disbot | ➥ arc: codegen or inject destructor error ; snippet at 12https://play.nim-lang.org/#ix=2fZC |
13:29:14 | clyybber | Where g.vm is a RootRef |
13:29:34 | clyybber | And nkObjUpConv(g.vm) is a PCtx |
13:30:02 | clyybber | And nkObjDownConv(nkObjUpConv(g.vm)) is a PPassContext |
13:30:32 | clyybber | So ideally skipConv should skip both |
13:30:59 | * | drewr joined #nim |
13:31:31 | clyybber | But because it is "afraid" that the nkObjUpConv would loose too much information it doesn't skip it |
13:32:06 | * | lritter joined #nim |
13:39:53 | * | Guest28055 quit (Ping timeout: 252 seconds) |
13:45:25 | * | dadada joined #nim |
13:46:13 | * | dadada is now known as Guest40319 |
13:46:49 | clyybber | Hmm, or maybe thats not the issue. Somehow a manual (PPassContext(PCtx(RootRef(g.vm)))) = nil works fine |
13:54:21 | clyybber | Ha, think I found the culprit. skipConv skips nkObjDownConv and nkObjUpConv's too hastily |
14:17:04 | * | oswin[m] quit (Quit: Idle for 30+ days) |
14:17:24 | clyybber | Araq: I wrote down my thoughts here if you want to take a look: https://github.com/nim-lang/Nim/issues/13780#issuecomment-606024178 |
14:17:26 | disbot | ➥ arc: codegen or inject destructor error ; snippet at 12https://play.nim-lang.org/#ix=2fZC |
14:18:16 | * | couven92 quit (Ping timeout: 258 seconds) |
14:23:01 | * | Guest40319 quit (Ping timeout: 264 seconds) |
14:29:38 | * | jxy quit (Ping timeout: 240 seconds) |
14:33:34 | * | dadada joined #nim |
14:33:56 | * | dadada is now known as Guest46925 |
14:47:14 | * | endragor quit (Remote host closed the connection) |
14:50:04 | * | jxy joined #nim |
14:52:58 | dom96 | a virtual Nim conference huh |
14:52:59 | dom96 | cool |
14:53:53 | dom96 | Araq, what month/date were you thinking about? |
14:55:28 | * | Jesin quit (Quit: Leaving) |
15:01:57 | Araq | dom96, end of April? |
15:02:10 | Araq | hmm no, too early |
15:02:22 | Araq | talkers must have a chance to get prepared |
15:02:27 | Araq | *speakers |
15:02:42 | Araq | so ... I dunno, my birthday is in June... |
15:03:17 | Araq | clyybber, I think I figured it out |
15:03:49 | clyybber | Araq: The DrNim issue? |
15:03:53 | Araq | if cond: a else: b can be translated to 'facts(a) or facts(b)' |
15:04:23 | Araq | but it's much better to translate it into: cond -> facts(a) and (not cond) -> facts(b) |
15:04:29 | clyybber | But we must tell it the condition somehow, right, otherwise we are too pessimistic |
15:04:36 | clyybber | Yeah |
15:04:47 | Araq | and then we should be able to prove the sorting operation |
15:05:09 | Araq | likewise for 'case' statements |
15:05:41 | Araq | we model the machine state completely by propositions |
15:06:05 | clyybber | Yeah, thats the correct approach I'm sure |
15:06:10 | Araq | for example, a = 3; b = 4 ==> a == 3 and b == 4 |
15:06:26 | Araq | yeah, the state explosion could be bad though |
15:07:08 | FromGitter | <alehander92> Araq, is there a way |
15:07:14 | Araq | if 'if' becomes an 'implies' I really begin to question our DFA with join points |
15:07:15 | FromGitter | <alehander92> to annotate a referece to a const object |
15:07:49 | Araq | as we clearly want the "domination" information to be as easy to see as reasonable |
15:08:05 | clyybber | You mean the DFA that we use in injectdestructors? |
15:08:09 | Araq | yes |
15:08:23 | Araq | it's fine for our 'wasMoved' analysis ofc |
15:08:32 | Araq | but it might be the wrong data structure for DrNim |
15:08:45 | clyybber | Oh, you use it there too? |
15:08:49 | clyybber | I wasn't aware |
15:08:58 | * | oz quit (Quit: EOF) |
15:09:08 | Araq | I don't but I considered it |
15:09:12 | clyybber | ah |
15:09:45 | * | Jesin joined #nim |
15:10:00 | * | kenran quit (Quit: leaving) |
15:10:03 | clyybber | I think its fine. Since its a list when you go through it you can build up your info about the "current state" yourself |
15:10:13 | clyybber | I think its fine as an underlying data structure |
15:10:23 | Araq | maybe |
15:10:27 | * | literal quit (Ping timeout: 260 seconds) |
15:10:32 | FromGitter | <alehander92> it might be like `a: const A`: it would require for one to just pass a `const`or a parameter which was already passed as "const" |
15:10:43 | * | oz joined #nim |
15:10:50 | FromGitter | <alehander92> which seem enough to me, but i havent used enough c++ to realize all the probable problems :D |
15:10:52 | * | literal joined #nim |
15:10:53 | Araq | would be nice if it worked because then we can continue to use 'return' and 'break' :P |
15:11:18 | clyybber | Yeah, return and break must be usable |
15:11:37 | FromGitter | <alehander92> but this way it might look like a "const reference to non-const value" |
15:11:41 | FromGitter | <alehander92> which is not what i mean hmm |
15:11:58 | * | planetis[m] quit (Ping timeout: 240 seconds) |
15:12:00 | * | skrylar[m] quit (Ping timeout: 240 seconds) |
15:12:01 | * | khanate[m]0 quit (Ping timeout: 240 seconds) |
15:14:14 | * | NimBot joined #nim |
15:14:18 | dom96 | Araq, I was thinking May |
15:14:22 | FromGitter | <alehander92> because my bug was location = process.location; await stuff(location) ... later another function actually works with changed location.path |
15:14:40 | * | planetis[m] joined #nim |
15:14:41 | FromGitter | <alehander92> i admit, with some code discipline this is probably obvious but after all we are into type checking |
15:14:47 | FromGitter | <alehander92> write tracking might be useful for more things like multiple refs i guess |
15:15:17 | FromGitter | <alehander92> but can it work without interfunction analysis |
15:16:04 | * | skrylar[m] joined #nim |
15:16:40 | FromGitter | <alehander92> (and yeah in this case one might be able to use a non-ref object, but often this might not be the case) |
15:19:24 | FromGitter | <cooldome> Guys, hasDestructor(for tyRef) in compiler returns false in `--gc:arc` mode is this intentional? |
15:19:28 | * | rockcavera quit (Remote host closed the connection) |
15:20:08 | clyybber | cooldome: Hmm, I don't think so |
15:21:18 | FromGitter | <Clyybber> @cooldome Btw, I've investigated #13780 and wrote down the results there: https://github.com/nim-lang/Nim/issues/13780#issuecomment-606024178 . I think the core issue is a backend one |
15:21:19 | disbot | ➥ arc: codegen or inject destructor error ; snippet at 12https://play.nim-lang.org/#ix=2fZC |
15:23:52 | * | rockcavera joined #nim |
15:25:24 | Araq | Clyybber: how can it be a codegen issue? shouldn't injectdestructors produce correct code instead |
15:25:27 | * | khanate[m]0 joined #nim |
15:25:42 | Araq | backends are always allowed to introduce temporaries |
15:26:04 | * | oz quit (Quit: EOF) |
15:26:09 | FromGitter | <cooldome> @ clyybber. Thanks @clybber, confirmed if I define ref in type section hasDestructor() gives true, but if write "ref MyObj" in place I get hasDestructor() false. I will fix it |
15:26:34 | Araq | cooldome: there are bugs left... |
15:27:24 | * | oz joined #nim |
15:35:43 | * | filcuc quit (Quit: Konversation terminated!) |
15:38:25 | narimiran | dom96: start of may is only a month away (yep, a rhyme); we (both organizers and speakers) will need more time than that to prepare, IMO |
15:39:33 | Araq | we need to schedule a sound&hardware check 2 days before the conference |
15:40:47 | * | zama quit (Ping timeout: 260 seconds) |
15:41:19 | dom96 | narimiran, yeah, I was thinking late May |
15:41:36 | dom96 | Maybe early May we could have a practice run |
15:41:40 | * | zama joined #nim |
15:42:32 | Araq | first week of June |
15:42:37 | Araq | my suggestion |
15:43:53 | dom96 | sure, I'm happy with that |
15:45:09 | * | matti quit (*.net *.split) |
15:45:10 | * | d-nice2[m] quit (*.net *.split) |
15:45:10 | * | oprypin quit (*.net *.split) |
15:45:10 | * | qwertfisch quit (*.net *.split) |
15:45:11 | * | WilhelmVonWeiner quit (*.net *.split) |
15:45:35 | * | matti joined #nim |
15:45:35 | * | d-nice2[m] joined #nim |
15:45:35 | * | oprypin joined #nim |
15:45:35 | * | qwertfisch joined #nim |
15:45:35 | * | WilhelmVonWeiner joined #nim |
15:47:37 | * | Jjp137 quit (Ping timeout: 264 seconds) |
15:47:38 | * | mwbrown quit (Ping timeout: 264 seconds) |
15:48:06 | * | BitPuffin quit (Ping timeout: 240 seconds) |
15:48:26 | * | unclechu quit (Ping timeout: 240 seconds) |
15:48:30 | * | d-nice2[m] quit (Ping timeout: 240 seconds) |
15:48:35 | * | planetis[m] quit (Ping timeout: 252 seconds) |
15:48:39 | * | leorize[m] quit (Ping timeout: 246 seconds) |
15:48:39 | * | salotz[m] quit (Ping timeout: 246 seconds) |
15:48:46 | * | lqdev[m] quit (Ping timeout: 240 seconds) |
15:48:49 | * | k0mpjut0r quit (Ping timeout: 246 seconds) |
15:48:57 | * | vycb[m] quit (Ping timeout: 246 seconds) |
15:48:57 | * | sendell[m] quit (Ping timeout: 246 seconds) |
15:48:57 | * | grantmwilliams quit (Ping timeout: 246 seconds) |
15:49:14 | * | khanate[m]0 quit (Ping timeout: 256 seconds) |
15:49:14 | * | Demos[m] quit (Ping timeout: 256 seconds) |
15:49:14 | * | pqflx3[m] quit (Ping timeout: 256 seconds) |
15:49:17 | * | skrylar[m] quit (Ping timeout: 260 seconds) |
15:49:18 | * | reversem3 quit (Ping timeout: 260 seconds) |
15:49:18 | * | chris2020[m] quit (Ping timeout: 260 seconds) |
15:49:18 | * | s87651[m] quit (Ping timeout: 260 seconds) |
15:49:21 | * | watzon quit (Ping timeout: 272 seconds) |
15:49:47 | * | matti quit (Ping timeout: 240 seconds) |
15:50:00 | * | mwbrown joined #nim |
15:52:54 | clyybber | Araq: Its a codegen issue because the backend shouldn't be allowed to introduce temporaries here IMO |
15:53:03 | clyybber | Since we are talking about lvalues here |
15:53:21 | clyybber | Another option of course would be to disallow PCtx(g.vm) = nil |
15:53:26 | clyybber | And patch injectdestructors |
15:54:05 | * | matti joined #nim |
15:54:27 | * | oprypin quit (Ping timeout: 240 seconds) |
15:55:04 | * | oprypin joined #nim |
15:56:30 | Araq | maybe you're right |
15:59:14 | Araq | lvalues are important, yes |
16:22:26 | * | thomasross joined #nim |
16:27:24 | * | solitudesf joined #nim |
16:30:30 | * | solitudesf- quit (Ping timeout: 256 seconds) |
16:36:13 | * | leth` quit (Read error: Connection reset by peer) |
16:42:24 | PMunch | Wait, are we having a virtual NimConf? |
16:43:50 | Yardanico | yeah I saw that post too :P |
16:44:07 | * | qwertfisch quit (Ping timeout: 240 seconds) |
16:44:21 | Yardanico | sad that I don't really have anything to talk about, but I'll at least enjoy all other talks :P |
16:44:30 | Yardanico | and I hope it all gets recorded in good quality and put on youtube |
16:44:51 | PMunch | Post? |
16:44:56 | PMunch | I just saw someone talking about it here? |
16:45:26 | PMunch | Ah, found it on the forum |
16:45:33 | Yardanico | https://forum.nim-lang.org/t/6132 |
16:45:35 | Yardanico | ye |
16:45:36 | * | s87651[m] joined #nim |
16:45:45 | * | qwertfisch joined #nim |
16:45:47 | Yardanico | we really need a feature to pin important threads on top of the forum :P |
16:46:29 | Yardanico | oh wait https://github.com/nim-lang/nimforum/pull/229 got merged, so I hope we'll also have categories soon |
16:50:24 | FromGitter | <alehander92> Yardanico does gdb work for you now |
16:50:30 | Yardanico | just fyi the forum frontend is still running the version compiled by nim 0.18.1 |
16:50:39 | Yardanico | (https://forum.nim-lang.org/js/forum.js) |
16:50:54 | Yardanico | @alehander92 I didn't really test it since I don't really use GDB anyway, I just was curious back then |
16:50:58 | FromGitter | <alehander92> btw guys what about async lifetimes: something that async functions can check cooperatively to know if they need to drain themselves |
16:51:00 | Yardanico | I might test it now though |
16:51:06 | FromGitter | <alehander92> i guess thats like cancellation |
16:54:18 | * | Guest46925 quit (Ping timeout: 256 seconds) |
16:54:41 | * | dadada joined #nim |
16:55:03 | * | dadada is now known as Guest80430 |
17:03:32 | PMunch | alehander42, you can pass in a distinct boolean as a cancellation token |
17:05:45 | shashlick | are `typedef struct X` or `typedef struct X {}` valid C? |
17:07:18 | Yardanico | https://en.wikipedia.org/wiki/Typedef#Examples |
17:07:28 | Yardanico | oh wrong link |
17:08:18 | * | Demos[m] joined #nim |
17:08:18 | * | reversem3 joined #nim |
17:08:18 | * | watzon joined #nim |
17:08:18 | * | k0mpjut0r joined #nim |
17:08:18 | * | unclechu joined #nim |
17:08:19 | * | khanate[m]0 joined #nim |
17:08:19 | * | leorize[m] joined #nim |
17:08:19 | * | salotz[m] joined #nim |
17:08:19 | * | lqdev[m] joined #nim |
17:08:19 | * | GitterIntegratio joined #nim |
17:08:19 | * | planetis[m] joined #nim |
17:08:20 | * | BitPuffin joined #nim |
17:08:24 | * | chris2020[m] joined #nim |
17:08:25 | * | grantmwilliams joined #nim |
17:08:25 | * | sendell[m] joined #nim |
17:08:25 | * | vycb[m] joined #nim |
17:08:26 | * | d-nice2[m] joined #nim |
17:08:28 | * | skrylar[m] joined #nim |
17:08:32 | * | pqflx3[m] joined #nim |
17:10:40 | * | jjido joined #nim |
17:11:49 | FromGitter | <sealmove> wow, for inheritance order of declaration in type section is significant |
17:12:24 | FromDiscord | <clyybber> yeah, and for sets of enums too, but thats a bug |
17:12:44 | FromDiscord | <clyybber> sealmove: Do you mean you cant inherit from a type that you havent yet defined? |
17:14:15 | FromGitter | <sealmove> yes, but I thought order under the same type section wasn't important. for example you can define a type that has another type (say X) as field and define X after it |
17:26:34 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:28:36 | FromGitter | <sealmove> Is is possible to make a destructor for a type that uses inheritance? |
17:29:35 | FromGitter | <sealmove> https://play.nim-lang.org/#ix=2g17 or https://play.nim-lang.org/#ix=2g18 don't work. |
17:30:17 | FromGitter | <sealmove> sorry https://play.nim-lang.org/#ix=2g1a * |
17:30:40 | Yardanico | I don't think you need "var" for a "ref object" |
17:31:00 | Yardanico | but I don't really know about using destructors with ref objs :) |
17:32:15 | FromGitter | <sealmove> `=destroy` only accepts var parameter |
17:32:27 | leorize | https://play.nim-lang.org/#ix=2g1c |
17:33:57 | leorize | @sealmove: ^ you gotta test it though :P |
17:33:59 | FromGitter | <sealmove> wow leorize nice! what's the difference between `A = ref AObj` and `A = ref object of AObj`? |
17:34:38 | leorize | it's `ref T` vs `a ref object inherited from AObj` :) |
17:36:13 | leorize | @sealmove: I'm not sure if `=destroy` is inherited, so you gotta verify if that's the case |
17:36:23 | leorize | I'd recommend using devel because it has more fixes |
17:37:01 | * | clyybber quit (Quit: WeeChat 2.8) |
17:37:40 | FromGitter | <sealmove> I'm using devel anyway |
17:39:50 | FromGitter | <sealmove> this should work, but doesn't? what am I missing? https://play.nim-lang.org/#ix=2g1e |
17:41:56 | * | a_b_m joined #nim |
17:42:10 | leorize | @sealmove: it does work if you use arc |
17:42:17 | leorize | looks like an stdlib bug |
17:42:26 | leorize | I mean compiler bug? |
17:42:28 | * | a_b_m quit (Client Quit) |
17:42:43 | FromGitter | <sealmove> I see |
17:42:51 | leorize | it won't work if you try it with B though, so maybe a bug report for that too |
17:43:32 | FromGitter | <sealmove> I am sure Araq knows that ref objs don't work with destructors |
17:43:45 | leorize | a bug report never hurts |
17:44:02 | FromDiscord | <clyybber> hey |
17:44:13 | FromDiscord | <clyybber> ref objects should work with destructors |
17:44:30 | FromDiscord | <clyybber> but you need to define =destroy on the "dereffed" type |
17:44:32 | * | abm quit (Ping timeout: 246 seconds) |
17:44:50 | * | Guest80430 quit (Ping timeout: 256 seconds) |
17:44:59 | leorize | clyybber: they don't appear to be invoked for the --gc:refc |
17:45:12 | FromDiscord | <clyybber> ah |
17:45:13 | FromDiscord | <clyybber> yeah |
17:47:24 | * | Jjp137 joined #nim |
17:47:46 | FromGitter | <sealmove> which gc then? |
17:48:14 | FromDiscord | <clyybber> arc |
17:48:23 | leorize | it works if you use arc, however not across inheritance, so a bug should be filed for that |
17:48:32 | * | dadada joined #nim |
17:48:55 | * | dadada is now known as Guest21968 |
17:49:00 | FromGitter | <sealmove> btw where can I see all the --gc: options? |
17:49:33 | FromGitter | <sealmove> https://nim-lang.org/docs/gc.html seems outdated |
17:49:33 | leorize | --fullhelp |
17:49:49 | leorize | https://nim-lang.github.io/Nim/gc |
17:50:14 | FromGitter | <sealmove> oh thanks, both very useful! |
17:58:01 | * | jjido joined #nim |
17:58:37 | FromGitter | <alehander92> PMunch yeah i guess i am doing something like that |
17:58:48 | FromGitter | <alehander92> but inside an object to have info like name |
17:59:20 | * | pbb quit (Remote host closed the connection) |
18:00:41 | * | pbb joined #nim |
18:02:29 | FromGitter | <alehander92> hey guys: if i decide to try to candidate for a talk for this online nim conf :D what would you want? 1) playing with a toy os with async primitives and "type checked" function-like processes 2) some kind of thing about our debugger env project 3) gara/pattern matching |
18:05:05 | * | pbb quit (Excess Flood) |
18:05:55 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:08:02 | FromGitter | <alehander92> btw why isnt rawWriteStackTrace public |
18:09:18 | * | pbb joined #nim |
18:10:38 | * | Yardanico quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
18:10:55 | * | Yardanico joined #nim |
18:11:54 | * | abm joined #nim |
18:11:57 | * | Yardanico quit (Client Quit) |
18:12:30 | * | Guest21968 quit (Ping timeout: 256 seconds) |
18:14:41 | * | Yardanico joined #nim |
18:18:23 | * | Yardanico quit (Client Quit) |
18:18:40 | * | dadada__ joined #nim |
18:19:31 | * | Yardanico joined #nim |
18:32:44 | * | Kaivo quit (Quit: turning off vpn) |
18:33:26 | * | tefter quit (Quit: WeeChat 2.7.1) |
18:35:37 | * | Kaivo joined #nim |
18:37:12 | Araq | alehander92: 1 or 2 or both :-) |
18:41:38 | * | couven92 joined #nim |
18:42:38 | * | ldlework joined #nim |
18:42:47 | * | dadada__ quit (Ping timeout: 260 seconds) |
18:44:51 | FromDiscord | <ksandvik> If all this is recorded and published to YouTube, the more the better. |
18:45:31 | FromGitter | <alehander92> love it! |
18:47:06 | FromGitter | <alehander92> btw async cancellation: how hard is it to add this |
18:48:02 | FromGitter | <alehander92> i am interested in just being able to `.cancel()` a future and recursively cancel children but maybe this is somehow related to destructors |
18:48:21 | FromGitter | <alehander92> maybe thats what i heard last time, sorry for not remembering |
18:48:30 | * | jjido joined #nim |
18:48:42 | * | dadada joined #nim |
18:49:06 | * | dadada is now known as Guest55387 |
18:52:30 | narimiran | @alehander92: all three, pretty please |
18:58:15 | liblq-dev | is there *any* way besides procCall that a base method could be called instead of an inherited method? |
18:58:34 | Araq | hardly, what's wrong with proccall |
18:58:38 | * | mwbrown quit (Quit: Exiting) |
18:59:01 | liblq-dev | nothing, it's just that for some strange reason a base method is called where a child method should be |
18:59:31 | Araq | then you failed to "override" the base method |
18:59:44 | liblq-dev | right *here* in fact: https://github.com/liquid600pgm/rdgui/blob/master/src/rdgui/control.nim#L49 |
18:59:50 | liblq-dev | it works everywhere except in this proc |
19:00:04 | liblq-dev | the method is ctrl.width |
19:00:27 | liblq-dev | (and ctrl.height too, but let's keep it down to one method because the issue is likely the same) |
19:02:11 | Araq | strange, are you sure the Control is a Box? |
19:02:19 | Araq | you can check via the 'of' operator |
19:03:52 | * | mwbrown joined #nim |
19:04:43 | liblq-dev | it's a Button, which is correct. |
19:05:17 | liblq-dev | I checked via `ctrl of Button`, as you suggested |
19:07:41 | Araq | well I only looked at the Box's width declaration |
19:07:45 | Araq | where is Button's? |
19:08:08 | liblq-dev | it's in a different file, https://github.com/liquid600pgm/rdgui/blob/master/src/rdgui/button.nim#L17 |
19:09:57 | Araq | liblq-dev, you used 'proc' and not 'method' ;-) |
19:10:08 | liblq-dev | oh crap |
19:10:13 | liblq-dev | thanks |
19:10:25 | * | luis_ joined #nim |
19:10:40 | liblq-dev | man, I wonder why bugs like this happen to me. every. single. time. |
19:15:15 | * | luis_ quit (Remote host closed the connection) |
19:15:49 | * | luis_ joined #nim |
19:15:51 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:19:53 | Araq | liblq-dev, ask for linting support |
19:20:01 | Araq | the compiler could issue a warning |
19:22:21 | rayman22201 | alehander92 Chronos has promises with cancel. Maybe investige switching async frameworks? |
19:27:06 | * | luis_ quit (Ping timeout: 246 seconds) |
19:30:31 | leorize | so is chronos the to-go framework now? |
19:44:48 | FromGitter | <alehander92> rayman22201 but i dont want a split |
19:47:08 | * | rockcavera quit (Remote host closed the connection) |
19:55:18 | FromGitter | <zetashift> @dom96 are you still using SFML for your Nim games? |
19:56:01 | * | rockcavera joined #nim |
19:56:16 | FromGitter | <alehander92> narimiran no, thats a bit much :D |
20:05:20 | dom96 | zetashift: only for Ludum Dare, currently using sdl for my new game |
20:18:05 | * | narimiran quit (Ping timeout: 265 seconds) |
20:19:52 | FromGitter | <zetashift> ah okay |
20:31:04 | * | luis_ joined #nim |
20:31:26 | * | jjido joined #nim |
20:34:19 | * | qbradley quit (Quit: WeeChat 2.6) |
20:34:27 | * | qbradley joined #nim |
20:37:55 | * | filcuc joined #nim |
20:45:40 | * | PMunch quit (Quit: leaving) |
20:47:10 | * | s87651[m] quit (Quit: Idle for 30+ days) |
20:47:15 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
21:02:09 | * | abm quit (Quit: Leaving) |
21:16:25 | * | filcuc quit (Ping timeout: 264 seconds) |
21:18:59 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:21:49 | * | Vladar quit (Quit: Leaving) |
21:23:34 | * | moerm joined #nim |
21:24:16 | moerm | Hello. I'm trying my irc client for the first time and hope it works/you can see me |
21:24:26 | Yardanico | moerm: yeah, I can see you :P |
21:24:36 | moerm | Thanks. |
21:25:15 | moerm | I'm stupid with those messenger/chat thingies. discord fails to send the verif. email so I had to try irc |
21:26:09 | moerm | I see the same content/discussion as on discord here, right? |
21:26:16 | FromDiscord | <ksandvik> Yes. |
21:26:18 | leorize | yes |
21:26:18 | * | ksandvik joined #nim |
21:26:33 | leorize | with a perk of being able to ping people with tab-completion :P |
21:27:31 | moerm | Thanks (whatever "pinging" means on irc ...). I'm grateful for everybodies hand holding/help |
21:28:27 | leorize | pinging on irc is just typing out their name :) |
21:28:51 | moerm | So, it's like tab completion in the shell? Nice. |
21:29:15 | moerm | afk (some minutes) |
21:29:43 | ksandvik | AFAIK you can't see all the previous conversations in irc unlike Discord but you could use https://irclogs.nim-lang.org |
21:32:27 | * | rockcavera quit (Remote host closed the connection) |
21:34:32 | * | moerm_ joined #nim |
21:35:22 | * | chris2020[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
21:35:26 | * | pqflx3[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
21:35:27 | * | d-nice2[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
21:35:27 | * | vycb[m] quit (Quit: Idle for 30+ days) |
21:35:28 | * | grantmwilliams quit (Quit: Idle for 30+ days) |
21:35:50 | * | ksandvik quit (Quit: Leaving.) |
21:36:12 | FromGitter | <deech> Is this correct behavior for NimScript's `thisDir`? https://play.nim-lang.org/#ix=2g2V |
21:36:51 | * | moerm quit (Ping timeout: 250 seconds) |
21:36:59 | FromGitter | <deech> In the above example even though `proc test ...` is in `/tmp/a` because it is imported by `/tmp/b/b.nims` `thisDir` prints `/tmp/b`. |
21:37:26 | leorize | sounds like a bug |
21:37:55 | FromGitter | <deech> Great. Thanks. And is that the right way to import a nims file? |
21:38:08 | FromGitter | <deech> It seems to do that same as `include`. |
21:39:00 | leorize | usually we just write nim code then import it as usual |
21:39:14 | leorize | (ie. put them in .nim files) |
21:40:09 | FromGitter | <deech> How would you import a nim module in a relative directory? `import ../a/a`? |
21:40:17 | Araq | yeah |
21:40:19 | FromDiscord | <Rika> yeah |
21:40:51 | Araq | leorize: hmmm not sure if I consider it a bug but tbh I don't know its documentation |
21:41:52 | FromGitter | <deech> Changed `/tmp/a/a.nims` to `/tmp/a/a.nim` and `import "../a/a.nims"` to `import ../a/a`. Same result. |
21:43:52 | leorize | Araq: looks like not a bug? https://github.com/nim-lang/Nim/blob/1d665adecde3b3bf16e64068e83c0b3cb0171856/lib/system/nimscript.nim#L312 |
21:43:58 | Araq | "Retrieves the directory of the current ``nims`` script file" |
21:44:06 | leorize | or maybe :p |
21:44:29 | * | tane quit (Quit: Leaving) |
21:44:52 | Araq | works as documented, you cannot really have multiple .nims files |
21:45:05 | Araq | there is only the .nims file that NimScript executes |
21:45:32 | FromGitter | <deech> Where does it say you can't have multiple nims files? |
21:45:33 | leorize | well they mentioned renaming the imported module to .nim, still same result |
21:47:03 | FromGitter | <deech> And if that's true why is `import` supported in `nims` files? |
21:47:33 | Araq | you named your other nim modules as .nims but that doesn't mean anything, you can also name them module.txt and 'import "module.txt" ' |
21:47:36 | FromGitter | <deech> Oh wait, so the idea is that you have a single nims file that import multiple `nim` files? |
21:47:49 | Araq | exactly |
21:48:39 | FromGitter | <deech> Ah, ok makes sense. Then the second case where I changed a.nims -> a.nim and it still did the same thing is a bug, yes? |
21:49:36 | Araq | I doubt it |
21:50:22 | Araq | the compiler knows best what "the current nims script file" is |
21:50:43 | Araq | could not import: X509_check_host |
21:50:48 | Araq | gah |
21:50:56 | leorize | more openssl issues :) |
21:52:09 | * | silvernode joined #nim |
21:53:46 | Araq | already solved it |
21:55:07 | FromGitter | <deech> Suggest adding to the no-multiple Nims files somewhere in the docs. |
21:56:06 | Araq | noted |
22:03:07 | * | rockcavera joined #nim |
22:04:57 | shashlick | has anyone made an easy azure pipelines or github actions setup for testing nim libraries across multiple versions? |
22:05:58 | * | fredrik92 joined #nim |
22:07:13 | * | rnrwashere joined #nim |
22:09:15 | * | couven92 quit (Ping timeout: 265 seconds) |
22:09:33 | * | rnrwashere quit (Remote host closed the connection) |
22:10:23 | * | Trustable quit (Remote host closed the connection) |
22:18:46 | * | natrys quit (Quit: natrys) |
22:19:17 | * | solitudesf quit (Ping timeout: 246 seconds) |
22:26:05 | * | fredrik92 is now known as couven92 |
22:28:39 | * | Jesin quit (Quit: Leaving) |
22:30:21 | * | rnrwashere joined #nim |
22:32:55 | * | Jesin joined #nim |
22:37:45 | blackbeard420 | is db_postgres threadsafe? i assume it is since DbConn just wraps a PGconn* |
22:37:57 | Araq | yeah |
22:40:27 | * | rnrwashere quit () |
22:47:57 | * | Guest55387 is now known as dadada |
22:51:50 | * | bunbunbunbunny joined #nim |
22:54:34 | moerm_ | Araq How can I get and build drnim to have a closer look and play with it (and hopefully can make some sensible remarks/suggestions)? |
22:59:46 | * | luis_ quit (Ping timeout: 240 seconds) |
23:08:49 | moerm_ | Araq - still here? |
23:12:50 | leorize | he is rather busy with his work, so I won't expect answer to come out immediately :P |
23:13:03 | * | dadada quit (Ping timeout: 265 seconds) |
23:13:17 | moerm_ | Thx |
23:14:07 | leorize | what I do know however, is that you can test this out by cloning the araq-doctornim branch |
23:14:28 | leorize | the tool can be built using `koch drnim` |
23:16:25 | * | silvernode quit (Ping timeout: 264 seconds) |
23:16:30 | moerm_ | I don't know git well. Could you give me a link to that branch, please? |
23:16:49 | moerm_ | (that I can put behind "git clone") |
23:17:26 | leorize | if you already cloned Nim, then just get in the folder, run: git pull; git checkout araq-doctornim |
23:18:26 | moerm_ | Thanks, I'll try that. And when I did that I use 'koch drnim'? |
23:18:38 | moerm_ | (sorry but we use only fossil) |
23:18:42 | * | dadada joined #nim |
23:18:57 | leorize | after you have checked out the branch, build koch |
23:19:00 | leorize | run nim c koch |
23:19:05 | * | dadada is now known as Guest29536 |
23:19:11 | leorize | then run ./koch drnim |
23:19:21 | moerm_ | OK, thx. |
23:21:55 | * | bunbunbunbunny quit (Quit: leaving) |
23:23:35 | moerm_ | Yuck, it clones and builds Z3 again (I already have it and it's not a small build). Oh well, git ... |
23:26:00 | moerm_ | - afk for a while - (but I will look later for new messages) |
23:33:18 | moerm_ | ... /Nim/compiler/vmops.nim(105, 10) Error: cannot open file: std/compilesettings |
23:33:53 | leorize | try bootstraping the compiler first |
23:33:57 | leorize | ./koch boot -d:release |
23:34:01 | leorize | then do drnim |
23:37:41 | * | moerm__ joined #nim |
23:37:42 | moerm__ | OK. Thx |
23:38:08 | moerm__ | Same error |
23:39:10 | moerm__ | (I'm in ... git/Nim created by cloning Nim) |
23:41:10 | * | moerm_ quit (Ping timeout: 256 seconds) |
23:42:38 | * | Guest29536 quit (Ping timeout: 256 seconds) |
23:48:38 | * | dadada joined #nim |
23:49:03 | * | dadada is now known as Guest2172 |
23:51:06 | * | krux02_ joined #nim |
23:53:41 | * | krux02 quit (Ping timeout: 252 seconds) |
23:55:20 | * | dwdv quit (Ping timeout: 256 seconds) |