Skip to content

Instantly share code, notes, and snippets.

Avatar
Creating Black holes.

Pankaj Doharey metacritical

Creating Black holes.
View GitHub Profile
View synthetic-index-html.md
clj -Sdeps '{:deps {github-mfikes/chambered {:git/url "https://github.com/mfikes/chambered" :sha "50265ab42f149450f15375117dcdf5d83c5efcf3"}}}' -m cljs.main -c chambered.core -r

After the REPL starts, if it doesn't automatically, open your browser to

http://localhost:9000

The source for this project is at https://github.com/mfikes/chambered

@mfikes
mfikes / README.md
Last active Jun 25, 2018
Bocko in browser using cljs.main and synthetic index.html
View README.md

First start up the REPL by issuing this command:

clj -Sdeps '{:deps {github-mfikes/e00202b2de7cc2352fedcf92b1fe60dc {:git/url "https://gist.github.com/mfikes/e00202b2de7cc2352fedcf92b1fe60dc" :sha "68ef581813e08a92bd52e7beeea1535ab7b3337f"}}}' -m cljs.main -i @index.cljs -r

Once the REPL is waiting for the browser to connect, if it doesn't automatically, open http://localhost:9000 in your browser.

You will now be running Bocko. The following forms evaluated in the REPL will draw an American flag.

View fp_papers.md
View gist:c17f378718cbd2fd82324002133ef678

So you’d like to contribute to Clojure, great! Let’s talk about what that involves.

The first thing you’ll want to make sure is that your idea is valid, and that you won’t spend a ton of time working on something that won’t make into master. To do this, you should create a JIRA ticket. For example, let’s say we want to improve how core.async handles channel closing propagation. It’s not a super complex problem, but there are some design questions about which of the various semantics currently in place should be the default, and if some semantics should be configurable.

So start by making a JIRA ticket and stating what the problem is you’re trying to solve, what the possible options for solving the problem. Now hit save and wait for the ticket to be triaged. Alex Miller will take a look when he can, and that can take a few days to a few weeks, depending on the time of the year (he has other responsibilities). Alex may out-right reject the idea if he knows Rich would never approve the ticket, but otherwise h

@mfikes
mfikes / README.md
Last active Mar 8, 2019
cljs.main rebel-readline
View README.md

Start cljs.main with rebel-readline:

clojure -Sdeps '{:deps {github-mfikes/cljs-main-rebel-readline {:git/url "https://gist.github.com/mfikes/9f13a8e3766d51dcacd352ad9e7b3d1f" :sha "27b82ef4b86a70afdc1a2eea3f53ed1562575519"}}}' -i @setup.clj -m cljs.main
View BoidBehaviour.cs
using UnityEngine;
public class BoidBehaviour : MonoBehaviour
{
void Update()
{
Boids.Core.update(transform);
}
}
@cszentkiralyi
cszentkiralyi / .spacemacs
Last active Aug 21, 2019
Spacemacs config
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@angusiguess
angusiguess / biblio.md
Last active Nov 17, 2019
Emulators, Immutability, and Time Travel
View biblio.md
@bhauman
bhauman / README.md
Last active Dec 3, 2019
ClojureScript minimal dev and prod setup.
View README.md

Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.

This example uses Figwheel as something that you want to exclude for production, but the pattern is general.

With this simple setup you only need one html file/view and it will work for developement and production.

@mfikes
mfikes / README.md
Last active May 17, 2020
Seeing the inferred type of a ClojureScript expression
View README.md

If you are curious about the types inferred by ClojureScript, it is easy to get some insight using a macro:

(defmacro inferred-type [form]
  `'~(cljs.analyzer/infer-tag &env
       (cljs.analyzer/no-warn (cljs.analyzer/analyze &env form))))

This is the kind of dev-time macro you could refer using the new user.cljs feature.