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
Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
"C++ is hard, everyone knows that" *develops haskell app with 5,000 line custom monad for fun*

Adbot
ADBOT LOVES YOU

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Bream posted:

Ha ha, disregard my dumbs. I thought you were saying that nobody was worrying about gc in c++ because nobody needed c++, not nobody needed gc.

it is also true that nobody needs c++

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION

Base Emitter posted:

that's right, programming in c++ magically causes garbage collectors to behave exactly as you want them to and no bideogmae engine ever supports other languages for their apis

you may be able to get away with objective c for some crappy 2d game with a handful of sprites but there's no way you can get away without any c/c++ for anything of any sacle

PENETRATION TESTS
Dec 26, 2011

built upon dope and vice
people talk about c++ like it raped their dads or something

i'm glad i can use it instead of fortran?

Shameproof
Mar 23, 2011

Just installed a vim plugin that puts a combo gauge in the lower right side of the screen that goes up the more I type without touching the arrow keys. Once it is full, I tip the keyboard sideways, the window gets animated flames at the bottom, it automatically puts in a bunch of macros, and the layout switches to left-handed programmer dvorak.

Deacon of Delicious
Aug 20, 2007

I bet the twist ending is Dracula's dick-babies

spongeh posted:

you may be able to get away with objective c for some crappy 2d game with a handful of sprites but there's no way you can get away without any c/c++ for anything of any sacle

what about things that are useful, such as not video games

Posting Principle
Dec 10, 2011

by Ralp

Deacon of Delicious posted:

what about things that are useful, such as not video games

you mean like operating systems? cause ive got some bad news...

Posting Principle
Dec 10, 2011

by Ralp
YOSPOS BC CPP

Bream
Feb 3, 2013

Farmer's Barket

Deacon of Delicious posted:

what about things that are useful, such as not video games

I would rather play a video game than use a web app, so I guess the metric for utility is subjective.

Workaday Wizard
Oct 23, 2009

by Pragmatica
hey pl thread!! what is objective-c and why should i care?

Shameproof
Mar 23, 2011

In Corinian C we don't say x.hello() or x->goodbye(), we say [x salame]

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Shinku ABOOKEN posted:

hey pl thread!! what is objective-c and why should i care?
it's a language that stebe stole from another company and the founder of that company died penniless in an alley

spongeh
Mar 22, 2009

BREADAGRAM OF PROTECTION

Deacon of Delicious posted:

what about things that are useful, such as not video games

why yes a multi-billion dollar industry that pushes the hardware envelope in just about every facet of the tech industry forward isn't useful. fly away, troll.

double sulk
Jul 2, 2010

Shinku ABOOKEN posted:

hey pl thread!! what is objective-c and why should i care?

it's a language by two guys named love and cox

FamDav
Mar 29, 2008

Gazpacho posted:

"C++ is hard, everyone knows that" *develops haskell app with 5,000 line custom monad for fun*

a little :filez: but this music torrent site was having trouble scaling with the old tracker software they were using. they let some guy spend like months to a year trying to write one in haskell and then he disappeared so the head admin was like what the gently caress and wrote one in a weekend in c++. modulo some tweaks that's what they use today.

makes u think

Deacon of Delicious
Aug 20, 2007

I bet the twist ending is Dracula's dick-babies

spongeh posted:

why yes a multi-billion dollar industry that pushes the hardware envelope in just about every facet of the tech industry forward isn't useful. fly away, troll.

c++ is used to make toys such as video games, does it count as a toy language?

Workaday Wizard
Oct 23, 2009

by Pragmatica

gucci void main posted:

it's a language by two guys named love and cox

https://www.youtube.com/watch?v=u6e0abCt1ww

Bream
Feb 3, 2013

Farmer's Barket

Deacon of Delicious posted:

c++ is used to make toys such as video games, does it count as a toy language?

Adventure was written in fortran, so

Toady
Jan 12, 2009

MeruFM posted:

i still think minecraft is impressive in that multiplayer is not just completely broken.

the multiplayer is infamous for being its most broken part

are physics still tied to the renderer

pseudorandom name
May 6, 2007

they unified the single player and multiplayer engines, now they're both equally broken, with an improvment in multiplayer and worsening in single player

Shameproof
Mar 23, 2011

Internaut! posted:

yea but doesnt minecraft pin a modern machine while rendering like 1000 cubes with low res textures

if that's best case java graphics then I don't think it's gonna take over from c++ anytime soon

It's not LWJGL's fault and it's not even Notch's fault either really cuz he spent about a half a year on engine stuff and that's all your supposed to do when you're making a low budget one-person game.

Rendering Minecraft stuff is actually a pretty interesting problem. You could rewrite the whole thing in C++ and it might double the performance, but that's only an extra hundred meters in draw distance because the cost scales cubically (unlike in most other games). If you look at those indev games that are basically Minecraft+Better Graphics, you'll see they're using cheap tricks to make the game look more detailed. The lighting is Quake-style, the fog is even worse, or they're using a partitioning scheme that will slow the engine to a halt as soon as you start digging holes and building castles. But if somebody who actually knew what they were doing worked on it, they might be able to improve its big-O.

Shameproof
Mar 23, 2011

Bream posted:

Also serious q. are Minecraft's octrees sparse? What about in the woods with no one around?

No cuz then you're storing a bunch of stone blocks in a tree and then you have to do a neighbor lookup every time you try to determine if the block is exposed to air, figuring out where the rivers go, etc. Hundreds of spergs have tried to use octrees but it doesn't work when literally every square meter is an 8 bit enum value.

FamDav
Mar 29, 2008

Shameproof posted:

No cuz then you're storing a bunch of stone blocks in a tree and then you have to do a neighbor lookup every time you try to determine if the block is exposed to air, figuring out where the rivers go, etc. Hundreds of spergs have tried to use octrees but it doesn't work when literally every square meter is an 8 bit enum value.

i think most of the speedups early on were from optimizing how chunk data was stored and read. I think scaevolus used hilbert curves to reorder chunks to improve locality of data which had a nontrivial effect on speed.

edit: my interest in minecraft stopped around when people started experimenting with shaders.

FamDav fucked around with this message at 06:48 on Feb 28, 2013

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

FamDav posted:

i think most of the speedups early on were from optimizing how chunk data was stored and read. I think scaevolus used hilbert curves to reorder chunks to improve locality of data which had a nontrivial effect on speed.

edit: my interest in minecraft stopped around when people started experimenting with shaders.

https://www.youtube.com/watch?v=JpksyojwqzE

pseudorandom name
May 6, 2007

FamDav posted:

i think most of the speedups early on were from optimizing how chunk data was stored and read. I think scaevolus used hilbert curves to reorder chunks to improve locality of data which had a nontrivial effect on speed.

not even that fancy. mcregion stores (up to) 1024 chunks per file instead of one chunk per file. that's it.

FamDav
Mar 29, 2008

pseudorandom name posted:

not even that fancy. mcregion stores (up to) 1024 chunks per file instead of one chunk per file. that's it.

i was talking about optifine. mcregion fixed the issue of minecraft generating a file per chunk.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Shinku ABOOKEN posted:

hey pl thread!! what is objective-c and why should i care?

its the C programming language with enhancements brought to you by the Love-Cox team

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
hmmm I see someone else has already made that joke

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
the best thing steve jobs did was trick people into writing C in 2013

Nomnom Cookie
Aug 30, 2009



objective-c is smalltalk with segfaults. also it's not real oo

FamDav
Mar 29, 2008

Nomnom Cookie posted:

objective-c is smalltalk with segfaults. also it's not real oo

square loving brackets for miles

X-BUM-RAIDER-X
May 7, 2008
are people still going on about minecraft, jesus

Max Facetime
Apr 18, 2009


wow, that's amazing and a good demonstration of what's possible with voxels that traditional 3d engines would struggle with and most likely do using a 2D post-processing shader instead

spongeh posted:

i'm pretty sure minecraft is using the giant state machine of hate style of opengl, but i thought that modern opengl, and opengl es at least gave you the option to avoid that. although i guess it still exists, and it probably seems better just by comparison.

the fixed function pipeline is gone, replaced with the programmable shader pipeline, but as an API that just trades one bunch of global state for another

even webgl, which isn't beholden to strict backwards compatibility and seems to be toying with the idea of objects a little bit, still looks like:

JavaScript code:
   // a lot of this
   var texture = gl.createTexture();
   gl.bindTexture(gl.TEXTURE_2D, texture);
   gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
   gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, tSize, tSize, 
      0, gl.RGB, gl.UNSIGNED_BYTE, new Uint8Array(pixels));
   gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
   gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);

   // and some of this
   gl.enable(gl.DEPTH_TEST);
   gl.depthFunc(gl.LEQUAL);
   gl.clearDepth(1.0);
   gl.clearColor(0, 0, 0, 1);

   // et cetera et cetera

Cybernetic Vermin
Apr 18, 2005

webgl is such a ridiculous idea. lucky google got distracted by the madness of nacl instead

Juul-Whip
Mar 10, 2008

nerds always get mad when I tell people that Java is a good first PL. certainly I agree that, like most computing platforms, the java platform is horrible garbage largely due to mismanagement by its parent company, Oracle. but it is a good entry point to programming imo.

and just cause someone learns programming in java doesnt obviate them using java in the future.

am I a bastard for thinking this? my first compiled language was C

Juul-Whip fucked around with this message at 12:12 on Feb 28, 2013

Max Facetime
Apr 18, 2009

Cybernetic Vermin posted:

webgl is such a ridiculous idea.

wonder if someone got really mad when webgl replaced glGenTextures() with gl.createTexture()

Cybernetic Vermin
Apr 18, 2005

THC posted:

nerds always get mad when I tell people that Java is a good first PL. certainly I agree that, like most computing platforms, the java platform is horrible garbage largely due to mismanagement by its parent company, Oracle. but it is a good entry point to programming imo.

and just cause someone learns programming in java doesnt obviate them using java in the future.

am I a bastard for thinking this? my first compiled language was C

having taught on introductory programming languages for a couple of years my experience is: java and c both work great for different reasons, python does not work as well as one would expect

relatively primitive operations are helpful for understanding. for example the ugly old C for-loop is perfectly pedagogical and can quickly be fully understood in all its parts, whereas the python for-loop is a constant problem, with students being confused about lists and sequences, often confusing the range idiom with fixed syntax, etc.

it is also a lot harder than one thinks to teach language subsets unless the subsets are very cleanly separable, and both c and java work out reasonably well there

Cybernetic Vermin
Apr 18, 2005

also the python block indentation style is hugely annoying for programming beginners since they will spend a lot of time experimenting with small changes and maintaining correct indentation is not really a good use of their time at that point.

plus of course the python maintainers are retarded and has the interpreter error out if you use a character outside of the range 0-127 in a source file without a #coding: comment at the top, including inside comments. of course this used to work, but the python maintainers feel that things working is a bad goal to have so they added some extra code to make sure that the average students program stops running with an obtuse error message and a reference to a PEP when they are commenting and happen to insert an ä.

i am angry irl now and i am not even doing the python course this year

Sapozhnik
Jan 2, 2005

Nap Ghost
Teaching algorithms and data structures in C is good, having programmers write their very first programs in some non-awful asm (i.e. not x86) is better, maybe even hand-assemble an instruction or two.

The closer their mental model of a computer is to "a machine made of many simple parts" and the further away it is from "an incomprehensible mystic construct you chant memorised spells at" the better

Sapozhnik fucked around with this message at 13:21 on Feb 28, 2013

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost
yes I know you'll be using AutoCAD and Matlab for all your differential equation needs in practice and none of the interesting ones can be solved analytically anyway, do your loving differential equations homework

- things nobody ever has to say to a mech eng class ever

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