« first day (3605 days earlier)      last day (1337 days later) » 

12:00 AM
Is there anything i can do here test this up and fix?
@Dereleased that may be the reason. Let me check
 
https://support.google.com/chrome/thread/23534509?hl=en

Suggested: either disable it in settings, either change user/pass combination.
 
Yes it was because of the commonly used password. Thanks everyone
Just got a demo
Could u tell me is it better idea to encrypt the password while sending as post request while login?
 
Hash the password
Do not encrypt
Use password_hash
 
No.
You don't do that on client side.
 
@Tiffany I can offer you a read only container-based file system, you know... ;-)
 
12:15 AM
I don't want user to see the password while inspecting the ajax call
Yes in back end I am hashing and saving
 
@astrosixer That user already typed password. What's the point?
 
What if someone else happens to see this while he just left open the inspect tool
 
If someone is standing over the user's shoulder AND he has the inspect tool open, it's no longer your problem that he has bad physical security.
 
^That user is responsible for that.
Not you as developer.
 
Beat me to it :P
 
12:19 AM
Send the password in plain text over a TLS-encrypted connection to the server, hash it there using password_hash() and related functions, and then discard the plain text version.
That is the Industry Standard Correct Way To Do It(tm).
 
OKay fine.. I was just overthinking the situations
 
That's fine too. :)
 
It's easy to over think things, thinking you're doing it right, when in fact the extra complications make it worse. :-)
 
TDD helps to avoid lot of overthinking, probably.
No one's going to write tests for things that never happened. :D
 
Yes that why I came here and thought will ask
 
12:27 AM
You are sending plain text as password.
But to be safe, it has to be sent over TSL/SSL otherwise let's say technician in your internet provider can see what it is.
If server is using valid SSL certificate, no one between client (i.e. browser) and server can't presume what is behind string of 2048 length.
That plain text will live while request lives in cycle. When server send response back it is not live any more (that plain text).
 
@Tpojka thanks it seems a tutorial like i have been searching for a long time.
 
It is literally first two things I queried google for "docker nginx ssl".
 
I missed the ssl part
 
I mean, I googled for that because I thought issue is in installing SSL to Docker Nginx container.
 
 
1 hour later…
1:51 AM
Why does TNG almost always use the camera angle of the Enterprise sloping above the camera? Especially at the end of an episode...
I'm beginning to wonder if there's a trope
 
 
4 hours later…
6:19 AM
hi, i moved to a new server and here, the sessions do not save across pages
 
 
2 hours later…
7:51 AM
> ext/opcache/minilua /usr/local/src/php/8.0/ext/opcache/jit/dynasm/dynasm.lua -D X64=1 -D ZTS=1 -o ext/opcache/jit/zend_jit_x86.c /usr/local/src/php/8.0/ext/opcache/jit/zend_jit_x86.dasc
I'm seeing ZTS=1 here even though this isn't a ZTS build. I'm doing out of tree builds and my guess is that since the minilua command is writing a file in the source and not the build directory, that maybe it's being contaminated from another build?
 
8:45 AM
hi guys, can anyone open this with/without proxy?

https://lamtakam.com/
 
9:29 AM
@Trowski I just found out you pinged me about (ext) async a few weeks ago. I did not follow the chat at the time and for some reason received no email notification... Anyways, I am still interested in PHP fibers. Ping me again when you are online, I will get back to you.
 
@Shafizadeh Link inaccessible.
Good morning.

\o
 
 
2 hours later…
11:02 AM
@Tpojka Yeah .. I have no idea what's wrong with it .. It works well in Iran .. Do you know in which layar may the issue is? DNS server?
 
@Shafizadeh Have you contacted hosting provider?
 
not yet
is it because of the company I've bought the VPS from?
 
FWIW, I can't access it from the UK either
 
It's their responsibility in first place.
At least place where you want to start digging when site is not working.
 
ah ok thanks
 
11:08 AM
Tell them that visitors from all sides of the world complain that can't reach website.
@Shafizadeh Start there.
 
sure .. I'm just contacting them
Is this understandable enough?
Hello.
Sadly visitors from all sides of the world complain that can't reach the website.
I use Cloudflare as my website DNS server. I've even changed it once but there is no success.

What's the issue? Here is my website: lamtakam.com
Please help me, my website's visitors are dropped :-(

Regards
 
Contact Cloudflare first.
 
Doesn't CloudFlare not act for Iran? I remember hearing something about that
 
You know, I've changed it a few hours ago .. the issue was still exists ..
 
11:17 AM
actually, with wget I get an infinite redirect
 
yes, too many redirect is the error I get in Chrome
 
@Shafizadeh Any changes could take up to 48 hours and it sometimes depends on hosting provider quality.
 
so, what does it mean?
 
You sure you don't have rewrite rules messed up somewhere then?
I got to go, good luck.
 
11:19 AM
Here is the .htaccess file:
Options -Indexes
RewriteEngine on

RewriteCond %{HTTP_HOST} ^www\. [NC,OR]
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L,NE]

# To match/replace ip with domain
RewriteCond %{HTTP_HOST} ^\d+\.\d+\.
RewriteRule ^ lamtakam.com%{REQUEST_URI} [L,R=301,NE]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([\s\S]*)$ index.php?rt=$1 [L,B,QSA]

<Files *.php>
    Require host lamtakam.test lamtakam.com
 
Have you changed htaccess recently?
 
nope
 
Hi there, do you have any tips on setting up a dev environment for php-src? Right now I'm using clion and the workflow I'm using it's a bit annoying. I'm simply running a test to see if my changes are breaking something.
 
@Shafizadeh Can you check if this is still correct IP: 95.216.161.63?
Also, @Shafizadeh you should discuss with Cloudflare and hosting provider about issue. It is almost impossible to tell why site is down without data that their supports could check.
 
@Tpojka yes the IP is correct
 
11:26 AM
Just contact them but with phone or chat.
Mailing could last days.
 
well, sadly I cannot talk in English :-( ..
but sure, I will try to contact them through the chat
 
Who is talking here in chat for you?
 
It's myself, I can write in English (somewhat)
 
It is understandable enough for talk. Prepare some points/tags on paper what you want to ask them.
 
good idea
 
11:34 AM
Also, don't miss to tell them in details what have you had changed since it can help them to help you.
 
sure, I will tell them the whole story
all I did, I added another nameserver to my DNS server
and I removed again, but still the error exits
 
Info for them.
 
12:07 PM
Morning
 
12:24 PM
morns
 
12:49 PM
@Shafizadeh are you not using Cloudflare's Flexible SSL? It'd mean your webserver will endlessly attempt to forward the browser to https because it doesn't detect that it's already used
 
I use !
 
1:08 PM
well - that explains your problem right?
 
huh? you mean I have not to use it?
 
that is up to you. But if cf transforms https to http for you - then your htaccess is incorrect
 
@BogdanUngureanu clion is a bit finicky with php-src, I can't remember what others use though
 
1:23 PM
@Shafizadeh do you understand the problem?
 
1:36 PM
@Tiffany yeah, autocompletion is a mess for one.
 
Evening, or morning / afternoon
 
1:58 PM
I wonder if there's a plugin for clion to make php-src easier to work with
 
I'd settle for just being able to right click on something and go to the declaration without it going "NOPE!"
 
2:14 PM
Yup, and that. For some parts it works though
 
Jul 23 at 8:20, by IluTov
@Tiffany @SalOrozco Yeah, CLion sucks ass with large projects. VSCode works ok-ish. Not all things are great but auto-completion and jump to definition are pretty ok. There are also plugins for gdb/lldb for debugging.
 
@kooldev Hey! Thanks for getting back to me. I'd really like to put together a simple fiber extension that supports awaiting within internal calls. Kept simple, I think the extension would have support to be included in 8.x.
 
Good Morning o/
 
@kooldev o/
 
2:30 PM
@Trowski Do you want to go with fibers or with async tasks and a scheduler?
 
@kooldev I was leaning toward fibers. I'd like to make something superior to async/await.
 
Why do you think that fibers are superior to async/await? I am asking because I played around with both of them for a long time it never occured to me that fibers are better in any way.
 
async/await still has the problem that promises have – suddenly everything in your program returns a promise.
 
@kooldev I think the question should be rather the other way round - because fibers clearly allow to not pervade the whole code with Tasks - esp. in larger applications. What is the benefit of Tasks to be explicit at every level?
 
I think you are referring to something like this: journal.stuffwithstuff.com/2015/02/01/… that actually is a problem with async/await if you implement them like Python (generators in disguise)
It is not a problem if you use "async" like the "go" keyword in golang.
 
2:39 PM
More to my main concern – Fibers provide a minimal API that userland can use to build an async framework with its own scheduler. I fear anything overly complex will never make it through internals.
 
@kooldev well, that's what we want - using it like in go
 
Promises can be difficult for the brain to wrap around... there's a learning curve
 
@kooldev I was, yes. I realize ext-async used fibers under the tasks to remove that, but I think it became way to complex to ever hope to be included in PHP.
 
they increase code complexity if the developer is unfamiliar with how they work
 
Got it. If you look at what ext-async actually does (did) it is indeed the golang style.
Yeah, complexity of that extension was indeed a problem. I got too excited about it and included way too much stuff...
 
2:42 PM
@kooldev Which was awesome… but it became a framework of it's own. I want to boil it down to something like this: github.com/dstogov/fiber-ext Except with the internal call support you implemented.
Is that something you'd be able to put together. I'm guessing with the code you have it would probably be just a couple hours work :-P
You forked ext-fiber some time ago, and I put together a PoC to use it with Amp: github.com/amphp/green-thread/blob/master/src/functions.php
It was amazing, except it lacked the internal call support.
github.com/amphp/green-thread/blob/master/examples/… Is a simple timer example. Essentially I built the async/await task scheduler on top of fibers in userland.
 
@Trowski at the risk of distracting a useful conversation, just for the record, whenever your write it like that, I hear async/await as youtube.com/watch?v=OQlByoPdG6c
 
ayyyyyy… async awaaaaay-t
 
In the process, the mighty process, the IO sleeps tonight....
 
@Trowski It is certainly doable. Not too much has changed, you could basically just start from commit #2 or so of ext-async (github.com/trowski/ext-async/tree/…) and that's it. ;-)
 
@kooldev I'm not familiar enough with that level of internals to actually implement something like that. Could I talk you into handling the implementation? :-D
I may even be able to compensate you for your time (probably not a great deal, but something I'm sure).
I'm guessing it would be mostly just updating the extension from the commit you linked for 8.0.
 
3:01 PM
@Trowski I can take a look if you really want to base it on the fiber API. It should be pretty easy to convert to PHP 8.
 
@kooldev I do. Please and thank you. :-D
 
@kooldev it's trivial to later add syntax sugar for the fiber API (like an async {} block kicking off a fiber) … but I think the fiber API should really be the building foundation
 
@bwoebi I did exactly that in the green-thread repo in amphp. I'm sure you saw that at some point.
 
yes
 
Obviously not with nice syntax ;-)
 
3:12 PM
@bwoebi My ultimate goal was to implement the async keyword to allow for something like async foo(1, 2) to behave the same way as Task::async('foo', 1, 2) but that would have required me to make changes to PHP instead of writing an extension.
 
@kooldev I'd like to eventually get there, but we need baby steps with internals.
 
@kooldev that's why I wish for rust-macro like capabilities in PHP … then we could :-D
 
I didi that once for fun by doing that transformation in PHP's AST and it worked fine. .-)
The problem with slowly migrating towards an async/await approach is that you need PHP to interact with the scheduler (spawning new tasks) and that requires at least a contract for a scheduler.
That was one of the reasons why I dropped the fiber pretty early on.
 
@kooldev yes, you'd have to register a scheduler… but that can be a simple callback though
just needs a single function "here, this fiber has yielded this value"
 
Another concern was performance, the fiber API is symmetric, that requires 2 * N context switches to resume N tasks. With a builtin scheduler you can do asymmetric fibers and it requires just N + 1 context switches.
 
3:23 PM
@kooldev does it? the scheduling function can be invoked on top of the Fiber::yield() function and decide where it yields to next
 
I have to take a lunch break now, I will be back in 20 to 30 minutes.
 
without an extra context switch
 
@Sjon Not really .. my guess DNS records ..
 
@Shafizadeh no. Read my initial message again. Your htaccess combined with cf flexible ssl causes a redirect loop
 
well, what I have in .htaccess file, it redirects "HTTP" to "HTTPS", there is no loop
 
3:28 PM
and cloudflare wraps http in https. Your server thinks it is serving http and redirects, but cloudflare has already added https
 
oh really? can it be the issue/
lemme check it out ..
 
Look for x-forwarded-proto
 
There are a few hints here as well: stackoverflow.com/a/38933614/3749523
 
I turned SSL/TLS encryption off .. so, the problem should be resolved ?
 
It's how your server is set to respond to redirects etc
You need your code to inspect x-forwarded-proto (if it's there) and treat that as its HTTPS state
Also any absolute URLs within the same site
 
3:32 PM
@Shafizadeh that fixes it for me, but I feel like you still don't understand the issue
 
I understand the issue .. but not sure if it was really the issue .. since I never made any change on the SSL part recently
also, still I see too many redirected error
 
@Shafizadeh flush your browser cache
 
I'm trying to open it via incognito
 
lol - now the https variant forwards to http
you shouldn't test this with a browser anyway - the caching makes it impossible. Just use curl in a terminal
 
so, you mean no one can open my website through the browser?
 
3:44 PM
@bwoebi You are correct, but due to the way the fiber API works there will never be another fiber ready to be resumed when Fiber::yield() is called. Each call to Fiber::start(), Fiber::resume() and Fiber::throw() immediately switches context.
That can be changed by queueing sends & throws but we are losing access to the yielded value as return value of send() / throw() which would break the way you are intending to use the fibers.
 
@Shafizadeh no, I mean if you're testing cloudflare and redirects that will be cached, you should not use your browser
 
buddy, what I have to do to make my website accessible for everyone through the browser?
usually at this time of day, I have over 50 online concurrent users
but now, I have jut 15 ones
 
@kooldev I was actually thinking about having the scheduler be a generator and continuing that generator in the Fiber::yield() callback - then switching to the next fiber returned by the generator
So, Fiber::yield() would essentially invoke a callable and expect a return value: stop, or the next fiber to invoke
And having an internal scheduler would be pretty much the same thing under the hood (just maybe not implemented by the means of a generator)
 
@Shafizadeh well "buddy" - if I were you I'd remove the http>https redirect from my htaccess for now - that'll at least get your visitor number up
 
ok, I will do it right now
 
3:53 PM
but the good thing about that concept is, that in future we can just add a built-in scheduler at some point, plugged into that modular API @kooldev
or actually … maybe … it should not be Fiber::yield(), but Fiber::resume() only
and resume does a context switch
 
@Shafizadeh also - flush the cache at cloudflare (I think it's called development mode)
 
@bwoebi This could also work. Your scheduler would keep a list of fibers ready to run and the values to sent / thrown into them.
When no fibers are ready you would run your event loop instead.
 
yes
 
If the loop runs out of work you return stop.
 
@kooldev correct, though I'm thinking about whether we should make the main "fiber" a Fiber instance, so that resuming it effectively is a context switch to the main context
can be some constant Fiber::MAIN or such
 
3:59 PM
 
@bwoebi How does a fiber yield a value (promise) then?
 
I've commented all lines about redirection in htaccess and enabled development mod in Cloudflare.. still my website is not accessible :-(
 
I'm trying to understand the API you're proposing.
 
@Trowski It doesn't. It's not the responsibility of the Fiber anymore
if there are intermediate things … it talks to the event loop, "hey, I have something to do"
 
Which would be the callback provided to resume?
I guess I'm not understanding how the scheduler would be implemented then.
 
4:05 PM
@bwoebi @Trowski What do you think about an API like this instead: gist.github.com/kooldev/d7fed4dc65840e19b0bb325266957ffc
It takes a different approach to the fiber API but would also be very easy to use.
You could integrate the scheduler into your event loop and use it like a secondary queue of deferred watchers.
Just a rough draft, but I implemented something like that and it works fine.
I played around with it and (slightly) modified both React and Amp to support this.
 
@Trowski so … your scheduler would for example live in a generator within Loop::nextFiber() … function await($promise) { Loop::queueFiber(Fiber::current(), $promise); $nextFiber = Loop::nextFiber(); $nextFiber->resume(); }
or, if you wait for IO, you tell the scheduler in your event loop callback to immediately continue this fiber once it (i.e. so that it will be returned at some point as part of Loop::nextFiber())
 
4:23 PM
@kooldev What about Fiber::suspend() returning an object with resume and throw methods?
 
The goal is here to actually remove any internal processing of fibers apart from starting, context switching and providing the current context
 
No, nevermind, that doesn't work :-)
 
@Trowski Is this related to my gist (Task::suspend()) or to the good old fiber API? :P
 
@kooldev Related to the gist, but I wasn't thinking about it correct.
@kooldev So based on the gist, the only thing the extension would need to provide is Task and SuspendedTask?
 
@Trowski I am not even sure SuspendedTask is needed, these methods could also be moved to Task instead. The extension would provide Awaitable, Task and TaskScheduler (and maybe SuspendedTask).
 
4:29 PM
Task::suspend(function (SuspendedTask $suspended) {… }): mixed and SuspendedTask would have resume and throw methods? If the main thread was a Task, then I'm not sure TaskScheduler would even be needed.
Why would Awaitable be necessary?
 
Not really needed at first, only if async/await would be implemented on top of it. the await keyword would basically assert that the value implements Awaitable and call that method. An initial version would not need this.
The minimal version would just need Task & TaskScheduler. :-)
 
@kooldev Which is exactly what I'm looking for to include into PHP.
 
It is also possible to avoid TaskScheduler if you add another method Task::yield(). That is what I did in my prototype.
This gist.github.com/kooldev/6ca3ba55da2546d30ae66fe8b0be29d5 is the API that my latest async prototyp has.
This is the one that I testes with React and Amp BTW.
Awaitable is not really needed with this one eighter, I added it in preparation for async/await.
@Trowski I am going for a walk with the family now. I will be back later this evening or tomorrow and I will check if I can patch old fibers to run on PHP 8.
 
4:45 PM
@kooldev Could we do something as simple as this: gist.github.com/trowski/75febd5008052189182a71f193034fdd
 
@Trowski Will check this later when I am back. I ping you once I have thought baout it. ;-)
 
@kooldev Sounds good, thanks.
I figured if we want to pause fibers on promises anyway, why not make that part of the Fiber API.
 
I'm a bit confused as to why we want to include Tasks as part of Fibers
 
@bwoebi Same. I think the API should be as simple as possible.
What do you think of my gist?
 
@Trowski I wouldn't even include Awaitable
 
4:53 PM
thank you for sharing, @Ocramius
 
That code made it into actual browsers, running as privileged jabbascript
I'm glad it no longer runs :D
 
lol
 
@bwoebi So then just the original Fiber API? yield, resume, throw?
I was including Awaitable so we could replace Fiber::await() with the await keyword
However, since it's a fiber, functions calling await wouldn't return an Awaitable, they would return the actual value, unless called using the async keyword.
$value = functionUsingAwait() vs. $awaitable = async functionUsingAwait()
That could be built on top of the simple API in my gist, no? /cc @kooldev
The actual implementation of Awaitable and how they are resolved is up to user land.
 
 
4 hours later…
8:52 PM
posted on August 29, 2020

News will be posted after I watch Bill & Ted 3. I have my priorities.

 
 
1 hour later…
10:20 PM
wow, such empty
 
Wes
10:35 PM
ikr
 
10:53 PM
maybe everyone is enjoying their weekend
 

« first day (3605 days earlier)      last day (1337 days later) »