/dpt/ - Daily Programming Thread

Previous Thread: What are you working on, Sup Forums?

Other urls found in this thread:

kotaku.com/5975610/the-exceptional-beauty-of-doom-3s-source-code
en.wikipedia.org/wiki/Turing_completeness
twitter.com/AnonBabble

TRAPS!

Why is this macfag posted here?

Third for C(ute).

Lain is female, retard.

I'm doing something where randomly generated (i.e. 99.99% shit) AIs fight each other, and I'm trying to figure out how to get drawing and simulating to not separate from each other.

The problem is that if I try doing window.requestAnimationFrame(battleStep); then that works, one simulation step per frame, except that because requestAnimationFrame doesn't wait for the function it triggers to finish before continuing the script, I can't return a value since it will try returning values well before it finishes.

What do I do?

Also, fifth for suicide by theobromine poisoning

ask me how I know about your mental illness

quality thread

Lain is an AI with no gender you pleb

Write a method that calculates the sum of two very long positive integer numbers. The numbers are represented as array digits and the last digit (the ones) is stored in the array at index 0. Make the method work for all numbers with length up to 10,000 digits.

I tried with

string number1 = Console.ReadLine();

int[] listofNumber1 = new int[number1.Length];
listofNumber1 = number1.Reverse().ToArray();

but i can't convert from char to int. Not really sure what to do

Not hw, i learn on my own

Let's all love Lain.

She has female personality, supertard.

"Choosing C over ML was, in retrospect, a profoundly unwise decision. We chose to be 'close to the metal' in an era of kilobytes, at the exclusion of more elegant approaches. The consequences of our near-sightedness, our failure to predict explosive growth in hardware, have been catastrophic and unshakable.

We are trapped in the belly of this horrible machine, and the machine is bleeding to death."

John Carmick, 2017

And? There are males with a female personality.

C was a milkshake
ML was robot
I like dicks desu

Used PyGaze to make an application which switches focus between windows (only works with Thunar at the moment) based which one I'm looking at.

The above was pretty easy; I'm hoping to make one which would do this across multiple monitors soon.

LOL when did Carmack became millenial shitter?

cant find the quotation anywhere
you have a source?

there's nothing millenial about FP

It's not Carmack, it's John Carmick.

why_would_someone_lie_on_the_internet.tar.gz

"Stop using C you lazy cat."

Jon Carmack

LOL faggot changed name to ride on Carmacks popularity, FP shitters really are desperate.

"C is so horrible I cried tears"
Jon Karma

You have to split the string. Split it into an array list and then parse each into an int and store it in the array

"C fucked my mom when I was 5"
J.Kramik

>C cucked my dad
ftfy

Who are you quoting?

Hence she looks and acts like a girl, but isn't one.

Lol the Doom guy?

Let's all love Lain

What's the best way to represent a many-to-many relationship outside of a relational database? e.g. a user can be part of many groups and a group can have many users. If I store lists of all the groups a user belongs to and all users I get the problem of keeping the two in sync.

I'm thinking that I could only actually store this information on one side of the relationship (e.g. only groups have a list of users that belong to them) and if my API requires me to get a list from the other side (e.g. list of groups the user belongs to) I would construct it on the fly based on the other lists, but that leads to very tight coupling between the two data structures.

I'm dealing with this in OO fashion now but the question is more general; I've had this same issue in C before.

tired of python, want to move to another language. python is a mess. version 2 vs 3 is irritating

ur'e mom

there's only one python

Criteria of the new language?
You can try Lua, Perl, Ruby, Java, C#, C++, C, Haskell, Lisp, Idris, OCaml and so on.

>Haskell, Lisp, Idris, OCaml
it's like you saved the memes for last on purpose

Germans thought the same thing about their country before 1946.

>I'm mentally ill

I placed all languages considering user's Python experience, i.e. scripting languages first, then general-purpose languages, later languages with alien (for a pythoner) paradigm.

You forgot Golang.

Well in a database you would put in a mediary and make it two one-to-manys any chance you can work that out?

Rob Pike is faggot and go is shit.

pointers

>go is shit
It's not great but it's better than half the languages listed.

For storing 3d models for OpenGL, .3ds or .obj?

First half or last half?

.trash

Last part and Ruby.

.asc

>An ASC file is an armored ASCII file used by Pretty Good Privacy (PGP), an encryption program used for secure communication. It contains a digitally signed message and may store plain-text written information, as well as binary information encoded as text. ASC files also include a key as clear-signed text, which can be verified using PGP authentication methods.
??

Is go really better than Lua? I mean they're in completely different domains generally... but LuaJIT is fast as shit. I wanna see a comparison now.

.wav

>Is go really better than Lua?
No, Lua is one of the better languages in That said they're meant for completely different application and one couldn't replace the other.

"C destroyed my life: The weak typing; the pointer magics; the lack of string; the imperative paradigm... All of this led to my dad being cucked by C, my boipussy being raped by a magical broomstick, and my mom to gain a gazillion lbs of pure fat. I'll never ever recover, NEVER.."
JON Kmircka

>read up about C++98
>mfw
Since when it became popular to hate C++? C++98 seems to be a decent C extension.

lua
trust me

don't be retarded

"I come to estados unidos on visa, work on shooting game, many years go by, many regrets tambien. C es no bueno"

- Juan Carmacho

10/10

Lua is a great language

>designed due to genuine needs and not memes
>portable and very effective at solving problems in the domain it was designed for
>not bloated over time to try and fit ALL THE DOMAINS
>finds some specialised applications in other domains regardless

I thought the wall was supposed to prevent this from happening

/topic

"C has to go back."
JK McMack

are there any C codebases that compile under -Wall

all of them

"J'ai programmé en C, et le résultat n'était pas bon du tout. Le C a ruiné ma vie!"
Jean Cark de la Mak

जावा मेरी पसंदीदा प्रोग्रामिंग भाषा है

"жaқcы бapлық eмec C. өмipiмдi қиpaғaн"
Джoн қapмaқ

where did this pajeet = java meme come from?

yus

Who said this?

I found this to be quite pleasing.
kotaku.com/5975610/the-exceptional-beauty-of-doom-3s-source-code

Anyone can recommend a good updated place/book to learn C#. I have been recommended "BEGINNING VISUAL C# 2012 PROGRAMMING", but as the name implies its dated and doesn't teach WindowsForms.

>Lua
Trash.
>Perl
Trash.
>Ruby
Trash.
>Java
Trash.
>C#
Trash.
>C++
Trash.
>C
Trash.
>Haskell
Trash.
>Lisp
Absolute trash.
>Idris
Acceptable.
>OCaml
Trash.

ur shit

>trying to figure out why screen blit is taking so long
>run callgrind
>signal is having a huge cost
>remove signal
>screen blit goes from 50ms to 4.2ms

who are you quoting?

this meme has gone too far

>What are you working on, Sup Forums?
Python-like C parser, so I could write without brackets.

>meme
Oh, I see. That explains your retardation quite well.

1$ has been deposited to your bank account

can dpt be about programming and not about idiots shitting up the thread with "who are you quoting?","reddit spacing", or "using c++, post discarded"
that isn't discussion, it's fucking annoying

No. You can leave now.

@59636863
>animooooooooooooooooooo

This isn't related to /dpt/. If you act like a retard, people will treat you like a retard.

so you've directly stated you don't want /dpt/ to be about programming, why are you even here yourself?

>/dpt/
>About programming
Haha

Either that or I simply disagree with your word games and want you to stop replying to me. I don't associate with your kind.

There's the simple test for a programming language. If you can make a search engine, a driverless car AI, a mobile OS and a browser using the language, the language and its paradigm are not worthless. If you can't, the language is a /dpt/-tier useless shit.

How long till lain is real so I can hold hands with her?

en.wikipedia.org/wiki/Turing_completeness

>tier
Stopped reading right there.

„Ich habe in C programmiert und seitdem ist mein Leben ruiniert.”
- Johannes von Karmack

Are you implying you somehow need Turing completeness for most of the things he listed?

>you don't want /dpt/ to be about programming
lad, dpt is about animu and traps; back to rebbit pls

I guess I'll have to go with Microsoft Virtual Academy.

>If you can make..
So pretty much only python and any other non-turing complete language is shit?

In C++, does a particular type of object always have exactly the same size?
Is the object in memory stored as the method table + all member variables?

Do you even know what Turing completeness is? Doesn't seem like it.