/dpt/ - Daily Programming Thread

What are you working on, Sup Forums?

Old:

Other urls found in this thread:

pypl.github.io/PYPL.html
twitter.com/SFWRedditGifs

We chose C over ML and have been paying for that mistake ever since.

Thankfully we can redeem ourselves by switching to Rust.

You mean ignoring Rust, right?

C fag here.
Rust is actually pretty good.

nim is better than rust fight me

fuck it all, i'm creating anime thread

No, I mean "switching to" Rust. Can't you read or what?

>veryImportantVariable and very_important_variable are the same identifier
You can't make this shit up.

Apparently you confused "switching" with "ignoring", friend.

anime thread:

>instagram
>CS
>Rust

Fuck this gay earth and fuck San Francisco. This shit is cancer.

You can keep ignoring

what is the best general purpose language and why is it python with pyqt for guis.

Now run Lisp on this joint

I'd say D sinse python is incredibly slow. Python's syntax is being used in Nim though

You're completely delusional, seek treatment

not meant to be rude, but this picture is fucking annoying, why reposting the same pic every day

python is the best to get it done

once it's done you can use Rust/Java/D/C++ to rewrite it

This is called rapid prototyping, it's what python is very good for.

You can translate it to Nim, it compiles to C. Best of both worlds

would you say ruby is better than python?
so far it feels better for me since it feels like python without whitespace, don't have much experience with ruby, shoul I switch?

wait so nim takes straight python? you don't need to write a nim variant?

That's a weird way of saying Lisp.

>ML
?

Nim's syntax is incredibly similar to that of python and you can learn it quickly if you are used to python.

Machine Learning

Finding common substrings between two strings. Now I only have to add a method to return the biggest one.
import std.stdio;

void main(string[] args){

string str1 = "abcder";
string str2 = "xwbcmaabcr";
string[] commons;

for (int i = 0; i < str1.length; i++){
for (int j = 0; j < str2.length; j++){
if (str2[j]==str1[i]){
string current = ""~str1[i];
for (int a = 1; (a+i < str1.length && a+j < str2.length); a++){
if(str2[a+j]==str1[a+i]){
current~=str1[a+i];
}
}
commons~=current;
}
}
}
writeln(commons.length);
}

do your own homework

That's not a homework

Meme Language

This picture for the America is the same through 235 years, why /dpt/ must change its picture?

Ocaml's ancestor, we owe to it the greatest language of our time.

Too bad it had been deprecated since Haskell came out.

>that OP
Lmao literally placebo tier

Tell me 5 things good about Ocaml

Because /dpt/ is not the United States of America, and because right now, on this thread, there are anonymous individuals who "fight" in order to assert their political view of what /dpt/ should be!

noob question

if im on lunix do i actually need to use a VM to properly code c/c++ with windows functions (for timing cpu etc) or is there some gangsta way around that

>Thankfully we can redeem ourselves by switching to Rust.
kys, sjw scum.

We don't endorse the NSA here

>lunix

Google "MinGW".

mingw i think

neat i always thought mingw was just for the reverse (mimicing lanix on windows) but it appears that isnt the case

>Rust OP
>do't endorse
funny joke

is there anything better than anime fags getting BTFO?

You going back to R*ddit.

what makes you think I don't have it open in another tab right now?

Learning Ionic v2. Pretty easy so far, but I'm still having doubts about the best project structure. Liking AngularJS so far, but still having trouble with huge single line functions with Promises inside promises.

Also is there any legal way to virtulize a OSX?

>tfw reddit is the superior website for actual discussion but it got so popular that 50% of the posts are coming from paid shills to brainwash and control conversations
>tfw Sup Forums is one of the last beacons of true free speech and thought

>he ports his software to windows

>50% of the posts are coming from paid shills to brainwash and control conversations
>implying the shills don't ruin 4chin too

>>tfw Sup Forums is one of the last beacons of true free speech and thought

>people unironically believe this

Trying to write a terminal multiplexer in Haskell.

Does anyone know how to crack Steam games or how I can replace the steam_api library with a spoofed one so I can play my steam games without steam>

why is Visual Studio so shit and bloated


I wish I never had to use it

Tried Visual Studio Code ?

try using netbeans or eclipse my good lad

Someone decided that the programmer can use camel case and snake case interchangeably.

Odd, but some might like it.

>bloated
What type of development do you do? What does your dev process look like? Are you developing on a machine with a 16GB hard drive?

Does it allow you to use it with no I/O?

I wouldn't

I have not, what makes it different from things such as Atom?

Sometimes Unity (Although I prefer Monodevelop mostly)
But I'll be using it for Vulkan etc,
I might just switch to my linux machine but it's just tedious.

VS has crashed like 3 times today it's pretty autistic

Mixing of naming conventions reduces code readability, it's better to enforce a standard naming scheme at the language/compiler level, like Haskell or Rust do.

use sublime text

Actually, Mingw just crosscompiles to Windows, but you can use mingw on lunax no problem.

Anybody here is 3D web programming ?
I work a lot with BabylonJs, and it's rather cool.
At first I was sceptic about using Javascript in big projects but I'm starting to like it actually (ES6)

I have no option
But I always develop on Linux first

I'd rather use a language that works with me, not against me.

>VS has crashed like 3 times today it's pretty autistic
literally never happened to me since vc 6.0 days,

Maybe there is something wrong with your windows os?

...

Vscode is lighter than Atom, but anything is so idk

r8

>find commons substrings between two strings
>find the largest common substrings between two strings
import std.stdio;

void main(string[] args){

string str1 = args[1];
string str2 = args[2];

string[ulong] commons;

for (int i = 0; i < str1.length; i++){
for (int j = 0; j < str2.length; j++){
if (str2[j] == str1[i]){
string current = ""~str1[i];
for (int a = 1; (a+i < str1.length && a+j < str2.length); a++){
if(str2[a+j] == str1[a+i]){
current ~= str1[a+i];
}
}
commons[current.length] = current;
}
}
}
writeln(commons);
}
/main asdf asdfasdfc
[4:"asdf", 2:"df", 1:"f", 3:"sdf"]

>he ports his software for actual people to use

Maybe, I've not really used VS much on other machines so I couldn't really say if its just an autistic instance I'm in

I'll check it out thanks

what is an actual people?

>n^3 complexity
>no suffix tree or array

Seriously, some googling on some of the algorithmic problems you want to solve does wonders.

I didn't believe it either, but you can ACTUALLY get better at programming just by watching anime!

I don't know user

who even are we? Really?

Well, I don't program website but create 3d web applications in Webgl. And I'm rather happy that way, web development isn't that interesting.

Has anyone tried compiling c++ with opengl into js? My simple sdl shit seems to work fine

This is true.

I just decided to start using checkstyle, it had at shitfit about using tabs and when I changed to spaces, it had a fit about it using 4 spaces not 2, so I changed that too.

So is this actually a typical standard?

I was going to show a cool solution to this and then I saw
>two strings

Do a collection of strings, mate. Then you can do this for any number of strings, rather than be stuck with two.

>So I wrote a script for it. You can query Google from a script and get the number of search results using a tiny snippet. I tried a few different query strings, like move from to , switch to from and a few more ones. In the end you get a nice N * N contingency table of all languages:

C-fags are on suicide watch. Also Perl and Lisp are officially dead now.

you can configure checkstyle to use your indentation preferences

>everyone switching to java

This is as useless as TIOBE.

okay wait

What's the best resource for learning Prolog?

pypl.github.io/PYPL.html

>C-fags on suicide watch
>From * to C yields the highest results.
Are you too dumb to interpret the (irrelevant) results of your shitty script?

Paradigms of Artificial Intelligence Programming
You'll end up learning Lisp too, but you'll learn how to make a Prolog compiler.

There are more people fleeing from C to C++, Java or Go than in any other direction. The only people interested in C are script kiddies.

rekt again

Prove it by constructing a covariance matrix using the data.

It doesn't even mean that you dense motherfucker.
Google probably interprets your stupid request as "Need help to translate x language to y language".
What it shows is that C yields a fuckton of results in Google search, nothing more.
You should be the one on a suicide watch, you absolute cretin.

angry C manlet can't accept the truth

I need should use concurrency for this, don't I?

neet to/should
shouldn't

Something like this for a list of strings...not sure if it's right.

static List AllCommonSubstrings(List muhStrings)
{
var ss = muhStrings.ShortestString();
return ss.AllSubstrings()
.Where(x => muhStrings.Where(y => y != ss).All(y => y.Contains(x)))
.Distinct()
.ToList();
}

Keep on memeing brainlet. That's all you have left.