« first day (2310 days earlier)      last day (2635 days later) » 

8:05 PM
@RachelDockter it would be better if you take the time to understand what your code is doing, rather than programming by coincidence
 
i do, i understand what its suppose to do but it doesnt work lol, if $a = 2, why would it run if im testing if its 1
 
@Wes If the fork doesn't differ significantly why would you use it? If it differs significantly... why wouldn't you just use another mature language?
 
Wes
@LeviMorrison nobody has actually to use it. it would be just a blatant ragequit to prove a point, like io.js with node.js, or hack with php7 :P
competition makes everything better
 
user6061856
try doing === instead of ==.
 
that didnt work :/
 
Wes
8:18 PM
for some reason php is immune to competition with other languages... js is getting all the things in just few years, php still basically the same in 10 years... however, i think hhvm helped with that
what do you think?
 
Zephir didn't do anything really either
 
Wes
@LeviMorrison for the same reason i encourage stuff like the preprocessors i'm recently seeing being developed for php too... i'd hate use them, but if some of them stick to the community, php will try to emulate their features
exactly like jQuery did with DOM, now DOM is embedding jQuery features, or CSS is embedding features from the css preprocessors
 
the truth is hhvm (they even have survey now surveymonkey.com/r/FZH7YY5) has generics and annotations, those are missing even in php7, and noone knows when to expect because there is tnoone who leads and manage features for language completenes, the fact is it'll be missing features for a long long time
 
Has anyone succeed in building a javascript rendered single page app with artax? Presently when doing the request, the page's base html is returned. I'd like the client to execute the javascript to completely build the page, and then scrape use that content...
I'd hazard it'd require some messing with v8js but I'm not sure how to preceed
 
I may design a language that is a "simpler" PHP one day, but I doubt I would ever intend for it to compete or even see real usage.
Mostly an exercise to see how much cruft we truly have and to see which pieces are the most beneficial to remove.
 
8:28 PM
bla bla bla.. =) (wasnt directed at you @LeviMorrison)
Yes moar features and such would be nice
generics especially yes, but there RFC is there, bountysource is there and the feature is not. HHVM is availble just use it, if it means that much =)
 
user6061856
@RonniSkansing Agreed
 
sorry, not having generics sometimes annoys me, but talking about not having generics annoys me even moar now a days
 
@RonniSkansing Have you ever used Dart?
 
How long ago?
 
Wes
8:34 PM
the problem is, other languages aren't perfect either, otherwise it would be that simple @RonniSkansing with the cool features you get other quirks/problems/poor documentation/community
 
@LeviMorrison quite long ago +1 year, I actually have a google meetup where they talk Dart again
I was pretty sure It was going to die
 
I think Dart is a really good language and I'm not sure why so many people have the same opinion you do ^_^
 
@LeviMorrison well for me, it was a question if I really believed Google would keep working on it
 
Wes
btw, can someone retry with this? wiki.php.net/rfc/propertygetsetsyntax-v1.2
it nearly passed, maybe it will now
 
@LeviMorrison but I am going to "Google Talk: Web and apps with Dart, Angular and Flutter"
so that might revoke my interest in it
 
8:38 PM
As in "remove" your interest?
 
lol, no, bad working, reignite
I kinda felt like Dart and 'golang was competing and golang would win, even if it isnt the same context
Do you dabble in Dart?
 
I would more than dabble if my employer would get on board.
I haven't tried that hard to convince them to use it for anything though.
 
hmm well nice to hear that from somebody
I always hear like,, oooh it gonna die
 
Figured I may as well wait for an opportune time and let the community mature.
 
They are gonna replace all of Adsense with X (it the ramblings I keept being told)
and yea I admit it, I get influenced by the bla bla bla =)
see.. now I already feel like playing with Dart again
cause lately it's been alot of typescripting (which I actually really enjoy.. except the JS part.. )
 
user6061856
8:45 PM
What's Dart?
 
user6061856
Never heard of it.
 
@Wes I miss it to
 
@RachelDockter you should start looking into templating options: chadminick.com/articles/simple-php-template-engine.html
 
@RonniSkansing whoah it has generics and async streams
 
8:48 PM
@tereško is this a template to display php stuff in html? i dont really understand the article
 
user6061856
Dart seems interesting!
 
finish reading it, try out the example and lets see what you think then
 
user6061856
@RachelDockter Have you done any OOP?
 
so its like a class, and u call it to make a new page and declare the head body and stuff ok i get that, thats inresting
@Terminal-JS i dont think so
 
ups
I skipped a step
 
user6061856
8:53 PM
She needs to learn OOP before that. :P
 
user6061856
 
user6061856
Helped me get a footing.
 
oh i know what oop is, i thought it was like some software or something lol
i think i did oop in c# in visual studio
 
user6061856
Yeah you should get a good start then since you understand the concept of OOP. So go ahead and check out the vid.
 
hes using classes in php i didnt think u could do that
 
user6061856
8:56 PM
Yeah you can. :D
 
user6061856
That's the start of OOP.
 
user6061856
Follow that guide and you'll got some of the basics done.
 
user6061856
get*
 
user6061856
But you should read up more on OOP later, it can get complicated. E.g: Dependency Injection.
 
@Terminal-JS oop is much more than wrapping your code in some classes.
 
user6061856
8:58 PM
@SalOrozco I know. :D
 
user6061856
@SalOrozco I said that's the start of OOP.
 
Thanks to @tereško and some other guys here. I have a good understanding of what it really is but still need more practice.
 
@RachelDockter yes, you can. As for "what is a template": it is just a HTML with PHP variables, but no logic. The class is used to wrap that template file, control those variables and isolate the code
 
user6061856
I've read up on OOP quite a bit. But I completely doubt I understand it fully.
 
yeh i did alot of this in c# a while ago
 
9:01 PM
then you should see how it might be useful in your php application for controlling the "pages"
 
i also need to learn how to structure php documents, atm mine looks like this lol gyazo.com/81d29be06b326ba5139196b3d768720d
 
actually, the next step would be learning to use git: git-scm.com
 
dam
 
oh yeh some ppl said that to me too
 
9:22 PM
\o Evening 11
 
yo
 
Hmm, #129 still an issue?
!!reminder Jeeves do you still not use tomorrow if the time is past today? at 21:20
 
@Sean I guess I'm late: Jeeves do you still not use tomorrow if the time is past today?
 
No you don't.
 
user6061856
I just signed up for git almost a month ago
 
user6061856
9:27 PM
I just finally started using it.
 
@Terminal-JS I think you meant "github"
 
user6061856
XD
 
user6061856
github*
 
it you need private repos, you probably will end up using bitbucket
... or make your own server on a VPS, if you own one
 
user6061856
u.u
 
9:34 PM
Let's say you have a new project with 3 developers. Each create a new feature branch to work on their feature. In order to get their features working they depend on some initial boilerplate code which is not related to any feature in any way. In this scenario what is the best way to get up and running as quickly as possible to develop the features in parallel?
 
who is making the "initial boilerplate"?
 
user6061856
^
 
also, is it really a direct dependency? Or can people actually start designing those features without it for some time
 
user6061856
@tereško So, @SalOrozco said you had a good understanding of OOP. Mind giving me some pointers? :D
 
*ptr
do you have a specific question, @Terminal-JS?
 
9:38 PM
@tereško For example lets say you are following CQRS. An application command bus interface must be define. With just an interface defined then the feature branches can easily unit test their code but in order to integration test their feature they need the command bus to be implemented
 
then it needs to be merged in the develop branch ASAP, before all the feature branches are made
 
user6061856
@tereško SalOrozco Said there is more to OOP than classes, and I know that from reading also (but they didn't explain).
 
So the developers could unit test their features with just the interface but in order to integration test someone will have to implement the command bus, merge to develop, and then the developers can pull down the latest develop branch and rebase their feature branch?
 
@Terminal-JS you could start by watching youtube.com/watch?v=4F72VULWFvc
 
user6061856
Uh
 
user6061856
9:42 PM
@tereško My internet is crap I can't look at it. ;-;
 
@Terminal-JS is it temporary or a long term problem?
 
user6061856
An article will do.
 
user6061856
@tereško Long term.
 
I dont actually know any good articles that cover this
 
user6061856
IKR
 
user6061856
9:43 PM
I couldn't find like anything on it on an article
 
you could try researching "SOLID principles"
also "Law of Demeter" might be a good subject
 
user6061856
Okay
 
user6061856
I haven't done a TON of research on SOLID, but I have looked at the D quite a bit.
 
user6061856
Dependency Inversion Principle
 
Optional typed parameters? Is that 7.1?
!!docs typed parameters
 
9:47 PM
[ px_get_parameter() ] Gets a parameter
 
Wes
@Sean ?
 
If I start a transaction and insert a row, can I select that row before committing? (PDO)
 
Wes
nullable function parameters you mean?
 
 
Wes
yep, it's 7.1
 
9:50 PM
Is it just shorthand for int $foo = null?
 
Wes
no
 
Or was that never a thing
 
Wes
that is also skippable, while ?Foo is not
Foo $foo = null implies
?Foo $foo = null
 
user6061856
Also is it true that you want to avoid static methods and vars in a object?
 
Yes. Static calls to methods and variables, at least mainly to ones in other classes, will forcefully couple those two classes together
At the very least, not being able to isolate a method makes it harder to test, and will make it more difficult if you ever need to swap classes out.
 
user6061856
9:57 PM
Ok I thought so
 
Ah I see
so you have to explicitly pass something into it
Nice
S:\projects\jeeves>php -v
PHP 7.1.1 (cli)
There we go :D
 
Wes
lol
 
Hello everybody, I have an issue in laravel 5.* I'm migrating an old app from laravel 4.0.1. And I can't find an equivalent of this: {{ '<a> .url('myurl') </a>' }}
Maybe somebody know how can I combine html with blade functions?
 
user6061856
idk
 
user6061856
10:03 PM
never worked with laravel
 
user6061856
plus it's almost as slow as zned
 
user6061856
zned*
 
user6061856
maybe: <a href="{{.url('yoururl')}}"></a>?
 
how to combine html with blade functions?
<a>{{ ... }} <a/> ?
 
user6061856
@ErickAstoOblitas Maybe you shouldn't combine html in blade functions.
 
Wes
10:06 PM
@LeviMorrison btw, i was thinking to write an rfc about strict default parameters, ie, disallow this:
interface Foo{ function baz(bool $baz = true); } // must default to true
class FooImpl implements Foo{ function baz(bool $baz = false){} } // booo
 
The old code looks exactly:
{{
'<a href="'. url('summary') .'">
<span class="glyphicon glyphicon-list-alt"></span>
Artículos
</a>'
}}
I'm migrating old code (from another developer).
 
Wes
syntax could be:
interface Foo{ function baz(bool $baz = true!); }
class FooImpl implements Foo{ function baz(bool $baz = false){} } // error, $baz must default to true
thoughts?
 
interface Foo{ function baz(bool $baz = true); }
interface Bar{ function baz(bool $baz = false); }
class FooImpl implements Foo, Bar{ function baz(bool $baz = false){} } // what happens here?
@Wes ^
 
Odd, Jeeves looks at 11 by default? It's not listed in my config file but it's picking up message events from here.
 
Wes
interface Foo{ function baz(bool $baz = true!); }
interface Bar{ function baz(bool $baz = false!); }
class FooImpl implements Foo, Bar{ function baz(bool $baz = false!){} } errors.
 
10:09 PM
@Sean what user account are you running it as?
 
Wes
because the two baz()'s are incompatible
 
@DaveRandom Mine, does it look at current rooms?
 
Wes
interface Foo{ function baz(bool $baz = true!); }
interface Bar extends Foo{ function baz(bool $baz = false!); } // same thing
 
!!dad
 
I am terrified of elevators, I'm going to start taking steps to avoid them
 
10:10 PM
@Sean Yes it will inherit rooms your browser is in
 
Wes
ie, it basically makes the default value part of the signature
 
Ahhh.
 
in the same way as if you log in from another browser you will get all the same rooms
 
Does it also ignore itself now too? Can't command myself to do anything.
 
@ErickAstoOblitas I dont get that blade is html with php, its template majingthing.. so just dont interpolate your html inside the expression signs {{ .. }} but outside of them
 
10:11 PM
@Wes thinking about what I think about this
 
nomatter if its twig, blade or whatever it makes no sense to put the html inside the expressions.. @ErickAstoOblitas
 
Wes
lemme know :P
 
@Wes I foresee a lot of issues here though. Like, I certainly want to be able to change default values of method args in a child class, for example
 
Wes
then don't do true! ?
 
@Wes what problem is it solving?
 
10:13 PM
!!rfcs
 
@Wes oh I see
Then yes I have no issues with it, although I would never use it
 
Wes
@PaulCrovella people type hint for an interface that has a default argument that is something, and relies on that, but classes can change it to something else
 
is @Danack here? or anyone else who comprehends Docker?
 
Wes
of course depends on what you are doing
 
10:16 PM
@Wes they also use those values however they like
 
@RonniSkansing thanks I found a solution: stackoverflow.com/questions/33104676/…
 
Interface does not actually guarantee behaviour
It only guarantees the contract
 
user6061856
@DaveRandom Maybe I can help? idk
 
Wes
why do we bother of everything else then :B
it's just php doing you the courtesy of spotting immediately something that we want to stay like that and that is instead set to something else
 
10:20 PM
@Terminal-JS Dockerfiles: a) wtf is the point of EXPOSE, is it just for documentation purposes? since it does seem to ever get used for anything at run time b) do I gain anything by using VOLUME other than similar documentation-ish info?
 
@DaveRandom can i show u something
 
<resists urge to make puerile remarks>
@RachelDockter sure :-P
 
user6061856
@DaveRandom Wait I read that wrong. D:
 
hold don
 
user6061856
10:22 PM
@DaveRandom I don't know anything about Docker. Sorry, I miss read it for something else.
 
look what i did, its like twitter where everyones posts are displayed gyazo.com/b2307c2c81e6d1277f17b3b2acfde132
i did all that today
 
@Terminal-JS Oh you thought I meant Decker, the guy who was trying to catch the A-Team? Easy mistake, no worries
 
with php and sql
 
Cool :-)
 
thanks im really proud of it so far
 
10:24 PM
Well done. Web dev is really frustrating, isn't it?
 
Nice one ^^
 
yes, especially the positioning of stuff and css
i cant stand it
 
user6061856
CSS is actually fun for me.
 
user6061856
I love it.
 
Aren't you doing a games design course?
 
10:25 PM
uhhhhh its horrible
 
user6061856
However I wish forms were easy to style.
 
@Terminal-JS CSS is fun for me if someone tells me what to do lol
 
yeh, one of the units is web design
 
If you think CSS is frustrating, wait they hand you a canvas and ask you to draw and track polygons :-P
 
i can only imagine
 
user6061856
10:27 PM
Honestly CSS is fun, it's not that frustrating for me. It's easy to understand.
 
I'm a masochist too
I just have different outlets
I read RFCs and that sort of thing
 
lol
 
@DaveRandom I thought the # was on purpose
 
user6061856
But CSS is amazing with flex boxes.
 
No I can't get away with # these days
Wow that was a shit, unfunny, nerdy, drugs-related dad joke, that has to be some kind of achievement
 
10:30 PM
would anyone know any easy way to reverse this while loop so it starts from the top

$result = $stmt->get_result();
$count = mysqli_num_rows($result);

if ($count > 0) //If there is one post
{

    while($row = $result->fetch_assoc())
	{ ?>
		<div class="post">
			<div class="post-header">
			<h3><?php echo $row["username"]; ?></h3>
			</div>
			<a href="profile.php"><img src="graphics/buttons/profile.png" class="post-image"></a>
			<textarea class="post-message" readonly="readonly"><?php echo $row["post"] . "&#13;" . $row["date"]; ?></textarea>
i tried turning the arrow to <- but that didnt work
 
:-P
change the ORDER BY clause in the SQL query to reverse the results
 
user6061856
Yeah
 
user6061856
e.g: ORDER BY id DESC
 
thats genius
 
@DaveRandom that would be too easy ;) make it a php solution ^^
 
10:32 PM
@DaveRandom I am here......but I am actually just trying to get my first docker box up and running.
 
Man I wish PHP had linq so badly
 
Hey I have a question about try {} catch(PDOException $e) {}. In the beggining of my page I set $dbh->etAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); and then I have a foreach loop inside my try that selects, adds, removes, and updates based on a conditional. If a PDO execution from inside the foreach loop returns an error it will quit the loop and go straight to executing the code inside the catch part (in this case $dbh->rollBack();), right?
 
@Terminal-JS What framework do you recommend?
 
# svn co svn.php.net/repository/phpdoc/modules/doc-en doc-en
...
...
A    doc-en/en/reference/gnupg/functions/gnupg-cleardecryptkeys.xml
svn: warning: W120106: ra_serf: The server sent a truncated HTTP response body.
 
user6061856
@ErickAstoOblitas Honestly, um.
 
user6061856
10:33 PM
IDK, I only use one framework. It's called Phalcon.
 
@Danack I... errr... oh I thought you knew shit about it :-P
 
@salathe I've been getting this error today and yesterday when trying to checkout the svn source of the manual.....any suggestions?
 
@DaveRandom there are userland implementations
 
@PaulCrovella that's of debatable usefulness, and certainly not touching it without short closures
@Danack Always at the same file?
 
@Danack perhaps you know … Is there a way to avoid Imagick re-encoding JPEGs when not changing anything? (e.g. stripping the exif data/profiles) or such?
 
10:36 PM
@bwoebi I think it shouldn't - but I'm not aware of an explicit way of doing it.
Honestly, using the command line might be a valid way to do that.
 
it which case I recommend exiftool
 
@Danack given that I have the data only as string and not as file, the command line probably isn't an option
 
@Alesana yes
 
hmm nn
 
@DaveRandom "EXPOSE Document where a service is available, but not create any mapping to the host" - something something, automatic service discovery and linking.
 
10:39 PM
Right, so pointless, gotcha
:-P
 
@Danack ah, - works for stdin/stdout … well… does it work with the command line then?
(I need to do multiple operations in some cases, like resizing or layering a transparent PNG over it)
 
@DaveRandom Okay awesome thanks
 
@DaveRandom it appears to be a different file each time. I'm running this in a docker container.....it's entirely possible that it's docker playing silly buggers.
@bwoebi I don't know......I only maintain that library.....I've never really used it.
(I meant use ImageMagick's command line tools btw)
 
@Danack yeah, I got that you meant convert … but I'm no expert with it either
 
10:44 PM
uh wait
 
user6061856
scotch.io/bar-talk/… So from what I'm thinking, SOLID is a way for refactoring code? Or is that wrong?
 
!!wiki SOLID (object-oriented design)
 
In computer programming, SOLID (single responsibility, open-closed, Liskov substitution, interface segregation and dependency inversion) is a mnemonic acronym introduced by Michael Feathers for the "first five principles" named by Robert C. Martin in the early 2000s that stands for five basic principles of object-oriented programming and design. The intention is that these principles, when applied together, will make it more likely that a programmer will create a system that is easy to maintain and extend over time. The principles of SOLID are guidelines that can be applied while working on software...
 
it is a is a mnemonic acronym [:
 
user6061856
Oh okay
 
user6061856
10:56 PM
"The intention is that these principles, when applied together, will make it more likely that a programmer will create a system that is easy to maintain and extend over time." - problem sovled
 
@Danack From doing a little reading it looks like it may just be a server-side timeout
 
hi someone from here, can help in js? I know it isn't js chat :P
 
Just ask....and then people will ignore you if they don't care to answer.
 
@Danack OK fine, definitely pointless for me then
 
user6061856
I might be able to help . . .
 
10:59 PM
how to set promises so that a 2nd script start after 1st script
 
user6061856
idk anything about promises. I disappoint myself.
 

« first day (2310 days earlier)      last day (2635 days later) »