« first day (1607 days earlier)      last day (3343 days later) » 

12:03 AM
@MLM It seems that with too high of a dt it needs to step more than one step per cycle to keep up, and it can't. Also, I think that:
this.ellapsedTimesSinceMovementY.value = 0 - overflowTimeError;
//should be?
this.ellapsedTimesSinceMovementY.value = overflowTimeError
 
MLM
@Luggage overflowTimeError is the total amount of time over. So I minus it so that the dt increment has to catch up
 
Right, but then the 0 - makes it negative. And I think that's wrong.
 
MLM
If I just add/set it, the ellapsedTimesSinceMovementY won't be reset and will continue to grow
 
I'm only thinking that you don't want the -1 * the remainder, but just the remainder
but.. maybe i'm wrong.
 
MLM
@Luggage Here is the demo and graph without subtracting it: jsfiddle.net/MadLittleMods/6n3s3p1d/7 - The ellapsed time continues to grow over time (not correct/desired)
 
12:08 AM
Right, the elapsed growing over time is the real problem.
That's what I meant by it needs more than one step to keep up
 
MLM
No? The correct way, I believe is to subtract it so it has to catch up. What I think is correct version: jsfiddle.net/MadLittleMods/6n3s3p1d/8
 
crl
Is there a way to modify the script directly in the browser debugger (Chrome)?
 
I think that's hiidng the real problem. It goes into elapsed times of greater that 2x the xTime
let's back up a second. Current elapsed is 0.006 with a xtime of 0.005. It should step and then leave the elapsed time of 0.001.
You have it leave -0.001.
 
MLM
hmmm, Where would it ever go back down (in your case)?
 
It did go down. It went down to 0.001 from 0.006
Then say, another 0.007 passes, so it's up to 0.008
 
12:13 AM
imgur.com/a/wIJ2q @SterlingArcher, this is gold
 
Then 0.008 - 0.005 = 0.003
But eventually it's up to 0.01, double the xtime of 0.005. this is where is goes wrong.
Sicne it can only step once. It can't step fast enough.
So.. you might just need to change the scale of your numbers, if you can.
Fixed 0.01 in the above statement.
 
MLM
@Luggage I could but I would want to make a solution that scales as the timestep varies. timeResScaleFactor = dt / xTime; or something
 
you can't ever steop more than once, right? that's thewhoel point?
 
MLM
@Luggage Correct, there needs to be "physical" time between steps
real world time
 
in this case it's stepping once every 5 milliseconds but it takes about 5 milseconds between cycles
or it NEEDS to step once every 5 milliseconds (0.005) but there are more than 5 milliseconds past since the last step.
do you know the real-world time? will this thing run fast enough?
 
MLM
12:20 AM
20 microseconds is the minPulseWidth(fastest the stepper will go). Yes, on a Teensy 3.1 (96Mhz microcontroller). Porting over this concept. I have driven the steppers before just fine. It is just constraining them to a ratio is what is tripping me up
 
well, this thing is taking, on my pc, over 5 millisecodns between loop runs. Thats' not fast enough
but the browsers envirnment likely has a lot to do with that
 
MLM
Ye, the speed doesn't matter that much(faster is better but not the important factor). The ratio is the important part.
 
i gotcha.
 
MLM
If we can figure out a way to scale the x/yTime at any timestep, that would work just fine
 
This scales to any timestep until it hits 2x xTime.
which it does.
 
MLM
12:24 AM
I posted this problem here a bit after I posted in this chat. Someone suggested the Bresenham's line algorithm which I have seen mentioned before. I need to look into that.
 
Hm.. so that's a completely different way.
You'de be just pulsing the motors in a pattern according ot the ratio and not measuring time
 
12:40 AM
I removed the 0 - and added a section starting at line 32
It throws away some time if it ever gets behind.
var overflowTimeError = this.ellapsedTimesSinceMovementY.value - this.yTime;
this.ellapsedTimesSinceMovementY.value = overflowTimeError;
// can be replaced with:
this.ellapsedTimesSinceMovementY.value -= this.yTime;
 
MLM
@Luggage gotchya. Seems to works well :)
 
Now... since we are just correcting for the fact that the loop doesn't run fast enough, once must wonder if using this method is correct.
You might be able to jsut take the ratio of x/y and just pulse either x motor, y motor or both depending on that ration
Then you alyo care about time to make sure you don't pulse too fast
 
MLM
Ye, Another thing to factor is handling acceleration with the pattern(Bresenham's line algorithm) method. With our ignorant method, it is easy
 
That's not something I'm familiar with.
tessel?
 
MLM
@Luggage what? tesselation?
 
12:52 AM
I guess not. I was wonder if you were using this hardware: tessel.io
 
MLM
I am using a Teensy 3.0/3.1 with some stepper drivers. It doesn't run JavaScript but porting the code/concept to C++11 isn't that hard.
 
ah.
 
MLM
There is the Espruino which also runs Javascript though. Not sure on whether it is good
 
that IS nice.
 
1:02 AM
@rlemon but wait, sublime is by default dark
 
it is a minimal theme
 
what makes it minimal?
 
MLM
@Luggage What is the purpose of flooring the backlog? It seems to work cleaner/more accurate without it. jsfiddle.net/MadLittleMods/6n3s3p1d/11
 
that is far from the original UI
 
It reminds me of the theme I use in atom.io: atom.io/themes/seti-ui
 
MLM
1:09 AM
The sidebar is the most different part to the stock UI. I like it
 
@MLM I guess no good reason..
I can't rememeber why I wanted to floor it originally
also remonds me of brackets.io
In other words.. it's a trendy style (in a good way).
 
MLM
@Luggage Thank you for the help. I think I am going to try to make a Bresenham's line algorithm implementation to see and understand how it works, plus compare.
 
cool
 
MLM
The overflow fix works well but definitely noticeable hiccups
 
Is it better to define a variable or not? eg. ("<div>").appendTo("#sth") and var s = "#sth"; ("<div>").appendTo(s)
 
1:25 AM
if you are not using it again later, don't bother with a var
and if you are using it again, cache the object, not the selector
 
vary true
 
@rlemon Thank you. So if I define a "var", it is caching(server-side??)? I know it is a very basic question, but how do you differ an object to a selector?
 
when you use a variable in js it stores it in the local scope (keep with me)
var foo = 1;
function bar() { alert(foo); }
bar(); // 1
function bar() { var foo = 1; }
alert(foo); // error, foo doesn't exist.
makes sense.
$('#sth').something();
$('#sth').somethingElse(); // this makes the browser select the element again.
var sth = $('#sth');
sth.something();
sth.somethingElse(); // now we've only selected it once.. when we used var
 
crl
Though sometimes you end up with this kind of code github.com/eirikb/gifie/blob/gh-pages/app.js#L2 :))
 
okay, i understood upto the "selected it once". If it is
sth.something();
sth.somethingelse(); // isn't it selecting twice because the 1st line is closed already ";", and it is using sth twic.

I mean, if it is
sth.something().somthingelse(); //it would make sense we've only selected once.
 
crl
1:37 AM
If you're chaining them like that ^ $('#sth').something().somthingelse(); would do the same ( $('#sth') is computed only once)
 
@crl given that the defined variables are used again in the Script, it was good to define them (no??).
 
crl
@Maki I guess so, but I find it a bit ugly to have such a wall of defined variables
 
oh...
I'm asking because I'm wondering if I should define the #table-body in this

$("<div>", {class: "tablewrapper"}).insertBefore("table#table-body");
$("<table>", {class: "header"}).appendTo($("<div>", {class: "headerwrapper"}).appendTo("div.tablewrapper"));
$("table#table-body").appendTo($("<div>", {class: "bodywrapper"}).appendTo("div.tablewrapper"));
$("table#table-body>thead").clone().val("").appendTo("table.header");
$("table.header>tr").removeClass("header_hidden");
$("table#table-body").find("thead tr").addClass("header_hidden");
from the comments before, I assume I should.
 
crl
$("table#table-body") yeah, perhaps, use a descriptive variable name too like tableBody
 
thank you @crl @rlemon
 
crl
1:44 AM
yw
 
Another question... or if there is a site to read about it I'm happy to read it
 
function name(){}; << standard function script
function name(){ do something here }; << understood
function (a){ do something here }; << now, I don't understand what the "a" is, and how to use it.
sometimes, I see this...
function(a, b){ do something here };
 
function foo(a) { alert(a) }
foo('hello Maki');
run this ^
what browser are you using
 
@rlemon it looks nice and clean!! variables, functions, function linked to html...even a noob like me can identify it sorted nicely.
@rlemon Chrome and IE9
 
crl
1:50 AM
!!> function test(a){console.log(a)}; test('foo'); test(1+1)
 
@crl "undefined" Logged: "foo",2
 
@Maki in chrome hit ctrl + shift + j
that should open the console.
 
crl
or F12
 
@crl opens elements iirc
not console
or last tab or something
 
crl
ah right :)
 
1:53 AM
@Maki once open, paste this into it and hit enter
function greet(a,b) {
  console.log('hello', a);
  console.log('from', b);
}
greet('Maki', 'rlemon');
I hope that helps you understand it
 
is okay I knew how to open console, :)
okay, with both examples it is now interesting
let's see if I have it correct
 
function add(a,b) { return a+b; }
function double(number) { return add(number, number) }
double(3); // 6
\o/
 
function greet(a,b) {
console.log('hello', a);
console.log('from', b);
}
greet('Maki', 'rlemon');

"greet" is a function name which can be called upon later, such as
greet();

"a" and "b" is flexible variables, which can be defined outside the function.
greet(a, b);
 
also important, a and b are only accessibly inside of the function
!!> var a = 1; function foo() { var a = 2; return a; } console.log(a, foo());
 
@rlemon "undefined" Logged: 1,2
 
crl
1:58 AM
if you call greet() without arguments a and b will be undefined, it will log: 'hello, undefined', and 'from, undefined'
 
you mean a and b are only a variable in "greet" (with the example above)?
 
yes
they are called 'arguments'
variables local to the function, passed in with the function call
!!google javascript function scope
 
function "name"("arguments") { do something }
 
^ read some of these
 
crl
1:59 AM
a function can modify a variable you passed it in the arguments
 
anyone here use immutablejs?
and if so.. any good tuts/repos
 
I use yomama.loktar
also, wuddup!
o/
 
@rlemon she might be using you :(
haha also o/!
so busy lately dude..
 
@Loktar she still owes me like three fiddy
 
barely get time to tlak lol
 
2:00 AM
you see my house?!
show the wife
 
which one did it end up being?>
 
or was it a diff one than you sent
 
there is an unfinished basement not listed in the photos
 
@crl @rlemon, thank you very much. @CapricaSix thanks for the links. I will read them!!
 
2:02 AM
very nice man
that looks like a nice house grats
I saw something about you moving in in 90 days
 
@Maki no problem.
 
so you already submitted/had the offer accepted?
 
It is difficult to figure out where to start learning....since I only knew some HTML and CSS
 
@Loktar yup, mtg approved, deposit sent to the listing company, still a couple papers to sign then just closing papers
 
crl
Javascript is a fun glue between HTML and CSS
 
2:04 AM
@rlemon what about the inspection and everything?
 
had someone see it with me I trust because I knew there was another offer and they waved inspection. it is a 2003 home with no customs and my guy gave the okay so I waved as well
roof has about 3-5 years left. furnace is okay.
unfinished basement means I could see what I needed to see, which was no cracks.
 
dude you should get an inspection
always get an inspection
I guess you can't now since you waved probably
Cat said sometimes with mult offers it happens I guess, but...
 
yea, I know. but in this case I feel okay about the buy without a proper inspection. I've already waved yea, and I had, like i said trusted people come view it with me.
 
its not good to do
 
like I saw it, went to see it again on the day the other offer came in and I knew I had to wave inspection. they offered full + waved, so I offer + and waved.
not much, but enough.
but when I came back I brought people I knew and trust to be able to tell me if it was a good buy. not professionals ofc, but as close as you can get right.
proper electricians and contractor friends of mine
not professional inspectors*
 
2:11 AM
nice, well it looks nice man
glad you're finally getting one!
 
@crl LOL, it is some sticky and not easy to learn glue.
 
so am I :P
 
@crl but I will keep trying
 
it was risky with the other bids, and yea I was a little uneasy about waving the inspections. but they all promised me they wouldn't even get it inspected themselves after seeing it if they were buying so I'm crossing my fingers no surprises. it was a family of 4 (two small children) recently turned 5 and in need of more space.
I imagine at least. two kids in one room, and a brand new baby in the other.
makes sense.
 
yea
 
crl
2:18 AM
@Maki keep being curious, you'll learn
 
haha sorry working on my work pc via remote desktop
pings aren't getting to me right
er wait.. you didn't even ping nm
 
crl
jsbin.com/yafana I can't beat my Connect Four
 
I think I'm working too much.. I need a break lol
@crl wtf
thats hard...
 
crl
decrease the depth if it's too hard :))
 
@Loktar yea, sunday bought a house. monday sprained my wrist :/
today.. well.. nothing of interest happened.
 
2:25 AM
@crl well, only few people help and explain though. You and rlemon are one of those very nice people.
@crl wow, you can make a connect four!!! @0@
 
crl
@Maki that's not so hard, if you take your time
 
@crl just did @ default
 
crl
@CSᵠ congrats
 
the damn algo was greedy
and i just wanted to make 4
and at depth 6 it's taking too long to compute
 
crl
@Maki SomeGuy made whatthedude.com/space-burn/build and check what Copy or Loktar or Rlemon made as games too, in their profile
 
crl
@rlemon Ah nice, reminds me that helicopter game in a cave
 
as it should
that was my inspiration
 
crl
it's less frustrating than the heli game :)
On Chrome I see:
← and → to move.
↑ slows you down slightly.
Probably some unicodes for < > and ^
 
what I see in chrome + windows
 
crl
test <kbd>a</kbd>
@rlemon Hmm weird
Actually on Firefox too, (maybe it has to do with the language? I'm French)
 
2:51 AM
now i made connect 5 lol
 
Yes, blame the French
Actually, I have the same problem
By logical conclusion, that makes me French
 
crl
Hehe, or only works in Canada
 
Which is also French
The plot thickens
 
:P
we're fake french
 
crl
Cajuns
 
2:55 AM
Hello my Cajun brothers
Oh, and anyone else
 
@0@ !!
 
m59
linux bros, when I do ll or ls on of my files is a different color than the others, and on ll it also has a * at the end of the filename
what's this about?
gulpfile.js*
 
Executable
./gulpfile.js
 
m59
should a gulpfile be executable??
kinda curious since I just cloned it from a github repo
 
Yes
It should start with a shebang line in that case
 
m59
3:09 AM
it doesnt
 
Then it shouldn't be executable
 
It's executable when run with the gulp command
Kinda like running node app.js <-- no shebang necessary
 
But then they don't need to be marked as executable
 
m59
tis strange.
 
does anyone have a moment to take a look at my current problem?
 
3:14 AM
Sounds like the terminal is doing something fancy, like detecting your global NPM packages or something, and using that to determine file type/behaviour
 
m59
I only had just enough time to look at your question about your problem :/
 
@monners No, it's a bit in the filesystem
And the author just forgot the shebang line
 
@copy None of my gulpfiles have shebangs
 
They don't need shebangs when you run gulp
 
Right...
 
m59
3:17 AM
well, I chmodded it back
 
Oh, hold up, you're saying that a gulpfile should have a shebang if it's going to be run without the gulp command?
 
must
Wait
Only if you want to invoke it like ./gulpfile.js
node gulpfile.js works anyway
 
Right. Yeah.
Misunderstanding on my part about what was being asked
 
m59
I guess they just had fail permissions on that file is all
 
@Loktar ^
 
3:26 AM
hahah wth
thats awesome
 
3:43 AM
localStorage.setItem can throw
Just sayin'
 
Hi! Anyone wanting to stop by at http://stackoverflow.com/tags/synonyms?filter=suggested ?
We could need help with approving [es5](http://stackoverflow.com/tags/ecmascript-5/synonyms), [xmlhttp](http://stackoverflow.com/tags/xmlhttprequest/synonyms), [self-executing-function](http://stackoverflow.com/tags/iife/synonyms), and [node-async](http://stackoverflow.com/tags/async.js/synonyms) - and those are only the javascript-related!
2
 
@copy Looks like that's true for both session and local
 
Oh, yes
 
crl
3:59 AM
Hmm
[multiline](http://google.fr)
 
 
interesting feeling to write code while pooping, on a phone, and it works on 1st try
@rlemon so if vooping is vaping while pooping, programming while pooping would be... pooping?
 
4:36 AM
proping
 
That's me.
 
No, that's me
 
m59
oh, can't link the comment from deleted answer
 
4:51 AM
I have a DS with just one game, dedicated to just pooping. I've beaten New Super Mario Bros countless times.
 
@SomeKittens Do you work from home?
 
@BadgerCat No, but I am a cat
 
My team currently falls under Platform and Operations. Affectionately known as PlOps
 
I am a cat and I work from home.
 
Did you meet your small insect and mice quota today?
 
That's all I can think of to ask, when I think of a working cat
 
m59
any moment someone will answer this and another help vamp goes on his merry way
 
@Shea Not yet :(
 
how bad does the idea of sending a file to and from a server(nodejs) to browser using socket sound for measuring client's bandwidth?
 
That's the standard way of measuring bandwidth
You just shouldn't do it unless it's absolutely necessary
 
4:58 AM
kindof necessay, required for tell user that he should switch to only audio chat if his bandwidth not enough for video chat
so not a bad idea then?
 
Not so bad, but a more elegant way (also more complex) would be to measure the speed while transferring video
 

« first day (1607 days earlier)      last day (3343 days later) »