I'm working on a language optimized for solving programming challenges as quickly as possible.
That is, I'm not optimizing for execution time, I'm optimizing for time between reading the problem statement and having a working solution. As far as I'm aware, there aren't any existing languages in this space. There are plenty of "code golf" languages, which optimize for shortest finished program, but that's slightly different. Based on the top AoC solvers, the closest thing today is Python -- but we can do so much better! Currently, the language is very immature, but it can solve a handful of AoC problems. But before long, I'll need to tackle a very big problem: building an IDE around this thing. See, for a language like this, the syntax is only half the battle. Ideally, when I type something like `| map (*2)`, I should have instant visual feedback showing me how the input is affected by this change. Not to mention more traditional IDE features, like suggesting functions based on the type under the cursor. I don't have anything public to share yet, but if you're interested in collaborating (esp. on the IDE), feel free to shoot me an email.
Oh, another side project I'm working on: a "high touch" music recommendation service. Like Pandora, except your recommendations are chosen by a real person instead of an algorithm. Downside: you get far, far fewer recommendations; upside: you can tell your recommender exactly what you want, exactly what you did or didn't like about a track, etc.
Beta-testing it with some friends and family now; we'll see if it grows into anything real!
This sounds very cool. I recently thought of another approach for song recommendation due to necessity i.e.: based on how a song sounds. There are genres but they're way too generic. Other methods like similar artists, what else people who've likes a song love etc doesn't always work. Not sure how streaming services recommend but I don't think they do what I want.
I know, how something _sounds_ is subjective but I was thinking something along the lines of how Shazam app does. If they can compute a song signature and compare it against a library, it should be possible(?) to find top 10 closest neighbors. BTW, I'd love to test your app if that's possible.
This is such a cool idea. The gap between the "aha" moment of a programming challenge and the implementation is high for me since I don't get to code very much anymore. Can't wait to check it out!
Yes, agreed. I recently went through AOC2020 and found that much of the actual implementation was actually quite a chore, even though many of the problems seemed quite simple. Granted I was using C++: https://github.com/areading314/adventOfCode2020
> I should have instant visual feedback showing me how the input is affected by this change
Like LightTable? Might want to check that out if you're not already aware of it. I don't know if it's gone anywhere in recent years or has inspired any similar features in other editors.
Ah, I remember when LightTable launched -- my dad (huge Clojure fan) was over the moon. Even today he's still trying to convince me that I should just use Clojure. :P
Have you given any thought to this being used in place of pseudocode in white papers? If the language is much easier to translate problem into code, it is probably good at conveying ideas for documentation or teaching. My naive assumption is that would be a more useful focus than IDE tooling.
That's an interesting idea, but I think it wouldn't be a great fit. Reason being that, in the interest of speed, the language will need to include some irregular or unintuitive syntax and idioms. It goes without saying that pseudocode shouldn't require a manual!
I hope this will in no way be interpreted as discouraging or snobbish, just want to add a little perspective. Please understand that I’m very supportive of your endeavor...
> As far as I'm aware, there aren't any existing languages in this space. In some form or another, all existing languages (other than joke langs) are in this space. That’s why we have programming languages. Ultimately they all prioritize some subset of “problems” that they optimize solving. That said, in terms of instant feedback I’d look at LightTable and (believe it or not) Chrome dev tools as prior art.
> Ultimately they all prioritize some subset of “problems” that they optimize solving.
Sure...but not solving quickly, at the expense of all else. Rust is optimized for solving certain problems -- but solving them robustly, not quickly. Python comes a bit closer, but Python also wants to be readable; I don't have to worry about that. I guess one way to frame it is: the core values (https://vimeo.com/230142234) of this language are velocity, and...that's it. Maybe expressiveness (less typing) and transparency (immediate feedback), but really those are just aids to velocity moreso than orthogonal values.
> Sure...but not solving quickly, at the expense of all else.
I really, sincerely, think they do. It’s just that their optimizations focus on the subset of problems. For example: > Rust is optimized for solving certain problems -- but solving them robustly, not quickly. This is basically the same thing as saying: when the problem one wants to solve quickly is robustness, Rust may be a good choice. > Python comes a bit closer, but Python also wants to be readable; I don't have to worry about that. There are some problems I associate with quickly solving in Python, and others where I find it exceptionally slow. Sure, readability may be a contributing factor. Another is immature/complex tooling that makes static validation or dependency management a slog. Another still is that a lot of its concurrency story is in flux and you have to spend time researching approach and compatibility if your problems are concurrency related. I’m still not trying to discourage, but I’ve spent most of my career working in scripting languages (those which most prioritize “rapid prototyping” and “repl driven development”), and ultimately when they’re applied to use cases that they’re not designed for their velocity is consumed by tooling. My advice, intended with kindness and encouragement, is to consider which problems you wish your language to be able to solve rapidly. To your points about velocity aids, expressiveness and transparency aren’t just velocity amplifiers at the time you write code. They also (can) aid velocity of reading comprehension, editing/refactoring, review. This is a place where Python does very well in terms of velocity: even when I had read less than 100 lines of it, I could generally review work and ask important questions about what it was doing in... well, frankly a shorter time than the JS I was actively working with as a lead at the time. It’s clear you want a language that enables devs to dev fast. But what are they doing fast?
I agree with OP, not all languages are optimized for solving programming challenges (to be specific, recreational programming challenges) as they are optimized around different goals.
I tried solving AOC2020 as a means for learning golang. 6 challenges in, I gave up not because the challenges were hard but because it took longer to translate logic to code. It was no fun to write simple for loops, before getting into actual problem logic. Having to write a minInt function is like a distraction when you want to be focusing on the programming challenge. It is much simpler to use a programming language like Python that comes batteries included. In this regard, I suppose functional programming can be quite expressive. If you can break the problem into functional units, it can be a pleasure to solve programming challenges using FP.
> In some form or another, all existing languages (other than joke langs) are in this space.
I was hoping there was going to be some insightful critique after that long preamble. This is similar to an "all languages are Turing complete" type nitpick that doesn't add much to the conversation.
If you look downthread, I missed an important bit of context where the goal is solving programming challenges, not general programming problems (which I misperceived). That’s a significantly more narrow focus to which none of my preamble or conclusion is applicable.
One idea I started building and never finished was "pseudocode as code".
The idea was to have a compiler for pseudocode used in CS books in place of real code. There are a few small differences (eg. using = vs :=) but most books and interview-preparing materials use a C-like notation. Then I started reading papers written by language researchers (which use haskell-like pseudocode) and realised the size of the task at hand. Probably trying to please only CS students / people doing interviews would still make for a fun hack.
As in, visual programming? I don't have a ton of experience with that, but my gut says that once the problems reach a certain degree of complexity, it would hurt more than help.
Or, how about vocal programming? I wonder if, in practice, dictation might be faster than typing? :)
Yes, recently I've been interested in visual programming paradigms like scratch. After all Python was originally supposed to be a teaching language. Maybe in 2030 the newest generations will find text files archaic and not expressive compared to new types of visual, vocal, or even "video" animated languages.
For the IDE part, you can look into the Language Server Protocol spec and write an implementation for your language. Would then work with most editors like VS code, vim, etc. out of the box and remove the leg-work of making the rest of the editor.
Comments (1,232) 661 threads
Show all comments
Showing thread 4 of 661
That is, I'm not optimizing for execution time, I'm optimizing for time between reading the problem statement and having a working solution. As far as I'm aware, there aren't any existing languages in this space. There are plenty of "code golf" languages, which optimize for shortest finished program, but that's slightly different. Based on the top AoC solvers, the closest thing today is Python -- but we can do so much better!
Currently, the language is very immature, but it can solve a handful of AoC problems. But before long, I'll need to tackle a very big problem: building an IDE around this thing. See, for a language like this, the syntax is only half the battle. Ideally, when I type something like `| map (*2)`, I should have instant visual feedback showing me how the input is affected by this change. Not to mention more traditional IDE features, like suggesting functions based on the type under the cursor.
I don't have anything public to share yet, but if you're interested in collaborating (esp. on the IDE), feel free to shoot me an email.
Beta-testing it with some friends and family now; we'll see if it grows into anything real!
I know, how something _sounds_ is subjective but I was thinking something along the lines of how Shazam app does. If they can compute a song signature and compare it against a library, it should be possible(?) to find top 10 closest neighbors.
BTW, I'd love to test your app if that's possible.
Like LightTable? Might want to check that out if you're not already aware of it. I don't know if it's gone anywhere in recent years or has inspired any similar features in other editors.
> As far as I'm aware, there aren't any existing languages in this space.
In some form or another, all existing languages (other than joke langs) are in this space. That’s why we have programming languages. Ultimately they all prioritize some subset of “problems” that they optimize solving.
That said, in terms of instant feedback I’d look at LightTable and (believe it or not) Chrome dev tools as prior art.
Sure...but not solving quickly, at the expense of all else. Rust is optimized for solving certain problems -- but solving them robustly, not quickly. Python comes a bit closer, but Python also wants to be readable; I don't have to worry about that.
I guess one way to frame it is: the core values (https://vimeo.com/230142234) of this language are velocity, and...that's it. Maybe expressiveness (less typing) and transparency (immediate feedback), but really those are just aids to velocity moreso than orthogonal values.
I really, sincerely, think they do. It’s just that their optimizations focus on the subset of problems. For example:
> Rust is optimized for solving certain problems -- but solving them robustly, not quickly.
This is basically the same thing as saying: when the problem one wants to solve quickly is robustness, Rust may be a good choice.
> Python comes a bit closer, but Python also wants to be readable; I don't have to worry about that.
There are some problems I associate with quickly solving in Python, and others where I find it exceptionally slow. Sure, readability may be a contributing factor. Another is immature/complex tooling that makes static validation or dependency management a slog. Another still is that a lot of its concurrency story is in flux and you have to spend time researching approach and compatibility if your problems are concurrency related.
I’m still not trying to discourage, but I’ve spent most of my career working in scripting languages (those which most prioritize “rapid prototyping” and “repl driven development”), and ultimately when they’re applied to use cases that they’re not designed for their velocity is consumed by tooling.
My advice, intended with kindness and encouragement, is to consider which problems you wish your language to be able to solve rapidly.
To your points about velocity aids, expressiveness and transparency aren’t just velocity amplifiers at the time you write code. They also (can) aid velocity of reading comprehension, editing/refactoring, review. This is a place where Python does very well in terms of velocity: even when I had read less than 100 lines of it, I could generally review work and ask important questions about what it was doing in... well, frankly a shorter time than the JS I was actively working with as a lead at the time.
It’s clear you want a language that enables devs to dev fast. But what are they doing fast?
Continue this thread — 6 replies
I tried solving AOC2020 as a means for learning golang. 6 challenges in, I gave up not because the challenges were hard but because it took longer to translate logic to code. It was no fun to write simple for loops, before getting into actual problem logic. Having to write a minInt function is like a distraction when you want to be focusing on the programming challenge. It is much simpler to use a programming language like Python that comes batteries included.
In this regard, I suppose functional programming can be quite expressive. If you can break the problem into functional units, it can be a pleasure to solve programming challenges using FP.
I was hoping there was going to be some insightful critique after that long preamble. This is similar to an "all languages are Turing complete" type nitpick that doesn't add much to the conversation.
The idea was to have a compiler for pseudocode used in CS books in place of real code.
There are a few small differences (eg. using = vs :=) but most books and interview-preparing materials use a C-like notation.
Then I started reading papers written by language researchers (which use haskell-like pseudocode) and realised the size of the task at hand.
Probably trying to please only CS students / people doing interviews would still make for a fun hack.
Or, how about vocal programming? I wonder if, in practice, dictation might be faster than typing? :)
Continue this thread — 5 more replies