« first day (1311 days earlier)      last day (3862 days later) » 

00:04
morning!
 
3 hours later…
 
1 hour later…
user924016
04:04
Mornnnings
morning.. although there's no one here now..
user924016
Yea I noticed lol =]
I was thinking ... If its possible to convert a data (maybe text files or DAT or DLL etc) to binary and produce sounds that can be recorded in compact cassets ... And then data can be retrieved by reversing the process.
So instead of songs we can carry data
user924016
@shortCircuit sure. Sound = 1, no sound = 0
user924016
04:12
Didnt you have a commander 64 ?
In 8 chunks of 8 or 16 bits maybe
What is commander 64
user924016
I remember loading games via. tapes
user924016
lol Commadore
Looks cool ... But I never had access to such technology
There must be another way other than sound recording ... Because it would need a sound proof room
:P
I wonder how much compressed data can it hold
user924016
04:19
I got no idea.
Me too :D
 
1 hour later…
05:27
morning
morning
mornings
05:46
0
Q: How to get a value from internal array of a multi-dimensional dynamic array without using loop constructs in PHP?

PHPLoverI've a following dynamic multi-dimensional array titled $rebate_by_product_data: Array ( [0] => Array ( [id] => 93 [start_date] => 2014-06-01 [end_date] => 2014-06-30 [count] => 10000 [rebate_type_id] => 2 [creat...

06:10
^ err.. i think this is impossible without a loop (unless you hardcode it, which sucks)... or maybe i'm still a newb i dunno how to do that.
06:21
@HamZa eww oldie. :P
user924016
mondays... =]
06:41
argh,.. good morning.. mon-dayzz ( and sunny weather ) :(
morning people..
user924016
=]
its nice finally seeing someone around. :)
Yeah not much ppl here...
so, what's up @Duikboot
been a while :)
06:50
Doing some -_- Wordpress / Laravel development :)
How are you doing @reikyoushin
Morning
@Duikboot doing some sencha stuff.. >.<
That's been a while here. ( Did that 3 years ago ) Sencha Touch.
no more wordpress for me. :)
@Duikboot yeah, im doing touch 2 now..
How is it going?
06:55
^ they had undel-v-ed my answer Oo
Good morning
@Duikboot just fine. i've only been learning/working with it for these past 2 days..
@AlmaDo morning!
bah.. I'm even not allowed to place some humor in deleted answers :D
trololo :D
How is everyone this monday?
Not so happy as it should.... why is can't it just rain on monday? That would make my day
@Duikboot my condolences
07:04
:D
It'll rain tomorrow over here.
With lightning.
user924016
tired...
And 25 degrees...
@RichardA hot. And will be hotter. And in the evening - thunderstorm
@tereško Damn..
07:05
@tereško Fun
oh .. being on bicycle an hour after the 'morning thunderstorm' with light shorts and T was kinda painful
Iteration day in 23 degrees and 80% hudimity is going to be fun aswell...
Exams ftl... ¬_¬
mornig
Morning
07:08
Morning.
@Duikboot this is our..
so .. hot (:
wow :D
@AlmaDo Noice
I guess next week it will be thunderstorms
07:10
@bwoebi yep ^^ presenting it to dmitry being the important part :)
boring :(
I prefer dry heat over humidity any way,
@RouvenWeßling whatever you do, do not ever call anything SplSequenceGenerator
@RichardA /me substracts 1 from the id. I am not disappointed :)
But knowing how the weather in my country works...
07:11
Prefixing something with Spl is a bad omen around here ;)
@PeeHaa Sorry?
@AlmaDo Did not know we were in the same time-zone. I thought Moscow should be -1.
@SecondRikudo not boring =P
@PeeHaa And I hope you get banned :P
07:13
@Leri it's a whole story.. first, we were in summer/winter time. Then they decided to use GMT+03. After (till now) it's GMT+04 .. crap
@tereško lawd
craapp. Just noticed
That can hardly be considered offensive
why google shows "123056" for me.. and city names for you :(
1 message moved to Trash can
07:14
@PeeHaa sure, but it should have been tagged with "NSFW"
@AlmaDo Tell your government that date-time manipulation is quite big PITA in computer science and no need to add more clutter to it. :P
@Leri f*ck my government
I don't want even think about it hehe
@SecondRikudo yay, I didn't know that algorithm may be kawai :D
@AlmaDo f*ck my all governments. Community could live and make better things without them. :)
yeah ... timezones suck.
@AlmaDo =D
07:20
the damage done by them (to both humans and tech) is pointless. It made sense in 1900, but not now.
What are the gotchas I need to be aware of when making a daemon that will run in an endless loop (with sleep(60) between each iteration)?
^ daemons go to hell.. :)
lol
morning
@SecondRikudo it might crash
07:22
@CSᵠ Why would it crash?
Or did you mean "It just might, you need to be able to handle it"
i run the daemon in a bash loop, in case it crashes it will be reloaded
@SecondRikudo exactly!
@CSᵠ But then you need to preserve state between each iterations
for reasons you might have not considered yet..
Rather than just using normal variables.
07:23
@SecondRikudo um, cron-job?
@SecondRikudo depends on whatcha doing
@tereško oh, that's original? cool!
you're gonna try to write it as safe as you can, but it might still crash
@CSᵠ I require several counters to be in effect and increase by different factors for each iteration
write to flat file to be safe?
07:24
i.e. $a will increase by 0.1 each iteration, $b 0.2 and $c 0.15
@CSᵠ But then you need some way to remember which is which.
If I do it in some sort of cron job or a bash loop, I'm considering using a database
@tereško i envy you..
3 vars are not much for a flat file
@CSᵠ 3 vars are just an example
In reality I might have as many as 50~100
ofc :)
still ok for a flatfile
@SecondRikudo Json on the rescue. :P
07:27
it's been hot the whole week here. T-T
@Leri I think that actually might be doable.
Read JSON from file, decode, do whatever, encode write back to file.
@SecondRikudo Yes. Or implement Serializable to avoid array oriented development.
user924016
Hmm anyone know if it is possible to make a more specific search on packagist? More specific then just token/keywords
@Leri This is a very quick and dirty prototype, I'm not OOPing this one, so I don't mind
A different question though, if I'm using a JSON file that will be updated every minute
07:33
What will happen if that file is being written to the exact same moment I'm trying to access information out of it?
That sounds like a likely occasion.
Lock file.
@Leri But then my run will fail.
good morning all
Um, sorry, misused term (from C#), I meant synchronize access.
hello all. does anyone have experience with Artax?
07:36
@bdb.jack I'd say @rdlowrey has, since he wrote it.
@bdb.jack mostly @rdlowrey
If two processes are trying to access the same file, give priority to one of them and don't let another process execute code unless the first process leaves sensitive code.
@Leri Well, how do I implement it though?
Hi everyone
@Second Rikudo i figured as much - but i was hoping that someone could answer a quick question... i have an issue that the SSL certificate on my server is invalid. anyone know how to bypass that with Artax?
07:37
@bdb.jack I have played around with it, but the Rails-based resource was crashing, then receiving request.
@SecondRikudo Related answer go through the links.
If you have only two concurrent processes Peterson's algorithm is the way to go.
The thing I don't like in that algorithm is busy-wait, which is CPU intensive.
@tereško that's odd... i've had nothing but smooth sailing with the latest release.
@Leri I don't have shared memory between them though.
@SecondRikudo Well, you can think of the file as shared object that can be locked/synchronized (in terms of C#/Java).
Read up on Monitor.
@Leri Also busy-wait means that the first-run thread will have to wait until the second one starts running
Did I understand correctly?
That situation is unacceptable, since one process will run every one minute, and the other runs on user request
07:42
@SecondRikudo Busy wait basically means: while (thisConditionIsTrueLoopThisOverAndOverSoThreadCantExecuteCriticalLines) {} And yes, this is pretty ugly.
@Leri Yes, so like I said, this cannot happen, because I can't wait until the other process started running and enter the loop before I can do my operation
@SecondRikudo It depends how long daemon needs to lock.
morning all!!
@Leri Let's say that for 0.01 seconds
@SecondRikudo That means that if user request happens simultaneously with daemon, processing request will take 0.01 seconds longer. That's acceptable delay, imho.
Basically, if you want to synchronize two processes, you don't have any other choice but forcing one of them wait for another.
07:45
Hmm
Another solution is to copy data for processes.
Or use atomic operations, however, it's impossible for files.
@Leri Okay, I think I understand Peterson's algo, I read it wrong.
However, the question is how do I "share" memory between two PHP threads.
/me looks @JoeWatkins :D
Heh
How can I check if a file is locked
@SecondRikudo I'd use system file locking mechanism though.
07:49
Alright that's a question for google.
Morning
@tereško I've tried this (from your post) - unfortunately, this video isn't very helpful. Subject there is fine, interesting - but video is strictly based on code snippets which are just impossible to see (because there's no separate slides). Well, you have link for slides - but.. it's hard to combine slides with video manually :D
... 1st world problems
Rumor that Youtube is buying Twitch for 1 billion
07:55
Off to university and then real-world work. Later.
@Fabien What is Twitch?
That'll leave few sites I regularly visit they do own.
@Leri Video game streaming website.
@Fabien let's how that it is bullshit
@Leri So I pretty much do something like: while(!flock($fp, LOCK_EX)) { sleep(1); }
@tereško Whut?
@Fabien Twitch sucks, and YouTube will potentially only make it worse
07:57
@Fabien after latest bullshit that youtube has been pulling regarding gaming media, I really hope that they are not buying it. That would basically kill off all the active streamers.\
@SecondRikudo Yes it does. But it's Twitch = sucks but big base. Hitbox = Good but shit base, MLG tv = nobody cares about.
@tereško Yeah. Copyright infringement concerns are high.
@Fabien they have been deleting/locking channels for showing scrrenshots from trainers
I'm pretty 50/50 about the whole thing. The chance of bringing a faster streaming service to Europe vs bullshit infringements.
"youtube streams pokemon" would have been killed by Nintendo about 10 minutes after launch
@SecondRikudo what are you trying to achieve? file locking mechanics?
08:00
I like hitbox though. But hard to tell how good it is when there's so few streams and low traffic.
@tereško lol. yup.
@AlmaDo I've two main threads.
basically, if youtube buys twitch, it will destroy it in about a year
A daemon that runs every minute, and a web request/based.
Both need to access the same file.
Both of them will read the file, do an operation, and write it back
why file? may be transactional DB?
@AlmaDo Overkill
08:02
@tereško I hope not but I agree.
@SecondRikudo every time you're doing lock you naturally hit performance
@AlmaDo Don't mind performance much
@SecondRikudo if so, then yes
guys, could anyone give me an idea why this happens chat.stackoverflow.com/transcript/message/16553987#16553987 (the JS channel by itself is completely useless)
@SecondRikudo Pretty sane (for simple system that does not need maximized performance).
user924016
08:07
lol @zerkms I like the "Im not crazy"
@bwoebi
"Constant scalar expressions" in PHP 5.6 looks pretty handy: http://us3.php.net/manual/en/migration56.new-features.php #PHP
@RonniSkansing well, that's because the issue explanation is unbelievable. At least I wouldn't believe if someone asked me about it
@zerkms sorry, from that explanation I've got only one thing "the JS channel is completely useless"
@JoeWatkins How's it going?
I'd rather be unconscious right now .... it's just a pity there are no drugs in the house hard enough to do the job ...
08:08
@AlmaDo well, there is ajax request to /poll that is run by setInterval and there is window.location = '/logout';. And sometimes the latter forwards user to /poll instead of /logout
@zerkms Long polling seems to be more acceptable method for checking session expiration. I.e. on session start you send request which is responded only when session expires. Thus you don't need two intervals.
user924016
@zerkms I think if you could reproduce it in a some form of code or atleast a small example.
it's not true. You're missing some point. So your redirect is result of first action, not second. You need to figure out why it's executed
@RonniSkansing well, if I could - I wouldn't ask )
@AlmaDo " You're missing some point" --- see the "I'm not crazy" or stupid part
user924016
are you using this as the setter inside the intervals?
08:11
@Leri it depends. For long polling you must maintain the process on server side
@RonniSkansing didn't get what you mean
@zerkms Yes, you must and what's the problem with that?
@Leri it is another maintenance task
@Leri whereas another http endpoint which is requested once per 5 minutes - is not a problem
@JoeWatkins Still ill then.
What about American prospects?
08:14
@zerkms Fair enough. Well, debug interval ids as the first thing. Are the different?
Also considering you are remote you can truly go wherever you like you know.
well it still looks good but realistically it's a long term plan isn't it, and I don't have long term timescale ...
As a side note: robocop 2014 was terrible
@Leri the window.location = '/logout'; is a hardcoded string literal
@Leri so nothing can be different there - it's a constant string
so in the interim, still stressful
08:14
@JoeWatkins Short-term lease can cover you 6-12 months on a place though. That could be enough time.
not if the lease costs the same as this place
Move further North or west, your rent is high.
You'll get your deposit back to help with costs too.
@zerkms Not sure if you understood my question. setInterval returns integer indicating interval id. I was asking if it was different for session polling and general polling.
two kids in education, it's not fair on them to go darting round the country, it would only be air to relocate if the prospects are really better long term ...
@Leri they are different. They run with different schedules
08:16
oh we famously won't get our deposit back, they never ever do that ...
Aye. That's the hardest part.
@JoeWatkins Why? Is there damage or anything?
no but they don't ever give anyone their full deposit back ...
@zerkms Are you sure it's javascript's fault? Maybe server does not return proper result.. Just throwing options..
@JoeWatkins I've managed it. Argued for it a few times but the burden of proof often lies with the landlord.
@Leri well, the result is that there is /poll url in the client's browser
@Leri and that forward is the only one on the page
08:19
he's infamously an asshole ...
They usually are :(
For me it looks like - sometimes when polling request collides in some funny way with a window.location change handler - the former influences it somehow which leads browser to the wrong url
Though my current one is very nice.
yeah ...
But it's his agency who will hold the deposit
and them you argue against
They will have to give you a full receipt for what the deposit isn't being returned for. IE £10 for lamp shade missing etc...
You simply argue every point if you shouldn't be paying.
They tried to charge us £50 for a guy putting a lamp shade back on the light. Better believe we fought that... and won.
there's going to be so much arguing ...
mornign @salathe
@JoeWatkins Indeed. Agencies can and usually are arseholes.
@zerkms Really weird. You need to find a way to reproduce it.. Otherwise, you're left with guessing.
@Leri yep, tomorrow I decided to bombard FF with tons of xhr's with window.location change in the middle
and try to reproduce it
08:25
Now, I am really off. Later.
@salathe maoning
@SecondRikudo it burns
@Naruto What does?
@SecondRikudo Your hot sun jutsu of this weekend :D
@Naruto XD
It's actually not that hot
It's quite OK for mid May
08:34
@SecondRikudo If you'd see my burns.. You will reconsidder :D
Amazing. I was quoted 2-3 weeks to get a 'fast' appointment to speak to a consultant about the surgery I need for my right leg stress fracture. The actual time is 10 weeks and 3 days. Thanks NHS, fuckers.
@Naruto Also, I'm more of a moon type.
The desease of a programmer.. Lays in the sun for an hour, totally burned :D
You're more aligned with the sun.
@SecondRikudo I tought so :D
user924016
08:36
@Fabien sucks =/
pisses me off because I know for a fact they did fuck all for 3+ weeks due to it being 'half-term'.
I actually thought @Fabien == Fabien Potencier :/
No, I am much more handsome.
Back from phpuceu, still hungover
Can I politely butt in and ask for assistance on a php error that I cannot figure a solution for? natcasesort() expects parameter 1 to be array, boolean given in ...*... on line 12.
code is:
08:43
@Jimbo How was it?
`$events = glob("$_SERVER[DOCUMENT_ROOT]/assets/events/shot/*.php");

if(count($events)) {
natcasesort($events);

$i=0;
foreach($events as $event) {
if($i > 3) {
break;
}
$event = basename($event);
include("$_SERVER[DOCUMENT_ROOT]/assets/events/shot/$event");
$i++;
}
}

else {

echo "Sorry, no upcoming events.";

}`
@Jimbo Monring
@Jimbo How did it go?
@LukeCottingham $event is false.
Check its value.
@LukeCottingham The error is pretty clear
08:43
It was awesome - 4am beers in a pool / jacuzzi talking about php
:D I'm new to php
Also, I think the error is pretty self explanatory.
@Jimbo :D
@LukeCottingham "expects parameter 1 to be array, boolean given".
What else could it mean?
@LukeCottingham Even more reason to read the error messages
08:44
And, the talk I gave went well :-)
@Jimbo Awesome!
@Jimbo Recorded?
Any chance of it hitting the tubes at some point?
morning ...
alright alright :) I'm just lost on what boolean is
08:44
@Hamza mornign
@LukeCottingham boolean = true/false
Google "boolean"
Ahhhhhhh! :)
@SecondRikudo Unfortunately not :( maybe a suggestion for next year
okay okay, I can work on that :) thanks
@PeeHaa neeeeeeein
08:46
Again with all the Hamzas
I think by not you get use to it!
how can one get used to addressing 2 people as one?
One is good at English, one isn't. Easy ;)
Mornings
08:49
easy one is old hamZa and second is new hamza.
@Jimbo s/English/regex
ya also that @Jimbo
@PeeHaa where do I have to log in to be able to edit/delete notes on php.net? I forgot again, really needs to be a link on every manual page /cc @LeviMorrison
Anyone here ever had to work with FUSE?
@DaveRandom master
08:54
Ahh right, yeh
thnx
@HamZa I was creating MySQL Queries and I use caps on it (for 90%) so I forgot I had it on
Let me guess you forgot login.php ?
guys have a simple doubt . when an Integrity constraint violation occurs when inserting some entries from a loop, does it proceed to the next entry or stop there ?
@Vamsi Nope it throws
yeah, is it possible to catch that exception and proceed with inserting the next entry ?
08:56
So either catch and handle it or rollback the transaction and handle it
@PeeHaa I forgot the whole process, usually it stays logged in (I guess because I visit php.net often enough) so when I get logged out it's been a couple of months since the last time I did it
@PeeHaa , thanks
np
BTW it is better to already made sure the data is correct before attempting to put it in the database
agree, but we are getting the data from third party, but no harm in cleaning up the data .

« first day (1311 days earlier)      last day (3862 days later) »