/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: smokey.jpg (338x450, 134K)

Other urls found in this thread:

boards.4channel.org/g/index.rss
twitter.com/SFWRedditVideos

first for fuck niggers

Still on the road to learn every decent language that pisses off /dpt/

What are those languages?

hey /dpt/. quick question. is gcc *.c any different from compiling each .c into a .o and a seperate linking stage? does -flto change anything?

That's A LOT of languages

Every language /dpt/ has ever heard of.

If your project grows to more than a few source files, that's what you should be doing, invoking gcc for each object file and linking them as the final step.
You don't have to do this manually, that's what GNU make is for.

Of course - but im concerned about optimizations. Can the compiler make more optimizations if it has knowledge of all the source files at once?

Common Lisp, Forth, Ada, APL, Smalltalk, Idris, and Haskell

and C

only if you turn on lto

Nah, fuckers love C.

and Python

When creating the .o file, it must have access to every single header and dependency mentioned in that source file.
That's where it would get it's optimizations from.

and Java

Oi oi oi you can't just list every language.

Not me. And you won't either once you learn it.

I don't hate Lisp, just Lisp programmers

>c++ is extremely messy and hard
>C#/Java/js/whatever programmers make more money on average
Why would anyone use C++?

Some people need the absolute maximum performance. Most of the people using it don't but they think they do.

Why do you hate me? Just because it's an objective fact that my language is superior to yours?

wagekeks tell me what working is like please.
Is it really like prison and gets u depressed since all your free time is sucked away?
How many tasks a day are you supposed to do? Can you do other stuff like shitpost on the internet during work hours watch anime or some shit?

Attached: m3glb7edoumezzblhi9z.gif (220x307, 219K)

As the sibling poster said, doing "gcc foo.c bar.c" and "gcc *.c" is exactly the same re. optimization. Use -flto to activate whole-program optmization. To get even more whole program optimization you'll have to use PGO, which is a bit more effort than just setting a flag (but it can give a big boost for large and complex programs).

70% of /dpt/ hates sepples with all its might
30% of /dpt/ hates every language besides sepples

it's slavery
yes
as many as you can. ofc not, how else will your boss be able to afford his new yacht

>needing stdio

int printf(const char *s,...);

int main()
{
printf("Hello, World!");

return 0;
}

>your free time is sucked away
Free time I'd spend programming anyway, so whatever.

yeah but when its an obligation it feels shitty
on your free time programming you could just stop for whatever reason

and how would one fix this?

Haskell

What if you're too slow? Who determines when it is time to get fired? What if 1 guy on the team does all tasks and the others jerk off? Jesus work enviornments are such shit

it's like building a house. every guy gets a task to work on. it's not one guy doing everything while others watch

That all heavily depends on the workplace, but generally you're only expected to produce results. Doesn't matter if you watch anime for 6 hours and then miraculously shit out 2k lines of code in 30 minutes that work perfectly.
But it doesn't work like that, sadly, so you have to actively work.

It varies from company to company but in general, if you can convince them that paying you makes them more money than it loses them, then they have a good reason to keep paying you.

Worker ownership of the means of production.

Poor work performance is gauged over months, if you're consistently swamped or visibly the worst performing member on your team to the point where it drags everyone down, you'll get forced into a performance improvement plan which means you're getting fired in 3 months if you don't shape up.

>2k lines of code a day
that seems too much even for 8 hours

what if your code works but it's spaghetti code or a total hack?

>it's like building a house
>it's not one guy doing everything while others watch

Attached: 1556859969671.gif (500x566, 347K)

What blogs/forums/sources do you have an RSS feed for Jow Forums?
Asking for a friend.

I've actually already gotten C down, and I'm learning Haskell right now.

Some of these don't sound too bad an idea though

>productivity measured entirely in lines of code
>short concise code draws ire from your supervisors
>forced to act stupid and write everything out on seperate lines and hard-code loops to inflate my LOC count

Attached: KILL SELF IMMEDIATELY.jpg (597x597, 40K)

get a haskell job
i bet the seniors do the opposite and bully you for not having the tersest code possible.

>implying animefags have any real world experience

FizzBuzz
showPatternElem :: Show a => (a, String) -> String
showPatternElem (n, "") = show n
showPatternElem (_, w) = w

createPattern :: (Int, String) -> [String]
createPattern (n, w) = cycle $ (replicate (n - 1) "") ++ [w]

rules = [(3, "Fizz"), (5, "Buzz"), (7, "Jazz")]
patterns = map createPattern rules
finalPattern = foldr (zipWith (++)) (cycle [""]) patterns
answerList = map showPatternElem $ zip [1..] finalPattern

main = mapM_ putStrLn $ take 106 answerList

boards.4channel.org/g/index.rss

thanks everyone

>get a haskell job
>a haskell job
nice joke user!

I got a legacy php job and quit in 2 days

Attached: NYN_fuck.gif (82x128, 68K)

story?

>where are you going? you just got here 2 days ago!

That's why I said "miraculously". It all depends on the context, really. There's a project we havr where doing 100 lines a day is a huge success, and there are places which require lots of boilerplate, so 1k is normal for a conmit. Shit, yesterday I didn't push a single line because the design didn't pan out.

In case you're not larping, if LOC is a KPI you should run away as fast as possible from that place. No sane company uses it since 80s.

what if printf is a macro?

What shitty place do you work at where the dev lead measures progress in LOC rather than parts implemented?

If you were a real man, like Terry, you'd write your own printf instead of relying on glibc

Of course we don't. You were talking about 2k being a lot per day, and I replied that it all depends on what you're doing.

...

Awful thread.

epic fail
gave me lulz tho

God I wish that were me

Attached: 1546778844639.png (1280x934, 2.24M)

>As such, it is impossible to determine whether or not you are already stuck in that loop or if this is your life in the real world.
Just compute digits of an irrational number. If there is and end (or the simulation crashes out of memory (which you wouldn't feel because you're also a part of it)) you live in a simualtion. if not, and you can keep getting digits indefinitely, it's real

>lambda nonsense
every time

oh, my apologies

>let's test if we live in a simulation by assuming the church turing thesis is true

What is best syntax for array of type T?
> T[]
> [T]
> []T

Array T

is it not true?

T[]

I’m going to write drivers
On windows

THE REACT NATIVE BUILD

IS BROKEN AGAIN !!!!

Attached: 1548864310515.jpg (328x447, 14K)

What does /dpt/ think of the conspiracy theory that C doesn’t exist?

Attached: A4FDA43E-AF2C-43A9-9F7D-2BDEA78C435D.jpg (958x640, 466K)

I might be naming the wrong thing but if you're not sure whether or not we live in a simulation why the hell are you taking for granted that computation is limited to turing machines?

std::vector

Why don't you go back to your mentally ill board, /x/fag.

T[]

Why is Rust suddenly popular in cryptofaggotry?

[T]

I am not talking about computation time, but the machine has to have memory to store the already computed digits. Unless the machine has infinite memory, it will run out of it eventually

this but the name for the array type is @

array (Positive range ) of T;

>muh safety
Even though anyone actually interested in Crypto would be unironically using F*.

We live in something LIKE a computer simulation, but its not a simulation like the matrix. Multiple scientific theories are pointing to an information-based holograph from a 2-dimensional space mapped to a physical 3-dimensional space, which a constantly changing state mapped in an array across what we call time.

Comparing this to a computer simulaiton though is just our most modern analogue for this complex reality, the same reason we used to compare the mind to a clock and then to a steam engine (and now a computer).

Also this is all contained in a mind for a thesis-worthy length of reasons i don't care to list here, and this mind is God, because Thomas Aquinas was right and always will be because the fucker knew that infinite regress in a chain of causality must have some source.

print(roman_numeral(1994))
MCMXCIV


doing leetcode might try some hard problems i'm getting better at the medium ones.

Do any of these theories have any real-world backing, or are they purely theoretical wank?

>muh science
sorry but you've just committed the homosexual fallacy. any argument made by a homosexual is invalid.

backed by math and also quantum mechanics.

The holographic universe is mostly based on x-factors and spooky action from the theoretical side (string theory). So unless string theory is ever prooven you can take the holograph part (and the rest consequently) as a bunch of bullshit wankery.

yes but there are so many bounds of logic that you have to leap to believe this. it's like people who do drugs and experience poor rendering of colors, informational pathways, etc in their brain but think they're somehow seeing the fabric of what reality is built on.

if an input is damaged and a televisions display isn't rendered properly does that mean i'm seeing the inner workings of the encoded data? no i'm seeing a damaged version of it. druglets will never want to 'think' they want psychadelics to do that for them but they fail to realize it's all corrupted thought.

>because Thomas Aquinas was right and always will be because the fucker knew that infinite regress in a chain of causality must have some source.
you can't really know if causality was valid at the start of time

what do you think?

wtf i love sepples now!

Attached: chrome_QBjZVNy84O.png (1419x801, 890K)

also with out current understanding nothing could exist because there was no nothing, there wasn't even a nothing to contain the nothing, so the big bang can be the start of everything without violating causality

C# anons, which way?

public static readonly string StaticString = "Static string";

or
public static string StaticString => "Static string";

>no i'm seeing a damaged version of it. druglets will never want to 'think' they want psychadelics to do that for them but they fail to realize it's all corrupted thought.
wouldn't bad rendering give you an innate feeling shits wrong? Which is why i don't completely disregard psychedelics, but at the same time i do agree that people tend to get carried away.

readonly so the compile optimizes it away

public static const string StaticString = "Static string"

Array T
literally just make it any other type constructor

what about lists or dictionaries? you can't make them const

it's more a study of how the chemical reactions alter how we perceive reality not how reality actually is. i mean yes i suppose it can help you to have realizations about yourself and deeper understand yourself which some of that comes from actual trauma of altering your senses so much.

the reality we know and can prove is the reality we see that is what all mathematical and scientific systems are based off. even on a natural amount of dmt you dream in real life patterns only when you take an insane amount of it does physical reality alter itself to be colorful geometric patterns and feeling of 'entities' or w/e is described as being aliens or god or something. it's not indicative of anything.

data MyColor = Red | Green | Blue | Orange | Invalid

ColorFormat : MyColor -> String
ColorFormat c = case c of
Red => "Red"
Green => "Green"
Blue => "Blue"
Orange => "Orange"
Invalid => "Invalid"

I don't get what's so special about this?