Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Bloody posted:

wait whats wrong with singletons i like them in very specific situations when i don't want random god objects floating in some main class or whatever

"I need to manage a shared resource" is a good reason to have a singleton

"I don't want to go to the effort to manage state in a sustainable fashion" isn't

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

Cocoa Crispies posted:

"I need to manage a shared resource" is a good reason to have a singleton

"I don't want to go to the effort to manage state in a sustainable fashion" isn't

this sounds like i have been using them correctly

this alarms me

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Bloody posted:

use a lang with xml literals like scala thank me later

you know which other language has xml literals...

Bloody
Mar 3, 2013

~Coxy posted:

you know which other language has xml literals...

i dont, actually

well i guess

is it xml?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
would someone reccomend me a resource for learning c++ that is organized in a sane format? like basically imagine a guide written for a p-lang, but in this case it is for c++.

maybe something that keeps me kind of motivated to keep learning instead of just hitting me with everything i could ever need to know about defining functions, none of which i can use because i still don't even know how to make an array?

i'm being hyperbolic here but bjornfjords book is not very good for learning. his technical explanations are good but i'd like to see some common c++ design patterns and maybe some examples of why the language is useful. maybe show me some neat stuff i can do with templates instead of just giving me the definition and moving on. i also don't need idiot's first programming language guide to c++. i just need something with pictures

tia

Posting Principle
Dec 10, 2011

by Ralp
there aren't many sane resources for c++ because it is not a sane language. someone who is better at it can step in with suggestions, but i don't think there's an easy way to learn it tbh

Accelerated C++ is good, the C++ Primer is also good and more modern (but very very dense). effective c++ and effective stl will give a nice overview of best practices and common patterns, but they assume a level of knowledge that you might not be at yet

i would say work through accelerated c++ (do the exercises) and then effective c++ and the wikipedia article on c++11. make it interesting for yourself along the way by doing small projects that interest you. maybe look into qt or some framework that interests you

once you're ready for some mind-blowing pick up Modern C++ Design and Exceptional C++

comedy answer:
get all of shrughes and that turkey story's posts from the c++ thread in coc and you've probably got a couple of good books

JawnV6
Jul 4, 2004

So hot ...

Jerry SanDisky posted:

comedy answer:
get all of shrughes and that turkey story's posts from the c++ thread in coc and you've probably got a couple of good books

its like those riddles where one of the guards always lies

uG
Apr 23, 2003

by Ralp
just learn C first so all the 'candy' of C++ isnt confusing the poo poo out of you and then just never bother learning C++ because you are a C programmer and too smug for that

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news

uG posted:

just learn C first so all the 'candy' of C++ isnt confusing the poo poo out of you and then just never bother learning C++ because you are a C programmer and too smug for that

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
c has the worst style of comments and doesnt let me use dots, no thanks

uG
Apr 23, 2003

by Ralp
if you base your language choice on those types of things then C++ or php is definitely for you

Posting Principle
Dec 10, 2011

by Ralp

JawnV6 posted:

its like those riddles where one of the guards always lies

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

chumpchous posted:

c has the worst style of comments and doesnt let me use dots, no thanks

-/ isn't a bad style of comment

smdh if your editor doesn't know comment syntax though

Nomnom Cookie
Aug 30, 2009



Cocoa Crispies posted:

-/ isn't a bad style of comment

wat

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

lol i just tried this in a c file and sublime used // which isn't actually valid c

GameCube
Nov 21, 2006

sublime

Nomnom Cookie
Aug 30, 2009



Cocoa Crispies posted:

lol i just tried this in a c file and sublime used // which isn't actually valid c

c99

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug
click here for hott coq

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

learned ansi c, only ever professionally worked in the kind of c a 2005-era compiler on a dead unix can use

uG
Apr 23, 2003

by Ralp
visual C will never be updated past c89 so we can deduce that c99 is not real C

Silver Alicorn
Mar 30, 2008

𝓪 𝓻𝓮𝓭 𝓹𝓪𝓷𝓭𝓪 𝓲𝓼 𝓪 𝓬𝓾𝓻𝓲𝓸𝓾𝓼 𝓼𝓸𝓻𝓽 𝓸𝓯 𝓬𝓻𝓮𝓪𝓽𝓾𝓻𝓮

Cocoa Crispies posted:

learned ansi c, only ever professionally worked in the kind of c a 2005-era compiler on a dead unix can use

lol might as well use COBOL

MeruFM
Jul 27, 2010
modify user sublime packages so that it uses your flavor of commenting

finally fulfilling its role as the vim successor

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Bloody posted:

i dont, actually

well i guess

is it xml?

hitler

no wait, visual basic

coaxmetal
Oct 21, 2010

I flamed me own dad

Cocoa Crispies posted:

lol i just tried this in a c file and sublime used // which isn't actually valid c

what? // is a perfectly valid single line comment in C99

Police Academy III
Nov 4, 2011

uG posted:

visual C will never be updated past c89 so we can deduce that c99 is not real C

c99 loving owns, msvc can take a flying gently caress at a rolling doughnut

edit: check this poo poo:
code:
 struct point p = { .y = yvalue, .x = xvalue };

coaxmetal
Oct 21, 2010

I flamed me own dad
this is a good thign for doing comment things with key commands https://github.com/scrooloose/nerdcommenter

Doc Block
Apr 15, 2003
Fun Shoe

uG posted:

visual C will never be updated past c89 so we can deduce that c99 is not real C

msvc is poo poo. ms going out of their way to purposefully not implement c99 is bullshit. making their own c99-esque safe string functions that take the exact same arguments and produce the same results but have different names is bullshit.

clang/LLVM supremacy.

double sulk
Jul 2, 2010

Use Objc

Posting Principle
Dec 10, 2011

by Ralp
im going to learn ruby

Socracheese
Oct 20, 2008

Jerry SanDisky posted:

im going to learn ruby

no dont

Squinty Applebottom
Jan 1, 2013

ruby is a beautiful language and rails is the best framework

99% of the people who care about a language's speed make lovely CRUD apps that don't need to be fast

uG
Apr 23, 2003

by Ralp
why learn ruby when perl6 is going to obsolete it

Squinty Applebottom
Jan 1, 2013

why learn perl when its the prototypical p lang

uG
Apr 23, 2003

by Ralp
perl6 isnt perl 1-5, but a prototypical p langer probably wouldnt know that because its not a buzzword yet

MrMoo
Sep 14, 2000

Inflict pain upon others: I've started a new project with million dollar data fees and playing with Python, Java, and Go, linking them all up with 0mq and Google's protocol buffers. Public interface is a web service exported via Mongrel2.

I've only ever used Python as part of Scons, I've only written one Java application for JDK 1.3 hacking some news protocol 10 years ago, and first time to look at Go.

I'm using Java for Glassfish's WSDL import as Go has nothing, I'm using Python as Mongrel2 ships with a Python module and I'm too lazy to rewrite it in Go.

Less than a week for a functional prototype. I'm wondering if there is some retarded way to get Haskell or other arcane language in there.

Doc Block
Apr 15, 2003
Fun Shoe
Why learn Ruby when you can learn Objective-C, which is rapidly being turned into compiled Ruby by all the Ruby devs flocking to it.

Squinty Applebottom
Jan 1, 2013

theres no good tutorials or books for objective c

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
objective c is a really stupid language seriously use ruby motion and if you need something to be fast write it in c

Doc Block
Apr 15, 2003
Fun Shoe

chumpchous posted:

objective c is a really stupid language seriously use ruby motion and if you need something to be fast write it in c

said a terrible programmer.

polpotpi posted:

theres no good tutorials or books for objective c

"how do i maek iphone apps, post tutorials plz."

Adbot
ADBOT LOVES YOU

Squinty Applebottom
Jan 1, 2013

objective c is a wordy blah language but whatever its fine, its just cocoa and whatnot thats a hassle to all take in

  • Locked thread