« first day (2302 days earlier)      last day (2872 days later) » 

17:00
@Wes And people end up with questions on stack overflow because they have bugs, or know the behavior and want the other way.
If by-value is by far the most used why force people to do garbage like this?
$f = (fn($ndx) => fn($array) => $array[$ndx])($i);
And that's why current usage does matter, particularly for single-expressions because you just made them more complex than if you just used the current facilities:
Wes
Wes
it's not garbage
$f = function($array) use($i) { return $array[$i]; };
@Wes Feel free to cc Nikita or Bob or other Internals contributors; that's definitely undesirable.
$f = (|$ndx| => |$array| => $array[$ndx])($i);
If they are short enough maybe it's not so bad but that's only if we get them really short. And it's still more complexity, even if it is fewer characters.
Wes
Wes
but i'm not gonna argue, we had this discussion already and brought us nowhere. it's hard to defend both positions and i don't have the energies
It's not really about characters, its about how you have to bend your mind to work around an issue that doesn't need to exist in the first place
Wes
Wes
but my crystal ball predicts people are going to complain hard for this
17:07
@NikiC (I agree, but I think characters are still important)
lol, of course they'll complain
@Wes They'll complain either way.
They'll complain either way
They always complain
Wes
Wes
@LeviMorrison i have lot of respect for niki and bob, but in this case i would rather ask to someone who works with closures daily, like a js developer
@Wes Nah, I'd rather pick someone who actually has worked in Haskell or Clojure.
There's nothing about JavaScript that forces you to use closures, really. Contrast that to functional programming languages.
Wes
Wes
17:09
doesn't clojure work that way too?
@Wes I purposefully picked two functional languages with different behavior.
@LeviMorrison In Haskell its kinda moot
@NikiC Yes, exactly.
If everything is immutable both behaviors are indistinguishable ^^
@NikiC By implementation, but not by semantics.
Clojure lets you alter the value; Haskell won't.
17:13
soooooooo ... this is just in, Antifa is far-right and affiliated with Braitbart: twitter.com/wopright/status/827373711401566208
Each language demonstrates the value of each method.
@LeviMorrison counterargument: erlang
@tereško I'd love to know more about Erlang than I do but sadly I don't. Can you show me an example?
my point is that Erlang does not even have a loop constructs
it uses tail-recursions for loop-like things
@tereško Nor do Haskell or Clojure..?
(actually clojure might; checking)
(Yes, Clojure doesn't have it; Clojure's loop is tail-call recursion)
17:18
@JoeWatkins Are you the reviewer of all code before it reaches production?
Wes
Wes
@LeviMorrison but, we all make fun of js and me included, but people are comfortable with it, me included jokes apart... otherwise it wouldn't be so popular. that would be a "looking at current usage" that is more indicative than haskell's... which has "no actual usage"
For what it is worth I don't care which way we bind.
I see the value in either way.
@Wes for client side web programming there aren't exactly a lot of options.. might factor into that popularity a bit
@PaulCrovella JS has a monopoly on client side programming.
A dictatorship
Wes
Wes
it is a loved dictator though
17:28
@TomasZubiri bullshit… we all code in C… what you are seeing is just code transpiled to JS :-)
@Wes ...no it's not lol
Why do you think basically all major browsers are working on WebAssembly?
Wes
Wes
discussion is degenerating with the dictatorship and things... and i didn't even want to have it... :B again, you surely want the feature more than me, and i don't want to oppose. it's certainly better than function(.........) use(.........) and that's something :B - the end
@bwoebi yes
I think I'll pass
Dang it.
I keep managing to send emails prematurely by smashing hotkeys for gmail I don't even know.
17:43
@LeviMorrison TIL
ctrl + enter?
@Wes I had no idea there was a discussion, I just wanted to flame js.
OMG
is that client side C ?!!?!??11?!!!1?
Wes
Wes
@TomasZubiri no probs :P
I can't wait for wasm.
17:45
@JoeWatkins In nightly and development builds of browsers, yes.
Is there a standard format for STD process communication, or should I just write a JSON scheme?
@LeviMorrison 'mazing ...
@PeeHaa you will have to lift your ban on my doing client side things when wasm is a thing ...
@JoeWatkins it's not machine code running directly on your CPU though, you need a VM to isolate it
@JoeWatkins but... but people will see it
@nikita2206 all the time ?
17:49
@JoeWatkins all the time that it's running?
I'm cool with that. C running on my machine seems like a huge security issue.
@nikita2206 I've just this minute heard about this and am trying to read overview and things, one place it says it aims to execute at native speed using commonly available hardware features, and another place says the "execution environment" may need to emulate features that are not supported on the host
so it's always executing on a vm, or sometimes directly on the host ?
Evening
@LeviMorrison for performance?
@bwoebi Only partly.
17:52
@LeviMorrison Also for getting rid of JS?
@bwoebi Providing alternatives, yes.
I for one, stayed away from front-end because I disliked javascript. I'm sure many others felt the same.
browsers too. I dislike browsers.
so it runs in a vm, but there are plans for a JIT
Yeah, I probably still won't do anything in the browser even with WebAssembly, except maybe port toy languages to have a wasm backend so you can execute them directly in the browser without transpiling to JS.
17:59
@JoeWatkins well, webasm ought to be directly translatable to actual machine code (and not a a classical one-way JIT)
the VM part is just to ensure nobody escapes the sandbox
@bwoebi Not quite; still ensures memory safety and sandboxing.
But it's substantially easier to do.
yeah, what I said.
Yeah, network/user lag :D
regarding memory safety, you can restrict access (just like the MMU does) and pre-empt/yield when necessary
these are typically zero-cost once the code is started
@JoeWatkins I'm afraid I can't let you do that dave
18:04
hey guys, is using an framework necessary? what if i don't use a fw?
@PeeHaa but but ... but but ... but ...
@MehmetÇağrıARI For...?
Just no
Nope. No no. Nein. Nee
Non
@Allenph ehm.. websites? what you mean
@Allenph only I'm working on the code
@LeviMorrison the weak point is the library code outside of the sandbox providing the API for your code
@MehmetÇağrıARI I used packages from several projects in my last project, instead of a full framework
@MehmetÇağrıARI What do YOU mean? "Do I need to use a framework?" No relevant info. Do you need a framework to write a "Hello World" program? No. Do you need it for everything else? Not technically, but pragmatically 1000% yes.
@PeeHaa okay okay ...
@Allenph a license buying website, for example?
18:07
@MehmetÇağrıARI The answer to that question is most likely: no you probably don't
yw
@JoeWatkins Sorry I just cannot let you get near that stuff on the front
@PeeHaa You're going to send this poor guy off with no ORM and he's going to write PHP in his HTML.
Not sure which one is worse
@Allenph it's not stupid if it works
18:08
An ORM you don't understand pr mixing that stuff
@MehmetÇağrıARI It is stupid if it works...poorly...for 100 times the effort.
And isn't scalable. Or maintainable.
@MehmetÇağrıARI depends on how much you want to spend putting it all together instead of just using something
!!uptime
╔════════════════════════════════════════════════╗
║ [3 minutes and 34 seconds] without an accident ║
║          since [2017-02-03 18:06:25]           ║
╚════════════════════════════════════════════════╝
18:10
oooh that's pretty
What kind of AI is Jeeves?
yes and it only took 2 hours and 5 PRs! \o/
@Allenph AI? LOL
@PeeHaa and a surprisingly large crew of people
#teamwork
18:11
@LeviMorrison I was being facetious.
a chat bot
@Jeeves what kind of AI are you?
@PaulCrovella Human.
there you have it
18:11
@Jeeves what kind of elephant are you ?
@JoeWatkins I am a human bean you elephant.
@Jeeves I'm not an elephant
@JoeWatkins Er, I never called you an elephant.
@Jeeves I'm not going to spend my time arguing with you
@JoeWatkins So then what are you?
18:12
i don't recall saying snakes
@Jeeves better than you ... punk ...
@JoeWatkins Are you a human or a robot?
@Jeeves both
@JoeWatkins Which one more?
@Jeeves both in equal measure
18:15
@JoeWatkins Did everything come from nothing?
@Jeeves better you go to sleep.
@Linus Shh, just go to sleep.
@Jeeves obviously
@JoeWatkins So do you have a real name, computer?
@Jeeves krakjoe
18:15
@JoeWatkins Well hi Julius.
@Jeeves you're a good listener ...
@JoeWatkins Thank you.
Wes
Wes
18:29
@JayIsTooCommon today's episode was ok :D
@LeviMorrison both are fine, but I don't know where to put return type?!
Anonymous
@Wes watching it tonight, it's the only thing going for my Friday nights... :D
Anonymous
@PeeHaa shall we do a make-up tutorial for the R11 YT?
18:46
@brzuchal After the ) or second |
Sigh... how many times do I have to say that ($x) => $x + $y is ambiguous?
> I too don't know why just ($x) => is an issue. There some possible conflict why that?
@LeviMorrison ok then I'm fine with fn and |
19:05
@Linus congrats!
19:17
What happens if someone does $a = ['foo' => 'bar', 5, ($x) => $x + $y];
@solarc nothing, because that's not the proposed syntax
<3
here, have a taste of victory. this is completely worth the 15 minutes of listening youtube.com/watch?v=VbxgYlcNxE8
Wes
Wes
@FélixGagnon-Grenier i like that one :D
:D it's appearance in V for Vendetta is... powerful, to say the least
Wes
Wes
19:29
yesterday i've watched again that mythbusters episode of the trombone whatever. seen that?
lol, no I don't know of that
Wes
Wes
:P
lol that is amazing
 
1 hour later…
20:34
I just tested code in production. :X
at least it worked
moin o/
@kelunik mornin' o/
Did you ever take a look at github.com/trowski/react-bridge?
array_map(function($x) => $x + $y, $data)

// something just to break up the
// space a bit

array_map(|$x| => $x + $y, $data)
Yeah, I definitely prefer |$x| => $x + $y. The function keyword is as long as _$x + $y... that just seems wrong.
Some people don't think counting characters is valid, or trivialize it.
But the whole reason people want this feature is we have to type so many characters it's just not as viable as writing loops.
20:52
@Trowski Just had a rather quick look.
@LeviMorrison that's actually pretty good
21:09
😱$x😱 => $x + $y
@kelunik Mostly just a PoC, not sure if that would actually be a good idea.
Granted I've only been in this chat for a week, it seems like some of you are working on the actual async PHP libraries, and I had a question.

It *seems* like in JavaScript tasks can be added to one central event loop *while it's running*, whereas here if I want the ability to add tasks to an event loop, I have to add a listener to to the event loop before it starts, and have that listener add tasks to the event loop while the loop is running.

Why is that?
@Trowski Do you have ideas how the new website should look like?
I think we should have some kind of step by step tutorial with interactive examples.
@Trowski How do we fix amphp/process now? Piping doesn't work on Windows. Why not just use the previous way?
@jeeves what powers your back-end?
@Leigh Reverberations.
21:23
sigh
That sounded pretty wrong. @Leigh & @Jeeves
@Allenph You spelled melancholic wrong.
:)
hi all
opened the vote for wiki.php.net/rfc/libsodium :D
FINALLY AN RFC THAT CONTAINS NAMESPACED SHITE!
Thanks @ScottArciszewski, voted!
21:30
that... that's beautiful
hey @Fabor, do you have some time later on, or tomorrow?
(sorry, I totally did not come back to you sooner)
@ScottArciszewski Shouldn't it be PHP\Sodium\*?
Wes
Wes
!!rfcs
@kelunik i thought the same
@kelunik no.
unless it actually has something to do with php, it doesn't belong in the php namespace
For example, php\ast would make sense, php\sodium does not.
21:46
/me is rusty
> php: /usr/src/php-src/Zend/zend_ast.h:225: zend_ast_get_zval: Assertion `ast->kind == ZEND_AST_ZVAL' failed.
I blame nikita ...
@JoeWatkins You made it happen, clearly its your fault!!!
Wes
Wes
@NikiC does sodium have a vendor name?
why would a name: not be a zval ?
Wes
Wes
hey joe \o
@NikiC I used to understand this shit ... then you came along with yer fancy ast ...
21:49
@JoeWatkins You used to think you understood that shit :P
@JoeWatkins Probably it's not a name ^^
@kelunik I like what @Wes was showing for examples at one point. I really like the idea of some simple step-by-step tutorials.
@NikiC But as something included in core, it essentially becomes part of PHP.
@Trowski We can maybe ask (@)sjon for the configuration of 3v4l. But maybe it's enough to have users execute it locally.
21:56
what if it is a name, and I can export the ast (correctly)?
@NikiC I'm concerned about bikeshedding on additions being BC breaks because of the namespace, ugh… if everything is under \PHP, then it's a moot point.
@kelunik Because of the exit code pipe? Yeah, I could probably just drop that.
@Trowski Why did you add it in the first place?
@kelunik I was trying to support environments with --enable-sigchld.
@JoeWatkins what do you mean by export?
I'm such a dick
I got it
22:05
Has anyone written or know of a document warehouse application that requires authentication (synced with LDAP [Active Directory])?
Trying to think of a way to replace a service we have with something that wouldn't require an ongoing contract cost.
For future reference: don't open a college in Illinois.
@kelunik Just pushed something to amphp/process, see if that fixes your problems on Windows.
@Trowski Just started my VM, let's see…
@Trowski Same issue.
@kelunik Hmm… maybe the old way was just casting an empty string to 0.
@kelunik I can drop the verification and just assume an empty string is acceptable.
22:23
Dadjoke: An agriculture degree will leave you outstanding in your field.
@NikiC Thanks for the example of array [] [0]. Definitely ambiguous. We should include the arrow if we choose the pipe delimiters.
@Trowski Windows just echos True and False as it seems for echo $?.
@kelunik Well then I'll just have to remove the verification.
@kelunik Pushed another commit, try it now.
@Trowski According to ss64.com/nt/syntax-redirection.html we have to use & instead of ; on Windows, but I can't get it working without any code on the cmd.
22:46
@kelunik Try changing (%s) 3>%s; code=$?; echo $code >&3; exit $code to (%s) 3>%s & code=$? & echo $code >&3 & exit $code.
On line 137 in Process.php
Doesn't help.
I'll try some more things tomorrow, good night for now. o/
@kelunik Night! Tomorrow try changing line 137 to $command = $this->command . "; echo $? >&3";
Wes
Wes
@Trowski can you join chat.stackoverflow.com/rooms/118687/amphp-design and have a look at the latest stuff we posted?
23:27
@kelunik If that doesn't work, I might just have to mark that test as skipped on windows. The original process lib didn't have a test verifying the exit code. :-(
Wes
Wes
23:52
@PeeHaa new the 100 ep

« first day (2302 days earlier)      last day (2872 days later) »