« first day (5135 days earlier)      last day (35 days later) » 

00:27
posted on November 06, 2024 by Giuliana Pritchard

The Stable channel is being updated to OS version: 16033.51.0 Browser version:130.0.6723.101 for most ChromeOS devices. If you find new issues, please let us know one of the following ways File a bugVisit our ChromeOS communitiesGeneral: Chromebook Help CommunityBeta Specific: ChromeOS Beta Help CommunityReport an issue or send feedback on ChromeInterested in switching

 
10 hours later…
10:49
Is it possible to determine the root path a service is running in without any config that is delivered to the client?
Example: You do not have control over your subdomains, so you need to let a service run under

foo.bar/service/

Yet you also want to code your tool to be able to run under

service.foo.bar/

if at some point you manage to get control over your own subdomains
Now the root of the service, like routes such as "/api/bla" are available under either "foo.bar/service/api/bla" or "service.foo.bar/api/bla"
And on the client I need to determine "should I access /api/bla" or "/service/api/bla"
I either need to determine the relative path of every single page to the service root or I need to determine the absolute path of the service root on whatever machine it is running
 
5 hours later…
15:33
posted on November 06, 2024 by Ben Mason

Hi everyone! We've just released Chrome Beta 131 (131.0.6778.32) for iOS; it'll become available on App Store in the next few days. You can see a partial list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Harry Souders Google Chrome

15:46
@salbeira location.host gives you the hostname you're on.
In this tab it returns "chat.stackoverflow.com"
You can also look at location.pathname to see the rest of the URL. Again, in this tab it returns "/rooms/17/javascript"
|| mdn url
An error occurred with the request.
maybe mdn decided it didn't want james scraping it's content anymore
You're making me do all the work, James! I should be getting your salary in addition to mine.
the joys of the AI age
15:48
|| mdn URLSearchParams
An error occurred with the request.
OK, I had slim hope "url" was just too ambiguous for James to find a match
 
1 hour later…
17:04
Yeah taking apart the URL was not an option, how do you discern what subroute the service is running on? "rooms/1/" or "rooms" or "rooms/1/javascript" or "/"
What is the true root of your subservice that you route to - I solved it by adding a "x-path" header to the request through NGINX and use that on the endpoint to set a template parameter that writes to the "base" tag of the HTML page delivered
So if I access the service it through "neat.domain" I get a "x-path" parameter in the request header of "/" while if I acces the same service through "sub.complex.domain/service/" I get a "x-path" parameter of "/service" so I know that when I want to access "/api/stuff" off the service I need to use "neat.domain/api/stuff" or "sub.complex.domain/service/api/stuff"
@salbeira Uh, yeah - that's impossible to answer in the general case. But if you have the options you initially described, then you can examine the URL if it's one, the other, or neither. But there is no real way to analyse whether the app considers its root to be domain.com or domain.com/service or even domain.com/service/specificpath
(it is university network shenenanigans: We do not have control over our internal DNS records, so I need to use subroutes to differentiate between services and thus all my services I write must work with either relative paths to resolve paths to their own internal scripts and stylesheets while I would LOVE to just use absolute paths)
We just obtained a very neat short URL to direct students to our service so now I need to have the service reachable through both domains, but one uses / as the service root, the other uses /service as the service root
All this would not be a problem if our network managers would just route *.project.department.uni to my device, but no they say "thats dangerous, we only route project.department.uni to you and no wildcard for you!"
17:26
@salbeira most of the time I would say "tell the dude who manages your DNS to get his shit together" :)
subdomains have pretty much only advantages over subdirs, such as providing a much cleaner separation between unrelated applications
anyway, you may want to have a config setting telling your application what its url root is (e.g. /myapp). and then code that builds url would prepend it, and any path-based url matching would strip it
links in html should pretty much always be absolut to the url root (so /myapp/whatever).
18:15
posted on November 06, 2024 by Ben Mason

The Beta channel has been updated to 131.0.6778.33 for Windows, Mac and Linux. A partial list of changes is available in the Git log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Prudhvi Bommana Google Chrome

posted on November 06, 2024 by Ben Mason

Hi everyone! We've just released Chrome Stable 131 (131.0.6778.31) for iOS; it'll become available on App Store in the next few hours. This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Harry Souders Google Chrome

 
2 hours later…
20:21
posted on November 06, 2024 by Prudhvikumar Bommana

The Stable channel has been updated to 131.0.6778.33 for Windows and Mac as part of our early stable release to a small percentage of users. A full list of changes in this build is available in the log. You can find more details about early Stable releases here. Interested in switching release channels?  Find out how here. If you find a new issue, please let us know by filing a bug. The

 
2 hours later…
21:56
are "inner" functions hoisted accross the whole outer function? It seems they are?
Does that also mean such "functions" are more efficient than arrow functions?
function foo() {
    function inner() {
        console.log('ok');
    }
    inner()
}

//vs
function foo() {
   const inner = () => {
        console.log('ok');
    }
    inner()
}
depends on your definition of efficient
there's no value in inner being defined inside as you have it in the first case
and... no? it's not hoisted to outside of foo..
its hoisted within foo
inner could be placed above where it is defined and it'd still work, in the first sample. in the second example it must come second
any efficiency difference that may exist in these two examples would be moot
@KevinB sure but I am asked to review the styleguide for our react frontend. And I notice it was conflicting on whether you need to use arrow functions or named functions inside react components.
arrow functions have a specific purpose
So is it just "random pick"? I find it hard to come with arguments one way or the other.
anything outside of that purpose is strictly cosmetic
they handle this differently
22:08
Well the argument right now is: "arrow functions have a good purpose when using inheritance", "there's no reason not to use them", "so always use them".
i'm generally against that logic, because if you always use arrow functions except when you literally can't because the syntax doesn't work that way you now may need to determine if it's a case where `this` matters or not.

but, again, it's entirely cosmetic, unless you need `this` to work the way it does in arrow functions.
when working with react... i tended to avoid cases where hoisting would even matter
like even in your second example, i wouldn't define the arrow function inside of foo unless it needed to close around a value only available within foo
and... 9 times out of 10 that's a callback and thus it doesn't really need a name and this should come from the parent, making it ideal to use an arrow function
I do prefer to actually have the functions not in the "return" statement, so to have always the logic for attributes fairly minimal
function foo(props) {
    const [number, setNumber] = useState(0);
    const handleOnClick = () => {
        setNumber(n => n+1);
        console.log(`click ${number+1} times`);
    }
    return <button onclick={handleOnClick}/>
}
vs inlining the handleOnClick
22:39
that's fair
still feels a bit sad that it's hard to find clear reasons in say above component to make it either an arrow or named function
iirc in the past there was... a reason to do this differently
something to do with re-rendering having to constantly re-create functions needlessly
but this was like 8 years ago... maybe it's not an issue anymore
that function for example would need to define that click handler every time the button is rendered, and handleOnClick must be defined within foo because it closes around number which are defined within it
but... if it was instead pulling data from elsewhere, it wouldn't necessarily need to be rerendered every time number changes
etc
yeah but I can't catch that in a style guide.
it's easy and effectively side effect free to just say always use an arrow function
it just annoys me, 😉 because people sometimes use it and expect it to work like a normal function then create a bug
which... can be avoided by the style guide also suggesting the avoidance of relying on this within callbacks except when necessary. it's almost never necessary
it's often necessary when you use an object style to stores
not so much in the view, but in the controller if you use inheritance and polymorphism you often end up with passing member functions around.
It is kind of annoying that you never know in the future if some function would be (indirectly) used in such a situation.
22:56
though, ironically, if it was defined as an arrow function that wouldn't matter, ;)
arrow functions get their context from where they are defined, not where they are referenced from
i know, which is how nearly every other language does it.

« first day (5135 days earlier)      last day (35 days later) »