toasty
MModular
•Created by Hammad Ali on 11/10/2024 in #questions
Struct containing a list of itself?
Try list[arc[self]] instead, that’s what I use for a CLI library!
5 replies
MModular
•Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
Great job with the speed improvements! @a2svior @bgreni
70 replies
MModular
•Created by aurelian on 10/19/2024 in #questions
Not sure why these strings are missing the last char
Yeah! I try to use string slice where I can too
16 replies
MModular
•Created by aurelian on 10/19/2024 in #questions
Not sure why these strings are missing the last char
Yeah, automating it would be nice. I’ve shot myself in the foot plenty of times while missing the null terminator
16 replies
MModular
•Created by aurelian on 10/19/2024 in #questions
Not sure why these strings are missing the last char
I don’t like the null terminator shenanigans for strings either lol
16 replies
MModular
•Created by aurelian on 10/19/2024 in #questions
Not sure why these strings are missing the last char
Try constructing a list from the span, and append a 0 to it. Then create the string from that list
16 replies
MModular
•Created by aurelian on 10/19/2024 in #questions
Not sure why these strings are missing the last char
My guess is that the span is being converted to a list, and that’s being used for the string construction. If that Span’s last element is not a null terminator, then you’d see the clipping that you are now
16 replies
MModular
•Created by aurelian on 10/19/2024 in #questions
Not sure why these strings are missing the last char
Probably missing the null terminator
16 replies
MModular
•Created by toasty on 10/2/2024 in #community-showcase
Mojo Termios bindings
Thank you! Taking baby steps towards building terminal based applications in Mojo
3 replies
MModular
•Created by sazid on 9/28/2024 in #questions
How to get unix timestamp?
There’s also a datetime module in the forge-tools repo that @Martin Vuyk put a lot of time into!
23 replies
MModular
•Created by sazid on 9/28/2024 in #questions
How to get unix timestamp?
Functionally, they’re very much the same. I did a bit of reorganization and cleanup of the code, but they both use libc calls in the same way.
23 replies
MModular
•Created by toasty on 5/12/2024 in #community-showcase
Mog: Style definitions for nice terminal layouts (inspired by charmbracelet/lipgloss)
4 replies
MModular
•Created by Tyoma Makeev on 9/8/2024 in #questions
What's the thing with global variables?
They’ve said that it results in undefined behavior, so it’s not really supported at this time. Hopefully soon! You can define top level constants using alias though
6 replies
MModular
•Created by Caroline on 9/5/2024 in #community-showcase
Modverse #42 is out!
@Caroline I’m here on discord too!
13 replies
MModular
•Created by mad alex 1997 on 8/28/2024 in #community-showcase
NuMojo V0.2 Release: Simplified Type Handling, New Features, and Enhanced Compatibility
I've had some luck with rattler build and using prefix to host conda packages if you're interested, you're able to set up dependencies and have them installed along with your package via magic install.
I created this channel to share later for whomever was interested. Waiting for Mojo 24.5 so things stabilize a little bit.
https://prefix.dev/channels/mojo-community
5 replies
MModular
•Created by toasty on 8/28/2024 in #questions
Usage of mojo test
Ah gotcha, thanks! I’ll give it a try with the mojopkg file, that’s usually how I test in automation but I didn’t get that far this time. Might just wait until mojo test is improved a bit though, mojo-pytest has been working well so far!
11 replies
MModular
•Created by toasty on 8/14/2024 in #community-showcase
Reading from stdin
Just pulled in the latest version of nightly, I see the updates there!
17 replies
MModular
•Created by toasty on 8/14/2024 in #community-showcase
Reading from stdin
Awesome, that’s great to hear!
17 replies
MModular
•Created by toasty on 8/14/2024 in #community-showcase
Reading from stdin
I opened up a PR to add the stdin struct and input function, any help on fixing up the tests would be awesome! 😄 https://github.com/modularml/mojo/pull/3392
17 replies
MModular
•Created by toasty on 8/14/2024 in #community-showcase
Reading from stdin
Any thoughts on where a struct like this should live? I defaulted to dropping it in sys like python, but would builtin.io be preferable?
17 replies