What is your favorite programming language to program on *nix? - Programming On Unix
Users browsing this thread: 3 Guest(s)
|
|||
I used to be a big python guy. Recently I've started to use (and like!) golang a lot more, I think this is because sometimes python is just too slow. Rust also looks interesting.
ᛗ
|
|||
|
|||
C, I guess.
But I'm still very stupid. God have mercy of me. |
|||
|
|||
Oh, the age old question of what's your favorite programming language.
With the years it has come to whatever does the trick the quickest and without too much hassle. Sometimes it's a simple shell script, sometimes it's Perl, sometimes it's Python, sometimes it's C, sometimes it's C++, sometimes it's Java. I alternate between them depending on the scenario. I have favorites but they are for specific tasks and not for generic *nix programming. Now if you asked me what syntax or ideologies of programming I liked better and which language would fit that then I would also say that it depends on what I'm trying to do. TLDR: Whatever works works. |
|||
|
|||
Python is for people who hate programming. Python developers aren't real developers with their mandatory whitespace syntax and their requirements.txt boilerplate. YMMV. ;-)
I, personally, usually prefer C and/or Lisp, but it surely depends on the task to solve. Generally I agree with venam here: Whatever works works. I just happen to prefer efficient compilers. -- <mort> choosing a terrible license just to be spiteful towards others is possibly the most tux0r thing I've ever seen |
|||
|
|||
C is always a good choice, as this is the only one deeply integrated into the OS (/lib, /include, ld.so, ...).
|
|||
|
|||
This question is highly subjective, but I guess that's the point
My basic rule for picking languages is as follows: Scripting: Perl if I can, Python if I must. Programs: Go for concurrency or web. C if I can, C++ if I must. Day job: C# all day, every day. Hooray state government. (C# is actually pretty great, my complaint lies in that any alternative stack is not allowed even when it would make sense for the problem we're trying to solve.. but I just do what the boss man says) |
|||
|
|||
-- <mort> choosing a terrible license just to be spiteful towards others is possibly the most tux0r thing I've ever seen |
|||
|
|||
Part of it is that I prefer the flow of goroutines and channels, part of it is that concurrency in C is difficult while concurrency in Go is so easy even a moron like me can do it. Take your pick on what's more important
Same goes for web; Go's http library is dead simple, libcurl has a ton of boilerplate that I always have to lookup how to do. Admittedly, I haven't written any C + libcurl in years so I'm not sure if things have changed. I also have never learned how to use something like BCHS. Now all that being said, I needed a simple customized TCP server to handle data being sent to a server and C + POSIX sockets was quick and easy. Thanks Beej! |
|||
|
|||
1. shell for most things, using sed/awk/cut is most of the time enough
2. go for web or mail parsing 3. C for everything else. I used to do a lot of python, but its sooo big and have a hube standard library (to much). So I rewrite code in C now and regret to do this so late. |
|||
|
|||
I can see more and more "real life" programs in go, and I can't help but think "how can people accept such a weird runtime configuration" like the $GOPATH thing et al.
How do you deal with it in production ? |
|||
|
|||
My previous comment mentioned my current job is at a .NET shop, but we do have a couple small internal services written in Go. For those, we use Go's mod feature so that you don't need a $GOPATH, which thankfully Pike and co have decided to move away from.
`go build` produces a single executable containing the runtime, libraries, and application code (as long as the libraries are pure go, the C FFI is a whole different animal). The executable is then ran as a service on a server, no need to install any runtime server-side. As an aside, I always had a strong dislike for the whole $GOPATH thing, and I'm glad that go's maintainers have come up with a system to replace it. |
|||
|
|||
This sound interresting indeed, would you have any link to this "mod feature" ?
|
|||
|
|||
https://blog.golang.org/modules2019 is a pretty good overview
|
|||
|
|||
I try to use C as much as I can, but usually I'm just trying to hack something together and the extra effort isn't worth it. Back in my Minecraft plugin development days I used to use Java (oh god), Kotlin and Scala. Scala was a very nice language, I was very much in love with functional programming, but it was much too slow to compile.
|
|||