S

Stephen Kell

cl.cam.ac.uk/~srk31 · Personal blog · on HN since 2014

Stephen Kell is a Cambridge computer scientist who writes about C, types, ELF binaries, and programming language design.

What HN saysHN links his work in discussions of C's staying power, memory safety, and type systems; commenters call it an effort to improve C and Unix tooling.
27HN people shared it
16linked it in comments
23stories submitted
735story points
5 years agolast shared
2014people per year2026

Most-shared posts

  1. 1
  2. 2
    Talking about “types”
    5 people · 398 points · first shared 2014 · 171 comments on HN
  3. 3
    Homepage
    3 people · first shared 2015
  4. 4
    Custom ELF program headers–what, why and how
    2 people · 4 points · first shared 2017 · discussion on HN
  5. 5
    Custom ELF program headers – what, why and how
    2 people · 2 points · first shared 2017 · discussion on HN
  6. 6
    Debugging with the natives, part 2
    2 people · 2 points · first shared 2017 · discussion on HN
  7. 7
    In Search of Types [pdf]
    2 people · 1 points · first shared 2014 · discussion on HN
  8. 8
    For and against languages
    2 people · 1 points · first shared 2014 · discussion on HN
  9. 9
    Kell13operating.pdf
    2 people · first shared 2016
  10. 10
    Gdb: Debugging with the natives
    1 people · 70 points · first shared 2016 · 5 comments on HN
  11. 11
    Putting observability first
    1 people · 42 points · first shared 2015 · 4 comments on HN
  12. 12
    Linking and loading: what's incidental?
    1 people · 24 points · first shared 2014 · 5 comments on HN
  13. 13
  14. 14
    Thoughts on peer review
    1 people · 3 points · first shared 2015 · discussion on HN
  15. 15

What HN people wrote when they linked it

vmchale · 2018-09-10
> I agree the solution is not perfect and ideally I would nuke the language out of orbit. > But that approach will never win the hearts of UNIXy kernel devs I don't think this is fair. The Linux kernel contains (as of writing) 17913052 lines of C. If you have a plan to rewrite 18 million lines of code and patch every single dependency, fine. But until then such concerns will dominate. It's also worth noting that the Rust many people write is not the low-level stuff that C programmers and systems programmers write. See https://www.cl.cam.ac.uk/~srk31/research/papers/kell17some-preprint.pd… for a better explanation of that.
dkarapetyan · 2015-09-06
I like this because it addresses part of the problem of why I've stopped paying any attention to PLT related topics like denotational semantics, monads, category theory, and higher-order/dependent static type systems in general. In my day to day work the programming language is never the problem because hacking around the limitations of the language to bridge the gap between the problem domain and the computational domain is never the bottleneck. The real problem is when these systems go into production and all static guarantees and beautiful abstractions become basically useless. What I want is something to help me reason about dynamic and evolving large scale software systems. What I get is PLT researchers and library authors bickering over dependent types, monads, and continuations. Here's a concrete and unsolved problem. How do you specify some kind of topology for your production environment and then have whatever system understands this specification reason about performance, error recovery, failover, and scaling issues. In fact the lower level components don't even matter because you could write it in Haskell or Python or Java or whatever is your favorite language. Right now there is nothing because everyone is arguing about continuations and monads. Basically everyone involved is thinking too small. The one person that I think comes close to approaching the problem from the right angle is http://www.cl.cam.ac.uk/~srk31/.
Hermitian909 · 2021-07-27
As a professional software engineer I'm not sure the idea of "safe" or "unsafe" programming languages is a coherent idea, or if it is then all languages are unsafe in my eyes. Yes C/C++ have more footguns than Java but there's no "hard line" in the safety differences and there are real and important things that need doing that it's not always clear can be reasonably done in another language. If you haven't, I'd encourage you to read the paper "Some Were Meant For C"[0] on why C still doesn't have a real replacement (though it could in the future). [0] https://www.cl.cam.ac.uk/~srk31/research/papers/kell17some-preprint.pd…
simonbyrne · 2018-06-05
Linus has long railed against the aspects of the C standard, and how they're been interpreted by compiler writers [0]. I'm not much of a C programmer, but the C aliasing rules are incredibly confusing, and seem to be interpreted differently by GCC and Clang. e.g. GCC allows type punning via unions[1], but Clang does not [2]. [0] https://www.cl.cam.ac.uk/~srk31/research/papers/kell17some-preprint.pd… [1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Type-punning [2] https://bugs.llvm.org/show_bug.cgi?id=31928
mcguire · 2018-02-19
One of the major difficulties of doing static analysis for systems programming languages like C is that the semantics are defined by the whole system, not just the language. Writing a value to an obscure location not otherwise mentioned in your program is how you turn on that led. No, it's not portable. Yes, it's necessary. And that's ok. Better tools are needed.(TM) Check out "Some were meant for C" for an interesting read. http://www.cl.cam.ac.uk/~srk31/#onward17
vletrmx · 2017-12-30
Some Were Meant for C: The Endurance of an Unmanageable Language https://www.cl.cam.ac.uk/~srk31/research/papers/kell17some-preprint.pd…
poizan42 · 2017-09-10
> x86 used not to support r-- permissions, Depends on what you mean, the original page table entries have a R (Read/Write) flag, if not set the page is read-only. What you couldn't do was mark a page non-executable. But nevertheless the second LOAD segment is marked rw- and not rwx, so it would seem that it wasn't deemed a problem in the past having segments with unsupported permissions. At the time when we got the NX bit it did happen that some programs broke because they expected executable data, but the security benefits were more important. > It would be interesting to know if you can ask the linux linker to put rodata in its own r-- segment -- I scanned the docs but didn't see an option for it. You have to write your own linker script, see e.g. [0]. [0] http://www.cl.cam.ac.uk/~srk31/blog/devel/custom-elf-phdrs.html
catwell · 2016-09-06
Well, the view that we can do without "Operating Systems", or rather have the language be the operating system, is not new. It has always been pretty popular in the Lisp, Smalltalk, Forth... communities. Daniel Ingalls famously wrote in 1981: "An operating system is a collection of things that don't fit into a language. There shouldn't be one." [1] A few years ago a paper argued that Plan 9 was basically trying to achieve that Smalltalk vision. [2] And if you think about it, that view is extremely fashinable today, with the rise of unikernels [3]. Granted, they are not used for Desktop systems as of now, but who says they won't be in a few years. [1] https://www.cs.virginia.edu/~evans/cs655/readings/smalltalk.html [2] https://www.cl.cam.ac.uk/~srk31/research/papers/kell13operating.pdf [3] http://unikernel.org/
seanmcdirmid · 2015-04-09
I was only referring to the starting quote: > When most practitioners think of "typechecking", they typically think about proving properties about programs statically. This is what the type theory community (e.g. Bob Harper) thinks...not anyone else from what I can tell (definitely not practicing programmers). Typing it out on mobile didn't make it easy to do the right quote context. Here is a good essay about it all: http://www.cl.cam.ac.uk/~srk31/research/papers/kell14in-author-version… vs. say https://existentialtype.wordpress.com/2011/03/19/dynamic-languages-are… There are other ways to do typing that might make more sense for a dynamic language than going down the expressiveness rabbit hole; e.g. https://www.youtube.com/watch?v=__28QzBdyBU
ngrilly · 2015-02-26
Here is an implementation of Timsort in Haskell that also exhibits the bug: https://github.com/timjb/haskell-timsort/commit/d9c3e1e454c7d338320f8c… I find interesting that this Haskell version of Timsort also exhibits the bug, despite Haskell having a type system more advanced than Python or Java. This is a reminder that type checking is not a magic bullet, and is hardly enough to prove a program correctness. Formal proofs and whole program static analysis are still necessary, with or without an advanced type system: http://www.cl.cam.ac.uk/~srk31/blog/2014/10/07/
justinmk · 2016-07-16
> Blueprints which can completely replace the C++ Api C++ is a rather low bar. > It's a just a matter of time ... That sets the upper limit to infinity, so it's a non-statement. > Because it's easier to learn It's easier to write, because there are no syntax or compiler errors. AST-constrained editing (e.g. lamdu[1]) will be very useful. But the lowest-common denominator cannot be "overtaken". That is why stdio is a binary stream, webapps are compiled to javascript, and programming is represented as text. Any advanced programming language that can't be represented and manipulated by ubiquitous tools will lose to one that does, so text will never--yes, never--be replaced as the common vernacular, for better or worse. To paraphrase Stephen Kell[2], Smalltalk lost because for whatever reason the people who hadn't yet "seen the light" continued to communicate and interoperate with each other. 1: http://www.lamdu.org/ 2: https://www.cl.cam.ac.uk/~srk31/research/papers/kell13operating.pdf
chubot · 2015-10-17
How does this compare with this paper? They are both discussing the meaning of the word "type". http://dl.acm.org/citation.cfm?id=2661154 There was a good blog post by Stephen Kell that I can't find now (https://www.cl.cam.ac.uk/~srk31/blog/) "The concept of "type" has been used without a consistent, precise definition in discussions about programming languages for 60 years. In this essay I explore various concepts lurking behind distinct uses of this word, highlighting two traditions in which the word came into use largely independently: engineering traditions on the one hand, and those of symbolic logic on the other. These traditions are founded on differing attitudes to the nature and purpose of abstraction, but their distinct uses of "type" have never been explicitly unified. One result is that discourse across these traditions often finds itself at cross purposes, such as overapplying one sense of "type" where another is appropriate, and occasionally proceeding to draw wrong conclusions. I illustrate this with examples from well-known and justly well-regarded literature, and argue that ongoing developments in both the theory and practice of programming make now a good time to resolve these problems."
jpt4 · 2015-03-30
Part of the vaunt of Genera and other high level language hardware/software systems is the degree to which the runtime is inspectable; language-as-system design, however, tends to be explicitly monoglottal. Given that the author's research focus appears to be language agnostic systems programming tools (optimizing linkers, language independent interoperability, see [0]), I am curious as to how he might (assuming the final paragraph [1] entails his intention) solve the transparency problem at the scale of the meta-runtime environment, without the multiplication of C vs. gdb level effort for each language supported. The naive approaches of either 1) a powerful host runtime, to which other languages are ported or 2) an generic representation of runtimes more amenable to inspection seem both similar in spirit and akin to the language-as-system approach. [0] http://www.cl.cam.ac.uk/~srk31/blog/2014/12/16/#for-and-against-langua… [1] "This co-evolution is interesting too. The mechanisms for achieving observability in C code lie outside the language. Coredumps and symbol tables are system mechanisms, not language mechanisms. Observability in Unix has been part of the design, down in the fabric of the system; it is not an afterthought. An opinionated system designer (okay, I'll step forward) might claim that observability is too important to leave to language designers. There are, however, some gaps to plug and some mindsets to bridge in order to apply Unix-style debugging…

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