xentropy
MModular
•Created by xentropy on 8/27/2024 in #questions
mojo-lsp-server crashing
Is it crashing for anybody else? I'm using it with neovim and I can reliably make it crash after a couple of minutes of using it.
35 replies
MModular
•Created by xentropy on 8/9/2024 in #questions
Is this broken or is it me? Parameterized function alias...
The error is:
Basically, I need to use pattern of make_buffer_sad because I am using FFI to write a wrapper around lgpio...
15 replies
MModular
•Created by xentropy on 8/3/2024 in #questions
Interfaces or Abstract Classes
I am learning the language, coming from .NET and Python. I am trying to implement a feature that is only aware of the of signature of another feature, and isn't concerned with its implementation details. Naturally, I reached for the traits system, but hit a brick wall because I found out you can't specify the return type of a function to be a trait, and I don't think you can specify a variable's type to be a trait either. I got partly around this writing a function that takes in the trait... I'm probably not making a ton of sense. Suppose I have feature A, that I want to be swappable at runtime with feature B based on a runtime configuration. Traditionally I would do this with interfaces, and traits seem like the closest thing. Is there a way to do this in Mojo?
7 replies