/dpt/ - Daily Programming Thread

Old thread:
100 Project suggestions:
better-dpt-roll.github.io/

Lets manage a thread without the daily "Java is shit" baitposting.

Other urls found in this thread:

edx.org/course/software-construction-java-mitx-6-005-1x?utm_campaign=mitx&utm_medium=partner-marketing&utm_source=email&utm_content=mailchimp-60051x-sept2016&utm_source=MITx on edX News&utm_campaign=cec2aeaf2e-Software_construction_9_14_2016&utm_medium=email&utm_term=0_e07062bda1-cec2aeaf2e-104983165&ct=t(Computation_Systems_09_02_2016)
amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628
github.com/ocornut/imgui
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=sbcl&lang2=gpp
linuxmafia.com/faq/Kernel/linus-im-a-bastard-speech.html
better-dpt-roll.github.io/
programmers.stackexchange.com/questions/131377/whats-the-benefit-of-avoiding-the-use-of-a-debugger/131391
slut.sourceforge.net/
bitbucket.org/Tetsumi/closurebench/src
google.com/search?q=linus torvalds net worth
en.wikipedia.org/wiki/School-Live!
en.wikipedia.org/wiki/Portable_Network_Graphics#Compression
twitter.com/NSFWRedditImage

Java is shit

edx.org/course/software-construction-java-mitx-6-005-1x?utm_campaign=mitx&utm_medium=partner-marketing&utm_source=email&utm_content=mailchimp-60051x-sept2016&utm_source=MITx on edX News&utm_campaign=cec2aeaf2e-Software_construction_9_14_2016&utm_medium=email&utm_term=0_e07062bda1-cec2aeaf2e-104983165&ct=t(Computation_Systems_09_02_2016)

How does one authenticate a user by HWID in a way that's not crackable in 5 minutes?
The way I'm doing it right now is making a libcurl http request to a php script on my server with the useragent equal to the encrypted HWID. The script then checks if that HWID is valid and if it is, gives a response of a pseudorandom base64 number that returns true when passed through a function in the program.
Is this even safe?

Help.

Not funny, because java really is shit.

What are you trying to do? What do you authenticate users for? Why?

Licensing.

For what?

>she

SO, hard question for all the 17yo Java-bashing edgelords here: if not Java, which programming language should be the lingua franca for 90% of generic Windows apps instead?

Note that it should be ALL-purpose, so into the trash go all your hipster Rubys and Haskells.

>Windows apps
C#

How about some .NET language which is de facto main platform for windows?

is there some way to make a very basic GUI in C++, without installing extensive libraries like Qt?

win32 api?
On linux gtk should be installed by default so that

The best language for general development is C++

What's a good beginner C++ book?

If you care about performance, C++

If you don't care about performance, CL or Scheme

kekekek

amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628

see ignore this

if I learn Qt, I can also use it on Java, amirite?
does the same hold true for Win32 API?

user, we all know c is too hard for c++babbies

C# is garbage collected which causes unacceptable stuttering

C#.
How is this even a question?

user, C is much, much simpler than C++. It's always better to learn C before C++.

Also one should always use -Wall -Werror --pedantic

There are bindings for multiple languages but i dont think you'd want to use qt bindings for java instead javafx or even swing.

If you must use the JVM use scala and its swing wrappers for GUIs

/dpt/-chan, daisuki~~

Ask your much beloved programming literate anything (IAMA).

>If you care about performance, C++
>If you don't care about performance, CL or Scheme
C++ clang++: 5.518077517 seconds time elapsed
C++ G++: 4.659448453 seconds time elapsed

Scheme Bigloo: 3.604533288 seconds time elapsed
Scheme Chicken: 7.966139806 seconds time elapsed
Scheme Gambit: 1.932229635 seconds time elapsed
Racket: 3.618877176 seconds time elapsed
Common Lisp SBCL: 3.015000773 seconds time elapsed


it's lisp.

Yes: imgui
github.com/ocornut/imgui

F# ?

Please, use an anime image next time.

>C# is garbage collected which causes unacceptable stuttering
First of all, you are wrong.
Second, java is garbage collected as well. The original question was, what should be used instead of java. C# is java but better in 99% of cases. (You could make some argument for java having better crossplatform support as of right now, but that's bound to change soon.)

if u are completely retarded yes, that would happen

>muh cherrypicked single benchmark

even calling standard swing from scala is trivial if you dont want to use wrapper...

Yes but plain swing is much more unpleasant to use than scala-swing.

>does the same hold true for Win32 API?
Yes the win32 api is largely the same regardless of which language you are using. However why wouldn't you use some higher level abstraction, like windows forms / WPF?

benchmarksgame.alioth.debian.org/u64q/compare.php?lang=sbcl&lang2=gpp

more importantly, with no code or even description of what was being benchmarked, but you really shouldn't be falling for bait this old anyway.

Silly me, expecting people to post on /dpt/ in good faith

debuggers are for monkeys

linuxmafia.com/faq/Kernel/linus-im-a-bastard-speech.html

>better-dpt-roll.github.io/
>028: factorial

No bully, I'm only a few weeks in:
#include
#include

int main(void) {
int i, num, num2;
long fact = 1;

printf("Input a number: ");
scanf("%d", &num);
num2 = num;
num = abs(num);

for (i=1; i

Who else /as400/ here?

int factorial(int n) {
return n == 0 ? 1 : n*factorial(n-1);
}

literally >95% of you FUCKING SUCK at programming, and a lot of you delusionally think you don't suck

...

uint fact = 1;
for (; num > 0; num--) fact *= num;

What are you using to learn C? You're already doing loads better than most C programmers I see with only a couple of weeks. Like most people who learn don't even bother to know to use void to designate a function with no arguments.

Only criticism is inconsistency with if else and braces, where the if uses braces but else doesn't. Please use braces for everything even if it's annoying. It saves you from crappy bugs with scope.

alright, I answered this shit already, but lets see how well Cred Forums knows their compiler/programming theory

>use void to designate a function with no arguments.
>pointlessly typing unnecessary characters that in no way aid understanding of the code

enjoy your college meme

Fuck off with your homework.

so you suggest they learn that empty parentheses () means no arguments, which is incorrect?

...

thank you for correcting the record

that's your homework

> 6.7.6.3 Function declarators (including prototypes)
> 10 The special case of an unnamed parameter of type void as the only item in the list specifies that the function has no parameters.
> 14 An identifier list declares only the identifiers of the parameters of the function. An empty list in a function declarator that is part of a definition of that function specifies that the function has no parameters. The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of the parameters is supplied.)

>fucking monkeys ITT unironically use debuggers

yes, I already finished it. I just want to see what /dpt/ can answer

i will have to learn a bit more to do that, I haven't started with functions yet
cool!
messed around for a few days making silly programs and stuff
now I'm reading C programming: a modern approach
>Please use braces for everything
will do!

programmers.stackexchange.com/questions/131377/whats-the-benefit-of-avoiding-the-use-of-a-debugger/131391

What looks like guessing from the outside often turns out to be what I call "debugging in your mind". In a way, this is similar to grandmasters' ability to play chess without looking at a chess board.

It is by far the most efficient debugging technique I know, because it does not require a debugger at all. Your brain explores multiple code paths at the same time, yielding better turnaround than you could possibly get with a debugger.

I was not conscious about this technique before briefly entering the world of competitive programming, where using a debugger meant losing precious seconds. After about a year of competing, I started using this technique almost exclusively as my initial line of defense, followed by debug logging, with using an actual debugger sitting at the distant third place. One useful side effect of this practice was that I started adding new bugs at a slower pace, because "debugging in my mind" did not stop as I wrote new code.

Of course this method has its limitations, due mostly to the limitations of one's mind at visualizing multiple paths through the code. I learned to respect these limitations of my mind, turning to a debugger for fixing bugs in more advanced algorithms.

pajeet tier shart in marts will still defend using a debugger

If i'm publishing an app to the play store do i need to add license of the third party libraries?

They use Apache 2.0 and MIT

Kids who've never worked on a system larger than a college assignment GTFO

yes but no

Yes lets have 100 developers work on enterprise project without debugger we will make money for sure!

>all this rationalizing because you can't figure out how to use gdb

>100 pajeet tier shart in marts
FTFY

woaah thanks my friendo :^)

Let's say i'm using RxAndroid do i have to add it somewhere in my app? This is an actual questino i don't want to get memed by the regulations of the play store, i can't find anything specific about this

>competitive programming
lol, get a load of this fucking loser

>foxgrapes.jpg

>a disassembler on steroids that you can program.
That's what a debugger is you monkey.

Alright guys I'm in a computer class in college, just starting to learn basic Java, but my teachers given us a tough dilemma to get around for a project.
My problem boils down to the fact that getting making my double equal the results of an int divided by an int displays the wrong number. I'm having it print to 2 decimal points with %.2f%n , but even if I remove that it always wont do the math right. For example it keeps doing 25/6 as equaling 4.00. I know having just one of those numbers be a double makes it do the decimal math right but part of her assignment is the numbers were dividing with x/y HAVE to be integers, and with no extra variables we need to get a accurate 2 decimal point output in double. SO the requirement is basically:
int x;
int y;
double result;

and it has to be you input x and y as ints, and then in 1 equation calculate it:
input x
input y
results = x/y

but holy hell it won't work. How do I make it do the right math without making one a double or adding any more variables?

>I was not conscious about this technique before briefly entering the world of competitive programming
>briefly
keep rationalizing why you have to use a clunky tool just to step through some code

>I prefer to do by myself what I could get the computer to do for me
Your mentality is foolish.

cast to double first
result = (double) x / y

I think you have to do
(double x) / y

Take your homework somewhere else.

Don't encourage him

we don't have general artificial intelligence, the machine is not as smart as a reasonably competent human being, but of course a pajeet like yourself might need every assistance they can get

* ((double) x) / y

>>pointlessly typing unnecessary characters that in no way aid understanding of the code

The use of the "(void)" formal parameter causes the C compiler to explicitly check to make sure that no arguments are provided at the point of call. If you use the "( )" formal parameter in C, then that check is not performed (for compatibility with the old pre-prototype style).

Proof:
echo > x.c "void f() { } int main() { f(123); return 0; }"
gcc -Wall x.c
# no warning !!!


I always use "(void)" in C so that the compiler will catch it if I accidentally pass any arguments.

The rule is different for C++. C++ treats "( )" identically to "(void)", because C++ doesn't need to worry about compatibility with old pre-prototype C code.

Why not just write it in assembly, so you can prove you are better than stupid pajeet tier gcc compiler! There is no way machine can do anything better than mighty you? You will surely write more optimal code

>Why not just write it in assembly
now that's a strawman argument

nope you made general claim, its not logical fallacy to attack it
>we don't have general artificial intelligence, the machine is not as smart as a reasonably competent human being

>the computer can't do everything yet
>therefore there's no point in making it do what it can to help speed up development and bugfixing
That's the mentality that says we should still program in assembler and nothing with a more advanced compiler.
That's the mentality that says we should write code in Notepad and nothing more capable.
That's utterly retarded.

Is this even any good?

the only excuse for something to go wrong at all is if you literally just wrote some new code, and then it should be immediately obvious want went wrong, so you should be able to fix it trivially without using a debugger.

it was in the context of debugging you fucking retarded sperg

kill yourself

He's just doing damage control because he doesn't know how to use a debugger.

I think I'll toss in a question about debuggers when I interview people just so my company never accidentally hires him.

You got BTFO, just leave.

and not a single valid argument in favor of non-pajeets/shartinmarts using a debugger was presented that day

You should always do that. Debugger usage is fundamental imo.

I'm about to ditch SFML (lack of stable C++ ABI forcing me to compile my own versions constantly, huge size, etc.), but what do I replace it with?

SDL or GLFW?

Both have all the functionality I need. I just can't decide. SDL is more widely used and I've used it a few times in the past, but GLFW seems to be even smaller than SDL. Meaning, even less chance of something that can break.

i'll leave when i want to leave, and i didn't get BTFO you ridiculous idiot

linuxmafia.com/faq/Kernel/linus-im-a-bastard-speech.html

Until today I assumed that it was one of those things that are so obvious that you don't need to ask about them. Clearly I was wrong.

can you even list your arguments against debuggers without referring to authority?

have fun with your ENTERPRISE C# shart in mart crud garbage app lmfao

fuck off with the "appeal to X" red herrings, how about YOU present some arguments in favor of using for NON-CODEMONKEYS to use a debugger

>linus
>authority

I hope to god you're not employed, you are a danger to any company's code.

The reason debuggers are useful are because in most cases, they are faster and more precise than you sitting and thinking "hmm.... I wonder why my code isn't working... well what value do I think this variable would have on the sixteenth iteration? Let me work it out... um... I *think* that's right...".

You turned to insults when it was pointed out that your reasoning was idiotic. It's time for you to leave.

you made positive claim burden of proof is on you

well i guess i went little overboard

Oh yes, I'll be sure to have lots of fun earning an income. You should drop your l33t h4x0r talk and try it sometime.

>being a wagecuck
BAHAHAHAHAHA

dont be so harsh, look he is even delusional because of malnutrition and exposure to elements since he is unemployed. We must be kind to poor and mentally ill.

>unemployed
>thinks he knows shit about writing code
Not really surprising, given the arguments presented thus far.

i make retarded amounts of $$$ on stocks and i'm running my own startup lmfao stay sour grapes

>We must be kind to poor and mentally ill.
Why, when they don't show others even the most basic courtesy and respect?

anyone can run their own startup lol
Here ill make startup based on banana gifs

They dont know any better, you cant blame paranoid schizophrenic for being paranoid thats problem with delusions, you dont know you are delusional.

That's not true though, is it? You've overplayed your hand.

i'll let you believe what you want to believe

I want to create a simple CRUD web back end. What's the best language/tool to use? I'm currently looking at Python and Flask, but I'm open to suggestions. In return, have some quality code I found in one of the code bases I maintain.
private String millisToTrackableDuration(long millis) {
long seconds = TimeUnit.MILLISECONDS.toSeconds(millis);
long minutes = TimeUnit.SECONDS.toMinutes(seconds);
if (seconds

I just started learning JavaScript. Why does everyone seem to hate this language while ate the same time it has managed to become the de-facto standard web scripting language.
It seems like a pretty nice language to me.

And we'll let you cry yourself to sleep tonight.

>some quality code I found in one of the code bases I maintain
have fun debugging that with your DEBUGGER lol

speaking of lauren, what's the best language for automating twitter harassment

Because something being widely used doesn't necessarily mean that it is good.

It's a pretty terrible language, desu. No way of importing code, no multithreading, bizarre scoping, no type system, byzantine coercion rules, and that's just for starters.

Here's a framework you can use
slut.sourceforge.net/

>the year of our lord two thousand and sixteen
>there are still people who use Java when C# exists

C#

Surprise, some companies have mountains of Java code that they don't want to spend time rewriting in C#

You'd know that if you had any professional experience

It's all probably from this:
bitbucket.org/Tetsumi/closurebench/src

There are advantages in choosing to work, rather than to start a business. Namely, you do not have to take a risk. Should the company go under, you lose nothing, and may even be able to use your experience at the previous company when looking for a new job... so long as that experience wasn't the cause for why the company failed, of course.

>I am a lazy person, which is why I like open source, for other people to do work for me.
google.com/search?q=linus torvalds net worth

Then why did people keep using it to the point of making it widely used?

people - especially web devs - are retarded

on the browser side it seems to me that the big problem is that while there are nice parts of js we've been stuck with the bad parts for 20 years. there's never going to be some big break. just to use incremental improvements one has to add in all these compatibility libraries and transpilers

has a point.
Java is good because 1 bilion devices use it is logical fallacy, same argument could be made for tobacco or alcohol.

As to answer why, when java first came out you had horrible old c++ and c, also oop was new popular thing. So all went with a fad and here we are.

>i am smart and everyone who thinks different than me is dumb
What a cheap uninteresting cop-out answer.

ok

i mean there are people today who choose Java over C# when picking a language to learn and use
either way, that sounds like an argument for C# if anything
and i do have professional experience, but it was at microsoft, so as you can imagine that wasn't really a problem

So it was good, at some point.

you're fucking pathetic

Because Java has a lot of momentum behind it, still. You'll be employable if you're good at Java.

Universities still teach it, probably a combination of their teaching staff having more experience with Java, and a vague nod to Java at least traditionally being more open than C#.

I know you might not like to hear this, but Java and C# are pretty much the same language if you squint a bit. You can train someone who knows one to use the other in a couple of weeks.

It was different and easier and idea write once run everywhere sounded great to enterprise. Dont know whether thats good or bad.

We were talking about JavaScript.

Java sucks donkeys balls.

JavaScript is almost as shitty as Java

java is arguably better than C#

>INB4 EPIC MEMES HURR HURR GUARANTEED (YOU)S

Yeah, I thought I was replying to a different post.

>java is arguably better than C#
I didn't say that. I said they're basically the same language. It's not surprising really, given that C# was designed to be Microsoft's Java.

The differences between them are largely inconsequential.

>The differences between them are largely inconsequential.
if you say so, idiot

I suppose you don't really know any other languages, so it's cruel to mock you.

There's a whole other world out there, you know. If you're willing to step outside your bubble.

But the Java bubble pays so damn well...

kill yourself

Assume that people had discarded oop 20 years ago. What would javascript look like now?

k lol

>You'll be employable if you're good at Java
yeah, but the landscape is quickly becoming such that you'd be more employable with C# if that's not the case already, and C# is a better language in general, so there's no real reason to go with Java instead nowadays

>Universities still teach it, probably a combination of their teaching staff having more experience with Java, and a vague nod to Java at least traditionally being more open than C#.
i'm sure those are exactly the reasons why. that's not really a reason to learn Java over C# if given a choice, though

>I know you might not like to hear this, but Java and C# are pretty much the same language if you squint a bit
if you really believe this, then you definitely don't know C#. they share many, many similarities, of course, but C# has quite a few significant features that Java has no sense of whatsoever, becoming proficient with which would take more than a couple weeks

Strongly typed

AHAHAHAHAHAHAHAH stay delusional retard

Pretty much the same. A bastardized Scheme, polluted by committee, lacking many basic features.

>bastardized Scheme
How can anything be worse than Scheme

C# fucking SUCKS BALLS, shart in mart pajeet and todd and chandler

>Universities still teach it,
What kind of shit university exclusively teaches Java?
My uni teaches everything from racket in the first year, to C for system programming, Java and processing and shit for other courses.

I didn't say they exclusively teach Java. Mine taught Haskell, C/C++, Java, and Prolog. The choice of language was largely incidental; the intention was that we would be able to pick up any language relatively quickly.

shes beautiful

I agree with you on everything except the jobs.

Java is easily still the biggest market for jobs, although C# is the only close contender. C++, C, and Python are at the next tier.

If you really want to guarantee a job, you'll learn both Java and C# to a moderate level of proficiency. This is no easy task, though, because I do agree that they are VERY different languages.

>I do agree that they are VERY different languages.
Where do people get this notion from?

They only seem very different if they're the only languages you know.

hi guys, i made a userscript to block the 'sponsored' posts in facebook. But it still shows 'suggested pages/posts' in the news feed because i don't have sample code of this. Anybody has this that can post some inspect element of this?
Also what 'sponsored' is in your locale

Very different are java and haskell, c# and nasm.
C# and Java? Hardly...

sponset

Linus Torvalds is lucky. He produced a product he expected to go nowhere, and people ended up both contributing to it and using it. He makes money because large corporations ended up finding that product more useful, say, any of the BSDs, and they donate to the Linux Foundation because they want to keep that product being developed.

Most people will not end up like Linus Torvalds. They may come up with a good idea, but it ends up not being used. They may come up with a bad idea, and only end up wasting their time. Most have no idea about what the market wants, and quite honestly, that's fine. Not everyone has to be an entrepreneur, and if you can make 100K implementing someone else's ideas, whether they turn out great or turn out terrible, you still earned yourself some decent money.

KILL YOURSELF

God how could i've been so blind. By your light i can see now, i was clearly wrong! You have convinced me, C# and Java are as different as day and night!

Doxing is not an acceptable behavior. Please, don't. It's also against global rule 4.

Maybe I should be more clear, but this is of course taking into account the inclusion of .NET and the Java standard libraries.

What criteria would you define to measure languages as significantly different?

If you tell me what your thoughts are, maybe I can build an argument to suit your needs.

C# is almost as disgusting as python with a java clone syntax, it's similar in syntax and in being object-oriented and that's about it

God damn, that's a cute anime.

gotchu senpai

>>>/rules/global/4

nice argument

>I said they're basically the same language
>The differences between them are largely inconsequential
this is very far from true. some examples: user-definable value types, user-definable conversions, operator overloading, significantly different/more powerful generics (boxing/unboxing, covariance/contravariance, constraints), delegates, better native interop (p/invoke, cli), unsafe blocks/methods, nullable types, linq, initializer expressions, implicitly types locals, extension methods, ref/out parameters, params (varargs), unsigned types, and attributes. that's not everything but it gives an idea

it may not necessarily be winning out yet, but C# is much more prevalent in the industry than people think. it's not immediately obvious because a very popular industry use case is internal tools, pipelines, testing, and automation. it's frequently used internally by companies that use completely different languages/technologies for their actual application/service backends/frontends

other languages being more different doesn't make C# and Java more similar

You don't understand.

C# and Java are different in that C# sucks and Java rules, much like O'Doyle.

whoops

>>>/global/rules/4

>posting a bitcucket is doxing
???

fpbp

this fucking url though

That's not Doxing; that's the source for where that benchmark came from. I pulled that link from an archive of a previous DPT, so I did not put into circulation any information that was not already public knowledge.

>it's not immediately obvious because a very popular industry use case is internal tools, pipelines, testing, and automation. it's frequently used internally by companies that use completely different languages/technologies for their actual application/service backends/frontends

This.

It also holds true for the Windows Server market share. Those things are like 80% of all private internal servers that aren't included on stats that only measure public-facing servers.

>People read rules?
What anime is that?

Ofc it does semantically speaking. If you use "very" for java and C# what do you use for java and prolog? Extremly? Whats only different? Are C and Java more or less very different?
Java and C# are more closely related than bunch of other languages, you cant usevery. From point of semantics ofc.

I was just linking the rule for user

Some of these are no longer true, due to some recent attempts by Java to catch up to C#, but at least this can aid the conversation.

I'm not picking a side, I just come bearing information.

just because it's not as extreme as haskell vs php doesn't mean they aren't every different, and if you can't see how java and C# differ in very significant ways you don't know them well enough to make that judgment

things aren't black and white fucking autist

this connects back to the previous sperging about learning a language vs learning a syntax, just because, java and C# have a similar syntax to each other doesn't mean they're similar languages, fucking pathetic retards

The girl is Yuuri Wakasa from School-Live!

en.wikipedia.org/wiki/School-Live!

I know they are different but in language you define adjectives "short" in relation to "long", otherwise it makes no sense to speak of short things if you dont have concept of long. Same is true with close. In English we only have comparative and superlative we cant use comparative for such closely coupled languages or we cant define others well. It becomes meaningless

Thank you kind user.

Wait is that the apocalyptic thing where the girl in the background is delusional as fuck?

Arguing semantics is just silly.

If you'd like, we can say that Java and C# are "significantly" different, but this obviously depends on what you see as significant.

I would say that the average programmer who is reasonably knowledgeable in Java and C# would agree that they are very different languages, on their own merits.

Once you include their standard libraries, their toolsets, and their other non-primary integrations (Swing, FX, Xamarin, .NET Core, etc.), the gap widens.

they ARE very different to each other, how else do you think people end up with the belief that one is vastly superior to the other, that one is a top tier language and the other one is bottom trash

>Explain how image compression works , in 3 sentences or less.

>e.g. how could you compress a image of 1MB to 200 Kb while maintaining the same quality? what is actually happening?

Their beliefs are delusional using absurds like absolute statements...

If we observe only them in relation to one and other yes, generally speaking about all languages, they are not.

not the same quality

convert it to webm

you're one of the most annoying anons in this thread, are you literally 14 years old, you keep spouting this pseudo-intellectual nonsense about logical fallacies and this arguing about semantics

it is a fact that there are people who think that java and C# are very different. you may not agree with that, but only because you suck.

How can you argue anything without being semantically correct?

go see a doctor about autism

Homework

Ignore homework posts

>what is lossless compression

The sequence xxxxx (five characters) can be written as 5x (two characters)

You could keep the same quality by simply using a palette, user.

Compressing works by removing redundant information. Take a file made that repeats the same information over and over, by just leaving "insructions" how to recreate the original you can save a lot of space.

e.g.
original: AA AA AA AA AA 00 00 00 FF
//by just saving the data as a byte followed by the times it repeats you get
compressed: AA 04 00 02 FF 00
same information less space.

good luck compressing an arbitrary 1MB image to 200KB losslessly

Because those people are not very informed.

If you don't care about words having a meaning I can't help you.

java and C# have many differences. they were designed by different people with entirely different design philosophies. they are used for different purposes. your opinion is bad and you should feel bad.

I feel bad.

For you.

kill yourself

en.wikipedia.org/wiki/Portable_Network_Graphics#Compression

If the entire image is one single color uncompressed, then you can easily shrink its size (relatively speaking) down to almost nothing.

You'd only need information storing the dimensions and the color.

That's all the question is asking. Rather than saying quack 1,000,000 times, you just say quack and convey that you mean it to extend to 1,000,000 quacks.

Why are you intent on silencing me?

Is it because this distinction between Java and C# that you've constructed in your head is the basis for your entire self-worth, and you don't want me to shatter the illusion and force you to accept that in reality, there is no such distinction, and you're every bit as good and bad as the Java programmers that you're so desperate to think of yourself as better than?

bla bla bla (You)

I don't know about her, but the fact that you're responding to only the shitposter and not the valid discussion is quite telling.

oh snap it was the carposter all along!

I havent seen any update from akari bbs today.

/o/ut

after you lick my tailpipes

>green McLaren
>is actually orange
Sucks to be a color blind fag

it's dark green with orange accents idiot

Syntactically the languages are very similar, it's C++ syntax all over again.

The type systems are roughly the same. No higher-kinded types. Nulls. They both have closures (delegates in C++; anonymous inner classes in Java because fuck you). Neither has macros. I'll give you that they implement generics a bit differently. Both use OOP with interfaces and superclasses. I'll give you that C# has extension methods but they're toys. Neither has typeclasses. Neither has purity enforced by the type system. Neither has tail call optimization. C# has properties, surprise, it's nothing. Both of them have the blight that is reflection.

I'm right here.

now compare C# to python using the same reasoning

How's going?

Cars are like computer cases. Only edgy kids care about them.

i don't even care about cars i just post them because some fag gets super butthurt about it

Python's type system is entirely different. Its syntax is very different. Its scoping is different (I neglected to mention that Java and C# both use the same sensible scoping; Python's is insane). Its lambdas are a joke.

Cars are like computer cases which are like smart watcher which are like macs which are like thinkpads which are like ipads which are like samsung galaxies which are like laptop which are like computers which are like tvs which are like books which are like trees which are like life. Only edgy kids care about them.

Slippery slope never ends

>makes weak ass arguments for why java and C# are similar, only highlighting similarities and dismissing the few differences he does bring up
>only points out differences between python and C#, brings up syntax as one of his main arguments
you're a lost case

What matters is how much you paid and whether what you got can do what you need.

>conflating algorithm with user interface
congrats satan, you've failed the test

#include
#include

long fact(int i);

int main(void) {
int num, num2;
long fact;

printf("Input a number: ");
scanf("%d", &num);
num2 = num;
num = abs(num);
fact = fact(num);

if (num2 < 0 && num % 2 != 0) {
printf("The factorial of %d is -%lu\n", num, fact);
}
else
printf("The factorial of %d is %lu\n", num, fact);

return 0;
}

long fact(int i) {
long fact = 1;
for (i=1; i

how much you paid relative to your income*
s/need/want

dont mind me im only blowing things out of proportion
Personally ill use whatever i have to and in spare time do whatever i want to.

woops
long fact(int num) {
long fact = 1;
int i;
for (i=1; i

I think it's foolish to overpay for something whether you're a pauper or a prince.

You're absolutely cherry-picking, and if you think those are the extent of the differences, you're not very familiar with either of them.

See and

ever since good old year of our lord 1999 you can do
for(int i = 0; i < num; i++)

The language is not the libraries available for it, nor the tooling.

Introducing an extra variable is incredibly wasteful.

but are you overpaying for a ferrari if that's what you enjoy? did you still overpay when you sell it on to someone else for twice the price after you've had your fun with it? sounds like sour grapes

Great, you've successfully addressed 1/40th of the content of those posts, while also failing to realize that things like .NET and the JVM are not to be dismissed, as they are integral parts of the usage of those languages.

McFucking kill yourself.

So I'm learning Haskell and it took me a whole day to do this. Please give me tips about it:
input is a txt and ouput is a .cue file
import System.Environment
import Data.List.Split
import qualified Data.Text as T

--From stackoverflow.
show2d :: Int -> String
show2d n | length (show n) == 1 = "0" ++ (show n)
| otherwise = show n

mystrip :: String -> String
mystrip x = T.unpack $ T.strip $ T.pack x

main = do
args

THE LANGUAGE IS NOT THE SYNTAX YOU GODDAMN FUCKING RETARD

Writing some tests.
I want to trigger the error from yesterday.

>the sum of a language is only its syntax

what

>it is a fact that there are people who think that java and C# are very different
And they're either pedantic or retarded.

The syntax limits what you can express in the language. (It's not the only thing that does.)

you're pedantic and retarded

Did you miss the bit about type systems?

Who is this semen demon?

I rather think that depends on how much you pay for the Ferrari.

there are no extra variables introduced tho.

>filename.jpg

>We dont need universities, cs is a meme.
Kids here is why you should go to school and learn some formal theory.

Coraline Ada Ehmke

>heh, I'll say they're uneducated without providing any sort of actual argument to refute their claims, that'll show 'em!

you'd presumably pay more or less the current market value, adjusted for various factors such as the local availability and whatnot

i

>"The Cunt of Glasgow" Edition

>args f arg0 : args f

Where did anyone say anything about current market value previously?

>babby's first semester in college
>thinks he knows all of programming even though he can hardly be considered well-versed in any one specific programming language
sure is dunning kruger

What IDE are you guys using?

what does your post have to do with anything?

and who are you to judge other people on how they spend their money? the fuck does it matter?

None.

>dunning kruger
Looks like someone's got dunning kruger

programming language doesnt need library, doesnt need compiler. It requires syntax semantics and grammar. It can be defined on paper and still be a language.

So yes strictly speaking you can dismiss jvm and .NET. C# is still language even on paper without .NET and winshaft same with Java

The one that works the best with the languages I use.

If you don't like the idea of people judging you, then I humbly submit that you need to get over yourself.

the LANGUAGE FEATURES and CONCEPTS are very different. it's not just how similar the syntax is. fuck off

Reminder that infix operators with complicated precedence rules, separation of expressions and statements, grouping of statements by blocks of code, while loops, for loops, if blocks, else block, else if blocks, lexical scope, variables that are mutable by default, procedures/methods/functions as the primary abstraction for sections of code, and assignment with special support for "lvalues" is not required of any language and there are dozens of language without these traits.

you're clearly the one who needs to get over yourself
>humbly
you're delusional

insufferable sperg

We were never just talking about syntax.

Are you retarded?

int i;
for (i=1; i

What are you talking about?
My entire reply was shaming you for saying "dunning kruger" because it shows how much of a self obsessed idiot you are
I don't care what you're actually arguing over

I'm not the person you're replying to, but
>insufferable sperg
>delusional
>you're clearly the one who _
hello javafag, you've been laying low for a while

kill yourself. there are many differences between that java and C#.

the fuck is this then:

I humbly submit that you ought to take a break from posting and take a chill pill before you become further upset.

(You)

>take a chill pill
user this is javafag you're talking to

They're both wasteful. You can do it without introducing the additional variable.

I thought he'd left or been banned too

yes clearly java doesnt have # or C in its name... But TOOOLING! LIBRIARIES!

C and C++ extremely different languages! Like day and night.

>C is subset of C++
fuck of you retard, C doesnt have unique_ptr! Futures lambdas, different generics. muh they are obviously completely different languages not similiar at all.

you can also do just readFile . head =

We were also talking about type systems.

i leave sometimes (or quite often lately) because you're fucking pathetic time wasters

long res;
for (res = 1; num; --num, res *= num);

>kill yourself. there are many differences between that java and C#.
None worth mentioning. That's why they're basically the same. Anyone who knows Java could pick up C# in a day and become proficient over a month of two. The same is not true for a Java programmer going to Scheme.

>the fuck is this then
That post refers to semantics. Go drown in shit.

c++ is very different from C because its more strongly typed!

Much better.

poo in loo

Templates
RAII

Here's your (You)

and that, one might even say they are very different like C# and Java

...

>Anyone who knows Java could pick up C# in a day and become proficient over a month of two.
Maybe this is it. They're afraid of Java programmers taking their jobs. That's why they're so adamant that Java and C# are very different and that it's impossible to pick one up when you know the other without having to start from scratch.

use Text.Printf.printf

(You)

is still an idiot for replying to instead of

No, one mightn't.

Noo C# and Java are so different that once you learn C# extremely well you have to spend years learning whole new paradigms learning drastically different tooling and jvm its so different it makes big difference when programming. It would take years to switch coz you know they are "very different"

im being sarcastic

...

>im being sarcastic
Difficult to tell, given some of the posters here.

What do you guys think of Libgdx?

>Maybe this is it. They're afraid of $LANG1 programmers taking their jobs. That's why they're so adamant that $LANG1 and $LANG2 are very different and that it's impossible to pick one up when you know the other without having to start from scratch.
Yup.

I know i was trying to find most closely related languages i could think of... Its hard. Should have taken american and British english

Don't use it, it is harmful software. Use a free alternative from the FSF.

it's trash it's what mexicans use for their babbys first 2d android games

What should I use then?

depends on what you want to do

if this is your first game you might as well use libgdx so at least you can focus on game design and actually making stuff. For second one you can try and pick up better tool.

2d games.

Then just write your own blitter.

New thread:

Come on man..

Made before bump limit.
DO NOT POST IN THIS THREAD
wait till 310 posts for a new thread.

>Anyone who knows Java could pick up C# in a day and become proficient over a month of two
of course it would be easy to *pick up* one coming from the other, but you must have an extremely lax definition of "proficient". and you clearly underestimate the number of differences between the languages in general, let alone the number and significance of features C# has that Java doesn't

>That's why they're so adamant that Java and C# are very different and that it's impossible to pick one up when you know the other without having to start from scratch
>without having to start from scratch
literally nobody said this

we're not even at 310 you fucking retard

just use libgdx.. Rendering stuff to screen is smallest part of game...

it's all trash, like don't use gamemaker, there are people who use unity engine for 2d games but that's retarded and only relevant if you want to learn the unity engine, you could do it with plain opengl but that's only relevant if you want to learn opengl

76 (You)s, including the plaintext (You)s in posts

samefag

The original code is in , / just copy pasted it and moved it into a separate function.