« first day (2797 days earlier)      last day (2164 days later) » 

3:00 PM
that's irrelevant, the structure of the array has nothing to do with the outcome of the query
 
@GuilhermeR that's not your problem. Do you actually have any produtos with the name like %pesquisa% in your DB? (it also looks like you think you are using a variable and you aren't)
 
my crystal ball is saying it's a case sensitive collation issue, but it's been on the fritz lately
 
@LeviMorrison Could you not use mb_substr?
 
@DaveRandom man icu docs are shit
Are you saying that the character iterator is actually an extended grapheme cluster iterator?
 
3:02 PM
I don't know
 
guys Its working
 
it's almost impossible to tell from the no-docs
 
Apparently yes
It's so helpful that the main docs don't even mention the word
 
btw @PaulCrovella would be a good person to ask about this
he seems to sort of vaguely comprehend ICU
 
this symbol '$' was missing
 
3:04 PM
I mean, for a project that's sole responsibility is to deal with unicode using a not-at-all ambiguous word like "character" is just great
 
@GuilhermeR great. next stop: go read about prepared statements. as it stands, your code is vulnerable to sql injection
 
thank you
 
PHP Warning: ftp_get() expects at least 4 parameters, 3 given – #76471
 
@pmmaga @GuilhermeR actually you should probably just read this wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers
 
@DaveRandom when can you review the tutorial page? :P
 
3:07 PM
@GuilhermeR Congrats! Feels good, doesn't it?
 
sure
 
@Tiffany @PeeHaa chu, I choose you!
 
lol
 
@DaveRandom heh, that method is documented as having an optional parameter but it's not optional .
 
standard
@LeviMorrison it's not optional but it is nullable :-/
I feel like that's essentially a typo tbh, fixable and backportable and completely safe
 
3:12 PM
@Tiffany Aye. Sorry forgot about that one. Good to merge to me
Ping me later
 
Also, it appears it doesn't return the grapheme, it returns an int so I need to figure out what that int means.
 
thank you for your unlimited patience with me
 
It looks like the key might be the beginning byte offset and the value is the ending byte offset?
 
...wut
 
@DaveRandom hey this could be really useful for me ... thanks for letting me find out this!
 
Wes
3:19 PM
i used some glue and it's still on my fingers. that was 2 weeks ago
 
lol
@JoeWatkins "If you think there is any legitimate justification for a class that has more than 200 methods" .. lol
 
Wes
diy they said
 
I agree
 
@DaveRandom I know, right?
 
Wes
as a matter of fact there are plenty legitimate justifications for that
what about insanity for example? :B
 
3:21 PM
It's not that crazy, though: it probably doesn't want to allocate much if anything so returning the offsets let you do whatever you want. Although I'm still not sure what I said is accurate as to what the integers mean...
 
@LeviMorrison I think the key is just a zero-indexed counter. For your original sample string I get 7 iterations, and since it's named "break iterator" I think it's essentially like iterating all the \bs, and it seems to give the byte offset of the break
which basically means you have to ignore either the first or last iteration, and still use substr() to extract the values, so it's not going to avoid any strcpy() at all, and it's got a way higher fcall overhead, so it's probably slower than pcre anyway
 
@LeviMorrison I think you can use getPartsIterator() to get the strings
 
oooh
 
lol this should not be this hard
 
someone hem hem should probably write some docs :P
 
3:26 PM
@NikiC works
 
@NikiC I wonder what the parameter is :D
 
@LeviMorrison The key type, duh!
and it's an int, while docs say string. sigh
 
one more question
 
I'm currently in class and it's really hard not to laugh out loud at the absurdity of all of this :)
 
3:30 PM
on the up side, if you have entire of #11 at your disposal to complain about the docs and interpret the src for you, it does work pretty well
it even copes with illogical garbage like emoji with combining diacritics
 
How can I echo a double quote like this: ""?
 
@DaveRandom 3v4l.org link?
 
@GuilhermeR "\" \""
 
@GuilhermeR try echo '""';
 
@LeviMorrison icu not installed on 3v4l, at least not on 7.3, moment
 
3:32 PM
!!> echo '""';
 
I think this is correct:
function grapheme_iterator(string $str, ?string $locale = null) {
    $cit = IntlBreakIterator::createCharacterInstance($locale);
    $cit->setText($str);
    $it = $cit->getPartsIterator();
    return $it;
}
 
@LeviMorrison you should be able to just pass the null value through
 
@LeviMorrison 3v4l.org/gJVbR
 
No need to call Locale::getDefault() manually
 
3:33 PM
you can't see them because the browser doesn't render them because they make no sense, but the music notes and cat both have combining umlauts which are correctly included in the byte values emitted by the iterator
 
Good work, team. We should publish somewhere... where on earth could we put it? If only PHP had a common documentation platform...
 
make one on the room11 server?
 
maybe we could ask those Parents Helping Parents guys to host it
 
@LeviMorrison If only PHP had a common documentation platform that wasn't based on SVN and DocBook...
 
As far as errors go:
1. `IntlBreakIterator::createCharacterInstance()` is not actually optional.
2. `getPartsIterator()` does not take strings, it takes ints from a particular const family.
Did I miss any?
 
3:40 PM
or make a github repo or something... I dunno
 
s/github/gitlab :P
 
meh
 
I think I will be migrating too, for one simple reason - moving the sidebar to the left side made it look uglier
 
Just saw a resume that said "senior WordPress engineer."
o/
 
@Allenph they're really good at making wordpress plugins
 
3:43 PM
\o
 
@LeviMorrison said consts are actually exposed to userland and their existence is documented, at least php.net/manual/en/…
 
How's the job hunt going @DaveRandom? Any good leads yet?
 
a couple
a gentleman doesn't interview and tell
despite not being gentle, or in many respects a man, I won't either
 
So... a roughwoman?
 
So I form in my site with an input field
 
3:47 PM
I will go with clumsyhominid
 
@DaveRandom kk good
 
and the words that are written in that field is stored in a variable
 
@DaveRandom Should I consider it not being optional the bug? /cc @NikiC
 
and I want to print that words inside double quotes
 
@DaveRandom I should expect for someone with your kind of experience to get plenty of offers.
:P
 
3:49 PM
@LeviMorrison yes, that's the bug
 
@GuilhermeR Make a gist, post the portions of code and your whole question with all the explanation in there and then share the link here. It'll be easier for you and us.
 
Though I'd suggest fixing it instead of reporting it
Updating NEWS entries across branches takes much more time than adding |
 
I've never used nullable as an optional; would this be correct "|s!" ?
 
0
Q: Error 403 after moving from development to production

helloI am trying to deploy a working local laravel 5.6 app to shared production environment. I took the following steps: Copied from local folder to production folder created vendor folder in main production folder run composer update run php artisan key:generate run chmod -R 755 storage move public...

 
4:02 PM
@NikiC i_zend_verify_property_type() is driving me insane when exactly I need to free and when not … and when it's fine to pass twice the same val … and I have to handle the reference case ... Deferring that to tomorrow (I'm currently writing the ASSIGN_STATIC_PROP impl.)
 
@NikiC yeah, same problem, though not at that place
 
UML software suggestion?
@tereško Did you ever find anything when you were looking?
 
@GuilhermeR Check 3v4l.org/tDUev
 
4:07 PM
@Allenph yEd, I guess
but I actually gave up
 
Meh.
 
I guess I'll go with one of these crappy online solutions then.
@pmmaga Is that the first thing you saw or what you use?
 
neither :P it's what a guy in my office who actually does those uses
 
4:10 PM
it worked
thank you
 
and anyway, defining them in code and then using it to get a graph representation sounds like a sane approach to me
 
Programmer of the Year!
7
 
lol
 
@Danack Why does it not automatically fix the username? ;-)
 
nah, just let users log in by entering their account ID, those are unique and you can just let the db generate them
 
4:26 PM
I say remove the auth process and just open the admin account by default for everyone.
 
it's a free world, right
 
it sure is
 
Hi
PHP Generators are ordered or unordered?
 
@Tiffany please note that my generic agreement feedback is no longer free, you owe me $15000 payable within 14 days
 
Array functions ignore object property permissions – #76472
 
4:31 PM
@DaveRandom shit.
will you take an IOU?
 
Wes
@Danack cmon that must be fake for sure
 
@Tiffany an investor-owned utility? sure, but the investors will need to agree to give me a controlling interest
 
@Tiffany lol
 
@DaveRandom an "I owe you"
 
!!thejoke
 
4:32 PM
Air traffic control, this is "the joke" seeking clearance.
"the joke", this is air traffic control. Maintain an altitude of 10,000 feet agl and proceed normally over the head.
Air traffic control, this is "the joke", roger.
 
@DaveRandom poe's law
 
Power just went out and the backup generator didn't kick in for a few seconds.
Never seen the sysadmins have that look before.
 
@Allenph had that happen a year or two ago... servers completely shut down for two or three hours after battery backups died
Only time I've ever seen our department completely dark, emergency lights and everything.
Some plumbing company was boring and hit an electrical line, took out power for I guess a small portion of town.
 
boring or just bored?
 
probably both
 
4:36 PM
I hear boring is boring
 
@Ekin wat
 
yeah, that data center was flooded multiple times...
 
there was an incident in a data centre in manchester ages ago where the power went out and the backup generator burst into flames immediately after it was started and burned half the building down
3
 
ö.O
 
4:39 PM
that's the sort of quality british engineering that's going to make brexit work out so well
 
@mega6382 I use solarized-light :/
 
chat.stackoverflow.com/transcript/message/38218728#38218728 was pretty sure the outage happened after I had started frequenting here, fun times
@DaveRandom makes me think of an IT Crowd episode where Moss wonders why the fire extinguisher caught fire, and it has "Made in Britain" on it
 
Dunno what you mean, Britain is the best at everything. Especially superiority complexes and humility.
3
 
2 messages moved to Trash
 
5:24 PM
\o
 
o/
 
\o
 
Wes
o/
 
o/
 
5:39 PM
@Ekin Duuuude. Do you have pictures?
How did that happen?
 
I want to play something ... I dont know what
 
@Allenph I have but $deity knows where are they now. It happened whenever it rained a lot until for the 92348930th time they fixed the roof
 
@tereško Oxygen Not Required?
there's a new PoE expansion
 
5:54 PM
hmm ...
I will give "Valley" a try
@Tiffany that is going to have a major (map-regen) update in two days - not worth starting a new map now
 
6:21 PM
@PeeHaa how did you / would you solve / think about the duality of having a server (php) side modelling of a tiled map with its canvas / javascript counterpart?
cc @anyone interested
 
@FélixGagnon-Grenier I just generate maps server side and throw it over the socket in way the map part of the engine understand it
 
right. so, in a context where one would be creating a map from the engine, you'd send each action back to the socket?
 
yeah
 
gotcha. that sounds good
 
6:24 PM
You mean generating a map on the server side not actually generating the tiles themselves, right?
 
well, the map is composed of a 2d/3d matrix containing tile abstractions, yes
 
What are you doing? Sounds interesting.
 
@Allenph Basically a map of coords (/indexes) and tile info
 
Yeah. For a second I thought when you said "generate maps" I thought you were talking about the full rendered "map" not a map of tiles.
 
Neh. That's part of the rendering engine
 
6:26 PM
@Allenph I'm trying to create a map engine to be used in dnd game sessions
 
Yeah. Exactly.
 
along with a few other things
 
@FélixGagnon-Grenier Rofl. That's pretty funny.
I have an ex co-worker who did this already.
 
I'm not at my first reinvented wheel, in all honesty
 
@FélixGagnon-Grenier I think we are all guilty of that :)
 
6:27 PM
@FélixGagnon-Grenier Wut?
 
:)
@Allenph that sounds like a really nice idea
like, basically, free cooling forever
until greepeace gets on it
 
Fuck those hippies
 
until they put a few thousand in the ocean and it raises the temperature even more
 
bah, soon the north pole will be floating southward to compensate, no problem
 
6:32 PM
just waiting for when the ocean evaporates and "holy Terra" is covered in a gigantic hive city
 
BTW @FélixGagnon-Grenierare you going to support scaling of the map?
 
yeah.
basically, in that context, scalling means changing the width of a tile
 
k
 
I'm creating the rendering so that tile width is a const used in all calculations
I'm thinking of having + / - buttons scalling down 25 px at a time
 
I had a hard time with scaling on mouse scroll last time
 
6:36 PM
Ima totally forget that for now :)
 
As I wanted to "zoom" into on the mouse pointer position
 
going for le coffee, brb!
 
later
 
@Tiffany Speaking of this I saw some really cool stuff about fusion reactors the other day.
Is it all hype? Probably. But, really crazy design.
It's kind of like a fusion internal combustion engine so it goes in cycles instead of maintaining a plasma stream perpetually.
 
evenin
 
6:39 PM
evening
 
eveningg
 
hola @mega6382
 
The heat is killing me, i feel like my face is gonna melt off. 44 degrees
I am just gonna stay indoors the entire summer
 
@mega6382 That's cold AF.
Oh...wait.
 
Celsius
 
6:45 PM
@PeeHaa yeah that's epic
 
@Allenph I recently discovered this: draw.io //cc @pmmaga
 
not sure I'd go that way
 
@StatikStasis That's what coworker suggested.
 
I'm late to respond- been in meetings for a while.
@Danack I hope that's fake...
@DaveRandom The best things do indeed come from Britain such as America. Thanks and God save the queen.
@tereško Have you ever tried They Are Billions?
 
@StatikStasis nope
@Allenph it has been around for at least 5 years - they still dont have a stable ignition
 
6:52 PM
Yeah. I'm sure it's all hype but it's still interesting.
 
I think the tokamak has a better chance of working
 
I've only ever ready about two designs.
@tereško They're halfway through building a giant one in France I think.
 
there are multiple of those
also, there is the 3rd design, a USA thing in NIF
 
Most addictive game I have played in some time.
 
@StatikStasis I know of it
 
6:54 PM
PHP_INT_MAX doesn't mention 64-bit value – #76473
 
and you really need to try ONI
it's more addictive :D
 
what are you talking about?
 
I will check it out. I remember watching the video for this. I need to watch someone play it on youTube- will look now.
 
@Allenph but I really hope that at least one of those turns out to be a sustainable source, because that's the tech we need to actually start to looks at having a moon base
@Shafizadeh nuclear fusion reactors and gaming (there ate two threads right now)
 
@tereško Why do you need fusion for a moon base?
 
6:56 PM
hmmm... I'm trying to implement an ArrayAccess that accepts specific types instead of just offsetExists($offset). is there an interface for that, or must I manually check the types inside the methods?
 
There are sufficient designs for several kinds of LFTRs and even a light water reactor if you want to get quick and dirty.
In fact they fly reactors all the time. I think they're inefficient thermocoupler ones mostly though.
 
@Allenph try watching this thing (and actually the "concepts" video too), it should cover the majority stuff: youtube.com/watch?v=bGcvv3683Os
 
@FélixGagnon-Grenier There is a way, but there isn't a good way.
 
I'm all ears
 
6:58 PM
This is the way I do it. It sucks, and you have to override the checkType method in order to do a collection of scalar types but...whatever.
 
oh yeah, I meant only a specific type of offset, but that's the principle indeed
$tileMatrix[new Coordinates2d(0,2)] = new DefaultTile;
^ that's the goal
 
@Allenph I actually recommend subscribing to the entire channel :D
 
Yeah. I've been looking for more new YT content.
 
aside from speech impediment, that guy has really good content
 
Yeah. I feel bad but the impediment is bugging me.
 
7:03 PM
you get used to it after the 3rd video :D
as I said, the content is worth it
lemme see what else I can recommend
 
@tereško Meh. I like my channels separate. I'll probably just stick with the science stuff.
 
@Allenph those are different channels by different people
 
Oh.
 
7:12 PM
and content is in generally "interesting"
 
Hmm. Thanks.
 
in the parenthesis is the general political affiliation (if any)
and I picked the ones that are medium-range channels
 
Nice. I find it hard to find actually well thought out alternate opinions...because I'm bias obviously...but also because anarchists are more prone to infighting than external debates.
 
Does php expose the raw library functions that are used in the date extension to userland?
 
@Allenph I think you can also add youtube.com/channel/UCe9g_wsVXN17qmw8kPk4hRw (sociology, liberal)
 
7:23 PM
This dude seems like he's more a futurist than a pragmatist.
 
he IS futurist, but his reasoning seems solid (though, too optimistic at times)
 
@tereško I really like Manley but he doesnt push much non KSP content anymore.
 
@FélixGagnon-Grenier its basically the main operator that you would want
@Allenph he is not in my "sub" list, but in the "recommendations"
 
Definitely recommend if you're willing to sort for good videos.
 
7:29 PM
I have tried many favors of Monster Drink, but I've yet to find a single decent one.
 
In the previous version of SO, when you focus in search input, it would expand (width perspective). And when you blur that input, it would "<what word>" again? (I mean being tiny again)
 
@Wes i have at least 4 twitter followers who were pretty obviously trying to follow him.
 
@Allenph oh, another random channel I can recommend: youtube.com/channel/UCRIZtPl9nb9RiXc9btSTQNw (food recipes)
 
I don't cook unless it's really refined. Other than that I just eat microwave pizzas and pasta.
 
7:32 PM
@tereško yeah. I resorted in creating a static offset factory class that always return the same object for specific coordinates
 
@Shafizadeh placeholder?
 
@tereško nope, I found the word, it's "shrink"
 
oh, that
 
@FélixGagnon-Grenier I would not make a factory method static.
If it's a named constructor maybe, but if it's on a factory object...nah.
 
7:34 PM
lol .. "object"
 
;)
it's not like I'm committing on an architecture or anything...
 
What did I say wrong?
 
well, it's not instantiated
 
btw, @Shafizadeh, you too might benefit from youtube.com/channel/UCRIZtPl9nb9RiXc9btSTQNw channel (since I assume you like to eat tasty things)
 
@tereško everybody like eat tasty things :-) ..! I will take a look at it, thx
 
7:35 PM
When you make a static factory method instead of instantiating a factory stuff like __construct() { $this->thingy = Factory::staticMethod() } happens.
 
Wes
@Allenph don't pretend you know what you are talking about :B
 
@Wes I don't know what I'm talking about. That's how I understand it though.
 
@Shafizadeh my younger brother is a vegan .. I have reason to disagree
 
And I've definitely seen what I just posted done.
 
@Allenph you might be missing what I'm using this for
but I appreciate the advice, have no worries, I'm somewhat aware of dependency injection concerns
 
7:38 PM
Probably. Explain though if you don't mind...I'm always down to learn something.
I thought I understood factories now, but that's a recent development. I'd rather find out I"m wrong now than later.
 
@FélixGagnon-Grenier I actually agree with @Allenph here: you factory-thing should not be static
it will lead to terrible issues later down the line
 
@tereško Hmmm .. I'm staring at delicious foods .. yummy. By the way, sharing that link with me is like a torture, since I'm fasting in this month
 
Eat your heart out @Wes.
 
yeah, I'll probably make it an instantiated thing that's passed to stuff that needs coordinates, but at this point, there's no architecture or anything
 
@Shafizadeh :D perfect
 
Wes
7:41 PM
i don't think felix needs this kind of advice. you sounded arrogant
also probably wrong advice
 
btw, I thought it applied only for when the sun is up, @Shafizadeh
 
I was a bit on the canadian side of it, but I'll admit I was minimally annoyed. Thanks Wes ;)
 
@tereško True .. but making those foot takes a while, probably until the sun comes up :P
 
Sorry @FélixGagnon-Grenier. Didn't mean to come off like that.
 
btw, in western cultures "fasting" usually means "no food" .. and there there is even keto-diet, that is based on some aspects of "fasting"
 
7:44 PM
ah .. good
 
No problem. It absolutely is true, and as I said, I'll probably make it not static, but in the state of "I really just want to make tests pass and prototype this", I'll postpone it :)
 
Wes
that Coordinates2d looks like a value object. if there is an use case for a static object pool and a global factory, that would be it :B
 
:)
yeah, that's very much what it is.
 
I actually wan to try it out, @Shafizadeh, since one of the supposed benefits of western-fasting is said the be "optimization of mitochondrial network" ... but what I am aiming at is something in the 4-7 day range (and after summer solstice)
 
I recognize the point that it might be preferable to make it a dependency in whatever classes need access to it, but I'm not sure about it either
 
7:49 PM
in other news - today was the first time in 2 years, when I started borwing job advertisments sites
 
@tereško My buddy did this for like two years. It definitely worked...but I think it's something you have to do in perpetuity to be useful.
 
@tereško anything worthwhile?
 
As soon as he got off it, even though he limited his calories he got bigger again. I'm not a nutritionist though. :p
 
@FélixGagnon-Grenier I was just looking at local things. Way too much "frameworks as a requirement".
but on a positive note: only one of the serious ads was "laravel"
 
@tereško fasting for about 1 week in the not-summer. good start. You know, fasting gives great feeling to me (and even Mark Holland, Canadian MP)
 
7:53 PM
@tereško maybe there's hope still for latvia!
 
@Shafizadeh non summer? Are you insane? Do you remember when I said that -15°C was "nice warm day" in the winter?
 
@Shafizadeh what is "MP"?
 
minister-president
as in "lead minister" in government
 
@tereško :-) .. Yeah I remember those really-cold day in your country.
 
wait .. no "MP" was something else in north america/britain
 
7:56 PM
@tereško It's something like "parliament agent"
 
That would be Prime Minister? But current Canadian PM is Trudeau
 
in UK/US/Canada it "elected representative", I think
@FélixGagnon-Grenier what is "MP"?
I confused it with PM
 
I don't know, that's what I'm investigating
it seems related to being in the chamber of commons
 
@tereško Member Of Parliament
 
oh
 
7:58 PM
@tereško Prime Minister
 
Ok, I'm going to eat some food, tomorrow is the last day of Ramadan (the fasting month)
 
right
@Shafizadeh it was sundown like 2 hours ago for you :D
 

« first day (2797 days earlier)      last day (2164 days later) »