« first day (2244 days earlier)      last day (2695 days later) » 

12:00 AM
Do you not agree it would be more useful though?
Being able to plug in different stream types to Amp\onReadable, as I had imagined was possible, would be so much more flexible
Also the fact that you can't do that should probably be clearly documented
And probably an exception should be thrown if it receives a non-socket resource
 
@QuolonelQuestions the issue is that http requests need to first write a request (i.e. if you pass it to onReadable it won't help anything)… and then stream_select() returns just an array about what sockets are readable/writable
you'd have to manually say to continue writing the http request first
 
Are you suggesting it would be necessary to simultaneously subscribe to onWritable as well as onReadable symmetrically for all HTTP requests?
 
morning
 
Presumably in order to avoid delays in sending the request from blocking the application
 
@QuolonelQuestions yes, and manually continue writing somehow in the onwritable handlers
 
12:08 AM
I feel like 99% of use cases would enjoy having that side of things abstracted away since most applications are only interested in waiting on the response
But anyway this is all a fucking pipe dream
It's simply not possible to enjoy that level of parallelism in PHP yet
 
@QuolonelQuestions which - sadly - is not possible, without having a full fledged event loop and everything in PHP.
 
At least not at that level of convenience
Right
So will you sign my petition to make @NikiC add all this for PHP 8? :D
 
yea you wish he'd singlehandedly add that?
 
Sure
Like he single-handedly added AST and generators
 
@QuolonelQuestions That's work for a whole team, not a single wunderkind :-D
@QuolonelQuestions That's like, just two weeks worth of time (I mean working 12 hour days, for two weeks though)
 
12:11 AM
@MadaraUchiha wow. Jim Jefferies really is awesome. Gratie for the discovery.
 
You mean like Unicode-scale work?
 
he's getting somewhere close to Dieudonne in Felix's list of funny humorists™
 
@QuolonelQuestions pretty comparable
 
I guess it's time to learn Go, then
 
12:41 AM
Go is so last week. Now Google's replacement for javascript is called typescript
 
I thought that was Microsoft's
 
Anonymous
yes but google is on it too
 
Wes
12:58 AM
\o
 
Anonymous
o/
 
Wes
1:11 AM
!!should i go to bed or should i work and pretend i didn't completely waste the day
 
You should work and pretend you didn't completely waste the day.
 
Wes
okay
i just noticed that jeeves replaces i with you. congrats to who did that :B
 
1:35 AM
@Wes either you've been drunk all this time, or you've been drunk all this time ;)
 
Wes
i meant that it doesn't replace just the first "I" :B
 
ooooooohhhhhhhh...!
maybe I've actually been drunk all this time
 
Wes
:B
a || b ? x : y; is equal to a || (b ? x : y); or (a || b) ? x : y; without trying :B
i should just always add the parens..
 
Always wrap ( ? : ) if you are doing multiple expressions
 
indubitably
 
Wes
1:43 AM
i should always add parentheses period :P
 
!!should I sleep and go to work or just skip sleep tonight
 
You should just skip sleep tonight.
 
Wes
lol
 
yeah I knew you would pick that @Jeeves... somehow
 
Wes
i wouldn't do that :B go to bed!
 
1:48 AM
@Ekin tried that for the first time last week. the worst part is it was not so bad, thought the sleep deprived me
 
4 hours left anyways :/
 
Wes
if you know you will actually sleep 3 hours or something are better than nothing :B
 
... sometimes
 
Wes
... otherwise engage the coffee machine \o/ :B pew pew pew
 
when I do that, I just end up sleeping two hours more
 
Wes
1:50 AM
pew pew pew is the sound the coffee machine makes when produces coffee, in case it wasn't clear
 
It's just that I'm afraid I won't be able to wake up
I guess I won't take the risk :P
and I'll blame Jeeves later
 
:p
@Wes and there I thought you Italians actually knew something 'bout coffee
:trollface:
 
Wes
how is pew pew pew pew pew not knowing
 
because pew pew
 
Wes
pew pew pew pew pew pew
 
1:53 AM
Is your coffee machine actually a tactical gun? :P
 
Wes
pretty much :B for a programmer at least :B
 
...is also the sound some chicks do when overly drunk at 2:30, loudly, for some reason
 
Wes
pew pew
 
:D
 
that's right
lol
 
Wes
1:56 AM
> Leonardo DiCaprio Heroically Gifts Ivanka Trump a DVD About Climate Change
He shouldn't have stopped there, though.
he could have punched her for instance
 
hmmmmkay
but why?
 
Wes
don't you think everybody related with trump deserves to be punched?
maybe kicked?
 
heh
that's a load o' people
a slam with open hand on the left cheek might do the "wake the fuck up" part
or get you in prison
not sure
 
Wes
id get some great abs in prison
 
and some looser parts
 
Wes
2:04 AM
probably
is levi around? busy?
 
Around.
 
Wes
one of the principles i (tried) to follow in the design of the framework is CQS, i want to know what you think about that :P the interpretation i like more is that "a command method (mutator) should not make assumptions on what the user wants in return"
in other words set*() methods and co. should be pretty much void, or return true/false for success/failure
array_splice($arr, 0, 3, $sub) <- example of CQS violation, allocates and returns the replaced sequence... which not necessarily is needed by the caller
if you need it, you'd do array_slice() explicitly beforehand
thoughts?
 
Can you give a concrete example with your library?
 
Wes
in my library it would be (roughly, it's actually a bit different):
$sequence = new Vector(0,1,2,3,4,5,6,7,8,9);
$slice = $sequence->slice(2, 3); // $slice is a subsequence view that operates on the original $sequence
$actualSliceCopy = new Vector($slice); // 2,3,4
$slice->exchangeAll([222, 333, 444]); // Splice operation
assertEqual($sequence, new Vector(0,1,222,333,444,5,6,7,8,9));
 
I guess I'm not sure why CQS is of any value here - it just seems like more steps.
 
Wes
2:19 AM
showing how you would get the "removed" sequence since there's no splice()
 
when you drop two table spoon too much dijon mustard in the sauce
- "bah I'll just balance with some sambal oelek"
 
Wes
mixed strpos ( string $haystack , mixed $needle [, int $offset = 0 ] <- ugly, redundant, etc)

$string->slice($offset = 5 /* skips first 5 bytes */)->indexOf($needle);
(slice() returns a view)
$string = "foobar";
assertEqual($string->slice(3,3), "bar"); // slice is an actual string even if it operates on a subsequence of a larger one
assertEqual($string->slice(3,3)->slice(0,1), "b"); // still the same string...
thoughts? :B
 
The issue is I'm not sure it generalizes.
 
Wes
what do you mean?
 
Does it work for arbitrary collections?
Without having to special-case a lot of stuff?
And won't that make the API quite large?
 
Wes
2:31 AM
arbitrary collections?
api is small, was one of my goals
i don't have more than 4,5 methods for each interface
 
And how many interfaces?
 
Wes
set, bag, seq, map, seqset, seqmap, sortedset, sortedmap, sortedseq
though i didn't touch "sorted" stuff yet
seqset and seqmap are set and maps that keep insertion order
ie linkedhashmap and linkedhashset
that is my idea though, but i told you already, i'm open to any suggestion :B
 
Wes
3:06 AM
@FélixGagnon-Grenier levi probably thinks i'm mad. what do i do
 
good question
 
Wes
should i blame beer?
 
you may first decide wether or not that is important in your life
then blame beer
 
Wes
it is important :B
 
@Wes Post the interface for Map
 
3:09 AM
well, make sure that is the good kind of mad then ;)
 
And anything it extends.
 
Wes
Map::keys():Set<K>
Map::contents():Bag<C>
Map::getIterator():Iterator<K, C>
Map::set(K $key, C $content):Bool
Map::get(K $key):C|null
extends:
Collection::count()
Collection::isEmpty()
Collection is "certainly finite collection"
as opposed to streams (which i'm probably going to do) and iterators that could be infinite
keys() and contents() are views that operate on the map directly without making copies
i'll add entrySet() too, eg
$map->entrySet()->contains(new Entry($key, $content))
and, in reality map like other collections is divided in mutable and immutable. immutable map doesn't have set() but has get(), etc. it's not too many interfaces and they are very small. i hardly have more than 5 methods or something
i'm trying to finish all i can of actual work so that i can finish this during xmas vacations. i can't wait for it. it's hard to design this kind of stuff in the free time
they require full concentration... for days even
 
3:38 AM
immutable maps are basically useless ^_^
I guess if you build it and then "freeze" it
 
@LeviMorrison why?
 
morning
 
You can always cons, or conj to it.
Morning
 
@Tiffany You still here?
I've been listening to Arjen Anthony Lucassen ever since you showed me that song
Great music o.o
 
3:51 AM
indeed
there seems to be some kind of back story too
 
Yeah that's what I was interested in
Going to eat and then listen to the whole album
 
Wes
@LeviMorrison ofc
 
mornin
 
Wes
it'll be just new FrozenMap($mutableMap)
and same thing for all data structures
or maybe i didn't understand what you meant?
 
Not $map->freeze()?
 
Wes
4:03 AM
you mean returning a frozen map or freezing $map ?
 
@Wes Working on an RFC bringing immutable stuff to PHP?
 
Wes
nope. i don't think immutability is something a language could enforce
you can have readonly fields but that's another thing...
 
@Wes I think freezing the map, including disallowing of adding/removing properties.
Also... this needs to be a final concrete class for that to work :D
 
Wes
i would dislike a lot having to do function set($key, $content){ $this->throwIfFrozen(); /* ... */ } in all mutator methods :B
and that doesn't really work with the stuff i'm doing. i need a clear type distinction between mutable and frozen stuff
because one of the other major goals was also an equality comparison function that worked consistently across all types, and in a "polymorphic" way
 
like... validating two instances implementing the same interface? or am I not getting this at all?
 
Wes
4:17 AM
yes, that @FélixGagnon-Grenier
 
@Wes So don't - swap out the underlying store.
 
Wes
that is mutable types' objects are only equal to themselves, while frozen ones are compared by their value:
$s1 = new MutableLinkedSeq(1,2,3,4,5,6);
$s2 = new MutableVector(1,2,3,4,5,6);
assertEqual($s1, $s1); // mutable objects are only equal to themselves (like ===)
assertNotEqual($s1, $s2); // same value but mutables are compared by identity only, so not equal
assertEqual(new FrozenSeq($s1), new FrozenSeq($s2)); // however if they are frozen they get compared by value. (not that makes sense to have a "frozen" linked lists :B)
roughly...
 
Yeah but to test equality properly you have to provide a user-defined function anyway.
 
Wes
yes
like equals() in java, except that i don't touch it if objects are mutable
 
so basically... $s1 === $s1, $s1 !== $s2, but $s1 == $s2
 
Wes
4:26 AM
that helps me solve stuff like:
$set = new MutableHashSet();
$set->add($set); // errors in java
 
Why don't you just check that it is not the same object for these cases?
 
Wes
$set1 = new MutableHashSet();
$set2 = new MutableHashSet();
$set3 = new MutableHashSet();
$set4 = new MutableHashSet();
$set1->add($set2);
$set2->add($set3);
$set3->add($set4);
$set4->add($set1);
because this
that literally explodes in java :B
 
.. maybe use abstract classes, implementing the general way of representing a value?
 
So add them? Cycles can happen you know.
 
4:28 AM
Anyone have any articles or information on securing a website script so it is harder to be used without a license? I can't seem to find much on the topic via the big G
 
Wes
@FélixGagnon-Grenier ?
 
about:
> Yeah but to test equality properly you have to provide a user-defined function anyway.
 
Wes
@LeviMorrison
function eq($object1, $object2){
    if(isFrozen($object1) && isFrozen($object2)){
        return $object1->equals($object2);
    }
    return $object1 === $object2;
}
 
abstract could leverage a lot of function definition
 
Wes
isFrozen just checks that is "instanceof Frozen"
except that i don't have Frozen because i can't make int, float, bool instanceof Frozen :B
@FélixGagnon-Grenier oh yeah. implementing equality will be easy, and i do have traits
 
Wes
4:42 AM
cycles can't happen if you enforce mutable objects to be compared by identity and frozen ones by value
eg you can have
$set = new MutableHashSet();
$set->add($set);
assert($set->contains($set)); // true, as compares by identity
but you can't have
$set = new FrozenSet($data); containing itself, not even recursively
$mutableVal = new MutableContainer();
$set = new FrozenSet([$mutableVal]);
$mutableVal->setData($set);
assert($set->contains($mutableVal) === true); // searches by identity, the value it contains is irrelevant
so i'm avoiding crap entirely, including
$sortedSet = new WhateverSortedSet();
$sortedSet->add($mutableObject); // makes no sense to sort it if it may change in the future...
so Sorted stuff will only allow Frozen stuff
interface SortedSet<T : Frozen&Comparable>{ add(T); ... }
did you get enough crazy for today @LeviMorrison? :B
i can continue! :B
(i actually think (some of) that makes sense... just took me two years of mistakes to get to this point :B)
 
5:08 AM
@tereško thank you for re-pointing to this subject .. and sorry, I wasn't online that time .. honestly I didn't know when is evening in there exactly ...
Currently I use a old-file-manager named extplorer .. it shows us all folders/files on the server .. and it has a editor which lets us to edit files
that is not bad ..
but I like to use a local thing which is connected to the server ( it seems much more professional;-) )
Also, doing this ^ is very good for coding fast, because a local IDE (like sublime) has multiple tool for writing codes as fast and simple .. (like autocomplete function's names, searching for something in the whole project, nice UI, formatting codes and etc ...) .. that's why I want to make a connection between sublime and my real server
 
> Fatal error: Uncaught TypeError: Return value of Phan\Language\FQSEN\FullyQualifiedClassName::getNamespaceMapType() must be of the type integer, string returned
:/
My first attempt at using etsy/phan didn't go so well ^_^
 
Wes
5:23 AM
lol, the irony
 
^_^
Actually I think the issue is I don't have tokenizer, which apparently is disableable?
Ah, yep.
 
5:50 AM
\o
 
6:02 AM
morning Joe
 
user7029249
hi , in database we are saving date as here : "2016-11-28" , we are fetching and displaying same in site page, is there any way we can display date in differnt format as like Nov 28, 2016 in site without changing format in database ?
 
@abcd Yes, you can change the format easily with PHP. Are you using a date or a datetime?
 
user7029249
@Alesana thanks, i am using datetime in database, but displaying only date in site
 
user7029249
i am using this code : $oDate = new DateTime($orderData['created_at']);
$sDate = $oDate->format("Y-m-d"); where "created_at" is column name
 
morning
 
6:11 AM
You're using that code to put it in the DB?
What code are you using to retrieve it from the DB?
 
user7029249
above code i am trying to retrieve from db......
 
user7029249
var colsOption = [
{id: 'created_at' , header: "Order Date" , width :"120"},
]
 
Ah you just need to change the text in the format("Y-m-d")
 
user7029249
okay, please tell what text need to replace
 
I think you would put ("M d, Y")
If I'm not mistaken
 
user7029249
6:15 AM
fantastic, you nailed it , thanks a lot.....
 
No problem :)
 
@Wes ping
 
Wes
hey joe
 
hey wes
 
Wes
haven't done the pic yet :B will do it today
need to draw a better elephant because that sucked..
 
6:26 AM
@Wes
 
Wes
nice :B
 
WLC
is it possible to do profiling with phpstorm?
 
I was just about to ask for the elephant ...
I don't know why it sucks, but okay ...
when you do it, can you do a pic for organization on github
I have to start forking a bunch of stuff ...
also ... I .... need a website ... if you fancy that ...
just a place for downloads ... I'm not allowed to keep putting them on github
 
Wes
i would love to do that but i'm doing too many things right now and it would take me ages to finish it :B unless you are ok with something simple...
but i can make the logo/wallpaper
 
guys im good with vector drawing, can i help you?
Only vector
 
6:38 AM
I'm very okay with that, just need single page to list downloads ... I only need it to look nice, I can do the rest ... I think I still remember how to write php ...
 
6:56 AM
 
I don't know what you mean by vector ...
 
:)
 
Hello from Vietnam
 
Hello
Did Sara Goldfarb really win to go on television in Requiem For A Dream or was she she psychotic before taking drugs?
 
o/ Fabor
 
7:11 AM
What a rip off... Google makes Youtube Red available in South Korea but not google Music
clap clap
 
Yeah, waiting for it to be released to UK. I have had Google play for years now.
 
I am trying it now. Saving videos offline is a breeze
And no more: click to skip add
orgasm
 
What's Youtube Red?
 
A monthly subscription to youtube
 
s/youtube/google
 
7:14 AM
It removes add, give you the possibility to save videos offline / background play etc..
 
If you have a google music sub, red is included.
I believe
 
I guess
I am willing to try google music but South Korea is probably the only country not available for some reasons
Like this pokemon go thingy
I'd be willing to try one day ^^
 
I like it but not tried others. Just easy for me
You can one month trial I think
 
anyone here good with react?
 
I may be in South Korea in the near-ish future.
 
7:17 AM
@Fabor Working ?
 
Travelling.
 
If you do, ping me , I'll pay you a beer ;)
 
Seoul or Busan? :P
 
Seoul
You go to Busan ?
 
Ah but saving youtube videos is easy enough without Youtube Red, I guess if you have the extra money though...
 
7:22 AM
Yeah but it's not the same thing
 
Yeah I guess so
 
7:40 AM
@Valentincognito Unsure where, open plans but yeah Seoul.
 
moin
 
'mornin Dave
 
morning @DaveRandom
o/
 
@Alesana @Valentincognito so fun thing I discovered recently, for many youtube videos you can just put the URL (as in the https:// URL of the page) into VLC's "Open Stream..." dialog and play it in VLC without adverts, or transcode etc
@Akshay o/
I may be way behind the times on the whole vlc/youtube thing though, maybe I am the last to find out :-P
 
Interesting, I usually don't let the ads bother me. I like to see different marketing techniques. Now, when they play the same ad over and over (which they often do), that can start to bother me. But, maybe it would take longer to start up VLC and put the link in it than it would to just wait 30 seconds
 
7:55 AM
@Alesana Maybe, however you can also playlist them in there, plus you can simultaneously watch + transcode, i.e. watch and save at the same time
 
m,ornignsd
 
It doesn't work with everything, e.g. VEVO accounts don't work for some reason
 
@Fabor fapore o/
 
o/
 
Hey PeeHaa
 
7:56 AM
\o
 
@PeeHaa was that morning generated using chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)) . chr(rand(65,90)); :p
 
@Akshay That's pretty much how I feel before my first coffee yeah :P
 
hehe !!
 
@samayo pong
 
Wes
@JoeWatkins i'll try doing something... but keep in mind i usually promise (ask bob, kelunik, sjon) to do stuff, but then i don't :B
but i did @PeeHaa's mom once
:B
mornings
 
8:12 AM
@JayIsTooCommon they don't know yet whether they can give me tickets. So it's probably best to just order yourself on ticketmaster :(
 
8:26 AM
@Fabor If you come this winter, don't go to Busan. Busan is only better than Seoul because of the beach
@DaveRandom I didn't know about the VLC thingy, thanks for sharing ^^
@Fabor If you need any further advice about Seoul or Korea in general you can ask pretty much anything, I have been living here for 3 years now ;)
 
Anonymous
@PeeHaa ah alright mate, thanks for trying anyway <3
 
Anonymous
moins
 
@QuolonelQuestions It is very much possible.
@QuolonelQuestions Why? Why do we need that in core?
@QuolonelQuestions There's no real need to have it in the language. Some syntactic sugar, e.g. async function could be nice though.
 
8:55 AM
\o
 
Anonymous
@PeeHaa Have you been to ziggo?
 
Anonymous
moin sean
 
@JayIsTooCommon is that what you kids are calling it these days?
 
Anonymous
:-P
 
Offt, day 7 looks a toughie
 
8:59 AM
Good going @Sean
 

« first day (2244 days earlier)      last day (2695 days later) »