Programming thread

Be glad that Javascript was invented for web client side development instead of using Scheme: that way Lisp doesn't get shit on and the hate is concentrated on JS.
Speaking of shitty languages, I believe that Go and Rust both suck with the difference that Go is actually useful for writing backend stuff without resorting to Java. Rust just feels like a failed C++.
 
And if you use Windows it's easy to get started with Linux without dual booting. Just enable Windows Subsystem For Linux and install a distribution from the store. Don't do this if you use VMs on your system and aren't using Hyper-V. But otherwise it's a great introduction, all the command line tools and compilers are available. Even GUI apps I guess now if your Windows is up to date.
I always used git bash for accessing Linux systems using windows. For baby's first Linux shell it's not too bad.
 
  • Thunk-Provoking
Reactions: Sperg Coalition
Dealing with Java from a JVM compatible language is surely going to "pollute" the stack trace in a way or another.
I'm just talking about regular error messages. SBT is doodoofeces and if I come back to Scala I'm going to use probably Maven or perhaps better yet mill but I don't remember ever having to deal with that kind of nonsense when debugging error messages in Scala.
I always used git bash for accessing Linux systems using windows. For baby's first Linux shell it's not too bad.
Look into fish + oh-my-fish once you get fully acclimated to bash. The combination almost predicts what you are thinking.
 
SICP is hardly n00b material. Even someone like John Carmack has found the material quite challenging:
I'm inclined towards Python for beginners but will admit that it requires perhaps a little more initial effort than JavaScript. On the plus side, it's also not JavaScript.
I gave him as serious as a reply as his post deserved.

That being said, while any language can be someone's first one, I agree that not every language should be their first one, and plenty of opinions of which one have already been discussed in this thread and elsewhere.
 
  • Like
Reactions: Belisarius Cawl
I wish R had an audience outside of academia, because there's a lot to like about it as a Python alternative. While the obsession with pipes wouldn't translate well to most languages unless you're a psychopath trying to wean a new programmer onto Bash, you've got generally decent syntax and in many was a more pleasant take on the mixture of C-like trappings on a basis of Scheme than JS. Its C API is reasonably pleasant, too.
I've heard bad thing about R in comparison to Python. Don't know if they are true, but I've heard bad things consistently, both IRL and online.
say R continues to do quite a few things better which is why Python hasn't made R redundant.
Does it? The only real problem I have with Python is all the different versions. Plus I think the community is so much larger for Python than for R.

I have never used Python for Data Science, but I can't imagine it being very hard to do so. At the end of the day whatever you are going to be doing for Data Science is just going to be some kind of equation/function.

I can imagine using something like Julia or Fortran if speed is really important but you also need something for data science/simulations.
think beginners would be better served learning Python with numpy or scipy instead of R
I concur. Numpy is excellent and is strongly typed. It also tends to push the newb into procedural designs. Dicking around in Python building AI models didn't really teach me programming. Building something using mostly Numpy did teach me programming.
Rust just feels like a failed C++.
So true. I feel like there is a desire for a simple and fast OOP language that is not being met. Simple doesn't mean easy here btw. I would say a functional language might meet this requirement but I've never really done much with anonymous functions. I also get the impression Functional languages are not simple.

C++ and Rust both fail this for basically the same reason. C++ fails because it is overcomplicated and bloated, though it is fast and it is built on a pretty good framework of C. I think Rust fails because it is extremely complicated and the extra complexity doesn't add very much. If memory issues are a big deal in C++ you can just use a special type of pointer and be fine.

The one thing Rust has going for it is some of the people who make crates. A couple people have made some really great crates that allow people to do stuff.
 
So true. I feel like there is a desire for a simple and fast OOP language that is not being met.
That very much feels like a "choose two" situation, although I don't see that as a bad thing because OOP and its consequences have been a disaster for the human race. I've been enjoying Zig recently, which firmly aims at simple and fast while learning a few lessons from Rust. I do hope it takes off; it'll be nice to have a trendy language philosophically close to C.
I've heard bad thing about R in comparison to Python. Don't know if they are true, but I've heard bad things consistently, both IRL and online.
Structurally, they have many of the same strengths and many of the same weaknesses - they're both slow languages that best serve as a target for a quick script or as convenient glue around the libraries that do what you actually want (in both cases, written chiefly in C and Fortran). Python's main advantage is being staggeringly popular and thus having a much larger community pushing to make up for its flaws, but even outside of statistics I'd much rather write R (this does relate a bit to my dislike of OOP implied above, so take it with a grain of salt). That said, the language definitely has its weaknesses, especially once you need to start threading.
I concur. Numpy is excellent and is strongly typed. It also tends to push the newb into procedural designs. Dicking around in Python building AI models didn't really teach me programming. Building something using mostly Numpy did teach me programming.
Numpy and Scipy aren't bad (and your point of strong typing is well-taken; not having access to it is one of my bugbears aout R), but I've never heard a kind word said about Pandas by anyone who has actually used the R functionality that it's aping.
 
Numpy and Scipy aren't bad (and your point of strong typing is well-taken; not having access to it is one of my bugbears aout R), but I've never heard a kind word said about Pandas by anyone who has actually used the R functionality that it's aping.
I will say some of the Pandas functionality is organized in a nonintuitive way. I still prefer it to excel for anything that involves decently sized datasets though with how shitty Microsoft has made it recently.

I could see Pandas being made better but for anything that is not strings I just turn it into a Numpy array and use Numpy.
 
Global namespace pollution is a curse ... and a blessing. Using dplyr functions has been much less verbose and clunky for me than it has with pandas. R's extensive use of non-standard evaluation also helps make this possible, but I don't recommend it for beginners. ggplot2 has also been much less clunky for me than matplotlib and friends. Here's a comparison of the two being used for similar tasks:
Notice how much more code has to be written for Python than for R.
I have never used Python for Data Science, but I can't imagine it being very hard to do so. At the end of the day whatever you are going to be doing for Data Science is just going to be some kind of equation/function.
Technically, yes, but said equations and functions can be difficult to implement and easy to get wrong, which is why I would rather have a bunch of PhDs who are highly familiar with the material do it for me. Compare:
We don't remove the sklearn.cross_validation.Bootstrap class because few people are using it, but because too many people are using something that is non-standard (I made it up) and very very likely not what they expect if they just read its name. At best it is causing confusion when our users read the docstring and/or its source code. At worse it causes silent modeling errors in our users code base.
I will probably use scikit-learn in the future for some purpose or other but that comment was deeply jarring.
I could see Pandas being made better but for anything that is not strings I just turn it into a Numpy array and use Numpy.
Even with strictly numerical data, pandas lets you do a lot more data wrangling more easily than would be the case with just numpy.
 
Any thoughts here about Elixir or Erlang for writing a DDoS resistant backend.

I have never done either, but it seems like this might be the case. They are both a bit obscure though. Has anyone here worked with them?
 
So I’m almost done with K&R but I want to learn more about C! Right now I’m toying with ncurses and enjoying it but I still have a long way to go. Any other resources for C like K&R and Deep C secrets I should know about?
 
Any thoughts here about Elixir or Erlang for writing a DDoS resistant backend.

I have never done either, but it seems like this might be the case. They are both a bit obscure though. Has anyone here worked with them?
The best system written in erlang and elixir out there is probably ejabberd. And that's what the WhatsApp backend is based off of.

From what I know they're pretty good at handling lots of requests, WhatsApp had a server handling 2 million connections at the same time. I mean at one point or another, your DB or other connected services might become the breaking point.

But Erlang/ Elixir doesn't come for free. Not only do you have to program functional - think Rust, but a bit more autistic. You also have to abstract your concurrency into the actor model. I think it takes a long time to acclimate to this if one isn't a functional programmer. I gave up after like a month, because I still thought minutes about every line I wrote. I have also spoken to people who said that the Erlang ecosystem has many resilient programs because it took people a lot of time to craft them.
 
So I’m almost done with K&R but I want to learn more about C! Right now I’m toying with ncurses and enjoying it but I still have a long way to go. Any other resources for C like K&R and Deep C secrets I should know about?
If I were you, I'd start on C++ now. All C programmers also know C++, whether they're willing to admit it or not.
 
So I’m almost done with K&R but I want to learn more about C! Right now I’m toying with ncurses and enjoying it but I still have a long way to go. Any other resources for C like K&R and Deep C secrets I should know about?
Congrats. I'm proud of you for sticking with it.

I don't really have any specific resources, but a good next step would be working on implementing the various types of sorting (quick sort, merge sort, etc.) and search algorithms (and perhaps specific applications of binary search trees). Another good exercise is implementing dynamic arrays in amortized constant time. You can gain a good intuitive understanding of algorithmic efficiency from implementing all of these. There are plenty of resources out there you can easily find on Jewgle.
 
So I’m almost done with K&R but I want to learn more about C! Right now I’m toying with ncurses and enjoying it but I still have a long way to go. Any other resources for C like K&R and Deep C secrets I should know about?
If you are insistent on a book to go further with, I'm personally quite fond of Jon Bentley's Programming Pearls. It's not really a language specific book, the concepts are all very portable, but all code snippets are in C. It's much more about how to structure your programming efforts and fine-tune your code, touching on topics like code sketching, algorithmic design, testing, and profiling. It's available for free on archive.org. It has plenty of good examples and exercises, sadly it's resource site wasn't renewed in 2006, so you need to go to the wayback machine for the author's code examples and supplementary material.
 
  • Informative
Reactions: Belisarius Cawl
Updated an old release of mine from a couple years back. Don't want to put too fine a point on it. Basically, updated it from an old tech that's "deprecated" to a new one that's closer to first-party status. Nothing too big. On the order of a hundred lines of code. Touches on a lot of complicated interdependencies though, in areas where my skill is not great. Gonna push it to the distribution points in a bit. But it feels really good. Did the whole update in a day. Most of the time expense came from me falling down rabbit holes then picking myself out again. Felt like I grew a lot. The tech underpinning it all transfers into a lot of other projects of mine. Wanted to gloat about it somewhere. Thanks for reading, anon.
 
Congrats. I'm proud of you for sticking with it.

I don't really have any specific resources, but a good next step would be working on implementing the various types of sorting (quick sort, merge sort, etc.) and search algorithms (and perhaps specific applications of binary search trees). Another good exercise is implementing dynamic arrays in amortized constant time. You can gain a good intuitive understanding of algorithmic efficiency from implementing all of these. There are plenty of resources out there you can easily find on Jewgle.
There are also a zillion sites like Codingame, HackerRank and LeetCode that will let you do all of these things and then submit your answers to unit tests and, in some cases, time constraints
 
  • Like
Reactions: y a t s
Back