« first day (3698 days earlier)      last day (1236 days later) » 
05:00 - 19:0019:00 - 22:00

7:00 PM
o/
 
@TylerH bit of time and no see - how you doing ?
 
o/
 
hello, any Strava users here?
while this may look like a random question, I'm developing an app based on Strava and would love a few test users! Please let me know if you're interested. I'm not too sure if it's allowed to post links here!
 
@JonClements busy. house projects out the wazoo
including enlarging our fenced in area so the dog has 3x as much run-around room :-)
 
7:17 PM
hallo
anyone know why this code is only generating one square?
var canvas = document.getElementById("ok");
var ctx = canvas.getContext("2d");
var y = 0;
var Rg = Math.floor(Math.random() * 480);
function newBall(x) {
  ctx.clearRect(0, 0, 1000, 1000);
  ctx.fillRect(x, y, 20, 20);
  y++;
}
function newFaller(x) {
  setInterval(() => {
    newBall(x);
  }, 5);
}
function generateFaller() {
  Rg = Math.floor(Math.random() * 40);
  newFaller(Rg);
}
setInterval(generateFaller, 1000);
 
I'm kind of wondering, is the array.reduce function really the best way to do a "map + filter" (or array.map-if like it would be in other languages).
 
define best
 
It feels really inefficient with constantly passing the reference around... It's also not really descriptive to use "reduce" to create a new array which actually maps datapoints in the original map (instead of actually acting like a reducer to combine data).
 
it gets the intended result with only looping once rather than twice, which is certainly good, though you could do the same with a, loop
 
umm
 
7:29 PM
Yeah I'm nearly always prefering a loop. Apart from then I have to go through quite some hoops like make it an iife, so I can pass it into a const variable. (Which useful for being more certain of the type down the road)
 
so i accidentally created an alert spammer on codesandbox.io don't ask me why or how I don't know anyone know how to stop the alerts for a minute so i can take out that bit of code
in case you didnt realize i have got myself into a major clusterfuck
 
in chrome, after n popups you can tell it to ignore them
 
o thx
wheres that
 
just keep closing them till it appears
will be a checkbox
 
Oh be careful though: you'll have to go to site settings to enable the popups for debugging late again
 
7:31 PM
but it just says ok not close should i just clicking ok
 
Also f12 should stay responsive? you can press "pause" in the source tab to forcibly pause javascript.
 
no im on a school chromebook i cant disable javascript
popups and rediracts are locked too
so im pretty much fucked
 
???
Can you press f12?
Well I am almost certain you can, but do you see then a new view open to the left or bottom of the page?
 
i cant press f12 im on a chromebook
 
7:36 PM
Hi! is this a good room for npm related questions?
 
yup
 
it shows up as greyed out i cant go into devtools on this computer
 
Well then people who gave you your computer really don't want you to develop website (frontends)... Talk to tthem.
 
Cool! So, I made a private repository in AWS and can publish to my scoped repo, but my package has a dependency to aws-sdk which I do not host in my private repo and then npm install fails with the error "'aws-sdk@^2.794.0' is not in the npm registry.", any clue how to fix?
in my .npmrc I do have @my-co.registry=https://....
 
uh think you have answered your own question: you have a different registry rather than main npm as your go to... And npm needs to be able to find the package needs there.
 
7:45 PM
I do understand that, and I also have tried with the extra line: registry=registry.npmjs.org and it still cannot find un-scoped packages
 
Anyone know why this code is only generating one new falling square?
var canvas = document.getElementById("ok");
var ctx = canvas.getContext("2d");
var y = 0;
var Rg = Math.floor(Math.random() * 480);
function newBall(x) {
  ctx.clearRect(0, 0, 1000, 1000);
  ctx.fillRect(x, y, 20, 20);
  y++;
}
function newFaller(x) {
  setInterval(() => {
    newBall(x);
  }, 5);
}
function generateFaller() {
  Rg = Math.floor(Math.random() * 40);
  newFaller(Rg);
}
setInterval(generateFaller, 1000);
 
I guess my question is how can I specify a private repo for a scope, but use the general reposiroty for un-scoped packages?
 
umm
 
 
1 hour later…
8:47 PM
Fixed it, fwiw I had to add the npm-store upstream in my CodeArtifact repository
after that, npm install was able to "find" normal npm packages (unscoped)
 
9:47 PM
Hi Guys!
 
@Mahdi 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.
 
05:00 - 19:0019:00 - 22:00

« first day (3698 days earlier)      last day (1236 days later) »