Comments (9)
Thanks!
Better keep it open until atleast we add a warning about this particular case cause I bet its frequent
If you figure out other warning cases feel free to add them as well or we'll just add them as they come up
from irust.
@smolck ,thanks a lot for your offer!
There are a lot of things that could be done(both bug fixes, and features), I'll write appropriate issues, (obviously if you notice something, feel free to open an issue as well!)
Currently a feature I really want is highlighting the input,
My last try was by using syntect, pseudo-code:
https://github.com/sigmaSd/IRust/blob/master/src/irust/events.rs#L9
fn handle_character() {
let input = highlight(self.buffer);
self.write(input);
}
highlight function https://github.com/sigmaSd/IRust/blob/master/src/irust/highlight.rs#L7
The problem with this approach is that its slow, and it makes the input laggy, not sure if I'm using syntect the right way, or if I should look for a different design to solve this problem
from irust.
Hi @smolck! You need to put a semi colon after the function definition, like fn a(4) {};
The way you wrote it actually should trigger a warning, irust: are you missing a ;
Didnt the error msg appear in your case?
from irust.
In the same vein #8
I think @pzmarzly is right about the surprising behaviour,
Ah nvm about the error msg it wouldnt trigger in your case, but maybe I should add more agressive warnings (maybe each time the output is ())
from irust.
If you're interested you can add some analysis here https://github.com/sigmaSd/IRust/blob/master/src/irust/format.rs#L28
from irust.
@sigmaSd Thanks! Now I can really make use of IRust (a great project BTW!).
If you're interested you can add some analysis here https://github.com/sigmaSd/IRust/blob/master/src/irust/format.rs#L28
Thanks, I'll look into it for sure! Beyond adding a warning message if the user doesn't put a semicolon at the end of a function definition, what other warnings would you like added? (Also, should I close this issue?)
from irust.
@smolck Hope its alright that I implemented this c2075b5,
I just removed the input analysis, and now IRust warns about all expressions that returns a "()" (except for empty input, in that case it just create a new line)
Also I added this patch 4f650fc to disable cargo warnings, It feels they are out of place in a repl
from irust.
That’s great, thanks! As a side note, do you have any other features you’d like to see implemented (or bugs you’d like fixed)? I’m happy to help where I can.
from irust.
No problem! And that’s interesting. The highlighting is quick with :show
, so I imagine that when the highlight
function is called for each char, the allocated memory for each call to highlight
starts to slow things down. I've opened a new issue, #40, to focus discussion on how we implement this feature.
from irust.
Related Issues (20)
- Use `rustyline` or `reedline` for input? HOT 1
- Move theme settings from config.toml to themes config
- Improve Jupyter kernel support HOT 7
- typing twice in windows with crossterm-0.26+ HOT 2
- Can irust repl evaluate code with release mode instead of debug mode? HOT 3
- Cannot use two `irust_repl`s at the same time. HOT 27
- Rust analyzer is not working on Windows HOT 6
- Interactive usage HOT 3
- IRust installation fails due to use of unstable library feature 'once_cell' HOT 3
- FileNotFoundError while `python -m irust_kernel.install` HOT 1
- cargo-edit requires --path argument for a local dependency after version 0.9.1 HOT 2
- irust doesn't display Thai text properly. HOT 1
- Unclear documentation on importing local crates HOT 5
- Autocomplete doesn't work HOT 10
- untitled issue HOT 4
- Proposal: Split eval output HOT 3
- Option to specify config.toml path HOT 6
- Support nREPL protocol? HOT 2
- Failed to format error output HOT 2
- Logo missing on Jupyter lab launcher page HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irust.