« first day (2630 days earlier)      last day (2543 days later) » 
00:00 - 17:0017:00 - 00:00

00:04
@Danack boy, I love those "the spec for this project is this old app that no-one knows how to maintain" jobs
I say that sarcastically but thinking about it I actually do quite like them :-P
@DaveRandom you have just perfectly described the project I'm working on that is kicking off in 5 days.
Also, we need to make a new version of the mobile app, to make the investors happy, before we can massively rewrite the backend.
OK here's a fun task for you lovely people... I have a 32-bit PHP installation. I also have an 8 byte string representing a little-endian signed 64-bit integer. This integer is a unix timestamp with nanosecond granularity (and no, I did not choose this). I want a routine to convert it to a DateTimeImmutable with microseconds. I also want a routine to convert in the opposite direction.
(without a bcmath or gmp dependency)
I basically just need to do modulo 1000000000, intdiv 1000000000 and convert those to decimal strings, then DateTime#createFromString() can do the rest
@Danack the thing about those projects is that at least you have a list of things that are definitely the wrong way to do it
which is waaaay easier than a blank sheet of paper
echo INF - 30;
what would a unix timestamp with nanoseconds look like? just have decimal places?
@DaveRandom you should post some examples.....what you described probably doesn't match needing to do mod 10000000000. Though I am tired and am about to go to bed, so maybe it might.
00:13
yes, as a decimal it's essentially just time() * 1000000000
(with more precision, obv)
it's fucking pointless, there is pretty much no application that needs a granularity of more than milliseconds
!!> echo time() * 1000000000;
and computer clocks typically have an accuracy of at best ~15ms
so like that?
yes, but what I actually have is an 8 byte string
which is easy to deal with on 64-bit system
but not so much on a 32-bit system, because a 32-bit system doesn't understand integers that big
00:16
I probably won't be able to figure it out, but I want to challenge myself
Well basically you just need to find out how to do integer modulus and division with bitwise operations only
the rest of it is really just base conversions
which is a fuzzy area for me
part of why I'm trying to figure it out, lol
oh also note that while you can do comparative bitwise operations on strings in PHP, you can't do shifts
i.e. you can do unary ~"string" and you can do binary "string" | "string" (and & and ^) but you cannot do "string" << 3
I very much wish you could do that, I wrote half an RFC for it once
it would be O(n) though, at least for strlen($str) > PHP_INT_SIZE
wrote the problem out on paper, makes a bit more sense now
I can give you some sample data if you like
hang on let be generate some
00:24
why is nanoseconds required?
just curious
it's a network protocol that I did not design
that said, I would have probably used milliseconds, which does have the same problem
Date: 2017-12-28 01:31:43.004864
$bytes = "\x00\xCE\xF5\x2C\xF8\x4D\x04\x15";
@DaveRandom why not unpack into two i32s, divide separately and then recombine the result?
does that work?
(math is not my strong point)
00:34
hmm, maybe it doesn't work ^^
@Tiffany as a demonstration of the logic to actually convert that to a datetime object (and prove that the data above does actually represent that timestamp) 3v4l.org/ECHmZ
@DaveRandom sounds like a tricky problem
well it should be totally doable bitwise
I think
but yeh it's not awesome
oh god fucking dammit
why is u not treated as an integer in createFromFormat
ahhh fuck, loads of my code in all sorts of places is broken :-/
\o/
@DaveRandom did you just discover that datetime represents milliseconds as a double?
...wut
lol
I just noticed that DateTime::createFromFormat('u', "1") results in 0.1 seconds, not 1 microsecond
that could be the same thing but I'm guessing thats more timelib parsing logic
00:45
@DaveRandom lol
That has to be reportable as a bug, actually, that cannot be intended behaviour, it must just be a mistake
s->time->us = (f * pow(10, 6 - (ptr - tptr)));
where ptr - tptr is effectively the number of digits in f
01:24
enable_post_data_reading not working on PHP-FPM – #75741
02:22
@DaveRandom had to educate myself on hex math, properly. Should I refer this to an ASCII table?
@Tiffany well, because of some somewhat ridiculous APIs you will at one point need to convert from a 4-byte binary string (representing a 32-bit integer) to an ASCII representation of a decimal number, but that's right at the end
the difficult bit, really, it integer modulo/integer division with binary strings
Wes
Wes
\o
okay, need to do more googling. I don't understand 4-byte binary string yet.
which will firstly involve looking up how to even do both of those things with only bitwise operators (should be fairly easily googlable, not so easy to comprehend), secondly will most likely involve writing shift operations that work byte-wise on strings, and thirdly will involve wiring it all up
Wes
Wes
a "character" in a php string is a byte, "aaaa" 4 bytes are 32 bits
02:29
that binary data is little endian, most likely the first thing you will want to do is reverse it so it's big endian
@Tiffany A 32-bit integer takes up 4 bytes of memory (32-bits). A string is just an array of bytes. So you can take the same bit of memory and treat it as a 32-bit integer or a byte array (string)
basically, what @wes said
@DaveRandom yeah, I figure once I understand the individual concepts, it's a matter of doing some gymnastics to put everything into place
yeh, it won't be pretty
Wes
Wes
/me doesn't understand LE and BE
/me sleeps
Wes
Wes
\o
02:31
@Wes it's literally just the byte order
big endian is what you probably think in
Wes
Wes
i should've said, i don't understand how BE and LE work in php
I think I'm getting it... cause 8 bits is a byte, so 4 * 8 = 32
Wes
Wes
i understand how they work in unicode for example
@Wes you don't need to think about it with ints
the compiler (C compiler) deals with it for you
when you start messing about with string-as-binary-representation-of-int, the compiler can't help you
/me actually sleeps
Wes
Wes
i see. will maybe ask more questions after you sleep :B
thanks, gn :B
@Tiffany what are you doing tho?
02:34
several concepts I'm unfamiliar with, so figured it would be a good learning experience
I may or may not be successful, but either way, I'll have learned some things, or many things. And either way, it's beneficial.
Wes
Wes
i'm really bad with binary math
me too :D
Wes
Wes
i don't actually understand bit operators unless i actually write what they do on paper
I have basically two weeks to do whatever because I'm off work. I'm trying to be somewhat productive with it.
Wes
Wes
i know people that can visualize base 2 like base 10. dunno how they do that :B
02:37
lol yeah
I'm not sure how it was for them, but for me, it would just take a lot of practice
At one time, I learned how to quickly convert radians to degrees while taking trig, and it helped me loads.
Wes
Wes
ah radians, the strangest unit in SI
it's circles all the way down
Wes
Wes
degrees are much better :B
not when you're working with pi
Wes
Wes
dave's problem is hard. i need to figure out how unpack works first
wonder why he used a string rather than an array :B
02:42
^ though not entirely sure on that, but radians make pi fractions that are relatively easy to comprehend, whereas, I'm guessing in degrees, they would be weirdass numbers
Wes
Wes
dunno
it's been several years since I took trig or calc, and I haven't practiced trig since then
amusing for me is that I can still convert radians to degrees and vice versa if I think about it. flash cards are pretty helpful.
Wes
Wes
i never heard of radians at school :B we've always used deg
ok so the first step, is to successfully store the 64 bit integer in a string, and convert it back to a usable format
that's what i would do :B
so.. hm
but, we can't use the 64 bit integer, so i suppose we should split it first?
i have no idea what i am doing
03:00
I started watching youtube... need a break :X
Not sure if GMP solves the 32bit part completely but I gave it a go with it: 3v4l.org/oVeiX @DaveRandom
03:22
@Wes isn't it like 4AM there?
Wes
Wes
yes :B
but i just woke up
Wes
Wes
i'm not sleeping much these days
ok i think i know what to do
no i don't :B
I need to go to sleep soon, blah
how much did you sleep?
Wes
Wes
5 hours ish
03:35
o.O
Wes
Wes
03:48
i gave up
i probably could do it, but i am lazy
that sums up my life
04:14
morning room
goodnight room
Wes
Wes
Floof vs. Lemon https://t.co/4JqAXgf5A5
gn \o
gn \o
Wes
Wes
04:26
i don't know how to merge 4+4 bytes without using 64 bit math @DaveRandom
maybe it's not even possible
well, not with simple operators only at least
and of course i could do it with floats, but there is a loss of precision
 
1 hour later…
05:36
Morrrrrning
/me grumbles
06:04
@JoeWatkins intenet?
btw morning
I'm basically stuck on mobile networks, while there are phone lines fitted in this house, there are no connections in the street to any network, and there likely won't be ...
going to have to move sooner than we planned
phone lines were fitted in anticipation of a service that is never going to materialise ...
06:17
Well that is just a pile of delightful
06:34
mornings
06:45
Good morning @SaitamaSama
data.replace('"[','[').replace(']"',']')
how to write this for globally replace
something like, data.replace(/\"\[/g, '[') probably
also, you should go to the JS room... because quite apparently, that is JS
ok i will check Thanks @SaitamaSama
and .replace(/]\"\/g,']') this correct for next replace @SaitamaSama
Ok thanks :) @SaitamaSama
06:55
HI everyone
anyone use phpmailer?
    JSON.parse(data.replace(/\"\[/g, '[').replace(/]\"\/g,']')); I'm, getting SyntaxError: Invalid regular expression: missing /
well... check out that SO link I posted
sure @SaitamaSama
morning peeps
var reg1 = new RegExp('"[', 'g'), reg2 = new RegExp(']"', 'g')
            var data = JSON.parse(data.replace(reg1,'[').replace(reg2,']'));
this is also not working can you help me
07:07
Try the Js room, it's right over there.
Wes
Wes
07:23
\o
js chat room offline
well... wait for them to come online then? :/
ok fine @SaitamaSama
07:28
o/
@DaveRandom can that draytek router bond two wans (no adsl involved) ?
sorry, @mega6382 couldn't get to play OW last night
will try to have some time off tonight
np. How about tonight?
Sure, great.
Will be waiting :)
07:32
Anyone using Laravel and Postman ??
For what?
I have been stuck on image upload using postman which is handled by laravel in back end
$files = $request->allFiles('photo');

return json_encode($files);
OUTPUT
{"photo":{}}
how to capture iframe using php ?
So tired... and laravel being dumb.. policies not working out.. copy paste from a working environment onto this one, and it's just.. blah..
There are two kinds of programmers: those who reinitialize their data structures between jokes, and naming things.
Wes
Wes
07:52
i don't get it
explain it to me :B
same
probably got do something with deep-C creatures
Thought I was the only one, so I kept quiet. :)
@Joe explain it to us
I don't get it either, but I am certain it is something stupid.
Wes
Wes
the second part is from another joke
which means that reinitialization made that happen? :B
08:00
Is there someone who worked with wordpress ?
Wes
Wes
@Shafizadeh that question is religiously not allowed here
Wes
Wes
i'm sure most of us have in one way or another
but nobody understands wordpress
!!comic
Usage: !!comic <mood> <quote text> Supported moods: neutral, angry, sad, grumpy, hangme, reply, thelook, wat
@Wes maybe reset data structure to Null?
08:01
I just have a question ... you know, I myself won't use wordpress, just my co-worker asked a question about it from me and I'm trying to find his answer
you are spoiled with all of your high level fancy pants programming ...
3 messages moved to Trash
they told the "two problems in programming" joke, then didn't memset() the structure before telling the "two kinds of programmer" joke, and only set the first kind ...
Yeah, like I said it is something stupid
Wes
Wes
08:03
you guys and your memory management fetishes
@JoeWatkins Isn't "are" redundant? I guess "you spoiled with ..." is correct.
5 messages moved to Trash
@Shafizadeh no, it is not
Wes
Wes
08:05
!!issue "comic reply" should be "comic rolleyes"
reply is wrong ... needs work anyway ... need more images so that the background can be rearranged for reply ... text should be on right, and elephant on left, and different centre line ...
Wes
Wes
rearranged for reply?
it doesn't take much to mirror the images tho
yeah but right now the bg is one image ... probably better to just supply the mirrored images separately, background with speech bubble, and elephant ... then reply can be constructed almost the same as normal message ... not that I've looked at the code ... it just looks wrong for reply and normal message to have text on same side
Wes
Wes
reply and normal message?
"reply" is just the name of the img, doesn't mean it's replying to something
i suppose peehaa named it like that because jeeves is looking up
but my intent was "roll eyes"
08:11
!!comic
Usage: !!comic <mood> <quote text> Supported moods: neutral, angry, sad, grumpy, hangme, reply, thelook, wat
!!comic neutral This would look better inverted
!!comic reply I agree
Wes
Wes
08:12
that wasn't the purpose. it's "rolleyes" not "reply"
ok
I still think you should be able to rearrange, and there should be a reply ...
maybe reply could just be a rearrange, and so you can use all the different expressions in reply too ?
Wes
Wes
i don't think we need reply :B
what would be the use?
telling a story ... ever read a comic ?
Wes
Wes
it was meant for one liners
there's sometimes funny responses to those ... looks strange for comics to be homogeneous whatever ...
Wes
Wes
08:18
anyway i think if we did that (we = peehaa) it should be posted as a single image, not multiple tweets
like !!comic 1 mood text1 2 mood text2 3 mood text3
!!comic combine sounds nice ...
combine is not a valid mood. Supported moods: neutral, angry, sad, grumpy, hangme, reply, thelook, wat
not sure how it would look on twitter though, you'd only see some of it at a glance ...
or ... !!comic begin, then jeeves starts to listen for !!comic left mood, or !!comic right mood, or !!comic mood (default), then !!comic end renders the image ...
Wes
Wes
you would see only the first on top, and you need to click in order to read them all
@PeeHaa on my desk on Friday, kthnxbye ...
08:29
potential memleak in internal classes's static members – #75742
Wes
Wes
groceries. it's snowing again, hard
lata
09:24
i found solution data.replace(/\"\[/g,'[').replace(/\]\"/g,']') @SaitamaSama because of your guidance i did thanks a lotttttttttttttt :)
09:47
smells like javascript
Does anyone have experience with integrating facebook in their website? More specifically, the Facebook Checkbox Plugin?
mornin
\o
09:58
I just had to answer the stupidest tech support call. The guy needed help getting an email address...
It took us 25 frigging minutes to get him a gmail account.
Wes
Wes
@JoeWatkins hello hello hello how low
10:12
o/
Wes
Wes
10:24
til my shit cheap router has telnet access. my life is awesome
this crap's web ui has only msie support
routers' control panels are always the worst browser based applications ever
i had a tp-link once. js errors all over the place, frames and shit like that
how hard can it be. hire me, i'd do some fantastic ui
flash a nicer firmware maybe?
Wes
Wes
firmware is updated
or rather, it's the latest :B
they just don't give a shit
Wes
Wes
i have changed like 10 routers in the past 3 years. all cheap
the most expensive is 50€, a netgear that i liked, but had very crappy wifi
@Wes you know about openWRT?
Wes
Wes
10:33
if it's something that takes 1390 hours to have up and running (aka one of the reasons i don't use linux) then no :B
it sounds like you don't know about it, regardless
Wes
Wes
i have heard about it
what brands do support it now?
I have an artik 10 lying around, and have been trying to set it up as an AP...
have been very unsuccessful so far
Wes
Wes
^
10:52
mornin
Anonymous
!!wotd
tabernacle any place or house of worship, especially one designed for a large congregation.
Anonymous
@mega6382 I'm playing now cc @SaitamaSama
hi devs
I would like to ask you the question.. is it possible to tell curl that he should wait for 10 sec even the page has loaded? like in scrappy DOWNLOAD_DELAY?
11:01
@ManpreetSingh download delay is between requests, not before a page is downloaded
what are you trying to do?
@ManpreetSingh what does 'wait for 10 second' mean?
@Patrick web scrape ahahha
@Danack no
I'm going to presume that this conversation is going to end with you realising that you need to use Chrome headless for scraping.
Or PhantomJS, or Firefox Headless
@Danack I have made already script in php but Amazon is detecting the request and avoid response
ahahh
11:22
@samayo At the office right now :'(
Anonymous
:( np
@Danack it depends, do you mean sleep($sec) ?
No, I meant why do you want to sleep anything.
maybe amazon can't detect the bot...
@samayo still playing?
Anonymous
11:54
@SaitamaSama yeah
Anonymous
wanna play?
Wes
Wes
12:45
heyo
Anonymous
@SaitamaSama how many people from r11 play OW?
Anonymous
except @mega6382
Madara plays, and AlmaDo took a break from playing OW
other than them, I don't think any of the regulars do
oh, Sean plays as well
Anonymous
would be nice to have r11 full of players
Wes
Wes
13:01
i'd play but 1- i suck 2- i'm already the greatest procrastinator in the world
well, I bought "Salt and Sanctuary": tentative recommendation
hey Patrick! Awesome article and i even share it in my own small circles. Thanks for the tips!
I wanted to point out that there's a certificate issue with your blog, a warning saying "This server could not prove that it is patricklouys.com; its security certificate is from *.github.com. This may be caused by a misconfiguration..."
I know it's not harmful for now but i thought i could drop it here
13:34
${$<superglobal variable>} inside function does not work – #75743
Wes
Wes
my bet is on auto_globals_jit
nope
> Note: Variable variables
Superglobals cannot be used as variable variables inside functions or class methods.
14:00
hello
I want to fire mysql application to ask the user from the password how to do that?
@DaveRandom As far as I know it's just inserting a file and retrieving a file. It's to run a mainframe job.
14:25
@bwoebi Do you understand what this code is supposed to do? github.com/php/php-src/blob/master/Zend/…
ugh
that's so ugly
@HamZa are you using https? Weird, that shouldn't even work... will look into it
thanks for the feedback. It got a lot of early downvotes that left me worried that I wrote something bad ^^
@Patrick You can't prevent the error on GitHub pages with a custom domain.
@kelunik was thinking about using cloudflare for https
That works, yes. We do that for amphp.org.
Wes
Wes
(void*)(((char*)fh) + diff) my god the amount of parentheses
14:41
deep-C
Wes
Wes
need a spare james cameron
15:05
@JavaFan try asking again, but this time use English sentence structure
@Patrick i first used http and then thought about sharing an HTTPS link, which led to the discovery of the error
15:39
@NikiC Ugh, I hate that code. Waded through it for saving file code within phpdbg...
0
A: Adjust spacing between HTML table rows

PanglossYou have height:270px set on the <div class="content">, and height="100%" set on the <table>, and the table is an immediate child of that div, so it inherits the height. That's why you're seeing the extra space when there are only a couple of rows. Simply reset or remove either of the height valu...

any one help me with this question
@SaitamaSama In mood for OW? //cc @samayo
Anonymous
@mega6382 let's play
Anonymous
been playing all day
cool
I just got home from work. :)
@samayo Whats your battletag?
Anonymous
15:50
samayo#21540
Request sent
Anonymous
accepted
Anonymous
hey, you took my player
you are not supposed to sit on a single char in OW
it is not LoL
Anonymous
i make my own rules :p
Anonymous
15:56
@tereško why don't you join us?
1) I'm at work
2) this week I am bringing on Salt&Sanctuary
What is going on, as soon as I connect to OW. My mouse stops working.
The touchpad works but not the mouse.
Wes
Wes
@ScribblingOn @code @jetbrains @phpstorm can we haz too? <3
Anonymous
no clue
Anonymous
@mega6382 you are doing good
16:13
evenings
morning
Anonymous
my teams are worse than I am
Anonymous
@mega6382 you left already :(
@samayo I am trying to fix my mouse problem. It seems like many others are having it too.
16:17
Here you go
@MadaraUchiha I need this
It's nice, I'm using it in vscode
16:31
also, I tried out my first placement match last night... was playing with a couple of plats... hoping to place in plats or diamond in the next season
@Wes That's a default in PhpStorm?
Checking... yes, yes it's there by default
Oh right never mind, I missed the point, they're all kinds of colours, not just highlighted... I'll go away again now
/Leigh goes away
Anonymous
16:49
@SaitamaSama @mega6382 let's play one day OW together.
Anonymous
Would be nice to have 2 more people from r11 so we can have a full team
Anonymous
@MadaraUchiha & @Sean pls make this happen :)
evenings
00:00 - 17:0017:00 - 00:00

« first day (2630 days earlier)      last day (2543 days later) »