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
rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
arm64 does actually have instructions that are defined as having exactly the right semantics for javascript’s floating-point min/max

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

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

rjmccall posted:

arm64 does actually have instructions that are defined as having exactly the right semantics for javascript’s floating-point min/max

ah yes, the classic "fjcvtzs". does JavaScriptCore even support that? ARM team really wants to save money I guess, can't even afford to buy a vowel

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
oh i totally forgot which operation it was, oops. that is way more useful than min/max

afaik there are no production chips supporting armv8.3 yet, so no, i doubt there are any js implementations that will take advantage of it if available

Sapozhnik
Jan 2, 2005

Nap Ghost
i am glad that everybody calls it "arm64" instead of its asinine official moniker

Suspicious Dish
Sep 24, 2011

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

Sapozhnik posted:

i am glad that everybody calls it "arm64" instead of its AAsinine official moniker

b0lt
Apr 29, 2005

Suspicious Dish posted:

ARM team really wants to save money I guess, can't even afford to buy a vowel

at least it isn't power??

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArch

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Acorn RISC Machine

pseudorandom name
May 6, 2007

wow, a proposal to make exceptions unnecessary for the standard library and a proposal to make throws magically turn into a return of an invisible optional

C++ is goin' places!

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
the exceptions proposal is basically proposing adding swift's error handling system

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
where are these proposals?

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
oh god the interoperation bits are so complicated

but yeah this pretty closely parallels my analysis

herb (being herb) is really attached to the idea that he has to specify implementation-level stuff like how it works at the abi level

also lol at this actually happening

pseudorandom name
May 6, 2007

somebody should tell herb that the reason nobody uses exceptions is that they wrote a bunch of C++ code that used existing exception unsafe C code and then they wrote a bunch of C++ code that used the existing exception unsafe C++ code and nobody actually cares about overhead or non-determinism

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
there absolutely are people who do not use exceptions on greenfield projects because they care about the overhead

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
lol game development. although the support for exceptions on consoles has historically been hilariously bad, so that's probably a big part of the reason

also what overhead is there on modern architectures when you're not actually triggering exceptions? i swear i used to know this but i've been in .net land for some time now and i'm starting to forget about c++

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Deep Dish Fuckfest posted:

lol game development. although the support for exceptions on consoles has historically been hilariously bad, so that's probably a big part of the reason

also what overhead is there on modern architectures when you're not actually triggering exceptions? i swear i used to know this but i've been in .net land for some time now and i'm starting to forget about c++

they go over it in the paper but it bloats your binaries by like 15% and it’s worth noting that even if you’re not writing code that throws exceptions you can still be using code that does, because you can link in libraries and stuff. and then they’ll have all the problems like unbounded rtti lookups even if you don’t do it yourself

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

Deep Dish Fuckfest posted:

i'm starting to forget about c++

it's for the best, really

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
my favorite thing I've found so far is the GOG Galaxy client library, which uses exceptions as part of normal API usage for some loving reason, meaning you can't turn them off since you have to have them to use them from its stupid DLL

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Deep Dish Fuckfest posted:

lol game development. although the support for exceptions on consoles has historically been hilariously bad, so that's probably a big part of the reason

also what overhead is there on modern architectures when you're not actually triggering exceptions? i swear i used to know this but i've been in .net land for some time now and i'm starting to forget about c++

with the itamium approach to exceptions they have zero runtime overhead when not thrown which owns for errors which should never happen, but they add nontrivial size bloat and are mind-bogglingly slow when they do happen, so they're unsuitable for things like "try this operation which has a good chance of failing and report why it failed if so"

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Plorkyeran posted:

with the itamium approach to exceptions they have zero runtime overhead when not thrown which owns for errors which should never happen, but they add nontrivial size bloat and are mind-bogglingly slow when they do happen, so they're unsuitable for things like "try this operation which has a good chance of failing and report why it failed if so"

that's the correct approach to exceptions

redleader
Aug 18, 2005

Engage according to operational parameters
the correct approach is to return a Result<T, E> :functionalsay:

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
actually I think you’ll find the correct approach is restartable conditions as implemented by Common Lisp

Vanadium
Jan 8, 2005

instead of setting up an elaborate error handling scheme that introduces tons of control flow that is rarely if ever fully tested, you should just optimize your code for the happy path and, if an error does happen, immediately terminate the cloud vm it's running on and create a new one to start over

Cybernetic Vermin
Apr 18, 2005

exceptions are pretty good, but handling exceptions is bad. so agreed with above

Stringent
Dec 22, 2004


image text goes here

Vanadium posted:

instead of setting up an elaborate error handling scheme that introduces tons of control flow that is rarely if ever fully tested, you should just optimize your code for the happy path and, if an error does happen, immediately terminate the cloud vm it's running on and create a new one to start over

i want to subscribe to your newsletter

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
what if you’re writing software that runs on things people actually use rather than on a server

cinci zoo sniper
Mar 15, 2013




eschaton posted:

what if you’re writing software that runs on things people actually use rather than on a server

make it a service

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

eschaton posted:

what if you’re writing software that runs on things people actually use rather than on a server

ON ERROR RESUME NEXT

Soricidus
Oct 21, 2010
freedom-hating statist shill

cinci zoo sniper posted:

make it a service

microservices all the way down. no clients no masters. there isn’t any way for consumers to access anything from their devices, but that’s probably for the best really

Thermopyle
Jul 1, 2003

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

software that people use is bad

software that other software uses is the best

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
i demand at least 5 layers of software between anything i touch and anything people actually use

spiritual bypass
Feb 19, 2008

Grimey Drawer
errors are values imo

Workaday Wizard
Oct 23, 2009

by Pragmatica

redleader posted:

the correct approach is to return a Result<T, E> :functionalsay:

rt4 posted:

errors are values imo

i agree with these posts

comedyblissoption
Mar 15, 2006

would you make a division by zero error an explicit value though

Soricidus
Oct 21, 2010
freedom-hating statist shill

comedyblissoption posted:

would you make a division by zero error an explicit value though

you mean like in ieee 754?

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

comedyblissoption posted:

would you make a division by zero error an explicit value though

you mean like ERR_DIVBY0_FUCK?

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

so when i skimmed this last night, i came away with the impression that herb was proposing that functions could either throw std::error as a standard type-erased exception type or declare that they throw a specific concrete exception type. a coworker pointed out today that i had this wrong and that in fact the only option was the type-erased std::error. rereading the proposal, i realized that what led me astray is this nice little swipe at the swift error-handling design:

quote:

Learning from the variety of error handling methods in Objective-C (described in a nutshell in the first 10 minutes of [Squires 2017]), Swift decided to pursue an always-untyped boolean throws, which is understandable but in my opinion overcorrects on the opposite side (and there are ongoing recurring calls to add a typed throws and/or a Result type to Swift, with sympathy from key participants including Chris Lattner). This proposal allows throwing rich values (not just boolean success/fail like C++ noexcept or Swift throws) that are able to represent all the same errors that types are used to represent in languages that throw typed exceptions (including today’s C++), by throwing a well-known common type rather than arbitrary types.

which in retrospect is quite explicit about herb's apparent belief that swift literally has no error types and only allows a no-operand throw

(swift uses a type-erased Error type exactly analogous to herb's proposed std::error)

JawnV6
Jul 4, 2004

So hot ...
openBSD giving up on Intel SMT lol

Adbot
ADBOT LOVES YOU

Notorious b.s.d.
Jan 25, 2003

by Reene

eh adding a tunable to turn it on and off doesn't sound too bad

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