exercism / python

Exercism exercises in Python.
https://exercism.org/tracks/python
MIT License
1.95k stars 1.3k forks source link

Implement Python exercises #3

Closed kytrinyx closed 8 years ago

kytrinyx commented 10 years ago

Copied from exercism/exercism.io#272 reported by @BrianHicks


This is a placeholder issue for converting ruby/clojure exercises to Python.

(I'm thinking ruby/clojure since Python is a mix of OO and functional, depending on what's most appropriate)

sjakobi commented 10 years ago

Update, based on the current state of x-common and counting my current pull-requests as done:

kytrinyx commented 10 years ago

Awesome! I've updated the original issue with your changes.

sjakobi commented 10 years ago

I have made an overview of unimplemented exercises here: http://please-implement.appspot.com/xpython

This is still work in progress and contributions would be very welcome!

betegelse commented 10 years ago

Hi Katrina.

I was wondering why the problem 'strain' was marked as 'not appropriate' for python. It is not clear from the problem's description that the predicate should be in plain english. FWIW, although I'm not fluent in Haskell, it seems they implemented the predicate as functions returning a boolean value. That could be done in Python, too.

What do you think?

betegelse commented 10 years ago

Simon,

The table is just great! Congratulations!

A minor suggestion: the 'do it!' sentence could perhaps be a link to the appropriate md file.

I'm also getting a server error for any other language besides python.

Hermano

sjakobi commented 10 years ago

Thanks for the compliment and the pointer, Hermano! Check out the bugfix! Links to the md and yml are available on the left in the row header. Is that good enough (I'll improve on the "do it!" message at some point)?

Regarding the original issue, I'd also be interested as to why some exercises aren't appropriate for Python (or any other language).

betegelse commented 10 years ago

Great job, the other languages now work. As for the link, I guess the links on the left are enough since you'd have to decide which of the two would be tied to the 'do it!' link.

I really liked the table since we can quickly see which languages implemented a given problem. Thanks!

BrianHicks commented 10 years ago

@betegelse I'm the author of the original issue. I decided strain was irrelevant to Python based on an earlier description, if you want to implement it now it looks totally fine! Looks like accumulate has similar characteristics and based on the description now they would both be appropriate to think about in terms of Python. Meetup may be as well. There was something there, I'm sure, but looking at it again I can't think of what it was. Someone give it a try and report back. ;)

betegelse commented 10 years ago

@BrianHicks OK, I'm gonna implement strain and see what comes out. Thanks.

sjakobi commented 10 years ago

I have already implemented meetup which isn't a very difficult exercise given the functionality of the calendar and datetime modules. Implementing it in a not only clever but also readable way is something that I certainly haven't achieved yet. :)

accumulate only makes for a very boring exercise in Python if one uses a list comprehension. It also is inaptly named because the itertools.accumulate function does something very different.

Dog commented 10 years ago

What is the current status of this issue?

The please-implement site is down, and the last commit to that project was three months ago. I'm not sure if the missing exercises were considered inappropriate.

sjakobi commented 10 years ago

The list of exercises up there isn't quite up to date. Some of the unmarked exercises have been implemented, some newer exercises aren't included. All of those can be found in the x-common repo.

Deprecated exercises are listed in the config.json, usually because other problems exercise the same concepts in a better way.

I believe that we have found that there aren't any exercise that are actually "inappropriate" for Python. Some exercises are pretty trivial to solve in Python but even those are served because they usually showcase some language feature.

Regarding the please-implement website: I currently don't have the time to fix it. A similar overview is available here: http://synopsis.exercism.io/

outkaj commented 9 years ago

I'd be willing to assist with porting the remaining exercises to Python if there's still interest in doing so.

kytrinyx commented 9 years ago

Thank you -- yes! We're always looking to improve the existing tracks both in terms of making problems better and adding new problems.

The problem API contributing guide has a good overview of how the language tracks are put together: github.com/exercism/x-api/blob/master/CONTRIBUTING.md

outkaj commented 9 years ago

I put together a list of unimplemented exercises. Let me know if I am missing anything. I will also investigate to see if any are foregone for Python, but it looks like that's unlikely given the discussion above.

bank-account binary-search-tree bottles clock connect custom-set dot-dsl food-chain forth go-counting linked-list list-ops parallel-letter-frequency pig-latin robot-simulator saddle-points sgf-parsing simple-linked-list zipper

kytrinyx commented 9 years ago

That list looks good.

There aren't any foregone exercises in python: https://github.com/exercism/xpython/blob/master/config.json#L68

Dog commented 9 years ago

Saw in the xocaml track that we can now hit an endpoint to see what problems need to be implemented. It is the ToDo key:

http://x.exercism.io/tracks/python

bkarlovitz commented 8 years ago

Are the exercises in the list from @outkaj (three comments up) to be implemented? I'd be happy to do a few. @kytrinyx

behrtam commented 8 years ago

Sure go ahead, but maybe start with one instead of a few in parallel. If you need any help or some feedback, join the gitter dev channel or just open an issue or a PR (even if the exercise is not ready). There are many people happy to help.

The exercises in the todo list right now are:

bkarlovitz commented 8 years ago

@behrtam Thanks :) I'll start with one.

kytrinyx commented 8 years ago

We have a new process that you can use to find exercises to implement. You can read all about it here.

I'm closing this issue in favor of the process described in the Contributing guide linked to above.

Thanks!