Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76962 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-08-25 13:41 +1000 |
| Last post | 2014-08-25 21:21 -0400 |
| Articles | 14 — 8 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: GO vs Python Chris Angelico <rosuav@gmail.com> - 2014-08-25 13:41 +1000
Re: GO vs Python Rustom Mody <rustompmody@gmail.com> - 2014-08-25 01:01 -0700
Re: GO vs Python Marko Rauhamaa <marko@pacujo.net> - 2014-08-25 11:52 +0300
Re: GO vs Python Chris Angelico <rosuav@gmail.com> - 2014-08-25 19:48 +1000
Re: GO vs Python Roy Smith <roy@panix.com> - 2014-08-25 08:06 -0400
Re: GO vs Python Rustom Mody <rustompmody@gmail.com> - 2014-08-25 05:24 -0700
Re: GO vs Python Michael Torrie <torriem@gmail.com> - 2014-08-25 08:13 -0600
Re: GO vs Python Marko Rauhamaa <marko@pacujo.net> - 2014-08-25 17:26 +0300
Re: GO vs Python Rustom Mody <rustompmody@gmail.com> - 2014-08-25 07:38 -0700
Re: GO vs Python Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-08-25 16:44 +0200
Re: GO vs Python Marko Rauhamaa <marko@pacujo.net> - 2014-08-25 18:04 +0300
Re: GO vs Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-25 17:40 +0100
Re: GO vs Python Olaf Hering <olaf@aepfle.de> - 2014-08-25 16:32 +0200
Re: GO vs Python Roy Smith <roy@panix.com> - 2014-08-25 21:21 -0400
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-08-25 13:41 +1000 |
| Subject | Re: GO vs Python |
| Message-ID | <mailman.13400.1408938102.18130.python-list@python.org> |
On Mon, Aug 25, 2014 at 1:27 PM, Sam Fourman Jr. <sfourman@gmail.com> wrote: > I remember doing some browsing around, and the pooco people that make jinja2 > were not fans of python3(I forget the blog post), I got scared because a > very large portion of my income was based on a single client... So since we > were having scalability issues anyway, I moved them to GO, and it was a Win > - Win, the GO standard lib does so much, and the scalability gains we > received over python were so large, that we were able to reduce out AWS bill > so much that I could hire another coder. There are some communities that, for some reason or other, dislike Python 3. That doesn't mean you have to. The Py2 model is a bit easier for boundary code (it lets you stuff your fingers in your ears and go "LALALALALA there are no character encodings"), but the Py3 model is way easier for application code. Text is text, no matter what characters it has in it. > I really like python, and we use it a ton, but a python like compiled > language did wonders for us when we needed it most. Sure. And your reduction of AWS bills sounds great. Just make sure you don't consume the entire extra coder's time doing things that Python would have done for you. Go's character model is inferior to Python 3's (or at least, it was last time I checked - stuff might have changed since then), so you may find yourself doing a lot of unnecessary work to make sure your code works correctly. Do be sure to test everything thoroughly, with characters from all over Unicode. Personally, when I want "Python but faster", I go to Pike. Same character/string model (even the same style of internal representation), same broad object model, but a stronger focus on networking and on staying running 100% of the time. ChrisA
[toc] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2014-08-25 01:01 -0700 |
| Message-ID | <d8811b7e-fc37-447c-848d-f3bd314aff5e@googlegroups.com> |
| In reply to | #76962 |
On Monday, August 25, 2014 9:11:39 AM UTC+5:30, Chris Angelico wrote: > Sure. And your reduction of AWS bills sounds great. Just make sure you > don't consume the entire extra coder's time doing things that Python > would have done for you. Go's character model is inferior to Python > 3's (or at least, it was last time I checked - stuff might have > changed since then), so you may find yourself doing a lot of > unnecessary work to make sure your code works correctly. Do be sure to > test everything thoroughly, with characters from all over Unicode. Heh! You make it sound that the character model is the most important thing in choosing a language! There are people using Fortran -- with not intention of finding an alternative.
[toc] | [prev] | [next] | [standalone]
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Date | 2014-08-25 11:52 +0300 |
| Message-ID | <87bnr9hrxv.fsf@elektro.pacujo.net> |
| In reply to | #76969 |
Rustom Mody <rustompmody@gmail.com>: > Heh! You make it sound that the character model is the most important > thing in choosing a language! That's because the "character model" is the raison-d'être for Python3. As far as Go goes, I think it's an interesting approach, but marred by the Google tie-in. You must have a Google account to participate in the Go community. Marko
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-08-25 19:48 +1000 |
| Message-ID | <mailman.13410.1408960095.18130.python-list@python.org> |
| In reply to | #76969 |
On Mon, Aug 25, 2014 at 6:01 PM, Rustom Mody <rustompmody@gmail.com> wrote: > On Monday, August 25, 2014 9:11:39 AM UTC+5:30, Chris Angelico wrote: > >> Sure. And your reduction of AWS bills sounds great. Just make sure you >> don't consume the entire extra coder's time doing things that Python >> would have done for you. Go's character model is inferior to Python >> 3's (or at least, it was last time I checked - stuff might have >> changed since then), so you may find yourself doing a lot of >> unnecessary work to make sure your code works correctly. Do be sure to >> test everything thoroughly, with characters from all over Unicode. > > Heh! You make it sound that the character model is the most important thing > in choosing a language! > There are people using Fortran -- with not intention of finding > an alternative. Heh. Well, in some ways, it is. When you advise someone on how to choose a car, do you say "Make sure you get one with wheels"? No. You assume it. There are far more important aspects to a programming language, but most of them are fairly obvious (and often universal). Also, if someone's trying to decide between C (manual memory management, compiled, detaily) and Python (garbage collected, high level), he'll know the issues. I'm referring here to something that might be a surprise way down the track. Let's take a concrete example. You want to build a database-backed dynamic web site. You could use PHP and MySQL, and a few years ago that would be your only option if you want cheap web hosting. Or you could use Python and PostgreSQL, tying in with Passenger to manage stuff under Apache. Or you could write an entire HTTP server in Python (using http.server or BaseHTTPServer, perhaps), putting it on a dedicated IP or port. Or you could probably craft something horrendous out of bash scripts, massive pipelines, and some command-line tool that binds to a port (I know you can use /dev/tcp/hostname/port to connect, not sure how you'd listen). If someone asks you for advice, what aspects of each would you highlight? Obvious stuff doesn't need to be mentioned (like "PHP uses braces, if you hate braces then use Python", and "doing it all with bash pipelines is Just Plain Dumb"), and what you need to say is stuff like "Doing it with http.server will limit you to one CPU core" and "Doing it with PHP means you don't get Unicode support". So yes, I think it was the most important thing to mention, because it's something that isn't obvious to a lot of people. You test your code with stuff you can type, and it works fine. Other people use non-ASCII characters, and nearly everything works, but there are just these occasional glitches (because your code's working with UTF-8 bytes, and every once in a while it counts things differently or something). Working with bytes instead of characters is one of the most subtle problems to infect a program, because 99%+ of it works fine. And properly fixing it is a huge job. That's why it's worth saying, even if character model isn't actually the one most important feature of a programming language. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2014-08-25 08:06 -0400 |
| Message-ID | <roy-592146.08040025082014@news.panix.com> |
| In reply to | #76969 |
In article <d8811b7e-fc37-447c-848d-f3bd314aff5e@googlegroups.com>, Rustom Mody <rustompmody@gmail.com> wrote: > Heh! You make it sound that the character model is the most important thing > in choosing a language! > There are people using Fortran -- with not intention of finding > an alternative. Different people have different needs. If I was writing code to do number crunching, I wouldn't care much if I could only print 7-bit ascii. If I was writing code to serve music on the web and had to display artist names like Mötley Crüe and Beyoncé, I would be more concerned about the character model.
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2014-08-25 05:24 -0700 |
| Message-ID | <cb2aff1b-c091-48b5-90f5-d82c6060b148@googlegroups.com> |
| In reply to | #76976 |
On Monday, August 25, 2014 5:36:25 PM UTC+5:30, Roy Smith wrote: > Rustom Mody wrote: > > Heh! You make it sound that the character model is the most important thing > > in choosing a language! > > There are people using Fortran -- with not intention of finding > > an alternative. > Different people have different needs. If I was writing code to do > number crunching, Precisely: - Compiled language + fast compilation - Static binaries -- better (in the sense of more lo-level) than C's default - Static strongly typed + type-inference - Interfaces instead of inheritance - And of course "I want a google-job" and probably many others can be the deciders for many people > ... I wouldn't care much if I could only print 7-bit ascii. > If I was writing code to serve music on the web and had to > display artist names like M�tley Cr�e and Beyonc�, I would be more > concerned about the character model. Funny!! Your mail client seems to be 7-bit ASCII!!
[toc] | [prev] | [next] | [standalone]
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2014-08-25 08:13 -0600 |
| Message-ID | <mailman.13415.1408976053.18130.python-list@python.org> |
| In reply to | #76977 |
On 08/25/2014 06:24 AM, Rustom Mody wrote: >> ... I wouldn't care much if I could only print 7-bit ascii. >> If I was writing code to serve music on the web and had to >> display artist names like M�tley Cr�e and Beyonc�, I would be more >> concerned about the character model. > > Funny!! > Your mail client seems to be 7-bit ASCII!! No it came through fine here, originally. It must be Google Groups that messed up the characters in displaying the message and in your reply.
[toc] | [prev] | [next] | [standalone]
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Date | 2014-08-25 17:26 +0300 |
| Message-ID | <87tx50hcgg.fsf@elektro.pacujo.net> |
| In reply to | #76981 |
Michael Torrie <torriem@gmail.com>: > On 08/25/2014 06:24 AM, Rustom Mody wrote: >>> display artist names like M�tley Cr�e and Beyonc�, I would be more >> >> Your mail client seems to be 7-bit ASCII!! > > No it came through fine here, originally. It must be Google Groups > that messed up the characters in displaying the message and in your > reply. I saw it fine (<URL: news:comp.lang.python>), but there were no MIME headers. MIME might not be part of the NNTP standard, but is a good idea even there. GNUS must have guessed the encoding based on my locale. Marko
[toc] | [prev] | [next] | [standalone]
| From | Rustom Mody <rustompmody@gmail.com> |
|---|---|
| Date | 2014-08-25 07:38 -0700 |
| Message-ID | <71d65a4a-b1b9-49a3-8792-8a3d9b1f4d62@googlegroups.com> |
| In reply to | #76982 |
On Monday, August 25, 2014 7:56:55 PM UTC+5:30, Marko Rauhamaa wrote: > Michael Torrie: > > On 08/25/2014 06:24 AM, Rustom Mody wrote: > >>> display artist names like M�tley Cr�e and Beyonc�, I would be more > >> Your mail client seems to be 7-bit ASCII!! > > No it came through fine here, originally. It must be Google Groups > > that messed up the characters in displaying the message and in your > > reply. > I saw it fine (<URL: news:comp.lang.python>), but there were no MIME > headers. MIME might not be part of the NNTP standard, but is a good idea > even there. GNUS must have guessed the encoding based on my locale. > Marko Mysterious... This page https://mail.python.org/pipermail/python-list/2014-August/677408.html shows charset as us-ascii And it shows Mötley Crüe and Beyoncé So it means ö ü é are us-ascii? [Of course I understand none of all this] रुसि [To force GG to unicode this message]
[toc] | [prev] | [next] | [standalone]
| From | Chris “Kwpolska” Warrick <kwpolska@gmail.com> |
|---|---|
| Date | 2014-08-25 16:44 +0200 |
| Message-ID | <mailman.13416.1408977881.18130.python-list@python.org> |
| In reply to | #76983 |
On Mon, Aug 25, 2014 at 4:38 PM, Rustom Mody <rustompmody@gmail.com> wrote: > On Monday, August 25, 2014 7:56:55 PM UTC+5:30, Marko Rauhamaa wrote: >> Michael Torrie: > >> > On 08/25/2014 06:24 AM, Rustom Mody wrote: >> >>> display artist names like M�tley Cr�e and Beyonc�, I would be more >> >> Your mail client seems to be 7-bit ASCII!! >> > No it came through fine here, originally. It must be Google Groups >> > that messed up the characters in displaying the message and in your >> > reply. > >> I saw it fine (<URL: news:comp.lang.python>), but there were no MIME >> headers. MIME might not be part of the NNTP standard, but is a good idea >> even there. GNUS must have guessed the encoding based on my locale. > >> Marko > > Mysterious... > > This page > https://mail.python.org/pipermail/python-list/2014-August/677408.html > shows charset as us-ascii > And it shows Mötley Crüe and Beyoncé > So it means ö ü é are us-ascii? > > [Of course I understand none of all this] > > रुसि [To force GG to unicode this message] > -- > https://mail.python.org/mailman/listinfo/python-list Your browser helpfully ignores that header and uses ISO-8859-1, which *is* the actual encoding of that message. Gmail displays the message properly me, but apparently Google Groups defaults to UTF-8, and that results in question marks. -- Chris “Kwpolska” Warrick <http://chriswarrick.com/> PGP: 5EAAEA16 stop html mail | always bottom-post | only UTF-8 makes sense
[toc] | [prev] | [next] | [standalone]
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Date | 2014-08-25 18:04 +0300 |
| Message-ID | <87mwashaps.fsf@elektro.pacujo.net> |
| In reply to | #76984 |
Chris “Kwpolska” Warrick <kwpolska@gmail.com>: >>> >>> display artist names like M�tley Cr�e and Beyonc�, I would be more >>> >> Your mail client seems to be 7-bit ASCII!! >>> > No it came through fine here, originally. >> >>> I saw it fine (<URL: news:comp.lang.python>), but there were no MIME >>> headers. MIME might not be part of the NNTP standard, but is a good idea >>> even there. GNUS must have guessed the encoding based on my locale. >> >> https://mail.python.org/pipermail/python-list/2014-August/677408.html >> shows charset as us-ascii >> And it shows Mötley Crüe and Beyoncé >> So it means ö ü é are us-ascii? > > Your browser helpfully ignores that header and uses ISO-8859-1, which > *is* the actual encoding of that message. Gmail displays the message > properly me, but apparently Google Groups defaults to UTF-8, and that > results in question marks. Thank goodness for Python3, which has freed us from these archaic confusions. Marko
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-08-25 17:40 +0100 |
| Message-ID | <mailman.13422.1408984855.18130.python-list@python.org> |
| In reply to | #76987 |
On 25/08/2014 16:04, Marko Rauhamaa wrote: > > Thank goodness for Python3, which has freed us from these archaic > confusions. > It had to happen. Cue our resident unicode expert who will tell us yet again how fatally flawed the FSR is but once again fail to explain why. Hum, which microbenchmark will get trotted out this time? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Olaf Hering <olaf@aepfle.de> |
|---|---|
| Date | 2014-08-25 16:32 +0200 |
| Message-ID | <mailman.13417.1408978605.18130.python-list@python.org> |
| In reply to | #76977 |
On Mon, Aug 25, Michael Torrie wrote: > No it came through fine here, originally. It must be Google Groups that > messed up the characters in displaying the message and in your reply. Likely not. The header I got with msgid <roy-592146.08040025082014@news.panix.com> lacks basic headers like "Content-Type:" and "Content-Transfer-Encoding:". Funny that this happend in a thread about encoding... Olaf
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2014-08-25 21:21 -0400 |
| Message-ID | <roy-3B7AE2.21205925082014@news.panix.com> |
| In reply to | #76977 |
In article <cb2aff1b-c091-48b5-90f5-d82c6060b148@googlegroups.com>, Rustom Mody <rustompmody@gmail.com> wrote: > On Monday, August 25, 2014 5:36:25 PM UTC+5:30, Roy Smith wrote: > > Rustom Mody wrote: > > > > Heh! You make it sound that the character model is the most important > > > thing > > > in choosing a language! > > > There are people using Fortran -- with not intention of finding > > > an alternative. > > > Different people have different needs. If I was writing code to do > > number crunching, > > Precisely: > - Compiled language + fast compilation > - Static binaries -- better (in the sense of more lo-level) than C's default > - Static strongly typed + type-inference > - Interfaces instead of inheritance > - And of course "I want a google-job" > > and probably many others can be the deciders for many people > > > ... I wouldn't care much if I could only print 7-bit ascii. > > If I was writing code to serve music on the web and had to > > display artist names like M?tley Cr?e and Beyonc?, I would be more > > concerned about the character model. > > Funny!! > Your mail client seems to be 7-bit ASCII!! Well, not my mail client. My NNTP client. I'm running a hideously outdated client (MT-Newswatcher) because I love the U/I. Unfortunately, it's pretty braindead in the unicode department.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web