/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: 1542756450052.jpg (600x812, 349K)

Other urls found in this thread:

gitlab.com/9898287/algods/blob/master/source/dsets.d
ctf.certifiedsecure.org/path200/
icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf
Jow
wiki.installgentoo.com/index.php/Programming_resources#C
protz.github.io/mezzo/tutorial/tutorial.latex.pp.pdf
dlang.org/orgs-using-d.html
youtube.com/watch?v=LRHE8HmgNyk
youtube.com/watch?v=siIE8i48hlg
youtu.be/bCodVbucTbo
youtube.com/watch?v=TqdRQxgtZtI
youtube.com/watch?v=PQF6x_FgnJ0
twitter.com/SFWRedditGifs

oh no no no no
haskellfags will never recover

Attached: haskell guidelines.png (424x176, 8K)

nth for nim!

first for if ur better at AOC then me ur a nerd fagit loser

but if ur worse its cuz im rly smart lol

idk i think you guys are misunderstanding what takes up the most time/cpu/mem in a given backend infrastructure

first of all, do you really think spotify or instagram would make a tech choice that involves them having to use 10x the hardware? no, obviously not

as for why? it's simple, most servers are just glue between the pieces of technology that actually fucking matter. lets suppose you have a service architecture and a call to your public facing endpoint goes like

public server --> auth from memcache --> data u want from a relational database

so your choice of lang is really only affecting a small part of this, see? your server is slower because it's in python (you know, maybe) but most of your request travel time and most of your hardware requirements are tied up in the other shit that you don't even write the source code for. and even if you were implementing your own memcache and your own RDS, most of the request time is tied up in the network requests between your services.

>bb-b-b-but services architecture is bad then!
no it's not.

Lisp is the most powerful programming language.

"""Lisp' is is not a "Programming language''''''''''''''''''''

>cant get stars every night

THE
ABSOLUTE
STATE
OF
Jow Forums
PROGRAMMINGCELS

GET OFF MY BOARD YOU AMATEUR HOUR DWEEBS REEEEEE

xd

So basically as long as your network infrastructure of your server isn't shit it doesn't matter what language you use for backend

yeah, pretty much. i mean, your network infrastructure needs to not be shit, and it doesn't matter what lang you use for backend.

Please review my disjoint set implementation

Attached: 1536410196291.png (264x274, 35K)

gitlab.com/9898287/algods/blob/master/source/dsets.d

Very nice, user! I give it a 10/10!

>.d
I'm not opening that shit.

>/// If the array is big enough, opt for parallel operations if possible
>immutable ulong minimumParallelArrayLength = 10_000;

Attached: 1544389874953.png (256x256, 119K)

I actually want to properly determine the optimal threshold for going multicore. But it depends on hardware. So I just went with a big number.
I think 10,000 sized array of ulongs is too small.

Fuck, I started learning Python its not even my first programming language but i am enjoying it lads. It really doesn't seem that bad

where do I get a job where I use D?

uhoh. it's over for you my dude.

Facebook?

You don't. And for good reason.

I hope you can make it in Facebook.

Don't listen to Jow Forums. Python is all right. At least it's not JavaScript.

Does anyone have a good source to learn more about Path Traversal and SQL injection other than OWASP?
Need to learn for school and for example we need to acces this path: /var/vhosts/ctf/www/path200/flag/flaga01b5fad8e, on this site: ctf.certifiedsecure.org/path200/ but I can't figure this one out.

high bar.

At the morgue.

elaborate

eh, looks alright, but it should abstract over data types, not just long.

t. short

bad, ded lang
nobody use

Ubuntu is great but the new cuttlefish has a bad DE I'm thinking about going back to Debian should i try out Arch? Sorry if not exactly programming.

That's not programming at all.

I like Go and nothing you can say can make me not like it.

I like it too but i know Google will probably drop it in like 2 years like they do with everything else so i don't even bother

What else is a good C book like K&R? I've heard it's outdated but I've only seen recommendations for obscure shit like 21st Century C or Learn C the Hard Way. Are those books actually good or should I look at something else?

Learn C the Hard Way is complete shit. Stay away from it.
I haven't read 21st Century C.

It’s not outdated.

K.N.King, but thats probably old now too. Not really the same thing, but icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf

how do you plan on reading the books if you can't even read wikis?
Jow Forums-science.wikia.com/wiki/Programming_Textbook_Recommendations
wiki.installgentoo.com/index.php/Programming_resources#C

How true is the statement that C++ isn't bad and bloated and messy etc, the problem is that people teaching it are teaching in in the wrong way? Like if i stick to MODERN (so not books from 20 years ago) courses that are popular and highly rated will i be fine?

Attached: 53985327523253.jpg (543x589, 54K)

No, C++ will rot your brain and make you an objectively worse programmer.
I don't know why anybody would want to learn it.

It's true.
C++ is hard to teach in general.
If you learn it at all, make sure you're following a course that teaches C++11 or newer. C++98 is a completely different beast.
And once you're done, read/watch some material from people who know their shit like Andrei Alexandrescu or Herb Sutter

>I don't know why anybody would want to learn it.
Probably because its the best low-level programming language until RUSTS matures a bit (if it does) and no C that barebones garbage isn't better

Attached: 52235214124124.jpg (300x300, 47K)

It will always be bloated. Messy comes down to individual restraint.

C is a great language.
You just have objectively shit taste.

Attached: 1542859598835.png (538x538, 492K)

By the time Rust is mature, C++ will have caught up to it yet Rust won't have caught up to C++.

>ask about opinions on something
>get shit on for not reading obscure wikis that arent even linked in the op

>using low level languages
just why?

both of those wikis are linked in the pinned threads on Jow Forums and /sci/

Because I write lower level programs with somewhat decent performance requirements.

It WAS great, now its obsolete for new stuff

no you dont

>now its obsolete for new stuff
There is still no viable replacement for C. How would it be deprecated?

I'm primary work on a Wayland compositor. I need to be able to keep a stable frame rate of at least 144FPS while keeping the CPU usage as low as possible.
I also have to deal with a shitload of low-level C APIs, including those directly from the Linux kernel.

>There is still no viable replacement for C
C++

>C++
AHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA

>I am too fucking stupid to learn something bigger than the most basic shit so i will just stick to it and dont even bother

idk what any of that means but you probably could have done it faster in python, lol

learn 2 reals not feels, boomer

Anybody who possibly thinks that C++ is a viable replacement for C obviously doesn't know anything about either language.

protz.github.io/mezzo/tutorial/tutorial.latex.pp.pdf
Mezzo looks cool

what font is this?

Attached: vim.png (1588x1036, 329K)

D is way better than C++ and that garbage Rust.

dlang.org/orgs-using-d.html

Install Manjaro

can somebody post clean implementations of Racket's conjoin and disjoin functions?
keyword is clean, for I will use the code in my environment and I can't have ugly looking functions taint my files

I finally got object storage between activities.

Package:
String DustMe = "%s";
Context ProtomonContext = getApplicationContext();

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ProtomonContext);
SharedPreferences.Editor editor = prefs.edit();


Intent i = new Intent();
Bundle b = new Bundle();
b.putInt("Storage", MonsterStorageCounter);
while (countthroughmonsters < MonsterStorageCounter){

String BustMe = String.format("Monster"+String.format(DustMe, countthroughmonsters));
Gson gson = new Gson();
String json = gson.toJson(PlayerMonsterStorage[countthroughmonsters]);
editor.putString(BustMe, json);
editor.commit();
countthroughmonsters++;
}

i.putExtras(b);
i.setClass(this, GarlitosLab.class);


Unpackage:
Context ProtomonContext = getApplicationContext();

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ProtomonContext);
SharedPreferences.Editor editor = prefs.edit();

Bundle b = getIntent().getExtras();
if (b != null) {

storagesize = b.getInt("Storage");

int i = 0;
while (i < storagesize) {

String DustMe = "Monster%s";
String BustMe = String.format(DustMe, i);

Gson gson = new Gson();
String json = prefs.getString(BustMe, "");
passedmonstersTwo[i] = gson.fromJson(json, protomon.monst.class);


i++;

}
}

Attached: 1516961387338.jpg (1024x986, 139K)

C is deprecated. It's not even self hosted lmao

>android
so this is what peak API design looks like

Attached: 68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f776174747061642d6d656469612d736572766963652f53746f (480x270, 2.45M)

its all I know, so if its bad I'm not bothered (yet)

What must do you guys listen to while programming?

I don’t like music.

youtube.com/watch?v=LRHE8HmgNyk

Weeb shit mostly.
youtube.com/watch?v=siIE8i48hlg
I've been into this a lot lately, because it's mostly just background noise and it's really long (the actual release version is over an hour).

/dpt/

moe jazz
youtu.be/bCodVbucTbo

Music is a crutch.

I've started learning Python 3 with Zed A. Shaw's book Learn Python 3 the Hard Way and I am at exercise 20 but things still look a little bit confusing for me. I cannot create new things with the info the author provides.

I need another source to support my knowledge.
Recommend me ways to learn Python 3.

Attached: 656x690.fit.111SS1724001_BLACK_GREY_1.jpg (656x690, 19K)

It's been stable for 6 years. Past the dropping mark, imo.

there's a lot of frogs, crickets and kookaburras outside my window so I listen to those

That sounds awful.
youtube.com/watch?v=TqdRQxgtZtI

Anybody know verilog here?

I did it a few years ago in university.

I did a python script that separates files into folders, according to their extension, but I wanted to zip all after it, so I'm doing it with the following command

"for i in */; do zip -r "${i%/}.zip" "$i"; done"

I tried calling the command with os.system and subprocess, both can't handle the $ mark, they mark it as invalid syntax.

Can you guys explain me what's causing this issue?

Is it okay to use a function in sequential blocks? I only know that you're not supposed to mix sequential/non-blocking with combinatorial/non-blocking code.

Eh, I've forgotten most of the details about that sort of shit.

Actually it's some of the "modern" stuff that is shit.

>C
>minimal
constexpr auto add = [][](const auto& a, const auto& b) {
return a + b;
};
What would this complete opposite of minimal would look like in your minimal C?

a + b

import codethatdoeswhatiwant as c

def main():
neighbors_wifi_name = input("Neighbors' wifi name: ")
wifipassword = c.hack(heighbors_wifi_name)
print(wifipassword)

if __name__ == "__main__":
main()


The absolute state of python programming. Do pythoners actually think they're real programmers?

In Haskell this is just add = (+)

it's already certain java will die in android but which programming language will take its place? kotlin? dart?

#define add(x, y) (x + y)

youtube.com/watch?v=PQF6x_FgnJ0

I love this album, I put it at 2x speed and listen to the whole thing, Probably done that 50+ times

If this is Java either just store and load JSON or use the binary protocol.

But they are constructed objects, not primitives.

Now pass that as a function pointer.

probably better in a SQT but where would I start on creating a program in c# of scanning website(s) for certain keywords? Noob to programming and can make simple shit but when it comes to connecting a program to the web I'm lost.

Attached: 1542755628677.jpg (907x778, 72K)

>I put it at 2x speed and listen to the whole thing
what the fuck

I listen to everything on youtube at 2x, you get used to it.

it only concerns the GHC committee tho