« first day (3853 days earlier)      last day (1317 days later) » 

00:23
hi guys, anyone can helpe me on docker stuff?
00:41
root@ckan:/ckan/contrib/docker# docker exec ckan /usr/local/bin/ckan-paster --plugin=ckan datastore set-permissions -c /etc/ckan/production.ini | docker exec -i db psql -U ckan
ERROR:  syntax error at or near "OCI"
LINE 1: OCI runtime exec failed: exec failed: container_linux.go:367...
 
1 hour later…
01:51
Huge props to Twitter for adding a "why am I seeing this ad" button. Transparency is very good.
02:43
 
5 hours later…
07:40
@JBis that's nice feature.
 
2 hours later…
09:43
function doSomething(){}
doSomething.prototype.foo = "bar";
console.log(doSomething.foo)
why does this console.log undefined? I thought it would look up the prototype chain and find foo in doSomething.prototype? I am reading through this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain article.
@Silidrone Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@Silidrone aside from bad practice, you cannot access the prototype directly on a function object
if you want to access foo, you need to create a user-defined instance
when invoking the new operator, the newly created object will inherit the prototypes from the function object, which is then accessible
I see. I tested out the new operator but when the new object is created it still seems to be inheriting from the same instance of the object's parent that it was copied from. I mean the object's parent is not copied, its "pointed" to, right?
yes
@KarelG also what do you mean you cannot access the prototype? Isn't doSomething.prototype.foo = "bar"; a form of accessing the prototype directly on a function object?
09:50
if you are curious about what's on the prototype, you can use Object.getPrototypeOf
I'm trying to understand why doSomething.prototype.foo = "bar"; would work, but it wouldn't look up the prototype chain when I do doSomething.foo, is that just a limitation they put?
those function objects are basically wrappers around the objects, and that does not access the prototype
it's very easy to check with that function
||> function fx() {return 1;}; const myFx = new fx(); ['proto fx', Object.getPrototypeOf(fx), 'proto myFx', Object.getPrototypeOf(myFx)]
@KarelG ["proto fx",null,"proto myFx",{}] Logged: `` Took: 0ms
but I can console.log(doSomething.prototype) (accessing the prototype) and it would console.log it just fine
nah
it's same as this
||> const obj = {a: 1}; obj.b
09:54
@KarelG undefined Logged: `` Took: 1ms
uhm no ...
🤔
isn't it expected that obj.b is undefined lmao
I still don't understand what you meant by accessing the prototype
yeah that yes. But I noticed the null
that I did not expect is
ok so basically, I'll make peace with: I cannot access properties higher up in the prototype chain directly on the function objects but I can access the prototypes themselves?
Is that correct?
||> function doSomething(){} doSomething.prototype.foo = "bar"; doSomething.prototype
@Silidrone {"foo":"bar"} Logged: `` Took: 0ms
10:00
||> function doSomething(){} doSomething.prototype.foo = "bar"; doSomething.prototype.foo
@Silidrone "bar" Logged: `` Took: 0ms
||> function doSomething(){} doSomething.prototype.foo = "bar"; doSomething.foo
@Silidrone undefined Logged: `` Took: 0ms
check how object access is handled
it's nealty documented on ecma
(have a meeting now)
okay thanks
 
2 hours later…
11:33
@Silidrone Its actually recommended to not overwrite prototypes.
If you want to add a feature to an object, just add the function to the object... overwriting the prototype is messy and unnecessary
Or
even better... just create an extended object..
a proxy...
or even just make a new object entirely
Prototype overrides are like a drug. You get addicted and slowly wither away
@MisterSirCode Yeah I'm trying to learn, right now the point is that I do unrecommended things, go out the bounds, so I understand how everything works under the hood. I am obviously not planning to adapt it as a habit
I come from C++ where almost any incorrect usage of anything breaks everything, so I'll be cautious enough I think :D
I still don't understand the theory
idk if that statement is correct
Whether its correct or not? That kindof depends.

You should be able to access any part of the prototype from within the function context.

Now, if you mean accessing it with the "this" keyword, Im sure you might run into issues.

However, if you keep a variable active outside of the function which access the prototype, you should be guaranteed to be able to access it from within the function itself.
11:58
||> function doSomething(){} doSomething.prototype.foo = "bar"; doSomething.foo
@Silidrone undefined Logged: `` Took: 0ms
and which category does this fall into?
||> function doSomething(){} doSomething.prototype.foo = "bar"; doSomething.prototype
and this
@Silidrone {"foo":"bar"} Logged: `` Took: 0ms
12:16
||> function fx(){}; fx.prototype.foo = "bar"; typeof fx.prototype
@KarelG "object" Logged: `` Took: 1ms
||> function fx(){}; fx.prototype.foo = "bar"; 'prototype' in fx
@KarelG true Logged: `` Took: 1ms
hmm something must have changed recently
* digs ecma *
ok there is something wrong with that site, I cannot consult it atm
I know too much... I went into computer science class today... and now Im teaching the class about integrated development environments and java.
:3
"The student becomes the master" and all that crap lol
12:22
ow wait ... I don't advise doing that without supervision. It has happened that you were telling things based on mis-information
12:57
"integrated development environments"
it sounds like you are trying to sound smart
13:45
hurr buzzwords
14:26
(⌐■_■)
15:04
@JBis eh, maybe he does not know that there is a common-use acronym for that 😀
15:25
posted on May 04, 2021 by Michaël Zasso

Notable Changes [8a90f55a05] - (SEMVER-MINOR) fs: allow no-params fsPromises fileHandle read (Nitzan Uziely) #38287 Commits [28e16488cf] - async_hooks,doc: replace process.stdout.fd with 1 (Darshan Sen) #38382 [cbab7ec6e5] - benchmark: avoid using console.log() (Antoine du Hamel) #38370 [ba15b20062] - benchmark: use process.hrtime.bigint() (Antoine du Hamel) #38369 [bc6e719884] - bootstrap:

16:09
posted on May 04, 2021 by Cindy Bayless

 The Stable channel is being updated to 90.0.4430.100 (Platform version: 13816.64.0) for most Chrome OS devices. This build contains a number of bug fixes and security updates. Systems will be receiving updates over the next several days. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels Find out how. You

 
1 hour later…
17:27
Been reading some articles on GraphQL and how much more advantageous it is compared to REST. Does anyone in here use it?
18:09
posted on May 04, 2021 by Srinivas Sista

 The Dev channel has been updated to 92.0.4496.2/3 for Windows 92.0.4496.0 for Mac and Linux. A partial list of changes is available in the 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. Srinivas Sista Google Chrome

18:39
Hii everyone I have one query how to call api in react js
fetch
codesandbox.io/s/react-example-forked-o8tu5 in this I need to call api
How can we do that anyone idea on that
with fetch
Ok with fetch how can we do that can u show me demo something in here in my code codesandbox.io/s/react-example-forked-o8tu5
How to fetch
!!mdn fetch getting started
mocki.io/v1/b512f8b8-64ab-46e4-9e0c-9db538a0ad9e this s my api and this is my code and I want when I click on button the data fetch
I tried Fetch API - Web APIs | MDN but not work
Can u show m demo something
19:08
What do you mean it doesn't work
@JBis JamesBot resurrection 5/8?
19:47
@BeerusDev hopefully
20:01
!!echo "this is fine"
this
i thought i fixed that
20:18
!!echo halt
HAMMERZEIT!
halt
HAMMERZEIT!
 
2 hours later…
22:04
someone can explain me what's the difference between window.require('fs'); or require('fs'); ?
i've seen window.require('fs'); in my angular project (typescript), but on github i see require('fs'); (which is a pure javascript example)

« first day (3853 days earlier)      last day (1317 days later) »