/dpt/ - Daily Programming Thread

reminder that most women can't program for shit and they don't even want to do it

not one of you is biologically female

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

Other urls found in this thread:

github.com/edwinb/TypeDD-Samples/blob/master/Chapter14/Hangman.idr
en.wikipedia.org/wiki/Unified_Modeling_Language
theregister.co.uk/2017/06/05/dev_accidentally_nuked_production_database_was_allegedly_instantly_fired/
tour.dlang.org/
wiki.dlang.org/Books
dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
wiki.dlang.org/Libraries_and_Frameworks#Alternative_standard_libraries_.2F_runtimes
twitter.com/AnonBabble

Shit OP

FIRST for USER FREEDOM

Reminder that distributing binaries is harmful

that's what your mom told me last night

I'm developing a kernel, and have a question about filesystems.
When I use the mount command on Linux, how does the kernel know which filesystem driver to use?
Does it try all of them until one works?

I'd it isn't a bind eg. something already mounted you have to specify the type through -t though. Otherwise the information is in conf files.

>offended by facts about women being inferior
>delete image
Sup Forums's cucked

Trolling and sexism are banned outside of b

>3. You will not post any of the following outside of Sup Forums: Trolls, flames, racism, off-topic replies, uncalled for catchphrases, macro image replies, indecipherable text (example: "lol u tk him 2da bar|?"), anthropomorphic ("furry") or grotesque ("guro") images, post number GETs ("dubs"), or loli/shota pornography.
>off-topic replies

*blocks your path*

Good question but it doesn't exactly do that afaict. Try running sudo blkid you'll be amazed. it's not exactly a for (d in drivers) { try { d.mount(...) } catch (whatever) { continue } } kinda thing. It has to scan the device at some point to discover the fs format, but most fs probably have magic numbers, and once you know you can cache the information, so it's probably a bit more civilized than just "bulk try the mount functions until one of them succeeds".

The state of /dpt/ proves rules aren't consistently enforced (eg. GR6).

Literally who?

Ask to shake her hand at first then run away because she's a zombie.

Back to

what is google what are books

Maybe look at the fucking source code, retard

One light nanosecond

is that dutch/belgian qt girl still here? :3

I fucking love this whole thread dude. Don't stop being /dpt/ for one second guys. And remember to wear your skirts everyday.

Not even a nanosecond.

Not working on anything since my internship contract basically assigns ownership of any software "related to the company" to them, and they're a big tech company, so I'm kind of screwed since they have some product for just about everything.

Basically my only method of surely making an unrelated piece of software that I might actually have a passion for is probably some weird /hgg/ sex game.

Looking for a regular expression (Javascript) that will find any instance of a sentence without a capitalized first letter. The string itself may consist of multiple sentences. Anyone want to help me out?

they can't delete the OP text without taking down the whole thread tho lmfao

>Anyone want to help me out?
Not with trivial shit like this. RTFM and grow a brain

>mansplaining and telling a woman to grow a brain
don't be sexist

What regex engine does webscraper.io use ?

Their documentation doesn't say and I want to know what I can do.
Should I presume its python ?

/(.|?|!) [a-z]/

your mom

Chrome extensions are written in JavaScript

github.com/edwinb/TypeDD-Samples/blob/master/Chapter14/Hangman.idr
>160 lines
>7 types
>11 functions
>to implement a primitive Hangman game
So....this is the power of dependent types....wow....

As if this person knew that who they were replying to was female.

Speaking of regular expression, does any of y'all know, by any chance, a decent NFA engine that lets you construct is inputs with something other than clunky strings? Dunno like lowercase_letter.one_or_more().capture("name1"). I manage to write dot-backslash-bang heaps of steaming shit, but I'd appreciate a more structured representation, even if it takes up more space visually. Any language and platform, I'm just curious.

Hello dpt, I am glad to be back again. Everything on my end is in order. I haven't even had to put together the new pc either. Everything works out of some 400 dollar laptop I got at walmart. Touch screen makes a lot of things I was yet used to, comfortable. Like reading pdfs. I have a DDR4 4Ghz, i7, 8gigs ram, 3 ssd, oled machine waiting to be put together. But this laptop does it all and more and I don't even feel the need. I feel strange.

I will need to put it together for the battlestation experience once I get my desk. I want to try three monitors. Two vertically, two horizontally with the right one being taller than the left.

EN

with the shiny N thing being my sideways monitor with glare, and the E being the two smaller monitors stacked. The main one being touch screen. It's incredibly helpful to be able to pick up the screen, ignore the keyboard and just thumb through the pages of a pdf. A hundred million times better. I think the lenovo dreampad has a touch screen and is about 400. Consider it for some serious learning power.

As for something more dpt than the rest of the post, today I am going to be working on a simple game design. I think I have five books open right now and I'm working through four game programming topic books and one or two unity books which are only kinda sorta programming related.

Oh yeah, drink and snack on me.

There's also a book on making great games that I'm not entirely familiar with that I think might turn out to be fun. I'm hoping to be sitting here working at this shit all day.

Instlaling VMWare for TempleOS right now, btw.

>women can't progr-

someone didn't get a drink and snack or DARE I SAY IT oled

I'm working on a Chess game in C++, does the following implementation make sense?

Class for each piece, contains member variables piece type, team, alive/dead, and a pointer to a square (where it is on the board)

Class for each square, contains row and column data, and a pointer to the piece which resides in that square (will initialize as null?)

Array of game pieces and an 8x8 array to be the game board

I haven't done much work with pointers. Do these pointers make sense, and is it ok to have two objects pointing at eachother?

>when you realize that this is the faggot who makes all the tranny OPs

en.wikipedia.org/wiki/Unified_Modeling_Language

Doesn't sound very efficient. Have you considered a bitboard?

I have not, I'll take a look at it and see if it looks like something I could work through. Thanks for the suggestion

egghead?

UML is for brainlets that can't plan out their whole program in their head.
Each square doesn't need an object. Squares don't really do anything. That sort of stuff should be stored in your board class, maybe in a struct if you need it.

>reminder that most women can't program for shit and they don't even want to do it
doesn't sound different from males, tbf

>doesn't sound different from pajeets

ftfy

>not one of you is biologically female
and i like my Sup Forums dickgirls just the way they are

image deleted

That's what you get for not posting anime girls

nah, face it, most can't program
you, can't program and YOU in particular hoho you certainly can't program and of the people who can "program" even the good ones have questionable habbits

pajeets are just different in their motives

Nice broken english, Pajeet

This

pajeet is still a noun btw, pajeet

>tfw you're literally sharing a thread with pajeets

t. nondevs

i was on a date today /dpt/
so far it's either
>dumb bimbos who don't care about programming or anything at all
or
>clever girls who care about programming but are ugly and don't know how to sex properly

Anyway, what does good folk of /dpt/ think about Kotlin

I think we need to reboot this thread.

>tfw you're literally sharing a thread with a closet pedo

Hey guys, I'm learning C# and I can't grasp how to split classes in multiple files. I'm using the same namespace in both files (test.cs and test1.cs), but on compiling I get this error:
est.cs(34,3): error CS0246: The type or namespace name 'functionStuff' could not be found (are you missing a using directive or an assembly reference?)

I'm running Debian testing and for compiling I'm doing
csc test.cs test1.cs

That's Grace Hopper you ignorant cunt.

it is a bit presumptuous to call a man a woman just because he wears a bit too casual a shirt.
I know there is no such thing as gender in the english language anymore, butstill.

>Grace Brewster Murray Hopper (née Murray; December 9, 1906 – January 1, 1992) was an American computer scientist and United States Navy rear admiral.
i'd admire her rear when she was in her prime

theregister.co.uk/2017/06/05/dev_accidentally_nuked_production_database_was_allegedly_instantly_fired/

lool

Is there any way you can force a thread to run on a specific physical core? On Linux in particular. Thanks in a advance.

>Putting the login details for the server in an instruction document
Oh wew

__NR_sched_setaffinity
pthread_setaffinity_np

Thanks user.

make new threads and hold them empty until you can assign the particular core you desire?

wat

wrote hangman. its really hard!
> hangman
__________
Guesses:
Guess a letter: a
_____a____
Guesses:
Guess a letter: e
_e___a____
Guesses:
Guess a letter: i
_e_i_a_i__
Guesses:
Guess a letter: o
_e_i_a_io_
Guesses:
Guess a letter: t
_e_i_atio_
Guesses:
Guess a letter: g
_e_i_atio_
Guesses: g
Guess a letter: l
_e_i_atio_
Guesses: g l
Guess a letter: n
_e_i_ation
Guesses: g l
Guess a letter: c
_e_i_ation
Guesses: g l
Guess a letter: c
_e_i_ation
Guesses: c g l
Guess a letter: r
_e_i_ation
Guesses: c g l r
Guess a letter: g
You already guessed that!
_e_i_ation
Guesses: c g l r
Guess a letter: d
You lose!
Answer: bebization

>whatever the OP posted gets deleted
>tranny shit never deleted

Sup Forums mods are garbage

keep /r9k/ in /r9k/
the /ck/ mods like to delete wojak/pepe pics even if they're the OP pic, and it really improves post quality

How many types did you use?

>the /ck/ mods like to delete wojak/pepe pics even if they're the OP pic, and it really improves post quality
Damn, our mods really need to do that too.

why the fuck is relay pin #1 not turning on? Sensor is reading 900

int relay = 1;

void setup() {
Serial.begin(9600);
pinMode(relay, OUTPUT);

}

void loop() {
int sensorValue = analogRead(A4);

Serial.println(sensorValue);

if (sensorValue > 300)
{
digitalWrite(relay,HIGH);
}
else
{
digitalWrite(relay,LOW);
}
delay(1);
}

The problem isn't there, probably, senpai.

because you probably have to drive that pin LOW to enable that relay

I don't even have an Arduino, and I figured out it was active low.

The board has to be defective then, my circuit is fine. I tried two boards though and neither go HIGH
I already double checked, this one is driven HIGH.

The pin itself is not turning HIGH

Why was this deleted? It's more relevant to programming than an anime OP.

>actual programming references in anime
>less relevant
Eat shit, OP.

Then your GPIO initialization is incorrect. Isn't pin 1 connected to UART? if yes, then you can't simultaneously use it as Serial and gpio.

Threadly reminder that dlang-chan has RAII; she's quite fast in execution and compilation; and she's super duper cute! Say something nice about her, /dpt/!
Also, Andrei's a cool guy.

>Tour
tour.dlang.org/
>Books
wiki.dlang.org/Books
>GC
dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
wiki.dlang.org/Libraries_and_Frameworks#Alternative_standard_libraries_.2F_runtimes

How do you say C# in real life?
C++ is 'C plus plus' when I need to speak it, but how does someone specify C#

Sorry, should have mentioned. I'm using a Nano. I've moved it from D3 to D7 and none of the go HIGH

c sharp, like musicish notation.

C sharp?

How do you say char in real life?
I say it like charred.

Why would you use Who wants to be a millionaire font?

I'm not OP, and:
>actual references to the very real climate programmers face today (e.g. github, etc)
>not relevant

Then maybe something's wrong with the toolchain
Have you tried turning it on using direct writes to registers?
DDRB |= 1

Coctothorpe

>using github
lmao

trolls
C-Hashtag is the proper name

What's wrong with diversity? You can't just have the same people speak year after year, you need to get some diverse opinions and insights into the mix.

just one user defined one:
data Hangman
= Hangman { word :: String,
guesses :: String
}

troll

There's never been an electronconf before.
Also, those men were selected blind, meaning they were judged on the merit of their presentations and not their gender.
You can't defend this without shitting on women even further.

What is the difference between dynamic programming and using logic to?

Dynamic programming is such a vague term that it could mean anything, though wikipedia claims it's the process of selecting an algorithm during runtime to optimize execution speed.

You know, I'm going to walk into some CS class and actually call it that just to see what sorts of reactions I get.

Don't forget to call the whole computer the cpu and the monitor is a cpu too.

I can only imagine the amount of interjections you would get.

I had not tried that until you suggested it (have never done that before). Thanks, I ended up clearing up the issue.

It didn't work directly, but I noticed it made D8 go HIGH since I guess that makes pins 8 to 13 HIGH?
Whatever the reason, I reverted to using digitalWrite on pin 12 (D8) and lo and behold it works.

I'm going to blame this on chinkshit hardware.