« first day (2211 days earlier)      last day (2753 days later) » 

12:24 AM
not sure if I should buy a galaxy note 5 or the A7 or neither
also I didn't see the ping, weird
 
1:14 AM
@Jimbo by the way, thank you for your Twitter PHP API. I've now used it in two projects, it made my life easier ^^
 
 
1 hour later…
user7093495
2:22 AM
hi
 
3:59 AM
morning morning
 
morning
 
Morning
 
morning
is there any way i can load mysite with ip address instead of domain name ? I am using codeigniter platform
sorry frame work
also i dont want to remove index.php from the site
url
 
 
1 hour later…
5:18 AM
Morning 11's
Found a frydai OS sourceforge.net/projects/rebeccablackos maybe you already knew it and just kept me out of the loop??? =)
not a frydai video..
 
5:34 AM
mornin Rooni
*Ronni
 
Wes
\o
 
O/
 
6:02 AM
ormin
 
Wes
 
arghhhhh
 
OMG!! It's So Secure !! haha @Wes
 
Wes
that can't be true is it
 
Never :D
 
6:28 AM
(gdb) p ctrl
$1 = (uiControl *) 0x1243f50
(gdb) p *ctrl
$2 = {Signature = 1969832815, OSSignature = 1433299320, TypeSignature = 1131375970, Destroy = 0x7ffff0962a67 <uiComboboxDestroy>, Handle = 0x7ffff0962a94 <uiComboboxHandle>, Parent = 0x7ffff0962aa9 <uiComboboxParent>, SetParent = 0x7ffff0962abb <uiComboboxSetParent>,
  Toplevel = 0x7ffff0962aec <uiComboboxToplevel>, Visible = 0x7ffff0962afb <uiComboboxVisible>, Show = 0x7ffff0962b1c <uiComboboxShow>, Hide = 0x7ffff0962b3d <uiComboboxHide>, Enabled = 0x7ffff0962b5e <uiComboboxEnabled>, Enable = 0x7ffff0962b7f <uiComboboxEnable>,
things that don't look real, but are ...
0x1243f50
looks sentinal
 
hii
al
does any one know user_type_master is valid table name in cake php ???
 
I think that's valid. If it gives you error or warning for using that then that's not valid.
 
common buddy i am working in live environment
 
7:11 AM
what is the use of a::b(); this operator ::
i means what is it? ::
 
Wes
class scope operator, it's used to access "static" members
 
oh thank you
 
7:32 AM
@bwoebi still not final version but here
 
Wes
7:47 AM
i find async very counterintuitive.
 
@m6w6 is there a good reason for this? Is it just done that way in order to be able to report the version to the user straight from m4? (alternative being one/all of these) + is there really any need for these symbol lookups if you have the version?
 
Wes
feels like it adds dirt everywhere to gain probably very little
and, multi threaded execution looks simpler
but i don't know. i'm probably wrong
 
@Wes show some code, I bet I can make it look nicer and still do the same thing :-)
Also if your multi-threaded code looks nicer, then it probably doesn't work properly :-P
 
Wes
well, not nicer, simpler :P
promisor promise deferred wat
would love to see the talk though, slides alone don't help me understand much :B
 
morning
 
ThW
7:54 AM
Morning
 
I am using RDS MySQL 5.7
I checked InnoDB is using 0.420GB
But RDS storage still show using 10GB. It might be log files.
How could i delete them?
Thanks in advance.
 
Wes
also @DaveRandom dogdamnit the naming of async stuff
$promise->when()
WHEN WHAT? WHAAAAT? TELLMEEEEEE
:P
 
@DaveRandom thanks
@Wes when the promise changes the only state it has
@DaveRandom What was the actual feeedback you've gotten?
 
Morgen o/
!!friday
 
8:09 AM
posted on November 04, 2016

New Cyanide and Happiness Comic

 
Lol! That Friday song voice xD
 
Wes
8:28 AM
@bwoebi what's wrong with onChange or something?
 
@Wes onChange suggests multiple state changes
It's just WHEN() … the promise delivers.
 
morn
 
Wes
not necessarily... how about, onResolve(), or resolved()
 
@Wes zzzzzz… boring and too long :-)
 
can you help me to find a regex that grabs all numbers and two backslashes after it from string ? like... 1\\
got this but this brings an error cause no end delimmiter is there
$jsonData = preg_replace( '/[0-9]\\/', '{', $jsonData );
 
8:31 AM
wat
 
Wes
@bwoebi i personally hate apis that can't be read as english
 
you cannot preg replace json data
Fix the source
 
Wes
when is not even a verb
 
@PeeHaa it is a string that will be my json Data
 
My point still stands
 
8:32 AM
@PeeHaa it is no json, it is a string
 
Don't dick around with preg replace if you are going from/to json
 
@bwoebi So the main thing that I was aware of was having far too many (too detailed) speakers notes. The thing that pissed me off was that the second half was far too disorganised.
 
@Wes promise is a verb :-)
 
@Traxstar In that case why is it called $jsonData
 
bad naming, have changed it to jsonDataString
 
Wes
8:33 AM
promise is also a noun and it's ok as class name
 
@Wes You shouldn't ever have to interact with Promise::when(), use co-routines instead
 
@Traxstar What data does it actually contain?
 
a string that need to be verified for my json. therefor i need to replace that 1//
 
Wes
@DaveRandom how so? you mean from the public api
 
@DaveRandom well, you need to, for helper functions like "resolve when at least two promises delivered"
 
8:33 AM
What does "a string that need to be verified for my json" mean?
What is there to verify
 
@Wes No I mean really at all. Instead of $promise->when($callback) you do yield $promise and the code that would be in the callback goes afterward
 
i check if there are cahnges to my existing files and if there are changes i need to append it on my old file. therefor i grep the changes and then i need to wrap it to the format i need to
 
@bwoebi Right, I mean in the 99% case though
 
@DaveRandom yep :-)
 
Like @Wes if you look through the Jeeves code you won't find a single when()
@Wes do you get the JS async/await stuff?
yield is basically await
 
Wes
8:39 AM
@DaveRandom mine was a generic critique. when i look at async js code i'm always confused and makes it more unappealing to my eyes each time, even if i do understand the advantages of async. since you guys are doing amp, as average programmer, i would like things i can understand just by reading them, without digging deeply into their code
 
@Traxstar
http://phpio.net/s/cs3
 
@ManhNguyen ?
 
Do you want that?
 
\o
 
not working in my case, but thx
 
Wes
8:41 AM
and, poor naming is certainly one of the biggest problems in my opinion
for example, method names should have a verb in them
though i understand there are naming conventions for this stuff, but if you are doing it "because it's shorter" idk...
 
@Wes is right. Or don't forget to put comments if your naming looks poor. Always think the possibility that there would be someone/group that will look into your codes to fix or modify something for goodness sake.
 
@Wes Yup. The whole idea of shorter variable names for efficiency is absolute bollocks. Machines don't care, people do.
I also mean in terms of faster code writing. It takes maybe half a second to write a FQVN I'm now calling them :P
 
Wes
i mean, i would spend additional effort into making api less tough @bwoebi amp is new, perhaps it's the right time to do it, before it lays eggs :B
 
@Wes The async-interop API is fine.
 
Wes
and i wouldn't copy other languages. personally i dislike js trying so hard to look tiny
 
8:51 AM
@Wes we're not!?
 
Wes
i don't care of that, i care about readability. my opinion, though
idk @bwoebi haven't look into async yet, as you know
 
Wes
\o
 
@Jimbo moin
 
morning
 
8:53 AM
morning
 
Wes
@bwoebi is fine if stupid people (e.g. me) can understand it :B
 
Good Morning
 
morning!! friday!! \o/
 
Wes
though i'm not being critical since i didn't have a proper look at you guys' work yet, i'm sure you guys did a nice work already. i'm just saying
 
Howdy everyone, happy Friday
 
8:58 AM
O/
 
Off to Thrope Park Tomorrow
 
Wes
\o
 
o/
 
meh
 
\o
 
9:08 AM
I recall, @Shafizadeh wanted to live in Europe
:P
this thing happened over a night
 
@Andrea Really? I'm surprised that the worst code in existence can actually be useful! Glad it was though :-)
 
Wes
nice @tereško but hey, kids are playing in the snow. can't be that bad :D
 
@tereško damn...
 
@tereško nice
I miss it
(used to live in the mountains, had that every year)
 
Really you miss plowing through the snow to get at the job?
 
9:15 AM
I worked remote
 
:)
 
I lived in the mountain though, so the roads were cleared at 7am
people were prepared for snow
my wife wasn't remote, and she did not struggle at all
 
Yeah. OVer here everybody starts crying when there is 1cm snow
 
Wes
@PeeHaa that's the best part. it was like an adventure every morning
 
@PeeHaa yeah...same where I live now
a few years ago I was living in Marseille.... one day, it started snowing, and everybody went home at 3pm
 
Wes
9:18 AM
@PeeHaa noobs. here we jump off first floor of buildings to get out when it snows :B
 
:P
@Wes lol I thought that only happened in russia :P
 
Moin
 
Wes
it didn't snow a lot recently here, because... global warming, but it happened :B
 
@Archer hey
 
\o
 
9:20 AM
well ... I am not sure what to do
 
@tereško Just get on your reindeer and take off?
 
google maps shows that the traffic is still fucked up
 
call your boss and ask him if you're supposed to stay 3 hours in traffic?
 
it's not that bad
people here can drive in snow
 
How far is your work commute?
 
9:22 AM
it's just that half of then are still on "summer tires"
40min on foot
which is probably what I will do
 
Wes
do you have snow rackets :B
 
Hello . How can i change HOME with different text. This is wordpress ; birgozluk.com/urun-kategori/burberry
 
@tereško Yeah same here very single first time snow falls :P I am pretty much guilty of it myself :D
 
Wes
we put chains on directly
snow tires don't really work. i actually think they are a scam :B
 
They actually work
 
9:31 AM
btw
there is a sale on GOG now: gog.com
 
@Wes When I still had my bmw it was the difference between getting stuck and actually getting away
basically s/bmw/rear wheel drive
 
Wes
they don't really, just slightly perhaps @PeeHaa
rwd is crap in the snow yeah
and regardless the tires used
though actual snow tires do work, but if you use them on not-snow they'll die in few days
in fact tires you can buy today are all "all seasons" but some are slighty more winterish, others are slighty more summerish
eg basically the same
there are few car brands though that allow a much wider range of tires to be used on their cars. for example i know subarus can mount, legally, very narrow tires which do actually work in the snow, as they are like just 15cm wide or something. bmw and others aren't allowed to do that, not legally at least
 
@Can1 seems google has alot of hits for that...
 
good evening
 
@Sandro o/
 
9:46 AM
@Leigh If you get the decent quality stuff it really doesn't smell much at all.
It does feel weird when you get it on your hands though....
 
So early, yet so serious
 
@DaveRandom Could you do me a favour and document the Resolver interface methods a little more than they currently are documented.
@Leigh We used it as a solvent in chemistry lab.....I once had an experiment fuck up as a flask decided to spontaneously grow a hole in its side.....resulting in a 'bit' of chloroform covering my hand.
 
We melted some chemistry equipment once, but it was in an electronics class
 
Wes
have you ever solved a coding problem while dreaming? i think i did this night, and it's not the first time :B
 
Not sure if I have, or I dreamed I have
 
Wes
9:52 AM
ahah
that would suck
 
sometimes you dream and you think your solution will work but it doesnt
 
well ... the traffic jam has mostly cleared up
 
\o/
 
@Danack open point of discussion anyway, my view is that they don't quite behave correctly and also there are some places where I don't 100% understand what they actually do (the current code is very different to my original)
 
anybody please explain me in this query what operations performs here:
// Store
if (isset($_SERVER['HTTPS']) && (($_SERVER['HTTPS'] == 'on') || ($_SERVER['HTTPS'] == '1'))) {
$store_query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE REPLACE(`ssl`, 'www.', '') = '" . $db->escape('https://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "'");
} else {
$store_query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE REPLACE(`url`, 'www.', '') = '" . $db->escape('http://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "'");
 
10:02 AM
can you tell me how i can implode an array without loosing quotes ?
 
@Wes it's definitely something where if we are talking about some concrete code it will be easier
 
Please don't flag stuff like that...
 
wtf
That's not even a multiple ask or anything
@abdul that is horrid, where did you find it?
ugh, PHP_SELF and everything
@Traxstar $str = "'". implode("','", $arr) . "'"?
 
its a opencart index.php code ....please explain why they replacing ssl into www
@DaveRandom
 
@DaveRandom no, there are substrings in this array lookling like foo:"bar", and after implode i got foo:bar
 
10:07 AM
@Traxstar I still say you are doing it wrong
 
@PeeHaa then help me to do it better instead of just saying its wrong...
 
@abdul well ssl and url in that case are the names of columns, not literal strings. It seems to be normalising a URL for a comparison, and it's doing it very badly
 
You never showed what you are doing
You only asked about a solution you thought was the actual solution
XY problem
 
!!canon xy
 
967
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

 
10:08 AM
tnx was hoping it was there
 
@abdul What is the actual problem you are trying to solve?
 
You are only jumping from question to question asking: how can I parse this specific thing and now I have this how can I parse this specific thing
 
http://pastie.org/private/cp7jxrxqnwblviudrzmiq

I got this String. These are the differences between an existing json and an excel file the client can upload. Now i need to append valid json to my existing json. Therefor i need all data that are "new"
 
I already told you to stop dicking around with manually parsding json things
That was like 2 hours ago
@Traxstar Nothing of that tells me: I need to manually pregreplace or implode stuff
 
@PeeHaa can you then help me to find a good solution for this ?
 
10:13 AM
fix the data
 
2 hours ago, by PeeHaa
Don't dick around with preg replace if you are going from/to json
 
where the fuck did that come from?
 
2 hours ago, by PeeHaa
you cannot preg replace json data
 
@DaveRandom from a library called treeseach
 
2 hours ago, by PeeHaa
Fix the source
 
10:13 AM
The data is broken
 
You don't listen...
 
That is the thing you need to fix
 
Note all that was already said 2 hours ago
 
@DaveRandom i need to understand that query ...why they replacing ssl to www and url to www.
 
Is there an O(1) way to figure out whether an element at a given key is before or after another in an array?
 
10:15 AM
@abdul It's normalising the URL, so that when they are compared two URLs will be treated as the same whether the have www. or not, so e.g. http://www.mysite.com/foo will be treated the same as http://mysite.com/foo
And it is doing it really really badly
why they need to do that you would have to ask the application developers
 
Ha! Good luck asking that asswipe \o/
opencart is managed by a proper prick
 
@bwoebi Not without an indexof($key) or something, which afaik we don't have
 
@DaveRandom an indexof($key) would be an O(n) operation
 
@bwoebi right of course it would. Well in that case I think you just answered your own question...
 
no.
I mean like, in C I can just find() the element and do a simple < comparison on it
because it's a single ordered array
 
10:20 AM
true
but we don't have that and I don't think it would work anyway, because buckets are ptrs
 
@DaveRandom they are pointers pointing to a continuous chunk of memory which is ordered
 
I... did not think that was the case
 
@DaveRandom I'm talking about PHP 7. not the linked list bullshit of PHP 5
 
ohh thank you @DaveRandom
 
@bwoebi regardless, there is certainly no way to find that in userland. It would need int array_compare_key_positions($arr, $key1, $key2) or something, and that would be leaking implementation details such that I don't think people would like it
Also would would you do in an error case there (where one of the keys is not present)?
Returning false for a compare function would be awful
 
10:25 AM
@DaveRandom you could just return an anonymized relativeOffset($arr, $key) which is not the actual index but just providing an integer which is greater than all integers of previous keys and smaller than all ints of subsequent keys
(where relativeOffset may change between array insertions/deletions)
 
That is a C API, not a PHP one
(style-wise, I mean)
 
in that case we could just return zend_hash_find(ht, key) - ht->arrData
@DaveRandom warning + null or maybe throwing an Error?
@DaveRandom uh, where does that leak implementation details though?
 
throw would be acceptable but nothing does that
 
The ordering of arrays is a well known feature?
 
@bwoebi stating that it is O(1) is the leak
 
10:29 AM
@DaveRandom we won't state that.
It ought to be rather "common knowledge"
 
@DaveRandom basically I would like to substitute in a blocking version based on dns_get_record for now, as I don't need ultimate speed, but do need the tool I'm working on to not fall over.
 
@Danack are you still getting failures?
 
er.....I'll remember to use that branch also.
 
@bwoebi Then go for it :-P
 
@Danack you can override the global DNS handler in github.com/amphp/dns/blob/master/lib/functions.php#L11 with a custom class and returning new Success/new Failure
 
10:30 AM
in JavaScript - badger badger badger badger, 30 secs ago, by Paran0a
"Before you flame PHP, I'll just say that while it has its problems, I like it because it gets stuff done."
in JavaScript - badger badger badger badger, 26 secs ago, by Paran0a
You know who else got stuff done? Hitler.
 
pastebin.com/raw/Q41ym4uj for a given test_id i want to extract all the student_id that are not associated to other test_id , help :( , in my example test_id one should return student_id 4 and 2
 
@bwoebi did you see:
Oct 31 at 15:57, by DaveRandom
@bwoebi I think I may have figured it out. Imagine this scenario: response #1 arrives. While it's being decoded and processed, response #2 and #3 arrive. The total length of both of these responses together is <512 bytes. Because the stream is buffered, the data for both packets is returned here.
And do you have any thoughts on that?
 
hm.
just met a process that had one task
 
@DaveRandom I saw it, was in Europa-Park, forgot about it :-D
 
and was stuck on futex(..., FUTEX_WAIT_PRIVATE
 
10:32 AM
@bwoebi Wow I forgot that place exists
 
@DaveRandom what place? Europe or the park? :-D
 
I don't know how that's possible.
 
@FlorianMargaine YOu had one task...
The thing is aptly called FUtex though
 
@Danack also I will try and write something up this afternoon. However afaik you will only need resolve() to work properly if it's a web crawler, and that is just recursively resolving A/AAAA/CNAME/DNAME and getting as many results as possible
 
It's a single site crawler.
Well, technically two sites. The existing one and the worse one we're developing.
 
10:34 AM
lol
 
@zouza start with reading for eg. with php.net/fgetcsv into array then iterate elements and filter with those who have another test
 
@Danack as mildly insane as this is: if you use 8.8.8.8 instead of the local DNS resolver, that will probably fix it
or the NS for the domain in question, if those records aren't public
basically if you add network latency somehow, the problem will go away
Also that branch I pushed will "fix" it as well
It's more of a bad workaround but it will make your app work until we have a proper fix
 
@DaveRandom Full disclosure - I apparently mucked up setting the version number when trying to include that branch through composer, which made it not install, which is why I hadn't switched to using that branch yet......and then forgot about that branch.
 
:-D
Just do dev-branch as version, that way composer will fail out instead of not installing what you asked it to
 
@DaveRandom So, all it needs is an additional while loop there?
 
10:42 AM
@zouza is that a database table? or what is the source?
 
@bwoebi It's not as simple as that, if it's right. The fread() call will return both packets as one string but libdns is just not set up for that iirc. It needs fixing in there somehow. I need to go re-read the RFC.
 
@Gordon mysql db
 
There will need to be some way to extract the decoder buffer
which there should probably be anyway
 
@DaveRandom OH.
@DaveRandom the issue is that the boundary is the packet
and we read in two packets at once, right?
 
Exactly
what makes this super complicated is that notably Google's public DNS sometimes returns meaningless trailing data in a packet
 
10:44 AM
What is the name of ... operator which is used in function agument declaration? I dont know how to find it in the docs.
 
And the payload header (iirc) does not state it's length
moment I am just checking that
 
@DaveRandom so we need recvmsg (or recvfrom??)?
@DaveRandom it doesn't. Only in TCP mode.
 
@bwoebi I dunno, it's the interplay between the underlying syscalls and PHP's buffering layer than I'm not clear on... is stream_socket_recvfrom() guaranteed to respect packet boundaries?
 
@DaveRandom are you sure it's meaningless? i smell a gidden message
-hal2000
 
@DaveRandom I'm investigating that right now
 
10:47 AM
Gotta love them gidden messages.
 
Never mind I got it. It's the variadic php.net/manual/en/… but not mentioned in here
 
Yeah mobile sorry :p
 
Don't be sorry, they are my favorite
 
:)
 
@DaveRandom stream_socket_recvfrom bypasses the buffering and directly receives data from recvfrom syscall
 
10:50 AM
@PeeHaa I assume it's something to do with an alignment optimisation or something, it's always 4 bytes and it's only for packets with a certain structure
@bwoebi OK great, that should be a very simple fix then \o/
Actually @bwoebi if we switch to recvfrom/sendto then we could do everything (multiple servers) on a single socket
 
@DaveRandom Can we? ah yeah, address param
@DaveRandom but that just works for UDP (and not for the TCP fallback??)
 
I mean I know it's only one fd you are saving, but that's not nothing in a busy app
 
or does it?
@DaveRandom it's an array less to manage and less cache misses
 
Wes
i wish i know the reason they change chrome dev tools every time
 
@Wes It was perfect so they just have to fuck it all
 
10:54 AM
@bwoebi No it wouldn't work for TCP, only for connectionless protocols. For TCP you use bindto and so_reuseport
 
Wes
just leave it alone for a sec, damn it
 
That's called: software development cycle
 
Wes
every time i need to get re-used to it again
 
@DaveRandom yep
@DaveRandom Are you going to try a PR?
 
@bwoebi Initially I'm going to do it in that branch and @Danack can test it since he has an actual use case right now (if he doesn't mind)
I will do it right now though
 
10:56 AM
\o/
 
Wes
also i swear they change all the good things i like about it. it was so comfortable to use. crap persists instead
 
Hi guys, What does 'dev-master' means against packages version in composer.json file?
verndor/bundle-name : "dev-master"
 

« first day (2211 days earlier)      last day (2753 days later) »