Giter Club home page Giter Club logo

euler-template's Introduction

Euler Template

This is a template that will allow you to solve Project Euler puzzles with out worrying about the mechanics of managing a project.

For more information about these delightful puzzles, you need to visit https://projecteuler.net - it's fun, really, trust me!

This assumes that you have the following installed:

You can run this template anywhere you can install these tools (technically, you don't even need make). I've even run this on phone with Termux! There's no excuse for not giving it a go. :)

If you want to know more about Go then a great place to start is the Go Tour followed quickly by Effective Go and Go By Example.

There are some helpers in [euler.go] - but I've not made it TOO easy, you will have to fill these out yourself. Maybe you could extend them in interesting ways? What if you had a nice way of caching prime numbers perhaps? I'll leave it up to you.

Creating your own version

To solve the puzzles you will need to fork this project in to your own user area. From there, clone it to a local computer and you're ready to go. You can find istructions on how to do this in Github itself.

If there are ANY problems with this template then feel free to raise an issue and I'll see what I can do. But beware, "I can't figure out the solution with puzzle X" does not constitute a problem with this template. Chances are that I haven't solved that one either. To be honest, I've only solved the first 10 anyway.

Running your puzzles

To run all of your puzzles:

$ make run-all

To run only the last test:

$ make latest

To run a single other test:

$ go run cmd/make/main.go 4

Or you could use a different number. 4 is my favourite. :)

Adding the next puzzle

It is possible to generate a new file for your next puzzle using the following command from the root of the project:

$ go run cmd/next/main.go

After this, it's up to you to solve the puzzle. I would recommend something like the following when you figure out the answer:

$ git add .
$ git commit -m "Add solution to puzzle $(ls -l | grep puzzle | wc -l)"
$ git push

euler-template's People

Contributors

dnnrly avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.