« first day (1942 days earlier)      last day (3003 days later) » 

12:00 AM
@Andrea and now tell me what it really means :-D
 
> 4. (slang, British Royal Navy) Rubbish, spare kit
> 5. (slang) Rubbish on board an aircraft
I got this habit from my dad, who had a "gash" folder on his windows desktop filled with various junk
 
and then there's the (slang, vulgar) :x
 
@Leigh yeah :/
TIL
 
yea that folder on your dads desktop had some hidden files :P
 
Is anyone able to get this youtube.com/watch?v=7yaIZxYwj-g to play at 5 hour 30mins?
Can't tell if it's youtube being shite or my connection.
 
12:02 AM
@Leigh why do words have so many meanings :x
 
@Danack just did 5:29:55 to 5:30:05
 
I hate words which can have derogative or sexual meaning depending on their context
 
@Andrea running the benchmark for the ardent linked list causes a segmentation fault :S
 
@rtheunissen oh a bug? Can I hunt it? :-D
 
@Danack also, never had you pegged as a lol-fan
 
12:04 AM
List::shift:
		Ardent's linked list .==8787== Stack overflow in thread 1: can't grow stack to 0xffe801fe8
 
@Leigh ta.....the rest of the video works before then for me......would really like to watch the last 10% of a 5 hour vid.
 
@rtheunissen heh
 
@rtheunissen ah just a stack overflow…
too much generator nesting?
 
Also AnkleSpankin ftw, @Leigh
 
@Danack I didn't play for years, I'm probably highly out of touch :p
 
12:06 AM
@bwoebi no idea, if I drop the sample size it benches okay github.com/morrisonlevi/Ardent/blob/master/src/Collection/…
 
lol, LoL
wow, WoW
why do big games have the same acronyms as palindrome three-letter exclamations
 
like dota
or gta
(sorry :))
 
List benchmarks: imgur.com/a/nfYE8
 
@rtheunissen What's with the step in time taken for List::push for Ardent?
small one for deque too
Also, imaginary line drawing... deque uses more memory than SplDoublyLinkedList on average? (shift graph)
Kind of a confusing graph, using less memory with more elements
I suppose it's elements removed
 
12:24 AM
@Leigh the step in the deque would be a reallocation, no idea why there'd be one for the ardent list though.
Deque doesn't use more memory (as can be seen in the push graph) when values are added, but you're right that it seems to use more when values are removed. This is because it grows to 2x the capacity when full (on add), but shrinks to capacity / 2 when the size drops below capacity / 4. So the growth is more aggressive.
^ @LeviMorrison for interest's sake :)
@Leigh maybe garbage collection?
 
@bwoebi Sorry, wasn't on SO today. Do you still need help? :)
 
@ScottArciszewski sure
@ScottArciszewski the main points are that it should be impossible to occupy all of the servers resources from only a few source IPs … if you have a botnet, no chance obviously, but "simple" DoS attacks shouldn't work.
 
12:41 AM
Just had a 5.8 earthquake :S
 
@rtheunissen just right now?
 
Yup, everything quiet though.
Weird being 6 floors up a 'earthquake prone' building though.
 
You have a seismograph in your room? :o)
At least on the internet I find nothing like 5.8 on the Richter scale right now
 
You don't need a seismograph for a 5.8
 
12:50 AM
@Danack you do to know the exact magnitude
 
 
1 hour later…
2:12 AM
@LeviMorrison I didn't mean to poke at Ardent before, just figured it'd be an interesting benchmark. Curious why that segmentation fault occurs when you add many values to the Ardent LL.
php > require "vendor/autoload.php";
php > $a = new \Ardent\Collection\LinkedList();
php > for ($i = 0; $i < 1 << 20; $i++) $a[] = $i;
Segmentation fault (core dumped)
 
2:45 AM
@bwoebi Where do you draw the line? < 100 machines?
Probably not a meaningful distinction, but "a few source IPs" can vary a lot depending on who you ask.
 
Hey... I have a domain x hosted where a user requests a unique id to fill a form (using that unique id) in a new fresh server with no domain pointed yet (probably I'm gonna be asked to point a subdomain of x to here). The client wants to use the new server for payments and wants to save the payment information of users there... Any thoughts?
tax/payment info like TFN, ABN, bank account numbers, not card numbers etc.
 
3:28 AM
need some help
you will see the error
this is the error
 
3:45 AM
2
Q: php configure - Server error The website encountered an error while retrieving

milanSomeone just upgraded to PHP 5.4.8 and now I get an error: Google Chrome: The website encountered an error while retrieving http://10.10.1.22/. It may be down for maintenance or configured incorrectly. Firefox: Blank all white window I did some playing around and found if I put just inde...

@JackSmith
 
ok let me look thanks @SagarNaliyapara
that is not my error
@SagarNaliyapara
did you look at link?
 
@JackSmith an http 500 response means "go read your error log"
 
may be this error is because of misconfiguration of PHP on server
 
ok
i will
@PaulCrovella @SagarNaliyapara
thanks
 
4:17 AM
@Danack
@RonniSkansing welcome anything for tuesday?
 
5:01 AM
moin
 
o/
 
5:26 AM
@Ocramius welcome
 
Hi all anybody uses Wp?
 
nah
 
thanks
i thought anybody uses wp here i would to ask haha
 
5:46 AM
@rtheunissen Eh, Ardent is just about getting a good API.
I never bothered with performance because I didn't like the API.
@rtheunissen Backtrace it and find out :D
LinkedList is pure PHP so it shouldn't segfault.
For completeness sake I am starting to finally like the APIs in Ardent.
 
@MaryDaisySanchez you can wait for wordpress developer
you can post your question
someone who knows wp will answer it
@MaryDaisySanchez
everyone may not present when you need help you may need to wait sometime @MaryDaisySanchez
 
6:17 AM
good morning, room
 
2
Q: PHP: Is there a command that can delete the contents of a file without opening it?

RachelIs there any way to remove the contents of an file in php, do we have any php command that does that, I know unlink but I do not want to delete the file instead I just want to remove the contents of that file. I have an file which I pass while called a getCurrentDBSnap function, it takes in the...

the answers to this make me question everything ...
 
'nin
 
6:32 AM
indeed
 
@JoeWatkins don't quite understand what you mean, file_put_contents still opens a stream to the file, since there is no way in any programming language to write over a file without opening it in someway, even over writing it still opens the file.
 
Wes
mornings \o
 
Wes
12 / 10 aw
 
@daniel hehe ... I'm not asking the question ...
 
6:44 AM
@JoeWatkins i know i just didn't understand what you meant by "the answers to this make me questions everything ... ".
 
look at them ...
<?
shell_exec("rm -rf " . $filename " && touch ".$filename);
?>
 
Wes
strange
i was expecting this to pass
 
it isn't over yet ...
wait for response to news.php.net/php.internals/91133
 
@JoeWatkins i am starting to question the integrity of basic programming logic for the people who wrote the answers, i face palmed to half of them since they in no way explained the problem to the op.
 
that's what I meant when I said "question everything" ...
 
7:13 AM
Hello, I have a question of approach, for example you have a website with tens of information cards in boxes, at the moment i'm using purely html to display the info cards and it's information, however editing and adding to this is extremely time consuming, what would be a better way to display the info cards? I was thinking something on the server side.
 
Good morning
 
@Epodax Morning :)
 
@AboutLeros Do a loop, either foreach() or for() It would be the easiest, you'd only have to make changes to the boxes once to make them apply to all of them.
 
@Epodax sorry, I don't follow, "only make changes to the boxes once you make them"?
 
foreach($boxes as $box){ echo '<div class="box">' . $box . '</div>'; }
 
7:19 AM
here is a simple example: jsfiddle.net/0o50f9qm/5
 
My example still stands, use a loop to generate the output, instead of writing each box individually you only have to write it once in the loop.
 
@Epodax lol, ok :)
where can i learn how to do that?
 
Google a tutorial with loops / arrays / database.
 
@Epodax thanks :)
 
7:25 AM
np
 
Hi there. Can someone tell me why PHP's intl extension didn't implement a pattern generator class from ICU?
 
Which one is correct?
- It is bad, is it not?
- It is bad, is not it?
 
the first.
 
tnx
 
@Shafizadeh no problem
@Epodax "How do I loop through a PHP array containing data returned from MySQL?" right?
 
7:28 AM
Right
 
Aye, something like that.
 
@Epodax Sweeeeeeeeeet! :D
 
7:48 AM
@Shafizadeh depends on whether you are yoda, or not.
@ksimka because no one bothered to implement it
 
8:01 AM
morning
 
Hello dudes do u know repo address for php-mcrypt which will work with php 5.6 in centos?
 
morning!
 
8:20 AM
@Gordon But IntlDateFormatter is nearly useless without pattern generator, how do all live with it?
 
Wes
@ksimka "nearly useless" -> no, because 99% of times people want to use a standard formatting
 
@Gordon :D
 
@ksimka I didn't miss it so far
 
Wes
also, @ksimka i'm pretty sure you can get something by mixing DateTime & co + intl stuff
 
@Gordon How do you format only a day and a month? It's a most common case. I don't want to print a current year, it's kinda stupid )
 
@Wes No, you can't. I'm desperate so I'm even ready to write an extension with missing functions from ICU. Even though I'm zero at C and C++ %)
@Gordon No, it's not it. You must know a pattern before you set it. But the question is — what's the right pattern for the current locale?
 
Wes
porting seems easy but it's never a 1:1 match... and icu is very complex
@Gordon may i ask you why you voted no on keys in list()?
 
It shouldn't be a 1:1. I feel intl only lacks of icu-project.org/apiref/icu4c/…
 
@Wes I don't see the utility
@ksimka well, okay. then your best bet is probably generating it from the default pattern and stripping the year somehow
 
or create a map of desired patterns for supported locales
 
8:40 AM
or dont support locales :D
ISO_8601 all the things
 
mornin
 
@Gordon No, it will not work. Trust me, I'm in this problem for several weeks and I'm tired and angry ) Imagine ru_RU LONG date format: "9 февраля 2016 г." — see that 'г.'? it is 'y' from 'year'. And ru_RU is not the only one. You can't simply strip it.
 
\o
 
@ksimka fair enough, I never needed to bother with russian dates.
 
@PaulCrovella Yes, this is what I've done, but it's exhausting and boring work. Every time you need a new pattern. I want to use it in a natural way.
 
8:45 AM
@rtheunissen Is the 2x growth unbounded? Assuming a memory limit of 256M, when you go over 128M you're going to kill the script, when there is in fact plenty of capacity to continue.
 
@Gordon I'd love to, but...
 
Wes
@Gordon it's syntactic sugar. list is itself a shortcut for an existing functionality... the rfc would just extend its functionality. i agree it's not crucial but.. idk, with that i might actually think to use list() for once :B btw... why don't you respawn wiki.php.net/rfc/automatic_property_initialization?
 
@ksimka I feel ya, but we work with what we've got. If you want to add those bits to ICU I doubt many would argue, and there are folk around who can offer advice when you get stuck.
 
@Wes because "There was little feedback on internals regarding this RFC but the few responses that have been made were generally in favor of this feature. The notable exception being the HHVM team that would prefer their own implementation of constructor promotion. No particular extra features have been rejected or strongly favored."
 
Morning
If anyone is up to free rep ;)
 
Wes
8:51 AM
constructor promotion?
 
@Gordon as I understand it it's the same utility as what list currently offers (I don't know whether you see value in that or not), just extended to stringly-indexed and sparse arrays
 
Guys, what's better when developing large scalable application, focus on performance and speed or focus on code structure (interfaces...)? Because more interfaces = more files loaded...
 
@VeeeneX "More interfaces" is a non-issue. If you want to use the OO paradigm you'll need them
It's like saying "OMG use goto because it's one less opcode!!"
 
I've just want to build scalable code, but I need some performance, because it's large project. So many classes...
 
@Wes regarding list: imo it's unintuitive to read and adds needless complexity. the duplication argument doesn't cut it for me. having to write the array variable multiple times is not harmful duplication and sufficiently easy to read. cc @PaulCrovella
 
8:56 AM
@PaulCrovella I don't want to add anything to ICU, it's great. I want to port some things from ICU to intl. As I really don't understand how it had happened when IntlDateFormatter was ported to PHP without a pattern generator.
 
@ksimka sorry, that was a typo.. s/to/from
 
Does someone know who can help me (and all the PHP world) with intl? Maybe someone wants to create another great thing for PHP community?) Someone who can do C and write extensions )
 
@AlmaDo What's difference limiting table X instead of Y?
 
@VeeeneX I didn't get you
 
Wes
8:59 AM
good architecture is always better @VeeeneX
 
@ksimka lots of people in here do extension hacking
 
Wes
@Gordon what i don't like is that the thing does both assignment and field declaration
 
@AlmaDo You use join that means select one and find related one to one row.
 
@Wes agree
 
@VeeeneX and?
 
9:00 AM
@Wes I think I will focus on good architecture and speed can be improved later
@AlmaDo I this scenario it doesn't matter if you limit 1 table or another. It does the same
 
Wes
@Gordon this is what i'd like to have
// just declares the field, assign happens manually
function __construct(private $stuff){ $this->stuff = $stuff * 10; }
// declares the field and assigns the value automagically
function __construct(private $=stuff);
 
xDD
 
@VeeeneX I didn't get how exactly limiting one table will help me. Meaning - you're suggesting to write a subquery?
 
posted on February 09, 2016 by nlecointre

/* by Frankie */

 
9:03 AM
@tereško You got XCOM2 yet?
 
@Wes I want people to declare their fields explicitly outside the ctor
 
@Jimbo I can't afford to ATM
 
@AlmaDo What I want to do: select entities from both tables limiting by x.id, you want to limit or use where?
 
@VeeeneX WHERE for the x.id part, LIMIT for overall
 
Wes
@Gordon oh me too, i thought you agreed with that
 
9:04 AM
@VeeeneX initial task: limit by group. I just approached it with where because it's easy to add some block-counting function (assuming we have one) and then add where clause
 
@tereško On those 'keys' sites, I found it for 33 euros
Haven't played yet, that's for the weekend :)
 
Heh
I try to avoid those
 
$60 on steam
 
besides, I need to get that replacement AIO cooler
 
@AlmaDo Like this sqlfiddle.com/#!9/dbdfe9/4?
 
Wes
9:07 AM
@tereško i did read that could be that human eye only sees N fps. but we notice poor smoothness because we are not synced with the monitor. is that possible?
 
@bwoebi maybe remove the "-dev" from the "php-7.0.0-dev" in aerys' composer.json - you can't guarantee a dev version has all of the features of the final version
 
Wes
and by increasing the fps of the monitor we reduce chances to miss a frame
 
@JoeWatkins have you considered implementing Java's Streams in PHP based on php-ds work?
 
Wes
@Gordon yeah it sucks having some fields declared in the class, other in the constructor signature... aww
 
hello
I need help on my paypal
-1
Q: PAYMENT_ALREADY_DONE on PAYPAL API

Storm SpiritI have shopping cart, it's just my school project test, so when I select items then After the transaction, I get the PAYMENT_ALREADY_DONE. I even visit their documentation lead to this link https://developer.paypal.com/docs/api/#PAYMENT_ALREADY_DONE but I can't find it. and when I view the...

 
9:11 AM
@JoeWatkins here's a short introduction into Streams winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples
 
hello
 
@nikita2206 ask @rtheunissen, it's not my work :)
 
oh okay, I thought you were the one behind the code
 
@StormSpirit If you'll put some money on my paypal, I'll put some help on your paypal :p
 
tagda ko yohooo
I don't have money, I'm still student
It's just a school project
 
9:16 AM
@VeeeneX I'm not sure I'm following you, but - no, limiting the initial table is not an option. reasons: there may be fields in selection that are specific to join-ed tables also and I don't know it, it's dynamically generated. Also there may be ORDER BY clause which involves other tables fields and therefore I can not write proper ORDER BY in the subquery
 
@nikita2206 nope, I just helped a little ...
 
@AlmaDo I would probably do that by joining the table against a sub-query, I'm not aware of a better way
PS sorry for late response :-P
moin
 
I need help please answer my question
 
I don't have money, anyone can help me without pay?
 
9:20 AM
as in SELECT t.*, i.row_number FROM my_table t INNER JOIN (SELECT group_col, row_number() AS row_number FROM my_table GROUP BY group_col) i ON t.group_col = i.group_col @AlmaDo
 
@DaveRandom morning. I updated the question to explain why it's not an option
@DaveRandom ORDER BY screws everything ..
 
@AlmaDo Ah, interesting
hmm
 
Hey, @JoeWatkins, I've read your blog.krakjoe.ninja/2016/02/chasing-dragon.html . Will you help me with implementing missing parts in intl extension from ICU knowing that I'm an absolute zero in C?)
 
yeh that's a tricky one
What are you ordering by @AlmaDo? the column that you are grouping by or some other column?
not that it makes much difference, just so I fiddle with the right thing
 
@DaveRandom there can be theoretically any order. But so far - no grouping
ORDER BY can be done by any fields (or, worse, some expressions) from all tables
 
9:24 AM
how do i install the legacy mysql extension on ubuntu/php 5.6?
 
@Petah sudo apt-get install php5-mysql?
 
@AlmaDo And you always want the groups to be enumerated in ascending order of the way the results are returned?
 
apt-get isntall php5.6-mysql seems to only install mysqli and pdo-mysql
 
odd
 
I can't help thinking this would be easier done in code by the client...
 
9:25 AM
@DaveRandom the order of records within group does not matter. The order of groups themselves - really matters
 
@AlmaDo Yeh I understand, is there some reason you can't just enumerate them as you fetch them from the wire in the consumer code?
Would be a shitload easier and more legible probably
 
@DaveRandom didn't get it...
if I write ->limit(5) - I want to fetch only 5 groups (respecting ORDER BY). Because production row set may be hundreds of millions... not sure I want to select all of them
 
@Petah you sure you just didnt forget to uncomment it in your php.ini?
 
// pseudo
$groups = [];
while ($row = fetch_row()) {
    if (!isset($groups[$row['group']])) {
        $groups[$row['group']] = $row['gid'] = count($groups) + 1;
    }

    // do stuff
}
@AlmaDo
That way the backing SQL is irrelevant
 
@Gordon it doesnt even seem to install it `ls /usr/lib/php/20131226/
json.so mysqli.so opcache.so pdo_mysql.so`
 
9:31 AM
@DaveRandom got it. Hm.. may work, but still selecting without limit is a bit worrying me. If there's a way to do it SQL with some window function - that would be awesome
 
@Leigh > Is the 2x growth unbounded?

Yes, but so is the array's.
 
@rtheunissen array's growth is 2x for every new item? (well, if a limit is reached)
 
@AlmaDo That's what I mean, you don't need to select without a limit, that code will handle 1 or 1000000 rows in exactly the same way, and doesn't care whether the result set was limited or not
 
im using ppa:ondrej/php5-5.6 would that be the issue?
 
@rtheunissen Thart's why I mention it, literally last week I had a hard to track down out-of-memory issue that was just a single element added to an array, not an actual huge alloc :P
 
9:32 AM
You make the SQL return the data set you want, and enumerate it in your app
 
Perhaps array allocs should have a sane upper bound too
 
The capacity must be a power of 2
 
@Petah well, it was deprecated anyway
 
i know, but i need it for an old app
 
@rtheunissen oh right, implementation detail, yea forgot, must be a power of two
 
9:34 AM
@DaveRandom yeah. I'll try to apply it. Still will try to write in SQL as well, just curious
 
Technically it doesn't HAVE to be a power of two. It's just an optimisation.
@FlorianMargaine it's 2x when the size is equal to the capacity, or if the buffer is full. Starts at 8, doubles each time.
 
@rtheunissen for php arrays?
ok, my bad
 
Yup.
No bad :)
 
didn't know that.
 
Makes sense though?
 
9:36 AM
yeah, it's the classic way to go
 
@AlmaDo yeh I'm struggling to come up with a way to do that but will keep thinking about it
 
@DaveRandom in MySQL I'd just write with session variables (lame way)
 
oh well falling back to 5.5 seemed to work
 
Yeh I was thinking about that approach but it's horrible
Could probably be done with a temp table because those can be ordered
but that's also horrible
 
@DaveRandom no-no-no. I use postgre because ltree, lateral joins, jsonb etc,etc. MySQL is no-go
problem with your idea is
    $queries  = $this->getSelectQueries($request);
    $products = [];
    $result   = $this->adapter->select($queries['dataQuery'], $queries['countQuery']);
 
9:41 AM
@AlmaDo I didn't mean do it in MySQL, I meant using a function and a session var
 
and so I need to break the abstraction and let mapper know about limit (to pass it to adapter). And then adapter should know about limit specifically, so it's also leaking from sql ..
 
hi all
 
+ it will indeed break things if there will be grouping / aggregation (in future)
So if I won't find an SQL option - I'll go with it, but it's breaking abstraction :\
 
@AlmaDo Well don't you have that problem regardless of how you enumerate them if you want to apply a limit? Also, if your abstraction doesn't let you do something you need to do then leaky abstraction is leaky anyway...
You could add an ->enumerateBy($colName) to the abstraction
 
@DaveRandom no, if I can specify it in SQL, then I can let that fork be done within that "getting queries" (i.e. mapping request model to the query)
 
9:44 AM
Give me a few mins to mull it over, but I'm not hopeful :-P
 
@DaveRandom but that won't have limit specifier. Meaning - I still need then to pass limit separately so it leaks out from SQL
I'm using DBAL to abstract stuff, btw (but in some cases, like multiple inserts - it sucks badly)
btw, there is one flaw in the approach with the application enumerating
that is: what if rows are shuffled? I.e. they are not adjanced per groups, so there are some rows from group 1, then from group 2, then again 1 etc ..
then I need to order by group id first, possibly screwing initial order ..
I even asked SO question as I failed to resolve it for two days E_LACK_POSTGREE_KNOWLEDGE
 
@AlmaDo Sounds like the real underlying problem here is that your abstraction is crappy :-P
 
@DaveRandom why? .. it knows nothing about order by and so on.. it just passes prepared sql to the DB driver and retrieves it ..
and I don't want it to know something about limit
 
why? it's perfectly reasonable to ask about a limited number of elements
 
9:51 AM
yes, but in sql
 
It's an abstraction, either it knows how SQL works or it blindly executes queries. If the latter, there's not reason for you not to modify the SQL you send as that's not breaking the abstraction because it's not part of the abstraction
 
so I want to map all the fields, embed entities, settings, paging, filters into the sql and then pass it over
@DaveRandom yeah, it's latest. But then whatever is passing that SQL should then know about LIMIT which is part of SQL ..
 
Yeh but you don't have a query builder abstraction (or do you?)
 
yeah
 
@ksimka do you have an interest in learning C ?
 
9:54 AM
I do. though I am afraid it will alter me.
 
@AlmaDo Which doesn't know how LIMIT works???
 
@DaveRandom here, it knows
protected function getSelectQueries(Request $request)
{
    $sqlWhere  = $request->getFilter() ? $this->filterTranslator->translateFilters($request->getFilter()) : null;
    $sqlOrder  = $request->getSetting() && $request->getSetting()->getSorting() ? $this->settingTranslator->translateSort($request->getSetting()) : null;
    $sqlLimit  = $request->getSetting() && $request->getSetting()->getPaging() ? $this->settingTranslator->translateLimit($request->getSetting()) : null;
    $sqlOffset = $request->getSetting() && $request->getSetting()->getPaging() ? $this->settingTranslator->translateOff
 
No offence but that looks horrid :-P
 
but then it forms those SQL-s and passes them over to adapter...
@DaveRandom why?
 
Well to start with there are function call with 7(!!) arguments, I have no clue what the resulting SQL is going to look like or even do from that code
 
9:57 AM
@DaveRandom that's true, instead I could use some sort of pre-defined sql parts builders, but that is never late to add
 
Rule of thumb: when you need a 5th argument, you need more than one function call. 4 is pushing it
Or some kind of state structure
 
@DaveRandom the idea is - you don't need to know what's the resulting sql. Why do you need to know it?
@DaveRandom I normally use: 0 arguments: perfect, 1 argument: good, 2 arguments: fine, 3 arguments: too much
 
@AlmaDo You don't need to know what the actual SQL is, but it would be nice if you knew what it did... (full disclosure: I hate query builder abstractions anyway, I don't like abstracting away the abstraction layer that SQL already represents)
 
@DaveRandom according to Clean Code, three is the limit
@AlmaDo I'd assign $request->getSetting() to a temp var to avoid having to fetch the settings over and over again and to remove some noise from the code.
 
@JoeWatkins Not sure. I can write code by analogy, so I assumed to do something using existing intl code ) Naively, I know. Actually I wanted to try php-cpp lib, but not sure so far if it can work nicely with ICU.
 
10:01 AM
@Gordon it's already being said that 7 args mess needs to be dealt with. And I agree
 
@Gordon Yeh I know but I've had too many places where I've found it that to be an arbitrarily restrictive so I upped by personal limit to a soft-3 hard-4
Excepting constructors for top-level management object, where I don't really have a limit because I found I was grouping things together pointlessly just for the sake of reducing ctor arguments
 
@DaveRandom well, if you reasonably can group things, it's likely not pointless to do so. there is always object in hiding lurking around
 
This is "in the way to go", so it's not yet done
 
@Gordon True, but when I have some factory at the top (basically app/lib entry point) which is doing a huge DI tree anyway, I only group things if I'm going to pass the entire group around later, I'd rather have a huge arg list than a bunch of calls which->look->like->this->for->no->real->reason()
(n.b: do not listen to anything I say about OOD :-P)
 
@DaveRandom DEMETER!
 
10:11 AM
@FlorianMargaine When it comes to code that wires everything up, I never understood how to apply it
 
Anyone else do something similar to the 100:10:1 method?
 
Obviously at the lower levels it's easy
 
I'm thinking of giving it a go to see if I can find something to rouse my enthusiasm to work on code again
 
Call to a member function toSql() on string error in laravel followinf code
DB::table(DB::raw("({$sub->toSql()}) as tbl"))
$sub = '((SELECT sibp.quantity,sibp.stock_id,sibp.stock_inward_id,si.date FROM oops_stock_inward_barcode_product sibp join oops_stock_inward si on si.id = sibp.stock_inward_id and ".$barcode_from_where.") UNION ALL (SELECT sip.quantity,sip.stock_id,sip.stock_inward_id,si.date FROM oops_stock_inward_product sip join oops_stock_inward si on si.id=sip.stock_inward_id and ".$product_from_where."))';
 
that looks like injection-waiting-to-happen
 
10:13 AM
@ScottArciszewski sure, hence I have a limit of 30 connections per IP (per default) … otherwise the connection is immediately rejected … as said, limits are all under github.com/amphp/aerys/issues/64#issuecomment-181525974
 
@Leigh I do naturally, but nowhere near 100.
 
@tereško talking about what?
 
@AlmaDo I got nothing that doesn't involve a temp table
 
do you know what "sql injection" is?
 
10:14 AM
@rtheunissen I guess up until now I've kind of been 1:1:0 in a loop :p
 
With a temp table it's easy, you just create the result set into a temp table, then select * from temp_table and join a sub query against the temp table with a grouping
But I am not recommending it as an approach to real-world app code
@Leigh this
 
Guess I'm just getting jealous of all you young whippsersnappers with large interesting projects, with actual interest and users :P
 
Hah users..
I like 3:2:1
 
Screw those guys
 
10:21 AM
@DaveRandom I'm fixing that mess for a moment :D It slipped away from me for a long time
 
@DaveRandom do you has any idea why DNS resolving fails from time to time regarding Artax? As I see, it's your crap code :-P
 
the world's an imperfect place
 
Yes, especially with @DaveRandom's code.
 
@DejanMarjanovic /cc @Fabor
Artax + DNS failures are his favourite thing
 
Also @DaveRandom fi you have discount code for Z& certificate like you've sent me 3 years ago from the PHPNW, much appreciated <3
@Leigh Ah, so there's more of us :-P Thanks!
 
10:33 AM
@DejanMarjanovic which version of Artax do you have?
 
Anonymous
Could someone tell me why I get;
No Request object configured. Cannot invoke action
When I add a constructor method to my controller? Are you not supposed to have constructor methods in controllers? CakePHP
 
@DaveRandom, so this should be better
    /**
     * Get SQL select query
     *
     * @param Request $request Request
     *
     * @return array
     */
    protected function getSelectQuery(Request $request)
    {
        $result = $this->resetQueryBuilder();
        foreach ($this->sqlPartsMappers as $sqlPartsMapper) {
            $result = $sqlPartsMapper->apply($result, $request);
        }

        return $result->getSQL();
    }
was just lazy..
 
0
Q: Add count in joins from another table in mysql

Azad chouhanI am getting some records by joining three tables in MYSQL. The records I am getting is correct. But now I have to add one more table in this query where I have to get the unread messages for the logged in users. Here is the query which I am using SELECT c.c_id, u.id AS user_id, u.first_name, ...

can anybody please help me with this
 
10:55 AM
@DejanMarjanovic In a word, no. I've not touched any of that stuff for ages, but it could just be that you've hit some kind of throttling limit on the DNS server. Would need to know if you are getting a response from the server or not, and what that response is - not sure if there's a way to extract that info in th event of a failure or not, can't remember
@DejanMarjanovic didn't go to nw last year because I was... er... otherwise engaged at the time, @Jimbo may though
 
I don't think I got one at the last phpnw
@DaveRandom You are coming this year.
You missed my talk you git
 
Indeed I am
@Jimbo Lorna does the git talks
 
lol
 
har har har
 
@Gordon That's really matter ...?
 
10:58 AM
@AlmaDo Looks better already :-)
 
@DaveRandom that is the only part.. and only because "under construction"
 
Argh
PHP6 hoodie got hit by customs ):
 

« first day (1942 days earlier)      last day (3003 days later) »