« first day (2388 days earlier)      last day (2543 days later) » 
00:00 - 17:0017:00 - 00:00

12:01 AM
so... I decided to put some rosemary in my pizza dough tonight.
I believe that is the single best decision of my life.
 
Wes
@FélixGagnon-Grenier old
 
... classics never die
but tbh, I would sell that pizza 30 bucks and feel no shame. bacon, leeks, old cheddar and cream really gets it done
 
Wes
try with olives next time, or oregano s-media-cache-ak0.pinimg.com/736x/93/21/45/…
also try two layers with tiny bacon slices in between, and on top regular pizza
or even two layers with fried onions in between :B
 
@Wes meh oregano. it's ok-ish, at best. but yeah, never tried with olives
 
Wes
organo is in the actual original pizza recipe
 
12:09 AM
@Wes you mean two layers of dough??! :)
 
Wes
yes two layers
 
you conservative italian
 
Wes
i mean, it's not strange oregano in pizza :B
 
of course not :)
how does the center oven cook?
(see what I did there?)
@Wes that looks like bread
 
Wes
that's a pizza with onion in between, but you can add toppings too
perhaps not tomato as it must suck with onions :B
 
12:12 AM
I believe I don't know what a pizza is.....
that looks like dough to me. is that what pizza means?
 
Wes
?
 
If I ever made a pizza, it'd probably end up looking like that.
 
sorry if I sound dumb, I just want to have a real italian's opinion :)
 
Wes
 
@Wes we call those calzones
 
Wes
12:14 AM
yes, but if it's round we call it pizza
 
Wes
pizza means cake, pie
 
@littlepootis try it :)
 
Wes
in the past "pizza" referred also to sweet stuff
 
are calzones sweet?
 
Wes
12:15 AM
no :B
calzone = ham, mozzarella, tomato wrapped in a pizza... and fried. pretty much
 
listen to the world's most tired trumpet player that still deliver the fuck what you need. also that voice. youtube.com/watch?v=yBdTVmSVq14
 
Calzones could be sweet
 
Wes
yes, also pizza, we have pizza with ice cream on top. not joking :B
 
Because I remember eating one, and it was sweet.
 
12:18 AM
@Wes if I had not already ate wayy too much, I'd do one of those right now
 
The word "calzone" comes from the Italian word for "trouser leg"
 
There'a an italian restaurant nearby, I should try one sometime.
 
Wes
by the way, today i do 4 months vegetarian
 
Wes
i've become everything i hate
 
12:19 AM
I remember you picking on me evrytime I've talked about veganism :D (oh maybe that was @tereško)
must be hard
 
Wes
yeah. i wanted to eat better, not avoiding meat on purpose
 
eat better meat?
 
Wes
ended up eating just vegs
i do eat eggs though, and legumes. these are my proteins. and mushrooms
 
mushrooms == proteins?? maybe in avernum
omg nostalgia. avernum.
 
Wes
mushrooms contain a lot of protein
 
12:22 AM
@JennaSloan still trying to figure out what "trouser leg" is supposed to mean, tbh :)
 
Mushrooms aren't plants though
 
Wes
what th ehell is going on with "18 seconds later..."
 
ain't seeing that
 
Wes
 
@JennaSloan spores don't count as plants? what are they, like, viruses?
@Wes hoy shit, that is amazing
I bet you broke SO with all the fucked up shits you must be asknig of ur browser :D
 
Wes
12:23 AM
refreshed and now seems gone
 
I blame user scripts
 
@FélixGagnon-Grenier a mushroom is a fungus, not a plant. As for spores, they aren't really a life form
 
... I... beg to differ. if they're not alive, how come they make mushrooms (which are, by all means, alive)?
 
Viruses aren't alive either
 
Wes
also plants are alive. they aren't very smart, though
@FélixGagnon-Grenier calzone means trousers
 
12:31 AM
@JennaSloan which definition of "alive" are you speaking of here? the biological, reproduce, eat, move one? or day-to-day, casual one?
 
@FélixGagnon-Grenier biological?
 
Wes
if i were an actual vegetarian my justification would be "i don't eat anything that is potentially cute"
 
viruses are considered to not be alive because they don't have all the characteristics of other life forms
they're like "half-alive", because they do have some of them (namely, "reproduce" and "adapt")
@Wes I'm going on a very wrong mental slide here
 
Wes
"alive" is very subjective
 
12:35 AM
it's actually really not, at least in scientific, biological terms
in casual philosophical conversation though, sure
what's the meaning of being alive, what is being alive
but what is a life form, why viruses are not alive, this is really established
 
Wes
anyway that would be my justification. in fact i've never eaten and i am disgusted by those who eat, like, animals that are just few days old. like lamb
that is so unnecessary
 
indeed
we have no "need" to eat these
 
Wes
yeah. it's just stupid and a waste under any point of view
 
maybe not stupid, but a waste, absolutely
 
Wes
it is stupid because you literally buy bones. there is almost nothing to eat. and meat is not even particularly good
 
12:43 AM
@Wes wat
meat is like, fucking good. that is why it's fucking hard to stop eating it.
no?
 
Wes
it's not much different from grown up animals one
 
continues to eat chicken
 
@Wes oh I think we diverged. You're speaking about lamb still right?
 
Wes
unless the grown up animal raised, like, in the wild. that makes a difference
yes, or calf
 
I see, sry. I thought you were going about all meat, and was kinda surprised :)
 
12:48 AM
@Wes like veal?
 
Wes
yes that.
i'm using translate :B never used these terms before
@FélixGagnon-Grenier this is a calzone (forgot to link you :B)
 
ahhahahaha
 
Wes
just think in 200 years when they'll look at hipsters pictures. they'll have the same reaction :D
 
1:12 AM
@Wes actually, the funniest part is I have worn "pants" like those a few years
 
Wes
ahahahaha
with the shoes with the metal thing on it?
 
Wes
you mean for the music thing, right? :D
 
nah, for those I wear full tuxedos
:D
also :
y'all have been warned
I might react strangely, from time to time
 
Wes
1:57 AM
whats that
you are so canadian :B
 
don't all sports have those? playoffs after the season, where the best teams have to beat each other four times in a row to advance to the next rounsd, until there is only one left?
*not in a row, best 4 out of 7
 
Wes
i have no idea, but not football (aka soccer) :B
well, kinda. we call playoffs giving the B league teams the chance to join the major league
and playouts are played by those teams that are risking to leave the major league
like the four latest teams go back to B league, but if like fifth to last has the same points of the fourth to last they'll play the playout
who wins gets to stay in the major league
:B
 
hmmmm
yeah, that is different :)
 
Wes
dunno about other sports. i only follow formula 1 and barely soccer
 
2:22 AM
Hey guys ! I really want your help with my links now i have this link
http://127.0.0.1/arabsin/movie/A_Dog's_Purpose_2017/
but i need to make it like that
http://127.0.0.1/arabsin/movie/A_Dog_s_Purpose_2017/
How can i do that ??
Please any body help i've never slept for 10 hours
// Function to replace every space in the movie or the
// show name by [_]

function dashDress($name) {
return str_replace(' ', '_', $name);
}

function dashStrip($name) {
return str_replace('_', ' ', $name);
}
echo dashDress($movie['Name'])
that's my code
Any simple clue Would be appreciated
For example this link : Jack_Reacher:_Never_Go_Back_2016
is totally fine but i don't want characters like [:] in the link
I want all weird characters to be underscored
 
2:39 AM
is a link like that : The_Hunger_Games:_Mockingjay_–_Part_1_2014
has any security issues
?
 
3:03 AM
if i'm trying to remove a line in a text file specified by user, is array_splice or unset() best?
 
 
2 hours later…
4:39 AM
Should we use varbinary or varchar types to store Bcrypt passwords?
 
4:55 AM
Mornings o/
 
@Saitama Morning \o
 
@CoderDudeTwodee char
 
@littlepootis PHP's password_hash's default value can change from Bcrypt to something else. Can be troublesome later on.
 
5:34 AM
morning
 
$data = file("comments.txt"); // reads an array of lines
    foreach($data as $comment){
        if(strpos($comment, $name) !== false){
            header("Location: notadded.php");
            break;
        }
    }
im trying to prevent someone from entering a duplicate entry in a file
but this doesn't seem to work
how come?
 
You are breaking the first time the name doesn't appear in a line...
 
oh yeah..is the break unnecessary because if the condition is true then it will redirect?
gotcha, that works. thx
 
nevermind I was reading it backwards...
 
well it works now that I got rid of the break statement
 
5:48 AM
Might make more sense to use array_search
 
ah
 
Also life is a lot easier if you pass FILE_IGNORE_NEW_LINES as the second argument to the file command.
 
how come?
yeah it didnt work, kept offsetting my file array
 
Because in your $data array where you are expecting "John" what you are actually getting is "John\n"
 
I am?
:O
 
5:57 AM
Yep... the newline is include in each array element
 
hmmm
 
@Hello still having issues?
 
yeah
 
$data = file("filename.txt". FILE_IGNORE_NEW_LINES);
if (array_search($name, $data) !== false) {
    header("Location: notfound.php");
    exit();
}
// whatever you do when the name doesn't exist
something like ^ should work...
 
6:14 AM
ah, well it works if I enter a duplicate name, but when I enter a name that isnt in the file, it still sends me to the notfound page
yeah, no matter what I enter it goes to the notadded.php page
oh there was a period in that parameter @Orangepill
 
6:30 AM
gotcha... file contains more info than just the name
 
sorry for not mentioning that
 
seems odd that it would go to the notadded.php ... should actually never go there ... have you confirmed that $name has what you expect in it?
 
@Trowski Just pushed what I have regarding byte-stream.
 
yup it does, I just echo'd it out after pressing submit and it works
 
That's confusing because given the inputs the array search should not ever evaluate to anything but false. The only scenario I can think of that would cause it to return anything but false would be if there was an blank line in the text file and $name was an empty string
 
6:43 AM
yeah it is annoying, your code makes sense to me :o
 
It won't work though unless the name variable contains the entire line
 
Ohhhh
so, could i use the strpos() function instead?
or is there something better
 
@kelunik I'm not seeing IteratorStream.
 
strpos may give you false positives for name matches... like John John will match John Johnson
 
@Trowski Because I'm not sure on that yet, could just be Amp\ByteStream\fromIterator
 
6:50 AM
better to match the whole string... and you probably want it to be case insensitive as well
 
yeah but i think for the purposes of this project it will suffice
ah
stripos
 
$fp = fopen("filename.txt", "r");
while ($row  = fgetcsv($fp)){
    if (strtolower($name) == strtolower($row[0])){
        header("Location: notfound.php");
        exit();
    }
}
fclose($fp);
might be closer to what you are looking for
 
@kelunik I'll have to look at how we use that in Aerys. Without it we'd probably have to do quite a bit of refactoring there.
It's late, I'll take a closer look at it in the morning.
 
the fgetcsv will get the line as an array based on it being a comma separated value list... then you test the first element against you string
 
@Trowski We don't have drain anymore, so we can just use a function for complete buffering.
 
6:53 AM
ohh I see, and the while condition loops through each index of the array?
yep, that works
 
@Trowski Good night then. o/
 
The while loop will read each line of the file in turn ... assigning the line to the $row variable as an array of values based on being separated by commas.
 
@kelunik Yep. Aerys used the promise (which resolved eventually regardless of how it was consumed) for triggering some events that will probably just need to be changed in how the event is triggered (i.e., calling something at the place where the Iterator is completed, rather than using the promise created from that Iterator).
 
that is really cool @Orangepill, thanks for the help
 
@kelunik Yeah, I should head to bed. Night.
 
6:57 AM
@Trowski When ~ are you here again?
 
@kelunik Around 15:00 GMT
 
@Orangepill if i'm trying to remove a line in a text file specified by user, is array_splice() or unset() and array_values() best?
 
7:34 AM
mornin
 
\o
 
8:08 AM
howdy
 
8:28 AM
morninings
 
@RonniSkansing o/
 
how do you remove a line in a text file based on specifying the index? unset() and array_values() ?
 
8:42 AM
if (isset($_POST['submit'])) {

    if(isset($_POST['delete'])){
        $index  = $_POST['delete'];
        $data = file("comments.txt");
        unset($data[$index]);
        $data = array_values($data);
    }
}
it doesn't seem to work for me
 
yea, you should var_dump($variable); die; and find out what is wrong
 
i echod out the $index and it picks it up
okay i tried var dump
string(1) "1"
if I entered 1 in the input
ohh, this has to do with the fact that my input field type is "text" I think
 
9:04 AM
@FélixGagnon-Grenier that could be the case
I think vegans are insane
 
@DaveRandom How far did you come yesterday?
 
@Wes wrong time config
or you changed your system time after loading this page
 
9:54 AM
ini setting for error_reporting not initialized by default – #74515
 
10:25 AM
Why the fuck does phpstorm now show \n in diffs
 
10:49 AM
o/ all
 
11:22 AM
morning
 
morning
 
11:48 AM
morning
 
morning
 
12:20 PM
how to remove "" from my array?
 
@CinSbSangpi E_TOO_VAGUE
 
I have a json value, when I echo it display only value 60, but when I put in array (value) it return "60".
 
because your 60 is not a number, but a string
 
so how can i achieve only the number?
can u help me out?
 
what the fuck are you talking about?
where does that value come from?
 
12:26 PM
i tried str_replace('"', "", $string); doesnt worl
work
 
please, find a book for PHP beginners and read the section about data types
 
$sw1=$obj[1]['bits-per-second-rx'];
$x=10;
$sw1 is the value, I want to put in array with another number.
eg. array($x,$sw1); but returning [10,"60"]
 
I guess you also need to find a book for Javascript beginners and read the section about data type in it too
</communication>
 
thx
this solved my problems -
echo str_replace('"', '', json_encode($sw1));
 
12:42 PM
 
1:12 PM
open.segment.com/fellowship - "The Fellowship is a three month long program supporting three to five open source developers with $8k per month to focus full-time on their project, no other strings attached."
 
> uBlock Origin has prevented the following page from loading:
 
A controller calls the User object which has a register function that stores data to the database. I have to store the hashed password in the database. Should I hash the password in the controller or the register function?
 
register function
The controller doesn't do much business logic
 
@PeeHaa Alrighty, thanks!
@PeeHaa Exactly what I needed.
Where should the form validation go then, btw?
In the register function or the controller? I have a separate validation class.
 
If just do a if (!$form->isValid()) return $this->renderForm(); as the first thing in the controller method
 
1:22 PM
@PeeHaa Wow, made life so easier. xD I complicate things so much.
 
@CoderDudeTwodee it should be in a separate service, that is responsible for user management
 
@tereško The register function is inside a user class which is responsible for user management. Does that mean I should put it in there?
 
@CoderDudeTwodee should a pack of chips be responsible for placing packs of chips in a shop?
 
@tereško Guess not xD. Sorry if I am asking too many stupid questions, but I am trying to improve. I used to write a lot of crappy code and still do. Just trying to do it the right way now.
 
@CoderDudeTwodee It's fine
 
1:37 PM
:D
 
:P
 
@PeeHaa I think you didn't forgot about this page: minifine.pieterhordijk.com/minify-js-and-css-production.php
:P
 
meh
that should be done by frontend build tools, like gulp or webpack
otherwise you end up with rapidly aging frontend codebase
 
@CoderDudeTwodee ?
@tereško Why?
That's a really weird conclusion :P
 
it's not a conclusion but an observation
 
1:46 PM
That's a really weird observation
 
@PeeHaa JS has more mature tools to deal with JS and CSS manipulation
 
how is it weird?
 
Namely, mature and powerful AST generators and manipulators, with plugin support, etc.
 
@MadaraUchiha Which is all fun and games, but I dislike webpack and I simply don't need it
@CoderDudeTwodee tnx
 
1:47 PM
@PeeHaa I didn't say webpack, although it will likely get you the best outcome
You can use a simple gulp + uglify
about 5 lines and 2 npm packages.
 
@PeeHaa No problem!
 
Sorry thought somebody said webpack somewhere
 
Hell, you can use just uglify with an npm script.
 
Anyway. I simply don't need it
I don't need npm to build my stuff
 
1:48 PM
@PeeHaa What about babel?
 
then how do you keep you code from rapidly aging?
 
@MadaraUchiha Don't use it
@tereško I have no idea what you mean tbh
 
@PeeHaa So, you basically have a jQuery app, no modules, no extra stuff
 
@PeeHaa how do you make sure, that the project, after your team has worked continuously on it for many years, does not require jquery 1.2.2?
 
@MadaraUchiha sans jquery. And native modules
 
1:49 PM
If that's the case, you really don't need the extras, but then again, you limit yourself to not having said extras.
@PeeHaa IIFEs aren't exactly native modules, but OK
How do you add dependencies?
moment, lodash, etc?
 
I don't have many dependencies
Please read back up. I don't need it
:P
 
@PeeHaa do you need composer?
 
I don't see how this relates, but yeah composer is useful for what I do
 
because you sound like one of my coworkers, who is against use of composer, because "he dos not need it"
 
ok
 
1:52 PM
@PeeHaa npm is pretty much exactly composer, only for JS (both front and back)
 
@PeeHaa because one of major benefits in using it is - keeping your dependencies up to date
 
Who knows better what I need in my projects
You
or me?
 
And again. I DON'T NEED IT
Fucking read...
 
@PeeHaa You don't "need" anything
 
1:53 PM
I have max 100 lines of JS
 
You can build everything yourself, hell, you don't even need JS, you can totally build a PHP to JS compiler in PHP, and write PHP in the frontend
 
Think about how stupid that would be
 
then you dont need minifying either
 
I don't
But it's nice
Simply combine + minify
Nothing is lost
 
1:54 PM
for 100 lines?
 
yes
Nothing is lost
 
who said anything about loosing something
 
I have no idea wtf you are both on about tbh
:P
 
12 mins ago, by CoderDude Twodee
@PeeHaa I think you didn't forgot about this page: https://minifine.pieterhordijk.com/minify-js-and-css-production.php
 
Sounds like bitching for bitching
@tereško yes that's about a typo
 
1:55 PM
and we were talking about how pointless of a tool it is
 
It is not
I use it. It works for me
That's the opposite of pointless
 
i use it too once ..
 
I was responsible of rooting it something similar out in one project
it was a fucking nightmare
 
 
2 hours later…
3:36 PM
Morning.
 
mornin Trowski
 
@Trowski o/
How's amp going? :)
Or rather v2 all the packages
 
@PeeHaa I am confused about throwing exceptions, could you give me an example use-case in a regular registration process where I should throw exceptions?
 
@CoderDudeTwodee I don't think there are many use cases for throwing exceptions in that flow.
E.g. if the database is offline
 
@PeeHaa Or if an insert query fails for some reason?
 
3:42 PM
@PeeHaa I think we've finally settled on an interface that makes sense for async sets, so I think we're just about ready to tag v2. We need to look at the streams package yet, but once that's settled we can update the other v2 packages, which probably won't change too drastically after that.
 
depends on how you organize code
I throw exceptions on "failure" (either be it establishing connection or matching password, or creating a duplicate account)
 
@CoderDudeTwodee Depends. The nice way would be to only let the insert fail on an actual exceptional case instead of e.g. dupe user
@Trowski Nice <3
What came out of the benchmark that guy did btw @Trowski?
 
@PeeHaa He showed it was ~23% slower than node when run with a single worker.
 
What about the difference between amp and react
 
@tereško Why is it better than something like if (!match($password)) { echo "Passwords don't match";}?
@PeeHaa Something like losing database connection all of a sudden while trying to insert a field?
 
3:52 PM
@PeeHaa React doesn't support keep-alive, but if he turned that off in Aerys then React was actually slightly faster… but that's a really apples-to-oranges comparison, because React doesn't provide for middlewares or do much processing of the request at all.
 
@CoderDudeTwodee Yes that would be an example
@Trowski kk
 
@Trowski excuses :P
 
@NikiC I should take the time to do some benchmarking myself to see what's really going on.
 
Yeah, never trust a benchmark you didn't fake yourself
 
0
Q: RabbitMQ - Discard message if it is taking too long to process

Kamran AhmedIs there any way to set RabbitMQ to discard the message if it is taking too long to process? For example, if I have an email queue and the consumer script is taking too long to send the email, make it discard the message (put it in the dead letter exchange) and pick the next item in queue. I ...

 
4:08 PM
@NikiC hehe, I'll just toss a few React promise resolutions into my "Hello, world" response, that should slow it down nicely. :-D
 
lol
 
4:34 PM
@KamranAhmed Googling the exact title of your question, gives your question as the first link and then rabbitmq.com/ttl.html as the second.
 
@tereško This is probably the least reliable channel to get ahold of me through :P
 
:D
 
it sounds like you've got two separate concerns (is the email address valid vs password reset)
 
well, yes
 
in Airship's case: if the email address isn't given, it's the same as opting out of password reset
if you're trying to cater to the "Tor Hidden Service" crowd, that's the best answer
unverified is morally equivalent to not provided here
 
4:42 PM
so, you conclusion is that the user, which has not verified an email address, should not be allowed to use it for password recovery
 
Isn't PHP related... but why does this not display the image even though if you visit the link in your browser, it works? jsfiddle.net/2ph8b01e
 
@TheCodesee Because it's not returning an image:
<div id="AssetThumbnail" class="thumbnail-holder" data-reset-enabled-every-page data-3d-thumbs-enabled data-url="/thumbnail/asset?assetId=169454280&amp;thumbnailFormatId=254&amp;width=420&amp;height=420" style="width:420px; height:420px;">
    <span class="thumbnail-span" data-3d-url="/asset-thumbnail-3d/json?assetId=169454280"  data-js-files='https://js.rbxcdn.com/8f40869a77ab2bdc33f941eadeb6b9c4.js.gzip' ><img  class='' src='https://t0.rbxcdn.com/5d4449ed656bd92c4d51805ff8b72610' /></span>
    <span class="enable-three-dee btn-control btn-control-small"></span>
 
ah i see so i need to get the image link from that page thanks
 
what you need to do is not steal traffic
 
huh?
how am i stealing traffic?
 
4:59 PM
hmm ... how should I test this method: github.com/teresko/palladium/blob/master/src/Palladium/… ?
 
00:00 - 17:0017:00 - 00:00

« first day (2388 days earlier)      last day (2543 days later) »