« first day (2778 days earlier)      last day (2173 days later) » 

4:01 PM
@mega6382 are you able to use internet through tethering your phone on the problem computer?
 
@Danack You mean with hotspot? Yes
 
I'd try doing that.
And you've tried different browsers on the problem computer?
 
@Danack Think it's a weird DNS/Firewall/ISP problem?
Could be... definitely worth a shot vOv
It does seem like some weird dirty state on the server though
 
@Danack Every computer is a problem computer, except for 1 where it is working in isolation. And I am not going to take the risk of disturbing that.
 
Sounds like it's time for IPoAC.
 
4:06 PM
@Allenph Yeah, might be worth a try :P
 
I know that trick.
 
@MadaraUchiha Can you see if anyone at SO, can check the error logs or at least, reply to my emails.
 
@mega6382 Yes, I've already asked, awaiting reply
 
Thanks
 
4:08 PM
@MadaraUchiha (ง'̀-'́)ง
 
@StatikStasis He has completely changed the question now.
 
He would have been better off asking another separate question at this point.
 
@mega6382 Dude, you're being so unwelcoming.
 
lol
I think the OP has deleted it, or maybe a mod, or users with 20k+ or whatever.
 
What if that's a woman and you're not giving her special treatment? That's so uncouth dude.
 
4:13 PM
@mega6382 Did I say QA test this for me... I meant not sure if this is broken what do you guys think?
 
Wes
3 days into fasting and i am starving :B
 
Fasting?
 
@Wes you turned muslim?
 
@Wes I've fasting for 9 days now. Imagine that.
 
hey everyone! hope everyone's having a great day...can i ask a small question about checksums??
 
4:14 PM
Is that eating and drinking like really fast?
 
@Wes You'll feel really good by day 7 and you can go for a long time.
 
Wes
@Gordon just fat
yeah i know it gets better
 
Turned fat?
 
The healthiest way to lose weight is to starve yourself. Everyone knows that.
 
Just drink plenty of water.
 
Wes
4:15 PM
i am only drinking tea with lemon, no sugar
 
Yo-yo dieting or yo-yo effect, also known as weight cycling, is a term coined by Kelly D. Brownell at Yale University, in reference to the cyclical loss and gain of weight, resembling the up-down motion of a yo-yo. In this process, the dieter is initially successful in the pursuit of weight loss but is unsuccessful in maintaining the loss long-term and begins to gain the weight back. The dieter then seeks to lose the regained weight, and the cycle begins again. == Causes == The reasons for yo-yo dieting are varied but often include embarking upon a hypocaloric diet that was initially too extreme...
@Wes aware of that? ^
 
@Wes OK, that is the wrong kind of fasting.
 
Wes
@mega6382 why
 
Because all you're doing is eating muscle mass.
 
@Carrick just ask your question and if somebody can answer, isn't drunk, or fasting they might answer
 
4:16 PM
LOL!
 
@Wes Because when you starve yourself like that the first thing to go is not the fat but the muscles.
 
We're too busy not eating.
 
@PeeHaa why cant we answer when drunk? YOU are always drunk and answearing.
 
He is always swearing
 
Can we use other drugs and answer?
 
4:17 PM
Answearing. I like that
 
Wes
@mega6382 so?
 
actually, answearing is more what @tereško does
 
@PeeHaa oh alright...
 
what did I do wrong again?
 
All ofnit
 
4:18 PM
i recently learned about checksums and their uses...i was wondering how i can see the checksum of a file on a website...i know how to do it after downloading tho
 
@tereško nothin. I just coined a term that describes how you mix insults and expletives with actual answers
 
Also fuck mobile chat
 
Also your fault @tereško
 
@Wes That's unhealthy and will not help you lose weight in the long run. But will actually make you even fatter when you start eating regularly again.
 
4:19 PM
ah
 
!!blame @tereško
 
strftime format "%p" is not always uppercase "AM/PM" – #76378
 
@mega6382 aka what I just linked.
 
Lol dat combo @Jeeves
 
You guys have me laughing so hard I'm hurting here
 
Wes
4:19 PM
@mega6382 so what should i do
it worked every time
also i cannot lose muscle mass, as i don't have any :B
 
Remove sugar from diet is best thing you can do.
 
The fact that it had to work "every time" is exactly the point.
I just quit drinking on the weekdays and I've lost a ton of weight.
 
Watch "That Sugar Film."
 
what @Allenph said
 
@Wes Start exercise with a diet of proteins and healthy fats(unsaturated fats)
 
4:22 PM
Keto works really well as long as you stay on it forever.
 
Wes
lol none of that ever worked for me
 
Sugar and lack of exercise is patient zero.
 
Wes
i am not eating sugar
 
Not just occasionally - has to become lifestyle to remain that way. You said you put sugar in your tea- how much?
 
Wes
except the little carbs that are in the lemons... doubt that counts as a lot of carbs
 
4:23 PM
eat less than you burn. but don't eat so little that you get malnutrioned. losing up to a kilo per week is healthy. everything above that is unhealthy.
 
Oh wait no- you said no sugar in tea. My mistake.
 
and if you want to eat more, you gotta burn more, which means activity.
 
Wes
i never eat sweets, i almost never drink soft drinks. only coffee and tea with some sugar
 
OK, guys I am leaving from work, which means I'll be cut off from chat. Maybe for the entire weekend if the SO team doesn't help.
 
try green tea lol
 
4:26 PM
80% of what is in the grocery stores in America contains sugar. Processed foods have been formulated to put the right amount of sugar to make you crave their food.
 
Wes
most of carbs i get are from vegetables and fruits, and pasta. about 80g/day
 
@StatikStasis He is from Italy.
 
fruits are full of sugar
 
I know that's why I said America because I wasn't sure how it was there.
Didn't want to speak for everywhere. =)
 
Wes
i don't eat plantations of fruits tho
all diet experts here
 
4:27 PM
@Carrick lol- did anyone answer your question yet?
 
@salathe wait, why does php docs link to Rebecca Black- Friday?
 
because it's friday?
 
It's.. WHAT?
!!friday
 
php is smart.
 
4:29 PM
@2dsharp Similar to stackoverflow.com/admin.php
 
@Carrick I don't know of a way to do it prior to downloading the file. =(
 
Can someone tell me what's up with these links?
 
@2dsharp They redirect the page to elsewhere
We built one into our website at work too coinwatch.com/admin.php
 
But... why?
Are they like- honeypots?
 
@2dsharp more like Easter eggs
 
4:33 PM
Hi folks!
 
Anyone know the correct syntax for specifying a range of characters in hex notation for a unicode preg? e.g. a-z is a range for a to z, how do you specify for the range of characters between 0x1f602 and 0x1f64f ?
 
@MadaraUchiha Your website takes a hell lot of time to load
 
Yeah it did for me too.
 
oh maybe - squigglies.... \x{0080}
 
VALIDATE ZEH FLAGS!!!
 
4:35 PM
but the guy has a valid point.....
 
well yes, but VALIUDAET ZEH FLAGS1
 
@2dsharp Looks like it had a server hiccup
All good now
 
Yeah, seems about alright now.
 
I have founded a startup and I received my first project to build a custom web portal for automating some tasks. I believe it can be done easily using PHP. But I have seen a lot of people actively hating PHP. Is it really that bad?
 
...you're in a room dedicated to PHP- what do you think we're going to say? =P
 
4:39 PM
@Davy PHP sucks. cc @StatikStasis
 
LOL
 
@Davy depends on what you are trying to do accomplish.
 
@Davy if you haven't programmed a large PHP project before, and you're using it as a basis for your startup, by the time your startup fails, you will also hate PHP.
 
For most cases, PHP sucks.
 
4:41 PM
Basically, if you have someone who's done some real stuff in PHP (by "real" I mean more than WordPress themes and/or plugins), it's a solid choice
Else, in 3-4 years, your dev will be in danger of slowing to a crawl.
If you're cool with that, PHP is an excellent choice.
 
In what aspect PHP fails? Scalability? Dependencies?
Or just the project structure?
 
@MadaraUchiha My university paid $22,125 to get a wordpress website built.
 
!!
What University?
 
@Davy It allows you to take shortcuts, which turn out to make maintaining large projects be more difficult that if you didn't take the shortcuts.
 
@2dsharp That just means that whoever did the sales was a magician.
Not that the PHP tech was amazing.
 
4:44 PM
@StatikStasis Just a weird Indian university.
 
Resisting those shortcuts, and not just hacking shit together is something that is difficult for people to resist.
 
@MadaraUchiha The company had the source code archive indexed in google.
So, I downloaded 22 grand worth of source code before the website even launched. And then I saw wordpress.
 
Any good examples of the worst shortcuts?
 
So, really crappy company, crappy code and yes, crappy wordpress.
@StatikStasis An Indian private university.
 
@Davy wordpress.
 
4:49 PM
Are people going to PHP World this year?
 
@Danack Agree. I have a project that was built using procedural approach-works great. As soon as the resources users needed became more complicated the whole thing had to be refactored with an OOP approach to maintain correctly. I'm still refactoring.
It takes a long time to fix something later than it does to do it right the first time.
 
It honestly never ends.
 
@Allenph make a visit to the US with it's current regime? chuckles in European.
 
@Danack I have no interest descending into the piggy den either, but.
 
Thank you guys! :)
 
4:52 PM
Thought maybe I'd get to annoy some of you in person. I ended up convincing them to let me go to PHP World instead of PHP Tek because I've heard you people are there some times.
 
Oh! I wanted to tell this to someone: today someone came to my office saying that they perform security audits and vulnerability checks for all kinds of software, ranging from websites to android apps. I opened their website right in-front of him to find their SSL certificate expired 15 days ago. I couldn't hold my laughter.
 
I'm skipping the gym today- heading to eat Mexican for lunch.
 
@StatikStasis yh fortunately...a bunch of guys helped me out lol
 
5:13 PM
good mornings you Rebecca worshippers
 
o/
 
6:00 PM
would like to know you guys suggestion on using str_replace or preg_replace?Which is good in multiple replacing?
 
@astrosixer if you don't need regex, use str_replace because it's faster. If you have a lot of strings to replace you could also use strtr. I prefer strtr to str_replace with arrays, simply because I can use an associative array in that function, which is better for readability imho
 
Why do we need to "create" the image with php when we want to do something with that image? I don't understand. What's wrong with just giving the images address to tell php where the image is?
PHP.net says "imagecreatefrompng() returns an image identifier representing the image obtained from the given filename.", what does it mean?!
 
6:15 PM
Just came across draw.io - I like it!
Starting to regret eating Mexican... not feeling so great.
 
Did you eat a whole mexican or just the arms/legs?
 
Do you eat arm and leg?!
 
lol
A HUGE burrito.
 
OMG like I hear about Burrito and Tamale from Mexicans all the time :)
 
I need some antacid and a nap.
 
6:24 PM
I have a guy for acid, don't know if it's suitable for ants
will ask
 
ha!
!!dad
 
Why did the can-crusher quit his job? Because it was soda-pressing
 
@Simon.B you need to load the image data into memory if you want to manipulate it. The imagecreate*() functions do that, and return a resource (like a file pointer) which is essentially an opaque blob of data that is used to tell the other image*() functions where the block of memory containing the image is.
however the fact that you are asking that question makes me wonder whether you need those functions at all, what are you trying to do?
gd should be avoided if you don't really need it, it's very memory-hungry in general (all images are internally represented as an rgba bitmap, so it uses 4 bytes per pixel) and there are potential DoS vectors as a result
it's very important that you get the dimensions of an image from a source over which you do not have absolute control (which you can do with getimagesize()) before you create a resource, and set a sane upper limit on the dimensions of images that you attempt to work with, specifically you need to check that $width * $height < $yourMaxSize
where $yourMaxSize is based on how much memory you are prepared to allocate for a single image
 
Hmm... Drank a root beer someone brought me from Wisconsin. Had a cup of coffee. Wife brought me a Vanilla Bean Frap with a shot of Espresso. Ate a spinach burrito with chicken and mushrooms- covered in Queso and Salsa... I've made a ghastly, ghastly mistake!
 
Wes
6:43 PM
@PeeHaa do you use php files templates, right? have any technique to share?
for example, how do you split templates in chunks, like, use require? how?
 
@DaveRandom Oh now I understand it, thanks. Well, about your second point, actually I was thinking about saving 4 or 5 (a number of) different sizes of an image so that each of them could be used for a different display size...
 
@Simon.B I assume this is an image a user has uploaded?
 
So what is the standard way to do that?
@DaveRandom Right.
I was thinking of doing the resizings just at the time that uploading was being done.
 
posted on May 25, 2018

New Cyanide and Happiness Comic

 
7:00 PM
@Simon.B Here's what I would do:
1) Start by using getimagesize() to get the dimensions of the image. I personally would use the tmp_name key of the $_FILES entry, I wouldn't ever use move_uploaded_file() in this case, but rather just get the dimensions from the file in it's tmp path.
2) Use the aforementioned logic to determine whether will accept the image based on it's pixel dimensions - you cannot use the file size alone to determine this because there are ways to create very small image files that will be billions of pixels.
3) If you are going to accept the file, load it using one of the imagecreate*() functions, then output the sizes you want to store by copying the data to new images using imagecopyresampled() and then storing them however you are going to do that.
at no point should you store the original file the user uploaded, only the resampled pixel data into new files
php will then clean up the temp file by itself
I don't think I missed anything there but feedback welcome ^
 
I have the strongest deja vu
 
/me out, bbiab
 
@DaveRandom Thanks a lot, I'm reading it
 
7:13 PM
For fucks sake.
We didn't get the contract. This thing was my baby.
 
Sorry about that. That sucks.
 
@DaveRandom This is a bit vague for me, do you mean there can really be a -for example- 2KB picture with millions of pixels? (And if I am correct in this, then the problem is with the very large bitmap that will be created by the gd, right?)
@Allenph That's a pitty, sorry
 
7:29 PM
I see other users getting more rep than Jon Skeet - I wonder at what point he'll be passed. Gordon Linoff answers a lot.
I could do the match I guess...
 
7:40 PM
@DaveRandom Yes this is a perfect explanation, you've totally nailed it, Thanks! <3
 
So... Gordon Linoff in the past year has earned 54,410 rep. Jon Skeet has earned 31,066 rep. Given there current total rep and if they both continue to earn the same amount of rep each year going forward, Gordon Linoff could surpass Jon Skeet in the year 2034 with a rep of 1,548,060.
That's a lot of fake internet points!
 
@DaveRandom But one more question, isn't there a "best" or maybe "universal" imagecreate*() function? You use a switch based on the image type to choose and use the proper one among all of them? (imagecreatefrompng, imagecreatefromjpeg, ...)
 
VonC has more total rep than Gordon Linoff but given his past year he will not surpass him first and will be a little ways behind both of them by that same year.
@Tom Today is the day! How is it going so far?
 
@Simon.B you can use imagecreatefromstring() for that, I have no idea why there is no equivalent for loading from file but afaik there isn't. However, despite the name, getimagesize() also returns information about what type of image it is, so you can use that to choose the appropriate function to read the file directly.
...which I recommend you do, otherwise you will also need to load the whole image data into a string, which could tip you over the edge of sane memory consumption if the file is large
I feel like I'm missing a trick there though, like there is something I don't know about that would mean you wouldn't need to switch on the file type returned by getimagesize()
@Simon.B yes, I know that particularly with PNG this is possible because the way it works is it has an embedded "palette" of colors and each pixel references a color from the palette, and you can specify blocks, so you can create e.g. an image with all black pixels and a 1000000 x 1000000 block of all black, the file size will be tiny but when you turn it into a rgba bitmap it will take 4,000,000,000,000 bytes of memory
iirc there's a similar thing with gif
I'm not particularly well acquainted with image representation and processing though, so do some googling if you want to know more
it's conceptually similar to a zip bomb
 
7:57 PM
!!google zip bomb
 
Search for "zip bomb -site:w3schools.com" (https://www.google.com/search?q=zip+bomb+-site%3Aw3schools.com&lr=lang_en)
• Zip bomb - Wikipedia - A zip bomb, also known as a zip of death or decompression bomb, is a malicious archive file designe… (https://en.wikipedia.org/wiki/Zip_bomb)
• algorithm - How does one make a Zip bomb? - Stack… - 22 sep. 2009 - One example of a Zip bomb is the file 45.1.zip which was 45.1 … data, containing nin… (https://stackoverflow.com/questions/1459673/how-does-one-make-a-zip-bomb)
 
Rofl. Never thought about that. Clever.
 
Tom
@StatikStasis No major explosions yet but once we get our first audit it will be interesting.
 
Did you see the message Danack dropped in here earlier from eBuyer?
hmm that wasn't it.
 
@DaveRandom (Sorry I got a call some minutes ago), Wow interesting, thanks once again.
 
8:05 PM
dealing with image upload is a great way to get an understanding of security and why user input should never be trusted, because it seems simple on the surface and a lot of newbies like to do it, but it's full of all sorts of potential attack vectors, it has DoS and RCE and all sorts of fun stuff
 
Tom
@StatikStasis Yeah that just isn't going to fly. I need to find out how to lodge complaints with the authorities and then I'm going on a complaint binge
 
oh btw @Simon.B you know to never use the name key of $_FILES, right?
 
@DaveRandom Not right :) Could that be invasive as well?
 
8:07 PM
@Simon.B At least check the magic numbers, but that's definitely not enough.
 
Tom
Nope... that's only for complaining about European Institutes
 
and also it's super important that you resample the pixel data into a new file, because it's also possible to craft images that can be used (in combinantion with other security flaws) to trick the server into executing arbitrary code
@Simon.B there's nothing stopping me (as a HTTP client) from specifying that the image I just uploaded is called index.php
 
@DaveRandom =D
 
if you then save that file using the name I supplied, I may be able to get the server to execute that file as a PHP script
 
@DaveRandom I think I'm gonna save this whole thread of conversation with Simon. Some good points in it I may need to look back over one day.
 
8:09 PM
in general the best advice for "how do I securely handle file uploads?" is "don't" :-P
use an external service, like gravatar for avatars or aws for arbitrary data etc
 
@DaveRandom But that's only a string!!, and is under my control! I know you're right but I don't understand this. :thinkinkg:
@DaveRandom /Me fainting :|
 
@Simon.B lets say I create a file that has a valid jpg head that matches the size of the data, but the pixel data is just a PHP script. I specify that my file is named foo.php. You take my file and you save it to /images under your web root. But because the server is badly configured, it will execute anything with a .php file extension in any directory as if it's a PHP script. When I go to /images/foo.php, PHP will output the file header and then execute the PHP script.
It's not quite that simple, but not much more complex and it's an attack vector that is known to have been used in the wild
wordpress is (was?) particularly susceptible to it iirc
There are plenty of ways to mitigate it after the fact and without code, but what you as a programmer can and should do is make sure you resample the image when saving it, as that will destroy the embedded PHP script, and don't trust the name that the client gives you for a file they uploaded
This is also why you shouldn't configure your web server so it blindly executes PHP scripts wherever it finds them
 
Well, you probably shouldn't store assets in a publicly accessible place to begin with.
 
Possibly, although not a hard no on that, depends what you are doing
 
@DaveRandom Now it's starting to click, but about the "name", I never use the unchanged file name, and I think no one else does as well(?) so that's safe?
 
8:17 PM
in general you don't want static resources going through PHP, unless you have a hefty caching layer
 
I always do it that way, especially if it's a REST API. :p
 
@Simon.B it's important that you don't use it in a file path. It's obviously fine to store it in a DB and present it back to the user as a label for the file that they can see in the UI
 
I am a fan of using UUIDs for uploaded file names, ymmv
 
Well, sometimes it's always a put.
Other times, yeah...a UUID.
 
8:19 PM
@Allenph you are tying up PHP workers there though, it's not good for scalabilty, and it can cripple load times if you are using sessions
 
I never use sessions.
 
@DaveRandom Is UUID the same thing as unique id?
 
if you aren't managing your sessions correctly you can end up with each resource being processed sequentially
 
I should Google that
 
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. The term globally unique identifier (GUID) is also used. When generated according to the standard methods, UUIDs are for practical purposes unique, without depending for their uniqueness on a central registration authority or coordination between the parties generating them, unlike most other numbering schemes. While the probability that a UUID will be duplicated is not zero, it is close enough to zero to be negligible. Thus, anyone can create a UUID and use it to identify something with...
!!package ramsey/uuid
 
8:20 PM
[ ramsey/uuid ] Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
 
You can use them as primary keys in most RDBMS
many can also generate them for you
 
^ Don't generate UUIDs in the DB.
 
why not?
I have done it both ways, never seen/come up with a convincing argument either way
 
Generate them and inject them into your entities constructor. You get the free benefit of an object always having the same identity, even before persistence.
 
That is a solid argument if the thing in question has an associated entity. I'm not convinced it would always make sense to do that for uploaded file meta data, depends on the nature of the app. otoh I suck at interfacing with databases :-P
The main argument I have for the other side is that there is a (admittedly tiny) possibility of a collision, and the db will deal with that for you whereas you've need extra logic to mitigate it if you generate them in-app
 
8:25 PM
That's not actually a real problem.
Because if that happens you're going to get an exception.
And the chance of a UUID collision is pragmatically zero.
 
granted, I'm just irrationally paranoid
 
Yeah, it's a weird feeling to give in to it, but...you have to eventually.
And that meta data would need some kind of identifier.
 
@Allenph resistance is futile?
 
If it's a UUID you should generate it first, if it's not there's no point in having this conversation about it.
@Tiffany When you start worrying about UUID collision probability you're going to put your brain into recursion.
 
you ruined the joke
 
8:29 PM
Because the chance is so extremely small that your brain can't comprehend it, and even if you check for a collision and have two chances to avoid a collision your brain can't really understand the difference between two probabilities that small.
@Tiffany I got you back then for my acid joke.
 
:P
 
$voltage / $current === $futile
I remembered the original reason I ended up having to generate UUIDs in DB for one specific project @Allenph and it is such a ridiculously niche problem that I'm not even going to bother explaining it because nobody else here will ever encounter it :-P
 
Well now you have to tell me. Jesus.
 
the summary is "endianness weirdness across machine boundaries"
but I doubt many of you have even run code on a big-endian machine and likely never will, especially not PHP
so like I say, totally irrelevant
ah found it, basically the reference machine (the one that hosts the database) is big-endian doesn't pack the UUIDs correctly for the wire, because the RDBMS itself expects to be running on an x86 CPU and has been ported incorrectly, so it was simpler to just let DB generate them and treat them as strings, because that always worked @Allenph
(ported wrong or built wrong, not sure which, veering way into the territory of stuff I only vaguely understand)
 
8:44 PM
How the fuck did you possibly run into that?
 
wait, you'll like this
 
I had to Google what that even was.
 
CS5100-0007D900A5C3# date
Fri May 25 21:45:26 BST 2018
CS5100-0007D900A5C3# php -v
PHP 4.3.10 (cli) (built: Jan 20 2005 09:40:04)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with the ionCube PHP Loader v3.1.24, Copyright (c) 2002-2006, by ionCube Ltd., and
    with the ionCube PHP Accelerator v1.3.3r2, Copyright (c) 2001-2002, by Nick Lindridge
CS5100-0007D900A5C3# cat /proc/version
Linux version 2.6.18 (v3p2@Linux Build) (gcc version 3.3.3) #9 Wed Sep 14 10:42:27 BST 2011
 
ThW
4.3 with ioncube ...
 
Sweet Jesus...
BTW @DaveRandom That must have been a bitch of a bug to find.
 
8:52 PM
@Allenph it's essentially how I learned that there is such a thing as processor endianness
many years ago, when I had even less of a clue what I was doing that I do now, if you can believe there was such a time :-P
 
cant touch with $atime=null – #76379
 
Yeah I can.
Because that's right now for me.
 
I am probably one of a very small group of people who learned how PHP 4 worked despite 5.3 being the current version when I started with PHP. Let me tell you, it's a completely different beast. It's like a cross between JS (in the sense that it's a scope-and-typing free for all) and C (where references/pointers are something you have to think about all the time)
on occasion I still write new code for it, it takes a good hour or two to get into the mindset required to write things that actually work, and (unsurprisingly) IDEs are no help at all, in fact they often actively hinder you
 
Why would you do that to yourself?
 
Because it's still a live system and it still works and occasionally I need to make it do stuff
 
8:58 PM
Shivers
 
@Jeeves there are loads of instances of this, need to do a normalisation exercise across the whole std lib
 
I've been trying to write C lately.
I hate it. I hate it so much.
 
Wes
\o
 
ThW
@DaveRandom I started with PHP 3.something once at a time, thankfully no system with that around any more.
and even PHP 3 made a lot of stuff easier (compared to Perl scripts in cgi-bin)
 
9:15 PM
...I started with classic ASP :X
I do not miss it
 
@Allenph C is just pretty assembler. I like it if I'm in the right mood, doesn't happen very often though :-P
@Tiffany I'm sorry
I didn't know
 
lol
I think I managed to scrape out the last classic ASP application I had to support a year or so ago. We needed an admissions application that was specific towards a business, and we had switched our admissions application to the self-service part of our ERP, from the old classic ASP admissions application. I had to bring it up from the dead for that.
 
ThW
@Tiffany I can understand that sentiment
 
@DaveRandom I do EE. Have to use it on MCUs.
 
I think I'm having a brainfart but I really can't find it.. can anyone find the direct url to download manually an image from docker hub? say, ubuntu latest?
 
9:18 PM
6
A: Downloading Docker Images from Docker Hub without using Docker

igalSo it turns out that the Moby Project has a shell script on the Moby Github which can download images from Docker Hub in a format that can be imported into Docker: download-frozen-image-v2.sh The usage syntax for the script is given by the following: download-frozen-image-v2.sh target_dir im...

 
ThW
Little survey: Is ANT an exotic tool for PHP developers?
 
@DaveRandom ta
 
@pmmaga ftr first result when I googled "dockerhub download image" :-P
maybe go get some sleep?
 
maybe... i was going the "docker hub api" and the likes and wasn't finding anything
 
@ThW presumably since I don't even know what you are talking about :-P
 
ThW
9:20 PM
@DaveRandom ever heard of Phing?
 
not in any real sense, i.e. I think I read the summary and thought "I don't think I need this" and never gave it another thought
 
ThW
@DaveRandom Do you use a build tool?
 
still.. i just wanted an url to curl.. this is nuts
 
no, I don't really understand why I would need one, but I guess it might make sense if shipping code to customers - I have always worked in situations where me/my employer also fully manages the hosting
In that scenario I don't see what a build tool would do
 
ThW
I use it to setup the dev environment and export distribution packages from it.
 
9:25 PM
actually a more accurate statement is "I don't see why you would have a project repo that needs anything more than composer install to work"
 
ThW
ANT is a Java based build tool, Phing the PHP port of it
 
we do use ant for a php project at work :P
 
ThW
@pmmaga interesting, why not Phing?
 
@ThW Re setup, I generally commit the web server config in the top-level project repo, with an include that pulls the server-specific stuff in (much like a config.php approach). By "distribution packages" I assume you mean deps, so composer
but liek I say, that's based on having control over the hosting env
 
ThW
@DaveRandom not just deps
 
9:29 PM
what else then?
ftr I'm absolutely not saying "my way is the right way", btw
 
What is ANT?
 
ThW
I have properties file that allow you to configure the database connection, and build target that generate the configuration from it. Other target install/update the dependencies and fetch version information from the composer.lock to write them into a file that can be read by the admin-ui
stuff like that
 
Hmmm.
Sounds like additional complexity.
 
@ThW for one I didn't know it :P but the build.xml predates me at the company and maybe even phing itself
 
@ThW I just have a local script which does git fetch and checks out the latest tag and then runs composer install, and if I need the project version I get it from git describe
I can see the value in what you are doing but so far I'm not sold because it's all minor things for which I have acceptable mechanisms, so not worth the hassle of a migration
oh hey @ThW you like insane things, check out this arguably unnecessary thing I made github.com/DaveRandom/JOM
 
ThW
9:36 PM
I basically do the opposite - My export task uses describe to get the git tag, copies file into a build directory and runs composer install --no-dev.
@DaveRandom Well, Phing has IDE integration :-P
@DaveRandom no jPath yet?
 
> including an RFC 6901 JSON pointer implementation
that's as far as I have gone so far
the actual endgame here is to build a non-shit JSON schema impl, which I started doing but quickly found it was massively complicated to deal with tree traversal in the things that json_decode() returns, because you have no real way to know what anything is going to be and you end up having to carry a load of state around with you, so I made a thing which is a traversible tree :-P
which admittedly is still carrying all the state around, but wrapped up in the data itself so there's less to think about in the schema validator logic
 
ThW
yeah, imho the main problem with JSON (or SimpleXML) is that the try to treat data structures as nested variables, not a dedicated object structure, looks really easy at the first glance but is a big pitfall.
 
yes, very much that
and the array/object thing is completely unmanageable, I always use array mode but for arbitrary data it's a huge pita
 
ThW
9:52 PM
@DaveRandom interesting I prefer the object mode, but have fallbacks for the array mode
I am working on a talk about build automation (with Phive and Phing) currently.
 
@ThW before 7.1 object mode had one of those PHP oddities where it would actually mangle data in one admittedly very specific and probably irrelevant scenario (object key of empty string), and IIRC there is some specific case with numeric keys where you can end up in a state where you can't access an existing property at all unless you convert it to an array (I might be wrong about that though)
 
ThW
Do you have some examples for weird JSON? FluentDOM has a loader/serializer, so I would be happy to to get some edge cases.
 

« first day (2778 days earlier)      last day (2173 days later) »