/dpt/ - Daily Programming Thread

old thread: What are you working on, Sup Forums?

First for C.

Project with angular front end, mvc/aspnet c# backend. Been working on it for a year and we are going live in a month. No personal projects atm though

third for why the fuck is emacs still single-threaded

Lisp is beautiful. But not that code. If you knew lisp you'd know that code is pure evil. I thought he wanted his homework done for him so I gave him a solution that would be absolutely useless for him. If a student pulled out call/cc on a homework assignment in my class, you'd better believe I'd be intrigued and want to talk to him about lisp.

So what arguments might you possess on the proposal that C is the god harboring language and all other languages are mere attempts to abstractify and dumb down the syntax for proto-human organisms commonly referred to as "normies"?

You must own yourself, spawnling.

c is the only programming language
take a fucking hint why linux uses it

because torvalds is autistic

torvalds didn't create c u fucking nigger

What does it do?

Autists make the best prorgammers, though.

web app. Not intranet, but set up specifically for employees. Manages paperwork, file uploading to an external file server, assigning courses and tracking the completed work for each user and each tree of subordinates from any given user. Also set up built in localization. The permissions are fucking horrendous and the user stories are huge novels of contradicting and nonsensical details. Been working on it for a year

I would say it's currently around 100,000 lines of code

Employed Haskell programmer here

nice

>Lisp is beautiful
For a commie tard language.

Why does it have to be in the browsers and not just a standalone program? Is this how every piece of software will be made? I don't like this mang.

my suicide note.

when you say the haskell programmer is of type employed, is 'employed' type a monad or a real job. also where does a haskell programmer work?

>multithreaded text editor
why

it's not an ide, doing that makes no sense
, besides don't GDB, make, and REPL plugins/commands spawn their own processes anyway

>where does a haskell programmer work

i mean, if you want thousands of employees across the country working with the same data, you don't want it to be installed locally. You would have to have a central database somewhere anyway, no point in having the software installed on every computer when you can host the webserver with the database and make it a website.

is anyone here autistic enough to have learned Terry Davis's HolyC?
if so, what's it like

sure, but it would be nice if I print out a few 100K/MB of text and not have my entire text editor be useless for the next 30 mins
pic unrelated

>Yes sir i did give you a burger, there's just nothing occupying the burger space right now because the cook told me order up without passing the burger immediately sir. I COMPILED CORRECTLY GOD IS TO BLAME

we should write our own editor :^)

with spacemacs keybinds by default and malbolge as an extension language :DDDDDDD

movups m0, [expq + offset_pq] ; exp[p0].re, exp[p0].im, exp[p1].re, exp[p1].im, exp[p2].re, exp[p2].im, exp[p3].re, exp[p3].im
movups m1, [expq + offset_nq] ; exp[n0].re, exp[n0].im, exp[n1].re, exp[n1].im, exp[n2].re, exp[n2].im, exp[n3].re, exp[n3].im

movu m5, [lutq + offset_pq]
movu m6, [lutq + offset_nq]

mova m15, [mask_5]
vgatherqpd m3, [inq + m5*8], m15 ; in[p0].re, in[p0].im, in[p1].re, in[p1].im, in[p2].re, in[p2].im, in[p3].re, in[p3].im
mova m15, [mask_5]
vgatherqpd m4, [inq + m6*8], m15 ; in[n0].re, in[n0].im, in[n1].re, in[n1].im, in[n2].re, in[n2].im, in[n3].re, in[n3].im

mulps m5, m3, m0 ; in[p]reim * exp[p]reim
mulps m6, m4, m1 ; in[n]reim * exp[n]reim

xorps m5, m14
xorps m6, m15

shufps m0, m0, m0, q2301 ; exp[p]reim -> exp[p]imre
shufps m1, m1, m1, q2301 ; exp[p]reim -> exp[p]imre

mulps m0, m3, m0 ; in[p]reim * exp[p]imre
mulps m1, m4, m1 ; in[n]reim * exp[n]imre

haddps m5, m5, m5
haddps m6, m6, m6
haddps m0, m0, m0
haddps m1, m1, m1


Is SIMD asm /dpt/-enough for /dpt/?

New

When python 3 removed input and made raw_input the new input so that you can only receive a string reply from a prompt... Has this made receiving integers from prompts less efficient?

In other words:
is
a = input('enter number: ') in v2
faster than
a = int(input('enter number: ') in v3

????

Is it against the rules if I show the game I've been working on? You have a house in a town and the goal of the game is to kidnap little lolis from around the town (there's a park and a school right now), and you take them to your basement. I've got the barebones of the breeding system done now, every loli that is spawned by default has random eye color, hair color and skin color., but the ones that will be birthed will depend on yours and the mother lolis genetics.

How would you write this, /dpt/?

std::map::const_iterator pos = boneMap.find(name);

if (pos == boneMap.end())
{
return -1;
}

return pos->second;

I mean, does it matter? The difference in speed is going to be so tiny. If your program is going to bottleneck it's not going to be there.

If you are just curious, you could always create a timer before and after the operation and find out. It probably takes a fraction of a fraction of a second longer

>std::map::const_iterator
first off I'd get an auto
but I have to question why you're using std::map

I don't think you can enter numbers fast enough into the input stream to actually see a difference anyway.

so they drove you out of agdg and now you're spreading your filth here?

(second (bonemap name))

It hasn't stopped you in the past sick tuck.

I am sending bones to the GPU. For this purpose, they need to be tightly packed into a vector. I do not want to send the bone names to the GPU, because that is useless data for rendering purposes. I do, however, want to keep a map of names to bone-ids, because I need that for reading bones from model files (as parent-child relationships in model files are declared using bone names).

I would rewrite in a language which isn't complete garbage.

what are you gonna do with that? If you had made something that wasn't so retarded, you might have been able to show it off to an employer some day, but now you've gone and made something you can never show to anyone in person and have to hide all the assets from anyone that might use your filthy computer

The art isn't graphic or anything, how am I sick? I am merely satisfying the market.

what reasons might I have for using malloc in C++?

you might have to call some see that needs something that is free-able?
you might not want a constructor to be called for some reason?

r u a ju?

please tell me this isn't supposed to be a "dragon"

>I am merely satisfying the market.

as long as you're shitposting you're good on /dpt/

>he doesn't even now about hoops sepples goes trough when ever you use new
Some zero cost abstraction right there.

I'm pretty proud and excited about the genetics system I've implemented (mainly because I know next to nothing about genetics, but it has been a fun learning experience). I think an employer would be impressed with it.

Did you include racial IQ and behaviour?

nukes are a helluva drug

if you wanted to satisfy the market, you could go put on some booty shorts and stand on the market corner giving out 5 dollar hand jobs. You would have a better chance of finding someone who says yes than finding someone who wants to play your shit loli game

Why are coders, people generally perceived as socially inept and misanthropic, among the more tolerable people on this shitty board? Jesus Christ, there are so many arrogant teens/early 20s faggots on Sup Forums who think they understand everything when they actually don't know shit about anything. Really awful community.

that's a cool post but have you tried haskell? or are you still using lameass imperative oop trash from 12th century india

I know new uses it, but I was asking why might a programmer use it

>wow user thats super impressive. We want to hire you, but we had to call security because what you just showed us borders on child pornography

Yes. Yes. Yes. Yes.

I would play user's loli game.

You seem to be pretty angry at me for some reason, I can't imagine being so upset at somebody I don't even know for a game he is making that I've never played.

I definitely plan on implementing behavior, but right now the genetics system only affects physical traits of the loli. Here is an example of the traits you can view of a successfully kidnapped loli.

I remember these exact images being posted a year ago, filthy imposter.

this is pretty fucked up bro

not much progress maybe

do it

I cannot support this thread
as everyone knows, dragons represent satanic forces

I can 100% support the concept of Loli breeding tycoon

You could implement a market system where you can sell them globally to different buyers for prices based on dynamically changing desirable traits. Like, Arabs may pay great amounts for virgin lolis.

Then you could have a transport aspect of the game where you have to choose the best way to distribute lolis. Like, if you put 100 on a boat in a shipping container and 20 die on the journey. This triggers more 'heat' from police as part of the outlaw mechanic of the game.

If the lolis get elderly (18+), you can start whoring them out or chop them up and put them into feed for the current herd of growing lolis.

In Rust, this is just let int = boneMap.get(&name);

By using pig-disgusting exception-throwing methods, like any sepple piece of shit would do.

return boneMap.at(name).second; // could throw std::out_of_range, but who cares lol

The following function runs rather slow:

VertexBoneData emptyData;

for (unsigned int i = 0; i < amount; i++)
{
boneData->push_back(emptyData);
}


Amount in my current case is the number 3024. Is there a faster way to add a large amount of the same data repeated over and over again to a vector?

exceptions are considered harmful.

C++ is considered harmful.

boneData.reserve(amount);
Call this before your loop, you may be doing a lot of unnecessary reallocations.

Add `boneData.reserve(boneData.size() + amount);` before the loop.

Software sucks. That statement is more reliable than saying that the sun will rise tomorrow.

That sped it up quite a bit! Thanks!

for(int i = 0, n = strlen(plainText); i < n; i++){

//Get key 0-Indexed.
if(isupper(key[i])){
ki = (key[i] - 65) % keyLen;
}else{
ki = (key[i] - 97) % keyLen;
}
printf("K(i) = %i\n", ki);


Why do i get the result "1,0,2,4,3" instead of "1,0,2,14,13" when using the key "bacon"?
The first 3 ints are correct but the last two are ten lower then they should be.

All software is bad, but not equally bad. There is a difference between mediocrity and an infinitely dense void of confusing bullshit, of which modern C++ is neatly in between.

I'm going to assume because keyLen is 10.
Why are you even taking that remainder here?

Any people with experience with vulkan here? Can it really be true that you have to make an entire Graphics Pipeline for every set of shaders you have? Or am I missing something here?

I'm working on an automation tool which will automatically apply for jobs so that my unemployed ass can spend less time searching and more time shit posting.

productive. I like it

No, you're missing a lot.
You init your shaders first.
You then init a pipeline layout where you specify what your shaders consume.
You then init the pipeline itself and specify your shaders in VkGraphicsPipelineCreateInfo.
Then you write the fucking descriptor sets and descriptor sets layouts and you allocate them.

Then you're finally fucking done.

So much fucking boilerplate but at least its not openfuckgl.

> So much fucking boilerplate but at least its not openfuckgl.
Just use Unity :^)

Holy crap thanks dude. This actually clears up a lot

What language should I learn?
What socks should I buy?

>What language should I learn?
Depends on what you want to do.
>What socks should I buy?
Depends on what you want to do.

C.
White ones that go up to your ankle.

Release when

Rust/Haskell
Striped thighhighs

>programming in regular socks
shiggy diggy

>>programming in regular socks
Actually, I program barefoot most of the time.

I want something multipurpose to learn the basic principles with. The socks are for improved coding/comfort and occasional legposting.

Fucking disgusting.

>white socks
not pimpin'

in about 30 seconds if you keep that up

What

For people who use
void foo()
{

}
style in sepples, how do you write constructor initializer lists?

Why the fuck would I want to wear socks or shoes around my house?
Bare feet is more comfortable.

Give me reasons why I shouldn't go full ruby.
>like perl, nice for hacky oneliners
>like python, without whitespace and other crap
>human-readable code which makes fun to write

void MyClass::MyClass( )
: member1(1)
, member2(2)
, member3(3)
{
}

it's a German thing

because coffeescript exists

MuhClass::MuhClass()
: _muh_filed(0), _another_field(10)
{
}

Because programming socks improve your abilities.

Germans have different reasons.