I recently stumbled across http://concatenative.org and my curiosity is thoroughly piqued.
Ask HN: If you could only code with one language which would it be?
41–50 of 53 posts
Re: Ask HN: If you could only code with one language which would it be?
#42Realistically, Python. Not because it's the best, but because it's the only language that I feel confident will have libraries/bindings for everything I need. Or as I've heard someone else put it, python is the second best choice in any situation.
Re: Ask HN: If you could only code with one language which would it be?
#43Re: Ask HN: If you could only code with one language which would it be?
#44Re: Ask HN: If you could only code with one language which would it be?
#45Common Lisp. Why? [0] [0]: http://p-cos.blogspot.in/2014/09/why-i-like-common-lisp.html Common Lisp / Scheme are great to learn about programming languages themselves. think learning about closures in CL vs in ObjC and you will realize how simple concepts become awkward and secondarily builds your taste so you know engineer who prides in knowing C++ complexity is a fucking idiot. Personally, CL has helped me quickly…
Learning a lisp is on my to-do list and I've narrowed it down to guile or sbcl. I'm curious what kinds of projects would cause you to reach for common lisp over scheme and vice versa. Also would be interested in any other thoughts comparing the two.
Scheme has the benefit of some particularly excellent introductory texts (Little Schemer, Seasoned Schemer, Structure and Interpretation of Computer Programs, How to Design Programs). The first two are not free, but are great introductory texts (and can be used with Common Lisp with some adaptation, same with the other two), the second two are freely available online.
Scheme is also a conceptually "purer" functional language than Common Lisp. Depending on your background and feelings towards other functional programming languages that may have some appeal to you.
Common Lisp has a comprehensive standard library via the components described in The Common Lisp HyperSpec. With Quicklisp and other things you can easily add packages to your projects extending your environment to provide support for nearly anything anyone has ever written a CL library for.
From a technical perspective, Common Lisp can be a more pragmatic language in many ways. It allows you to drop into base procedural code, or write functional code. It has a built-in object oriented system (CLOS) that has a lot of fantastic features. Much of this can be added to Scheme, and may be available through an SRFI, but is not baked-in. If you're interested in implementing object systems, Scheme can be a fun language to use for that purpose.
Setting aside those, another big difference is one that sometimes causes heated debate, but for me is just a thing to keep in mind. Scheme is a lisp-1, Common Lisp is a lisp-2 (really a lisp-n). Scheme has one namespace that everything uses (though you can encapsulate things inside of closures and such). What this means is that at the top level your functions and variables share a namespace. If you make a function f and a variable f only one of them exists. This leads to some cleaner expressions when using a functional style as you can just use the variable name in the function position. In Common Lisp you may have to use something like (apply #'f some-param) when f is a variable holding a function reference. This is a minor thing, in my view, but if your intent is to explore the functional side of lisps it can be nicer to use Scheme. Common Lisp has separate namespaces for functions, variables, macros, and other entities (I'd say objects but I want to avoid confusion with the sense of object-oriented programming objects).
Both have module or package systems for organizing projects. Both have good testing capabilities baked in or that are easy to add on. Both have active communities (with a decent amount of overlap between them).
Re: Ask HN: If you could only code with one language which would it be?
#46C, because I care about speed, program size, and multiple CPU architectures. Or Stackly, a language I've been writing for nearly two years now. Like C, it's performant, compiles to tiny binaries (it maps fairly close to assembly under the hood), but unlike C it has a ref-counting GC, compile-time and runtime type safety. set [hello] fn 'displayln [Hello, World!] hello I did used to care a lot more about community ado…
https://github.com/shakna-israel/stacky
Stackly isn't public yet, and probably won't be until I finish the type-checkers.
Re: Ask HN: If you could only code with one language which would it be?
#47Realistically, Python. Not because it's the best, but because it's the only language that I feel confident will have libraries/bindings for everything I need. Or as I've heard someone else put it, python is the second best choice in any situation.
Isn't the java ecosystem more vast though? I found that even though python has a ton of libs for everything most of them are unmaintained. And I'd rather not write lots of C bindings myself :/
Re: Ask HN: If you could only code with one language which would it be?
#48Earlier quoted context omitted.
Learning a lisp is on my to-do list and I've narrowed it down to guile or sbcl. I'm curious what kinds of projects would cause you to reach for common lisp over scheme and vice versa. Also would be interested in any other thoughts comparing the two.
Either Common Lisp or Scheme are effective introductions to lisp. Both languages are standardized. But Common Lisp has a large standard library (pros and cons depending on your tastes and interest in the language). Scheme has the benefit of some particularly excellent introductory texts ( Little Schemer , Seasoned Schemer , Structure and Interpretation of Computer Programs , How to Design Programs ). The first two ar…
Regarding the CL library, I'm inferring that you feel the SFRI modules aren't as comprehensive as the CL ecosystem. Is that accurate?
Also, what is your experience with the available tooling, performance and language interop options for each lisp?
Sorry for the 20 questions!
Re: Ask HN: If you could only code with one language which would it be?
#49I'm a recent convert to the Church of Kotlin. If you know Java, it takes a week or so before you're comfortable, and after that it's magical. All of the boilerplate, all of the tiny little frustrations and bad ergonomics, are just gone. IntelliJ is a fantastic IDE, too, and I didn't bother picking it up until I started playing with Kotlin. Kotlin compiles to JVM bytecode, and it runs everywhere I'm currently deployin…