diff --git a/.github/ISSUE_TEMPLATE/mojo_feature_request.yaml b/.github/ISSUE_TEMPLATE/mojo_feature_request.yaml index a42844679d..6f10ad7d7e 100644 --- a/.github/ISSUE_TEMPLATE/mojo_feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/mojo_feature_request.yaml @@ -23,7 +23,7 @@ body: - type: markdown attributes: value: | - If the request is out of the published roadmap and priorities, please start an [idea](https://github.com/modularml/mojo/discussions/categories/ideas) in GH Discussions to get feedback from the team. + If the request is out of the published roadmap and priorities, please start an [idea](https://github.com/modular/mojo/discussions/categories/ideas) in GH Discussions to get feedback from the team. - type: textarea id: Request diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 72f230da1b..ec8d677858 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -222,7 +222,7 @@ for more details. #### Fork and clone the repo -Go to the [Mojo repo](https://github.com/modularml/mojo) and click the fork +Go to the [Mojo repo](https://github.com/modular/mojo) and click the fork button: ![Create Fork](stdlib/docs/images/create-fork.png) @@ -237,7 +237,7 @@ cd mojo Add the upstream remote and fetch it: ```bash -git remote add upstream git@github.com:modularml/mojo.git +git remote add upstream git@github.com:modular/mojo.git git fetch upstream ``` diff --git a/README.md b/README.md index 5774ca462a..baaabda0e8 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,11 @@ This repo includes source code for: This repo has two primary branches: -- The [`main`](https://github.com/modularml/mojo/tree/main) branch, which is in +- The [`main`](https://github.com/modular/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 [`nightly`](https://github.com/modularml/mojo/tree/nightly) branch, which +- The [`nightly`](https://github.com/modular/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). @@ -78,7 +78,7 @@ 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 +git clone https://github.com/modular/mojo.git ``` ```bash @@ -88,13 +88,13 @@ git checkout nightly ## Contributing When you want to report issues or request features, [please create a GitHub -issue here](https://github.com/modularml/mojo/issues). +issue here](https://github.com/modular/mojo/issues). See [here](./CONTRIBUTING.md) for guidelines on filing good bugs. We welcome contributions to this repo on the -[`nightly`](https://github.com/modularml/mojo/tree/nightly) +[`nightly`](https://github.com/modular/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). +Guide](https://github.com/modular/mojo/blob/main/CONTRIBUTING.md). For more general questions or to chat with other Mojo developers, check out our [Discord](https://discord.gg/modular). @@ -108,6 +108,6 @@ MAX and Mojo usage and distribution are licensed under the ## Thanks to our contributors - - + + diff --git a/docs/README.md b/docs/README.md index e7b9308e8a..bb20102cf0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -17,7 +17,7 @@ Be aware that we don't provide tools to generate a preview of the website, because the Mojo docs are built along with other content that's not included in this repo. As such, we recommend you preview your edits in an IDE that can render markdown and Jupyter notebook files, such as VS Code, including the [VS -Code environment in GitHub](https://github.dev/modularml/mojo/blob/main/). +Code environment in GitHub](https://github.dev/modular/mojo/blob/main/). For more information about how to contribute, see the [Contributor Guide](../CONTRIBUTING.md) diff --git a/docs/changelog-released.md b/docs/changelog-released.md index b420128e7e..da0e5665c0 100644 --- a/docs/changelog-released.md +++ b/docs/changelog-released.md @@ -44,7 +44,7 @@ detailed information in the following sections: (`ref [a, b]`). For details, see [Language changes](#24-6-language-changes). For background information and rationale on the name change see - [the proposal](https://github.com/modularml/mojo/issues/3623). For more + [the proposal](https://github.com/modular/mojo/issues/3623). For more information on origins, see [Lifetimes, origins and references](/mojo/manual/values/lifetimes) in the Mojo Manual. @@ -126,7 +126,7 @@ detailed information in the following sections: eventually be deprecated and removed. This was [discussed extensively in a public - proposal](https://github.com/modularml/mojo/issues/3623). For more + proposal](https://github.com/modular/mojo/issues/3623). For more information, see [Named results](/nightly/mojo/manual/functions#named-results) in the Mojo Manual. @@ -349,7 +349,7 @@ detailed information in the following sections: - Mojo can now interpret simple LLVM intrinsics in parameter expressions, enabling things like `count_leading_zeros` to work at compile time: - [Issue #933](https://github.com/modularml/mojo/issues/933). + [Issue #933](https://github.com/modular/mojo/issues/933). - Introduced the `@explicit_destroy` annotation, the `__disable_del` keyword, the `UnknownDestructibility` trait, and the `ImplicitlyDestructible` keyword, @@ -468,8 +468,8 @@ detailed information in the following sections: 'strong reference' pointer. - Support for multi-dimensional indexing and slicing for `PythonObject` - (PR [#3549](https://github.com/modularml/mojo/pull/3549), - PR [#3583](https://github.com/modularml/mojo/pull/3583)). + (PR [#3549](https://github.com/modular/mojo/pull/3549), + PR [#3583](https://github.com/modular/mojo/pull/3583)). ```mojo var np = Python.import_module("numpy") @@ -482,7 +482,7 @@ detailed information in the following sections: - Added [`PythonObject.__contains__()`](/mojo/stdlib/python/python_object/PythonObject#__contains__). - ([PR #3101](https://github.com/modularml/mojo/pull/3101)) + ([PR #3101](https://github.com/modular/mojo/pull/3101)) Example usage: @@ -514,7 +514,7 @@ detailed information in the following sections: semantics to Rust's [`Box<>`](https://doc.rust-lang.org/std/boxed/struct.Box.html) and C++'s [`std::unique_ptr`](https://en.cppreference.com/w/cpp/memory/unique_ptr). - ([PR #3524](https://github.com/modularml/mojo/pull/3524)) + ([PR #3524](https://github.com/modular/mojo/pull/3524)) - `Arc` has been renamed to [`ArcPointer`](/mojo/stdlib/memory/arc/ArcPointer), for consistency with `OwnedPointer`. @@ -544,7 +544,7 @@ detailed information in the following sections: [`FloatableRaising`](/mojo/stdlib/builtin/floatable/FloatableRaising) traits to denote types that can be converted to a `Float64` value using the builtin `float` function. Made `SIMD` and `FloatLiteral` conform to the `Floatable` - trait. ([PR #3163](https://github.com/modularml/mojo/pull/3163)) + trait. ([PR #3163](https://github.com/modular/mojo/pull/3163)) ```mojo fn foo[F: Floatable](v: F): @@ -562,7 +562,7 @@ detailed information in the following sections: - Introduced the [`random.shuffle()`](/mojo/stdlib/random/random/shuffle) function for randomizing the elements of a `List`. - ([PR #3327](https://github.com/modularml/mojo/pull/3327)) + ([PR #3327](https://github.com/modular/mojo/pull/3327)) Example: @@ -580,20 +580,20 @@ detailed information in the following sections: - [`Slice.step`](/mojo/stdlib/builtin/builtin_slice/Slice#fields) is now an `Optional[Int]`, matching the optionality of `slice.step` in Python. - ([PR #3160](https://github.com/modularml/mojo/pull/3160)) + ([PR #3160](https://github.com/modular/mojo/pull/3160)) - There is now a [`Byte`](/mojo/stdlib/builtin/simd/#aliases) alias to better express intent when working with a pack of bits. - ([PR #3670](https://github.com/modularml/mojo/pull/3670)). + ([PR #3670](https://github.com/modular/mojo/pull/3670)). - Expanded [`os.path`](/mojo/stdlib/os/path/path/) with new functions: - - `os.path.expandvars()`: Expands environment variables in a path ([PR #3735](https://github.com/modularml/mojo/pull/3735)). + - `os.path.expandvars()`: Expands environment variables in a path ([PR #3735](https://github.com/modular/mojo/pull/3735)). - `os.path.splitroot()`: Split a path into drive, root and tail. - ([PR #3780](https://github.com/modularml/mojo/pull/3780)). + ([PR #3780](https://github.com/modular/mojo/pull/3780)). - Added a [`reserve()`](/mojo/stdlib/collections/string/String#reserve) method and new constructor to the `String` struct to allocate additional capacity. - ([PR #3755](https://github.com/modularml/mojo/pull/3755)). + ([PR #3755](https://github.com/modular/mojo/pull/3755)). - A new [`StringLiteral.get[some_stringable]()`](/mojo/stdlib/builtin/string_literal/StringLiteral#get) @@ -619,7 +619,7 @@ detailed information in the following sections: - [`StringRef`](/mojo/stdlib/utils/stringref/StringRef) now implements `split()` which can be used to split a `StringRef` into a `List[StringRef]` by a - delimiter. ([PR #2705](https://github.com/modularml/mojo/pull/2705)) + delimiter. ([PR #2705](https://github.com/modular/mojo/pull/2705)) - [`StringRef`](/mojo/stdlib/utils/stringref/StringRef) is now representable so `repr(StringRef("hello"))` will return `StringRef('hello')`. @@ -678,7 +678,7 @@ detailed information in the following sections: - The VS Code extension now has the `mojo.run.focusOnTerminalAfterLaunch` setting, which controls whether to focus on the terminal used by the `Mojo: Run Mojo File` command or on the editor after launch. - [Issue #3532](https://github.com/modularml/mojo/issues/3532). + [Issue #3532](https://github.com/modular/mojo/issues/3532). - The VS Code extension now has the `mojo.SDK.additionalSDKs` setting, which allows the user to provide a list of MAX SDKs that the extension can use when @@ -743,40 +743,40 @@ detailed information in the following sections: - Lifetime tracking is now fully field sensitive, which makes the uninitialized variable checker more precise. -- [Issue #1310](https://github.com/modularml/mojo/issues/1310) - Mojo permits +- [Issue #1310](https://github.com/modular/mojo/issues/1310) - Mojo permits the use of any constructor for implicit conversions -- [Issue #1632](https://github.com/modularml/mojo/issues/1632) - Mojo produces +- [Issue #1632](https://github.com/modular/mojo/issues/1632) - Mojo produces weird error when inout function is used in non mutating function -- [Issue #3444](https://github.com/modularml/mojo/issues/3444) - Raising init +- [Issue #3444](https://github.com/modular/mojo/issues/3444) - Raising init causing use of uninitialized variable -- [Issue #3544](https://github.com/modularml/mojo/issues/3544) - Known +- [Issue #3544](https://github.com/modular/mojo/issues/3544) - Known mutable `ref` argument are not optimized as `noalias` by LLVM. -- [Issue #3559](https://github.com/modularml/mojo/issues/3559) - VariadicPack +- [Issue #3559](https://github.com/modular/mojo/issues/3559) - VariadicPack doesn't extend the lifetimes of the values it references. -- [Issue #3627](https://github.com/modularml/mojo/issues/3627) - Compiler +- [Issue #3627](https://github.com/modular/mojo/issues/3627) - Compiler overlooked exclusivity violation caused by `ref [MutableAnyOrigin] T` -- [Issue #3710](https://github.com/modularml/mojo/issues/3710) - Mojo frees +- [Issue #3710](https://github.com/modular/mojo/issues/3710) - Mojo frees memory while reference to it is still in use. -- [Issue #3805](https://github.com/modularml/mojo/issues/3805) - Crash When +- [Issue #3805](https://github.com/modular/mojo/issues/3805) - Crash When Initializing !llvm.ptr. -- [Issue #3816](https://github.com/modularml/mojo/issues/3816) - Ternary +- [Issue #3816](https://github.com/modular/mojo/issues/3816) - Ternary if-operator doesn't propagate origin information. -- [Issue #3815](https://github.com/modularml/mojo/issues/3815) - +- [Issue #3815](https://github.com/modular/mojo/issues/3815) - [BUG] Mutability not preserved when taking the union of two origins. -- [Issue #3829](https://github.com/modularml/mojo/issues/3829) - Poor error +- [Issue #3829](https://github.com/modular/mojo/issues/3829) - Poor error message when invoking a function pointer upon an argument of the wrong origin -- [Issue #3830](https://github.com/modularml/mojo/issues/3830) - Failures +- [Issue #3830](https://github.com/modular/mojo/issues/3830) - Failures emitting register RValues to ref arguments. - The VS Code extension now auto-updates its private copy of the MAX SDK. @@ -982,7 +982,7 @@ detailed information in the following sections: The Mojo compiler now always passes the "new value" being set using the last keyword argument of the `__setitem__()`, e.g. turning `yourType[1, 2] = 3` into `yourType.__setitem__(1, 2, val=3)`. This fixes - [Issue #248](https://github.com/modularml/mojo/issues/248). + [Issue #248](https://github.com/modular/mojo/issues/248). - Mojo context managers used in regions of code that may raise no longer need to define a "conditional" exit function in the form of @@ -1109,7 +1109,7 @@ detailed information in the following sections: - Added the builtin [`input()`](/mojo/stdlib/builtin/io/input) function, which behaves the same as Python. - ([PR #3392](https://github.com/modularml/mojo/pull/3392)) + ([PR #3392](https://github.com/modular/mojo/pull/3392)) ```mojo name = input("Enter your name: ") @@ -1120,7 +1120,7 @@ detailed information in the following sections: There is a known issue when running the `input()` function with JIT compilation (see issue - [#3479](https://github.com/modularml/mojo/issues/3479)). + [#3479](https://github.com/modular/mojo/issues/3479)). - [`print()`](/mojo/stdlib/builtin/io/print) now requires that its arguments conform to the [`Formattable`](/mojo/stdlib/utils/format/Formattable) trait. @@ -1193,12 +1193,12 @@ detailed information in the following sections: - Added [`TemporaryDirectory`](/mojo/stdlib/tempfile/tempfile/TemporaryDirectory) in module `tempfile`. - ([PR 2743](https://github.com/modularml/mojo/pull/2743)) + ([PR 2743](https://github.com/modular/mojo/pull/2743)) - Added [`NamedTemporaryFile`](/mojo/stdlib/tempfile/tempfile/NamedTemporaryFile) in module `tempfile`. - ([PR 2762](https://github.com/modularml/mojo/pull/2762)) + ([PR 2762](https://github.com/modular/mojo/pull/2762)) - [`String`](/mojo/stdlib/collections/string/String) and friends: @@ -1207,7 +1207,7 @@ detailed information in the following sections: - Added the [`String.format()`](/mojo/stdlib/collections/string/String#format) method. - ([PR #2771](https://github.com/modularml/mojo/pull/2771)) + ([PR #2771](https://github.com/modular/mojo/pull/2771)) Supports automatic and manual indexing of `*args`. @@ -1228,7 +1228,7 @@ detailed information in the following sections: - [`String.format()`](/mojo/stdlib/collections/string/String#format) now supports conversion flags `!s` and `!r`, allowing for `str()` and `repr()` conversions within format strings. - ([PR #3279](https://github.com/modularml/mojo/pull/3279)) + ([PR #3279](https://github.com/modular/mojo/pull/3279)) Example: @@ -1245,14 +1245,14 @@ detailed information in the following sections: [`ljust()`](/mojo/stdlib/collections/string/String#ljust), and [`center()`](/mojo/stdlib/collections/string/String#center) methods to return a justified string based on width and fillchar. ([PR - #3278](https://github.com/modularml/mojo/pull/3278)) + #3278](https://github.com/modular/mojo/pull/3278)) - The [`atol()`](/mojo/stdlib/collections/string/atol) function now correctly supports leading underscores, (e.g.`atol("0x_ff", 0)`), when the appropriate base is specified or inferred (base 0). non-base-10 integer literals as per Python's [Integer Literals](). - ([PR #3180](https://github.com/modularml/mojo/pull/3180)) + ([PR #3180](https://github.com/modular/mojo/pull/3180)) - Added the [`unsafe_cstr_ptr()`](/mojo/stdlib/collections/string/String#unsafe_cstr_ptr) @@ -1270,7 +1270,7 @@ detailed information in the following sections: and [`StringSlice.__len__()`](/mojo/stdlib/utils/string_slice/StringSlice#__len__) now does return the Unicode codepoints length. - ([PR #2960](https://github.com/modularml/mojo/pull/2960)) + ([PR #2960](https://github.com/modular/mojo/pull/2960)) - Added a new [`StaticString`](/mojo/stdlib/utils/string_slice/#aliases) type alias. This can be used in place of @@ -1414,7 +1414,7 @@ detailed information in the following sections: assert_equal(str(stacked), "[1 2 3 4 5 6]") ``` - ([PR #3264](https://github.com/modularml/mojo/pull/3264)) + ([PR #3264](https://github.com/modular/mojo/pull/3264)) - Accessing local Python modules with [`Python.add_to_path(".")`](/mojo/stdlib/python/python/Python#add_to_path) @@ -1429,7 +1429,7 @@ detailed information in the following sections: - [`List`](/mojo/stdlib/collections/list/List) values are now equality comparable with `==` and `!=` when their element type is equality - comparable. ([PR #3195](https://github.com/modularml/mojo/pull/3195)) + comparable. ([PR #3195](https://github.com/modular/mojo/pull/3195)) - [`Optional`](/mojo/stdlib/collections/optional/Optional) values are now equality comparable with `==` and `!=` when their element type is equality @@ -1437,22 +1437,22 @@ detailed information in the following sections: - Added a new [`Counter`](/mojo/stdlib/collections/counter/Counter) dictionary-like type, matching most of the features of the Python one. - ([PR #2910](https://github.com/modularml/mojo/pull/2910)) + ([PR #2910](https://github.com/modular/mojo/pull/2910)) - [`Dict`](/mojo/stdlib/collections/dict/Dict) now implements [`setdefault()`](/mojo/stdlib/collections/dict/Dict#setdefault), which gets a value from the dictionary by key, or sets it to a default if it doesn't exist. - ([PR #2803](https://github.com/modularml/mojo/pull/2803)) + ([PR #2803](https://github.com/modular/mojo/pull/2803)) - `Dict` now supports [`popitem()`](/mojo/stdlib/collections/dict/Dict#popitem), which removes and returns the last item in the `Dict`. - ([PR #2701](https://github.com/modularml/mojo/pull/2701)) + ([PR #2701](https://github.com/modular/mojo/pull/2701)) - Added a [`Dict.__init__()`](/mojo/stdlib/collections/dict/Dict#__init__) overload to specify initial capacity. - ([PR #3171](https://github.com/modularml/mojo/pull/3171)) + ([PR #3171](https://github.com/modular/mojo/pull/3171)) The capacity has to be a power of two and greater than or equal to 8. @@ -1467,7 +1467,7 @@ detailed information in the following sections: - `ListLiteral` now supports [`__contains__()`](/mojo/stdlib/builtin/builtin_list/ListLiteral#__contains__). - ([PR #3251](https://github.com/modularml/mojo/pull/3251)) + ([PR #3251](https://github.com/modular/mojo/pull/3251)) - Filesystem and environment utilities: @@ -1549,7 +1549,7 @@ detailed information in the following sections: - Added the [`Identifiable`](/mojo/stdlib/builtin/identifiable/Identifiable) trait, used to describe types that implement the `__is__()` and `__isnot__()` trait methods. - ([PR #2807](https://github.com/modularml/mojo/pull/2807)) + ([PR #2807](https://github.com/modular/mojo/pull/2807)) - Types conforming to [`Boolable`](/mojo/stdlib/builtin/bool/Boolable) (that is, those implementing `__bool__()`) no longer implicitly convert to `Bool`. @@ -1591,7 +1591,7 @@ detailed information in the following sections: - Added the [`oct()`](/mojo/stdlib/builtin/format_int/oct) builtin function for formatting an integer in octal. - ([PR #2914](https://github.com/modularml/mojo/pull/2914)) + ([PR #2914](https://github.com/modular/mojo/pull/2914)) - Added the [`assert_is()`](/mojo/stdlib/testing/testing/assert_is) and [`assert_is_not()`](/mojo/stdlib/testing/testing/assert_is_not) test @@ -1599,7 +1599,7 @@ detailed information in the following sections: - The [`math`](/mojo/stdlib/math/constants/) package now includes the `pi`, `e`, and `tau` constants (Closes Issue - [#2135](https://github.com/modularml/mojo/issues/2135)). + [#2135](https://github.com/modular/mojo/issues/2135)). - The [`ulp`](/mojo/stdlib/math/math/ulp) function from `numerics` has been moved to the `math` module. @@ -1608,7 +1608,7 @@ detailed information in the following sections: [`bit_reverse()`](/mojo/stdlib/bit/bit/bit_reverse), [`byte_swap()`](/mojo/stdlib/bit/bit/byte_swap), and [`pop_count()`](/mojo/stdlib/bit/bit/pop_count) for the `Int` type. - ([PR #3150](https://github.com/modularml/mojo/pull/3150)) + ([PR #3150](https://github.com/modular/mojo/pull/3150)) - A few `bit` functions have been renamed for clarity: @@ -1620,7 +1620,7 @@ detailed information in the following sections: `OptionalReg[Int]` for `start` and `end` and implements a constructor which accepts optional values. `Slice._has_end()` has also been removed since a Slice with no end is now represented by an empty `Slice.end` option. - ([PR #2495](https://github.com/modularml/mojo/pull/2495)) + ([PR #2495](https://github.com/modular/mojo/pull/2495)) ```mojo var s = Slice(1, None, 2) @@ -1732,28 +1732,28 @@ detailed information in the following sections: - Mojo now prints `ref` arguments and results in generated documentation correctly. -- [#1734](https://github.com/modularml/mojo/issues/1734) - Calling +- [#1734](https://github.com/modular/mojo/issues/1734) - Calling `__copyinit__` on self causes crash. -- [#3142](https://github.com/modularml/mojo/issues/3142) - [QoI] Confusing +- [#3142](https://github.com/modular/mojo/issues/3142) - [QoI] Confusing `__setitem__` method is failing with a "must be mutable" error. -- [#248](https://github.com/modularml/mojo/issues/248) - [Feature] Enable +- [#248](https://github.com/modular/mojo/issues/248) - [Feature] Enable `__setitem__` to take variadic arguments -- [#3065](https://github.com/modularml/mojo/issues/3065) - Fix incorrect behavior +- [#3065](https://github.com/modular/mojo/issues/3065) - Fix incorrect behavior of `SIMD.__int__` on unsigned types -- [#3045](https://github.com/modularml/mojo/issues/3045) - Disable implicit SIMD +- [#3045](https://github.com/modular/mojo/issues/3045) - Disable implicit SIMD conversion routes through `Bool` -- [#3126](https://github.com/modularml/mojo/issues/3126) - [BUG] List doesn't +- [#3126](https://github.com/modular/mojo/issues/3126) - [BUG] List doesn't work at compile time. -- [#3237](https://github.com/modularml/mojo/issues/3237) - [BUG] Difference +- [#3237](https://github.com/modular/mojo/issues/3237) - [BUG] Difference between `__getitem__` and `[.]` operator. -- [#3336](https://github.com/modularml/mojo/issues/3336) - Fix outdated +- [#3336](https://github.com/modular/mojo/issues/3336) - Fix outdated references to `let` in REPL documentation. - The VS Code extension no longer caches the information of the selected @@ -1972,7 +1972,7 @@ Big themes for this release: - Added built-in [`repr()`](/mojo/stdlib/builtin/repr/repr) function and [`Representable`](/mojo/stdlib/builtin/repr/Representable) trait. - ([PR #2361](https://github.com/modularml/mojo/pull/2361)) + ([PR #2361](https://github.com/modular/mojo/pull/2361)) - Added the [`Indexer`](/mojo/stdlib/builtin/int/Indexer) trait to denote types that implement the `__index__()` method which allows these types to be @@ -2019,7 +2019,7 @@ Big themes for this release: print(a[AlwaysZero()]) # works and prints 1 ``` - ([PR #2685](https://github.com/modularml/mojo/pull/2685)) + ([PR #2685](https://github.com/modular/mojo/pull/2685)) - Added traits allowing user-defined types to be supported by various built-in and math functions. @@ -2097,14 +2097,14 @@ Big themes for this release: [`rstrip()`](/mojo/stdlib/collections/string/String#rstrip) can now remove custom characters other than whitespace. In addition, there are now several useful aliases for whitespace, ASCII lower/uppercase, and so on. - ([PR #2555](https://github.com/modularml/mojo/pull/2555)) + ([PR #2555](https://github.com/modular/mojo/pull/2555)) - `String` now has a [`splitlines()`](/mojo/stdlib/collections/string/String#splitlines) method, which allows splitting strings at line boundaries. This method supports [universal newlines](https://docs.python.org/3/glossary.html#term-universal-newlines) and provides an option to retain or remove the line break characters. - ([PR #2810](https://github.com/modularml/mojo/pull/2810)) + ([PR #2810](https://github.com/modular/mojo/pull/2810)) - `InlinedString` has been renamed to [`InlineString`](/mojo/stdlib/utils/inline_string/InlineString) to be @@ -2113,12 +2113,12 @@ Big themes for this release: - [`StringRef`](/mojo/stdlib/utils/stringref/StringRef) now implements [`strip()`](/mojo/stdlib/utils/stringref/StringRef#strip), which can be used to remove leading and trailing whitespace. - ([PR #2683](https://github.com/modularml/mojo/pull/2683)) + ([PR #2683](https://github.com/modular/mojo/pull/2683)) - `StringRef` now implements [`startswith()`](/mojo/stdlib/utils/stringref/StringRef#startswith) and [`endswith()`](/mojo/stdlib/utils/stringref/StringRef#endswith). - ([PR #2710](https://github.com/modularml/mojo/pull/2710)) + ([PR #2710](https://github.com/modular/mojo/pull/2710)) - Added a new [`StringSlice`](/mojo/stdlib/utils/string_slice/StringSlice) type, to replace uses of the unsafe `StringRef` type in standard library @@ -2170,7 +2170,7 @@ Big themes for this release: - Added a built-in [`sort()`](/mojo/stdlib/builtin/sort/sort) function for lists of elements that conform to the [`ComparableCollectionElement`](/mojo/stdlib/builtin/value/ComparableCollectionElement) - trait.([PR #2609](https://github.com/modularml/mojo/pull/2609)) + trait.([PR #2609](https://github.com/modular/mojo/pull/2609)) - [`int()`](/mojo/stdlib/builtin/int/int-function) can now take a string and a specified base to parse an integer from a @@ -2178,17 +2178,17 @@ Big themes for this release: specified, the string will be parsed as if it was an integer literal, with the base determined by whether the string contains the prefix `"0x"`, `"0o"`, or `"0b"`. - ([PR #2273](https://github.com/modularml/mojo/pull/2273), - fixes [#2274](https://github.com/modularml/mojo/issues/2274)) + ([PR #2273](https://github.com/modular/mojo/pull/2273), + fixes [#2274](https://github.com/modular/mojo/issues/2274)) - Added the [`bin()`](/mojo/stdlib/builtin/format_int/bin) built-in function to convert integral types into their binary string representation. - ([PR #2603](https://github.com/modularml/mojo/pull/2603)) + ([PR #2603](https://github.com/modular/mojo/pull/2603)) - Added the [`atof()`](/mojo/stdlib/collections/string/atof) built-in function, which can convert a `String` to a `float64`. - ([PR #2649](https://github.com/modularml/mojo/pull/2649)) + ([PR #2649](https://github.com/modular/mojo/pull/2649)) - You can now use the built-in [`any()`](/mojo/stdlib/builtin/bool/any) and [`all()`](/mojo/stdlib/builtin/bool/all) functions to check for truthy @@ -2196,7 +2196,7 @@ Big themes for this release: `size=1`, You must explicitly use these to get the truthy value of a SIMD vector with more than one element. This avoids common bugs around implicit conversion of `SIMD` to `Bool`. - ([PR #2600](https://github.com/modularml/mojo/pull/2600)) + ([PR #2600](https://github.com/modular/mojo/pull/2600)) For example: @@ -2211,10 +2211,10 @@ Big themes for this release: - [`object`](/mojo/stdlib/builtin/object/) now implements all the bitwise operators. - ([PR #2324](https://github.com/modularml/mojo/pull/2324)) + ([PR #2324](https://github.com/modular/mojo/pull/2324)) - [`Tuple`](/mojo/stdlib/builtin/tuple/Tuple) now supports `__contains__()`. - ([PR #2709](https://github.com/modularml/mojo/pull/2709)) For example: + ([PR #2709](https://github.com/modular/mojo/pull/2709)) For example: ```mojo var x = Tuple(1, 2, True) @@ -2264,12 +2264,12 @@ Big themes for this release: Note that `List` doesn't conform to the `Stringable` trait yet so you cannot use `str(my_list)` yet. - ([PR #2673](https://github.com/modularml/mojo/pull/2673)) + ([PR #2673](https://github.com/modular/mojo/pull/2673)) - `List` has a simplified syntax to call the [`count()`](/mojo/stdlib/collections/list/List#count) method: `my_list.count(x)`. - ([PR #2675](https://github.com/modularml/mojo/pull/2675)) + ([PR #2675](https://github.com/modular/mojo/pull/2675)) - `List()` now supports `__contains__()`, so you can now use lists with the `in` operator: @@ -2278,84 +2278,84 @@ Big themes for this release: if x in my_list: ``` - ([PR #2667](https://github.com/modularml/mojo/pull/2667)) + ([PR #2667](https://github.com/modular/mojo/pull/2667)) - `List` now has an [`unsafe_get()`](/mojo/stdlib/collections/list/List#unsafe_get) to get the reference to an element without bounds check or wraparound for negative indices. Note that this method is unsafe. Use with caution. - [PR #2800](https://github.com/modularml/mojo/pull/2800)) + [PR #2800](https://github.com/modular/mojo/pull/2800)) - Added a [`fromkeys()`](/mojo/stdlib/collections/dict/Dict#fromkeys) method to `Dict` to return a `Dict` with the specified keys and values. - ([PR 2622](https://github.com/modularml/mojo/pull/2622)) + ([PR 2622](https://github.com/modular/mojo/pull/2622)) - Added a [`clear()`](/mojo/stdlib/collections/dict/Dict#clear) method to - `Dict`. ([PR 2627](https://github.com/modularml/mojo/pull/2627)) + `Dict`. ([PR 2627](https://github.com/modular/mojo/pull/2627)) - `Dict` now supports [`reversed()`](/mojo/stdlib/builtin/reversed/reversed) for its `items()` and `values()` iterators. - ([PR #2340](https://github.com/modularml/mojo/pull/2340)) + ([PR #2340](https://github.com/modular/mojo/pull/2340)) - `Dict` now has a simplified conversion to `String` with `my_dict.__str__()`. Note that `Dict` does not conform to the `Stringable` trait so `str(my_dict)` is not possible yet. - ([PR #2674](https://github.com/modularml/mojo/pull/2674)) + ([PR #2674](https://github.com/modular/mojo/pull/2674)) - `Dict` now implements [`get(key)`](/mojo/stdlib/collections/dict/Dict#get) and `get(key, default)` functions. - ([PR #2519](https://github.com/modularml/mojo/pull/2519)) + ([PR #2519](https://github.com/modular/mojo/pull/2519)) - Added a temporary `__get_ref(key)` method to `Dict`, allowing you to get a `Reference` to a dictionary value. - Added a new [`InlineList`](/mojo/stdlib/collections/inline_list/InlineList) type, a stack-allocated list with a static maximum size. - ([PR 2587#](https://github.com/modularml/mojo/pull/2587)) - ([PR #2703](https://github.com/modularml/mojo/pull/2703)) + ([PR 2587#](https://github.com/modular/mojo/pull/2587)) + ([PR #2703](https://github.com/modular/mojo/pull/2703)) - Added a new [`Span`](/mojo/stdlib/utils/span/Span) type for taking slices of contiguous collections. - ([PR #2595](https://github.com/modularml/mojo/pull/2595)) + ([PR #2595](https://github.com/modular/mojo/pull/2595)) - [`os`](/mojo/stdlib/os/os/) module: - The `os` module now provides functionality for adding and removing directories using [`mkdir()`](/mojo/stdlib/os/os/mkdir) and [`rmdir()`](/mojo/stdlib/os/os/rmdir). - ([PR #2430](https://github.com/modularml/mojo/pull/2430)) + ([PR #2430](https://github.com/modular/mojo/pull/2430)) - Added the [`os.path.getsize()`](/mojo/stdlib/os/path/path/getsize) function, which gives the size in bytes of the file identified by the path. - ([PR 2626](https://github.com/modularml/mojo/pull/2626)) + ([PR 2626](https://github.com/modular/mojo/pull/2626)) - Added [`os.path.join()`](/mojo/stdlib/os/path/path/join) function. - ([PR 2792](https://github.com/modularml/mojo/pull/2792)) + ([PR 2792](https://github.com/modular/mojo/pull/2792)) - Added a new [`tempfile`](/mojo/stdlib/tempfile/tempfile/) module, with `gettempdir()` and `mkdtemp()` functions. - ([PR 2742](https://github.com/modularml/mojo/pull/2742)) + ([PR 2742](https://github.com/modular/mojo/pull/2742)) - [`SIMD`](/mojo/stdlib/builtin/simd/SIMD) type: - Added [`SIMD.shuffle()`](/mojo/stdlib/builtin/simd/SIMD#shuffle) with `IndexList` mask. - ([PR #2315](https://github.com/modularml/mojo/pull/2315)) + ([PR #2315](https://github.com/modular/mojo/pull/2315)) - [`SIMD.__bool__()`](/mojo/stdlib/builtin/simd/SIMD#__bool__) is constrained such that it only works when `size` is `1`. For SIMD vectors with more than one element, use [`any()`](/mojo/stdlib/builtin/bool/any) or [`all()`](/mojo/stdlib/builtin/bool/all). - ([PR #2502](https://github.com/modularml/mojo/pull/2502)) + ([PR #2502](https://github.com/modular/mojo/pull/2502)) - The [`SIMD.reduce_or()`](/mojo/stdlib/builtin/simd/SIMD#reduce_or) and [`SIMD.reduce_and()`](/mojo/stdlib/builtin/simd/SIMD#reduce_and) methods are now bitwise operations, and support integer types. - ([PR #2671](https://github.com/modularml/mojo/pull/2671)) + ([PR #2671](https://github.com/modular/mojo/pull/2671)) - Added [`SIMD.__repr__()`](/mojo/stdlib/builtin/simd/SIMD#__repr__) to get the verbose string representation of `SIMD` types. - ([PR #2728](https://github.com/modularml/mojo/pull/2728)) + ([PR #2728](https://github.com/modular/mojo/pull/2728)) - [`math`](/mojo/stdlib/math/math/) package: @@ -2391,7 +2391,7 @@ Big themes for this release: - [`math.gcd()`](/mojo/stdlib/math/math/gcd) now works on negative inputs, and like Python's implementation, accepts a variadic list of integers. New overloads for a `List` or `Span`of integers are also added. - ([PR #2777](https://github.com/modularml/mojo/pull/2777)) + ([PR #2777](https://github.com/modular/mojo/pull/2777)) - Async and coroutines: @@ -2415,12 +2415,12 @@ Big themes for this release: that works on memory-only types. Compare with the existing [`StaticTuple`](/mojo/stdlib/utils/static_tuple/StaticTuple) type, which is conceptually an array type, but only works on `AnyTrivialRegType`. - ([PR #2294](https://github.com/modularml/mojo/pull/2294)) + ([PR #2294](https://github.com/modular/mojo/pull/2294)) - The [`base64`](/mojo/stdlib/base64/) package now includes encoding and decoding support for both the Base64 and Base16 encoding schemes. - ([PR #2364](https://github.com/modularml/mojo/pull/2364)) - ([PR #2584](https://github.com/modularml/mojo/pull/2584)) + ([PR #2364](https://github.com/modular/mojo/pull/2364)) + ([PR #2584](https://github.com/modular/mojo/pull/2584)) - The `take()` function in [`Variant`](/mojo/stdlib/utils/variant/Variant) and [`Optional`](/mojo/stdlib/collections/optional/Optional) has been renamed to @@ -2437,7 +2437,7 @@ Big themes for this release: - `infinity` and `NaN` are now correctly handled in [`testing.assert_almost_equal()`](/mojo/stdlib/testing/testing/assert_almost_equal) and an `inf` function has been added to `utils/numerics.mojo`. - ([PR #2375](https://github.com/modularml/mojo/pull/2375)) + ([PR #2375](https://github.com/modular/mojo/pull/2375)) ### Tooling changes @@ -2551,16 +2551,16 @@ Big themes for this release: #### 🛠️ Fixed -- [#1837](https://github.com/modularml/mojo/issues/1837) Fix self-referential +- [#1837](https://github.com/modular/mojo/issues/1837) Fix self-referential variant crashing the compiler. -- [#2363](https://github.com/modularml/mojo/issues/2363) Fix LSP crashing on +- [#2363](https://github.com/modular/mojo/issues/2363) Fix LSP crashing on simple trait definitions. -- [#1787](https://github.com/modularml/mojo/issues/1787) Fix error when using +- [#1787](https://github.com/modular/mojo/issues/1787) Fix error when using `//` on `FloatLiteral` in alias expression. - Made several improvements to dictionary performance. Dicts with integer keys are most heavily affected, but large dicts and dicts with large values will also see large improvements. -- [#2692](https://github.com/modularml/mojo/issues/2692) Fix `assert_raises` +- [#2692](https://github.com/modular/mojo/issues/2692) Fix `assert_raises` to include calling location. ### Special thanks @@ -2749,21 +2749,21 @@ Special thanks to our community contributors: - `pop(index)` for removing an element at a particular index. By default, `List.pop()` removes the last element in the list. ([@LJ-9801](https://github.com/LJ-9801), fixes - [#2017](https://github.com/modularml/mojo/issues/2017)) + [#2017](https://github.com/modular/mojo/issues/2017)) - `resize(new_size)` for resizing the list without the need to specify an additional value. ([@mikowals](https://github.com/mikowals), fixes - [#2133](https://github.com/modularml/mojo/issues/2133)) + [#2133](https://github.com/modular/mojo/issues/2133)) - `insert(index, value)` for inserting a value at a specified index into the `List`. ([@whym1here](https://github.com/whym1here), fixes - [#2134](https://github.com/modularml/mojo/issues/2134)) + [#2134](https://github.com/modular/mojo/issues/2134)) - A new constructor `List(ptr, size, capacity)` to to avoid needing to do a deep copy of an existing contiguous memory allocation when constructing a new `List`. ([@StandinKP](https://github.com/StandinKP), fixes - [#2170](https://github.com/modularml/mojo/issues/2170)) + [#2170](https://github.com/modular/mojo/issues/2170)) - [`Dict`](/mojo/stdlib/collections/dict/Dict) now has a `update()` method to update keys/values from another `Dict`. @@ -2804,7 +2804,7 @@ Special thanks to our community contributors: ([@helehex](https://github.com/helehex) and [@jayzhan211](https://github.com/jayzhan211), contributes towards - [#2325](https://github.com/modularml/mojo/issues/2325)) + [#2325](https://github.com/modular/mojo/issues/2325)) - [`Optional`](/mojo/stdlib/collections/optional/Optional) now implements `__is__` and `__isnot__` methods so that you can compare an `Optional` with @@ -2951,7 +2951,7 @@ Special thanks to our community contributors: [`chr`](/mojo/stdlib/collections/string/chr) functions have been improved to accept any Unicode character. ([@mzaks](https://github.com/mzaks), contributes towards - [#1616](https://github.com/modularml/mojo/issues/1616)) + [#1616](https://github.com/modular/mojo/issues/1616)) - [`atol()`](/mojo/stdlib/collections/string/atol) now handles whitespace. The `atol()`function is used internally by `String.__int__()`, so @@ -2960,7 +2960,7 @@ Special thanks to our community contributors: - [`SIMD`](/mojo/stdlib/builtin/simd/SIMD) now implements the `__rmod__()` method. ([@bgreni](https://github.com/bgreni), fixes - [#1482](https://github.com/modularml/mojo/issues/1482)) + [#1482](https://github.com/modular/mojo/issues/1482)) - [`bool(None)`](/mojo/stdlib/builtin/bool/bool-function) is now implemented. ([@zhoujingya](https://github.com/zhoujingya)) @@ -2995,7 +2995,7 @@ Special thanks to our community contributors: division, modulo, and left and right shift operators, including the in-place and reverse variants. ([@LJ-9801](https://github.com/LJ-9801), fixes - [#2224](https://github.com/modularml/mojo/issues/2224)) + [#2224](https://github.com/modular/mojo/issues/2224)) - Added checked arithmetic operations for `SIMD` integers. @@ -3027,7 +3027,7 @@ Special thanks to our community contributors: - Added [`os.remove()`](/mojo/stdlib/os/os/remove) and [`os.unlink()`](/mojo/stdlib/os/os/unlink) for deleting files. ([@artemiogr97](https://github.com/artemiogr97), fixes - [#2306](https://github.com/modularml/mojo/issues/2306)) + [#2306](https://github.com/modular/mojo/issues/2306)) #### 🦋 Changed @@ -3047,15 +3047,15 @@ Special thanks to our community contributors: ``` ([@lsh](https://github.com/lsh), fixes - [#2179](https://github.com/modularml/mojo/issues/2179)) + [#2179](https://github.com/modular/mojo/issues/2179)) - Per the accepted community proposal, [Standardize the representation of byte sequence as a sequence of unsigned - 8-bit integers](https://github.com/modularml/mojo/blob/main/proposals/byte-as-uint8.md), + 8-bit integers](https://github.com/modular/mojo/blob/main/proposals/byte-as-uint8.md), began transition to using `UInt8` by changing the data pointer of `Error` to `DTypePointer[DType.uint8]`. ([@gabrieldemarmiesse](https://github.com/gabrieldemarmiesse), contributes - towards [#2317](https://github.com/modularml/mojo/issues/2317)) + towards [#2317](https://github.com/modular/mojo/issues/2317)) - Continued transition to `UnsafePointer` from the legacy `Pointer` type in various standard library APIs and internals. @@ -3127,56 +3127,56 @@ Special thanks to our community contributors: #### 🛠️ Fixed -- [#516](https://github.com/modularml/mojo/issues/516) and - [#1817](https://github.com/modularml/mojo/issues/1817) and many others, e.g. +- [#516](https://github.com/modular/mojo/issues/516) and + [#1817](https://github.com/modular/mojo/issues/1817) and many others, e.g. "Can't create a function that returns two strings." -- [#1178](https://github.com/modularml/mojo/issues/1178) (os/kern) failure (5). +- [#1178](https://github.com/modular/mojo/issues/1178) (os/kern) failure (5). -- [#1609](https://github.com/modularml/mojo/issues/1609) alias with +- [#1609](https://github.com/modular/mojo/issues/1609) alias with `DynamicVector[Tuple[Int]]` fails. -- [#1987](https://github.com/modularml/mojo/issues/1987) Defining `main` +- [#1987](https://github.com/modular/mojo/issues/1987) Defining `main` in a Mojo package is an error, for now. This is not intended to work yet, erroring for now will help to prevent accidental undefined behavior. -- [#1215](https://github.com/modularml/mojo/issues/1215) and - [#1949](https://github.com/modularml/mojo/issues/1949) The Mojo LSP server no +- [#1215](https://github.com/modular/mojo/issues/1215) and + [#1949](https://github.com/modular/mojo/issues/1949) The Mojo LSP server no longer cuts off hover previews for functions with functional arguments, parameters, or results. -- [#1901](https://github.com/modularml/mojo/issues/1901) Fixed Mojo LSP and +- [#1901](https://github.com/modular/mojo/issues/1901) Fixed Mojo LSP and documentation generation handling of inout arguments. -- [#1913](https://github.com/modularml/mojo/issues/1913) - `0__` no longer +- [#1913](https://github.com/modular/mojo/issues/1913) - `0__` no longer crashes the Mojo parser. -- [#1924](https://github.com/modularml/mojo/issues/1924) JIT debugging on Mac +- [#1924](https://github.com/modular/mojo/issues/1924) JIT debugging on Mac has been fixed. -- [#1941](https://github.com/modularml/mojo/issues/1941) Mojo variadic arguments +- [#1941](https://github.com/modular/mojo/issues/1941) Mojo variadic arguments don't work with non-trivial register-only types. -- [#1963](https://github.com/modularml/mojo/issues/1963) `a!=0` is now parsed +- [#1963](https://github.com/modular/mojo/issues/1963) `a!=0` is now parsed and formatted correctly by `mojo format`. -- [#1676](https://github.com/modularml/mojo/issues/1676) Fix a crash related to +- [#1676](https://github.com/modular/mojo/issues/1676) Fix a crash related to `@value` decorator and structs with empty body. -- [#1917](https://github.com/modularml/mojo/issues/1917) Fix a crash after +- [#1917](https://github.com/modular/mojo/issues/1917) Fix a crash after syntax error during tuple creation. -- [#2006](https://github.com/modularml/mojo/issues/2006) The Mojo LSP now +- [#2006](https://github.com/modular/mojo/issues/2006) The Mojo LSP now properly supports signature types with named arguments and parameters. -- [#2007](https://github.com/modularml/mojo/issues/2007) and - [#1997](https://github.com/modularml/mojo/issues/1997) The Mojo LSP no longer +- [#2007](https://github.com/modular/mojo/issues/2007) and + [#1997](https://github.com/modular/mojo/issues/1997) The Mojo LSP no longer crashes on certain types of closures. -- [#1675](https://github.com/modularml/mojo/issues/1675) Ensure `@value` +- [#1675](https://github.com/modular/mojo/issues/1675) Ensure `@value` decorator fails gracefully after duplicate field error. -- [#2068](https://github.com/modularml/mojo/issues/2068) +- [#2068](https://github.com/modular/mojo/issues/2068) Fix `SIMD.reduce()` for size_out == 2. ([@soraros](https://github.com/soraros)) @@ -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/modularml/mojo/blob/nightly/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 @@ -3258,7 +3258,7 @@ This release doesn't include any changes to Mojo. - `let` declarations now produce a compile time error instead of a warning, our next step in [removing let - declarations](https://github.com/modularml/mojo/blob/main/proposals/remove-let-decls.md). + declarations](https://github.com/modular/mojo/blob/main/proposals/remove-let-decls.md). The compiler still recognizes the `let` keyword for now in order to produce a good error message, but that will be removed in subsequent releases. @@ -3562,27 +3562,27 @@ fixed in a future release. #### 🛠️ Fixed -- [#1362](https://github.com/modularml/mojo/issues/1362) - Parameter inference +- [#1362](https://github.com/modular/mojo/issues/1362) - Parameter inference now recursively matches function types. -- [#951](https://github.com/modularml/mojo/issues/951) - Functions that were +- [#951](https://github.com/modular/mojo/issues/951) - Functions that were both `async` and `@always_inline` incorrectly errored. -- [#1858](https://github.com/modularml/mojo/issues/1858) - Trait with parametric +- [#1858](https://github.com/modular/mojo/issues/1858) - Trait with parametric methods regression. -- [#1892](https://github.com/modularml/mojo/issues/1892) - Forbid unsupported +- [#1892](https://github.com/modular/mojo/issues/1892) - Forbid unsupported decorators on traits. -- [#1735](https://github.com/modularml/mojo/issues/1735) - Trait-typed values +- [#1735](https://github.com/modular/mojo/issues/1735) - Trait-typed values are incorrectly considered equal. -- [#1909](https://github.com/modularml/mojo/issues/1909) - Crash due to nested +- [#1909](https://github.com/modular/mojo/issues/1909) - Crash due to nested import in unreachable block. -- [#1921](https://github.com/modularml/mojo/issues/1921) - Parser crashes +- [#1921](https://github.com/modular/mojo/issues/1921) - Parser crashes binding Reference to lvalue with subtype lifetime. -- [#1945](https://github.com/modularml/mojo/issues/1945) - `Optional[T].or_else()` +- [#1945](https://github.com/modular/mojo/issues/1945) - `Optional[T].or_else()` should return `T` instead of `Optional[T]`. -- [#1940](https://github.com/modularml/mojo/issues/1940) - Constrain +- [#1940](https://github.com/modular/mojo/issues/1940) - Constrain `math.copysign` to floating point or integral types. -- [#1838](https://github.com/modularml/mojo/issues/1838) - Variadic `print` +- [#1838](https://github.com/modular/mojo/issues/1838) - Variadic `print` does not work when specifying `end=""` -- [#1826](https://github.com/modularml/mojo/issues/1826) - The `SIMD.reduce` +- [#1826](https://github.com/modular/mojo/issues/1826) - The `SIMD.reduce` methods correctly handle edge cases where `size_out >= size`. ## v24.1.1 (2024-03-18) @@ -3936,7 +3936,7 @@ installation issues. Otherwise it is functionally identical to Mojo 24.1. ### 🦋 Changed - As another step towards [removing let - declarations](https://github.com/modularml/mojo/blob/main/proposals/remove-let-decls.md) + declarations](https://github.com/modular/mojo/blob/main/proposals/remove-let-decls.md) we have removed support for let declarations inside the compiler. To ease migration, we parse `let` declarations as a `var` declaration so your code won't break. We emit a warning about this, but please switch your code to @@ -4036,72 +4036,72 @@ experience without dedicated sugar. ### 🛠️ Fixed -- [#435](https://github.com/modularml/mojo/issues/435) +- [#435](https://github.com/modular/mojo/issues/435) Structs with Self type don't always work. -- [#1540](https://github.com/modularml/mojo/issues/1540) +- [#1540](https://github.com/modular/mojo/issues/1540) Crash in register_passable self referencing struct. -- [#1664](https://github.com/modularml/mojo/issues/1664) - Improve error +- [#1664](https://github.com/modular/mojo/issues/1664) - Improve error message when `StaticTuple` is constructed with a negative size for the number of elements. -- [#1679](https://github.com/modularml/mojo/issues/1679) - crash on SIMD of zero +- [#1679](https://github.com/modular/mojo/issues/1679) - crash on SIMD of zero elements. - Various crashes on invalid code: - [#1230](https://github.com/modularml/mojo/issues/1230), - [#1699](https://github.com/modularml/mojo/issues/1699), - [#1708](https://github.com/modularml/mojo/issues/1708) -- [#1223](https://github.com/modularml/mojo/issues/1223) - Crash when parametric + [#1230](https://github.com/modular/mojo/issues/1230), + [#1699](https://github.com/modular/mojo/issues/1699), + [#1708](https://github.com/modular/mojo/issues/1708) +- [#1223](https://github.com/modular/mojo/issues/1223) - Crash when parametric function is passed as (runtime) argument. The parser now errors out instead. -- [#1530](https://github.com/modularml/mojo/issues/1530) - Crash during +- [#1530](https://github.com/modular/mojo/issues/1530) - Crash during diagnostic emission for parameter deduction failure. -- [#1538](https://github.com/modularml/mojo/issues/1538) and [#1607]( - https://github.com/modularml/mojo/issues/1607) - Crash when returning type +- [#1538](https://github.com/modular/mojo/issues/1538) and [#1607]( + https://github.com/modular/mojo/issues/1607) - Crash when returning type value instead of instance of expected type. This is a common mistake and the error now includes a hint to point users to the problem. -- [#1613](https://github.com/modularml/mojo/issues/1613) - Wrong type name in +- [#1613](https://github.com/modular/mojo/issues/1613) - Wrong type name in error for incorrect `self` argument type in trait method declaration. -- [#1670](https://github.com/modularml/mojo/issues/1670) - Crash on implicit +- [#1670](https://github.com/modular/mojo/issues/1670) - Crash on implicit conversion in a global variable declaration. -- [#1741](https://github.com/modularml/mojo/issues/1741) - Mojo documentation +- [#1741](https://github.com/modular/mojo/issues/1741) - Mojo documentation generation doesn't show `inout`/`owned` on variadic arguments. -- [#1621](https://github.com/modularml/mojo/issues/1621) - VS Code does not +- [#1621](https://github.com/modular/mojo/issues/1621) - VS Code does not highlight `raises` and `capturing` in functional type expressions. -- [#1617](https://github.com/modularml/mojo/issues/1617) - VS Code does not +- [#1617](https://github.com/modular/mojo/issues/1617) - VS Code does not highlight `fn` in specific contexts. -- [#1740](https://github.com/modularml/mojo/issues/1740) - LSP shows unrelated +- [#1740](https://github.com/modular/mojo/issues/1740) - LSP shows unrelated info when hovering over a struct. -- [#1238](https://github.com/modularml/mojo/issues/1238) - File shadows Mojo +- [#1238](https://github.com/modular/mojo/issues/1238) - File shadows Mojo package path. -- [#1429](https://github.com/modularml/mojo/issues/1429) - Crash when using +- [#1429](https://github.com/modular/mojo/issues/1429) - Crash when using nested import statement. -- [#1322](https://github.com/modularml/mojo/issues/1322) - Crash when missing +- [#1322](https://github.com/modular/mojo/issues/1322) - Crash when missing types in variadic argument. -- [#1314](https://github.com/modularml/mojo/issues/1314) - Typecheck error when +- [#1314](https://github.com/modular/mojo/issues/1314) - Typecheck error when binding alias to parametric function with default argument. -- [#1248](https://github.com/modularml/mojo/issues/1248) - Crash when importing +- [#1248](https://github.com/modular/mojo/issues/1248) - Crash when importing from file the same name as another file in the search path. -- [#1354](https://github.com/modularml/mojo/issues/1354) - Crash when importing +- [#1354](https://github.com/modular/mojo/issues/1354) - Crash when importing from local package. -- [#1488](https://github.com/modularml/mojo/issues/1488) - Crash when setting +- [#1488](https://github.com/modular/mojo/issues/1488) - Crash when setting generic element field. -- [#1476](https://github.com/modularml/mojo/issues/1476) - Crash in interpreter +- [#1476](https://github.com/modular/mojo/issues/1476) - Crash in interpreter when calling functions in parameter context. -- [#1537](https://github.com/modularml/mojo/issues/1537) - Crash when copying +- [#1537](https://github.com/modular/mojo/issues/1537) - Crash when copying parameter value. -- [#1546](https://github.com/modularml/mojo/issues/1546) - Modify nested vector +- [#1546](https://github.com/modular/mojo/issues/1546) - Modify nested vector element crashes parser. -- [#1558](https://github.com/modularml/mojo/issues/1558) - Invalid import causes +- [#1558](https://github.com/modular/mojo/issues/1558) - Invalid import causes parser to crash. -- [#1562](https://github.com/modularml/mojo/issues/1562) - Crash when calling +- [#1562](https://github.com/modular/mojo/issues/1562) - Crash when calling parametric type member function. -- [#1577](https://github.com/modularml/mojo/issues/1577) - Crash when using +- [#1577](https://github.com/modular/mojo/issues/1577) - Crash when using unresolved package as a variable. -- [#1579](https://github.com/modularml/mojo/issues/1579) - Member access into +- [#1579](https://github.com/modular/mojo/issues/1579) - Member access into type instances causes a crash. -- [#1602](https://github.com/modularml/mojo/issues/1602) - Interpreter failure +- [#1602](https://github.com/modular/mojo/issues/1602) - Interpreter failure when constructing strings at compile time. -- [#1696](https://github.com/modularml/mojo/issues/1696) - Fixed an issue that +- [#1696](https://github.com/modular/mojo/issues/1696) - Fixed an issue that caused syntax highlighting to occasionally fail. -- [#1549](https://github.com/modularml/mojo/issues/1549) - Fixed an issue when +- [#1549](https://github.com/modular/mojo/issues/1549) - Fixed an issue when the shift amount is out of range in `SIMD.shift_left` and `SIMD.shift_right`. ## v0.7.0 (2024-01-25) @@ -4447,7 +4447,7 @@ experience without dedicated sugar. - The `simd_width` and `dtype` parameters of `polynomial_evaluate` have been switched. Based on the request in - [#1587](https://github.com/modularml/mojo/issues/1587), the + [#1587](https://github.com/modular/mojo/issues/1587), the `polynomial_evaluate` function has also been extended so that the `coefficients` parameter can take either a either a [`StaticTuple`](/mojo/stdlib/utils/static_tuple/StaticTuple) or a @@ -4458,50 +4458,50 @@ experience without dedicated sugar. ### 🛠️ Fixed -- [#1595](https://github.com/modularml/mojo/issues/1595) - Improve error message +- [#1595](https://github.com/modular/mojo/issues/1595) - Improve error message when trying to materialize `IntLiteral` in runtime code. - Raising an error from the initializer of a memory-only type now works correctly in the presence of complex control flow. Previously Mojo could run the destructor on `self` before it was initialized when exiting with an error. -- [#1096](https://github.com/modularml/mojo/issues/1096) - Improve warning +- [#1096](https://github.com/modular/mojo/issues/1096) - Improve warning messages for dead code in conditionals like `or` expressions. -- [#1419](https://github.com/modularml/mojo/issues/1419) - Fix assertion failure +- [#1419](https://github.com/modular/mojo/issues/1419) - Fix assertion failure with uninitialized lattice values. -- [#1402](https://github.com/modularml/mojo/issues/1402) - Fix movable trait not +- [#1402](https://github.com/modular/mojo/issues/1402) - Fix movable trait not detected on recursive struct implemented with `AnyPointer`. -- [#1399](https://github.com/modularml/mojo/issues/1399) - Fix parser crash when +- [#1399](https://github.com/modular/mojo/issues/1399) - Fix parser crash when a parameter type in a struct that implements a trait is misspelled. -- [#1152](https://github.com/modularml/mojo/issues/1152) - Allow mutable `self` +- [#1152](https://github.com/modular/mojo/issues/1152) - Allow mutable `self` argument when overloading operators using dunder methods. -- [#1493](https://github.com/modularml/mojo/issues/1493) - Fix crash in +- [#1493](https://github.com/modular/mojo/issues/1493) - Fix crash in `DynamicVector` copy constructor in certain situations. -- [#1316](https://github.com/modularml/mojo/issues/1316) - The `benchmark.keep` +- [#1316](https://github.com/modular/mojo/issues/1316) - The `benchmark.keep` function now properly handles vector types. -- [#1505](https://github.com/modularml/mojo/issues/1505) - The `simd.shuffle` +- [#1505](https://github.com/modular/mojo/issues/1505) - The `simd.shuffle` operation now works on 64 element permutations. -- [#1355](https://github.com/modularml/mojo/issues/1355) - Fix `String.find()` +- [#1355](https://github.com/modular/mojo/issues/1355) - Fix `String.find()` returning wrong value when starting index is non-zero. -- [#1367](https://github.com/modularml/mojo/issues/1367) - Fix `String.replace()` +- [#1367](https://github.com/modular/mojo/issues/1367) - Fix `String.replace()` returning incorrect results for multi-character search strings. -- [#1535](https://github.com/modularml/mojo/issues/1535) - Invalid error `field +- [#1535](https://github.com/modular/mojo/issues/1535) - Invalid error `field 'w.x.y' destroyed out of the middle of a value, preventing the overall value from being destroyed`. -- [#1475](https://github.com/modularml/mojo/issues/1475) - Assertion failure in +- [#1475](https://github.com/modular/mojo/issues/1475) - Assertion failure in nested loop. -- [#1591](https://github.com/modularml/mojo/issues/1591) - Assertion failure +- [#1591](https://github.com/modular/mojo/issues/1591) - Assertion failure when using `AnyType` struct member. -- [#1503](https://github.com/modularml/mojo/issues/1503) - Rename the mojo build +- [#1503](https://github.com/modular/mojo/issues/1503) - Rename the mojo build of LLDB to `mojo-lldb`, to prevent name collisions with the system's LLDB. -- [#1542](https://github.com/modularml/mojo/issues/1542) - `@unroll` does not +- [#1542](https://github.com/modular/mojo/issues/1542) - `@unroll` does not accept alias as unroll factor. -- [#1443](https://github.com/modularml/mojo/issues/1443) - Compiler crash on +- [#1443](https://github.com/modular/mojo/issues/1443) - Compiler crash on variadic list of traits. -- [#1604](https://github.com/modularml/mojo/issues/1604) - Variable of trivial +- [#1604](https://github.com/modular/mojo/issues/1604) - Variable of trivial type not destroyed by transferring ownership. -- [#1341](https://github.com/modularml/mojo/issues/1341) - Segmentation fault +- [#1341](https://github.com/modular/mojo/issues/1341) - Segmentation fault when passing closures around. -- [#217](https://github.com/modularml/mojo/issues/217) - Closure state is +- [#217](https://github.com/modular/mojo/issues/217) - Closure state is stack allocated. ## v0.6.1 (2023-12-18) @@ -4563,23 +4563,23 @@ experience without dedicated sugar. ### 🛠️ Fixed -- [#1421](https://github.com/modularml/mojo/issues/1421) - Fixed a crash when +- [#1421](https://github.com/modular/mojo/issues/1421) - Fixed a crash when using Tuples in the REPL. -- [#222](https://github.com/modularml/mojo/issues/222) - Generate an error +- [#222](https://github.com/modular/mojo/issues/222) - Generate an error for obviously self recursive functions. -- [#1408](https://github.com/modularml/mojo/issues/1408) - Fix overload +- [#1408](https://github.com/modular/mojo/issues/1408) - Fix overload resolution when candidates can return generic types. -- [#1413](https://github.com/modularml/mojo/issues/1413) and - [#1395](https://github.com/modularml/mojo/issues/1395) - Do not crash when +- [#1413](https://github.com/modular/mojo/issues/1413) and + [#1395](https://github.com/modular/mojo/issues/1395) - Do not crash when re-declaring a builtin declaration. -- [#1307](https://github.com/modularml/mojo/issues/1307) - Fix compatibility of +- [#1307](https://github.com/modular/mojo/issues/1307) - Fix compatibility of function signatures that only differ in default argument values. -- [#1380](https://github.com/modularml/mojo/issues/1380) - Fix printing +- [#1380](https://github.com/modular/mojo/issues/1380) - Fix printing of empty `String`. ## v0.6.0 (2023-12-04) @@ -4714,7 +4714,7 @@ experience without dedicated sugar. manual (now deprecated). Plus, the entire Mojo Manual and other Mojo docs are now [open-sourced on - GitHub](https://github.com/modularml/mojo/tree/main/docs), and we'd love + GitHub](https://github.com/modular/mojo/tree/main/docs), and we'd love to accept contributions to help us improve them! - Mojo now supports partial automatic parameterization: when a function is @@ -4882,7 +4882,7 @@ the previous "read to EOF" behavior when size is negative. - The Mojo Language Server now implements the Document Symbols request. IDEs use this to provide support for **Outline View** and **Go to Symbol**. This - addresses [Issue #960](https://github.com/modularml/mojo/issues/960). + addresses [Issue #960](https://github.com/modular/mojo/issues/960). - The Mojo Language Server now shows documentation when code completing modules or packages in `import` statements. @@ -4946,31 +4946,31 @@ the previous "read to EOF" behavior when size is negative. ### 🛠️ Fixed -- [#734](https://github.com/modularml/mojo/issues/734) - Consumption of struct +- [#734](https://github.com/modular/mojo/issues/734) - Consumption of struct works only for types with a `__del__` method. -- [#910](https://github.com/modularml/mojo/issues/910) - Parser crash when +- [#910](https://github.com/modular/mojo/issues/910) - Parser crash when using memory-only generic type as return of function that `raise`s. -- [#1060](https://github.com/modularml/mojo/issues/1060) - Mojo happily parses +- [#1060](https://github.com/modular/mojo/issues/1060) - Mojo happily parses code that has messed up indentation -- [#1159](https://github.com/modularml/mojo/issues/1159) - The language server +- [#1159](https://github.com/modular/mojo/issues/1159) - The language server doesn't warn about bad return type. -- [#1166](https://github.com/modularml/mojo/issues/1166) - warning: unreachable +- [#1166](https://github.com/modular/mojo/issues/1166) - warning: unreachable code after return statement with context manager -- [#1098](https://github.com/modularml/mojo/issues/1098) - The language server +- [#1098](https://github.com/modular/mojo/issues/1098) - The language server doesn't highlight properties of PythonObjects correctly. -- [#1153](https://github.com/modularml/mojo/issues/1153) - The language server +- [#1153](https://github.com/modular/mojo/issues/1153) - The language server crashes when parsing an invalid multi-nested module import. -- [#1236](https://github.com/modularml/mojo/issues/1236) - The language server +- [#1236](https://github.com/modular/mojo/issues/1236) - The language server doesn't show autocomplete in if statements. -- [#1246](https://github.com/modularml/mojo/issues/1246) - Warning diagnostics +- [#1246](https://github.com/modular/mojo/issues/1246) - Warning diagnostics are transient in the presence of caching. ### Known Issue @@ -5225,32 +5225,32 @@ the previous "read to EOF" behavior when size is negative. ### 🛠️ Fixed -- [#532](https://github.com/modularml/mojo/issues/532) - Compiler optimizing +- [#532](https://github.com/modular/mojo/issues/532) - Compiler optimizing while True loop away -- [#760](https://github.com/modularml/mojo/issues/760) - Compilation error: +- [#760](https://github.com/modular/mojo/issues/760) - Compilation error: 'hlcf.for.yield' op specifies 0 branch inputs but target expected 1 along control-flow edge from here -- [#849](https://github.com/modularml/mojo/issues/849) - The `Tensor` type is +- [#849](https://github.com/modular/mojo/issues/849) - The `Tensor` type is now initialized with zeros at construction time. -- [#912](https://github.com/modularml/mojo/issues/912) - Invalid load for +- [#912](https://github.com/modular/mojo/issues/912) - Invalid load for `__get_address_as_lvalue`. -- [#916](https://github.com/modularml/mojo/issues/916) - Parser crash when +- [#916](https://github.com/modular/mojo/issues/916) - Parser crash when specifying default values for `inout` arguments. -- [#943](https://github.com/modularml/mojo/issues/943) - Mojo hangs if you +- [#943](https://github.com/modular/mojo/issues/943) - Mojo hangs if you use continue in the nested loop -- [#957](https://github.com/modularml/mojo/issues/957) - Parser crash when a +- [#957](https://github.com/modular/mojo/issues/957) - Parser crash when a function call with variadic arguments of a memory-only type is evaluated at compile time. -- [#990](https://github.com/modularml/mojo/issues/990) - Fixes rounding +- [#990](https://github.com/modular/mojo/issues/990) - Fixes rounding issue with floor division with negative numerator. -- [#1018](https://github.com/modularml/mojo/issues/1018) - In some cases the +- [#1018](https://github.com/modular/mojo/issues/1018) - In some cases the sort function was returning invalid results. This release fixes some of these corner cases. -- [#1010](https://github.com/modularml/mojo/issues/1010) - Initializing tensor +- [#1010](https://github.com/modular/mojo/issues/1010) - Initializing tensor in alias declaration results in crash. -- [#1110](https://github.com/modularml/mojo/issues/1110) - The `time.now()` +- [#1110](https://github.com/modular/mojo/issues/1110) - The `time.now()` function now returns nanoseconds across all operating systems. -- [#1115](https://github.com/modularml/mojo/issues/1115) - cannot load +- [#1115](https://github.com/modular/mojo/issues/1115) - cannot load non-register passable type into SSA register. ## v0.4.0 for Mac (2023-10-19) @@ -5429,33 +5429,33 @@ the previous "read to EOF" behavior when size is negative. ### 🛠️ Fixed -- [#794](https://github.com/modularml/mojo/issues/794) - Parser crash when +- [#794](https://github.com/modular/mojo/issues/794) - Parser crash when using the `in` operator. -- [#936](https://github.com/modularml/mojo/issues/936) - The `Int` constructor +- [#936](https://github.com/modular/mojo/issues/936) - The `Int` constructor now accepts other `Int` instances. -- [#921](https://github.com/modularml/mojo/issues/921) - Better error message +- [#921](https://github.com/modular/mojo/issues/921) - Better error message when running `mojo` on a module with no `main` function. -- [#556](https://github.com/modularml/mojo/issues/556) - UInt64s are now +- [#556](https://github.com/modular/mojo/issues/556) - UInt64s are now printed correctly. -- [#804](https://github.com/modularml/mojo/issues/804) - Emit error instead of +- [#804](https://github.com/modular/mojo/issues/804) - Emit error instead of crashing when passing variadic arguments of unsupported types. -- [#833](https://github.com/modularml/mojo/issues/833) - Parser crash when +- [#833](https://github.com/modular/mojo/issues/833) - Parser crash when assigning module value. -- [#752](https://github.com/modularml/mojo/issues/752) - Parser crash when +- [#752](https://github.com/modular/mojo/issues/752) - Parser crash when calling async def. -- [#711](https://github.com/modularml/mojo/issues/711) - The overload resolution +- [#711](https://github.com/modular/mojo/issues/711) - The overload resolution logic now correctly prioritizes instance methods over static methods (if candidates are an equally good match otherwise), and no longer crashed if a static method has a `Self` type as its first argument. -- [#859](https://github.com/modularml/mojo/issues/859) - Fix confusing error and +- [#859](https://github.com/modular/mojo/issues/859) - Fix confusing error and documentation of the `rebind` builtin. -- [#753](https://github.com/modularml/mojo/issues/753) - Direct use of LLVM +- [#753](https://github.com/modular/mojo/issues/753) - Direct use of LLVM dialect produces strange errors in the compiler. -- [#926](https://github.com/modularml/mojo/issues/926) - Fixes an issue that +- [#926](https://github.com/modular/mojo/issues/926) - Fixes an issue that occurred when a function with a return type of `StringRef` raised an error. When the function raised an error, it incorrectly returned the string value of that error. -- [#536](https://github.com/modularml/mojo/issues/536) - Report More information +- [#536](https://github.com/modular/mojo/issues/536) - Report More information on python exception. ## v0.3.1 (2023-09-28) @@ -5466,15 +5466,15 @@ installing the previous versions of the SDK, this release may be for you. ### 🛠️ Fixed -- [#538](https://github.com/modularml/mojo/issues/538) - Installation hangs +- [#538](https://github.com/modular/mojo/issues/538) - Installation hangs during the testing phase. This issue occurs on machines with a low number of CPU cores, such as free AWS EC2 instances and GitHub Codespaces. -- [#590](https://github.com/modularml/mojo/issues/590) - Installation fails +- [#590](https://github.com/modular/mojo/issues/590) - Installation fails with a “failed to run python” message. -- [#672](https://github.com/modularml/mojo/issues/672) - Language server hangs +- [#672](https://github.com/modular/mojo/issues/672) - Language server hangs on code completion. Related to #538, this occurs on machines with a low number of CPU cores. -- [#913](https://github.com/modularml/mojo/issues/913) - In the REPL and Jupyter +- [#913](https://github.com/modular/mojo/issues/913) - In the REPL and Jupyter notebooks, inline comments were being parsed incorrectly. ## v0.3.0 (2023-09-21) @@ -5576,7 +5576,7 @@ Code](https://marketplace.visualstudio.com/items?itemName=modular-mojotools.vsco - The Mojo Language Server now supports top-level code completions, enabling completion when typing a reference to a variable, type, etc. This resolves - [#679](https://github.com/modularml/mojo/issues/679). + [#679](https://github.com/modular/mojo/issues/679). - The Mojo REPL now colorizes the resultant variables to help distinguish input expressions from the output variables. @@ -5615,19 +5615,19 @@ Code](https://marketplace.visualstudio.com/items?itemName=modular-mojotools.vsco ### 🛠️ Fixed -- [#503](https://github.com/modularml/mojo/issues/503) - Improve error message +- [#503](https://github.com/modular/mojo/issues/503) - Improve error message for failure lowering `kgen.param.constant`. -- [#554](https://github.com/modularml/mojo/issues/554) - Alias of static tuple +- [#554](https://github.com/modular/mojo/issues/554) - Alias of static tuple fails to expand. -- [#500](https://github.com/modularml/mojo/issues/500) - Call expansion failed +- [#500](https://github.com/modular/mojo/issues/500) - Call expansion failed due to verifier error. -- [#422](https://github.com/modularml/mojo/issues/422) - Incorrect comment +- [#422](https://github.com/modular/mojo/issues/422) - Incorrect comment detection in multiline strings. -- [#729](https://github.com/modularml/mojo/issues/740) - Improve messaging on +- [#729](https://github.com/modular/mojo/issues/740) - Improve messaging on how to exit the REPL. -- [#756](https://github.com/modularml/mojo/issues/756) - Fix initialization +- [#756](https://github.com/modular/mojo/issues/756) - Fix initialization errors of the VS Code extension. -- [#575](https://github.com/modularml/mojo/issues/575) - Build LLDB/REPL with +- [#575](https://github.com/modular/mojo/issues/575) - Build LLDB/REPL with libedit for a nicer editing experience in the terminal. ## v0.2.1 (2023-09-07) @@ -5690,17 +5690,17 @@ All earlier releases were considered version 0.1. been changed to enable type inference. Now it's possible to write `rotate_right[shift_val](simd_val)` and have the `dtype` and `simd_width` inferred from the argument. This addresses - [Issue #528](https://github.com/modularml/mojo/issues/528). + [Issue #528](https://github.com/modular/mojo/issues/528). ### 🛠️ Fixed - Fixed a bug causing the parser to crash when the `with` statement was written without a colon. - This addresses [Issue #529](https://github.com/modularml/mojo/issues/529). + This addresses [Issue #529](https://github.com/modular/mojo/issues/529). - Incorrect imports no longer crash when there are other errors at the top level of a module. This fixes [Issue - #531](https://github.com/modularml/mojo/issues/531). + #531](https://github.com/modular/mojo/issues/531). ## August 2023 @@ -5775,15 +5775,15 @@ All earlier releases were considered version 0.1. #### 🛠️ Fixed - Fixed issues with print formatting for `DType.uint16` and `DType.int16`. -- [Issue #499](https://github.com/modularml/mojo/issues/499) - Two new +- [Issue #499](https://github.com/modular/mojo/issues/499) - Two new `rotate_right` and `rotate_left` functions have been added to the SIMD module. -- [Issue #429](https://github.com/modularml/mojo/issues/429) - You can now +- [Issue #429](https://github.com/modular/mojo/issues/429) - You can now construct a `Bool` from a `SIMD` type whose element-type is `DType.bool`. -- [Issue #350](https://github.com/modularml/mojo/issues/350) - Confusing Matrix +- [Issue #350](https://github.com/modular/mojo/issues/350) - Confusing Matrix implementation -- [Issue #349](https://github.com/modularml/mojo/issues/349) - Missing load_tr +- [Issue #349](https://github.com/modular/mojo/issues/349) - Missing load_tr in struct Matrix -- [Issue #501](https://github.com/modularml/mojo/issues/501) - Missing syntax +- [Issue #501](https://github.com/modular/mojo/issues/501) - Missing syntax error messages in Python expressions. ### 2023-08-09 @@ -5847,7 +5847,7 @@ All earlier releases were considered version 0.1. #### 🛠️ Fixed -- [Issue #53](https://github.com/modularml/mojo/issues/53) - `Int` now +- [Issue #53](https://github.com/modular/mojo/issues/53) - `Int` now implements true division with the `/` operator. Similar to Python, this returns a 64-bit floating point number. The corresponding in-place operator, `/=`, has the same semantics as `//=`. @@ -5887,10 +5887,10 @@ All earlier releases were considered version 0.1. #### 🛠️ Fixed -- [Issue #437](https://github.com/modularml/mojo/issues/437) - Range can now +- [Issue #437](https://github.com/modular/mojo/issues/437) - Range can now be instantiated with a PythonObject. -- [Issue #288](https://github.com/modularml/mojo/issues/288) - Python strings +- [Issue #288](https://github.com/modular/mojo/issues/288) - Python strings can now be safely copied. ### 2023-07-20 @@ -5899,7 +5899,7 @@ All earlier releases were considered version 0.1. - Mojo now includes a `Limits` module, which contains functions to get the max and min values representable by a type, as requested in [Issue - #51](https://github.com/modularml/mojo/issues/51). The following functions + #51](https://github.com/modular/mojo/issues/51). The following functions moved from `Math` to `Limits`: `inf()`, `neginf()`, `isinf()`, `isfinite()`. - Mojo decorators are now distinguished between "signature" and "body" @@ -5966,14 +5966,14 @@ All earlier releases were considered version 0.1. - Reverted the feature from 2023-02-13 that allowed unqualified struct members. Use the `Self` keyword to conveniently access struct members with bound parameters instead. This was required to fix - [Issue #260](https://github.com/modularml/mojo/issues/260). + [Issue #260](https://github.com/modular/mojo/issues/260). - Updated the RayTracing notebook: added step 5 to create specular lighting for more realistic images and step 6 to add a background image. #### 🛠️ Fixed -- [Issue #260](https://github.com/modularml/mojo/issues/260) - Definitions +- [Issue #260](https://github.com/modular/mojo/issues/260) - Definitions inside structs no longer shadow definitions outside of struct definitions. ### 2023-07-12 @@ -6010,7 +6010,7 @@ All earlier releases were considered version 0.1. - The walrus operator now works in if/while statements without parentheses, e.g. `if x := function():`. -- [Issue #428](https://github.com/modularml/mojo/issues/428) - The +- [Issue #428](https://github.com/modular/mojo/issues/428) - The `FloatLiteral` and `SIMD` types now support conversion to `Int` via the `to_int` or `__int__` method calls. The behavior matches that of Python, which rounds towards zero. @@ -6040,21 +6040,21 @@ All earlier releases were considered version 0.1. #### 🛠️ Fixed -- [Issue #253](https://github.com/modularml/mojo/issues/253) - Issue +- [Issue #253](https://github.com/modular/mojo/issues/253) - Issue when accessing a struct member alias without providing parameters. -- [Issue #404](https://github.com/modularml/mojo/issues/404) - The docs now use +- [Issue #404](https://github.com/modular/mojo/issues/404) - The docs now use `snake_case` for variable names, which more closely conforms to Python's style. -- [Issue #379](https://github.com/modularml/mojo/issues/379) - Tuple +- [Issue #379](https://github.com/modular/mojo/issues/379) - Tuple limitations have been addressed and multiple return values are now supported, even without parentheses. -- [Issue #347](https://github.com/modularml/mojo/issues/347) - Tuples no longer +- [Issue #347](https://github.com/modular/mojo/issues/347) - Tuples no longer require parentheses. -- [Issue #320](https://github.com/modularml/mojo/issues/320) - Python objects +- [Issue #320](https://github.com/modular/mojo/issues/320) - Python objects are now traversable via `for` loops. ## June 2023 @@ -6080,18 +6080,18 @@ All earlier releases were considered version 0.1. #### 🛠️ Fixed -- [Issue #229](https://github.com/modularml/mojo/issues/229) - Issue when +- [Issue #229](https://github.com/modular/mojo/issues/229) - Issue when throwing an exception from `__init__` before all fields are initialized. -- [Issue #74](https://github.com/modularml/mojo/issues/74) - Struct +- [Issue #74](https://github.com/modular/mojo/issues/74) - Struct definition with recursive reference crashes. -- [Issue #285](https://github.com/modularml/mojo/issues/285) - The +- [Issue #285](https://github.com/modular/mojo/issues/285) - The [`TargetInfo`](/mojo/stdlib/sys/info) module now includes `is_little_endian()` and `is_big_endian()` to check if the target host uses either little or big endian. -- [Issue #254](https://github.com/modularml/mojo/issues/254) - Parameter name +- [Issue #254](https://github.com/modular/mojo/issues/254) - Parameter name shadowing in nested scopes is now handled correctly. ### 2023-06-21 @@ -6148,14 +6148,14 @@ only in declared parameter names, e.g. the following now works correctly: fn foobar[w: Int, S: DType]() -> SIMD[S, w]: ... ``` -- [Issue #219](https://github.com/modularml/mojo/issues/219) - Issue when +- [Issue #219](https://github.com/modular/mojo/issues/219) - Issue when redefining a function and a struct defined in the same cell. -- [Issue #355](https://github.com/modularml/mojo/issues/355) - The loop order +- [Issue #355](https://github.com/modular/mojo/issues/355) - The loop order in the Matmul notebook for Python and naive mojo have been reordered for consistency. The loop order now follows (M, K, N) ordering. -- [Issue #309](https://github.com/modularml/mojo/issues/309) - Use snake case +- [Issue #309](https://github.com/modular/mojo/issues/309) - Use snake case naming within the testing package and move the asserts out of the TestSuite struct. @@ -6177,11 +6177,11 @@ only in declared parameter names, e.g. the following now works correctly: #### 🛠️ Fixed -- [Issue #354](https://github.com/modularml/mojo/issues/354) - Returning a tuple +- [Issue #354](https://github.com/modular/mojo/issues/354) - Returning a tuple doesn't work even with parens. -- [Issue #365](https://github.com/modularml/mojo/issues/365) - Copy-paste error +- [Issue #365](https://github.com/modular/mojo/issues/365) - Copy-paste error in `FloatLiteral` docs. -- [Issue #357](https://github.com/modularml/mojo/issues/357) - Crash when +- [Issue #357](https://github.com/modular/mojo/issues/357) - Crash when missing input parameter to variadic parameter struct member function. ### 2023-06-07 @@ -6198,7 +6198,7 @@ only in declared parameter names, e.g. the following now works correctly: - Mojo Playground no longer includes the following Python packages (due to size, compute costs, and - [environment complications](https://github.com/modularml/mojo/issues/300)): + [environment complications](https://github.com/modular/mojo/issues/300)): `torch`, `tensorflow`, `keras`, `transformers`. #### 🦋 Changed @@ -6206,19 +6206,19 @@ only in declared parameter names, e.g. the following now works correctly: - The data types and scalar names now conform to the naming convention used by numpy. So we use `Int32` instead of `SI32`, similarly using `Float32` instead of `F32`. Closes - [Issue #152](https://github.com/modularml/mojo/issues/152). + [Issue #152](https://github.com/modular/mojo/issues/152). #### 🛠️ Fixed -- [Issue #287](https://github.com/modularml/mojo/issues/287) - computed +- [Issue #287](https://github.com/modular/mojo/issues/287) - computed lvalues don't handle raising functions correctly -- [Issue #318](https://github.com/modularml/mojo/issues/318) - Large integers +- [Issue #318](https://github.com/modular/mojo/issues/318) - Large integers are not being printed correctly -- [Issue #326](https://github.com/modularml/mojo/issues/326) - Float modulo +- [Issue #326](https://github.com/modular/mojo/issues/326) - Float modulo operator is not working as expected -- [Issue #282](https://github.com/modularml/mojo/issues/282) - Default arguments +- [Issue #282](https://github.com/modular/mojo/issues/282) - Default arguments are not working as expected -- [Issue #271](https://github.com/modularml/mojo/issues/271) - Confusing error +- [Issue #271](https://github.com/modular/mojo/issues/271) - Confusing error message when converting between function types with different result semantics ## May 2023 @@ -6228,7 +6228,7 @@ only in declared parameter names, e.g. the following now works correctly: #### ⭐️ New - Mojo Playground now includes the following Python packages (in response to - [popular demand](https://github.com/modularml/mojo/discussions/173)): + [popular demand](https://github.com/modular/mojo/discussions/173)): `torch`, `tensorflow`, `polars`, `opencv-python`, `keras`, `Pillow`, `plotly`, `seaborn`, `sympy`, `transformers`. @@ -6292,9 +6292,9 @@ only in declared parameter names, e.g. the following now works correctly: #### 🛠️ Fixed -- [Issue #231](https://github.com/modularml/mojo/issues/231) - Unexpected error +- [Issue #231](https://github.com/modular/mojo/issues/231) - Unexpected error when a Python expression raises an exception -- [Issue #119](https://github.com/modularml/mojo/issues/119) - The REPL fails +- [Issue #119](https://github.com/modular/mojo/issues/119) - The REPL fails when a python variable is redefined ### 2023-05-24 @@ -6319,39 +6319,39 @@ only in declared parameter names, e.g. the following now works correctly: #### 🛠️ Fixed -- [Issue #204](https://github.com/modularml/mojo/issues/204) - Mojo REPL +- [Issue #204](https://github.com/modular/mojo/issues/204) - Mojo REPL crash when returning a String at compile-time -- [Issue #143](https://github.com/modularml/mojo/issues/143) - synthesized +- [Issue #143](https://github.com/modular/mojo/issues/143) - synthesized init in `@register_passable` type doesn't get correct convention. -- [Issue #201](https://github.com/modularml/mojo/issues/201) - String literal +- [Issue #201](https://github.com/modular/mojo/issues/201) - String literal concatenation is too eager. -- [Issue #209](https://github.com/modularml/mojo/issues/209) - [QoI] Terrible +- [Issue #209](https://github.com/modular/mojo/issues/209) - [QoI] Terrible error message trying to convert a type to itself. -- [Issue #32](https://github.com/modularml/mojo/issues/32) - Include struct +- [Issue #32](https://github.com/modular/mojo/issues/32) - Include struct fields in docgen -- [Issue #50](https://github.com/modularml/mojo/issues/50) - Int to string +- [Issue #50](https://github.com/modular/mojo/issues/50) - Int to string conversion crashes due to buffer overflow -- [Issue #132](https://github.com/modularml/mojo/issues/132) - PythonObject +- [Issue #132](https://github.com/modular/mojo/issues/132) - PythonObject `to_int` method has a misleading name -- [Issue #189](https://github.com/modularml/mojo/issues/189) - PythonObject bool +- [Issue #189](https://github.com/modular/mojo/issues/189) - PythonObject bool conversion is incorrect -- [Issue #65](https://github.com/modularml/mojo/issues/65) - Add SIMD +- [Issue #65](https://github.com/modular/mojo/issues/65) - Add SIMD constructor from Bool -- [Issue #153](https://github.com/modularml/mojo/issues/153) - Meaning of +- [Issue #153](https://github.com/modular/mojo/issues/153) - Meaning of `Time.now` function result is unclear -- [Issue #165](https://github.com/modularml/mojo/issues/165) - Type in +- [Issue #165](https://github.com/modular/mojo/issues/165) - Type in `Pointer.free` documentation -- [Issue #210](https://github.com/modularml/mojo/issues/210) - Parameter results +- [Issue #210](https://github.com/modular/mojo/issues/210) - Parameter results cannot be declared outside top-level in function -- [Issue #214](https://github.com/modularml/mojo/issues/214) - Pointer offset +- [Issue #214](https://github.com/modular/mojo/issues/214) - Pointer offset calculations at compile-time are incorrect -- [Issue #115](https://github.com/modularml/mojo/issues/115) - Float printing +- [Issue #115](https://github.com/modular/mojo/issues/115) - Float printing does not include the right number of digits -- [Issue #202](https://github.com/modularml/mojo/issues/202) - +- [Issue #202](https://github.com/modular/mojo/issues/202) - `kgen.unreachable` inside nested functions is illegal -- [Issue #235](https://github.com/modularml/mojo/issues/235) - Crash when +- [Issue #235](https://github.com/modular/mojo/issues/235) - Crash when register passable struct field is not register passable -- [Issue #237](https://github.com/modularml/mojo/issues/237) - Parameter +- [Issue #237](https://github.com/modular/mojo/issues/237) - Parameter closure sharp edges are not documented ### 2023-05-16 @@ -6366,16 +6366,16 @@ only in declared parameter names, e.g. the following now works correctly: #### 🛠️ Fixed -- [Issue #98](https://github.com/modularml/mojo/issues/98): +- [Issue #98](https://github.com/modular/mojo/issues/98): Incorrect error with lifetime tracking in loop. -- [Issue #49](https://github.com/modularml/mojo/issues/49): Type inference +- [Issue #49](https://github.com/modular/mojo/issues/49): Type inference issue (?) in 'ternary assignment' operation (FloatLiteral vs. 'SIMD[f32, 1]'). -- [Issue #48](https://github.com/modularml/mojo/issues/48): +- [Issue #48](https://github.com/modular/mojo/issues/48): and/or don't work with memory-only types. -- [Issue #11](https://github.com/modularml/mojo/issues/11): `setitem` Support +- [Issue #11](https://github.com/modular/mojo/issues/11): `setitem` Support for `PythonObject`. ### 2023-05-11 @@ -6393,7 +6393,7 @@ only in declared parameter names, e.g. the following now works correctly: - The "byref" syntax with the `&` sigil has changed to use an `inout` keyword to be more similar to the `borrowed` and `owned` syntax in arguments. - Please see [Issue #7](https://github.com/modularml/mojo/issues/7) for more + Please see [Issue #7](https://github.com/modular/mojo/issues/7) for more information. - Optimized the Matrix multiplication implementation in the notebook. @@ -6410,10 +6410,10 @@ from "consume" to "transfer." - Fixed missing overloads for `Testing.assertEqual` so that they work on `Integer` and `String` values. -- [Issue #6](https://github.com/modularml/mojo/issues/6): +- [Issue #6](https://github.com/modular/mojo/issues/6): Playground stops evaluating cells when a simple generic is defined. -- [Issue #18](https://github.com/modularml/mojo/issues/18): +- [Issue #18](https://github.com/modular/mojo/issues/18): Memory leak in Python interoperability was removed. ### 2023-05-02 diff --git a/docs/faq.md b/docs/faq.md index d3e11a6a59..e89d8d9b0f 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -147,7 +147,7 @@ develop AI algorithms, but as we grow Mojo into a superset of Python, you can use it for other things like HPC, data transformations, writing pre/post processing operations, and much more. For examples of how Mojo can be used for other general programming tasks, see our [Mojo -examples](https://github.com/modularml/mojo/tree/main/examples). +examples](https://github.com/modular/mojo/tree/main/examples). ### Is Mojo interpreted or compiled? @@ -245,7 +245,7 @@ multiplication](https://www.modular.com/blog/the-worlds-fastest-unified-matrix-m ### Mojo’s matmul performance in the notebook doesn’t seem that great. What’s going on? The [Mojo Matmul -notebook](https://github.com/modularml/mojo/blob/main/examples/notebooks/Matmul.ipynb) +notebook](https://github.com/modular/mojo/blob/main/examples/notebooks/Matmul.ipynb) uses matrix multiplication to show off some Mojo features in a scenario that you would never attempt in pure Python. So that implementation is like a “toy” matmul implementation and it doesn’t measure up to the state of the art. @@ -282,7 +282,7 @@ Yes, but it's different. When we first announced Mojo, it was available only through login, in a JupyterLab environment. Now that Mojo is available for local development, we've shut down that service (you can instead [run Mojo notebooks -locally](https://github.com/modularml/mojo/tree/main/examples/notebooks#readme)). +locally](https://github.com/modular/mojo/tree/main/examples/notebooks#readme)). The new [Mojo Playground](/mojo/playground) is built into the docs website and does not require login. @@ -301,7 +301,7 @@ and does not require login. using buttons in the Playground toolbar. - There might be some bugs. Please [report issues and feedback on - GitHub](https://github.com/modularml/mojo/issues/new/choose). + GitHub](https://github.com/modular/mojo/issues/new/choose). ### What are the license terms for the SDK? diff --git a/docs/manual/basics.mdx b/docs/manual/basics.mdx index edeb731899..301dfdb90e 100644 --- a/docs/manual/basics.mdx +++ b/docs/manual/basics.mdx @@ -77,7 +77,7 @@ def main(): You don't need a `main()` function when coding in the [REPL](/mojo/manual/get-started#2-run-code-in-the-repl) or in a [Jupyter -notebook](https://github.com/modularml/mojo/tree/main/examples/notebooks#readme). +notebook](https://github.com/modular/mojo/tree/main/examples/notebooks#readme). ::: @@ -390,14 +390,14 @@ here is [Functions](/mojo/manual/functions). Otherwise, here are some other resources to check out: * If you want to experiment with some code, clone [the Mojo - repo](https://github.com/modularml/mojo/) to try our code examples: + repo](https://github.com/modular/mojo/) to try our code examples: ```sh - git clone https://github.com/modularml/mojo.git + git clone https://github.com/modular/mojo.git ``` In addition to several `.mojo` examples, the repo includes [Jupyter - notebooks](https://github.com/modularml/mojo/tree/main/examples/notebooks#readme) + notebooks](https://github.com/modular/mojo/tree/main/examples/notebooks#readme) that teach advanced Mojo features. * To see all the available Mojo APIs, check out the [Mojo standard library diff --git a/docs/manual/get-started.mdx b/docs/manual/get-started.mdx index 469542567d..48a156b09f 100644 --- a/docs/manual/get-started.mdx +++ b/docs/manual/get-started.mdx @@ -2,7 +2,7 @@ title: "Get started with Mojo" sidebar_label: "Tutorial: Get started with Mojo" description: "Install Mojo and learn the language basics by building a complete Mojo program" -github_url: https://github.com/modularml/mojo/tree/nightly/examples/life +github_url: https://github.com/modular/mojo/tree/nightly/examples/life --- import GetMagic from '@site/src/includes/get_magic.mdx'; @@ -28,7 +28,7 @@ tried to keep the explanations simple, and we included links along the way for you to go learn more about each topic. And if you just want to see the finished code, you can [get it on -GitHub](https://github.com/modularml/mojo/tree/nightly/examples/life). +GitHub](https://github.com/modular/mojo/tree/nightly/examples/life). ## 1. Create a Mojo project with `magic` diff --git a/docs/manual/operators.mdx b/docs/manual/operators.mdx index a11cbd2cd8..345a089df6 100644 --- a/docs/manual/operators.mdx +++ b/docs/manual/operators.mdx @@ -1030,7 +1030,7 @@ operations like printing complex values. We'll also allow mixing `Complex` and This example builds our `Complex` struct incrementally. You can also find the [complete example in the public Mojo GitHub -repo](https://github.com/modularml/mojo/tree/main/examples/operators). +repo](https://github.com/modular/mojo/tree/main/examples/operators). :::note diff --git a/docs/manual/parameters/index.mdx b/docs/manual/parameters/index.mdx index fae5e5f72c..3522248d40 100644 --- a/docs/manual/parameters/index.mdx +++ b/docs/manual/parameters/index.mdx @@ -140,7 +140,7 @@ Mojo's support for generics is still early. You can write generic functions like this using traits and parameters. You can also write generic collections like `List` and `Dict`. If you're interested in learning how these types work, you can find the source code for the standard library collection types -[on GitHub](https://github.com/modularml/mojo/blob/nightly/stdlib/src/collections/). +[on GitHub](https://github.com/modular/mojo/blob/nightly/stdlib/src/collections/). ## Parameterized structs diff --git a/docs/manual/values/lifetimes.mdx b/docs/manual/values/lifetimes.mdx index baf5f1e860..7e6499f252 100644 --- a/docs/manual/values/lifetimes.mdx +++ b/docs/manual/values/lifetimes.mdx @@ -425,7 +425,7 @@ for i in range(len(nums)): (You can find the code for the `List` iterator in the [Mojo -repo](https://github.com/modularml/mojo/blob/main/stdlib/src/collections/list.mojo#L63).) +repo](https://github.com/modular/mojo/blob/main/stdlib/src/collections/list.mojo#L63).) #### Parametric mutability of return values diff --git a/docs/notebooks/index.mdx b/docs/notebooks/index.mdx index 636b8e4a25..0b88575238 100644 --- a/docs/notebooks/index.mdx +++ b/docs/notebooks/index.mdx @@ -17,7 +17,7 @@ listing: --- The following pages are rendered from the Jupyter notebooks that are [available -on GitHub](https://github.com/modularml/mojo/tree/main/examples/notebooks). +on GitHub](https://github.com/modular/mojo/tree/main/examples/notebooks).


diff --git a/docs/roadmap.md b/docs/roadmap.md index 52a20d257b..3d13595a66 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -29,7 +29,7 @@ In the near-term, we will **not** prioritize "general goodness" work such as: - Tackling broad Python ecosystem challenges like packaging. If you have encountered any bugs with current Mojo behavior, please -[submit an issue on GitHub](https://github.com/modularml/mojo/issues). +[submit an issue on GitHub](https://github.com/modular/mojo/issues). If you have ideas about how to improve the core Mojo features, we prefer that you first look for similar topics or start a new conversation about it @@ -148,7 +148,7 @@ When we get here, we will discuss what the right default is: for example, is full Python hash-table dynamism the default? Or do we use a more efficient model by default (e.g. vtable-based dispatch and explicitly declared stored properties) and allow opt'ing into dynamism with a `@dynamic` decorator on the -class. More discussion is [in this proposal](https://github.com/modularml/mojo/blob/main/proposals/mojo-and-dynamism.md). +class. More discussion is [in this proposal](https://github.com/modular/mojo/blob/main/proposals/mojo-and-dynamism.md). ## C/C++ Interop diff --git a/docs/tools/debugging.mdx b/docs/tools/debugging.mdx index 6672ded32d..2a761c6f88 100644 --- a/docs/tools/debugging.mdx +++ b/docs/tools/debugging.mdx @@ -26,7 +26,7 @@ There are several ways to start a debug session in VS Code. To start debugging, you'll need to have a Mojo project to debug. There are a number of examples ranging from simple to complex in the [Mojo repo on -GitHub](https://github.com/modularml/mojo). +GitHub](https://github.com/modular/mojo). :::note **VS Code veteran?** diff --git a/examples/README.md b/examples/README.md index 63647c925c..6298b35171 100644 --- a/examples/README.md +++ b/examples/README.md @@ -11,7 +11,7 @@ Mojo product [page](https://www.modular.com/mojo). Git clone the repository of Mojo samples using the command below: ```bash -git clone https://github.com/modularml/mojo.git +git clone https://github.com/modular/mojo.git ``` ## Running diff --git a/examples/check_mod.py b/examples/check_mod.py index 26e99dc419..5bcfbfa65e 100644 --- a/examples/check_mod.py +++ b/examples/check_mod.py @@ -18,7 +18,7 @@ FIX = """ ------------------------------------------------------------------------- fix following the steps here: - https://github.com/modularml/mojo/issues/1085#issuecomment-1771403719 + https://github.com/modular/mojo/issues/1085#issuecomment-1771403719 ------------------------------------------------------------------------- """ diff --git a/examples/notebooks/Mandelbrot.ipynb b/examples/notebooks/Mandelbrot.ipynb index 4dcec04c6a..486947c741 100644 --- a/examples/notebooks/Mandelbrot.ipynb +++ b/examples/notebooks/Mandelbrot.ipynb @@ -175,7 +175,7 @@ "fix = \"\"\"\n", "-------------------------------------------------------------------------\n", "fix following the steps here:\n", - " https://github.com/modularml/mojo/issues/1085#issuecomment-1771403719\n", + " https://github.com/modular/mojo/issues/1085#issuecomment-1771403719\n", "-------------------------------------------------------------------------\n", "\"\"\"\n", "\n", diff --git a/examples/notebooks/Matmul.ipynb b/examples/notebooks/Matmul.ipynb index 239654bf5e..52f7e232f1 100644 --- a/examples/notebooks/Matmul.ipynb +++ b/examples/notebooks/Matmul.ipynb @@ -154,7 +154,7 @@ "fix = \"\"\"\n", "-------------------------------------------------------------------------\n", "fix following the steps here:\n", - " https://github.com/modularml/mojo/issues/1085#issuecomment-1771403719\n", + " https://github.com/modular/mojo/issues/1085#issuecomment-1771403719\n", "-------------------------------------------------------------------------\n", "\"\"\"\n", "\n", diff --git a/examples/notebooks/RayTracing.ipynb b/examples/notebooks/RayTracing.ipynb index ea37cea474..940004de96 100644 --- a/examples/notebooks/RayTracing.ipynb +++ b/examples/notebooks/RayTracing.ipynb @@ -166,7 +166,7 @@ "fix = \"\"\"\n", "-------------------------------------------------------------------------\n", "fix following the steps here:\n", - " https://github.com/modularml/mojo/issues/1085#issuecomment-1771403719\n", + " https://github.com/modular/mojo/issues/1085#issuecomment-1771403719\n", "-------------------------------------------------------------------------\n", "\"\"\"\n", "\n", diff --git a/proposals/byte-as-uint8.md b/proposals/byte-as-uint8.md index 7ff764a60e..9881574ccd 100644 --- a/proposals/byte-as-uint8.md +++ b/proposals/byte-as-uint8.md @@ -40,5 +40,5 @@ and 78 results for `DTypePointer[DType.int8]`. Replacing `DTypePointer[DType.int8]` with `DTypePointer[DType.uint8]` and `Pointer[Int8]` with `Pointer[UInt8]` on case by case bases is a substantial refactoring effort, but it will prevent a certain class of logical bugs (see -). As it is a breaking change in +). As it is a breaking change in sense of API design, it is sensible to do the refactoring as soon as possible. diff --git a/proposals/inferred-parameters.md b/proposals/inferred-parameters.md index b9ae5a7451..f8eb6bf5c1 100644 --- a/proposals/inferred-parameters.md +++ b/proposals/inferred-parameters.md @@ -49,7 +49,7 @@ scalar_param[DType.int32, Int32()]() # 'dt' parameter is required This has been requested multiple times in various forms, especially given the new autoparameterization feature. The current tracking feature request: -- +- ## Proposal diff --git a/proposals/lifetimes-keyword-renaming.md b/proposals/lifetimes-keyword-renaming.md index e39c39b32b..3b783202e7 100644 --- a/proposals/lifetimes-keyword-renaming.md +++ b/proposals/lifetimes-keyword-renaming.md @@ -2,7 +2,7 @@ Date: October 2024 -Previous revision: [[June 2023](https://github.com/modularml/mojo/blob/f8d7cb8ba4c21ec3fbc87e21609b3fd56cab695f/proposals/lifetimes-keyword-renaming.md)] +Previous revision: [[June 2023](https://github.com/modular/mojo/blob/f8d7cb8ba4c21ec3fbc87e21609b3fd56cab695f/proposals/lifetimes-keyword-renaming.md)] The design of the Mojo references subsystem is starting to come together. To finalize the major points, it helps to come back and re-evaluate several early diff --git a/proposals/ref-convention.md b/proposals/ref-convention.md index 3d69a9f9ce..53b608e51e 100644 --- a/proposals/ref-convention.md +++ b/proposals/ref-convention.md @@ -12,7 +12,7 @@ Mojo’s safe references have evolved and iterated a lot. From the initial compiler re-plumbing that made memory-only types possible, to threading lifetimes through everything with the introduction of `!lit.ref` to the development of a “user-space” Reference type, to the recent discussions about -[adding automatic dereference to Reference](https://github.com/modularml/mojo/discussions/2594), +[adding automatic dereference to Reference](https://github.com/modular/mojo/discussions/2594), we’ve been iteratively improving the model with a goal of ending up with something powerful and explainable. @@ -42,7 +42,7 @@ Along the way, we’ve had a number of challenges to address: to `Reference`. It would be awesome to clarify this. 5. We still need to - [reconsider which keywords](https://github.com/modularml/mojo/blob/main/proposals/lifetimes-keyword-renaming.md) + [reconsider which keywords](https://github.com/modular/mojo/blob/main/proposals/lifetimes-keyword-renaming.md) to use for argument conventions. The `inout` keyword, for example, is problematic because it works with types that are not movable or copyable. The callee doesn’t actually move things in and out, it takes a mutable reference. diff --git a/proposals/remove-let-decls.md b/proposals/remove-let-decls.md index 34f8eb3b7c..1d1f8a3692 100644 --- a/proposals/remove-let-decls.md +++ b/proposals/remove-let-decls.md @@ -1,6 +1,6 @@ # Simplifying Mojo🔥 - let's get rid of `let` -Chris Lattner, Dec 5, 2023, Status: **Accepted**, [discussion thread](https://github.com/modularml/mojo/discussions/1456#discussioncomment-8358722) +Chris Lattner, Dec 5, 2023, Status: **Accepted**, [discussion thread](https://github.com/modular/mojo/discussions/1456#discussioncomment-8358722) Mojo is still a new language, and is rapidly evolving. We’re learning a lot from other languages, but Mojo poses its own set of tradeoffs that indicate a @@ -10,7 +10,7 @@ One of the early decisions made in Mojo's development is that it adopts the `let` and `var` design point that Swift uses. This whitepaper argues that we should switch to a simpler model by jettisoning `let` and just retaining `var` (and implicit Python-style variable declarations in `def`). This has also been -[suggested by the community](https://github.com/modularml/mojo/issues/1205). +[suggested by the community](https://github.com/modular/mojo/issues/1205). Note that immutability and value semantics remain an important part of the Mojo design, this is just about removing "named immutable variables". Immutable @@ -31,7 +31,7 @@ variables aren't a core programming concept, and not something required to achieve Mojo's goals. 2. The naming of `let` caused a lot of early [heat and -debate](https://github.com/modularml/mojo/discussions/120). Other programming +debate](https://github.com/modular/mojo/discussions/120). Other programming languages have a wide range of design points (e.g. `const` in C/C++ and Javascript) and there is a divergence of naming for all these things: `let`, `val`, `const`, etc, etc. @@ -43,7 +43,7 @@ three concepts going around: `alias`, `let`, and `var`. Most of the uses of 4. Both Swift and Rust encourage immutable values - Swift (and currently Mojo) warn about unneeded mutability, Rust makes mutability more verbose (`let mut`), and some propose that Mojo [make mutability more -verbose](https://github.com/modularml/mojo/issues/451). This cuts very hard +verbose](https://github.com/modular/mojo/issues/451). This cuts very hard against a lot of the design center of Python, which doesn’t even have this concept at all: it would be weird to make it the default, but if we don’t, then why bother having it? @@ -112,7 +112,7 @@ This would eliminate a bunch of complexity in the compiler as well: like: “`let x: Int; x = 1; use(x); x = 2; use(x)`” even though the original lifetime of the first “`x=1`” naturally ended and “`x`” is uninitialized before being assigned to. This has always been a design smell, and it - [doesn’t work right](https://github.com/modularml/mojo/issues/1414). + [doesn’t work right](https://github.com/modular/mojo/issues/1414). This proposal will not affect runtime performance at all as far as we know. diff --git a/stdlib/README.md b/stdlib/README.md index f9ec6c7224..d64144c02d 100644 --- a/stdlib/README.md +++ b/stdlib/README.md @@ -54,6 +54,6 @@ See the license file in the repository for more details. ## Support For any inquiries, bug reports, or feature requests, please [open an -issue](https://github.com/modularml/mojo/issues) on the GitHub repository. See +issue](https://github.com/modular/mojo/issues) on the GitHub repository. See the [Mojo contributor guide](../CONTRIBUTING.md) for guidelines on filing good bugs. diff --git a/stdlib/docs/development.md b/stdlib/docs/development.md index 024dc87b6c..6e2a4b69b7 100644 --- a/stdlib/docs/development.md +++ b/stdlib/docs/development.md @@ -107,7 +107,7 @@ You can do the same for a directory with All the tests should pass on the `nightly` branch with the nightly Mojo compiler. If you've pulled the latest changes and they're still failing please [open a GitHub -issue](https://github.com/modularml/mojo/issues/new?assignees=&labels=bug%2Cmojo&projects=&template=mojo_bug_report.yaml&title=%5BBUG%5D). +issue](https://github.com/modular/mojo/issues/new?assignees=&labels=bug%2Cmojo&projects=&template=mojo_bug_report.yaml&title=%5BBUG%5D). ### Running a subset of the Standard Library Unit Tests @@ -135,7 +135,7 @@ disabled, you can set the environment variable `MOJO_ENABLE_ASSERTIONS_IN_TESTS=0`. If you run into any issues when running the tests, -[please file an issue](https://github.com/modularml/mojo/issues) and we’ll take +[please file an issue](https://github.com/modular/mojo/issues) and we’ll take a look. ## Formatting changes diff --git a/stdlib/src/builtin/math.mojo b/stdlib/src/builtin/math.mojo index 428407f857..def08e0dd8 100644 --- a/stdlib/src/builtin/math.mojo +++ b/stdlib/src/builtin/math.mojo @@ -68,7 +68,7 @@ fn abs[T: Absable](value: T) -> T: return value.__abs__() -# TODO: https://github.com/modularml/modular/issues/38694 +# TODO: https://github.com/modular/modular/issues/38694 # TODO: Remove this @always_inline fn abs(value: IntLiteral) -> IntLiteral: @@ -83,7 +83,7 @@ fn abs(value: IntLiteral) -> IntLiteral: return value.__abs__() -# TODO: https://github.com/modularml/modular/issues/38694 +# TODO: https://github.com/modular/modular/issues/38694 # TODO: Remove this @always_inline fn abs(value: FloatLiteral) -> FloatLiteral: diff --git a/stdlib/src/builtin/simd.mojo b/stdlib/src/builtin/simd.mojo index 18a87f1903..0a4136e4fb 100644 --- a/stdlib/src/builtin/simd.mojo +++ b/stdlib/src/builtin/simd.mojo @@ -2153,7 +2153,7 @@ struct SIMD[type: DType, size: Int]( # Not an overload of shuffle because there is ambiguity # with fn shuffle[*mask: Int](self, other: Self) -> Self: - # TODO: move to the utils directory - see https://github.com/modularml/mojo/issues/3477 + # TODO: move to the utils directory - see https://github.com/modular/mojo/issues/3477 @always_inline fn _dynamic_shuffle[ mask_size: Int, // diff --git a/stdlib/src/utils/stringref.mojo b/stdlib/src/utils/stringref.mojo index 75e864b405..f72b79fad9 100644 --- a/stdlib/src/utils/stringref.mojo +++ b/stdlib/src/utils/stringref.mojo @@ -105,7 +105,7 @@ struct StringRef( Note that you should use the constructor from `UnsafePointer[UInt8]` instead as we are now storing the bytes as UInt8. - See https://github.com/modularml/mojo/issues/2317 for more information. + See https://github.com/modular/mojo/issues/2317 for more information. Args: ptr: UnsafePointer to the string. @@ -136,7 +136,7 @@ struct StringRef( Note that you should use the constructor from `UnsafePointer[UInt8]` instead as we are now storing the bytes as UInt8. - See https://github.com/modularml/mojo/issues/2317 for more information. + See https://github.com/modular/mojo/issues/2317 for more information. Args: ptr: UnsafePointer to the string. diff --git a/stdlib/test/builtin/test_issue_1004.mojo b/stdlib/test/builtin/test_issue_1004.mojo index 15e0c9f41c..0c14beb4a4 100644 --- a/stdlib/test/builtin/test_issue_1004.mojo +++ b/stdlib/test/builtin/test_issue_1004.mojo @@ -11,7 +11,7 @@ # limitations under the License. # ===----------------------------------------------------------------------=== # # RUN: %mojo %s -# Test for https://github.com/modularml/mojo/issues/1004 +# Test for https://github.com/modular/mojo/issues/1004 from testing import assert_equal diff --git a/stdlib/test/builtin/test_issue_1505.mojo b/stdlib/test/builtin/test_issue_1505.mojo index 25f8f32e6f..3ffa2eb628 100644 --- a/stdlib/test/builtin/test_issue_1505.mojo +++ b/stdlib/test/builtin/test_issue_1505.mojo @@ -11,7 +11,7 @@ # limitations under the License. # ===----------------------------------------------------------------------=== # # RUN: %mojo %s -# Test for https://github.com/modularml/mojo/issues/1505 +# Test for https://github.com/modular/mojo/issues/1505 from random import random_ui64 diff --git a/stdlib/test/builtin/test_simd.mojo b/stdlib/test/builtin/test_simd.mojo index d7bd8928b4..f62154b22d 100644 --- a/stdlib/test/builtin/test_simd.mojo +++ b/stdlib/test/builtin/test_simd.mojo @@ -83,7 +83,7 @@ def test_convert_simd_to_string(): var c: SIMD[DType.index, 8] = 7 assert_equal(str(c), "[7, 7, 7, 7, 7, 7, 7, 7]") - # TODO: uncomment when https://github.com/modularml/mojo/issues/2353 is fixed + # TODO: uncomment when https://github.com/modular/mojo/issues/2353 is fixed # assert_equal(str(UInt32(-1)), "4294967295") assert_equal(str(UInt64(-1)), "18446744073709551615") @@ -93,7 +93,7 @@ def test_convert_simd_to_string(): assert_equal(str(UInt64(16646288086500911323)), "16646288086500911323") - # https://github.com/modularml/mojo/issues/556 + # https://github.com/modular/mojo/issues/556 assert_equal( str( SIMD[DType.uint64, 4]( diff --git a/stdlib/test/collections/test_list.mojo b/stdlib/test/collections/test_list.mojo index 56dab6510b..761d9243d3 100644 --- a/stdlib/test/collections/test_list.mojo +++ b/stdlib/test/collections/test_list.mojo @@ -580,7 +580,7 @@ def test_no_extra_copies_with_sugared_set_by_field(): # Ensure correct behavior of __copyinit__ # as reported in GH issue 27875 internally and -# https://github.com/modularml/mojo/issues/1493 +# https://github.com/modular/mojo/issues/1493 def test_list_copy_constructor(): var vec = List[Int](capacity=1) var vec_copy = vec