Giter Club home page Giter Club logo

Comments (7)

DWSimmons avatar DWSimmons commented on July 16, 2024 1

I went back in time using the following CLI commands
(Note: modular clean removes the entire install of MAX/serving/mojo)

modular clean
modular install nightly/mojo --install-version

and found that this bug does not exist in 2024.6.2305 but does exist in 2024.6.2505.

Additionally, there is some odd - to me as I am truly a rookie with extra time on his hands - behavior. If someone could shed light on the following, I would greatly appreciate it.

As expected:
In 2024.6.2305 through to today (Note use of var)

fn main():
    var l = List[Int](1, 2, 3)
    print(l[0])  # prints 0

In 2024.6.2305 alias behaves as expected

fn main():
    alias l = List[Int](1, 2, 3)
    print(l[0])  # prints 1

However, in 2024.6.2505

fn main():
    alias l = List[Int](1, 2, 3)
    print(l[0])  # prints 0

from mojo.

mikowals avatar mikowals commented on July 16, 2024 1

There is some history of compile time issues as collections switched to returning references. But there is at least one use of alias List in the stdlib so that problem seems to have been solved or occurs much more narrowly than in previous implementations.

If this is a recent breakage as mentioned above then it is probably this commit. My PR (#2847 ) was merged afterward just for the changes to tests if I understood the comment there correctly.

from mojo.

gabrieldemarmiesse avatar gabrieldemarmiesse commented on July 16, 2024 1

I think we need way more "compile time tests" because those regressions/bugs are really frequent. Not many structs are currently tested at both compile-time and runtime. This could be a very good "good first issue".

from mojo.

soraros avatar soraros commented on July 16, 2024 1

Is this a dup of #3098?

@ematejska I don't think so. #3098 likely has something to do with Tensor and not List.

from mojo.

ematejska avatar ematejska commented on July 16, 2024 1

@DWSimmons Thanks for the detailed analysis here. Looks like a regression. Still reproduces in mojo 2024.7.905 (e860c551)

from mojo.

DWSimmons avatar DWSimmons commented on July 16, 2024

Possibly related to #2847 ?

from mojo.

ematejska avatar ematejska commented on July 16, 2024

Is this a dup of #3098?

from mojo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.