« first day (3316 days earlier)      last day (1622 days later) » 
00:00 - 15:0015:00 - 00:00

3:00 PM
I will check out merkel tree! Thanks so much @towc
 
3:19 PM
Good day guys, please am having issue deploying an app which has puppetteer module to heroku somebody should help me please
each time I deploy it only sends other static page but when i navigate to a page where puppeteer has to perform its function it throws an app error and crash
@JBis
 
@NobMusic don't ping random people for attention. I'm not going to read your question because of that
 
@towc am sorry for that
the person I pinged has always helped on issue concerning puppeteer
please @towc if you have any solution to this I I will appreciate that because am stocked right now dont know what to do, I have been on this all day
 
ok, maybe write that. "JBis, maybe you can help on this one?" so people like me don't think you're just randomly pinging
it happens very often
I'm not familiar with puppeteer :/
 
head thanks
 
3:38 PM
Grr, you used up cpu cycles by making a notification come up one my phone
@NobMusic Puppeteer has a headfull (headless set to false) mode. That may help to debug.
 
yes I have done that but it still persist
 
4:09 PM
@NobMusic Have you used the puppeteer buildpack?
 
@BenFortune yes sir I saw i have to add this { args: ['--no-sandbox'] } to my page.browser having written my code this way i have to use it the way i did ``` fetch.browser = await gapp.launch(
{headless: true },
{ args: ['--no-sandbox'] }
);```
 
|| formatting NobMusic
 
@NobMusic Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
@NobMusic Yes but have you used the actual buildpack to add all the dependencies to heroku?
 
When converting the following object to an array, is Array.prototype.slice.call the same as Array.from?
var my_object = {
    '0': 'zero',
    '1': 'one',
    '2': 'two',
    '3': 'three',
    '4': 'four',
    length: 5
};
 
4:16 PM
@JBis Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
referencing:
847
A: how does Array.prototype.slice.call() work?

user113716What happens under the hood is that when .slice() is called normally, this is an Array, and then it just iterates over that Array, and does its work. How is this in the .slice() function an Array? Because when you do: object.method(); ...the object automatically becomes the value of this in t...

 
@BenFortune  I ran heroku buildpacks:add jontewks/puppeteer but no result all I could get was error
 
That doesn't help me
 
@NobMusic what was the error?
 
it says couldnt find the app
its says "Error: Couldn't find that app." and "Error ID: not_found"
 
4:37 PM
@NobMusic that sounds like an issue with heroku not puppeteer
 
@JBis I thinks so because the app ran just perfect on my local machine
 
fix it
 
What are thoughts on extremely long if/return statements like the following:
should i split it into many if statements?
 
 
2 hours later…
6:40 PM
HI guys, can some one answer me if there is a way to use root import with sucrase? Use '~' instead use '../../'
 
How come 6.0000000000000004 % 1 == 0 evaluates to true
and 6.000000000000004 % 1 == 0 evaluates to false
 
||> 0.1 + 0.2
 
@forresthopkinsa Invalid command! Try help for a list of available commands..‍.‍.‍.‍.‍.‍.‍.‍
@forresthopkinsa 0.30000000000000004 Logged: ``
 
there's your answer
 
Is the input box for wolfram alpha only for me not working?
 
6:51 PM
wait I dont understand
 
Or are others also experiencing that they type "blank" space?
 
any help? ó_ò
 
@towc Sorry, what's this about blockchain?
(Sorry, I missed your ping earlier today)
 
@meagar I had just mentioned blockchain when I saw you joining the room
 
7:01 PM
Oh, did I enter the room right as you said that?
Sorry to disappoint, I just clicked "rejoin favorite rooms" :p
 
it would be funny if as an anti-scam measure mods automatically get notifications whenever someone says blockchain and similar
yay we're one of your favourite rooms
 
I haven't chained any blocks, sadly. I have never done anything with any cryptocurrency.
 
more like one of the rooms to keep an eye on, right?
 
Which means it must be good.
I'm friends/former coworkers of the founders of consensus.ai, who pitched it to me to see if I wanted to come work there, and they said blockchain a lot.
... those messages arrived out of order :|
Also, I'm actually in here for the JavaScript, not as a mod :p
 
to be clear, I'm not a fan of blockchain people
 
7:06 PM
$($)
 
I'm a fan of blockchain, but it's so overhyped
@KevinB that breaks the internet, right?
 
I once put a JWT inside a JWT. That's blockchain, right?
 
and @meagar were you elected this year? I don't think I've seen you before
@meagar sure :P
 
But like, also, like... eventually consistency or something.
 
seems they removed the election year info on the moderator list
 
7:08 PM
@towc I've been a mod since 2015 :)
 
oh neat, welcome to this neck of the woods
 
hmmm... actually, it's there on desktop
maybe a mobile thing
?
was referring to this one: stackoverflow.com/users?tab=moderators
but i see it now
 
7:36 PM
@KevinB And other RO's, if James is replacing Cap for the time being would you guys be interesting in making him RO so he can move message (unformatted code, etc.)
 
i'm not a huge fan of how it pings me every time i use it
 
Ok, I can make it ping less
I tried to make it respond directly so it would be easier to track what it was responding to
 
|| welcome KevinB
damnit
 
I took down to work on it, be back soon
 
how do I annoy kevin in the meantime?
 
7:48 PM
Just be yourself
 
thanks
 
;)
 
Cool. I gained 20k rep today bc of the recalc...
 
Nice!
 
meh
 
8:10 PM
|| magic
 
@KevinB Invalid command! Try help for a list of available commands..‍.‍.‍.‍
 
If I create a prototype function (say String.prototype.return) and I did "hi".return(), how would I get the value "hi" in the function?
 
I'm gonna fix a bunch of stuff in next few days, will make sure learn works properly
 
@VirxEC return this;
 
just this? That didn't seem to work... it just returned an object
 
8:14 PM
@VirxEC k
this refers to the string. I am not sure what else would
 
you can do this.valueOf()
 
||> String.prototype.return = function(){ return this }; "hi".return()
 
@JBis "hi" Logged: ``
 
you can do this.valueOf()
 
that didn't work either - Maybe it has something to do with me using Node JS 8.1.3?
that didn't work either - Maybe it has something to do with me using Node JS 8.1.3?
oops sry
 
8:18 PM
server's having some issues, duplicated messages may happen till it is resolved
server's having some issues, duplicated messages may happen till it is resolved
 
Awesome
 
@VirxEC are you sure this isn't workin? because that should be giving you an instance of String that has 'hi'
 
Got it! It must be a bug with arrow functions
 
yeah, arrow functions change this
 
i thought arrow function don't change this which is the problem (this don't create a new context for this to be changed)
 
8:25 PM
well, no,
that just depends on what you see as teh default way this works
arrow functions bring you away from the default way, it removes control of this from the calling scope
 
ooo yea, dont use arrow functions.
That binds the functions to the outer scope
 
@VirxEC it's a feature. Not a joke
 
8:50 PM
I'm not a JS programmer but have to interface with some JS code to write a browser extension. I have an object whose printed representation is

    ({default:function freezeDry() {
            return _ref.apply(this, arguments);
        }})

Would anyone be willing to tell me how to call the function?
 
@EllenSpertus Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@EllenSpertus 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.
 
FWIW, the object was created with browserify.
 
is that assigned to something / passed as a parameter? (giving us some characters before your snip would help)
 
Here's some context...
 
I think that object is a module
and the default export is that freezeDry function
 
8:54 PM
let fd = require('freeze-dry');
let port = browser.runtime.connectNative("mozacP2P");

port.onMessage.addListener((message) => {
  console.log("Hooray! A message arrived for me!");
  console.log("fd: " + fd.toSource());
  console.log(fd);                      // <unavailable>
  console.log(fd['default:function'])   // <undefined>
  console.log(fd['freezeDry']);         // <undefined>
  console.log(fd());                    // fd is not a function
 
unavailable?
 
I think you're right, @towc.
 
and right, I'd have expected fd() to work
 
It was printed in the developer console.
I'm using Firefox.
 
that's never happened to me
can you link to something that runs it?
 
8:56 PM
In case it's not clear, the comments are the output. The object I pasted in at first came from fd.toSource().
 
objects don't have a .toSource()
 
Sorry, I'm used to very oo languages, where practically everything is an object.
 
functions are objects here too, but what it printed makes no sense
 
anyone know how I could "select' all the characters between ^ and a space symbol
 
I have to run to a meeting. Thanks for trying to help. I'll check back in later.
 
8:59 PM
like if someone wrote 2^2 ...

it would select the ^2 and remove it from the string
 
@TaylorS look up regex
and enjoy
you're about to be thrown into a world of pain
 
i know what regex is, but its difficult to understand
 
well, try to understand it more
 
hey guys i'm developing and web app using react and node js and i want to notify on new message like facebook here is my baceknd code
 
._.
 
9:00 PM
look up some regex tutorials with js
 
 socket.on('messagesent',(data)=>{
        const {senderId,recieverId,senderName,recieverName,message,mid}=data;
        Message.findOne({where:{
           [Op.or]:[{senderId:senderId,recieverId:recieverId},{senderId:recieverId,recieverId:senderId}]
        }}).then(result=>{
               if(result)
               {
                   const id=result.room;
                   let senddata={
                       senderId:senderId,
                       recieverId:recieverId,
                       senderName:senderName,
can anybody tell me how to notify it on frony end using the socket.io library ?
 
pasting a bunch of code and asking for a feature isnt what the chats are for .-.
 
@Taylor
 
that code appears as though it'd emit a message when done
what is it not doing?
 
bruh why ya gotta ping me for nothing
 
9:03 PM
@TaylorS this is the backend code how to display it on frontend ad notification like whatsapp or facebook messenger ?
 
@TaylorS useful resource: regex101.com
 
dude, do your research... dont just ask for features and paste large piles of code on chat.. its called being a help vampire
 
listen to the socket and act.
 
okay let me see
can you reer me something?
refer *
 
Find socket.io documentation
 
9:06 PM
nah
 
legit google it XD
And then... READ :D
anyways, im going to go finish updates on my auto-installer, then im going to go netflix and chill
cya guys
 
@TaylorS i would have not asked if it was there on google?
 
9:28 PM
@Atulkumar I guarantee you that you will find your answer in online documentation
 
@forresthopkinsa i'm not sure about my serverside code in a way
 
Is any of your code copy-pasted?
 
@forresthopkinsa well i have looked into differnet repositries and combined some code
 
well there's your problem
write your own code and you'll probably understand it better
it'll take a lot longer but you won't run into dead ends like this
 
well i did that in first phase and then i improvised seeind other codes
 
9:33 PM
well you should ask the people whose code you're running for help then
 
9:55 PM
Anyone have a simple to use keep alive utility for a node webserver?
 
you mean to restart it if it crashes?
 
Yes. PM2 has been suggested to me before, but maybe be more than i need.
 
we use pm2 for dev, i think nodemon was the oldschool simple way
 
ok thanks
 
we just setup a service for it in windows
 
9:59 PM
I have used launchd on macos which works pretty well. But this is for an Ubuntu server.
 
systemctl
IOW use systemd for services on ubuntu server
 
10:31 PM
Yes, i believe that would be very possible. — Kevin B 14 secs ago
 
@Frazer Can you adjust in pastebin? My knowledge of javascript is a bit limited. — zecaluis 7 hours ago
Can you add an answer to this please? As I told other colleagues, my knowledge of javascript is quite limited. — zecaluis 1 min ago
 
11:09 PM
Whats that reasoning behind not allowing users to see upvote/downvote split for their own questions/answers?
 
@david should you restart pm2 after changes ?
 
@Hubi 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.
 
pm2 has a watch mode that will autoreload when files get edited
 
@david but. During development process you need to check console. How can you fix it with pm2 ?
 
pm2 log will show you logs in the terminal, you can also attach chrome development tools to node processes
 
11:15 PM
@Hubi alternatively just don't use pm2 in development
 
@david I’m new in development. And it is really interesting.
@JBis open pm2 logs in terminal is really good idea. Need to check it :)
 
I instead am having it log to a file and then tail -f log.txt to watch it live
 
life is so much easier when you just log to stdout
 
Sorry, I meant in prod I do that. In dev I just stdout.
 
in prod too
 
11:22 PM
You have a console constantly up on prod? what if you need to save the logs or the machine crashes?
 
and use something else to shift the logs to whatever service consumes them
 
we log to stdout, but it gets redirected to another service at that point
:p
 
oh
 
right, you'd normally have it logging to stdout/stderr and you have something else consuming that socket
 
@david try to use Winston logger. Really good.
 
11:36 PM
KevinB I fixed magic and made James stop pinging so often
towc, I will change to !! syntax soon
 
open an issue about the RO thing, that'l ping everyone
 
Ok thanks
 
11:59 PM
hey
 
00:00 - 15:0015:00 - 00:00

« first day (3316 days earlier)      last day (1622 days later) »