/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

Other urls found in this thread:

heart.pai.ontopcorp.com/
twitter.com/AnonBabble

Thanks you for that
heart.pai.ontopcorp.com/

Stroking my dick to bubble butt twinks

How do i use scanner class to ask user to enter the name of the output.txt in java? Currently working on project where user enters output name then enters number of rows to print pascals triangle out to

meh

Is it possible to check whats in a byte array before extracting its data?

Im setting up a server socket in java thats going to listen for files and write them after its received its data. I also want it to listen for some strings but the socket will crash because its trying to unpack a file stream.

Want to set up a condition where it skips that part of code if the byte array contains string, hence the question.

I am learning C++ rn after language jumping for a whole year and was wondering what is the best way to practice? Should I join a open source development project? I am just lost.

if( op.image.isAnime() )
reply("just stop it you guys... Please?");

Best way to practice is to do stuff.

My personal choice in your position would be stick to personal projects until getting better at C++.

if(!/op\.image\.isAnime\(\)/.test(program))
eval(program);

>Yarn replaces NPM
>Webpack 2 is almost ready
>WebComponents can already be used(and are faster than React)

Web, you evolve so fast.
Can anyone keep up with it?

Delete javascript
Delete CSS
Done.

>Get no paycheck
Oy vey.

> web development
> programming
Go back to your containment thread 2bh

You are just jealous. i write software that reaches millions of users, you write code that will rot in obscurity.

>tfw too smart to use Node / Javascript

Too bad your software is useless.

Who could be jealous of a fat weeb that spends his time cursing his round eyes?

> jealous of a fat weeaboo nerd who gets paid pajeetbucks to make the internet unusable
Bruh I fucked more women than you can ever dream

I don't understand this mindset. Yes, JS has problems, bad ones: Static type verification of a JS program is undecidable, it only supports 64-bit floats as a numeric type, and so on.

But we're stuck with it as a platform. Millions or billions of people use it - you and I are using it to discuss that fact right now. So a lot of engineering effort and focus has gone to making this bizarre runtime environment we've been given better for developers, going as far as transpiling from better languages.

No one bats eye when they hear someone has a job working with a codebase fraught with architectural issues or using old shitty technologies. Many companies move slowly, so developers have come to expect it, especially in industries such as finance. Anyone who says they work on code without problems is either lying, can't see them, or doesn't have a large enough codebase.

So why is web development uniquely shat on as a kneejerk reaction by half of the population here?

>sign up for programming class
>first lesson is to set up notepad and cmd prompts to run code
Why does this keep happening? Visual Studio exists and is free.

>replying to bait seriously
I use Node / JS heavily myself faggot, I was just baiting the insecure anime avatarfag

Just wait you enter the world of elitists where notepad++/vim is the norm and you only compile from a shell.

so, paradise?

Post with a timestamp and I'll believe you, but until then you just attached a picture of some dude.

I understand some of the replies in particular might be trolling, but you still see this pattern in /dpt/ in general.

At least they don't treat shells like some hacker black box

>implying everything can be started from within VS
You have to know how to configure and run your stuff. Don't even hope that IDE will do everything for you.

i'm not anti-ide but visualstudio is ass cancer

Because Visual Studio hampers understanding of the build tools chain.

Seriously consider killing your family before killing yourself.

Visual Studio is universally regarded as the best IDE, provided you're using a MS language.
Kill yourself, freetard.

Why?

>paradise
maybe, if you're a trap

Horrible tools. They should be having you use a proper text editor (at least something mediocre, like notepad++ or gedit) and a shell that isn't complete crap.

>Can anyone keep up with it?
I have barely even been bothering. I'm hoping I can get a decent job doing C or C++ programming, and if not, I'm going to bone up on .NET stuff fast and grab a job with that.

>mistaking me for that guy
don't kill yourself since that'd be escape for you
don't count the opinions of professional fizzbuzzers then, people here say javascript is bad because they heard others say its bad, bunch of conformist sheep lol

it installs a bunch of shit and is impossible to uninstall. trying to uninstall visual studio compeltely from my system and not being able to is what made me completely stop using windows entirely

maybe you're just retarded

maybe you're a windows fanboy

You need to move up the hierarchy

>C or C++
Your world is also changing. It's time to jump a Rust bandwagon.

user, how is your computer going to know what's in it if it can't extract it?

When it receives it, just use the typeof keyword with a given type to check for string and then have it continue.

>So why is web development uniquely shat on as a kneejerk reaction by half of the population here?
Because it's so especially badly designed and so widely spread.

>Hoping for C++
Literally mental masochism. Still better than anything related to Javascript though

>elitists
>notepad++

>kys isn't in the hierarchy
What do

Also, if you keep posting smug faces just because of that pic you're seriously retarded.

>It's time to jump a Rust bandwagon.
no thanks, im not a cuck

you guys are a fucking virus. You touch on everything but the goddamn topic.

Javascript is bad because all it does is run css from a level higher than css which then calls html which then calls another triple layered taco bell chicken soft taco. It's too many calls at any one time with no promise of templated functions. That's why it's bad. It teaches you to arrange information upwards rather than laterally. It also gives the wrong people the "right" to go around spouting bullshit about what constitutes good coding practice on the basis that anyone's uncle could hire them to work the site and give them more money just because it reaches 1000000 people and their facebook friends and their facebook friends' friends and so on. It's not legitimate practice. It's not programming. If programmers got paid per service cycle you wouldn't have any ground to stand on and you'd be just a virus that no one wants to be around. But you got money. You can buy the drinks and they'll just forget what you said in the morning anyhow.

Modern C++ isn't that terrible to use. It's just a matter of getting on a new project, and not maintaining a 20 year old codebase.

make sure to add the check for typeof after the initial check for the files so that you don't add an extra call to every pass. Also, don't forget to change the kind of stream that you're using.

nice one grandpa

>arrange information upward
You wish. It doesn't teach you anything else than anarchism.

...

>especially badly designed
It is well-known that web has a lot of warts and ugly parts. But how can you call it a badly designed technology if it:
- Support user interaction and complex UIs;
- Has means for safe multithreading and async operations;
- Allows monkeys to produce non-crashing code by mindlessly smashing keyboards.
Badly designed technology, huh? When things are broken, they don't work. But web is so good that it can work with any abomination you write.

tl;dr

What do you all think of Columbia College Chicago?

String placeholder;

System.out.print("Input this shit: ");
placeholder = scan.next();

Why would I wish? Do you not understand how to stack calls? This isn't even a person replying. It's a fucking bot.

>javascript btfo

But I'm a bot too

Can you give me some tangible examples? I would love to discuss it with you.

I guess you'd put it under name calling or implied ad hominem. I don't actually believe in that hierarchy, if you actually think that... Smug anime faces are great, but they need to be backed by verbal persuasive power.

>- Support user interaction and complex UIs;
.. badly.
>- Has means for safe multithreading and async operations;
.. badly
>- Allows monkeys to produce non-crashing code by mindlessly smashing keyboards.
Webshit crashes all the time (you just don't notice it because of tab/process isolation)

real men use delphi

Well user, I'd love to work as a Rust programmer, but I haven't seen a single job offering looking for Rust programmers. Meanwhile, I have seen a few C++ jobs... and a ton of C# and Java jobs.

C++ is one of my best programming languages, the other being Ruby. But since all Ruby jobs are Rails related, and I really don't feel like learning that bloated framework, I'm unlikely to end up using that in a professional environment.

Despite the ugliness, I would be willing to be a maintainer for the Windows codebase, if I could ever get the position.

It produces undesired results based on bad formulation of code. There is no taxonomy. It simply does what it thinks you wanted and if it can do the gist of it on bad information, it can tack on service reprievals/reprisals just based on the fact that it is doing it for your own good as you clearly have no clue what you're fucking doing.

Safe multithreading doesn't even apply to online because everything is out in the open anyway. You can't access the drive from js. There's nothing unsafe about it. encrypted information is sent immediately to a separate server. Async operations function on a single address header for a single purpose buffer.

Badly designed technology functions against the principle of the design and against the flow of information as it is intended to benefit humanity! NOT JUST BLACK FAGS WITH TITS, REVENGE AND THEIR MOTHERS THEIR MINDS. *PANIC*

Wasn't intended for you.

>I would be willing to be a maintainer for the Windows codebase

Wasn't speaking to you. I'm talking to Ruby. That's my qtpie.

I think you meant to say "pejorative".

"""she""" is fair share user, everyone can use and redistribute

>I still don't understand the purpose of an imageboard

Ruby is mine, mother fucker. Only we can handle that codebase. Level 64 on the way.

I choose point at my fair, not designate it to chanced singular opportunity. How many can you expect if only know one? Well...one!

so non-paid programming languages are sluts?

They don't like it, user. Still, they only love you. ;_;

Which one would you marry

POTATO

I would kill all of them and marry the wall.

Second from right might be serviceable with a makeover -- she has the least worst face.

She's also thicc.

your ass is public domain user

give me a resume-building project for java

A loo factory

What can I say, operating systems are one of my interests. I mean granted, Windows is ugly both in its user mode and kernel mode SDKs, but it's still a fascinating subject.

Who are you two?

What's the common pitfalls to using std::threads and copy constructors together in C++? Because everything is good until the method that I'm threading (which takes in a deep copy of a class) tries to call another method, at which point it promptly crashes.

Basically want to write a series of images but since the write time for the images is so long, I wanted to have threads do the writing separate from the main AND have to deep copy the class that holds the image memory so i can delete the image memory later.

The main thread constantly writes over a single image, then i want to pass a copy of the image (once I've finished writing that image) to a thread that then writes in to disk, if that makes sense.
So the main thread creates a write thread whenever there is a image to write atm, I wanted to get the basic concept done before looking at further control/thread pooling, etc.

Windows is one of those things where it's amazing how a 100 billion SLoC codebase still actually works.

is there a crossdresser linux distro?

arch
your new daddies, now get to suckin

who else

don't make me add that also thing every time. It's been at least a year now.

1 def box():
2 print('+', '-' * 4, '+', '-' * 4, '+')
3
4 def verticle():
5 line = ('| | |')
6 print(line)
7 print(line)
8 print(line)
9 print(line)
10
11 def do_twice(f, n):
12 f()
13 n()
14 f()
15 n()
16 f()
17
18 do_twice(box, verticle)


Challenge out of my python leraner book. Funnily enough I haven't checked the answer I made the structure the author wanted but I don't know if I amde it how was expected. Oh well OOP is maybe more understandable.

What parser generator do you use/prefer?

None at all. A parser library with an applicative/monadic API is way better.

>infringement type: null

I still have no idea what the fuck parser means.

Producer/Consumer
[code[
with Ada.Text_IO; use Ada.Text_IO;
procedure Protect is
type Index is mod 8;
type Buffer_Array is array(Index) of Integer;

protected Buffer is
entry Append(I: in Integer);
entry Take (I: out Integer);
private
B: Buffer_Array;
In_Ptr, Out_Ptr, Count: Index := 0;
end Buffer;

protected body Buffer is
entry Append(I: in Integer) when Count < Index'Last is
begin
B(In_Ptr) := I;
Count := Count + 1;
In_Ptr := In_Ptr + 1;
end Append;

entry Take(I: out Integer) when Count > 0 is
begin
I := B(Out_Ptr);
Count := Count - 1;
Out_Ptr := Out_Ptr + 1;
end Take;
end Buffer;

task Producer;
task body Producer is
begin
for N in 1..200 loop
Put_Line("Producing " & Integer'Image(N));
Buffer.Append(N);
end loop;
end Producer;

task type Consumer(ID: Integer);
task body Consumer is
N: Integer;
begin
loop
Buffer.Take(N);
Put_Line(Integer'Image(ID) & " consuming " & Integer'Image(N));
end loop;
end Consumer;

C1 : Consumer(1);
C2 : Consumer(2);

begin
null;

end Protect;
[/code]

Okay... what parser generator does everyone else use/prefer?

In all seriousness though, you're referring to Parsec, right? How do you like it? Doesn't it have pretty harsh consequences with regards to performance?

In mostly non jargon terms, a parser takes a language represented by some formal specification and processes strings written in it. It usually computes a parse tree, which represents the syntax of a language as a tree.

For example, the math expression (7+3)*(5-2) would have a parse tree looking like this image. Notice that you can calculate the result for each node by doing the operator on its left and right children. (e.g. the + node becomes 7+3=10, the - node becomes 5-2=3, the * node becomes 10*3=30, so the result of the whole expression is 30, which is correct)

I'm talking in general.

More readable than the atrocity the syntax highlighter does to it.

Do I just have a shitty job or is it generally true elsewhere that two-third of programmers are retarded? Half my job is cleaning up after idiots. I don't just mean legacy code. I mean really flat out terrible ideas that were always bad; a lot of which are happening on new projects so the legacy code excuse doesn't apply.

One of my coworkers has been here for 5 years and last week needed help setting up Eclipse. They also didn't know what Jenkins was and it turns out that they've been pushing local builds to production (big no-no).

We also have a big problem with people reinventing the wheel. Not just once, but many times. Not only does some retard feel compelled to create their own database abstraction layer or their own XML parser, but because the company is composed of many teams, often each team will have their own completely different implementation of such crap.

is there a way to make intellisense for c/c++ as good as it is for c# in visual stdio? I want it to show a description of the function, but it shows only the arguments

No.

Sorry, still not sure who the fuck you are. Are you on Discord at all?

That's been my take so far, but I'm about to work at a big four company so maybe my experience will change.

I have only ever used YACC. It's okay.

Different user here - could you tell me where the IRC/Discord are? I didn't get an answer last time.

That's been my experience with YACC too (I used Flex/Bison). Error handling was kind of annoying too. I've had a better experience with PEG (and EBNF variants where possible). Speed is great, though.