this post was submitted on 20 Jan 2024
31 points (100.0% liked)

Programming

13384 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

Text description (for those with screenreaders):

A portion of a prime number checker written in the Rust programming language, where the first few lines are written correctly including the first if statement in the program. However, the following if statements are written using Python syntax instead of Rust, as the author slipped back into his native tongue.

you are viewing a single comment's thread
view the rest of the comments
[–] agressivelyPassive@feddit.de 26 points 10 months ago (2 children)

That's why you use a proper IDE, that checks everything as you type.

[–] t3rmit3 14 points 10 months ago (2 children)

Yeah, like Vim. Who uses nano to code?

[–] hallettj 7 points 10 months ago (1 children)

I did not realize nano implemented syntax highlighting!

[–] JustARegularNerd@aussie.zone 4 points 10 months ago

I'm not sure what does and doesn't control it, but I've installed nano on some Linux distros and it has no syntax highlighting at all, then other distros (currently using LMDE) just have it by default.

[–] JustARegularNerd@aussie.zone 7 points 10 months ago (1 children)

Well, in my defense I just wanted to initially try out Rust and on this particular computer, I don't have any IDE set up on it yet. However, definitely seems like an IDE is in order for me haha

[–] t3rmit3 2 points 10 months ago (2 children)

I was just being facetious by suggesting another commandline editor. ;P

[–] JustARegularNerd@aussie.zone 4 points 10 months ago (1 children)

I thought so but as I'm not a huge vim user myself, I thought maybe vim had some error detection like VSCode that could be set up and that's what you meant.

In any case, VSCode will probably be the go for me

[–] robinm@programming.dev 6 points 10 months ago (1 children)

vim can have IDE-like capabilities thanks to lsp and tree-sitter. That's a real game changer and is quite easy to set-up with something like kickstart.nvim.

[–] t3rmit3 2 points 10 months ago* (last edited 10 months ago)

I actually use Vim to write all my code, but without IDE-ifying it, just syntax highlighting and some navigation tweaks (with Sublime3 for help with bulk edits). For most of my stuff an IDE is overkill.

[–] jarfil 2 points 10 months ago* (last edited 10 months ago)

That's not a command line editor, this is a command line editor 😜

https://en.m.wikipedia.org/wiki/Ed_(text_editor)

[–] Fal@yiffit.net 5 points 10 months ago (1 children)

Seriously. I can't imagine writing rust without an IDE, that's absurd. Rustrover is amazing

[–] Cwilliams 1 points 10 months ago* (last edited 10 months ago) (1 children)

What is Rustrover? Whatever it is, that's an awesome name

[–] Fal@yiffit.net 1 points 10 months ago

Jetbrain's rust IDE