Skip to content

Racket implementation for Bubble Sort #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from Jun 29, 2018
Merged

Racket implementation for Bubble Sort #164

merged 8 commits into from Jun 29, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jun 29, 2018

Added a racket implementation of Bubble Sort.
The bubbleSort function can be accessed by writing "(require "bubbleSort.rkt")" with the relevant file in the current directory.
I also put my name in Contributors.md since it seemed to be required.

@Butt4cak3
Copy link
Contributor

Welcome, @Unlambder! There's not much I can say other than thanks for the contribution. You thought of pretty much everything.

I'm not sure whether we have a Racket developer who can properly review your code, so give it a few days time. If we can't find anyone, we'll probably just merge it anyway.

@jiegillet jiegillet added the Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.) label Jun 29, 2018
@jiegillet
Copy link
Member

I read the code and, without prior knowledge of Racket, I think I made sense out of it, thanks for contributing.

Could you add some kind of main function with a test of the algorithm on a small list? This way someone without knowledge of the syntax (as myself) could run it and play around.

@ghost
Copy link
Author

ghost commented Jun 29, 2018

I made a try it online link, will that be enough? (If it is I'll just add it to the bottom of the visible code)

@jiegillet
Copy link
Member

Is it hard or un-Racketty to include the test in the file? (I'm asking in full candor)
Is the try it online link a permanent resource?
We've considered using external resources before (I made a web app in Elm to demonstrate Euler method), but I think some people preferred the AAA to be self-sufficient. I'd like to wait and see other members' opinions on the question.

@june128
Copy link
Member

june128 commented Jun 29, 2018

@Unlambder With the code submitted to the AAA, we want it to be possible to run locally on a machine. Therefor a main function kind of thing is useful since it sometimes calls different functions, etc. So I would suggest using a main function here as well.
The try it online link/thing is really cool tho and it would be a cool thing to do for different languages as well. Currently we don't do that, but it's a topic we should definitely discuss.
@jiegillet just saw your answer :)

@june128
Copy link
Member

june128 commented Jun 29, 2018

I created an issue for the discussion about the use of code-run-websites. I heavily support it.

@jiegillet jiegillet self-assigned this Jun 29, 2018
@ghost
Copy link
Author

ghost commented Jun 29, 2018

I added an executable snippet to the file. To answer your question @jiegillet it's not that I find it un-Racketty or anything to include tests in the file, it's just that I didn't really know how i should include them.
I hope this is enough, right now the file can be run directly from drRacket (maybe other environnements too) and loaded on a command line using (require).

@jiegillet
Copy link
Member

Thanks for your last commit. I was able to run it on an online interpreter. Good enough for me. I'll merge the PR everyone is satisfied.

@jiegillet jiegillet merged commit 524de7f into algorithm-archivists:master Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants