« first day (2171 days earlier)      last day (2770 days later) » 

12:00 AM
@Sherif uuuh?
 
@bwoebi I just find that this would be incredibly difficult to use for the average person.
There's gotta be a better user interface than this.
 
@Sherif possibly? I don't even see the issues
 
isnt it a cli application?
 
I'm too used to gdb, lldb and phpdbg to see the issues with it
 
@bwoebi exactly!
 
12:03 AM
@Sherif And thus I always welcome external feedback…
 
The average PHP guy wouldn't know wtf do in gdb.
 
@CodeSpirit yeah, I guess he means the way the program presents itself
@Sherif hey … many C devs don't know either how to use gdb/lldb … from my experience.
 
@bwoebi Then you C my point </pun>
 
@Sherif But I fail to see why … i.e. what's so complicated about these tools.
 
@bwoebi The interface is decrepit.
I can easily see the average developer getting lost between exec and step/break points.
 
12:06 AM
uhm?
 
But then again, the average developer also gets lost in the terminal trying to do the most basic things so...
Building a decent UI in CLI is hard stuffs :/
@bwoebi Your problem is you're already too familiar with phpdbg. You gotta look at this like someone that's touching it for the first time to see the UI problems.
 
@Sherif I tried to, but the experience I have from other debuggers is not helping me here…
 
Right.
 
So, you seem to see the issues… could you outline them in a more concrete way than naming it decrepit?
 
@bwoebi I can't, because I don't fully understand the problem yet. I'm only just digging into phpdbg internals for the first time.
Trying to implement that "find object references" thing you talked about.
 
12:12 AM
@Sherif Well, tell me when you know. And ideally also how it could be done better.
 
@bwoebi How do you implement a recursion guard? Just store the object handles in an array and stop recursing if it's already been found?
 
@Sherif no, 1 sec
Z_OBJ_APPLY_COUNT_P, Z_OBJ_INC_APPLY_COUNT_P, Z_OBJ_DEC_APPLY_COUNT_P are the relevant macros @Sherif e.g. php-lxr.adamharvey.name/source/xref/master/Zend/…
 
Ahh, it has macros!
Of course it does...
 
a define is less code than a zend_always_inline function
 
Wait.. about arrays though. Like $arr = [new stdClass]; $arrr = [&$arr]; $arr[] = &$arrr. If I'm digging through the symtable I'll still end up in an infinite loop.
yea that wasn't right.
3rd time's the charm.
 
12:19 AM
HashTable->u.v.nApplyCount
 
there's a macro for everything eh.
 
@Sherif A few things are zend_always_inline though
 
OK and ... compile!
[don't segfault dont' segfault dont' segfault dont' segfault!]
Yay Segfault!
 
If it doesn't segfault after first compile on a little bigger change, there's usually something else really wrong.
 
12:34 AM
bah! static scope!
I hate you PHP PHP7 :(
 
PHP 7 master <3
 
1:08 AM
@bwoebi I came back and poked yer huffman briefly, shaved a whole tenth of a second off of decoding 10<<20 random bytes (from 3.4 to 3.3 seconds, give or take.) If you're interested in a miniscule gain see how this fares for you. Tests pass.
 
this … will probably only work in a clean fresh memory manager
At least .= attempts to do a realloc
 
oddly enough I got almost the same gain by replacing just your \strlen($chr) check with an isset($chr[1]) check instead
 
if there is no other memory chunk near to the current memory segment, then it will just resize the current memory chunk…
if you have to copy though...
In worst case you get to copy around 30 times (30 = number of bins for small allocs) until 4 KB and then each 4 KB…
@PaulCrovella yeah, good point. The \strlen($chr) == 2 is two ops while isset($chr[1]) is only one
 
1:23 AM
not sure what I'd need to do to give this a worst-case scenario, been running them back and forth for a few minutes, regen'ing data, and it comes back fairly consistently
 
@PaulCrovella I can confirm a 5% perf improvement
 
@PaulCrovella The problem is that it isn't trivial to recreate
Anyway, if you do not get any improvement of .= over the isset() variant, then not worth pursuing that
 
I did get some, but not terribly much. Probably not worth it if it'd cause spikes.
 
@PaulCrovella not sure if it will, I'm just saying that you have quite the ideal case in any case
 
1:34 AM
I dig your lookup table, btw. Pretty clever.
 
@PaulCrovella I'm a bit annoyed that generation of that table takes a fraction of a second though (I believe like 70 ms or such on a beefier machine)
It's "just" at init… but still :-P
 
hi
i have a wordpress website.. i need to redirect the user to a new webpage and start a download automatically
which is the best way to do it?
 
1:53 AM
@techno we don't do wordpress here
 
1 message moved to bin
 
you bastard!
 
=)
 
What happened to all the "we don't do wordpress" star spam?
We had a nice little array going there.
 
@Sherif currently I see 5 of them in the stars list
 
1:57 AM
@bwoebi That's not enough!
 
It's … tempting to cancel the stars. But I let you have your fun :-P
… and I don't mean cancelling everything, but the wordpress ones
 
2:24 AM
Moin
 
2:42 AM
Would anyone be willing to help me get my eclipse project set up in sourcetree (the problem is every time I open it up (no changes) I get 50 modified metadata and history files)
 
3:23 AM
@Wes I don't know why anyone sober would do that. var AliasFor = class YourClass {} is for aliasing.
Also YourClass in this case would only exist within the scope of the class definition.
 
Anonymous
3:57 AM
Monring
 
\o
 
 
1 hour later…
5:34 AM
posted on September 25, 2016

New Cyanide and Happiness Comic

 
 
2 hours later…
Wes
7:14 AM
we don't do wordpress here \o
@littlepootis yeah like function expressions. no idea how that could be useful tho
 
7:29 AM
@Wes module.exports = class ClassName { ... }
 
Wes
yea but why :B
even if you needed to access the class you could do it with this.constructor
 
dirty
@Wes So that you could just const ClassName = require("./your-module"); var instance = new ClassName();
 
Wes
? the class name in the class expression is internal to the class declaration itself
 
ofc, wait let me elaborate.
// your-module.js
module.exports = class ClassName { ... }

// some other file:
const ClassName = require("./your-module");
var instance = new ClassName();
These weird features just makes JS more flexible.
Also, .constructor is a myth.
 
Wes
but it's irrelevant the name i write
// your-module.js
module.exports = class BowlOfDicks { ... }
// some other file:
const ClassName = require("./your-module");
var instance = new ClassName();
 
7:40 AM
of course it is, that's the point
 
Wes
then why write it at all
 
The BowlOfDicks?
 
Wes
module.exports = class { ... } will do just fine
yeah
 
What if you want to refer to the class?
 
Wes
this.constructor :B
 
7:41 AM
8 mins ago, by little pootis
dirty
Ah, also, it makes debugging painful (because your class isn't named).
 
Wes
we've been writing dirty js for decades :B we liked it
 
Debugging is why I stick to named function expressions.
@Wes lol
 
morning
 
Wes
then es6 happened and suddenly everybody started caring about hygiene :B
hey linus
 
JabaScript
 
7:48 AM
0
Q: When submit a form ,To which URL it will redirect ( MVC)?

beginnerIn my application I have localhost/controller/action (MVC). I open a page localhost/user/register . and i have a form their . And surprisingly when i submit form using <form action="<?php echo $_SERVER[PHP_SELF];?>" > Then form submission redirects me to localhost/index.php i want to redire...

can someone help?
 
to the page you're on when you "submit".
 
i am on localhost/register/user
@littlepootis localhost is index.php
 
Ah, you're using htaccess redirects.
 
yes
can you tell other way on localhost
 
I have a login at /client, which saves a login token to a session variable. If I go to /client?test It can't see that token? Why?
Ok, update: why is my session_destroy() ignoring that it's in an if?
 
8:56 AM
@MattCowley Try if (false) { session_destroy(); }
 
9:18 AM
What the shit is he on about?
> I've seen multiple projects' architecture massacred by indiscriminate reliance on autowiring containers.
Have you balls
 
@Jimbo who cares what anyone on reddit is about?
 
@Gordon Spreading misinformation sometimes cannot happen
 
@Jimbo its reddit. thats akin to reading The Sun. It's the new 4chan. It's not a source of information
 
@Gordon But... but... they must be defeated!
 
yes, easy. Just don't go there.
 
9:28 AM
But then you get frameworks popping up, marketed well, and suddenly everyone starts believe they're the right way of doing things
All because of discussions on reddit
Eh, you're probably right
shoves head back in sand
 
weather is fine today. just hop on your ducati and take her out for a ride ;)
 
Dick
You know she's crashed
:D
 
@Jimbo Hey look, you discovered the funnies section of the Internet!
 
@Gordon I found a buyer for her in her crash damaged state anyway. When I get over to Spain, after I pass probation (3 months), I'll get another in at Ducati Barcelona, they have English speaking people there
 
@Jimbo I thought you bought a new one already or it wasnt that bad. sorry.
 
9:35 AM
@Gordon Haha, I thought you were joking ;) She's not that bad but the plastics all damaged, it's considered a write off so basically I'll pay it off with some left over once the cheque comes through from the other insurers within the next few weeks, then buy another one all shiny and new again :-)
 
Wes
@Jimbo how does one pass the auto-wiring DIC around in the code? i think he meant that, no? ie in some way you have the DIC bound to your code
(note: i've never used one)
 
@Wes I sometimes pass it around, a factory is allowed to use the injector within itself to build something else
 
@Jimbo btw, last week I found out there is a new harley coming out in 2017. a roadster. I like it, but it's probably too low rider for me . also 64ps and only 98nm
 
Lot of torque though, but not much horsepower
Then again these sorts of things are all about the torque and not top speed
They're unfaired, you won't want to go 100+ on that
 
@Jimbo 98 is not "a lot of torque" :D
 
9:40 AM
The Panigale has 107.4 Nm (79.2 lb-ft) @ 9,000 rpm
And it's a superbike
 
166.8 Nm (17.0 kg-m) @ 6,500 rpm is a lot of torque :)
but I cannot afford a vmax atm :(
 
@Gordon You don't have to buy it outright you know, nobody has the sort of money to just buy one outright, you put what you have down on it and then enjoy life
 
the panigale is probably a lot lighter than the harley. all those harleys are super heavy. the roadster is about 260kg
 
Wet weight is 195 kg, yeah I guess it's lighter but not hugely
Just get one man, Joe got one ;)
 
@Jimbo joe got a vmax?
 
9:44 AM
@Gordon No no he got a new bike, I can't remember which one it was actually he doesn't mention it much, hope he's not crashed it
 
@Jimbo maybe I'll buy one next year
 
lol, nice clarification
You need to, I'm fully expecting you and @JoeWatkins to organise a ride over to Spain one bank holiday ;)
 
I participated in a charity event though. they give out a custom harley as a prize for everyone that donated at least 5 bucks
 
No way
 
seat's probably too low for me as well. but I could sell it if and get something else.
 
9:48 AM
Wait, so you're actually getting one?
 
no, I donated in that charity, so I could win it
 
> they give out a custom harley as a prize for everyone
Do you mean there's one to win? I read that as everyone gets one who donated a fiver
 
sorry, misphrased :D
 
lol
 
they will pick one lucky winner
and since they do that one day before my bday, I figured that's a sign and I should try
superstition ftw
but it's only the third charity they run and they only had about 10k people donating last time, so chances aint that bad
 
Wes
9:59 AM
@Gordon wanna O_O
i always wanted a hd vrod (or derived ones)
 
@Wes I was a sucker for the night rod in black denim, but I got over it :)
 
Wes
:P
i need to get a garage or i'll never buy one, or even a better car
 
my current dream bikes are the vmax or the new xdiavel… though the reasonable choices would be the yamaha xsr700 or 900
though that harley up there aint shabby… neither is the new hd roadster
 
Wes
garages here cost about the same of apartments, despite being like 10m2 or even smaller
fucking small country... we have no space left
@Gordon those look cool too, but i very much love the nearly chopper look of the harley
:orgasm:
 
@Jimbo I'd probably fly over and rent one there. easier
 
Wes
10:06 AM
actually the xdiavel is not bad at all
 
@Wes You don't need a garage, I got one of these for the Ducati and it's ace
 
Wes
seriously?
 
Yep, not a single drop on it since
I've always kept my bikes outside
 
Wes
italy doesn't look like england jimbo :D in we don't have private gardens unless you go in the country side
at least most of us don't
and if i leave that on the street i'd imagine it being lighted like a torch in like half an hour :B
 
@Wes you also dont have rain, so who cares ;)
 
10:10 AM
^ This
You won't have any corrosion
Also I don't have it in my garden I have it in my side alley way, it's just enough space to walk past and have that there
Think the one I get in Spain I'll get a biketrac fitted to it so you can see where it is day and night
 
Wes
thieves @Gordon i hate to say that but we get the worst thieves from east europe here
since i've been here i got 4 cars stolen
luckily they were cheap cars :B
we got my ex ford fiesta stolen after only 4000km
was basically 4 month old or something
 
Wow
 
that sucks
 
Wes
we don't have criminality like at all, just car thieves because i live near the border. they get in and out in 60 seconds
bikes for examples get stolen like crazy even during day. you leave it unattended and puff, it's gone. a friend got his ducati vandalized because they were trying to steal it, he repaired it, and then they succesfully stole it :B poor guy
 
10:29 AM
morning
 
morning
 
Wes
watching the motogp @Jimbo ?
 
@Wes Nah I'm about to go to Starbucks so I have to force myself to do my slides
 
Wes
new talk? :P
 
@Wes Websockets one for phpnw next weekend
 
Wes
10:37 AM
nice
 
Mirning
 
morning
 
10:54 AM
@MadaraUchiha I fixed it by making the if require the url variable to actually have a value and it seems to work. Very odd.
 
11:04 AM
If anyone was thinking of signing up for a Monzo card - using this link would help me get mine.
 
Wes
morning wordpressers
 
@Wes I actually have this book:
in front of me and need to read it for work....
 
Wes
[brohug.jpg]
crystal ball says you will leave that job :B wordpress is just hopeless
 
11:21 AM
hi guys i have a question
is it possible to write a query like this
Table1 inner join Table2 Table2 inner join Table3
?
 
What happens when you try it?
 
select
some row
 
...in your mysql client, not in here.
 
its a huge project
i cant express
sorry
and iam poor in english
i have done something like this
"select items.id,items.name,items.code,orders.amount,orders.notused-orders.amount,orders.notused,orders.saleprice,orders.sum,items.quantity,items.category,items.store FROM orders INNER JOIN items ON orders.itemid=items.id WHERE invoicesid='"+Int32.Parse(lbId.Text) +"'"
as you see
FROM orders INNER JOIN items ON orders.itemid=items.id
i want at the sametime
 
yes. So what happens when you add the other inner join to that query?
 
11:26 AM
then i can select a column of that table
that i want to join with
the third table
 
\o
 
Just try doing it. Don't ask how to do it first, just try it, and then see if it works or gives an error message.
Everyone learns best from trial and error.
 
@Danack not skydivers
 
you are right
thanks
lets try
 
@PaulCrovella touché
 
11:30 AM
@Danack
os said idk how to do it
HEHE
it say
check the manual that corresponds to your MySQL server version for the right syntax to use near 'items INNER JOIN categoryid ON items.categoryid=categoryid
with this query
 
That sounds like wise advice.
 
"select items.id,items.name,items.code,orders.amount,orders.notused-orders.amount,orders.notused,orders.saleprice,orders.sum,items.quantity,itemcategories.name,items.store FROM orders INNER JOIN items ON orders.itemid=items.id items INNER JOIN categoryid ON items.categoryid=categoryid WHERE invoicesid='"+Int32.Parse(lbId.Text) +"'"
the problem is with the join line
FROM orders INNER JOIN items ON orders.itemid=items.id items INNER JOIN categoryid ON items.categoryid=categoryid
 
> INNER JOIN items ON orders.itemid=items.id items
That last 'items' is not meant to be there.
 
i need something like this
.... FROM orders INNER JOIN items ON orders.itemid=items.id items INNER JOIN itemcategories ON items.categoryid=itemcategories.id ....
 
omg.
 
11:35 AM
in that query all identifers are true
i mean table1 inner join table2 table2 inner join table3
like that
can that be done in mysql?
 
You are very bad at listening to people.
4 mins ago, by Danack
> INNER JOIN items ON orders.itemid=items.id items
4 mins ago, by Danack
That last 'items' is not meant to be there.
I've already told you where the error is in the query.
 
ThW
morning
 
You could also have listened to the error message that MySQL was giving you.
 
found :)
23
Q: SQL Inner join more than two tables

Ben PearceI can currently query the join of two tables on the equality of a foreign/primary key in the following way. $result = mysql_query("SELECT * FROM `table1` INNER JOIN `table2` ON table1.primaryKey=table2.table1Id"); I'd like to extend this to mu...

the second answer
with 10 up vote
Thanks man...
 
> I am opposed to break BC because we change our mind about how clean is this behavior and I recommend the (future) RMs to veto this change.
user image
2
 
11:45 AM
:B
 
Wes
lol
 
@Danack can't say I'm a fan of making a semantic distinction between implicit vs explicit null. I know you can do it, but I don't think you should. You cite the "principle of least astonishment" in your intro then later talk about how that distinction comes as a surprise to people but dismiss it there.
 
class Foo {
    function bar($repository) {
        $result = $repository->find(100);

        echo get_class($result);
    }
}
^^ that is more surprising when $result is null, than the difference between implicit and explicit null.
 
you don't have to repeat it here, I've read and understand the rfc
 
Ok......but I think the amount of surprise when it returns a completely wrong classname is much greater than the surprise of implicit vs explicit null.
"I know you can do it, but I don't think you should." - why not?
 
11:56 AM
because now there are two different nulls with meanings different from each other
 
I don't view it like that....I view it as the number of args changing. And I think I'm just used to that, so don't view it as a problem.
 
I'd support get_class requiring an object, but adding another null isn't something I can get behind - even if you call it arg counting
 
Hi, Someone give me a link to use twitter api 1.1 using oauth for my html website please?
 
@Vinay I heard there is this very cool new website. It's called Google or something. It let's you type in search terms like "use twitter api 1.1 using oauth" and then it will give you tons of links with useful content. Give it a try. It's really useful and does all the things-
 
!!package lusitanian/phpoauthlib
and
!!package j7mbo/twitter-api-php
 
12:09 PM
[ j7mbo/twitter-api-php ] Simple PHP Wrapper for Twitter API v1.1 calls
 
@Jeeves wait wat
 
@PeeHaa lol
"Laravel"
 
1 message moved to bin
There ya go :)
 
+1
 
@PeeHaa It's 1/2 a library?
 
12:11 PM
@MadaraUchiha It's a quality identifier :P
 
½ library
 
It's to show people it's not built by 2x programmers rockstars codeninjas
Eeeerm @Jimbo. wtf? 'oauth_nonce' => time(),:P
 
@PeeHaa they aren't secrets.....just using $requestNumber++ would be good enough, wouldn't they?
 
@gordon Ha, very funny but seems very bad joke. May be I will try to laugh tomorrow
 
The reason it also has a timestamp is so that it could be separated
As in when I fire two different requests every will be cool
Otherwise the timestamp parameter would have been sufficient
 
12:24 PM
ah yeah.
 
@PeeHaa Er.... byeeee!
 
:D
Just call it advanced rate limiting and it's a feature!
Which reminds I need to fix my awkward wrong dependency chain in asynctwitter today
 
@PeeHaa Did you get anywhere with looking into streams?
 
I had a quick look / scan at it. Dunno yet what the limits are though. I am going to have a better look once I have implemented most of the rest api
 
12:38 PM
@Saitama what is it?
 
getopt() wrapper
 
you should add at least a basic description in the readme
 
A CLI parser or something?
 
was doing it
 
Is it really a big issue if your slides look shit except they convey the information?
 
12:40 PM
Hmm how bad is it exactly? :P
 
So bad, that I couldn't even be arsed to make circles circular
 
:P
 
That's not too bad is it? Srs
 
It's pretty ugly tbh :P
 
fuck
 
12:47 PM
And contains allotta info
 
Info animates in one by one tbh
 
That was my question yea
kk
 
@bwoebi If ZEND_ACC_ANON_CLASS means a class is an anon class, what is the purpose of ZEND_ACC_ANON_BOUND? When can a class have _CLASS but not _BOUND?
I only ask since pthreads checks for one but not the other, but it seems that the VM always sets _BOUND when creating an anon class (here and here)
 
I think I am on the side of fugly, but conveys the information @Jimbo
 
it is fugly enough to cause friction in conveying the information
 
12:51 PM
Listen to @PaulCrovella
 
All my slides are like that
Right, brb just going to re-draw them
 
Doesn't revealjs already have stuff like this builtin?
 
Yeah but it's a ball ache to learn something completely new now. Maybe for next talk
 
Even more so what it involves JS :)
 
1:07 PM
wow engrish ^
 
Wes
noons\o
 
o/
 
@PeeHaa I've created a new slide and a style I might stick to throughout. Let me know what you think?
 
sure
 
 
1:15 PM
I like it
That's like infinite times better
cc @PaulCrovella ^
 
the numbers run counter to the direction of the arrow
 
Shit, nice spot
Apart from that? Alright?
I've fixed that
I could stick with icons, grey for arrows, white for text and red for alerts
as the sort of 'house style'
Yeah, I think I'll do that. Cheers @PaulCrovella, @PeeHaa
 
@Jimbo should be okay, though when doing light text on a dark background I'd use a slightly larger font size or a font/variant that's a bit bolder
(light on dark has different turns-to-mush characteristics than dark on light.. for an extreme example compare thumbnails of slides where the only difference is that their colors are inverted)
 
@PaulCrovella Roboto Slab?
 
1:32 PM
@Saitama depends on how its used, but something sans-serif would probably be easier
 
:D
 
1:58 PM
@Jimbo sorry, we don't do wordpress here.
3
 

« first day (2171 days earlier)      last day (2770 days later) »