Skip to content
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

APL solution #549

Closed
wants to merge 15 commits into from
Closed

APL solution #549

wants to merge 15 commits into from

Conversation

Garklein
Copy link

Description

Contributing requirements

  • I read the contribution guidelines in CONTRIBUTING.md.
  • I placed my solution in the correct solution folder.
  • I added a README.md with the right badge(s).
  • I added a Dockerfile that builds and runs my solution.
  • I selected drag-race as the target branch.
  • All code herein is licensed compatible with BSD-3.

@rbergen
Copy link
Contributor

rbergen commented Jul 31, 2021

Please:

  • Squash your commits
  • Fix the Dockerfile lint errors found by CI (visible under "Files changed")

@Garklein
Copy link
Author

I hope I fixed the Dockerfile lint errors.
I squashed as much as I could, I was getting an error since I had a merge.

@rbergen
Copy link
Contributor

rbergen commented Jul 31, 2021

Thank you.

Your solution indicates it uses one bit per prime candidate. Could you maybe talk me through how this is setup? I am rather unfamiliar with APL, but/and I don't see anything that looks like the "bit twiddling" that is required in many (if not most) other languages that don't use a specific bit-level container.

@Garklein
Copy link
Author

Oops, this was a bit array in an earlier version, but I changed some operators and it was actually using an 8-bit signed integer array. I'll fix that. Anyways, with some operators, if it is creating an array of just 0s and 1s it will convert it to a bit array (this is also implementation specific). You can then use all the normal array operations on the array and as long as it only has 0s and 1s it will stay a bit array.

@Garklein
Copy link
Author

Never mind, I logged the array type and it is all a bit array.

readme stuff

code is a bit better, wrote solution 2 readme

started readme for solution 1

covered main function

main function readme fixes

optimizations, more progress on readme

hopefully finished readme

added output

fixing readmes

readme clarification

clarifications

removed unnecessary returns

missed one

clarified purpose of the bit array

more clarifications

added JS code

fixed random indentation

fixed broken js
@Garklein Garklein closed this Aug 1, 2021
@rbergen
Copy link
Contributor

rbergen commented Aug 1, 2021

Would it be possible to keep your fork available for some time? When I have the time, I'd like to see if I can get your solution to work with a free software version of APL. If I can get that to work, I'll open a PR on your fork so you can see if you're happy with what I've put together.

What's behind this is that I really would like to add APL to the language collection.

@Garklein
Copy link
Author

Garklein commented Aug 1, 2021

Yep, I'll just leave it as it is.
When using another version of APL, you'll have to change the timings. Also, I don't believe GNU APL supports classes. You will also probably have to change the main file (it probably has a different way to load other files).

@dzaima
Copy link

dzaima commented Aug 5, 2021

Note that GNU APL is ~10-100x slower than Dyalog APL, which makes it much less suited for a performance competition. I don't think there are any free APL implementations that really focus on speed.

@rbergen
Copy link
Contributor

rbergen commented Aug 5, 2021

@dzaima I understand that. Unfortunately, that doesn't change what we can and cannot responsibly add to this project.

In any case, looking at @Garklein's last comment, it very much looks like getting their APL submission to work on GNU APL requires way more knowledge of (GNU's) APL (implementation) than I could ever dream of having. I sadly think that means that APL will not be part of the collection of languages until someone else submits an APL solution based on GNU APL, if and when that happens.

@rbergen rbergen mentioned this pull request Sep 16, 2021
6 tasks
@rbergen
Copy link
Contributor

rbergen commented Sep 20, 2021

@Garklein As discussed in the context of #722, it is now possible to add this solution, provided that the automated build/benchmark is disabled for it. This is described in the relevant section of the contributing guidelines and concerns a CI/benchmark capability that we added after you closed this PR.

You can reopen your PR and add the build-no flag file if you would still like your solution to be added to the project.

@Garklein
Copy link
Author

Thanks for the heads up, but since Arcfide's solution is so much better, I won't open my PR.

@rbergen
Copy link
Contributor

rbergen commented Oct 4, 2021

That's entirely your prerogative, of course. Thanks for letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants