How do I open files to read/write in Mojo?
I want to do the equivalent of the following Python code:
```
with open(file.txt, 'r') as file:
x = file.read()...
Is struct inheritance implemented yet?
Can I make a struct inherit from another? For example can I take an Array that allows all types and make an inherited array that specializes in a singular type?
What I imagine doing (gets a compiler issue):
```mojo
struct Example[T: AnyType]:...
How to store PythonObject in DynamicVector?
I'm trying the following:
```
let module = Python.import_module("my_module")
let dv = DynamicVectorPythonObject
let result = my_module.my_func()...
Mojo Not Found in CLI
After I installed mojo via modular, it says installed but it's not pre-configured in the environment path.
How do we import and use something like flask
Attempting to replicate this snippet of Flask/Python code in Mojo:
```python
from flask import Flask
app = Flask(name)...
Check types
How to check a type of a variable?
raises an error
also raises an error
I was only able to print the types using:...
type(x)
type(x)
isinstance(1, Int)
isinstance(1, Int)

Error with method append with string
When im try use List for string a get error
...
fn main() raises:
let list = List[String]()
list.append("123")
fn main() raises:
let list = List[String]()
list.append("123")
Python bug
When trying to install it in my Pika OS:
```
brito@AuroraBorealisWorkstation:~$ curl https://get.modular.com | MODULAR_AUTH=[redacted] sh - | distro=pika version=23.04 codename=lunar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed...
How to use `raises`
What does the
raises keyword do for error handling, how do I use it, and what does it returns if the function fails? All I could in the docs was "Both support raising exceptions, but this must be explicitly declared on a fn with the raises keyword." If its for raising exceptions, how do I do this properly?When (if ever) can we expect arbitrary target support?
In Zig you can choose almost any target triple you need and it works, cross compilation is trivial too. Currently Mojo does not allow this, rejecting most targets - is this just a temporary limitation or is every target going to require patches to the compiler like Swift? Rust is also not that great here requiring installation of a separate toolchain for each target if I remember correctly.
Will Mojo be a "true" systems programming language?
Will you be able to create things like device drivers or even operating systems like you can in Rust?
Will imported python modules eventually be compiled by Mojo instead of relying on the python env?
I understand that currently imported python packages run on the CPython interpreter which will require a compiled Mojo program to run with the same python environment in which it was complied (same installed packages etc).
Will the need for this go away once Mojo is a true superset of Python. IOW, will the imported python module get complied just as if the Python code was written directly in the Mojo program?...
memory leak with DynamicVector
What is the right way to avoid memory leaks? From docs we see that DynamicVector doesnβt call elements destructors. Decorators supposed to create destructor but as far as I can tell you canβt use it manually. So what is the proper way to clean up in the and of the each step in the cycle?
`
from utils.vector import DynamicVector...
binary file size
In the first community live stream on youtube at around 36 minutes, Chris Lattner mentions "hello world it's 20K" which I understand means that the binary size of a hello world example could be as low as 20kb.
If I
mojo build hello_world.π₯ on linux I get a 1.7MB binary. How can I reduce that binary size?
Is that 20k a target that should be achievable later? Is it calculated without the runtime that is bundled in the binary? Do I need to enable some kind of optimization?...Support for Linux is only Ubuntu
Curious what's so special about Ubuntu that it's the only Linux distro that can be supported at the current time?
Plans for a package manager?
Are there any plans to implement a package manager for mojo like pip/pypi, nuget, npm, etc?