[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
ITT: Pleb Languages
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 149
Thread images: 5
File: python.jpg (46 KB, 680x459) Image search: [Google]
python.jpg
46 KB, 680x459
Can a language possibly be any more /reddit/ than pic related?
>>
>>51270028
If Python is reddit, then 4chan is C. Because it's a dying meme.
>>
>>51270028
Reddit was written in Common Lisp for the first couple of years, so it'd have to be that.
>>
Tried python for the first time the other day to do some sqlite stuff.

Fell in love.

Had been doing java, javascript and some other stuff before that.
>>
>>51270114
4chan is perl or php. C is useful.
>>
>>51270244
4chan is mysql connection error
>>
File: :^).jpg (52 KB, 1024x1024) Image search: [Google]
:^).jpg
52 KB, 1024x1024
>forced whitespace
>>
>>51270028
JavaScript

> babby's first script
>>
>>51270028
Stop confusing Reddit with something legitimately good
>>
What language to learn as first? Was learning python, but switched to Java because i thought making android apps would keep me learning.
>>
>>51270282
>disgusting mixture of semicolons, overloaded operators and inconsistent requirements for curly braces and parentheses
>>
>>51270028
Python is the Swiss army knife of the programming languages. Now get back to desktop threads you incompetent piece of shit.
>>
I'm too dumb to use Python, so it's a Reddit-tier language.
>>
>>51270382
>swiss army knife
>0 functions
wat?
>>
I feel like Python is very similar to PHP except that it has even more simple syntax.

More likely that PHP became more like Python over time than the other way around though.
>>
>>51270404
>python
>0 functions

I'm non-ironically interested in what you mean. You can say a lot of bad things about python, but to say that it has no functions? It makes no sense literally, it makes n no sense figuratively.
>>
>>51270028
Sure senpai, keep using Java
>>
>>51270244
both PHP and perl are useful, just really ugly and uncomfortable to use
>>
>>51270442
>functional programming

>lambdas
Can't even include conditionals, and don't support the same syntax as the rest of the language at all.
>tco
NOPE
>native higher-order facilities
Almost none (map, apply, reduce, that's it I think).

>OOP

>referential scheme
explicit
>access to base class
explicit, including describing your own class, doesn't work with multiple inheritance correctly.
>access control
Nope!
>interface support
Nope!
>abstract declarations support
Not in the useful sense.

>procedural

>control flow
Clobbers variables in the enclosing scope. Also very slow, including compared to list comprehension.
>global variables
Require explicit access to modify, but not to read the value of. Moreover, the same syntax is used for initialization and setting.

>scripting

Statements outside function bodies run very slowly compared to those inside functions.
Very slow language even for a scripting language.
Hard to copy-paste code because of muh whitespace.
Almost no debugging at parse-time.
Little to no support for platform-agnostic operations like file operations.

>application development

Extremely slow.
Most errors at runtime only.
No static typing option.
GIL, meaning no parallelism.
Refcount GC (slow as balls).

So in short, it's incapable of working no matter what your setting is.
>>
>>51270716
So, you're point is, It can do everything, but nothing really well. Isn't that also a use?
>>
Can someone explain lambda in layman?
>>
>>51270759
It can do functional programming worse than C++, scripting worse than C++ (CINT), compiled worse than ruby, and procedural worse than haskell. There's a difference between being able to do everything but not well, and being python. If you want to argue that python can do everything even though nothing really well, you might as well argue that malboge can do everything but nothing really well.
>>
>>51270576
php is awful. it's useful in the same way that a broken knife is still useful as a knife.
>>
>>51270784
And remember kids, don't drop out of middleschool!
>>
>>51270129
But now it's written in python...
>>
>>51270817
The thing is that in my country I think we call it diffrerently so I am not sure of which is which.
>>
>no read-only variables
into the trash it goes
>>
>>51270784
https://stackoverflow.com/questions/890128/why-python-lambdas-are-useful
>>
>>51270865
It's the one before highchool
>>
>>51270716
lamdas absolutely can include conditionals you silly cunt. have you ever written anything past hello world in python?
>>
>>51270784
It's a trick for old programmers to obscure errors in their code from discovery & fixing by having the function be nameless and giving you nothing to work with from traceback. This forces the company to keep them on the payroll til retirement.
>>
>>51270961
My god thats genius. They actually were bosses of themselves.
>>
>>51270958
>mfw pythonfags literally don't know their own language
>>
>>51270961
You can only pass nameless functions for lambdas? The fuck?

> doesn't python much
>>
>>51271017
>implying anyone knows every feature of any language they didn't personally design and implement.
>>
>>51270028
Eh you're a pleb if you think Python is a pleb language. I definitely think there's a limit to where Python should be used, but overall it's pretty strong for scripting purposes.

I'd call NodeJS a pleb "language" personally. Trying to reinvent what Python has already achieved many times over for no good reason (performance, ease of use, clarity are all fairly equivalent to Python+PyPy).
>>
>>51271017
f = lambda x:'fizz' if x%3==0 else x


you can also effectively put in for loops using list or dict comprehensions.
>>
>>51271096
speaking of pypy, what do you think about pypy-stm?
>>
>>51270319
I think Pascal is a great programming language for learning programming logic. It has no use nowadays though, so you'll learn how to program but won't use it for any other thing ever. C is a good language too but it has some confusing things for beginners for having some low-level stuff.
>>
>>51271100
>mfw he's serious
>>
>>51271173
I take it that 0 effort response is you admitting that you were wrong.
>>
>>51271100
you can make it tighter.
f = lambda x:'fizz'*(x%3==0) or x
# or if you want to confuse people even further...
f = lambda x:'fizz'*(not x%3) or x
>>
>>51270716
Have you actually tried using the language?
>>
>>51270576
Perl is super comfortable to use as long as you don't have to read anyone else's code.

PHP is fucking worthless.
>>
>>51271100
f = lambda x: 'FizzBuzz' if x%3==0 and x%5==0 else 'fizz' if x%3==0 else 'buzz' if x%5==0 else x
>>
>>51271302
PHP's value is that it's everywhere. It's a testament to how irrelevant functional qualities are when determining an optimal stack.

10 years ago if you wanted to get started with a small website that used server side language stuff, your options almost certainly started and ended with PHP. Even now if you're not savvy enough to get going with heroku or aws or something, you're probably stuck with PHP. Things are getting better, but we're not out of the woods yet.

PHP has marketshare, and by sheer marketshare they'll continue to coast for years - maybe decades - without *really* needing to change or improve. (although I hear a lot of effort is being put into making PHP less bad; it might work, too, but PHP at the end of that process won't look anything like PHP looked in 2010 or even 2015).
>>
>>51271337
f = lambda i: ['FizzBuzz' if x%3==0 and x%5==0 else 'fizz' if x%3==0 else 'buzz' if x%5==0 else x for x in i]

fixed that for you senpai
>>
>>51271337
f = lambda x:'fizz'*(x%3==0)+'buzz'*(x%5==0) or x
>>
>>51271358
You aren't wrong, but marketshare doesn't make me hate it any less.

Microsoft has marketshare too.
>>
>>51271397
baka
f = lambda x: "FizzBuzz"[x*x%3*4:8--x**4%5] or x
>>
>>51271408
I like this one
>>
>>51271118
Still doesn't seem to be very mature. I've tried it out and it's worked fine but I based on the number of bug reports I've heard from friends I'm not really looking to use it in my projects just yet. It'll be great once it's a little more stable.
>>
>>51271401
Just to be clear, I totally agree with you. I hate PHP with an intense, glowing passion. I just want to clarify that PHP is popular because it works on virtually every server stack out there. It's important to study and learn from projects and topics we hate - as abortive and disgusting as they are - because they can help inform us about making better steps in the future.

This is kind of like studying suicide cults. I'm not advocating that we go join one, but it's (at least academically, probably practically) interesting and useful to learn how such a group can come to exist and "succeed" (in whatever sense that means).
>>
>>51270854
That's probably why it goes down all the time even though they have almost one thousand application servers. Fucking Google search has far more traffic and doesn't need as many servers.
>>
Most of my research, if/when it becomes code, is done in Python. Because that's what other researchers in the field use and it's easily good enough. Anyone who claims Python is bad is just being a pretentious ass or a shitty troll.
>>
i=0
while 1:i+=1;print"".join("BzuzzizF"[::2*j]for j in(-1,1)if 1>i%(4+j))or i
>>
>>51271487
what field?
>>
>>51271527
PETs, so basically "applied" cryptography (even though 9 times out of 10 we don't actually build anything usable, it is research after all).
>>
>>51271527
I'm not him but many fields that routinely deal with data (chemistry, biology, some math fields are examples, but there are many more) tend to use Python. It's simple enough to work with for one-off tasks, doesn't really matter if a calculation takes a day instead of an hour if it took you an hour to write the code instead of 2 hours.
>>
>>51271527
not him, but I'm in CS and my research has me using Python about 30-50% of the time.
>>
>>51271546
neat

>>51271567
ye I know, I do nat lang processing stuff. Even if it takes forever to train an algorithm on a bigass dataset it can be written in an hour and run while I'm in class/eating/whatever.
>>
>>51270319
Y u no QPython?
>>
>>51271527
A lot of data science fields use Python since most of the stuff they write is just throw away code. If it's something that turns out to be useful and needs to be regularly rerun it's usually rewritten in C++ or Java later.
>>
>>51271267
>>51271203
>>51271100
>>51270958
>>51270442

How much does guido pay you for these posts?
>>
I really like getting a lot of shit done in short time in python, it's my goto language for web dev.
Mainly I use C# though.
>>
>>51271739
Just learn C# a bit more and you'll be able to use C# just as productively for web development. On top of that response time, server requirements and number of bugs will be an order of magnitude less.
>>
Python is great
>>
>>51271888
There's no way C# can give you as much "get up and go" as Python gives. If you need performance, you'd best know C/C#/C++, but if you're just writing a script to download images from a given 4chan thread or whatever, there's just no way that anything C# has could make it more compelling than a quickly-written script in Python using requests and whatnot.
>>
>>51271888
>Just as productively
>productively
>Windows Server
HAHAHAHAHAHA
>>
>>51271913
I used to think that, but there's really nothing that Python gives you that makes it better than C# for anything. Dynamic typing is objectively retarded too and the only people that still like it are blatant idiots.
>>
>>51270282
>syntax enforces readable code
>this is somehow a bad thing
>>
>>51271936
You might have a point if Python deployment wasn't a complete mess.
>>
>>51271959
Like I said, you might be more familiar with C#, but I find it hard to believe that with even the same order of magnitude of time spent learning both you would be able to write up a C# program to do simple "glue" tasks the way you could with Python.

Trying to wedge a language like C# into the role of that interstitial glue is a disservice to C#. Let a language be what it's good for and stop trying to make it more than it is.
>>
>>51270114
>dying meme
C is god tier and anyone I can almost gurantee that anyone who doesn't like is shit at it.
If you're not writing C at the level of
while (*(++c) != '\0');

then you have no write to criticise it.

- C internet defence force blue leader
>>
>>51271999
>Let a language be what it's good for
Python isn't good for anything though. It's just one buggy, slow disaster after another.
>>
>>51271975
nuitka file.py
>>
>>51270028
>disputes marketshare with fortran and c in scientific environments thanks to ease of use, numpy/scipy and now pypy
>pleb
go back to meme languages op
>>
>>51272014
Don't be such a fag.

MIT and Cal Berkeley both use it as their CS 101 language. It's not perfect but it has value.
>>
>>51270800
I don't understand, are you attempting to say that C++ is a good language? Because if so, I can only laugh. Shit's broke be design.
>>
>>51270028
Reddit was written in Python, but it's closer to Rust culturally.
>>
so we know python is slow but it gets the job done. What's next for someone who's only written Python? Writing C code?
>>
>>51272014
>Python isn't good for anything though
You might argue that Python is less efficient than most other languages for those tasks - both in computational resources (which I would vacuously agree with) AND in human-time (which I wouldn't agree with but I'll grant you for this one hypothetical). The problem with this premise is that you still need to explain why so many people in so many fields have adopted Python and use it as they do.

I'd like to accept your point of view as a simple difference of opinion, but you assert a claim that forces itself into conflict with the evidence we have around us, and you offer no way to rationalize Python's evident popularity except with contrived reasoning that even *further* violates simple logical principles like Occam's razor.

I can go only so far with you down this reasoning before it becomes tenuous at best. The simplest explanation for your absolute view of Python (especially given that it goes against the grain of the evidence at hand) is that you're a zealot for C# and you don't feel comfortable ceding that *any* language is better than your pet in any measurable way. This is a naive way of thinking about programming and PLs, and you're going to embarrass yourself spouting it to people (your saving grace here is that you're anonymous).
>>
>>51272112
It depends on what you want to do. People on /g/ advocate Python+C because they don't know what you're interested in.

It's hard to imagine a person in CS who has no place for Python (maybe you can force yourself to pretend Python has no value, but that would be a mistake).

You have Python under your belt. Do you want to do data analysis? Web development? Systems stuff? There are lots of acceptable directions you could take, but they each call for different languages and skills.
>>
>>51272089
>basing your entire perception on the "culture" by some stupid CoC message

just don't be a complete dingus, and you'll be fine. the language itself is good. you don't have to care about or even interact with the community. that's just something they posted to keep SJWs at github from spamming their readme files and discussions
>>
>>51272112
Python has strong fannout.

You can move to C, OOP or functional and equally feel like you're building on what you've learned.

Pick a project and fascinates you and choose the language that best fits. You've already got the foundation.
>>
>>51272124
>literally "millions of flies can't be wrong!": the post
>>
>>51272182
That's so wrong that it physically hurts just to read.
>>
>>51272124
>you're a zealot for C#
I don't care about C# in particular much. You could replace C# with almost any other modern statically typed language.
>>
>>51272167
>People on /g/ advocate Python+C
How to spot the paid shill.jpg
>>
>>51272264
It's really fascinating how a mental disorder like autism makes everyday stimuli like reading text cause physical pain
>>
>>51272247
If you can't think of people as people, you're probably not in a good position to think deeply about their motivation, thought process, etc...

If you fancy yourself "above average", you're probably not.
>>
What the fuck is wrong with you shits?
Yes, python has issues.
So does literally every other programming language.
Nothing is perfect.
Python is a nice general purpose/scripting/glue language.
>>
>>51272343
These are zealots. They can't be reasoned with. You can placate them, give them a wide berth, and ignore them, but they're basically trolls who believe their nonsense.
>>
Common Lisp does everything python does but better
>le lisp meme
>>
>>51270272

4chan is a GPU without SECDED.
>>
>>51272343
But it's not. C++ is a nice general purpose/scripting/glue language.
Racket is a nice general purpose/scripting/glue language.
Dylan is a nice general purpose/scripting/glue language.
Python is an awful everything. It's not nice at anything. It's not even decent at anything. It's just plain awful.
>>
>>51272621
>t. retard
>>
>>51272361
t. not-guido :^)
>>
>>51272621
>C++ is a scripting language

Give me a minute while I compile my script here...
>>
>>51272621
>C++ is a nice general purpose/scripting/glue language.
>>>/trash/
>>>/out/
at least be subtle
>>
python is good for learning the basic concepts of programming but you cant stay on it or u will be a pleb

move on to a language more advanced after you get the basic of what programming is with python
>>
>>51272650
>shitposter
>subtle
Hate to break it to you, but that's a bit beyond them.
>>
>>51272644
>what is CINT
>>
>>51272644
>Python is a general purpose language

Gime me an hour while I start my UI here...
>>
>>51271358
God I cant wait for all the amateur mistakes I made in my web pages to come crawling back out of my ass when they update the next round of PHP.
>>
>2015
>not learning COBOL
>not being a highly paid mainframe admin
>working for a meme instead of a captain of industry
>>
>>51273281
Your lack of skill doesn't make PHP bad
>>
>>51273374

>Inconsistent syntax
>no type casting
>weak errors / warnings
>redundant functions
>demands literal comparisons

Yeah, you're right, all me.
>>
>>51273480
At least it's not python.
>>
>>51273480
Ok, so that stuff has nothing to do with your other post. Cool? I guess?
>>
>>51273508
Php is utterly disgusting to work with but it performs better than python.

That said, python is way more maintainable and easier to work with.

PHP just looks plain retarded compared to Python's native libraries.
>>
>>51273508
hahahahaahahahahah
>>
>>51273537
I never gave context on what my errors were, nigger, so your statement has nothing to do with it, either.

>implying
>>
>>51270438
They're completely unrelated you dolt
>>
>>51273593
I don't python much, that's just my take
:^)
>>
>>51273544
> maintainable
> dynamically typed
It's all the same shit.
>>
>>51270438
Python was first
php was second.
>>
>>51271149
this, use Lazarus, its a godlike pascal IDE, you can make some cool programs very fast with it while learning. Pascal has all the low level stuff you need to know about. You cant learn shit in Python except python.
>>
>>51270028
I wrote the code for my masters in Python, which involved doing real time sound processing.

For research purposes, it allows me to develop from mathematical first principles without getting too bogged down in getting it to work. And as such it runs *fast enough*.
>>
>>51270282
>unforced whitespace

why do people use whitespace when they don't have to?
>>
>>51270716
>people seriously take advice from a board with these types of posters
>>
>>51272013
fuck is it bad that I understand this
>>
File: image.jpg (56 KB, 640x609) Image search: [Google]
image.jpg
56 KB, 640x609
>>51272621
>c++
>scripting language
>>
>>51270028
>prototype the calculation in python
>this works
>slow as shit
>make the intensive stuff in C/C++
>glue it all together with python
>get results

I love python+C/C++.
>>
>>51271960
>he doesn't know about auto-refactoring
Might as well quit programming and kill yourself right now.
>>
>>51275235
this
there's no reason the language syntax should enforce structure. what if i actually want to do a long one-liner?
>>
what do you guys think of Ruby compared to PHP?
>>
official ratin/g/ list:

python is not bad
ruby is okay
perl is not as bad as people say
tcl is good
lisp is ok
scheme is good
c is good
c++ is okay
d is dead
scala is not great
java is okay
c# is better than java
rust is weird and painful
go is meme
Don't ever touch these {
javascript is shit
php is bad
visualbasic is brain damage
cobol is pain
}
brainfuck was funny once
haskell is not bad
f# is better than haskell
ada is too verbose but otherwise not too shabby
mips assembly is the best asm
arm is a less perfect copy of mips
x86 is considered harmful
x64 is not bad (ty amd for the new registers)

if i forgot your language im sorry
>>
>>51275269
>what if i actually want to do a long one-liner?
Just kill yourself?
>>
>>51270028
Hold up wait a minute! Are you legitimately associating a programming language with a website. It's a fucking tool for christ sake.

So what's the most reddit cooking utensil /g/?
>>
>>51275433
spork


you know why
>>
>>51272013
using this
>>
>>51275363
COBOL is easy though
>>
>>51275461
>>51275433
What's the most reddit power tool?
>>
>>51275479
so is shooting yourself in the leg
easy but pain
>>
>>51270163
Me too, I thought I'd hate it but I love it. So.... To the point... Or something
>>
>>51271960
>language tries to force programmers to write readable code
It's a lost cause
>>
>>51270244
>perl isn't useful
>>
>>51271619
>java
that's the definition of code that gets thrown away
>>
>>51272013
heh some fag just made a thread out of this code
>>51277021
>>
>>51270282
>literally unironically arguing about syntax
>>
ITT: anything I don't use
>>
>>51271690
Stay mad pleb
>>
>>51276928
There is a massive website that is pretty much entirely perl that you probably use
>>
>>51270282
>dynamically typed languages
>ever
>>
ITT: i have too much time in my hands to bitch about languages
>>
>>51280198
>butbut Python 3.5 has typehints now! It's like static typing!... Except it isn't enforced... at all... has no meaning... but it's there! We no longer have to abuse docblocks! Yeaaah, go Python!
>>
>>51280482
if you ever go into a /dpt/ it's literally this all the time 24/7

usually it's pretty well contained
Thread replies: 149
Thread images: 5

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.