« first day (3669 days earlier)      last day (1286 days later) » 

12:02 AM
obviously can't speak for bob but would read that as:
yesterday, by Mark R
I'd think:

$foo = [
AccessEnum::BASIC => 'Basic',
AccessEnum::ADVANCED => 'Advanced',
AccessEnum::BLAH => 'Something Else'
];
 
12:17 AM
Which we can't do with objects. And I think is less useful anyway.
If you're, say, populating a select box:

foreach (Suit::list() as $key => $value) {
  printf('<option value="%s">%s</option>\n", $key, $value->label());
}
 
It's a thing people would expect to be able to do in source code easily.
@Crell so the values would be embedded in the enum some how?
 
Yes. They're objects with some kind of internal stored primitive. Details I leave to @IluTov to figure out. :-) If you want another string, say a human-friendly label... make a label() method. That's why we're making them objects.
 
$languages = []

$languages['english'] = [
    AccessEnum::BASIC => 'Basic',
    AccessEnum::ADVANCED => 'Advanced',
    AccessEnum::BLAH => 'Something Else'
];

$languages['french'] = [
    AccessEnum::BASIC => 'élémentaire',
    AccessEnum::ADVANCED => 'Avance',
    AccessEnum::BLAH => 'Autre'
];
I'd expect to be able to do that...
 
Impossible if AccessEnum::Basic is an object.
 
Yeah, so I should vote no on the idea then?
 
12:24 AM
Enums as glorified constants are mutually exclusive with Enums as ADTs/objects. Because something cannot be a glorified constant and an object at the same time. At least not without a ton of extra engine work.
I'm saying the thing you want to do can be done in other, more robust ways.
I suppose if you really want, WeakMaps support object keys.
 
I wouldn't care if it was allowed only due to engine magic...
rather than being something that any object could be used for.
 
enum Access {
  case Basic {
    public function englishLabel() { return "Basic"; }
    public function frenchLabel() { return "Elementaire"; }
  };
}
I defer to Ilya on whether that's possible at all. But I think it would just create confusion.
 
@Crell Yeah, no.
 
Esp when 1) There are better options and 2) WeakMaps exist if you really really need that map instead of using a method.
Or you could use a match instead of an array.
 
As I said, I think it's something I would expect to be able to do, and I think other people would expect to do.
 
12:27 AM
Really, there's plenty of options here that do not involve enums being glorified constants.
Only if you're coming from a glorified-constant language, I think.
C or C++, sure. Rust? Swift? I would have to double check to see if that's even possible.
(I honestly don't know.)
 
> C
they'd implement them as a macro...
 
That's the point I keep trying to get back to. :-) Enums are implemented in very different ways in different languages, often mutually-exclusive ways. The more holistic and robust approaches are the more capable and powerful. That's what we're aiming for.
 
And yeah, this might be a "if you want to do that, you should look at using a preprocessor" type of problem.
 
But that means letting go of "enums are just glorified constants", which is simply not going to support what we want it to do.
 
@Crell Cool. You'l telling me why it was chose - which I get. I'm telling you what people are going to have a problem, imo.
 
12:30 AM
So how can we make a stronger case for "no, really, glorified constants are not enough, that's why we're not doing that"?
 
to be clear, I don't have a solution here....just pointing out problems.
Take every internals voter through a 1 month coding bootcamp in a functional language?
 
It's not a procedural vs functional question. Kotlin, Swift, and Rust are not functional languages.
At least not moreso than PHP is.
 
Although it is a mess of a language, being able to do the things that PHP programmers expect to be able to do, despite some people programming in quite different paradigms to others, is one of the reasons why PHP has done okay.
 
It's the assumption that all/most/the relevant programmers "will expect to be able to use an enum as a glorified constant" I don't see the support for. We don't have enums now. The closest languages PHP devs are most likely to also be using would be Javascript (has no enums) or Python (has object-based enums, ish)
Internals devs know from C, but rank and file PHP devs likely don't. Not to the same degree as internals, anyway.
If we go in with the statement that enums are fancified objects, and describe them as such, people will expect them to be object-y.
 
@crell You could make a tradeoff here. If people want to use an enum as a const, then they have to do a bit more work where they define it.
 
12:43 AM
That's essentially the latest proposal, although it's not completely as a const. Just something that folds to a primitive in more predictable ways.
 
btw you can just say constant. they have enough glory already...
 
:-P
 
is there a link for the words that I can pin btw? keep not being able to read it...
 
https://github.com/Crell/enum-comparison/

the rfc.md file is the working copy.

https://github.com/Crell/enum-comparison/pull/25 - The latest proposal for handling primitives, as of yesterday, currently being discussed.
 
ok to pin?
well, let me know if it's not...need to sleep soon...
 
12:52 AM
Oh, pin for the channel. Let me make a new message.
 
where i might dream of both an async keyword, and a const keyword for stuff that can be compile time resolved....
 
Enumerations/ADTs work (in progress):

Research: https://github.com/Crell/enum-comparison
Current proposal: https://github.com/Crell/enum-comparison/blob/master/rfc.md
3
 
@Crell what does it do for function foo($v) { pick_a_card($v); }?
 
What does which do?
If pick_a_card() is typed for Suit, then you can pass one of those 4 values to it. If foo() is untyped, then it can take anything, like any mixed.
 
@Crell foo() is untyped and pick_a_card() is typed for Suit
 
1:06 AM
If you pass an int, then foo() will be fine and pick_a_card() will throw a TypeError, or InvalidArgument, or some kind of "nope" throwable.
 
ah, my bad, I thought the pick_a_card('Spades') would be a compile-time error
 
me dumb.
 
Ah. I don't think that's a compile time error now (if it expected a Suit object). So it would error wherever it would error today.
 
laters.
 
I think only inheritance mismatch type errors happen at compile time, don't they? This would be no different. (Though static analyzers could catch it easily.)
 
1:21 AM
Titles in HTML tarball needs improvement. ・ Unknown/Other Function ・ #80302
 
2:02 AM
hey, dumb question..... do I need to sanitize $_SERVER values like the IP and UA?
...could someone use those to inject sql?
 
@ashleedawg useragent definitely, it is under user control. google for 'curl set useragent' to see how.
 
@ashleedawg Look into CSRF and XSS, SQL injection isn't what you'd be worried about in those cases
Also XXE, but that's if you're parsing XML
 
which IP address do you mean... REMOTE_ADDR at least can be set by people who don't have access to your actual computer. e.g. a firewall - stackoverflow.com/questions/34639205/…
Something something, that would be a good argument for a literal flag RFC...
 
@ashleedawg owasp.org/www-project-top-ten I feel like this may be of benefit
@Danack trouble sleeping? :/
 
@ashleedawg btw, not a dumb question. Just one that's really not obvious unless you have the appropriate knowledge of internals...
 
2:14 AM
thanks
 
1 hour ago, by Danack
where i might dream of both an async keyword, and a const keyword for stuff that can be compile time resolved....
@Tiffany no trouble, fast asleep.
 
This is all a dream... when you wake up, you won't remember it...
 
i knew the HTTP_USER_AGENT can be whatever the sender wants but I figured IP has to be an IP
 
That's why I use source control....
 
could you elaborate?
 
2:17 AM
@Crell Nah, I wish for special casing enums here, whether it's an object or primitive or whatever - that's an implementation detail - And obviously this shall only work for singleton enum values (no associate cases)
 
@ashleedawg it can be a comma separated list of machines that have forwarded requests. I have no idea if this is actually standardised or not. That SO question introduces it as well as I can.
 
@Danack git reset HEAD --hard
Oh, flip HEAD and --hard
 
nah, just delete the dir and reclone the repo....
 
@bwoebi match() is the ideal there, in some fashion to be worked out.
I have a proposal in the document now, which may or may not be the best idea.
 
@Danack ... I've done that more times I care to admit ...
 
2:19 AM
@Danack thanks 🎃
 
@Crell I don't think match is a good catch-all solution for that
sometimes you want to manipulate the mapping itself
if you go pure functional, then yes, it is unnecessary
but the reality is not pure functional
 
Sure. Getting a list of values should be trivial. A list of primitives to values is also trivial. It's just objects-as-keys that is not-a-thing in PHP.
Unless you use WeakMap.
 
@Crell I don't care whether it's a thing.
Note that I am only pointing to the singleton enum values
that enums are actually objects is an implementation detail
arrays shall support enums as key
whether they are objects or not.
 
That's a decidedly not-small change with very deep implications for the whole language.
And I'm still not convinced that it's a need in practice.
 
@Crell I disagree that it has very deep implications
some array functions will need care
 
2:24 AM
Such as?
 
but that should be about it
@Crell implementation wise at least, as we currently have ZEND_HASH_FOREACH_KEY() and such things which assume key is either string or integer
but user-facing? not much
 
I am relying on Ilija for just how scary "such things" would be. I defer to him on that front. :-)
 
@Crell At least I reject arguments about that being a deep change in the language or it being an invalid request given we do not support objects currently
I'm open to discussion about the need, about the possible perf impact (I assume it to be small, but it's very hot code… so…)
 
Let me rephrase: "Enums as array keys", when enums are objects, turn into "objects as array keys", which is a non-trivial RFC unto itself.
 
@Crell nah, it's not equivalent - enums have a trivial hash for example, the hash of their string name
objects in general are mutable though
 
2:28 AM
Only if they're not associable.
 
and that's then sort of different
@Crell yes, I only talk about non-associable cases
 
If you have an associable case, then there's also their associated values to worry about.
 
otherwise their content may be objects and whatever
exactly
 
I am already a bit uncomfortable with the amount of "works in this case but not that case" we have already. :-)
But Ilija really doesn't want to split the use cases into separate syntaxes. I am undecided on which is the worse strategy.
 
@Crell well, it's actually quite different, so you'll get quite different behaviors too
whether we group it under enum yeah… no idea :-D
 
3:10 AM
Simple enums as array keys would be pretty nice.
Was looking through C++20 additions and saw something that may be worth thinking about for PHP too: using enum.
class Bikeshed {
  function paintIt(Color $color) {
    using enum Color;
    switch ($color) {
      case Red:
      case Blue:
      case Green:
        // yadda yada
    }
  }
}
I can think of some reasons why it my not be too easy to do, but haven't thought them all the way through, so no verdict as to feasibility from me yet.
 
3:25 AM
What's that do?
 
@Crell brings a set of consts into the function....
something something future scope....
 
Oh geez.
 
A lexical use could be considered a defined fallback. If there's no named class with the that RELNS, then we prepend use statements from the lexical scope till we find one.
Doesn't strike me as hard at all, really.
 
@Crell Still a better idea that the current US system of government...
 
Hang the use list off the op_array and zend_find_class can walk that
@Danack Just breathe. In 72 hours we'll know as close as really matters what's going to happen.
I mean, we don't know what'll happen during the lame duck period, nor how much of a tantrum he'll throw when come Jan 20th, but....
I got my popcorn and my radiation suit. I'm good.
 
3:42 AM
Sadly, I think there is a significant chance Trump will stay as president.
 
I might stay slightly nervous a little bit longer than that. The UK's going back into lockdown again, and there will a full 8 days for businesses to implement the changes needed for Brexit. And that's 8 days over christmas.
 
11% if you believe pollsters who got 2016 massively wrong.
Oh yeah, the UK is fucked, no doubt.
But that's a train wreck that's been building for four years.
/me thinks of the us presidency.... "Okay, fair point."
 
yeah....country level karma......woot.
 
We at least course-corrected in the midterms and are vectoring towards a chance of redemption this season.
Y'all are actually accelerating into the crash.
Like if you auger into the ground hard enough, you might crack your way out the other side of the Earth.
Which... Jolly good effort. Cherrio and pip pip, y'all
 
At the risk of making a prediction about the future, assuming they actually count the votes, then I reckon Texas will be bluer than Pennsylvania....
 
3:48 AM
I hold out hope TX will eventually turn blue, but I don't think this election is it. By 2040 for sure though.
 
My guess is based on the way that because Texas has been red for 30-ish? years, for many of those years people who would have didn't bother to vote, as it's been a 'waste of time' for all their adult life.
Also, Texans may have realised Trump is an all hat no cattle kind of guy.
btw, if we could borrow Obama for a bit, that would be great.
 
morning room
 
Honestly, for all appearances, the UK appears to LOVE Barack Obama. Like, more than any Dem voter in the US. It's kinda weird. I'll bet he could sweep an MP seat he picked, and get the PM job even if he's not in the right party.
Y'all got some SERIOUS bromance going on for him. Or at least did last I was there... which was nearly 2 years ago at this point.
Fuck. I hate having not travelled all year (nearly so).
 
Applecheer ・ *General Issues ・ #80303
 
4:04 AM
@Jeeves .onion.win == spam.
....there's meant to be a star in there.
People in the UK like people who are good orators, youtube.com/watch?v=fZ26SmDzxHE
 
4:31 AM
@Sara Your assuming Republicans don't find a way to pander to millennials the way they did to Gen-Xers.
 
@Trowski I'll say this here rather than a ticket - please check with martin if it's okay for his name to be used with something like "Please note, this implementation based off the work of MS and he has been a nice guy helping you".
as imo credit should be given.
 
@Danack Well, his name is in the code license it because I forked some of his code. I'll definitely reach out and see if he wants to be noted elsewhere. I'm not clear if that means his name should be on the RFC, as he hasn't contributed to that.
 
doesn't hurt the RFC to have it, and makes someone feel nice.
 
Sure, I have no problem with that. I doubt I would have figured out the fiber switching + zend engine stack swapping without his code as a basis.
 
"if he wants" would be better asking as "if it's okay".
@trowski I poked at words - the diff is pretty unreadable, so just read it at: github.com/Danack/fiber-rfc/blob/master/rfc.md ? Also there are several todo notes, but I'm going to say nn for now....
 
4:59 AM
@Danack Thanks, appreciated. I like what you've changed so far. Also thank you for the issues/todos.
 
5:24 AM
I'm glad I did a big shop a couple of nights ago before the announcement x_X
 
Another shutdown out there?
We are next
 
Yeah national lockdown
 
Is that bad again.
2nd wave
 
We're well above second wave, we're "someone let an asteroid hit 500 miles off the coast and there's a massive tsunami heading our way"
 
lol
Everyone extra relaxed out here too.
I think sooner or later we will have to do that too.
 
5:28 AM
apparently there's been a raid in sheffield with people throwing themselves out of windows when the police turned up because hundreds of people were at a secret rave
How stupid can you be... on all fronts ._.
 
haha
They are having those out, here again, bars are opened with restrictions purposively. Yeah right, that shit travels in the air. Someone on I know got it really bad, now she won't be the same for the rest of her life. She gets dizzy and fatigue.
Provably messed up her lungs bad.
Maybe her brain
 
I think what this pandemic has shown, is just how stupid and entitled a lot of people are... I mean before it was widely known, but now we have solid evidence.
 
:P
 
I hate that, is like they choose to block it out like it does not exist. Kinda like when you are playing poker and u go all-in on this year. Like let's live but if we get it and it fucks us up who cares might as well have fun lol.
 
@MarkR is asteroid really hit the earth?
 
5:42 AM
@Linus We can only hope.
 
6:07 AM
@Linus apparently there is a “not small” one that is on a dangerous orbit that could be scheduled for 2060-ish. Though how likely it is to hit can’t be calculated accurately until it completes more orbits due to how chaotic orbits are.
 
I do hope we go grab that giant metal one, either we accidentally crash it into earth, or we manage to bring it into an orbit we can mine for a few hundred years, either way, no more need for open cast mining
Not entirely sure how we're going to be able to even dent the inertia of a 250km wide ball of metal, but who knows
 
And that in other news that is in danger of getting lost, a second type of amino acid has been detected on venus, so really good chance that it’s evidence of life on another planet. 2020 sure is busy...
 
Did they find any other potential causes for the existence of the other biomarker yet?
 
6:23 AM
Don’t think so. I dont have the link to hand but i saw it on a youtube channel called what the math, and i think they said both of them were at a similar height in the atmosphere, but also no indication if it’s just a chemical reaction rather than bio.
 
6:50 AM
@Danack yeah i read that news it's was around 2068, but there is also news and links around oct or nov also.
 
Seems like we all read the same news.
 
@SalOrozco nah,just random news popping up in google discover on mobile chrome :D
 
That's where I read it too.
 
7:29 AM
posted on October 31, 2020

I have good news and bad news. The good news is today's comic is absolutely true: My site got more hits than yours. I know I know. You're jealous. While your site stayed up and running, my visitors were clamoring for so much content, the server shut down. I guess some of are simply more popular than others. The bad news: It was a bot attack. Around 4am on the 7th, my site st

 
 
3 hours later…
10:37 AM
Morgens
@NikiC not sure how much work it is for you, but could you build a php8 dll of scalar objects for me whenever you have some time / can be bothered?
 
11:00 AM
setCookie() doc has given expiry in sec, but shows it as minute ・ Documentation problem ・ #80304
 
@mega6382 All good as long as you we did everything for hacktoberfest we can improve on them :)
Maybe we should go through them one by one
 
11:35 AM
@Danack REMOTE_ADDR is always a valid IP (of the last hop in the request flow) address though
@ashleedawg Correct for REMOTE_ADDR
 
11:52 AM
@LeviMorrison I'd propose something like match (Color $color) { Red, Blue => something, Green => another thing } \cc @Crell
 
@bwoebi Instead of making enums special and allowing them to be used as keys, what do you think about a Hashable interface that allows making any object a key? (akin to Swift and Rust) Then we'd just auto-implement the hash method for enums.
This could also be moved to a separate RFC.
 
@IluTov That does not make sense without an Equality interface as well
Which … sucks.
 
@bwoebi I mean, the same kind of applies to equality. Instead of making enums special, maybe an equality interface is the better approach. As you've mentioned before, this does break some assumptions like $a === $b meaning spl_object_id($a) === spl_object_id($b).
I don't know if that's a problem or not.
 
@IluTov right now I'm only talking about the non-associable singleton enum value case - but well, associable enums still would be weakly equal, which is fine
as all their properties should hold identical values
(I mean case Optional::Some(42) == Optional::Some(42) should already hold without us doing anything special)
@IluTov and I was mentioning that in the context where we were evaluating doing individual instances for the non-associable case
which we rejected (?)
 
12:11 PM
@bwoebi What about ===? I'm not sure we should have to rely on == (as for example Optional::Some('0e1') == Optional::Some('0e2') would evaluate to true).
 
I don't know :-/
 
@bwoebi So, do you see any other fundamental problems with an Equatable interface? It could also break the assumption that $a === $b proves that $b === $a (as your implementations of equate might differ in $a and $b (unless we only call this method when the two objects are of the same class).
 
@PeeHaa I don't even have a Windows system anymore ^^
 
@NikiC :-)
 
@IluTov We would not allow overloading === for sure.
 
12:22 PM
@NikiC So, do we want Optional::Some('foo') === Optional::Some('foo') to equal to true? (assuming those are two different objects)
 
You still have a windows build system set up @Wes?
 
If we don't, how do we compare those objects without having to rely on == and its quirks?
 
@IluTov How do you currently compare those objects? :)
 
@NikiC The implementation isn't very far along. There's currently nothing special about the object comparison.
The RFC isn't very clear about it right now either.
 
I mean, how do you compare normal objects, no ADTs involved
In other words, I'm not sure I understand the relation
FWIW I have no problem with overloading for == (well, apart from a very long list of technical caveats), but I don't think we should ever allow changing === behavior, as that removes the last refuge for "no bullshit" comparison behavior
 
12:27 PM
@NikiC Haha, sorry I misunderstood the question. Well usually probably with a user-land method but having to always implement that by hand seems kind of tedious. Enums are data objects, I feel like that should happen automatically. Of course we could also auto-implement an "equate" method and just call that directly instead.
 
12:42 PM
@NikiC For enums, should you ever have to care if you're dealing with the exact same instance? They are immutable anyway. I can see how this could be problematic for other objects but I'm not sure if that's our responsibility or that of the user. C# for example has a separate ReferenceEquals method for when the operator is overloaded.
But yeah of course it breaks the assumption that currently holds true.
 
cmb
1:04 PM
@PeeHaa I can do a build. Latest HEAD? x64/x86? NTS/ZTS?
scalar_objects is not PHP 8 compatible yet. /cc @NikiC
D:\Users\cmb\Downloads\scalar_objects-master\scalar_objects.c(117): error C2039: "no_separation" ist kein Member von "_zend_fcall_info".
C:\php\php-8.0.0RC3-devel-vs16-x64/include/Zend\zend_API.h(43): note: Siehe Deklaration von "_zend_fcall_info"
 
Hi. I need some guidance
I need to upload image to database and user must upload a minimum of one and maximum of three.
 
1:21 PM
@cmb 64zts
<3
No stress btw.
 
What is the best way to store them in database? Havin 3 seperate columns for images or one? I have to display the the images according to number of images uploaded by the user!
 
@RifkyNiyas Best way to store images in the database imho is not storing them in the db
 
And should I compress the images? Will there will be considerable amount of loss in quality?
@PeeHaa Ok. Is it by storing in seperate folder in database? And storing the name of image?
 
Yes
Not sure what separate folder in db means though :)
 
sorry. I mean seperate folder in server?
 
1:25 PM
Depends on volume and use case
And by volume I mean number of files as certain filesystems may choke when there are a lot of files in a directory
 
@PeeHaa Ok. How to store 3 images in DB?
 
Either have 3 columns or a separate table linked to the main table
Advance of the latter is that you are more fexible
 
Ok. Thanks
Now should I do compression?
 
Depends whether it is worth it. Looking at the server side bandwith and storage is pretty cheap
 
cmb
just commenting out the no_separation assignment, let's me build the DLL, but almost all tests segfault (no OPcache involved). :(
 
1:31 PM
It could be nice to do for your clients or maybe even putting some cpu time on it to compress might also help your costs
 
Ok. will there be a considerable amount of loss in quality of the image. Will things screw up when displaying the images?
 
Depends how you "compress"
 
ok. suggest me a best method to do. If possible provide some resources to learn it
 
There is no best method
It depends on a lot of factors
 
ok then my requirments are to compress with a little quality loss
 
1:34 PM
Read about lossless and lossy compression of image
@RifkyNiyas It all depends on a lot of factors
Image quality, type, even what the images themselves represent
 
ok. how about doing it with php? lossless compression?
 
This is not reading about it
This is just asking the same question over and over again
 
@PeeHaa Apologies. Extremely sorry
can we do it with javascript?
 
That's still not reading about it
:-)
 
once again apologies😥😪
 
2:12 PM
@cmb What's the difference between a constructorsynopsis and a methodsynopsis? Is it the return type?
 
cmb
@MateKocsis yes; constructorsynopsis must not have a (return) type
 
Thanks! I'm currently working on the changelog generation, and just noticed constructorsynopsis for the first time
 
2:52 PM
@cmb Oh right, let me check if it's easy to fix
 
3:03 PM
@bwoebi If we can have something like using enum I bet it will be used in more places than just switches.
/cc @Crell
 
The match($color) { Red => 'red'}; etc. thing is already planned; modulo it being Color::Red. Mainly to minimize potential scope collision.
If we can find a way to safely omit the type in some cases, I'm OK with it.
 
@Crell Hm... This works well in Swift because they have strict typing. I'm not sure it's a good fit for PHP 8 (as the Red could come from any enum). Also, this syntax is actually already valid in PHP 8 (Red being a constant).
Swift actually uses a dot to diambiguate (e.g. .Red).
But still, the fact that Red could come from any enum makes me a little uncomfortable.
 
@cmb I've fixed the PHP 8 support
 
Right, which is why I think we'll probably need it to be always-qualified. And I'm OK with that.
But I'm also OK with not needing that if we figure out a way to do it.
The primitive equivalency issue is the larger one, though. I'm still not sure we have that right. And I'm fairly sure we won't be able to get it "right" by everyone's definition of right...
 
3:22 PM
@cmb where do you find the doc templates again? I'm looking for the Error section one for the Win32 doc PR
 
cmb
@NikiC thanks! All tests are passing now. @PeeHaa, just sent you mail to protonmail (hope it goes through).
 
Awesome thanks!
 
@cmb Thank you :D
 
3:39 PM
Call with the splat operator ignores by reference requirements ・ *General Issues ・ #80305
 
4:00 PM
@Machavity apropos of nothing, do you have a tech orientated version of why "asking for help, getting it, and then deleting the conversation" is bad.
 
 
2 hours later…
5:44 PM
morns
 
@Danack The help center page on the subject is pretty good
 
@PeeHaa yes, please
 
@Machavity Thanks, though s/good answers/answers/ probably. As hypothetically someone might think that the answers they have received are not 'good', and so that advice wouldn't apply.
 
@Danack Well there's always Jon Skeet I suppose. There's also the MSE deletion FAQ which has the section "If I flag my post with a request to delete it, what will happen?"
 
@LeviMorrison my problem with that is that it's hard to scope that
and it just adds another ambiguity - is it a constant or does it happen to be a name of a value of an imported enum class?
it's not obvious
 
5:59 PM
something something, it would be better to bring the enum into the whole package as a set of constants that could be used anywhere in the package...
 
6:19 PM
Something something let's just not make them constants or bare values and that problem goes away. :-)
 
I DENY ANY KNOWLEDGE
 
Amphetamine is a hell of a drug ;-)\
 
Super spreader.
 
Was something similar in sheff a couple of nights ago... our country is utterly fucked.
 
6:23 PM
 
:P
 
 
4 hours later…
10:39 PM
@Trowski "This exception cannot be caught by user code." We still have those?
 
11:17 PM
@Danack As implementation details, yes. Ideally the error output should be changed to look like a fatal error rather than an exception that could be caught.
 
so....would it be okay to just say 'a fatal error that terminates the script' ?
don't see why that needs to be a class that has a name.
 
plz no uncatchable runtime errors :( think of the logging!
 
@Trowski even if they are implemented similarly, separating the unrecoverable part from the 'throwing into a fiber' part would be easier to understand.
 
@Danack The exception object can become the previous exception if a finally block throws.
If this was in core that maybe be unnecessary, but as an extension I don’t think I have a choice.
In regards to the RFC, I could perhaps omit it later if I find I can eliminate it. I’d like to gage interest in the proposal before I do that I think.
 
11:32 PM
@MarkR Eventually, but in the transition there it's helpful to have them.
Implementing exit as an uncatchable error was pretty helpful, for example.
 
@MarkR You can “catch” this exception in the exception handler and log it.
Catch blocks ignore it though.
 
@Trowski So, let me see if I understand. The engine would throw FiberExit in a Fiber when an error has occured. In the code being run in that fiber, a finally block could throw a different exception. After all the fibers have had the FiberExit thrown into them, the original thread would do a fatal error and terminate the script?
 
@Danack Essentially yes. Generators behave similarly.
 
@Trowski Is the thing with the finally block and generator related?
 
11:47 PM
@Tiffany That is the way the engine handles throws in finally, yes. So that’s why FiberExit can be attached to an exception.
I could modify core to treat it like UnwindExit, which would not do that.
 

« first day (3669 days earlier)      last day (1286 days later) »