« first day (2785 days earlier)      last day (2178 days later) » 

12:00 AM
@Wes Now that I know you dont like it it will remain there permanently.
 
Wes
sigh
 
@mega6382 That hurt me real deep cuz.
 
Wes
@Tiffany how he is not the greatest guy?
i mean ok, but why?
 
@DaveRandom Didnt find this in a Google.
@Wes There is nothing stopping you.
 
Wes
i know but making that mistake in practice is really rare
people praised steve jobs for years and quite possibly he actually was a sociopath
 
12:03 AM
PHP Storm 2018.1 in 7.2 mode seems to be able to cope with a type decl of object but raises "Undefined class: object" in a docblock, can anyone repro or has my machine gone fucky?
@Allenph as in an actual array, like a C programmer would understand them
 
@Wes By this logic typing in general is useless.
 
Wes
@DaveRandom code?
 
an ordered list of values, accessed by numeric index, starting at zero and ending at count() - 1
/**
 * @param array|object|bool $schema
 * @throws InvalidRootNodeTypeException
 */
public function parseData($schema, string $baseUri = null): Schema
 
@lytakyn that text will be caused error in your end
 
if I declare parseData(object $schema... it doesn't complain, but that's not what the method signature is
 
12:05 AM
Good morning everyone
 
@DaveRandom Yes, but in C you have to specify what the array is.
Or what's in it rather.
Which is not the case in PHP.
 
@Allenph indeed, and I generally end up either doing a loop or the splat hack
nevertheless, it doesn't make sense to make a whole typed collection when you want an array of ints
it's not ideal, but I'd rather declare array on the signature than nothing at all
 
@DaveRandom I just make a class for each scalar type that extends my collection class and overrides the type checking method.
And then collections of everything else are collections of objects, so the regular collection class is used.
 
@DaveRandom The Elongated man?
 
Those scalar type collections are actually less work than regular collections because they can be reused.
Plus those scalar type collection usually end up becoming a collection of a value object once some validation rule becomes necessary for the value.
 
Wes
12:11 AM
@DaveRandom do you have project set to 7.2 ?
 
@Allenph they can, but without a "standard" one it's crappy, because if I have a collection of ints in my lib and I want to pass them to your lib I need to convert it to your collection type (which does essentially the same thing) and it will do an O(n) type check again
 
Wes
it works in 2017.1 tho
 
@Wes double checking
yes, definitely
I will dump the caches and restart
was trying to avoid doing that
 
Wes
doubt will fix it
 
it does sometimes when weird shit like that happens
 
12:12 AM
@DaveRandom Sure. But you're probably going to have to do some translation anyway, and the constructor to my collection class has an array as an optional parameter.
And you can also cast it to an array.
 
in summary: I'd like it to work like that but in practice i don't see enough benefit when it's left to userland
 
Plus again it's pretty unlikely to have a legitimate scalar collection. Usually it's just a place holder until it becomes a VO collection.
 
if there were typed arrays or generics, I'd be completely on board
 
I'd prefer that also, but...until then I just cant live knowing there's a type safety hole.
Especially when I know my coworkers.
 
typically I try to make such APIs use variadics a the public entry point, and then just arrays internally
doesn't happen that often, I admit, usually it's around API clients
e.g. a lot of SOAP APIs often have methods like doSomethingWithObjects(int[] $objectIds)
@Wes yeh it didn't :-/
 
12:18 AM
Yeah but those conversions can be isolated in mappers.
 
Well - time to do daddy duties. Be back in a bit.
 
Wes
array has similar problems @DaveRandom sometimes it's case sensitive sometimes it isn't
 
So that only internal processes in the objects need to know about that.
 
Wes
try using Object
 
no joy
 
Wes
12:19 AM
though this is terrible array|object|bool and you are a terrible person :B
why array object bool? :B
 
because JSON schema considers a bool to be a valid schema
which is pretty insane, I agree
but that's how it works
 
Wes
try creating a stub for object in a separate file

<?php class object{}
 
could do, but then all my tests would complain
 
Wes
? how so
 
I'd rather have the one warning there than a warning at every call point
@Wes I mean the inspections
obviously it would run fine
but if i pass a stdclass in it will complain because it doesn't inherit the faux object class
 
Wes
12:22 AM
what error would the inspection give?
 
well it will consider it a type error
because it will consider object to be an actual class
and no real classes will inherit from it
 
Wes
nope, if it works like other types methods in the "stub class" will just added to the existing name
 
@Wes and ftr that particular method allows you to pass in a data structure as if it's a JSON doc that has already been decoded
hence the array|object
 
Wes
class mixed{ function abc(){} }
/** @param mixed $x */
function bar($x){}
bar(23);
this for example gives zero warnings form inspections
and you even get abc autocompleted in bar
not that serves a purpose. showing you how i think that stuff works :B
 
> Classes with the name object are forbidden in PHP 7.2
:-P
(at the stub decl)
 
Wes
12:25 AM
yes but leave it anyway
now check if works
 
interesting, it works with the union
 
Wes
:P
 
but if I change it to @param object $schema it doesn't
doesn't matter though
 
Wes
if it doesn't, it's probably because you are in a namespace. so you'd need to change it to
array|\object|bool
 
works for now, ty
 
Wes
12:29 AM
with all these changes in php phpstorm couldn't keep up and it has become quite a mess recently
 
@DaveRandom Thanks! just got ol. will check these now
 
@EarvinNillCastillo I didn't actually try running it because I don't have any hardware to test against
I'm moderately confident it will work, and if it doesn't it should tell you why with an vaguely useful error message
 
How can I achieve your level of programming? do you have tips? hints? walk-through?
 
start by developing serious personality flaws, and just go from there
2
seriously though, the answer is basically "practice"
 
It's right, @DaveRandom
@EarvinNillCastillo @DaveRandom will have tips and walk-through, but i think your condition is very important
 
12:38 AM
I don't really have tips or walkthrough, it really is just a case of practice. Some stuff (like approximately decent OOP design) took me many years to actually grasp
 
Class 'DaveRandom\Serial\DeviceManager' not found @dave
 
did you remember to include the autoloader?
actually back up a step, did you use composer to install it?
 
oh
nope
I just dl then paste it to wamp
 
right, well you can either set up a project with composer and install it as daverandom/serial dev-master
or you can write your own autoloader
I recommend using composer though
 
Dont write your own autoloader for god's sake.
 
12:41 AM
i will follow the composer
ill just install it
 
I forget that some people don't composer All The Things by default
 
yes i don't know how to use this composer thing
 
well firstly just download the windows installer package
and install it
 
as of now im practicing codeigniter
for this rs232 proj
 
Or just use the pharmacy if you're exceptionally lazy.
Or just use the phar if you're exceptionally lazy.
 
12:45 AM
it's alright, for additional knowledge
so why should i use composer??
 
because it take care of autoloading for you, and installing a lib is just a case of adding it to you list of dependencies for the project
it also enables you to update your dependencies with one command
 
already did the instruction to enable composer as the instruc said, open cmd window close file explorer open cmd window signout sign in open cmd window
are those for real?
 
that seems... odd
 
idk it's in the installer
 
I don't know, I haven't read the install instructions
 
12:49 AM
haven't also it's just in 1 step before finish button
 
It sounds like it's trying to ensure that your command prompt has the correct value for %path%
but it also sounds like they've gone with a carpet-bomb approach
 
what's carpet bomb approach
*googles
ohhh okkkk
what is the next step? how can i load your proj into composer?
or are there anything else I should configure before doing that?
 
basically it's like telling people to reboot their whole computer when all they really need to do is close the browser and open it again
 
@Wes it's an interview of his ex-wife that I read. He's not terrible, and his motives are true (at least I believe so), but that's a pretty heavy weight to carry and doesn't exactly make him the easiest person to be around.
 
so that is carpet-bomb approach in IT way.
 
12:52 AM
it's a thing that tech support people often do, because restarting you computer is pretty unambiguously hard to screw up, and will definitely do whatever needed to be done
 
Wes
that's understandable
 
@EarvinNillCastillo open a new cmd window and type composer --version
you will either get the composer version, or something along the lines of "command not found"
this is the sort of crap where windows really does suck balls compared to *nix
brb smoke
 
I have about ~6k more images to resize... it's 4 am
/me makes coffee
 
@Ekin you've automated that right?
 
1:01 AM
Kinda, does using DirectoryIterator count?
I need to do this once
And then get rid of all the originals
 
Wes
i am obsessively wasting time making a site pretty rather than making the site..... work. at 3 am
 
lol
oh man... just remembered SiteLock got back to me... the job I applied for is overnight
I want it so bad
I want to be awake at 3am
 
@Wes, go to your bed
my advice
You have to sleep for your future.
 
not if he's a nocturnal person
 
right@Tiffany
but it's bad for night work
 
1:10 AM
@Jincowboy not if you're nocturnal
 
Lately @Wes has been nocturnal and diurnal. He's been on when I go to bed on the east coast and on when I wake up.
 
had to get rid of the stupid apache default page on my VPS
oh god dammit
I broke it
 
not
@Tiffany
 
@Jincowboy I'm nocturnal, I'd rather be awake and working at 2AM than go to bed at 10PM and wake up to work in the morning.
if I didn't have a daytime job, my body naturally drifts towards nocturnal, my dad and sister are the same way
 
I am often working in night
 
1:14 AM
I'm the same way.
 
@Jincowboy do you sleep during the day?
 
Let me not say about this, @Tiffany
yes
3~5hours
 
:/
 
but here is php discussion room
 
it's also a chatroom
conversation drifting off-topic is normal... we're human after all
unless you have something PHP related you wish to discuss, go for it :D
I need to figure out why I can paste my VPS's IP address in the address bar, and it redirects as expected, but if I click a link to it, site can't be found. Maybe need to tweak something in nginx.
 
1:18 AM
@DaveRandom received the version
 
Morning
 
ok, then to make things simple, cd to the directory where your test script is and type composer init
it should give you an interactive script that will generate a composer.json file for you
 
why image is not appearing
@DaveRandom it says packagename
 
i should type test?
 
1:25 AM
yes, that's fine for now, it doesn't matter what most of those values are
 
@DaveRandom
 
use the "upload" button in chat
oh, weird
OK well I have no idea what's going on there
 
pasteboard.co/HnO0YHP.png where in particularly the upload button?
 
ctrl+C out of it
 
i'd terminated the job
@DaveRandom i forgot to type no
in dependencies
 
1:30 AM
OK, just create a file in the same dir as the test script named "composer.json"
and put this in it:
{
  "require": {
    "daverandom/serial": "dev-master"
  }
}
when you've created that file, run composer update in that dir
 
What I did first is CD the path of Serial-master and composer init it. before doing that, you have default composer.json in your script. So I should overwrite it right?
 
do this in a fresh dir
ignore the one that you downloaded
that will just complicate things
create a new empty directory, create the above composer.json file in it, and then run composer update in it
 
oh i haven't change the php version in my apache
already changed the php version but still saying im in 5.6
 
you need to update your %path% to point to the correct php.exe
basically you need it set up so that when you type php -v in cmd it says 7.2
 
1:55 AM
I need to go to bed, be back tomorrow
nn all
 
nn/
 
@DaveRandom aww
@DaveRandom talk to you later!
 
2:48 AM
Hi anyone know what step should i go after I composer update the dir? Can I run it now?
 
do you do it in terminal?
 
where framework?
 
i run composer update in termina as per @DaveRandom said. already updated the php version requirement
 
yeah, are you try in laravel or ci?
 
2:50 AM
in CI
but im going to use the library first
that @DaveRandom gave
 
yeah
did you check google?
 
so can I run it now?
 
I have tried composer in laravel
 
how to run the project
?
 
but i thinked that it is unnecessary in ci
did you make composer.json?
 
2:55 AM
yes
composer update also
 
check this quote"how to composer library in ci" in google
It's time for lunch here. let me discuss with you 2hours later
 
wow 2hrs
haha
what a lunch time
i call that nap t ime
 
here it's time 12:00
 
11am here
 
11pm here. =)
Opposite sides of the globe.
@Jincowboy where are you?
SK?
 
3:01 AM
wooow haha
 
@EarvinNillCastillo where are you at?
 
Philippines
 
@StatikStasis
 
Nice!
 
@Tiffany Sounds like something to do with HTTP. Your server might have configs that have a rule based on subdomain or whatever.
 
3:03 AM
China
 
@Allenph can you help me with the composer problem??
 
Oh- I thought you said it was 12? @Jincowboy
 
@StatikStasis yes its 12 in china +9 i think
 
@StatikStasis
now 11:59am
 
When ever you google what time is it in China it must just grab from a different time zone in China and return. When it said 11am I just moved it up and assumed you were further east. Sorry about that. @Jincowboy
 
3:06 AM
It's pleasure
 
When I saw it said 11, I knew it was 12 in further east so I made an assumption. Jeez... I didn't want to be one of those Americans making that mistake of guessing where someone was from. Sigh...
@Allenph 9pm there?
Hmm how do the "flat earthers" explain it being sunny to someone in China while dark in the US? I'm sure they have some crazy theory.
 
3:31 AM
@DaveRandom error occured: pasteboard.co/HnOOFk8.png
this what is happening when I used PHPSerial. When this occured and tried in Terminal, it s ays COM1 access is denied
 
3:45 AM
Uncaught DaveRandom... those are sneaky buggers.
 
4:02 AM
\o
 
o/
@JoeWatkins just keeping the night watch here until you guys woke up across the pond.
 
night watch is when the exhibits come alive, watch out for @DaveRandom parading about in a mankini ...
 
4:40 AM
=D
 
Well, I hope they catch him soon enough
Man I am so relieved, I was so close to calling my boss at my new job and telling him that I refuse to work on wordpress websites when he gave me a call telling me he's had it with wordpress, asking for suggestions on alternatives
I spent the next few hours explaining to him what my work flow is and now I'll be leading the team on switching over all of our clients' websites :D
 
5:01 AM
1am here. Time to crash. nn
 
5:20 AM
posted on June 01, 2018

New Cyanide and Happiness Comic

 
@Alesana do you have wordpres work?
 
@Jincowboy I'm not sure I understood the question
 
what do you want here?
related with wordpress?
@Alesana
 
I want to not be related with WordPress
:p
 
btw what do you want @Alesana
???
 
5:43 AM
anyone that had been developed wordpress theme?
 
5:55 AM
There is only one thing I have to say to anyone who uses Wordpress for anything ...
 
I want you to help me for wordpress theme customizer option function
where should it be described in theme?
function.php?
 
no idea, suggest you delete wordpress and use something non-terrible ...
it's wordpress, just put it anywhere and global it ... yolo ...
 
wordpress is php framework, so i could ask to anyone here
 
I don't think anyone here is intimately familiar with wordpress ... because of the aforementioned terribleness ...
 
6:11 AM
Anyone that know wordpress well will be here, you don't know everything. thanks anyway
 
you are not a good listener ...
and ask anyone, I do know everything ...
4
 
do you know wp?
 
WP is great, way to put PHP, HTML, CSS and JS in one file. Who wouldn't like it.
 
yes, we all do, we all know it really well and are just choosing to withhold the information you are asking for ...
 
hi every one..
 
6:19 AM
This guy was here a few months ago. Tempted to post the meme I made kid him that PeeHaa got angry with me for.
 
i need some explanation on this question stackoverflow.com/questions/50636981/…
 
And morning.
 
@Tpojka and j
 
you can actually see the badness oozing from that manual page, spreading itself all over the internet by copypasta ...
20 second task: rewrite cmp so that I would accept it in code review ... hint: there should be no pointless characters/statements/instructions ...
 
@BilalAhmed Check manual page of usort function. Your callback function doesn't make valid return. Also 3 answers point that what I just said.
 
6:27 AM
@Nigel Ren provided the good answer. i got my answer thanks
 
And I thought it was just these people who were inlining JavaScript and css while simultaneously adding it to asset folders of both themes and plugins*
It must be quite a skill that these people have to be able to write this stuff alone none the less manage it
 
@Alesana I even didn't mean of asset location. There is full bunch of main™ files like function.php then plugins and widgets where these are mixed.
 
mornin
 
Yeah they are doing that, for half of their css and javascript (inlining it into functions.php) while additionally putting the other half of their css and JavaScript in asset folders
 
I wonder that Rasmus Lerdorf said once when asked of favorite framework/cms that it could be WP. If I am not mistaken, it was on some conference in Ukraine.
 
6:33 AM
And the other half that is in asset folders is a mix between asset folders of the main theme and asset folders of the plugin that they're inlining code into it's functions.php file
 
morns
 
o/
 
where file should i add this code into ?
add_action( 'customize_register' , array( 'MyTheme_Customize' , 'register' ) );
i have inserted this into functions.php
 
Looks like wordpress, so, I am not gonna bother.
 
but not
 
Wes
6:42 AM
but yes
 
@Wes, do you talk to me?
 
I googled that in 5 seconds. You don't want to bother yourself reading manual @Jincowboy ?
 
@Tpojka
No, thanks for your effort, could you talk to me?
 
You don't want to read manual? What then I could talk to you about it?
For sake of your question few lines above, two links:
https://codex.wordpress.org/Plugin_API/Action_Reference/customize_register
https://codex.wordpress.org/Theme_Customization_API
 
i have already read manual for wordpres theme development
yeah
codex.wordpress.org and developers.wordpress.org
 
6:51 AM
PDO cannot caught mysql error 1690:bigint unsigned value is out of range – #76400
 
hi, can somebody tell me what is the process of creating a php app, something like wordpress, youtube, facebook, lets say
a) is it always the same (in all cases / any script)
 
Wes
not sure if it's php that attracts crazies, or if it's php that makes people crazy
 
b) something like how do we build a skyscraper with 100 or 150 floors - you dig the whole in the ground, do the foundation, put up a skeleton, put in floors / ceilings, then windows, then electrical cabling - carpet and furniture at the end, and so on
I could use this info, to organize the knowledge that I already have
 
I choose b)
 
like a skeleton and put the existing knowledge on this
@Tpojka - thanks ;)
 
6:58 AM
@ten5 There is no knowledge that you already have, stop deceiving yourself.
 
one year of edu is good, "strength"
it seems like I would need this skeleton now
so the "strenght" would double and I could move on
 
Sounds like a plan.
 

« first day (2785 days earlier)      last day (2178 days later) »