Code Monkey home page Code Monkey logo

mojo-types's Introduction

A Little Background On Me

  • I code in a lot of languages, mainly Python and Mojo
  • I like making code editors for fun
  • Most of my code is private, readme stats are skewed
  • Contact me at [email protected] (I'll check it when I find time) or just open an issue on my account repo.

Moosems GitHub Stats

mojo-types's People

Contributors

andresnowak avatar igorgue avatar moosems avatar mrbounty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mojo-types's Issues

Create actions

Create GH issue action and action that will run a tests.mojo file in the root.

Bug report: Input does nt support the __call__mothod

Describe the bug
When I run some sample code (see below) It fails. It is the sample code provided with the init types

How to reproduce:

  1. make a .mojo or .๐Ÿ”ฅ file
  2. copy the 'types' folder (the one inside the main git directory) in the same working dir as it
  3. put the sample code in the new file
  4. Attempt to run it (debugger or not) in vscode or the terminal, all fail

What should happen instead (expected behavior):
It should do the same thing that the docs for the input class said - get your input

Minimum reproducible example:

from types import input

fn main():
    let user_input: String = input("Enter something: ")
    print("You entered: " + user_input)
    let user_input2: String = input()
    print("You entered: " + user_input2)
    if user_input == user_input2:
        print("They're the same!")
    else:
        print("They're different!")

Terminal output:
Please give your terminal output here:

mojo test.๐Ÿ”ฅ
/home/tsunami/mojo/test.๐Ÿ”ฅ:4:35: error: '!lit.metatype<_"$types"::_"$input">' does not implement the '__call__' method
    let user_input: String = input("Enter something: ")
                                  ^
/home/tsunami/mojo/test.๐Ÿ”ฅ:6:36: error: '!lit.metatype<_"$types"::_"$input">' does not implement the '__call__' method
    let user_input2: String = input()
                                   ^
mojo: error: failed to parse the provided Mojo

System (please fill in the following information):

  • OS: Windows Subsystem for Linux
  • Mojo Version: mojo 0.3.0 (f64f9601)

Additional context
It fails even if I just extract the repo and replace the contents of the test.mojo with the code too!

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.