Live data from Hacker News

How I Built Zig-SQLite

rischmann.fr

1–10 of 104 posts

Re: How I Built Zig-SQLite

#2
This looks really neat and handy especially the type annotations part. I always got frustrated when accidentally putting the wrong type into a column.

How's the Language Server support for this? Last time I tried ZLS, it was quite well rounded so I am curious to know if this type annotations would work with it or not. Would be really cool if they do.

I have never been able to fully adopt zig due to how frustrating working with strings is but I absolutely loved the comptime functionality.

Re: How I Built Zig-SQLite

#3
post #2

This looks really neat and handy especially the type annotations part. I always got frustrated when accidentally putting the wrong type into a column. How's the Language Server support for this? Last time I tried ZLS, it was quite well rounded so I am curious to know if this type annotations would work with it or not. Would be really cool if they do. I have never been able to fully adopt zig due to how frustrating wo…

ZLS currently does not run any comptime code as far as i know

It would be cool to have an official Zig language server that can do it

Re: How I Built Zig-SQLite

#4
post #3
post #2

This looks really neat and handy especially the type annotations part. I always got frustrated when accidentally putting the wrong type into a column. How's the Language Server support for this? Last time I tried ZLS, it was quite well rounded so I am curious to know if this type annotations would work with it or not. Would be really cool if they do. I have never been able to fully adopt zig due to how frustrating wo…

ZLS currently does not run any comptime code as far as i know It would be cool to have an official Zig language server that can do it

I think the only real way you can run make a language server understand comptime code is using the compiler as a library, similar to how Nim does it - nimsuggest (the tool for autocompletion, definitions, etc) is basically the compiler itself with some nimsuggest-specific stuff, so it understand macros, templates, compile time code evaluation, etc.

Re: How I Built Zig-SQLite

#5
post #4
post #3

Earlier quoted context omitted.

ZLS currently does not run any comptime code as far as i know It would be cool to have an official Zig language server that can do it

I think the only real way you can run make a language server understand comptime code is using the compiler as a library, similar to how Nim does it - nimsuggest (the tool for autocompletion, definitions, etc) is basically the compiler itself with some nimsuggest-specific stuff, so it understand macros, templates, compile time code evaluation, etc.

Isn't that's how most LSP servers are implemented? I'm only vaguely familiar with clangd.

Re: How I Built Zig-SQLite

#6
post #3
post #2

This looks really neat and handy especially the type annotations part. I always got frustrated when accidentally putting the wrong type into a column. How's the Language Server support for this? Last time I tried ZLS, it was quite well rounded so I am curious to know if this type annotations would work with it or not. Would be really cool if they do. I have never been able to fully adopt zig due to how frustrating wo…

ZLS currently does not run any comptime code as far as i know It would be cool to have an official Zig language server that can do it

from what i understood, that is what they are planning to do, have an official built in language server

Re: How I Built Zig-SQLite

#8
post #2

This looks really neat and handy especially the type annotations part. I always got frustrated when accidentally putting the wrong type into a column. How's the Language Server support for this? Last time I tried ZLS, it was quite well rounded so I am curious to know if this type annotations would work with it or not. Would be really cool if they do. I have never been able to fully adopt zig due to how frustrating wo…

zls doesn't support this unfortunately. I don't know what the plans are for comptime support.

Re: How I Built Zig-SQLite

#10
Cool article.

I can't figure out why i am supposed to care about zig beyond it's fun? I get that it's interesting and more safe than C (honestly though what the hell isn 't).

Say you write rust pretty regularly for new product development, what does zig offer to make my life better, my products more stable, etc?

Post reply on HN