« first day (2047 days earlier)      last day (2900 days later) » 

2:00 PM
@bwoebi no, we behave the same
we only don't have a concept of suppressed exceptions
for us suppressed exceptions are previous exceptions
 
oh okay
 
union types would make it messier, I guess that's why I don't like them
 
@NikiC where's that branch?
 
@Andrea I think I forgot this for a while. I was envisaging a case where union and delegate (and maybe struct) can create proper types and typedef is just an aliasing tool, but that doesn't make sense unless you require those "proper" types in function signatures, which we can't really do. In fact I just summed up my point in a coherent sentence way better than the last hour of chat.
 
@bwoebi on my computer...
 
2:02 PM
and here I am, searching it on github… :-D
 
I'll add your test case as well ... simpler than my own ^^
 
I should do my shadow classes thing at some point.
 
:-D
 
Shadow classes, or: the death of "objects"
I want all PHP values to be "objects". Not necessarily in their internal representation, but.
one day, (true instanceof \php\Boolean) === true
 
(((true instanceof \php\Boolean) instanceof \php\Boolean) instanceof \php\Boolean) === true
7
 
2:04 PM
one day, (array instanceof \Traversable) === true
 
@Andrea no, this Integer, Boolean etc. autoboxing from Java is horrible.
 
@bwoebi autoboxing, of the Java and JavaScript kind, is not what I am proposing ^^
 
uhm, well?
 
rather, all values are treated as belonging to classes, but it'd be a deception, at least in how php-src would implement it
 
Hi
 
2:07 PM
instanceof on a primitive type would be redirected to instanceof on the shadow class corresponding to that type
likewise for all other object operations
 
hmhmhmhm… I'll judge by the implementation or a detailed spec.
 
Wouldn't that basically nullify scalar types? (not an argument against it)
 
also, the shadow classes should be probably then called literally by the name of the scalar types (i.e. \int, \string etc.)
 
Yeh, putting them in the \php namespace is a horse that bolted long ago
 
what is the best method to download files (large files) from dropbox using php?. Please share your suggestions.
 
@DaveRandom I hope it'll never be used
 
Thank you DaveRandom. php.net/stream_copy_to_stream, This will work in my case.
 
@bwoebi not sure. \vendor\package does have its selling points for libs (and exts are basically just libs). Agree not for core functions (main/ext-standard) though.
 
right.
for exts I'm fine
but for core (or always available exts), nope.
 
For core packages that's what the global namespace is for.
 
2:13 PM
right
 
\Php\Generator would be silly, and so would \Php\Stream.
 
yeah
 
@Trowski @bwoebi @rdlowrey Can we please switch to src for new packages instead of lib?
 
why? :-/
 
@kelunik I'd be fine with that, I was just following Amp's lead.
 
2:22 PM
@bwoebi Why ":-/"?
I don't see any value in using lib.
 
@bwoebi Agreed, but I am busy and still recovering from being sick – can you help with the RFC editing?
We need to get the voting section in order.
 
It's not the package's libraries, it's the package's source.
 
@LeviMorrison yes, I can, we just would have to discuss what exactly
 
We need to make sure allow null even standalone.
 
@kelunik Agreed. I always found lib to be weird, it's more of an alias for vendor than src.
 
2:23 PM
@kelunik it's not libs, but lib. It's the library the package provides
 
Disallow ? in unions as a separate vote or same?
 
@LeviMorrison same vote
the separate vote should be on completely disallowing it
 
@bwoebi libs or lib is the same. Just as doc or docs. Usually you just use 3 letters: doc, lib, src, res, ...
 
@kelunik libs is external libs for me…
lib is the library provided
 
lib for me as well. (external)
 
2:25 PM
src means an applications source for me
 
@bwoebi In that case we would have to separate internal things to src and others to lib ...
 
wouldn't be too bad in Aerys case probably
 
@Trowski Right, that's why I stopped using it starting with github.com/amphp/beanstalk
 
Let's be consistent across Amp packages. I don't really care which one we pick, but just pick one. :-P
 
@bwoebi It would be bad. Totally bad. Because internal things use external and the other way round.
 
2:28 PM
@LeviMorrison null standalone only makes sense with variance, i.e. out of scope of this RFC
 
@bwoebi Is Aerys now a project or library? ... Doesn't matter, as we always use src.
 
@kelunik both
 
@bwoebi If it's not done now there is no chance of killing void for null which makes better semantic sense for PHP.
It can't be later.
 
We could move Middleware, Request, Response and the like to a separate package. Then we also don't have issues with semver, as you want stricter requirements for those than other things.
 
@kelunik +100
 
2:31 PM
But splitting Aerys is actually a separate topic.
 
That's Dan's convention and he did have a reason for it, though
Aug 19 '13 at 18:11, by rdlowrey
I'm thinking I'm going to switch from src/ to lib/ in my project directories for storing classes since they are, after all, libraries. Anybody have thoughts on this?
 
@LeviMorrison I just don't believe we have a great chance to have that vote pass without variance … but it may be worth a try
Aug 19 '13 at 18:13, by ircmaxell
lib is classes and reusable (potentially) code. src is procedrual wiring and one-off code
so much this
 
@bwoebi Basically, vendor and src with Composer.
 
procedural wiring and one-off code … that's src for apps.
 
lib... src... does it matter? Just pick one yeah?
 
2:35 PM
@DaveRandom It's still the source of the package / library.
Not the library of the library.
 
I'm +1 for src, you don't need to sell me on it :-)
 
@LeviMorrison But … but … that's all the fun … debating over the name of the codeshed
@Levi And we do include false|true in the main vote, I hope?
 
Hmm.
maybe we have a main vote
And then a series of smaller votes on null, true/false and forbidding ?
 
that's possible too
I'm not sure on having too many votes, but … hehe
But well, these votes separately may give it a bigger chance to pass, if they're 50%+1 votes ^^
 
@bwoebi github.com/amphp/awaitable/commit/… Do we care about possible collisions? Only one other package will use this namespace.
 
2:48 PM
@bwoebi Sounds good to me.
 
@Trowski Exception should be wiped, I don't like an exception namespace and Internal can then move to Amp\Awaitable\Internal or Amp\Awaitable even.
 
@kelunik I was considering removing the exception namespace, so that's fine.
I'm not terribly worried about collisions in the Amp\Internal namespace, especially since the names there don't matter much.
 
As long as we don't have an internal package and only use it in two packages, it's probably fine, yes.
Actually, it's the only package that uses it?
I think amphp/loop should use Amp\Loop.
 
@kelunik It is.
 
So what's the other package then?
 
2:56 PM
Observables
 
Ah yes, fine.
 
So what will happen with amphp/amp?
 
I'd leave it as is, mark as abandoned and direct users at amphp/loop.
Or we make it compatible with the standard?
I found issue, but I don't remember which one.
I think it's not possible because of tick with its noWait argument.
 
@kelunik We could provide it as a base package for applications that want to use the Amp eco-system for their application. It would require amphp/loop, amphp/awaitable, and amphp/observable. Maybe there's some functions we could define...
^ Just thinking out loud.
 
I think it's fine having them separate and leave amphp/amp as is.
That way we can update observables / awaitables with BC breaks without breaking the loop etc.
 
3:04 PM
@kelunik That's the biggest appeal to separate packages IMO.
 
That's also the reason why we should separate Aerys into at least two packages.
 
Wes
'noon
 
@Wes o/
 
Yep, middleware in a separate package makes a lot of sense.
@Wes Mornin'
 
As well as Request and Response, also Server as an interface.
 
3:07 PM
@kelunik Right, all the components for the middleware interface.
 
For Middleware we also need InternalRequest separate.
@Trowski Those components aren't used by middlewares, but normal responders.
 
Wes
stupid question. what's the math for knowing the length of a power set of a set of N elements? :B
 
Wes
3:23 PM
managed to remember, nvm
@DaveRandom should i add ellipsis only to long labels or equally to all labels, stripping one char at a time till it fits?
i'd go with the latter...
 
9 hours ago, by DaveRandom
@Wes For simplicity, maybe ellipsise at 3 words and if it still doesn't fit then go multi-message.
 
Wes
and, i'd do char by char, rather than words
 
Dunno, I'm never sure what the best thing to do here is
I generally just create a few test inputs and keep fiddling until the algo produces a nice result for all of them @Wes
I usually find that if I start off with a clear idea of how to do it then I get an unsatisfactory result
NLP is hard
this is a very simple form of NLP but it's still hard
 
Wes
i already know i will overly complicate things :B
i think i have an idea
 
especially apt for you :-P
 
Wes
3:32 PM
lol
DAT movie
 
That's in my top 10 films of all time, probably
 
Wes
it's a great movie
 
can someone help me please my code doesn't work pastebin.com/gJquVUq6
i tried it on phpfiddle.org
but it says E_WARNING : type 2 -- Invalid argument supplied for foreach() -- at line 6
 
but what =)
invalid argument supplied for foreach
 
3:50 PM
Why doesn't anybody write a PHP-RFC app? So often uselessly checking-whether-I-already-looked-at-that-particular-RFC-and-determined-whether-‌​I-actually-have-an-opinion-on-it-and-maybe-even-already-voted-on-it-but-my-memory‌​-is-so-bad-that-I-cannot-fucking-remember.
 
I think the majority of people have already filled their lives with other work avoidance projects
 
4:13 PM
Have a php script echoing line after line of text to a terminal (think matrix) - as you would image the lines come one after the other so it looks as though it's scrolling down - is there anyway I can invert this so that lines are echoed before the previous? maybe a linux command?!
 
@kelunik an internal package would be possibly weird and Exception should be wiped, yeah
 
4:39 PM
o/
 
we recently got some problems because of the exclusive locking by php web sapi (session module) and a lot of parallel http requests triggered by a single bot. anyone aware of a mean to measure the median time how long apache takes to get the session lock (mod_php). would be great to have this metric in my munin instance...
 
You'd have to measure it in PHP, apache doesn't know that that's what PHP is waiting for. I suspect the only way to get that kind of metric would be via a custom session handler
With a custom session handler you might be able to mitigate the problem somewhat anyway, a database-backed session system could avoid locking the session when it's not going to be written to (although I think this would require a ground-up session lib, there's no way to tell the session ext that you don't need an exclusive lock afaik)
Don't quote me on any of the above though, there may be something I don't know about, sessions are scary and I don't know the inner workings at all
 
4:55 PM
Soooo lemme see why broke @Jeeves this time
How can I jump to the end of journalctl output?
 
(nvm. tail. for files though)
 
Isn't it some magical non readable file format?
 
or journalctl > file.txt
tail file.txt
 
ugghhh
 
5:00 PM
oh wait I can just tail the thing itself \o/
 
tail -f filename is awesome
 
less +F filename works too, and you get the power of less
 
General question... what should if I do if I flagged an answer as 'not an answer' and then the poster updated the question (and made it 'an answer')?
 
5:02 PM
journalctl --follow
 
journalctl -u jeeves -n 100 -f indeed worked fine
 
alternatively, SYSTEMD_LESS=FRSXMKG journalctl $stuff
 
I have no idea what that does :P
systemd is all magic to me
 
Wes
@DaveRandom @PeeHaa i'm not sure if i should use oop or array oriented programming in jeev's code. do you care? :P
 
poop please
BTW @all @Wes broke @Jeeves last night it seems for no apparent reason:
 
Wes
5:05 PM
i did? :B
 
May 22 14:08:41 149-210-224-55.colo.transip.net systemd[1]: Stopping Jeeves as a service (JAAS)...
May 22 14:08:41 149-210-224-55.colo.transip.net systemd[1]: Started Jeeves as a service (JAAS).
May 22 14:08:41 149-210-224-55.colo.transip.net systemd[1]: Starting Jeeves as a service (JAAS)...
May 22 16:59:18 149-210-224-55.colo.transip.net systemd[1]: Stopping Jeeves as a service (JAAS)...
May 22 16:59:18 149-210-224-55.colo.transip.net systemd[1]: Started Jeeves as a service (JAAS).
May 22 16:59:18 149-210-224-55.colo.transip.net systemd[1]: Starting Jeeves as a service (JAAS)...
 
Wes
LOL
 
Also git blame tells me @DaveRandom forgot a dump :)
 
Wes
Error description: Field 'item_name' doesn't have a default value classic random errors i get when db tables break. is that pg?
 
I was just wondering where they are coming from
where is it?
 
5:07 PM
Same here
No clue
 
those are the flags it'll pass to less. G makes it skip to the bottom
 
\o/
 
ah right
> May 22 17:31:01 149-210-224-55.colo.transip.net php[1937]: var_dump('bar');"
 
@KevinMGranger Dat moment when you can untar something just fine, but cannot read logs
 
wtf happened with that one?
 
5:08 PM
@DaveRandom uuhhh good one
 
oh it's clipped a multi-line when you were testing it
 
I have my RHCSA and I still struggle with journactl ¯_(ツ)_/¯
 
oooh
@KevinMGranger :P
 
did it actually crash then?
or was it locked?
A crash I'm not really too worried about because shit happens and we have no reconnect logic
If it's locked, that's going to be an uber heisenbug I suspect
 
Either locked or just lost the connection somehow
 
5:10 PM
well was the proc still running?
 
That's the good thing about the log... It doesn't log much useful! :)
@DaveRandom oh didn't even check.
moment
Nope it's down
Now why didn't systemd did it's thing now :(
oh sorry
scratch that
Stupid case sensitivity. Why you so sensitive linux!?
[root@149-210-224-55 peehaa]# ps aux | grep Jeeves
root      1937 99.9  0.3 360952 29300 ?        RNs  May22 2980:01 /usr/bin/php -d error_reporting=0 -d display_errors=1 /srv/www/Jeeves/cli/run.php >> /srv/www/Jeeves/data/log.txt 2>&1
root     24243  0.0  0.0 112648   972 pts/0    R+   19:12   0:00 grep --color=auto Jeeves
 
So it's been hung for ages
Need to see the logs to have any hope of figuring that one out
 
It's still in the same state
Any chance I can do anything now?
 
no, would need to see the debug logs
to even begin to know where to look
 
Will set up full logging tonight unless I get drunk first
 
5:15 PM
so, tomorrow then
 
:-)
!!lxr poop
 
@PeeHaa There were no results for that search
 
Welcome back bruv o/
Aaaand stupid phpstorm still doesn't update
 
they have some problems since that direction change last year. for the first time there's been some downright buggy releases
 
Up to a year ago it was reaaaaaally slow for me. They did fix that I think
 
5:19 PM
heh. can't have everything at once I guess
 
:)
 
Night, guys. See y'all lata'.
 
later @Saitama
 
@Trowski your observable is pretty much our PromiseStream…
It's already quite high-level
 
@PeeHaa so yeh, first thing that was not processed was chat.stackoverflow.com/transcript/11?m=30720426#30720426, the last thing that was successfully processed was chat.stackoverflow.com/transcript/11?m=30717943#30717943
it could be nothing to do with that though, might be that it hung on some random event
 
5:20 PM
@Trowski I wished to have a notifier/watcher as underlying low-level API
 
btw did you guys know that, cry engine is now OPEN SOURCE!
 
which is more easily consumable inside libraries
 
@DaveRandom That would be my guess / fear
brb getting food
 
@PeeHaa debug logging would show it up though, since we verbosely var_dump every event
 
5:23 PM
i think, there should be an option to enable verbose mode, otherwise, don't dump anything...
 
@bwoebi Yeah, I said the API would be similar.
 
@Saitama Best license ever
> Licensee shall not ... use the CryEngine for the development of any product other than Games, including without limitation: Serious Games.
 
:P
 
@NikiC Do you still have your cryptopals code? Having trouble on 49, wondering if your shared client/server key was global, or per-client (i'm trying to do it per-client - and I just can't see how)
 
@Trowski what's the point of dispose()?
 
Wes
5:29 PM
@DaveRandom how does this look? rfc-vote Typed Propert…, PHP Attribut…, Functional Interf…, Closure from callable fu…, Forbid dynamic calls to scope introspection…, Callable protot…
 
@bwoebi A way to externally stop the observable.
 
this is only possible if you yield the $emit() promises though
 
@Wes Don't like the fact that you're trimming Typed Propert…, PHP Attribut…, Functional Interf…
 
As said, I'd like to have a notifier/watcher underlying API
 
@bwoebi Which it should be.
 
5:32 PM
That's why I was talking about doing it on words
 
Wes
trimming is distributed evenly though @DaveRandom
 
@Trowski the observable API is just fine when you receive the events at a central place
 
@bwoebi That could be done as well.
 
Wes
@DaveRandom you sure you want to be like that? "Typed..." "Typed Propert...". i definitely prefer the latter :B
 
@Wes so I'd suggest this:
 
5:34 PM
@bwoebi Though part of the point of using awaitables/observables is to avoid event/callback style programming.
 
Wes
actually what i posted before was wrong, it's:
rfc-vote Typed Propert…, PHP Attribut…, Functional Interf…, Closure from callable fu…, Forbid dynamic calls to scope introspecti…, Callable protot…
 
Observables can have multiple iterators, so you can have many watchers of an observable simultaneously.
 
$perRFC = $numberOfCharsBeforeTrimRequired / $numberOfRFCs;
$remaining = 0;
$done = [];
$trimNeeded = [];
foreach ($rfcs as $i => $rfc) {
    if (strlen($rfc) <= $perRFC) {
        $done[] = $rfc;
        $remaining += $perRFC - strlen($rfc);
    } else {
        $trimNeeded[] = $rfc;
    }
}
$perRFC += $remaining / count($trimNeeded);
foreach ($trimNeeded as $rfc) {
    // trim to $perRFC chars
}
@Wes ^
That's pseudo-code, need to account for floats etc
basically, if you can fit a whole title then do it, then trim the ones that are too long to fit
 
@bwoebi Perhaps I should rename the ObservableIterator interface to simply Observer.
 
Wes
@DaveRandom i tried that. think about it, you will end up with one word labels only, or others trimmed regardless
 
5:40 PM
@DaveRandom I'm going to turn up loggeing to lvl 11 either way
We don't eat exceptions do we?
 
@Wes what is the actual value of $numberOfCharsBeforeTrimRequired?
 
Wes
150, ish
 
@Trowski dunno… perhaps you shall first implement the low-level API and then we can look at the names
 
Wes
@DaveRandom Typed Properties, PHP Attributes, Functional Interfaces, Closure from callable fun…, Forbid dynamic calls to scope intr…, Callable prototypes
adjusted the proportion so that longer labels will be trimmed more
 
@Wes that looks good, check out 3v4l.org/0bmDb
Basically recursively keep dividing up the remaining bytes until can't eliminate any more, but $perRFC never gets smaller so there's a minimum number of chars shown per entry every time
 
5:54 PM
!!eval var_dump(json_encode('foo'));
 
Wes
3v4l.org/8b87X @DaveRandom
 
!!eval var_dump(json_encode(1));
 
Wes
mine's complicated :B
 
5:54 PM
lolwat
!!docs JSON_NUMERIC_CHECK
 
[ is_numeric() ] Finds whether a variable is a number or a numeric string
 
...
 
@Wes also, compare the difference between what yours and mine do when you drop it down to 120
@PeeHaa wtf
 
Wes
@DaveRandom it's similar, no?
 
@Wes it may be that mine looks better because it's not accounting for separators etc
I need to go, maybe bbiab
 
5:59 PM
Am about to change hdd
anything else then ssh keys I should remember to backup?
probably not
 
Just switch them and keep the old one for a while.
You always are going to forget something anyway
 
@Leigh I have it, but I couldn't answer that question without getting into the code again. Should I just post it?
 
Wes
@DaveRandom yours is simpler i like it. do you want me to fit in the plugin or you do it?
 
I would like to understand why people are so angry against the Callable Prototypes RFC (wiki.php.net/rfc/callable-types). Is that because you don't see the interest in type-hinting callables (?! why), or is that because there eventually could be a better/nicer solution ?
 
@NikiC No it's fine, in the meantime I think I misread it. I was assuming the user calculated the mac, when in fact an intermediate server (web front-end) calculated it.
 
6:07 PM
ok :)
 
yea thanks, quick scan looks like what I just said is the way to do it, you are calling a web client that calls the server, I was assuming I was the client
Set 8 is listed on the website now, still a mail-in apparently, I mailed in a week ago, no response :/
 
Wes
6:25 PM
@MorganTouvereyQuilling haters gonna hate
i'm not sure if i like inline callables. i thought it was ok at first, now i tend to prefer named ones more
unsure about joe's proposal, would probably prefer something like type Foo = callable(int $a, float $b): Baz;
 
I've already pinged e.g. @NikiC about why he voted no, but no reply
 
@Wes Sure, inline callable prototypes aren't sexy, but this and "typedef" are different things. This is a major feature that we can find in a lot of languages, and callables are more and more common these days. Without this RFC, there's just big holes in our type-hintings.
 
Wes
imho public api = named ones. internal stuff = lazy-mode inline ones
one could argue that internal stuff could even not use type declarations at all, though
 
Just to protest I will validate my callables with ReflectionFunction :D
 
Wes
same boat. one day i will finish my static type checker... :B
 
6:37 PM
Like TypeScript we should release TypePHP
I'm wondering how the Generics RFC will be received
@bwoebi I'm just using amp now, and generics would be awesome on Promises (my IDE is lost with them when using with a yield) :/
 
@MorganTouvereyQuilling Generics wouldn't bring any value here, because IDEs can't know what's sent into the generator after yielding.
 
posted on May 24, 2016 by Niklas Keller (kelunik)

Did you ever want multiple developer environments without ever changing URLs? Nginx can help you. Unlike Apache, Nginx can be configuered very dynamically. You can use map to map cookie values to document roots. map $cookie_environment $environment { default production; feature feature; develop development; } You can use the $environment variable then in paths to root. You

 
@MorganTouvereyQuilling So, Hack?
 
@kelunik Yeah but it's easy to support (i'm thinking about PhpStorm). And there are so much use cases my god. Since I'm doing C# / TS, everyday I regret to not have it in PHP.
 
Wes
@bwoebi do you have a sec? can you help me understand why the commented code doesn't work, but it works if i do array_merge? 3v4l.org/tBY4O
 
6:50 PM
@MorganTouvereyQuilling If it's specifically coded for Awaitable / Promise, yes, but otherwise, no.
 
@Andrea I think I prefer Zend to Facebook :p No, I think the community should stay unite on an unique interpreter, and the Hack community is very little
 
@kelunik I was hoping we could fix that with @resolve in doc blocks of functions returning Awaitables.
@bwoebi What API were you looking for in the low-level event emitter lib? Something similar to Evenement?
 
@Trowski Generics would be the right way. Even if they're just supported in phpDoc.
 
What was the reason for not allowing -> "Uncaught Error: Cannot unpack array with string keys in"?
 
@PeeHaa forward compat with named parameters
 
6:58 PM
Right. tnx
 

« first day (2047 days earlier)      last day (2900 days later) »