« first day (2440 days earlier)      last day (2515 days later) » 

11:00 AM
Oh...
$search = $matches[1];
escapeshellarg($search);
...
I'm dumb.
 
Just looking into Amp docs, not only nice to read it also looks like a real nice abstraction. Can't stop reading.
 
Anonymous
> This method is used to either get or set a field value.
 
Anonymous
 
11:16 AM
@hakre I'm glad you like them and I'm glad we finally have docs, at least for some packages.
 
Have you considered some kind of SDK repo with examples? Have not looked on the github page, just in case I look lazy. It's perhaps worth for getting the hands dirty next to docs (or to accompany the docs).
 
@hakre It's planned, see getting started, but we need a stable socket release for that, which isn't a thing yet.
 
@kelunik What does socket release mean? The first stable version? Or is that some PHP release w/o socket flaws?
 
@bwoebi Please add release notes to the aerys 0.5 release.
@hakre What's the specific abstraction you're talking about?
 
@kelunik Ummm … we do not actually implement bytestream here
 
11:24 AM
@bwoebi We do.
 
oh, Handle does
 
Handle extends InputStream, OutputStream.
 
not, the individual subclasses, oops
 
@kelunik The interface of the library. Perhaps mainly coroutines look very promising. I don't like promises as abstraction much.
 
In that case interfaces as exceptions would be really helpful. Not every filesystem exception is a stream exception, but writing to a closed stream should fail with a ClosedException.
 
11:26 AM
posted on June 21, 2017 by bwoebi

amphp/aerys v0.5.0

 
I eventually would have two different exceptions here then?
 
Maybe use FilesystemException for everything not being read / write?
 
@kelunik everything not being a handle op, yes
 
So all handle ops should use StreamException?
 
@kelunik yes
 
11:28 AM
@user7594714 That one clearly not.
 
or perhaps create a HandleException extends StreamException
 
hye... anyone can help me in symfony php framework... How to use Rest API to create a api for android
 
@bwoebi And then we have the problem with ClosedException again ^^
 
@kelunik why?
because we'd also need a HandleClosedException then?
 
which is better example.com/category/tags/tags/tags/tags/tags .. etc or
example.com/category/tags+tags etc..
or do you guys have a better alternative?
 
Anonymous
 
@kelunik Also, do we want ClosedException or ClosedError?
I'm strongly in favor of ClosedError as it only occurs if one did explicitly close the stream on our side.
 
@bwoebi It's released, it's ClosedException.
 
@JayIsTooCommon I refered current symfony documentation.. But i am not getting a way to how to start with that.... how to use it...
 
@kelunik good, we can do another release.
 
Personally i think the latter alternative is better
 
11:32 AM
@bwoebi Not true, might also happen if the worker crashes.
 
@kelunik which worker?
 
@bwoebi I'm not going to do that for renaming an exception to error.
@bwoebi for the parallel driver
 
@kelunik I meant in the next release, whenever it comes … I.e. just change it in master.
not now.
@kelunik I wouldn't throw a ClosedException then though
 
@bwoebi Not going to change it in master. Create an issue if you want, but master is going to be the next bugfix / feature release, not next major.
@bwoebi Yes, should probably be a StreamException then.
 
@kelunik yep.
Oh, didn't realize we already tagged byte-stream 1.x instead of 0.1
why?
 
11:52 AM
@bwoebi Because everything seemed fine and it's small enough.
 
@kelunik things usually seem fine until they're reviewed and used by other people…
 
how do I do new SomeClass in C?
like new Pdo or something
@ThW I followed your class with interface example, but it doesnt show how one would create a new instance of that class then
 
Can't able to show content/data on select tab in php_manual_en.chm file – #74791
 
aka object_init_ex
 
12:03 PM
@Gordon object_init_ex()
 
I think.
\o/ - I'M FASTER FOR ONCE.
 
thanks
 
@bwoebi What should we do on double close? Ignore or throw?
 
@kelunik ignore, I think?
 
@bwoebi Could you please have a look at the FIXMEs here: github.com/amphp/file/commit/…
 
12:49 PM
knock knock
 
who's knocking?
 
I am Knock knock
 
Anonymous
@Linus sorry, not interested in what you're selling
 
@JayIsTooCommon i got free pass to justin biber concert :P
 
Anonymous
@Linus who's there?
 
1:00 PM
cow
 
Anonymous
cow who?
 
moooo
 
Anonymous
 
@Trowski We should really output more if possible: travis-ci.org/amphp/file/jobs/245354788#L1677
 
:P
 
1:07 PM
Running into Prophecy and relatively new to Unit Testing. Is Prophecy something to look into or something to avoid?
 
surprised sni isn't already a thing supported by aerys
Is there a lot of work that needs to go into that?
 
@Sean The fact that PHP supports server SNI isn't even documented in PHP's docs.
 
1:23 PM
Cycles created by AppendIterator not cleaned. – #74792
 
1:37 PM
Oooooh
 
@Jeeves Here be dragons.
 
@Danack Fus Ro Dah!
 
> “Fus Ro Dah” are the words used in a dragon shout that summons a powerful force from the speaker’s throat in the game Elder Scrolls V: Skyrim. (See also: Shoop Da Whoop, Force Push)
he keeps amazing me lately
 
@Jeeves Then you took an arrow to the knee
 
@Sean Yes, how did you know?
 
1:48 PM
Damn.
@Jeeves I used to be an adventurer like you.
 
@Sean What happened?
 
@Jeeves I took an arrow to the knee.
 
@Sean Well.. hope you madeost with the arrow.
 
@Jeeves I.. what?
 
@Sean No I was correcting your grammar.
 
Anonymous
2:08 PM
@Jeeves what does madeost mean?
 
@JayIsTooCommon Molag bal is a dremora god in skyrim.
 
@Jeeves *morrowind
 
@FélixGagnon-Grenier Like a bunch of bricks.
 
I actually believe it goes as far as daggerfall
 
@tereško true
 
2:23 PM
Out of bounds heap read access in bundled oniguruma library – #74793
 
@Ocramius Any idea if you can use mysql's exist with Doctrine / DQL? SELECT EXISTS(some query);
@Jeeves What's your favourite video game?
 
@Jimbo Mine is the Legend of Zelda: Twilight Princess.
 
@kelunik Interesting, I wonder what wrote to stdout in the child. Definitely should try and output more…
 
2:38 PM
has there been a major version change in zend engine version?
 
2:53 PM
Strange bug where n/a == 0 – #74794
 
@tereško AFAIK from 5 to 7
 
yeah, google already
 
hi, i need some help
 
Anonymous
@Mary no room at the inn, sorry :(
 
i need to save some data in a variable, but at the end of the function steel have the value
 
3:04 PM
@Trowski See fix, it's a warning.
 
If anyone is using docker, and phpdotenv(which is slow as balls)... TIL you can inject the .env directly into the containers via a env_file config option
 
Christ I hate MySQL..
only full group by mode is the absolute bane of my life right now
 
@kelunik I thought warnings, etc. wrote to stderr. Is there a way we can force that?
 
@Trowski php -d display_errors=1 -d extension=foobar.so -r "echo 'OK';" 2>/dev/null
 
MGE
Hey, I have a problem reading a txt file from php
 
log_errors writes to stderr, display_errors writes to stdout.
 
3:35 PM
@kelunik Oh, cool… TIL :-D
 
@Trowski github.com/amphp/parallel/commit/… fixes that already.
 
MGE
if I list the array records, I can see:
<pre>Array
(
    [0] => ��
    [1] =>     Dir: C:\
but if I search "Dir" string in key 1, it returns false
 
@kelunik Do the warnings then show up in the console of the parent, or should I be watching stderr and writing that to stderr of the parent?
 
MGE
and seems that there are spaces in this text wtf
$wordlist = str_split($value);
it returns:
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] =>
[8] =>
[9] => D
[10] =>
[11] => i
[12] =>
[13] => r
[14] =>
separated words :/
 
I suggest using var_dump instead of print_r
 
3:38 PM
@kelunik I could easily set that up with a simple pipe.
 
MGE
array(40) {
  [0]=>
  string(1) ""
  [1]=>
  string(1) " "
  [2]=>
  string(1) ""
  [3]=>
  string(1) " "
  [4]=>
  string(1) ""
  [5]=>
  string(1) " "
  [6]=>
  string(1) ""
  [7]=>
  string(1) " "
  [8]=>
  string(1) ""
  [9]=>
  string(1) "D"
  [10]=>
  string(1) ""
  [11]=>
  string(1) "i"
  [12]=>
  string(1) ""
  [13]=>
  string(1) "r"
  [14]=>
  string(1) ""
with var_dump
 
@MGE I told you yesterday that str_split() was the wrong function. It splits based on a predefined number of chars, and if you don't pass in a value for that, it splits every single char
RTFM: Read The Friendly Manual
!!docs str_split
 
[ str_split() ] Convert a string to an array
 
MGE
yes, I read, but the problem is that if I have $string = "Dir"; and I use str_split it return
[0] = D
[1] = i
[2] = r
the problem seems to be in the string
that is adding special chars or something
 
try this: preg_split('/\s+/', $value, 0, PREG_SPLIT_NO_EMPTY);
 
3:40 PM
@MGE your file is probably not ASCII
 
MGE
Im using this
$line = preg_replace( "/\r|\n/", "", $line );
will try your code
 
Could as well just write to stderr like bash does.
 
MGE
your code returns [0] =>
[1] =>
[2] =>
[3] =>
[4] => Dir:
[5] => C:\
can I check if is ASCII and if not, convert to it?
 
@Trowski Writing to stderr of the parent is probably better, as that's binary safe.
 
@Dereleased whats up bro?
 
MGE
3:48 PM
@pmmaga mb_detect_encoding returns ASCII
 
MGE
echo mb_detect_encoding($value); // return ASCII
$string = mb_convert_encoding($value, "UTF-8");
echo mb_detect_encoding($string); //return ASCII
:/
 
It simply forwards the stderr of the child to the parent's stderr now.
 
@MGE it's a useless function
 
@MGE Don't use that function.
You can never say it's that encoding, you can only say it's definitely not that encoding without knowing.
 
MGE
3:51 PM
ASCII is a subset of UTF-8, so if a document is ASCII then it is already UTF-8
Any tip to solve this problem? :/
 
@MGE Yes, that's why it shows ASCII.
 
MGE
[1] => Dir: C:\ <- $pos = strrpos($value[1], "Dir"); <-- false
seems that there are spaces (special chars) between D,i,r
$value = preg_split('/\s+/', $value, 0, PREG_SPLIT_NO_EMPTY);
print_r($value);
Array
(
    [0] =>
    [1] =>
    [2] =>
    [3] =>
    [4] => Dir:
    [5] => C:\
)
 
@MGE Just dump the value as bin2hex.
 
@kelunik Looks like the tests are hanging.
Might have to make that closure in asyncCall static.
 
@MGE can you var_export it?
 
MGE
3:58 PM
. "\0" . 'D' . "\0" . 'i' . "\0" . 'r'
 
@kelunik yep, piping to stderr is a good idea, please merge.
 
Will debug the failing test and then squash and merge.
 
MGE
array (
0 => 'ÿþ' . "\0" . '',
1 => '' . "\0" . ' ' . "\0" . ' ' . "\0" . ' ' . "\0" . ' ' . "\0" . 'D' . "\0" . 'i' . "\0" . 'r' .
 
@MGE your text is UTF-16 (possibly UTF-16BE, not sure)
 
@Andrea aaah beat me to it
 
MGE
4:00 PM
omg
 
those first two charracters are a Byte Order Mark btw
 
MGE
holy shit
䐀椀爀攀挀琀漀爀椀漀㨀 䌀㨀尀䴀漀搀攀                䰀愀猀琀圀爀椀琀攀吀椀洀攀     䰀攀渀最琀
in chinnese?
 
@MGE try BE not LE
 
wait is that big endian? I tried converting from LE
didn't work
 
MGE
$result = iconv($in_charset = 'UTF-16LE' , $out_charset = 'UTF-8' , $value); echo $result;
 
4:03 PM
sorry, I misjudged the endianness
 
$foo = "\0D\0i\0r";
$bar = mb_convert_encoding($foo, "ISO-8859-1", "UTF-16BE");

echo hexdump($foo), "\n", hexdump($bar);

/* output
-- 00 01 02 03 04 05 06 07   08 09 0A 0B 0C 0D 0E 0F   0123456789ABCDEF
00 00 44 00 69 00 72                                   .D.i.r
-- 00 01 02 03 04 05 06 07   08 09 0A 0B 0C 0D 0E 0F   0123456789ABCDEF
00 44 69 72                                            Dir
*/
@Andrea anyone who doesn't constantly forget which is which is either (a) over 60, (b) a network engineer, or (c) bored a lot
 
Solid, Google Translate, solid.
 
@Andrea not sure. In the end that's just a little sugar over saving null … and do even most usages of ?? end up being ?? null actually instead of just something else, more adequate? i.e. if you compare against string, I often just use ?? "" to have a same type comparison if possible.
 
@MadaraUchiha look up “Bush hid the facts”
 
MGE
Notice: iconv(): Detected an incomplete multibyte character in input string in ... on line 12
but the other lines, seems that are showing good, will try
thanks andrea!
 
4:05 PM
@bwoebi imo specifying a default value here is silly tho
@MGE did you split it up by line?
 
@kelunik Odd that it seemed to start with this commit.
 
MGE
foreach ($clean_lines as $key => $value) {
	$result = @iconv($in_charset = 'UTF-16BE' , $out_charset = 'UTF-8' , $value);
	echo '<pre>'.$result.'</pre>';
}
 
@Andrea (except that "" is also shorter ^-^)
 
@MGE iconv first, then split
 
@MGE ah, don't do that, you need to split it into lines after conversion, otherwise it breaks up the newline characters (thus the error)
@bwoebi unary ?? is shorter still!
 
MGE
4:07 PM
@Dereleased iconv the array?
hmm
 
@Andrea sure, but is it also aesthetically pleasing? :-P
 
MGE
yes
 
@MGE iconv whatever you get from the file
 
@Trowski What does send(0) do? github.com/amphp/parallel/blob/…
 
$file = file_get_contents(...);
$conv = iconv(...);
$lines = explode("\n", $conv);
// ... etc
or whatever method you're using
 
4:09 PM
 
@Trowski Shouldn't github.com/amphp/parallel/blob/… be yielded?
Error: Call to undefined function -d html_errors=0 -d display_errors=0 -d log_errors=1() lol
 
evenin room
 
@Trowski Seems like PHP doesn't like --.
 
@kelunik So it seems.
 
php --help says:
  args...          Arguments passed to script. Use -- args when first argument
                   starts with - or script is read from stdin
 
4:18 PM
Mornin'
Anyone use FTP client Transmit?
 
@kelunik There's no arguments past to the script though
 
maybe you should have started with "anyone uses FTP here?", @Alesana
 
@tereško Good point
 
@Trowski Yes, I thought the script name counts as arg, too.
Pushed.
 
Wait what do you use to transfer files then?
 
4:22 PM
@kelunik Great, that should be much better for debugging.
 
@Alesana scp.
 
^ that
 
@Trowski So, yet another version now? :P
I wonder whether we're at 0.1.100 in 100 days :D
 
@kelunik heh… I suppose so.
@kelunik lol, I certainly hope not.
 
Then I guess I am asking the wrong questions lol
 
4:24 PM
Are you tagging or should I?
 
@kelunik You can, thanks.
 
Just wanted to say another day, another release, but the last one was 12 hours ago.
 
That was yesterday for me. :-D
 
I love writing release statements on Twitter using exactly the 140 chars.
amphp/parallel v0.1.5 released, fixing an issue if display_errors is enabled, improves debugging via stderr forward. https://github.com/amphp/parallel/releases/tag/v0.1.5
 
posted on June 21, 2017 by kelunik

- Prevent `display_errors=1` to break workers. - Pipe stderr of worker processes to stderr of the parent.

 
4:32 PM
That's why we have so many releases, so we can cover all the changes in each one within 140 characters.
 
lol…
 
4:55 PM
@bwoebi How many people do you think agree with Rasmus Shultz about short closures needing feature parity, including block bodies?
 
@LeviMorrison Quite some, I think. I can't quantify it precisely, but I guess, that number is above 20%. But I guess most of them should be fine with the premise that we always can upgrade capabilities later on, if deemed necessary.
 
@LeviMorrison me
 
I would pack it into future scope.
 
Hack has the right idea.
 
@bwoebi It basically rules out { $x => $x }
 
4:59 PM
@LeviMorrison why?
 
@bwoebi How will you allow multiple statements?
 

« first day (2440 days earlier)      last day (2515 days later) »