/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: Object_Thinking.jpg (1380x1380, 799K)

Other urls found in this thread:

techempower.com/benchmarks/#section=data-r15&hw=ph&test=db
github.com/mach-kernel/vertx-polyglot-counter#benchmarks
youtu.be/MydhJVPEnzU?t=376
hackr.io/
better-dpt-roll.github.io/
qiskit.org/
twitter.com/NSFWRedditVideo

Deciding if I should use the O in OCaml

she seems to have invisible touch she

>What are you working on, Jow Forums?
Math, and I'm having trouble focusing on it. The fuck do you do when you start feeling overwhelmed and you cease functioning in totality? I'm lacking focus.

Don't.
You die,

>you will never learn to program
>professor let you pass a C programming course on the promise that you'd not take another cs class again
Hurts dude

Attached: 1512372010423.jpg (780x879, 585K)

Always use O in Onii-chan!

install Agda

>>professor let you pass a C programming course on the promise that you'd not take another cs class again
What the fuck did you do? Please tell this story

Attached: IZ02BPG.jpg (960x730, 71K)

I had the highest final grade of everyone in my C course.

threadly reminder that I love vert.x
techempower.com/benchmarks/#section=data-r15&hw=ph&test=db
github.com/mach-kernel/vertx-polyglot-counter#benchmarks
youtu.be/MydhJVPEnzU?t=376

I wanted to try out using TSX for concurrent programming and thought I had a nice use case for it. Then I realized my CPU doesn't support it.

Is all the vert.x shilling across /dpt/ and /wdg/ just you?

I've seen someone else do it too, but so far it's probably just 1-4 people

Threadly reminder that your way of programming is wrong if you didn't use visual studio code.

>using a text editor/IDE which is based on electron ever

there's literally nothing better than VS Code or i'd use it.

How does one program a gf?

Attached: Aerie.jpg (405x640, 30K)

For C# and python maybe but not for other PL

>Vim is trash.
>then theres uh...

So i'll continue using VSC until i make my own.

Good luck. Don't forsaken us and use electron to build it.

what the fuck is vert.x
plain vs is better than vs code for c#

of course not, it'll be vulkan based.

That funny because vs code is as plain as it gets compared to vs bloat

Because one is a text editor and one is an IDE

They loaned me a laptop and I managed to completely fuck it while failing to understand the basics of C and I can't even do fizzbuzz.

I guess my CS degree is over

Attached: 36___MmYeOx8.png (1222x1381, 959K)

>I managed to completely fuck it

Give some details dude

>Trying Atom because people from github said it's awesome, and easy to customize
>Takes more than 4 GiB memory
>4 minutes loading time
>Not even an IDE like Visual Slowdio
Is githubber retarded?

A toolkit to create build reactive systems / software
Fast as fuck, nothing beats it atm when it comes to performance for web servers / backend.
It's a great fit for any realtime project (iot, analytics)

>Using any more than nano or gedit as an (((ide)))

ishygddt

>iot
stopped reading too late

Wonder if he tried to install gentoo and libreboot

>not letting jetbrains give you code suggestions
>not using a comfy ide

???

ivan pls stop of shilling

jetbrains is my code-fu

I just want to learn to program

Attached: 1492373712171.jpg (1521x1107, 268K)

start with Go, lad.
it's brainlet friendly, and then you can try C again once you have the basics.

theres a huge amount of resources to get started, so unless you post something more than
>i wanna start
we cant really help you

I've been asked to make an Android app to filter content by making it impossible to search for by reading what words are typed and replacing inappropriate words.
Is this possible?

hackr.io/
this might be a though, *ckr and a .io domain

Sublime Text is also a thing

iirc it's written in C++ and uses Skia for rendering.

>Sublime Text
shan't be buying a TE.

I have the basics it's just that I still can't do anything

Attached: terrible.jpg (1200x800, 164K)

if you cant do it you dont know the basics.
count from 0 to 100 in pseudocode

Future proof code is written in C

*overflows your buffer*
*hacks your mainframe*
*bankrupts you*

if you're the guy who couldn't do fizzbuzz, you definitely don't have the basics.
otherwise, you just need to practice. go and code something, slowly ramping up the difficulty, try program something you can't make yet but can learn to

Who else here /quantum/?

Attached: Comfy.png (366x75, 2K)

A Python Runtime Environment in C.

Any book or text tutorial you can recommend to start?

Can I run it on IBM Quantum Computer?

The state of weebs

Is there a tightly packed model/mesh format that makes running it through fread() easier? fscanf is too general.

poorly :(

Attached: booboo.jpg (251x396, 14K)

I 100% do have the basics I just don't know how to make anythung. No programming book helps me I just blindly follow but can't make anything

no you dont fucking know the basics.
again. count from 0 to 100 in pseudocode.
after that, count from 0 to 100 but only output even number.
do it now or kill yourself

Go learn Python.

Like I said, you need to make things and build your way up. Before you can make "anything" (a proper project, I guess), you need to start small. I like to implement something simple like conways' game of life, and then you can add graphics and optimisations and such. Something like pong, snake, a simple web server, see better-dpt-roll.github.io/
And if you can't do that, go simpler, and go back to your fizzbuzz and factorial functions until you can

Without GIL?

But I don't know how to do that
I can do the basics but I flat out can't make anything that's the issue here

Nobody ever gets my issue they think I don't even know what a loop is

Attached: HOBBYBOSS_82911_1_72_Scale_German_80cm_K_E_Railway_Gun_Dora.jpg (750x498, 260K)

>Can I run it on IBM Quantum Computer?
they have a git for you to test your code on their Quantum Computer, but you need their permission to commit.

>Any book or text tutorial you can recommend to start?
google.com?

Also there are many quantum computer languages, the one i posted is QCL, which is kind of like quantum assembly, but there are many other quantum languages all being used, so just pick whichever one you think is worth your time, pirate a book on quantum mechanics and quantum computing, open up and editor or terminal, and get comfy.

I would recommend IBM's OpenQASM if you want an assembly-style language that can be run on D-wave architecture. Its written in python jtlyk.
qiskit.org/

I'm sticking with QCL at the moment because its the most like assembly, might try Q# in the future.

if you dont know how to count from 0 to 100 you dont know the fucking basics.
>Nobody ever gets my issue they think I don't even know what a loop is
because you obviously dont all you need to count from 0 to 100 in a basic manner is a fucking loop and a fucking print command

If you know what a loop is then why can't you count from 1 to 100 in psuedocode?

How does one go from reading an intro to haskell book to gaining an intuitive understanding of functional programming, and being able to write actual programs?

Attached: 1483884284130.png (1280x719, 818K)

I'm writing an n-dimensional vector class in C++ and I want to have named
accessors to the first few elements. The code I have so far:

template
class Vec1Base
{
protected:
virtual void initAccessors(T* comps){
x = r = &comps[0];
}

public:
T* x;
T* r;
};

/* Vec2Base and Vec3Base omitted */

template
class Vec4Base : public Vec3Base
{
protected:
virtual void initAccessors(T* comps){
this->x = this->r = &comps[0];
this->y = this->g = &comps[1];
this->z = this->b = &comps[2];
w = a = &comps[3];
}

public:
T* w;
T* a;
};

template
class Vec : public std::conditional::type
{
public:
Vec(){
for(uint8_t i = 0; i < dim; ++i)
comps[i] = 0;
this->initAccessors(comps);
}

/* Various methods omitted */

private:
T comps[dim];
}


As you can see it's very ugly, requires (hopefully) unnecessary storage for the
pointers and forces you to dereference the fields. There must be a way to do
something similar with a union, right?

Attached: 1389421021662.jpg (720x540, 46K)

some come from the examples.qcl folder for QCL:
cond qufunct inc(qureg x) { // increment register
int i;
for i = #x-1 to 0 step -1 {
CNot(x[i],x[0::i]); // apply controlled-not from
} // MSB to LSB
}

reading books on how to haskell, then reading books on how to functional programming

>books on how to functional programming
reqs? I read pic related for haskell

Attached: 71nF23YUpfL.jpg (1936x2560, 237K)

I don't know what to do. Whenever I'm asked to do any programming I just freeze up and can't do it.

Attached: 1_LORRgjX9DCW3_h4RCY6JIQ.jpg (1500x988, 1.06M)

how do you loop. tell me

Then you either have some serious learning disability or are plainly making up bullshit.
You've said you know about loops, so literally just give me an example of a loop.

Sounds like a brain problem. I recommend trying again in your next life; hopefully you'll be born with a higher IQ.

adding to this, smoke less weed. reduces your already low iq

how do i set up a git repository to be pushable (others can push to it) by other repositories on my local network

i know i can create another repository somewhere else with the --bare option, but am i not able to create a folder that has files in it as the 'master' repository in any way?

Give a man fish, he'll eat for a day, teach him to fish, well, you know the saying..
You need to learn how to break down and solve problems. Use critical thinking.
Hints for FizzBuzz:
"how to use a loop in c" "how to check if a number is divisible in c" "how to print a value in c"

youre replying to the wrong person. im asking him (the codelet) how to initiate a loop since he (the codelet) cant count from 0 to 100 in pseudocode

can someone link the programming project roll ?
im studying c and just want to test my knowledge

Attached: prog_challenges_v4.png (3840x2160, 1.61M)

it took me like 2sec to understand fizzbuzz
nigga are you sure ur ok ?
do you know what a remainder is ?
do you know what 'if' and 'if else' is ?

can you even make a markdown editor in C ?

I've never had weed in my life. I had to drop out of cs into math.

I just can't figure out programming. I know how to fizzbuzz and make tiny little bullshit. But I can't MAKE ANYTHING.

Attached: 1513458186243.jpg (736x1261, 69K)

What are some good methods of self education when you have limited time in your days?
>pic semi-related

Attached: 1418168273950.jpg (640x640, 129K)

make time. unless you're like in a situation where you have to do 2 jobs a day without time to eat, you probably can get 1 hour per day to sit down and learn

>I know how to fizzbuzz and make tiny little bullshit. But I can't MAKE ANYTHING.
but so far you havent done literally anything in this thread.
nothing.

Attached: 1521507331372.jpg (900x900, 59K)

user please. I just want to make stuff . I can't supply code because I don't know any languages

Who is that lucious little semen demon?

thats why ive asked you for pseudocode. stop trolling this thread please

me

I'm not trolling and I can't supply pseudo code right now ok? I just can't right now. I want to learn how to program. I want to make cool stuff. It's all I want

If you don't know any languages then you don't even know the basics. Stop being up your own ass and thinking you're above shit like fizzbuzz when this is the case.

Learning some web dev stuff.

Can anyone explain this error?
From documentation I feel like this is right...

var objectStrings = {};
objectStrings.words = [];
objectStrings.len = 0;


I add anonymous objects to the array
var functionInsert = function(strKey, strValue) {
// insert the property with strKey and strValue into objectStrings
if(strKey === null || strValue === null)
return;

objectStrings.words.push( {key:strKey, value:strValue} );
objectStrings.len += 1;
};


Then my delete function
var functionDelete = function(strKey) {
// remove the property with strKey from objectStrings
var i=0;
var len = objectStrings.len;
for(i; i

youre either trolling, the laziest motherfucker on earth or have serious brain damage.

loop (start at: number = 0; every interval check if: number smaller than 100; every interval: increment number by 1)
{
print number
}

theres some pseudocode.
now make it only print even numbers

I DO know the basics and I've programmed before but I feel saying I "know" those languages is an insult. I can't make anything

What part of i know how to do that don't you understand

How can you modify that pseudocode to print even numbers instead of every number?

The people not just handing you an answer are doing you a favor

>responding to who is probably also the " i want to hack in Lisp" autist
stop

see - I think you have too high expectations for a language you've pretty much never touched before, so do some intermediate stuff before you try to "make" something. Do you expect to be able to make a fully fledged software project in a language you have no practical experience with?

I already know how to do that
I know exactly what to do there .
But there's something wrong with my brain where if someone asks me a question on something in the manner you are my entire being fights against answering it.
Ok?

Just a fancy text editor, and plenty of those have been written in C.

so its brain damage after all. go see a doctor first, then learn programming

I just wanted to be able to program up biochemical models/ simulations is Fortran used for that???

I want to.make a Web browser in emacs!
I want
I just
I just want to be able to do what I wanted to learn when I first set out for college. Four fucking years and I let me younger self down. I don't know why I struggle so much with programming
I just want to kill myself

I want to learn to program. You won't insult me and block me from achieving a childhood dream