O

Oleg Kiselyov

okmij.org · Personal blog · on HN since 2007

Oleg Kiselyov's site hosts papers and notes on functional programming, type systems, effects, macros, and OCaml and Scheme.

What HN saysHN commenters call his papers brilliant and insightful, praise his clear writing, and cite his notes on OCaml generalization and tagless-final interpreters.
251HN people shared it
183linked it in comments
118stories submitted
2.8Kstory points
3 months agolast shared
2007people per year2026

Most-shared posts

  1. 1
    An argument against call/cc (2012)
    28 people · 97 points · first shared 2012 · 13 comments on HN
  2. 2
  3. 3
    Monadic I/O and Unix shell programming (2001)
    14 people · 136 points · first shared 2007 · 10 comments on HN
  4. 4
    XML and Scheme
    12 people · 11 points · first shared 2007 · 1 comments on HN
  5. 5
    How the OCaml type checker works (2022)
    11 people · 326 points · first shared 2013 · 42 comments on HN
  6. 6
    Freer Monads, More Extensible Effects (2015) [pdf]
    11 people · 98 points · first shared 2015 · 30 comments on HN
  7. 7
    The Design and Implementation of BER MetaOCaml
    10 people · 36 points · first shared 2013 · 2 comments on HN
  8. 8
    Subtyping, Subclassing, and Trouble with OOP
    9 people · 11 points · first shared 2008 · discussion on HN
  9. 9
    Streams and Iteratees
    8 people · 41 points · first shared 2010 · 3 comments on HN
  10. 10
    Implementing and Understanding Type Classes (2014)
    7 people · 121 points · first shared 2015 · 26 comments on HN
  11. 11
    Tagless-Final Style (2020)
    7 people · 2 points · first shared 2016 · discussion on HN
  12. 12
    SXML
    7 people · first shared 2007
  13. 13
    "Objects are a poor man's closures.." (OOP in Scheme)
    6 people · 12 points · first shared 2010 · discussion on HN
  14. 14
    Low- and high-level macro programming in Scheme
    6 people · 2 points · first shared 2011 · discussion on HN
  15. 15

What HN people wrote when they linked it

nbaksalyar · 2025-11-20
I strongly recommend to check all other papers and articles on https://okmij.org/ftp/, every single one of them is brilliant and insightful. I love the pedagogy, the writing style and clarity. Oleg Kiselyov is one of the best technical writers I've discovered recently.
hnra · 2025-08-20
There is a great blog post on how the OCaml type checker is inspired by garbage collection here: https://okmij.org/ftp/ML/generalization.html
naasking · 2025-07-02
This looks like a reinvention of the final, tagless interpreter, which has been a great, common technique in functional languages for awhile: https://okmij.org/ftp/tagless-final/index.html#tagless-final It's an interpreter though, not a JIT. This kind of programming language thing is a bit of a hobby horse of mine, so see the comment I just posted on this for full details: https://codereview.stackexchange.com/questions/259045/poor-mans-jit-us…
eru · 2024-12-30
You can do what you are describing in Haskell just fine. Eg you can implement 'overloaded' arithmetic operations for your custom data types. I think what's described in the article goes a lot further than this. (Though I'm not sure it's worth it.) Compare also https://okmij.org/ftp/tagless-final/
soegaard · 2023-12-04
> 2. Turing complete macros (not just syntax-case) I assume, you mean `syntax-rules` here. If I understand correctly, it's pretty easy to simulate a paper tape with `syntax-rules` macro - that is `syntax-rules` macros are already "Turing complete". https://okmij.org/ftp/Scheme/macros.html#turing-completeness-hygiene But ... I know what you mean - in practise `syntax-case` or `syntax-parse` would be lovely to have.
JHonaker · 2022-08-31
Not really a place for discussion, but https://okmij.org/ftp is hands down the best place on the internet if you're into PLT.
a-nikolaev · 2020-06-07
Okay old man, show me your age and knowledge: do you know about Oleg Kiselyov and his amazing articles? See here: http://okmij.org/ftp/
tome · 2020-02-17
I don't believe that continuations are a corner of programming language theory that is well-loved and and well-understood by programmers at large, are they? Even amongst experienced functional programmers they seem to be thought of as rather difficult. Oleg Kiselyov has written extensively on them but his work has not been brought to the masses in the same way that his work in iteratees has. http://okmij.org/ftp/continuations/index.html
maattdd · 2019-08-21
Unrelated to the article, but the author (Oleg) is one of the star of the typed functional programming world. For example, one of his research project (BER MetaOCaml) is about generating typesafe OCaml at runtime (to improve performance mostly). I strongly recommend you to check this (http://okmij.org/ftp/ML/MetaOCaml.html) if you are interested in the field.
bjoli · 2019-07-02
You almost never want full continuation. They are less efficient, harder to reason about (because they capture things outside the call/cc) and are a generally fantastic way to accidentally leak memory. Oleg Kiselyov has written about it extensively: http://okmij.org/ftp/continuations/
georgewfraser · 2018-11-16
For anyone interested in this subject, there's a great minimalistic implementation in OCaml here: http://okmij.org/ftp/ML/generalization.html The author starts with a naive implementation similar to the one linked here, then implements a series of optimizations that make it more efficient.
YorkshireSeason · 2018-11-07
You might find the following papers interesting. [1] O. Kiselyov, K. Kameyama, Rethinking Prolog. http://okmij.org/ftp/kakuritu/rethinking.pdf [2] E. Barrett, C. F. Bolz, L. Tratt, Unipycation: A Case Study in Cross-Language Tracing. https://soft-dev.org/pubs/pdf/barrett_bolz_tratt__unipycation_a_study_…
tathougies · 2018-02-21
Sure... most people familiar with zippers know that it can be thought of as the algebraic derivative the underlying type. What’s perhaps less known is that this is the same as ‘differentiating’ the traversal of the data type. The continuation monad is a sort of ‘derivative’ of a computation in that it nearly captures the ‘infinitesmal’ difference between two steps in a computation. If your computation is the traversal of your tree, list, or text markup, then you can make a zipper from that without having to declare new data structures. This is isomorphic to declaring your own data structure. Its only advantage is convenience (that I know of at least). Oleg Kiselyov goes into great detail with this idea and has lots of example code: http://okmij.org/ftp/continuations/zipper.html
panic · 2017-09-21
If you like this article, the rest of Oleg's stuff on this style of embedded DSLs is also worth reading: http://okmij.org/ftp/tagless-final/index.html One particularly cool (and surprising, to me at least) trick is defining interpreters that carry out composable optimization passes on a DSL without needing an intermediate representation: http://okmij.org/ftp/tagless-final/course/optimizations.html
richdougherty · 2017-03-13
I love reading Oleg Kiselyov articles/papers. Just a few lines of Haskell or ML and some amazing concept is unlocked. A great exercise is to port some of his code to a language of your choice. http://okmij.org/ftp/
greghendershott · 2016-09-26
Racket provides delimited continuations. The page you linked to is criticizing undelimited continuations -- including quoting Matthias Felleisen -- and contains a link to the following: http://okmij.org/ftp/continuations/undelimited.html#delim-vs-undelim
foldr · 2016-09-26
I thought the general consensus on call/cc now is that although it's very powerful in principle it's not such a great abstraction in practice. It's difficult to implement efficiently and abstractions created using it tend to be very brittle. See e.g.: http://okmij.org/ftp/continuations/against-callcc.html
catnaroek · 2016-07-25
This is a nice introductory tutorial on how to implement Hindley-Milner type inference: https://github.com/jozefg/hm This is a more advanced tutorial that illustrates a nice but tricky optimization that OCaml's type checker internally uses: http://okmij.org/ftp/ML/generalization.html Finally, TAPL's type checkers are pretty good. They aren't designed for efficiency, though. They're designed to closely follow the book's contents: http://www.cis.upenn.edu/~bcpierce/tapl/checkers/
cwzwarich · 2016-02-06
This is probably my favorite explanation of HM type inference, based on an analogy with region-based memory management: http://okmij.org/ftp/ML/generalization.html
davexunit · 2015-09-09
I think JSX is just terrible, glad to see someone else feels the same. The ClojureScript way is much better, though I think SXML style is best: http://okmij.org/ftp/Scheme/SXML.html
tel · 2015-03-02
Oleg's Hansei is also very worth checking out http://okmij.org/ftp/kakuritu/
GregBuchholz · 2014-09-12
Everything by Oleg Kiselyov is great. Here's the link to the slides for the talk, and code for the examples in the paper: http://okmij.org/ftp/kakuritu/logic-programming.html#vs-prolog ...and to his home page: http://okmij.org/ftp/
Patient0 · 2014-08-13
I've been working my way through this which in my opinion is excellent: http://okmij.org/ftp/Haskell/AlgorithmsH.html#teval
brandonbloom · 2013-09-30
I'll agree it's best to avoid fully open unions when you can, but some (super useful) things truly don't work that way. Check out http://okmij.org/ftp/Computation/monads.html#ExtensibleDS for a cool example.
keithflower · 2013-07-25
Another interesting platform for working with probabilistic programming is Bher/Church: http://projects.csail.mit.edu/church/wiki/Church and Oleg's and Ken Shan's fantastic OCaml library Hansei: http://okmij.org/ftp/kakuritu/index.html Pedantic nit: probablistic vs probabilistic....
pcwalton · 2013-01-17
Using blocks for looping (i.e. using callbacks) is actually a great feature. See Oleg Kiselyov's spirited defense of callbacks (as opposed to iterator objects) here: http://okmij.org/ftp/papers/LL3-collections-enumerators.txt The fact that `break`, `next`, and `return` work the way they do in blocks is a remarkable simplification; it turns a set of constructs that work only on loops into functional constructs that work on functions, broadening their usefulness.
agumonkey · 2012-09-03
My favorite example is http://okmij.org/ftp/ Quite beautiful.
jules · 2011-09-09
Other great papers: Flapjax: A Programming Language for Ajax Applications: http://www.cs.brown.edu/~sk/Publications/Papers/Published/mgbcgbk-flap… Embedded probabalistic programming: http://okmij.org/ftp/kakuritu/dsl-paper.pdf Memoization of Top-down Parsing: http://arxiv.org/PS_cache/cmp-lg/pdf/9504/9504016v1.pdf
jhpriestley · 2011-03-11
If you're new, you might like something easy like the "gentle introduction to haskell" http://www.haskell.org/tutorial/. Unfortunately it does not cover more recent and advanced features; for that I would recommend Oleg Kiselyov's site http://okmij.org/ftp/Haskell/ (he is somewhat famous in the community for bringing advanced Haskell features "down to earth" with clear, simple examples).
Kevembunagga · 2010-12-29
Why not look at the original: http://www.mail-archive.com/[email protected]/msg85720.html Yet, beware, this is Oleg Kiselyov http://okmij.org/ftp/ outstanding but hard to grasp computation chores are child play for him. For instance the Y combinator is "out" to much simpler U combinator http://okmij.org/ftp/Computation/fixed-point-combinators.html P.S. Amazing that Google picked up this link of today

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close