Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
tef
May 30, 2004

-> some l-system crap ->

Malcolm XML posted:

Also Unicode is basically institutionally racist


zawgyi in unicode :toot:

Adbot
ADBOT LOVES YOU

tef
May 30, 2004

-> some l-system crap ->

ComradeCosmobot posted:

let us tell u about something called combining characters
/
👨‍👨‍👦‍👦

reminder that these were in unicode 1.0

the one that had to be a fixed width encoding

the one that meant han unification had to happen

unicode!

tef
May 30, 2004

-> some l-system crap ->

MononcQc posted:

IMO python3 suffered a whole lot because as far as I understand 1. they took away byte strings at first so everyone would be forced to use unicode when it made no sense (they just flipped the bad decision around) 2. it took a long while to bring back 3. everyone had to learn the conceptual difference between byte strings and unicode at once.

1. kinda

'we're going to swap str and unicode around' :toot:

'then we're going to change the interface of bytestrings'

'and then remove format strings'

2. yep

that and foward compatibility wasn't really on the table

3. no

it's more what suspicious dish said, a lot of byte janitors used python2 instead of perl or ruby

python3 threw away str and introduced bytes, and they don't work the same at a fundamental level

comedyblissoption
Mar 15, 2006

dynamic typing and dealing with different semantic ideas of string is a recipe for failure

comedyblissoption
Mar 15, 2006

are swift and rust the only 'mainstream' langs that don't guide you into doing the wrong thing by letting you idiomatically index or enumerate by codepoint on unicode strings

Doom Mathematic
Sep 2, 2008
I hear Perl 6 is pretty good on that score.

E: Oh wait, you said "mainstream".

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
note that, pertinently to the bytes/characters debate, swift also sees strings as basically a view over the raw code-unit sequence. so if you have terrible malformed utf-8 string data, it will present as containing invalid characters (\uFFFD); but if you ask it for a utf-8 view, it hasn't actually thrown any of that information away, whereas my impression is that python actually normalizes the string data implicitly when it discovers invalid encodings

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

What do you languages people think of pythons type annotations + mypy?

Personally, I get much usage out of the type annotations just because it makes PyCharm that much better, but I'm just interested in reading some opinions about the whole idea.

cinci zoo sniper
Mar 15, 2013




Thermopyle posted:

What do you languages people think of pythons type annotations + mypy?

Personally, I get much usage out of the type annotations just because it makes PyCharm that much better, but I'm just interested in reading some opinions about the whole idea.

i like them. code readability is more or less the same imo, the only thing that is awkward is specifying dual output types (<datatype>, NoneType) but you just do that with Union(). i kinda wish you could optionally "flip" the interpreter to just block script execution if a blatant type mismatch is detected somewhere

granted, i have not used mypy specifically, since pycharm has its own solution that just integrates with py3 type annotations. more broadly, im not even sure whats the functionality venn diagram on py3 core+pycharm vs mypy looks like

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I really love that python 3 invented a whole syntax for type annotations without ever testing it or giving it semantics so it's basically useless

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Suspicious Dish posted:

I really love that python 3 invented a whole syntax for type annotations without ever testing it or giving it semantics so it's basically useless

u are very salty about python 3!

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

but yes, the whole "here you can annotate your types but no we dont do anything with that information" thing is weird

cinci zoo sniper
Mar 15, 2013




Thermopyle posted:

but yes, the whole "here you can annotate your types but no we dont do anything with that information" thing is weird

that has me wondering if it is an attempted bone for static typing crowd, or do they have further plans?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Thermopyle posted:

u are very salty about python 3!

I'm not actually that angry at all I just think it's a shame and it's hilarious what kinds of stuff they're doing to their dying plang

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

cinci zoo sniper posted:

that has me wondering if it is an attempted bone for static typing crowd, or do they have further plans?

mypy


Guido is big on mypy


he discovers plang features 25 years after everyone else

cinci zoo sniper
Mar 15, 2013




Malcolm XML posted:

mypy


Guido is big on mypy


he discovers plang features 25 years after everyone else

at least we didnt get rob pike i guess

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

cinci zoo sniper posted:

that has me wondering if it is an attempted bone for static typing crowd, or do they have further plans?

i assumed it was based on the same kind of petulant fake compromise wherein guido removed reduce from the functions in the default namespace on the basis that the only things he could possibly imagine using it for were calculating the sum or product of an array

"well gosh everybody makes a huge deal about how they like static types; i don't even get why you'd want them. fine here have annotations. what are the semantics? dunno, whatever the reference interpreter does. anyway now that's settled once and for all."

Workaday Wizard
Oct 23, 2009

by Pragmatica

Internet Janitor posted:

i assumed it was based on the same kind of petulant fake compromise wherein guido removed reduce from the functions in the default namespace on the basis that the only things he could possibly imagine using it for were calculating the sum or product of an array

that was some dumb poo poo

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Internet Janitor posted:

i assumed it was based on the same kind of petulant fake compromise wherein guido removed reduce from the functions in the default namespace on the basis that the only things he could possibly imagine using it for were calculating the sum or product of an array

"well gosh everybody makes a huge deal about how they like static types; i don't even get why you'd want them. fine here have annotations. what are the semantics? dunno, whatever the reference interpreter does. anyway now that's settled once and for all."

i think theres more to it than that...guido is heavily involved in mypy and dropbox (with guido) just open sourced pyannotate for automated type annotations on legacy code bases

guido is doing a lot of types stuff

whether that means anything for core python remains to be seen

cinci zoo sniper
Mar 15, 2013




guido posted:

So now reduce(). This is actually the one I've always hated most, because, apart from a few examples involving + or *, almost every time I see a reduce() call with a non-trivial function argument, I need to grab pen and paper to diagram what's actually being fed into that function before I understand what the reduce() is supposed to do. So in my mind, the applicability of reduce() is pretty much limited to associative operators, and in all other cases it's better to write out the accumulation loop explicitly.
http://www.artima.com/weblogs/viewpost.jsp?thread=98196

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Thermopyle posted:

i think theres more to it than that...guido is heavily involved in mypy and dropbox (with guido) just open sourced pyannotate for automated type annotations on legacy code bases

guido is doing a lot of types stuff

whether that means anything for core python remains to be seen

basically Guido actually went to a company that has to use Python in real production apps and discovered that typing has a use

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
if it results in a gradual type system like typescript hell yeah

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Malcolm XML posted:

if it results in a gradual type system like typescript hell yeah

thats basically what you get now with mypy

cinci zoo sniper
Mar 15, 2013




ok im looking at mypy and pretending to think atm and yeah the man himself ("bdfl" :rolleye:) is posting on issues. did he leave google for this to work with dropbox or something?

time to understand where mypy stands vs pycharm internals and whats a better option

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

typescript has more features that i often find myself wishing for in python/mypy/pycharm

like string literal types


cinci zoo sniper posted:

ok im looking at mypy and pretending to think atm and yeah the man himself ("bdfl" :rolleye:) is posting on issues. did he leave google for this to work with dropbox or something?

time to understand where mypy stands vs pycharm internals and whats a better option

guido just works a lot with jukka on mypy...probably because like malcolm xml said he all of a sudden realized that types were helpful when he had to work on a big codebase...dropbox's python lines of code is in the millions.

guido has worked at dropbox for several years.

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
type annotations in python 3 are a neat idea, but i don't feel that they integrate well enough with the rest of the system that they're worth much. like, everything else is duck typed, but the type annotations want everything to be nominally typed, where i think Typescript does a better job at making the types useful.

also since idents in annotations are evaluated like anything else you can't annotate a class inside itself, you have to use a string, which is workable but makes everything look a bit stupid

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Thermopyle posted:

thats basically what you get now with mypy

its not as good because it has guido attempting to half-rear end it instead of having a rad dude like anders heijlsberg behind it

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
as always microsoft gets language design correct and fucks up the execution

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
except typescript actually owns mega hard and anyone writing regular javascript should switch

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Powaqoatse posted:

hows it do if you copy to another application? just wondering whats going on in the frontend

on a real operating system with a text rendering and editing infrastructure that’s used by all applications, it just works

a witch
Jan 12, 2017

Suspicious Dish posted:

I'm not actually that angry at all I just think it's a shame and it's hilarious what kinds of stuff they're doing to their dying plang

is this a weird trumpism or are you genuinely unaware that python is the fastest growing language in the world?

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

Malcolm XML posted:

as always microsoft gets language design correct and fucks up the execution

What language are you talking about? From context I'm guessing C#, but if so the "fucks up the execution" part doesn't make sense.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Malcolm XML posted:

its not as good because it has guido attempting to half-rear end it instead of having a rad dude like anders heijlsberg behind it

Yeah, I don't disagree

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!

a witch posted:

is this a weird trumpism or are you genuinely unaware that python is the fastest growing language in the world?

do you have stats on this? i'd be surprised that wasn't like, javascript at this point.

a witch
Jan 12, 2017

Asymmetrikon posted:

do you have stats on this? i'd be surprised that wasn't like, javascript at this point.

I’m basing it on this https://stackoverflow.blog/2017/09/06/incredible-growth-python/

even if it’s not strictly number one, the idea that it’s dying is some bizarre projection from a guy who has spent nearly a decade makin bitter posts about python 3 on this forum

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Most of the people I knew that were building large systems in Python switched to go or rust or JavaScript.

Perhaps the growing amount of questions imply that your documentation and language are lovely.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



eschaton posted:

on a real operating system with a text rendering and editing infrastructure that’s used by all applications, it just works

I use osx obvs

just wondering what ms does

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Suspicious Dish posted:

Most of the people I knew that were building large systems in Python switched to go or rust or JavaScript.

Perhaps the growing amount of questions imply that your documentation and language are lovely.

i mean, i get it, python got worse for you with python 3, but you're just being petulant here

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
even if I'm a huge cheerleader for python3 (or at least I just think it was a net positive) I agree that the type annotations are kinda dumb and useless.

Adbot
ADBOT LOVES YOU

fritz
Jul 26, 2003

Suspicious Dish posted:

Perhaps the growing amount of questions imply that your documentation and language are lovely.

what would your hypothesis have been if the number of questions had gone down

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply