/dpt/ - Daily Programming Thread

thread.prev: What are you working on, Jow Forums?

Attached: pdp-tan.jpg (800x1000, 96K)

Other urls found in this thread:

vocaroo.com/i/s0njarWRMPvN
vocaroo.com/i/s0feeO6DHMxS
vocaroo.com/i/s1jZdpb3Vey0
notjordanpeterson.com/
vocaroo.com/i/s0T8BWDjP1gH
twitter.com/NSFWRedditVideo

God I hate C++.

I'm working a JVM language ofc

God I love Rust

Redpill me on Java Spring

a REAL programmer uses C++ ONLY

You can't spell trust without Rust.

Anybody for ?
I still don't get it

Anone! Will you join me in studying JavaScript?

Attached: 01923b3c9c2d1c9cf241e4211803c0cb.jpg (800x1200, 150K)

vocaroo.com/i/s0njarWRMPvN

Attached: autism.png (256x223, 41K)

Only if you sit on my lap.

Seriously thinking of learning C instead of C++, this array episode really made me reconsider sepples and life.

That's a sensible move.

Just wait for C++20

You are writing libre javascript, right?

Attached: 1566228438664.jpg (900x1200, 197K)

Learn C and then learn the good version of C++.
Rust.

God I love C++

Is LibreScript even up to date? I don't want to write JS as if I was writing it for IE6

vocaroo.com/i/s0feeO6DHMxS

Attached: 1557411580070.png (918x1032, 45K)

Is that Jordan Peterson?

The student asked the master "can a man walk without shoes?" the master replied "your feet are shoes, that is freedom" and at that moment the student was enlightened.

Attached: meditate.png (1280x1112, 500K)

I assume you're using the Free Pascal compiler. By default, range checking at run time is turned off. To enable it, place ${R+} after the program declaration, or compile with -Cr. Now a runtime error will occur if the user enters a number outside the range of the type.

hello smart sir. I recommend the durga weapon for help you implement your JVM language. hopefully, it will be successful then durga sirs will teach it for free on youtube!

Attached: maxresdefault.jpg (1280x720, 87K)

Whats a good c tutorial that isnt 'the c programming language'?

vocaroo.com/i/s1jZdpb3Vey0

Attached: postmodernism.jpg (1920x1287, 175K)

Post the random project idea picture so I can figure out what to do next.

use image search

yes. you can have him say anything you want thanks to armies of machine learning shops desperately working on their "Trump saying nigger" tapes.

Attached: 1566455041416.jpg (960x928, 75K)

Why doesn't this work in C?
const int WIDTH = 40;
const int HEIGHT = 40;
const int SIZE = WIDTH * HEIGHT;
I get error: initializer element is not constant
const int SIZE = WIDTH * HEIGHT;

C consts don't work like C++ consts. Use #define or enum.

>he thinks C has constexpr evaluation

It werks now, thanks.

#! /usr/bin/env escript
-mode(native).

main(_) ->
io:fwrite("Hello, world!\n").
>800 times slower than C.
why doesn't escript do cached compilation like everything else like this?

notjordanpeterson.com/
is it that or do they need an excuse for when real dirt on the deep state drops?

Jesus Christ, people use this SHITLANG?

Oh, and interesting enough, I got this error trying to compile in Debian, as Mingwin's gcc compiles it without warnings.

be kind, they have enough trouble already

Fucking lmao

C arrays are based, the only issue is needing to keep track of length. Which isn't hard just make a struct which contains the length.

Attached: 8bS1vAZ.jpg (696x720, 30K)

>C arrays are based, except for where they're shit (which is most of the time) in which case you replace them with a better construct.

// break it down
unnffh yeah nigga yo
listen up
upper management
lower mismanagement
tellin me how *to code*
what an embarassment
its called programming ho
but now im mad as fuck
you fucking smug cuck
i'm a tear down this sjw rainbow
you better call HR for backup
I'm about to fuck your shit up
i got all the admin rights and keys
server room about to breach 200 degrees
circuits gonna melt like cheese
say goodbye to your customer analyses
I'm 'a rip the front-end off
back-end burning metal cough cough
nigga the smoke will get ya
take a deep breath *haaaaahhhhh*
never bait the linux piranha
i know all your tax havens you bitch
take that tie off I'll hang you with it
this ain't nothing your daddy can fix
bet you dont have that in your team building tool kit

nah, just pass them and their length as separate parameters. This is completely reasonable, and it permits ZERO COST arbitrary views of sublengths of arrays.
#include
#include

int main (void) {
char stuff[] = "Hello, world!";
fwrite(strchr(stuff, ' ')+1, 5, 1, stdout);
puts("");
}

кpинж

80% of /dpt/ is basically kids telling each other which variant of low level C-family languages one must use, then they go on to implement fizz buzz and the like efficiently with them, or perhaps start a game dev project and abandon it in a week.

kringel

kek

Where do I start learning Java Spring?

proper garbage, your whole text is written for rhymes and the rhymes suck absolute ass

>and it permits ZERO COST arbitrary views of sublengths of arrays
So does std::span
So do rust slices
C is just shit.

Back in 2006.

in a bath of acid, or anywhere else that provides similar pleasure

have there been no new updates or some shit?
idk I think a company i might find work in uses it and I want to start ahead of time self learn it

Im working on a fantasy console sort of thing in C++, imagine Pico-8, but hardware accellerated and without many of its limitations. Add network capability and voilà, awesome game engine :)

>Larry Ellison
>ever permitting so much heat waste that Java could enjoy a spring
it's doing just fine under eternal winter.

>using type that stores the length doesn't need length of buffer as parameter for functions
damn dude

Yes, it's more convenient for no extra cost.

mingw might flow through the constant evaluation for simple stuff like this, but it is obviously non-standard behavior.

I''ve been using Selenium (Python) to do all my data entry (cough web development).
However, recently chromedriver has been displaying the visual editor buttons incorrectly and I'm unable to get Selenium to click the HTML button so that I can copy the text, then manipulate it, paste, and save.
I have a work around where I have to manually resize the box, but that's gay.
I'm not sure what is to blame for the change. I've tried resizing and using Inspector, but I still can't narrow it down.
It looks fine in Chrome. I reinstalled a few different versions of Chromedriver without success. How can I get up and running again?
Pic related; top pic is Chrome, bottom is Chromedriver.

Attached: image-15.png (1164x515, 47K)

types don‘t store data in your shitlangs, silly cnile

Sorry about your reading comprehension

There's like a bajillion documentation sites. How is this hard to find?

defmodule Hello do
def print(lang \\ :en)
def print(:de), do: "Hallo Welt"
def print(:en), do: "Hello World"
def print(:es), do: "Hola Mundo"
def print(:ru), do: "Пpивeт миp"
end
rubyfags thing this garbage is more readable than
-module(hello).
-compile(export_all).

print(de) -> "Hallo, welt";
print(en) -> "Hello, world";
print(es) -> "Hola, taco";
print(ru) -> "This one doesn't look wrongly capitalized like the others.".

Attached: angrydognoises.jpg (1128x1280, 209K)

>He isn't using structs to store integer variables represented by the number of members the struct has
LMAO, sepples programmers everyone.

I represent my integers by how many variadic template parameters my type has

vocaroo.com/i/s0T8BWDjP1gH
This really messed the voice synthesis up

>proper
oy citizen pick that code up

>decide to make a Python script because fuck paying like 300usd for a shitty e-mail sender, even though I never programmed before
>MySQL query to get account expiration date
>instead of a date string it returns "datetime.date(2019, 8, 25)"
What the fuck? It returned a string like an hour or two ago. Can somebody explain this? Removing datetime import didn't do shit.

i rest my case

HAHAHAHAHAHAHAHAH
>tellin buh bahwh
>..
>bunnhghin
>BUnghwah
>BUNWAHh
HAHAHAHAHA

Attached: laughs.jpg (240x210, 6K)

Thank you, works. But why is that? I am explictly creating a type that cannot be 0, why do I need to explictly turn R+ on?

sorry lad, but i aint no island monkey

gtk3 is shitfest.

lambda calculus sucks because defining a reasonable notion of execution cost is complicated
no, you can‘t just count beta reductions

Screwdrivers suck because they cannot hammer nails.

Lambda calculus has no execution cost.

What's the point of modeling execution cost when we have out-of-order cpus and caches?

>what's the point of caring that a chair is made out of 'wood' vs. 'plastic' when it's REALLY a swirling cloud of subatomic forces either way?

you can define a reasonable one and prove bounds that relate it to other machine models

typed lc certainly plays a huge role in automated theorem proving and when you‘re doing constructive mathematics or program verification you care about execution cost without having to embed all the code you verify in a dsl

what‘s the point in abstraction? is that your question?

it's not a question, it's just nihilism.

The underlying nature of the execution is changing too fast for any abstraction to have any value. What's the point of finding out that program A will take fewer steps than program B, if on a real machine the former will be much slower because of the poor memory usage, broken branch prediction, and cache thrashing.

This came in early! I’m half way through the pdf but book version is way more comfy

Attached: B006B869-7CF2-436B-9B18-0B92E29A3A5A.jpg (3264x2448, 1.97M)

Now you'll sure be prepared for the freshman MIT CS course in 1986.

>what's the point of knowing how much fat people are if a fat person can also have more muscle or run faster?
>an adult has much more fat than a baby, right?
>but the adult is obviously much faster!
>therefore knowing anything is useless
FUCK
OFF
NIHILISTS
what's the point of you posting this shit when you're just going to die, huh?

Looks like a TD inline height of 100% is overriding the table inline height of 350px.
Any Selenium settings that might fix this?

Jow Forums has always been a pretend board.

as long as your model is roughly correct (i‘d say up to factors of log n or sqrt n) those effects really don‘t matter that much for large inputs
for example, naive word-ram esque time complexity analysis is well sufficient to judge whether your entries will be ok in competitive programming entries
if you‘re really going for wanting to judge things correctly in reality, even a precise model for execution cost won‘t do, since certain classes of inputs are way more common than others
in the end, any kind of roughly accurate execution time metric is useful, be it through formal analysis or experiments

>is addition even really addition? you say that N+1 > N but what if you're adding a single coin to a jar that has a hole in the bottom, letting other coins out?
>what does 'ceteris paribus' mean

I'm not against estimating algorithmic complexity aka the big O, I just think "modeling" it via execution cost is unnecessary and unreliable. I.e. of course you should be able to reason about O(1) vs O(n^2), but counting steps is too much.

Its not im just wondering since the tutorials are old if theyre obsolete now and theres a new version or something thats different

You can't spell frustration without rust.

in india

what are you talking about
big-o is a calculus for mathematical functions
to obtain that function, you need to formally count steps in the first place
just because cs classes often gloss over this because they‘re too lazy to define formal small step semantics doesn‘t mean you don‘t need to do it if you want to write a properly formal proof

>what if you're adding a single coin to a jar that has a hole in the bottom, letting other coins out?
Then you're adding and subtracting.

I've tried to read SICP (PDF version) several times and I cannot will myself to continue from half of the first chapter. I've only read up to the exercise where you have to write a function to find the two biggest numbers from a list of three numbers.

fuck! you mean you can do MORE than one thing at a time?? I give up man. That's way too much for anyone to understand. Let's just give up and write Haskell, and only evaluate code by how small it is.

>I've only read up to the exercise where you have to write a function to find the two biggest numbers from a list of three numbers.
And why did you stop?
(And you meant the sum of the squares, right?)

(define (max x y)
(if (> x y) x y))

(define (min x y)
(if (< x y) x y))

(define (ms x y z)
(min
(+ (square (max x y)) (square (max y z)))
(+ (square (max x z)) (square (max y z)))))

My solution, but maybe I fucked it up.

why even code when you can just enumerate all goedel codings and run them in parallel

why even when you could just not?