« first day (2028 days earlier)      last day (2911 days later) » 

12:04 AM
> Since I don't know how to convert date to seconds in Javascript, I used a PHP Function to do it. But I don't know how to do it since I'm getting an error
2
 
Wes
ha
 
 
1 hour later…
1:09 AM
first compile successful after 12 hours of coding <.<
going to test tomorrow … bah…
@NikiC my first attempt (haven't tested yet) github.com/php/php-src/compare/master...bwoebi:bind_static … quite similar to yours, but a) only one pointer in op_array, b) makes static consistent (independently of binding time etc.; it's always by-ref now, except for lexical Closure bindings), c) fixes passing of IS_CONSTANT to user (in e.g. Closure::__debugInfo()) and d) puts static_variables into CG(arena) (as I have another approach for opcache as you can see ;-))
 
1:30 AM
That was a big mess to write this … the patch in Zend/ was done quite quickly … gone to opcache and wasted a loooooot of time analyzing how opcache works, encountering problems (arena_mem vs. mem etc.; things needing relocations) … and then after opcache fixing Zend/ again to distinguish properly between arena allocated and not :X
that patch got a little bigger than I expected too…
/me yawns loudly … time for bed :o
 
Wes
1:45 AM
o
 
Ekn
r
 
Ekn
g
 
Wes
g
 
Ekn
1:47 AM
e
 
Wes
didn't go as planned
:B
 
Ekn
ditto
 
we tried
 
Wes
you ruined it, paul :B
 
I was aiming another direction and it got turned around on me too
 
Wes
1:49 AM
what was it, mort...uary? :B
 
the world may never know
 
Wes
almost for sure it was mortadella
 
it wasn't, but that's way better
 
Wes
:B
@PaulCrovella youtu.be/16mUUL5dCtk?t=54 the cornerstones: the women, the money, and the mortazza (roman dialect for mortadella)
 
you've got a library of terrible music ready to go at a moment's notice
 
Wes
1:57 AM
that's more comedy than music :B
 
oh hey, you're fluent in broken english. can you explain the misuse of "dear" when talking to strangers? example .. it comes up more frequently than I'd expect and always creeps me out
 
Wes
lol. it's a literal translation? us, for instance, use that at any occasion
the other day popped up in here one that was great... dammit i can't remember it :\
Apr 9 at 3:45, by Mary Daisy Sanchez
Hi handsome i was wondering if you can help me of something
ha
 
they don't count, that's just a troll
 
Wes
could be
 
Ekn
it was mortal, isn't it...
 
2:04 AM
KOMBAT
 
Ekn
:D
 
Wes
mortarboard
i finished the words starting with mort
 
mortar
 
Wes
i'm having the opposite of what i think it's the best possible fun. testing subsequence offsets (still working on slice/splice type of functions)
pastebin.com/UNXty7T4 this is just a part of it
i couldn't think of a way to automate it, not without making it more complicated than this is
 
2:25 AM
@Wes are those some strange edge cases? why are all those there?
 
Wes
i'm testing the interface, not the implementations. and i'm testing basically all combinations in a finite sequence rather than just those required, it's simpler because i can do it "visually" just by shifting offsets by one
couldn't think of a better way...
i tried, but i went crosseyed
 
Wes
2:42 AM
btw, would you error or return true on $sequence->contains([]), 0 on $sequence->indexOf([]), count() on $sequence->lastIndexOf([]) ?
 
2:55 AM
the first might be true (though an error is more likely to be useful); I don't see how the second would be 0, nor how the last would be count()
but then again I've little idea what the context is
 
Wes
"abc".indexOf("") // 0
"abc".lastIndexOf("") // 3
in js. the context is arrays/lists
 
return count($fucks_I_give_about_js);
yep, 0
 
Wes
in php gives error tho 3v4l.org/LMoOr but that behavior is accepted in other languages (java, js, c#)
i tend to prefer php's behavior though, as an empty search is more likely to be an error
but unsure...
 
if I address the 0th, or countth index what would you be returning?
 
Wes
currently returns an integer (the index) if a subsequence was found, or null if not found. undecided if it should throw on length 0 sequence search
 
3:05 AM
I'm not asking about searching
 
Wes
not getting you then :|
 
nm, it doesn't matter
 
Wes
maybe within a couple of years i will finish this :B
i don't know how you guys can collaborate to OS and work too :B maybe i should look for a better job... one for which id get paid for doing nothing :B
 
make something that needs to use it, even if that means just making a toy.. pragmatism is a wonderful guide when making libs like this
 
Wes
i'd like to complete at least the most basic data structures. i think now i'm on the right direction if seen as a unique entity, but every single method still requires an incredible amount of thinking, especially for the design and the consistency with other methods
but i'm actually close to that, i did hashmap/set/bag, linkedlist & arraylist. now refining the api, renaming methods and testing
hopefully i'll be able to publish it, even if incomplete. that is my main goal currently. have something to not be ashamed of if on github :B
 
3:22 AM
put it on github now
 
Wes
nah, it's utter shit :B
 
all the more reason to put it up
 
Wes
in one week i will, if all goes as planned :B
 
if people can put up this thing nightmare, you can put up whatever you've got without shame
 
Wes
ahaha dat code
it's not only because of shame, i don't want it to fail. i think it's a decent base that people may like to use and contribute to, but it's currently poorly packaged. the first impression is the last impression
do you have that way of saying in english? :B
 
3:33 AM
the way you said it works. there are a lot of variations of idioms about first impressions in english, but they're not better than what you've got.
and don't worry about the first impression anyway. you can put it up without publicizing it to the world. and in the meanwhile it'd make it easier to ask for useful feedback on things.
 
Wes
also, it goes heavy on things people still tend to dislike... or ignore
like composition/aggregation over inheritance
i'll have hard times to explain why u('this is needed')->chars()->slice(0, 4) |> u($$)
ive already made mine the |> pipe operator. no moar nesting is a super win
 
you didn't need the pipe operator for that in the first place
 
Wes
u(u('this is needed')->chars()->slice(0, 4))
it's ugly...
 
Wes
indeed
 
I need a cut of the movie Alien without the bad crew dialog
 
4:26 AM
yomin
 
sorry.my mistake
 
4:49 AM
anyone here?
i am looking for a super lightweight client server db with pdo compatibility
any ideas?
 
wtf is a "client server db"
 
client server database
 
yeah, we figured that
you mean like... accessing a db from client or server using pdo? you might be disappointed.
 
i meant i am not looking for something like sqlite
i have a website and a java application. both should be able to access the db
the website should use pdo
 
well, you might think about mariadb or postgresql, for a start
 
4:55 AM
it would run on a raspberry pi
that's why lightweight
 
flip through the pdo drivers and take your pick
 
are these really all the drivers?
 
you might find others floating around in the wild, but unless they're made by the db vendor I wouldn't put much faith in them
hell, even if they are I'd look at 'em sideways
 
hmm.. ok so my best bet is to rely on the official php pdo drivers
 
Wes
@PaulCrovella $set->contains($subset) or $set->has($subset)? the former sounds better but i like how short is the second
 
5:04 AM
the former. don't worry about short until shit gets oppressively long.
 
Wes
okay :B
 
@AnmolRaghuvanshiVersion2.0 Happy Prebeccaday!
 
hello
Is anyone online.... ????
I need help
 
5:19 AM
posted on May 05, 2016

New Cyanide and Happiness Comic

 
Wes
@Feeds okay that was funny :B
 
5:34 AM
I stuck in one issue and need help..
 
Kez
Hey guys when updating a mysql table how can you add a filter so that the post needs to be approved before it's added?
 
5:57 AM
oi oi
@Kez why does it need to be "approved"
 
Kez
@taco ok so the process is, a user adds some data to a form then it send it to us, we approve or delete it. if approved it adds it to the db
 
just add an approval_status column
or if it doesn't need human intervention, write a mysql trigger function
 
Kez
@taco it needs human intervention
@taco how?
 
Huh? That's a basic DBA admin function
create a table with that column?
or alter it and add it
then wherever you display the data, just make sure you do something like SELECT * FROM table where approval_status=1
 
@Kez SQL doesn't work that way
 
6:07 AM
heh
lunchtime! bbiab
 
Kez
@littlepootis ok so how can i do it?
 
@Kez do what @taco said
 
Kez
@littlepootis lol, so it can work that way. . .
 
No, SQL is the only persistent storage you have. There's no intermediary unapproved data store to put your unapproved posts in.
 
Kez
@littlepootis I know that. but doesn't mean you can't do it by other means. . .
 
6:11 AM
> if approved it adds it to the db
@Kez how it's normally done was described by taco
 
Kez
yes. . . the concept. not to be taken literally.
 
Kez
@littlepootis i mean it'll add it to the db, regardless of being approved or not.
 
@Kez install a fax-modem on your web server and have the submitted data faxed over for confirmation, then use an ocr-enabled scanner to read it back in and submit to your db. that better?
you could also take dictation over the phone and manually type it into the insert statement
 
The secretary problem is a famous problem of optimal stopping theory. The problem has been studied extensively in the fields of applied probability, statistics, and decision theory. It is also known as the marriage problem, the sultan's dowry problem, the fussy suitor problem, the googol game, and the best choice problem. The basic form of the problem is the following: imagine an administrator willing to hire the best secretary out of rankable applicants for a position. The applicants are interviewed one by one in random order. A decision about each particular applicant is to be made immediately...
 
Kez
6:17 AM
@PaulCrovella haha
 
rfc 1149 is another option
 
@PaulCrovella lmfao
 
Kez
@PaulCrovella was thinking more with php. but okie. . . :D
 
"Store data" in PHP? Paper would be a better solution
 
Kez
6:28 AM
@taco no, store data with mysql and access it via php. that's gonna be really environmentally unfriendly!
 
mornin
 
morning
 
mornin tereško
 
'nin2
 
6:41 AM
moin joe
 
moin
 
:|
 
if anyone has any small rfc's they want to get into 7.1, you have 24 hours to announce/PR ...
@Sara can I get an eta on implementation of null coalesce assign please ?
 
can't wait 'till the union types / nullable stuff shakes out?
 
6:52 AM
we really can't
tomorrow, we have one month until first alpha
and none of that stuff has started voting yet ...
 
hmm
 
@JoeWatkins Not 7.1 I don't like how the implementation came out, so I'm not going to try to rush it for 7.1
 
ok cool, good call ...
 
Anyone got the time/energy/desire to deal with wiki.php.net/rfc/additional-splat-usage in <24hrs? /cc @Wes
 
welp, if anyone wants to take up replacing void returns with null feel free to use gist.github.com/pcrov/3be13cb5937b096580d92293500c3319 as a starting point. I'm not gonna be able to do anything with it at the moment.
 
6:55 AM
@JoeWatkins you might has well have said "let's list a bunch of things that won't be in 7.1" :-P
 
@PaulCrovella If you just want to resize images then it's fine. For anything else, including anything to do with gifs, then it's really quite unusable.
 
I'm really thinking of self contained stuff, or stuff that is on the line between feature and bug ... (big) lang features, it's probably already too late for ...
 
@DaveRandom or ever, as void will otherwise make it in for 7.1 and there's no getting rid of it after that
 
if we get nullables, you can just ignore that void exists ...
I fear, there probably is no getting rid of it ...
 
@DaveRandom what about your wiki.php.net/rfc/closurefromcallable and wiki.php.net/rfc/consistent_callables ? I really wish they'd get into 7.1
 
7:03 AM
hey.
 
oh shit
lol
your usernames are too similar
 
@nikita2206 there's nothing to do for consistent callables - self::class and parent::class actually already work, so there's nothing left to do for 7.1
 
> i.e. despite something being 'callable' it is only callable directly and not through call_user_func.
what do you mean by that ?
 
@nikita2206 Closure from callable needs patch finishing, but myself and Bob were also thinking of an alternative way of having callable types...
 class Foo {
    function bar() {
        echo "this is an instance method";
    }
}

$callable = ['Foo', 'bar'];
var_dump(is_callable($callable));
$callable();
 
@Danack more... static way, you probably mean? Like Foo::bar::function?
 
7:07 AM
oops wrong example, search for "call_user_func different from is_callable"
@nikita2206 remind me of your twitter user name?
I need to go to work and don't log into SO from there...
 
@Danack it's the same :P twitter.com/nikita2206
 
Moin
 
@JoeWatkins that's disappointing
 
!!rfcs
 
7:15 AM
@PaulCrovella you're going to do your RFC right?
 
20 mins ago, by Paul Crovella
welp, if anyone wants to take up replacing void returns with null feel free to use https://gist.github.com/pcrov/3be13cb5937b096580d92293500c3319 as a starting point. I'm not gonna be able to do anything with it at the moment.
 
saddles horse, asks directions to nearest windmill.
 
Wes
@PaulCrovella thank you for starting this
i still think void and null could coexist, but it's definitely not worth it
 
    foreach ($dom->getElementsByTagName('strike') as $node) {
        $formattedNode = $dom->createTextNode("<strike>" . $node->textContent . "</strike>");
        $node->parentNode->replaceChild($formattedNode, $node);
    }
^ that makes no sense, right?
 
@DaveRandom Right
 
Wes
7:25 AM
nope. DOM Text can't contain HTML
 
A text node with HTML in it will show the literal characters
 
Wes
^
 
You want to create a strike element and put the text in there
 
Wes
also, you want to replace strike with strike?
 
7:26 AM
Well that's what I thought
I don't know what the intent of that code is but it looks to me like it effectively does nothing
 
intent is to strip subtags maybe
 
Oh wait no it converts strike tags to literal text
 
Wes
replaces actual <strike> element with plain text surrounded by plain text <strike>
 
which is also wierd
 
Wes
maybe twitter supports that?
 
7:29 AM
dunno, maybe it's a thing people do on twitter, writing it literally?
I'm not very down with the kids so I don't know
It's bugging me because PHP Storm is bitching at me because <strike> is a deprecated HTML tag :-P
 
no clue, twitter always seemed like a too-easy way to broadcast the first stupid 140 characters that came to mind
 
So tempted to have Jeeves tweet that
 
why not?
 
the "no clue" makes it untwitable - there's obviously missing context
 
Anonymous
Moooornin
 
7:34 AM
@JayIsTooCommon '
 
hi
 
Online?
 
It's morning in EU so people are doing their morning thing, it's middle of night in US so people are probably sleeping
 
Anonymous
@PaulCrovella Are you referring to the question or the answer?
 
Anonymous
> shit like this is makes me like python's take on whitespace
 
Look at the question edit history
 
7:59 AM
o/
 
Anonymous
@DaveRandom can't unsee :)
 
8:10 AM
I don't want to code
 
den't we all feel the same? :D
 
Wes
i just don't want to code code that doesn't work. but never happens :(
 
Hello Guys
I need just little attention
 
@Wes lol
 
yeah , well, what I have to do now is to write an SQL query for 4 entities (3 of which are linked by pivot tables) and one of those entities is also a Closure table
 
8:16 AM
It will be a great favor if u people check the new design and new console and give suggestions or comments so that we can further improve our users experience.
 
Wes
@atif wow!
 
@atif congratulations, you are a spam bot
 
@atif Maybe you should target that at your users, not random chat rooms on the internet
 
Wes
seriously, that is almost spam
 
@Wes it IS spam
 
8:16 AM
almost?
 
he has been spamming "cloudways" shit
please flag
 
It is advertising. But spam? Not really.
 
Wes
well, it's not the first asking "how does our site look". maybe not here, but in the html room that is pretty common
 
@atif: Please don't just dump your site into random chat rooms like that.
It's rude, and you'll get your account flagged for spamming. You don't want that.
 
8:19 AM
4 links in 5 months.
 
for some reason all of my flags on that use were countered
 
This is something a RO should just remove.
That said, it'd be nice if @atif replied, to show his good intentions.
(I'm a dreamer...)
 
Wes
i think he just dropped the link and left
 
He's still in here
 
Wes
8:21 AM
session didn't expire yet
 
Hm, yea...
Might be better to just flag him
 
Wes
interesting about spam is that many spammers are really bad at spamming. they could easily pass unnoticed, but they seem to put literally zero effort into that, or they assume we are all idiots :B
 
we are in a php room
 
any one can help me for this chat.stackoverflow.com/rooms/11/php
 
Wes
@PaulCrovella lol
 
8:29 AM
any one can help me for this http://stackoverflow.com/questions/37026653/php-curl-missing-some-of-the-response-cookies
 
Wes
opinion on this github.com/WesNetmo/Atom/issues/1 @PaulCrovella ?
 
awful, terrible, worst thing I've ever seen bar nothing
 
@Wes add could easily be variadic. if you're going to have variations on contains then go with the variations (e.g. containsAny, containsAll)
 
git push -f upstream master, where the long option of -f is --fuck-you
 
Wes
variadics are my kryptonite :B
 
8:37 AM
lol
|o|
 
@Wes why? This is definitely a legit thing to do with something like add(). In fact I am generally agree with all @PaulCrovella
 
Wes
seriously, the biggest problem with variadics is that you get stuff converted to arrays, which would defeat the whole purpose of having other data structures implementations
eg, why would i pass a generator if it gets packed into an array anyway. makes no sense
 
so you want to treat a generator itself as a set?
 
Wes
@DaveRandom though, were you referring to me here? :B
 
@Wes yes but it was a joke, I hadn't even clicked the link at that point :-P
 
8:47 AM
was ... then he clicked the link :p
 
Wes
@PaulCrovella would be the same if i decided to accept Set. as the Set object would be unpacked and packed to array
@PaulCrovella shut up, you told me to ask for help :D
 
@Wes so? you're going to be rolling it into your set anyway
 
Wes
but you are converting it to array without a reason
 
@Wes I don't understand this. Using a variadic is the same as only having an addAll() method, without the caller needing to wrap a single element in []?
$obj->add($el);
$obj->add($el1, $el2);
$obj->add(...$els);
And you only need a single implementation
 
Wes
if $els is a generator, within add() method body, $els will be an array, not a generator. you unpack (from generator to "arguments") and pack it again (from "arguments" to array)
 
8:54 AM
oic
The thing is though, you are foreaching it anyway
Maybe addIterator(Iterator $set) for that special case
(because the same is true of any Iterator)
 
are you supporting infinite sets?
 
Anonymous
When it comes to encryption keys, is putting the key in a non-web-accessible directory the recommended way of storing them? (to be used to decrypt API keys from db)
 
Wes
nope @PaulCrovella
 
Needz moar method overloading
 
Wes
> awful, terrible, worst thing I've ever seen bar nothing
bam!
 
8:58 AM
:-P
 
if it's an optimization you want to make then do give it a special case method, though I'd have it take a Traversable
 

« first day (2028 days earlier)      last day (2911 days later) »