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.
 
  • Post
  • Reply
xzzy
Mar 5, 2009

Obsurveyor posted:

UnityScript is a bastardization of Javascript and should be abolished and any traces of it scrubbed out of existence.

Same applies to boo vs python.

Just use C# if you're working in Unity. It saves on millions of headaches.

Adbot
ADBOT LOVES YOU

Rottbott
Jul 27, 2006
DMC

Thermopyle posted:

This is probably more to do with mindset/programming style than any actual deficiency with dynamic typing.
I like some languages more than others, I'm no doubt in a minority in genuinely preferring C++ over C# for example. I still enjoy working in C# when it makes sense. But I loathe dynamic typing - as was mentioned, there are whole categories of errors which ought to be caught by a compiler before you even start. It makes the tools worse - no Go To Definition, for example. It feels like you can type almost any old crap and it'll still "run".

So what are the ways in which JS is more productive than C++, for example? The "advantages" I often seem to hear about are 'less typing' (as if typing speed is the limiting factor on productivity), or 'those stupid rules got in my way' which is similarly short-sighted. I've used JS a lot lately and I haven't found anything to be easier, especially on the scale of writing a game. (I'm not trying to put up strawmen here, honest, I really haven't heard any better reasons.)

Obsurveyor posted:

Dynamic typing completely changes the way you think about programming. When you can stop thinking about what things are and start thinking about what they do and just use them as such, it's very liberating. Using a test or behavior driven development methodology will do a lot to prevent runtime bugs in a dynamic language.
That just sounds like generic programming, which I'm quite happy doing in statically typed languages. How would you say it's different? I agree that unit testing is basically required with dynamic languages, but it's still not as good as having it caught by the compiler (or better still, by the IDE right after you type it).

Obsurveyor posted:

As a programmer, you shouldn't be a snob about what language you're using. Programming languages are tools to get jobs done, not political or philosophical platforms. There's never going to be a perfect programming language. Embrace new languages when you have to, it will make you a better and more versatile programmer.
I know, I do. I've tried JS and Python and I don't like either. Both have some individual neat features but I still wouldn't use them for a real project.

Obsurveyor
Jan 10, 2003

Rottbott posted:

So what are the ways in which JS is more productive than C++, for example?

You can write HTML5 applications that will "just work" in most browsers(this is the subject that started this discussion), you can't really do that with C++. Javascript is the only language that has nearly universal browser support, therefore, Javascript is the best tool for in-browser HTML5 apps/games.

quote:

That just sounds like generic programming, which I'm quite happy doing in statically typed languages. How would you say it's different? I agree that unit testing is basically required with dynamic languages, but it's still not as good as having it caught by the compiler (or better still, by the IDE right after you type it).

Look into 'duck typing' for a very brief example. You can read this for a pretty fair account of each from the point of view of the opposite.

The number of issues that crop up that the compiler can save you from gets smaller as the size of the project grows and the experience/knowledge of a programmer expands compared to actual bugs that occur in software, regardless of the language or static/dynamic typing.

quote:

I know, I do. I've tried JS and Python and I don't like either. Both have some individual neat features but I still wouldn't use them for a real project.

Great, at least you didn't dismiss them out of hand. If you learned enough about them, at least you are now armed with more tools for the future, in case there are projects that require them. However, making statements such as "I wouldn't use this for a real project" when plenty of people that aren't you do use these languages for "real projects" is pretty dismissive and makes you sound ignorant.

biznatchio
Mar 31, 2001


Buglord

Obsurveyor posted:

You can write HTML5 applications that will "just work" in most browsers(this is the subject that started this discussion), you can't really do that with C++. Javascript is the only language that has nearly universal browser support, therefore, Javascript is the best tool for in-browser HTML5 apps/games.

It's awfully telling that when asking for advantages that JS gives you in development over C++, the first thing you went to was "well it's the only option you have so deal with it" rather than actually listing real language advantages. Advantages and disadvantages of dynamic versus static typed languages is one thing, but the only reason Javascript gets the attention it gets is not because of Javascript's own inherent design being superior in any way as it is that Javascript just happened to get hitched to the most successful platform of all time. It won in spite of itself.

I'm of the opinion that every additional line of code you write and every additional developer on a project is adding to the argument against a dynamically typed language and for a statically typed one; because each line and each developer increases the pressure that the codebase's lack of any formal data modelling is going to cause the project to collapse under its own weight.

This can be worked around to some extent, but the workarounds typically employed to make dynamically typed projects more suitable at scale start to increasingly become pidgin reimplementations of what a static compiler provides for you in the first place. The type annotation comments that large team Javascript projects often end up enforcing are nothing more than non-enforced, non-validated static types. The additional unit tests required to verify assumptions made on the shapes of data being passed around end up both costing you just as much developer time to write as it would have cost you to formally define the type of the data in the first place; and continues to accrue greater required investment as the codebase continues to grow.

To put it briefly: a statically typed language's compiler is merely a very thorough automated unit test suite that, as your dynamically typed language's project size increases, your likelihood of reimplementing functionality from -- poorly -- increases. (Though, let's also be honest here -- fully unit testing your Javascript is like brushing and flossing three times a day: most people simply don't do it no matter how badly they should; and that is a significant contributing factor to the 'speed of development' Javascript enjoys having a reputation for.)

There's also the consideration that while dynamically typed languages may be faster to write in, they're certainly much slower to read and comprehend:

"Fred Brooks, [i posted:

The Mythical Man-Month[/i]"]Show me your flowchart and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious.

Of course, we're talking about game development here; so it's important to keep in mind the scope of the project at hand, and unless you're creating the next AAA title, chances are you're not going to be writing enough lines of code for the benefits of static typing at scale to make themselves completely evident over the rapid iteration and ease of dynamic typing.

biznatchio fucked around with this message at 00:16 on Sep 29, 2013

Obsurveyor
Jan 10, 2003

biznatchio posted:

It's awfully telling that when asking for advantages that JS gives you in development over C++, the first thing you went to was "well it's the only option you have so deal with it" rather than actually listing real language advantages. Advantages and disadvantages of dynamic versus static typed languages is one thing, but the only reason Javascript gets the attention it gets is not because of Javascript's own inherent design being superior in any way as it is that Javascript just happened to get hitched to the most successful platform of all time. It won in spite of itself.

I completely agree that it is an awful, awful tragedy that Javascript won by default in the browser arena. I was simply trying to bring the conversation back on course, off the road of "my language is better than your language" wars that these discussions devolve into. It is most certainly not a language I would prefer to use by any stretch of the imagination.

Obsurveyor fucked around with this message at 00:34 on Sep 29, 2013

Paniolo
Oct 9, 2007

Heads will roll.

Obsurveyor posted:

The number of issues that crop up that the compiler can save you from gets smaller as the size of the project grows and the experience/knowledge of a programmer expands compared to actual bugs that occur in software, regardless of the language or static/dynamic typing.

Why do you think that? If anything the odds of you making typos, mixing up the order of parameters in a function call, or missing a call site when you change an interface increase with the complexity of a project. Those are the kind of errors that compiled statically-typed languages catch.

Cheston
Jul 17, 2012

(he's got a good thing going)
I'm starting a new project and want to actually have version control. I've used TortoiseSVN a bunch before, but always with an established repository. What do people usually do for this on personal projects?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Cheston posted:

What do people usually do for this on personal projects?

My gut feeling that the most widely used version control on personal projects is git.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

Thermopyle posted:

My gut feeling that the most widely used version control on personal projects is git.

Git is in fact the poo poo for personal projects. Download it and setup a private repo on github or bitbucket, and you are golden.

http://git-scm.com/downloads
http://git-scm.com/book
http://www.codeschool.com/courses/try-git

https://github.com/
https://bitbucket.org

Unormal fucked around with this message at 00:59 on Sep 29, 2013

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Unormal posted:

Git is in fact the poo poo for personal projects. Download it and setup a private repo on github or bitbucket, and you are golden.

http://git-scm.com/downloads
http://git-scm.com/book
http://www.codeschool.com/courses/try-git

https://github.com/
https://bitbucket.org
Don't private repositories cost money though? If you just need it for yourself you might as well just set up Git locally.

Obsurveyor
Jan 10, 2003

SupSuper posted:

Don't private repositories cost money though? If you just need it for yourself you might as well just set up Git locally.

You don't even need a github/bitbucket account if you're using some kind of Dropbox/Google/Skydrive. Just keep your repos in there and stay sync'd.

xgalaxy
Jan 27, 2004
i write code
Bitbucket gives you unlimited free private repos and limits you by team member count.
It's better deal than GitHub IMO. But GitHub has a slightly better web interface.

xgalaxy fucked around with this message at 01:53 on Sep 29, 2013

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

xgalaxy posted:

Bitbucket gives you unlimited free private repos and limits you by team member count.
It's better deal than GitHub IMO. But GitHub has a slightly better web interface.
You can also get, what, two extra team member slots through a referral thing with Bitbucket? Odds are good it'll support any small team. The limit only matters to larger studios.

(I use Bitbucket, never quite saw the appeal of Github unless you're going open-source)

Grocer Goodwill
Jul 17, 2003

Not just one kind of bread, but a whole variety.

Cheston posted:

I'm starting a new project and want to actually have version control. I've used TortoiseSVN a bunch before, but always with an established repository. What do people usually do for this on personal projects?

Perforce is free for small teams. Unlike git, Perforce can version large binary files well, so it works with art assets as well as code. It requires more work to set up a server, though.

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
I've just been using Dropbox because I'm lazy.

xzzy
Mar 5, 2009

I'm all about svn and rsync. :v:

svn for the version control, rsync to copy stuff between home and work to deal with my offsite backup.

Lucid Dream
Feb 4, 2003

That boy ain't right.
We use bitbucket and I have visual studio set up to compile into dropbox, so anyone who wants to twiddle the code has to do it the "right" way but Hayes (artist) doesn't have to get visual studio set up and all that crap just to play the latest build.

Rottbott
Jul 27, 2006
DMC
Others have already covered most of this, but I'm giving my 2 pence anyway because I don't see the harm in a page or two of debate about this.

Obsurveyor posted:

You can write HTML5 applications that will "just work" in most browsers(this is the subject that started this discussion), you can't really do that with C++. Javascript is the only language that has nearly universal browser support, therefore, Javascript is the best tool for in-browser HTML5 apps/games.
As was mentioned, this isn't an argument in favour of dynamic typing at all. I use JS myself, because I have to. I am aware that I can't write web 'apps' in C++.

Obsurveyor posted:

Look into 'duck typing' for a very brief example. You can read this for a pretty fair account of each from the point of view of the opposite.

The number of issues that crop up that the compiler can save you from gets smaller as the size of the project grows and the experience/knowledge of a programmer expands compared to actual bugs that occur in software, regardless of the language or static/dynamic typing.
I know what duck typing is. You're exactly wrong about the advantages of static typing diminishing with size. Those kind of problems are precisely the ones it helps with the most.

Obsurveyor posted:

Great, at least you didn't dismiss them out of hand. If you learned enough about them, at least you are now armed with more tools for the future, in case there are projects that require them. However, making statements such as "I wouldn't use this for a real project" when plenty of people that aren't you do use these languages for "real projects" is pretty dismissive and makes you sound ignorant.
Yeah, I'm already using them for projects that require them. I'm aware that people do use them for real projects, and I'm suggesting that were they able to use a statically typed language instead, they would do it faster and better, all else being equal.

I'll try a less abstract question for you or whoever wants to pitch in. In a lot of games, physics stuff is all just 'numbers', so for example you see stuff like float PlayerSpeed = 5.0f;. One tactic which I and other C++ people are using instead is to have different types for different physical units, e.g. length, mass, velocity and so on. These types mean the compiler vetos any incorrect conversions at compile time, so you can't accidentally mismatch your units and get wrong results that way. It's a small thing, but a welcome improvement over ye olde C way with plain floats because it eradicates one particular category of bugs, and makes it easier to read the code. I'm sure this isn't news to you but bear with me.

So how would you approach this example in JS or whatever? Would you tag every unit with its type and assert at runtime if it's wrong? Would you just not bother, relying instead on unit testing (aha) everything? Is there a better way I haven't thought of?

Tagging everything doubled your data size if you care about that, and worsened runtime performance if you care about that. Even then you still need full test coverage to actually exercise all those asserts. Not bothering and relying on your tests seems to me to risk writing the tests with the same faulty assumptions which led to the incorrect code in the first place, so personally I'd not be very confident that the code was error free.

Rottbott
Jul 27, 2006
DMC

Yodzilla posted:

I've just been using Dropbox because I'm lazy.
At least put an SVN filesystem repo (or Git or whatever) or whatever on Dropbox instead of just the files!

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Rottbott posted:

I'll try a less abstract question for you or whoever wants to pitch in. In a lot of games, physics stuff is all just 'numbers', so for example you see stuff like float PlayerSpeed = 5.0f;. One tactic which I and other C++ people are using instead is to have different types for different physical units, e.g. length, mass, velocity and so on. These types mean the compiler vetos any incorrect conversions at compile time, so you can't accidentally mismatch your units and get wrong results that way. It's a small thing, but a welcome improvement over ye olde C way with plain floats because it eradicates one particular category of bugs, and makes it easier to read the code. I'm sure this isn't news to you but bear with me.

So how would you approach this example in JS or whatever? Would you tag every unit with its type and assert at runtime if it's wrong? Would you just not bother, relying instead on unit testing (aha) everything? Is there a better way I haven't thought of?

I guess I never thought it was a problem. Are you really doing complex enough physics where some game designer works out that 300 newtons per second squared is the exact value you want? Most everything I do, we just tweak the numbers based on playtest feedback, so it really doesn't matter if we get the exact units mixed up. In fact, we've fudged some physics equations very badly so they feel "more fun" and are easier to wire over the network.

Let's say that you found that somebody had a bug in a released game where the units were correct, but the equation was still wrong. Would you mandate that you respect the world's physics, or would the risk of changing this just be too high, and you'd just mark it with a comment to say that?

Rottbott
Jul 27, 2006
DMC

Suspicious Dish posted:

I guess I never thought it was a problem. Are you really doing complex enough physics where some game designer works out that 300 newtons per second squared is the exact value you want? Most everything I do, we just tweak the numbers based on playtest feedback, so it really doesn't matter if we get the exact units mixed up. In fact, we've fudged some physics equations very badly so they feel "more fun" and are easier to wire over the network.

Let's say that you found that somebody had a bug in a released game where the units were correct, but the equation was still wrong. Would you mandate that you respect the world's physics, or would the risk of changing this just be too high, and you'd just mark it with a comment to say that?
Short answer - yes. At work (we mostly do racing sims) we make it correct first and foremost, and then put tweaks on top of the underlying model if and when necessary. Our networking is based on the physics being fully deterministic so that's not an issue.

We actually did a kart racing game for kids with the full physics simulation, fancy tyre model and everything, but you wouldn't know it because it was hidden under a layer of 'hand of god' cheating with physics impulses. It handled amazingly well!

I'm not sure what you mean about the 'equation' being correct while the units were wrong, but obviously with a released game you don't normally fix bugs which aren't actually causing problems, in case you create a new bug which does. The units types don't in any case guarantee that all your physics are correct, it just stops you combining them nonsensically. It also helps prevent "oops, I thought that was in radians/s and it was actually in degrees/frame" or something (like the Mars Climate Orbiter accident I suppose).

Anyway, it's one example of something I'm not sure how you'd approach in JS or whatever. I could think of plenty of others where you take advantage of the type system in similar ways. Actually const is a really simple one. I miss that even in C#.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Yeah. I worked on a super old game called Cycle Racers at iminlikewithyou, where you raced circles around a path. They were circles since that's stupid easy to do collision for. We originally had a really accurate torque model where pressing right/left would adjust the angular velocity, but players hated it since they wanted to move left/right in the air. So we changed it so that it simply emulated a low-friction environment in various devious ways (like adjusting how much acceleration you got based on how far you were in the race) and the rotation was all completely cheated to be based on linear velocity with a few tweaks. With your system, I can't just take linear velocity and apply it to angular velocity, so I don't know what I'd do.

You can certainly look into static analysis tools like jshint -- I'd recommend it for most projects. You can also look into TypeScript or ES6, which both have some interesting type system features.

const is coming back to ES6, and most browsers (even IE10!) support it now. You can also try Object.freeze/Object.seal or using Object.defineProperties to make immutable bindings.

Rottbott
Jul 27, 2006
DMC
In the situation you describe I'd still use the unit types, but you can cheat if you really want to, because they can be (explicitly!) constructed from float, and converted to float. In my system it might look something like:

code:
MaxAngularVelocity = AngularVelocity((LinearVelocity * SOME_SCALE).MetresPerSecond());
Where SOME_SCALE is a dimensionless constant. boost::units and other libraries also have ways to extract raw values when necessary. Doing that sort of thing obviously negates some of the advantages, but you still benefit from knowing what units you're dealing with when you're looking at your variables, and the 'casts' if you like are kept localised.

I already use JSLint, it's better than nothing. If I find time to investigate a new language it will most likely be F# (interestingly, F# has built in support for units).

Paniolo
Oct 9, 2007

Heads will roll.

Suspicious Dish posted:

With your system, I can't just take linear velocity and apply it to angular velocity, so I don't know what I'd do.

Strong typing doesn't mean you can't convert between types, it just means you have to be explicit when doing so:

code:
set_linear_velocity(ang_vel.to_linear_velocity())
The places I find strong typing the most helpful are when you have multiple units for the same value - for example, time in game engine ticks versus seconds. Or where you're using identifiers or indices - prevents you from passing a network_entity_id to a function expecting a simulation_entity_id and things of that nature.

Not only does it catch bugs, but it self-documents the code and makes it more readable.

Spiritus Nox
Sep 2, 2011

I hope this doesn't come off as a weird request, but would someone in the industry mind giving me their email address? I'm doing a project for a technical writing course at my college, and I need to do an interview with somebody in my field about what sorts of writing comes up in our line of work. Just a short email correspondence sometime this week would be enough.

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Cheston posted:

I'm starting a new project and want to actually have version control. I've used TortoiseSVN a bunch before, but always with an established repository. What do people usually do for this on personal projects?

I use git so I can dump some info on you in addition to what everyone else has said.

Hosting:
Github has a great web interface (can visualize yaml files now), and is extremely popular for open source type things. The smallest plan (micro) is 5 private repos will run you and will run you 7 bucks a month with unlimited contributors.

Bitbucket is a great alternative to github if you're seeking to keep things private. If your team is <= 5 members, you can stay on the free version and have private repos. The smallest paid plan is 10 dollars for 10 members.

Tools:
A lot of git enthusiast love to stay "pure" and use the CLI, but I find from anecdotal experience at client sites, that's a huge barrier of entry for those interested but not familiar with git and what good is a tool if no one wants to use it or learn it. There's several great GUI tools for messing around with repos most of which can be found on the git website -> http://git-scm.com/downloads/guis You'll find that most of the tools have the same look and feel which is nice if you want to try them all and use the one that feels good for you and your team.

Tools I've used:

Windows: I love Git Extensions and use it at clients with Windows environments as well as at home. It bundles with kdiff3 for merging which is pretty robust, but I like TortoiseMerge (TortoiseSVN install required) since it has the nice big YOURS and THEIRS next to local and remote which simplifies the concepts a bit.

Windows + Mac: SourceTree is great and has a feel similar to Git Extensions but is a tad more robust and informative about everything and requires just a tad more familiarity with git to really understand what you're clicking and agreeing to.

:siren:STAY AWAY FROM THE WINDOWS GITHUB GUI.:siren: I tried it, and they just did a terrible job with the Windows Metro look and feel and even with a strong grasp of git, it was hard as poo poo to do anything. I'd rather go pure command line than use this trash. Sorry Github, you really screwed the pooch on this one.

xgalaxy
Jan 27, 2004
i write code
I've used SourceTree and SmartGIT. I prefer CLI myself but occasionally use SourceTree for some things.
The problem I find with the GUI tools is once a repo becomes big enough they usually take a while to "refresh" or whatever the hell they do, whereas the CLI is instant every time.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.
I'll also throw in a mention for TortoiseGit. It ports the Tortoise way of doing things (explorer extension, visual diffs, etc.) really well to Git.

The upcoming VS2013 seems to have built-in Git support too.

poemdexter posted:

:siren:STAY AWAY FROM THE WINDOWS GITHUB GUI.:siren: I tried it, and they just did a terrible job with the Windows Metro look and feel and even with a strong grasp of git, it was hard as poo poo to do anything. I'd rather go pure command line than use this trash. Sorry Github, you really screwed the pooch on this one.
I second this. It's pretty impressive how they did a good job with the web interface but completely cocked up the GUI tool, and since they advertise it so prominently on their website, I keep finding new people completely confused and afraid of Git because of it.

xgalaxy posted:

I've used SourceTree and SmartGIT. I prefer CLI myself but occasionally use SourceTree for some things.
The problem I find with the GUI tools is once a repo becomes big enough they usually take a while to "refresh" or whatever the hell they do, whereas the CLI is instant every time.
I find the biggest boon of GUI tools is handling the messier stuff like diff/merge/etc.

SupSuper fucked around with this message at 20:09 on Sep 29, 2013

Zizi
Jan 7, 2010
I use Bitbucket for my hosting (open source doesn't work for my projects very often) and either Git or Mercurial(Hg) for the code control-- lately I've been favoring Git, but honestly there's not a lot of difference. Most people will tell you you're doing it wrong if you don't use the command line, but I'm on Windows 8 and it's 2013, so gently caress that-- TortoiseGit and TortoiseHg are enormously excellent front-end GUIs for their respective packages. As a bonus, Tortoise will do all the niggling setup details to get Git or Hg properly installed (though you might have to install msysgit by hand).

If you are new to Source control in general, or distributed SCC in specific, Hg has an (I think it's still free) eBook called The Definitive Guide to Mercurial that does a great job of introducing the workflow and walking new users through common tasks and the like. Well worth a read even if you don't use Hg, since a lot of the more high-level notions also apply to Git.

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

xgalaxy posted:

I've used SourceTree and SmartGIT. I prefer CLI myself but occasionally use SourceTree for some things.
The problem I find with the GUI tools is once a repo becomes big enough they usually take a while to "refresh" or whatever the hell they do, whereas the CLI is instant every time.

So I agree/disagree with you with 2 examples.

Disagree with you: My client's code base is probably the largest I've seen at a client and merge pulls are almost instant. The majority of the files are code/config/small images.

Agree with you: We have a separate repo that stores content (pdfs, images, etc). Git extensions absolutely chokes hard and sometimes throws index.lock errors pulling even 1 commit ahead. I think it's entirely determined by how many binary files you have in your repo. Git sees these changes as 100% diff and it slows down considerably trying to handle it.

Zizi
Jan 7, 2010

poemdexter posted:

So I agree/disagree with you with 2 examples.

Disagree with you: My client's code base is probably the largest I've seen at a client and merge pulls are almost instant. The majority of the files are code/config/small images.

Agree with you: We have a separate repo that stores content (pdfs, images, etc). Git extensions absolutely chokes hard and sometimes throws index.lock errors pulling even 1 commit ahead. I think it's entirely determined by how many binary files you have in your repo. Git sees these changes as 100% diff and it slows down considerably trying to handle it.

As I understand it, Git and Hg don't handle binaries well, because they can't do deltas on them (as you've said)-- and repos store ALL changes to versioned files. Since they're both completely designed around delta-based versioning, it's not too surprising that lots of binaries cause them major issues, but it's something to keep in mind when using them-- mostly you try not to version little incremental changes to binary files like art assets, so you might only commit art file changes once a day, or once every couple of days to keep the repo from getting enormous.

Vinterstum
Jul 30, 2003

Zizi posted:

As I understand it, Git and Hg don't handle binaries well, because they can't do deltas on them (as you've said)-- and repos store ALL changes to versioned files. Since they're both completely designed around delta-based versioning, it's not too surprising that lots of binaries cause them major issues, but it's something to keep in mind when using them-- mostly you try not to version little incremental changes to binary files like art assets, so you might only commit art file changes once a day, or once every couple of days to keep the repo from getting enormous.

FWIW, there's extensions to both Git and HG which will cause large files to be treated more in the traditional SVN-style (full history remotely, only latest version locally).

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Vinterstum posted:

FWIW, there's extensions to both Git and HG which will cause large files to be treated more in the traditional SVN-style (full history remotely, only latest version locally).

Do you have a recommendation for one? You'd save my current client so much headache.

xgalaxy
Jan 27, 2004
i write code

poemdexter posted:

Do you have a recommendation for one? You'd save my current client so much headache.

The only one I know of is git-annex but it doesn't actually check in the binary files, it only sym links them off into a backup folder.

This is one area where Mercurial is better, ever since the large files extension became standard with default mercurial setup. It basically falls back to a checksum for that file and only pulling / cloning the latest checksum of that file. And all a user has to do is say --large when staging that file for the first time. It's really well done.

xgalaxy fucked around with this message at 05:05 on Sep 30, 2013

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Spiritus Nox posted:

I hope this doesn't come off as a weird request, but would someone in the industry mind giving me their email address? I'm doing a project for a technical writing course at my college, and I need to do an interview with somebody in my field about what sorts of writing comes up in our line of work. Just a short email correspondence sometime this week would be enough.
I can't remember if you're in NC or if I'm confusing you with someone else. If so, Richard Dansky will be at an Escapist Expo panel this Saturday. That's more of the creative writing side of things, which I'm not sure would fit what you're looking for. Technical writing tends to be more about documentation and such.

If you're not in NC or can't make that panel, and do want to talk to someone in creative writing, I can ask around. Do you have plat/PMs?

Suspicious Dish posted:

I guess I never thought it was a problem.
I don't know if using physical types really matters since that sort of thing is usually specified in terms of standard units of some sort, but it does matter for things like radian vs. degree angles, or abstracting a rotator away so you don't have to worry about whether it's a matrix or quaternion.

Knowing what type of data you're looking at in general is always an issue though, and one of the most severe problems with JS really. As JS projects get larger, it's increasingly common to run into the problem of wondering why some property/method access on some data you retrieved isn't working, and it's because the object isn't of the expected time. Proxy types of any sort are an enormous pain in particular. A lot of why jQuery is so popular for instance is that it has an enormous amount of code dedicated to making instructions aimed at something illegal go to the nearest thing it's legal for instead.

To answer the question of when dynamically-typed languages are more productive though, they're more productive when dealing with small fragments of code where it's very easy to tell what types of data you'll be looking at and very little of what's in that code affects how code elsewhere is written. Event scripts for instance tend to be really trivial, as does configuration, but even those run the risk of exploding beyond their intent though, i.e. WoW UI mods are practically caught in DLL hell right now with the sheer number of support libraries for UIs.

OneEightHundred fucked around with this message at 08:43 on Sep 30, 2013

Rottbott
Jul 27, 2006
DMC

xgalaxy posted:

This is one area where Mercurial is better, ever since the large files extension became standard with default mercurial setup. It basically falls back to a checksum for that file and only pulling / cloning the latest checksum of that file. And all a user has to do is say --large when staging that file for the first time. It's really well done.
Can you mark an entire directory as --large?

Rottbott
Jul 27, 2006
DMC

OneEightHundred posted:

To answer the question of when dynamically-typed languages are more productive though, they're more productive when dealing with small fragments of code where it's very easy to tell what types of data you'll be looking at and very little of what's in that code affects how code elsewhere is written. Even that runs the risk of exploding beyond its intent though, i.e. WoW UI mods are practically caught in DLL hell right now with the sheer number of support libraries for UIs.
What is it that makes them more productive in that situation?

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Rottbott posted:

What is it that makes them more productive in that situation?
Smaller learning curve, non-programmers can do it.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Rottbott posted:

What is it that makes them more productive in that situation?
It's faster to write, faster to iterate, and depending on use scenario (i.e. embedded in C++), might be sandboxed better. Rapid prototyping is a really nice benefit, and it's even better when the "prototype" is self-contained enough that it's good enough for the final product.

Speed of development's always been its main forte, really. I don't really agree with the only alternative I can think of, that passing varying data types in the same value is a good thing at runtime, since that's mostly an invitation to irritating bugs.

Adbot
ADBOT LOVES YOU

Rottbott
Jul 27, 2006
DMC

roomforthetuna posted:

... non-programmers can do it.
No they can't. Very bad idea.

OneEightHundred posted:

It's faster to write, faster to iterate, and depending on use scenario (i.e. embedded in C++), might be sandboxed better. Rapid prototyping is a really nice benefit, and it's even better when the "prototype" is self-contained enough that it's good enough for the final product.

Speed of development's always been its main forte, really. I don't really agree with the only alternative I can think of, that passing varying data types in the same value is a good thing at runtime, since that's mostly an invitation to irritating bugs.
I disagree that it's any faster to write. Typing speed isn't the limiting factor on programming, so having a bit less syntax doesn't speed you up any. I think that the crossover point where it becomes slower vs. static typing (in terms of code size) is so low that you might as well not bother.

Fast iteration is definitely an advantage, and it's a weak point of C++ in particular. You can skip your unit tests while you iterate a few small things, but you can't skip compilation. Having said that, it's not like you recompile the whole project when you change a line of C++, so it usually only takes a few seconds.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply