-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a Rust REPL #1120
Comments
It's true, REPLs are great! |
REPLs are indespensible. CL sucks, but I'd almost rather use it than a better language without a good REPL. |
Until bleibig's REPL is stable, feel free to use my stable-ish REPL-ish sort of thing: https://github.com/bstrie/rust-rustic (But this is by no means a long-term solution.) |
great. longer term I concur we should fold something like bleibig's repl into rustc. an --interactive flag would be great. |
Suggestion: When |
Somewhat along the same lines as bstrie's rustic, here is a repl that I wrote. The main difference is that it behaves somewhat like a future repl based on LLVM's interpreter probably should behave (ie, statement by statement evaluation, local definitions, imports, etc), but under the hood it is a hack - it is writing out temp files and using rustc to compile them. either way, it is really fun to use, and works right now! |
This exists now (rusti) but is not working too well right now: #4407 |
Is the scope of this issue "create a REPL" fulfilled? |
@kud1ing probably. Separate issues can be opened to address the current REPL breakage. |
Closing. |
Should this be reopened since rusti was removed? #9818 |
Yes please!! I often just want to play with a function or two and see how things work. |
@shaleh are you aware of this: http://play.rust-lang.org/ ? It has the advantage over a local repl that it is really trivial to share your example with other people once you're done hacking (see the "share" button at the bottom). |
On Jul 10, 2014, at 3:08 PM, Felix S Klock II wrote:
Yeah that's nice as long as you only hack where there is networking. Not all of my house gets decent WIFI much less trains, cars, etc. If it can work as an online toy then surely we can get a real version at the shell. |
Can this be reopened? I often don't want to share or save the stuff I do in a REPL, so I'd prefer a command line utility. |
Oh, I didn't see #9898. I guess dicussion can continue there, but I'd like to see something like |
Someone said something about cling, just to bring it up here. I think it's an awesome project to be based on. |
Instant feedback is extremely gratifying. Even Java is going to have a repl in the next major release. |
What would be the actual work on this? (even if external?) because rusti was removed as I see from #9818 |
rusti lives on here https://github.com/murarth/rusti |
FYI: Julia language has a REPL, and looking at: https://github.com/iamed2/Rust.jl it seems you can include Rust code in your files, just as you can C++ with Cxx.jl, or at the REPL, using either language interactively (while Cxx is more slick). [Already it was pretty simple to call Rust, no more difficult than C. If I ever need a non-GC language, I've been thinking Rust would be the preferred complementary language over C.] Just looking at the code I see AST.jl, not sure you can generate Rust code from Julia (I recall having been told that, maybe a misunderstanding). Note: https://github.com/iamed2/Rust.jl/blob/master/deps/deps.jl |
Should this issue be repopened? |
evcxr is currently the best REPL implementation |
Rust already has a REPL. Try |
Lazy compilation in jit mode
That's more like a REP than a REPL 😄 (evcxr is pretty cool) |
Works rather nicely (if very slowly). Good for small bits of experimentation. Thanks for sharing! |
The `vector-map` crate indirectly depends on a vulnerable version of rand_core. This crate hasn't been released for the past 2 years, and there hasn't been any activity in their github either. I'm replacing it by `linear-map` for now to fix the security warnings. Note that linear-map last release was 6 years ago, so we may have to remove it eventually. At least this crate only depends on serde.
REPLs are great.
The text was updated successfully, but these errors were encountered: