Re: I failed today
by eyepopslikeamosquito (Archbishop) on Apr 13, 2023 at 01:37 UTC
|
> They went with Python2 instead, imagine that
Choosing Python 2 as a sexy new language for a brand new project in 2023 certainly surprised me.
That is just the tip of the iceberg in my experience,
with the younger guys eager to use a multitude of
Infrastructure as code tools, such as
Puppet and
Ansible ...
and new
DevOps tools, often requiring JVM languages, such as Groovy
... and Microservices ... and
trendy new statically typed languages, such as Golang
and Rust, and ... :)
> my work is pushing most of us Linux deployers to start using Windows now for our client machines
In case it helps, I recently installed Ubuntu on Windows 11 -
it's been working well and has made working on Windows much more enjoyable.
| [reply] |
|
> Choosing Python 2 as a sexy new language for a brand new project in 2023 certainly surprised me.
Yep!
> I recently installed Ubuntu on Windows 11
Well that's Microsoft, if you can't buy them, or ruin them, embrace them...
Though occasionally they sell too early -> microsoft-once-owned-a-chunk-of-apple xD
| [reply] |
|
>> Choosing Python 2 as a sexy new language for a brand new project in 2023 certainly surprised me.
> Yep!
I admit I checked the date: was it really April 12 ... or April 1? :)
... OTOH, I shouldn't have been surprised, given what I predicted back in 2011 :)
Python 3: I only claimed it was meeting "substantial resistance". Maybe that's unfair, depending on your interpretation of "substantial", but it's certainly meeting some resistance based on random web chatter on the subject. Well, I'm a Python user and I'm resisting it. ;-) My personal opinion is that breaking backward compatibility was unwarranted for a release with relatively modest improvements. Many businesses with large investments in Python 2.x code will resist Python 3 indefinitely because upgrading will prove too risky and/or too expensive.
... where is the ROI on spending millions of dollars rewriting millions of lines of already working code,
without adding any customer value, while being almost guaranteed to suffer numerous breakages to critical business systems?
... you also pay an Opportunity cost ...
See also: Re^6: Improving p5p: Perl is going to stay Perl (Backwards Compatibility)
| [reply] |
|
|
Re: I failed today
by bliako (Monsignor) on Apr 13, 2023 at 09:12 UTC
|
p = "aa"
temp = input("enter pass: ")
if temp == p:
print("ahahah")
else:
print("ssss")
enter pass: p <<< this is the name of the variable holding the passwo
+rd!
ahahah
oO( lolling lolling lolling lol )
Edit: the above is a world-first and the record is held by Python: the name of the variable holding the password must be at least as complex as the password itself. Unfortunately with a restricted charset this goes like : a_variable_you_123_will_n3v3r_b3_able_to_guez = "a strong password!". (Also added a comment in code above)
OT: I have written an MIS for a factory in Perl. I have found that the system sending emails to users a useful feature. Then their (outsourced) IT told me that each company mail account has a monthly cost. Because ... they outsource all the factory email services to ... M$, some 365 %*%$^$&*. I can't understand that, unless M$ also signed them up for free insurance for virus and hacking damages. But that would bankrupt them. So, it's an infection which causes them to stare when you tell them what about confidentiality? Why not setup an email server and actually do some real IT rather than acting as a reseller of IT services? Stare. Stare. Stare.
... I am already flipping burgers part-time. Oh well, we will always have Linux
| [reply] [d/l] [select] |
|
root = "/"
No more logins for the root user ;-)
| [reply] [d/l] |
|
I'm no fan of Python myself, but as most of us have seen Perl (mis-)features or improper usage used as examples of why not to use Perl, I feel someone should be intellectually honest enough to call the same when applied elsewere. In the example given, this is the use of a poorly-named feature that somehow survived in versions of Python prior to the 3.x series.
In the 2.7.18 documentation, it says that input([prompt]) is the equivalent of eval(raw_input([prompt])), and to consider using the raw_input() function for general input from users. Their eval() is similar to our string eval() function, so I ask the question -- If you were writing a Perl script and accepting credentials, can you think of a valid reason to pass the user's input immediately through a string eval? (If you're writing a program that needs to be security-conscious, I expect some thought on the functions one calls, and honest research when testing shows something misbehaving (it was tested, right?).)
| [reply] |
|
so I ask the question -- If you were writing a Perl script and accepting credentials, can you think of a valid reason to pass the user's input immediately through a string eval?
Of course not.
Whereas Perl reminds us all the time that accepting unchecked user input is bad practice. And, god forbid, eval()'ing unchecked user input is criminal, Python decides to name the input+eval function input() and the sane just-input function as ... raw_input(). Why penalise the sane and common practice with more keystrokes? But you are right that reading the documentaton is key to avoid input() misbeheaving and fall in this trap.
| [reply] [d/l] [select] |
|
| [reply] [d/l] |
|
$ python2 --version
Python 2.7.18
at least | [reply] [d/l] |
|
Re: I failed today
by Bod (Vicar) on May 26, 2023 at 21:34 UTC
|
I failed to convince my team at work to use Perl instead of Python
Python does seem to be getting everywhere...
The Raspberry Pi Pico doesn't have Perl, and all the API documentation for OpenAI uses Python - the two things I have been trying to work with recently...
For a brief moment, I even considered learning some Python for these two purposes but I quickly came to my senses and wrote a Perl module to do what I wanted with OpenAI. The Pico will be more of a challenge!
| [reply] |
|
I’ve also picked up several pico based devices (Adafruit has a neat usb dongle with a couple rgb leds and some capacitive pads for buttons that’s about 6$) and yes they’re all micropython or some flavour thereof. Basically all it runs is a python interp (as opposed to an RPi that’s got a Linux kernel and env); someone with arduino or other µcontroller experience might could look at porting but given the resource constraints of the hardware I don’t think Perl is going to fit well (primarily RAM limits would be my fear).
Edit: not strictly a pico (but runs circuitpython) and it’s 7$ but https://www.adafruit.com/product/4870 if anyone is interested. Also note there’s all of 32K of ram on this thing.
The cake is a lie.
The cake is a lie.
The cake is a lie.
| [reply] |
|
I've not bothered buying a Pico because they do not run Perl...
But I've been mighty tempted as getting hold of a Pi Zero W here in the UK is pretty much impossible. Although there are signs of a few supplies emerging.
I might have to look to one of the other little devices that are around in increasing variations!
| [reply] |
|
Re: I failed today
by LanX (Saint) on Apr 12, 2023 at 23:19 UTC
|
Unfortunately I heard similar stories many times before. But ...
... why not Python3?
| [reply] |
|
Because the environment which we code for does not have standard support for python3, it is still mostly python2 unfortunately. Lots of legacy code to support.
| [reply] |
|
| [reply] |
Re: I failed today
by Jenda (Abbot) on May 25, 2023 at 21:43 UTC
|
| [reply] |