~fancycade

~fancycade/public-inbox

Last active 13 days ago
View more

Recent activity

Testing Himalaya 13 days ago

From to ~fancycade/public-inbox

Does this work?

Testing Himalaya again 19 days ago

From to ~fancycade/public-inbox

open source is cool

Re: [PATCH] Implement version_compare method for string 20 days ago

From to ~lattis/muon

Oops, didn't mean to make a new thread.

[PATCH] Implement version_compare method for string 20 days ago

From Harley Swick to ~lattis/muon

---
 include/functions/string.h  |   4 +
 src/functions/string.c      | 197 ++++++++++++++++++++++++++++++++++++
 tests/meson.build           |   1 +
 tests/version_compare.meson |  16 +++
 4 files changed, 218 insertions(+)
 create mode 100644 tests/version_compare.meson

diff --git a/include/functions/string.h b/include/functions/string.h
index bb02602..429457c 100644
--- a/include/functions/string.h
+++ b/include/functions/string.h
@@ -8,6 +8,10 @@ enum format_cb_result {
	format_cb_error,
[message trimmed]

Re: [PATCH] Implement version_compare string method 20 days ago

From Harley Swick to ~lattis/muon

>
>Currently inside a function you can either call interp_error with the
>`args_node` that you are handed, or, if a specific argument is at fault,
>you can do `an[0].node` to get the node of that argument.  This usually
>means that support functions also need to get passed an `err_node`, i.e.
>the source location of errors.
>

Okay easy enough! I believe I got it working now. The error messages look
much better now:

```
/home/fc/projects/muon/tests/version_compare.meson:11:39: error: nondigit in version core: !1
 11 | assert(version_number.version_compare('!1.2.8!'))

Re: [PATCH] Implement version_compare string method 20 days ago

From to ~lattis/muon

I have a working version with your suggested changes, but I want to test
it a bit more. I also noticed some oddities with the error messages.

> 
> Just to clarify, you don't have to match the strange
> `'1.2.3'.version_compare('!1.2.3!') > == true` behavior, I was just
> pointing out something odd. I have found quite a few of these things
> since I started working on muon.
> 

Gotcha, well good thing muon is being made! muon will throw an invalid 
version string error on those cases.

This did bring up something about the error messages though. I'm noticing

Re: [PATCH] Implement version_compare string method 21 days ago

From to ~lattis/muon

Thanks for the great feedback!

> As for the rest of the function, I think the form looks good, but I
> wonder if you could remove some code duplication by using a function
> pointer for the comparison:
> 


Okay, good idea. This is pushing my limits of C fanciness :D. I should
be able to take your example and expand on it.


> 
> I checked meson's implementation[1], and it seems like they support a

[PATCH] Implement version_compare string method 22 days ago

From Harley Swick to ~lattis/muon

---

This does not implement comparing versions with pre-release or build tags.
That is something I would like to get to eventually, but I thought it best
to get feedback on current approach before I continued further on that.

 include/functions/string.h  |   4 +
 src/functions/string.c      | 256 ++++++++++++++++++++++++++++++++++++
 tests/meson.build           |   1 +
 tests/version_compare.meson |  12 ++
 4 files changed, 273 insertions(+)
 create mode 100644 tests/version_compare.meson

diff --git a/include/functions/string.h b/include/functions/string.h
[message trimmed]

[PATCH] Minor changes 22 days ago

From Harley Swick to ~lattis/muon

Typo fixes
Link to CONTRIBUTING.md on README
Add bootstrap/ to .gitignore
---
 .gitignore      | 2 +-
 CONTRIBUTING.md | 2 +-
 README.md       | 4 ++++
 src/tests.c     | 2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 22b284c..fd937c3 100644
--- a/.gitignore
+++ b/.gitignore
[message trimmed]

Testing Message Id a month ago

From Harley Swick to ~fancycade/public-inbox

I think this works


--
Best Regards,
Harley Swick