~smlavine

~smlavine/zm-devel

Last active 11 months ago

~smlavine/zm-announce

Last active 11 months ago

~smlavine/onclick-announce

Last active 1 year, 15 days ago

~smlavine/onclick-devel

Last active 1 year, 4 months ago

~smlavine/colat-devel

Last active 1 year, 9 months ago

~smlavine/colat-announce

Last active 1 year, 9 months ago

~smlavine/err-announce

Last active 2 years ago

~smlavine/bf-announce

Last active 2 years ago

~smlavine/bf-devel

Last active 2 years ago

~smlavine/globalregularexpressionprint-devel

Last active 2 years ago
View more

Recent activity

Re: [PATCH v2 hare-sqlite 0/5] Update for latest hare a day ago

From Sebastian LaVine to ~blainsmith/public-inbox

On Wed Apr 16, 2025 at 3:16 PM EDT, Sebastian LaVine wrote:
> Includes one breaking change for sqlite::open.
>
> Sebastian LaVine (5):
>   Remove sqlite/results.ha
>   Handle nomem on stdlib allocation functions
>   demo: Use in-memory database instead
>   Pass LIBS on to `hare test`
>   Open database with path::buffer, not str
>
>  Makefile            |  4 ++--
>  cmd/demo/main.ha    |  2 +-
>  sqlite/+test.ha     | 18 ++++++++++++++++++
>  sqlite/handle.ha    | 22 ++++++++++++++++------

Re: stdlib modules missing README documentation 2 days ago

From Sebastian LaVine to ~sircmpwn/hare-dev

On Tue Apr 22, 2025 at 3:08 AM EDT, Drew DeVault wrote:
> Pushed a commit which documents the modules from this list which ought
> to be documented.

Thanks!

stdlib modules missing README documentation 4 days ago

From Sebastian LaVine to ~sircmpwn/hare-dev

The following modules in the stdlib are missing a README file, leaving
them undocumented by haredoc and docs.harelang.org:

- hare::unit
- linux::vdso
- net::ip
- net::tcp
- net::udp
- test
- unix::hosts
- unix::passwd

A todo for this should be made.

[PATCH v2 hare-sqlite 5/5] Open database with path::buffer, not str 9 days ago

From Sebastian LaVine to ~blainsmith/public-inbox

This allows us to avoid an allocation NUL-terminating a str, as a
path::buffer is guaranteed to be NUL-terminated.

This is also more platform-independent anyway.

A special new sqlite::memory type is added to indicate the use of the
SQLite in-memory ":memory:" database. This isn't really a path, so it
wouldn't make sense for a user to create this with path::init(":memory:").

New tests are added to test basic open() functionality in both cases.
---
 cmd/demo/main.ha |  2 +-
 sqlite/+test.ha  | 18 ++++++++++++++++++
 sqlite/handle.ha | 18 +++++++++++++-----
[message trimmed]

[PATCH v2 hare-sqlite 4/5] Pass LIBS on to `hare test` 9 days ago

From Sebastian LaVine to ~blainsmith/public-inbox

Enables testing that uses sqlite functions.
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 2b74976..d2d6c95 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ all:
	true # no-op

check:
	$(HARE) test
[message trimmed]

[PATCH v2 hare-sqlite 2/5] Handle nomem on stdlib allocation functions 9 days ago

From Sebastian LaVine to ~blainsmith/public-inbox

This takes advantage of the SQLite bytelen parameter to avoid allocation
in bind_str() and prepare().
---
For consistency adds nomem for open() despite changes in 5/5.

 sqlite/handle.ha    | 10 ++++++----
 sqlite/statement.ha | 37 +++++++++++++++++++++++++++----------
 2 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/sqlite/handle.ha b/sqlite/handle.ha
index 9eeb36d..26e63a1 100644
--- a/sqlite/handle.ha
+++ b/sqlite/handle.ha
@@ -10,8 +10,9 @@ export type handle = struct {
[message trimmed]

[PATCH v2 hare-sqlite 3/5] demo: Use in-memory database instead 9 days ago

From Sebastian LaVine to ~blainsmith/public-inbox

Previously the demo would fail on multiple runs because the users table
already existed.
---
 cmd/demo/main.ha | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/demo/main.ha b/cmd/demo/main.ha
index b7b3342..bdeb2ea 100644
--- a/cmd/demo/main.ha
+++ b/cmd/demo/main.ha
@@ -2,7 +2,7 @@ use fmt;
use sqlite;

export fn main() void = {
[message trimmed]

[PATCH v2 hare-sqlite 1/5] Remove sqlite/results.ha 9 days ago

From Sebastian LaVine to ~blainsmith/public-inbox

Leftover from f744878d8 ("update for hare 0.24.2").
---
 sqlite/results.ha | 15 ---------------
 1 file changed, 15 deletions(-)
 delete mode 100644 sqlite/results.ha

diff --git a/sqlite/results.ha b/sqlite/results.ha
deleted file mode 100644
index b28b1e0..0000000
--- a/sqlite/results.ha
@@ -1,15 +0,0 @@
def SQLITE_OK: int = 0;
def SQLITE_ROW: int = 100;
[message trimmed]

[PATCH v2 hare-sqlite 0/5] Update for latest hare 9 days ago

From Sebastian LaVine to ~blainsmith/public-inbox

Includes one breaking change for sqlite::open.

Sebastian LaVine (5):
  Remove sqlite/results.ha
  Handle nomem on stdlib allocation functions
  demo: Use in-memory database instead
  Pass LIBS on to `hare test`
  Open database with path::buffer, not str

 Makefile            |  4 ++--
 cmd/demo/main.ha    |  2 +-
 sqlite/+test.ha     | 18 ++++++++++++++++++
 sqlite/handle.ha    | 22 ++++++++++++++++------
 sqlite/results.ha   | 15 ---------------

Re: [PATCH hare-sqlite 2/2] Handle nomem on stdlib allocation functions 9 days ago

From Sebastian LaVine to ~blainsmith/public-inbox

On Wed Apr 16, 2025 at 10:14 AM EDT, Blain Smith wrote:
> No problem! Thanks for the work you're doing here.
>
>
> On Mon, Apr 14, 2025 at 4:27 PM Sebastian LaVine <mail@smlavine.com> wrote:
>>
>> Actually, disregard this -- on further research, we should be able to
>> use the types::c::unterminatedstr + the provided byte length parameter
>> in bind_text and prepare_v2 to avoid allocation for NUL-termination.
>>
>> Expect a v2.
>>
>> On Mon Apr 14, 2025 at 10:49 AM EDT, Sebastian LaVine wrote:
>> > An alternative approach would be to roll nomem into sqlite::error, but I