« first day (2743 days earlier)      last day (2204 days later) » 

Wes
12:00 PM
would that work with any expression?
 
@Wes put parens just like ||, && and ^ were non-assoc
 
Wes
was not referring to conditions only
 
I think $foo !== false && ($bar = $a || $b) for example is best
The main task is to allow the reader intuitive parsing without cluttering the parens around
@Wes Or what exactly did you mean?
 
i.e. use as few characters as possible, but without requiring the reader to remember associativity and precedence rules
 
yeah that
 
12:06 PM
I hear someone, somewhere cry "visual debt".
 
@Wes How about not going crazy with yur conditions instead and make it readable with a workout
 
vwls r vsl dbt
 
Wes
okay, maybe i am overthinking about it
 
what, you? never.
 
:P
 
Anonymous
12:13 PM
you are a massive bellend, to be fair @Wes
3
 
Wes
i barely have a brain
thanks for the star :B
 
Have another one <3
 
@JayIsTooCommon and @DaveRandom ah the PHP Developer love to other humans.
 
Anonymous
I only have love for dogs and @PeeHaa's mum.
 
Wes
are you saying i am a dog
i'm a panda.
 
12:18 PM
Hi guys, just a quick question.
Is there a way in twig to do a foreach on a collection but display it too if it is a single element ?
{% for subCategory in subCategories %}
    {{ subCategory.name }}
{% endfor %}
 
what do you mean by "display it too if it is a single element"?
 
Anonymous
sounds like a code smell
 
if the collection only has one member, it will only display one member
 
@Wes yeah, if in doubt or your if-chains exploding, split it up and make assignments to individual variables (well-named obviously) with the subconditions
 
Anonymous
@Wes i.stack.imgur.com/TTj8u.png @Wes Interestingly currently using your old pic for test data :)
 
Anonymous
12:23 PM
it's the only pic that stood out while choosing
 
oh god...
@JayIsTooCommon and it's even activated....
There is no way you don't have love for him...
 
Anonymous
All 44 pounds worth
 
I don't even wanna know what you're gonna do with it...
 
Sry
well I've tested it and it does not work
 
Anonymous
Why would you pass a single class to the template if it's expecting a collection?
 
12:27 PM
Cause the colleciton could be of a singel entity
It depends
 
Anonymous
then it'll still be a collection
 
I do agree
I think I've done something wrong
 
Anonymous
Sounds like it, use a pasting service to paste your code and someone should be able to help
 
Is this suppose to display twice name?
    {{ subCategories.name }}
    {% for subCategory in subCategories %}
        {{ subCategory.name }}
    {% endfor %}
It should be {{subCategories[0].name}}
 
Anonymous
Unless you share the code creating SubCategories, no idea.
 
12:30 PM
Well I tough subCategories was a Collection but its not
This is where I got it all wrong
 
as Jay hinted above, your template shouldn't really have to worry about that. Just make sure that you pass an array to your template. Be it one element or more
 
or even none...
 
also true
 
But in case of no categories returned I would add atleast one element with the name "No categrories found" just for the display.
 
Anonymous
ew
 
12:32 PM
What @JayIsTooCommon
 
Anonymous
just check for empty - sticking a member in to indicate that it's empty is silly
 
If it's twig you can use twig.symfony.com/doc/2.x/tags/for.html#the-else-clause to do that properly :P
 
Anonymous
@pmmaga til
 
I rather have the display tell me it's empty then getting the software users on my ass calling out the software is broken because it doesn't display any categories.
 
Anonymous
> just check for empty
 
12:34 PM
Using the template as is there...
 
yeah, and somewhere else on the template you may have something like "Found 1 element -> No elements found"
 
Anonymous
ye, I wasn't saying don't display a message. I was saying don't do that through a false member.
 
I personally would create an empty check but on the template given above, I would create a false member.
 
Anonymous
smelly.
 
Ye that's the problem if you don't create an empty check :-)
 
Anonymous
12:36 PM
 
validation is key.
 
Anonymous
Ok, now assuming you're just a troll.
 
@JayIsTooCommon lol no?
 
using a template engine with PHP, is a very counter intuitive thing to do.
 
Anonymous
It's not
 
Anonymous
12:38 PM
helps enforce 'logicless' templates in teams
 
@pmmaga Didn't know that was an ability lols. (the else in a twig for loop)
 
PHP itself can be integrated into html quite easily, and it can be logicless just as any template engine.
 
Anonymous
> php can be integrated into html
 
Anonymous
wat ?
 
You know what I mean
 
Anonymous
12:40 PM
Oh ok, sure. We'll leave it there.
 
"HTML can be integrated into PHP", better now?
 
Does anyone have any experience with chat applications?
 
@RachelDockter I have experience with using them, does that count?
 
erm, do u know the logic behind how they work? :P
 
@RachelDockter Ask your question instead of doing a fishing expedition
You will get much better results that way
 
12:51 PM
ok so i was thinking logicially each message would go through the server and then be stored as chat history on the client. But then how do report buttons work, does it send the messages back from the client to server? u cant trust that
 
You report based on message id
 
so messages would get saved server side for refrence?
 
Of course
How will new connecting clients get their initial messages otherwise
 
well when u sign up ur in the user table with a user id of 12 lets say. I send a message to user id 12, goes through the server and saved client side to the user to view
thats how i was thinking to do it
 
Yes, but you should also store all those messages in the DB for reference purposes.
 
12:54 PM
And that's related to messages how?
 
thats how to send a message i thought, and ok i thought that was violating some privacy thing if i stored them
also being cheap wanting to take up as little space as possible
 
@PeeHaa from other clients, because it's end-to-end encrypted :)
 
@Leigh wat..
 
@RachelDockter The actual contents of the chat can be end-to-end encrypted. ^
 
You still store on on the server
Regardless of encryption
 
12:56 PM
I wouldn't
 
Sure you would if you want any form of persistence
 
@Leigh Then what will happen if the user logins from another device?
 
ah ok, ill use the md5 encryption
 
lol
 
joke joke
 
12:57 PM
@RachelDockter that is a hash
 
@RachelDockter ;P
 
:P
@RachelDockter BTW, you can use AES-256
 
Use signal and be done with it :)
 
is this some sort of hash
 
^ that inb4
 
12:59 PM
this all sounds like a lot of work. Can't we just use two yoghurt pots and a ball of string?
 
@RachelDockter AES is encryption
 
@mega6382 stop
 
Anonymous
@DaveRandom a ball would be blocking
 
@Leigh HAMMERTIME!
 
encrytpion is not my strong suit whatsoever haha
 
1:00 PM
@tereško Thx a lot for the hint !
 
@Leigh what's wrong with AES-256?
 
@Leigh :P
 
@Tiffany It depends how you use it
 
@RachelDockter If I were you I would just start writing the actual chat logic before looking into encryption
:)
 
ah
 
1:01 PM
@Leigh You have to use the string "AES-256" as IV for it to work right?
 
I'd rather advice like "you can just use X" didn't exist, if it doesn't have the full list of other requirements to go with it
 
:P
 
:P
 
yeah, makes sense
 
1:02 PM
@PeeHaa And ECB mode so you can see pengiuns in static noise
 
all I know is AES-256 is incredibly hard to decrypt, but I know nothing in how to implement it
 
I know Amazon uses AES-256 for S3.
 
It's not even the implementation of the algorithm that's the problem, it's how you use that algorithm
 
I solved my first cryptogram yesterday. 😀 you're probably the only one I can think of that would care about that, Leigh.. lol
 
@Tiffany What did you do?
Something online?
 
1:03 PM
it was a puzzle in a work newsletter
 
ah :) well done
 
some of it was rot-1, other letters varied slightly
but once I had enough of the letters, I could start guessing words
 
just a substitution cipher?
etaoin ftw :)
 
yeah, like y=a, q=k, c=t... then others were like f=e, e=g, r=o
z was d, that one was odd
 
just remember etaoin shrdlu
 
1:08 PM
Hello,
I need some help with docker and kubernetes.I've made a docker image which works on my local environment.While uploading to kubernetes i had some issues which i fixed.The pod in kubernetes is running, also i exposed the url to an external adress but i can't connect.I get an connection refused error.
Is my docker configuration good for it:
?
FROM php:7.2.4-apache

COPY apache_default /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite

COPY src /var/www/html/src
COPY public /var/www/html/public
COPY config /var/www/html/config
ADD composer.json /var/www/html
ADD composer.lock /var/www/html

# Install software
RUN apt-get update && apt-get install -y git

# Install dependencies
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer

RUN cd /var/www/html && composer install --no-dev --no-interaction --optimize-autoloader
 
I googled for suggestions on how to solve cryptograms, one suggestion was to focus on patterns, and another was to focus on solving the two and three letter words first, once that was done, it became gravy. Oh, and there was an apostrophe s... that helped too
 
@DaAmidza please, use pastebin or something.
 
Sorry will do
 
@DaAmidza 99% chance that it's going to be kubernetes / cloud provider config
In your pod config, do you have something like

ports:
- containerPort: 80

To match the exposed port from docker?
 
@Leigh huh... I'm new to kubernetes.I have seen that they have some configuration, but haven't added it.I'l try to solve it.Anyway thanks
 
1:14 PM
You can do this to get the running config and check the exposed ports are correct: kubectl get pod <pod name> -n <namespace> -o yaml
 
What is this part for ' -n <namespace> -o yaml')
?
 
for selecting the namespace....
and the output format...
You using the kubectl proxy admin console?
 
Yes I use it but I'm new to it.
Just a second
 
On the left there's a namespace dropdown... you might have just deployed to "default"
 
I have the container port which is set to 8080
In this config file
 
1:21 PM
Your EXPOSE in your docker file should match the containerPort in kubernetes
I think you can edit the running config directly via the admin, select the pod, click edit in the top right
 
I'm confused.... need to go through it a few times since I fuc*** up somewhere it's obvious.Thanks man
 
Wes
afternoons
 
@DaAmidza Yea it took me ages to get familiar with it, I hated it at first. Keep playing, if you break it you can fix it :)
 
1:41 PM
tfw I fix something complex with git (with the help of a guide) happy dance
 
Just saw PHP/FI code example for the first time.
<?echo "Hi $name, you are $age years old!<p>">
These variable are not declared but are coming directly from the form fields.
 
I am pleased to announce that my request to implement Covariant Return Types and Contravariant Parameter Types as a special project for university credit has been approved!
 
Wes
\o/
 
1:59 PM
morning... had to check in to see if that tweet was legit
 
\o
 
Wes
\o
 
2:30 PM
o/
 
2:55 PM
evenin
 
I think I have been looping this for the second day in a row already:
 
@tereško don't get angry, but I think this sucks
 
Wes
it's like they are missing instruments, right? :B
 
That cat's face hahah
 
@mega6382 I guess it's the matter of differing tastes
 
3:07 PM
Yes, most definitely :B
 
posted on April 20, 2018 by PeeHaa

Fixed web interface on mobile devices.

 
Wes
@mega6382 i love that guy
all the shit that throws at apple
 
:B
 
@PeeHaa Yes, I'm very excited!
 
Wes
thank you levi \o/ that's amazing :D
 
3:21 PM
\o/
 
Wes
3:33 PM
@mega6382 = saitama? i lost track of him
 
NO, why does everyone keep confusing me for him.
I believe he goes by @Ikari now.
 
:?
 
Wes
@JayIsTooCommon ha :B
@mega6382 sorry, it's just that i saw your avatar and i think it's manga stuff and therefore i think it's him
 
@Ikari @Wes is looking for you.
 
Wes
not really no
:B
 
Anonymous
3:37 PM
:B
 
@Wes No its not manga. Its MegaMan, like my name.
 
Anonymous
I also thought you were the anime kid
 
Wes
manga/anime
 
Its a video game
 
Anonymous
@Wes same shit different name
 
Wes
3:39 PM
@mega6382 japanese stuff :B
 
:B
 
@Leigh Tried it with booms. It's really difficult to get in the sweet spot.
Morning. o/
 
Anonymous
\o
 
o/
 
Anonymous
@Allenph Thanks again for the help yesterday (Y) appreciate it.
 
3:41 PM
No problem-o.
Covariant return types. That's dope @LeviMorrison.
 
@JayIsTooCommon Thats like over 4 people, who have confused me for him.
I think I should change my avatar...
 
Your name is literally MegaMan and your name is Mega.
How are people messing that up?
 
hahaha
I meant username
 
dude wat?
know your classics guys, megaman has nothing to do with anime/manga
like... nothing
 
Kids...
 
3:52 PM
Thats what I said
13 mins ago, by mega6382
Its a video game
 
yeah sry, I just had to
 
:P
 
@JoeWatkins I've got a sigserv it's not invoking Psr4Loader::__constructor github.com/brzuchal/autoload/blob/master/class_loader.c
 
INIT_CLASS_ENTRY should b called on temp ce, zend_class_entry ce; at top of block, then create_object and so on should be set on registered ce (return from register function)
intern->std.handlers = &cl_object_handlers;
belongs in create_object
 
3:58 PM
Thanks, I will try that later when I get home.
 
Wes
4:31 PM
@kelunik handling phpdoc is quite complex :B
i'm lost with inheriting documentation from interfaces, traits
 
@Wes Really? :D
 
Wes
i mean, it's not really complex, but i have totally underestimated the work required :B
i have the weekend + next week to get this thing to a decent state
......... i will totally fail at it
 
Morning PHP
 
Wes
yo
 
4:45 PM
@tereško Should this be flagged then? stackoverflow.com/a/49866899/2595450
 
I'm at stage 2 of the debugging process, almost stage 3...
except I'm not complaining about a language, I'm complaining about fucking Xcode
 
Are you making an iOS App?
 
hopefully
it isn't my code, I just have to make it look the college's app and upload it to iTunes
sounds easier than it actually is because Apple and Xcode are extremely, extremely picky about the smallest things... and give me the error message three steps down the line after waiting for the project to recompile, prepare to upload to iTunes Connect, and then attempt to upload to iTunes Connect, slowly wearing me down
 
I don't know the first thing about iOS applications so it doesn't sound easier than it is to me :P
 
I feel like you have to be a glutton for punishment to build an iOS app through Xcode. Granted, I think it will look like a native app by building it in Xcode, but it's like running a gauntlet, over and over and over
there's still one more review process before I can get this app into testing through Testflight, and I have to wait on Apple to email me for their answer
 
5:01 PM
:/ It's an app for your college?
 
yeah
here
 
:| That room keeps reloading
 
evenin
 
\o
 
@Leigh it's just a ton of things that need to be tracked.
 
5:29 PM
I am huge fan of php but seems like ai and ml are more easy in python, given the large number of libraries. penny for your thoughts
 
You are right
 
Wes
/** @var ... */
const FOO = ...;
 
whatever
 
Wes
phpdoc is a mess
 
@RishirajPurohit So, would you use Python instead of PHP to create a website because Python features more libraries for machine learning?
 
5:38 PM
@RishirajPurohit So, what are you trying to say?
 
dat star ;)
 
Has anyone tried that? Might be interesting to try and write a machine learning algorithm in PHP.
 
Rofl. I had to look it up too.
 
3 messages moved to Trash
 
5:44 PM
@Allenph Oh, india bro is right, python is much better suited to do that (and actually, the algorithms themselves are often written in c++ and wrapped in python scripts)
I just don't understand their point.
 
I know. I worked a little bit with it. Reverse engineered a tutorial on a Super Mario playing AI to work with snake a couple years ago.
 
Just wondering if anyone has ever tried it in PHP. Not saying it's a good idea.
@FélixGagnon-Grenier AI algorithms? There's a lot of applications. Text prediction in searches, searches in general, up-selling, etc.
 
oh and it's acceptably recent too!
 
@Allenph I am sure it can be done, and probably there are some people who have tried, for certainly there might be some AI or ML library in closed source projects.
But I will say it will be a better idea to write the library in C++ and create a PHP extension as a wrapper for it.
 
Yeah. Probably. Still interesting though.
 
of course, don't let us break your interest :)
 
:)
 
I'm pretty sure I have never-to-be-finished projects implementing various algorithms, but mostly dijkstra, in all langauges I can think of
 
I have a lot of never-to-be-finished projects, most of them are still in my head. :)
 
6:01 PM
;)
 
@FélixGagnon-Grenier Tried lithophanes yet?
 
hrrrmmm... tried what now?
ohhhhhhhhhh
no, that sounds awesome!
the current project is this thingiverse.com/thing:2494642
 
ok, why the fuck is NTPD merged into systemd now?!
 
oh
NPM being merged into systemd was... some major league fuckery
 
sorry
 
6:11 PM
nah, it was worth the "wtf!?" moment
 
6:26 PM
Someone offered me a front-end position and they called me for some screening questions... I just realized I know nothing very little JavaScript.
 
@FélixGagnon-Grenier First attempt last night. I was pretty amazed that it worked at all.
 
nice :)
currently slicing a first try of a picture, and slicing is very very long...
 
Modular hot-end. Interesting.
Isn't that thing super heavy?
 
The two parts I've printed yet are not soo heavy
I'd say it's comparable to stock hot end
 
It's bowden right?
 
6:29 PM
yes
 
I don't know how to explain myself. I'm primarily a PHP developer, and I am also very good with CSS and HTML which I consider front-end. But my JS experience is minimal.
 
Oh. Then you've got weight to spare.
Sounds like a back-end dev to me @Alesana.
 
@Allenph Yeah probably.
 
@Alesana I am decent with HTML and CSS too. But I always mess up the media queries and frontend developer then have to chase me out of the room. :P
 
@mega6382 See, I am really good with the media queries, and pretty much all of the CSS features
For a position in a previous job, I built a website with HTML and CSS, using veerrryy little JS. There was no backend there but also no JS libraries or anything. I want to put front-end developer on my resume but that won't fly if they think that means I used a lot of JS
 
6:34 PM
BTW, why the hell are you applying for the frontend job anyway?
 
I wasn't applying, they contacted me and I thought "eh why not"
Which resulted in a very awkward phone call
 
Just learn jQuery and you'll be alright. ;)
 
I know jQuery though :P
 
:B
 
6:35 PM
I needed to state when I use promises instead of observables I was like wut
 
@FélixGagnon-Grenier Thats just my default advice to anyone having a frontend problem :P
 
yeah, that's my default reaction when someone mentions jQuery ;)
 
Guys, we're waaaaay behind the front end curve.
I stopped calling myself a front-end dev.
 
I'm changing my resume now from "Fullstack Developer" to "PHP Web Developer"
 
I tried using react a few weeks back, I made that tic tac toe game from their docs. Afterwards I was like "fuck it, I don't have time for this shit".
 
6:40 PM
Apparently with Type Script you can copy our paradigms on the front end with Vanilla.
Sounds like they might even have a DIC.
 
@mega6382 did you use jsx?
@Allenph Angular does. Type Script is syntax
and... it's DICish, but nothing close to auryn
js does not have notion of "interface" in the way we are used to
 
@FélixGagnon-Grenier Yes
That was what the game was suppose to be made using.
 
ok :) that could have explained the trouble. I find react is really enjoyable
 
@FélixGagnon-Grenier I have worked with typescript a bit but only in the backend, I quite like it.
 
yes, it's an improvement
 
6:47 PM
You know, I have no problem with Node.js, its just the frontend that I hate.
 
@FélixGagnon-Grenier Luggage lied to me.
 
hear that @Luggage?
 
Yeah! Screw you man. You got my hopes up.
 
6:48 PM
For me with DOM manipulation its jQuery in the frontend and jQuery in the backend. ;) :P
 
thinking on it, maybe he meant that there is a library that's dic-ish written in type script
but type script itself is a superset of javascript, I was confused because that would have been like saying "php is a dic"
I have not extensively done oop development in other languages, but after having touched java, c++, python and javascript I much, much, much prefer the "high-level-ness" php gives when thinking oop
 
I don't really have that many interfaces honestly. Maybe I'm doing something wrong.
 
what the hell is a DIC?
 
Also I wasn't insinuating Type Script was a DIC, just that the combination of a JS DIC and Type Script would enable similar patterns.
@mega6382 a Dependency Injection Container.
 
:)
 
6:54 PM
@Allenph yeah, that's my fault, I misunderstood
@Allenph did you print it flat or stanring? I just find out vase mode dramatically improves print time
like, > 2 times faster
 
Oh really? I printed it flat, but I've heard people print it standing because the quality is better.
 
with 0.08 resolution and 35mm/s it's like 10 hours instead of 40
 
How big are you printing? That one was only like 2 hours.
There are some people who print crazy lampshades.
 
15cm x 23cm
printing his gf photo for a friend
not sure if that's creep or a good idea
 
That's pretty big. How thick is it? It should only be like 2mm.
 
7:09 PM
10mm
too much? that was default setting in cura
 
As long as it's not a nude. Wait...you found out you could do this an hour ago and what...asked your friend if he had a picture?
Yeah. Definitely too much.
 
this is like my new fixation for the next 10 hours
 
Pretty dope, huh?
 
@FélixGagnon-Grenier youtu.be/YjkP1BcwLNI?t=621
 
7:22 PM
wow
that is awesome :)
 
mb_ereg_match matches at beginning of subject only – #76245
 

« first day (2743 days earlier)      last day (2204 days later) »