[ / / / / / / / / / / / / / ] [ dir / apu / asatru / baphomet / bmw / hechizo / hisrol / imouto / yga ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 3dba1cfdd7ce091⋯.png (1.19 MB, 1200x1800, 2:3, 1420761495662.png) (h) (u)

[–]

 No.897870>>897875 >>897876 >>897898 >>897908 >>897942 >>897964 >>898510 >>899180 >>899731 >>903214 >>903999 >>904051 >>905632 >>905885 [Watch Thread][Show All Posts]

Have you ever wondered what programming language is the worst one?

My anwers is: python!

Its stupid """notation""" for many of its attributes and methods makes me laugh when I hear it should be a great languague.

It's so poorly designed and inconsistent naming style that mixes upper and lower case names and abbreviations with full names makes me laugh even more.

The ridiculous The Zen of Python is like a religion. It has also the most stupid pseudo-polymorphism that is justified by the naive duck-typing. Its dumb static methods can behave either like static ones or instance methods depending on how you prefix them or try to use them in a pseudo-derived class. python is the new brainfuck.

Just take a look at the Built-in Functions. There is a place for any or compile or enumerate but there is no place for a string! apparently it's too long to write (lol) so they made it a str; there is also a place for classmethod but there is no place for rawinput - no, this would be too easy. They've decided to call it raw_input - to hell with consistency!!!

 No.897871>>897881

Thank you for the plethora of new information, I really didn't know and needed to.


 No.897875>>897877 >>898215

>>897870 (OP)

The representations of languages in this image is extremely superficial. It seems like a wasted opportunity because there are so many relevant aspects of these languages' contrasting paradigms that could be artistically realized in imaginative ways.


 No.897876>>897881

>>897870 (OP)

>i dont like they called a string a str

>i dont like they called a rawinput raw_input


 No.897877

>>897875

Make a new one


 No.897881>>897883

>>897876

>>897871

>i let python snake its way into my ass and therefore i think its a good language

lmao kys


 No.897883>>897887

>>897881

>im coming straight from /g/ and i didnt even bother to change the filename

look, Python is what it is, use it as a tool if you need, or dont if you dont have to, no one forces anything


 No.897887>>897895

>>897883

>muh filenames

fuck off newfag, 8ch used the same pattern in the past which you would know if you weren't such a cancerous newfag straight from reddit


 No.897888>>897889 >>898016

>naming

Python's naming is generally good. There are some inconsistencies, mostly because of backward incompatibility, but there's a clear style. Read PEP 8, if you haven't, it outlines a convention.

>The ridiculous The Zen of Python is like a religion.

In the sense that it contains guidelines? Not sure what you're trying to say here.

>It has also the most stupid pseudo-polymorphism that is justified by the naive duck-typing. Its dumb static methods can behave either like static ones or instance methods depending on how you prefix them or try to use them in a pseudo-derived class. python is the new brainfuck.

I don't understand what you're saying here. I don't know a way to make a static method behave like an instance method. Are you complaining that it's possible to call static methods on instances? object.some_static_method() is no different from object.class.static_method(), it's just easier to write. It's still static. Can you elaborate?

I think that covers all of your post. You've managed to say very little.


 No.897889>>897893 >>897894

>>897888

>there are conventions

>ValueError

>not value_error

>rawinput

>not raw_input

lmao kid


 No.897893

>>897889

ValueError is a class. Classes and built-in singletons use CamelCase. That's part of the convention.

raw_input no longer exists.


 No.897894

>>897889

ValueError is a class and therefore uses book case, while raw_input is a function. It probably should have been rawinput for consistency and was accordingly renamed to input in python 3.


 No.897895>>897897

>>897887

>8ch used the same pattern

It still does, actually, but your image filename is clearly from 4chan.


 No.897897>>897899

>>897895

$ date -d @1420761495
Fri Jan 9 00:58:15 CET 2015

I think that's before the de-unixfication. Correct me if I'm wrong.


 No.897898

>>897870 (OP)

cool story bro.

next time try something more sound than bitching about unimportant details, most of which are your own lack of understanding (I hope you're just trolling and not a real brainlet).

for example about weird scoping rules making you add something like `x=x` to a lambda, or something interesting about PyPI


 No.897899>>897902

>>897897

Definitely. The picture itself is older, though.


 No.897902

>>897899

Who cares about the picture, all we care out here on doublechin is whether someone may plausibly have posted on 4chan - sorry, cuckchan - after 2014-09-18


 No.897906

Fuck, for a moment I thought we were on a technology board or something. Turns out it's been /polb/ the whole time.


 No.897908>>897914 >>897939

File (hide): a638254f319e3a4⋯.png (65.59 KB, 382x395, 382:395, 1459857664593.png) (h) (u)

>>897870 (OP)

>tfw you unironically prefer PowerShell to Python


 No.897914>>897924

>>897908

it's not cross-platform and it is somewhat tied to .NET which is M$ botnet


 No.897924>>897929 >>897940

>>897914

>opensource .net does not exist


 No.897929

>>897924

It is standing on an unenforceable promise of M$ to not sue for patent violations, etc.


 No.897937

Nah, I'll just wait for the EOMA68 to come out.


 No.897939>>897946 >>898242

>>897908

Is that the thing with 256 char limit on path length?


 No.897940>>897954

>>897924

>opensource means it's not botnet


 No.897942>>897955 >>897971

>>897870 (OP)

the names in pythong are consistent m8. i agree the duck typing is naive though

>worst programming language

languages are partially ordered and pretty much all of them are bottoms


 No.897946

>>897939

yes

(it's Windoze but PowerShell only really exists on it)


 No.897954

>>897940

>I'm just gonna call shit botnet despite no evidence and I am too lazy to actually go inspect the freely open code


 No.897955

>>897942

>pretty much all of them are bottoms

they all are


 No.897964>>897978

>>897870 (OP)

PHP is cute. CUTE.


 No.897971

>>897942

>pythong

I make this exact typo every time I type pythong.


 No.897978>>897997

>>897964

Until your local hackerman dumps your databases and you get charged with data protection lawsuits


 No.897997>>898042

>>897978

If you're collecting and storing private customer data at all you've already committed a crime against humanity.


 No.898016>>898023 >>898212

>>897888

>There are some inconsistencies, mostly because of backward incompatibility,

then what the fuck was Python 3 for


 No.898023>>898038

>>898016

Things that were worth losing compatibility for.

Nobody cares if it's spelled "int" instead of "Int".


 No.898038>>898047

>>898023

It's literally 99.9% print statements anyways.


 No.898042>>898043 >>898044

>>897997

Passwords are private user data. how are you supposed to sign in if the server doesnt have a hashed copy of your password?


 No.898043>>898051

>>898042

Why does your shitty botnet site require sign in?


 No.898044

>>898042

Don't have accounts


 No.898047>>898053

>>898038

you don't know jack shit about python


 No.898051

>>898043

because it's a shitty botnet site


 No.898053>>898055 >>898057

>>898047

I would be willing to learn python except for that fact that doing arithmetic requires a TCP connection to be opened when you use numbers larger than 53323


 No.898055

File (hide): cdfd92531e73220⋯.jpg (79.18 KB, 1200x732, 100:61, elm.jpg) (h) (u)

>>898053

You're thinking of Elm


 No.898057>>898063


 No.898063>>898066

>>898057

if only pythonfags were better developers they would notice the connection


 No.898066>>898069

>>898063

You're trolling me.


 No.898069>>898070

File (hide): 7ee4dd5eddd1ac8⋯.jpg (172.21 KB, 1024x1024, 1:1, Dae0bpmU8AAYhH1.jpg) (h) (u)

>>898066

ffs just test it yourself


 No.898070>>898072

File (hide): 3e480dcaba78bae⋯.jpg (216.06 KB, 943x1275, 943:1275, human female bait.jpg) (h) (u)

>>898069

It's obvious bullshit, it cannot be real.


 No.898072>>898073

>>898070

>lololol it can't be real no way my language is that shit


 No.898073>>898074

File (hide): 46311bec667ed3a⋯.jpg (102.94 KB, 700x700, 1:1, jews bait.jpg) (h) (u)

>>898072

>>my language

>implying I only know one of them

Are you 100% new to programming and a LARPer?


 No.898074>>898091

>>898073

Python programmers only ever know python, i'm sure you are actually the special snowflake exception tho.


 No.898091>>898097 >>898099

File (hide): 46c78a105de4690⋯.png (90.79 KB, 1398x768, 233:128, 46c78a105de469054097883a1a….png) (h) (u)

>>898074

Wow, even on /tech I rarely see so much bullshit so closely packed together in a few consecutive replies.

>the special snowflake

Are you trying to insult me? I've heard it's a swear word nowadays.


 No.898097>>898103

File (hide): 4ba5065217a92dd⋯.mp4 (421.82 KB, 240x240, 1:1, terminology.mp4) (h) (u) [play once] [loop]


 No.898099>>898103

>>898091

>>>/reddit/

>>>/4chan/

>>>/tumblr/

please leave python fag, come back once you finish highschool and have learned a real language


 No.898103>>898107

>>898097

5/10 somewhat funny

>>898099

factually incorrect


 No.898107>>898109

File (hide): 88abdaed621a3ea⋯.jpg (47.11 KB, 585x452, 585:452, DasMJ0IVwAAna5y.jpg) (h) (u)


 No.898109>>898114

>>898107

Which subreddits do you recommend, buddy?


 No.898114>>898118

>>898109

you have to go back


 No.898118>>898128

>>898114

I don't know where exactly is your "back". I just checked the landing page, if I got what website you are talking about, and it's full of shit.

Also stop bumping shit thread.


 No.898128

File (hide): 866004a4f739fa1⋯.png (722.01 KB, 1022x731, 1022:731, DUP8d06VMAAAaQo.png) (h) (u)

>>898118

python fags these days smh


 No.898212>>898223

>>898016

Python was juat an elaborate troll.


 No.898215>>898219 >>898452 >>898495

>>897875

This inspired me to write better descriptions of PL girls, and this is the most fun I've had in weeks.


 No.898219>>898452

>>898215

You better post results.


 No.898223>>898264 >>898266 >>898276

>>898212

We hear all about python 2 and 3 these days, but where is python 1?


 No.898242

>>897939

Windows limitation. You can get around it in PowerShell with some fuckery. Robocopy comes packaged with Windows and you can pipe it through PowerShell, no such character limitation there.


 No.898264>>898559

>>898223

It choked on a Perl regex and died.


 No.898266>>898276


 No.898276


 No.898452


 No.898495


 No.898510>>898515 >>898528 >>903181 >>904038

>>897870 (OP)

So which language would you recommend for AI? I love c++ but it's too time consuming and lacks the ai libraries of python


 No.898515

>>898510

Ignore the OP altogether. There are problems with Python but you won't find them there.


 No.898528

>>898510

LISP is what Stallman and co. would use in the AI labs at MIT.


 No.898559

File (hide): dc63559330b2149⋯.jpg (27.21 KB, 600x425, 24:17, perl-scripts-done.jpg) (h) (u)

>>898264

>It choked on a Perl regex and died.


 No.899180

>>897870 (OP)

For some reason there's a porn named "Python 2".

hxxps://www.pornhub.com/view_video.php?viewkey=ph5a9c174b75ce4

I guess that's roughly how bad it is to convert your code from 2 to 3?


 No.899731

>>897870 (OP)

Java and Ruby are cute. CUTE.


 No.903181>>903356

>>898510

Prolog or LISP


 No.903214

>>897870 (OP)

Python was going good until Guido decided not to make it homoiconic.


 No.903356>>903363 >>904038

>>903181

>Prolog

Fucking awesome language for AI and rule-based automation.


 No.903363>>903835 >>903972

>>903356

Which is why all the modern AI tools are written in c++ and python.


 No.903835>>903934

>>903363

We have a thread on this board of an anon who parses JSON with his homemade C library. People use the wrong tools for the job because its what they know.


 No.903934>>904020 >>905592

File (hide): e0789294214b51e⋯.png (83.35 KB, 260x260, 1:1, spurdo wall.png) (h) (u)

>>903835

What would be a better alternative for data serialization than JSON(that's what you're saying, right)? Curious because I am going to have to pick a format soon and I hear bad things about YAML(no idea if they're true).


 No.903972

>>903363

Well AI is starting to go the JS route... it only gets worse


 No.903999>>904020

>>897870 (OP)

>dat pic

>Java, Python, c#, scala = Aquarius

>perl = Sagittarius

>c++ = Libra

>ruby = Aries

>php = Gemini

>java script, action script = Virgo

>visual basic = Taurus

>R = Pisces

Is this accurate? Should I pick my programming language of choice base on zodiac signs?


 No.904020

>>903999

>Should I pick my programming language of choice base on zodiac signs?

only if you hate yourself

>>903934

protobuf, or Bencode if you want to be special

>hear bad things about YAML(no idea if they're true).

it's more complex, so you will make more errors if you do it yourself for some reason

and it only makes sense for data which should be human readable in serialized form, otherwise it's a waste of power and space, just like JSON.


 No.904038>>904041

File (hide): 1c7763b4a93b913⋯.jpg (353.62 KB, 1000x665, 200:133, 753aa526c88cb9730e058bb714….jpg) (h) (u)

>>898510

>>903356

anyone know miniKanren?

It's like prolog but purely relational; the DSL is very small.

I dunno shit about AI, so maybe read a book before asking the internet.


#lang racket

; stream routines

(define (lazy-flatmap p l)
(cond [(null? l)
'()]
[(pair? l)
(lazy-interleave (p (car l))
(lazy-flatmap p (cdr l)))]
[(procedure? l)
(lambda ()
(lazy-flatmap p (l)))]
[else
(error "invalid stream")]))

(define (lazy-interleave s t)
(cond [(null? s) t]
[(null? t) s]
[(pair? s)
(cons (car s) (lazy-interleave (cdr s) t))]
[(pair? t)
(cons (car t) (lazy-interleave s (cdr t)))]
[(and (procedure? s)
(procedure? t))
(lambda ()
(lazy-interleave (s) t))]
[else
(error "invalid stream")]))

(define (lazy-take l n)
(cond [(or (null? l)
(zero? n))
'()]
[(pair? l)
(cons (car l)
(lazy-take (cdr l) (- n 1)))]
[(procedure? l)
(lazy-take (l) n)]
[else
(error "invalid stream")]))

; variables and unification

(struct var ())

(define empty (make-immutable-hasheq))

(define (unify-subst x r)
(if (and (var? x)
(hash-has-key? r x))
(unify-subst (hash-ref r x) r)
x))

(define (unify-extend key val env)
(hash-set env key val))

(define (unify s t r)
(let ([s (unify-subst s r)]
[t (unify-subst t r)])
(cond [(equal? s t) r]
[(var? s) (unify-extend s t r)]
[(var? t) (unify-extend t s r)]
[(pair? s)
(and (pair? t)
(let ([r (unify (car s) (car t) r)])
(and r (unify (cdr s) (cdr t) r))))]
[else
#f])))

; kanren goal constructors

(define (pass r)
(list r))

(define (fail r)
'())

(define (== s t)
(lambda (r)
(let ([r (unify s t r)])
(if r (list r) '()))))

(define (conj g0 g1)
(lambda (r)
(lazy-flatmap g1 (g0 r))))

(define (disj g0 g1)
(lambda (r)
(lazy-interleave (g0 r) (g1 r))))

; instantiation

(define (free-var n)
(string->symbol
(format "._~a" n)))

(define (inst x r n)
(cond [(var? x)
(if (hash-has-key? r x)
(inst (hash-ref r x) r n)
(let ([sym (free-var n)])
(values sym (hash-set r x sym) (+ n 1))))]
[(pair? x)
(let*-values ([(s r n) (inst (car x) r n)]
[(t r n) (inst (cdr x) r n)])
(values (cons s t) r n))]
[else
(values x r n)]))

(define (instantiate x r)
(let-values ([(x r n)
(inst x r 0)])
x))

; kanren syntax

(define-syntax delay-goal
(syntax-rules ()
[(_ x) (lambda (r) (x r))]))

(define-syntax conj*
(syntax-rules ()
[(_) pass]
[(_ x)
(delay-goal x)]
[(_ x y ...)
(conj (delay-goal x)
(conj* y ...))]))

(define-syntax disj*
(syntax-rules ()
[(_) fail]
[(_ x)
(delay-goal x)]
[(_ x y ...)
(disj (delay-goal x)
(disj* y ...))]))

(define-syntax fresh
(syntax-rules ()
[(_ (v* ...) r* ...)
(let ([v* (var)] ...)
(conj* r* ...))]))

(define-syntax conde
(syntax-rules ()
[(_ [r** ...] ...)
(disj* (conj* r** ...) ...)]))

(define-syntax run
(syntax-rules ()
[(_ n (v* ...) r* ...)
(let ([v* (var)] ...)
(map (lambda (r)
(instantiate (list v* ...) r))
(lazy-take ((conj* r* ...) empty) n)))]))

(define-syntax run*
(syntax-rules ()
[(_ (v* ...) r* ...)
(run -1 (v* ...) r* ...)]))

; demo

(define (appendo x y o)
(conde [(== x '())
(== o y)]
[(fresh (s t v)
(== x (cons s t))
(== o (cons s v))
(appendo t y v))]))

(define (inserto x l o)
(fresh (lhs rhs tmp)
(appendo lhs rhs l)
(appendo lhs (list x) tmp)
(appendo tmp rhs o)))

(define (permo x o)
(conde [(== x '())
(== o '())]
[(fresh (s t p)
(== x (cons s t))
(permo t p)
(inserto s p o))]))

(run* (q) (permo '(a b c d) q))


 No.904041>>904043

>>904038

Don't mix up mini and micro kanren. They are not the same thing. One is wayyy smaller.


 No.904043

>>904041

ye I'm talking about microkanren mainly.


 No.904051>>904100

>>897870 (OP)

python is not worse than bbc basic


 No.904100>>905501

>>904051

I'd even take MBASIC or Palo Alto Tiny BASIC instead of Python tbh.


 No.905501>>905769

>>904100

when you aren't going to get a job, you can choose whatever you want without any consequences, indeed.


 No.905592>>905597

>>903934

>What would be a better alternative for data serialization than JSON(that's what you're saying, right)?

Nothing wrong with JSON (I recommend it, btw). My point was that he wrote his own parser in C, probably because he's familiar with string parsing in C and decided that was a good idea (it's not). Similarly, people use Python for AI because they're scientists and not engineers, and Python syntax is dead simple. Once that trend starts, its hard to reverse too, because then all the libraries are written in that language. It's a shame because languages which are a much better fit to the task at hand are not adopted and developer mindshare never reaches critical adoption mass.


 No.905597>>905598

>>905592

>My point was that he wrote his own parser in C, probably because he's familiar with string parsing in C and decided that was a good idea (it's not)

It's all bytes in the end, so why is C a poor choice? Too much work?


 No.905598>>905618

>>905597

this is not pozzoverflow, you aren't gonna troll us with your entry level question.


 No.905599>>905630 >>905635

fuck forced indentation is all I have to say on this topic

I will indent however the fuck I want! Freedom!


 No.905618

>>905598

>lazy programmers

Gotcha.


 No.905630>>905635

>>905599

Can you give an example of code written in C or a similarly-syntaxed language that's indented in a way that's not accepted by Python but not hot garbage?


 No.905632>>905645 >>905871

>>897870 (OP)

>Have you ever wondered what programming language is the worst one?

Java - design-by-committee is gay, type generics all fucked up, two ways to do exceptions

C++ - fucking templates, god forbid you need to debug a compiler error, basically C trying to be Java

Pythod - whitespace, other retarded idiosyncrasies

Ruby - too weaboo

PHP - favored by retards

C# - java done right, actually no major complaints

JavaScript - event-based but lacks any synchronization primitives = lol, single threaded execution, no type checking

Perl - write-only language, great tool for trolling other programmers/scripters

C - breddy gud for intended purpose, falls behind modern languages (not sure if good or bad)

VB - insanely utilitarian, not for real programmers tho

R - specialized for data analysis, good at what it does, not an all purpose language

Scala - relatively obscure, fewer resources available

shell - has its place, but doesn't scale well to larger programs

ActionScript - specialized version of javascript

For me it's a tossup between JS and Python for shittiest.


 No.905635>>905637 >>905638

>>905599

>>905630

>I will indent however the fuck I want! Freedom!

Folks getting extra creative with C and whitespace (or lack thereof): http://ioccc.org/years.html


 No.905637>>905638


 No.905638>>905639

>>905637

>>905635

>but not hot garbage

you forgot about that


 No.905639>>905640

>>905638

That shit requires talent and being at least in the middle on the autism spectrum


 No.905640>>905643

>>905639

Some hot garbage requires skill and dedication, but that just makes it impressive hot garbage.


 No.905643

>>905640

Ok I concede, Python is clearly a superior language.


 No.905645>>905647 >>905651

>>905632

I've been getting into PHP lately, and I have to ask - in what world is it better than Python?


 No.905647

>>905645

clearly in LARPer world


 No.905651>>905652

>>905645

PHP's original intent was embedding preprocessing directives into HTLM/XML sources - markup. Python's whitespace requirements would make that quite retarded.


 No.905652

>>905651

Sure, but people usually don't even do it that way in PHP any more. It's not a good way to do templating.

I'll agree that PHP is better than Python at being traditional PHP, I guess, but that's vacuous.


 No.905769>>905793 >>905868

>>905501

That's not what we're aguing about. We're talking about how much shit a language is, and Python really takes the cake.


 No.905793>>905869

>>905769

Can you elaborate?


 No.905868

>>905769

What I really hate is Linux niggers having to ship everything separately.

It only causes compatability problems and more prerequirements

Why should we care if anyone uses python if they just ship it in the same folder.

>Vampire Masquerade Blooslines

>vampire_python21.dll

>688KB


 No.905869>>905874

>>905793

Python was designed for pajeet-tier lamers who can't even handle Perl or Ruby. I've actually seen SJWs laud it for that reason alone. It's part of the dumbification and deskilling of the IT industry.


 No.905871>>905872

>>905632

>Java - design-by-committee is gay, type generics all fucked up, two ways to do exceptions

The worst part of Java is the philosophy of backwards compatibility. They could have easily fixed the problems of type erasure and checked exceptions in Java 9, since they already broke backwards compatibility in a number of ways, but they are too fucking retarded to catch up to C#.


 No.905872

>>905871

>philosophy of backwards compatibility

It's because Java is so buggy and huge they only wish for one installation to be present.


 No.905874>>905875 >>905883

>>905869

It's designed to be easy, to be sure, but that's fine. Do you want your languages to be deliberately obtuse? Writing correct programs is hard enough as it is.

I think it was designed more with non-programmer scientists and mathematicians in mind than other low-skilled programmers, though. It was started at a mathematical research institute and keeps getting things like matrix multiplication operators.

There can be tradeoffs between ease of use and overall quality, but it doesn't sound like you're even talking about that.


 No.905875>>905878

>>905874

>It's designed to be easy, to be sure, but that's fine. Do you want your languages to be deliberately obtuse?

Look programming actually is complicated. The languages that make things "easy" make it difficult to do anything complicated. You can get a GUI to pop up in 5 lines or whatever, but doing much more is gonna fucking suck. You see this in all the things designed for teaching especially. They make it really easy to do trivial things while hurting everything else.


 No.905878>>905898

>>905875

In which way is Python in particular bad at dealing with complexity?


 No.905883

>>905874

Writing correct code in a scripting language isn't hard. The IT industry managers hate the other languages because they don't enforce the "one way to do it" like Python does. They want everyone to be the same, identical and easily replaceable cogs, so they can fire you more easily and not fret about finding someone else.

Funny thing too, even MIT changed from Scheme to Python for their intro to CS class. And one of the old instructors basically admitted it wasn't for any valid reasons, except perhaps because of industry lobbying (someone got paid off in backroom deals).


 No.905885>>905887 >>905896 >>906541

>>897870 (OP)

What I dislike about python is its implicate typing.

If I remember correctly you can even retype variables while its executing.

I REEE every time I see someone do "var something = FunctionName()" in C#.


 No.905887>>905892

>>905885

Implicit****

God dammit.


 No.905892

>>905887

that's a retarded complaint, but Python 3 can do that too! it has optional type annotations and tools to statically check them.


 No.905896>>905899

>>905885

That's just regular old dynamic typing, same as in Javascript or Perl or a lot of Lisps or Ruby or Lua.

It has its downsides.


 No.905898>>905900

>>905878

Its impossible to actually hide implementation details in classes, dynamic typing, allowing global redefinitions from arbitrary parts of code, etc.


 No.905899>>905904

>>905896

dynamic typing ≠ implicit typing

typing can be static and implicit

learn the shit, please


 No.905900>>906186

>>905898

this is just "consenting adults" philosophy

as long as you stick to the rules and never do "hacks" except if there's no other way, this is not a problem at all


 No.905904>>905909

>>905899

Retyping variables during execution is dynamic typing.

Is there dynamic typing that's not implicit?


 No.905909>>905925

>>905904

yes, you can annotate it with the sum type of possible types

https://en.wikipedia.org/wiki/Tagged_union


 No.905919>>905921

Python - a less practically minded Perl with a boob job, and more highly strung attitude to match. She thinks she's more awesome than she really is because she has more weeb fans than Perl did. Changes her entire wardrobe often, yet complains when she looks for some of her old clothes and can't find them.

You needed to be educated at degree level or higher to date Perl, but Python will meet you as long as you promise to like her Facebook post and buy her coffee.


 No.905921>>906183

>>905919

who cares? in the end, it gets more work done and it is more maintainable, and everybody who does it likes it.

you can masturbate about Perl being more clever as much as you want but you're ignoring some important facts.


 No.905925

>>905909

I'd count that as static typing. I know Python/mypy does.


 No.906006>>906011

Serious question - why do people use scripting languages for anything other than just that? Why has Python become *the* language taught to beginners, even though Pascal is arguably easier to learn?


 No.906011>>906013 >>906183

>>906006

>he fell for the "pascal is good for beginners" meme

holy shit


 No.906013

>>906011

I got it down pat within two days, coming from a C background. What makes you think a beginner would struggle with it? If I remember correctly, it was designed to be taught.


 No.906022>>906023 >>906029 >>906053 >>906183

I have a theory about programming languages:

The amount of bitching about languages is inversely proportional to the amount of code written by that person.

At least it holds in the sense that time spent bitchin can't be used coding.


 No.906023>>906027

>>906022

>literal chinese spy


 No.906027

>>906023

>Thinks every foreigner is a spy

Most likely from USA


 No.906029

>>906022

People just need to attach themselves to something. And they will fight over their favorite (or most hated) languages like they would about sports teams for example.


 No.906053

>>906022

It's more like a U shape. Nocodez bitch because they have oppinions and don't realize they're wrong. 20 year programming autists bitch they realize everything sucks but it's like screaming into the void because no one else believes them.


 No.906183>>906187

>>905921

You can do most things in COBOL and Java too, so Python didn't even need to exist.

>>906011

Pascal will give beginner a better foundation in programming than meme Python.

>>906022

Your theory is shit. More likely people that never programmed or only have a shallow exposure to currently popular languages will bitch less because they don't realize there are other options that would make more sense in many cases. I noticed a bunch of Linux users are pissed at the UNIX Hater guy, because probably they just grew up on Linux and accept it as the second coming. Well fuck that, it's absolute shit, complete fucking garbage. But they don't know any better, since they've never seen anything but Linux and Windows. Without perspective, it's easy to be fooled like that. So it is with shit languages like Python.


 No.906186>>906236 >>906240

>>905900

>this is not a problem at all

Fine for trivial software, endless bugs for non trivial. If a languages allows you to fuck up in a way, it will happen. C fags say the same shit. "Oh, its a okay if we do raw memory operations for every trivial thing we want to do, if you fuck it up you must be retarded". Fuck you idiots and your footguns.


 No.906187>>906191

>>906183

>Well fuck that, it's absolute shit, complete fucking garbage.

Its because there is no actual alternative. If the Unix hater fags actually had a system maybe we would use it. But they don't. They just bitch about the past.


 No.906191>>906193

>>906187

It's harder today to make a viable alternative, since the commodity hardware is stupidly overcomplicated and full of insane, broken subsystems like ACPI and USB.


 No.906193>>906195

>>906191

Bitch and moan while providing nothing. Come back when you actually have a system.


 No.906195>>906199 >>906237

File (hide): b9ceaa32039ee28⋯.png (466.37 KB, 548x534, 274:267, terry smoke.png) (h) (u)

>>906193

Oh I have a few. None that you'd actually use though, because if it can't run firefox then you'll just dismiss it as useless. Fucking cianiggers and normies, sitting in a tree, K-I-S-S-I-N-G. First comes love, then comes marriage, then comes babies and the baby carriage!


 No.906199>>906202

>>906195

Trivial systems that cant fulfill trivially needed features. NICE!


 No.906202>>906221

>>906199

translation: your botnet implementation is weak, needs lots of work before we can leverage it to any significant degree


 No.906221

>>906202

Bitch and moan


 No.906236>>906244

>>906186

That's like wanting Legos to refuse to stick when not according to a manual.

The really big problem is that you're naively comparing C and Rust when Rust isn't mean to be a C replacement. It's obviously made to replace C++, as it's a fat language compared to C; you'll never see something like TCC for Rust.


 No.906237

>>906195

smoking is like sucking dick, but worse.


 No.906240>>906243

>>906186

except Python is not a footgun, it's clearly obvious when you are doing questionable shit and when you aren't.

even if you are, there's still no UB.

even ordinary code reviews or static checking can be used to set boundaries of what you're allowed to do if you need that.

I dunno if you ever wrote anything of size&value in C and Python, if you had you would know that what you wrote is horse shit.


 No.906243>>906247

>>906240

>anything of size&value in C and Python

You're right! I'm sure your an expert. If there is one thing C and Python are known for, its not having program breaking runtime errors. This is the opinion of the experts, the professionals, than C and Python have no issues with trivial preventable bugs that cause massive issues.


 No.906244

>>906236

>The really big problem is that you're naively comparing C and Rust

Lol all these assumptions. I'm not a Rust fag, I don't want to use Rust. That does not make C good though.

>as it's a fat language compared to C

If that means thousands of trivial memory errors are prevented sounds good to me.


 No.906247>>906248

>>906243

learn to read.

C obviously has these issues.

and you tried to tell me that Python is no different, and that is bullshit.


 No.906248>>906252

>>906247

Python does not have you manipulating raw memory for every trivially operation thats a step up for user.

>it's clearly obvious when you are doing questionable shit and when you aren't.

Except arbitrary parts of the program can do all those footgun things and if your application is non trivial you cant do shit about it.


 No.906252>>906255

>>906248

>Except arbitrary parts of the program can do all those footgun things

that's not normally the case.

this is bad style.

and writing intentionally shit code is possible in any language.


 No.906255

>>906252

ITS ALWAYS BAD STYLE. IN EVERY LANGUAGE AN ERROR IS BAD STYLE. ITS ALWAYS PREVENTABLE. THAT DOES NOT MAKE THESE THINGS EQUAL.


 No.906270>>906293 >>906364

Python does make more of an effort than C to make dangerous code clearly identifiable as such. You'd usually either be accessing names with leading underscores or using modules and functions that don't have a use outside of weird metaprogramming. You can get reasonable guarantees just by staying away from certain features, whereas C footguns are usually hidden in features that do have boring uses.


 No.906293>>906354

>>906270

C is a very low bar for footguns


 No.906354>>906358

>>906293

True, but it's the bar that was explicitly set in this discussion, so it's the one I used in that post.

I think it's good for languages that are as dynamic as Python to exist, and Python handles the dangers well given that it's that dynamic in the first place.


 No.906358

>>906354

>t's the bar that was explicitly set in this discussion

It is not the bar. C was given as an example of another language that is also shit.


 No.906364

>>906270

>danger

LARPer detected


 No.906505

Python is like PHP but taken seriously for some weird reason.


 No.906541

>>905885


var something = fn();

is valid syntax for well typed programs.

latent typing isn't inherently bad, but duck typing is.

https://learnxinyminutes.com/docs/standard-ml/


 No.906547>>906550 >>906591

I honestly don't get why dynamic typing is so popular. I get more mental load wondering what type things are and if they'll stay that type than deciding what the type should be up front, and a lot of errors get moved to runtime where they're harder to catch. Reading code is also harder. I've never written anything significant in a dynamic language so I'm not trashing it here, I just don't get it.


 No.906550>>906559

>>906547

dynamic typing is okay if you're coming from LISP.


 No.906559>>906564

>>906550

Lisps don't usually have type coercion so the damage is not as bad.


 No.906564>>906577

>>906559

Python has it only in a few places and it's very precisely defined. Absurd shit like the type depending on values is also not possible (unlike javascript).


 No.906577

>>906564

We will always have that. Its not javascript. :^)


 No.906591>>906603 >>906660

File (hide): 4b1d526e6e7fc1f⋯.png (72.45 KB, 1447x747, 1447:747, dynamictype.png) (h) (u)

>>906547

>I get more mental load wondering what type things are and if they'll stay that type than deciding what the type should be up front, and a lot of errors get moved to runtime where they're harder to catch.

You're mixing up dynamic typing with weak typing. In a well designed language, this shouldn't be a problem.


 No.906603

>>906591

>You're mixing up dynamic typing with weak typing. In a well designed language, this shouldn't be a problem.

Nothing he said indicates mixing up weak and dynamic typing.


 No.906660

>>906591

No, I was mixing up with type coercion. I realize that can be just as much a problem in static systems.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
170 replies | 15 images | Page ???
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / apu / asatru / baphomet / bmw / hechizo / hisrol / imouto / yga ][ watchlist ]