[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 353
Thread images: 37

File: dpt_flat.png (102KB, 1000x1071px) Image search: [Google]
dpt_flat.png
102KB, 1000x1071px
Old thread: >>57357273

What are you working on /g/?
>>
>>57359216
>>57359549
Thanks you for that
http://heart.pai.ontopcorp.com/
>>
Stroking my dick to bubble butt twinks
>>
File: samplerun.png (29KB, 494x156px) Image search: [Google]
samplerun.png
29KB, 494x156px
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
>>
File: Capture.png (946KB, 1279x917px) Image search: [Google]
Capture.png
946KB, 1279x917px
>>57361549
meh
>>
File: 1463396996349.png (325KB, 382x417px) Image search: [Google]
1463396996349.png
325KB, 382x417px
>>57361528
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.
>>
File: 1477529947909.jpg (511KB, 1280x720px) Image search: [Google]
1477529947909.jpg
511KB, 1280x720px
>>57361528
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.
>>
>>57361528
if( op.image.isAnime() )
reply("just stop it you guys... Please?");
>>
>>57361786
Best way to practice is to do stuff.
>>
>>57361786
My personal choice in your position would be stick to personal projects until getting better at C++.

>>57361941
if(!/op\.image\.isAnime\(\)/.test(program))
eval(program);
>>
File: yuru yuri eye bleed.jpg (37KB, 640x360px) Image search: [Google]
yuru yuri eye bleed.jpg
37KB, 640x360px
>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?
>>
>>57362028
Delete javascript
Delete CSS
Done.
>>
>>57362061
>Get no paycheck
Oy vey.
>>
>>57362028
> web development
> programming
Go back to your containment thread 2bh
>>
File: madoka smug.jpg (101KB, 680x680px) Image search: [Google]
madoka smug.jpg
101KB, 680x680px
>>57362145
You are just jealous. i write software that reaches millions of users, you write code that will rot in obscurity.
>>
>>57362028
>tfw too smart to use Node / Javascript
>>
>>57362193
Too bad your software is useless.
>>
>>57362193
Who could be jealous of a fat weeb that spends his time cursing his round eyes?
>>
File: natural34~01~01.jpg (29KB, 335x493px) Image search: [Google]
natural34~01~01.jpg
29KB, 335x493px
>>57362193
> 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
>>
>>57362061
>>57362145
>>57362203
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?
>>
File: 132120984.png (138KB, 234x260px) Image search: [Google]
132120984.png
138KB, 234x260px
>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.
>>
>>57362326
>replying to bait seriously
I use Node / JS heavily myself faggot, I was just baiting the insecure anime avatarfag
>>
>>57362352
Just wait you enter the world of elitists where notepad++/vim is the norm and you only compile from a shell.
>>
>>57362370
so, paradise?
>>
File: ashit.jpg (956KB, 1456x1008px) Image search: [Google]
ashit.jpg
956KB, 1456x1008px
>>57362325
Post with a timestamp and I'll believe you, but until then you just attached a picture of some dude.

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

>>57362352
At least they don't treat shells like some hacker black box
>>
>>57362352
>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.
>>
>>57362352
i'm not anti-ide but visualstudio is ass cancer
>>
>>57362352
Because Visual Studio hampers understanding of the build tools chain.
>>
>>57362028
>>57362193
>>57362325
>>57362326
>>57362352
>>57362365
Seriously consider killing your family before killing yourself.
>>
>>57362395
Visual Studio is universally regarded as the best IDE, provided you're using a MS language.
Kill yourself, freetard.
>>
>>57362395
Why?
>>
>>57362378
>paradise
maybe, if you're a trap
>>
>>57362352

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.

>>57362028

>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.
>>
>>57362413
>mistaking me for that guy
don't kill yourself since that'd be escape for you
>>57362386
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
>>
>>57362425
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
>>
>>57362447
maybe you're just retarded
>>
>>57362467
maybe you're a windows fanboy
>>
File: 1478054423500.jpg (119KB, 777x656px) Image search: [Google]
1478054423500.jpg
119KB, 777x656px
>>57362413
You need to move up the hierarchy
>>
File: konata giggle.png (42KB, 325x325px) Image search: [Google]
konata giggle.png
42KB, 325x325px
>>57362444
>C or C++
Your world is also changing. It's time to jump a Rust bandwagon.
>>
>>57361784
anon, 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.
>>
>>57362326
>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.
>>
>>57362444
>Hoping for C++
Literally mental masochism. Still better than anything related to Javascript though
>>
>>57362370
>elitists
>notepad++
>>
>>57362482
>kys isn't in the hierarchy
What do

Also, if you keep posting smug faces just because of that pic you're seriously retarded.
>>
>>57362486
>It's time to jump a Rust bandwagon.
no thanks, im not a cuck
>>
>>57362446
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.
>>
>>57362497

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.
>>
>>57362493
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.
>>
>>57362145
nice one grandpa
>>
>>57362556
>arrange information upward
You wish. It doesn't teach you anything else than anarchism.
>>
File: 16bitthumbsup.gif (40KB, 800x1002px) Image search: [Google]
16bitthumbsup.gif
40KB, 800x1002px
>>57362498
>>
File: link-dude-what.jpg (58KB, 500x284px) Image search: [Google]
link-dude-what.jpg
58KB, 500x284px
>>57362496
>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.
>>
>>57362556
tl;dr
>>
What do you all think of Columbia College Chicago?
>>
>>57361660
 String placeholder;

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


>>
>>57362586
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
>>
>>57362618
But I'm a bot too
>>
File: assembly.png (356KB, 506x662px) Image search: [Google]
assembly.png
356KB, 506x662px
>>57362496
Can you give me some tangible examples? I would love to discuss it with you.

>>57362533
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.
>>
>>57362591
>- 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
>>
>>57362486
Well Anon, 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.

>>57362497
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.

>>57362576
Despite the ugliness, I would be willing to be a maintainer for the Windows codebase, if I could ever get the position.
>>
>>57362591
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*
>>
>>57362598
Wasn't intended for you.
>>
File: 1477593622116.jpg (19KB, 222x293px) Image search: [Google]
1477593622116.jpg
19KB, 222x293px
>>57362648
>I would be willing to be a maintainer for the Windows codebase
>>
>>57362630
Wasn't speaking to you. I'm talking to Ruby. That's my qtpie.
>>
>>57362637
I think you meant to say "pejorative".
>>
>>57362690
"""she""" is fair share anon, everyone can use and redistribute
>>
>>57362690
>>57362673
>I still don't understand the purpose of an imageboard
>>
>>57362706
Ruby is mine, mother fucker. Only we can handle that codebase. Level 64 on the way.

>>57362708
I choose point at my fair, not designate it to chanced singular opportunity. How many can you expect if only know one? Well...one!
>>
>>57362706
so non-paid programming languages are sluts?
>>
>>57362743
They don't like it, anon. Still, they only love you. ;_;
>>
File: gubbachi-goodu-home-stay.jpg (49KB, 550x412px) Image search: [Google]
gubbachi-goodu-home-stay.jpg
49KB, 550x412px
Which one would you marry

POTATO
>>
>>57362762
I would kill all of them and marry the wall.
>>
>>57362762

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

She's also thicc.
>>
>>57362743
your ass is public domain anon
>>
give me a resume-building project for java
>>
>>57362840
A loo factory
>>
>>57362679

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.

>>57362690
>>57362738
Who are you two?
>>
File: Blinking.webm (731KB, 410x438px) Image search: [Google]
Blinking.webm
731KB, 410x438px
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.
>>
>>57362866

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?
>>
>>57362906
arch
>>57362866
your new daddies, now get to suckin
>>
>>57362866
who else

don't make me add that also thing every time. It's been at least a year now.
>>
>>57361528
  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.
>>
File: gnuslashcomcast.jpg (113KB, 500x667px) Image search: [Google]
gnuslashcomcast.jpg
113KB, 500x667px
What parser generator do you use/prefer?
>>
>>57363432
None at all. A parser library with an applicative/monadic API is way better.
>>
>>57363432
>infringement type: null
>>
>>57363432

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]
>>
File: meParse.png (25KB, 377x252px) Image search: [Google]
meParse.png
25KB, 377x252px
>>57363438
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?

>>57363474
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)
>>
>>57363544
I'm talking in general.
>>
>>57363497
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
>>
>>57363598

No.
>>
>>57363122

Sorry, still not sure who the fuck you are. Are you on Discord at all?
>>
>>57363584
That's been my take so far, but I'm about to work at a big four company so maybe my experience will change.
>>
>>57363432
I have only ever used YACC. It's okay.
>>
>>57363736
Different anon here - could you tell me where the IRC/Discord are? I didn't get an answer last time.
>>
>>57363762
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.
>>
>>57363736
No discord. I am the "also, hi ruby" guy. That's it. No, I'm not some shill or some cia nigger. I'm just a guy. Probably a nigger to some but not black.

Alright, see you later, meanie. You're still female.
>>
>>57363584
Please do the job without taking your special pills and then see if it's necessary for you to make your own wheel at the helm. Regardless of that, I'd say most programmers are retarded. Especially so for anyone that says "that's you".
>>
Messing around with random generation, seeing if I can come up with some kind of basic story outline generator. So far, I've got output like this:

The story follows the following character(s):
Jessica, the Purchasing Manager
Douglas, the Aerospace Engineer
Lori, the Air Traffic Controller
Denise, the Podiatrist
Linda, the Podiatrist
The story's focus is a Man vs. Self conflict.
>>
Hi, learning C coming from Python. Should all problems be solved using fixed length arrays? I haven't looked into VLAs because I was wondering if that would make C more like Python.
>>
>>57363769
https://discord.gg/ue9MW

You should try, oh I don't know, joining it this time. So I don't have to post it for the 2147483647th time.

>>57363861
And you're still a cunt. See ya.
>>
>>57364228
This is the first time I've seen this link - I've only heard it referred to previously. There's lots of anons here. Sorry to make you post it again, though.
>>
>>57364252
Also, thanks.
>>
>>57362423
only the debugger is good, the rest is bloated shit
>>
File: 1368167414957.jpg (64KB, 441x705px) Image search: [Google]
1368167414957.jpg
64KB, 441x705px
/dpt/ I have a question.
I'm on this balls hard class of basic data structures... and it's hard 80% because the rubrics are so weird, you get 20% deductions for code over 80 lines, 10% for having any single line indented incorrectly, or 10% for having carriage returns, missing a single line of comment can cost 15% of the grade, etc. etc.

But most of it is the material is pretty messed up, I take at least 10~14 hours trying to figure out what the assignment wants me to do with all the restrictions, trying to figure out what each function the teacher gives us does etc. etc.

Anyway, how worth is this class anyway?
Will people in programming jobs expect me to do a double, circled linked list off the back of my head, weird as fuck hashtables and all these meticulous things I've mentioned?

I hear people work in the industry, they barely remember what is a linked list or how to implement one, besides going "oh I did that once in college, long time ago", and it kinda hits me if this class is worth all this hassle

tl;dr is basic data structures worth going through a ton of bullshit, and is it really worth the stress or am I barely going to use the stuff I learned?
It just feels not worth it, if you know what I mean.
>>
>>57361660
String fileName;
File file;

System.out.println ("enter file directory and name");
fileName = scan.nextLine ();
file = new File (fileName);

>>
>>57364364
Depends what kind of job you're going for
>>
>>57364364
You'll never have to implement your own linked list to get something done. But it's a bad sign if, given a specification, you can't do it right away.
>>
>>57364364
Just knowing why you'd use each one is fine. You're not going to make a better implementation than the one provided by your standard library.

For instance consider trying to decide whether to use an ArrayList or a LinkedList. If you're doing a lot of random reads, an ArrayList is appropriate because you can get to any position in the list equally fast. On the other hand, inserting into the middle of an ArrayLIst is relatively slow, because a bunch of data has to be shifted over to make room.
>>
Any anon know lisp & want to help a guy out? I feel like I'm so close to finishing this but I'm too tired to type it out for deaf ears.
>>
>>57363287
Is that the very first chapter or something?
>>
File: 1477525299214.jpg (22KB, 638x560px) Image search: [Google]
1477525299214.jpg
22KB, 638x560px
>>57364228
That's not like you, Ruby. I'm going to be upset with you.
>>
>>57364006
Should add in a time period/environment variable set.
>>
File: 474254900.jpg (167KB, 640x360px) Image search: [Google]
474254900.jpg
167KB, 640x360px
Tried joining the discord and it was expired.
>>
>>57364138
I guess it depends on how you want to use said array. What are you trying to accomplish? I'm no C wizard, but I know the basics and have been using Python for years.
>>
>>57362228
It surely won't run a vehicle
>>
>>57362444
Thought of python?
>>
>>57362498
>elitist
>sublime
>>
Is the sicp (and associated course (6.001)) actually worth it? On a 4 month break basically and thinking of doing it`
>>
File: Dancing.webm (3MB, 640x360px) Image search: [Google]
Dancing.webm
3MB, 640x360px
i'm trying to replace the last word of a string in bash but i cant wrap my head arond all the $.//#*-4c bullshit. But it should be easy for anyone who's familiar with it.

string="please help me remove the last word"
string=$(string dark magic)
(newstring becomes "please help me remove the last")


I'm usually a python guy, and doing this in that language is a walk in the park. But i'm editing a bash script right now and i'm close to killing myself.

Could someone please help me out?
>>
>>57364759
A word here is a space separated string of non-space characters. And the sequence contains no less than 2 words.
#!/bin/sh
read words
words="${words% *}"
words="$words wallaby"
echo "$words"
>>
I'm learning C as my first language and my friend wants me to learn Fortran to do some work with him. Being not entirely new to programming, in how much time could I reasonably learn it?
>>
>>57364964
are you male or female? male might take longer because of how the information has been spread out since the whole sjw uprising. Female? You might get sent to your desired info right away and be ready with at least coding practice sooner.
>>
>>57364964
Oh, the old times, the old questions...
>>
>>57364964
it'll be even worse if you're a cis white male.
>>
>>57365131
>>57365134
>>57365138
jesus those were not the answers I was expecting
what's the deal with it?
male btw
>>
>>57365170
What kind of answer do you expect?
First, you're in /g/ of 4chan. Second, you haven't stated the purpose of your studies and the nature of your friend's project.
>male btw
touch me from behind
>>
>>57365192
kek I expected a number or a rebuke at most
didn't realize any of that would matter.
I don't even know the project yet, my friend just wanted me to help him.

>touch me
will do
>>
>>57365254
Why is your friend even working in Fortran?
>>
>>57365279
dude idk
maybe he's fucking with me, he's kind of an asshole.
>>
>>57362423
>best
>visual studio
>not idea

I think you might have a brain tumor. Visited a doc lately?
>>
>>57363432
Either Coco/R or just skip the middleman and write RDP manually.
>>
>working on a company for one year
>tfw developing vaporwares
>>
>>57365358
At least if none of your code makes it to production there's no risk you'll ever be the cause of a security issue or something like that.
>>
How would I write this to record a post order traversal in the array instead of in order traversal?

int *flatten(node *n, int *A)
{
if (n) {
A = flatten(n->left, A);
*A++ = n->data;
return flatten(n->right, A);
} else
return A;
}
>>
>>57365254
There is the notion of 'modern fortran'. If your friend's project involves some other kind, the project should be dropped and you should never approach it in any way.
Fortran isn't the best language to learn from the position of computer science---it's not neat and well-designed, because it has a large baggage of anachronistic strange rules. But if you restrict your programming to the numerical domain, then it's quite nice (mostly because array operations) and the new facilities are useful fixes to old problems.
The C programming language, on the other hand, was created consistently around some abstract data model, which describes the machine-level closely and is common to many exist(ed/ing) computers, not just as a notational convenience of an engineer who indulges in occasional programming. This made it a language of choice for programming operating systems. So, if you have any purpose of doing general programming using POSIX inteface, you should know C well. Well, C has a lot more libraries than Fortran, in general.
Because C is close to machine-level, there are good compilers which allow you to write fast numerical programs. So, C is another top language in the numerical domain. (Which means you can do fine without Fortran there.)
Also, C/Fortran interoperability is well-described, so you can help with the project using C.
>>
>>57365358
We've also done vaporware. I feel a little sorry that now play store has one more app which is useless for anyone. I am not sure even clients that ordered the app use it. They hope it their customers will download it someday.
>>
>>57365170
If you have prior experience it really shouldn't take too long. If you don't, please keep in mind that it's a data table and that you're managing everything from. If you can do that, pointers will make sense. Functions over the data table will make sense.

The deal with the whole male female thing is that if you ask questions on google with a "phallic sense" tied to them, or like something not a chad you'll get taken to stack exchange where you'll find all kinds of gifs linking to bad services and servers and it'll make the whole experience kind of shitty if you're not one to mince words over nothing. As most programmers aren't. I would recommend sticking to the University PDFs, most prominently the Oxford one. At least for C.

Otherwise you might end up getting sold on shitty coding practices that introduce noise patterns rather than simple ad placements and that's where it gets real shitty. Like poo in the loo shitty. Don't google that either.
>>
Wew, did all of codecademy's online course for python. Where can I go to keep learning more about the language?
>>
>>57365401
Of course, I can just change that (my) code to satisfy your specification, but let me lay down some properties of it and let you do the rest (or you wouldn't learn anything).
// ...
// A points to some free element in an array
B = flatten(n, A);
// A, A+1, ..., B-1 points to elements from the tree
// B points to the next free element
// ...
B = flatten(NULL, A);
// A == B; the base case does nothing

Problem: build another flatten_ltr with those properties but it works in post-order.
>>
>>57365401
Just switch the order that the child nodes are accessed...
>>
File: 1438830330084.gif (260KB, 266x207px) Image search: [Google]
1438830330084.gif
260KB, 266x207px
>>57365477
I don't think I understand... So I need to write another helper function on top of it?

I've been trying to figure out for myself all day. Posting on here again is basically me giving up, it's not my fault I'm dumb.

>>57365516
that's not post order, that's just reverse in order.

Post order is left, right, center
>>
Trying to study for an intro-to-CS class's midterm.

Let's say I have a function that correctly identifies the subset Sum (IE, if a set contains {1, 2, 3}, it returns true if you want to make 6)

bool subsetSum(Set<int>& inputSet, int value)
{

/**** BASE CASES *******/
if(value == 0) return true; //If you found a way to get to 0, congrats! You found a solution!
if(inputSet.isEmpty()) return false; //If you exhausted all possiblities, You didn't really find a solution

/**** RECURSIVE CASE ******/
for(int currNum : inputSet)
{
Set<int> inputSet_COPY = inputSet - currNum;
return (subsetSum(inputSet_COPY, value) //Assuming you don't need the current number in the set to make the sum
|| subsetSum(inputSet_COPY, value - currNum)); //Assuming you do... If either one returns true, then congrats! You found a solution
}
return false;
}



How would I make it such that the function keeps track of how many solutions there are?
>>
>>57365549
You're not dumb---you're lazy. That's why you haven't acquired any skill you're supposed to have in solving those problems.
int *flatten_lrt(struct node *n, int *A)
{
if (!n) return A;
A = flatten_lrt(n->left, A); // left subtree is written
// A points to the next free place
// write the right subtree starting with current value of A
A = flatten_lrt(n->right, A);
// A points to the next free place
*A = n->data; // put datum there
return A+1; // return the next free place
}
>>
>>57365345
excellent argument NEET faggot
>>
>>57365564
No way with your algorithm. Imagine that you set contains 0. It returns without checking for additional solutions.
And it looks pretty horrible.
>>
File: IMG_1771.png (460KB, 800x600px) Image search: [Google]
IMG_1771.png
460KB, 800x600px
>>57365577
I can't believe I couldn't figure this out
>>
I'm working a project using erlang & javascript. The project is organized like this:
./
-> src
-> app.erl
-> websocket_handler.erl
...
-> priv
-> static
-> index.html
-> main.js
...
I'm working on the files in the src directory and the static directoy at the same time, in the same vim instance. I need to run :make each time I save a file, even if the file is in the static directory. I tried setting up an autocmd but it doesn't work because I have autochdir enabled, it prevents vim from finding the right makefile.
How can I manage to run :make each time I save my files while keeping autochdir enabled?
>>
>>57365627
Wait... what do you mean "returns without checking for additional solutions"

If the set contains zero, the only way it will return true is if the value also contains zero. Otherwise, you can't form anything with zero.

Also, what's wrong with overcommenting?
>>
>>57365729
If the set contains 0, then there are two solutions: {} and {0}, satisfying the constraint that the sum of a subset is 0. Also, there can be negative elements. Just iterate through all subsets properly.
>>
>>57365682

I am doing pretty much the same thing and.. I just have a separate command window open to run make in.
>>
So /dpt/, what's the best modern programming language? D, Rust, Crystal, Nim etc...
>>
>>57365848
C++17.
>>
>>57365564
What's the point of the for loop?
>>
>>57365848
Haskell
>>
>>57365851
If it doesn't include modules, then I don't care.
>>
>>57365880
it doesn't
>>
>>57365848
Being younger, Tingle did not realize that harassing her mother directly made that cozy pouch accessible---her attention was focused on just getting in there.
>>
>>57364390
>>57364446

This. You're not being trained to memorise specific structures.

You're being trained to address bullshit specifications, which will happen a lot.
>>
>>57365784
Alright... I guess that makes sense... Thank you!

>that amazing feeling when you do a practice midterm and you do it flawlessly
>>
File: POWERED.png (90KB, 630x587px) Image search: [Google]
POWERED.png
90KB, 630x587px
I'm too retarded for my assignments. Is there a place I can go and get help?
>>
This seems about as relevant a place as AGDG to ask this question. So what is the best engine to remake SS13 with? SS13 is the cult classic that's been alive for the past 13 years which uses Byond, a closed source 90s MUD engine that's been on life support for ages with limited functionality. Every SS13 dev wants to be rid of it but none can agree how, making a new engine, finding an engine, slapping libraries together.

All in all we want an engine that has at least
>2D support
>networking and multiplayer functionality for 20-100+ players (each hosted on a headless server)
>open source
>relatively fast language
>compiles and runs on Linux+Windows
>full control over the client code as well
>multithreading is a plus

Any suggestions or experience?
>>
File: index.png (810B, 90x90px) Image search: [Google]
index.png
810B, 90x90px
A friendly anon yesterday told me it's possible to have this be true:

 
int hex2dec(const char *hex) {
int n = strlen (hex);


Will this get me the length of the pointer or the length of the char array? I asked someone and they said "sizeOf" in this case would get the size of pointer, not the array, so I was wondering if strlen would do the same thing.
>>
>>57366663
Yes
>>
>>57366597
Use vanilla OpenGL on top of GLFW using libev for networking.
>>
How do I make a list of the first 1000 numbers in oCaml? I can't seem to find anything...
>>
one of you niggers post the programming roll chart
>>
>>57362477
Maybe I.... succ ya dicc?
>>
> supposed to do introduction to Python for fellow students
> prepare 90 minute workshop
> task: write program that generates random numeric array and sorts it using insertion sort
> 60 lines of noob-friendly code including whitespace and comments
> remember that they are all dirty plebs using Windows
> oh well it'll be fine, all they need is the Python interpreter and a text editor
> decide to make sure that installing Python is indeed a simple process
> decide I'll use Python 3 because support for 2 will end eventually
> download installer
> execute installer
> literally takes like 15 minutes
> installation fails because some botnet framework shit didn't install (VS redistribution or something?)
> retry, installation complete
> can't launch python because some .dll is missing
Why is Windows such a shit show? REEEEEEE

I'll just tell them to install Python 3 in advance, let them figure it out on their own. Seriously, installing Ubuntu might actually be the better choice for a noob; less troubleshooting and at least you get a working environment unlike fucking Windows.
>>
File: _.jpg (21KB, 372x260px) Image search: [Google]
_.jpg
21KB, 372x260px
How do I find duplicate numbers in any amount of numbers in c++ with less than 3 loops?

The array storing the numbers has a fixed size of 100.
>>
>>57366935
Nice homework
>>
>>57366935
Sort it. Then it's trivial.
>>
>>57366935
Are you retarded?
Either sort it in O(n*log n), or use a bitmap in O(n)
>>
File: anal beads.png (9KB, 351x243px) Image search: [Google]
anal beads.png
9KB, 351x243px
>>57363598
Does C++ intellisense support the XML annotation of functions?

In C#, you'd go to the line above a function and type ///

It autogens intellisense documentation.
>>
>>57366975
>Having a built-in algorithm do a shitload of unnecessary work so that what you're trying to do is trivial

I wouldn't hire you.
>>
is OpenGL hard to learn?
>>
>>57366989
It's hell.
WINAPI is a less brain-damaged API than OpenGL.
>>
>>57366989
Just learn Vulkan.
>>
>>57366986
I solved the problem In 2 minuets rather than two hours, which save you money on my salary.
>>
>>57367016
Good job Pajeet, 10 rupees have been deposited in your account.
>>
>>57367016
>I solved the problem In 2 minuets
You should be fucking ashamed of yourself if it takes you more than 10s to come up with a solution. And not even a good one at that.
>>
>>57367006
but is vulkan backwards compatible or do you need 2016 hardware to run it?
>>
>>57366935
for(i = 0 or 1 to len(array))
num = array[i]
for(j = i+1 to len(array))
if(num == array[j])
found_duplicate()

Why would you even need 3 loops?
>>
>>57367047
It runs fine on most GPU as long as the drivers are installed. It's less compatible with integrated GPU though.
>>
>>57366935
>C++

heh, nothin' personnel kid, but I'm 'a use a real language

var dupes = list.GroupBy(x => x).SelectMany(x => x.Skip(1));
>>
>>57367037
It takes O(1) extra memory rather than O(n) extra memory as in the bitmap solution.
>>
>>57367073
>Complexity. In OpenGL getting something on the screen is by far easier. Even without classic fixed function, just rendering full-screen effects or image-processing takes only few lines of code. Vulkan’s level of verbosity to get to the first pixel on the screen is far higher. As hinted in the previous blog posts on resource bindings or memory management, these additional complexities will require more code to be written. Especially for people new to graphics, it may be better to use OpenGL or rendering middleware that hides this complexity and focus on the actual task.
https://developer.nvidia.com/transitioning-opengl-vulkan

I have no experience in graphics programming, according to nvidia then I might be better off starting with OpenGL.
>>
>>57367089
And taking the O(n) memory cost is the better choice most of the time.
You should at least be able to at least mention the obvious space-time tradeoff.

Do note that I said "bitmap", but what I meant is "hash table", the bitmap is every so slightly more efficient but only works if your input is bounded.
>>
>>57367095
OpenGL will teach you the wrong habits. :^)
>>
>>57367105
The real answer is to use a fucking Set in the first place.
>>
>>57367121
A set is usually internally a hash table, so your answer is roughly equivalent.
Using a set in the first place is not always possible, so that's not a good answer. If the input is an array, that's probably for a reason.
>>
>>57367121
So an hash table then?
>>
>>57367121
>a fucking Set
The concept of a set has no order.
>>
>>57367140
Non sequitur, order is not required anywhere.
>>
>>57367128
>A set is usually internally a hash table
That's an irrelevant implementation detail. You can implement it as some tree.

>that's probably for a reason.
A bad one. If you care about duplicates, using arrays is dumb.

>>57367140
But it has a concept of element equality, which is all it needs.
>>
>>57367153
>That's an irrelevant implementation detail. You can implement it as some tree.
Or you could implement it as a sorted array, if we want to go full circle.
And that's exactly why it's not a satisfactory answer.

The point of the question is pretty much asking you how to convert an array into a set. If your answer is "I'll use a Set!", why thank you, but that's not helpful.

>A bad one. If you care about duplicates, using arrays is dumb.
You may only care about duplicates at a certain point, before which you need the array for performance reasons.
You're only seeing part of the problem, don't assume the array is stupid if you don't know why it's there in the first place, that's incredibly short sighted.
>>
>>57366834
>literally takes like 15 minutes
This is 100% a "problem exists between the chair and keyboard" scenario. I've installed Python on an entire office of computers with 5400rpm drives at this point and I've never had a single installation for ANYTHING take 15 minutes just to fail.
>>
>>57367383
My point is that setting up Ubuntu is about as complicated as installing Python on Windows (i.e. not at all), except with Ubuntu you get a working Python installation, better OS and no obscure errors if your OS isn't literally a Pajeet-tier basic installation with all the botnet shit running in the background. Obscure errors which you fix by googlaying the problem, reading shitty forums and shill sites, downloading 10 different programs or drivers that *might* fix the problem but usually don't, rebooting 20 times in between and end up with 2 GB or non-removable bloat on your system.
>>
>>57361528
http://pastebin.com/hcNfTTfS first time obfuscating
>>
>>57367415
You have no point.
>Python.org
>3.5.2 or 2.7.12
>double click installer
>check box to include on PATH
>???
>profit!
One .exe file. At most, 60-90 seconds of installation. You're just retarded.

There is no way you can get a .dll error unless you're completely and purposefully fucking up the system. You are flat-out making shit up to pretend that you're not retarded. This is wholly equivalent to some gaymer posting about how he bought a workstation graphics card, was utterly shocked that he wasn't able to run Crysis, and blamed the company who made the card for his fuckup.
>>
>>57367415
You're a moron.

I've got Windows 10 and it took less than a few minutes to have a working Python interpreter ready to go in the command line and a text editor.

I've done the same recently on 8.1 and 7.
>>
>>57367491
3/10, way too easy to refactor with automated tools.

#include <stdio.h>
#include <stdlib.h>

int main()
{
char data[0xE];
data[0] = 79;
data[1] = data[0] + 1;
data[2] = data[1] / 2.5;
data[3] = 0x69;
data[4] = 0x50 * 1.4375;
data[5] = data[2] + 0x0;
data[6] = 0x539 - 0x4D8;
data[7] = 0x40 / (0x1 * 0x2);
data[8] = 1024 / 10;
data[9] = data[300 % 98];
data[0xA] = data[0x8] + 1;
data[0xB] = data[0xA] + 0x0;
data[0xC] = 100 % 89 * 10 + 1;
data[0xD] = 3 * 33 + 4 * 4 + 1;

for (int i = 0; i < 0xE; i++)
printf("%c", data[i]);

return 0;
}


I didn't even need to bother unobfuscating the values in the array, because the actual logic of the program isn't obfuscated.
I already know what the program is doing and so I can trivially deduce that those are the letters, now matter how complicated the formula for each letter is.

Some effort, but in the wrong place.
>>
>>57367506
>>Python.org
>>3.5.2 or 2.7.12
>>double click installer
>>check box to include on PATH
>>???
>>profit!
Good job, guess what I tried? It literally comes with tons of M$hit bloat like VS redistributable whatever the fuck and dll files out the ass, and the installation of that (supposed to happen automatically) failed despite disabled firewall. This was on Windows 7. "Purposefully fucking up the system" -- I applied a patch linked in the installgentoo wiki (I think) that disables the telemetry, that's it. Even all of my *ahem* games *cough* work with no issues. If something as simple as a fucking Python interpreter requires dlls that might have been removed by something that disables the sending of unwanted data then that just further proves that Windows is absolute gobshite and further reinforces my conviction that I will never EVER use this piece of shit OS ever again.

> b-b-but it works if you let M$ put bloat on your PC, spy on you and """update""" your system without your approval while having you agree to dozens of EULAs that make sure that you have no right to even use the software you installed as you wish
>>
>>57362325
>>57362193
You're so fucking sad that you have to post an image from a porn website.

>i write software that reaches millions of users
Maybe in your little autistic world.
>>
Why does this fail? It gives me a type mismatch error...
let is_div_3_5 a =
(phys_equal (a mod 3) 0) || (phys_equal (a mod 5) 0)

let () =
let nums = List.init 1000 in
List.filter ~f:(is_div_3_5 x) nums
>>
I don't understand the difference between fetch and pull.
>>
>>57367649
>installing random .exe files from the internet
>complaining that your currently installed OS is garbage
>on top of that you have no idea what runtimes are
And you have the gaul to talk about being concerned about telemetry and bloat? You might want to back out of teaching not just that Python class but anything in the future if you have no idea how to install an .exe or operate in multiple OS environments; sub-80 IQ is unfortunately not a treatable illness.
>>>/v/
>>
>>57367725
Have you ever played with a dog?

It's basically the same thing.
>>
>>57367725
There's actually 3 different branches, the remote one, your local one, and your local copy of the remote one.

Fetch updates your local copy of the remote.
Pull updates your local copy of the remote, and then merges/rebases that on top of your local branch.
>>
>>57367740
wat?
>>
>>57366834
>> remember that they are all dirty plebs using Windows

>Fails at installing python because he didn't read the redistributable.

kek
>>
>>57367731
Listen here dipshit.
I used ONE batch file that disables telemetry, which has been used by other people with no issues, and was linked in a wiki that is directly associated with /g/ and as such can be assumed to be safe.
Then I tried to install Python by downloading the installer from python.org, which failed because the runtime couldn't install itself because Windows a shit. That led to a wild goose chase trying to fix the error. The lack of good documentation for the OS (because hurr just enable automatic updates and let M$ fix it, or call the support center, or just wipe and reinstall xD) forces you to sift through dozens of sites, the validity of which can not be determined.
Yes, installing Python is easy, under ideal circumstances. So is installing Ubuntu and getting a working Python installation with it. Under less-than-ideal circumstances, it's a fucking mess and you'd be better off just installing a noob-friendly GNU/Linux distro.

>>57367786
> read the distributable
I'm sorry, I thought the process was as simple as downloading the installer from the official Python website (C) and double-clicking it?
>>
>>57367687
How did you know it was from a porno you fucking faggot
>>
>>57367763
When or why might i want to use fetch then?
>>
>>57367819
If you want to check what's on the remote before spilling it all over your local branch.
>>
>>57367795
Weren't you just retarded and used the wrong link?

https://docs.python.org/3.5/using/windows.html#embedded-distribution
>>
>>57367819
When you want to rebase your current work on top of the latest version of the project instead of causing a merging clusterfuck
>>
>>57367795
>>57366834
just make them use an online interpreter and notepad
>>
>>57367849
I used to do that, but you can do a "git pull -r" these days.
>>
>>57367810
>What is googling images?
Are you this simple?
>>
Why is git so shitty and why are we still using it?
>>
>>57367837
Say i want to do this. How do i actually access the local copy of the remote? What commands do i run after fetch?
>>
>>57367558
Thank you for replying do you know any books or tutorial on how to git gud at obfuscation
>>
>>57367795
>using random files from the internet because some dipshit on /g/ said it was "safe"
>waaaaaaaaaaaaaahh my operating system can no longer perform basic tasks properly
>it's not my fault, it's WANGBLOWZ
This is you. You not only do not know how to program, you have no idea how to use a computer and are completely ignorant of the most basic safety protocols of the internet. You could have also quite literally done >>57367856 from the get go instead of pissing your pants like the /v/ermin you are.
>>
>>57367862
>she still uses git
>>
>>57367862
Why don't you use bitbucket?
>>
>>57367865
The remote branches are the ones that start with "remotes/<remote-name>/", you can look at them just like normal branches.

$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
>>
>>57367858
Nifty. But I still will use fetch to check what's in the remote branch.
>>
>>57367846
Went on python.org
Clicked on Download
Downloaded the v3.5 installer for Windows (x86)
Executed

>>57367856
That might work as well. Honestly I don't care anymore, I'm using the one that came with my distro and it's their choice if they want to try installing it on Windows (if it works, good for them), try installing any Linux distro or use an online interpreter.
>>
>>57367862
Because Linus wrote it in a weekend, to correspond to his personal use cases and work flow.
Because you haven't written anything better.
>>
>>57367878
Fair enough, I like having my FETCH_HEAD too.
>>
>>57367873
Bitbucket uses git you dumb faggot mongoloid
>>
>>57367873
I hope this is bait
>>
>>57367880
>Linus did it so it has to be popular
>>
>>57367876
Thanks.

>>57367849
I'm sorry, i don't understand what this means.
>>
>>57367890
>I shit on popular people just because they're popular, without looking at the technical merit
>>
>>57367687
> porn website.
Try again

>>57367860
What did it show you?
>>
>>57367880
But another kun did write something better. And called it Hg
>>
File: Untitled.jpg (30KB, 617x337px) Image search: [Google]
Untitled.jpg
30KB, 617x337px
>>57367884
>>57367889
>>
>>57367904
But Linus is a sexist pig.
>>
>>57367909
Hg is slow af to be quite honest.
It also literally causes cancer.

>>57367922
5/10 bait, solid attempt but too obvious.
>>
>>57367909
Never heard of it.
>>
>>57367910
That's not the point; you can use Mercurial with GitHub, private repos, or pretty much anything else.

Recommending BitBucket as an alternative to Git is a non-sequitor at best, and likely a brief spout of ignorance.
>>
>>57367930
What's wrong with hg? It is so much simpler. Everything is a node.
>>
>>57368086
And in Git everything is an object.
>>
Is it even worth learning Scala if I know a little bit of Java? I want to write a web service like every other faggot but not have it use up too much memory per user. I thought I might start with Golang (and still might just go with it) but I've become interested in Scala because it has a REPL and because it at least pretends to be functional while giving me the freedom to choose how I want to do shit.
>>
>>57367897
>I'm sorry, i don't understand what this means.
Okay, this isn't technically correct, but it may explain the difference between fetch and pull:

A pull is basically a fetch+merge
>>
>>57368134
>I want to write a web service like every other faggot but not have it use up too much memory per user
Scale and Java use the same fucking runtime...
>>
anyone here is zsh instead of bash?
i just switched to zsh and its pretty comfy, can't believe i been using bash all this time just because it comes bundled with everything.

im free now.
>>
>>57368340
I tried zsh but didn't see the point.
Bash works fine for me, if I have to do something complicated I'll use an actual programming language.
>>
>>57368368
zsh is newer, has more features and isn't tied down to supported legacy systems like Bash.
>>
>>57368387
So is it just a new shiny hipster toy?

>has more features
Which one should I care about?

There's zero information in your post, it's pure marketing.
>>
>There is not a single malloc() call in all the library. [...] On big desktop and server OS, this feature still offers an interesting characteristic: immunity to memory leaks and memory-based DoS attacks. Outsiders cannot make BearSSL allocate megabytes of RAM since BearSSL does not actually know how to allocate RAM at all.

hul
>>
>>57361528
What do you guys think of Dlang?
>>
>>57368368
People use it for it's advanced interactive features

ksh93 makes a way better interpreter, several times faster than bash or zsh
>>
>>57368399
> zsh
> hipster

zsh is not new, its over 10 years old you idiot.

heres a video for reference, you'll appreciate zsh if you actually do any worthwhile work in the command line.
>>
>>57368410
The decision to add a GC ruined every hope the language might have had forever.
It doesn't matter that they tried to backpeddal and that it's maybe sorta kinda-optional-now-expect-in-the-standard-library, nobody's taking it seriously anymore
>>
>love c++
>hate java
>have to switch to java to program for android
>android apps are more valuable than most other programs I make
Why is life so cruel.
>>
>>57368428
https://www.youtube.com/watch?v=avr_sCFKthw
>>
>>57368428
>zsh is not new, its over 10 years old you idiot.
Doesn't have to be new to be a hipster toy. Look at LISP and deprechaskell.

>heres a video for reference
Nice job.
>>
http://fishshell.com
>>
>>57368441
Use the NDK
>>
>>57368421
>People use it for it's advanced interactive features
So some kind of better autocomplete?
I guess I could use that.
>>
File: linuspenguinsuit.jpg (67KB, 480x640px) Image search: [Google]
linuspenguinsuit.jpg
67KB, 480x640px
>>57367795
>I used ONE batch file that claims to disable the main feature of my operating system
>WHY DOESN'T IT WORK??????????

Oh man that was a good lol.
>>
>>57368449
now this is hipster trash.
>>
>>57368459
>I guess I could use that.

>I admit defeat
>>
>>57368498
At least he admitted it might be useful after learning an actual benefit

DON'T be rude in /dpt/ :^[
>>
>>57368437
Is it that bad? I mean I can live with the GC if it doesn't fucks me in the ass at the wrong time.
>>
>>57368498
>I admit defeat
Sure!
Are you the kind of person that can not ever change their opinion, nor admit when they're wrong?

You know, stupid people are often proud of being stubborn. You don't want to grow up like that.
>>
>>57368512
he was being rude, because he outright called hipster trash without even hearing my arguement.

i was bullied for being different, so this is the least i could do as payback. >(
>>
>>57368527
> You know, stupid people are often proud of being stubborn. You don't want to grow up like that.

it doesn't matter if you're always right :^)
>>
What do you think about hybrid applications, i.e. AngularJS and Cordova?
>>
>>57368410
Not different enough from c++.
I'm planning on learning nim or rust next year
>>
Anyone here learning web assembly in hopes to destroy all these meme web frameworks and finally standardize web development?
>>
>>57368513
That's the problem with a GC, it's a trap that looks like a good idea at first glance.

A GC is actually good for a small project, because you might save some time if you're not used to controlled memory management.

But it's when your project grows that you run into trouble. You have to start tweaking the JVM options, be careful not to allocate too many small objects or not allocate at all to avoid random latency spikes, the GC becomes unpredictable and something to fight against pretty quickly.
At some point it's much easier to just match your "new" with a "delete", especially when the compiler can do it for you automatically 90% of the time.
>>
>>57368538
Yes, that's exactly the danger.
You might actually start thinking that you're always right, and not realize the disconnect with reality.

When it becomes too extreme, it's called a delusion.
>>
>>57368580
Yeah, I hear ya.
There are techniques I can use to avoid the GC fucking with my shit, but still this got me thinking. Maybe I should go back to C++. Even if I can call the GC manually and stop it from doing shit I can always do memory management lazily in C++ too, but at least it's deterministic so I can adjust it to my needs.

On the other hand it seems to me that Dlang allows a lot of stuff regarding the GC and I could try writing more GC friendly code.

Oh, yes, lot of small objects... the best especially when something produces lot of small shit in a loop and it isn't obvious at first glance.


>>57368547
I looked at nim a while ago and I somewhat liked it, but it still felt a bit off to me.
Regarding Dlang I actually want to replace C++ with it.
>>
>>57367702
>List.init 1000
>>
>>57365837
Having to manually run make each time is quite inefficient. There should be a way to automate that.
>>
FUCK COLLISION DETECTION
just wanted to add that to the thread
>>
>>57369211
>There should be a way to automate that.
Make one, that would be an actually useful project.

You pretty much just need to listen for inotify and trigger make when something changes.
>>
>>57369213
have you considered Information Systems as an alternative? :^)
>>
>>57369230
Nah, I think I'll listen for vim's BufWrite events, deduce the place I need to move to, go there, run make and then go back to where I was.
>>
File: pajeet on :g:.jpg (784KB, 4288x2848px) Image search: [Google]
pajeet on :g:.jpg
784KB, 4288x2848px
>>57361941
>if(
pajeet my son
>>
>>57369253
Fair enough, I guess.

What I did to save time is just binding <Leader>m to "find the first makefile/CMakeLists upwards from the current file and run it".
Also <Leader>M which is the same but lets me input an argument to make.
>>
Guys how do i know im shit at programming?
>>
>>57369280
If you don't understand both pointers and recursion naturally.
>>
>>57369287
I understand both.
what else?
>>
What if i code a 10k line program then re-format it all in one line and make it open source?
>>
>>57369300
yes and?

if its anything worth while, anyone can run it through an uglifier for easy viewing.
>>
>>57369280
by clashing against the /dpt/ finest
https://www.codingame.com/multiplayer/clashofcode
>>
>>57369280
you can't prove correctness of your programs
>>
>>57369298
Do you understand how the hardware works, and could you write a simple 200 lines operating system that reaches Ring3 in Long Mode?

Can you navigate a write a patch for your average MLOC codebase?

Are you able to learn every day?
>>
>>57369325
>Social media accounts
>>
>>57369331
> Do you understand how the hardware works, and could you write a simple 200 lines operating system that reaches Ring3 in Long Mode?

Can you navigate a write a patch for your average MLOC codebase?
no but it can be learned right?

>Are you able to learn every day?
this yes. I'm always learning shit. I dont see it as a chore, its more of a hobby.
>>
>>57369343
>what is optional
>github is social media
>>
>>57369213
What's wrong?
>>
>>57369325
huh? what about copy/paste tactics?
>>
File: snap065.png (66KB, 1020x642px) Image search: [Google]
snap065.png
66KB, 1020x642px
>>57369352
>no but it can be learned right?
Apparently a lot of people struggle with it.
But for a simple OS you just need to download the bible (3400 pages) and check out the osdev.org wiki.

Large codebases is a skill that you acquire. Try just compiling Libre Office.

>this yes. I'm always learning shit. I dont see it as a chore, its more of a hobby.
That's a good start.
>>
>>57369402
so.... am i shit at programming?
>>
>>57369325
i gonna try the nintendo challenge.
>>
>>57369418
Fuck if I know, I haven't even seen your code.
>>
>>57369325
is this a meme?
the tutorial just made me complete an if else statement that ends in a print call
>>
>>57369426
i thought programmers didnt need to write code.
I though writing code is what code monkeys did, i want to solve problems.
>>
What happens if i initialize a git repo inside a git repo?
>>
>>57369436
Writing boilerplate is what code monkeys do.
Developpers automate the problem solving so they don't have to do it themselves.
>>
>>57369439
you can't. git checks for existing repos.
>>
>>57369354
It's real wacko like real real wacko
>>
>>57369442
so is programming the right career path for me?
>>
>>57369442
>automate the problem solving
>automate the problem solving
That was retarded.
>>
>>57366663
As hex is probably not a valid string (that requires NO zero bytes ('\x00' or '\0'), then that's not possible. You can't know for sure when it ends.

If your hex string is actually just a character representation of the bytes, ie "A7", then you need to multiply the length by 2 so you get bytes.
>>
>>57369436
You're partially correct.

A code monkey is simply someone who only writes code. They made implement a particular algorithm here and there, and create well-made functions to do particular tasks, but at the end of the day, all they do is program.

A programmer is someone who architects significant components, if not the entirety of, programs. They understand how it interacts with the business-case, and can communicate to clients, team members, and management effectively.
>>
>>57369436
the coder/programmer distinction is the same as the film/movie distinction on /tv/, it's a meme
>>
>>57369458
Alright you got me, I really though you were that stupid.
Pretty good bait sempai.
>>
>>57369448
What if i copy a repo to inside another repo?
>>
>>57369472
no bully please. i come from very poor family, i need programming job to survive.
>>
>>57369448
Yes you can. It works just fine.
>>
>>57369480
then you'de have a fucked up repo.
what are you trying to do kevin?
>>
>>57369465
Being a code monkey seems more pleasant.

Also
>>all they do is program
>not a programmer
>>
>>57369465
I dont think a programmer does any of that, at least not a regular programmer. Lead Programmer/ Project Manager or even software architect fits this role better
>>
>>57369439
Is that your problem?
https://git-scm.com/book/en/v2/Git-Tools-Submodules
>>
>>57367869
Not him, but here's a tip:
You have to obfuscate the logic and not the syntax.

Rather than have a char array and add in some characters to print out to a stream, how about creating a recursive function that generates the characters based on some random seed?

You could seed, for example 0x300, find the first n numbers rand gives out, and see if you can find a formula to transform those values to a string array. If not, try 0x301, 0x302....

Good programmers will automate this task using some sort of library to find patterns.
>>
Has most programming been reduced to
importing library_A, library_B, library_C
plus some glue to bind it all together?
>>
>>57369454
Going through shit with fixed time-step?
Not adjusting shit when a collision is detected?
>>
>>57369541
>Good programmers will automate this task using some sort of library to find patterns.
Yeah, no. Good programmers will think of an algorithm that naturally has the correct order, instead of bruteforcing.
If you want to write "opisafaggot", bruteforce is one in 26^10=141167095653376 chance of success.
>>
>>57369557
There are people who write libraries you know...
>>
>>57369499
I have a repo, with remote at github, that contains my solution (yes i'm a VS bitch) with several related projects.
Now i want to push only one of these projects to a different remote at school, for evaluation.
>>
>>57369568
google.com?q=git+submodules
>>
>>57369568
>that contains my solution
stopped reading there.
>>
>>57369535
Yes, this looks like it might be relevant.
>>
>>57369587
Well, at least you bothered to let me know.
>>
>>57369560
more like I dont even know how I should start...
I need to check whether to rotatable boxes collide
>>
>>57369213
Why are you not using bullet?
>>
>>57369565
First: 'op', 'is', 'a', 'fa', 'gg', 'ot' can all be separate calls. The chances of finding those is simply 5*2^2 + 1*2^1 = one in 22.

Second: you can think of an algorithm that naturally works, but even then you'll only get an approximation when it's longer than just "opisafaggot". Every single programmer that doesn't just spend all their time on this task use some automation.
>>
>>57369644
Is that a library?
I like to try to do everything myself if it's possible, dont want to end up as Pajeet
>>
File: 1444153964822.jpg (2MB, 1920x1080px) Image search: [Google]
1444153964822.jpg
2MB, 1920x1080px
I've got a bash script that works if i run it with ./script.sh but doesnt work if i run it as sh script.sh

i'm trying to make a shortcut to the script but the only way i know how is sh /destionation/script.sh. Can i make a similar shortcut using ./ instead of sh?
>>
>>57369213
Just you wait til you get to collision response.

>implement GJK algorithm
>is actually very elegant collision detection algorithm for convex shapes
>can be run in almost constant time, if utilising frame coherence
>collision response is fucked
>>
are you guys a bunch of drop outs?
>>
>>57369668
>I like to try to do everything myself if it's possible, dont want to end up as Pajeet

That's the first problem right there.
If you try to do everything by yourself, you will fail at some tasks. This will let you down and make you think you're not "good enough" to be a programmer.

There are some things even the best programmers can't do (usually it's security, but that's besides the point).

In those cases, you must concede and just use a library. Build upon it, not build it.

No one will use your shitty library. But if you make a game with bullet you might actually make some money.
>>
>>57369694
you should call bash instead sh for bash scripts...
>>
>>57369664
>First: 'op', 'is', 'a', 'fa', 'gg', 'ot' can all be separate calls. The chances of finding those is simply 5*2^2 + 1*2^1 = one in 22.
Then your solution is no better than what anon was doing. You just replaced obfuscated elements of an array, by obfuscated arguments in calls of a function.

>Second: you can think of an algorithm that naturally works, but even then you'll only get an approximation when it's longer than just "opisafaggot".
That is incorrect. The whole point is to have something exact.
This is just a form of compression applied to obfuscation, no need to approximate anything.

>Every single programmer that doesn't just spend all their time on this task use some automation.
Automation is for problems that don't have an analytical solution.
Automation is wasting time where a formula would give you a solution instantly.

If you're slow and you have trouble writing efficient algorithms, that's your own problem.
>>
>>57369726
No, just self taught and patiently waiting for the year to end so I can get my diploma.
>>
>>57369730
tried bash /destination/script.sh, still get the same error.
>>
>>57369634
If it's just a box then you probably don't need a collision shape/box because you already have one! Think positively!

1, Apart from that all you need to do is check whether it is inside another box? So you need to check the coordinates. You won't really check for collisions you will check for intersection then fix it by putting it back into the correct position.
This is good when you basically just advance the simulation by a time-step and then upon intersection you fix it before doing the final update.

2, Another approach would be to calculate whether they will actually. However this can be difficult. You need to numerically approximate a bunch of equations.

Doing 1 is recommended. If you don't really want to check for intersection maybe you can use a larger bounding box so you will catch near-collision before it actually happens by catching the intersection with the larger bounding box. If you know the time-step and the speed you can probably experiment with a trick like this. No promises.

Also, yes, you need to check all objects against each other so it's performance sensitive.

Many algorithms for doing this with arbitary and large amount of objects exist and they all focus on performance. You usually have to build trees and specify layers (what can collide with what) so you don't have to check everything (plus skip shit far away if you can like in a game.).


TL;DR: check if the boxs are inside each other at every rotation. If yes, then stop rotation and move them to a position where they only collide.
>>
>>57369728
Yet doing basic shit and implementing algorithms yourself and experimenting with it is a good way to learn.

I don't think so he wants to build library... he probably wants to see how it works.
>>
>>57369756
then, probably, it depends on the current directory
>>
>>57369830
I can run it as ./script.sh when i'm in the directory. But i cant make a command shortcut, the script terminates at the first if statement.

Can i somehow execute the script from within the directory with a command?

i tried 'cd /destination/ | ./script.sh' but it didnt work.

I also tried messing a bit with "Working Directory:" but i'm not sure how that works.
>>
>>57369870
NEW THREAD

>>57369870
NEW THREAD

>>57369870
NEW THREAD

>>57369870
NEW THREAD
>>
File: zZFKOKI.png (24KB, 346x373px) Image search: [Google]
zZFKOKI.png
24KB, 346x373px
>>57369874
>>57369830
forgot pic
Thread posts: 353
Thread images: 37


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.