We respect your right to privacy. You can choose not to allow some types of cookies. Your cookie preferences will apply across our website.
Previous thread - >>53872049
What's the best programming language, and why is it MSW Logo?
>>53880216
Microsoft LooGo: where do you want to go today?
>>53880216
>MS
>backfsckingslash
someone make a GPL-licensed thread, I can't even anymore, it has gone too far up
>>53880216
>MSWLogo, An Educational programming language
no thanks
c#include <stdio.h>
int main(int argc, char **argv) {
int i, rc;
for (i = 1; i <= 100; ++i) {
rc = 0;
if (i % 3 == 0)
rc = printf("Fizz");
if (i % 5 == 0)
rc = printf("Buzz");
if(!rc)
printf("%d", i);
printf("\n");
}
return 0;
}
>postulating an initial open ended question then changing the question to one that seeks validation for your own opinionated answer to the initial question disregarding that the initial question is open ended and has no definitive correct answer
>>53880256
Parabola GNU\Linux-libre has a new mascot, faggot.
Tell me \g\, which distro has the most swag, and why is it Parabola GNU\Linux-libre?
>>53880306
interesting, does printf() return an int value like 1 or 0 based on the success of the function call or something?
also trying to learn C atm
>>53880256This thread is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This thread is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this thread. If not, see <http://www.gnu.org/licenses/>.
Now, this thread is Free Software compliant.
>>53880362
The number of chars written or a negative value on error.
>>53880362
printf returns the number of characters printed
Java and Android expert here ask me any programming questions relating to either and I can help you
http://www.dreamincode.net/forums/topic/374426-printing-data-using-local-reports/
.NET
I'm trying to do this but instead of manually adding the fields, populate it with a coma delimited file HOW DO I DO IT SEND HELP
I got it working already but if i populate it with a csv the report will show nothing
>>53880424
>inb4: way too low for a Heil Hitler
Fucking communists
Stallman is a bloody red
>>53880449
where is this picture located, geographically? Looks like Lake Léman...
>>53880431
I am a Java expert not .NET I can't help you but I would google .NET how to use a coma delimiter
>>53880449
You are bloody red too.
>>53880466
On anons hard drive
Reminder that "Haskell-like" or "ML-like" syntax should actually be called CPL-like syntax.
>>53880449
>Welcome to the future
>One very rich man
>runs the Earth with
>one multinational
>owns your stuff
>and owns your birth
>[...]
>Does it sound like a paradise
>or a way to die
>while alive and a loser
>I'm a man from the open past
>And I'll never last
>on the Planet of the Users
src: http://www.openbsd.org/lyrics.html#46
Think about this, or Fahrenheit451, or anything sci-fi novel really: this is what we are heading towards if we go for a pure free-market society with no evil gov't at all. We become more and more reliant on whatever big corporation can provide as bread-and-circus all-in-one pack, to the point where the free market destroys itself and competition is only a faint dream. This is what you would probably term a communist shithole, yet it is the probable outcome of our current system. Citizens can only remain reasonably independent if they control at least part of the services they use, and this includes seeds (Monsanto owns your crops, did you even know?) and software, which put RMS, indeed a leftist but not an authoritarian one, on the side of reason.
>inb4 guns
https://www.youtube.com/watch?v=cxHvHi-MdIM
tl;dw: the second amendment is only one amongst others, tyranny can be more subtle than a legion of boots.
CyberPunk is real.
>>53880643
LOVELY! is best Lake.
>>53880663
He travels a lot.
https://stallman.org/photos/index.html
>>53880686
>rich man complaining that everything isn't free
>>53880216
SQUARE BRACKETS ARE LITERAL CANCER FUCK OFF
>>53880691
Having you as an opponent is such a pleasure, you moronic cunt. Go Free Software.
>>53880663
"I bet it doesn't even have GNU/Linux installed"
>>53880686
Is he actually rich to travel around the world looking like hobo
>>53880729
He's also an autist who thinks supporting Bernie will help his image. Like he even has an image to protect.
>>53880756
He supports Bernie?
Holy shit the faggot
>inb4 his wife is open source
>>53880750
I think people pay for his travels to give lectures at universities and stuff.
>>53880800
>people pay him to spread communism
Fucking leftist uni scum
>>53880756
source?
>might as well post pic related before a MS Moronâ„¢ does
>>53880819
>Stallman is a bern victim
Why am I not surprised?
>>53880819
>this fucking post
Holy shit anti-MS fags are retarded
>Tfw game development is too hard so I am sticking to programming
>>53880871
>>tfw
>I
>completely unrelatable story
>game dev
>failing at game dev
>>53880871
It shouldn't be harder than your average programming, the difference is you need some dank ass art to make anything work. We program, not draw.
>>53880431
>>53880431
SEND HELP
Anybody knows how to do this?
>>53880886
>>53880898
That's the problem I can't draw
>>53880917
An attention whore cunt
Also, anyone know the programmers who worked on Arma? Those motherfuckers must be some wizards, even though their games don't know how to manage threads correctly.
>>53880855
FFS TAY! I'm not asking for a source on whether the Prophet supports Bernie Sanders, this is an undisputable fact. But your claim is that He does so "to help his image" which I challenge you to prove. Protip: you can't, it's bullshit.
How hard did you get buttraped by the MS internal PC thoughtpolice exactly? I already knew it was very serious, but to the point where you can't distinguish what you yourself claim!?
...I should have seen it coming tho: reason is the antithesis of feminism obviously...
>>53880950
>Attention whore
wew
i just want help m8
>>53880952
What the fuck are you talking about?
Stallman supports Sanders because Stallman is a commie idiot.
>>53880504
it should be called pig disgusting shit syntax
>>53880980
>>53880756
>He's also an autist who thinks supporting Bernie will help his image. Like he even has an image to protect.
Explain that
>>53880958
That is literally the pose of an attention whore you autist. It's probably better that you do not know her name. In america there's more stupid blondes in the local Uni's education department than you'll ever find online.
>>53880989
Easy: that wasn't me
>>53880997
Excellent. NOW FUCK OFF
>>53880917
>>53880958
>tfw no gf
>>53881012
lol faggot
>>53880995
he's asking for programming help not for her name
>>53881024
kibi digits confirm
>>53881053
>he doesn't rate 1024s
>>53880216
Y'all niggas know an xml parser for C++ that works on all platforms?
>>53881068
only quads, maybe trips or better count on /g/
1024 is a contrived get that you made up on the spot and are not recognized as special digits
>>53881088
>C++
>that works on all platforms
>>53881036
shit now I'm the autist
So i have a program running thats displaying an image in a textbox, i have the handle id of the program and the control element.
How can i get the displayed image? Also how do i detect updates in that image?
>>53881109
C++ does work on any platform as long as you're not doing low level shit
>>53880786
>rms supports the candidate most in favor for digital rights and privacy
wow how shocking and horrible
>>53881109
I mean the library I'm using you dip
I'm learning node.js at the moment
>inb4 web peasant
I've only ever done front-end work (AJAX and API interactions, etc). This is my first foray into back-end programming. What I don't get is this whole "server" stuff. "You can make a server in node, and it will serve up responses to user requests"! What is special about this? I've used FTP to throw html pages onto servers, and I've obviously never had to program any of that for it to work.
So, what is it that backend languages do, exactly? I know they interact with databases, but I have no idea what value that really holds. The idea of them serving up html in response to user requests doesn't strike me as particularly interesting either, considering when you buy a server that stuff is all pre-installed.
Are C# and Xamarin good to learn?
>>53881139
>digital rights and privacy
>except if it's hate speech
>>53881175
no
learn java and the android SDK if you want to make apps. xamarin is only ok if you're an insufferable sperg that already knows C# and refuses to use anything but C#
>>53881175
yes
>>53881201
>learn java and the android SDK
kill yourself. It's never a good idea to learn java
>>53881201
>sperg
>pro Java
use tripcode pls
Whats a good android emulator?
Android studio feels slow.
>>53881244
>>53881246
epic meme
xamarin is the exact same shit just with trivial changes like using enums instead of int codes (and can you even bitwise OR them like you can with int codes ffs?)
>>53881201import FactoryBeansSpringFrameworkInMySystems;
public class Factory implements SpringFactoryBeanAbstracttion Runnable ThreadExecution
{
public static final abstract void int double(BigInteger x, BigObject o, AndroidAPK k)
{
}
}
>>53881269
fantastic meme
and your code more so shows how shit C# is with its shitty curly brace style
what might be a reason for my c program (that works on linux) for not working on windows?
>>53881303
implementation-defined behavior
undefined behavior
>>53881303
you compiled it on GNU/Linux
>define "not working" fagget
>>53881151
Its only string processing. Why would it not work on all platforms?
>>53881328
teacher said to look for special libraries that work on every platform
>>53881319
well, I compiled it on windows, and on linux using mingw with the same outcome - it just did that "program stopped working", there was no error message, and the program works fine on linux (I don't usually use windows)
>>53880216
I propose the following to be used as metasyntactic variable names.
Instead of:foo bar baz qux
Use:poo loo paj eet
>>53881339
if the library isn't complete shit it should say in its description/documentation which platforms it works on or if it works on all platforms
>>53881364
the maintainer of the telepathy node.js module recently removed it from github so I don't think anybody will be able to diagnose the problem you're having now
>>53881412
any library you recommend buddy?
>>53881419
>5 whatever lines of code deleted
>NODE.JS DOWN FOR THE COUNT
weebdevs ffs
>>53881419
I just thought that the same C code should work on both windows and linux since I only used the standard library
>no "crate" visibility
>no ability to re-export only certain fields of a struct when "pub use"ing it
>other people are complaining about this too
>response from devs is "just put it all in one file lol"
I want to love Rust but they make it really hard for me.
>>53881364
and you don't get any compiler warnings or anything? are you using libraries outside of the standard library?
>>53881364
does helloworld work with the mingw setup? I tend to think that your mingw install is fecked for some obscure reason. Mingw is usually quite robust AFAIK. Is it any C program or one specific C program and not the others? Narrow you issue down - it's exciting when it doesn't work!
>>53881420
i've never used an xml parser and i'm not keen on using libraries in general but i just googled "c++ xml parser" and these should be fine
http://stackoverflow.com/questions/170686/best-open-xml-parser-for-c
https://xerces.apache.org/xerces-c/
http://libxmlplusplus.sourceforge.net/docs/manual/html/
I'm making a hangman program for class and I have a picturebox control to cycle through pictures that I have stored in resources with a variable called countdown but I can't get it working.
Here's what I have for that bit of code so far:
countdown--;
lblCountdown.Text = countdown.ToString();
pictureBox1.Image = Hangman.Properties.Resources._ + countdown;
The pictures names are: _0,_1 etc
>>53881377
>posting the same joke in two threads
Here, have a pity (You)
>>53881587
Other thread was dead, didn't realize when I posted it there, ya dingus.
>>53881562
what lang? what library? why is this not working? shouldn't "Hangman.Properties.Resources" be enclosed in quotes since it's a string literal?
How should I deal with my A* pathfinding when the target moves as opposed to standing still?
>>53881562
>>53881614
correcting myself: it's not a string literal. What kind of datatype is Resources?
>>53881562
>Text =
>Image =
>ToString()
fucking pig disgusting naming convention
is it C#?
fucking retards there is no reason to justify this naming scheme besides to not look identical to java
fucking kill yourselves
>>53881614
VS C Sharp my mang. and I don't know, the autocomplete thought it was ok.
Is this pretty Python?return sorted(torrents, key=lambda x: x["seeds"], reverse=True)[:5]
Would it be better to split that over a couple of lines?
Why aren't you all programming in Android making money off your applications
>>53881677
python always looks like shit
>>53881680
i am but i haven't released my first game yet
>>53881665
Yup, hate CSharp's syntax, python guy myself so it all seems so arbitrary to me.
>>53881665
Properties are uppercase to distinguish them from fields.
>>53881691
Post game
>>53881562
>Hangman.Properties.Resources._
_ is not a property of Resources.
Look at your error list in Visual Studio, and the red underline under that part.
>>53881671
DoesHangman.Properties.Resources._even exist or is it just not defined? Poast error message. It will be something unrelated to _1 anyway tho. where does Resources come from? Who created it?
>>53881769
why not
>>53881780
because I'm a faggot
>>53881787
Me too! I love traps but I'm not gay tho
>>53881780
mainly because i don't want to dox or reverse dox (like if people see i write horrible things on 4chan) myself
and i don't want anyone to steal my idea and design and i don't care about people's criticism anyway it's just a small first game for me to learn
but for other games i make i might post screenshots and webms
>>53881787 is not me
>>53881816
>my idea and design
>MUUUUUUUUUUH
Your an even biger fagget tho
>>53881816
>if people see i write horrible things on 4chan)
Being this beta
>>53881816
posting something that could maybe let other people know that you go on 4chan (reminder: an ANONYMOUS imageboard) would have been ok if it wasn't for this last post, see >>53881844 and >>53881872
>>53881872
you don't have to ruin your reputation for no reason
it would make it much harder to do business/collaborations with people and take in investments
>>53881605
>it's ok to repost the joke because the old thread was dead
>>53881903
>hangman assignment
>identifying
>ruining your reputation
ffs even cyberpunks aren't this paranoid
The best programming language is probably Java because you can actually make money with it.
>>53881907
How about you repost my DICK with your FACE, nerd.
int*** x
How would you mark, say, the value of x, the value at *x and the value at **x, with cons?int* cons* cons* cons x?
>>53881954
What a silly post.
Not saying you can't make money with Java, but there are plenty of lucrative opportunities with other languages.
>>53881954
I make money with python, so its the best programming language.
>>53881954
Not with Happy BALLS you won't
Java is clearly superior to every other language even the web languages like HTML and CSS
Sup it's me(>>53879322 (You)) again
I tried so far doing this with the WebBrowser for the learning experience.
I've managed to connect, I know the page is loaded because I'm executing functions from a WebBrowserDocumentCompletedEvent, and I can get some of the info.
I tried:public HtmlElement[] GetElementList(WebBrowser browser, string tagName, string className)
{
var elementList = new List<HtmlElement>();
var elements = browser.Document.GetElementsByTagName(tagName);
foreach(HtmlElement element in elements)
{
if(element.GetAttribute("className") == className)
{
elementList.Add(element);
}
}
return elementList.ToArray();
//then parsing to List<HtmlElement>
}
This worked on a simple Html page, without scripts and css.
But when I try to load a List<HtmlElement> from an actual site I get a couple of javascript errors, and then the specific elements are not loading into the list - it's empty.
I can get the whole text with tags(browser.DocumentText), but then I can't make a list of the element's content like I want to.
I can get all the inner text in the inside the body(browser.Document.Body.InnerText), but I get all inner text EXCEPT the elements I need.
Questions:
1) Is the site blocking me from viewing the elements I am looking for, or is the WebBrowser just shitty as described?
2) If I am getting blocked, Is there a way of getting around it, or should I approach it in another way?
3) If I do need to get the info from a string, does anyone has advice on what LINQ can find and each string that is between two other strings that I specify?
4) What's the usual approach to getting info from within tags, for displaying, for example, all messages on a fb wall, or all blog text posts in a winform?
TL;DR can't load needed elements from HtmlDocument, although other do load.
>>53881998
You mean const right? you're right:const int ***x;
andint const ***x;
are the same: the int is const and not the pointers (btw: remainder to put a space before the stars, not after)int *const x;
is a constant pointer to an unqualified intint *const *const *const x;ftfy
>>53881981
>nobody heard me, guess i'll repeat the joke
>>53881954
i wish i was a happy ball :(
>>53881954
Whats that color scheme?
>>53882063
Yeah I mean const. Thanks mate!
>(btw: remainder to put a space before the stars, not after)
we'll see :^)
>>53882071
How about you fail to hear my DICK, geek.
my prof says in producer/consumer you want to have mutexes on the outside, and 2 semaphores full and empty. and in producer, you wait mutex, wait empty, post empty, and post mutex. is that right? i thought you would wait empty, wait mutex, post mutex, post full
>>53882072killBall()
;_;
>>53882037
As a guy who has done professional web development before I could help you but
TLDR
>>53882142
Your prof is wrong: mutex-outside blocks, it's obvious!
Look it up in Tanenbaum's or here: https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem shows the mutex-inside version for a good reason. The critical section consists only of modifying the actual buffer, not waiting on semaphores: those semaphores can protect themselves from race conditions thank you very much.
Maybe it was just to see who in the class was actually paying attention? :^)
>>53881954
r8 my buzz m8s
fizz.c#include <stdio.h>
void main(int ac, char *a[]) {
int i = atoi(a[0]+2);
if (i < 100) {
i%15==0 ? puts("FizzBuzz") : i%3==0 ? puts("Fizz") :
i%5==0 ? puts("Buzz") : printf("%d\n", i);
char s[4];
sprintf(s, "./%d", ++i);
rename(a[0], s);
system(s);
}
}gcc fizz.c -o 1 && ./1
>>53882286#include <stdio.h>
void main(int ac, char *a[]) {
int i = atoi(a[0]+2);
if (i < 100) {
i%15==0 ? puts("FizzBuzz") : i%3==0 ? puts("Fizz") :
i%5==0 ? puts("Buzz") : printf("%d\n", i);
char s[5];
sprintf(s, "./%d", ++i);
rename(a[0], s);
system(s);
}
}
FTFY
>>53882037
1: could be that the site uses javascript to generate elements that isn't supported by the Dispatcher/ScriptObject
2: change your user-agent (subclass WebBrowser, override the headers in the BeforeNavigate method), site won't know you're not firefox (or whatever)
3: could use regex for this, but >regex >html
4: filter until you get the tags you want, then get the InnerText or InnerHtml to get the data from inside the tag. and/or GetAttribute
or use something that supports xpath or css selectors.
http get page (httpclient in .net 4.6, webclient in older .nets), feed it into parser, get elements with selectors.
>>53882130
>dick
>geek
He's back lads! Will have to extend his vocabulary!
>>53882273
maybe. i believed him but i changed my code to check and it deadlocked
>>53881466
go has good encapsulation
>>53882329
>or use something that supports xpath or css selectors.
You're saying this as if it'll surely solve the problem
Because if so I'm just moving on to try AngleSharp, CsQuery or Html agility pack
>>53882247
<3
>>53882320
good eye lad
I love you guys! Keep up the good work
>>53882468
thanks man, appreciate it
>>53882468
kill yourself
>>53882490
>>53882495
>>53882506
Love you all guys!
Finished hangman in c# with some UI etc. and actually learned some stuff, so that's a thing. Wondering what to make now.
>>53882530
What the fuck? You're not me >>53882468
If I make use of a GNU GPLv3 licensed library, does my program have to be GPL licensed as well ?
>>53882590
Yes if it's not LGPL
>>53882565
love is BSD licensed
>>53882602
Love isn't licensed
>>53882622
i wrote a 5 LOC love library so i can put whatever license i want on it
>>53882601
Oh boy. Thanks.
Trying to get a bit into Cvoid str_split(const char *input, const char delimiter, int *count, char ***pieces) {
int i = 0;
int j = 0;
int size = 1;
*count = 0;
*pieces = (char **)malloc(sizeof(char *) * size);
do {
if (input[i] == delimiter || input[i] == '\0') {
if (*count >= size) {
size *= 2;
*pieces = (char **)realloc(*pieces, sizeof(char *) * size);
}
(*pieces)[*count] = (char *)malloc(i - j + 1);
strncpy((*pieces)[*count], (const char *)(input + j), i - j);
(*pieces)[*count][i - j] = '\0';
*count = *count + 1;
j = i + 1;
}
} while (input[i++] != '\0');
}
Is this the correct way to do things in C? Am I supposed to use shit like triple pointers?
I mean it works, but I just feel like I'm doing something wrong.
Anything I could've done better?
>>53880845
Bern and Stallman are someone else's victims
i don't know who
>>53882622
it's under the zlib license: love2d.org
>>53880216
IoT cable when
>>53882646
if you put it under wtfplv2 then npm might steal it at the behest of the evil capitalists that are taking over love
(left-pad, kik)
>>53882736
No you gave them a temporary license to distribute your shit (temporary as in until your shit is no longer in their backups = never)
Beerware is best license.
>>53882286
Why rename instead of just taking the i as argv[1]?
>>53882622
its licensed by God with love <333333
>>53882286
why not just call main() from main()?
also you forgot to include stdlib.h
>>53882852
because it's funnier this way
>>53882273
i talked to him after class about it and he looked through my program for like 15 minutes before deciding there must just be a hidden bug and left it to me to find it. i got 100 when i submitted it so i hope he doesnt go back and take points off
>VB.NET
>Using SQL Reports
I didn't know i can't have spaces in the column name and it doesn't fucking work wat do
I tried fixing with muh [] and muh _ but nothing
Is an OOP approach really "right" for concurrent designs? The more I try to optimize my concurrency the more old objects must be refactored, sometimes to the point of abandoning the object. I'm constantly running into race conditions and needing to check and think about every little function I write.
Am I just doing it wrong? It's getting so frustrating.
>>53883127
this was when i told him doing it my way worked and his way deadlocked
>>53883159
Yes, if you do it the message-passing way.
>>53883132
nevermind fixed ;)
>>53883159
yes. there is no magical "cure", you always have to be mindful of how you write concurrent software
>>53883538 (You)
>>53883538
>>/lgbt/
How to into C++?
>>53883823
if you know another language with c-like syntax - just read 'effective modern c++' and google/stackoverflow specific points about syntax/stuff you don't understand from the book.
>>53883823
Do you know how to program?
>>53883893
VB, and some web dev shit - that's about it
>>53883914
Programming -- Principles and Practice Using C++
i wanna watch an anime that isnt shit'
wat do
>>53883914
http://www.cplusplus.com/doc/tutorial/
http://www.learncpp.com/
download visual studio 2015
>>53880362
You can assume that every single function that was there from the start returns a value, since void wasn't around and int was the default return type.
>>53883936
watch Steins;Magica
>>53883938
Already arr'd Enterprise 2015 for >muh plugin support
on UE4
It's what I use to write VB on. What next?
>>53883194
>>53883127
>>53882142
can some other people please validate me on this? i'm right, right?
>>53883823
i always learn languages best by just jumping in and floundering about a bit for a couple days, ripping and modifying others peoples code then looking up errors on stack overflow. before you know it you know it
>>53883936
the first half of kill la kill's pretty good but then it gets slow. just skip to the last episode after the alien suits take over the world and it feels like you missed nothing. thats what i did
>>53884001
did you install visual C++ with it? start an empty C++ project
>>53884001
> >muh plugin support
Community version supports plugins just fine
>>53884013
Any good sources for learning C++? I'm learning from newboston on Youtube, but Idk mang. Considering getting a free trial on Lynda, then just cancel desu
>>53884021
Yes, I did.
>>53884032
Well either way I have a fancy copy of Enterprise already, so what's next?
Didn't someone here have a script written that saves all the images in a 4chin thread? Not the thumbnails?
Why is C# so hated?
>>53884093
It's not.
>>53884093
It isn't, C# fanatics who think it's the 2nd coming of christ, are.
>>53884033
use these tutorials
>>53883938
>>53884033
is C++ your first language?
>>53884093
>literally Java: Microsoft edition
>not even portable
>>53883159
You're doing it wrong. Make everythimg immutable by default. Read Effective Java and Java: Concurency in Practice
>>53884158
Technically. VB is.
>>53884164
What's a good portable language? I'm still new to programming, all I've tried so far was C, C++ then C#
>>53884164
>Not even portable
It works on Linux...
>>53884220
Java, Python and Javascript are your best bets.
>>53884164
More portable than Java. And all the official runtimes are MIT licensed.
Meanwhile Oracle is suing the shit out of Google now for using Java on android. I bet they are wishing the went with C# now.
>>53884233
Would running Java on Visual Studio be as sufficient as using a Java IDE like Eclipse?
>>53884164
>>53884220
You can run C# on Linux, OSX, PS4, XBone, Android, iOS, WinPhone, etc.
And .NET, Xamarin, and Mono either is or is going full open source with MIT licensing.
>>53884220
>>53884299
>What's a good portable language?
Now that it's 2016, C#.
>Would running Java on Visual Studio be as sufficient as using a Java IDE like Eclipse?
No, Java works much better with something like IntelliJ.
>>53884211
http://www.cs.ecu.edu/karl/3300/spr16/syllabus.html#schedule
you SHOULD be able to view all the webpages on this. i took this guy last semester. it's actually data structures 1, but he teaches it through C++, and doesn't expect any prior knowledge of C++. it should go without saying but don't actually try to submit your assignments to him, since i don't assume you're actually a student enrolled in his class. its not an online class or anything
>>53884164
https://blogs.msdn.microsoft.com/dotnet/2016/04/01/net-at-build-2016-open-cross-platform-and-free/
And soon that's free as in freedom, not just free beer.
>>53884329
Would you recommend Eclipse or IntelliJ? Different guy
>>53884307
A modern Windows C# application doesn't even run on fucking Windows XP.
>>53884380
Eclipse is just horrible.
Go IntelliJ or NetBeans
>>53884380
I'm not super experienced in Java, but I learned on Eclipse, but preferred IntelliJ later on.
>>53884403
And?
>>53884414
What is horrible about Eclipse?
>>53884403
All you have to do is target .NET 3.5 and you've taken care of most XP machines.
Source: I've deployed an application to a business environment that had plenty of XP machines. It worked fine on them, but some .NET library functions that are added later (easier recursive file searching) are not available in 3.5.
>>53884329
Are those two equally free?
>>53884414
why's eclipse so horrible? thats what i use for no reason other than its what my professors have always recommended
>>53880470
> implying Java is any different from C#
I'm fluent in both. Still prefer Java slightly but that's because I have more expirience with it. They are pretty much the same.
C# has more functionality but nothing you can't implement in Java
>>53884449
a real hog and pain when used, instead use
Netbeans, bro
>>53884454
Can you fucking read?
It says free 30 day trial.*
*Not picture in your image.
>>53884432
C#'s portability is laughable.
Unless you're careful about using cross-platform libraries like Gtk# and target an obsolete .net version, it runs on less platforms than even a classic Win32 application.
>>53881088
Literally one google search is all it takes
>>53880431
Use breakpoints, ya dingus.
Examine your data objects as you step through your code with the 'Locals' window.
So I wanna make a program that sends my mouse position and my keyboard to another computer. So that I can use one mouse and one keyboard for two computers (of course not at the same time but toggling the controlled computer is the part I know how to do). So my question is what is the best way to do this it should just send the mouse position or a char so it doesn't have to send much. (c++)
>>53884487
>C#'s portability is laughable.
Laughable how?
>it runs on less platforms than even a classic Win32 application.
winforms will run everywhere a Win32 app does.
>>53884449
>>53884455
Slow, shit interface, you need plugins for the most basic stuff, which usually suck and make everything even slower and buggier.
>>53884483
I can't find it anywhere on the page.
>>53884506
A Win32 app runs on more than Vista and later...
>>53884531
WPF runs on XP and later
>>53884541
Only if you target an obsolete .net version.
Can't you read?
>>53884553
>Only if you target an obsolete .net version.
Old, but still supported.
What's the problem?
>>53884553
Vista and XP are obsolete operating systems.
what is the bare minimum a programmer needs to be hireable
>>53884553
>>53884563
Unless you're writing software for the Navy you should kill yourself if you implement software with XP support
remember how i shared my producer/consumer with the girl who basically shamed me into giving it to her so she could "see what it was supposed to do"? i guess i should've read the plagiarism policy
>>53884607
Ignore the emotions and decisions coming from your penis, anon.
>>53884584
A piece of paper that says you know Java.
Or just say you know what Java is and have a vagina.
>>53884563
The problem is you have to take a lot of care for it to be actual portable.
Which no one does.
Again, can't you read?
>>53884584
> bare minimum
ability to lie on the interview, ability to reupload other people's small projects from github and fake commits to fill in your profile
>>53884622
>The problem is you have to take a lot of care for it to be actual portable.
Target .NET 3.5. It's portable. Not too hard.
>>53884622
What baseline are you comparing 12 years of OS versions to?
In C#, you can write the backend once, and then simply write one GUI for all (non-obsolete) desktop OS, and one GUI for all mobile OS.
>>53884614
i wasn't even trying to fuck her, i've given up on women. she just made me feel like an ass for not wanting to share it with her
>>53884414
Is there a free Java IDE for Web and mobile?
>>53884623
what's the cheapest way to get that piece of paper? can the piece of paper just be my resume I wrote myself? I've been mentally Tina Belcher groaning about the possibility of reteaching myself Java for a while, I might as well just commit
>>53884619
I guess I mean "honest bare minimum," like not just get hired but stay hired and not be incredibly stressed because I know I'm not qualified
although "being incredibly stressed because I THINK I'm not qualified" is unfortunately kinda a given
>>53884652
you should probably show that policy to her and be firm but serious about your desire for her to not do that, and also go to your teacher and apologize for doing the wrong thing. may not matter for THIS assignment but it'll help save your reputation
>>53884660
>I guess I mean "honest bare minimum,"
A real qualification in Java. Which is not hard to get. I mean it. Just read a book and Java and pass some oracle certification. It's will probably be a shit job, but you'll learn a lot fast and probably be on good money if you stick with it a few years.
Programming is easy money if you're not picky about jobs.
>>53884651
I can do the same in Java, with much less gotchas
>>53884607
>only half off an assignment
At my university, you'd get reported to the ethics committee and likely have to attend ethics lecture, and likely instantly fail the class.
>>53884654
Java IDE for web? just go php and Android for mobile.
>>53884693
>with much less gotchas
Elaborate on this.
>>53884654
NetBeans is free and supports all the Java web stuff.
Don't know shit about mobile, I think Android's official dev tools use IntelliJ
>>53884694
you should re-read it
>>53884693
Java has an official cross-platform mobile GUI framework?
>>53884723
Ah, even still, much less severe. Plus, it's not like it's a test grade, either.
>>53884710
Sorry, but I'm tired of saying everything twice.
>>53884728
JavaFX runs on mobiles
>>53884684
alright, thanks for the advice- seriously. my dad gives me weird vague advice, probably because it's been years since he started programming for a living and he has an established reputation and doesn't really need to move out of his niche. would getting Oracle certified involve, like, driving to an Oracle location and passing a test? obviously I can Google these things but I can't necessarily tell what Google results are unhelpful/scammy bullshit
>>53884753
JavaFX and Swing etc are good if you want a cross platform UI. But those are libraries, they don't make the language itself more portable.
Also JavaFX and Swing look like fucking garbage, and Java doesn't have any native GUI bindings. You can easily do first class UI with C# for any platform without it looking like it was made by a prajeet.
>>53884788
>>53884684
also I found Oracle's official website and I don't know the difference between half of these jobs, so I really am a babe in the woods, sorry
>>53884607
no sympathy for you
start over
>>53884788
Yeah, there's a test that costs $200 or some shit to do, and it's just multiple choice questions about java. You just need to learn the book well enough. The test is on oracles website.
Alternatively you can just build a portfolio of software that you made relevant to the job you want. Database shit, web shit, whatever and that can often be enough. This will take longer, but you can pick from a lot more jobs and many are probably going to be more fun.
>>53884865
what's a good website to keep a software portfolio on?
If one absolutely needs the latest .NET on Windows XP, can't one just use mono?
>>53884827
>I don't know the difference between half of these jobs
You'll just have to start researching.
Ask here maybe about enterprise jobs and what they are like. I don't know much about except they are easy and pay well, but potentially boring.
You can be a mobile developer too, and learn android and iOS development. This doesn't pay as well, but might be fun.
Web development pays loads. Just learn a popular set of technologies that sound fun to you. One you have a portfolio, apply for jobs. Web dev is easy, but often frustrating and can pay very well. Lots of work here. Maybe ask about this in /wdg/
Those are the main jobs you can get easy.
>>53884891
Github
>>53884897
they don't need to. .NET still works. You just need to target 3.5
>>53884823
>But those are libraries, they don't make the language itself more portable.
The whole point of Java is that it's not just a portable core language but its own complete platform. 1st party libraries like Swing are part of that.
>Also JavaFX and Swing look like fucking garbage,
Most people are just too dumb to set the SystemLookAndFeel.
Plus it's far from the only cross-platform GUI toolkit for Java.
I'm working on project euler problems. I just completed #4, palindrome products:function reverse(x) {
var rev = [];
var last = x.toString().length - 1;
for (var i = 0; i < x.toString().length; i++)
{
rev.push(x.toString()[last]);
last--;
}
return rev.join("");
}
function palindrome(num) {
var x = [];
var y = [];
var pals = [];
var prods = [];
for (var i = Math.pow(10, (num - 1)); i.toString().length < num + 1; i++) {
for (var j = Math.pow(10, (num - 1)); j.toString().length < num + 1; j++) {
x.push(i * j);
y.push([i, j]);
}
}
for (number in x) {
if (x[number] == reverse(x[number])) {
pals.push(x[number]);
prods.push(y[x.indexOf(x[number])]);
}
}
return Math.max.apply(Math, pals) + " : " + prods[pals.indexOf(Math.max.apply(Math, pals))];
}
>>53882430
The way Haskell does it is basically perfect for me.
>>53884972
ok
where can i subscribe to your blog
Is it worth learning C# .NET, ASP.NET MVC and other related technologies if there's a chance of getting actual hands on experience alongside a team and have programmed a bit in Java? Heart says yes obviously, but I don't have any real experience whatsoever and I'm becoming paranoid thinking I may end up learning something I'll not use, thus fucking myself over.
>>53885003
Isn't what I posted the original point of these threads? Sorry I didn't feel like participating in the circle jerk the rest of the thread seems to be about.
>>53884948
>The whole point of Java is that it's not just a portable core language but its own complete platform.
And that's what i despise the most about it. It's the lowest common denominator on each platform. C# is the opposite.
It's great for making enterprise shovelware, but not for making anything actually pleasant to use.
Regardless, we're talking about portability of the language, not the entire platform.
>Most people are just too dumb to set the SystemLookAndFeel.
>Admitting most Java programmers are too dumb to write good Java software
>>53884931
I'm suggesting that if you wanted to use, say, .NET 4.5 on Windows XP, that you could, so long as you used mono instead of Microsoft .NET.
>>53885006
How can you fuck yourself over by learning something? It's guaranteed to be less of a waste of time than posting here.
And I'm the guy shitting on C#.
>>53885044
>Admitting most Java programmers are too dumb to write good Java software
I'd never claim otherwise.
Most Java developers are idiots.
Same is true for C# though, it's the next pajeet language.
How would you call a function that converts a string to an array? It's not a split per se because there's no delimiter.
>>53885048
Can anyone explain to me the whole meme around Javascript? I don't see why you all hate it so much. I personally really like it.
>>53883159
Conceptually OOP has nothing to do with concurrency, but in practice, a lot of languages are designed for methods to mutate objects rather than return an updated copy. The latter approach, favouring immutability and only permitting mutability when you can ensure you're mutating through a unique reference, is what's important to concurrency.
>>53885085
depends what language you're talking about and what their string model is
What would be a good "first language" software for Android phones? New to this shit, and I need some advice.
>>53885085
as-array | to-array | arrayify
>>53885048
I was mainly talking about the possibility of learning something which will not prove much useful in the long run.
>>53885085
toCharArray
>>53885071
Honestly I find C# programmers much brighter. Most Java programmers learned Java because they had to in college and work in braindead enterprise jobs. People who learned C# had to actually learn about it and decide it was useful to them and learn it. here's less of them, but the are a much sharper bunch in my experience. Not all are smart, but more are than Java programmers.
With C# on mobile you can easily make high quaity apps because the native API bindings are provided:
https://www.xamarin.com/customers/media
Nothing like this is made in Java.
>>53885098
It's the language semantics, and specifically, the type system. The == operator is basically completely unusable, and all languages that compile to JavaScript don't use it.
The syntax is alright, however.
>>53885047
You could. The alternative is having your customers upgrade to an OS written this millennium.
>>53885098
Dynamically typed, weakly typed, broken "this" scoping, modules are kind of hacked in, more verbose than other langugaes.
Other than that it's okay
>>53885047
When has mono ever run software, that targets the latest .net version, well?
>>53885142
What do you mean == is unusable? I love the way it works. It's perfect if I want to compare int 69 to string "69" and have them be the same. Or, the opposite, I want 69 === "69" to be false. Maybe you mean something different though?
>>53885168
What do you mean by dynamically and weakly typed?
>>53880504
ML was originally based on ISWIM, which from what I can tell was developed independently from CPL, despite many of their common features.
>>53885142
>The syntax is alright, however.
no, it's really not. why do these do different things?[] + {};
{} + [];
>>53885040
no point posting code for no reason. if you're asking for critique, or help, or just showing off then sure
>>53885208
dynamically typed means that there's no compile-time/ahead-of-time type checking, where the compiler/interpreter makes sure that all functions are called with only the right values, all method actually belong to the objects they're called on, etc.
weakly typed means that there's little or no mechanism to stop the programmer from accidentally using the wrong types of variables in a certain place (so it's a runtime issue on top of the compile-time issue) you're basically ALLOWED to call nonexistant methods or call functions with too few/too many arguments and nothing tells you that something's gone wrong
>>53885188
It's not even an equivalence relation."" == "0" // false
"0" == 0 // true
"" == 0 // true
>>53885255
Right, that's what === is for, when you care about type.
>>53885327
*when you care about consistency
>>53885209
ISWIM is definitely related to CPL, but CPL is statically typed and ISWIM is commonly believed to be dynamically typed.
>Nearly all the linguistic features, such as where and while and and and recursive, that Peter Landin has been talking about are incorporated as an integral part of a programming language being developed at Cambridge and London called CPL. In fact the where clauses are a very important feature of this language.
>>53884093
Only jelly Javafags hate C#, as their committee-designed language evolves much slower than C#. For example, next version of C# has pattern matching and syntax for Python-like tuples while the last innovation in Java was adding fucking lambdas at last.
>>53885327
Yes, except that... Wait no. The semantics of == are nonsensical anyway. You do care about type since "0" as a string is different from "" unlike 0 as a number.
>>53885210
I was hoping for critique, or, if I did well, compliments. Unless I share it, I'm the only one who sees my code, so it's nice when other people look at it and tell me how I'm doing. I see where the confusion is though.
dynamic manifest nominal typing
>>53885154
XP came out in 2001. More correct would be to say in the past decade.
>>53885178
The concern given was about support, not performance. Mono will support .NET on platforms not supported (yet) by Microsoft's Core CLR, including ISAs that Microsoft will never support (although people are now perfectly free to make a port of the Core CLR to POWER or MIPS). Because Mono exists, .NET can be considered relatively portable.
But strictly speaking, if you want good performance, you should probably use the Core CLR. You should also be using an operating system that isn't complete shit. Do you need to support really old hardware? Linux will probably do a better job at that, and you can, in fact, run the Core CLR on Linux.
>>53885188
A string and a number are so completely different that they should not under any circumstances be considered equal to each other.
That said, even if you accept that disparate types are allowed to be considered "equal", you should at least consider the possibility that equality is a relation that is reflexive, symmetric, and transitive. The == operator in JavaScript is not transitive. If you don't have any formal CS education, that means that a == b and b == c does not imply that a == c, which is pretty fucking illogical. Nonetheless, consider this JavaScript:> "0" == 0
true
> 0 == ""
true
> "0" == ""
false
>>53885378
C# will never compete with F# in anything but performance (where F# is horrific)
>>53885381
Well, an example of when not comparing types is nice is when I have to numbers that need to be compared, and one comes from a string inside of an array, and another comes from some other integer, and all I want to know is if both of them are the number I'm looking for. Otherwise, I would need to either first convert the int to a string or vice versa if I wanted to compare them with the === operator
>>53885209
To be fair that's not exactly a syntax issue, unless you mean the use of + for that operation in the first place and not the non-commutativity of that particular + semantics.
>>53885396
>XP came out in 2001.
I said written. XP was probably nearing completion by Y2K.
>>53885420
Functional programming is a meme and will never take off where it matters, i.e. enterprise non-academic development.
What are your thoughts on QPython /dpt/?
>>53885446
F# is multi paradigm and used profesionally in the financial sector
>>53885420
F# is just as fast as C#. C# is useless.
>>53885377
hm, interesting. i remembered reading somewhere that they weren't very related but since a lot of the info about ISWIM is just speculation that could very easily have been wrong
>>53885420
F#'s performance definitely isn't horrific, it's only slightly worse than that of C# and much faster than any popular scripting language, for example
>>53885427
in one case {} is parsed as an empty block and in the other it's parsed as an empty dictionary
>>53885446
maybe it won't take off much more than it has, but it's been proven to be good enough for enterprise non-academic development multiple times
>>53885425
99.99% of languages use the convert to int explicitely solution. Wanna know why? BECAUSE IT'S LOGICAL! This implicit conversion bizness is just obfuscation
>>53885396
Ah, I see what you're saying now. The second == example makes no sense to me. I could see "" being equal to null, but not 0.
NEW THREAD
>>53885491
>>53885433
Presumably, some parts of it were written in 2000 and early 2001. No one would design an OS and then not release it for a year with no work being done on it just because...
>>53885507
>No one would design an OS and then not release it for a year with no work being done on it just because...
We are talking about Microsoft here. I wouldn't put it past them.
I'm doing Project Euler in C#, and I'm just keeping each problem as its own class for cleanliness sake.
Is there some way that I can progamatically generate a switch to choose what problem I want to run? They all have only one static public method titled "Run()", and while it would be relatively trivial to just copy+paste a case every time I add a new problem I think it'd be cool to have it taken care of automagically.
A point in the right direction would be delightful
>>53885522
It could have taken a year to squash bugs. But i recall XP being pretty flakey when it first came out. Maybe that was just drivers tho..
>>53885534
Be more specific
Code for example "cases" would help
>>53885555
nice quads
>>53885576
It's literally every problem is its own class file.
Euler problem #1?public static Problem_1
{
public static void Run()
{
//Insert Code Here
}
}
Repeat for all problems. They're all public, all static, and all share the same entry-point for the problem via a method titled Run()
So in the actual entry point for the whole project solution (Main(string[] args)) I could pretty easily just put in a switch case asking for a problem number and then have something likeswitch(input)
{
case 1:
Problem_1.Run();
break;
case 2:
Problem_2.Run();
break;
//Etc etc
}
>>53885555
Nice. Very impressive.
>>53885425
>Otherwise, I would need to either first convert the int to a string or vice versa
^definitive proof that you don't understand what's going on behind the scenes: the same number can have a lot of different strings parse to it. If you convert the int operand into a string, you will only have one of the many possible printed representations of that number match, whereas if you parse the string, it'll widen the accepted range in comparison. This is why this kind of stuff should be fucking explicit: it's not just boilerplate, it has a nontrivial meaning godammit!
>>53885672
>what are virtual functions
>>53885685
Oh, yeah, I'm not claiming to be an expert programmer. I pretty much just started.
>>53885709
So make a superclass for Problem and then make each individual problem a derived object from that?
Then, what, use a lamda to call the appropriate virtual func?
>>53885753
have a virtual member function that calls Run(), put references of all the items into a list and then you can call by index and have it dispatch
>>53885749
You started programming with JavaScript??? May God have pity on your soul.
Seriously tho: think more about string representation, packing and such. It's an interesting topic even on the web, where you have Json, SQL injections, urlencoding, base64, etc.
>>53885800
> put references of all the items into a list
That still presents the same problem as using a switch case though, albeit much more elegantly.
I'm hoping there's some sort of way to call out to a given class at runtime without having to explicitly reference them at compile.
Like if I could write it in SQL:SELECT Run()
FROM Class
WHERE Input = Problem_Number
>>53885753
>>53885800
>the glory of Object Orientated Programming
>>53885894
>>53885905
actually i've changed my mind
just have a map of strings to functions, they are static right?
>>53885933
I was going to suggest that... Iff your lang allows it, by all means: DO!
>>53885933
Like so?var actions = new Dictionary<string, Action>()
{
{ "Value1", () => MethodA() },
{ "Value2", () => MethodB() },
};
>>53886034
I guess that works too. in C/C++ you'd just have function pointers rather than Actions
My lighting code is hosed :)
Even after I fix this I'll have to work on shadows, so I'm still not able to work on the actual game, but I'm having fun.