[ / / / / / / / / / / / / / ] [ dir / abdl / cafechan / doomer / fa / mai / tenda / tingles / wmafsex ][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.
Email
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): a9d38f2b3e9bb28⋯.jpeg (23.29 KB, 617x238, 617:238, images (1).jpeg) (h) (u)

[–]

 No.1011725>>1011748 >>1011764 >>1011832 >>1013040 [Watch Thread][Show All Posts]

Which is the best?

 No.1011727>>1011844 >>1011868

These languages are for very different purposes, so none are better than any other.


 No.1011729>>1011740 >>1011748 >>1011859 >>1011868 >>1011873 >>1013033

Hammer vs screwdriver vs wrench: which is best?


 No.1011740>>1011880 >>1013166 >>1018326

>>1011729

hammer, you can use it to make a screwdriver or wrench if you need to


 No.1011748>>1011764 >>1011769 >>1011831 >>1011844 >>1012015

>>1011729

>implying

it'll be a few hundred years before programming language design will evolve to the point you can legitimately compare its NIH warped wooden tools against modern hand tools.

>>1011725 (OP)

>Python vs php vs ruby

<python

utter shite of a language, designed by idiots. Nothing resembles anything else. Everything is ugly in its own way. Spend your days searching nests of OO code for where shit actually happens; spend days staring at code that resembles a solid featureless wall more than anything else. Get glasses. Get a backend job translating terribly-written Perl into terribly-written Python by an employer who hasn't figured it out that people, not languages, are injecting all the terrible into the code. Occasionally write something in Python and then write it in a real language for performance reasons, while pretending that you were "just prototyping" ha ha. There's a tiny core of actual research, which Python draws nothing at all from anymore, but people pretend that this matters. Although it's not that readable and not that easy to learn, the meme alone has summoned so many introductory books that if fucking one of them will work.

<php

get paid.

make money.

your code gets actually used by millions of people.

your stupid errors are responsible for an entire company going under.

the language itself is designed by Kafka (absurdity) rather than Guido (idiocy). You will spontaneously cry sometimes, but you'll actually have a better time with it than you would with Python.

<ruby

it's not that bad, but the hype has already moved on to JavaScript. Unless you're wanting to write sysadmin code, just learn that language instead.


 No.1011749

If I had to choose between those three, I'd go with Python, because of Django. Rails is dying and so is PHP, aside from legacy shit. But aside from Django, Node is good to get into. I know a lot of people here would dislike it because it's

>JavaScript on the backend

But it's really not that bad.


 No.1011764>>1011765

>>1011725 (OP)

>""scripting"" languages

what about Ocaml or Lua?

>>1011748

Python has so many libraries and so much support, it's a wealth of usefulness. I hate it as much as you do, but I know it (well enough) for this reason. I began learning it for beautifulsoup alone but there's so many more "killer libraries". If OP is really going to decide between these languages, for no clear reason other than recreation, I would recommend Python, easily, hands down.


 No.1011765

>>1011764

>scripting langs

and don't forget guile ;)


 No.1011769

>>1011748

I thought Python is good, because it is shilled as such

It can't be worse than PHP, which is shitest major language


 No.1011809

File (hide): 368e7cc549aeb75⋯.jpg (70.9 KB, 578x895, 578:895, Ruby.jpg) (h) (u)

Ruby is the only sane choice here, faggots.


 No.1011831

>>1011748

PHP is much more flaky than Pythong mate


 No.1011832>>1012035

>>1011725 (OP)

>php

Money

>Ruby.

A well-designed language designed around a bad-design paradigm.

>python

Dead.


 No.1011844>>1012009

>>1011727

python can replace both of the others easily though

>>1011748

>utter shite of a language, designed by idiots. Nothing resembles anything else. Everything is ugly in its own way.

why so assblasted?

a python programmer rejected you or something?


 No.1011859

>>1011729

> falling for "muh use cases" meme


 No.1011868

>>1011727

>>1011729

Don't pretend like PHP has a legitimate reason for existing. It's objectively terrible; even worse than server-side JavaScript.


 No.1011873


 No.1011880

>>1011740

You can chisel a hammer with a screwdriver

wrenches suck


 No.1011882

Honestly, I choose TCL.


 No.1011992

PHP is a very bad language. It used to be extremely bad, now it's merely very bad. Far too many of its flaws are just design errors, not even tradeoffs. Only use it if you have to. PHP codebases are not always worth rewriting.

Python is pretty good. Sometimes a bit too dynamic for its own good, but that's partly offset by a norm of idiomatic, "pythonic" code. Most importantly, it's very versatile. You will be able to use it for a lot of different things and still have a lot of libraries and existing code and documentation to help you. That makes it worth learning for most programmers, even people who mainly use other languages.

I haven't used Ruby.

Your question is bad because you're not specifying a use case.


 No.1012009

>>1011844

a commonly accepted truth you can say in passing.

a commonly rejected truth you must say with force.


 No.1012011

File (hide): 1b22af5142de571⋯.gif (1.83 MB, 425x230, 85:46, shooting-uzi-loop.gif) (h) (u)

I love PHP. It empowers me and my gaymur grrrl friends to write badass CODE! And games about my vagina. U mad bois?


 No.1012015>>1012022 >>1012107 >>1012133 >>1012997 >>1013054

>>1011748

>seeing if an item is in an array

Python:


if item in items:
#proceed

C:


//doesn't even have built-in Boolean types
int range = sizeof(items)/sizeof(items[0]);
int proceed = 0;
for(int i = 0; i<range;++i){
if(item == items[i]){
proceed = 1;
}
}
if(proceed==1){
#do stuff
}

Python will take extra fractions of a second to compile but will save you a lot more time when considering the time it takes to type.


 No.1012022

>>1012015

>C

>//doesn't even have built-in Boolean types

What is _Bool?


static int int_cmp(const void *a, const void *b)
{
return *(int *)a != *(int *)b;
}

if(lfind(&item, items, &nb_items, int_cmp))
//proceed

Looks nice enough if you put that function into a misc.c file (yeah, lambdas and real genericity would make it way better). See also bsearch(3), tsearch(3) and hsearch(3) for more generic data structures.


 No.1012035

>>1011832

>>python

>Dead.

Ok Eric


 No.1012107

>>1012015

>X is better than C lol

so's Forth. C is a really easy target.

It's not the 90s any more though; you must now show that your shitty scripting language is better than Nim.


 No.1012133>>1012369

>>1012015

>python

>compile

While python compiler exist, the language itself was never meant to be compiled and doing so is just a hacky solution to a problem that doesn't exist.


 No.1012369

>>1012133

In this case they must have meant "run", not "compile", but more generally, it's fair to say that Python is compiled to bytecode at runtime (in the case of the reference implementation).


 No.1012372

Ruby for webdev, Python for simple tools, PHP for masochism.


 No.1012381>>1013250

>pajeet lang vs pajeet lang vs pajeet lang

None


 No.1012997>>1013068

>>1012015

>this nigger doesn't know about stdbool.h


 No.1013033

File (hide): 631450c2d4dcf59⋯.jpg (24.52 KB, 466x466, 1:1, all in one.jpg) (h) (u)

>>1011729

Where is your God now?


 No.1013040>>1013057 >>1013058 >>1013265

File (hide): edcf324333bd3b0⋯.png (1.02 MB, 1920x1080, 16:9, proglangs.png) (h) (u)

>>1011725 (OP)

Ruby is the best of those 3. It's actually well-designed, unlike Python or PHP. PHP is actually pretty fun until you trip over it (which happens often). I don't know why people still keep on using Python when Ruby exists. Ruby is just better at everything. Rails is more /comfy/ than Django. OOP is more comfy in Ruby. Ruby hasn't been hijacked by faggots. Ruby has better syntax (it's both more powerful and easier to read). And most importantly, Ruby is cuter.


 No.1013054>>1013068

>>1012015

now do this:

swap files 'foo' and 'bar' without the possibility that a third process (such as a web server)

1. fails to find 'foo' or 'bar'

2. opens 'foo' or 'bar' to other than their intended contents


 No.1013057

>>1013040

>ruby has not been hijacked by faggots

literally lol


 No.1013058

File (hide): 649b280a46186bd⋯.jpg (2.24 MB, 2614x3300, 1307:1650, PCC_vol4no6_may76_fortran_….jpg) (h) (u)

>>1013040

mfw no Fortran tan


 No.1013068>>1013292

>>1012997

Headers add on to a language. Their contents are not built in.

>>1013054

Swap what? Contents of the files, directory?

>without the possibility that a third process (such as a web server)

What? Do you mean lock the files during the process? There is a python module that can do that.

I don't know what you're saying but Python can rename files, or slurp file contents like:

fooContents = open(foo, r).readlines();


 No.1013166

>>1011740

so, python?


 No.1013250

>>1012381

>pajeet lang vs pajeet lang vs pajeet lang

which are non-pajeet then?


 No.1013265

>>1013040

http://oxwugzccvk3dk6tj.onion/file_store/edcf324333bd3b0ededa66ecd44201ea59dba857f9fea7eb06d4111e05a87322.png

Would fuck the shit out of C#, shell, R, Scala, ActionScript

how about other anons?


 No.1013292>>1013306

>>1013068

>>swap files

>swap what?

swap FILES.

>Do you mean lock the files

What the fuck would an voluntary advisory lock have to do with anything?

I mean WITHOUT THE POSSIBILITY THAT A THIRD PROCESS

>I don't know what you're saying

python.gif


 No.1013306>>1013309

>>1013292

Locking a file from being modified while handling its data will prevent corruption.

>WITHOUT THE POSSIBILITY THAT A THIRD PROCESS

Where is the verb?


 No.1013309>>1013321

>>1013306

>where's the verb

FOLLOW THE LINKS BACK TO WHERE I SAID IT THE FIRST FUCKING TIME


 No.1013321>>1013523

>>1013309

Without a colon the list seemed unrelated.

I would copy the contents to memory, write to tmp files in their desired directories, check for changes, and rename the files while deleting the old ones.

Alternatively, one could just rename the files if you want to switch directories as well.

This will mitigate the time needed to lock the files. What's your point?


 No.1013523>>1013573

>>1013321

>copy the contents to memory, write to tmp files in their desired directories, check for changes

jesus christ.

python.jpeg

how does any of this contribute anything to the requirements?

>and rename the files

this is all that matters, and it's three syscalls and a violation of requirements

>switch directories

python.gifv

across separate filesystems, there's no longer any way to satisfy my requirements. Directories do not matter in the slightest though.

man renameat2


 No.1013573

>>1013523

Google python file transfer over network


 No.1013720>>1013721

>apple shilling in OP

>the scripting languages which are all worse than Lua

>PHP garbage lang only popular because widespread

>Ruby slow as fuck

>Python pile of bloat with a separated community

Lua is the only sane choice left for dynamic scripting languages. It's also faster than all of the others.


 No.1013721

>>1013720

*three


 No.1018326

>>1011740

Sure, this sounds good in documentation, but have you ever tried to implement this outside of university? It's fucking messy.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
47 replies | 5 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / abdl / cafechan / doomer / fa / mai / tenda / tingles / wmafsex ][ watchlist ]