« first day (3705 days earlier)      last day (1250 days later) » 
00:00 - 17:0017:00 - 00:00

12:39 AM
@Derick: It would be great that when the xdebug 3 xdebug.mode setting is set before setting xdebug.enabled to not see the error message so to have one configuration that behaves the same on both versions:
xdebug.mode=off
xdebug.default_enable=0
no idea if that is feasible thought. so just let me know if this is worth of reporting.
 
 
1 hour later…
Wes
1:57 AM
cancellation token doesn't seem to do absolutely anything :B
@Trowski not quite because i have to figure out how to cancel a pending ->receive() and it'd be great if that was automatic as opposed to me while()'ing it very clumsly
 
2:28 AM
Hi. I have a database table dump file that has 1 extra column. Will that return an error if I try to import that using phpmyadmin? How can I remove that extra column?
 
Wes
3:19 AM
i finally managed to progress
it sux, but it works
 
@Wes Why do you want to cancel a pending receive?
 
Wes
because i'm never going to get a new message
 
But you don't want to close the connection?
 
Wes
i do want to close the connection
 
So then just close it?
 
Wes
3:32 AM
i get an exception on receive() then
 
Uh… really, that shouldn't be the case.
Unless you use an error code for close.
 
Wes
what i have right now is this:
        asyncCall(function(){
            RECEIVE_MESSAGE:

            $message = yield first([
                $this->_connection->receive(),
                $this->_cancelPromisor->promise(),
            ]);

            if($message === NULL){
                $this->_connection->close();
                return;
            }
should i try again to close like you are suggesting?
 
$this->connection->close() should resolve the promise from ->receive() with null.
 
Wes
ah, so the exception i was getting was from somewhere else :B
ok, lemme try again. thanks
yield $message->buffer()
probably from here
 
Yes, if you are streaming the message body that throws because there's not a lot of choice otherwise.
 
Wes
3:48 AM
unrelated, i am running a process from tests; if a test fails that process will stay open until i open proc mon and kill it manually. is there a way to kill a previously opened process when i run tests again? like, i save the processid somewhere, and when i run tests again i try to terminate that process if it's still running?
 
Using amphp/process?
 
Wes
yes i am using that
 
Huh, interesting. I thought the destructor would kill it.
Can you call $process->kill() anywhere, such as a finally block?
 
Wes
maybe it does, but what about fatal errors?
i am getting a lot of weird stuff when i run stuff through phpstorm tbh
i'm not sure what's going on
> PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
 
@Wes No clue about that.
@Wes I suppose that could be a problem. You could store the PID in a file and kill it on start.
 
Wes
3:56 AM
is it possible that's caused from windows's amphp .exe file... what's called?
processwrapper
but again if i run tests from a plain console i get no such error
must be phpstorm doing some weird stuff
 
I know nothing about how that works, that's @DaveRandom's territory.
 
Wes
so a process gets terminated when the Process object is gc'ed?
 
It's suppose to, though I have definitely seen that go wrong.
A fatal error sounds like a situation where it could go wrong.
 
 
4 hours later…
Wes
8:10 AM
is there a way to prevent phpunit from buffering the echos of a test?
 
9:07 AM
Good morning ladies and gentlemens
 
9:37 AM
@Trowski @Wes yeh it's not super robust that
it's not very efficient either
it should be a daemon really
instead of loading the entire VC runtime for every invocation
 
9:49 AM
Good morning, what's a good tool for php api documentation generation (html or dynamic html/js)? Most stuff I can find was abandoned 3-4 years ago.
 
10:04 AM
I came up with an alternative routing method, apparently it seems good, but I'm suspicious because a lot of people don't do it the way I did, how do I know if it's good or bad?
 
try it, see it if works, see if it results in maintainable code
and stop worrying so much about what other people think of things and start worrying about whether they work for you :-P
 
Hi
@Wes I think you can write to stderr with fprintf()
 
Wes
@DaveRandom what's its purpose exactly?
 
10:19 AM
It seems good!
I care about other opinion because maybe in the future other people will use the code I wrote
 
Wes
why does phpunit even bother to ob
 
btw, the related question is here: stackoverflow.com/questions/65168040
 
@Wes in order to present output per test when reporting the results.
 
@makadev phpdocumentor 3 should still be maintained?
 
Wes
so tl;dr of the past few hours, terminating a process doesn't necessarily terminate it, prob because it runs a subprocess or something like that, right?
 
10:22 AM
yes, the parent proces will go zombie
 
er
the child process you mean?
a zombie process is a process whose parent hasn't called waitpid(child_pid) on it
@Wes depends on how it is terminated, and which behavior you're experiencing exactly
is it that your process isn't terminated or that another process was created and you only terminated one?
 
@Derick looks promising, thx
 
@FlorianMargaine Yes, that's what I meant :-) But if you terminate a parent which hasn't called waitpid it turns into a zombie too
 
@Derick "it's complicated" :P
if you terminate a parent that didn't waitpid, the child process is typically re-parented to the nearest "parent of all abandoned children"
I hate this language, fwiw
          A subreaper fulfills the role of init(1) for its descendant
          processes.  When a process becomes orphaned (i.e., its
          immediate parent terminates), then that process will be
          reparented to the nearest still living ancestor subreaper.
like, come on.
 
yes :D
 
10:35 AM
@Wes it "converts" the blocking process pipes to non-blocking TCP sockets
but it does it very inefficiently, it starts a new proxy process every time and it's one thread per pipe
 
fyi php 8 supports attaching sockets directly
That requires the program to correctly work with socket stdio though, so not a universal solution
 
morns
 
openssl_pkey_get_private cannot parse private keys. Works in 7.4 ・ OpenSSL related ・ #80489
 
 
1 hour later…
11:52 AM
@NikiC "As "enum" becomes a reserved keyword, you can' have an interface called
"Enum"... " It does work by adding `T_ENUM` to `class_name`. Any particular reason why this would be a bad idea?
But I'm also on-board with enum class since that would mitigates the BC break for the keyword and is a little bit more telling on what the semantics of enums are. @Crell What are your opinions on this?
@Crell "At present, no. They're "just" objects, and you can't assign an object
to a constant. Unfortunately I'm not sure how to enable that without
making them not-objects, which introduces all sorts of other complexity." I don't see any particular reason why that shouldn't work. I added a test, seems to work just fine.
Same with default params, seems to work just fine.
 
@IluTov Apart from that being a horrible special case? class_name doesn't cover everything
e.g. I don't think types are class_name based
 
@NikiC What most people were asking for was $something instanceof Enum. So it's not really an attempt to mitigate the BC break. Your suggestion would do a better job at that.
 
@IluTov Is there any actual value in having that interface?
Might as well be is_enum()
 
what would gettype($enumCase) return?
if it returns 'object', which i think it should, then anything to instanceof that its an enum would be good.
 
12:08 PM
@NikiC Both were discussed. I'm ok with either approach. is_enum() seems fine to me.
@beberlei Still object.
 
what does get_debug_type return?
 
cmb
Is it deliberate, that base_convert() still accepts invalid characters, although that was deprecated in 7.4? (3v4l.org/hm50S)
 
Switch choose a wrong block, if int(0) is a value ・ Scripting Engine problem ・ #80490
 
there would need to be an interface where value() is defined on, otherwise from a meta programming POV it would be really hard to generically support enum <-> database conversions for example
 
@cmb Don't think so, guess we forgot to drop that one :)
@beberlei That's a different interface (ScalarEnum). That one is fine, because it actually has methods. Just "Enum" would be a pure marker interface, which is (imho) dubious.
 
12:10 PM
@beberlei Just the class name I assume. Nikitas last email makes me question whether it's a good idea to generate per-case classes. If we have per-case classes, then Foo::Bar, if not just Foo.
 
ah didn't catch that, i agree then
@NikiC your sentennce "Generally, I think the limitation on objects in constants is mostly
artificial and you should consider lifting it as part of this RFC." - i assume this would automagically make "nested attributes" possible.
 
@beberlei Enums don't allow __construct, for attributes it might be harder to check that the constructor has no side effects, right?
 
12:38 PM
Good news everyone. Since my wonderful employer and awesome place to work was recently acquired, I can hire more people for my team. So if you know PHP's internals and ecosystem (and ideally some Java) and fancy working for a tech giant, please ping me.
9
 
12:52 PM
@Jeeves Can I close this one? It is the expected behaviour
 
yeah, but show them how get it to do what they want.... aka switch(true)
 
@Dharman Jeeves won't talk back, it's a bot.
 
hypothetically, replying to bot messages provides context....
Nov 19 at 1:20, by Danack
@Jeeves QQ moar
 
eh @Gordon how to contact you privately?
 
@beberlei Nah, that would still require the ability to construct objects in constant expressions.
 
1:07 PM
@bwoebi that's the first assessment test. You need to find out yourself. Or try my first name dot my last name @ my employer ;)
 
@Gordon so the employer is now instana or ibm? :-D
 
Or just drop me a message at linkedin
 
@Gordon well, I prefer chat :-P
 
@bwoebi both. neither. an anagram of all the letters together
 
@bwoebi excellent questiion. it's still instana.com
 
1:08 PM
"@ borg"
@bwoebi linkedin has a chat...
 
I think you'll find that's "@ THE borg"
@Gordon serious question, are you at all concerned about what ibm might do to your employer?
 
@Stephen I had a sleepless first night over it but then decided that they want us to suceed as much as I do. So I decided to wait and see instead of being concerned for now. No, really. I think it will be great.
 
@Gordon well good luck.
 
Thanks
 
I'm sure you'll get to work with some truly spectacular people.
 
1:12 PM
I already do :)
 
I'm sure there'll be a lot of the other kind too, but if nothing else the sheer size should mean a % of the people are really great at what they do
 
@Gordon check your mails, but I'd prefer a more interactive medium :-)
 
@bwoebi I didnt know you speak german
 
now you do
 
TIL
 
1:17 PM
@Gordon well, basically everyone growing up in Luxembourg does
 
@bwoebi the swiss claim that, too. But I cannot understand them ;)
 
@bwoebi I think you are a proponent of case-specific methods. Do you have any advantages to add to github.com/Crell/enum-comparison/issues/45?
 
@Ekin if those notes don't make sense, let me know... also:
 
I have watched a bunch of videos of the Cat Jam cat, put to music. It's been a productive day.
by far the best one is the Indian guy at the beach on drums.
 
@Danack will do! thanks again
 
1:26 PM
@Gordon Also let me know if you need more details
 
@bwoebi it's fine. I'll reply in a minute.
 
okay
 
Morning, all!
 
Wes
@Ekin if you warm up your voice like that, please consider making a video :P
can't tell if that video is meant to be funny or legit :B
...... or both
 
warming up your mental state is also a thing....
 
1:36 PM
@IluTov added comment
 
@Gordon funny, I just realized I'm working with the wife of one of your coworkers
 
@FlorianMargaine I am curious
 
@Gordon don't wanna give away the full name, but HR and last name starts with an M
 
Oh, interesting. I didnt know you are VPE at platforms. I learn many new things today :D
 
Oh you knew the company from somewhere else?
 
1:40 PM
No. I knew you worked there but I thought you was a dev
 
@Danack I've done voice stuff. How do you do the mental stuff?
 
Technically half true
 
@StatikStasis well doing deliberately silly stuff like that guy is doing and laughing at the absurdity of it.
 
@FlorianMargaine Ah. I see.
 
1:42 PM
@Danack Just watched the video. I meant more on the lines of warming up your singing voice. Mainly involves singing the words "mood, ice, regular, and three" in a deep voice to stretch the vocal chords.
 
Also going for a long walk a few hours before your talk is good, as being slightly tired stops your body from racing. Except if it's a day when there is loads of pollen about, and that triggers an asthma attack....
 
@Gordon not really interesting, just funny.
 
1:58 PM
@Gordon Who can understand them... I find it easier to understand Bavarian German than Swiss German
 
:)
 
But that might be because my Mum's family is in Baden-Württemberg
 
@Girgias Swiss German is terrible
 
@Girgias the further south, the more terrible
 
@Danack for this, a lovely colleague gave me a paragraph about me that I'm supposed to read before the talk to give me some last minute self-esteem
 
2:03 PM
@PeeHaa Agreed, I've got a funny story about a Swiss German dude when I was in Japan for my gap year, he didn't speak Hoch Deutsh nor English, so we basically needed another Swiss German to translate for us lol, and his Japanese at the end was lokwkey better than his English
 
@PeeHaa I think it has a certain charme, but it's definitely hard for me to understand
 
@bwoebi been told I've got a funny accent by German folks :')
 
Does anyone know how Xdebug works behind the scene?
Any document link, please.
 
@Exception @Derick knows
 
2:12 PM
@Gordon okay
@PeeHaa Thanks for the link. But I am looking for detailed explanation.
 
curl_init() returns object instead of resource ・ cURL related ・ #80491
 
@Exception More detailed than the actual source code?
That's not a thing :D
 
haha. Actually, it will take time to read/understand each function call all others. So looking for a theoretical explanation..
 
Do you know how php works?
 
I mean the communication between IDE, xdebug, and web browser and other if any.
@PeeHaa yes, I do.
 
2:15 PM
 
Thanks
Just found this link. Could someone validate it?
https://crosp.net/blog/software-development/web/php/understanding-and-using-xdebug-with-phpstorm-and-magento-remotely/
 
@PeeHaa too many words. can you express it through dance?
 
So you don't want to know how xdebug works? You just want to use it
 
@Exception peehaa linked you the fine manual. What more info do you want? aka, why don't you read the doc you were just given, rather than asking people to read something for you?
 
@Danack (y)
 
2:21 PM
@cmb Oops, I also added a comment to the last bug, overriding your status. BTW it doesn't seem to be a documentation issue, does it?

Also: do you or Girgias have time to merge my outstanding PR in doc-base? :)
 
cmb
@MateKocsis ah, curl has already been addressed, so that is a translation issue. I'm going to apply your doc-base PR right away.
 
@MateKocsis I don't follow doc-base... need to do that
@cmb wild guess from the name, but Spanish could be the culprit
 
cmb
well, actually doesn't really matter since out-dated translations are tracked elsewhere; still, might get some attention from translators (anyhow, I'd guess it pt_BR)
 
2:36 PM
I though the pt_BR translation was relatively up to date and fast with keeping up the changes
I know RU is
(and French because I do it, still need to update some of the OCI8 docs but I don't wanna :( )
 
@cmb thanks! oh, I see it now why you marked the bug as a translation issue.
 
cmb
doesn't look like pt_BR is up to date: doc.php.net/revcheck.php?p=filesummary&lang=pt_BR
 
Huh, maybe I just assumed that because of their git workflow and they seemed to have more people contributing
es is horrible, but don't know how much that is due to the vrana commit situation doc.php.net/revcheck.php?p=filesummary&lang=es
 
cmb
Too many cooks ... ;)
 
How is this tracked?
 
cmb
2:42 PM
I think ES has been practically abandoned for a while.
 
TR as well, I believe
I'll show how abandoned it is at phpkonf this sunday :-P doc.php.net/revcheck.php?p=filesummary&lang=tr
 
is there a page somewhere we can see when was the last change done on a specific translation?
 
I did try to look into ES and JP for easy non translation related stuff but doing the mass update for FR 2 years ago did put me off
 
cmb
we really should improve the doc build to add warnings about outdated translations to the respective pages
 
2:44 PM
@cmb I'm thinking about proposing some changes on how we track revisions and such to post to doc list
 
cmb
@Ekin you can check SVN or the MLs
 
ah great, thanks
 
@NikiC I think rephrasing "remove internal support for Serializable by PHP 9" to "only support the new __serialize() and __unserialize() magic methods from PHP 9" would prevent some quacking by people failing to read the rest of the words.
 
@Exception Please don't message people in DM without asking first.
 
@Derick Hey Hi
Could we talk in a separate chat room?
 
2:50 PM
No. Go and read those documents that people have already linked you.
when you ask for help, you need to accept the help given, not for personal tech support, when people have already spent huge amounts of time writing support docs.
1 message moved to Trash can
> You cannot kick a user that has not spoken here since the last time they were kicked.
mental note, kick the user first, before removing their ass emoji.
 
Are you saying that you don't like this emoji or that it reminds you of an ass?
I am genuinely asking because I don't want to be kicked out the nest time I use the thumbs-up emoji.
 
@Dharman I'm saying that anyone refusing to listen to a room moderator, continuing to be annoying, and showing an 'ass' instead, is not going to remain here long.
 
But is it otherwise ok to use thumbs up like they did or not?
 
To be clear the 'not listening to feedback', is the bigger problem than any minor transgression.
May 8 at 23:19, by Danack
I'd say more than about half the time either you or I have said "please stop that" to someone, they have tried to provoke a fight.
 
Related: in a bunch of places, (y) is rendered as a "thumbs up" icon (for "yes", "agreed", etc.).
 
3:01 PM
@bwoebi Thanks!
 
^ exactly that is my concern. This is the first time I see someone remove an agreement emoji from a chat for provoking a fight
I am not going to question the way you govern the chat room, but I just want to get to know the rules.
 
Exactly, that's what I mean. With that emoji I mean. My apology and I "agreed". I should first read the provided link and then ask the questions (if any). Looks like, you misinterpreted it.. no worries.
back to link.
 
3:32 PM
@Crell To answer your question from the list: I don't think (Suits) 'H' is even possible in terms of grammar. (int) etc are special tokens if I remember correctly, (Suits) would be interpreted as a constant fetch in params.
 
Ah, so that's a no go anyway.
I'll follow up in a bit. Thoughts on Nikita's response?
 
@Crell Look above, I made quite a few comments.
 
I had a quick look at a chapter in the laravel documentation, and I really liked the syntax of that php framework and how easy to read the documentation is. Learning php has never been on my radar, so I just wanted to ask, other than web apps what else can php be used for? I know Java and C# as well as some frameworks in C#, but I'm not an expert.
Also if anyone has any experience with ASP.NET, can you tell me if developing a web app with laravel is more fun?
 
Ahso.

Re using enums in constants and default values, I didn't think objects could do that. If you can make them do that, spiffy, I like.
 
@Wes You can just close the connection
 
3:47 PM
Regarding "enum class", that does lock us into an object-based implementation as the object-y bits are poking out more. That may not be the worst thing, and several other languages do that, but I aesthetically dislike it. If we end up having to do so it's not the end of the world, I suppose. Although with @NikiC's namespace token changes in 8.0, doesn't that make the potential BC break smaller anyway?

(Though I suppose exposing ScalarEnum and UnitEnum also has class bits poking out, so...)
Regarding super-huge enums and the cost of classes: I defer entirely to you there. That's mostly an implementation detail beyond my skillset to really comment on.
 
All you have to do yield $this->_connection->close();
 
@PeeHaa o/
 
Hey buddy! o/
 
You and @Ekin seem to have been working too hard lately.
Like myself...
 
Yeah it's a bit of madness right now :(
Just 3 more weeks though!
Once Christmas is done we will be muuuch less busy
 
3:52 PM
Regarding $foo instanceof Enum vs is_enum($foo), I don't have super-strong feelings, other than I don't think they're mutually exclusive. And I have no issue with marker interfaces. It would hardly be the first time a language had them; not even the first time PHP had them, I think? (Userspace definitely has had them.)
 
@PeeHaa \o/
 
Re serialization, I think there's a github ticket open on that already.
 
@Crell Pretty much all the object features we allow will probably never be fully replicated for non-object.
 
Are you going to just keep being busy even into the new year?
 
If we go with objects now I don't think there's a going back.
 
3:53 PM
I'm probably going to be busy through at least March by the way it seems at the moment.
 
:-(
 
Just a lot going on with the new role. But I'm enjoying it. =D
 
@IluTov You are most likely right.
 
That's awesome!
 
Wes
massive headache @PeeHaa i can't get this thing to close
i tried process->kill(), and also the browser's own close command
 
3:57 PM
Wat
Why do you have a process?
You haz codez?
 
Wes
there's still something keeping the loop active and i don't know what is
so the test method never finishes executing
omg i know what is
 
You can call Loop::stop(), but you should figure it out really :)
 
@IluTov Talk to me about the "not make a new class for each case" implications. From what Nikita is saying that would make the engine more performant, but what are all the implications of that?
 
@Crell It means no per-case methods.
 
:-( What else?
 
4:01 PM
It also means, we'd have just one class Foo with a discriminator value, could just be the name of the case as a string.
I don't think we technically need this at runtime but when serializing we'd need to know which case it was since we no longer have a unique class per case.
 
@IluTov You'll need a new serialization formal for enums in any case
@IluTov Which is an advantage :)
 
So we end up with an internal array of singletons: Suit(case: "Hearts"), Suit(case: "Diamonds"), etc.
@NikiC Custom serialization format would mean that deserialize() would essentially do Suit::from($value) internally to deserialize, yes? And that would therefore allow us to get back the singleton-y object and avoid issues with === ?
 
@Crell something like that, yes
 
Wes
@PeeHaa using self::assertSame($original, $result) in the phpunit helper causes the test to run forever rather than throwing, any idea why?
 
Hm. This brings me to my next question, then...

If cases aren't classes, but instances of the Enum class with a magic property set... doesn't that mean that all enums are scalar enums, with a default of string and a value of "the case name as a string"?
 
4:07 PM
I'd probably do something like E:%d:"Suit::Hearts"
 
(Whether that's a good thing or a bad thing I've not decided yet.)
 
@Wes You really need to show your code instead :P
 
@Crell You could say that. Although that was also previously the case, just implicitly through the "name" of the class.
 
@Crell The relevant property of scalar enums is that the scalar they're based on is user-accessible
 
@NikiC Right. I'm musing aloud on whether or not at that point we shouldn't just go ahead and allow this:
enum Suit {
  case Hearts;
  case Diamonds;
}

$e = Suit::from('Hearts');
$e === Suit::Hearts;
Again, I'm not sure if I like that or not, but it becomes an easy add at that point so worth pondering.
 
4:10 PM
@Crell I wouldn't mix the name of the case and the value
 
Porquoi?
 
Wes
i've noticed this already, exceptions cause phpunit to run forever
 
@NikiC That makes sense, so when serializing scalar enums don't even worry about the name of the case. We just embed the scalar.
 
Wes
@PeeHaa literally just
$this->assertSame("foo", "bar");
makes it die
 
Hm, does that make sense? Maybe not. I'm not sure.
 
4:11 PM
@IluTov Not sure on that. It may make more sense to use the name of the case rather than the scalar when it comes to cross version changes
I mean, if new enum cases are added and an old string is unserialized
Well, I guess that could go both ways
 
fat email sent to docs list
 
Wes
will put this pos code online tomorrow
this is much like css, poke some thing, something else explodes
 
@Crell So are you on-board with making these changes for now? We can re-discuss per-case methods for ADTs and see if we find additional use-cases.
 
@IluTov How would we reintroduce per-case methods on ADTs if we go this route now?
It seems like a promising direction overall, but I want to make sure I grok the full implications of all of it. (So I can update the RFC if nothing else, but also vet that they're all things we want.)
 
@cmb so I thought about updating the cURL section of the ES docs as best I can, the online doc editor refuses to show the diff :))))))))) Love tooling which works on one language but not another
 
4:25 PM
@Crell Well, one could argue cases with associated data are much more rare so having a dedicated class there might not be too bad, although that would probably complicate the implementation (having to differentiate between these two approaches).
 
@Wes What POS system?
 
@IluTov That's my concern, yes. Even without per-case methods, would single-class make the implementation fuglier once we get to ADTs, pattern matching, etc.
 
@Crell Basically, the case Bar {} syntax goes away. Also, the type Foo::Bar syntax will become much less useful.
 
Also, people were asking on list about constants on the enum, as a way to do aliases. I... haven't thought through all the implications of that.
 
Wes
@PeeHaa this is the code that causes exceptions to be eaten in some completely unrelated place gist.github.com/Netmosfera/0102f40f9c192f659f8a9f6e9a78f963
 
4:28 PM
I think if we can detect enum serialization changes and inform the user somehow, then that would be a good QOL thing.
 
@Wes You never stop the timer
 
Wes
what timer?
 
So you'd have (in ADT land):

enum Suit {
  case Hearts(public int $card);
  case Diamonds(public int $card);

  public function number() { return $this->card; }
}

Or this:

enum Suit: string {
  case Hearts = 'H';
  case Clubs = 'C';
}
 
$ka = Loop::repeat(1000, function(){
            // keeps connection alive... @TODO find a better solution
            $this->_connection->send('{"id": 0, "method" : "Browser.getVersion"}');
        });
 
Wes
4:30 PM
-> Loop::cancel($ka);
 
@Crell That's fair. Not sure yet how that would work. We could of course just store the associated data in a hash map. Or as mentioned we could create dedicated classes just for cases with associated values.
 
But you only do that when the first message is NULL
 
Wes
yes?
 
Is the first message NULL?
Also why are you using goto?
That's what I missed actually
That goto is... unexpected
 
@IluTov My gut feeling (which may not be right) is that real-classes for ADTs would be overall cleaner than maintaining hash maps internally. Tagged cases are definitely more object-ish than unit enums, for which it's just an implementation detail. Assuming that can be "switched over to" easily enough in the engine.
 
Wes
4:33 PM
ignore the goto, i was trying something else before
 
Or... I know we've gone back and forth over this a few times now but should tagged unions/enums/ADTs/whatever have a slightly different syntax, which would allow us to trigger different engine implementation?
 
Is the connection at any point return null?
 
Wes
receive() resolves to null when i call _connection->close()
 
Terrible off-the cuff example:

enum class Suit: string {
   // Single Suit class with a single magic property and an internal lookup table.
}

union class Maybe {
  // Does what the RFC has now with generated classes, which then behave more class-y.
}
 
Wes
except i never get to calling _connection->close() because phpunit gets stuck before that, here:

$this->assertSame("foo", "bar");
lemme put it on github
 
4:35 PM
Then it's more natural for Suit to not have per-case methods, and Maybe to have them.
 
@Wes <3
 
Which would only support the state machine example on union classes, but that's not the worst thing in the world.
It... would probably also make it simple enough to have Suit serialize and be usable as a constant, but not Maybe. Which also fairly well matches the usage patterns, I'd imagine.
@IluTov @NikiC Just how out of my ass am I talking in ^^ ?
 
@Crell I think we should avoid that. The two have a large overlap which doesn't make it clear which one you should choose.
 
If you want associated values, you use the latter.
I guess nothing precludes you from using union class without any associated data... except that it then isn't a guaranteed singleton (possibly a problem for Maybe), can't be used as a constant or default value, etc.
 
@Crell But that can also change. You could have an enum with 10 cases and want to add a case with some associated data and you'll need to convert the whole thing to a tagged union, which basically makes no different other than now allowing you to add the associated data.
 
4:43 PM
@IluTov Hm. Fair point. Can that switch be done internally automatically? (That's entirely a you question.)
 
Wes
@PeeHaa compared to js, this is much harder
 
Fiber::this() and Fiber::suspend(), or Fiber::getThis() and Fiber::suspendTo(), or Fiber::getCurrent() and Fiber::switchTo(), or some combination thereof or other suggestions?
 
Wes
it opens the chrome process and needs to save the profile somewhere, here github.com/Netmosfera/AmpChrome/blob/master/tests/…
 
00:00 - 17:0017:00 - 00:00

« first day (3705 days earlier)      last day (1250 days later) »