Giter Club home page Giter Club logo

Comments (18)

kytrinyx avatar kytrinyx commented on September 25, 2024 2

@petertseng I don't know if I have told you this, but I so deeply appreciate the in-depth analysis and responses that you have on issues.

from rust.

EduardoBautista avatar EduardoBautista commented on September 25, 2024 1

So the idea is to use something like https://github.com/Manishearth/rust-clippy using rikki?

from rust.

kytrinyx avatar kytrinyx commented on September 25, 2024

I've been putting a bunch of time in on improving the automated feedback in Go and it feels incredibly worthwhile. So far I have rikki- responding to 7 different violations, which when applied to historical data triggers automated feedback on 20% of the solutions (looking only at the most recent iteration in a solution, and only if they're not archived).

I'm also trying to give feedback daily, but I'm only really making a meaningful dent on the first 5 or so exercises in the track.

from rust.

petertseng avatar petertseng commented on September 25, 2024

Seems reasonable.

I note that my specific thought of "condition in for loop" (or similar) isn't in there (at least not that I could see), but now that leads me to question my adherence to iterator methods over pushing conditionally in a loop.

  1. Maybe it was too hard to implement?
  2. Maybe people don't care, and it's OK to push conditionally in a loop, and I'm the one in the minority? (Given that it seems the majority of anagram submissions use this pattern, maybe I really am)

Anyway, maybe I can drop my specific issue and talk in general terms that some form of automated feedback would probably help a lot, and clippy seems like a good start. Any more specific wishes on what things to give feedback on can be discussed after we've gotten some form of automation started at all.

from rust.

kytrinyx avatar kytrinyx commented on September 25, 2024

My guess is that the people writing clippy didn't think about the conditionals vs iterator methods.

from rust.

EduardoBautista avatar EduardoBautista commented on September 25, 2024

We are discussing while vs for correct?

from rust.

EduardoBautista avatar EduardoBautista commented on September 25, 2024

This looks like it: https://github.com/Manishearth/rust-clippy/wiki#while_let_on_iterator

from rust.

petertseng avatar petertseng commented on September 25, 2024

Nah, I'm thinking about conditionals inside for loops. It would be similar to the feedback that Ruby track has in https://github.com/exercism/rikki/blob/master/comments/analyzer/ruby/enumerable_condition/enumerable_condition.md

from rust.

EduardoBautista avatar EduardoBautista commented on September 25, 2024

Ah, ok. Now I understand.

from rust.

IanWhitney avatar IanWhitney commented on September 25, 2024

I've been trying to nitpick more lately. I think the first thing I want to put into Rikki Rust is a check for "Difference of Squares" that points students to the pow function if they haven't used it. That's certainly my most-frequest comment on that exercise.

from rust.

kytrinyx avatar kytrinyx commented on September 25, 2024

We can let rikki know which exercise the student is working on... how hard would it be to write the analysis to figure out if they haven't used pow. Does rust have libraries that give you the AST?

from rust.

IanWhitney avatar IanWhitney commented on September 25, 2024

Probably? I was thinking of a less elegant approach of grepping the source code.

from rust.

kytrinyx avatar kytrinyx commented on September 25, 2024

:-) Whatever works, right?

from rust.

petertseng avatar petertseng commented on September 25, 2024

You know what would really help an aspiring person who wants to tackle this? Answers to:

  • Where does the code go?
    • I'm going to guess https://github.com/exercism/rikki/tree/master/analysis
    • Ah, I see that the Go analysis is in the repo, whereas Ruby and Crystal call out to external APIs.
    • Whoever tackles this should make a decision. If the API route is chosen, will need to figure out how to get it hosted.
    • See exercism/crystal#30 for how it was done for Crystal, most recently.
  • How might one test the code?
    • Well on one level, this depends on the answer to the above question.
      • If it's an external API, it should be easy to test submitting files to the API.
      • If it's in the repo directly, should be easy to go run something that checks a file you specify.
    • After we have the small pieces tested, how do we test the whole thing works? Is it just a "deploy it and cross your fingers" thing, or is there a better way that we can catch any potential problems beforehand?

from rust.

IanWhitney avatar IanWhitney commented on September 25, 2024

Rust already has a linting tool. Can we integrate it with Rikki?

from rust.

kytrinyx avatar kytrinyx commented on September 25, 2024

Pretty sure we can.

The easiest (because I don't have ops skills) would be to make a Rust integration that has an API like the Crystal and Ruby ones. That way the only thing that needs to be deployed to the server is the static binary—no dependencies.

I've had to rebuild the server on a couple of occasions and not having to figure out how to install dependencies is really nice in those situations.

from rust.

petertseng avatar petertseng commented on September 25, 2024

You know what would really help an aspiring person who wants to tackle this? Answers to:

Wow I'm sorry, I completely missed exercism/DEPRECATED.rikki#28.

Those wishing to tackle this here xrust issue would benefit from any documenting resulting from the linked rikki issue.

from rust.

petertseng avatar petertseng commented on September 25, 2024

Hi.

Regarding my original suggestion:

I tried to see if there were any recommendations about using for loops vs iterator adaptors in either https://github.com/Manishearth/rust-clippy or the official Rust book but couldn't find any.

Various pieces of reading about this concept (loops vs iterators) in any language not just Rust, with a summary for each.

Honestly, which one is preferred is probably just a matter of preference, and if rust-clippy hasn't added the check I can't justify it. Maybe they just haven't considered it, but a resulting discussion from asking whether it's been considered isn't one that I'm in a position to be able to engage in.

About adding rikki to this track in general:

Given my current and projected future commitments, I estimate that I will have time to implement this approximately never.

Given the level of interest shown by others, the length of time until some other individual takes on this task is on the order of magnitude of years. Not to mention that that individual will have to deal with the lack of documentation.

It's unrealistic for me to keep this issue in my open issues I've filed list any longer, and I can't in good conscience inflict this issue on some poor unsuspecting individual.

If anyone else wishes to take on this task, I would appreciate if you would file a new issue for it and do not reuse this one, because it is not reasonable for me to keep this issue in my open issues I've filed list. Of course feel free to link to this issue, though I don't really think this issue has anything useful for you, other than https://github.com/Manishearth/rust-clippy.

In the new issue you file, it would be so great if you would explain your specific motivation for wanting to add automated checks to this track (see how I explained that I wanted to encourage iterators over for loops). Don't need to make it very long, just a short code example like I provided and what suggestion you would like Rikki to provide.

from rust.

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.