greptilian logo

IRC log for #sourcefu, 2016-11-23

http://sourcefu.com

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
02:27 philbot joined #sourcefu
02:27 Topic for #sourcefu is now http://sourcefu.com | logs at http://irclog.greptilian.com/sourcefu/today
02:28 pdurbin joined #sourcefu
03:05 pdurbin seems pretty cool: atsaki/termeter: Visualize data in the terminal - https://github.com/atsaki/termeter
03:05 pdurbin via http://www.programmingthrowdown.com/2016/10/episode-59-deploying-software.html
07:23 prologic pdurbin: you like Go too eh?
07:24 prologic dotplus: and to be fair I think the only other solutions that already exist are WebDAV based AFAIK
07:24 prologic and there isn't a lot of good modern/up-to-date support for WebDAV seems a bit of a dead protocol
11:47 pdurbin prologic: I'm sort of looking for a project written in Go to contribute to.
16:13 pdurbin huh, "The Case Against Python 3... This document serves as a collection of reasons why beginners should avoid Python 3 as of November 22nd, 2016." https://learnpythonthehardway.org/book/nopython3.html
16:14 pdurbin via https://botbot.me/freenode/positivepython/msg/76915505/
16:20 pdurbin wow, "There is a high probability that Python 3 is such a failure it will kill Python."
16:52 pdurbin some interesting discussion over there in #positivepython
17:09 aditsu wat!
17:11 aditsu "Python 3 Is Not Turing Complete" - ok that's just bullshit
17:17 aditsu I think the author simply doesn't know what they're talking about
17:24 pdurbin in general, I think Zed knows what he's talking about
17:25 aditsu pretty much all the arguments are utter crap; beginners would never use "bytes(something)"
17:26 pdurbin he's saying Python 3 isn't as friendly to beginners as Python 2
17:26 pdurbin usability matters
17:26 aditsu and I totally disagree
17:27 aditsu how is it less friendly?
17:28 aditsu the author obviously doesn't understand the meaning of Turing completeness, and of static typing
17:31 aditsu I would argue that Python 3 is more friendly to beginners, because 3/2 = 1.5 :)
17:31 pdurbin "Every time you attempt to deal with characters in your programs you'll have to understand the difference between byte sequences and Unicode strings."
17:31 pdurbin that's under "Difficult To Use Strings"
17:32 aditsu and that's totally wrong - beginners will happily use strings without knowing anything about byte sequences
17:33 aditsu print("hello " + "world") # no understanding of byte sequences, unicode and encodings required
17:34 aditsu strings are really easy to use, as they've always been
18:16 pdurbin What about this example: python3 -c "import subprocess;f = open( 'out.txt', 'a+' );f.write('the date is now: ');plaintext = subprocess.check_output(['date']);f.write (plaintext + '\n');f.close();"
18:17 pdurbin It blows up with "TypeError: can't concat bytes to str"
18:22 aditsu the file part is not necessary for the example; and I'd argue that subprocess is not really a beginner thing (I don't think I ever used it myself btw)
18:29 pdurbin Ah, you're right, the example can be shortened to this: python3 -c "import subprocess;plaintext = subprocess.check_output(['date']);print('the date is now: ' + plaintext + '\n');"
18:30 pdurbin And you get a slightly different error when it blows up: TypeError: Can't convert 'bytes' object to str implicitly
18:30 pdurbin This example comes from http://stackoverflow.com/questions/21916888/cant-concat-bytes-to-str
18:37 aditsu you get the same error with print(plaintext+'\n')
18:40 pdurbin yeah
18:40 pdurbin Here's another example: python3 -c "from urllib.request import urlopen; print('content: ' + urlopen('https://pythonclock.org').read())"
18:40 pdurbin maybe `urlopen` is used more often than `subprocess`
18:41 pdurbin The urlopen example comes from http://stackoverflow.com/questions/16699362/python3-error-typeerror-cant-convert-bytes-object-to-str-implicitly
18:45 aditsu well, when you deal with program output or web page content, it is important to have an understanding of encodings, because what you get is really a bunch of bytes rather than a string
18:45 pdurbin yeah
18:45 pdurbin I'm just trying to think of something more complicated than "hello world" that might trip up a beginner.
18:46 aditsu with python 2, people would be lost when they get a bunch of junk instead of foreign-language characters or emojis or whatnot
18:49 pdurbin ok
19:28 pdurbin So should I invest time in Python? Or use other languages? I'm tempted to just keep one eye on https://pythonclock.org to see when Python 2 goes End Of Life (3ish year from now) and the other eye on the adoption numbers of Python 3 to see when most people have switched to Python 3.
19:50 aditsu use what you want (or need) to use; I think it's important to know a little python since it's a nice and popular language, but it's up to you how much time to invest in it, and I don't think the python 3 adoption rate is relevant
20:07 pdurbin yeah, it's a nice language
20:08 pdurbin I would think it would matter if it's 2020 and Python 2 is EOL ( there will be bugfix releases until 2020 ) and Python 3 adoption is still low. It would't bode well for the future of the language.
20:54 aditsu https://hynek.me/articles/python3-2016/
20:54 aditsu "My completely anecdotal view on the state of Python 3 in 2016"
21:23 pdurbin nice post

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

http://sourcefu.com