420chan now has a web-based IRC client available, right here
Leave these fields empty (spam trap):
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists


Community Updates

420chan now supports HTTPS! If you find any issues, you may report them in this thread
namespaces in c++ by Rebecca Clocklebury - Wed, 03 Aug 2016 00:37:32 EST ID:9GNL65xE No.35945 Ignore Report Reply Quick Reply
File: 1470199052041.jpg -(312799B / 305.47KB, 600x1500) Thumbnail displayed, click image for full size. 312799
newb here...

What exactly is a namespace in c++, I still don't really understand.
Isabella Sopperwell - Wed, 03 Aug 2016 01:48:18 EST ID:OFufE2ZT No.35946 Ignore Report Quick Reply
There really isn't a whole lot to understand.
James Turveyson - Wed, 03 Aug 2016 14:11:19 EST ID:VAZu238H No.35948 Ignore Report Quick Reply
A way of group together code with a common purpose, that is in different files.
It also helps prevent collisions of names of methods, etc. so you can have a Status enum in your Connection namespace, and a Status enum in your 420BlazeIt class.
Frederick Wettingdog - Wed, 03 Aug 2016 15:06:56 EST ID:tGmq1Aen No.35949 Ignore Report Quick Reply

namespaces allow you to have classes with the same name co-existing nicely in the same codebase

say for example that i am building an rpg and i have a different class for all the different items somone can pick up, everything makes sense at the start, i have a rope class, a knife class and a matches class, but then i need to create a way of eating so i create a fork, spoon and knife class...

whoops, c++ doesn't like it when i have two classes called the same thing, if only i could my classes into folders... i could have a cutlery folder, with my knife, fork and spoon clases inside it and a tools folder with my rope, knife and matches classes, then both knife classes could exist happily in their own directory

the example above is a bit stupid, but you can see what i'm getting at, namespaces are ways to organise you classes into logical structures, sure you could give your classes really long names, like cutleryknife and toolknife, but soon enough those names become too large to manage

a good analogy i heard once was: namespaces are like folders, classes are like files. you cant have two files called the same thing in the same folder, but if you put them in different folders thats fine... same things with namespaces and classes in c++

also, its worth nothing that namespacing isnt just used in c++, java has a similar concept with packages (basically the same thing as namespaces), php has it too with namespaces and lots of other programming languages too!

keep trying and don't give up :)
Hannah Senningdidge - Mon, 22 Aug 2016 20:55:15 EST ID:e7bTcYy7 No.36050 Ignore Report Quick Reply
Can members of a namespace be declared as private to that namespace in C++ like they can in java?
Charles Fibblebanks - Thu, 25 Aug 2016 10:55:17 EST ID:N/tXj6uE No.36058 Ignore Report Quick Reply
No. Private doesn't make sense for how namespaces are used in C++. You can however make an anonymous namespace that's local to the translation unit.

Java Sucks by Nicholas Drorringspear - Sun, 10 Apr 2016 20:14:48 EST ID:W/zS63TD No.35461 Ignore Report Reply Quick Reply
File: 1460333688209.jpg -(23367B / 22.82KB, 320x299) Thumbnail displayed, click image for full size. 23367
Hey, so why would you have an Interface that has an Abstract class as a subclass which then has a normal Class as a subclass of that?
The arrows look like:
Interface <-- Abstract <-- Class

Like, what exactly would the program be gaining by making it so hard to understand like this?
29 posts and 4 images omitted. Click Reply to view.
Doris Puggleford - Thu, 04 Aug 2016 16:17:01 EST ID:m6bw8rZX No.35953 Ignore Report Quick Reply
1470341821194.jpg -(91237B / 89.10KB, 500x661) Thumbnail displayed, click image for full size.
Nope, Eric Evans is the worst thing that happened to software development since goto.
Thomas Fezzlepedging - Fri, 05 Aug 2016 13:00:02 EST ID:9QSfnS0r No.35960 Ignore Report Quick Reply
Point taken.
James Snodbanks - Mon, 08 Aug 2016 10:18:11 EST ID:vIbiteGg No.35975 Ignore Report Quick Reply
I tend to use Go's embeds in other languages. Compose an instance of the derived class and inherit from it then just forward the necessary methods from the composed class. Feels more like actual building blocks than complicated type trees.
Hannah Senningdidge - Mon, 22 Aug 2016 20:51:31 EST ID:e7bTcYy7 No.36048 Ignore Report Quick Reply
At that point you just declare a bunch of type aliases for relevant functions instead of instead of classes.
type FoodUnpacker = FoodBox => FoodIngredients
type FoodCooker = FoodIngredients => CookedFood

Or in java
class FoodUnpacker extends Function<FoodBox, FoodIngredients> {}
class FoodCooker extends Function<FoodIngredients, CookedFood> {}

Fairly legible and nimble there IMO.
Hannah Senningdidge - Mon, 22 Aug 2016 23:05:46 EST ID:e7bTcYy7 No.36052 Ignore Report Quick Reply
sorry, those java classes should be interfaces and may need to forward some members or whatever.

Software Design by Lydia Seblingwell - Fri, 15 Jul 2016 21:14:09 EST ID:F+scHBch No.35856 Ignore Report Reply Quick Reply
File: 1468631649935.jpg -(63471B / 61.98KB, 883x273) Thumbnail displayed, click image for full size. 63471
You know how you download some source, and you have all these directories and header files and class files and this overwhelming complex system of files?

Well my school has taught me how to write short programs that consist of one file, but I want to start building a program and the problem is that I don't know where to begin as far as the design and architecture.

I have a vague idea of design patterns and general OO concepts, but I just don't know where to put what to start out. Is it possible that I could write out a whole function, only to have to re-write it when because I had to changed some other part of the overall design, you know?

So what do you guys recommend? How do you go about designing software?
It's a small CLI program, take inputs, work with files, do operations, print results, etc.
13 posts omitted. Click Reply to view.
James Snodbanks - Mon, 08 Aug 2016 12:28:14 EST ID:vIbiteGg No.35976 Ignore Report Quick Reply
> Imagine you have all these functions, each with unique parameters that can be customized
Standardize those functions to the same signature if they are will all be called from the same menu. You can make them void => void and have them refer to a global variable of the current settings/config but the best would be to pass them the configs as an interface and have them return some result state

trait Config {???}
type Result = Try[???]
type MenuAction = Config => Result
type MenuItem = JButton
type Menu = Map[MenuItem, MenuAction]
var result: Result = myMenu("run")(myConfig)
William Geffingfoot - Mon, 08 Aug 2016 15:39:29 EST ID:34i2KQQ+ No.35977 Ignore Report Quick Reply
The tag is (pre). Alright, so maybe something like this, once I learn how to use function pointers (but if theres a better way, do tell)
map<string, function> options_map; 
if(user_input == options_map.getElement) // lol idk
call that associated function

Which is what you had I think. Don't know what exactly "=>" means though.
Betsy Summlemidge - Fri, 12 Aug 2016 03:14:16 EST ID:Iq5puP1g No.35983 Ignore Report Quick Reply

Let's consider a car as an analogy. A car is a quite complex machine that relies on many different components working in harmony together to function. If any one of the critical components of a car, say the breaks, or the transmission, or the differential, does out the whole car doesn't work. Each one of these components is quite complex on it's own, and probably consists of sever complex sub components. Each component is going to have it's own puzzles and quirks to figure out. You need to be able to focus on a component in isolation or else it will be nearly impossible to tell what's going wrong when you test the whole program. You need to be able to test and revise a given part of your machine/program to the point that you can more or less rely on it. Then you can fit it into the bigger machine and only consider how it fits in, not whether it's acting strangely. Now, of course, probably no code is absolutely perfect, and some of the more frustrating parts of programming is when something you assume is rock solid is fucking up in some non-obvious way, like a library you're depending on. But by unit testing we make coding manageable. Also, you're going to be working in groups. By unit testing you can present something to the wider team they feel confident they can use. Otherwise it's highly likely you'll be wasting people's time with you buggy code.
Eliza Drupperstut - Fri, 12 Aug 2016 16:07:14 EST ID:VAZu238H No.35987 Ignore Report Quick Reply
>the hard coded menu is getting big and hard to maintain
So populate it dynamically.
However, it sounds like something is fucked with you design. Why is there is big ass menu?

The trendy fucks here will tell you it's wrong, but have your commands/menu items inherit from a base class that registers itself with a list that gets build at runtime. Or have a command factory.
James Turveyman - Tue, 16 Aug 2016 10:08:05 EST ID:vIbiteGg No.36010 Ignore Report Quick Reply
I was using scala code. T => R is a function that takes an argument of type T and returns type R. In Java 8 there is the java.util.function package and in that the equivalent classes would be Function<T, R>. There are many classes but they are all specific cases of Function<T, R> or Function<T1, T2, R>.

So in Java it would look something like this
Map<String, Function<Config, Result>> option_map =  new Map<String, Function<Config, Result>>;
option_map.put("Run", (Config c) -> someObject.run(c));
// add more options

then in your main function you could have something like:
Config config  =  //current state;
while (!config.doQuit) {
String user_input = //get user input
Comment too long. Click here to view the full text.

I need some help by George Clibbleworth - Sat, 13 Aug 2016 14:45:03 EST ID:tXYxcME5 No.35992 Ignore Report Reply Quick Reply
File: 1471113903604.png -(453805B / 443.17KB, 2000x2000) Thumbnail displayed, click image for full size. 453805
Guys, I've literally tried everything and nothing works, maybe my level is basic but I really want to finish this project, the real problem is:

Exception in thread "AWT-EventQueue-0" org.hibernate.TransactionException: nested transactions not supported

So my save button can't send the data to mysql :s
Ebenezer Femmerfog - Sat, 13 Aug 2016 14:56:34 EST ID:PWhM8zCd No.35993 Ignore Report Quick Reply
Don't create a new session if an old session is open.
Shit Feddlehood - Sat, 13 Aug 2016 15:09:46 EST ID:VAZu238H No.35995 Ignore Report Quick Reply
The problem is... nested transactions
Shit Feddlehood - Sat, 13 Aug 2016 15:10:47 EST ID:VAZu238H No.35996 Ignore Report Quick Reply
I forgot 420 still mangles ampersands, just copy paste the link or expand thread then click it.

web chat advise needed by Fucking Dibblechere - Mon, 08 Aug 2016 15:46:15 EST ID:sNSHZCqU No.35978 Ignore Report Reply Quick Reply
File: 1470685575726.jpg -(114048B / 111.38KB, 603x604) Thumbnail displayed, click image for full size. 114048
Hey guys, I need you help pretty much!

I need to find a free (preferably) web chat, preferably the one that can be integrated to standard LAMP server, with certain features:

there have to be chat rooms;
there have to be moderators/admins;
moderators/admins should be able to change users' avatars;
users should not be able to change their avatars;
moderators/admins should have invisible mode (optional).

Was trying to google this features, but without success. Hope some experienced good sir will help me with this. Thanks!
Archie Crungermetch - Mon, 08 Aug 2016 19:18:38 EST ID:lPgjzyrL No.35979 Ignore Report Quick Reply

I googled "php mysql chat" and this was the fifth result. Not sure about avatars but it seems to meet all of your other criteria.

You could also use WordPress and a chat room plugin (there are dozens).
Archie Crungermetch - Mon, 08 Aug 2016 19:19:37 EST ID:lPgjzyrL No.35980 Ignore Report Quick Reply
Should probably link the project page, it's more helpful: http://frug.github.io/AJAX-Chat/
Eliza Dupperhick - Tue, 09 Aug 2016 05:56:18 EST ID:sNSHZCqU No.35982 Ignore Report Quick Reply
1470736578560.jpg -(111305B / 108.70KB, 500x686) Thumbnail displayed, click image for full size.
Many thanks, will check it out!

Why does lisp use parantheses? by Fucking Sosslehood - Sat, 30 Jul 2016 20:59:33 EST ID:vKYETtkX No.35930 Ignore Report Reply Quick Reply
File: 1469926773087.png -(52944B / 51.70KB, 1136x640) Thumbnail displayed, click image for full size. 52944
I thought the whole point of prefix (polish) notation was to avoid them.
1 posts omitted. Click Reply to view.
Fucking Sosslehood - Sun, 31 Jul 2016 03:59:54 EST ID:vKYETtkX No.35932 Ignore Report Quick Reply
1469951994087.jpg -(131082B / 128.01KB, 628x880) Thumbnail displayed, click image for full size.
I didn't say it was. I was only wondering why the parans. Pic related. Im gonna try and write a z80 compiler to see what gives.
Eugene Pockgold - Sun, 31 Jul 2016 05:58:00 EST ID:ViDyqkW7 No.35933 Ignore Report Quick Reply
LISP syntax directly represents the parse tree.
Sophie Dartbanks - Sun, 31 Jul 2016 10:50:27 EST ID:WLOo3E7i No.35934 Ignore Report Quick Reply
How is your syntax going to work?
Are you going to use white space, like Python, or are you going to go full polish notation
As Lisp uses s-expressions, where only the atoms are polish notation
Fuck Gobblebury - Mon, 01 Aug 2016 14:57:00 EST ID:VAZu238H No.35936 Ignore Report Quick Reply
LISP syntax directly represents incomprehensible gibberish
William Worthingway - Tue, 02 Aug 2016 11:41:08 EST ID:9QSfnS0r No.35943 Ignore Report Quick Reply
Take a look at factor

It's basically what you get if you write a forth to do everything that a lisp does.
It still uses parenthesis where it makes sense, like for literal arrays and such, but otherwise relies on RPN wherever possible.

As already mentioned forth really only uses rpn, but you end up with stack juggling for most applications.

Phone Interviews by Oliver Sacklepag - Thu, 30 Jun 2016 15:06:54 EST ID:W/zS63TD No.35795 Ignore Report Reply Quick Reply
File: 1467313614568.png -(238398B / 232.81KB, 259x318) Thumbnail displayed, click image for full size. 238398
Well I just failed miserably on a phone interview, but I'm curious as to why HR would ask the question
>what is your favorite programming language and why?
(thats not the question I failed lol)
5 posts and 1 images omitted. Click Reply to view.
Jarvis Smallforth - Sat, 02 Jul 2016 03:26:44 EST ID:W/zS63TD No.35812 Ignore Report Quick Reply
If I dont care about that kind of stuff -> why am I at a university?
Non sequitur. What does caring about discrete math have to do with being at a university?
Eliza Mumbledale - Sun, 03 Jul 2016 16:29:54 EST ID:4AC8OQBZ No.35816 Ignore Report Quick Reply
I'm occasionally a phone-screen interviewer for my company (where I am a professional programmer) and we ask the question, "Please rank your top three programming languages, and go into a little detail about why you placed them where you did". It is deliberate that we do not describe "top" as "most favorite" or "most proficient", but instead whichever one the candidate selects says something about their character.

Also it's always fun when people pick a #2 or #3 programming language that's really out there. One time some guy said that he enjoyed toying around with Conway's Game of Life. We asked him what he meant, and he said that he liked to play around and try and come up with obscure ways to perform basic programming constructs using the Turing-completeness of the GoL CA. Needless to say, that little bit of interesting unexpectedness added an edge to that candidate.

I would imagine that for most companies, they're looking for an answer to your question OP that aligns with the programming languages that they most use at work. So if you say that your favorite programming language is C# and the company doesn't do any C# work, then you may be out of luck in the rest of the interview.
Albert Lightforth - Fri, 29 Jul 2016 07:54:37 EST ID:ebCYLs2f No.35925 Ignore Report Quick Reply
Why choose PHP over Python?
Cyril Huppershit - Fri, 29 Jul 2016 14:36:50 EST ID:2rmkrydG No.35927 Ignore Report Quick Reply
>not using Node.js
Cornelius Brookfield - Fri, 29 Jul 2016 15:54:04 EST ID:VAZu238H No.35929 Ignore Report Quick Reply
>He fell for the javascript meme

I ask you because I like you by Oliver Wucklelug - Wed, 29 Jun 2016 15:39:21 EST ID:sIgWxmPi No.35786 Ignore Report Reply Quick Reply
File: 1467229161198.png -(9121B / 8.91KB, 746x542) Thumbnail displayed, click image for full size. 9121
tl;dr: how to find the point closest to the intersection in pic. The black dots are cartesian points from a list (or two). The circle can be a function, or also a list of points. I'm using python...

Amateur needing some programming for a thesis here.

I have a list of cartesian points (currently two lists, one for x, one for y, but I can do it differently ofc). These points describe a short path of a veichile, arond 10 meters, so it's a uncomplicated curve. I also have a list of points forming a circle derived from points from the aforementioned list(s) (derived means the circle center is not actually one of the points), and a constant radius.
I could also just use a function for the circle I guess.

I want to find the point closest to the intersection. Pic related
7 posts and 2 images omitted. Click Reply to view.
Ernest Greenwill - Wed, 06 Jul 2016 14:13:02 EST ID:PQ13pkX3 No.35820 Ignore Report Quick Reply
Unless you're trying to do this on a microcontroller without enough memory for a lookup table, this is trivial.
Shit Worthinghood - Thu, 07 Jul 2016 15:18:32 EST ID:sIgWxmPi No.35823 Ignore Report Quick Reply
1467919112741.png -(58141B / 56.78KB, 1157x389) Thumbnail displayed, click image for full size.
Yeah, the prototype will probably just use a laptop or similar.
Felt kinda stupid asking that question.


Would this work?:
import math
p2 = (center of the famous red circle)
for point in lista:
math.hypot(p2[0] - %r[0],p2[1] - %r[1])

"lista" is the list of all the 100 most recent cartesian points.
Nathaniel Derringway - Thu, 07 Jul 2016 20:01:08 EST ID:ggSMefJk No.35824 Ignore Report Quick Reply
I don't know wtf %r is supposed to be, but you have the right idea. If this is all you're looking to do, here's one way a civilized person might write this:

def get_min_distance(center, radius, point_list):
solution = (float("inf"), None)

for point in point_list:
distance = math.hypot(center[0] - point[0], center[1] - point[1]) - radius
if distance < solution[0]:
solution = (distance, point)

return solution
William Boblinghick - Mon, 18 Jul 2016 12:36:06 EST ID:sIgWxmPi No.35866 Ignore Report Quick Reply
1468859766408.jpg -(2130467B / 2.03MB, 2204x3920) Thumbnail displayed, click image for full size.
This just picks the point closest to the center and gives me the distance from the center + the radius
I want the closest point to the circle edge.

I've mucked about with it but am at a loss, so, if anyone, please.

Among other things I've tried this:
def get_min_distance(center, radius, point_list):
solution = (float("inf"), None)

for point in point_list:
distance = math.hypot(center[0] - point[0], center[1] - point[1])
if distance < solution[0] - radius:
solution = (distance, point)
Comment too long. Click here to view the full text.
Fanny Greencocke - Mon, 18 Jul 2016 14:34:12 EST ID:WLOo3E7i No.35868 Ignore Report Quick Reply
It looks like >>35824 is pretty close, it just needs the absolute value of the distance
distance = abs(math.hypot(center[0] - point[0], center[1] - point[1]) - radius)

For the line distance < solution[0], solution is a list where the 0th element is the distance from the radius and and 1st element is the point itself

So all it is doing is comparing the distance of the current point with the point that is closest to the radius

Unity to learn C#? by Albert Brenkintane - Wed, 08 Jun 2016 18:41:54 EST ID:OfxKUBs6 No.35720 Ignore Report Reply Quick Reply
File: 1465425714788.jpg -(71948B / 70.26KB, 1600x1200) Thumbnail displayed, click image for full size. 71948
Is Unity any good for serious C# programming and learning?

I don't want to spend 20% of the time coding while the remaining 80% is fucking around with Unity's GUI. Coding a game sounds cool to me, but not if all the hard work's already been cut out. Then again, I don't feel like creating my own engine from scratch either. I hope there's a nice middle ground there.

I'd like to code in a fun environment and not one that could easily bore me, that's basically it.

Ernest Dreffingsick - Thu, 09 Jun 2016 00:38:15 EST ID:4AC8OQBZ No.35721 Ignore Report Quick Reply
So use Visual Studio instead of the Unity C# editor. Problem solved. Also it's how all the Unity pros work.
Esther Chebblepog - Thu, 09 Jun 2016 21:50:50 EST ID:vIbiteGg No.35723 Ignore Report Quick Reply
monodevelop is the cleanest IDE I have ever seen.
Molly Cibblemotch - Thu, 09 Jun 2016 23:58:17 EST ID:vHCDual8 No.35725 Ignore Report Quick Reply
If you mean you feel like you'll spend all your time in the unity editor instead of working in code, that's entirely dependent on what you do. Normally the problem is the opposite, is that kids think they can make a game entirely in the editor which leads to garbage and frustration.

But yeah. You'll have plenty of chance to work on code. I mean, it will be a lot of calls to unity libraries, but it'll be code. My wife went from some light scripting experience, to writing some decent code learning unity. It worked for her.
Lillian Ginderson - Tue, 28 Jun 2016 21:30:00 EST ID:29+Ja+IX No.35780 Ignore Report Quick Reply
In case you come back;
yeah its fine to do it in the editor.
But maybe get yourself a professional IDE environment like Visual Studio.
This way you aren't just learning how to code but also learning the actual Layout of the IDE environments.
If you need to know how to code, Unity IDE is fine.
If you want to be professional about it, learn to code in the business standard IDE
Beatrice Worthingwill - Sun, 10 Jul 2016 11:42:44 EST ID:qg7gFP0K No.35835 Ignore Report Quick Reply
1468165364720.jpg -(573223B / 559.79KB, 1000x1719) Thumbnail displayed, click image for full size.
I was away for a while so sorry for that, but thanks a lot for your replies. It's all noted. I would use VS for sure.

I really love programming and using algorithms way more than focusing on graphics and such, that's for sure. Hence why Unity put (and kinda still puts) me off a bit. I have to say I prefer C++ to C# too, to be honest. But I'm willing to learn.

Sometimes I wish graphics weren't that advanced these days. That doesn't facilitate things for me; making it enjoyable to play all the while making it look good. Any idea what kind of game I should aim for to avoid spending too much time on graphics? E.g. Platformers (although some still can get damn fancy).

Thanks and if you have more advice on that, that'd be awesome!

Started learning C++ last night by Martin Dockleson - Sun, 12 Jun 2016 11:22:20 EST ID:0C4Q05Ui No.35733 Ignore Report Reply Quick Reply
File: 1465744940440.png -(36106B / 35.26KB, 512x512) Thumbnail displayed, click image for full size. 36106
Today is my birthday. By my birthday 10 years from now, I want to have made and released an RPG in the vein of Ultima. Any tips for a beginning programmer? I've been using learncpp.com, as someone recommended it to me.
1 posts omitted. Click Reply to view.
Hamilton Trotwater - Sun, 12 Jun 2016 17:10:50 EST ID:168stH9b No.35736 Ignore Report Quick Reply
>Any tips for a beginning programmer?

Don't have a ten year goal. Try ten days.
Cyril Cluvingpock - Sun, 12 Jun 2016 19:34:47 EST ID:9QSfnS0r No.35737 Ignore Report Quick Reply
I agree with this.

Also try this, I highly recommend their app.

Keep in mind that you almost never use C++ alone unless you are testing algorithms, so if you want to write a game you should find out which libraries to use, SMFL might be a good start for game development or unity.
Also if you write C++ for native windows applications you are insane (Seriously use C#) the same goes for writing everything in C++.
Not because you can't do it, but because in C++ you have no sense of which kind of programming paradigm you should use with it if you haven't have already somewhat proficiency in another language.
John Sandleforth - Wed, 15 Jun 2016 20:15:44 EST ID:0QLA4uop No.35743 Ignore Report Quick Reply
plus, with C#, you have access to XNA and Unity 3D (among at lot of other stuff), something to look into for your RPG, OP

If you really, really need to ever program your own game engine, 2D game engines are pretty simple to make, plus you can quickly make dummy gfx in paint.
3D engines are much more difficult, in that case you'd need to learn to use DirectX or OpenGL to enable your GPU to draw 3D models with textures, etc. Then you'd have to learn shader language in order to make it look passable.

OP, start small, start simple. Start off with something like c# or java.
Start with small commandline programs that show off simple math, then make them usable with more input (eg. from a file or database). Then take on simple GUI stuff.
after that, you might be able to make small games... mostly 2D shmups and such....

so basically:
  1. learn a simple programming language and get comfortable with its syntax
  2. create your own Action 52

then you can expand to other languages, try to make more complicated games and EVENTUALLY IF AT ALL create the game of your dreams
Started learning C++ last night - Thu, 16 Jun 2016 05:39:31 EST ID:2k/umtfQ No.35746 Ignore Report Quick Reply
http://www.javaprepare.com/ Java Tutorial
http://fresh2refresh.com/ C Tutorial
http://www.cplusplus.com/ C++ Tutorial
Andrea Huffingcrack - Sun, 10 Jul 2016 10:54:07 EST ID:tX+MofFf No.35834 Ignore Report Quick Reply
1468162447738.png -(58702B / 57.33KB, 650x200) Thumbnail displayed, click image for full size.
I second what everyone is saying here. You should definitely LEARN c++ but it shouldn't be your go-to language for making a game. Java or C# will serve you well, as they are basically both the exact same language.
(I said BASICALLY you fucking nerds, don't freak out)

A good case can be made for each language:
> C# is the language used in unity.
right off the bat you have access to a comprehensive fairly easy to use engine with universal platform support.
>Java has an api for everything you can imagine
You'll have to put together your own engine, but you can build it out of parts from a ton of other libraries. It's harder but will give you more direct control than with unity.

As for when you are just starting, the best way to learn for me was to dive in head first. Don't just sit back and watch tutorials until you ''feel ready''. Come up with projects that are small but challenging.

You might want to invest in a beginner's book for OOP. A lot of tutorials are in a rush to get to the ''cool stuff'' and they often completely ignore essential basics. (i.e. parameters, Static methods etc.)

Coding is actually quite simple if you ''get it'' (design is what's hard). It shouldn't take your more then 3 years to get to a point where you're beyond capable of programming something like ultima, and only another year or two to actually make it.
Comment too long. Click here to view the full text.

Make jQuery run on certain page by Jarvis Crizzlelick - Fri, 01 Jul 2016 19:06:29 EST ID:W/zS63TD No.35803 Ignore Report Reply Quick Reply
File: 1467414389846.jpg -(11944B / 11.66KB, 225x181) Thumbnail displayed, click image for full size. 11944
Using the console I can run the line
to remove an advertisement, but now how do I make this run onload everytime I visit these pages starting with "example.com/chart/..." ?
Nell Goodwater - Fri, 01 Jul 2016 19:08:37 EST ID:Q1Kx57v7 No.35805 Ignore Report Quick Reply
Jarvis Smallforth - Fri, 01 Jul 2016 20:31:56 EST ID:W/zS63TD No.35808 Ignore Report Quick Reply
how do
Quick Example Src I Think This logict will do the job or a eventListener for the 'load' event. - Fri, 01 Jul 2016 22:09:16 EST ID:+6d1kOO+ No.35810 Ignore Report Quick Reply
<body onload="hosting();"></body>
function hosting(){
var host=(window.location.host);
alert('run dat script!!')
alert('not gonna do it!!');
Jarvis Smallforth - Sat, 02 Jul 2016 03:36:33 EST ID:W/zS63TD No.35813 Ignore Report Quick Reply
Finally a JS question for you :).

But what about using greasemonkey to detect it when it keeps coming back on this dynamic page and removing it every time?
Jarvis Druvingwen - Sat, 02 Jul 2016 10:17:00 EST ID:WLOo3E7i No.35814 Ignore Report Quick Reply
just install adblock plus and add example.com##.chart-promo to your filters

What to code in C? by Caroline Wumbleket - Sat, 18 Jun 2016 18:15:55 EST ID:NSh3STBF No.35753 Ignore Report Reply Quick Reply
File: 1466288155362.jpg -(84531B / 82.55KB, 800x1070) Thumbnail displayed, click image for full size. 84531
Hey guys,

I want to learn C but have no idea what project would be fun enough to keep my attraction gripped.

I never did C before, only some C++. I've done some inheritance, lists, binary trees, properly handling pointers and such. Never did anything fancy with that, but I still well remember those concepts.

It's a pretty basic request, I know. My imagination is quite simply very dry, motivation low. Oh and also,

Another Google Question I'd Rather Read Your Opinion About :
~ How *truly* different would you say C is from C++?

Thanks in advance, friends.
Jarvis Figglehood - Sat, 18 Jun 2016 19:49:51 EST ID:BwNvELbz No.35754 Ignore Report Quick Reply
>How *truly* different would you say C is from C++?

Maybe start by reading a C book.
Simon Brengertere - Sun, 19 Jun 2016 08:36:36 EST ID:9QSfnS0r No.35755 Ignore Report Quick Reply
These days the most fun you can have writing C is using a microcontroller board with an AVR or PIC.

You can blink LEDs, create sound, read potentiometers. If you don't know what to do a (midi) synthesizer is always something that's fairly easy to learn but hard to master.

C vs C++ is that you don't use any OOP, just procedural code.
You are using structs instead of classes and pass pointers to those structs to your procedures.
You also have to allocate memory manually which makes it easy to have bugs you aren't used to.
You are also missing pretty much any convenience functionality like foreach, etc...

If you want to write software for the PC it makes sense to use C with other languages like python and build libraries for your algorithms.
Charles Pockworth - Sat, 25 Jun 2016 21:01:36 EST ID:mfkLzG/S No.35766 Ignore Report Quick Reply
Zed Shaw's Learn C the Hard Way

Also this book: http://csapp.cs.cmu.edu/ which teaches you ground up, binary/floating point/assembly and everything else you'll need to know all done in C and assembly. Expensive book i used libgen.io to pirate the most recent version (it's x64, old versions are 32bit).

There's also the book The Unix Programming Environment which has a lot of C programs in it to try out.

As for what to do in C, if you're not maintaining some existing C project like an embedded OS, Linux/BSD kernel or similar then don't write anything in C it's too dangerous. Use Go instead of that kind of systems/network stuff as it's memory safe. If you don't care at all about memory safety then write whatever you want, like embedded systems but make sure they're offline systems.
Lillian Choblingdock - Wed, 29 Jun 2016 01:59:10 EST ID:vIbiteGg No.35782 Ignore Report Quick Reply
I'm coming back to C and C++ from a few years off in Scala, java, C#, and python land and holy fuck do I hate C++ now. C at least keeps it simple and doesn't fuck with you. But C++ has so many unique keywords and implicit definitions that keep getting bolted on that the language itself is a maze instead of the standard libraries.

Anyways I can power through that but the build tools are really what's holding me back. Are there any good references for building libraries and how linking works for C?
Nicholas Pinkinfoot - Fri, 01 Jul 2016 02:36:56 EST ID:sGFR0zid No.35801 Ignore Report Quick Reply

I read Zed Shaw's book as my 2nd C book and thought it was the most tedious, least helpful CS book I'd ever read. He's a sloppy writer, with sloppy editing, and awful at explaining things. KN King's C book is the way to go for *learning* C IMO. Zed Shaw's book is only useful to someone who already knows C decently as a refresher, at least as far as I could tell.

<<Last Pages Next>>
0 1 2 3 4 5 6 7 8 9 10 11
Report Post
Please be descriptive with report notes,
this helps staff resolve issues quicker.