/dpt/ - Daily Programming Thread

What are you working on, Sup Forumsirls?

Anterior thread:

Other urls found in this thread:

vim-adventures.com/
en.wikipedia.org/wiki/Causes_of_autism#Vaccines
ghostbin.com/paste/q6u3c
twitter.com/SFWRedditImages

Building a CPU where implication is the lowest level thing.

Who said this?

I'm working on getting used to programming in Vim.

I highly recommend vim-adventures.com/

I feel like I am not autistic enough to be a good programmer.
Is it possible to acquire autism somehow?

Who are you quoting?

Why are you asking it? That post didn't quote anyone.

What does this mean?

In , Anonymous wrote:
>Who are you quoting?

In , Anonymous wrote:
>Who said this?

Why do you keep asking the same thing over and over again?

Is it better than vimtutor?

Browse /jp/ for a while.

In , Anonymous wrote:
>Is it possible to acquire autism somehow?
According to some non-mainstream theories, vaccines may cause autism.

It means what it means.
I believe those are two different people.

In , Anonymous wrote:
>I believe those are two different people.
It's the same person, look at the usernames of the posts.

I feel like that's wasn't enough.
What kind of vaccines exactly?

In , Anonymous wrote:
>What kind of vaccines exactly?
en.wikipedia.org/wiki/Causes_of_autism#Vaccines

Indeed...
Now that you mention it, don't we also have a similar name?

I wonder who this mr. who claims to not be an e-moose is.

I believe that website to be directly controlled by the BBC and their like so I won't visit it.

In , Anonymous wrote:
>Now that you mention it, don't we also have a similar name?
Yes, you must be a dirty hacker. Get off my account, you cur!

How? You were completely fucking wrong.

is this how /dpt/ becomes shit?

Are you just flat out stupid?

In , Anonymous wrote:
>How? You were completely fucking wrong.
I don't understand what you mean.

I came back to /dpt/ after some months, and now it's somehow even worse. Where the fug did these shitposters come from?

sorry, im autistic

Cheer up. I'm sure tomorrow will be a better day.

Mods don't do their job to stem the blatant trash.

that's fantastic, user

Wow holy shit, how did you do that?

Generaly are cancer because they try to turn Sup Forums into reddit.

How can they, when stem is trash?

What are you going to mean by this?

Would it be better if we got our own board dedicated to programming? Kind of like /lam/?

I think you're going to have meant to have asked what he's going to have meant by that.

This question is completely unanswerable as-written.

is project Euler hard if you're not math inclined?

Remove generaly.

>if you're not math inclined
Sounds pedophilic.

Do some of the problems and find out if you're ready for them.

You know that only makes it better, right?

i studied anthro as an undergrad and it wasn't too hard. you need to develop an intuition for the thing each problem is presenting, but it starts out trivially easy and ramps up at a reasonable pace.

if you can't do it, calling yourself "not math inclined" would be an understatement.

>anthro
Was it worth it?

//Problem 596: Hyperball
int main(){
int x,y,z,t,r,cont0;
unsigned long long cont=0;
cin>>r;
for(t=0; r*r>=t*t; t++){
for(z=0; r*r>=t*t+z*z; z++){
for(y=0; r*r>=t*t+z*z+y*y; y++){
for(x=0; r*r>=t*t+z*z+y*y+x*x; x++){
cont0=1;
if(x>0) cont0*=2;
if(y>0) cont0*=2;
if(z>0) cont0*=2;
if(t>0) cont0*=2;
cont += (unsigned long long) cont0;
cont=cont%1000000007;
}
}
}
}
cout

Not programming related.

in my case, yeah. i studied digitally mediated cultures and got into one of the top ~10 CS PhD programs to do more of the same, and i'm really happy.

it very much feels like one of those things that if i tried to do again an atom somewhere in the universe would be in the wrong position and it would all unfold differently, though. so i strongly discourage people from trying to do exactly what i did.

Ha, don't worry, humanities are really not my thing, and I have no desire to go back to school again. I was just interested because anthro + CS seems like such an odd combination.

it's definitely weird and unusual. i had to show that i could hack it (not in the "lulz hacker" sense but in the "keep your head above water" sense) in a CS program, but i did that and it worked out.

my glib explanation to people is that CS has room (read: enough funding) to accommodate weird people like me who don't fit many existing molds. anthro, sociology, etc... don't really have a ton of funding for people who are weird and don't conform to their existing sense of what a good anthropologist is/does, so there's only a certain amount of latitude for people to do interdisciplinary stuff (e.g. interviewing (which is anthro) and system design/building (which is obviously CS))

I'm making a stupid project management app because I wanted to learn react and how to test restful apis written with node/express. I like how easy it is to set everything up, and modern Javascript is even pretty nice but I miss types and real classes.

:~/python_programs$ python useLL.py
Traceback (most recent call last):
File "useLL.py", line 4, in
x.add(1)
File "/home/me/python_programs/LinkedList.py", line 12, in add
newNode.next = self.head
AttributeError: linkedList instance has no attribute 'head'
:~/python_programs$ cat LinkedList.py
class node:
def _init_(self):
self.value = None
self.next = None

class linkedList:
def _init_(self):
self.head = node()
def add(self, val):
newNode = node()
newNode.value = val
newNode.next = self.head
self.head = newNode

:~/python_programs$ cat useLL.py
from LinkedList import *

x = linkedList()
x.add(1)
x.add(2)
x.add(3)

print x.head.value
print x.head.next.value

:~/python_programs$


what's the right way to do what i'm trying to do? from what i can glean, it doesn't like that when i add a new node, that new node's next value is being set to None

Anybody know why my encrypt/decrypt is getting fucked up; I'm using curl and I'm just practicing out load balacing with php and apache. I know it needs to be encrypted but I was having a huge problem with openssl_encrypt().

I went so low as to switch to using a hard coded key; and then to simplify it I even went down to base64 (just to see if really was something other than the AES key/iv.)

No matter what I do I always get encrypted text back, it simply will not decrypt and I'm at my wits end (but need this problem solves :( .)

here's the code for it ghostbin.com/paste/q6u3c

help me Sup Forums

>"lulz hacker"

>not in the...

shitposters pls go

How does that negate the inherent redditry in saying "lulz hacker"?

I think you're missing an extra _ on your inits
try __init__ instead of _init_

as in i'm specifically saying i'm not talking about "hack it" in that context. the fact that i'm aware of language (which happens to predate reddit by kind of a long time, frankly) doesn't mean that i spend time there or subscribe to "redditry". it literally just means that i'm aware of the other connotation.

Legitimate question from someone who's in his second semester for compeng: is it worth learning C? My beginner compsci classes about syntax and basic bitch algorithms were all in C++, and my class next semester on OOP is using Java. However I want to make some software over the summer that isn't just command line calculators or programming challenges and apparently C is good at preparing you for that. Is there any big syntax differences between C and C++?

>is it worth learning C
Yes.
If you started on C++ then learning C will take you all of 15 minutes, and it's good practice to deal with pointers and memory allocation more forcefully.

>OOP
Go be retarded somewhere else, like at reddit.

not him, but if i started with C# how hard would it be to learn C++?

>tfw stuck on p. 1
fuck I'm retarded Jim, this is middle school shit

FFS, anonTurd!
the kid can't help that they make him take OOP as one of the classes in the degree program

It would take you much much longer, because C# is not based on C++ in the same way C++ is based on C.
It still wouldn't be a herculean task or anything, probably a week to get the syntax down and another week to cozy up to not having the CRE fix everything for you

i see, ty

int a = new int;
free(&a);

They can't really make him do that.

Do you know what degree requirements are?

They're different languages entirely, you wouldn't find most things you learned in C# useful in learning C++. Some basic syntax, maybe.

What are some programing projects that I could work on to make me a better candidate for entry level Networking jobs?

Yes. I don't see how anyone can force him to learn OOP without breaking some laws.

>He's not being FORCED to get a degree xDDD

Stop taking his bait, user-kun.

Who the f*ck are you quoting?

You literally said "they are making him learn OOP", which is equivalent to saying "they are forcing him to learn OOP". Which is quite a retarded statement to make.

What is the best decidable language? I don't care about it being self-contradictory.

F U N C C

>I'm legally retarded

speaking from experience, it helps. but that doesn't mean it'll be easy, per se. take away the garbage collector and reference types and they bear a lot of similarity (especially unsafe C#). hell, they're even interoperable to a degree with C++/CLI. but no matter what you're coming from, C++ is a bit of a rabbit hole, to say the least (especially if you keep up with the new standards, which you should). it shouldn't take long to get comfortable with basic shit, but expect to periodically discover weird little edge cases and idiosyncrasies for months or years to come

Oh well in that case..

Are pointers different in C? Is there really that drastic of a difference between memory management in C and C++ (mind you, I don't think I've done much in C++)?
You uh, really got me there I guess.

My tulpa disagrees with you.

>C++
Sorry, but kill yourself if you thought that was a good post.

y'all need to collaborate with some animation fags and develop some anime courses on how-to program
would buy

>buncha neckbeards pretending to be anime girls
What could go wrong

First we would need to develop an anime language.

You are genuinely fucking retarded.

I like her when I see her as autistic. I don't know if she's meant to be autistic though.

>Euler

Does your program work with the trivial cases?

I want to create a text editor in n-curses, but I have a dumb question, would it be possible to dynamically create LaTeX-like formatting?

Like, when you finish typing \lambda or \frac{\partial u}{\partial t}, it appears as a single character (as it would normally appear in a compiled TeX document), much like what Word does, but better.

What would some good books/resources be for this project?

Good evening, Sup Forums

Allow me to provide some background on what I'm working on. I am building my first large personal project. It's largely abstract at this point, but as i figure out databasing basics with sqlite, I'm getting to the first steps in actually constructing the fundamental c# classes I'm going to need.

For lack of a better word, i need to store a bunch of 'scenes', where each scene is just a specific instantiation of a certain class with different parameters set in different ways that sort of define each version of this object as 'scene1', 'scene2', etc...

How do i go about storing these scenes in the final project? I'm already using sqlite for another part of the program, so using that should be no problem.

Do I just store a set of parameters? And then somehow 'feed' that into the creation of these objects? What's The design philosophy around this problem?

>c# classes
How in the fuck can anyone actually be this brain dead? I'd like you to refrain from embarrassing yourself further please.

>Sup Forumsirls
trying to figure out how to join the more programming-capable gender

Lolis are the best programmers!

too late for me in terms of age, but i guess i could still change the gender

>gender
There is but one overarching factor in programming capability, and it isn't gender, anons.

?

i don't think i can afford that much gold, but at least it wouldn't involve changing the gender

What's the matter, struck a nerve, did I?