« first day (3428 days earlier)      last day (1745 days later) » 

17:00
The, uh, speed, of something traveling over the network is affected by the size of the something, and the network itself. Which tool you use to facilitate the upload isn't going to have any meaningful impact on the speed.
the use case is: users bulk-uploading images & videos to a website
yeah there are factors we can't control like the users' network speed
using client tool x vs y isn't going to impact the speed.
They're both going to send using the same mechanism
right now the upload is so slow for large files that the user's session times out
Tay
Tay
hey jbis
increase session timeout, or have a pinger that keeps it alive during download.
Tay
Tay
17:04
what would happen if the bot called itself?
|| echo ||
itself is blacklisted
Tay
Tay
hmm alright
I was just curious
with maybe an exception or two for fun
Tay
Tay
like what?
17:04
!!echo stop
HAMMERTIME!
stop
nope, that exception never made it in
:p
Tay
Tay
ah alright
if we had a second bot, they could talk to each other... sorta
the second would be removed
Tay
Tay
probably
17:08
weitol's bot was ban for that reason
|| man ban
ban: "Bans a user" Examples: || ban @JBis , || ban JBis , || ban 7886229
@KevinB sorry, could u please explain again why the speed wouldn't improve?
right now the upload is using http
I'm wondering if switching to something else will make it faster
http is pretty fast
What else could be used other than http?
from a web browser?
ftp i think, don't some browsers support that?
17:18
you can open an ftp url and do stuff from there, but that's not something you can do from a web page,
(you can also do that from windows file explorer)
Tay
Tay
JBis..
why do most of your commands only have one shortcut.. then the restart/shutdown command has like...
die
destroy
selfdestruct
suicide
reboot
restart
just_do_it
shutdown
Why have useless shortcuts?
the ones with many are mostly early ones and i wasn't sure which keyword would latch on
Tay
Tay
what kind of keywords can be placed in your learn command, besides the string literals (@{argument number})
or is that it
thats it. But there are a couple special types.
Tay
Tay
17:23
?
|| man learn
does that not work?
🚽
Tay
Tay
so.. what happens if you overwrite current commands
you can't
Tay
Tay
Ok, I was assuming you had that covered
17:28
I'm super new to file uploads, but can you use ftp?
like var ftp = new Client(); ftp.put(file)
Tay
Tay
@JBis what are all the arguments you can use
self name?
math? basic stuff?
4 mins ago, by Kevin B
https://github.com/jbis9051/SO-ChatBot/
Tay
Tay
I cant find em lol
I found the script
Tay
Tay
https://github.com/jbis9051/JamesSOBot/blob/master/src/plugins/learn.js

I can see arguments, but this is arguments for the actual learn command being used
oh thanks
how could I call the user who activated the command
or is that not a thing
lol
the code that does everything the learn command does is right there
Tay
Tay
Then I guess its not a thing
self args ;-;
examples: ["|| learn shortcut output", "|| learn tbh to be honest", "|| learn hbd Happy Birthday {1}!", "|| learn vampire_redirect google.com/search?q=[1]"],
jbi even used the command in this way less than an hour ago
in the very way you're asking for
Tay
Tay
Self args arent in there.
Self args call the one who called it
so if you typed the command, it would ping YOU
17:37
you're making up a name for something that doesn't exist
Tay
Tay
yes
because it doesnt exist
it doesn't need to exist
Tay
Tay
and it needs to exist
lolok
no, it doesn't
lol
it should never ping the person who initiated the command
Tay
Tay
I wanted to make a slap command XD
17:38
that's already possible
it's no different than ||welcome or ||w3schools
Tay
Tay
|| slap @KevinB
slaps @$0 around a bit with a large trout!
Tay
Tay
oof
its broken
|| learn tSlap Tay has slapped {1}!
it shouldn't require the @
tSlap has been added
17:39
as that causes double ping
Tay
Tay
yeah guess so
|| tSlap @KevinB
Tay has slapped @KevinB!
Tay
Tay
or does that ping fail
no, it double pings
Tay
Tay
Why?
17:39
because... it's two messages that ping.
duh
Tay
Tay
Its only 1 @
oh..
makes sense
|| unlearn tSlap
tSlap has been unlearned
the @ should be included in the command, such that initiating it doesn't require causing a ping
as demonstrated in the examples
Tay
Tay
or not at all
because pinging is annoying...
|| learn gold -throws a bar of gold at {1}-
gold has been added
Tay
Tay
17:43
|| gold KevinB
Tay
Tay
Hmm expected
formatting breaks
|| unlearn gold
gold has been unlearned
gold has been added
Tay
Tay
|| gold KevinB
@KevinB has been smacked by a gold bar for their discrepancies!
Tay
Tay
17:44
Lol thats good
@KevinB lol whats wrong with that?
Tay
Tay
No only has kevin been slapped by a bar of gold, its now starred
this is too overpowered, you can get the bot to say anything and star it
if overpowered is even a good word for it
maybe spammy
@Tay Yes, and then you will be ban :)
unBanTay has been added
Tay
Tay
lol
|| unBanTay
17:49
@Tay has been unbanned
Tay
Tay
ah well
|| sandbox
Please go and play in the Sandbox
Tay
Tay
i dont know what the hell I just typed
1 message moved to friendly bin
that made me uncomfortable
Tay
Tay
17:54
good
18:17
I'd like to start a JavaScript algorithms Meetup study group. It'll be in person, we'll use https://leetcode.com/, and it'll in an office with white boards. The purpose will be to get prepped for job interviews.

Are there any tips to make this successful?
@risingPhoenix1979 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.
@risingPhoenix1979 find members at universities and code camps
@risingPhoenix1979 why not do a video chat so more people can join?
!!magic
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
18:20
is !! an alias for || now?
yep
I missed that part
gooed
Yes, I'll find peeps at Universities and code camps. I'll also attend a JavaScript Meetup.

I'd be happy to create a Slack group.

I don't want to do a video group because we'll be white boarding. I think it's important to get in person practice.
i hate it but thats just me lol
Got some coffee brewing
18:21
@risingPhoenix1979 is it gonna be free?
@risingPhoenix1979 I also agree that meeting up in person will be so much better
if towc makes a feature request you can't refuse it
No, it'll probably be $5 to $10. I need to pay for the Meetup service. It'll also reduce no shows.

It'll be at my coworking space so the Meetup area will be secure.
where located?
Tay
Tay
hey guys, I wanted to start creating my own VERY basic interpreter for CJS, nicknamed n0. (named after a project an old friend made)

Anyways, I was thinking of going really basic with Regex.

But can someone help me with the regex. Im looking to detect for anything like ") {}" and return whatevers between the {}
Heres kinda my idea:
n0(`

(.set) {

}

`);

function n0(str) {
	var parentheses = /\(([^)]+)\)/;
	console.log(parentheses.exec(str)[1]);
}
oof too many returns
18:23
I also may need to pay for additional meeting room hours at my coworking space. I get some free hours per month but after that I'll need to pay.

It'll be located in Redmond, WA (near Seattle and home of Microsoft).
@Tay why not try something that you can get at least 85% of the way on your own
Tay
Tay
because regex is confusing
the only thing im asking for is regex..
@risingPhoenix1979 obviously meeting in a city would be ideal
@risingPhoenix1979 so it will Only be for javascript?
Yes, Redmond (a suburb of Seattle) has lots of people and Microsoft HQ is in the same city. Bellevue, another suburb, also has lots of tech jobs.

Yes, it'll only be for JavaScript.
Tay
Tay
18:26
I really REALLY dont want to parse by using .split("") on the whole thing and shifting every character
Should I use LeetCode algorithms as a jumping off point?

Also would it be a good idea to split people off in pairs?
Tay
Tay
Id rather try regex
@risingPhoenix1979 depends on how you want to do it
you aren't learning js there right? the assumption is you know js. It is just practice for those interview questions?
@JBis Yes, I'm asking for specifics about how to have a successful JavaScript algorithm study group.


It'll just be practice for interviews. It'll be required to know some JS.
oh if you're doing it in Redmond I'm sure you'll have plenty of willing participants
18:31
yeah, maybe eventually you could have a guest speaker from microsoft or something
in fact you can probably get some actual interviewers to come guest host
right
ninja'ed
I think that's a good starting point, using leetcode. Splitting them in pairs is a good idea, but making sure there is one well experienced dev
That's a great idea!

Yes, I'll ask around. If we could get one experienced dev that would be helpful.
18:32
whats your background if you don't mind me asking?
that reminds me, we should do a js weekly challange
I used to work for Microsoft as a contractor so I can ask my connections there. I can also attend the BellevueJS Meetup group. I've attended that before.
that would be cool
I'm a WordPress developer but have done Vanilla JavaScript, jQuery, a little React, and a little Node.

I'm very rusty on React and Node.

I've studies some JavaScript algorithms before.
@KevinB do you have access to the meta github account?
I currently work as WordPress dev contractor at Forescout (forescout.com) and want to get an FTE job. That's my goal.

There aren't many WordPress jobs that pay well available.
18:37
@RO's ^^
18:48
Ok yall. I'm going to sign out.

Thanks for the tips on running a successful JavaScript algorithms study group.
I do not
Tay
Tay
Ok. So currently I have regex to get all text ungreedily between () and {}
	var parentheses = /\((.*?)\)/;
	var brackets = /\{(.*?)\}/;
	console.log(parentheses.exec(str)[1]);
How do I merge the two together
Tay
Tay
get text from sets of them
dynamically
do I just place both regex formulas into each other
or does it not work that way
like... /\((.*?)\) \{(.*?)\}/?
It seems to kinda work
Ok... nevermind, why did I even ask, I literally just mixed both regex formulas in the shape I needed without whitespace, and it works perfectly
wrong...
function n0(str) {
	let strOutput = str.replace(/\s/g,'');
	var parentheses = /\((.*?)\)/;
	var brackets = /\{(.*?)\}/;
	var functions = /\((.*?)\)\{(.*?)\}/;
	console.log(functions.exec(strOutput));
}
Array(3)
0: "(.set){}"
1: ".set"
2: ""
index: 0
input: "(.set){}"
nice
Actually, Im having a problem.. using a global query, and returning 2 different objects, Im getting a wierd output
It correctly identifies one, but its not identifying the second, only placing it back in the input
0: "(.class){}"
1: ".class"
2: ""
index: 0
input: "(.class){}(#id){}"
Only 1 was recognized...
19:03
is it possible to write this piece of code using async/await?
server.addService(eventsProto.EventService.service, {
  logToFile: async (call, callback) => {
    const event = call.request;
    console.log('passed event::' + JSON.stringify(event));
    const logged = await writeToLogFile(JSON.stringify(event));
    if (logged) {
      callback(null, {status: 'Good!'});
    } else {
      callback(null, {status: 'Bad!'});
    }
  },
})
Tay
Tay
,_,
@KevinB ok madara gave me admin access to the org
nice
JBis is king now
   👑
   o
  /|\      o-----
  /\       /\   | |
bow down to me!
Tay
Tay
wtf
19:06
congrats
Tay
Tay
js is giving 1 match, regex tester is giving 2
Excuse my Blasphemy
@Tay Switch your parser to ECMAScript on the left side
Tay
Tay
here in a bit, I got 3 minutes then Im late to leave school
maybe monthly challange, restart the previous thing github.com/JavaScriptRoom/JS-Monthly-Challenge-Jan-15
would anyone be interested in it?
Awesome!
19:33
nope
didn't participate in the previous ones
Question for those who've used express/passport and React, is there a way for the express server to inform the React client that a auth session has expired?
Only if you have a pathway to send messages to the client from the server
such as push notifications
Does this mean I'd need something like websockets? I initially used firebase for authentication and the API provides a listener for auth changes, but now I'm using passport-saml and my schools shibboleth SSO. I can login fine, but the user info is saved in react state so theres no current way to tell react that the auth user is no longer valid
Or would a better thing to do be to have my react application send the auth user with every request to sensitive info (like to api routes etc) and if the auth user doesnt match what the server has then redirect them to sso login?
definitely should be validating the user's auth when requesting auth-protected data
has anyone worked with Paypal? Inregrating it? I followed the docs but for some damn reason I can't get it to work.
19:48
i did... like 8 years ago
things have hopefully changed since then
well i am trying to implement v2 but it's not working
well, i assume it's still somewhat similar
It's a simple setup actually, I can easily do it all in the front end but not in the backend
Mind helping me?
19:49
you request an authorization, send user to paypal, they authorize, back to your site, they click confirm, you tell paypal to capture the payment, verify, and done
Exactly, but its acting up for some reason
where at
particualry eveytime I checkout with paypal it times out. Getting error: Error: Failed to fetch
🤔
err, so the client fetch is timing out, requesting from your server
or is the fetch on the server timing out
because if it's your server that's timing out, there's room to do more debugging
POST localhost:3000/createTrans net::ERR_EMPTY_RESPONSE
19:54
ok, good, that can be worked on
yeah i think it might be from the server
that means... your express route is entering into a state where res.json isn't being called
or response.send etc
can you share that express route's code?
router.post("/createTrans", (req, res, next) => {

const paypal = require('@paypal/checkout-server-sdk');
const payPalClient = require("../config/paypalServer");

module.exports = async function handleRequest(req, res) {

  const request = new paypal.orders.OrdersCreateRequest();
  request.prefer("return=representation");
  request.requestBody({
    intent: 'CAPTURE',
    purchase_units: [{
      amount: {
        currency_code: 'USD',
        value: "100.00"
      }
    }]
  });
  let order;
  try {
handleRequest was never called
19:59
you could delete module.exports and everything after it and it wouldn't change that code
:p
How do I go about this then?
const paypal = require('@paypal/checkout-server-sdk');
const payPalClient = require("../config/paypalServer");

module.exports = async function handleRequest(req, res) {

  const request = new paypal.orders.OrdersCreateRequest();
  request.prefer("return=representation");
  request.requestBody({
    intent: 'CAPTURE',
    purchase_units: [{
      amount: {
        currency_code: 'USD',
        value: "100.00"
      }
    }]
  });
  let order;
  try {
    order = await payPalClient.client().execute(request);
i think
pending any missed },{,(,) due to writing code in chat
though i'd typically expect the router.post part to be in a different file
well now it's saying handleRequest isn't defined
ah, right
because module.exports =
Oh my goodness!
20:05
wouldn't run into that if the routing wasn't handled in this file
@KevinB you are a life saver, I was at this for days and it now finally works!
Thank you so much man
20:25
@Unbreachable Yes!
i made a module
it's super shitty
"simple"
9 total files, 9 weekly downloads
Ofc, one file per person
oh that's pretty cool
err
const order = payPalSimple.createOrder(options); in the readme should probably have an await
yes is should
hence the "it's super shitty"
it has potential tho
maybe I'll build it out
20:29
that issue tho
the module is even used on a prod server right now!
time to break it
I'm back guys with improvements since yesterday :) Any idea why this renders so janky on scroll? codesandbox.io/s/sweet-moser-m6ooc
21:33
Wow I just got lots of things done. Getting the hang of JS
:-)
congrats!
hoofs'es
HAMMERTIME!
bad james
21:48
stahp
HAMMAHTIME!
stawp
you've stumped him
WHAMMATIME!
wow
I did not foresee that
21:51
whammatime
22:25
I tried to catch an event on an object that extended eventemitter but it never worked. There was an easy workaround however
posted on March 05, 2020 by Lakshmana Pamarthy

The Dev channel has been updated to 82.0.4077.0 for Windows & Mac. Linux platform will be updated next week. 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. Lakshmana Pamarth

Oh oh oh !!!!! super();
Yay!
we're no longer allowed to shake hands :(
🚽
@MehmetAli Peker 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.
23:33
o/
night o/

« first day (3428 days earlier)      last day (1745 days later) »