Console #77 -- Janet, Little, and CSML

Interview with François of CSML

Sponsorship

Fulton - the world’s most comfortable, supportive, and sustainable insole

Fulton is a modern brand of arch support. They developed sustainable, supportive and comfortable insoles that improve your alignment and posture, preventing injury through:

  • A cork base, which absorbs shock and molds to your unique arch to provide custom support

  • A deep heel cup to provide maximum stability and prevent injury

  • Arch support and natural latex foam to improve overall comfort

  • Entirely natural and biodegradable materials to support not only you, but the planet.

Fulton is offering free shipping and free returns, so your order is risk free, learn more about Fulton here: walkfulton.com


Not subscribed to Console? Subscribe now to get a list of new open-source projects curated by an Amazon engineer in your email every week.

Already subscribed? Why not spread the word by forwarding Console to the best engineer you know?


Projects

janet

Janet is a functional and imperative programming language and bytecode interpreter.

language: C, stars: 2179, watchers: 54, forks: 163, issues: 33

last commit: October 26, 2021, first commit: February 09, 2017

social: https://janet-lang.org/

csml-engine

CSML is an easy-to-use chatbot programming language and framework.

language: Rust, stars: 487, watchers: 13, forks: 29, issues: 10

last commit: October 22, 2021, first commit: February 21, 2019

social: https://twitter.com/sayCSML

little-lang

Little was a statically typed C-like scripting language, ideated by BitKeeper.

language: Shell, stars: 205, watchers: 10, forks: 17, issues: 9

last commit: May 03, 2016, first commit: April 05, 2016


Console is powered by donations. We use your donations to grow the newsletter readership via advertisement. If you’d like to see the newsletter reach more people, or would just like to show your appreciation for the projects featured in the newsletter, please consider a donation 😊

Donate To Console


An Interview With François of CSML

Hey François! Thanks for joining us! Let’s start with your background. Where have you worked in the past, where are you from, how did you learn how to program, what languages or frameworks do you like?

I have a slightly unusual background. I have a degree in musicology and studied cello professionally at the Paris conservatory, then decided I wanted to have a career as a photographer instead. After about 7 years of doing that I stumbled more or less by chance upon School 42 which happened to be right next to my home. 42 is a coding school created by a French billionaire with a revolutionary new model, open 24/7, with no teachers and where you learn with projects. It was the first one but there are now 35 campuses all over the world now! I loved it so much when I visited it one Saturday morning that I decided to apply while still working as a photographer. I kind of progressively did more of this while doing less of that and that’s how I eventually changed careers, I guess! Then I worked as a devops for a while at Danone, which is a large non-tech company where I was lucky to get a lot of freedom to do very interesting things and have a global impact even though I was just a junior. Then I started an agency business with a friend from 42, and we ultimately founded another company, Clevy.io, where we launched a product for creating internal chatbots and conversational automation tools for large companies.

What’s your most controversial programming opinion?

The DRY principle as it is usually presented is not a good one. It drives developers to find overcomplicated abstractions over simpler, readable, maintainable code. I get why you want to reuse components that you are using multiple times but the way it is often misinterpreted, especially by junior developers, is to over-engineer the simplest code “just in case you might need the abstraction later”.

What is your favorite software tool?

I don’t really care so much for the software I use. It should get the work done and not require too much configuration. I try to get productive with what I have, and not spend too much time thinking about the newest trend: most of my setup I’ve been using for 5+ years! I think the latest addition to my must-have stack was about 2 years ago, and it was a screenshotting tool called CleanShot X. I do a LOT of screenshots that I need to annotate, and the built-in tools in macOS are terrible. It might very well be the tool I use the most besides the obvious IDE, browser etc. It’s been a life changer for me!

What IDE are you using?

I settled on VS Code about 5 years ago, and don’t plan to change anytime soon. It’s quite complete, extensible if needed (although I don’t spend much time looking for new extensions), and quite versatile as I need to be productive in a few different languages at the same time (on a daily basis at least JS, Rust, Python, HTML/CSS…).

If you could teach every 12 year old in the world one thing, what would it be and why?

That it’s ok to be wrong, and neither you nor your neighbor should feel bad for it - and it’s definitely not OK to ridicule someone for being on the wrong side of things. Besides, “being wrong” is oftentimes a relative concept, and it never defines you as a person. Everybody is wrong all the time. Many things would be so much better if everyone was able to take a step aside and discuss without ego and pride stepping in: we’re all in it together. If the “wrong” person “wins” the argument, you still have to live with them somehow.

But I guess that by 12 it’s already a bit too late to have this discussion!

What are you currently learning?

I just moved to Sweden with my family. Fabulous place, especially if you have young kids. So I’m trying to learn all things Sweden - the language obviously, the politics, the geography, the pop culture, the administration… 

What are some interesting things you’ve learned about Sweden?

One of the more interesting things I found about Sweden is how open the country is to immigrants - at least from other EU countries. But, from what I’ve seen it’s also significantly easier to move to Sweden from most places in the world than it is in other EU countries, even France or other Nordic countries like Denmark. Everything is super centralized so it makes things relatively easy once you have been properly registered in the system. It took us less than 5-6 weeks after we set foot in Stockholm to receive our physical Swedish ID card! Every single person I have talked to so far in my quest has been extremely helpful, and quite efficient. Whenever you have a question, you will absolutely get a complete answer, probably right now in the same phone call, or they will tell you when they will call you back with an answer - and they always do. Otherwise, Swedes live outside most of the day even when it rains (they say that there is no bad weather, only bad clothes) so I try to do that as well, and I find myself in a much better (physical and psychological) shape than when I left Paris. Now we’ll see how the winter goes...

What have you been listening to lately?

It really depends on what I need to get done. If I’m coding and it’s late in the night and I need an extra kick, some form of electronic music that gets me going. Solomun, Weval, Rone, Archive, Modeselektor, SebastiAn...  Otherwise, I listen to a lot of classical music. This one is even harder to classify because it’s quite vast… Whenever one of my former colleagues or friends has a new album coming out, I try to give it a listen! 

I feel that Spotify has made me listen to more music in terms of quantity, but I kind of find myself always listening to the same things, especially when it comes to classical music. I used to discover many more things before the streaming era than I do now, and that’s made me a bit sad. Discoverability is still very much an unsolved problem. Recommendation algorithms just give you the same thing over and over by trying to optimize for time spent on the platform and making sure that you already know and like what you are going to hear/watch next.

How do you separate good project ideas from bad ones?

It’s actually a question that I’ve been asking myself a lot recently. I don’t have a good answer, because I don’t think I’m really able to tell by myself what’s a good or bad project, assuming we are talking about the project’s eventual success (commercial, usage, fame, whatever) and not the biblical good/bad dichotomy. I think it all comes down to marketing at some point rather than just the idea. There are many cases where a product shouldn’t exist but does, and is even successful for some reason. I think it was Justin Kan (twitch) who said: “Startups mostly don't compete against each other, they compete against no one giving a shit” and that sums it up: people didn’t need your project until they found it 5 minutes ago, chances are they can continue their life without you. So my current answer to this question is that I don’t, and sometimes I fail, sometimes I succeed, and most of the time there is a bit of both depending on how we look at the project. A project that eventually succeeds is usually just a project that gets worked on the most and the longest.

Why was CSML started?

We have been developing tons of chatbots - through our no-code NLP platform, but also by hand with regular programming languages (javascript, python, etc.). There are issues with both approaches: when using a GUI, you are ultimately limited to what the interface is letting you do. If you need something that’s not available, too bad: you can request the feature, but that’s about all you can do. And as a developer, it’s always super frustrating to be locked into an incomplete tool, that you can’t easily extend, not speaking about saving your own stuff or exporting/migrating your content to a different platform if you were to need it sometime down the line. There are advantages to no-code tools (it’s supposedly easy to work on) but it just doesn’t scale well, especially if you don’t yet entirely know where you will be with your project in just a few months.

On the other hand, whilst using a more generic programming language will solve these problems as you can do basically anything, it requires so much work and effort that it’s often not worth it (and it also takes so much more time).

We thought that there was a way to solve this problem by providing a developer experience that’s as close as possible to just writing code with all of the advantages and flexibility, but also provide so much more comfort for developers by solving most of the complexities that are common in every chatbot. At its core, a chatbot is a fancy state machine: you need to know where you are in a conversation, remember what’s been said before, give some context, connect with other APIs… so we have created a programming language that provides interfaces for all of that, and even the most complex scenarios are written in just a few lines of very simple, readable, and extensible code, that you can host just about anywhere, compatible with many database engines. A few years in, this language has become quite extensive, but remains very easy to pick up, with a very, very easy learning curve. It powers chatbots with millions of conversations, it is able to securely deal with super sensitive data if needed (we know of some really secure companies that are using it), and even works fully offline if needed.

You can try CSML on the playground here: https://play.csml.dev

Where did the name for CSML come from?

We are notoriously bad at naming things… The basic idea behind the CSML name was that we wanted to assert a few things about the language. It stands for Conversational Standard Meta Language. So you know that it’s for creating Conversational experiences. We also aim to make it the de facto standard for writing cool chatbots, so that’s where the S comes from. And it’s a Meta Language - technically, it’s a DSL, but it also makes it sound a bit like HTML, and basically we would like that people consider it like the HTML of chatbots.

Are there any overarching goals of CSML  that drive design or implementation?

There is one main goal, and one secondary goal. The main goal is that everything should be more or less intuitive and about the same as describing your logic in plain English, so that it’s really, really simple to pick up.

The secondary goal however is to make it as unlimited as possible. There should not be one single thing that’s impossible to achieve.

The reason the goals are in that order is that 90% of the CSML users will use just 10% of the possibilities of CSML so we should make that as easy as possible, but it should never limit you in what you need to do. That’s why, from the very first version of CSML, we have included a way to add external code in a CSML script, just so that we could bypass any inherent limitation, if needed, without waiting for the feature to be natively implemented (but you should definitely speak up and say what you need or why! Ideally through Slack or simply a github issue).

I would say that there are not many things from the first goal that are still missing, so we focus more on the second goal now. Also, some of our users are starting to be very proficient with CSML and to do things that we couldn’t imagine ourselves, so we need to heavily invest in many niche features now. But we do find some “things that should be easy, but are hard AF” from time to time. For example: believe it or not, there is no for-loop/while-loop in CSML right now as of v1.7.0 (there are other ways to iterate over stuff) but it was only very recently, after all those years, that a user ever wondered about how to achieve something that would be so much easier with a for-loop. So that’s going into the next release!

If so, what trade-offs have been made in CSML  as a consequence of these goals?

I think the most important trade-off is that the code that you write in CSML can simply not be too smart. It’s a language to write dumb code. This is super powerful for junior developers as they have a lot of freedom and not too many constraints, it’s very easy to learn, but it can also be a bit frustrating for expert programmers who wish they would find some advanced concepts from C++ or Go or Rust, like better control over memory allocation, more optimization, strong types, etc. But it doesn’t matter! We are not writing code that puts a rover on Mars: we are helping people create great chatbots. One of the most important parts of CSML is basically to add sleep(2000) more or less everywhere, because you actually do NOT want the chatbot to go too fast (it feels horrible to read otherwise)!

There is actually a vast majority of junior developers on Earth. We’re happy to create something that’s focused on making it the best experience for that audience and that actually helps them grow in their development career with a not-so-scary programming language that still gives them a lot of control.

Are there any competitors or projects similar to CSML? If so, what were they lacking that made you consider building something new?

There are basically 2 types of chatbot-related products out there.

Some like Rasa (also open source), Google Dialogflow, Amazon Lex, Microsoft Luis etc. focus mostly on the Natural Language Understanding part of the problem, which is in my opinion the wrong problem. It stops short of what makes a chatbot really valuable by only focusing on understanding the input, but not doing much to help the developer handle it, remember stuff from one session to another, connect to other APIs etc., which is what the end user actually needs. So either the developer has to write a LOT of code to make the chatbot useful, or the users are left with a funny chatbot that can do some nice small talk but is not capable of much. We address that by focusing on the developer experience to actually be able to build complex conversational assistants very easily but we consider that NLU is just a feature, not a product.

Other products are no-code platforms like Manychat, Chatfuel, Landbot etc. which let you make a simple chatbot in a few minutes but lack in ways to make your chatbot truly scale. It’s usually a nightmare to work on larger chatbots, or with a team. Also, let’s say you want to export your bot and re-import it elsewhere: since all you have is a fancy graphical interface, how are you exactly going to do that? All you can do is print it, and that is of no use. So those products are great for prototypes and quick and dirty experiences, but the tradeoffs at scale can be really an issue, which we obviously handle by creating a programming language that you can write with any text editor, host anywhere, run on an open-source engine and standard/non-locking dependencies, version as you like on git or any other version control tool...

What is the release process like for CSML?

We have 2 main branches, dev and master. On master we only have the code that goes in final releases, and we use dev to create pre-releases and merge all our feature branches. Each feature has its own branch and gets a full run of tests using Github actions before it can be merged. When we want to create a new release we also use a Github action which will compile a new version of the CSML interpreter then build a new binary and docker image for the server then publish it everywhere it needs to go. The great thing about Github actions (although the syntax is hideous compared to gitlab-ci.yml files) is that it’s easy to compile things on multiple platforms/architectures! So we publish binaries for Mac and Linux, and are going to add Windows builds soon.

How is CSML eventually intended to be monetized?

We have created CSML Studio, a SaaS version available with various plans (free/pro/enterprise) on https://studio.csml.dev which includes a lot of extra features that are kind of “satellites” to CSML. For example one of our latest features on CSML Studio is a built-in, mini Customer Data Platform that allows you to save data from your chatbot users in a database that you can then export to a BI tool of your choice. It also contains connectors to all the most popular communication channels (while the CSML Engine is API-based only), and 100+ ready-to-use connectors with popular APIs and software. But at its core it will always be the exact same CSML engine as what you can find on Github!

How do you balance your work on open-source with your day job and other responsibilities?

We have decided early on that even though CSML was going to be a major part of our company (we sell no-code conversational automation products to large enterprise customers - which in the background uses the CSML engine), it would be open-source. So the decisions on what I spend time on in general are always business-driven, but if I’m spending time on CSML, it will mostly be open-source.

What is the best way for a new developer to contribute to CSML?

We don’t actually expect most CSML users to contribute to CSML itself. The goal of CSML is to make it really easy, even for beginners/not-so-great developers, to develop complex chatbots. We do so by maintaining a chatbot engine in a very advanced, complex programming language, Rust. There is usually not a whole lot of intersection between beginners/junior developers who need a very simple but powerful chatbot engine AND understand and can write more complex, low-level code in Rust. So what we usually recommend when people ask us how they can contribute is that they report their issues or give us feedback and insights into how they are using CSML either in the repo or on Slack, and that they produce and publish content, entire chatbots or smaller modules that perform interesting tasks. And if they are missing a bit of documentation or something is unclear, this could also lead to a very valuable contribution!

If you plan to continue developing CSML, where do you see the project heading next?

We are focusing more and more on the “Automation” part of “Conversational Automation”. We feel that CSML as a language is starting to look pretty good features-wise, and now we want to focus on making it easier to do more complex things - better serve our power-users. So there will be a powerful CSML CLI very soon, and more powerful ways to extend the language and connect to other APIs.

Also, I feel that we have not been doing error handling and logging correctly, so we might look at this soon.

Are there any other projects besides CSML that you’re working on?

I have one toddler and a second one coming soon. I’m good for now…

Do you have any other project ideas that you haven’t started?

A few actually. I used to do a lot of hackathons in the past and we had many very cool ideas back then, some are still quite relevant even 3-5 years later. But I think that if I have time to start working on something new, it might just be a personal, non code-related project, or just teaching myself something new.

Where do you see open-source heading next?

There have been some cool evolutions to the open source model recently, I think. There are still issues but I find that many fully open-source companies are funded now, and this was not so much the case just 2-3 years ago. It was very rare! So I believe there will be a lot of change in the business model of open-source projects, more companies will turn to OSS for their products and I’m quite excited about that.

Do you have any suggestions for someone trying to make their first contribution to an open-source project?

Don’t think too much about it. If you want to do something, you might as well publish it in open-source, unless you have a good reason not to. Otherwise, if you want to do something with an existing library and the feature does not exist, just propose creating a PR and see where it goes! Chances are the maintainers will be super happy - even if at the end you don’t succeed, they will always love the boost to know that somebody is using their project in a way they didn’t imagine and wants to push it further!

Also, asking “what can I do to help” is always a good way to start...