/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

psychcentral.com/quizzes/autism.htm
en.wikipedia.org/wiki/Modulo_operation
twitter.com/SFWRedditImages

Cute image, OP.

wtf man i want to fuck anime now

C is objectively the best language, now and forever!
People will be writing new C code 50 years from now.
Can you say the same about your shit-tier flavor of the month languages?

perl is very important

Golang is the future
>people stuck in the 80's
ASM -> C -> C++ -> (Java -> Python -> Ruby) -> Javascript
>new and aspiring programmers
ASM -> Rust -> Golang -> Web assembly

Prove me wrong.
Protip: you can't

What are the arrows even supposed to signify?

>40 years back
FORTRAN is objectively the best language, now and forever!
People will be writing new FORTRAN code 50 years from now.
Can you say the same about your shit-tier flavor of the month languages like C?

...

Defend this.

$
$ node -e "console.log(-1 % 7)"
-1
$ echo "-1 % 7 "| bc
-1
$ echo 'package main; import "fmt"; func main() { fmt.Println(-1 % 7) }' > /tmp/glass-test.go
$ go run /tmp/glass-test.go
-1
$ echo -e '#include \nint main() { std::cout

are these regular expressions equivalent?
A
\'(\\.|[^\n\'\\])*\'

B
\'(\\.|[^\'\\])*\'


i think so

low level -> high level
Get some help:
psychcentral.com/quizzes/autism.htm

>LLVM
enmey of freedom

why tho

>not using libFirm instead
freedom! ~

>false allegory fallacy

Just stop

It depends on the regex implementation and their treatment of newlines.

Are you still at this? The bottom one is clearly omitting the newline character and will give different results with certain text, namely it'll match two single quotes on separate lines

>40 YEARS BACK.
FORTRAN IS OBJECTIVELY THE BEST LANGUAGE, NOW AND FOREVER!. PEOPLE WILL BE WRITING NEW FORTRAN CODE 50 YEARS FROM NOW. CAN YOU SAY THE SAME ABOUT YOUR SHIT-TIER FLAVOR OF THE MONTH LANGUAGES LIKE C?.

> en.wikipedia.org/wiki/Modulo_operation

> When either a or n is negative, the naive definition breaks down and programming languages differ in how these values are defined.

this is undefined behavior as far as the definition of the operator is concerned, so anything goes

fucking noob

POST YOUR FUCKING PROJECT RIGHT FUCKING NOW

I'm currently contemplating the design of a programming language, and what issues it might have.

i can't defend this
from my experience 6 is more practical, though

>WebAssembly
>high level

WebAssembly is a specification for an AST as a compilation target. It isn't even a language anymore you knob.

>/dpt/ is now the containment thread for shitposts

>implying it hasn't always been

>this is undefined behavior as far as the definition of the operator is concerned
No it's not.

'6' is 'true' mathematical definition of modulo base 7.
-1 is the "quotient * denominator +remainder = numerator" approach.

so the bottom one can't match the \n character?

but
\'\\.\'


matches '\n'

the dot matches anything except line breaks

>now

>'6' is 'true' mathematical definition of modulo base 7.
hahahahahahahahahahahahahahahahaha

your png is now optimized

Go to an anime convention, fuck a cosplayer.

Fortran is, in fact, still in use for a few scientific applications.

>No it's not.
Yes it is. And stop pretending that everything that goes on in a programming language has to follow the conventions used by mathematicians.

Do you not even know modular arithmetic?
Get out of here, non-CS scum.

what tool did you use? is optipng still the best?

The bottom one *can* match the \n character.

[^\'\\]


The caret ^ negates the character set. The portion of the regex above says "match everything that's not a single quote or a backslash".

your optimization is not lossless
kys

how to know if something was compressed lossless or lossy?

Without even needing tools, you can just open both images in two tabs and go back and forth between them.
It's extremely obvious that your compressions fucked up her bow.

i'm math scum lolololololol
you'll find different conventions in different papers, although i'll agree that the one using 6 is more common
it's far from being commonly accepted, though

>'6' is 'true' mathematical definition of modulo base 7.
No it's not.

What's this add-on for vertical tabs ?

\n or endl?

Oh, we used the negative wrap around thing at my university.
I was not aware that there were different conventions to this. Maybe the lecturer mentioned that, but I don't really remember.

\r\n

Tree style tabs.

std::endl for impromptu debugging, \n the rest of the time.

here autist

Not using C++ is the option I choose.

That is tree style tabs. You can only get it for Firefox, and once you start using it, you won't be able to stand any other environment again. It is just the only appropriate way to manage 20-50 or more tabs.

\n -> unix
\r -> mac
\r\n -> windows

Hi, not sure if /sqt/ may be better, but I guess you guys can awnser this better: How are compilers compiled? Can I compile GCC somehow? If so, how to compile the compiler that compiles the compiler?

you'll find inconsistencies like these everywhere
like those linear algebra heathens often resorting to using the strict subset operator for regular subsets

are you fucking kidding me

user bls
i'm colorblind and even i can tell the difference between the colors

ffs Sup Forums just tell me what the best programming language is

perl

Rust

Search for "chicken egg compiler".

one that pays well I should add aswell

VBScript

lisp, scheme

C

there is no difference between the colors, because i used a lossless compressor

kys retard

only pajeets worry about algorithms

Sup Forums has really gone to shit in the last 8 months. Too much consumer bullshit

how are machines built? can i build machines somehow? if so, how to build the machine that builds the building machine?

tl;dr: universal turing machine, gödel numbering

C, although good luck finding a job to work with it.

Rust

bloat, just use batch

First compiler written in a language other than the language that compiler compiles.

Next compiler written in the language compiled by that compiler. Previous compiler used to compile new compiler.

Subsequent compilers compiled with previous versions of compiler written in the same language they are designed to compile.

We call this compiler bootstrapping.

rust!

>in the last 8 months
It has always been like this.

A GUI to organize all my VR and regular porn videos with one button streaming to my Google Cardboard headset written in PyQT5.

I'm thinking of switching the video info and the 4 thumbnail section. Thoughts? Are there any UI mockup sites to get inspiration from?

who gives mail to the mailman?

>le has never good

>CHAD WHITE

>has never good
pajeet pls go

>VR
you can't feel anything. what's the point?

>Batch
Garbage. Use Powershell.

Excuse me, Sir?

you're right
chromium shows it in different shades, but downloading both files proves that it's the same

>Powershell
Garbage. Use sh.

What's the simplest way of implementing event delegation in JS? Use jQuery?

>JS
do you not see the amount of pleb blood shed ITT? Not even C babbies are safe here

use angularjs 3

>Garbage
Garbage. Use garbage man.

example
var ul = document.getElementById('items');

function addEvent(obj, evt, fn, capture) {
if ( window.attachEvent ) {
obj.attachEvent("on" + evt, fn);
}
else {
if ( !capture ) capture = false; // capture
obj.addEventListener(evt, fn, capture)
}
}

addEvent(ul, "click", function(e) {
var target = e ? e.target : window.event.srcElement;
if ( target.nodeName.toLowerCase() === 'a' ) {
alert("clicked");
return false;
}
});

Never reply to me again unless you're contributing to the thread.

Pretty sure some mailmen deliver their own mail.

Not all Windows environments have sh installed.

INTERCAL

not all windows environments have powershell installed either

>Windows environments
Get out of here, ponyfag reddit-spacer.

>Get out of here, ponyfag reddit-spacer.
Get out of here, ponyfag reddit-spacer.

reminder that ruby spent a lot of money on pony plushies

>shitting on JS
can't wait to hear about your to-do list app written in Swift.

at least he has money, poorfag redditor

can't wait to hear about your to-do list app written in .

THE TO-DO LIST MEME ORIGINATED IN JS!!!

>he
did you just?

:-(

>he
r-rude

>he
pls don't bully