All Projects → bfontaine → Lein Fore Prob

bfontaine / Lein Fore Prob

Licence: epl-1.0
A leiningen plugin to make a local copy of a problem from 4clojure

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to Lein Fore Prob

Rebar3 clojerl
rebar3 Clojerl compiler plugin
Stars: ✭ 23 (+76.92%)
Mutual labels:  plugin
Feflow
🚀 A command line tool aims to improve front-end engineer workflow and standard, powered by TypeScript.
Stars: ✭ 942 (+7146.15%)
Mutual labels:  plugin
Moodle Local datacleaner
Reduce, filter, and anonymize moodle data for non-prod environments
Stars: ✭ 12 (-7.69%)
Mutual labels:  plugin
Hxd Plugin
Handy HxD plugin for various conversions like base64
Stars: ✭ 24 (+84.62%)
Mutual labels:  plugin
Stencil Tailwind
TailwindCSS plugin for Stencil
Stars: ✭ 26 (+100%)
Mutual labels:  plugin
Gs Blog
A simple and easy to use, yet powerful blog for GetSimple. With this plugin, you can create blog posts, sort posts by category, view posts in monthly archives, plus much more.
Stars: ✭ 8 (-38.46%)
Mutual labels:  plugin
Kafka Connect Elasticsearch Source
Kafka Connect Elasticsearch Source
Stars: ✭ 22 (+69.23%)
Mutual labels:  plugin
Awesome Musicdsp
A curated list of my favourite music DSP and audio programming resources
Stars: ✭ 871 (+6600%)
Mutual labels:  plugin
Intellij Figlet
🔌A FIGlet-based ASCII Art generation plugin for IntelliJ based IDEs.
Stars: ✭ 27 (+107.69%)
Mutual labels:  plugin
Blockcmd
A PocketMine-MP plugin to block certain commands from being used by players in your server
Stars: ✭ 12 (-7.69%)
Mutual labels:  plugin
Totem Danmaku
totem-danmaku is a plugin that provides danmaku support for Totem Player. totem弹幕为Gnome下的totem播放器提供弹幕支持
Stars: ✭ 24 (+84.62%)
Mutual labels:  plugin
Vim Dirvish
Directory viewer for Vim ⚡️
Stars: ✭ 929 (+7046.15%)
Mutual labels:  plugin
Cljfmt
A tool for formatting Clojure code
Stars: ✭ 859 (+6507.69%)
Mutual labels:  leiningen
Confiscate
Discover duplication glitches, abusive staff giving items, x-ray or simply poor server economy.
Stars: ✭ 23 (+76.92%)
Mutual labels:  plugin
Metrica Plugin Xamarin
Xamarin plugin for Yandex AppMetrica SDK
Stars: ✭ 12 (-7.69%)
Mutual labels:  plugin
Figmiro Plugin
Figma Integration with Miro (Plugin)
Stars: ✭ 23 (+76.92%)
Mutual labels:  plugin
Prompt Password
This repository has been archived, use the built-in password prompt in Enquirer instead.
Stars: ✭ 8 (-38.46%)
Mutual labels:  plugin
Remember Last Position Totem Plugin
Totem video player plugin that restores position in the last played file
Stars: ✭ 13 (+0%)
Mutual labels:  plugin
Emby.plugins.javscraper
Emby/Jellyfin 的一个日本电影刮削器插件,可以从某些网站抓取影片信息。
Stars: ✭ 864 (+6546.15%)
Mutual labels:  plugin
Vue Js Grid
🍱 Vue.js 2.x responsive grid system with smooth sorting, drag-n-drop and reordering
Stars: ✭ 866 (+6561.54%)
Mutual labels:  plugin

lein-fore-prob

Build Status Coverage Status

A leiningen plugin which given a problem from 4clojure will populate the current project’s tests with the problem’s tests. This is based on lein-foreclojure-plugin code updated for Leiningen 2.

Usage

Add the plugin in your ~/.lein/profiles.clj:

{:user {:plugins [ ; ... other plugins ...
                  [lein-fore-prob "0.1.3"]]}}

Create a project to store 4clojure problems:

lein new probs-from-4clj
cd probs-from-4clj

Then use the plugin:

lein fore-prob [open] <problem id> [<problem id> ...]

You can use multiple problem ids at the same time. Use the open subcommand to open these problems in a browser instead of adding it to the current project.

What’s added

Given a new project like this:

.
├── ...
├── project.clj
├── src
│   └── probs_from_4clj
│       └── core.clj
└── test
    └── probs_from_4clj
        └── core_test.clj

A stub function will be added to src/probs_from_4clj/core.clj e.g for problem 98 an equivalence-classes-solution function is defined. Then in test/probs_from_4clj/core_test.clj the tests for that problem will be added e.g. again for problem 98 the test would be can-equivalence-classes. At that point you can flesh out the function until the test passes then copy it over to 4clojure.org when you’re happy with it.

Example

Here is what lein fore-prob 43 would add:

;; in src/your-project/core.clj:

;; problem 43 (Medium)
(defn reverse-interleave-solution
  [& args] ;; update args as needed
  ;; Write a function which reverses the interleave process into x number of subsequences.
  nil)


;; in test/your-project/core_test.clj:

;; problem 43
(deftest can-reverse-interleave
  (is (= (reverse-interleave-solution [1 2 3 4 5 6] 2) '((1 3 5) (2 4 6))))
  (is (= (reverse-interleave-solution (range 9) 3) '((0 3 6) (1 4 7) (2 5 8))))
  (is (= (reverse-interleave-solution (range 10) 5) '((0 5) (1 6) (2 7) (3 8) (4 9)))))

License

Copyright © 2014-2019 Baptiste Fontaine

Original code:

Copyright © 2011 Dan Brook

Distributed under the Eclipse Public License, the same as Clojure.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].