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

12:23 AM
hi guys, anyone can helpe me on docker stuff?
 
12:41 AM
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…
1:51 AM
Huge props to Twitter for adding a "why am I seeing this ad" button. Transparency is very good.
 
2:43 AM
 
 
5 hours later…
7:40 AM
@JBis that's nice feature.
 
 
2 hours later…
9:43 AM
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?
 
9:50 AM
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
 
9:54 AM
@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 AM
||> 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 AM
@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 AM
||> 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 PM
||> 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 PM
ow wait ... I don't advise doing that without supervision. It has happened that you were telling things based on mis-information
 
12:57 PM
"integrated development environments"
it sounds like you are trying to sound smart
 
1:45 PM
hurr buzzwords
 
2:26 PM
(⌐■_■)
 
3:04 PM
@JBis eh, maybe he does not know that there is a common-use acronym for that 😀
 
3:25 PM
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:

 
4:09 PM
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…
5:27 PM
Been reading some articles on GraphQL and how much more advantageous it is compared to REST. Does anyone in here use it?
 
6:09 PM
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

 
6:39 PM
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
 
7:08 PM
What do you mean it doesn't work
@JBis JamesBot resurrection 5/8?
 
7:47 PM
@BeerusDev hopefully
 
8:01 PM
!!echo "this is fine"
 
this
 
uhm
 
i thought i fixed that
 
8:18 PM
!!echo halt
 
HAMMERZEIT!
halt
HAMMERZEIT!
 
 
2 hours later…
10:04 PM
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 (1094 days later) »