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
vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Werthog posted:

having trouble understanding why this would possibly be the correct behavior unless there was a valid way of using the stream operator within a nested template argument list, apart from spergy "when in doubt, fail" attitudes

there is

A<int, 1024>>2> a;

Adbot
ADBOT LOVES YOU

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Werthog posted:

having trouble understanding why this would possibly be the correct behavior unless there was a valid way of using the stream operator within a nested template argument list, apart from spergy "when in doubt, fail" attitudes
dogmatic distinction between lexing and parsing

skeevy achievements
Feb 25, 2008

by merry exmarx

ahhh spiders posted:

excellent, no rebuttal from confirmed old crank Internaut. as usual

you're an android developer

game, set, match

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Internaut! posted:

you're an android developer

game, set, match

i develop for ios and in the past i developed C++. you're an old gently caress who's quickly becoming irrelevant

JawnV6
Jul 4, 2004

So hot ...

Gazpacho posted:

apparently the c++ committee had long discussions about that before someone finally mentioned that instead of throwing an error they could tweak the parser state to accept it

:can:

JawnV6
Jul 4, 2004

So hot ...

Werthog posted:

apart from spergy "when in doubt, fail" attitudes

"hm, im off track and might not have a goddamn clue what context im in, BETTER CHAREG AHEAD"

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

JawnV6 posted:

"hm, im off track and might not have a goddamn clue what context im in, BETTER CHAREG AHEAD"

ambiguity has the potential to add a fun, wacky dimension to programming that i think future generations will really appreciate

skeevy achievements
Feb 25, 2008

by merry exmarx

ahhh spiders posted:

i develop for ios and in the past i developed C++. you're an old gently caress who's quickly becoming irrelevant

cool I have many iOS devices link your apps

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

JawnV6 posted:

"hm, im off track and might not have a goddamn clue what context im in, BETTER CHAREG AHEAD"

unironically this

the old-school beardo attitude of crash-and-burning whenever there is the tiniest recoverable error is so stupid

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Internaut! posted:

cool I have many iOS devices link your apps

gently caress you

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Tiny Bug Child posted:

unironically this

the old-school beardo attitude of crash-and-burning whenever there is the tiniest recoverable error is so stupid

nice troll

Sock on a Fish
Jul 17, 2004

What if that thing I said?
going from python to ruby sucks because reference counting garbage collection takes care of a lot of poo poo for you

for example

i have a method that does a buffered read of a file from s3 and writes it to disk

a separate method would then untar that file on disk, but the untar would always complain about unexpected EOF

but if i tried untarring the file after that exception was thrown, poo poo was fine

turns out i wasn't explicitly closing the file, which only appeared inside the one method, but that meant it just kind of hung out with an unflushed buffer until the exception cleanup closed the file

GameCube
Nov 21, 2006

ahhh spiders posted:

there is

A<int, 1024>>2> a;

ohshit

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Sock on a Fish posted:

going from python to ruby sucks because reference counting garbage collection takes care of a lot of poo poo for you

for example

i have a method that does a buffered read of a file from s3 and writes it to disk

a separate method would then untar that file on disk, but the untar would always complain about unexpected EOF

but if i tried untarring the file after that exception was thrown, poo poo was fine

turns out i wasn't explicitly closing the file, which only appeared inside the one method, but that meant it just kind of hung out with an unflushed buffer until the exception cleanup closed the file

is garbage collection guaranteed to be immediate when an object goes out of scope in ruby?

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Werthog posted:

ohshit

kind of contrived, sure, but it exists

Sock on a Fish
Jul 17, 2004

What if that thing I said?

ahhh spiders posted:

is garbage collection guaranteed to be immediate when an object goes out of scope in ruby?

nope

i think it runs periodically

skeevy achievements
Feb 25, 2008

by merry exmarx

ahhh spiders posted:

gently caress you

I was honestly expecting a list of commercially successful well-reviewed apps

GameCube
Nov 21, 2006

ahhh spiders posted:

kind of contrived, sure, but it exists

but wait, there's no opening < to match those >s, couldn't the lexer still figure it out

JawnV6 posted:

hm, im off track and might not have a goddamn clue what context im in, BETTER CHAREG AHEAD"
well in this case the error message would suggest that it knows exactly what context it's in and it's failing anyway just to spite the programmer? idk but somebody post that thing about jawns v1-5

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Internaut! posted:

I was honestly expecting a list of commercially successful well-reviewed apps

i'm working on an ios app but my android app is already well-reviewed

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Werthog posted:

but wait, there's no opening < to match those >s, couldn't the lexer still figure it out

i dunno, you can construct that scenario though

A<B<int, 1024>>2>> ab;

jooky
Jan 15, 2003

ahhh spiders posted:

lua owns

world of warcraft addons are written in lua

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

JawnV6 posted:

:can:
youre probably right, the recovery code for that must look terrible

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

jooky posted:

world of warcraft addons are written in lua

a lot of games use lua. grim fandango used lua. lua is old as heck

Sock on a Fish
Jul 17, 2004

What if that thing I said?

Sock on a Fish posted:

nope

i think it runs periodically

i guess this sort of right? a quick skim of some docs says it runs whenever theres no more room for objects in the heap or also at some other times?

anyway it seems horrible



vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
why wouldn't you run into that problem in ruby then

GameCube
Nov 21, 2006

so if i'm understanding correctly, it's not that it's impossible to parse, just that it's a pain in the rear end

maybe they shouldn't have made ">>" mean 3 (at least?) different things in the first place?

Sock on a Fish
Jul 17, 2004

What if that thing I said?

ahhh spiders posted:

why wouldn't you run into that problem in ruby then

you definitely would run into that problem

just something i didnt expect coming from python and none of the 'do you know python? well here is ruby!' primers mentioned it

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Werthog posted:

so if i'm understanding correctly, it's not that it's impossible to parse, just that it's a pain in the rear end

maybe they shouldn't have made ">>" mean 3 (at least?) different things in the first place?

i guess my example wasn't technically ambiguous unless you only read it left to right and didn't use any kind of contextual inference

but yeah the stream operator is loving stupid

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
also technically i didn't use the stream operator in my example

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"
Nested templates vs the bitshift operator are symptomatic of C++'s poor design, but they're not a fundamental issue with the language so much as just a minor mistake in the grammar. Every major compiler will provide a decent error message in C++98 mode, and should accept it in C++11 mode.

ahhh spiders posted:

what's the ambiguity in C++?
"Ambiguity" is the wrong word, his professor was probably generalizing a bit.

The problem with C++ is that is grammar is undecidable and its template system is Turing-complete. Together, this means that it is literally impossible to create a C++ parser. The only way to process C++ is to compile it.

Perl 5 (and probably 6) has a similar issue.

Nomnom Cookie
Aug 30, 2009



C++ is so loving full of ambiguity around types and variable decls and that guy had to go on about >> smdh.

Inverse Icarus
Dec 4, 2003

I run SyncRPG, and produce original, digital content for the Pathfinder RPG, designed from the ground up to be played online.

ahhh spiders posted:

nice troll

stop pointing it out

you're boring

Nomnom Cookie
Aug 30, 2009



Janin posted:

Nested templates vs the bitshift operator are symptomatic of C++'s poor design, but they're not a fundamental issue with the language so much as just a minor mistake in the grammar. Every major compiler will provide a decent error message in C++98 mode, and should accept it in C++11 mode.

"Ambiguity" is the wrong word, his professor was probably generalizing a bit.

The problem with C++ is that is grammar is undecidable and its template system is Turing-complete. Together, this means that it is literally impossible to create a C++ parser. The only way to process C++ is to compile it.

Perl 5 (and probably 6) has a similar issue.
go watch anime the adults are talking

GameCube
Nov 21, 2006

Janin posted:

Nested templates vs the bitshift operator are symptomatic of C++'s poor design, but they're not a fundamental issue with the language so much as just a minor mistake in the grammar. Every major compiler will provide a decent error message in C++98 mode, and should accept it in C++11 mode.

"Ambiguity" is the wrong word, his professor was probably generalizing a bit.

The problem with C++ is that is grammar is undecidable and its template system is Turing-complete. Together, this means that it is literally impossible to create a C++ parser. The only way to process C++ is to compile it.

Perl 5 (and probably 6) has a similar issue.

yeah that was my bad, using words without regard for their actual definition

anyway thanks for enlightening me y'all, time to go learn flex apparently

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
do lua

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
lua is a simple, beautiful little flower

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

ahhh spiders posted:

lua is a simple, beautiful little flower
lua is the only embedded interpreter I've seen that actually uses a proper state value instead of just going "hurp durp everything's global!", which makes it about a hundred times easier to work with than python or guile.

too bad about the language itself.

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Janin posted:

lua is the only embedded interpreter I've seen that actually uses a proper state value instead of just going "hurp durp everything's global!", which makes it about a hundred times easier to work with than python or guile.

too bad about the language itself.

what's wrong with it?

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
i mean, you're probably trolling, or just a moron, since you're Janin, but i'm interested to see what contrived complaint you come up with

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost
bitch you best step off i'mma loving cut you

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