« first day (3556 days earlier)      last day (1375 days later) » 

12:03 AM
!!choose satisfactory poe wow somethingelse
 
somethingelse
 
 
3 hours later…
2:54 AM
@Lapys "TypeError: console.count is not a function" Logged: `` Took: 0ms
 
3:31 AM
Hi everyone
 
@Gaston 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.
 
Hi!
!!choose poe or satisfactory
 
satisfactory
 
here we go
 
||> (function(count) { console.log('[' + count + "]: ", "Hello, World!") })(0);
 
3:36 AM
@Lapys undefined Logged: "[0]: ", "Hello, World!" Took: 0ms
 
||> (function recurse(count) { console.log('[' + count + "]: ", "Hello, World!"); recurse(count + 1) })(0);
 
@Lapys "RangeError: Maximum call stack size exceeded" Logged: "[0]: ", "Hello, World!", "[1]: ", "Hello, World!", "[2]: ", "Hello, World!", "[3]: ", "Hello, World!", "[4]: ", "Hello, World!", "[5]: ", "Hello, World!", "[6]: ", "Hello, World!", "[7]: ", "Hello, World!", "[8]: ", "Hello, World!", "[9]: ", "Hello, World!", "[10]: ", "Hello, World!", "[11]: ", "Hello, World!", "[12]: ", "Hello, World!", "[13]: ", "Hello, World!", "[14]: ", "Hello, World!", "[15] Took: 32ms
 
Damn..
(Wanted to break a bot today...)
||> /* ? */ (function recurse(count) { console.log('[' + count + "]: ", "Hello, World!"); setTimeout(function() { recurse(count + 1) }) })(0);
 
@Lapys "ReferenceError: setTimeout is not defined" Logged: "[0]: ", "Hello, World!" Took: 0ms
 
Hmm... I'll be back..
||> for (var i = 0; ; ++i) console.log('[', i, "]: ", "Hello, World!");
Ah ha! No "smart-arse" replies now, James? (lol)
💭(Welp, that wasn't rewarding)
💭(Hope someone isn't miserable on the other end debugging James or whatever, highly doubt it)
||> console.log("git gud(?)");
 
3:51 AM
@Lapys undefined Logged: "git gud(?)" Took: 0ms
 
Yup, James lived -_-
 
4:30 AM
Sometimes he's quiet but you can't kill him
 
5:11 AM
@JBis Nah, that's blocked for users sorry :(
 
 
1 hour later…
6:31 AM
@JBis Sounds like a horror movie tagline.
 
 
3 hours later…
9:07 AM
@Lapys probably, his reply exceeded the chat message limit of 500 characters
therefor, it was rejected by SO
it looks like James currently doesnt have any mechanism to deal with that limitation
 
 
2 hours later…
11:07 AM
Hey, anyone online? Need help with something
 
@Kenny.k 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.
 
 
4 hours later…
3:12 PM
I am trying to draw a marker icon on canvas. I can draw the path but I cannot move it to a proper position.
ctx.beginPath() ;
ctx.moveTo(dot.x, dot.y);
let path = new Path2D("M10 20S3 10.87 3 7a7 7 0 1 1 14 0c0 3.87-7 13-7 13zm0-11a2 2 0 1 0 0-4 2 2 0 0 0 0 4z");
 // path.moveTo(dot.x, dot.y);
ctx.fill(path);
ctx.closePath();
I can see the marker. But its on the top left corner. I don't see it in dot.x, dot.y
 
3:32 PM
!!choose poe satisfactory
 
satisfactory
 
james hates poe
 
what did you expect? the other option was satisfactory
@NeelBasu can you make an mcve?
 
3:53 PM
@Wietlol What is an mcve ? I made afiddle jsfiddle.net/L5rq6410
That moveTo doesn't work
 
ah
that is because moveTo is not what you think it is
what you are looking for is "translate"
keep in mind, this is based on offset
common recommendation is to use translate and reverse it back
so,
ctx.translate(dot.x, dot.y);
doDrawing(ctx);
ctx.translate(-dot.x, -dot.y);
moveTo is basically simulating a pencil
like,
beginPath()
moveTo(somePlace)
moveTo(anotherPlace)
strokePath()
that way, you get a line from starting position to somePlace to anotherPlace
I dont remember how to properly specify a starting position
moveTo just before the beginPath does the trick, but there should be a better way
 
@Wietlol Aha, Thanks working now jsfiddle.net/L5rq6410/1
 
other functions that work similarly are scale and rotate
data class Transform2D(
	val translation: Vector2,
	val scale: Vector2,
	val rotation: Angle
)
{
	fun applyTo(context: CanvasRenderingContext2D, body: () -> Unit)
	{
		context.apply {
			translate(translation.x, translation.y)
			scale(scale.x, scale.y)
			rotate(rotation.radians)

			body()

			rotate(-rotation.radians)
			scale(1 / scale.x, 1 / scale.y)
			translate(-translation.x, -translation.y)
		}
	}
}
this is what I use in my canvas based stuff
(not js, but still canvas)
the order and maths on reverse matter quite a bit ;)
 
4:33 PM
@Wietlol which language it is ?
 
kotlin
 
https://stackblitz.com/edit/angular-ivy-m8fgce
Can anyone help with this? I can't figure out something
 
5:07 PM
Has anyone seen a html layout that displayes things in a circular layout around an axis? I mean I could program this manually with coords and onRisez, but would take a while
but its canva
ouch 3.5k $ for one year
 
 
4 hours later…
9:48 PM
I'd just JS it
 
 
1 hour later…
10:51 PM
Hi
I am building a node.js & express & EJS project
I have a form that the user fills and when he send the form I am doing some calculation on the server
I want to update to user on the process (e.g 2/5 completed)
How can I do this?
 
@EfiGordon 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.
 
 
1 hour later…
11:58 PM
@EfiGordon How long does it take to do?
 

« first day (3556 days earlier)      last day (1375 days later) »