[ yn / yndd / fg / yume ] [ o / lit / media / og / ig / 2 ] [ ot / cc / x / sugg ] [ hikki / rec ] [ news / rules / faq / recent / annex / manage ] [ discord / matrix / scans / mud / minecraft / usagi ] [ sushigirl / lewd ]

/comp/ - Computers and Technology

Computers, Software, and Technology
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1388685889436.png (1.02 MB, 940x822, NGE_daily_programming_thre….png)

 No.363

What are you working on, Ubuu? Learning new languages? Having problems?

General programming thread, I guess. Feel free to ask your questions here, or comment about your projects.

For me, I'm learning C, then I want to go with C++, Ruby and Python.

If anyone is interested in learning how to code, here are a few tutorials:

http://programming-motherfucker.com/become.html

And here are some challenges:

http://www.codechef.com/
http://code.google.com/codejam/contests.html
http://www.pythonchallenge.com/
http://projecteuler.net/

 No.364

Currently learning Java, I've no previous knowledge with programming and that slows me down to some degree but the progress I make keeps me happy and motivated.

I don't think I have any fixed projects yet, but making simple games and apps for android is something I would enjoy doing.

Just today I found something curious when making a simple text game, if anyone can help me out;

Why does this works fine:
do {
ignore = (char) System.in.read();
} while (ignore != '\n');
} while ( choice < '1' | choice > '3');

But this won't

do {
ignore = (char) System.in.read();
} while (ignore != '\n');
} while ( choice == '1' | choice == '2');

Why can't I have two equals separated by OR?
I'm sure it's a dumb question.

 No.365

File: 1388924019255.jpg (111.93 KB, 791x600, 1241655023688.jpg)

>>364
Yuck.. Java hurts my brain.

I don't know java… but you might be trying to use syntax of a different language that you just "picked up" from your readings somewhere.

Did you know the operator you are using "[|]" its logic is not "OR" it is instead logic " bitwise inclusive OR"?

Can you explain the difference between "logical OR" [||] , "bitwise inclusive OR" [|] , "bitwise exclusive OR" [^] ?

Some reading about [|] and [||]:
http://stackoverflow.com/questions/7101992/why-do-we-usually-use-not-what-is-the-difference

Anyway, goodluck. Pls let us know of your discoveries, I would like to know the answer too (to lazy to into java and figure it out myself)

 No.381

I want to start learning C but K^R is kind expencive so I still haven't gotten anywhere. I wonder if the wikibooks are useable…

 No.382

>>381

If you're interested, this guide is pretty good.

http://c.learncodethehardway.org/book/

 No.386

>>382
I will take a look thank you

 No.472

File: 1406833871396.png (188.09 KB, 675x900, 1404673424479.png)

I just wrote a bash script to download all images from uboaru.

http://pastebin.com/DtvBhW50

 No.473

>>364

>Why can't I have two equals separated by OR?

>I'm sure it's a dumb question.

I know this is late as fuck but whatever.
I don't know java but shouldn't it be something like this?

do {
ignore = (char) System.in.read();
} while (ignore != '\n');
} while ( (choice == '1') | (choice == '2') );

 No.481

I only have very basic and limited knowledge of LUA, thanks to my noob days of Roblox.

I wanna someday pick back up on it again, as well as study Java and C++.

 No.504

I'm learning pythong but I haven't even opened it for the past 4 weeks. I need motivation ;7;

 No.514

i'm working on a debugger inspired by plan9's acid(1) but using lisp as language for the interactive loop; right now i'm working on the lisp dialect, but maybe i'll just embed a lightweight lisp or scheme. UNIX(tm)'s ptrace(2) is quite annoying, and so is DWARF (i won't support it any time soon), but it isn't really terrible, and on linux there's also /proc which is fine.
the whole thing is in C, but i'm considering ocaml or common lisp using FFIs, poring shouldn't be too hard.

 No.515

>>364
This works because its including every number after one or every number under 3, right. Like x < 1 == 1 2 3 4 5… and x > 3 == 2 1 blah blah. while in the second one its only 1 or 3. To include 1 and or 3 you have to put greater or equal to signs right. So it should be x <= 1 || x >= 3 because that will include 1, 3 everything inbetween and before. At least I am pretty sure, I haven't programmed in a couple of months and the JVM is really retarded and confusing sometimes.

 No.516

>>364
>Why can't I have two equals separated by OR?
I'm sure it's a dumb question.

Or this… I think you can dont you just need double bars? x || y. Idk I am pretty sure I have used double equals like that before.

 No.517

>>516
I don't know java syntax at all, but considering it's based off C, the OR operator certainly should be a ||.

 No.518

>>514
You better go through with this anon! The world needs something like this!

 No.519

I've been working on this miniature wiki software for a while, in Python.

http://pariahsoft.com/pyww/



[Return][Go to top] [Catalog] [Post a Reply]
Delete Post [ ]
[ yn / yndd / fg / yume ] [ o / lit / media / og / ig / 2 ] [ ot / cc / x / sugg ] [ hikki / rec ] [ news / rules / faq / recent / annex / manage ] [ discord / matrix / scans / mud / minecraft / usagi ] [ sushigirl / lewd ]