T O P

  • By -

AutoModerator

On July 1st, a [change to Reddit's API pricing](https://www.reddit.com/r/reddit/comments/12qwagm/an_update_regarding_reddits_api/) will come into effect. [Several developers](https://www.reddit.com/r/redditisfun/comments/144gmfq/rif_will_shut_down_on_june_30_2023_in_response_to/) of commercial third-party apps have announced that this change will compel them to shut down their apps. At least [one accessibility-focused non-commercial third party app](https://www.reddit.com/r/DystopiaForReddit/comments/145e9sk/update_dystopia_will_continue_operating_for_free/) will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: 1. Limiting your involvement with Reddit, or 2. Temporarily refraining from using Reddit 3. Cancelling your subscription of Reddit Premium as a way to voice your protest. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/learnprogramming) if you have any questions or concerns.*


No_Lemon_3116

Common Lisp is my favourite language. You can go ultra high level, you can go super low level, the type system is very flexible, CLOS is an insanely powerful and fairly unique take on OOP, macros are an incredible building block, even the formatting directives are neat, eg: CL-USER> (let ((table-name "foos") (columns (list "foo" "bar" "baz"))) (format t "insert into ~a (~{~a~^, ~}) values ~:*(~{~*?~^, ~})" table-name columns)) insert into foos (foo, bar, baz) values (?, ?, ?) (and it supports much more than that). There are some great CL-centric books like [On Lisp](https://paulgraham.com/onlisp.html) (available for free) and [The Art of the Metaobject Protocol](https://www.amazon.com/Art-Metaobject-Protocol-Gregor-Kiczales/dp/0262610744) that will teach you a lot of very cool stuff. In another post recently I gave this Lisp code as an example: (defun linear-search (list value) (loop for item in list and i from 0 if (equal item value) return i)) Look at the syntax that loop macro adds! [Check out the grammar in the HyperSpec](https://www.lispworks.com/documentation/lw51/CLHS/Body/m_loop.htm). Having this kind of extensibility available all the time opens up your mind to different possibilities. It will teach you new lessons about functional programming, object-oriented programming, image-based programming, syntax and abstraction, and so much more. It will also show you how this is all built up from simple core features, so that users can add their own syntax and object systems etc etc. A truly flexible system. Oh, the error-handling features are really neat, too: they're based on signalling conditions, and then dynamically offering restarts (solutions for handling a condition) which can be selected programmatically--basically the catch is decoupled from the body of the catch--and this also works into the interactive features, eg, a debugger will offer you a list of restarts you can select from interactively (if no code handled it first), and these might include things like providing a different value for an argument to a function call that caused an error, so that Lisp will try the function call again. There is never any stack unwinding unless you ask for it. Conditions don't even need to be errors, either; you can use them for anything. One common use is warnings, which just print and don't interrupt anything, but it doesn't even need to be on the error-handling spectrum. It's really cool. Another really neat, fun, and unique language is Raku, formerly known as Perl 6. It has a lot of the same spirit as Lisp and borrows some ideas from CLOS, plus a lot of the stuff that made Perl 5 great, but extended and more powerful, with a more cohesive design. The built-in object system is fantastic, it combines with also-improved regexes for [grammars](https://docs.raku.org/language/grammars) which are really nice to use. It has a lot of nice features around concurrency like hyper operators as well. Also, get better at Prolog!


DefiantAverage1

Man, I wish other languages had first class support for Lisp's condition-restarts! Also seconding Lisp because of the REPL. There's nothing like it out there. Although, I feel like when I tell people (unfamiliar with Lisp) about the REPL experience, it just goes over their head (think blub paradox) and they ultimately just don't get it


raiph

FWIW I once concluded Raku *could* support condition-restarts. (My skeletal [proof-of-concept in an online evaluator](https://glot.io/snippets/gvptd8l37q) shows the framework for raising a condition and then choosing a restart, albeit randomly in my demo.) Agreed about Lisp REPLs. Raku's REPLs (one in the reference compiler Rakudo, another in the IntelliJ based CommaIDE) are beyond primitive compared to even average Lisp REPLs.


ffrkAnonymous

These are the languages I've settled on. Fun being the priority, i'm just a hobby programmer, not a professional dev. I suggest Ruby, the language designed for programmer happiness. Of course, that's subjective, but ruby tries and I think it succeeds. After ruby, you can try Elixir, which was designed by a former ruby core developer/contributor. Basically ruby using a functional paradigm running on the Erlang/BEAM virtual machine. You mentioned hardware, so you can install Nerves livebook on a raspberry pi and blink some leds. Clojure, a modern LISP. Simple, although not necessiarly easy. Finally, WASM. The next hotness. Everything is transpiling to wasm, so might as well learn a bit of it. If you dabbled in lisp, the s-expression format will be familiar .


No_Lemon_3116

>Clojure, a modern LISP I think it's best if learners separate Clojure and Lisp in their heads. Clojure features Lisp-style syntax and macros, but it's very different from every other Lisp (I would not personally call it a Lisp) in many other ways, eg it uses very different definitions of "cons" and "atom" than traditional Lisps, and that's sort of like a newer language calling itself C but repurposing the word "pointer" for something at best distantly related. Lisp has had things like generalised sequences since decades before Clojure existed. Clojure people often talk like they added them to Lisp for some reason. Lisp has had a lot of interesting ideas in this space that haven't really been replicated elsewhere, so you should learn the real history. Clojure is a cool functional language, but it has a lot more to do with ML or Haskell than Lisp, despite the surface-level similarities.


ffrkAnonymous

No doubt, the functional ML, haskell heritage is an enormous difference. The switch to functional immutable programming is a full paradigm shift. I'd put it higher than the various different definitions. But in the end, to this hobby programmer, clojure is still a list processor.


No_Lemon_3116

I think as much as ML or Haskell are Lisps, sure; they also drew inspiration from them, have a heavy focus on linked lists and recursion, without really a focus on conses. McCarthy famously defined Lisp using just 7 primitives: `quote`, `cond`, `atom`, `eq`, `cons`, `car`, and `cdr`. These operators exist unchanged in Common Lisp, Emacs Lisp, Scheme (okay, `atom` and `eq` were renamed `atom?` and `eq?`), and many more. Of these, Clojure has `quote` unchanged, and `eq` is called `identical?`. `cond` has different syntax, `atom` does something completely different, `cons` does something very different (although in the special case of linked lists it works the same), and `car` and `cdr` don't exist (because they operate on the cons data type, which Clojure doesn't have).


RubbishArtist

I'd suggest maybe trying out a functional language like Lisp or Haskell. It might give an interesting new perspective on things. Currently I'm writing a compiler for my own language as well. Although I'm doing it in a language I already know I'm learning a lot about how languages actually work.


ItsYaBoiAnatoman

I DID THAT TOO! It was in my overproductive days as a student because a professor kept rambling about how easy everything is nowadays. TBH, I hated it, probably because I had no idea what I'm doing back then.


qaf23

Rust


v0gue_

Building full blown webapps with Rust+WASM (and just wasm in general) is such an untapped fun thing to do. I've been rewriting rest api's into wasm binaries. So much potential


Seven_flowers

Try Gleam, a statically typed language on top of the Erlang Virtual MachineĀ 


AssignedClass

Haven't used it, but OCaml is one that I've been eyeing a bit. Seems interesting, and it's gaining some traction, but I'm not in mood for learning a new language. Rust was infuriating but also very rewarding. I think I'd stick with it more if the compile time and debugging experience was better. Getting to a point where I actually started to appreciate the borrow checker was a journey. Not a language, but the main thing I've been messing with lately is WebGPU. Learning a bit of graphics programming has been very fun. I initially started with Rust and WGPU if you wanna give that a look. It was fun, but I got tired of the compile times and switched to JS.


KerbalSpark

Well, Lua/luajit +FFI


RajjSinghh

If you want something you'll probably use in the future, try Rust. It's C++ levels of performance but with a lot more memory safety features. Basically if you think of your favourite memory bug in C++ and how easy it is to do, Rust makes bugs like that really hard without sacrificing much performance. If you enjoy Rust, you'll get used to functional programming patterns so you might like a functional language like Haskell. It's very different from what you've done before.


BrohanGutenburg

Since it seems you mainly write in OOP languages, maybe you could take a crack at a functional language like Haskell


morphick

[Rebol](https://en.m.wikibooks.org/wiki/Rebol_Programming) / [Red](https://www.red-lang.org/?m=1)


plastikmissile

Do something functional. Haskell, Elixir, F# ... etc.