/dpt/ - Daily Programming Thread

Linear Algebra Edition

Picture of slut:

Other urls found in this thread:

fastcompany.com/28121/they-write-right-stuff
godbolt.org/g/gdOlbw
hackage.haskell.org/package/base-4.9.0.0/docs/Foreign-Marshal-Alloc.html
ideone.com/MPVQbT
youtu.be/WDIkqP4JbkE
youtube.com/watch?v=ame2PH67gnk
twitter.com/NSFWRedditGif

>Created way before the bump limit
Delete this invalid thread.

tfw discrete math in the next semester

Bang my matriƧocks with your threadick as hard as you can user cuz' I love you! LinAlg is so much good stuff.

It won't murder you unless you suck at math. If you do suck at math, why are you in Computer Science?

5th for Haskell

long may she reign

i wana make video games

Discrete maths is infinitely easier than calculus though

I did a pure math project that I managed to turn into me defining a bunch of convex programs in Python.

Feels good man.

Questions for generous anons to answer.


When is one too old to start with programming?

Is it possible to become employable if one is learning from home for 6 months, say, 4+ hours a day, reading books, practicing, online resources? (considering one is not starting from 0... I already know HTML, CSS, and I did some programming in C and Turbo Pascal back in the day - so I understand the basics like functions, for loops, basic algos, while do, etc.)

What would be the best to focus on now to get employable ASAP? I imagine front-end web dev? Go the JS, nodeJS, ReactJS route ? Does this have a future or is it just a meme?

Thank you I just want to turn my life around I work at a dead end job now... ideally I want to work from home freelance some day, even if I don't make enough I don't care, just enough to pay the bills and live a normal life. I live in a very cheap country so that will help I guess.

I'm currently doing FreeCodeCamp.com's curriculum ... I'm also interested in data visualization (D3? etc) but I guess my foundation in statistics and maths is not sufficient. I have a Master's Degree in Philosophy (help me God)

Calculus is easy shit. Only if your discrete is dumbed-down af is it easier

Are you working on a video game right now?

pi * your current age / 3

Bachelors math is piss easy, if you find it difficult you should consider pursuing a different degree like gender studies

That's rude.

Reminder that the proper thread is still at 295 posts

Not him but what knowledge do I need to create a video game? I'd guess engines do most of the work, but I'll need some programming, and graphic artists, yes?
I'm a CS undergrad and got a small team of people from my dept, think we can manage to make an RTS?

Beyond the basic understanding of a game development cycle and basic math competence it's nothing particularly difficult.

However what is difficult is the sheer amount of work involved, people underestimate it to a ludicrous degree until they actually try it. Even the most bare bones basic RTS made in Unity is a few months of your time.

Wrangling artists, musicians and writers both managerially and financially is another kick in the teeth.

I'm studying bacc. CE right now and the only postgrad master's course this uni has is CS (atm, due to problems with govt funding). To fix that, they spread the course to 2 modules, one of them focuses on CE again as an extention of the bacc. one.
Discrete math just seems to be one of the mandatory classes on both modules.

And yea, I suck at math but I'm planning on learning everything over again, starting fron HS. Just gotta take care of enrollment right now

>not creating a geometric game like slither.io or agar.io and making money without needing graphics or music
why do you hate yourself ,user?

Because I'm a talentless, motivation-free waste of space.

Please help.

I've managed to learn how to do a whole heap of things and I simply haven't got the ideas or the motivation to use any of what I've learned.

...

"Real science" is for real faggots

You have to get mental discipline first
Pick up a daily meditation routine

>C:\
>"Command Prompt"
>not bash
GTFO back to /jp/ or Sup Forums

>Bash
Are you twelve?

I bet you use Ubuntu

>tfw i finally got my swapping certificate

What's wrong with Ubuntu?

babby tier shit, real men use arch

>le Ubuntu is for le noobs meme xD
Nasa uses Ubuntu for Curiosity rover

Holy shit

Kill yourself

>manhood is defined by the Linux distribution
Teenage autistic kid who never did anything in the real world detected
Keep writing those fizzbuzz C programs in your mom's basement you LEET kid

Go back to /jp/ Microsoft shill Pajeet

Why do you even bother replying to me if you can't give a proper answer? Please think before you post.

>microsoft
>shill
>pajeet
>/jp/
>teenage
>autistic
>never did anything
>fizzbuzz
>mom's basement
>LEET
>kid
>
>le xD

Wow you're really pulling out all the memes

And for everyone else, there's MicroSoft

Why does a rover need a desktop OS. I thoughts it would just be embedded chips programmed in C.

Seems like the safer option.

>C
>safe

>proper thread
>has a picture of some slut that never has written any code

Curiosity runs an embedded real-time OS

I am literally out of ideas.
And I am a bloody beginner.
Is there an incremental project list that becomes harder the higher you climb the ladder?

Just write a 2D platformer or something and keep refactoring and adding features

Just start with some automation of shit you usually do, or some smallish program that does something you want.
Also, if you're trying to learn, don't use libraries.

>Calculus is easy shit
>tfw ECE
>tfw barely scraped by in Calc III and I have to take EM Theory next semester

I want to set the 4 least significant bits of b to be equal to the 4 least significant bits of a, without changing the 4 most significant bits of b.
b and a are both unsigned chars.
b = (b& 0xF0) | (a & 0x0F);
Is there a better way to do this than I came up with? I feel like there is a bit-shift method to do this.

Safe as in you don't need to work on top of a giant code base that noone on your team completely knows.

As for writting code without defects, read this.
fastcompany.com/28121/they-write-right-stuff

b &= 0xFFF0;
b |= a & 0x0F;

>Is there a better way to do this than I came up with?

Not really.

> I feel like there is a bit-shift method to do this.

No. I mean, you could, but why? It's just more steps. Both in your code and the actual compiled executable.

k, thanks.
It's just that whenever I get stuck with some bit-manipulation and I look up a solution online, the solution is a one-liner containing bit-shifts.
Or at least that's how it feels like for me.

Anyone have any ideas that I can borrow?

I'm fresh out.

Implement n body simulator. Add graphics to it. Explore different numerical integration methods.

create a general AI

I'm mathematically challenged, seems like a real pain in the ass.

:^)

Exactly why you should do it. Also its great project for learning cuda or openmpi. How do you learn something without trying it out first?

>Anyone have any ideas?
>No, not that one

That's perfectly valid but it's almost certainly so far out of my comfort zone that I have very little chance of even getting over the initial hump.

I'm too much of a CRUD babby.

Anyone have any ideas that a complete pleb could actually reasonably achieve. I've got a few ideas of my own but they're so far out of my reach.

Create a GUI program that can auto tag and find duplicate images in your Sup Forums folder using CV and AI.

Lisp interpreter or if thats too hard Brainfuck transpiler?

Why should I use Python?

You shouldn't.

Unless you're a babby who has no interest in programming properly and just needs to do some basic automation from time to time of course.

to be fair python can be useful for sys admin scripts

Rate my memmove
godbolt.org/g/gdOlbw

>Been wanting to learn Python
>Can't think of any use for it.

Every problem I have I can solve in C, C++ or C#.

>His language doesn't have pointers
Even Haskell is lower level than you

Wait, Xamarin compiles to actual native code? I thought it compiled to JVM bytecode on android.

Is there any reason not to use Xamarin instead of android java even when only targeting Android? I'm better at C# than java.

Don't they mean Java by native for Android? Like it compiles "natively" to whatever platform you're targetting, which would be Java for Android?

Sup Sup Forumsents, I'd like to get into programming for real. I did the Python class on codeacademy and currently on the Java one, as recommended by some CS friends, but I feel like they dont teach you shit other than syntax. I could enroll in some uni classes but not untill january. Any good sites/resources online I shoud take a look at?

So I thought what I'd do was, I'd pretend I was one of those Python idiots.

I don't know, which is why I'm asking

Download unity and start making some games. That's how I started.

made me smile, have a (you)

ayy@lmao ~ $ python3
Python 3.4.3 (default, Oct 14 2015, 14:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... x = 0
... def f(self):
... self.x += 1
...
>>> a = A()
>>> b = a
>>> a.f()
>>> b.x
1

I can't think of any language that doesn't have pointers in one form or another.

I don't see any pointers user

Lambda calculus

How would you explain that the state of 'b' is modified by 'a.f()' if 'b' isn't a pointer to 'a' ?

I said pointers, not references

References are pointers.

No, they aren't.

They compile to the same thing so they essentially are.

Fair enough.
I didn't know Haskell have pointers, but isn't it just in the context of the C FFI though, and not the core language ?
I must admit I don't know much Haskell.

hackage.haskell.org/package/base-4.9.0.0/docs/Foreign-Marshal-Alloc.html

It's certainly not something you'd regularly use in Haskell, if at all.
It's for FFI as well as manual memory management

Most enjoyable subject of math for me. Deeper understanding of modulo helps me a lot to this day.

int size(QueuePtr q)
{
QueuePtr temp = q;
int size = 0;
while(temp->next != 0)
{
size++;
temp = temp->next;
}
return size;
}

Is that what discrete math normally means? My uni's discrete math course was purely set theory.

cs50 teaches C but also a lot of basic computing concepts including web stuff. There's also an introduction to python course by MIT though i haven't gone through that one yet so i don't know how good it is.

You can find both on edX

Should I Python or SICP? I can speak Java already

What personal ideas do you have?

>MIT LITERALLY replaced SICP with Python
How does this make you feel?

An app that makes fart noises when you shake your phone.
Tetris with dicks instead of bricks.
Abortion simulator.

Great ideas! The tetris remake is really intriguing.

I'd start of by making a tetris clone and then reskin the bricks. I think a sprite with three seperate images would suffice - one testicle image, one shaft image, and one head.

L/J:
[S][S][H]
[B]
I:
[S][S][S][H]
O:
[B][B]
[B][B]
T:
[B][S][B]
[H]
S/Z:
[H][S]
[S][H]

I'm not quite sure about the S/Z but maybe you can figure something out. I recommend you still tint the blocks in the standard colours, but with enough opacity to make the dicks really shine through.

If you get stuck anywhere while making the clone, just (You) me and I'll assist you. I can't help you with the sprites, since staring at dicks all day has a weird effect on me.

cout stringMember;


Why cant I dereference a string member from a pointer and print it on the standard output?

error text says no operator ""

cout stringMember);

Works just fine.

ideone.com/MPVQbT

youtu.be/WDIkqP4JbkE

Great talk on CPU caches

old news, post something interesting

>without coordinates: no matrix
>with coordinates -> MATRIX

what the hell does this mean

doesnt work

must be another problem with my implementation then, ill keep digging. thanks

The S/Z can be a bent duck.

youtube.com/watch?v=ame2PH67gnk

Yet a bunch of people still aren't aware of it

How many have seen linked lists in the wild?

What type is pointer? How is it defined? How is it declared? What type is stringMember? Did you explicitly include iostream & string or are they included indirectly by other standard headers?