/dpt/ - Daily Programming Thread

What are you working in, Jow Forums?

Last thread:

Attached: 1492871261247.png (363x572, 300K)

Other urls found in this thread:

github.com/johnch18/vm_v1
princeton.edu/~rbenabou/papers/Religion December 1g_snd.pdf
nber.org/papers/w21052.pdf
nature.com/articles/28478
diyhpl.us/~nmz787/pdf/The_Relation_Between_Intelligence_and_Religiosity__A_Meta-Analysis_and_Some_Proposed_Explanations.pdf
economist.com/news/international/21623712-how-education-makes-people-less-religiousand-less-superstitious-too-falling-away
en.wikipedia.org/wiki/Header-only
godbolt.org/z/4IMmSD
twitter.com/NSFWRedditVideo

github.com/johnch18/vm_v1

God damnit OP you made this thread before the bump limit

Thank God that argument is over.

Attached: 1536865050747.jpg (500x598, 53K)

religion is dumb

Jth for J
+/ i.&.(p:inv) 20000pp

based and redpilled

The last thread is a dump, it doesn't even count as a /dpt/.

FUCKING
BASED

thank goodness that thread is over
Why do christcucks ruin every thread they touch?

Fuck those ps should be 0s. That should be 2000000. Fuck phone keyboards

God isn't real by the way
Glad we cleared that out

but he is

>Thank God
TRIGGERED

Honestly looking for an interesting C project to start on. Still looking for ideas.

reminder to report the spillover

Daily reminder it has been empirically proven religiosity stifles scientific innovation.

princeton.edu/~rbenabou/papers/Religion December 1g_snd.pdf
nber.org/papers/w21052.pdf

Daily reminder the overwhelming majority of leading scientists are atheist

nature.com/articles/28478

Daily reminder religious people are less intelligent according to dozens of studies.

diyhpl.us/~nmz787/pdf/The_Relation_Between_Intelligence_and_Religiosity__A_Meta-Analysis_and_Some_Proposed_Explanations.pdf

Daily reminder religious people are less educated

economist.com/news/international/21623712-how-education-makes-people-less-religiousand-less-superstitious-too-falling-away

Religious people are literally a lesser breed of human

Attached: mooney1.jpg (630x750, 73K)

Write a C program that inverts cases of a given string
hard mode: no third party library
This should keep you busy for a week or two

Attached: Screenshot from 2019-02-12 11-21-56.png (452x164, 13K)

have you ever made a lisp?
any stories to share?

correlation != causation

I once hit a kid with a frying pan and after he got out of the hospital he developed a speech impediment

Still doing my python data structures garb. Next sem going to be doing C finally. Is there a good compiler that isnt gcc lol
Terry would hate to see you guys arguing like this.

*tips fedora*

Attached: jpg.jpg (500x638, 43K)

did he start programming in lisp or did his brain recover

Cope

Yes, it was complete shit but I learned a lot.

nice argument

(defparameter lst '((1 2) (3 4 5) (6) (7 8)))
(loop for x in lst nconc x)

What's wrong with this code, Jow Forums? Keep in mind that under real conditions (with a complex actual lst rather than this example), this can cause the repl to never respond.

Haha, thanks. I'd like a challenge.

if ! person.thoughts().is_contained(book.thoughts::()):
assert person.tips(fedora)

Attached: 1544409177373.png (636x773, 14K)

You sure proved that the magic man is real

what language is this

>the religion argument is spilling over into this thread
Is this the end of Jow Forums?

Attached: 1529219174303.jpg (800x450, 153K)

Some shitty DSL christ nuts are programmed in I guess

how does darwins penis taste in your mouth?

I know I’ve let you down...

Blame this retard

Attached: Screenshot from 2019-02-12 11-31-15.png (1058x204, 26K)

Don't start what you can't finish

Attached: 1517631511592.png (330x189, 19K)

Is std::variant typically implemented using a vtable?

Attached: case_fn.png (716x184, 21K)

>screenshotting your own post

>The ++ operator was invented by [Ken] Thompson for pointer arithmetic. We now know that pointer arithmetic is bad, and we don’t do it anymore; it’s been implicated in buffer-overrun attacks and other evil stuff. The last popular language to include the ++ operator is C++, a language so bad it was named after this operator.
Is it true? is ++ really that bad?

Why does Jow Forums recommend SICP?

you've sure proven he's not

nice reddit 'humor' you have there, nigger.
so quirky and randum lol

It's called being a chad

No. It's implemented like this.
struct Variant
{
int tag;
union
{
Foo foo; Bar bar; Baz Baz; // ...
};
};

some guy single-handedly destroyed the gw2 thread on vg and they couldn't do anything to stop it other than just stop making the thread

I'm really surprised someone hasn't destroyed the whole site with spam bots and pajeet captcha solvers

>increment operator designed for pointer arithmetic
>pointer arithmetic bad
>increment operator bad
I dont think this is true user

Then what is the "gen_vtable" call that clang is emitting?

>magic man is real because you tip fedora xD

Attached: 1549453119433.jpg (450x450, 28K)

Where are the jannies when we need them?

The thread was fine until the triggered atheists began trying to talk sense into the deluded Christians.
>these people are irrational
>let's reason with them

Lurk more before you post

Too busy mass-deleting images in the desktop threads.

Structs in C++ are the same thing as classes. You can derive from them and thus a vtable is needed on every class even though indirection through the vtable can be optimized away in some cases.

>some guy single-handedly destroyed the gw2 thread on vg
Story?

*tips*

Robotics user if you’re still out there can you post more about your project

unironically this

Attached: 1549007875199.png (200x275, 76K)

Fuck off retard. You only get vtables if you have virtual functions, which variant doesn't.

Can anyone decent at C tell me if I'm doing anything retarded with my project? I want to make the code idiomatic and well documented as an exercise.
Me:

post(feelings.hurt() ? meme : nonsense);

>You only get vtables if you have virtual functions

Attached: 1549534376024.jpg (600x1147, 66K)

No. You always get a vtable. Whether or not it's used is another story. Inbred.

Why do the sjws come here to shill Rust and attack God?

You're using C. Of course you're doing things retarded.

Make a CHIP-8 interpreter they said. I don't even know where to begin

Attached: 1347526353304.jpg (782x581, 70K)

O B S E S S E D
B
S
E
S
S
E
D

>functions in the header
that's a no-no

Try inspecting the object code for once in your life, then maybe learning the language you purport to know.

Rent free.

en.wikipedia.org/wiki/Header-only

>I have a superior IQ
>I only look at the facts and logic unlike the feeble minded nigger cattle like YOU that believe in silly things that are neither observable or testable
>I believe in evolution
>y-yes, I concede evolution is neither observable or testable
>b-but I have faith that if I could live for 6 gorillions of years I could observe and test evolution
>you can't prove that it is not observable and testable because you won't live that long
>checkmate

Attached: supreme.png (1484x1080, 1.59M)

Yeah it's always been a bad habit of mine, I'll seperate them out after I get some more work done.

>Le C is cringe meme
You must be over 18 to post here, user

What? Definitely not true for clang, GCC, or MSVC. I don't know about ICC but I suspect that it's the same.

>evolution BAD
>meme man jumped out the heaven and dropped on earth naked GOOD

Attached: 1547998446687.png (882x1025, 246K)

First of all, question how you would implement this for yourself. How do you write the copy constructor for a variant?
The answer is that you do something like this.
Variant::Variant(Variant const &other)
{
this->tag = other.tag;

void (*type_erased_ctor)(void*, void const*);
type_erased_ctor = lookup_table[other.tag];
(*type_erased_ctor)(&this->storage_union, &other.storage_union)
}
lookup_table is a static (possibly constexpr) array of function pointers that implement operations that must be supported like copy ctors, move ctors and dtors.
Clang refers to this static array as a "vtable", though it's different from C++'s built in notion.

Imagine being a militant atheist.
Now imagine thinking it makes you cool.

You are wrong in msvc and clang. Also wrong if you use the right flags in gcc.

forth is the sacred language brought down from the gods to give us a divine introspective into the heart and very soul of computers. The essence of computers is upon us.

Attached: 1543008897370.gif (700x285, 3.38M)

Stop posting misinformation, retard.

I posted a few threads ago, thanks for the good discussion that followed it. Maybe I should post another question to get the people arguing about religion to focus on something else....

Attached: 1544688994152.png (637x399, 263K)

God uses Python.

Fucking ace. Thank you

>still stuck in the artificial evolution vs. biblical creationism false dichotomy
thanks for outing yourself as a retard
make sure you vote democrat next time :^)

apex kek

You can go in O(log n) by realizing that it's an integer array and using the pigeonhole principle.

No wonder the world is so shitty

God uses several languages. He prefers DNA when targeting wetware.

You are wrong.
godbolt.org/z/4IMmSD

What is that glorious font?

IBM PLEX

Thank you, user!

>firing squad
>hanging
>quartering
>keelhauling
>guillotine
>the rope
What's the best approach for dealing with bad programmers who write bad code?

Attached: 885x516.jpg (885x516, 75K)

Promotion to management

Now that's what I call memory safety.

I'm going to marry aoba!

congratulations

Congratulations on your engagement