Hacker News new | past | comments | ask | show | jobs | submit login
Slope: A hackable hobby programming language (colorfield.space)
96 points by creative_spirit on June 17, 2022 | hide | past | favorite | 31 comments



Did you use any particular tool or framework to build the website? It looks nice!

Got any thoughts as to what spurred this project on?


Language/website author here: nope. Just good old fashioned html, css, and a pinch of vanilla js just to get a few things working.

I had tried out making a forth a while back. It was not, in the end, as usable as I'd like. I thought something more in the vein of scheme might be useful (to me) and fun to work on. Some scheme features I think are tricky and not needed for beginners and I think somewhere along the line I started making this to be a beginner focused language that is easy to learn and hold in your head. I had a few people in my technology community in mind as people that it would be good for. In the end I really enjoyed coding in it, so have continued to work on it.

It is definitely not meant for wide usage, for anything other than just messing around having fun, etc. To be honest I am a little bummed it made its way to hacker news (I havent and wouldnt have posted it), as I really like my group of 6 users that I know and we all have fun contributing and coming up with ideas and cool use cases. I don't need it to grow or be used by a wider audience than the pubnix we all hang out on (rawtext.club).

That said, I'm glad you like the website! and if you like the lang that is nice too :-D


A hackable hobby programming language and toolset for having fun and making cool things


Can you tell us a bit about what makes it 'hackable', or maybe some cool hacks you can do with it? :)


Slope is very easy to pickup. It is concise. It has simple and easy package manager. You do not need to learn huge tooling around it, etc. You can quickly build a console or GUI app. You can write your modules and it's FOSS. I'd say that all this makes it an excellent small, hobby lang.


It’s a lisp, so it’s eminently hackable - you can do everything with it, and simultaneously nothing ;p

I love lisps. Why choose slope over something like racket or maybe clojure(script)?


> It’s a lisp, so it’s eminently hackable

Correct me if I'm wrong, but it's missing one vital lisp feature for making it actually hackable: macros!

Couldn't find anything about it in the docs and couldn't search the source code for it either, via their git webpage either.


Meta programming is still “trivial” (for the lack of a better word) in a lisp without using macros.


> Meta programming is still “trivial” (for the lack of a better word) in a lisp without using macros

is there not a whole class of problems that are not trivial if you cannot control evaluation of forms / expressions? this is one of the things (non-reader) macros provide.


> if you cannot control evaluation of forms / expressions

Assuming quote works, you can do:

  (eval (macro-expand '(
  # rest of file goes here
  )))
which I think technically meets the standards for "trivial", albeit annoying.

(Edit: Although it'd have to be eval-with-macro-expand if you want proper first-class macros.)


“Trivial” is the wrong word, but it’s fairly known/common to write an embedded interpreter. The line between interpreting and just plain programming is very blurry in a lisp.


You can still somewhat control evaluation with quote and/or list.


I have limited experience with lisps, and for me a smaller language, that is easy to pick up, works well. I can finally do things in a lisp, without having to struggle with the full breadth and depth of the bigger guys (and I do not have to install e.g. jvm on my machine :). So for me it is a graceful way to work in a paradigm that I long like, but I somehow could not make my way to.


It seems like it's halfway between those things and Logo.

So, simpler but with some modern paradigms thrown in to make it more 'respectable'...


I would agree. Simple and old school, but with a dash of modern features was what I was going for. I used Logo a good bit when I was young, so I can appreciate the comparison.


Check what it says about the hobby language - it is not meant to attract huge crowds, so it does not need to be 'respectable'. For me it is good if it raises associations with Logo, though - as Logo was also providing way to computing for 'non-professionals' - thus keeping the fun and joy of computing.


I wonder why, in the examples, "filter" is colored pink like "if" but "not" is colored orange like a function call. I'd expect "filter" to be a function, and thus colored orange.


Because at one point filter was implemented as a special form in the interpreter rather than in the library. As such it was colored with special forms. That has changed and it is now in the library, but I have not gone into the highlight plugin to switch the colors as it is not a high priority.


>It is built for the joy of building something. It s built for fun, both in its coding and in coding with it. It is not the fastest language with the hottest features. It is not the most stable thing or the best tool for every or even any job. It likely will never be those things. If you use it and you get utility out of it I am happy about that: that is amazing and excites me! I genuinely believe slope to be a useful and fun language to use and I enjoy working on and in the language.

This applies to FORTH. Cool name tho.


wow, lots of negativity and criticism in this thread for what is explicitly called out as a fun project (that’s what hobby means, linked in the language description on the front page): https://slope.colorfield.space/hobby.html

Creating a programming language, no matter how robust, is not a trivial endeavor—I’d rather celebrate the existence of this language and its pretty explicit posturing that it’s just for fun rather than criticize it immediately for its lack of utility.


> Creating a programming language, no matter how robust, is not a trivial endeavor

Completely agreed. Not sure why there is so much negativity when I imagine most of the critics have not created their own programming language.


+1 right on

Coding for fun is enough, it is not necessary to create another Common Lisp implementation or a new ecosystem like Clojure.

Nice project!


Just flag the lame comments and write a comment about the thing rather than the comments about the thing. The thread will fix itself especially with better comments around.


A lexically scoped, dynamically typed, s-expression language, with no macros.

Why?


Speaking for myself, I left out macros to make sure I'd make the base language good enough in regular use without them. It's a Lisp, macros are easy to add later. (That's what happened in the original Lisp.)


"Hobby" probably means that it's meant for learning -- i.e. I'm sure the author learned a ton by putting writing this.


macros werent necessary for me and the language is for me. I can always add them later (as the other comments mention). Not having them makes things simpler and easier for those with less programming experience that don't need power features. Those that end up needing them can always move on to scheme, clojure, common lisp, etc.


How is this different from any other scheme?


Different standard library, different focus, similar-ish core interpreter. However, it doesnt need to be different. This was not built for folks other than me and a few friends to use (I didnt post it here on hacker news, and am not looking to "grow a userbase").


Tell me you wrote a Scheme implementation without telling me you wrote a Scheme implementation.


I am not prepared to make fun of this project, as other commenters have. It may or may not be a proper Scheme subset (it probably isn't). That said, it may have some use, by “hobbyists” (whatever that may mean, remember that Linus Torvalds originally called Linux a hobby), or even a wider audience. It may serve as a gateway drug to Scheme, Racket, and Common Lisp.

As for no macros, that does limit its appeal to Schemers, Racketeers, and Lispers. That said, while a crude define-macro implementation isn't that difficult, once you have an interpreter that can be run at compile time, Scheme define-syntax macros are quite difficult to implement properly. I can understand why they might have been left out.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: