/dpt/ - Daily Programming Thread

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

Other urls found in this thread:

youtube.com/user/Bisqwit
heatst.com/tech/cancelled-tech-conference-electronconf-off-over-non-diverse-speaker-lineup/
twitter.com/NSFWRedditImage

first for literally wat

>Array.prototype.sort

>If compareFunction is not supplied, elements are sorted by converting them to strings and comparing strings in Unicode code point order. For example, "Banana" comes before "cherry". In a numeric sort, 9 comes before 80, but because numbers are converted to strings, "80" comes before "9" in Unicode order.

First for procastinating.

I don't understand, why were both new threads deleted?
Mods could have just deleted the pepe thread and all the shitposting in the non-pepe thread.

you even procrastinated posting so you didn't make it... user please apply yourself

Does anyone program in old languages on old computers?

Sadly I don't have a computer.

They delete posts discussing it afterwards but it's standard procedure basically.
I say they should just look at post counts.

What language is the nicest for doing simple regex text formatting stuff, Python or Perl?

Bisqwit does: youtube.com/user/Bisqwit

Please do not mention that abomination called "Python" again, this is a SFW board.

>javascript

I don't know about perl but in python you literally just use re.sub, I did a project where I had to mangle a lot of scraped data and I didn't have any problem at all

How do I make an array of 5 arrays to 3 ints in D?

>(((Bisqwit)))

[900, 88, 9].sort()
(3) [88, 9, 900]
wow

ask Buclaw, aka. the only other D user in existence.

Any language is fine really. Since you're using a DSL inside the language it's not a big part of your work to use the language.

>I say they should just look at post counts.
LOL

fuck off, you know how silly this is, if they would keep one it would be the one with the earliest timestamp, at least if it was posted after the old thread hit the bump limit

kill yourself

all of you are fucking pieces of shit, i don't know why i came here in the first place, such a cancerous waste of time to be here

Python is actually pretty aesthetic looking. The flaws in the language are not in appearance, unlike Perl. Though I remember Perl being heavily recommended as a language based on it having a lot of those features. But they are both scripting languages so they are ideal for that sort of thing.

what's wrong with it?

Thank you for your feedback.
Your opinion is very important to us. We appreciate your feedback and will use it to evaluate changes and make improvements in our site.

But isn't JS a dynamically typed language? Couldn't they just do compare operations without converting and catch an exception for types without. Since the strategy seems to be to not have errors but rather unexpected behavior.

>I like my *****
Yeah fuck off user. The thread with the most posts clearly had the most attention and value.

Trying to set up a not shit dev workflow for learning on windows 10. Not entirely sure what language I want to study with, leaning towards C, I have experience in scripting languages and C# as well as minor experience with c and c++. I'm honestly considering multiple languages. Not in the sense of "I can't decide between x and x" I mean an actual use of multiple languages. I'm past the stage of basic programming as I've been doing it for several years, have made some games and personal programs for myself. I'm not practicing for a job right now, just perusing it for the sake on knowledge and skill building. Implementing the same thing in multiple languages, preferably differing languages will help me focus on the concept that I'm trying to learn as well as problem solving using differing tools. I just want to get out there and try a bunch of shit out of curiosity now.

>The thread with the most posts clearly had the most attention and value.
LMFAO it was mostly just shitposting about frogs and shit. probably a few dozen posts were by me

if you post an illegitimate duplicate thread and spam the shit out of it it doesn't make it the more "valuable" thread

int[3][5] arr;


[[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]


?
Or do you mean something else?

So you're saying the thread with frog posting that had 100% shit posts is better than the anime thread with some fraction of shit posts?

For the record. I only see three serious posts in the frog thread. We had a bunch in the other despite anons decision to try to shit it up.

You think it's some cute lang? Too bad! It's just C-chan and Fortran-chan!

both were shit because of anime shitposters with their reddit-tier "hurr frogs are bad" meme

best db for storing configs and such for C?
unqlite looks really nice.

this is now a frogposting thread

They should have banned you user.

>-tier
>meme
I don't want reddit stink nearby. Fuck off.

#include

template
static void print(Args&&... args) {
(std::cout

@61029778
atleast post some code snippets or anything partially on-topic with it

You seem to be new here. All the *chan websites are born out of anime culture.
We apologize that seems to intrinsically trigger your plebbit sensibilities.

if it's just a configuration file, just use a text file.

And to access the final element I use arr[4][2];?

Writing a spambot in phantom.js and node

this is now a programming thread
post things that you do with a computer that don't involve smug faces of the Oriental or amphibian varieties

I love Python, so this cute little guy can be our new mascot!

>I love Python
>programming
Oh boy.

>can type checked format strings be implemented
Templates are Turing complete but it's not worth bothering with realistically.
I'd rather wrap the hex number in a function like asHex(number) which just returns the stream and does the checking with your normal type checking.

Assuming we need to use C+cripple

correct

nice double standards you insufferable retard. these retarded trolls should be banned:

>programming
>things that you do with a computer

Sorry, I forgot the picture.

My friend and I are probably going to have a drunk programming contest tonight just for fun. What stuff do you recommend us trying to do? We usually do Python, but my friend is a more talented programmer than myself. Something fun with graphics maybe. Like trying to design a GUI while wasted.

>complaining about someone making OT posts
>should be banned
Well maybe. But the person making OT posts should certainly be banned. Since it's even breaking the rules.

...

if i should "certainly" be banned why am i not banned

What's wrong with Python? We can also do Java or something else if that's not cool enough. I know Java is really popular here!

Hi, what is the best text editor and why is it GNU nano?

OH BOY
H

B
O
Y
(You) for (You)?

you sure seem cock thirsty & hungry for attention

Good question.

I know people will taunt me for being a Windows pleb, but I like Notepad++. Nano is perfectly good though, much better than vim and easier for a newbie, since there are basic keyboard shortcuts on screen.

do people here unironically like rust? haskell? like wtf is wrong with you?

I unironically like both, ama.

quads of the gods

praise kek!

Rust is like C but more focused on memory, right? I have no idea about Haskell or what's wrong with it.

Rust is like if C++ was born from C + ML instead of C + classes.

people like programing in Haskell because Haskell is fun!

>but more focused on memory, right?

Nah, Rusts whole gimmick is that you dont have to keep track of memory, just borrowed memory :^)

>pointers
>a tag
Why.

you're fucking retarded if that's how you choose to interpret those stats

How do you interpret them?

Haskell is a fun toy to play with. Rust is not.

haskell has a high weekend/weekday difference because no one uses it at work, because it's worthless for serious applications, it's only used by neckbeards as a hobby

>they like haskell
lol you're so not worth my time

bye bye lardasses

Speaking of the SO survey.

literally what is that list

>it's not fun, it's just done as a hobby despite it not being used much professionally
Kill yourself retard.

loved should be "trendy flavor of the month"

rust is only used by mozilla shills

>C that low
>Fortran isn't even on the list
JUST
U
S
T

>only learn spreadsheets and IE because that's all you need at work
There's hardly anything programming related stuff, just boring office applications, server, and database stuff.

Python 3.x is a weekend tag? Do they use 2.7 at work? I like 3.x better but I use 2.7 now because everyone else still uses it.

Trying to do no_std Rust has only made it far more obvious that it needs HKTs. Everybody else falls back on trait objects.

I dug myself into a hole where I am forced to use multithreading in Python. I have some questions:

1) Is there such a thing as interrupts in Python? Say I spawn two threads where thread A modifies a variable and thread B needs to do something when that has happened; can thread A notify thread B of the update without thread B having to explicitly poll the variable for changes all the time?
2) Is there really no way to kill or stop threads? Do I seriously have to poll a termination request variable all the time from within the thread I want to stop?

Starting to regret I didn't specify a different language for this project. Even fucking Java might have been a better choice.

why is Visual Basic so dreaded? I don't use it (except VBScript for some Windows tasks, but that's not the real VB language)

>Fortran isn't even on the
I'll resurrect Fortran after I'm done with Pascal.

I have no idea that this actually means t b h

>Lua that high
Kind of surprising.

Or even if it means anything at all.

it's trash
it's trash
all trash

Python seems like a good idea until your project grows over 200 lines, then you realize you should have used Java or Haskell.

literally 100% - loved% = dreaded%

>Oh yeah, Python-san, I want you! I want you so hard!

Yes. Sadly, I have limited time to hand in this project, I'm already 2 months into it and I'd have to get back into the swing of things with Java or C because I haven't used either in almost a decade so that's out of the question.

And keep in mind this is the demographics we're talking about.

Aha, this happened to me too. Python really does suck for multi threading. There's no easy way around that really.

We did a robot project where the sensors were polling on different threads and we also had two threads to send/receive data via sockets. We also had a lot of crashes on the client end (Windows machine). The thread dies when it's run() method terminates. I don't think there's a special "kill" function. I'm not sure about the first question.

in order words, literal fags, a lot of them from san francisco, the gay capital of the world

heatst.com/tech/cancelled-tech-conference-electronconf-off-over-non-diverse-speaker-lineup/

the bay area is a speculative bubble have fun with your hipster startup employer going bankrupt as soon as that VC tit dries up

I heard they were selected blind.
How irresponsible.

People have been saying this for 10 years, you can run a company with no prospects of ever turning a profit and not only get angel VCs riding your dick FOREVER, you can also get an IPO and still remain unprofitable.

the 1% has infinite money they'll never stop buying up small businesses in the hopes for 1,000% returns

I can't wait for this whole coding fad to get old and I can finally get back to programming without being compared to overpriced latte drinking code artisan fucks who write in languages like Rust and Ruby.

>going public

>I'll resurrect Fortran
How? Break new record for the lattice size of exact diagonalization?