« first day (2112 days earlier)      last day (2840 days later) » 

1:00 PM
@Shoe Device you bought only compatible with other device from the same brand.
 
How is vendor lock-in relevant again?
 
It's not
 
You guys change topic way too quickly
 
We got sidetracked into another discussion about TV systems
 
one thing I'd like to have connected to the internet is my fridge
so that when doing shopping I could check what stuff is there
 
1:02 PM
@Columbo Oh, the mailing is out?
 
because I always forget to check
 
user406009
How would the fridge know what is in there?
 
@BartekBanachewicz It's extremely difficult to implement
 
@Lalaland the simplest solution would be to put a few webcams inside
you can also have compartments with individual weights that would be assigned to particular products
 
You'd need a webcam for each compartment / level, seeing as what's already in there would obscure your view.
 
1:03 PM
webcams are relatively cheap
 
Maybe some kind of XRay thingy for your fridge. :D
 
XRay would be good
 
Doesn't sound practical at all
 
Well.
Phone cameras are dirt cheap.
 
scan bar codes
 
1:04 PM
XRay + OpenCV to recognize things
 
all the bar codes in the entire fridge
i guess it doesn't work with fruit
 
Just have 6 of those, take pictures, and then have one big mural of your fridge. That'd be the practical, simple way to handle it.
 
@Shoe Not all food has bar codes :3
 
Yay, it feels nice to have your name in WG21 meeting minutes. :P
 
not all items have bard codes and it doesn't tell you about half-consumed stuff
 
1:05 PM
@Griwes Linkylinky.
 
@slaphappy put bar code in all foods
 
stamp it up in there
 
@Shoe edible nfc chips
 
@Griwes you know this C++ Programming Language right
I have a question that requires Super Expert C++ knowledge
 
1:05 PM
how are pointar formed
4
 
@Shoe that tell you when the food is going bad, how much you paid for it and how to get more
 
is it legal to use enum-class-es as non-type template params?
 
@slaphappy yeah
 
> lightweight exception
handling
Jesus christ, that is EXTREMELY needed.
 
1:06 PM
@Shoe also some unique food identifier to help track food thieves
 
Throwing an exception costs SO MUCH.
 
is it a thing?
like if I were to steal something it would probably not be food
 
fridge freeloaders? at work, at the dorm?
 
user406009
@ThePhD We just need to change everything to github.com/viboes/std-make/tree/master/doc/proposal/expected
 
user406009
Like what Rust does.
 
1:08 PM
That doesn't change the cost of handling an exception.
 
No, not everything, because in some contexts that's just waaay too verbose.
 
As it stands right now tossing an exception costs humongously.
 
ugh ffs I hate people who write "tutorials" that don't explain shit
 
For example...
 
The good thing about exceptions is that every piece of middleware can 100% ignore their existence.
 
1:08 PM
 
I can write code that doesn't know that exceptions exist (safe for exception safety guarantees).
 
Guess which one of those uses exceptions.
 
With expected, I suddenly have to annotate it everywhere.
Which is going to be a GIGANTIC PITA until we get actual do-syntax in C++.
(No, await doesn't count.)
 
The cost of throwing -- and catching -- an exception is GIGANTIC compared to boolean propogation or optional returns. In a case where safety is needed and you expect to recover, simply throwing an exception and catching it for basic error states is not preferable in the slightest.
 
Ell
@slaphappy I agree wrt minimal gain from Iot
 
1:10 PM
That's not an x86 executable, by the way. It's an x64 executable.
 
@Ell Do you know if those tea machines exist?
 
So this isn't the cost of old table-based unwinding. This is the cost of that sleek new x64 exception handling mechanism.
 
@ThePhD Well they are supposed to be used for exceptional cases...
 
nwp
@ThePhD using exceptions for regular control flow is bad, I thought we knew that already
 
Ell
They probably do
 
user406009
1:11 PM
@Griwes Yes, but without exceptions you have better guarantees about your code. You know exactly where all the returns are.
 
Ell
Its only like a coffee one but it drops in a teabag
 
user406009
You know exactly where things can fail.
 
user406009
Just by casually glancing at the code.
 
I myself admit to violating that rule sometimes, just because exceptions are the only thing that has do-notation in C++.
@Lalaland But I don't care about that!
My code is exception-safe.
 
Ell
@ThePhD I don't get the issue
 
1:12 PM
I don't give a rat's ass about where it exits abnormally.
 
Ell
If something is failing it doesn't matter if it's fast or not
 
And all the normal exits I can clearly see.
So... vOv
 
Ell
@Griwes exception safety is difficult to achieve imo
 
@Ell Good luck finding decent tea in bags
 
@Ell It's trivial to achieve.
 
Ell
1:13 PM
@slaphappy that's how I drink tea multiple times a day :3
 
Just follow the rule of zero.
 
Ell
@Griwes until you can't
Then what?
 
@Ell "decent" :D
 
@Ell examples please
 
@Ell I drink shitty coffee at work every day. It's trivial to automate making of shitty coffee.
 
Ell
1:14 PM
@slaphappy I guess I've never tried decent tea then, so I couldn't answer :P
 
@Ell remember what does rule of zero means: make the resource managing delegated to another class
 
Ell
@Griwes later
 
> Reviewed the entirety or a promising introspection paper
beautiful typo, Jonathan.
 
and have your "main" class free of big five
 
Ell
@milleniumbug right but you can only delegate so much :P
 
1:15 PM
paging @jonathanwakely (though it most surely doesn't work)
 
@Ell maybe, or maybe not
 
@Ell fresh one. you should give it a try
 
not much comes to mind that can't be delegated
 
@Ell I don't see it (hence why an example is necessary to continue this discussion).
> Noted that EWG did good work and that co-operation with CWG is smooth as silk.
:D
 
Does anyone familiar with Qt framework know what is proper way to get file extension? I ask because QFileInfo::extension was deprecated without any comment about replacement
 
1:25 PM
@Ell It does.
For example, in that case that's technically a failed called to the API.
But you can check things before you reach the crash point.
Therefore, retunring nullopt after doing that check is a good way to dealing with it.
 
Want more gems from the minutes? I'm not going to quote random fragments because the longer discussions weren't as hilarious as last time, but here's one:
> Voutilainen asks what the replacement for std::iterator is, to which Van Eerd responded "typing".
 
The fact that to, return a nullopt, that one framework (kaguya) catches an exception and then translates it to a nullopt at THAT HIGH of a cost is a little absurd and for me a strike against using exceptions in code where recovery is a thing you'll probably end up doing.
(e.g., where a system can fail but it doesn't not necessarily mean your application goes down.)
 
why do you need to use exceptions at all
just return errors
vOv
 
Returning errors is a bit anathema to also being able to return actual result values.
2
 
port std::expected to your project :D
 
1:30 PM
That's useful, but for users expecting a T and also using auto, std::expected does not help too much either and still requires explicit annotation across its callsites.
 
@ThePhD return a variant.
 
I guess at some point someone's just going to have to bite the bullet somewhere, but... vOv
 
you can try the boost::filesystem approach to error codes
 
@BartekBanachewicz Point of typed languages is NOT having variant types.
2
 
@TomášZato lol what
starring for lulz
 
1:32 PM
@ThePhD i.e. T f() (throws exceptions) and T f(error_code&) (doesn't)
 
@ThePhD if only you could have a function that would like take a variant and then a function taking the proper value typed as the result of the first one and return a variant of the result of that second function
 
@TomášZato you... what?
boost::variant is a thing
it's a decent thing
it actually has sort-of a matching functionality
 
lol does it
 
@milleniumbug TBH, I actually like the (proper) C style approach to things, where you can check a thread-local error code for the function you just called. It's not the best but it was nice when I used it.
@milleniumbug This is good too, yeah.
 
it's more safe than wearing a condom while deferencing a pointer
 
1:33 PM
@milleniumbug I know, but using variant type just to avoid exceptions - that's not decent
 
@TomášZato why?
I'd say exceptions are there just to avoid having variant types
 
tbh I'd like to distinguish variant from "valid result or error info"
 
that's a special case
 
is it though
 
@BartekBanachewicz Because exceptions allow you to clearly separate the OK line of code from the OH FUCK! line of code. In case of variant, you later check if it's valid, but the separation is not implicit.
 
1:35 PM
 
it's about intentions
 
3 mins ago, by Bartek Banachewicz
@ThePhD if only you could have a function that would like take a variant and then a function taking the proper value typed as the result of the first one and return a variant of the result of that second function
 
If you read the minutes, you'll see how Bjarne claims it's impossible to understand it in 2 days.
 
you can map expected to 2-variant, but I'd like it to be explicit
 
People who are not aware of higher-order programming are funny
 
1:37 PM
also std::expected<std::string, std::string> is different than boost::variant<std::string, std::string>
 
std::expected implicitly converts to the result type, right?
 
dunno
 
that would be terrible
 
I don't even
I wish I could have a filter here
so that I could get rid of all of the C++ content
and keep the rest
 
1:39 PM
Like. If I have T result = compute_something<T>( 2 );, and it returns std::expected<T, std::fuck_you_error>, it should implicitly move / copy the result from the std::expected into my result (and throw if it's not available).
 
...
it just hurts to look at it
 
IMHO that's a useful feature for people who just want to let their application terminate if a result goes wrong.
 
it's a useful feature if you can't make proper abstractions
 
@ThePhD or, throw an exception then :D
that'll teach'em
 
nwp
@BartekBanachewicz have you ever used a programming language for an extended period of time and not found it to be shit?
3
 
Ell
1:41 PM
@ThePhD I still don't get it. Can you give me a use case for needing fast throwingexceptions
 
@nwp I think I'd say that about Lua
overall it's probably the best designed language I've used
it's a very simple one of course, which radically reduces the area for fuckups
all of the more complex languages that I've used have some deficiencies
 
@Ell Exceptions are purported to be the default way to communicate errors across libraries. The other way is error codes. Error codes are insanely fast compared to throwing exceptions. If you are writing code that wants to recover from an exception (bad_access or otherwise), catching an exception is so expensive that it's prohibitive.
 
nwp
@BartekBanachewicz weird that you just accept it as being a simple language instead of saying it is shit for not supporting [whatever]
 
but in the end this is just the testimony about how primitive our understanding of PLs is
 
@nwp fankly I haven't. :P
 
1:44 PM
@nwp well, I always treated it as a simple language for simple things
at the same time languages I demand more from dissappoint me on a much larger scale
but I have to give it to C++ that figuring out that it's shit took me a while
 
Lua code looks like transcript of violent police interrogation
 
inb4 I'll cry if I don't get the syntax I want
Syntax is only important when it's bad enough to be really problematic
 
nwp
@Griwes I'd say Python, C and C++ are all decent (didn't use anything else for an extended period of time). Even though they have issues they are far from shit.
 
if you think C is decent then you clearly don't know shit about languages
sorry.
 
Ell
1:48 PM
@ThePhD that isn't a use case :(
 
@BartekBanachewicz Are you always this rude to everyone?
 
Ell
The user is supposed to ensure an error doesn't occur right
 
@TomášZato no
 
Or is this some sort of humor I don't get?
 
@nwp Decent is a very strong word when it comes to programming languages. :P
 
nwp
1:48 PM
@BartekBanachewicz it is good at getting the job done, especially for people who don't care about programming and just need stuff to work (I don't count myself as belonging to those people)
 
@nwp it's not even good at that
 
C is way too simple (or, in other words, primitive) for me to ever consider it decent.
Python I can stand, but not for extended periods of time.
 
@nwp sorry, no. just no
> getting the job done
 
Maybe you guys should become programmers. Perhaps you'd be able to program a lot.
 
(As in, I can work on a python thingy for a week, but I need a break afterwards.)
 
1:49 PM
Python feels like someone had some nice ideas but then went to play football instead and figured out he'll finish them later
 
while figuring out the off-by-one errors in their "strings"
 
@nwp People who "don't care about programming" should not be programming.
 
@R.MartinhoFernandes becoming a programmer was what made me unable to program a lot
 
I know many artists like that.
 
I am kinda rediscovering myself in Arduino
 
1:51 PM
@nwp it's not even fast
 
@ThePhD Do like Boost.Asio.
 
how can a language be good for performance if it makes using data structures the worst duty ever
 
I think the most silly and observable shortcoming of C is lack of namespaces
 
nwp
@Griwes thats a lot of people you are throwing out, like electrical engineers and physicians. Despite their lack of passion they make some neat stuff.
 
@TomášZato lolwat
 
1:52 PM
@Ell My library used to throw exceptions for bad access because I could not return proper values. Catching these exceptions were the only way to continue flow control without crashing people's applications. Catching those exceptions were significantly more expensive than error codes; therefore, people who try to convince me to use exceptions as the default error propogation mechanic are clearly not interested in speed.
 
@nwp it doesn't mean that it's any better because of that
 
@nwp I don't care about passion much - but I care about them caring about programming, and not just getting the job done.
 
@ThePhD Why would it happen that you cannot return proper values?
 
Because caring only about getting the job done is what causes us to drown in completely shitty code.
 
@Griwes and shitty products for that matter
 
1:53 PM
@R.MartinhoFernandes Because some T is not able to be retrieved from the underlying backend.
 
Ell
@ThePhD what is bad access?
 
@ThePhD Er. Why do you need speed when doing that?
 
I don't need the speed. People who use my library need the speed.
 
Ell
If it's array access, why doesn't the user check it exists before trying?
 
1:54 PM
but do they
 
Generic "you", "one".
 
> Apples and oranges are in fact both delicious, sweet fruits. I don't see why people believe these to be the most incomparable things in the world. I prefer apples. How about you?
 
@ThePhD Maybe they need to fix their bugs instead?
 
this is what happens when you make products for gamedevs
5
 
If anyone complains that handling ogonek errors is too slow, I'll just tell them to fix their code.
I'm not screwing everyone else over your broken code.
 
1:56 PM
@R.MartinhoFernandes Perhaps, but (e.g., in my use case for a library that wraps a dynamic language's API) failure to retrieve / convert is a common case. And while to me just throwing is easy for me to do and makes my API boundaries nice, to them variant/optional/expected/error_code options are preferable.
 
And in the cases where handling the errors might be your primary focus, the API provides ways to do it both properly and fast.
@ThePhD failure to retrieve / convert is a common case? I'm sorry, it still sounds like a bug to me.
 
Ell
@ThePhD why aren't they checking before then? :(
 
@Ell speed
 
@Ell Because they want to check after!
 
Don't you know an if statement is extremely costly
 
1:58 PM
@ThePhD If the exceptions are only thrown in case of bad access then why would speed matter?
 
or something
 
Ell
If you expect the thing to be there and it itsnt, an exception is warranted. If you aren't sure, then you check.
 
Here's my check list:
Is it user input? Then errors are expected.
Is it external (say from a web request) input? Then errors are expected.
None of the above? It's a bug.
 
It's not like my API isn't throwing exceptions: the default error handling mechanism is a throw, or a straight up abort() if exceptions are disabled. My only point is that in the case where failure can be an option it should be implemented with error codes or an error handling system first, which can then be optionally wrapped up into something that tosses exceptions (e.g., if speed is a concern or something else).
 
I do that in ogonek, but speed was never a concern.
 
2:01 PM
Right, I need an e.g. on that speed example.
 
@ThePhD No, the criterion is not "failure can be an option".
The criterion is "will this fail in a regular user scenario in the finished product"?
 
That's a more pointed and descriptive way of putting what I just said, IMHO, but okay.
 
In the Lua case, I really don't see it happening in a finished product: any such failures will be bugs in the Lua code or bugs in the code that calls it.
 
I don't see it like that, especially in the scenarios I've seen Lua used.
 
It's the same reason you don't complain that the compiler doesn't produce code if you have a type mismatch.
@ThePhD I'm going to hazard that you have utterly failed to describe the scenarios, then.
I'm trying real hard to imagine what part of a game would have a loop that calls Lua code that constantly fails.
 
2:09 PM
Probably. But for me, one of the biggest scenarios was for checking if things existed using my API in C++. For example, int x = lua_vm["key1"]["key2"]["key3"];. In my API, if any of those keys don't exist, it will throw, which for the most part is fine. But, there was a need for people who wanted to use my API but not exactly crash if they accessed something that didn't exist, so rather than make them check if "key1" existed, and then "key2", and then slowly step their way down,
 
@ThePhD Checking if things exist with try-catch is braindead.
@ThePhD In other words, if checking is a use case, exceptions are the wrong tool.
Note how there's no mention of speed there.
map::find doesn't throw either en.cppreference.com/w/cpp/container/map/find
 
Right, exceptions are the wrong tool. That I reaffiirmed my belief that they are the wrong tool by observing one of the consequences (the gross speed deficit) is neither here nor there.
 
@R.MartinhoFernandes (Files being the textbook exception)
I'm very punny.
 
FWIW, I implemented things synonymous to map::find and map::count in my API before I investigated the speed; the good design came first, the benefits of it were further investigated later.
 
Yeah, but assertions like "exceptions are slow [but who cares?]" and "exceptions are slow [when misused]" don't have a lot of value.
 
2:18 PM
You're right about that. I should have framed my discussion differently.
 
In ogonek I designed a (rather complex) custom error handling mechanism because dealing with broken input is a use case, not because exceptions made it slow.
(And exceptions are the default if you want to avoid the additional complexity)
Actually, I just realised it's actually layered in complexity.
 
Customization points for the win though. :P
Error handling seems like one of the more important category of possible customization points.
 
Still, relating this all back to what @Ell was asking about, the reason I think that SG14 pushing a "Fast Exception Handling" or at least investigating how to improve it's performance is good, is that C++ enthusiasts and experts (myself included) generally bill exceptions as the go-to for keeping the library system and the errors easy to deal with.
 
There's the zero-complexity option: do nothing special and you get exceptions; then the simple option: pick one of four different pre-packaged (and extremely common) strategies; and then the full-blow option of writing the entire error handling code yourself.
I should brag blog again about my design ideas.
 
If exceptions get faster, then people stuck in rock-hardplace situations with having to use a library that don't provide a customization point don't have to eat a really hard execution deficiency as well.
 
Xeo
2:22 PM
@R.MartinhoFernandes blag
 
I was thinking, is there a case in the IEEE 754 floating point standard encoding where an operation between two of said floating point numbers would yield an error of 0.005 or more?
 
Yes? Add the largest representable integer to itself (the error will be 2.0)?
Unless you mean 0.05% (i.e. relative error)
 
@Shoe the errors are specified in ulps because they're relative to the magnitude of the numbers the operations are done on
 
Actually, there will be no error in that case.
Make the largest representable integer x. Add x to x-1. The error is 1.0.
 
@R.MartinhoFernandes I was thinking in terms of money so first 2 decimal digits
 
2:25 PM
@Shoe If it's absolute error, then yes, there are many easy to construct examples. See above.
Also ugh.
I don't mean largest representable integer.
 
don't use floats for money
 
I mean the largest integer for which itself and all smaller integers are representable.
(So 2^53 for double)
 
I forgot what I was doing.
 
2^53 + 2^53-1 is 2^54-1, but 2^54-1 is not representable, so you get 2^54 instead.
 
@milleniumbug Yeah, due to errors no?
 
nwp
2:28 PM
so, get 2^53 cents, add another 2^53-1 cents, hope your bank calculates in cents with doubles, get infinite cents!
 
@R.MartinhoFernandes I see
 
@Borgleader ^ We caught up to OOLua in member function calls now.
^ member variables still need work, but... we can get tehre.
 
@Shoe What operations are you gonna do with the money values?
Depending on that, integers might do just fine.
 
nwp
@ThePhD "unsupported" looks good
 
I.e. use units of cents (or whatever the smallest discrete unit you'll use) instead of units of ¤
 
2:31 PM
@nwp Yeah, it's a lot better than just a bunch of emptiness.
 
@R.MartinhoFernandes I dunno, I was just thinking in general. I had heard about the "don't use floating point for money" thingy and I wasn't sure why that was. I mean I suspected because it was due to errors in representations, but I couldn't make an example as to where it would matter
Now thinking about it, especially for very big numbers you have great errors
 
@Shoe That's one problem
 
I honestly don't know how to get faster than OOLua anymore, though.
 
Yep. Absolute error is proportional to the operands.
 
At least, for Member Variables.
 
2:32 PM
I was just making sure, that's all. No real use case or anything.
 
the other is just the strengths of FP don't apply here
because you don't multiply a currency with another currency
 
@milleniumbug But you multiply with interest rates, for example.
 
I'd use fixed point or fractions
 
Aren't the strength of FP only that you are extremely flexible in the range of values you can represent?
Like as opposed to fixed point numbers.
Where you have to declare exactly how many digits of precision you want (or bits I guess)
 
@Shoe Yes, but that comes at the cost of not being able to represent all values in that range.
(That's an inaccurate phrasing, I know)
 
2:35 PM
Yeah exactly
Is there something else with regards to multiplication that I'm missing?
 
@Shoe That's basically integers :P
 
ye
 
q syntax best syntax.
 
@Shoe In floating point you can multiply 0.01 with 0.01 and not lose any significant digit. In fixed point you run into trouble like this when the results have more digits than the operands.
0.01 * 0.01 = 0.00, with 100% error (or is it infinite? whatever, it's bad).
 
Well, yeah, because you have a very limited range of possible values
 
2:46 PM
s/values/precision/
 
> If you’re coming from an imperative background, you may find yourself using vars everywhere when you start programming in Scala. This is ac- tually a scientifically recognized disease known as varmonia.
 

« first day (2112 days earlier)      last day (2840 days later) »