[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: 356
Thread images: 26

File: latest[1].png (389KB, 934x1000px) Image search: [Google]
latest[1].png
389KB, 934x1000px
old thread >>57745118

What are you working on, /g/?
>>
>>57753030
First for C++
>>
>Trap OP
kys
>>
>>57753030
Please stop posting anime in a tech discussion forum.

This is a family friendly site.
>>
>>57753077
The first one obvs
>>
>>57753077
Nice meme of fucking up the code tag
>>
reposting because I'm a faggot who can't into formatting

Scenario: Users have IDs. I have a webservice with an endpoint that retrieves a user name by their ID.

>example.org\user\123\
response: {"name":"john doe"}


I want to add another endpoint, that adds a comment to the user profile with the specified id.

Which of the following would you prefer:

>example.org\user\123\comment\
body: {"comment":"hi"}

response: {"name":"john doe", "comments":{"0":"hi"}}


vs.

>example.org\user\comment\123
body: {"comment":"hi"}

response: {"name":"john doe", "comments":{"0":"hi"}}
>>
Finishing my first android app. Very sloppy but I'm proud nonetheless. It's a simple cumulative GPA calculator. Wondering if it's okay to list it as a project for a summer internship.
>>
>>57753077
m
y
p
o
s
t
i
s
n
'
t
spam
y
o
u
n
i
g
g
e
r
>>
>>57753130
Stop posting this.

>>>/g/wdg/
>>
File: java is superior.png (54KB, 1344x770px) Image search: [Google]
java is superior.png
54KB, 1344x770px
You have 5.69 seconds to tell me why you're not using Java right this moment.
>>
File: senpai.webm (3MB, 600x338px) Image search: [Google]
senpai.webm
3MB, 600x338px
Ask your much beloved programming literate anything (r/IAMA)
>>
>>57753197
if it's so fast then why the java Vm runs like shit?
>>
File: tegaki.png (7KB, 400x400px) Image search: [Google]
tegaki.png
7KB, 400x400px
I have a best practices question: I have a function that takes parameters from previous runs of the function for efficiency. If it's being run for the first time, it will compute the parameters. How should this be formatted?


def function(arg=None):
if (!arg): //compute arg, rather costly
else: //save some time if arg is given
...
return Something


The question boils down to: can I save arg somehow for future runs of the function without returning it along with 'Something' or using pointers?
>>
>>57753030
alright I'm not a programmer but I've been here for years and I've seen this picture thousands of times

somebody explain to me what this anime picture has to do with programming
(I know the book itself is a meme but why is there an upside-down anime girl)
>>
>>57753247
her name is eva and she is spinning like how eval/apply is pictured in the sicp book
>>
Can someone help me with this regular expression?
I want to find a all commas that exist somewhere in between quotation marks
I have something like this
(?<=") ??? (?=")
But I don't know what to put in the middle
For example if I had something like

1,851,14,"Wick, Mr. John",abc,,

The expression would only get the comma in "Wick, Mr. John"

Thanks (´・ω・`)
>>
>>57753218
garbage collecting, they can use all the tricks in the world but garbage collecting will always make them chug doing anything real-time sensitive.
>>
>>57753247
The book isn't really a meme anon, its a pretty enjoyable read and useful for people just dipping their toes in the water with CS.
>>
>>57753197
now allocate some objects inside the loop and only reference the previous iteration's object.
>>
File: mastercode.gif (1MB, 1280x1024px) Image search: [Google]
mastercode.gif
1MB, 1280x1024px
>>57753258
>>57753247
>eva
that's yuki nagato.
the fez on her head is a reference to https://en.wikipedia.org/wiki/Gerald_Jay_Sussman
the parenthesis surrounding her is both a reference to lisp and to eval/apply.
>>
>>57753394
can you even edit text in cmd.exe?
>>
>>57753422
can you even edit text in bash?
>>
>>57753422
on 32-bit windows you can type edit and it opens an old super shitty cmdline editor.

On 64-bit they removed it because they couldn't figure out how to port it.

$quality$
>>
>>57753262
Go to libgen.io and pirate the book 'The Unix Programming Environment' by Kernighan/Pike and check the chapter on filters it has all the regex you will ever need.
>>
>>57753030
Well i'm trying to learn C++ (muh 210X courses) after C ( i'm still gonna call myself a beginner with an ok-ish understanding of pointers) and i still can't understand why i dislike C++ more and more.

Is it because OOP is cancer?
>>
>>57753469
windows 32 bits has WoW to emulate 16 bits apps
windows 64 bits has WoW64 to emulate 32 bits apps

Porting the 16 bits emulator to win64 wasn't worth it.


https://en.wikipedia.org/wiki/Windows_on_Windows
https://en.wikipedia.org/wiki/WoW64
>>
>>57753511
>Is it because OOP is cancer?
yes
>>
>>57753511
C++ is garbage.

C11 is what they should teach in university.
>>
>>57753511
No. It's because you listened to memes that said one of the leading programming paradigms in existence is bad.

/g/ is literally the hipster of tech. Don't listen to the memes
>>
>>57753524
If WoW64 was complete then it could run WoW and thus 16 bit apps.
>>
>>57753524
windows is so shit
>>
>>57753552
Well i've been trying to find any C11 book/documentation for learning for a while and can't find shit , not even on amazon.

Also, i know C++ is garbage, i just gave it a shot ( again) because it seems like most libraries out there are either in a shitty scripting language like python or other garbage or C++.In my opinion, i just took the least worst one.
>>
>>57753579
no, the emulator is not just a simple user application but a whole environment involving the kernel like the new linux environment.
>>
File: 1479254947096.jpg (425KB, 1920x1200px) Image search: [Google]
1479254947096.jpg
425KB, 1920x1200px
Rate my blog post /g/

http://www.collinoswalt.com/11
>>
>>57753628
libgen.io has tons of modern C books.
This pdf book "Modern C" posted yesterday to HN, is exclusively in C11 https://news.ycombinator.com/item?id=13054705
>>
>>57753615
please don't say that, it's actually a great os that had the same core interface since the beginning of the 80's. the source code of the kernel is a lot much better documented than linux or bsd, and doing multithreading on windows is not painful contrary to linux. dave cutler > torvalds.
>>
>>57753227
Have a function that computes arg, and a function (or member of arg) that consumes arg. The caller should deal with that shit.
>>
>>57753646
>Java
1/10 because the design is ok.
>>
>>57753646
it's shit
>>
>>57753646
> no scripts running on website

10/10 website
>>
>>57753646
aren't you the 58000 (or something like that) bauds oldfag guy?
>>
>>57753552
C11 is what they taught me in college.
>>
File: 98437523.jpg (39KB, 600x568px) Image search: [Google]
98437523.jpg
39KB, 600x568px
>>57753666
>satan gave me good help

thanks
>>
>>57753646
make rss feed pls desu
>>
>>57753628
C primer plus is great
>>
>>57753629
If it's an all encompassing 32bit environment then it should be able to host the 16bit WoW environment.
>>
>>57753646
>click link
>instant loading
>no animation/whatever bullshit

11/10
>>
>>57753646
>No spaces between parenthesis and braces

Maximum REEEE
>>
>>57753666
In fact, this is how you learn C

>K&R
Is the best introduction.

>CS:APP
A book on amd64 so shows you how C is modelled in asm for pointers/structs ect. Also teaches you floating point, VMs, everything you need to know about systems programming (tip, go on Abe Books, get the cheap "international version") http://csapp.cs.cmu.edu/

>21st Century C
Small book to show you how modern C programming is done, goes well with that 'Modern C' PDF I posted above.

>The Art of Software Security Assessment
Another vital book that teaches you the gotcha's of C and is worth it alone just for the information on building your own tests/assessment strategy.

Now go find an open source project used by millions of people, look up the features requested and ask the maintainers if you can implement one (ask because you don't want to write a program only for them to say 'we are dropping support for this in X). Submit your feature and accept the feedback, fix your program, then own that feature and debug any problems that arise. Congrats, you are now a C programmer.

Now go forth and look up "WebAssembly". Congrats, you're a web programmer too now.

C is truly still the most useful language you can ever learn even in (current year).
>>
I lost my job in september.

the calls have stopped coming, the applications have stopped responding, and my last real prospect has been silent for almost a week.

I want to die
>>
>>57753745
you need to read more about loaders, system calls, cpu mode, ...
>>
>>57753789
You should be publishing apps with >100k download potential in the meantime to prove to future employers that you can stay employable.
>>
>>57753789
Apply to toptal and be a simple wordpress developer or salesforce dev, pays $40/hr, good enough for in between jobs.

Or google 'weworkremotely' or 'jobspress' or look at hnhiring.me for a list of latest direct job offers, no bullshit recruiters.
>>
File: wallhaven-202158.jpg (381KB, 1857x963px) Image search: [Google]
wallhaven-202158.jpg
381KB, 1857x963px
>>57753769
>21st Century C
Terrible book. Must be avoided at any cost.
>>
>>57753769
K&R: I've tried it several times, besides the fact that most compilers don't even work with the code in there ( yes you can tell me you can find workarounds but i don't wanna waste my time on stackoverflow)

21st century C & K&C: 21 century C is good for setting up an environment and eventually for using it as reference, since i'm still a noobie they don't have many exercises, same for K&R.They're good for references and i use them for that.

For what i know i'm still using C a modern approach (C99) just because it has many exercises which help me.
>>
>>57753681
Not Java, but a pseudo-javascript because Java, C, and C++ can't into easy lambdas

>>57753693
600 baud modem:

github.com/collinoswalt/modem

Working on creating an actual physical modem using an arduino and Piezo element
>>
>>57753832
rarely do i see a room messier than mine
>minecraft
huh, so that's why
>>
>>57753856
good to see that you are still around, you actually did some stuffs contrary to 99% of the newfags here.
>>
Maze generator in Go.

Gonna turn it into a little web app.
>>
>>57753856
>https://www.youtube.com/watch?v=WrDbnvUK76s
would it be possible to hide the file into a playable song?
>>
>>57753873
I've been doing a bit of web dev lately, but I'm making my way back to C. The blog post uses a pseudo-javascript because it's easier than writing all that extra stuff for function pointers or inline C functions, but I actually would implement this in C if I were to do something like this (I've had to write my own shell in my systems programming class and I used a similar method to map commands to functions in C)
>>
>>57752585
Still getting the same error.
any other ideas?
>>
>>57753821
I have no ideas
>>
>>57753925
Perhaps a stereo song file with the hidden channel's amplitude turned way down? Your receiver would have to be able to differentiate between the two channels, which means you wouldn't be able to play it over analog channels (air), only through other digital channels. My algorithm makes no reference to the amplitude of the sample except for its sign.
>>
>>57753993
Or, every nth sample is part of the hidden message, so that with a large enough n, the distortion would be inaudible to a human (but, once again, the noise could destroy the message, depending on the quality of the receiver. Digital channels are always best for something like this).
>>
About to implement a LZW compression algorithm.

Quick question, it seems a central part of the algorithm is the ability to store numbers of 9-12 bits in size (256 - 2048), but I have no idea how to make integers of that size without going to the next-largest type (short or char_16), which would lead to some inefficiency. Any help?
>>
>>57754054
Use a [spoiler] better language[/spoiler]
>>
File: koo.png (207KB, 1920x1080px) Image search: [Google]
koo.png
207KB, 1920x1080px
>>57753030
So I improved the physics further, now it's almost not completely useless

http://korbo.ga/{board}/thread/{thread}
http://korbo.ga/g/thread/57753030

Do you think I should make a native imageboard viewer with a similar concept?
>>
Soon™:

http://www.idris-lang.org/towards-version-1-0/
>>
>>57754077
This. If a language doesn't support creating types of a certain sizes and packing them in arrays accordingly, it's honestly not very good.
>>
>>57754108
I think you should optimize it a little. There's nothing worse than a website that makes your PC spin up its fans to the max.
>>
>>57754241
Writing your own library that does this would be pretty easy in C. You have to write your own malloc using the linux system calls brk and sbrk, and then create a struct header which will keep track of where each bit/byte starts and ends. At worst, you'll have 7 unused bits in the heap
>>
>>57754054
If you want any sort of speed you will want to use a uint16 or better yet a uint_fast16_t
>>
>>57754251
I know but I'm planning to remove physics completely and precompute the graph with something like the Floyd–Warshall algorithm
>>
Man, reading code from GNU is making my eyes bleed.

wtf stallman? Why write such shitty code?
>>
How long did it take you to learn how to program? I've been trying off and on for a few years never really serious but I really want to learn how. I've been trying with C++, but always end up getting confused and frustrated.
>>
>>57754315
He writes in K&R standard. Looks like:
char *
strtok (s, delim)
char *s;
const char *delim;
{
/*...*/
}


Which is how they wrote C in K&R, which is okay I guess since they invented the language, but nobody should program like that past 1989 when they codified C in ANSI

Also, strtok is a terrible function. gobbles up the original char * that you pass to it, so you have to pass it a buffer otherwise you'll lose your data. Then, it has a static char * inside the function, so calls to it go like:

char *k = "1,2,3,4,5";
char *p = malloc(9 * sizeof(char));
strcpy(p, k)

char *s = strtok(p, ",");
s = strtok(NULL, ",");


Wtf
>>
>>57754293
You can write a library to do it in any system language, doesn't mean it's not a pain.
>>
>>57754378
>C++
>confused and frustrated
Is this a reverse bait?
>>
>>57754444
Of course it's not, but I'm saying that this is not a limitation of the language, but a limitation of the standard library. What you're not saying is "pick a language which can do this", you're saying "pick a language whose devs added this feature to the standard library". But this feature is language agnostic.
>>
>>57754454
What is easy for you, is not so for me; nor anyone I know.
>>
Has anyone done native windows programming using clang on windows?

What's the best way to deal with all the headers?
I don't seem to find anything that really helps me.
>>
>>57754378
Since the definition of "knowing how to program" is so broad, all I can say is that at some point it should just click in your head. It's like blondes, brunettes, and redheads in The Matrix, at some point you'll get the basic stuff and at that point your achievements and success will only depend on your ambition and persistence.
Also, C++ is a bad starting language. Try Python. I started out with it, it paved a great path without much frustration in the beginning.
>>
>>57754378
Learn Java, C#, or Python. C++ is a bitch to work with all its specifics, and even people here hate it because its syntax is a bit wonky due to having all these neat features piled on top of it over the years.
>>
>>57753832
is that cirno, kek
I barely recognized her
>>
>>57754477
The reason you're getting confused is probably because you're heading in too deep too fast.

Also the language doesn't have a nice consistency to it like many other languages. Templates and initializer lists being major offenders.
>>
>>57754413
That's not even it. I actually kind of like that style honestly.

The issue is that the simpliest programs are split up into 50 different files. And those 50 different files link to 80 different header files each.

And then they do dumb shit like
#ifdef OPERATION_add
#define FUNCTION mpz_add
#define VARIATION
#endif
#ifdef OPERATION_sub
#define FUNCTION mpz_sub
#define VARIATION -
#endif

#ifndef FUNCTION
Error, need OPERATION_add or OPERATION_sub
#endif


void
FUNCTION (mpz_ptr w, mpz_srcptr u, mpz_srcptr v)
{
//code

That's a header file that gets linked by two (and only two) functions. They could have just copied and pasted the function. But noooo. They had to use preprocessor statements.

Also as far as I can tell, they don't undefine the variables.
>>
>>57754505
>>57754500
>>57754490
Thank you for the advice, I'll try Python then.
>>
>>57754474
Every feature is language agnostic by that logic. It's not a "feature" if you have to literally write it yourself.
>>
>>57754536
printf is not a language feature by that logic. C can hardly do anything without a standard library.
>>
>>57754604
If it's in the standard library, for the c standard language, then it's part of c.
>>
So.. When do you use std::allocator?
Doesn't really seem to do anything.
>>
>>57754604
Standard vs external library is different.
You can do tons of stuff in C regardless. It's just a lot of work to manually generate system calls.
>>
>>57754315
You're looking into the mind of autism. It's not a pretty sight.
>>
>>57724599
>started with python and it paved a great path
Where are you now?
>>
>>57754315
>Why write such shitty code?
https://www.youtube.com/watch?v=UtwaK-s9QRI
>>
I'm going to start trying to build a bit torrent client.

i think i know how it works enough to start creating it piece by piece so basically a magnet link has different uris -

one that is the files hash
one that points to a tracker
one that tells the size ofthe file

the tracker will the supply the client wit hteh seeders/addresses of that particular file hash and teh client will begin requesting bits of the file from the seeders?
>>
>>57754760
Do you know how dht works? Seems like magic to me.
>>
>>57754738
Someone needs to create a C compiler with an oss non-gnu license like MIT or BSD so that we can dump this autist. GNU is using its position in the Linux community to deliberately sabotage progress
>>
>>57754786
don't know.

just trying to learn about magnet links atm.
>>
>>57754911
Why is LLVM bad?
https://tldrlegal.com/license/university-of-illinois---ncsa-open-source-license-(ncsa)
>>
has anybody used Splinter in python? does it support website authentication?
>>
>>57754911
Once systemd has achieved majority control over Linux and the kernel, we'll be able to explore pushing towards alternative and less ideologically problematics languages, like Rust and Go.
>>
>>57754911
Why are oss almost never made into the public domain?
Aliens are still laughing at us.
>>
>>57754948
I was unaware that LLVM had such a license. I assumed that since Clang's primary contributor was Apple that it would have a restrictive license
>>
>>57754992
Because people view more restrictive licences as favorable to the open source community. But that's just misguided.
>>
>>57753030
writing a compiler for learning, now it can compile
declaration("c")
declaration("d")
assignment("c", "3")
assignment("d", "4")
expression(["*", "1", "d", "2", "c",["+", "7", ["-", "11", "6"]]])


it's all 32bit ints, those are python routines compiling tokenized version of a syntax i haven't created yet
>>
>>57754504
kek
she looks cute though
>>
>>57755151
How are you parsing
>>
>pajeet TA emails me to tell me my homework doesn't compile
>we have a vps, so idk why it would compile for me, but not him
>it uses a dynamic library and I have no sudo privileges, so I included a README which says "run
export LD_LIBRARY_PATH=./lib
" In the project folder
>Go in to his office hours to figure out why it won't compile
>motherfucker didn't even read the instructions

He's a PhD candidate
>>
>>57755270
for example the expression ["*", "1", "d", "2", "c",["+", "7", ["-", "11", "6"]]] uses prefix notation to make it easier, i start at the top and recursively compile each expression until I reach a base case - a 32bit int which just gets pushed onto the stack, in the end the whole expression pushes its result onto the stack

i start at the back ['-', '11', '6'] would be the first expression that will get compiled - it will push 11-6 on the stack
>>
>>57755341
He's a computer scientist not a computer janitor.
Don't expect him to be useful in any way.
>>
File: oldandnewcode.png (130KB, 1536x1154px) Image search: [Google]
oldandnewcode.png
130KB, 1536x1154px
Made my code now understandable and not bugged to fuck.
I could get rid of half the variables and put it all into vector2s, but is there any point?
>>
>>57755341
>>it uses a dynamic library and I have no sudo privileges, so I included a README which says "run export LD_LIBRARY_PATH=./lib" In the project folder
i'm feeling ready to vomit
>>
>>57755369
He's a TA, his job is to fucking grade papers, not be a computer scientist. His PhD is his problem, not mine. I pay way too much money to this university just to have to do my TAs jobs for them way too often.

Students are fucking worthless. I'd never hire one.
>>
>>57755395
readability maybe
>>
>>57755446
I don't get it. This is what I have to work with. I had to make a dynamic library and I have no permissions outside of my home folder.
>>
>>57755468
at least tell him about it instead of just putting a readme file, no one reads readme files because they never have any useful content
>>
>>57755341
why didnt you run the command yourself from your program
>>
>>57755341
That's what a make file is for, tbqh
>>
>>57755395
Is that C#?
What framework are you using?

In monogame you can just do
position = point1 + point2;

instead of
position.X = point1.X + point2.X;
position.Y = point1.Y + point2.Y;
>>
>>57753846
gcc can compile everything in k&r
>>
How is this allowed?
#include <stdio.h>

int main(int argc, char **argv ){

const int var = 251;

int *const pi = &var;

printf("%d\n", *pi);

*pi = 0;

printf("%d\n", *pi);


return 0;
}
>>
File: 2016-11-29_20:54:01.png (97KB, 960x158px) Image search: [Google]
2016-11-29_20:54:01.png
97KB, 960x158px
>>57755624
>How am I this stupid
>>
>>57755660
He's changing a const int to carry 0 when it was initialized with 251. I think you're the stupid one.
>>
>>57755701
gcc tells you that you're a fucking nigger for doing this and it discard the const qualifier
>>
>>57755714
It's just a warning. Gcc is just telling me it's undesirable but it is legal. Who's the nigger now?
>>
>>57755467
verticalPosX and verticalPosY is more readable than verticalPos.x and verticalPos.y imo

>>57755606
It's java
I think you can add vectors like that
>>
>>57755733
You clearly because if this was forbidden you'd need to do some ugly shit to get this to work, and sometimes you might want this behavior.
If it's not what you want then you've a nice warning telling you to stop being a faggot
>>
>>57755733
What exactly are you trying to say with this? It discards the const which means there is pretty normal behavior
>>
>>57755737
>imo
Your opinion is objectively wrong

>I think you can add vectors like that
I see. Nah, you have to do vector1.add(vector2). Not quite as nice.
>>
>>57755755
>tips fedora.
>>
>>57755779
>people like this give you programming advices
>>
>>57755733
>wahh you can do something
what is even your point
>>
>>57755768
I find it interesting behavior. We use const to protect data. This usage of const pointers circumvents this protection.
>>
File: 1480440580525.png (14KB, 196x257px) Image search: [Google]
1480440580525.png
14KB, 196x257px
>going through this programming book
>feel obligated to type the examples
>learning new language syntax is so fucking boring when I already know basic programming concepts
>can't really be bothered going through it

How do you get acquainted with new languages when you just want to make stuff? I've only gone through multiple programming tutorials and never made something yet.

I just want to make JavaScript browser games and maybe a basic website.
>>
Are there any tutorials on how to make an Android app that calculates your age by typing in your birthdate?
>>
>>57755733
You can do disgusting shit in C that shouldn't be allowed and doesn't produce warnings. This isn't one of them.
>>
>>57755819
Just look at JavaScript code and you should know javascript
>>
>>57755814
I don't think you will often find yourself in a situation where you would need to do that and if you were there are probably other significant problems with your program
>>
File: 1474221441087.png (67KB, 616x596px) Image search: [Google]
1474221441087.png
67KB, 616x596px
>>57755819
>Javascript
>>
>>57755827
hmmmm.
>>
>>57755823
https://www.google.com/search?q=android+app+calculate+age+tutorial
>>
>>57755842
Thanks.
>>
Is there any actual evidence for OOP being good?
>>
>>57755819
If you know how to program you really don't need tutorial books like that.
>>
>>57755487
Except when they do.
>>
>>57755862
class ShittyParadigm {}
class OOP : ShittyParadigm {}
>>
>>57755858
>https://inducesmile.com/android/android-age-calculator-application-example/
jesus christ
>>
>>57755827
Show examples senpai
>>
>>57755858
Yes but I need to make one where you type in your d/m/y in an EditText. Can't find one like that.
>>
>>57755487
>General information
>Usage information
>Building information

I have never considered a readme useless.
>>
>>57755869
Whoops, I'm not following modern OOP advice.

class ShittyParadigm {}
class OOP {
ShittyParadigm getShittyParadigm();
void setShittyParadigm(ShittyParadigm);
private:
ShittyParadigm shittyParadigm;
}
>>
>>57755395
You could change e.g. the scroll methods into one:
public void scroll(Vector2 screenB2D) {
offsetB2D = screenB2D.minus(Vector2(1, 1)).minus(Vector2(longSize/2, longSize/2));
offsetB2D = offsetB2D.clamp(new Vector2(0, 0), maximumScroll);
}
>>
>>57755867
>>57755841

thanks guys.

One last question. Does programming consist of basic logic plus painful googling for answers? Using eclipse is not intuitive at all. I didnt know what FTP was until I saw it in the book
>>
>>57755892
not when you're pro like the poster below me
>>
>>57755868
README

NetBeansTM IDE
NetBeans IDE is an integrated development environment (IDE) for writing, compiling, testing, and debugging software applications for the JavaTM platform and other environments. NetBeans IDE includes a full-featured text editor, visual design tools, source code management support, database integration tools, and many other features.
To start the IDE (Microsoft Windows) use one of these methods:
Double-click the NetBeans IDE icon on your desktop.
Choose Start > All Programs > NetBeans > NetBeans IDE.
Start the IDE at the command line C:\> netbeans-install-directory\bin\netbeans.exe.
To start the IDE (Solaris OS or Linux):
Type at the command prompt: /netbeans-install-directory/bin/netbeans
To stop the IDE:
From the IDE, choose File > Exit.
To uninstall the IDE (Microsoft Windows)
Use the Add/Remove Programs utility. Do not manually delete the directories and files.
To uninstall the IDE (Solaris OS or Linux)
Use the provided uninstaller found at /netbeans-install-directory/uninstall.sh. Do not manually delete the directories and files.
To uninstall the IDE (Mac OS X)
Drag the program folders or files to the Trash. Note that the default location for the IDE is /Applications/NetBeans/.
Finding Documentation for NetBeans IDE
Release information on NetBeans IDE can be found at http://netbeans.org/community/releases/index.html.
The index of IDE documentation can be found at http://www.netbeans.org/kb/index.html. This document also provides links to further documentation.
Help documentation is available within the IDE. From the main menu, choose Help > Help Contents. The Help menu also provides links to other useful documents.


very interesting...
>>
>>57755884
maybe for linux neckbeard shit where you literally need an instruction manual because you don't even have GUIs or really shitty GUIs
>>
>>57755819
learnxinyminutes
>>
I can't fucking into webdevelopment.

I can code in python, C, PHP, I can use jQuery and javascript. I can use SQL.

BUT THIS FUCKING ANGULAR REACT DIDGERY DOO FUCKERY IS A BAD JOKE. EVERY TUTORIAL IS BROKEN IN SOME FUCKED UP WAY <ERROR DICS UUID IS DEPRECIATED USE ASS UUID MODULE>

REPEAT ONE MILLION TIMES WITH THIS BROKEN FUCKING SHIT. WITH ANYTHING ELSE I CAN BE UP AND DOING ACTUAL PROGRAMMING IN A FEW MINUTES. WITH THIS SHIT I'VE SPENT ALL DAY COPYPASTING ALMOST THE SAME CODE A BILLION PLACES BECAUSE THATS WHAT EVEN THE OFFICIAL TUTORIALS DO. IS THIS A BAD JOKE? IS IT LIKE SHITTY FLYTRAP FOR PROGRAMMERS?

I WANNA KILL THESE FUCKING WEBHIPSTERS
>>
>>57755914
>To start the IDE (Solaris OS or Linux):
>Type at the command prompt: /netbeans-install-directory/bin/netbeans
my sides

linux neckbeards will defend this
>>
>>57755624
it's not
>>
>>57755892
>Does programming consist of basic logic plus painful google for answer
Yes and no. A good programmer knows how to search for information on errors and fix bugs, and really at the end of the day you are combining basic logic structures to solve a problem. Once you become more proficient you will find its much less painfully when it comes to solving problems like this.

>Using eclipse is not intuitive at all
Why are you writing in eclipse for web stuff?

>I didn't know what ftp was until I saw the book
Don't worry about what you don't know. You fill in as you go.


>>57755954
Also this, as long as you know how to program
>>
>>57755891
This code is real nice, I'm print screening this, thanks anon

I'll use clamp, but I can't have it as one method. I need to only change either offsetB2DY or offsetB2DX, never both at the same time.

Thanks again, this is real neat
>>
>>57755590
I always believed that you shouldn't fuck with environment variables in a makefile because the user may not know you're doing it and then it could cause unintended issues for them later on.
>>
>>57755819
fuck off to >>>/g/wdg lazy webshit
>>
Best paradigm: my favorite
Worst paradigm: your favorite
>>
>>57755932
The code monkey is really showing in you here

The only development ever done on Windows is wageslave codemonkey garbage

Real development occurs on that 'linux neckbeard shit"

>>57755966

$ sudo ln /netbeans-install-directory/bin/netbeans/usr/local/bin/netbeans 
$ netbeans
>>
File: 1368474846390a.jpg (63KB, 283x424px) Image search: [Google]
1368474846390a.jpg
63KB, 283x424px
THAT FUCKING FEEL WHEN YOU MASTER C++ TEMPLATES
>>
>>57756001
>>57755891
Just found out there is no clamp in java, but i will make my own
>>
>>57755966
>being too retarded to use the PATH variable
>>
>>57756070
loool k *tips fedora*
>>
>>57756049
OOP works
Procedural works
Functional works
>>
File: 1467478078235.png (191KB, 640x645px) Image search: [Google]
1467478078235.png
191KB, 640x645px
>>57756049
>>
>>57756079
>still manually typing the names of programs because you're too retarded to use a GUI
>>
>>57756087
xD simply rad response
>>
>>57756105
kill yourself my man
>>
>>57756102
Being able to hit Ctl+d and typing the program you want is a thousand times faster than having to go through a GUI
If anything, you're the retard for having to rely on one
>>
>>57753646
there any reason you don't want to use inform?
>>
Windows > Mac > Linux
>>
>>57755965
yeah
it took me a few days to figure out a basic hello world tier page with react
because of all the node/npm/webpack/react/<insert 5000 other things here> bullshit
and then it turned out that to display a few texts and to change the state depenending on a button pressed it resulted in 24 THOUSANDS of lines of javascript
and then i read that what im doing is completely outdated and i should have switched to doing it another way

fuck california
>>
>>57756102
>can't make a shortcut to a command
Being mentally handicapped is a real Curse.
>>
>>57756150
>still manually making a shortcut to a command
pathetic
>>
Hello /dpt/!

See this >>57756138

Good bye /dpt/
>>
>>57756166
There is a lot of windows gaymur autism in here
>>
>>57756138
this
>>
>>57756163
You can automate the process if you like. I'm just saying the option is there.
>>
>>57756138
Yep
>>
>>57756191
>still manually automating the process
>>
I'm gonna a dual boot Linux for devving now. Kinda sick of a vm.

So, last I did that I felt comfortable with manjaro but I'm thinking maybe there's especially good dev distro's?

Any suggestions? With motivation.
>>
>>57756166
desktop wise, it's not wrong.
>>
>>57756200
>not asking his qt sentient waifu OS nicely to do it for him
Madobe <3
>>
>>57756166
>Mac > Linux
but that's wrong
>>
>>57756212
nice meme also >>>/g/fglt
>>
>>57756212
They're all pretty well suited for dev, it's more a question of what kind of package manager you want and what DE (or lack thereof) that you'd like
>>
>>57756235
But they're nodevs who do nothing but rice ;_;
>>
>>57756243
>(or lack thereof)
maximum autism
>>
>>57756251
I like not having a bunch of preinstalled packages that I'll never use, thank you very much
>>
>>57753769
C is truly still the most useful language you can ever learn even in (current year). ..

You mispelled "python"
>>
>>57756288
I agree. It's ludicrous how such a relatively old language can stand the test of time so well even with numerous attempts to make it superfluous.
>spelled python wrong.
But he didn't write python anywhere.
>>
>>57753278
I think GC isn't a problem, since common lisp also has it, but beats java in speed.
>>
>>57756243
Well ok. I guess manjaro suits me fine.
>>
>>57756096

Best girl: your least favorite
>>
is it a bad idea to just shit out code in main and then rework it into different functions?
>>
>>57756347
I bet you are waifu a shit
>>
File: 1476876945265.png (385KB, 599x510px) Image search: [Google]
1476876945265.png
385KB, 599x510px
>>57756347
stop
>>
>>57756354
Usually, but not always.
>>
>>57756324
GC is always suboptimal. And sadly it does terribly atm. For applications which only have overall runtime requirements it might be OK if they're not really memory constrained. But even then GC doesn't encourage proper memory management so that's still an issue.
>>
>>57753197
Because it not a very good language.
>>
>>57756075
What's there to master?

template < class T, class = typename std::enable_if<std::is_integral<T>::value>::type>
T average(a,b)
T a, T b
{
return (a/2) + (b/2) + (a%2 & b%2);
}

>>
>>57753227
Re-write the code in C and slap in a static value.
>>
>>57753197
You can't be terse. Enforced OOP. Lacks many features that streamlines development.
And then you have to deal with the VM on top of that.
It would be cool if the vm wasn't this large hunk of garbage. Really, there's no justification for it to be more than a megabyte at most.
>>
>>57756519
i dont java, how much memory does the vm take to run
>>
>>57753511
If you're anything as autistic as me, you hate having everything handed to you in a premade method.
C is fun because its bare bones and gives you alot of freedom.
If you want to have to redesign the linked list just to get something that resembles a vector, you do that boy.

OOP is a solid paradigm, its just the forced encapsulation feels like some mandatory fun level of bullshit.
>>
fuck erlang
>>
>>57753227
Why would you need to return what you passed? If this is recursive you could save it to a global if you don't want to return/pass pointer.
>>57753678
>let the caller do it
Well given that he's concerned with performance. And he doesn't just return it I suspect he wants to have a very slick api so even the most brain dead of monkeys can work with it properly.
>>
>>57756564
fuck your
>>
>>57756538
I don't java (anymore) either. But iirc it's like 100mb's of ram just to have a hello world.
And if you build the vm into your executable it's a fair chunk there too.

It's just not conducive to slick applications.
>>
>>57756594
Can I pass self() as a parameter of a function? ie

start(self(),Y).
>>
>>57756600
wrong
>>
>>57756663
what
>>
>>57756552
>solid paradigm
The problem is that you have to value it by its promises and your investment.
OOP doesn't have upsides in my experience and every argument I see for it is either solving issues from within the OOP mindset or its the old 'encapsulation, reusable code' etc BS that people were touting in the 90's.
It hasn't delivered.

Now if you like inheritance and objects that's one thing. They have some mild upsides you could work with. But never orient your program around it. The world building OOP does simply doesn't function.

Outside of gui and certain IO platforms. Arguably but I don't prefer it.
>>
>>57756519
>Really, there's no justification for it to be more than a megabyte at most.
any sensible program regardless of the language preallocates memory you insufferable idiot, you don't call malloc a bazillion times. that's what the VM does, it preallocates memory and manages it for you.
>>
>>57756671
Motivate. Java being a memory hog is an extremely common complaint.
>>
>>57756663
That... that sounds wrong but interesting.

I'll try it out in python. brb
>>
>>57756703
nice outdated meme you sickening fool and no i'm not going to waste my time on you i'm going to bed
>>
File: wamadshock.png (435KB, 477x700px) Image search: [Google]
wamadshock.png
435KB, 477x700px
>>57753030
>What are you working on, /g/?
Nothing, at the moment, looking at the ludumdare website source code, and holy fuck, who wrote this shit.
https://github.com/ludumdare/ludumdare
>>
>>57756719
Java programmers are an order of magnitude saltier than any other langugae programmer on /dpt/.
>>
>>57756692
c allocator doesnt use malloc to preallocate it uses sbrk
>>
>>57756736
nice projecting here's your (you)

>>57756739
you know what i meant
>>
>>57756663
You can, but you're risking the possibility that the program develops self-consciousness.
>>
>>57756756
>nice projecting
I'm not salty at all though
>>
>>57756692
Yeah so it should preallocate a bunch of memory 'just in case'.
No that's dumb. Often you can predict the memory usage of a program.
Here's someone with hello world on arch.
To me that's quite the feat to be down at that level (only 40+mb of ram for a puts program).
http://stackoverflow.com/q/13692206/2390624
Because I've seen worse.
But I can't say why things are as they are. That's the nature of the VM right? A magic box to anyone who doesn't really really care.

It really makes me question the idea of java for embedded programming. Which has been claimed a lot by Oracle.
>>
>>57756774
k

>>57756775
very interesting... not
>>
>>57756552
to be honest, OOP just seems like less code but it is annoying as fuck, even confuses me at times.

So i think i'd rather have 10% ( or more , idk) more code in C that i can easily understand, looks better (or more understandable , vissualy appealing) and probably ( i feel like i'm right on this one) even runs faster.

I'm still learning C++, but i feel like not using these "features" too much
>>
>>57756736
Actually it's just the one guy, every time.
>>
>>57756796
That actually makes sense
>>
>>57756796
and you're the same insufferable sperglords, every time, you fail at life with your linux neckbearding and c/haskell/whatever
>>
>>57756786
No of course its not interesting to you pajeet. But most of us look at that and question. Because your preallocate claim doesn't hold up here.
>>
>>57756807
It's very easy to spot him. He's also the one who constantly makes reference to Haskell fedora tipping and such, and he also seems to be the one angry about Linux.
>>
>>57756716
>>57756760
Yeah, wrote a test case, it works. I don't know why it's not working in this shitty homework assignment though.
>>
>>57756663
So in Python, it works, surprisingly.
>>> def getx(classN):
return classN.x

>>> class n:
def __init__(self,n):
self.x=n
def getself(self):
return self
def getXWrapper(self):
return getx(self)


>>> temp = n(2)
>>> temp.x
2
>>> getx(temp)
2
>>> temp.getXWrapper()
2

OOP is pretty okay 2bh.
>>
>>57756820
(You)
>>
>>57756821
Where do you suppose he lives, if he's going to bed now? It's 2:44am in India now...
>>
File: Capture.png (55KB, 243x83px) Image search: [Google]
Capture.png
55KB, 243x83px
Dunno if this is relevant here, but I'm working on a neural network that decensors hentai. More specifically, it decensors only vaginas because tackling a smaller problem is easier and images of penises have dimensions that don't work well with neural networks.

I've been spending 3 hours a day cropping and cleaning images of vaginas. At my current rate of 300 images a day, I expect to have a dataset of 10,000 images by January, which I will augment to 80,000 images with a few tricks. At that point, I will start the training process.

If the results from training are promising, I'll publicize them, throw a UI on the trained model on DLsite, and hopefully make a few shekels from nips.

Pic is from a recent machine learning paper. Their network reconstructed the face on the left based only on corrupted image in the middle. The output is on the right. So I definitely believe the science is there.
>>
>>57756829
I'd rather java devs didn't reply to my posts.
>>57756825
>OOP
How is passing a reference to the object in any way object oriented?
>>
>>57756854
with your mom
>>
>>57756421
>And sadly it does terribly atm.

Not really.
>>
>>57756870

Decensoring hentai is a cool gig and all, but you really need to be decensoring JAV with your neural network.
>>
>>57756883
It doesn't deliver on the promise that you don't have to care about memory.
Rather you have a very heavy construct that does nothing but deal with trivial free() calls.

I'm sure a terrible programmer could be impressed but I doubt even that.
>>
>>57756870
meh, that's a nice project imo
>>
>>57756871
Because every single variable in Python is an object? Even the so called primitives.

Don't believe me?
>>> x=int(2)          #To make sure that this is a type int.
>>> x.__add__(3)
5


Also
>classes
>functions that belong to a object
>variables that belong to a object
>all of this is somehow not object oriented
>>
>>57756920
>does nothing but deal with trivial free() calls
you're the terrible programmer if your idea of memory management is to repeatedly call malloc and free
>>
>>57753030
C# noob Question:

are interfaces just abstract classes?
>>
>>57756138
s/>/</g
>>
>>57756901
JAV is way too difficult. Removing censorship in a single image is hard enough. Removing censorship from multiple images so the output movie looks smooth and coherent is currently impossible.
>>
>>57756981
no.

Abstract classes can have members and function implementations etc. Interfaces can't.

An Abstract Class is just a normal class that you can't instantiate directly, but you can inherit from.

But you can and often do use Interfaces and Abstract classes for similar shit.
>>
>>57757033
>An interface is like an abstract base class. Any class or struct that implements the interface must implement all its members.

https://msdn.microsoft.com/en-us/library/ms173156.aspx
>>
God, the daily programming thread is so shitty during the day. All you guys flinging shitty opinions around and arguing about bullshit at 20 posts a minute.

1st for ASM
>>
>>57757050
Pretty much what i said
>>
>>57757071
Pretty much, except for the key part where you're wrong.
>>
>>57757053
nice contribution to thread. Please keep on posting.
>>
>>57757082
Which was what exactly?
>>
>>57756940
That's what GC does.
You're a terrible programmer if you think GC does anything but free.

If you realise how it's a terrible idea to allocate on demand like that then you should obviously disapprove of GC.
>>
>>57757101
>No.

t. you
>>
File: 1958201258.png (147KB, 815x627px) Image search: [Google]
1958201258.png
147KB, 815x627px
>>57756796
Oh shit
You mean Javafag?
>>
>>57757126
Yep.
>>
>>57757029

You're a smart cookie. You'll figure it out.
>>
>>57757115
The text you quoted agreed with me you retard.

No, an interface is not the same as an Abstract Class. Can you even comprehend what you posted?
>>
>>57756936
How is this construct oriented around objects.
This isn't OOP. You didn't design this program with an object in mind. This is just normal imperative programming where you decided to pass a reference to data to a member function.

Theres no message passing, encapsulation or anything. It's just imperative. If this is OOP I'm OK with it.

But it isn't.
>>
>>57756871
>How is passing a reference to the object in any way object oriented?
what do you mean?
>>
>>57757150
That's not what parent was really implying. Why would they need a new keyword if it was EXACTLY the same?

We should go back to putting you autists in death camps where you belong.
>>
>>57757033
Thanks so much mate!

So does that mean that an abstract class is not polymorphic?
>>
>>57757153
Okay then. What is "temp" when I wrote this.

>>> class n:
def __init__(self,n):
self.x=n
def getself(self):
return self
def getXWrapper(self):
return getx(self)


>>> temp = n(2)
>>
>>57757191
The question was:
>are interfaces just abstract classes?
The answer is "no". If you were in a job interview and said "yes" to this question, you would lose the job.

>>57757200
They are still polymorphic. The only difference is you can't instantiate them with "new MyAbstractClass()". But you can have variables with the type MyAbstractClass.
>>
File: 4459353701_826a3c120d.jpg (126KB, 489x400px) Image search: [Google]
4459353701_826a3c120d.jpg
126KB, 489x400px
>>57757112
https://www.dynatrace.com/resources/ebooks/javabook/how-garbage-collection-works/
>>
>>57757260
>you would lose the job.

False. You can't lose what you don't have. But we are not in a job interview, either, so it's safe to assume that the person is not being 100% literal, you social retard.
>>
>>57757241
An instance of n which has just passed a constructor.
Do you not understand the argument here though?

It sounds to me you don't understand what the word 'oriented' means though.

Sure you can arbitrarily decide that OOP is as wide a concept as data having syntactic member functions but that really waters down OOP to nothing.
>>
>>57757278
I know what GC is and what GC does.
But you do not seem to realise how it's entirely superfluous if you just allocate a block and do proper memory management yourself. Alternatively you just needed a single block of whatever. In which case yes your GC does do memory management for you. It's just a single free call. Likely at the end of your program.

GC implies frivolous allocation. And note how I never said you'd call malloc all over the place. It replaces trivial free calls. Not trivial alloc calls.

Your image provided a very concise non-argument anon. I'd like to redirect that to you.
>>
File: hmm, yes.jpg (34KB, 396x303px) Image search: [Google]
hmm, yes.jpg
34KB, 396x303px
>>57757354
good night sperglord
>>
>>57757260
Big help man! Thanks!
>>
>>57757354
>>57757365
Also. A nice example of what java devs actually do in practice when they're being taught the GC is there for them:
https://m.reddit.com/r/programming/comments/2jsrif/optifine_dev_minecraft_18_has_so_many_performance/
Good night pajeet.
>>
>>57757260
Actually just one more noob question:
are methods in interfaces considered virtual or abstract? or am I way off.
>>
rewrite this code without using if conditions

def test(a):
if a <= 0:
a = 0

if a >= 120:
a = 120

print a
>>
>>57756791
It's because you're new. Wait until you write multiplat shit or just want to cleanly separate usage from implementation and interfaces alone will make you appreciate C++.
>>
>>57757436
>print a

syntax error
>>
>>57757436
def test (a):
print (max (0, min (a, 120)))
>>
>>57757475
its python 2.7 , so no syntax error here
>>
>>57757408
Reading that was better than sex. Javafags btfo.
>>
>>57757436
a = max(0, min(a, 120))
>>
>>57757486
Only code monkeys use outdated language.
>>
>>57757408
>Allocating new memory is really faster than caching (Java is even faster than C++ when it comes to dynamic memory)
Your point?
>>
>>57757502
not really.

your job is to port my code, you pleb
>>
>>57757504
Allocation from the GC is faster than malloc but the work involved in cleaning up is a lot more.
>>
>>57757436

Dunno but language that is, but something like this I suppose:

def test(a):
a = (a <= 0 ? 0 : (a >= 120 ? 120 : a))
print a
>>
>>57757483
>>57757492
thanks guys
>>
C or C++?
>>
>>57757320
temp truly holds an object, tard. the procedures are turned into full methods during the instantiation.
>>
>tfw no mature event sourcing database yet
>>
>>57757504
Your point?
>>
>>57757504
Java devs really have to step up or just go away.
>>
>>57757408
>The general trend is that the developers do not care that much about memory allocation and use "best industry practices" without understanding the consequences. The standard reasoning being "immutables are good", "allocating new memory is faster than caching", "the garbage collector is so good these days" and so on.

FP fags on suicide watch
>>
>>57757619
>comparing FP to Java
>>
>>57757527
>>57757610
>>57757616
Minecraft is EXTREMELY poorly written and is hardly a relevant example. It uses ancient fixed-function rendering and the code is horrible in so many ways.
>On a side note, when I last ran the Minecraft server, I discovered that it was idiotically written -- it was calling System.gc() about twice a second.
It's not even allowing the GC to do its thing.
>>
>>57757320
>An instance of n which has just passed a constructor.
Right. and __init__ returns a copy of the object created by the constructor.

What a object is... well I'll just copy the wikipedia definition
>Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.

In this example, the object temp has procedures known as "getself" and "getXWrapper." It has attributes known as "x."

And that is the same thing with ints as well
>>> x=int(2)          #To make sure that this is a type int.
>>> x.__add__(3)

Somewhere in the code that I can't bother looking int, x is an object of type int, it has a attribute of value 2, and it has a procedure of name "__add__."

Python is purely OOP. Just defining a variable is considered creating an object. If that's not "oriented" enough for you, then I don't know what is honestly.

>Sure you can arbitrarily decide that OOP is as wide a concept as data having syntactic member functions but that really waters down OOP to nothing.
But that's exactly what it is. To offer some sort of comparison. Here's my rusty C to get the same code as the int adding

struct integer {
int x;
};
int integer_add(integer lhs,integer rhs)
{
return lhs.x + lhs.x;
}
int main()
{
struct integer a, b;
a.x=1;
b.x=2;
printf("%d",integer_add(a,b));
return 0;
}

That is code without any sort of object orientated design.

Also it'd probably not compile considering I haven't used C in a good while.
>>
>>57757627
>implying FP langs aren't far shittier than java
>>
File: images.duckduckgo.com.jpg (432KB, 1435x1655px) Image search: [Google]
images.duckduckgo.com.jpg
432KB, 1435x1655px
>>57753030
Hello /g/ents. I have a problem I need help solving. I need to write a fucntion that accepts a dictionary containing the file owner name for each file name and returns a dictionary containing a list of file names for each owner name, in any order.

I have so far:
def group_by_owners(files):
grouped = {}
for x in files.values():
grouped[x] = []
for y in files.keys():
grouped[x].append(y)
return grouped

files = {
'Input.txt': 'Randy',
'Code.py': 'Stan',
'Output.txt': 'Randy'
}


which gives me:
{'Stan': ['Input.txt', 'Output.txt', 'Code.py'], 'Randy': ['Input.txt', 'Output.txt', 'Code.py']}


instead of the correct:
{'Randy': ['Input.txt', 'Output.txt'], 'Stan': ['Code.py']}.


Any advice, tips, or pointing me in the right direction is greatly appreciated.
>>
>>57757619
The only thing there related to FP is the immutables part which is fine if you don't have to allocate new memory from the GC every time.

Not so fast, Haskell.
>>
File: 1435068987104.png (349KB, 878x900px) Image search: [Google]
1435068987104.png
349KB, 878x900px
>Haskell computations produce a lot of memory garbage - much more than conventional imperative languages.
>>
how do i make it so i can load my stuff in haskell from ghci? preferably without being in the folder. i already know i can do :l mystuff.hs
>>
>>57757408
>All internal methods which used parameters (x, y, z) are now converted to one parameter (BlockPos) which is immutable. So if you need to check another position around the current one you have to allocate a new BlockPos or invent some object cache which will probaby be slower. This alone is a huge memory waste.
This is so funny. It's very entertaining to see just how far above the ground you are when it comes to job security. I'm fucking soaring and pajeets can't even stand up in the streets they fill with shit.
>>
>>57757700
>he fell for the haskell meme
>>
>>57757627
It's not like there's any serious FP languages anyway. At least not with performance in mind.
>>
>>57757711
>this is what he tells himself while notch is literally a billionaire
>>
>>57757436
print max(min(120,a),0)
>>
>>57757700
double click the file?
>>
File: o0o.gif (532KB, 366x275px) Image search: [Google]
o0o.gif
532KB, 366x275px
>>57754054
>LZW
Found what to do:

Apparently, C++ has a class called "bitset" that has a really useful constructor
#include <bitset>
using namespace std;
.
.
.
bitset<12> test(51); //Creates a set of twelve bits that equal 51
cout << test << endl;
//test: 000000110011

so I think I'll just use that
>>
>>57757737
ATS, Rust
>>
>>57757652
Bro, you're literally just placing all files behind each user in that loop of yours.

You need to build a reverted map. Go by each key/value pair and map/add the key to the value in a new map.
>>
>>57757737
OCaml.
>>
>>57757783
>Rust
web devs: the language
>>
>>57757630
>it uses fixed function rendering
And it did so using 1-2mb/second of allocations. Which is God awful but these java somehow manage to put enough of a load on modern systems that it manages to chug.

Anon fixed function isn't minecraft problem. It's fine to use fixed function because the geometry is simple enough that the draw call count is trivial.

If you read the competent developer's comments you see that it's clearly java devs being shit. Notch included but he didn't go directly for the deadly sins.

It's shit anon. You don't have to attach your pride to a broken language and get your butt blasted all the time.
>>57757747
You must have missed how notch wasn't the majority of the problem. Regardless. Anyone can get randomly rich off an idea. There's this Indian dude that made those energy drinks. I don't remember. But there's nothing really good about them. Just the right guy with the right situation.
>>
>>57757783
>Rust

Rust is an imperative language with a few FP things sprinkled on top. Sure, you can DO FP in rust, but you can in C as well. A "Functional Programming Language" it is not.

>>57757802
t. someone who has never used Rust
>>
>>57757652
files = {
'Input.txt': 'Randy',
'Code.py': 'Stan',
'Output.txt': 'Randy'
}

grouped = {}
for k, v in files.items():
grouped.setdefault(v, []).append(k)

print(grouped)


Output:
{'Randy': ['Output.txt', 'Input.txt'], 'Stan': ['Code.py']}
>>
>>57757633
#include <stdio.h>

typedef struct {
int x;
} integer;

int integer_add(integer a, integer b);


int main(int argc, char **argv ){

integer a, b;

a.x = 1;
b.x = 14;

printf("%d\n", integer_add(a, b));

return 0;
}

int integer_add(integer foo, integer bar){

return foo.x + bar.x;
}



ftfy
>>
>>57757799
>>57757783
I've only heard of rust really.
But tell me some notable high performance projects going on there.

And please no 'it's the scripting engine for this notable thing'.
>>
>>57757835
>It's fine to use fixed function
/dpt/ - Daily Programming Thread
>>
>>57757840
Rust is pretty functional. Algebraic types, lots of mapping/folding/binding, etc. affine types and borrowing for controlling side effects, and so on.
>>
>>57757630
>minecraft sever
Nobody cares. It's all about the client.
The server is so whatever.
If there's a complaint there it's notches choice of chunk system. Poorly compressed
>>
New thread when? :3
>>
>>57757887
4chan is 18+
>>
>>57757846
Thanks brah. <3
>>
>>57757905
so what are you doing here?
>>
>>57757867
Yeah.
That's just how it is anon. If you're too stupid to get that and just dogmatically decide we all need to move to vulkan now you're simply wrong.
Try to understand performance once in your life or leave people alone when they discuss it.
>>57757905
Completely agree anon. Consider that next time you lie when you go to 4chan.org
It's a sin you know.
>>
File: Capture.png (33KB, 655x327px) Image search: [Google]
Capture.png
33KB, 655x327px
How do I loop so that the patterns at the top also show up where I drew X's? I've tried nested loops but it won't fill the entire space. Basically it should be 3x3. Python. Please if possible explain it to me like you would explain to a retard.
>>
new thread
>>57757949
>>
>>57757835
>using 1-2mb/second of allocations
What?
>>
>Javabro desperately defending his poor vm
I'm with you anon. You guys shouldn't bully software. It has its flaws but it has rights too!
>>
>>57757953
Thank you
>>
>>57757954
Read the reddit post.
It has a rundown.
Minecraft 1.8 is 200mb per second and that's a forced GC every 4 seconds apparently.
>>
>>57757926
You're hilariously incompetent yet arrogant at the same time. Literally Dunning-Kruger.
>>
>>57757992
>Dunning-Kruger.
reconsider your post
>>
>>57757992
>incompetent
I have not shown any incompetence because I haven't shown my work.
I'm giving java tons of leeway and understanding. But the lengths they go to disappoint is staggering.
>>
>>57757978
>Read the reddit post
Can't, i am on mobile. Java allocations are free most of the time because java heap is pre allocated.
>>
>>57758019
*tips*
>>
>>57757856
Servo would be the main one. I hate to refer you to it, though, because the test browser it is attached to is dogshit slow, so it will take forever to "load" a page (not a fault of Rust, it just is not the focus of the research project).

You may also look at that benchmark game site if you want to look at mostly useless micro bencmarks.

>>57757879
Wikipedia defines FP as something that:
>treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.

It has affine types, for example, but not EXCLUSIVELY. You can use mutable, reusable types, for example. So it has some tools to do FP, but I wouldn't call the language FP. I think this is one of the few languages, along with C++, which it's probably best to call "multi paradigm" and get on with life.
>>
>>57758035
it's just minecraft being shit as usual
>>
>>57757856
Learn what is OCaml, look at benchmark.
>>
>>57758070
Please don't say, minecraft is one the greatest games ever made. What notch did only by himself is truly amazing. He is my hero.
>>
>>57758122
>>57757905
>>
>>57758035
Well read it later it's a good read.
And unlike the java shill (he really has to be at this point) it's nothing specific to minecraft design. It's just allocations that build up through careless use of immutable state. I don't particularly blame the programmers for not understanding the problem of doing that in java but really. It's just another case of java programmers not caring.
>>
>>57758104
>benchmark
I have seen one benchmark of oclam for generating pi. And the person who wrote it told me on here that it basically calls out to a low level library. And that's really what's being tested there. But I only had a brief conversation on /dpt/ so really can't say much.

I was hoping for something more tangible than benchmarks where you have to know the language to read why it's fast.
>>
>>57758258
The tradition is to say 2 times slower than C
>>
>>57757426
effectively they are abstract
>>
File: 1479755608511.png (251KB, 450x450px) Image search: [Google]
1479755608511.png
251KB, 450x450px
>>57758379
Ok, thanks friend!
Thread posts: 356
Thread images: 26


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