Klipse Blog
blog.klipse.tech · Company blog · on HN since 2016
Blog for the Klipse project, covering Clojure, JavaScript, data-oriented programming, compilers and interactive code snippets in blog posts.
What HN saysHN links it for its data-oriented programming principles and the Klipse plugin for interactive code snippets, with commenters suggesting it be used for more articles.
42HN people shared it
19linked it in comments
154stories submitted
1.9Kstory points
4 months agolast shared
2016people per year2026
Most-shared posts
- 1Revisiting the principles of data-oriented programming5 people · 126 points · first shared 2022 · 115 comments on HN
- 2Parsing with derivatives – Elegant matching of regular languages in clojure4 people · 10 points · first shared 2016 · 1 comments on HN
- 3Distinction between three data related programming paradigms4 people · 1 points · first shared 2021 · discussion on HN
- 4Things I learned writing my first technical book3 people · 152 points · first shared 2021 · 28 comments on HN
- 5A New Way of Blogging About Common Lisp (2018)3 people · 27 points · first shared 2018 · 7 comments on HN
- 6Transit format: An interactive tutorial3 people · 4 points · first shared 2016 · discussion on HN
- 7JSX in detail2 people · 131 points · first shared 2016 · 67 comments on HN
- 8An Interactive Quine in Clojure2 people · 49 points · first shared 2019 · 8 comments on HN
- 9A new way of blogging about Prolog2 people · 29 points · first shared 2019 · 2 comments on HN
- 10Write Your Own Compiler2 people · 7 points · first shared 2017 · discussion on HN
- 11Show HN: Brainfuck for dummies2 people · 7 points · first shared 2016 · 1 comments on HN
- 12Clojure: Re-Frame (Interactive Demo)2 people · 6 points · first shared 2019 · discussion on HN
- 13A new way of blogging about ruby2 people · 5 points · first shared 2016 · 2 comments on HN
- 14Interactive Wallpaper Algorithms2 people · 5 points · first shared 2017 · discussion on HN
- 15Show HN: It's so easy to manipulate parse trees with clojure.spec2 people · 4 points · first shared 2016 · 1 comments on HN
What HN people wrote when they linked it
jrvarela56 · 2022-08-02
| Objects are excellent for data
Check out DOP https://blog.klipse.tech/dop/2022/06/22/principles-of-dop.html and Rich Hikey's critique of OOP (~'objects are custom languages on top of data'; they force you to learn specific semantics to manipulate plain data structures and make it tough to reuse your code).
mumblemumble · 2021-06-20
Its official use case is hacking recursion into a language that doesn't support recursion, but does have first-class functions. To the best of my knowledge, the only language that fits this description is the lambda calculus itself.
There is a paper, Y in Practical Programs ( https://blog.klipse.tech/assets/y-in-practical-programs.pdf) that presents some interesting things you can layer on top of the technique. I'll leave it up to others to debate whether doing so is genuinely practical, or more of a game of functional code golf.
viebel · 2016-10-25
Great article!
It would be fantastic to make all the code snippet interactive with the klipse plugin.
http://blog.klipse.tech/javascript/2016/06/20/blog-javascript.html
ptttr · 2022-07-23
I understand your worry, but I've had a quite opposite take on this.
I think we can agree that it's not that hard to find ANY job as an experienced developer. However it's much more difficult to find a great, satisfying job. For that you need to navigate around a lot of corpo-bullshit type of projects, and Clojure has served me well as a useful filter in doing that.
My reasoning is that Clojure is niche enough that when company is using it, you can assume that it's due to a deliberate technical choice, and not just because of its popularity. That tells me two things that are symptomatic, in my opinion, of a healthy tech company culture:
- tech decisions are made by engineers, not by top-level executives,
- their conclusions and bets align with mine because we all see and agree on Clojure's edge over more popular solutions.
Admittedly, there's always a risk that someone just followed the hype and got out of their depth but I think this risk is relatively small, because Clojure's no longer a new kid on a block and choosing a tech stack is a major decision and usually done by senior tech leadership, hopefully less hype driven.
Of course, Clojure is no silver bullet and it's just a tool that gives you enough rope to hang yourself. Messy codebases are just as possible as in other languages, especially when the team is new to lisps that are very different from mainstream languages, but that's a nature of software development - you learn with the experience. I do cringe when I…
escherize · 2016-11-08
Your small dive prompted me to create a simple version of what you were describing [1]. I didn't use my usual editor, and just used the cljsfiddle itself.
I really wanted to create a spec for the data in app-state, and check the value in the app-state atom each time I edited it (perhaps with an add-watch). That gets you many of the same advantages of static typing, but you only add the extra insurance when you think its worthwhile instead of always.
Instead of using strings for time-choices and page-choices (in the code at [1]), you can use maps like
[{:title "Day" :time 24}, {:title "Hour" :time 1}...]
and expand when nessicary. It shouldn't be too difficult to keep them in sync this way.
You might want to check out clojurescript again sometime soon. Clojure.spec (and cljs.spec) are going to offer a huge jump in usability. Clojure.spec is a tool kit, and specs are basically definitions of data, that can be used for parsing, unparsing, and generating that very data. The beginning of this (interactive, cljs driven) blog post shows clojure.spec off a bit.
[1] - http://escherize.com/cljsfiddle/#gist=eea10854f99ef124f8dc152af1ff306d
[2] - http://blog.klipse.tech/clojure/2016/10/10/defn-args.html
ossm1db · 2025-05-13
DDD is just the beginning. A successful architecture for AI app generation will apply DDD using data-context-iteraction (DCI) in conjunction with Data-Oriented Programming as described by Yehonathan Sharvit: https://blog.klipse.tech/dop/2022/06/22/principles-of-dop.html Note that the "DOP" espoused by Brian Goetz and others complicates AI app generation. It stipulates strong typing, that when combined with "making illegal states unrepresentable" (a concept borrowed from functional programming), makes change -- which is inevitable -- more difficult.
LesZedCB · 2023-12-06
Yehonathan Sharvit wrote a post describing the difference between Data-Oriented Programming, Data-Oriented Design, and Data-Driven Design here. it's a 2 minute read or 15 second skim, very brief.
https://blog.klipse.tech/visualization/2021/02/16/data-related-paradig…
it includes a nice summary of all of the above which may help when reading the OP.
bo0O0od · 2022-06-26
Awful stuff. These principles could only ever make sense in a dynamic language since it's mostly manually enforcing some of the basic functionality of a type system, but the fact that he also tries to argue this style could be used in a language like C# throws that defense out the window.
https://blog.klipse.tech/databook/2022/06/22/generic-data-structures.h…
The examples also contradict his other principles, i.e. immutability.
ledgerdev · 2022-02-10
Data Oriented Programming. In short, don't entangle your code with data, and the data should immutable.
https://blog.klipse.tech/databook/2020/09/25/data-book-chap0.html
nickcox · 2021-12-23
I think this should be https://blog.klipse.tech/book/2021/12/19/100-things-I-learned-with-dat…
100% agree with 37 & 38:
> 37. AsciiDoc rocks!
> 38. PlantUML rocks!
wizzwizz4 · 2021-07-03
For most things, yes. But this is JavaScript, the language where intransitive equality, implicit object-to-primitive casting and mutable global objects must be used in all slight-above-trivial code. Where `typeof` is useless and wrong, but nonetheless necessary; where there are seven different ways to parse a number, with six different semantics… there's a reason that “JavaScript: The Good Parts” is such a short book. https://blog.klipse.tech/assets/js_good_parts.jpg
Somebody who knows the good parts of JavaScript is a JavaScript expert. You want somebody who can write good JavaScript, and using the bad parts well has nothing on using the good parts adequately.
diggan · 2021-05-25
I think ClojureScript has been able to compile itself since ~2015 if I remember correctly. There is some helper libraries that makes the experience nicer nowadays too, tools like KLIPSE (https://github.com/viebel/klipse)
Here are some starting points:
- https://clojurescript.org/guides/self-hosting
- https://practicalli.github.io/clojurescript/quickstart/self-hosted-clo…
- https://blog.klipse.tech/clojurescript/2016/04/04/self-host-part-1.htm…
fiddlerwoaroof · 2018-11-03
It's nice to have interactive code samples in most places where you use an editor.
e.g.:
http://blog.klipse.tech/lisp/2018/05/07/blog-common-lisp.html
https://polymervis.github.io/monaco-editor/build/demo/
https://oakes.github.io/play-cljs/
jrheard · 2016-11-23
Comments like this make my day, thanks :)
I'm hopeful that we'll see lots more blog posts written in this interactive style in the future - the KLIPSE plugin I use is extremely simple to set up, and has support for a ton of languages including Python and Ruby (not to mention regular old JavaScript!). http://blog.klipse.tech/klipse/2016/09/09/klipse-languages.html is a gallery page that has examples of all of the languages that the plugin supports.
jarcane · 2016-06-21
The same site has also done similar plugins for ClojureScript: http://blog.klipse.tech/clojure/2016/06/07/klipse-plugin-tuto.html
And Ruby: http://blog.klipse.tech/ruby/2016/06/20/blog-ruby.html
Rendello · 2026-06-22
There's a reason why "naming things" is one of the two hard problems in Computer Science. Data-Oriented Design (DOD) and Data-Oriented Programming (DOP) are two different things which has caused a fair amount of confusion on HN before. Data-Directed Programming (DDP) appears to be a third, different thing.
In searching those threads, I came across a post from the author of the DOP book describing the difference between DOD, DOP, and DDP (a different DDP! Data Driven Programing; a fourth thing!) [2], and I see he also made the "naming things" joke in the first paragraph, so I guess my humour isn't that unique!
There's been quite a bit of discussion about DOD and some about DOP (and much conflation between the two) on HN, it can be interesting to read [3].
1. https://martinfowler.com/bliki/TwoHardThings.html
2. https://blog.klipse.tech/visualization/2021/02/16/data-related-paradig…
3. https://hn.algolia.com/?q=Data+Oriented
StackOverlord · 2023-07-18
As a Clojure programmer, this is not what I have in mind when I think of data-oriented-programming, but this:
Principle #1: Separating code (behavior) from data.
Principle #2: Representing data with generic data structures.
Principle #3: Treating data as immutable.
Principle #4: Separating data schema from data representation.
Source: https://blog.klipse.tech/dop/2022/06/22/principles-of-dop.html
I think using C++ gives a different twist to the meaning of data-oriented, mainly because with lisps code is data. As I read this "manifesto", it seems more focused on the data the program handles than handling the program with data: In Clojure I often use data-oriented programming for programs that barely deal with any data at all. I tend to lay what I call a "plan" that describes the computation that needs to be carried out. In some way this is similar to a DSL except that this "plan" won't run without also writing a "compiler" or "interpreter". If suddenly requirements change and you need to run your "plan" in a distributed way (or any other execution flavor you may think of), you just write another compiler.
Code being data, this is an approach you can take on code itself with macros, not just as a way to add behavior but to split different aspects of code: I once wrote a macro specifically for a block of complex code that I wanted to read without the clutter introduced by debug lines, so I moved this code in a macro that would add it back using a highly specific…
shakna · 2017-01-04
> I can't get past the lack of currying.
Say again? Currying may not exist as a special form, but adding it is utterly trivial: [0]
Which I guess is where Lisp shines. Modifying the language to suit your needs is easy. You aren't bound by the limits that many languages force upon you.
That being said, I wouldn't say that Common Lisp or Ocaml have the same userbase. In much the same way that C and JavaScript don't serve the same domain.
ML languages are about safety, and correctness.
Lisps tend more to be about speed of development, and flexibility.
That being said, as just about any paradigm can be implemented in a modern Lisp, and perhaps older ones as well, there are places where they can cross over with this want of correctness.
Racket is an experimental Lisp that grew out of Scheme, and is basically a family of languages, or a Lisp-ish language framework for creating other languages. Among the inbuilt languages, is typed/racket [1]. It uses contracts or inference to ensure type safety at compile time. Due to Racket's language features, if you add contracts, typed/racket can use, or be made use of, by other Racket languages, like lazy/racket[2] and scribble[3].
Other Lisps can have similar things, as you saw with currying, Common Lisp can have compiler hints, or even static typing [4]. Clojure has a ML style matching library [5], inbuilt.
Basically, where you might hit a "I'm approaching this problem the wrong way" in most languages, you can simply write a quick,…
dfeojm-zlib · 2019-07-17
Neat. Has anyone seen Parsing with Derivatives (2011) ?
https://youtu.be/WPde6DDLtXg
http://matt.might.net/papers/might2011derivatives.pdf
https://blog.klipse.tech/clojure/2016/10/02/parsing-with-derivatives-r…
https://elfsternberg.com/2018/01/24/parsing-derivatives-naive-python-e…
https://news.ycombinator.com/item?id=11976769 (2016)
https://arxiv.org/abs/1604.04695 (2016)