« first day (1921 days earlier)      last day (3252 days later) » 

00:30
well… that's why it's called Oracle… unreachable for human beings.
they call it Oracle because they want to be seen as magic
01:18
@ircmaxell the problem just is when no human being is ever able to bend the magic…
01:41
@rtheunissen it hasn't been merged yet
:/
I know :(
I'll have to add a notice somewhere..
@Andrea are mixed keys really such a pain?
@bwoebi the problem is you can't create an ArrayAccess-implementing object which distinguishes between numeric strings and integers
Uh, E_CONTEXT ;-) I was referring to your list() RFC
oh, sorry
01:43
Hah fooled us both
mixed keys are a pain because runtime state, and they require more optimisation
I might have to add a new opcode, actually
@bwoebi the problem is list($nonCompileTimeComputable => $a, $b, $c, $d);
@bwoebi I don't want to have to explain any code that uses mixed stuff to anyone ever,
normal list() compiles down to this:
Or have to read and understand myself.
01:45
@Danack you do it all the times with array values (especially options arrays)
opcode out,op1,op2
ZEND_FETCH_LIST $someArray, 0, $a
ZEND_FETCH_LIST $someArray, 1, $b
ZEND_FETCH_LIST $someArray, 2, $c
ZEND_FETCH_LIST $someArray, 3, $d
list is currently using the usual dim_r?
@bwoebi nope, it's its own opcode
@bwoebi I don't use options arrays.....and I don't even see how that would apply to extracting values from arrays by key and value in one operation.
presumably because we can optimise it especially, I dunno
01:46
@Andrea so, why do you then have to add a new opcode!?
@bwoebi we have to hide runtime state somewhere and handle it
and I'd rather not complicate ZEND_FETCH_LIST
I think it'd be cleaner to handle this weird case in its own opcode
@Andrea put the target CV into extended_value and have a temporary at op2
@bwoebi ew :p
bah … not extended_value, result is fine
oh, actually, I think I know the solution
it's (sort of) simple
01:48
hmm?
so, our example case is: list($nonCompileTimeComputable => $a, $b, $c, $d) = $someArray;
opcode out,op1,op2
ZEND_FETCH_LIST $someArray, $nonCompileTimeComputable, $a
ZEND_FETCH_LIST $someArray, (UNDEF), $b
ZEND_FETCH_LIST $someArray, (UNDEF), $c
ZEND_FETCH_LIST $someArray, (UNDEF), $d
so, we just do ADD tmp, 1 each time?
@Andrea you still need to retain a reference to the original variable (to fetch its value)
yeah, I was thinking of doing that with some global state, but now I think I see a better way
@Andrea global state? don't forget the nested list()s…
yeah that's the problem, you'd need a stack
01:51
yes… really don't go down that route.
That's even worse.
opcode out,op1,op2[,ev]
ZEND_FETCH_LIST $someArray, $nonCompileTimeComputable, $a
(some assignment opcode idk) @tmp1, $nonCompileTimeComputable
ZEND_FETCH_LIST $someArray, @tmp1, $b
ZEND_FETCH_LIST $someArray, @tmp1, $c
ZEND_FETCH_LIST $someArray, @tmp1, $d
except actually I need a magic assignment in every ZEND_FETCH_LIST with a variable index
so yeah I guess the extended_value it is:
opcode result,op1,op2,ev
ZEND_FETCH_LIST $a, $nonCompileTimeComputable, $someArray, @tmp1
ZEND_FETCH_LIST $b, UNDEF, $someArray, @tmp1
ZEND_FETCH_LIST $c, UNDEF, $someArray, @tmp1
ZEND_FETCH_LIST $d, UNDEF, $someArray, @tmp1
this makes some sort of sense, right?
what's out?
result
no wait that means I have this in the wrong order oops :D
ehm, result is the result of the fetch?
fixed
01:56
you also could just do:
ZEND_FETCH_LIST $a, $nonCompileTimeComputable, $someArray, 0
ZEND_FETCH_LIST $b, $nonCompileTimeComputable, $someArray, 1
ZEND_FETCH_LIST $c, $nonCompileTimeComputable, $someArray, 2
ZEND_FETCH_LIST $d, $nonCompileTimeComputable, $someArray, 3
with ev being the increment
avoids using an extra temporary
// or, in PHP:
$a = $someArray[$nonCompileTimeComputable]; if (is_int($nonCompileTimeComputable)) $tmp = $nonCompileTimeComputable;
$b = $someArray[++$tmp1];
$c = $someArray[++$tmp1];
$d = $someArray[++$tmp1];
@bwoebi hmm
that probably breaks if you modify $nonCompileTimeComputable inbetween, but then I imagine so does array() :D
how exactly does ADD_ARRAY_ELEMENT solve it?
no idea
oh, but ADD_ARRAY_ELEMENT has state somewhere
it has an actual hashtable with the last increment
it uses whatever state array_push() and []= use
(is []= ADD_ARRAY_ELEMENT? I have no idea)
true…
yes it is
well no
@bwoebi this is kinda ingenious actually, I think this will work
just storing the offset from the last dynamic key :D
02:00
@Andrea that's actually the most straightforward thing and not quite ingenious :-P
though actually I'm not sure if it works
list($k1 => $a, $b, $c, $k2 => $d, e) = $someArray;
say $k1 is 0, then $b's key is 1, $c's key is 2
if $k2 is "foo", then $d needs to be 3. if $k2 is 4, then $d needs to be 5.
17 mins ago, by Danack
@bwoebi I don't want to have to explain any code that uses mixed stuff to anyone ever,
@Andrea if I see this in the wild I'm coming after you
@Danack I'd agree with you, but 1) consistency, goddamnit, and 2) sparse arrays
Consistency with what?
02:03
array() or []
list() should be the analogue of array(). it isn't quite, but it should be
php doesn't do shit in the name of consistency unless it's horrible
@PaulCrovella the problem is that list() becomes kinda horrible if we aren't consistent
because it's just a big ball of exceptions to rules
incidentally, array() doesn't have skipping commas like list(), but it doesn't need them because it has mixed keys
It would just be a subset, rather than inconsistent.
@rtheunissen an awkward subset
I admit, these commas are quite horrible
02:06
as much as it'll upset sparse array fans, I think I'll just have to not do mixed
it's rarely useful outside that use case, and anyway you can always do list($offset => $a, $offset + 1 => $b, /* ... */ );
or even, dare I suggest it:
list($offset => $a, ++$offset => $b, ++$offset => $c, /* ... */ );
do you hear that? it's the Nikitamitry scream
lool
Seeing as you're talking about pre-increment - is this a real issue or rubbish: bugs.php.net/bug.php?id=62778 ?
SomeOfTheseWords.jpg
> Result of pre-increment (also pre-decrement) operator is a value (rvalue') rather than a reference to variable (lvalue'). This prevents assigning result of the operator to reference, or passing it by reference.
@Danack an "lvalue" is something that can be on the left-hand side of an assignment operator. what isset() thinks is a variable, basically, or anything you can assign to. an rvalue is a superset that includes stuff on the right-hand side, basically any expression
(though PHP does have some lvalues that aren't rvalues, like $foo[], because PHP)
@Danack anyway, it's not a bug, it's intentional behaviour I would assume. you can't assign to $a += 1 either
nor can you pass ($a + 1) as a reference
why would you want to do (++$a) = ...; WHY?!
@bwoebi yet nobody starred it
02:13
@Andrea To look cool. So it's got no value as a 'bug' report and could be assigned to the "You need to raise an RFC if you want people to think about this" pile?
@Andrea funny, but not star-worthy :-P
@Danack I think it's best marked as documented behaviour and not a bug
they seem to be complaining about it like it's a problem
@bwoebi :(
yeah.....that's why saying it needs an RFC is probably the best way to get them to shut up, because apparently people will still want their bespoke feature implemented, even after 7 years - bugs.php.net/bug.php?id=48100
/that is many words.
@Danack ugh
tell them about the wonders of ~gzip~
> if the developer decides explicitly to do so, then he obviously knows what he's doing and knows what the implications of his actions are.
02:21
it's this magical new technology introduced in guesses Microsoft Internet Explorer 6
@Danack lol
this implies PHP developers know what they're doing. Do Certainly not I
list($a, $b, $c, $d) = array_slice($array, 7);
list(($i = 7) => $a, ++$i => $b, ++$i => $c, ++$i => $d) = $array;
which is better? :p
[$a, $b, $c, $d] = array_slice($array, 7)
@rtheunissen that has a good chance of becoming possible :)
Found the gif:
that's not the gif
02:26
looks more like text/plain to me
/clear
Does anyone have karma for cleaning up link spam - bugs.php.net/bug.php?id=58287 ?
If you want to save blog files into file system, instead of database, which folder design is better? eg /files/file_id/file or /files/year/month/day/file ?
Second, much easier to find things.
02:33
yes. sometime i updated the blog article create date, as a result it will be confused if i saved as /files/y/m/d/..
@Danack nah :-/
also, for a busy site. some days have so many files, and some weekends has only few files. not good balanced
if i saved under file ID eg /files/00/12/34/56/123456.txt , this way has better balance. but yes not as easier to find things
@SIDU Why do you say that it would be difficult to find a file?
It seems a simple function?
@Danack -- do you have any idea of which is better way of design?
02:40
I was thinking actually looking at the filesystem
I would recommend doing something like hash("sha256", $fileID) and then splitting that up into small chunks to generate the directories.......though you really ought to use something like AWS S3 for storing files rather than the local files system.
@Andrea where's list() in lxr?
@Danack Do you have any advice on whether using this AERYS_OPTIONS constant in the server definition file is a great thing? github.com/amphp/aerys/blob/master/lib/Bootstrapper.php#L44-L47 If you agree with me that it isn't… what'd be your alternative suggestion?
@Danack, so you agree save article text as a file in filesystems instead of database?
@rtheunissen search for T_LIST
02:45
Thanks
@SIDU depends on your exact use case.....but no S3 > database > filesystem probably. Unless you already have full backing up and replication of the file system....which I doubt you have.
@rtheunissen er, in Zend/zend_language_parser.y specifically, if you want to see the syntax
Cool found it.
for how it's compiled, search for ZEND_AST_LIST in Zend/zend_compile.c
and the opcode is ZEND_FETCH_LIST in Zend/zend_vm_def.h
@Danack, do you mean > as better than ?
02:47
yes.
ok
@bwoebi the only sane thing is this I think:
public function boot(Logger $logger, Console $console, AerysConfig $config = null) {
    if ($config === null) {
        $config = new DefaultConfig;
    }
}
@Andrea I'm trying to find where it's accessing the value, I'm assuming via read_dimension with an int offset?
i found many people use classes, even where not necessary, it is over-use of class or php functions are now treated as evil ?
@rtheunissen it does that for ArrayAccess
02:49
@Danack ehm, note that the boot() function calls the configuration file… which needs to set up config
But where :)
@Danack I could magically insert an $options variable, yes. But not sure if that's a great idea.
it's quite a simple opcode
I just got to the opcode, sorry should actually take a proper look before asking.
02:51
no worries
@Danack, yes, save blog article as file, it is hard to move from place to place; if save in database, it might make the database bigger and heavier to run
create a separate database/schema if that is a concern. Or just use S3 which is designed for storing files.
@Danack simple DI wouldn't be an issue, but not so trivial here :x
I'm too tired to look properly. It sounds a bit like you trying to do stuff a bit back to front. The 'outside' of the app that loads config files should be done before OOP stuff starts happening.....where is bootstrapper called from?
@Danack bootstrapper is called from the cli executable
(which might be either aerys or aerys-worker currently)
… which is basically the reason why we need it inside out, to be able to abstract the concurrency, debug, command line options etc. away
03:01
@Danack, eg Wordpress. if attachments saved at /uploaded/ why not also save the article raw text into filesystem. maybe save only some keywords of the article in database, is it a good idea?
It's reasonable to store an identifier in the db and the file on the filesystem. You could also just store everything in the database and move the files to disk when it starts causing problems later on.
OK thanks
@SIDU How do you backup data from your file system? Backing up DBs is an easy task, which your sys-admin should be doing. How do they know to back up your files?
@Danack Bootstrapper is basically the common code between the DebugProcess and the WorkerProcess startup.
@Danack, I would think backup filesystems is easier, simply zip and download to a disc
Again, each design has its own benefits and cons. I m just asking from the point view of a standard site
03:11
Everything depends. If it's an SQLite database then the entire db is just one file. Think Ghost.org
@rtheunissen, you are totally right :D
On the other end of the spectrum is S3.
So pick what suits your scale, without shooting yourself in the foot.
Think ahead but not so far that you spend way too much time and money on it now.
agree
just finished removing a xss vector, which got me thinking about if I were actually the malicious guy...

are you telling me all these 19-bullshits-you-must-know-before-blowing-up sites with flashy buttons and adds are in fact gigantic user data harvesting machines?
where can I learn Laravel for beginners?
03:40
@Cisco1991 Laracasts maybe?
04:16
good morning
04:34
@rtheunissen really can't afford laracasts :(
Neither. :/
yeah, so I'm looking for alternative ways. haha
 
1 hour later…
05:41
moin
06:01
moin
06:38
moin
@rtheunissen getting hot drink, then ready
Cool, no rush.
Thought we could do skype + teamviewer for code?
I've done some tutoring with that setup in the past, worked quite well.
what's teamviewer ?
06:40
there's a nix one ?
Teamviewer is on nix yeah
I'm on mac though, could share on either end.
Your call.
found it
good morniing
moin @SergeyTelshevsky
hi how can I use SUM or COUNT in a mysql query?#1630 - FUNCTION a.sum does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
I get this error
this is my query SELECT a.date,a.SUM( qty ),a.SUM( weight ),b.COUNT( barcode ),b.SUM( weight ) FROM stock_list a, selected_items b WHERE a.date = b.date;
06:52
hi
hi @ashishpatel
can you help
@tereško condolences on your birthday!
Hello @anup @ashishpatel
Hi @SagarNaliyapara
Yes @anup what can i help you?
06:57
how can I use SUM or COUNT in a mysql query? this is my query SELECT a.date,a.SUM( qty ),a.SUM( weight ),b.COUNT( barcode ),b.SUM( weight ) FROM stock_list a, selected_items b WHERE a.date = b.date;
I get this error #1630 - FUNCTION a.sum does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SUM(a.qty)
@anup
07:26
Good morning
user924016
MNooornigs
Doing a sort of personal challenge - getting in at 7 for the past 2 weeks, and finishing at 3. Is awesome so far, way more time in an evening and go to bed around the same time :)
07:45
morning
mronign
mornin'
08:10
mogguh
mrnng
hey guys im looking for some help with codeigniter sending emails can you check my question
1
Q: sending token to email in codeigniter

Chris KucharzykI'm working on a small application that can provide registering an account and sending token to complete registration to email. I have everything working except sending emails with which I can't handle and I'm not sure how to do this. I'd really appreciat any help and explanations on how can I a...

maybe someone can help -.- cause I have no idea what i do wrong
Wes
Wes
\o
@Wes mid to look at this and maybe help me out ? stackoverflow.com/questions/34857320/…
meurning!
@ChrisKucharzyk as the answer already there says: you don't have any code for sending mails?
08:29
I do in register function
don't I ?
@Andrea I don't actually have a use-case for specifying initial offset. I was just thinking it might open up new ways of doing things.
new ways confuse and frighten me
@ChrisKucharzyk sorry, I didn't see the edited question :)
@ChrisKucharzyk what kind of token you passing?? can you post what you expected as answer
token is generated autiomatically
and it is in some kind of link form like this
If I echo $message; I can easily get this token generaget
generated* on a website
but I want it to be send to user's e-mail address
so I tried to make a new function and put there all SMTP things + send method and in register and forgot function just call this new functions
but the effect was the same
08:41
so you can attach that with an messae vaiable and send
@tereško happy bday :)
2
@Abdulla how ?
let me check your question
0
Q: sending token to email in codeigniter

Chris KucharzykI'm working on a small application that can provide registering an account and sending token to complete registration to email. I have everything working except sending emails with which I can't handle and I'm not sure how to do this. I'd really appreciat any help and explanations on how can I a...

here
im passing $message in this line in register function
$this->email->message($message);
I have no idea how to make this work -.-
08:54
cheerz
posted on January 19, 2016 by nlecointre

/* by rodri */

Mornin' 11ers
@rtheunissen you can share your screen with skype. Unless you want the other end to take control over your pc, I don't see why you would use TV
Happy Birthday @tereško!
17
@Jimbo at what time do you get up o.O ?
09:09
@HamZa 6am, wash + dry hair, leave. All in 20 minutes. I have breakfast at work. Shower the night before is the trick ;)
@Jimbo awesome. I've read somewhere that the most productive time of the day (with the average human) is around 10:00 to 14:00. After 15:00 it keeps falling down
@HamZa There's also the flip side where some people say they are most productive at 1am. Absolutely no chance of that for me :P
@tereško Happy Birthday! May your day be filled with Laravel and MVC.
7
haha
Most productive should be between 3am and 8am... well, people differ.
what Exception best describes Illegal offset type warning
@HamZa it's often useful to be able to peer program like you would with Google Docs etc
09:16
I C
Wes
Wes
@iroegbu you mean within php default ones?
i'd say TypeError though
09:36
hi
i want to change my google map center continuously as my location updates continuously
in database
any one worked on google map api
10:04
There seriously still was a bug in Aerys\responseFilter()
Can someone please pin one of the Happy Birthday messages for Teresko? :)
I prefer the 2nd one :D
@Jimbo Day filled with Laravel? That sounds like an insult.
o/
Small off-topic question, I don't have FB, but for those who have it. I got asked for a mail campaign to add a 'Like us on FB' button. I can perfectly track that in MailChimp and track the amount of clicks. But it's not guaranteed that the user clicked, Like button. Is there a way as page owner to see who effectively clicked the 'Like' button on Facebook? It's possible to see stats but not users, afaik.
10:20
For Codeigniter question there is new chat group. make it favrt by leaving message on there.

Codeigniter

Special for CI Lovers
Hi can any one answer this please
0
Q: How to download private file from s3 using PHP?

Sivagopal ManpragadaI have saved a file in amazon s3 bucked as a private file now I want to download this file. I am using amazon s3 PHP component my download function is as below but I am getting exception [403] Unexpected HTTP status function downloadPrivateFile($bucket, $fileUrl) { $obj = new S3($this->...

Cheers
@Duikboot so you are looking for the # of users that like the FB page FROM the mailing list like button?
hi
i want to change my google map center continuously as my location updates continuously
in database
@TusharG ok. Is that a question?
10:24
@ViperCode Where '#' = ? Is it possible to get a name or something.
@TusharG you're too lazy to check the documentation?
@Duikboot # = number
@Duikboot where # = number
@HamZa ha ha haha
@ViperCode Not exactly, I would like to detect a name. Which person liked.
@ViperCode yes that i want to ask ... can i give the link to my code on gist github
Anonymous
10:25
ping
@TusharG it's ok to be lazy but don't delegate your work on others
@HamZa can you give me the link.... not at all ... will try
Anonymous
@tereško Happy birthday
jQuery is the answer to every JS thing :P
@samayo pong
@ViperCode @HamZa this the link to my code gist.github.com/anonymous/3cfbcf21f343973b481a
10:28
5
Q: Proper way to protect against XSS, when output is directly into JS not HTML?

Jason VendryesI'm seeing plenty of examples when the output is going into HTML directly, but I'm seeing more conflicting information when the output is going straight into JS. For example if the code was: var thisIsATest = '<?php echo $_GET['a']; ?>'; And the URL attack vector was: ?a=';alert(1);' The o...

@Duikboot It definitely isn't as straightforward as tracking if they click the link, you'd have to have the user login to facebook and use the facebook API to verify that they have liked the page.
@ViperCode So instead of now only being able to see the total likes from a page I need to verify the user etc too track ?
Anonymous
@HamZa hows everything?
:P I only want a simple list user: x ,y ,z liked your page. Now there are only the total amount of likes visible.
10:34
@samayo fine, got a new internship. Hopefully starting in february but I need to fix some paperwork
You best option would be: "User: X, Y, X clicked the like button" but you cannot confirm that user X clicked the like button but doesn't have a facebook account so it didn't actually register as a like. or maybe user Y clicked like, but wasn't logged into facebook at the time and didn't log in. Maybe you can track the Number of likes on FB at the beginning of the week and compare it to the end of the week.
example: "Your page has 5 new likes since last week! Users: U, V, W, X, Y, Z clicked the like button"
@Duikboot
Anonymous
@HamZa That's good to hear. What will you be doing? Web related, or software stuff?
@samayo mainly software I guess. I hope it will be related to hardware (raspberry pi etc...)
Anonymous
I hope that is less stressing that web development.
@HamZa Gotta love those little pi's. I've got one sitting right next to me
Anonymous
10:37
@XanderLuciano I've been trying to buy arduino and play around with it, but not enough time :\
Anonymous
I would rather wait for Artik 1 to come out
I've got an Arduino and a Pi but haven't played enough with them
Oh woah, my username just updated. Anyways, @samayo check out my last project with my Pi and arduino: youtube.com/watch?v=6-boZuQFlGo
Anonymous
I'm only trying them to understand wtf boards/chips/circuits are, and how they work.
they make a good combo
10:39
github.com/amphp/artax/blob/master/lib/Uri.php#L437 … why are we splitting up and reassembling here?
@samayo RBPI and especially arduino require very little understanding of circuits/chips so you can build up from scratch your knowledge about them
Anonymous
@XanderLuciano definitely interesting, though the end product has no use.
Morning all.
@samayo None whatsoever, however it helped teach a lot of important concepts, programming the arduino to receive serial communication data, programming the Pi in python to send data, scraping an XML file for a hex color code, converting the hex color code to RGB for the LED's and using transistors to turn the LED's on and off from the arduino.
^ that
Anonymous
10:44
Ah, yeah that's a good point.
Anonymous
I thought you tried to build something useful with it
Anonymous
I'm likely to start by doing the same thing, or something like this 0x7d.com/photos/rgb-led-cube-rev-b-patterns/img_4761.jpg
pro-tip: start small :-)
Anonymous
always.
^ agreed. if you bite off more than you can chew you may get discouraged.
Those LED cubes are cool though, there's a class here at my college that builds one as their project for the Electrical Engineering major. Although they just use an off the shelf chip to control the LED's
10:49
I think the challenge is to actually control so many leds since the number of IO ports are limited on the arduino
maybe a shifting register might do the job
@HamZa That's exactly it
Even if you don't need to use it, it's an excuse to try using a shift register. Then when you come up with another project in the future that really needs to use one, you will already have a decent understanding of how to implement it.
11:09
@PeeHaa chatbot finished? :-) Seeing no commits since 3 days ^^
@bwoebi Neh. Thinking what plugins / commands I want to add besides what I have now and thinking how I am going about the persistent storage part
I think the current list of commands is okish for now though
Symfony core question
0
Q: Symfony - Changing how controllers are instantiated

Jimbo Note: Although this question primarily targets Symfony 3, it should also be relevant to users of Symfony 2 as the kernel logic doesn't seem to have changed much. I want to change how controllers are instantiated in Symfony. The logic for their instantiation currently resides in HttpKernel::h...


« first day (1921 days earlier)      last day (3252 days later) »