Post ALd2wWud2wioKcAIm8 by momcorp@mstdn.io
 (DIR) More posts by momcorp@mstdn.io
 (DIR) Post #ALcvz5CnoisRacw6Gu by duponin@udongein.xyz
       2022-07-18T20:25:37.530581Z
       
       0 likes, 0 repeats
       
       For Sysadmin/DevOps purpose, which is the most "interesting" language to learn first?Python or Golang?I plan learning both but don’t know by which should I start Explanation welcome :smiling_ai: (and share/boost/renote welcome too)
       
 (DIR) Post #ALcwDltpsW0Q3c4Jge by duponin@udongein.xyz
       2022-07-18T20:28:11.975459Z
       
       0 likes, 0 repeats
       
       @Arcana yeah but no
       
 (DIR) Post #ALcwhdisqLffNxBijo by thatbrickster@shitposter.club
       2022-07-18T20:33:41.925466Z
       
       0 likes, 0 repeats
       
       @duponin Python, simply because it's the older of the languages. You'll find experienced users more easily with a bigger ecosystem. A downside being some resources and deps targeting 2.x.
       
 (DIR) Post #ALcwlJ1riyjaMYoaLA by cobratbq@mastodon.social
       2022-07-18T20:33:16Z
       
       0 likes, 0 repeats
       
       @duponin I think it really drpends on circumstances. If you know you are going to work with python, start with python.I *think* Go is less used in sysadmin settings and more in advanced networking/management tooling. However, many such projects have massively surpassed the scale of an admin script.
       
 (DIR) Post #ALcwlJR2DOrpccagZU by duponin@udongein.xyz
       2022-07-18T20:34:19.401163Z
       
       0 likes, 0 repeats
       
       @cobratbq that’s why I mentioned DevOps work too
       
 (DIR) Post #ALcwmd22q7bIgrWt0K by duponin@udongein.xyz
       2022-07-18T20:34:31.335075Z
       
       0 likes, 0 repeats
       
       @thatbrickster python ecosystem is a joke
       
 (DIR) Post #ALcwsCG9IAsLOVmWO0 by thatbrickster@shitposter.club
       2022-07-18T20:35:36.646496Z
       
       1 likes, 0 repeats
       
       @duponin Yet it's the preferred one for scientific computing. Not golang's time yet IMO.
       
 (DIR) Post #ALcxwD9c0YdTHVCawq by pleb@shitposter.club
       2022-07-18T20:37:56.307719Z
       
       1 likes, 0 repeats
       
       @duponin honestly python, golang is great for long running or performant multi tasker daemons, but that's just actual development workwriting tools like https://github.com/mikefarah/yq to patch/query the eventual tons of yaml you end up withansible/pssh/paramiko ssh automation is great to get started with
       
 (DIR) Post #ALczAypfdazdA4Tsie by kobayashi@udongein.xyz
       2022-07-18T20:59:55.900331Z
       
       1 likes, 0 repeats
       
       @duponin vote for golang because easy to start using as python, but native compilation, types, using in complicated infrastructure components such as k8s. Python good as a glue because it simple, but golang too, but more safe and rapid for me. I'm not devops, but touched a little both in development and golang favs me more
       
 (DIR) Post #ALd058Yif4NRXpKVii by kobayashi@udongein.xyz
       2022-07-18T21:10:32.187292Z
       
       1 likes, 0 repeats
       
       @duponin also i have to say that golang trends high from low, it really needed in cloud as microservices development language and not only. I guess there two main l langs: Java and Go. And if you learn go, you can switch to web/cloud development with very market needed skill, but python on top now because of ML/DS and other excel-like math scripts in wide. Ofc django/flask exists, but imo they are far more from java (spring/quarkus) and Go both. So, if you not in math, but in web/cloud/infra, I suggest you go.
       
 (DIR) Post #ALd1KUb16tukBnI49Y by Eldeberen@social.middleearth.fr
       2022-07-18T21:21:59.873641Z
       
       1 likes, 0 repeats
       
       @duponin I do lots of Python, but I would do more Golang, because static builds. You can deploy Golang binaries on remote targets without installing Python toolchain and dependencies, which can be a f* mess.
       
 (DIR) Post #ALd2wWud2wioKcAIm8 by momcorp@mstdn.io
       2022-07-18T21:39:08Z
       
       1 likes, 0 repeats
       
       @duponin Golang feels like a refreshed version of Python with types and better tools. When I need to change or refactor a Python script at work, I often want to tear my hair out due to the annoying tools, venvs, and incompatibilities between the Python versions.BUT if you want to learn a scripting language and don't know either, I would advise you to try Python which should be simpler. As long as you only install one Python interpreter, you'll be fine.Good luck whichever you choose!
       
 (DIR) Post #ALd7vO6QoZACURxcDg by robryk@qoto.org
       2022-07-18T22:33:01Z
       
       0 likes, 0 repeats
       
       @duponin If this is your first programming language, I'd suggest neither -- both of these languages have some issues that e.g. leave out ability to specify constraints that are useful in reasoning (e.g. constness), so if any of them is your first language you need to figure out that such constraints are useful yourself.If this is just "what would I want for sysadmin-like purposes", then I'd go with Go if you expect to be doing anything nontrivially concurrent, and would have no opinion otherwise.
       
 (DIR) Post #ALd7vOdkofoo9nYE9w by duponin@udongein.xyz
       2022-07-18T22:39:24.144608Z
       
       0 likes, 0 repeats
       
       @robryk my “first” programming language is Elixir and I would use it for any concurrent and reliableGolang most advantages are statically linked binary and typingWhile Python is for being quick and dirty
       
 (DIR) Post #ALdmGR0ypbpwuX34GO by robryk@qoto.org
       2022-07-18T22:41:28Z
       
       1 likes, 0 repeats
       
       @duponin Ah, in that case you'll be familiar with large part of Go's concurrency paradigm, and will clearly see the places where it's weird.Go's typing is.. weird? Large part of it is sort-of duck typing.
       
 (DIR) Post #ALdmHyE2q9jcCYtLJg by cobratbq@mastodon.social
       2022-07-18T23:05:02Z
       
       1 likes, 0 repeats
       
       @duponin @robryk I guess the most important thing to keep in mind: if a python project grows, the dynamic typing may make control flow unclear.Go has some quirks in its type system, but it is static and there are tools to help. So given a large enough project, Go will read/comprehend more easily.I think both languages have advantages. For example, if there are good, mature libraries for python and not Go, then use python.Both are wonderful languages in their own right.
       
 (DIR) Post #ALf0uWgEmPEca7JjpQ by robryk@qoto.org
       2022-07-19T19:44:06Z
       
       1 likes, 0 repeats
       
       @duponin One thing that's not immediately obvious about is that as soon as you give something typed as an interface to someone, they can change their behaviour based on whether it happens to have some other method on it (so, if you use any interface type, we enter the world of duck typing immediately).So, e.g. if you give someone an io.Reader, they can use RTTI to ask if it has a Frob() method, and change their behaviour based on this. It's also sadly considered acceptable to barely (in case of checking if a Writer is also a Closer to Close it if it is) document it or even don't document that at all (if checking whether a Writer has a ReadFrom method). This makes embedding a type (i.e. creating a struct with an unnamed field) ~always potentially dangerous, because you might be embedding some methods from the inner type that you'd have wanted to intercept if you knew of them.