« first day (3112 days earlier)      last day (2061 days later) » 
00:00 - 16:0016:00 - 22:00

16:00
@Wes Doesn't it tell you the original tempo when importing the wave?
though, not really happy with the VM architecture since it is really quite inefficient (since each block is a separate execution frame, loops become stupidly expensive).
@driusan well, that "flattening" happens at the CFG step since there's no hierarchy after that conversion happens..
it would be useful to mention that
would probably also be useful to go into a little more depth about how frames are stored (especially if it's inefficient and something that someone could improve)
@Trowski that was easy ... so you're creating a loop for each task ?
I imagined you would have one loop, and integrate a call to poll into your own loop ... but whatever works I guess :)
@JoeWatkins That's within a timer that's run every 250ms, looping on poll() to see if the thread exited (that is, future resolved).
@JoeWatkins what would you need to see me provide support for to support Parallels in PHP-Compiler. Thread local storage for globals I assume. Anything else big?
16:12
If there's a better way to integrate poll() into the event loop I'm listening.
@bwoebi @Danack Analyzed top 1000 packages: gist.github.com/nikic/b6214f87b0e4a7c6fe26919ac849194f
@ircmaxell I'm not familiar enough with PHP-Compiler yet to know how to answer that question ...
I do plan on becoming familiar ...
@JoeWatkins assume there's nothing there. What would you need/want to see to be able to support it
9 instances of buggy code, 3 potential false positives relating to ?:
nice
16:15
@JoeWatkins basically, I'd like to include Parallels in the core (same API, but not as an extension)
@ircmaxell can code produced by PHP-Compiler call internal functions ?
@JoeWatkins when you say internal functions?
like extension functions ? can it use internal objects ?
it intentionally does not
@NikiC Nice! Well, from my perspective, anyway ^_^
16:18
because I want to get it self-hosting at some point
so we're talking about what support the compiler would need for a rewrite then ...
plus, I am code-generating native code, so wouldn't it be more efficient to just generate threaded code directly?
user9727963
Can someone tell me why my <?php echo $file; $i++; ?> is outputting the full directory? jsfiddle.net/bsq3eg0x - I want it only to output the last .dns extension.
not even a rewrite, since I would imagine having access directly to low level LLVM apis for code generation could result in a very different implementation
so what does PHP-Compiler do when it comes across a call to strftime, or datetime or whatever ?
16:23
right now, nothing. They haven't been implemented ;)
@ircmaxell probably its better to choose a different approach like real threads with all the normal c++ magic? Then there could be written a polyfill/mapper to run the php-src parallel things.
but my idea was to re-implement them in PHP
so potentially you're going to implement every single extension ?
@JoeWatkins main stdlib and very popular extensions. For others, I would build a C compatibility extension
Wes
Wes
@PeeHaa it does but it has decimals... not sure what that means
16:26
@user3655829 that's what I'm thinking
30 < $token['length']
    ? mb_substr($token['value'], 0, 29) . '…'
    : 'EOF' === $token['token']
        ? str_repeat(' ', 30)
        : $token['value'] .
          str_repeat(' ', 30 - $token['length']),
that seems like a lot of work
@NikiC redrafts RFC to deprecate and remove all ternary operators.
3
but I dunno if it's less work than the alternative(s)
user9727963
Could anyone assist me on this? stackoverflow.com/questions/55834607/…
16:28
@Danack TBH the least readable part of that is 30 < $token['length']
$token['length'] > 30 would be more obvious...
@JoeWatkins it's a bit of a chicken and egg. The alternative would be less "redundant" work, but it would be more work getting a bridge to be performant. And honestly, building support for those macros that php-src uses scares the crap out of me. Plus, it would make it a pain in the neck to support generating native types instead of zvals for variables, since I have no control over the call convetions (where if the functions are implemented in PHP, I absolutely can)
@CSSUM you almost certainly want to get better at googling things. Like "php filename instead of full path".
or probably searching just php.net for relevant functions "file name without directory site:php.net" gives as the top result: php.net/manual/en/function.pathinfo.php
I dunno if it would have to necessarily be slow, you can get the address of any internal function, pass it a thing the sizeof(zend_execute_data) with arguments at the right offset (and object on This), and for everything but things like xdebug, that will work most probably ...
@JoeWatkins yes, but the arguments would need to be put into zvals, and those zvals need to be compatible with PHP internally (especially objects)
whereas my plan for objects was a lot more sophisticated, where I can codegenerate different object representations based on the constraints available
for user objects, that makes sense ... what doesn't make sense is implementing DateTime in php ...
16:34
example: if I can resolve certain things at compile time, I should be able to code generate an object as a struct with virtual method pointers.
@PeeHaa Signed back up for classes to finish my degree. Only have a year left. But- the most important reason for finishing- I can get Avid Pro Tools for half off! W00t!
@JoeWatkins the parts that depend on a library wouldn't be in PHP. Those can call via FFI to an underlying lib. I just don't really want that calling into php-src, at least long term.
or re-implementing a bunch of core stuff like ctype, json, all stuff that things like composer needs ... it doesn't make sense to reimplement them in any language ...
ctype is a libc thing, and can be implemented using FFI or directly
if there's a native C library for it, I can link to that library using FFI, and code generate a link to it using LLVM so turn them all into native calls
what would be re-implemented would be the wrapper logic
it just seems so very far away from the compiler, you know ? I just imagine all the time you're going to have to sink into that so that people can run basic things like composer ...
16:39
true, but if I don't do that, then I'm stuck linking php-src, with all the initialization overhead that brings, and re-using its error handling system, and a bunch of other things in any binary I compile
which then massively kills any performance benefit to AOT compiling in the first place
thats why this shouldnt be a lone wolf project
I think you wouldn't have to link to php-src, or any extension dso ... I think it's probably possible to tear a chunk of an ELF AOT
Plus, a lot of this was implemented in HHVM. So perhaps just port from there?
@JoeWatkins true, but I still would need to initialize PHP, no? It would expect at least some amount of globals to be setup, for MINIT and RINiT to be called appropriately, and for enough of the runtime to be present to run the extensions
well I can't think of a way around that ... but that's not to say that you have to call any of PHP, you have to present an environment to the extensions that looks like PHP ...
both ways are a bit never ending ...
Yeah
That's why I am thinking of going down the "have no dependency on php-src past bootstrapping".
That way, it is more work on the stdlib side, but massively simplifies the compiler. And makes the compiler less dependent on the PHP version.
Thinking of maintaining C ABI compatibility with multiple versions of php at the PHP FFI later sounds horrifying
16:53
Oh ... so you do actually know when something sounds horrifying ? :D
Oh, I realize that what I'm proposing here is a metric ton of work
so much, and not the sort of work people really want to do ... if I had to write down a list of ten things I least wanted to do, writing a dom/datetime/libxml API would probably be on there, near the top ...
But it's split into two types of work "delicate and deep architectural work" and "mostly straight forward build and test" work. The stdlib and core extensions are mostly on the second half of that spectrum
whereas if I did integrate into Zend deeply, it would be slightly less work overall, but far more on the delicate and deep side
@JoeWatkins quite true, but those are things that also don't require a ton of deep compiler knowledge to write. Hence they can be good places for contributors who want to help but aren't ready to jump into the engine to write.
Plus, that comes with a HUGE benefit: PHP-code documentation for the standard library. When people have a dispute about how something behaves today, they must go to C to resolve it. But having a PHP version of standard lib can solve that easily by not requriing people know C. Especially when there's already talk of extracting parts of the stdlib into PHP once JIT ships in 8
evenin
@JoeWatkins There are a ton of people who sometimes just want to implement some very simple function just for fun. Take x of these.
then 1 function a day keeps the hhvm away?!
This could be even linked to some kind of gamification online frontend? Like a platform for learning to re implement function x and learn from it. If all tests passed against the php-src this should work
probably not :/
17:08
why probably not? That sounds awesome!
Uhm i got a college whos writing this for internal "intership" learning.
My job is basiclly to setup elearning platforms... he got a docker coding integration...
let me talk to him friday
wait college is totally wrong. coworker :D
you mean colleague.
ok thanks
i hope my english will improve if im using it more
Wes
Wes
17:24
the other day i found out i've been using for years an english word i've invented myself
morning room
@Wes which one
I wouldn't worry about it, so did Tolkien and Lewis Carrol.
Wes
Wes
17:26
i can't tell it's too embarassing
sudo @Wes say it
\o
just do it!
Wes
Wes
it's embarrassing because it's a pretentious sounding word... and it's wrong............................
17:29
I'm sure you were embiggened by its usage.
Wes
Wes
indeed
reads every message Wes wrote to find the word
Wes
Wes
UGHHHHHH
i need to read more.... if only i had things to read... i tried to read medium for a while and i wasn't happy with the programming content. there are roughly 3 kind of contents on medium:
1- this is why we are winning at life
2- this is why you are not winning at life
3- "hello world" tutorials
There are now also a ton of youtubers to listen to while working. This helps me a lot if im constantly hearing english
1 month ago i spoke english for the first time since 3 years lol. I realized that i really are not working globally. The last international team was a gamejam 3 years ago :/
Hi again!
Is anyone good with Apache? I'm having very strange behaviors right now and extremely confused
Wes
Wes
17:42
@user3655829 can you even concentrate? :B
i can only listen to people speaking or singing when i am photoshopping... if i am writing php i need silence or no lyrics music
The music/videos heavily depends on the task youre doing. youre correct. But today i dont write code all the time
@ircmaxell hahaha nesse caso, é bom ficar fluente (risos). Meu pai é de Minas Gerais (ao lado de Espírito Santo) e essas regiões tem expressões idiomáticas bem estranhas /o\
Anyone savvy with Prophecy? github.com/phpspec/prophecy
Wes
Wes
are you learning it for a particular reason? @LucasBustamante
Oh my god, so painful to try to do things you don't know how.
Learning tests, overall
Any reason I shouldn't? (Prophecy)
I'm sweating on the mocking stuff
17:49
You should. Even if nobody else will use it you will learn a ton from this.
Wes
Wes
@LucasBustamante is that a requirement from a potential employer
Something like that
The company I got in uses it
Wes
Wes
just recently there was a collective breakdown from the symfony community that was like "seriously, we should stop using mocks"
Then its probably better to use something else well documented and maintained. A self managed package like this will increase the development cost of everything
Wes
Wes
many people have been saying the same thing for years
17:52
@Wes i didnt want to talk about mockery. But thats the thing why everybody hates it
Actually, there's one guy at the company that write tests
I'm joining as the second
the company has like 20 developers or something
it's enterprise WordPress, basically
this one guy that writes test is very good, though, and he uses Prophecy
Wes
Wes
you should do testing using fake objects only, stubs and actual classes
he was at a conference with the guy who invented PHPUnit, and that guy said to use Prophecy instead of Mockery
Yeah, I mean, I know very little of testing. I don't even have a clear definition of mock and stub in my head
I dont want do say its not right do write your own stuff (20 devs as well). I got a ton of components you should replace with sympfony... but the history of that doesnt allow a major change now.
if sebastian approved your component then go with it
he knows the shit hes talking about best
Wes
Wes
https://martinfowler.com/bliki/TestDouble.html
https://www.martinfowler.com/articles/mocksArentStubs.html
17:57
I will read those, thanks
Wes
Wes
the criticism of mocks is that they are completely useless for regression testing
which is the number 1 reason people test at all
Talking specifically about the issue I'm having: Prophecy doesn't seem to support partial mocks, so when I create a mock of a class, I can't invoke its original methods. From my understanding, every public function will just return null unless I state otherwise
Wes
Wes
if you write some code and test it with prophecy, what will happen if you change that code? will the test continue working or will it be checking the wrong things?
if you need to update the tests when you change the code, you have a problem
and that's a common problem for everybody using mocks
instead if you use actual object you get to test a real scenario
some might say that's not unit testing, but you are still testing a single code path of a single function/method, unlike what you do with integration testing
How would I use something like "shouldHaveBeenCalledOnce" without a Mock?
Wes
Wes
you don't
18:05
That's the rabbit whole I'm in
I so much hate mocking.
Wes
Wes
we all do
(oh all the hate, sorry)
Wes
Wes
you just test that a function returns what you think it should return @LucasBustamante
Will do. It adds stuff to the database though, returns nothing
I'll check the database to see if what I expect is there
Any good book on testing/mocking you guys would recomend me?
18:09
\o
@marcio :). Eu visitei Salvador para PHP Norde Este.
How unpopular is my opinion? Integration Tests over Unit Tests?
@LucasBustamante If you have a database layer as an architectural boundary, it could provide a test layer so that you can run unit-tests w/o any database interaction (and the database layer could be tested to actually to the database work on the other end), I think this is best. Otherwise you start to integration test your code w/ a specific database state (that works as well, but is often much more expensive).
@user3655829 It's somewhat common. Not sure on the levels of popular, though.
it's popular with management, unpopular with people who need to wait for their tests to finish running.
18:14
@user3655829 Why over? You can't write as many integration tests as normally unit tests are written. Both have their usefulness.
over in the meaning "you dont have write that unit test if you got a integration test ready"
My integration tests - or more high level tests - do fail more often, but luckily I don't have so many. But in the end I'm feeling lucky to have both.
yes they fail earlier on changes but i see that as a big pro
Maybe it's not to say "more often" it's just, if they fail, it's more work. So they fall less often but if they fail, it's more work to recover.
I'm not certain that integrations should completely replace unit tests. At least I think there are certain things which ought to be unit tested, and any usage in "integration" is testing the other piece, not this unit.
18:16
For example, if the project's phar file build does not create the expected checksum any longer, what went wrong?
its always debugging time
but it depends on the application. A truly "framework" component needs no integration tests
Well with unit tests, it's just testing, developing, refactoring in quick circles. You can't have that with integration tests, which require debugging but with unit tests it's no debugging normally, it's just developing.
@user3655829 well put "truly" in quotes, hehe :)
But when you start with testing, the real framework is maybe the testing framework, regardless of which other framework there is in the project.
Wes
Wes
@user3655829 gray box testing
I've been sticking to Phpunit, I actually like it, it has some very nice features, for example support for phpt tests.
Wes
Wes
gray box testing you write unit tests in the traditional sense, by testing code paths
but you do so using real (sort of) objects and using the public interface only, like integration testing
18:29
our grey box testing goes even further...
Were actually running hundreds of behat tests after the "white" integration tests went green
and yes... you can wait for the results...
Wes
Wes
i don't need any of that
@bwoebi gist.github.com/nikic/a4df3e8e18c7955c2c21cf6cdb4cbfaa results for concat precedence change
assuming I implemented the analysis correctly...
should be depending on the application youre developing. I said i run elearning platform with 100+ of models. There is no complicated stuff inside. Its basicly crud on a big big thing.
@NikiC so, exclusively bugs
yep
@bwoebi though I think for the last two it may just not matter in the end, by luck
Assuming that the + prefix in modify() is optional
but in any case, changing precedence there is not going to make it worse...
18:37
@NikiC will you make this code public?
I can't understand these people who can't take the time to review a patch on <? to <?php. I don't think I ever will understand them, but I can't believe that they even need manager approval to do such a thing. It's going to take very little time at all, particularly if run on small subdirectories at first to make sure it can be done in a small sessions.
Tanks!
h
@NikiC are you going to, or shall I update the RFC with your findings?
19:36
> Unless someone decides to actually discuss the issues I've raised in
previous emails, instead of just telling me how easy it's going to be for
me to update my codebase that they know nothing about, this will be the
last message I'm sending in this thread.
Would anything of value be lost, Chase?
Wes
Wes
20:03
@FélixGagnon-Grenier sorry if i was a dick... i somehow get a bit anxious when talking with you.... id rather avoid that :B
20:36
@Wes It's alright, no pressure
20:59
@LeviMorrison this is why I'm strongly against having to justify either yes or no votes. It's always going to result in people getting precious and saying that the other side haven't 'justified' their position.
Also, has everyone else's mail client decided to start their reply with a '>' ?
21:32
@Danack They are just plaintext ML noobs, I guess.
21:43
@Jimbo This job will be my foot into the programming world, whether I agree with their technologies or not it would be stupid not to take it and learn Laravel :)
00:00 - 16:0016:00 - 22:00

« first day (3112 days earlier)      last day (2061 days later) »