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

Squirrel Solution #910

Merged
merged 8 commits into from Apr 23, 2023
Merged

Squirrel Solution #910

merged 8 commits into from Apr 23, 2023

Conversation

tmob03
Copy link
Contributor

@tmob03 tmob03 commented Apr 10, 2023

Description

A primes solution in Squirrel, based on the python_1 solution.

Squirrel is meant to be embedded and as such doesn't have a good compiler. After searching for a while I found the Going Nuts Compiler. After looking at the licensing though, you need to pay for cloud computing status, thus I did not try and learn Docker to upload it.

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 Apr 11, 2023

@tmob03 Thanks for submitting this. I've reviewed the Gonuts license myself, and my conclusion is that Gonuts can be used in the context of this project. The project itself is clearly non-commercial (and can even be called educational to some extent). Concerning the "cloud capabilities", the website includes a page with this text:

Gonuts cloud capabilities usually utilize an online login, however some users may find it useful to have that login secured by a gonuts license and hence locked to their executable or amalgamation.
At the time of this writing, cloud services are non-existing and in planning stage only. Check the goingnuts website for more information.

The use of Gonuts within the context of your solution does not require cloud capabilities, and couldn't even use them (yet) if it wanted to.
While looking into the licensing aspect, I also noticed that there is a Gonuts executable available for AMD64 Linux as well.

All this being the case, could you please put a Dockerfile together to compile and run your solution?

@tmob03
Copy link
Contributor Author

tmob03 commented Apr 11, 2023

Oh, neat. I’ll see what I can do.

@tmob03
Copy link
Contributor Author

tmob03 commented Apr 11, 2023

Well, I can't seem to get docker to run on my PC. Not sure how to proceed if I can't even get it to run on my PC.

Also a validity check!
@rbergen
Copy link
Contributor

rbergen commented Apr 12, 2023

Well, I can't seem to get docker to run on my PC. Not sure how to proceed if I can't even get it to run on my PC.

You could ask for help from someone who does get Docker to run. :)

I could try and put a Dockerfile together for you, if you add me as a collaborator on your fork of this repository. It will probably be the weekend that I get around to it, then.

@marghidanu
Copy link
Contributor

You can use a VM to run Docker in it if your PC doesn't allow it.

Happens to give two more passes!
@tmob03
Copy link
Contributor Author

tmob03 commented Apr 14, 2023

@rbergen I got docker to work on my PC! I set up a dockerfile, but it seems the linux_amd64 compiler has a bug, and runs out of memory allocating a 1 million size array. Is it good to use the windows exe instead?

@rbergen
Copy link
Contributor

rbergen commented Apr 14, 2023

The main reason for semi-requiring a Linux-based Docker image is that it allows solutions to be included in the daily benchmark runs. This being a drag-race, we like to do that if in any way possible. With a Windows executable, it just isn't.

If the issue you're running into is caused by a bug in Gonuts, then maybe it could be beneficial for you to create a post in the Going Nuts forums? It would be interesting to see if others can replicate the behaviour, and I'd imagine Going Nuts would also be interested to learn about a bug in their compiler.

@tmob03
Copy link
Contributor Author

tmob03 commented Apr 15, 2023

I have done that now, but I don't expect a reply, the website looks pretty dead to me. I made the first thread other than a spambot since its creation in 2017.

@rbergen
Copy link
Contributor

rbergen commented Apr 15, 2023

Ok, I'll try to confirm the bug this weekend. If I can then I'm happy to proceed towards merging without a Dockerfile.

@tmob03
Copy link
Contributor Author

tmob03 commented Apr 15, 2023

Well, I massively overcomplicated this. There's a Squirrel package for linux I never realized since I'm on Windows. :P Free performance boost with the official interpreter, though!

Copy link
Contributor

@rbergen rbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed Hadolint found some issues with your Dockerfile, and I see you've made some changes to address these. I may be able to give a few pointers to assist, see the following comments.

PrimeSquirrel/solution_1/Dockerfile Outdated Show resolved Hide resolved
PrimeSquirrel/solution_1/Dockerfile Outdated Show resolved Hide resolved
PrimeSquirrel/solution_1/Dockerfile Outdated Show resolved Hide resolved
@tmob03
Copy link
Contributor Author

tmob03 commented Apr 15, 2023

Thanks!

Copy link
Contributor

@rbergen rbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! As it concerns a new solution in a new language, I'll ask a review from @marghidanu as well.

@rbergen rbergen merged commit 08962a4 into PlummersSoftwareLLC:drag-race Apr 23, 2023
159 checks passed
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.

None yet

3 participants