« first day (2563 days earlier)      last day (2376 days later) » 
00:00 - 16:0016:00 - 23:00

12:38 AM
/cc @PeeHaa ^
 
Wes
great :B
i know i should be sleeping. i started unit testing instead. i make no sense
 
@Wes meh, I'm now wondering what else oneboxes that would also turn into a decent tweet :-P
maybe xkcd, tweet the cartoon image with a link as the text?
 
yeh but what could you sanely do with that as a tweet? Tweeting just a link to a gist would be a bit weird
 
Wes
@DaveRandom text to img ahahah
sorry :B go to bed
don't do that :D
 
12:49 AM
can i ask a question ?
 
you just did
 
about login session
 
Wes
i thought gists appeared inline
but it doesn't look like that
 
they do usually, they tend to wall-o-text
/me actually sleeps
nn
 
Wes
\o gn
 
12:51 AM
can somebody help me with my code ...
 
@Gagantous just post your problem and if someone can or wants to help they will reply.
 
ohh sure
how can i add a text above the login form when the session expired ?
like "your session expired due inactivity"
above the login form
i used ajax and it did work, but i need the message like ""your session expired due inactivity"" when i have redirect to login page
the ajax just redirect the page without giving alert in login page
i used this this https://stackoverflow.com/questions/16827000/expire-session-automatically-and-detect-if-the-session-has-expired-in-codeignite


I used M Khalid Junaid solution, but it just redirect the page, no alert message in login page
 
Wes
1:23 AM
@crypticツ still looking for PRs?
actually nevermind this is not a simple one :B
 
@Wes are you saying I'm dumb?
 
@crypticツ @crypticツ okay i will try that
 
Wes
@crypticツ i am saying you are lazy :B <3
 
that's more like it
 
Wes
:B
 
1:36 AM
Been learning Python, don't know if it just seems a lot nicer than PHP or that I have no idea what I'm doing.
 
Wes
yeah yeah another traitor :B
 
I don't like the whole put all related classes and functions into a single file thing. It goes against what PHP has taught me.
 
Wes
in python you mean?
 
yeah, the Python way is to put related code into a module so you can have many classes in a single file.
 
Wes
i have no idea about that... you sure? sounds strange
it's usually 1 global symbol = 1 file
 
1:44 AM
reddit.com/r/Python/comments/41haw4/… all the files I've come across are multiple classes or funcs in a single file.
apparently it's easier to maintain that way?
imports become a nightmare when doing single file per class.
 
Wes
imagine scrolling in one of those files lol
i hate scrolling 200 lines, imagine a whole package...
 
Does python automatically pull in classes from the same 'namespace' if you try to use it one class?
 
if by same namespace you mean same file then yeah call SomeClass() as long as it's in the same file will load without needing to import.
 
But if it's in the same namespace but different file? Like php does.
 
Wes
it's not possible, the import is basically a require
import foo -> foo.py
in foo.py there's no "namespace foo"
right?
 
1:52 AM
as far as I know namespacing in Python is just dir structure. So if I want to use FooClass() and it's located in ./src/foo.py I'd need to do from src.foo import FooClass
 
Wes
2:05 AM
functionally is the same but it is much more comfortable to have one class per file
php is nicer
 
PHP gave birth to CodeIgniter, even though it had one eye and a misshapen head, PHP still loved it as one of its own.
Yeah, PHP is nicer.
 
Wes
2:21 AM
i don't blame php for codeigniter, wordpress and other poorly engineered stuff :B i could have easily done wordpress myself... and i would be the one making poorly engineered stuff :B
that's the php strength... it's good for crap and gold at the same time :B
@crypticツ some really poor justification in this thread though
it sucks
time to actually sleep
gn \o
 
2:50 AM
How does bettertweet set up oauth creds? Can't seem to find a way to get them into the room's settings
 
 
2 hours later…
4:41 AM
Home from hospital today \o/
 
5:32 AM
hi @wes
does anyone know best practices for setters / getters in Php?
Better to use assert or exception?
also checking for input validation
 
5:50 AM
posted on October 22, 2017

New Cyanide and Happiness Comic

 
user1928251
6:16 AM
hello
 
user1928251
anyone?
 
6:41 AM
mornings o/
@Fabor congrats \o/
 
7:02 AM
Morning
 
7:21 AM
@NikiC ah sorry too early, now i had two segfaults again. :-(
 
user1928251
hello
 
user1928251
anyone
 
user1928251
?
 
user1928251
i need some help
 
post your question :)
 
7:29 AM
 
user1928251
ok
 
user1928251
i have a loop first
 
user1928251
foreach ($_SESSION['cart'] as $productId => $cartItem) {
//echo $productId;
$t_cost += $cartItem['total_price'];}
 
user1928251
and after i have another loop
 
user1928251
`foreach ($_SESSION['cart'] as $productId => $cartItem) {
//echo $productId;
$total_cost += $t_cost;
}`
 
7:31 AM
ctrl+k to format code.
or use a pastiew
 
user1928251
ok
 
user1928251
i need $total_cost ouside the loop to sum all $t_cost
 
could you elaborate on what you want to achieve?
 
Yeah, you've got some weird logic going on.
 
user1928251
no sorry i messed all up
 
user1928251
7:34 AM
sorry i figured it out
 
user1928251
thanks
 
Consider buying a rubber duck.
 
user1928251
:)))
 
user1928251
thanks
 
user1928251
now i got another problem
 
user1928251
7:35 AM
i need to unset a session array
 
user1928251
but
 
user1928251
i get a db_name instead of id
 
user1928251
why is that
 
user1928251
?
 
Please use the return key less. Your question is far too vague.
 
user1928251
7:37 AM
ok
 
user1928251
unset($_SESSION['cart'][$id]);
 
user1928251
this is the request
 
user1928251
$the_item = mysqli_real_escape_string($connection, $_GET['delete_item']);
 
please, learn to use SQL prepared statements
 
what do you store in the variable $id? and also, that ^
 
user1928251
7:41 AM
ok but how do i solve this?
 
> what do you store in the variable $id?
 
user1928251
i got it i had to replace a old variable that was no longer in my code
 
user1928251
:)
 
user1928251
thanks
 
7:48 AM
IMHO, you realy need to find a book (something like "PHP for beginners") and make a quick rune through it
you seem to lack various basic skills .. at least that's my assessment
 
o/
 
user1928251
8:09 AM
yeah o got it thanks
 
tcp_nodelay option for stream context – #75414
 
9:12 AM
.
 
10:08 AM
shm_put_var() parallel bug. – #75415
 
Anonymous
what the actual fuck
 
Anonymous
this is awesome
 
Wes
10:41 AM
lol congrats
 
moin
 
Wes
\o
 
Anonymous
\o
 
11:13 AM
\o
 
11:35 AM
\O
 
!!github status
 
c-c-c-combo breaker
 
7 messages moved to Trash
 
Hmm, can I remove another?
 
3 messages moved to Trash
 
11:39 AM
Awesome.
 
@samayo Did it really need a tutorial video?
 
Anonymous
Nope. I actually think it was a retarded move go through all that ... but I guess someone is trying hard to find ways monetize on video-clicks, so I guess it's ok
 
Anonymous
there are much worse video php use to monetize on
 
Wes
it's good publicity anyway
 
Anonymous
Yeah, also a real PITA. Every time I see increase in stars, downloads and this .... I have to work on fixing existing issues, bugs ... like that retarded phpunit fail I am working on right now
 
Anonymous
11:46 AM
This is the error on travis:
 
Anonymous
3.84s$ composer install --dev --no-interaction
You are using the deprecated option "dev". Dev packages are installed by default now.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Package operations: 8 installs, 0 updates, 0 removals
 - Installing phpunit/php-token-stream (1.2.2): Downloading (100%)
 
Anonymous
sorry
 
Anonymous
and yet there is no such error (re-declared class) when I test it in local
 
@samayo Don't include from your test bootstrap file
If you're using phpunit from composer you're already using the autoloader
(I think)
Or make it a require_once
 
Wes
phpunit from composer still requires the autoload to be explicitly loaded
like <phpunit bootstrap="./vendor/autoload.php">
 
11:51 AM
okay, nevermind then
 
Anonymous
hmm.. this is a new issue, the tests began to fail ... although when I test it in local I see no issues
 
Wes
do yourself a favor and use composer's autoload as phpunit bootstrap :B
dunno if that solves it but it sure makes it cleaner
you don't need a custom bootstrap for phpunit, just composer (assuming you defined autoload and autoload-dev correctly)
 
Anonymous
yeah, I do need an additional file though to isolate/mock the move_uploaded_file() function
 
Wes
put it into autoload-dev
 
Anonymous
@Wes thanks, doing that now and it looks much better.
 
Anonymous
12:06 PM
Is there a naming convention for classes that extend base class just to modify/mock/isolate something?
 
Wes
link to the file? is it actually a mock?
 
Anonymous
Yeah, it is a mock .. it extends the class and returns true from this function since there is no way to upload physical files during tests.
 
Anonymous
Even if there was there would be no need to test the actual upload
 
Mornings
 
Heyo
 
12:17 PM
\o
 
Wes
it's not a mock, you abstracted away a function call that is otherwise coupled in @samayo
consider injecting the function rather than using a factory
 
https://www.youtube.com/watch?v=LO1mTELoj6o
 
Wes
e.g.
new Foo(Closure::fromCallable("move_uploaded_file"))
new Foo(function(){ /* fake move_uploaded_file */ })
... or using an interface if you don't like closures :B
 
Anonymous
@Wes that sounds difficult. I got it working anyway like your previous suggestion
 
12:22 PM
@PeeHaa How does tweet2 get it's oauth creds?
 
Anonymous
let me push and see if it works
 
Wes
@Jeeves that's like almost literally my life
 
@Wes How many fans does Dest have?
 
@Sean There is no tweet2 anymore. Just tweet
Get an accesstoken through the twitter dev site
sec
ugh wtf they have been crapping all over their dev site fucking again
 
Wes
so i have started working on master thinking it would be a small change but turned out it isn't... can i commit the uncommitted changes in a new branch? how?
 
12:26 PM
also... err... whenever I'm trying to run aerys recently, I get a seg fault
 
@Sean apps.twitter.com/app/new let me check where it is in jeeves
 
$ vendor/bin/aerys -c Bootstrap.php -d
[2017-10-22 12:22:15] info Using config file found at /home/saitama/PhpstormProjects/Manga/Bootstrap.php
Segmentation fault (core dumped)
 
@Wes checkout to a new branch
 
Wes
won't that kill the changes i did?
 
Nope
 
12:28 PM
@kelunik ^
 
When you do git checkout -b yournamebranch it will get the uncommited changes too
Do a git status and comfirm
 
Wes
what's git status? :B
/me uses sourcetree
 
I have creds, but I just don't know where to put 'em :P
 
Wes
lemme try tho
 
The config.yml twitter settings seem to not work with em
 
12:29 PM
Ah yes
I think they are in storage somewhere hardcoded because we don't want other rooms to use a account
@Wes :P
 
KeyValueStore with oauth.access_token and oauth.access_token_secret
 
Yep sounds about right
 
But.. what, how the hell do I get stuff in that, where is it even stored
Goddamnit Jay
 
Wes
@PeeHaa i am not like you hipster guys
 
I mean uh, DR
 
Wes
12:31 PM
with your command lines and lime on green code
 
@Sean Hardcoded
Edit it in
 
kk
 
On live it has these:
 "Room11\\Jeeves\\Plugins\\Tweet" : {
        "oauth.consumer_key" : "xxx",
        "oauth.consumer_secret" : "xxx",
        "oauth.access_token" : "xxx",
        "oauth.access_token_secret" : "xxx"
    },
@Sean It's one of the reason why we need a webinterface to manage the bot
 
Wes
ok it did work
 
\o/
 
Anonymous
12:35 PM
@Wes It worked. Thanks
 
Wes
\o/
 
Anonymous
You deserve a cookie
 
Wes
assert(count($_COOKIE) >= 1)
 
Anonymous
I am too lazy to read the docs ... or anything, that's why I'll never be a decent dev ....
 
Any luck @Sean?
 
Wes
12:37 PM
you are just like all of us
 
I-i read docs ._.;
 
Anonymous
@Wes Did you actually sit down and read/practiced composer, phpunit, git ... etc?
 
@PeeHaa Gonna try later. It was just to set up the twitter image url issue tests
 
Anonymous
I learned php by writing anything on the editor and refreshing the page until there was no error anymore :/
 
The content that gets posted from jeeves to the twitter async lib seemed fine though, so I wanted to see if the issue was stilll there
 
Wes
12:38 PM
i didn't, i just learned by using them
 
unittests?
\o/
kk
@DaveRandom did a lot of fixes last days
 
Wes
@samayo that's how programming should be tho. you are not wrong
 
Looks like the way to get him off his ass is not a carrot in front of him but a shirt
 
Wes
i like using stuff and figure out how it works by myself... i don't like reading documentation....
for example reading a class synopsis should be enough to understand what the class does
 
Anonymous
'carrot in front' ?: 'carrot in behind';
 
12:42 PM
Hello
 
Wes
\o
 
someone know if is posible to submit in the same button
two forms multiple html?
that in php
 
@ToukaXKaneki gdb trace? Also, better ping @bwoebi.
 
12:56 PM
well, how do I gdb trace :P
 
@ToukaXKaneki gdb /path/to/php, type r vendor/bin/aerys -d -c ..., type bt once it crashes.
 
@kelunik Do you have an example client handler somewhere for ampv2 socket handling read from multiple clients by any chance?
 
............
 
@PeeHaa Why multiple clients?
 
1:06 PM
@kelunik I have a server. To which multiple clients can connect
I think it v1 I got clients in the on start handler, but I get serversockets now?
 
Not entirely awake yet. So if I say something stupid tell me :)
 
^ is that what you're looking for?
 
Sec. Let me make a coffee and check it <3
ah right yes
Got confused by the label ServerSocket <3
Does that clean up autoamatically on socket close?
ah you get null for closed streams \o/
 
@PeeHaa, you know how to do that?
 
Wes
1:20 PM
@ChristopheCosta please don't ping people randomly. it's not possible to have a form submitting to multiple pages
unless you use javascript and xmlhttprequest
 
or fetch
 
Wes
alternatively you could have page 1 submitting to page 2 and page 2 submitting to page 3
like with a http redirect or something
 
i was thinking to do in that way
Thanks
@Wes
 
Wes
yw
 
@PeeHaa Yes, that's just because ServerSocket needs to do something different for TLS than ClientSocket.
 
1:31 PM
@kelunik Yeah makes sense. Got confused
 
Wes
1:44 PM
@PeeHaa are you feeling helpful today? :B ftr, i don't need you to code anything... i mostly need api design tips for now
 
Anonymous
mornin
 
Wes
@Gordon what the hell is that
 
@Wes a guy that never heard RATM before
 
Wes
lol
 
1:47 PM
wth is even RATM?
 
user1928251
i need some helpp please
 
user1928251
!
 
@Wes I am writing a code now. If I manage to be ok with the code I wrote I will start writing tests with your thing
 
@ToukaXKaneki dude! you have to stop with the tentacle porn. you are missing out on essential things.
 
Wes
@ToukaXKaneki dude.
 
1:50 PM
is it this?
 
Wes
@PeeHaa will find it very hard at the moment :B doing another massive refactor
 
Rage Against the Machine is the debut studio album by American rap metal band Rage Against the Machine. The album was released on November 3, 1992. It went to #1 on the Billboard Heatseekers chart, and #45 on the Billboard 200 chart. "Know Your Enemy" features Tool vocalist Maynard James Keenan on "additional vocals", and also features Jane's Addiction drummer Stephen Perkins on trashcan percussion. Keenan has been known on occasion to appear onstage with the band to perform the song. The album cover features the self-immolation of Thích Quảng Đức that occurred on June 11, 1963. == Artwork and... ==
 
@Gordon ha :D that reaction to killing in the name
 
1:51 PM
@ToukaXKaneki get that album
 
meh, metal :/
 
Wes
... it's not metal. it's crossover.
hip hop + punk-metal-ish
 
mm, listening to the song you linked above, rn
 
that thing is a milestone of music history
 
Wes
youtube.com/watch?v=wauzrPn0cfg this was in matrix... the movie you haven't seen
 
1:52 PM
@Wes That's ok. I need to get a feel for it to be able to be useful to you. And I can and will always bug you
 
@Wes I've seen Matrix ;-P
 
Wes
also one of the most recognizable guitar riffs ever existed
 
No you have seen the animatrix
 
Wes
ahah
tom morello ma man
 
tom morello <3
 
1:57 PM
lol, just saw rage against the brexit machine is a thing
 
@PeeHaa Did you have a single look into the docs? :P
 
@kelunik I did
 
Wes
@ToukaXKaneki isn't this like the best riff ever youtu.be/4smim2MNvF8?t=37
@Gordon do you know any music like ratm?
not nu-metal shit
 
!!? riff
 
Search for "riff -site:w3schools.com" (https://www.google.com/search?q=riff+-site%3Aw3schools.com&lr=lang_en)
• Riff | Definition of Riff by Merriam-Webster - Define riff: an ostinato phrase (as in jazz) typically supporting a solo improvisation; also : a pi… (https://www.merriam-webster.com/dictionary/riff)
• riff | Definition of riff in English by Oxford Di… - Definition of riff - a short repeated phrase in popular music and jazz, typically used as an introd… (https://en.oxforddictionaries.com/definition/riff)
 
2:08 PM
:B
 
sorry, I'm ignorant :P
 
Wes
:B
 
well, yes, that does sound nice
 
Wes
so funky, so hip hop, so metal
 
@kelunik ok I think I missed the see next link at the bottom
:-)
 
2:16 PM
@PeeHaa I mean before you asked? And I mean the amphp/socket docs: amphp.org/socket/server
 
yes as said I did.
 
But which next link then?
 
From the other docs
The getting started one
 
If you want you can PR a remark for the ServerSocket, so other people aren't confused as well.
 
Yeah trying to see whether I am confused by my old code or just confusing
I hadn't touched this code for 6+ months
 
2:25 PM
@Wes I shall recommend this to you
 
Wes
not really into genres that have no people screaming at stuff and that lack electric guitars and headbanging
 
Wes
but depends... i liked florence and the machine for a while, cranberries, cardigans.... i am sure there are others but these are the only i remember at the moment :B
i liked garbage too... i mean the band :B
 
ahahahaha
 
2:52 PM
@Wes hmm. Not really. They are quite unique due to Tom's guitar play. I mean, there are lots of rap rock bands but they don't sound like RATM
 
> quite unique
twitches
 
@Danack Some things are only a little unique
 
@ToukaXKaneki pthreads … i gues there's some parallel worker thing going on … let me ping @Trowski
 
well... yeah, it started happening after I installed pthreads. yeah.
 
@ToukaXKaneki Latest version on PHP 7.2?
 
$ php -v
PHP 7.3.0-dev (cli) (built: Oct 14 2017 16:39:56) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2017 Zend Technologies
 
@ToukaXKaneki don't think that's stable yet with pthreads, but @JoeWatkins will know.
 
Wes
($this->variable ?? variable())->set($object);
i like php 7 tho.
was that possible with php 5? with ? : maybe
 
@bwoebi oh... that might be the case ... if it doesn't work, I'd probably switch back to 7.2
 
Wes
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/R7F2n on line 8
i remembered correctly, deref wasn't possible
 
3:08 PM
@bwoebi Yeah, I'd like to know if it works on 7.2. @ToukaXKaneki
 
well, it might take a while tho :P I'd finish my home work and get to it next :B
 
@Gordon This. So much this.
@ToukaXKaneki Damn youngin with your schoolin'. You need to focus on what's really important.
 
3:24 PM
@Trowski he doesn't know his enemy, and is therefore unaware that it's the people who taught him to fight him
 
hay everyone
i want asked something about saving data from dynamic form in codeigniter, my problem i already success save data into database, but before data saved, there's an error like this
`localhost says :

A PHP Error was encountered

Severity: Warning
Message : Incalid argument supplied for foreach()`
here my controller :

public function save_item()
{
$assignments = $this->input->post('assignments');
$hours = $this->input->post('hours');

$this->load->model('create_model');

foreach($assignments as $key => $n){
$this->create_model->create_projects($n, $hours[$key]);
}
}
 
@salathe I am getting phpstorm notices about the php license. Could you ping the right people to ask for a new year? <3
 
is there anyone help me? hehe
thanks
 
3:39 PM
@karisma $assignments is not an array in this scenario, according to your error
If it's some sort of multi field thing, possibly because you've selected none, or your field is setup incorrectly in your form
Either way you should check for it being an array before looping through it, as it is user input
 
Wes
@PeeHaa for the fluent api:
get($object, "property")->assigning(same(asThis(555)))->isFulfilledBy($interactions)
get($object, "property")->assigning(same(asVariable($expect)))->isFulfilledBy($interactions)
basically the predicate functions take a "variable container" that can be either dynamically defined (asVariable) or fixed (asThis)
any idea about improving the naming? :B
 
@karisma step 1: delete codeigniter
 
@Wes Your stack traces are going to be fun
 
as for reason of you error, well, read the error message slowly
 
Wes
@MadaraUchiha it just collects data... there will be no stack traces there
also i know... i am going to write a parser for a custom language...
that's as much fluent as possible, and it sux
 
3:47 PM
Evening r11
 
Evenings linus
 
●/
 
sup, hows life?
 
not pretty good,one month vacation and then will hunt for new job.
:)
 
oh, well.. hope you find something good then
 
3:56 PM
Thanks,will try harder this time.
 
Not so great job atm my dude?
 
00:00 - 16:0016:00 - 23:00

« first day (2563 days earlier)      last day (2376 days later) »