/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

github.com/python/typing/issues/258
cslibrary.stanford.edu/102/PointersAndMemory.pdf
youtube.com/watch?v=g24fkMZMshk
twitter.com/NSFWRedditGif

First for D

FUCK THAT FUCKING IDIOT PIECE OF SHIT BOOK
LITERALLY RANDOM GIBBERISH FUCK FUCK FUCK

cute girl, whats her name?

>attacking the book and not the rest of the picture
that's a first


i agree

There's nothing wrong with K&R.
K&R is perfect.

if C's perfect, how come people have made new languages to avoid it?

Because pointers and manual memory allocation scare numales and women.

Anime isn't real kiddo

what about object oriented?

OOP has ruined programming.
Also, any OOP features worth using can easily be implemented in C through struct pointer abuse.

OOP was practiced long before it was called OOP.

tell me op, do you have a script which tells you when a /dpt/ thread reaches 299?
I'd have a higher opinion of you

FUCKING GIBBERISH LITERALLY CAN'T BE UNDERSTOOD
SHIT FUCKING IDIOT PIECE OF SHIT BOOK
LITERALLY USELESS

>i'm retarded

IIRC bump limits in Sup Forums are 310.

How someone can consider himself useful at programming without knowing a thing about dynamic memory allocation, and data manipulation through pointers?...

>all future OS' will work the same as the ones of today

you know what would be funny, if OP was a sophisticated troll
OP bought a Sup Forums pass
OP made a script to detect when a thread reaches bumplimit, if it had, it calls the "makenew dpt program"
always with himegoto or whatever her name was

Seems legit

You know what would be funny?
If you had bought a Sup Forums post
And then you made a script to run extremely irregularly, say every month or so, it calls "make new post saying this"
always with makenewdpt or whatever its name is

People made new lenguages because the need of specific features to specific needs... C++ can solve a lot of things... but no everybody can learn it...

rate my function Sup Forums

def serverLookup() -> [Server] :
servers = sql("SELECT name,lat,lon,status,ip4 FROM servers")
Servers = [ Server(*server) for server in servers ]
return Servers

NO THE BOOK IS RETAARDED

Is the dynamic typing meme, dare I say it, finished?

github.com/python/typing/issues/258

When faced with greatness, weak souls often turn away.

No

DOZO!

Only a matter of time before TypeScript is subsumed into the ECMAScript spec

Does she have Down's?

yes, actually

>girl

>dynamic memory allocation, and data manipulation through pointers
is K&R a good resource to learn that ? Or is there better resource for those specific subjects?

His name is Hime Arikawa.

cslibrary.stanford.edu/102/PointersAndMemory.pdf

Read Understanding and using C pointers.

3/0, would raise div by zero interrupt again.

I'm using a boolean to map a gender in my employee class, obviously using true as a female, and false as a male, cuz all mens are liar :^)
I bet this could land me a job in google.

What language?

>all mens are liar
But you are a man and you just said that all men are liars. Doesn't this create a logical paradox?

being a liar doesn't mean you always lie

Help me choose a programming language, Sup Forums

I'm a senior in Aeronautical engineering and would like to become a structural designer. I only know some MATLAB, what would be a good language for me to learn? C?

someone give me an IoT memeproject to do with my microcontroller

C#
Probably, it could mean I'm lying about all the mans being liars.

>bool
>job at google
No. You better use an uint64 you fucking shitlord.

except databases user, oop is actually really good there.

If you're in C# you should just use an enum

looks like js too

>I use /dev/null db

0 - male
1 - other

can't go wrong

I don't like enums that much, since the definition of the type must be knowed everywhere I'm going to use it.
A bit, just because I'm relying on "var" and LINQ.

Actually how do Functional Programming languages handle multiple database abstractions?

It seems like a curious conundrum, they would need to create an abstraction, how is this done in FP, and how is it not considered OOP?

And classes have to be known everywhere they are going to be used, what's the difference?

You got me there, but it's a simplistic case so it's not worth using an enum, I know all the advantages of using enums but I'm lazy.

ty anons

Java

C, yes

>reading the spec
>"hey this is pretty well thought out, this guy knows his shit, it's just too bad they'll pick over all the little details and never accept--"
>username is gvanrossum
>IT'S HAPPENING.webm

What about fractional genders?

You're not a tripfag, go away bidet

Learn C, get good at it, learn C++, and then ignore all languages newer than C++ because they're all useless memes

Which C++?

>What are you working on, Sup Forums?

A raytracer.

I'm trying to sum up the columns in a 2D array.

I can sum the rows, no problem, but how would I go about summing up the values in the columns?

Knee jerk reaction is to make a new 2d array and store each column value there then sum those rows since they will be columns, but instincts say that this is retarded and inefficient.

fix your gamma

Why?

because it looks like shit

Well, I'm working on it, but I still don't see what's the problem with the gamma, none of the colors defined in the materials even goes above half intensity.

it should look more like pic related, look at slither.io and how shitty the graphics look compared to other games, it's because it's not gamma corrected

Done, but besides being brighter, I don't see how it's an improvement, I could have tweaked the materials instead of post-processing the result.

Do genders form an entire field?

(defun postfix-to-sexp (&rest args)
(prog (item stack)
START
(if (null args)
(if stack
(return (pop stack))
(return NIL)))
(setf item (pop args))
(if (numberp item)
(push item stack)
(let* ((arg2 (pop stack)) (arg1 (pop stack)))
(push (list item arg1 arg2) stack)))
(go START)))
just kill me

>I could have tweaked the materials instead of post-processing the result.
no because then you get this disgusting mess

youtube.com/watch?v=g24fkMZMshk

everything is too dark and when you do have bright parts, they fade off to darkness too quickly, it's trash

nvm
(defun postfix-to-sexp (&rest args &aux stack)
(dolist (item args (if stack (pop stack)))
(if (numberp item)
(push item stack)
(setf stack
(cons (list item (second stack) (first stack))
(rest (rest stack)))))))

I hate my code right now and I know it can be improved, but I don't know where to start. maybe I should throw out the whole function I'm working on and rethink the approach. also I think i should drop the current OOP way of doing environments because it's led to some ugly ass code.

I don't know, gamma correction looks too bright, and it's not accurate in regards to the scene settings.

Everything is too bright in your pic, and it makes you unable to discern facial features, like eyelids.

Me and my colleague offer a code improvement service. We will improve your code for $6/hr.

There is only one true C++, and that is ISO C++14.

So at work in my downtown I've been messing around with C#. I wanted to start using it at home so I installed Visual Studio 2015 Community Edition and I went into start an ASP.NET MVC 5 project but I only have options for MVC 4. Pic related.

Anyone have any idea what I can do to fix it? My googling hasn't been particularly effective.

So what does Sup Forums think of my setup?

The code's not great but I'm kinda just starting out

>pic related

Crap, forgot the picture. Here it is.

you're using Fedora. Good choice

Yeah, I dun fucked up.

>Fedora and C.
mein nigger.

the upper half of the head pic is the gamma corrected one, the lighting is done in linear space and then converted to gamma space

look at this pic, which sphere looks "half intensity" to your eyes?

I'll be honest this is pretty fucking comfy
Got any decent iconsets?
I'd kinda like to get rid of the defaults, they suck just a teensy bit too much

No thanks, Rajesh.

and which one more closely matches the relative brightness levels of a picture of the moon?

I see what you mean.

The upper sphere is at half a pixel intensity but the eyes perceives it as being darker, while the bottom on is brighter but looks like a more neutral gray.

...

...

yeah well I can still fap to it

any thoughts on the code?

Been doing some low level Serial struct parsing with Python and C (using SWIG and ctypes as the glue). I'm even amazed myself how I got everything working. Seemed like impossible a week ago.

gb2 >>Sup Forums retard

Don't start shitting up the one thread on Sup Forums that's not shit
Please, this is all I have left

Shut up poltard.

...

b-but I'm not a poltard, I just don't want shitposting in the one good thread on Sup Forums
I mean I guess /fglt/ is okay but it's not good

I'm guessing things like Haskell's typeclasses or Rust's Traits could be used for this.

>rust
>functional