Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [clojurescript]

ClojureScript is a dialect of Clojure that compiles to JavaScript.

Filter by
Sorted by
Tagged with
1 vote
0 answers
76 views

Advent of Code 2020 Day 1 in Clojurescript

This is a Clojurescript solution to parts 1 and 2 of Day 1 of Advent of Code 2020. This code is written in Clojurescript to run on Node.js. It can be run simply using lumo and this command: ...
michaelrbock's user avatar
2 votes
1 answer
139 views

Invert bits of a number in clojurescript

Doing a challenge to print the number that you would get if you convert a given number to binary, invert its bits, then convert back to decimal. I decided to give it a run in clojurescript (which I ...
George Mauer's user avatar
  • 1,652
2 votes
1 answer
52 views

Table of employee with end of mission visual clue

to learn Reagent, re-frame and spec I made a little personal project. Description: Given a ...
Julien Rousé's user avatar
4 votes
1 answer
73 views

Langton's ant in Clojurescript

The weekly coding challenge in Eric Normand's newsletter this week involves implementing Langton's ant. I wanted something on my screen so I put together a simple re-frame app. The core functions ...
nakiya's user avatar
  • 235
4 votes
2 answers
128 views

Extract indices of visible nodes in a tree where only some nodes are expanded

A program that I work on constantly updates and modifies program state containing an arbitrarily deep and wide tree. The data looks something like this. ...
clartaq's user avatar
  • 247
4 votes
1 answer
85 views

n-puzzle in Clojurescript

I'm in the process of creating a n-puzzle solver in Clojurescript. I have the basic model up and running and can move tiles on the screen. I plan to implement A* or such an algorithm to solve a given ...
nakiya's user avatar
  • 235
0 votes
1 answer
276 views

Drawing circles with the mouse using Quil+Clojure

I've recently begun using Clojure, and I wanted to translate a project that I wrote with p5.js to us Clojure and quil. Unfortunately, the code resulting from a direct translation is bad enough to make ...
J Atkin's user avatar
  • 1,800
2 votes
2 answers
452 views

Filtering a data structure using regex predicates

Assume we have a data-structure like this: ...
graaf's user avatar
  • 23
4 votes
3 answers
335 views

Generate a deck of cards in Clojure / Clojurescript

I would like to generate a deck of cards: {:card-id 1 :suit :spade :rank 1} {:card-id 2 :suit :spade :rank 2} ... {:card-id 52 :suit :club :rank 13} And here is ...
mye's user avatar
  • 43
5 votes
3 answers
374 views

Haversine Formula in Clojure

I implemented the Haversine formula to calculate the distance between two (latitude, longitude) coordinates. I was wondering if it looks natural to Clojure programmers. What could be improved? ...
Felipe Guerra's user avatar
1 vote
1 answer
61 views

Nesting elements in a shallow hierarchy

I wrote some code to generate list items for a menu in Clojurescript. The intention is that the code takes parsed Markdown (Hiccup) that has been filtered down to h2...
bright-star's user avatar
2 votes
0 answers
105 views

Handling async in Clojure

I've defined myself a function for caching requests and their responses in a browser environment; I'm using ClojureScript. ...
adrianton3's user avatar
1 vote
2 answers
3k views

Formatting a date in ClojureScript

I want to convert strings with the iso date format (2015-08-02) to the default format of our app (2 Aug 2015) in ClojureScript. ...
iGEL's user avatar
  • 161
1 vote
1 answer
472 views

Simple POST function in ClojureScript and Node.js

Node's HTTP library provides a handy shorthand function for GET requests. Something similar doesn't exist for POST requests. I'm trying to write one in ClojureScript that compiles to node-readable ...
Anton Harald's user avatar