« first day (2287 days earlier)      last day (2658 days later) » 

4:01 PM
@LeviMorrison The first one is a lot clearer to read.
 
Btw thanks for the input @JoeWatkins @Danack
 
@kelunik Surely you are exaggerating.
 
@LeviMorrison TBH, the latter one reads like you are assigning something into the variable and not doing a function call
 
|> is always a function call
 
@LeviMorrison It doesn't show it's a function call, you need context around it to understand that.
 
4:07 PM
You are just being udmb.
 
@LeviMorrison yes, it is, to someone knowing the semantics exactly
but |> is just a pipe
it just forwards the result into $$
 
so |> 1 + $$ should be fine too
 
That's the narrow thing being proposed which is horrible.
 
@LeviMorrison |> is just a pipe as you defined it in your last mail.
 
4:09 PM
You need two operators to do one operation?
WTF?
 
@LeviMorrison |> as syntax doesn't imply function call to me … it implies forwarding of a value
 
You can't tell me in good conscience that is a good design.
Furthermore |> syntax is lifted exactly from F#.... guess what it means there?
 
@LeviMorrison Probably what you mentioned. But did they choose well?
 
You guys are among the cream of the crop; if you really think as defined is better this is why we have such a horrible language.
 
@LeviMorrison They can still be used separately, well, $$ without |> I mean.
 
4:10 PM
@kelunik Not as proposed they can't.
 
@LeviMorrison With your proposal.
 
Quick question with how it is currently defined; is the following valid?
 
I think your proposal is a good idea and makes $$ much more powerful, but I really dislike special casing functions with one parameter for |>.
 
$x |> $f($g($$))
@kelunik There isn't any special casing there.
As I proposed on the ML:
The `|>` symbol would be the piping operator with these semantics:

    1. Evaluate the left-hand side.
    2. Evaluate the right-hand side. Assert that the result is callable.
    3. Pass the result from 1. as the single argument to 2.
|> always deals with single argument functions.
 
@LeviMorrison Well, if you take it literally, yes, $$ just curries and returns a closure, but it looks like a call.
 
4:14 PM
@LeviMorrison that'd be great in haskell-like partial application
but here? not sure
 
@bwoebi Partial application is exactly the proposal.
 
@kelunik wait…?!
 
As I proposed $$ is partial application, but is not currying.
 
where is partial application proposed here?
 
The `$$` symbol would be the partial function application operator
with these semantics:

    1. When function application has `$$` as a parameter it becomes a
partial application instead. This result of a partial application is a
closure.
    2. Each non-`$$` parameter is evaluated and then bound at that position.
    3. Each `$$` will become a parameter to the closure which will be
passed to the inner function call at its original position.
    4. Each parameter and closed variable will be done by reference or
It's just that when used together you can skip the closure stuff as an optimization.
 
4:18 PM
Ohhh
 
If we allow any expr on the right-hand-side of |> and search for a $$ for a target that is just absolutely goofy.
 
so
$f($g($$)) will be interpreted as fn($tmp) => $f($g($tmp)) ?
 
With appropriate ref-ness and whatnot, yes.
 
yeah
 
Actually wait.
Read that too quickly; it would be interpreted as $f(fn ($tmp) => $g($tmp))
 
4:21 PM
oh
so $x |> $f($g($$)) needs $f to return a callable accepting a closure as value, right?
and not an actual return value of $g?
 
Yes. The reason I asked the question earlier is I haven't read the fine print of current proposal to see if that would be valid.
 
that's subtle…
 
@LeviMorrison Ah, right, currying includes automatic partial applications on calls with fewer than expected params.
 
@Levi I can't decide yet. It's just a bit subtle that the return value of $g($foo) and $g($$) differ
 
It's full application vs partial.
 
4:25 PM
@bwoebi If you have a look at $$ and |> separately it's clearer.
 
@kelunik ?
 
It's just that in $x |> f($$) you just immediately invoke the partial with the value from the LHS (logically).
 
@LeviMorrison yeah, that's just an optimization
 
@bwoebi Then you immediately get that $g($$) returns a closure.
 
$x |> $f($$) is sugar for (fn($tmp) => $f($tmp))($x)
 
4:26 PM
$x |> f($$) would desugar to f($x). You can skip partial application completely.
 
@LeviMorrison if you reduce the expression, yes - but that's an optimization in core then.
 
@LeviMorrison Where the partial application is only at the top level.
 
@bwoebi Yes, but I would guarantee that optimization unlike general closure inlining or something.
 
@LeviMorrison Is that guarantee important?
 
@LeviMorrison we generally don't guarantee optimizations … they're just there ;o)
 
4:29 PM
@kelunik For some people, yeah.
Notably it's important because we don't have to build CFGs and do a bunch of stuff with it; we can generate the optimized form from the beginning.
Unless we decide to implement |> completely as sugar and just pass the AST desugared already.
I think that would be bad, personally.
 
anyone know who Bob Lerner is ?
 
no
 
Just got a reply to qa commit
Balls

On Jan 19, 2017 10:17 AM, "Joe Watkins" <krakjoe@php.net> wrote:
Commit:    a0add878c095cae33794f346dcd09a5ee4123350
Author:    Joe Watkins <krakjoe@php.net>         Thu, 19 Jan 2017 16:17:08 +0000
Parents:   5d773c8b944dc592765c031876116a5166844ebc
Branches:  master
 
It's unclear after reading docs.hhvm.com/hack/operators/pipe-operator how exactly |> finds the target $$.
 
How would you explain the difference between a Database and an excel file?
 
4:34 PM
Between what type of database?
 
|> array_map($name ==> (new SplFileInfo($$.$name))->open_file('a'), $names)
 
@JohnDoe2 who's the audience?
 
Uh... I really don't like how Hack does this...
 
@LeviMorrison Writing code like that seems clever at first, but is horrible if you try to understand quickly what it does.
 
That it is even possible is what worries me.
 
4:36 PM
@Levi so, to do more operations in one line, you'll have to write $x |> fn($_) => a(b($_)) ?
 
Not necessarily.
In the case of what you are suggesting, yes.
 
hmm?
 
Just to be clear, you understand what partial application is, right?
 
yes
 
Then I'm not sure what you are asking.
 
4:39 PM
@LeviMorrison well, you can just apply partial application to a function call, not to a whole expression
 
If you want to fill in this blank $x |> a(b(____)) with the result of $x then you would need to do:
 
i.e. simple things like 3 * $$ + 1 won't work
 
$x |> fn ($x) => a(b($x))
@bwoebi Correct because those aren't functions.
 
@LeviMorrison that's what I just said
 
user895378
@bwoebi not quiet! I'm still accessible ... just been a really busy week. The girlfriend is out of town for the weekend though so I should have time to code after today :)
 
4:41 PM
@rdlowrey Are you free tomorrow? :-)
 
@bwoebi Right, but you can do more operations: $x |> f($$, g(1 + h())) is fine.
 
@LeviMorrison yeah
 
user895378
well, I'll be super busy all day tomorrow but after around 8pm or so I should be able to do what I want + Saturday and Sunday day
 
It would probably work in Scala because operators are sugar for functions.
 
@rdlowrey you definitely need to dedicate some work time for Amp & Co … ultimately you use Amp on work projects, so…
 
4:42 PM
@PeeHaa I figured it out after I asked. I started digging through Jeeves' code on github to look for commands, and found the !!command list in one of the files.
 
@LeviMorrison yeah, that's what I find a bit limiting here
 
@Tiffany We also have !!help now as of today. Which is just an alias for !!command list
 
@bwoebi Dunno whether he needs to have a look there. I don't think we have that many open discussions.
 
@Danack Thanks.
@PeeHaa yay
 
@kelunik no, but work a bit on it if there are no discussions ongoing
 
4:44 PM
@PeeHaa I was trying to find the command to list the admins, and found it somewhere else in Jeeves' code 😛 cause it doeesn't show up in the command list
 
@bwoebi Where do we have real work to do except for Artax?
 
@Sara Uhm... that this works in Hack is terrifying to me: $x |> array_map($name ==> (new SplFileInfo($$.$name))->open_file('a'), $names)
 
@kelunik @rdlowrey wanted to work on e.g. github.com/amphp/aerys/issues/124
 
@Tiffany oooh :)
 
@bwoebi btw. I think our current rate limits per IP do not work.
 
4:45 PM
@kelunik oh?
 
Well, at least wrk didn't report any errors with a high concurrency.
 
argh, problems of writing a class that's coupled to an adapter. I hate myself and my code.
 
@kelunik On what responder?
 
object is in local scope, can't use it in another method >.<
 
If requests can be handled in a single tick there won't be failures @kelunik
 
4:51 PM
@bwoebi Demo hello world, probably that then.
 
yeah
 
But why are those even executed then?
 
The hacklang.org demo doesn't understand |>. Time to use 3v4l.
 
@Leigh are you around and not busy?
 
@bwoebi Seems like a bad idea to run those and abort if they don't succeed within a single tick.
 
4:54 PM
@kelunik ?
 
@Tiffany Just back at my desk, so not busy yet
 
@bwoebi Why isn't there any limitation if the handler works in a single tick?
 
<?hh
$x = 1;
var_dump($x |> [$$, 2]); // valid in HHVM
 
@Leigh If I give you an example of something with an else, could you explain how I could rewrite it without the else?
 
All the examples use parameters to function calls. I would definitely like to restrict it to arguments of function calls only.
 
4:58 PM
@Leigh Don't have to write the code or anything, I just learn a concept better when I'm given an example
 
@kelunik dunno, just the way how it works now… we probably should have maxConcurrentRequestsPerIP (idling connections also count as request then) and maxRequestsPerSecondPerIP instead of maxFramesPerSecond (we could set maxFrames to like 3 * req/sec/ip - just to prevent tiny frame floods), connectionsPerIP and maxConcurrentStreams
 
I'm not sure about the pipe operator, regardless of how it works and how it's restricted ... it's clever, and cool, but if I were reviewing code containing that, I'd probably ask for it to be written clearly ... it's really not clear ...
the cleverer the code is, the less clear it is ... that doesn't seem desirable to me
 
@JoeWatkins There is some saying, "One must be twice as clever to debug code as to write it, so if one writes one's code as cleverly as one possibly can, one is, by definition, not clever enough to debug it."
 
@JoeWatkins yeah, that's my main concern
 
@bwoebi just a thought ... some of us have more than one ip ... they don't ruddy work a lot of the time, but we have them, nonetheless :D
 
5:03 PM
@bwoebi Is there any reason to have a separate connectionsPerIP and maxConcurrentStreams?
And those should actually be connections_per_ip to match the naming scheme of other assoc array options.
 
user895378
@bwoebi yeah I'm going to work on it ...
 
I've been writing clever Haskell code … and find it really hard to untangle it later on… it looks a bit like what Levi is proposing… that's my main concern…
@kelunik well … it's a bit an issue of concerns… Http2Driver is managing streams and Server the connections
 
Instead of streams it should probably just be requests_per_ip.
 
@JoeWatkins then you have 2… we may decide to add also /24 and /48 (IPv6) block restrictions additionally
 
@rdlowrey rdlowrey@nevis.krakjoe.ninja if you wanna do testing of stuff on pretty decent server hardware ... you are also a sudoer, be careful ;)
 
5:09 PM
@JoeWatkins I'm not going to mitigate distributed attacks with Aerys. I'm going to restrict the potential of a single attacker.
 
user895378
@JoeWatkins awwwwww yisssssssss
 
user895378
/me sets up personal torrent proxy on nevis
 
haha
 
lol
 
good luck with that ... torrents don't really work in the uk ... all the trackers are blocked by court order
all the good ones anyway
 
user895378
5:11 PM
:(
 
ikr sucks
 
Do you need a proxy?
Google doesn't like me anyway
Also are those actually ip blocked or just dns?
 
what I need is a secure VPN ... the govt are literally watching everything we do, forcing ISP's to send letters out to notify you that they know when you are acting suspiciously ... I haven't got around to finding one yet ...
gimme an address for tpb ?
 
@JoeWatkins 104.31.19.30
 
try another tracker, that's on cloudflare, they disallow direct access via address
 
5:16 PM
@PeeHaa oh god
 
A lot are actually taken down
 
is kat still up ?
 
nope not when I checked yesterday
 
monova ?
 
probably not blocked yet though
oh wait
that's that community thing
 
5:19 PM
@JoeWatkins actually for the most part the trackers aren't, it's just the web front ends that are problematic
 
I've tried using tpb tracker, doesn't work
 
104.31.19.30 monova
 
also on cloudflare
can you access that ip directly ?
 
Nope. Just add it to your hostfile as test
 
Access to the websites listed on this page has been blocked pursuant to orders of the high court.

More information can be found at www.ukispcourtorders.co.uk
but no list ...
 
5:22 PM
heheeh
 
it seems likely they were a bit clever about it anyway ...
 
/me is going to register www.ukipcourtorders.co.uk and turn it into a proxy
 
haha
 
:P
hahahaa
 
@Tiffany I can try, sorry was reading an article
 
5:23 PM
@DaveRandom lel
 
Did you check out the object calisthenics stuff?
 
wut, you could actually register it ...
 
eval laughter
 
@JoeWatkins ukiSp?
ah
 
echo ($x |> $y |> $$); generates an error in the Hacklang static checker but not at runtime in HHVM. Since $x is not bound to anything it should at least warn.
 
5:27 PM
uk-isp-
 
@JoeWatkins "UK ISP court orders" ?
 
@tereško yeah, … thought of ukip party^^
 
hello any one have demo that i can check in codeigniter web application that if that open in mobile then if not have app then display download app otherwise nothing. Let me know your review.
 
ah, no ... you can't ... it's ukisp ...
 
@bwoebi UKIP court orders would be more along the lines of blocking traffic that comes from outside the UK on the grounds that it is dirty and foreign
 
5:29 PM
lol
 
@JoeWatkins skytorrents.in
 
@Leigh nice ... but ... won't they just block that when they find out about it ?
 
> Page served in 7.101µs
no it wasn't.
 
@JoeWatkins maybe, but for now...
 
@DaveRandom hahah
 
Anonymous
5:30 PM
8k more but I have to use Laravel, hmm..
 
@Leigh you probably could always use proxy/vpn to access torrent search sites
 
134.218 mbps :)
 
Anonymous
It's like being asked to work in a posh restaurant but wear a McDonald's uniform
 
I do like torrents ...
 
@tereško I download to a box in france over torrent, then via http to home
 
5:31 PM
@JayIsTooCommon for context, that's £150/week. I'd probably do that.
 
I wouldn't
 
I'm a brazen whore though.
 
never take a job you can't be happy in ... your job is the main thing you do with your life, you need to have a chance of enjoying it ...
 
Well I assume he's looking at it because not currently happy
 
@Leigh hmm .. getting a dedicated server in RU would be useful for that
and then pull the stuff locally over SFTP
 
5:33 PM
@Leigh ovh?
 
@Leigh they can see that ... might aswell just use torrents ...
 
@PeeHaa of course
 
I assume HTTPS
 
@JoeWatkins sorry, when I say http, I mean https
obvs
 
5:35 PM
well it's not obvious ... it's missing the most important letter ... but ok ...
 
It's me :D
@Tiffany return after setTxtBody and drop the else, is the easy way :)
 
are secure trackers a thing, or not ?
 
they are
 
Actuallt @Tiffany you need to add $mail_object->setTxtBody(strip_tags($content)); at the top
 
but I'm not sure exactly how secure they are
 
5:37 PM
It's the same for both conditions
 
@Leigh let me redo the gist, because I pasted it while I wasn't logged in. I'm going to edit it and have you look at it, if that's alright
 
@bwoebi On Aerys for Amp v2 I'm currently getting this when writing to a websocket: "critical Error: Call to a member function resolve() on null in /Users/aaron/Developer/aerys/lib/Websocket/Rfc6455Endpoint.php:468"
 
@PeeHaa that makes sense
crap
I can't delete my gist now
 
he has a name ya know...
:P
 
5:39 PM
kaaskop
 
hahahah
 
@Trowski well, there seems to be an onwritable enabled without anything to write?
 
where's your meitu picture?
 
wtf is a meitu?
 
oh
 
5:39 PM
oooh is that where all that stuff is coming from
 
@PeeHaa See those starred i.stack.imgur links? :P
 
@Trowski probably the special case on line 230 … needs a dummy Deferred then I think
 
@Leigh yeah was wondering what those were :D
 
2 mins ago, by Leigh
. https://gist.github.com/lt/cce062182895a69ca819253ca97565dd
 
5:41 PM
@bwoebi Why is that conditionally disabled there? Seems like it should be disabled immediately.
 
@Leigh Yeah, just checked yours after I finished writing mine. 😛 WOOT
 
@Trowski because the Upgrade response may still need to be sent … if you look a bit above, you see $client->writeBuffer = $ireq->client->writeBuffer;
 
@Tiffany :)
 
one of these days I need to fix phpstorm so that tabs will use spaces instead of tabs, when I tab. so if I tab, it'll either make two spaces, or four spaces...
 
I was serious when I said tabs were better ^_^
 
5:43 PM
@LeviMorrison yes.
 
@Tiffany Do it now? Settings -> Editor -> Code Style -> PHP -> Tabs and Indents
 
I've messed with it, but I haven't figured out how to do it correctly
cause the settings I have apparently aren't working right
 
@bwoebi So… it disables the watcher if it's not empty?
 
Untick all the boxes, put the numbers all at 4
 
@Trowski oh shit
@Trowski … yeah, in v1 I enabled it if it was not empty…
 
5:44 PM
Let me see if that fixes it.
 
@Leigh yay
 
@Trowski but it still needs a dummy deferred then
 
@bwoebi That fixed it, but I can add a dummy deferred.
 
@Trowski "enable" => $client->writeBuffer != "", in v1^^
@Trowski yes, please
 
@bwoebi The deferred is necessary if there is something in the buffer, correct?
 
5:46 PM
yes
And to be accurate, framesSent should be set to -1 then
 
@Leigh Should I return $mail_object;? I'm setting the body which is getting built into $this. I realized my class has a serious lack of returns, and I'm trying to figure what I need to return...
 
@Trowski this mistake also exists in aerys master
let me fix it there
 
@bwoebi Ok, then I'll merge it and fix it for v2 so we don't have a merge mess later.
 
@Trowski Fix on master and merge into v2 then?
 
@Tiffany You don't always have to return something. The method is a "set" method. That implies it shouldn't return anything.
 
5:48 PM
@kelunik Yeah. I've been busy merging master into amp_v2 branches so they're up to date.
 
When you see people doing return $this;, they're doing it wrong, don't copy them.
 
Yes, I saw that.
 
@Trowski pushed (master)
 
@Tiffany I don't know much about your app, but the immediate question is why can't you do $mailObject->setBody($content, $options) ?
 
@Trowski @bwoebi We did it wrong for Artax, there we cherry picked commits to 1.x
 
5:51 PM
@Leigh here, I'll send you what I have so far. It's not complete though.
 
Got it, you can nuke that big ol' post :)
 
dat slide, dunno whose idea was that gist in chat update but it was bad
 
Yes, it's coupled. I was going to decouple it, but I don't have the time right now to write a second class.
 
You said you're stuck on 5.3 right?
 
for now, yes
@Ekin sry DX
 
5:57 PM
@bwoebi Another issue: Close frames received from the client seem to be being ignored.
 
not your fault at all
 
@Trowski what makes you think that?
 
@Trowski Didn't @bwoebi fix that?
 
@bwoebi If I send a close frame from the client, nothing happens.
 
5:59 PM
@kelunik that's about TCP close
 

« first day (2287 days earlier)      last day (2658 days later) »