Coder Social home page Coder Social logo

Add more exercises to MIPS track about mips HOT 6 OPEN

exercism avatar exercism commented on August 15, 2024
Add more exercises to MIPS track

from mips.

Comments (6)

ozan avatar ozan commented on August 15, 2024

Hey there! These are great choices. I agree that many of the standard
exercise problems involve a lot of branchy string manipulation work or
require libraries for functionality like Georgian dates. After implementing
these it may make sense to add new problems that suit lower level
programming. For instance we could add some of the exercises from K&R C.

Regarding nucleotide count, your strategy would be fine, or the caller
could just specify a memory location at which it expects the callee to
write four ints. If we maxed each count out at 256 we could even cram it
all into one register :)

On Tuesday, August 30, 2016, mpriestman [email protected] wrote:

Issue to just discuss possible problems that could be added to the MIPS
track. Looking down the list of available ones from other languages (
http://exercism.io/languages/mips/contribute), a lot seem just too hard
for assembly (a lot involve string or data structure manipulation).
However, I think there are still some that could make the transition to
assembly. The following could be good candidates:

  • difference-of-squares - seems pretty straightforward, single integer
    input, single integer output.
  • nucleotide-count - simple input, but needs to return 4 integer
    values. Could use hi and lo parts of v0 and v1?
  • atbash-cipher - single string input, fixed size string output.
  • luhn - could make for an interesting challenge, string input,
    boolean result.
  • pangram - pretty similar to the isogram problem.
  • binary-search - could be fun too.

Could also try to come up with some new exercises just for the MIPS track
that are more "assembly-like".

Any thoughts?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAG6z-Ldh956TKCwD--x-3TU79YuqKRMks5qlLOvgaJpZM4JxDzm
.

from mips.

ozan avatar ozan commented on August 15, 2024

Another interesting problem is bracket push. This appears to be a hard
problem to solve in any language, until the student decides to use a stack,
at which point it would be straightforward even in asm. Similarly once the
student knows how to implement a circular buffer or deque, a problem that
requires breadth first traversal is just as approachable in asm as in a
high level language. Something like the bucket problem could be a good
example.

On Wednesday, August 31, 2016, Ozan Onay [email protected] wrote:

Hey there! These are great choices. I agree that many of the standard
exercise problems involve a lot of branchy string manipulation work or
require libraries for functionality like Georgian dates. After implementing
these it may make sense to add new problems that suit lower level
programming. For instance we could add some of the exercises from K&R C.

Regarding nucleotide count, your strategy would be fine, or the caller
could just specify a memory location at which it expects the callee to
write four ints. If we maxed each count out at 256 we could even cram it
all into one register :)

On Tuesday, August 30, 2016, mpriestman <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:

Issue to just discuss possible problems that could be added to the MIPS
track. Looking down the list of available ones from other languages (
http://exercism.io/languages/mips/contribute), a lot seem just too hard
for assembly (a lot involve string or data structure manipulation).
However, I think there are still some that could make the transition to
assembly. The following could be good candidates:

  • difference-of-squares - seems pretty straightforward, single
    integer input, single integer output.
  • nucleotide-count - simple input, but needs to return 4 integer
    values. Could use hi and lo parts of v0 and v1?
  • atbash-cipher - single string input, fixed size string output.
  • luhn - could make for an interesting challenge, string input,
    boolean result.
  • pangram - pretty similar to the isogram problem.
  • binary-search - could be fun too.

Could also try to come up with some new exercises just for the MIPS track
that are more "assembly-like".

Any thoughts?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#13, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAG6z-Ldh956TKCwD--x-3TU79YuqKRMks5qlLOvgaJpZM4JxDzm
.

from mips.

mpriestman avatar mpriestman commented on August 15, 2024

When I implemented the raindrops problem, I ended up writing a version of a couple of C functions (itoa, and strcat). As you mentioned above, these in themselves could make good exercises; pretty small and self-contained, easy to test, and once the student is happy with them, then could open the door to using them in more complicated solutions.

Might only want a couple of interesting ones though. For example, is strlen too easy? strdup is also pretty straightforward, but would involve a memory allocation. itoa is pretty meaty, and there are a few ways to solve it too.

from mips.

mpriestman avatar mpriestman commented on August 15, 2024

I like your idea of putting four results into a single register for the nucleotide count problem. A good example of packing smaller values into a large value.

from mips.

mpriestman avatar mpriestman commented on August 15, 2024

I've put in a PR for difference-of-squares, and having "a bash" at atbash-cipher.

from mips.

qjd2413 avatar qjd2413 commented on August 15, 2024

Certain exercises that require string computation seem doable, such as anagram or potentially bob.

In regards to dates, assembly has 4 input registers-- month, day, and year could be passed in through different registers. Assuming the response is either a string or integer, I think a problem like gigasecond would be useful (and a good application of an implementation of a "switch/case statement").
Edit: Thinking more about gigasecond and time in general, it seems like too much of a hassle to implement (no current time, no simple way to return more than two values)

from mips.

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.