6 ms·
Now I'm curious! What are other systems-level languages? I know Go was touted as one at the start, but that's definitely not where it's established a niche! Ju
by sk0g 8y ago
Now I'm curious! What are other systems-level languages? I know Go was touted as one at the start, but that's definitely not where it's established a niche!
Julia? Nim? That's about all that comes to mind.
I wish I could read the Haskell documentation, but the code examples are straight up black magic to me. I really need to dig into some proper functional programming at some point!
- pjmlp 8y agoD, Free Pascal/Delphi, .NET Native, Ada, ATS, Zig, Jai, Oberon, C++20
- hardwaresofton 8y agoI was mostly thinking of Dlang or Swift, but even those are actually not quite the same due to the lack of runtime. I think Go doesn't qualify as a "systems language" due to the inclusion of the runtime -- do people call Java/JVM languages "systems languages"? The term "systems language" is almost certainly not precise enough. What I mean to convey was a language that you could write performance critical low level code in. In my mind though, Rust satisfies both that definition and the vaguer "backend service" (i.e. the thing spinning behind some interface doing the hard work in your architecture) -- it works very well from very low level all the way up to application programming. If we're taking the second definition (vague backend-service-y) then Rust has lots more good competition -- if you can afford a runtime then the right language can give you some pretty good safety for less than the cost of learning Rust's borrow checker. BTW I hear you on the haskell docs, how to start with Haskell is one of the hardest things. I personally took this path: - http://learnyouahaskell.com http://learnyouahaskell.com (a fun read, introduction to basics, good prose) - Writing some euler solutions (quickly stopping, they become just a mathematics fest after a while) - http://book.realworldhaskell.org/ http://book.realworldhaskell.org/ (excellent examples for real-world code) - http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html http://adit.io/posts/2013-04-17-functors,_applicatives,_and_... (when you feel like you really want to understand the big M) - Writing the backend for a project in haskell - Watching lots and lots of talks and attempting to read papers to just headbutt certain concepts over and over till I could somewhat begin to understand them. I've found the secret is just to let the stuff go over your head at least 2-3 times until you start finding it useful. But I want to stress that you don't have to write 5th order polymorphic dependently-typed whatever to get lots of value from haskell, here is some low hanging fruit: - Haskell has the type system you thought/wish Java/C# had (i.e. `type AorB = A | B`, `newtype PositiveNumber = N { _posNum :: Int } -- guaranteed through constructor to be >= 0`). The ease with which you can have types express intent is mentally revolutionary. - Behavior and object structure are separate, like Go's structs + interfaces or Rust's structs + Traits, and constraints (dependencies from one typeclass to another) are really easy to use -- ex. `class Thing a => BigThing a where { ... }` expresses the dependency that for a to be a `BigThing` it needs to first fulfill the requirements of being a `Thing` -- this is how you can force the existence of certain functionality on with polymorphism. Once you get used to this everything else (well, subtyping at the very least) will look primitive. - Concurrent programming is amazing, both due to STM and the very good threading model (lightweight routines multiplexed to system threads) - I will say that I think there's lots of low hanging fruit out there though -- Haskell has the type system you thought Java/C# would have. They really have "class" systems rather than type systems.
- pjmlp 8y agoWell if having a runtime disqualifies a programming language for systems programming, we better get rid of Ada, C and C++ as well.
- hardwaresofton 8y agoMaybe "manual memory management" is the better thing to zoom in on -- the large difference (and justification of the cost) between something like C/C++ and Java is the inclusion of the JVM and the weight of the runtime the Java brings with it. C++ is safer but heavier than C, and Java is safer but heavier than C++. If C/C++ are systems programming languages but Java is not, then I posit that Go is also not a systems programming language. If use in resource constrained environments (where C/C++ can happily go) isn't a huge factor, then lots of things are systems languages that I wasn't considering Wiki says: > System programming (or systems programming) is the activity of programming[1] computer system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce software which provides services to the user directly (e.g. word processor), whereas systems programming aims to produce software and software platforms which provide services to other software, are performance constrained, or both (e.g. operating systems, computational science applications, game engines, industrial automation, and software as a service applications).[1] > System programming requires a great degree of hardware awareness. Its goal is to achieve efficient use of available resources, either because the software itself is performance critical or because even small efficiency improvements directly transform into significant monetary savings for the service provider (cloud based word processors). Last sentence of the first paragraph seems to kind of two cases I kind of mentioned -- providing services to other software, being performance constrained, or both. Assembly/C/C++ are obviously often the only choice for the "performance constrained" use case, but not necessarily the best choice for the simple use case of "providing services to other software".
- pjmlp 8y agoJava is also a systems programming language when it runs using the bare metal deployment variant from: https://www.aicas.com/cms/en/JamaicaVM https://www.aicas.com/cms/en/JamaicaVM https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc And a tracing GC isn't a deciding factor for being a systems programming language or not. Besides the examples shown above, http://www.astrobe.com/default.htm http://www.astrobe.com/default.htm And the now long gone Lisp Machines, Mesa/Cedar, SpinOS, Singularity, Midori,...
- hnra 8y ago> I wish I could read the Haskell documentation, but the code examples are straight up black magic to me. I really need to dig into some proper functional programming at some point! Haskell definitely has a high early threshold that you need to get over. After that it's pretty much just fun and smooth sailing until you try to do something bigger, at which point there's another threshold. The learning experience is the most fun I have had programming.
- jonsen 8y agoI really need to dig into some proper functional programming at some point! As absolutely suitable for self study I would recommend: https://www.amazon.com/Elements-ML-Programming-ML97-2nd/dp/0137903871/ https://www.amazon.com/Elements-ML-Programming-ML97-2nd/dp/0...
- weavie 8y agoHaskell is easier to learn than it seems : https://patrickmn.com/software/the-haskell-pyramid/ https://patrickmn.com/software/the-haskell-pyramid/ Just get the basics down and write some stuff. For a lot of things, you don't need to know how they work underneath in order to use them. It is helpful to implement functors, applicatives and monads for some of the basic data structures to get a feel for things, but then beyond that, just use what has been provided. Don't try to write your own monad transformers, just use the mtl library. Lenses are really complicated to understand, but really simple to use. The servant web library uses some high end type level stuff in order to work, but it is really easy to use. The compiler has your back. If something just doesn't work and doesn't make sense, just move on and find a different way. After a while you will understand more and can return to it. Don't try to understand the academic papers that have been written with Haskell. There is a really tradition of making the Haskell code as incomprehensible as possible. It will just get you down.
- mark_l_watson 8y ago+1 for your Haskell comments That is what I do: I use a subset of the language, don’t dive too deeply into the theoretical stuff, for anything imperative I find an example to follow, and just enjoy writing pure code in a comfortable interactive environment (VSCode or Emacs). It is possible to just use Haskell ‘lightly’ and enjoy it. The only problem for me is that it can take me a while to understand other people’s Haskell code when I read it.
- weavie 8y agoYep. I agree reading other peoples Haskell can be a challenge. There is a real culture of making your code as terse as possible, which I think makes it easier to read once you know what you are doing, but makes it harder for beginners. Luckily Haskells type system means that you can understand a lot about what is going on just by looking at the type definitions. Most code includes these. Although rather frustratingly, however, a lot of documentation doesn't include the type definitions. It is good to see languages such as Idris make it mandatory to include type definitions for all functions.
- 8y ago