-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Tree Traversal: Output Standardization #857
Tree Traversal: Output Standardization #857
Conversation
I have made changes to many of the implementations, but there are a few that are
I'll update this list tomorrow as I'm way too sleepy right now. |
Oh well, apparently I have write access to your repo. |
@Amaras Coconut does not have any nodes containing if num_rows == 0:
return Node(0, ()) |
Great work with this, maybe we hide Ocaml for now, as it is missing some code snippets? I think @jiegillet might be willing to fix the haskell? I don't know about PhP, though. Does it need a rework entirely? |
* Standardize julia output * Standardize kotlin output This also fixes a previous bug, which caused the time and velocity values to not get printed correctly. * Standardized c output * Standardized cpp output * Standardized lisp output * Standardized fortran output I was not able to prevent the preceding whitespaces, but they can just be trimmed. * Standardized go output * Standardized java output * Standardize javascript output * Standardize nim output * Standardize python output * Standardize ruby output As the original implementation only returned the time and not the velocity, the code needed to be adjusted a bit. Now it returns the two values as an array which gets deconstructed and printed. * Standardize rust output * Standardize swift output * Standardized haskell output * Standardized haskell output (no quote marks) * attempt at fix for asm Co-authored-by: Jérémie Gillet <[email protected]> Co-authored-by: James Schloss <[email protected]>
Yeah hiding Ocaml would be good for now. I don't know Haskell but I think it can be fixed by just creating a As for PHP, I think I have a fix. The only thing that needed changing was the |
Of course, please give me a bit of time. Yeah sorry, back in the day I used to do things my way, since Haskell programs are structured quite differently anyway... I'll fall into the ranks now. |
Resolved the conflict with fixing dfs
…rithm-archive into tree-traversal-standardize
Okay, I had to merge, so it might have caused problems with the line numbers, we'll have to make sure we check them before merging. I did that job because @lazyprop wanted someone to update the PR correctly. Hopefully the history is not too messy (I didn't want to force-push when I was not sure of myself) |
I think the Java file still needs to be updated (because of the merge), but I think that's the only thing to change and we can then squash and merge this guy. I think the squash will get rid of the messy history. |
@leios sorry I don't understand what exactly needs to be updated. It seems to be exactly what it should be. |
I think there are 2 Java files on this branch, then? Tree.java and MainClass.java we recently changed to use Tree.java instead of MainClass, so the |
I have removed |
I think we are good to squash and merge this guy, but I wanted to mention that there seem to be 4 languages that are not up-to-date:
I think scratch can be scratched off the list, but the other 3 might be standardized in the future? No matter the case, this is a good step and I am happy to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit history is not clean, but we'll do a squash and merge
Thanks for merging. I think Smalltalk was added two days ago here (#453). Maybe we can get Neverik to fix the output format? As for Matlab, I don't have a license so no way to test the code. Maybe someone who has a license can do it. |
This is to standardize language implementations for the tree traversal chapter. It is based on #855.