borkdude / advent-of-cljc Goto Github PK
View Code? Open in Web Editor NEWCross platform Clojure Advent of Code solutions
Cross platform Clojure Advent of Code solutions
I'm the creator of Advent of Code. A system similar to this one was recently proposed on Reddit; it makes me nervous for a few reasons which I listed in a reply:
Please don't create a database of inputs. Doing this would make it easy for someone to rip and re-host my work.
Doing a beauty contest, size comparison, etc don't require a common runtime; you can already compare the code of many solutions on the megathreads or even GitHub.
Some puzzles (intentionally) use a lot of CPU or memory, which could make hosting this service expensive.
Without having a human check the submitted source code, there's not a good way to verify that the program doesn't simply print the answer and immediately exit.
Do not duplicate the puzzle descriptions on such a site. Doing so could remove adventofcode.com entirely from users' workflows and effectively steal my work and use it to also steal my traffic. (In fact, I'm already nervous about this even without duplicating puzzle descriptions.)
Basically: I spend hundreds and hundreds of hours building this stuff. Please be careful not to ruin it.
@mfikes said:
An aside on the script topic: Previously
coal-mine
used bash scripts. At some point I converted it to simply use Clojure that is in the source tree (thecoal-mine.script
namespace). For me this had two benefits:
- I actually found it easier to deal with logic in the "script" when written instead in Clojure
- This made it so that you can run
coal-mine
as a GitDep. In other words, there is no need to even manually clone it. (This capability is, for example, used inspeculative
.)
This, and this commit to Tubular by David mfikes/tubular@e8b5691
really solidified my thinking that having a-main
for logic in a codebase, driven by deps aliases, is really a great way to arrange things.
I think that's a good idea!
Currently only different namespaces compared to master are tested on CI.
The time comparison compared to others for the same day is now missing.
TODO:
Most namespaces use lazy seq and delays or memoized functions at the top level. This accumulates used memory and eventually causes problems for the later tests.
One approach to solve this could be: delete the namespace after the last test using a global fixture.
If you run
script/test-one 2017 1 borkdude
everything will be fine. But then add the following
(defprotocol IFoo)
as the first form in the aoc.y2017.d01.borkdude
namespace (after the ns
form).
This will result in
WARNING - incomplete alias created for namespace aoc.y2017.d01.borkdude
where otherwise everything else works.
In the end, this is likely going to be an issue in the ClojureScript compiler itself (presuming we can come up with a minimal repro), but logging it here as it may be occuring due to some arrangement in the Advent of CLJC project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.