/dpt/ - Daily Programming Thread

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

Attached: 1561342338467.jpg (1024x599, 110K)

Other urls found in this thread:

hackage.haskell.org/package/recursion-schemes-5.1.3/docs/Data-Functor-Foldable.html#g:14
b-ok.cc/book/1313328/50b0c1
opensecuritytraining.info/LifeOfBinaries.html
twitter.com/AnonBabble

If you need anything more than sqlite you're doing it wrong.

PEDOPHILIA SATISFIED

Thread downloader in Common Lisp.

I'm eating breakfast, it's early ok

If you want more cute pictures, just ask directly.

Attached: 1561171173794.png (825x1000, 511K)

It probably uses extern C for the CPython bindings. I seriously doubt it's a true C++ ABI binding.

kys pedo

Kill yourselves retard anime posters

Attached: 1557772985307.jpg (850x1188, 243K)

>things have truly gone to shit so bad on this site the only high IQ place has been invaded by pedos

Haveing trouble with structs in C.
How do i initialize 2 different structures seperately and then use them in a 3rd structure that contians them both?

reminder to hide and ignore pedoshit posts.

struct A {
int x;
};

struct B {
int y;
};

struct C {
struct A;
struct B;
};

int main()
{
struct A a;
struct B b;
struct C c;

a.x = 5;
b.y = 10;
c.a.x = 5;
c.b.y = 10;
return 0;
}

it's literally this one or two guys who showed up a few months ago, anime posting was perfectly fine before then

This , but use designated initializers instead:
struct C c = {
.a = { .x = 5 },
.b = { .y = 10 },
};
(Also, he made a mistake in declaring struct C)

stop making threads with the same OP on both boards

Attached: Sugiura.Ayano.full.1961674.jpg (707x1000, 296K)

It's fine the compiler will tell him the mistake.

haha imagine if you put semen in an anime girl's tummy
who are you quoting?

Attached: 72a86abee9da439cd2d3f07770c697b5.png (1300x1064, 818K)

>on both boards

Attached: kid.jpg (362x346, 38K)

What?

Attached: 1560312447857.png (274x301, 16K)

there's a thread on /a/ with this exact same picture, yurus are everywhere

I agree, but if /dpt/ goes to shit I might just quit this site. Everywhere else on this site is full of low IQ vile people now. Probably because of tumblr refugees.

I saved that image days ago. I don't keep track on every damn board for what image is posted.
Also, who cares?

>Everywhere else on this site is full of low IQ vile people
so is dpt

>going to /a/
cringe

Designated initializers are beyond based. For some moronic reason no other language has them.

>that anatomy

Gurofags always make me kek

Well wheelschan is too slow and reddit is filled with fedoras with sticks up their asses and I’m not going to shitpost about jews and sepples on facebook.

Anyone who cares about programming still goes the secret /prog/ site. Image boards were always about shitposting and animefags.

>I’m not going to shitpost about jews and sepples on facebook.
you should, it would save me having to read it here

It's just summer, m8. Summer is always shit. Children have school holidays. Collegefags start showing up to ask retarded questions.

doesn't C# have that feature?

>secret /prog/ site

?

what the fuck is programming?
physics is just particles
math is just numbers

Attached: 81102274.jpg (376x369, 38K)

transistor states

brainlet

Rust has them as well.

>who showed up a few months ago
reminder that animefags == pedofags
reminder that anime posting was never fine

HI everyone, is there a recommendation algorithm library out there I can use?

code sample?

I feel like it’s more than just summer. Idk, sometimes I feel like the jannies have something against me because I see the same rare insults and posting styles follow me wherever I post on Jow Forums. Or maybe my posting style is just too speshul and everyone recognizes me. Either scenario is not ideal because I would like to be Anonymous. That’s the whole point of Jow Forums.

You want a library of algorithms?

Attached: 1474496560896.jpg (633x738, 85K)

yes, are there any good libraries that just have all the algorithms so I don't have to write any?

Why yes, let me find you the finest Haskell library of algorithms,

Post code or you are part of the problem

BITS 32

marker equ 0x280876
egg_size equ 0x3
max_index equ 0x2
start:
XOR EDI, EDI
jmp SHORT reset_stack

create_SEH_handler:
PUSH ECX
MOV [FS:EAX], ESP
CLD
scan_loop:
MOV AL, egg_size
egg_size_location equ $-1 - $$
REPNE SCASB
PUSH EAX
MOV ESI, EDI
LODSD
XOR EAX, (marker

hackage.haskell.org/package/recursion-schemes-5.1.3/docs/Data-Functor-Foldable.html#g:14

Would it be ideal to make a C library full of basic macros and data structures I can include in all my projects?
#define square(x) ((x) * (x))

I'm not sure if janny can ID people? Mods probbly can though. Anyway, try smaller chans. Less movement, higher quality. Every country has its own chan, try foreign ones. I post in several.

std::algorithm

>stealing code off the internet with the comments removed and passing it off as your own to look smart
You're the real problem

Attached: Screen Shot 2019-06-26 at 12.50.52 AM.png (582x680, 106K)

>tfw no instruction or regisrer named sex

So how did V turn out?
Was it just another russian scam?

Maybe my posting musk is just too strong and the dumb summer kiddies recognize it. I’ll try the smaller chans. Maybe one day I’ll find a new internet home. My old one got nuked from existence.

Never claimed it was mine. Try posting it with the comments.

I posted it because it is interesting shellcode. Perhaps some user out there will see it and wonder what it is and find out what an egg hunter is. Spraying heaps and then executing an egg hunter to execute your sprayed payload is a great feeling.

smaller chans are worse than Jow Forums

>turn out
it's been like a day since someone brought it up

I don’t even care about the lang race anymore because I built one personalized for me that does everything I want for personal projects. All other langs are just for employment now.

been distro hopping, so i've missed the discussions.

It is less than a joke. Talking about it is not worth it.

ripip
oh well.

If you're not able to turn your database into a mmap-able array of structs, you're doing it wrong.

>learn a language
>brainlet when it comes to algorithms
how do i git gud?
i'm such a fucking shitter.

missed what discussions? why do you think there's been some development or something? it's going to be the same tomorrow and next week, in fact by the nature of patreon projects it'll be the same next year

just import the algorithms library, what, are you writing them yourself? I bet you do equations by hand instead of using a calculate

Try IRC too, lots of smart people on freenode. I even tried discords, it was nice but logging into the thing requires opening an email every time so I dropped it.

IRC is full of mentally ill people

And where do you think you are?

It's worse than Jow Forums because at Jow Forums you can keep them at arms length

>tfw functional fags are to stupid too understand loops

for (true) delete this;

What kind of mentally ill, conspiracy theorist, sjw, or seething rudeposter? If the first one that’s perfect.

Did something happen to you?

IRC is usually the first while Discord can have some of the second

#[derive(Debug)]
struct Foo {
x: u32,
y: u32,
}

fn main() {
let foo = Foo {
y: 1,
x: 2,
};
println!("{:?}", foo);
}

>Yui and Ayano
please post another one of those

thank you

reading and experience

>reading
I mean BOOKS

Attached: 1561476980731.png (1020x724, 363K)

Programming is just logic

kys

I wish I was smart enough to start reading programming books when I was 15. I usually just fucked around with code, started some project, made a huge pile a garbage code barely working and then dropped to project because I couldn't build anything from this codebase.
Internet tutorials made by wannabe gamedev are so fucking bad, you get meme'd by these fuckers who say "yeah just handle raw SDLK_W inside the mainloop, move it to its own class later m8".

Programming is applied math

I wish I even started programming when I was 15... so much wasted years

>create a permuted index
is this a fucking joke?
literally impossible.

fucking stupid garbage, i give up.

smart people dont need books

someday you will need to write an algorithm

wat

I started when I was like 11 but I don't feel like I would've understood the concepts in the books before I was 15. Between 11 and 15 I just fucked around trying to understand how a programming language works and made many mistakes by going through the tutorials too quickly.
desu starting at 11 or 15 shouldn't make that much of a difference, because you're assimilating things much faster when you're older.

>permuted index

What even is this

Just looked it up. Not even going to try this one. Looks like a gigantic pain in the ass.

>started programming at 14
>now know 10 languages and the tech

Based

>permuted index
A good algorithm is suggested in The AWK Programming Language by Aho,
Kernighan and Weinberger. That solution divides the problem into three
steps:

1. Read each line of the input and generate a set of rotations of that line.
Each rotation puts the next word of the input in the first position and
rotates the previous first word to the end of the phrase. So the output of
this phase for the first line of our input above would be:

The quick brown fox
quick brown fox The
brown fox The quick
fox The quick brown

Of course, it will be important to know where the original phrase ends and
where the rotated beginning begins.

2. Sort the rotations.

3. Unrotate and print the permuted index, which involves finding the
separator, putting the phrase back together and printing it properly
formatted.

Uh, so it's basically this

M E M E
E M E M
M E M E
E M E M

no.

Attached: kwic.gif (362x353, 8K)

Attached: kwoc.gif (354x364, 9K)

Lads,

can ya send me some legitimate means to learn C++? Videos? Any books? A couple pointers in the right direction would be amazing. Preferable if it's videos though, I do best with them.

do you know another programming language? if so go through the c++ tutorial they have really good reference pages.

videos are for brainlets
read this goddamn book

b-ok.cc/book/1313328/50b0c1

By the time you learn C++ it will be a new language and the language you learned will be deprecated. You might as well just avoid it and come back once you have programming fundamentals figured out. Maybe start with learning about computer hardware and how programs work. opensecuritytraining.info/LifeOfBinaries.html

I have sligghhttt experience in a couple, python, java, a little C++ experience. But I was a retarded younger person, and didn't realize how important it really is.
The C++ tutorial? Google didn't bring up anything.

But a video is much more engaging man. Like honest to god, I can pay attention to something speaking to me and moving actively than a book. But thanks for the book link, I'll try it a bit.

That's how Python was for me, I was learning 3.3.4, then it kept updating and updating. But C++ is a key language. I'm doing C++, then Ruby or Python, then Java.

Any video recommendations? Or really anything else? I'll take all the help I can get, I appreciate it.