Skip to content

Commit

Permalink
Merge branch 'main' into simd-int-from-bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
msaelices authored Jan 30, 2025
2 parents 454d4f2 + 0e03d6e commit c69acd8
Show file tree
Hide file tree
Showing 21 changed files with 635 additions and 680 deletions.
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/dev_console_issue.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/ISSUE_TEMPLATE/modular_cli_issue.yaml

This file was deleted.

5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/mojo_bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,5 @@ body:
label: System information
description: What version of Mojo are you using?
value: |
- What OS did you install Mojo on?
- Provide version information for Mojo by pasting the output of `mojo -v`.
- Provide the Modular CLI version by pasting the output of `modular -v`.
- Provide the system information by running `magic info`.
- Provide version information for MAX (includes Mojo) by pasting the output of `magic list max`.
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Library, Mojo examples, or Mojo documentation. This page gives an overview of
the process. For a more detailed walkthrough, see
[How to contribute to the Mojo standard library: a step-by-step guide](https://www.modular.com/blog/how-to-contribute-to-mojo-standard-library-a-step-by-step-guide).

**Note:** Pull requests should be submitted against the `main` branch,
**Note:** Pull requests should be submitted against the `nightly` branch,
which represents the most recent nightly build.

### Pull request process
Expand Down Expand Up @@ -243,10 +243,10 @@ git fetch upstream

#### Branching off nightly

Make sure to branch off `main` to work on your PR:
Make sure to branch off `nightly` to work on your PR:

```bash
git checkout upstream/main
git checkout upstream/nightly
git checkout -b my-fix-pr
```

Expand All @@ -255,20 +255,20 @@ before raising a PR:

```bash
git fetch upstream
git rebase upstream/main
git rebase upstream/nightly
```

#### Getting the nightly Mojo compiler

Now that you're on the main branch, you need to install the latest nightly
Now that you're on the nightly branch, you need to install the latest nightly
build.

If you're using [`magic`](https://docs.modular.com/magic) (version 0.6.4 or
higher), create a new project environment like this and it will install the
latest nightly version of `max` by default:
If you're using [`magic`](https://docs.modular.com/magic), create a new
project environment with the `max-nightly` channel like this:

```bash
magic init mojo-nightly --format mojoproject
magic init mojo-nightly --format mojoproject \
-c conda-forge -c https://conda.modular.com/max-nightly
```

If you're [using conda](https://docs.modular.com/magic/conda), add the
Expand Down Expand Up @@ -299,7 +299,7 @@ when using the stable release!

If your change is one of the improvements described above or it has been
discussed and agreed upon by the project maintainers, please create a pull
request into the `main` branch.
request into the `nightly` branch.

First push your changes:

Expand All @@ -314,7 +314,7 @@ remote: Create a pull request for 'my-fix-pr' on GitHub by visiting:
remote: https://github.com/jackos/mojo/pull/new/my-fix-pr
```

Make sure you point it to the `main` branch:
Make sure you point it to the `nightly` branch:

![Base Branch](stdlib/docs/images/base-branch.png)

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ This repo includes source code for:

This repo has two primary branches:

- The [`stable`](https://github.com/modularml/mojo/tree/stable) branch, which
is in sync with the last stable released version of Mojo. Use the examples
here if you’re using a [release build of Mojo](#latest-released).
- The [`main`](https://github.com/modularml/mojo/tree/main) branch, which is in
sync with the last stable released version of Mojo. Use the examples here if you’re
using a [release build of Mojo](#latest-released).

- The [`main`](https://github.com/modularml/mojo/tree/main) branch, which
- The [`nightly`](https://github.com/modularml/mojo/tree/nightly) branch, which
is in sync with the Mojo nightly build and subject to breakage. Use this branch
for [contributions](./CONTRIBUTING.md), or if you're using the latest
[nightly build of Mojo](#latest-nightly).
Expand Down Expand Up @@ -74,15 +74,16 @@ platforms = ["osx-arm64", "linux-aarch64", "linux-64"]
max = "*"
```

When you clone this repo, you'll be on the `main` branch by default,
which includes code matching the latest nightly build:
And when you clone this repo, switch to the `nightly` branch because the `main`
branch might not be compatible with nightly builds:

```bash
git clone https://github.com/modularml/mojo.git
```

If you want to instead see the source from the most recent stable
release, then you can switch to the `stable` branch.
```bash
git checkout nightly
```

## Contributing

Expand All @@ -91,7 +92,7 @@ issue here](https://github.com/modularml/mojo/issues).
See [here](./CONTRIBUTING.md) for guidelines on filing good bugs.

We welcome contributions to this repo on the
[`main`](https://github.com/modularml/mojo/tree/main)
[`nightly`](https://github.com/modularml/mojo/tree/nightly)
branch. If you’d like to contribute to Mojo, please first read our [Contributor
Guide](https://github.com/modularml/mojo/blob/main/CONTRIBUTING.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/changelog-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,7 @@ This release doesn't include any changes to Mojo.
### 🔥 Legendary

- The Mojo standard library is now open source! Check out the
[README](https://github.com/modular/mojo/blob/main/stdlib/README.md)
[README](https://github.com/modular/mojo/blob/nightly/stdlib/README.md)
for everything you need to get started.

- Structs and other nominal types are now allowed to implicitly conform to
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ what we publish.
fn main():
OverloadedKwArgs(1) # val=1
OverloadedKwArgs(double=1) # val=2
OverloadedKwArgs(triple=2) # val=3
OverloadedKwArgs(triple=2) # val=6
```

This also works with indexing operations:
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def main():
print("try =>", value[])
if value[] == 1:
continue
result = String("{} incremented is {}").format(value[], incr(value[]))
result = "{} incremented is {}".format(value[], incr(value[]))
except e:
print("except =>", e)
else:
Expand Down
6 changes: 3 additions & 3 deletions docs/manual/operators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ real and imaginary fields.

```mojo
c1 = Complex(-1.2, 6.5)
print(String("c1: Real: {}; Imaginary: {}").format(c1.re, c1.im))
print("c1: Real: {}; Imaginary: {}".format(c1.re, c1.im))
```

```output
Expand All @@ -1094,7 +1094,7 @@ Now we can create a `Complex` instance and provide just a real component.

```mojo
c2 = Complex(3.14159)
print(String("c2: Real: {}; Imaginary: {}").format(c2.re, c2.im))
print("c2: Real: {}; Imaginary: {}".format(c2.re, c2.im))
```

```output
Expand Down Expand Up @@ -1190,7 +1190,7 @@ Now let's try getting and setting the real and imaginary components of a

```mojo
c2 = Complex(3.14159)
print(String("c2[0]: {}; c2[1]: {}").format(c2[0], c2[1]))
print("c2[0]: {}; c2[1]: {}".format(c2[0], c2[1]))
c2[0] = 2.71828
c2[1] = 42
print("c2[0] = 2.71828; c2[1] = 42; c2:", c2)
Expand Down
4 changes: 2 additions & 2 deletions docs/manual/traits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,13 @@ struct Dog(Stringable, Representable, Writable):
# Alternative full representation when calling `repr`
fn __repr__(self) -> String:
return String("Dog(name=", repr(self.name)", age=", repr(self.age), ")")
return String("Dog(name=", repr(self.name), ", age=", repr(self.age), ")")
var dog = Dog("Rex", 5)
print(repr(dog))
print(dog)
var dog_info = String("String: {!s}\nRepresentation: {!r}").format(dog, dog)
var dog_info = "String: {!s}\nRepresentation: {!r}".format(dog, dog)
print(dog_info)
```

Expand Down
3 changes: 0 additions & 3 deletions docs/notebooks/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/notebooks/index.mdx

This file was deleted.

Loading

0 comments on commit c69acd8

Please sign in to comment.