/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

What is the most useless programming language?

anything in English (islamic)

Why is it so hard to get a job in Software dev? I've been more of a hard worker and smarter and more socially capable compared to my colleagues, yet they are the ones who gets a job at some oil and gas industry.

>syntax errors are always going to exist, there's probably going to be errors with null objects in OOP languages, you're going to have to link libraries, etc.
You don't learn that in theory classes moron. You experience and learn from that in project based classes.

> The vast majority of modules should include decent-sized projects
Wow. user you should really start your own university since every university disagrees with your shit opinion. There is no point in practical uses if you aren't sure that practical use is going to be relevant after your degree. Theory based knowledge last for a lifetime while practical based knowledge for a specific language doesn't.

>In software they're usually just a way to pay some scrub pennies to do grunt work
And how is that any different from decent sized project moron

Something like brainfuck

[clever joke about a programming language that will illicit a hostile response]

Still working on this bubble sort meme.

void bubbleSort(int arr[][8], int size)
{
bool sorted = false;

for (int i = 0; (i < size) && !sorted; i++)
for (int j = 0; j < (size - i - 1); j++)
if (arr[j][7] > arr[j + 1][7])
swap(arr[j][7], arr[j + 1][7]);
else
sorted = true;
}


I'm trying to sort rows of a two-dimensional int array by descending value order of a single column, arr[][7]

I feel like a big dumb cuck, here.

>forgot my image

give me a quick rundown on emacs

is it actually the patrician standard of usability

>"meme"

>is it actually the patrician standard of usability
No, but it is a pretty powerful shell. The text editor is shit, though.

are we banning words now
are we INGSOC now
should I put a trigger warning before I accidentally misgender you, you fucking liberoid freak, I bet you use RUST, you fucking Pajeet, you fucking Rajesh, you fucking Salman Khan, India-nigger.

"hallo yes this is microsoft vindows calling to tell you that your computer has a WIRUS, plees gib money"

fuck off

nice meme

so i should just stick to a vim if i need a decently functional ide?

vim atleast sort of makes sense but there are textbooks dedicated to figuring out emacs

Now that's a quality thread

Fuck off, Rajesh. You sperged out for literal months wrapping your poo-in-loo "buu huuu animoooooooooo" statements in code blocks for every thread.

I'd stick to VIM. All emacs has going for it is that it uses lisp for it's configuration. This enables far more powerful plugins that are easier to implement, because it uses an arguably real language compared to vimscript, which is a nightmare, but actually editing text blows dick, especially compared to VIM. There's just no comparison to VIM's modal editing. Emacs can emulate vi's bindings, but the power of vi extends far beyond it's bindings.

I spent five hours setting up a build system with CMake, and by the end I was kind of enjoying it. Was success just fucking with me, or am I actually sick?

Kill yourself you idiot Islamic cuck nigger Indian Jewish shill puppet kike nigger cuck Rajesh Muhammad Mehmet Turk roach Kurd Armenian Jew nigger cuck kike shill CIA NSA MI6 black Mexican nigger Jewish Islamic cuckold communist nazi SJW libcuck Trump nigger Jewish American cuckservative Africa nigger racist Jewish cuck pedophile Alex Jones Glenn Beck Shlomo Shekelstein Sam Hyde nigger Jewish Islamic cuck kike shill puppet disinfo slider controlled opposition India nigger CIA nigger MIT nigger GNU Windows Linux Mac Phone Android libertard fascist nigger nazi Jewish capitalist communist rude person

>hating everyone equally

Rhodesia? Yeah, me too.

everyone is subhuman but me

i alone am GOD on this earth

cucks, fear me

>manage to get interview for full stack engineer this week
>realize I don't know how the full stack works, less engineer one.
What do I do guys? All I know is a few languages and jdbc/spring.

The best and the only choice, vi is a part of POSIX, there's a very high probability that it will be installed out of the box in any UNIX-like system.

>rude person
That's pretty vicious.

vi != Vim.
I really like using Vim, and I fucking hate using vi, at least with the defaults.
I've never cared enough to configure it.

Should black people be allowed to use the internet?

you put code on the stack

I also spent a shitload of time to configure CMake for an Android native project, now it automatically downloads from git dependency libraries and compiles them as static libs for the project.

Why do we have config files for programs? Shouldn't they be considered harmful?

Why not a referentially transparent approach where everything is available as a command-line parameter, and users can save "settings" through shell aliases?

Then we wouldn't have to juggle any hidden files. Everything would be in your .shell_config

Should white people be allowed to use the internet?

Because that would be an unmaintainable mess.

...

I don't think anybody should be allowed to use the internet, or at least the world wide web.
It has become such a shithole.

>everything in one file
>unmaintainable mess

>automatically writing to disparate files in /home, sometimes in sub-directories, sometimes not
>maintainable

global internet was a mistake

we need to go to every country has their own internet, completely sealed and segregated from the rest of the world

Yes.

Every city or state even. I don't want to associate with anyone from C*lifornia.

vi ⊆ vim
They use the same ideology and the same keys. In any system: OpenWrt, Android, FreeBSD, the majority of Linux distros and so on, you'll be able to edit files without an inconvenience, because you use vim everyday instead of shitmacs.

Should squids be allowed to use the internet?

sleep tight porker

Should black people be allowed?

Honestly, that's fucking stupid desu. "Let's take all of the cleanly seperated easily findable files and just fucking stick them into a single gigantic abomination of a shell config!"
Not to mention how you would maintain something like that. And what if a program had something special about its config? Would two systems have to exist side-by-side?

You'd better ban pajeets, they're disgusting.

You sound like a brainlet desu

/program-name in vim. bam instant access to "settings"

Much better than having to worry about the program's state being modified in some other file, + introducing the mess of config file defaults and hierarchies

Want setting X? Call program --x. It makes perfect sense.

Anyway it doesn't matter what you think. I already write all my own software to be configless in this manner. Once other people realize how good it is, I think it will eventually catch on

Now what if a program that isn't your shell wants to call another program?
How would sensitive information like passwords be handled?

Neither of those are actual arguments

Why the hell not?
Programs calling other programs is an extremely common thing to do.
So that means that the programs now need to have access to your "shell aliases"/"global config" file, and within that file, it then has access to everything about every other program, including passwords.
Now how about setuid programs? Does it even get to have access to files that only root is supposed to have access to?

IDK desu, it kinda sounds like you're gonna die in obscurity. Doubt the entire software industry is just suddenly gonna switch the settings paradigm so mentally handicapped people like yourself don't have to actually look in your home directory for more than a few seconds.

Chinese people program in English.
t. Chinese here for your shitty American college.

more like t. Mehmet Muhammadun, deep cover agent for MI6 paid to shill and troll and lie on Sup Forums

Yes/No.
Kinda.

It has a high learning curve.
It is immensely useful once you have gotten over it.

Vim is easier to start with but doesn't have as much stuff it can do for you. On the other hand, it isn't meant to. It shells out to other program. Emacs integrates them.

Which you prefer is a matter of your personality.

Notepad++ and its ilk are all in the utter plebeian tier.

I like Lisp as a language, but I fear it's a meme language that cannot have anything productive done in it. Please prove me wrong.

And? Emacs can edit files over SSH. (It integrates your standard openssh client and talks to the other computer using that.) So it doesn't need to be installed on other systems.

Why bloat your servers with unnecessary stuff?
(also, ed is the STANDARD editor.)

> Sup Forums please be productive

We only do the highest quality fizzbuzz implementations on Sup Forums.

"Useful" is for faggots.

It's not a "meme" language since no language can possibly be a "meme". Lisp is fucking garbage though. That's not to say that you can't "have something productive done in it".

Why do SJWs hate C when it has no objectifying?

I don't mean to say it's impossible - it just seems impractical. When I asked someone about GUI libraries, I shit you not, they recommended I write a fucking web server to be hosted locally and just do the UI in HTML and CSS. Sure, you can use macros to convert S-Expressions into HTML easily, but Lisp doesn't even have something like Electron to make it one seamless application making it APPEAR to not be a dodgy hack.

Racket comes with a GUI toolkit.

lmao
Did a subhuman just reply to me?

A programming language with no I/O.

It's pretty useful actually.

No. Kill yourself, you literal autist.

It has about 0.000000000000000000000000000...1% the usefulness of Haskell, which in turn has 0.000000000000000000000000000...1% the usefulness of a proper programming language.
And even the former statement is probably way overestimated. I'd say that a programming language with no I/O actually has 0 uses, because whatever you do in that language is equivalent to doing nothing in terms of effects, which is the only thing that matters, effects.

>inb4 it's useful because I can compute stuff!
Computing stuff is only useful if you output the result.
If you compute something and do nothing with the result, then it was a useless computation and a waste of resources.

But C do have objects, in the form of compilation units (source including all headers and with all macros expanded). What it doesn't have are classes.

"Do to others as you would have them do to you."
Luke 6:31

>It has about 0.000000000000000000000000000...1% the usefulness of Haskell, which in turn has 0.000000000000000000000000000...1% the usefulness of a proper programming language.
Yes, according to your subjective judgement. But I'm not your friend or your family, I couldn't care less.
>I'd say that a programming language with no I/O actually has 0 uses
This is blatantly false and even you know it as you have demonstrated in your first sentence.
>which is the only thing that matters, effects.
You can have all the effects you want. It can literally be assembly-level if you wish.
>Computing stuff is only useful if you output the result.
So computing "1 + 1" written on a piece of paper is only useful if you write "2" on the same paper? What sort of retardation is this?
>If you compute something and do nothing with the result
The result is passed to something else which accepts the resulting type.

Translation units (the correct term) are not objects.
I don't know what the hell you're thinking.

All programming languages that are Turing complete has the ability to use system functions and output something. Whether or not it requires you to break the stack

Basic Question, but what's the easiest way to put 2 numbers between brackets (I.E. [3,2] ) Into their own variables in C++?
I can't figure out for the life of me how to do it.

The ability? Definitely. But I/O isn't a requirement for Turing completeness. If you think it is, then your education has failed you.

in haskell this is just

[x,y]

string delimited array of pointers

Don't you have to use the brackets monad for that though?

>So computing "1 + 1" written on a piece of paper is only useful if you write "2" on the same paper? What sort of retardation is this?
If the whole point of your program was to compute 1 + 1 then yes, not outputting the result would be a waste of computation. Why did you compute it?

>The result is passed to something else which accepts the resulting type.
Yes, and then at the end of your big chain of computations, you output a result in some form.
A language with no I/O will perform all those computations and never output any kind of result at the end of it.
That is by definition a useless computation that is the equivalent of doing nothing.

That's not an I/Oless language then.

Why the fuck did you quote the bible? Do you expect me to "respect your feelings" or something on Sup Forums, of all places?
>I couldn't care less
Why are you replying then?
>You can have all the effects you want.
What good is an effect if you can't observe them? You can imagine your happy little programming world all you want, but it's completely useless if you can't see inside.
>So computing "1 + 1" written on a piece of paper is only useful if you write "2" on the same paper?
At some point, it's going to have to be evaluated and output somewhere.
Do you even intend for a computer to actually execute your stupid language?
>The result is passed to something else which accepts the resulting type.
Does that have I/O?
If it doesn't, it's equally as useless.

>But I/O isn't a requirement for Turing completeness
Being able to see what's on the tape afterwards is the only thing which makes a turing machine even remotely useful.

Scanf.

Something like
scanf("[%d,%d]",x,y)


You stupid fucking wetback nigger. By system functions I meant the underlying functions that programs use to read/write text. So all Turing complete languages can just scroll over to those functions and run. Therefore they all have input/output

no, you just need a few GB of RAM

First, you got the algorithm wrong. As you wrote it, it stops whenever two consecutive elements are in order. You have to consider the column as sorted at the beginning of each turn and consider it unsorted as soon as two elements are swapped.

Second, your swap function only swap the elements of the column, not the entire rows themselves (if that's what you want).

>Retarded no I/Ofag is also a retarded biblefag
Not at all surprising

What's wrong with the Bible?
Are you a Muslim or a Jew?

*tips*

Daily reminder to report and ignore Rust shill spam. Do NOT respond to their bait posts.

>Actually being religious
Go home, you stupid Americans.

I'm neither of the disgusting desert religions.

Go back to deluding yourself with your bible and believing in your omnipotent and omnipresent sky daddy, David.

>If the whole point of your program was to compute 1 + 1 then yes
No, it succeeded in its task. Outputting the result was never part of the plan.
>not outputting the result would be a waste of computation
Only if I originally intended to output the result, which I didn't.
>Why did you compute it?
To compute the value and use it later.

>Yes, and then at the end of your big chain of computations, you output a result in some form.
So? You can have a "halt" function which accepts the last thing passed in a sequence and terminates the program.
>A language with no I/O will perform all those computations and never output any kind of result at the end of it.
Correct. Your point being?
>That is by definition a useless computation that is the equivalent of doing nothing.
No. A useless thing is by definition something which has no use. Being passed as an argument to a function is a use, therefore it isn't a useless computation.

>Why the fuck did you quote the bible?
It was a very appropriate quote in this context.
>Why are you replying then?
I didn't say I didn't care about you spouting blatant lies.
>What good is an effect if you can't observe them?
You technically can observe them in some sense. The OS does I/O so you can see the resource usage go up.
>At some point, it's going to have to be evaluated and output somewhere.
Evaluated? Yes. Output? Nope.
>Do you even intend for a computer to actually execute your stupid language?
Yes, I'll be using LLVM to generate machine code. Although I've heard it reduces non-IO programs to single ret instruction so I will have to deal with that somehow.
>Does that have I/O?
Nope. I/O is simply isn't a thing in my language.
>Being able to see what's on the tape afterwards is the only thing which makes a turing machine even remotely useful.
You have shown yourself to be retarded beyond any reasonable doubt. If you think being able to look ahead is somehow "I/O" then I can only feel sorry for you.

Who said I'm a "biblefag"? Can you not accept information for what is regardless of the source? That would make you even more delusional than a "biblefag".

That post got too long.
>If it doesn't, it's equally as useless.
No language is objectively useless. For you that might be the case, but please specify this kind of bullshit with "useless for me".

I changed it to this.
void bubbleSort(int arr[][8], int size)
{
bool sorted = false;
for (int i = 0; (i < size) && !sorted; i++)
for (int j = 0; j < (size - i - 1); j++)
if (arr[j][7] > arr[j + 1][7])
for (int k = 0; k < 8; k++)
{
swap(arr[j][k], arr[j + 1][k]);
sorted = false;
}
else
sorted = true;
}

Now it will actually sort, but in ascending order instead of descending order.
Tried changing
if (arr[j][7] > arr[j + 1][7])

to
if (arr[j][7] < arr[j + 1][7])

But that just broke it.

...

>No, it succeeded in its task
And it's task was pointless, useless, and a waste of resources.

>which I didn't.
And therefore, the computation was useless.

>To compute the value and use it later.
Uh no. You discard the value.

>So? You can have a "halt" function which accepts the last thing passed in a sequence and terminates the program.
Why does it accept a parameter if it doesn't do anything with the parameter?

>Correct. Your point being?
The whole program is useless and does nothing.

>A useless thing is by definition something which has no use
Such as an I/Oless programming language.

>Being passed as an argument to a function is a use
Only if it gets used*

>therefore it isn't a useless computation.
It is if the function does nothing with the parameter.

>Can you not accept information for what is regardless of the source?
"Do to others as you would have them do to you." is nonsensical delusional bullshit. Typical of the bible.

>GUI
>productive
Am I being memed on?

Re-read my message.
>You have to consider the column as sorted at the beginning of each turn and consider it unsorted as soon as two elements are swapped.

The fact that you set sorted to true when two consecutive elements are in order means that if the two last elements are in order, you consider your array sorted, even if the previous elements may still be not sorted.

haha yeah epic
it's just like rabbi toby fox says:
get rid of all religion
become genderqueer enlightened dragonkin atheists
drink lots of mountain dew black and soylent green
only eat kale
have unprotected gay anal sex with african men
write gay furry moloch fanfiction for your epic irc buddies
kill your sister
donate lots of money to the israeli army. they need more money for the bissiles
go to liberal brainwashing camp and take all of professor shekelstein's classes on why white privilege is bad and white people need to be genocided
learn to code in rust and nodejs
spend 1300 dollars on a cheater machine ("""art tablet""") and use it to draw pictures of moloch having gay anal sex with your gay self-insert
kill everyone over the age of 30
drink lots of kraken and fireball
eat lots of black licorice
only drink water (+fluoride GMO)
take these pills that fuck with your dick and turn you into a sterile mutant
make sure to attend lots of anti-trump rallies and, anyone who says they support trump, beat them to death with a shovel
kill all women with red hair
donate lots of money to the cult of moloch and make regular sacrifices to moloch in your backyard
play lots of jew-approved videogames, like undermeme, and overmeme, and division, and destiny
vote for hillary clinton 2020
even if you're not a u.s. citizen, just go to america illegally and vote for hillary clinton 2020

rabbi toby fox would never lie to us, right?

>It was a very appropriate quote in this context.
How?
>You technically can observe them in some sense. The OS does I/O so you can see the resource usage go up.
That's fucking stupid. Why don't you just implement all of your programs as spinlocks then, if that's all you fucking care about?
>I'll be using LLVM to generate machine code. Although I've heard it reduces non-IO programs to single ret instruction so I will have to deal with that somehow.
Don't come crying here when the LLVM optimiser does it's fucking job properly.
>If you think being able to look ahead is somehow "I/O" then I can only feel sorry for you.
Who the fuck mentioned lookahead?
There are many ways to define a Turing Machine, but the way I learned it, a Turing Machines input is what's on the tape in the beginning, and the output is what's on the tape when the machine has terminated the head is parked.
Your Turing Machine would start with a blank tape, and finish with a blank tape, which is completely useless. You would see if it halts or not, but that's undecidable.

Are you mentally unstable or something?
You must be.

dude don't you dare question rabbi toby fox

he is the king of jews
he is here to save us all, and turn earth into one big global multiculti hugbox with lots of islam and gay anal sex

diversity is strength, right?
he would never lie to us, right?

Epin copypasta.

>And it's task was pointless, useless, and a waste of resources.
From your point of view. I'm not forcing you to run the program.
>And therefore, the computation was useless.
See the line above. You really should learn to differentiate between the objective meaning of "useful" and your preferences.
>Uh no. You discard the value.
Only at the end. Everything else is technically a bunch of functions calling other functions.
>Why does it accept a parameter if it doesn't do anything with the parameter?
Because it's a function. A function is by definition something which takes arguments.
>The whole program is useless and does nothing.
See the second sentence.
>Such as an I/Oless programming language.
So in your warped mind something can have a use and still be useless? You easily make it into the top 5 most retarded people I've talked to here, and that's quite an achievement.
>Only if it gets used*
Using something is a use. This is obviously true.
Therefore using something as an argument to a function is also a use. Meaning that it isn't useless.
>It is if the function does nothing with the parameter.
There are times when even in I/O-ridden shitlangs using functions which ignore some parameters is useful.
>"Do to others as you would have them do to you." is nonsensical delusional bullshit.
It was quite appropriate in that context. But considering your level of mental delusion it is obvious why you wouldn't see that.

>How?
It got the typical response I was looking for. I collect certain types of responses in a file.
>That's fucking stupid.
I'm glad you think so.
>Why don't you just implement all of your programs as spinlocks then
Why would I?
>if that's all you fucking care about?
It's not.
>Don't come crying here when the LLVM optimiser does it's fucking job properly.
I will have to disable it then. Or find a way to disable the particular optimizations which result in that retarded behavior.
cont.

haha yeah dude that's my favorite thread i spend so much time there with my epic irc friends talking about how great judaism and gay anal sex is

I hope you find Jesus

Well, I did get it to sort successfully in ascending order. So I'm thinking I'll just have every other function read it in reverse order. Bit of a India-tier hack, but I was having enough trouble getting the array to sort at all. Thanks for helping, lad.