Language adoption is mostly a function of business economics. Fortran and cobol are two languages that helped shape the programming language landscape outside of an academic setting. We see echos of those decisions made many decades ago, most of our professionally built software is built using an imperative strategy.
You will occasionally find a company making use of haskell, scheme, or others, but it's far from mainstream.
In the next decade (or few), we will probably need to start implementing algorithms that execute on a quantum machine outside of an academic setting. This requirement may inspire the formulation of a new language paradigm.. or maybe not. I think it's fair to expect that in time quantum machines will entirely supplant classical machines for the bulk of computational work. If/when that happens, business economics will take over and dictate where it's wise to invest time learning.
> I'm unsure how to understand this.
Go get yourself a copy of the little schemer and get at it. The revelation will be worth much more than anything I can say here.
Many people suggest working through this book and recursion will supposedly become as second nature to you: The Little Schemer
Personally, recursion never really clicked for me until I implemented a recursive descent parser. Half-way through the implementation a light bulb just went on in my head and suddenly it all made sense. YMMV
Also, debuggers are invaluable. Just watch the call stack wind and unwind and that could help a lot.
Just hang in there and do your best to learn it. The experience you gain here could land you a much better opportunity in the future, better than the one your Java peers could get.
Imagine yourself as a complete novice and try to learn it without trying to compare it to Java and it will make a lot of sense. For Scheme, which is a similar language, colleges often use this book (little schemer) which looks like it is aimed at 10 year olds and it makes sense instantly within 3-4 hours of lectures. All of the things you are missing from Java and all of the inconveniences (such as immutability) will make sense very soon.
Don't assume that learning Erlang is just a matter of looking up the Java equivalent command doing things the old way. Don't try to program Erlang by stackoverflow. The conceptual difference between the two is huge, even though the concepts are actually quite simple.
Give yourself a weekend or a few evenings and take the time to read up and play with the language. Don't assume that it will take you as much time and effort learning Erlang as Java did. It won't take even half as much once you get started. You've built a lot of programming mental muscle with Java and it will help. Your understanding of algorithms and how Java works will come in handy later once you get through the initial hump.
While you are learning, practical advice would be get with the times and embrace the impostor syndrome. Nobody has the time to give you advice, they've got memes to browse and cryptos to worry about. Just act like you know what you're doing, and do it. Be diligent about educating yourself after office about things you've pretended to know. The aim is not to be a professional movie actor, the aim is to be someone who isn't intimidated by the unfamiliar. Good luck.
So you don’t know how to program yet, but want to become a Clarity programmer?
I would suggest going through this book: https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/
It’s LISP, and Clarity is a form if LISP, specialized for blockchains. It’s also a good beginner’s programming book. It is a non-traditional route, but probably appropriate for Clarity.
Thank you for your input! I'm familiar with Bret Victor and I'm a big fan. You just reminded me of one of my dreams of creating content like what Brent Victor has mentioned.
I haven't run into Parable of the Polygon before, that's cool thanks for the link.
The dream you have of putting a programming guide in an IKEA fashion sounds fascinating. I've often thought that having a book like the The Little Schemer in another language like Python with illustrations / animations would be excellent. Thank you!
I only suggest people at least be somewhat familiar with a functional language because it really helps grow the way you think about problem solving. Especially for those who struggle thinking recursively for certain problems(myself included).
Logical programming is it's own reward and if you enjoy it then i'm sure you get some benefit out of it. Although, I really don't know any place where prolog is used in the industry. Someone else may be able to help in that regard. The Functional languages I suggested are some of the more popular ones and are used everyday by some devs. However, I still suggest at least working through The little schemer
You can make a small improvement here:
let split = input.Split '\n' |> Array.map int count <- split.[0] variables <- split |> Seq.skip 1 |> Seq.take count |> Seq.toList
convert to
let split = input.Split '\n' |> Array.map int |> Array.toList count <- split |> List.head variables <- split |> List.tail
head and tail of a list is an important idea commonly used in functional languages. I learned about it fromreading The Little Schemer
http://www.amazon.com/The-Little-Schemer-4th-Edition/dp/0262560992
try getting a copy of this book https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992
https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992
^Work through this book, and you’ll learn by doing. Check out Dr.Racket, if you need an IDE. Chez is also another
^ this book is wonderful, but recommend doing it after the little schemer book.
There's a really good book that pretty much takes you closer and closer to designing a recursive functional construct in racket called
https://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/ref=sr_1_1?dchild=1&keywords=schemer&qid=1609605810&sr=8-1
Since you're interested in computer science, if you want to learn how to do proofs, you can learn first learn some functional programming, maybe these can help you (just one of them, or better yet, ask elsewhere for resources), and then work through this book. It's the first book in a series of books about programming languages, and it serves as an introduction to proofs. To me, it's far more engaging than, say, Velleman's.
Also, you could try to work through books like Barbeau's Polynomials, or Stillwell's Numbers and Geometry. These are interesting math books that don't require many prerequisites, but will make you work.
I wouldn't rush my way towards calculus if I were in your place. There are interesting topics in mathematics that you can tackle now and that don't necessarily find a place later in almost any curriculum. If you're good at maths, you will be able to take calculus in due time. And if you work your ways through books like the ones I mentioned, I think you'll get more proficient in maths and calculus won't be a problem to you even if you don't know the topics beforehand.
Try Little Schemer.
MIT used to, not sure if they still do.
Scheme is a surprisingly good choice for CS101 precisely because it doesn't distract with lots of syntax or details of internal workings of the computer.
>SICP...
It's too mathematical for me. Why can't LISP hacker write down-to-earth, practical programming books? I'm only aware of 2-3 practical LISP books. Practical Common LISP is one. Available for free online! Another one is Land of LISP written by a Medical Doctor!
Finally a book that's a bit weird is The Little Schemer This might be too elementary if you're already reading SICP.
Partly. In C, you can't define anything named "+", so when you write something like f() + g()
, you know that "+" means the build in language operator and not matrix addition or some such. This is a blessing; it's also a curse.
Yes, you can define functions, but you can also define things that work not like functions. For instance, consider the humble "anaphoric if":
(aif (find-object-by-name "foo") (display it))
This says, if it finds an object named "foo", it displays it (referring to said object named foo). The way this works is that "aif" will create a temporary named "it" -- if non-nil, it runs the conditional commands. In this case, it runs a call to "display" with "it", that temporary, as if you wrote:
(let ((it (find-object-by-name "foo))) (if it (display it)))
The macro saves you some typing. It basically creates a new Lisp-like language from Lisp, but with this added built in, non-function like thing called "anaphoric if".
Another way of studying this is how you could build a lot of language features "from scratch". Consider the convenient "if" statement and booleans. I might define true as a lambda #'(lambda (a b) (a))
and false as #'(lambda (a b) (b))
. In such a universe, I can build the "if" statement myself as:
(defmacro (if expr true-case false-case)
(funcall expr (function (lambda () ,true-case))
(function (lambda () ,false-case))))
This might be a bit confusing if you're not yet familiar with lambda calculus. If you're interested in further study in language semantics, I might recommend The Little Schemer and The Seasoned Schemer that explore reasoning about programming this way, starting from nothing and eventually building up to insights into lambda calculus, all through Lisp (precisely, in Scheme with footnotes showing Common Lisp differences).
I would recommend "The Little Schemer".
If you're on OS X, you should also check out Clozure, not that SBCL isn't a fine choice. But Clozure has a functional Objective-C bridge that let's you write native applications on OS X. Both have a vastly superior debugging environment running under SLIME in emacs. Chicken debugging is unfortunately not much fun in comparison. That aside, Chicken's egg repository is a treasure trove and it's trivial to install and use them. The same cannot be said for ASDF[-INSTALL]. Depending on what Lisp libraries you're trying to install, you can easily end up in a mire of abandoned software. And while Cliki makes it appear like there's a lot of choice, I find that choice somewhat misleading: there's often 13 different libraries to wade through but only one or two that are still being maintained, if you're lucky. It takes a lot of time to vet the dependencies. On the other hand, I've found the quality of Chicken eggs to be much higher on average. This is not meant in any way to disparage any of the Lisp libraries, it's just that so many of them are no longer being actively developed and since so much of what we write these days depends on evolving Internet standards, having stale libraries is a real impediment. Chicken is a labor of love and it shows. It's also embeddable in C which is just insanely useful if you ever were to need it.
There are significantly worse things in life than working your way through The Little Schemer or SICP. Stick with Scheme though if you're going to be doing either. While the exercises can be expressed in Lisp, they're no fun to write in Lisp for reasons that are beyond the scope of a reddit comment. Once you know either you can switch back and forth fairly easily, though porting code between them, not so much.
The syntax is truly terrible. Punctuation is natural, and good!! tryingtoreadlistislikelisteningtosomeonegiveaspeechinamonotonewithoutpausingbetweenwords
However the underlying concepts of the lambda calculus are really beautiful and important to understand. A really great book is The Little Schemer.
The Little Schemer may be a good starting place if the information in SICP is too complex to start. It's a fun, effective introduction to how to think like a programmer, functional programming, and the Scheme language.