« first day (1852 days earlier)      last day (3099 days later) » 

@KarelG Children in pain always make me smile.
 
@KarelG idiot moment, thats all :D
I once accidently punched a kid in the face, and that's pretty much what happened
 
Guys
how does Math.random work?
 
the whole pub kinda froze.... time stopped, she went up into the air, then vertical :/
 
I have been wondering what is happening under the hood
 
2:06 PM
!!tell 26812394 magic2
 
ok what the
im serious.
 
!!undo x2
 
ok give me a hint: Is the trick behind it too easy?
 
@Asperger just look up info about random number generation in general. it's probably not different than JS
 
so you are basically telling me: So easy not worth talking about it? lol
 
2:07 PM
random number generation is incredibly hard.
 
sarcasm?
 
no
 
@Asperger The browser usually draws the randomness from the OS pseudo-random number generator
 
ok
 
computers do not easily produce random
 
2:08 PM
@Asperger It's pseudo random. The JS one, like most ones, grab the current time as seed and then operate on its own value to calculate new "random" numbers.
 
Me? I have no idea how it works. Some seed and math that makes it change to anohother number in a hard-to-predict way (for a human)
 
you need outside influence to get true random
 
or quantum mechanics. that's random by nature
 
so I have to be a JS magician to create a custom one
 
there is no random
 
2:08 PM
The OS will generate the number based on several factors that are deemed random enough: memory, microtime, CPU temperature, etc.
 
@Asperger no, just understand the formula or algorithms needed.
 
Right.
0
Q: AJAX Submit form even when invalid

djsmiley2kTrying to only submit a form when it's valid according to validator.min.js I've tried to keep things as simple as possible [EDIT] - This is updated as I've changed a few simple errors I noticed upon posting. $('#submit').on('click', function (e) { alert("Processing..."); e.prev...

This is where I am now.
It submits the form even if it's invalid. It doesn't alert to say the form is invalid
 
@Luggage I cant do what Madara said though, thats low level language
C stuff
Right?
 
browser or node?
 
A good way to "randomize" is letting the user swish his mouse around and capturing those values
 
2:10 PM
I guess the closest pattern of "true random" is used by Pokerstars. If their story (which I totally don't believe) would be true, they are measuring and using the impact of cosmic particles
but even if that would be true.. it still could be calculated if all factors are known
 
@jAndy lava lamps is a pretty nice way
 
@Asperger There a few ways to get true random number generators
 
Im not sure if mouse is a good solution though since I dont have a guarantee that they move it
 
One is listening to static radiation from outer space.
 
lol
 
2:11 PM
yea that sounds like pokerstars
 
I am not joking.
 
let pran = seed => {
  let s, c = Math.pow(2,13)+1, p = 37, m = Math.pow(2,50);
  s = seed || Date.now();
  return function() {
    s *= c;
    s += p;
    s %= m;
    return parseFloat(`.${s}`)
  }
}
 
That's how random.org does their randomness
 
Ah you took the seconds
 
or give it a seed
 
2:12 PM
but even radiation from space can be calculated if you know all parameters
true random is a myth
 
@jAndy You can't know all the parameters, that's thee point
 
random only exists as long as you are not aware of all influences
yea of course I'm talking in theory
 
take the exact position and velocity of a particle
... :d
 
Also, another way to create true random is by using spontaneous nuclear fissions with a geiger counter.
 
2:13 PM
@jAndy The full state of the universe creating those cosmic rays will remain unknown for a bit longer, so no worries
 
Which even the best scientists and instruments can't predict today.
 
because it's based on quantum machanics and only the probability can ever be known
until it happens
 
It's mathematically proven that if one has information about all the current particles' positions and velocities (magnitude and direction), they can predict or recall any past, present or future event, anywhere.
 
Which aspect of the JS random number genreator are you wanting to improve? Security or distribution?
 
yep
 
2:15 PM
@Luggage non
 
@MadaraUchiha no future particle decay
 
@Luggage im trying to understand how it works which I now do. I need some sort of seed.
Like mouse movement, time, heat, cpu etc
 
But since that's not possible even in theory (because you have more information than atoms, and even if all of the universe were to become a single giant computer you'd still not have enough storage), we're pretty safe from that perspective :P
 
@MadaraUchiha source ?
 
it's somewhat in the same category of the all-knowing book theorem
 
2:17 PM
@KarelG Read it somewhere in the past in a reputable source. Can't recall though
@jAndy might know better than me
 
If you would write an infinite amount of characters.. you would describe any event that ever happend and any event that happens in the future
 
@Asperger FF uses Time, Chrome likely does as well.
 
all you need to do is filtering the crap out :p
 
MS probably does w/e c# does
likely time
 
@jAndy Which is why pi holds all of the information in the universe (as well as any other irrational number :D)
 
2:19 PM
I know what Im trying to do is utterly useless but it will eventually improve my understanding of algorythm
 
@Asperger To be fair, you can (and sometimes should) tread functions and APIs in a language as a black box
"I don't know how document.querySelector() works, and I don't care. All I know is what it accepts, and what it returns"
 
:d
wait, this sounds like me o_O
 
Learn the specs first, how the language behaves
Then start asking how things are implemented.
 
Its just interesting, the math random I mean
 
@Asperger if you want to understand algorithm, please use the search algorithms. There are plenty of it, and you can compare them. Math.random is just more advanced. Do the basics first
 
2:25 PM
I was here yesterday and got quite a bit of heat (from mods I presume) for talking about Java instead of Javascript. But every Java channel is empty for days, and I REALLY need help. So, with the possibility of provoking the ire of the moderators or getting banned, I want to ask again: is there anyone here that can lend me a hand with JavaFX?
 
what's JavaFX ?
 
problem is, Java is not related to JS at all.
you may as well ask in the c# room
it is closer related
 
"You gotta crawl before you walk"
 
@KarelG Any source you can recommend? I have Discalulus : (
 
Also, I thought we're scripting for Java in here.
 
2:26 PM
yeah well, I know that. Just asking in case someone does know
 
28 secs ago, by rlemon
you may as well ask in the c# room
 
Please don't send Java questions to the C# room. I value my sanity.
 
@RoelvanUden if it is a syntax question, c# is closer than js
 
Do what I did, ask about javascript in arqade on se ;)
 
@crawlingvx Moderators are people whose nicknames are blue
There are none here now, and those aren't the people who would give you pressure.
 
2:27 PM
You can visit Android room. They're using Java and may be more familiar with JavaFX
 
shall visit other rooms then. Thanks for the input
 
You can try C# too I suppose. But don't ask about libraries and things there.
 
This is the JavaScript room, little to none of us are dealing or wanting to deal with Java here.
 
It's like going into a Burger King and asking for a Big Mac, you just don't.
 
darn.. due to some random turn of events I'm into conspiracy and 911 again. I just saw the footage of dimitri a. khalezov again and man.. the guy has some effing good points
 
2:28 PM
Also, "I really need help" is not a valid excuse. Most of these rooms only do support out of the kindness of their heart. No one is obligated to help you, especially in the wrong room.
 
@Asperger i have used this book during my CS course (Algorithms) The online version shows a fair part of the book, which you can use
 
I have a React redux reducer, it essentially should be immutable and create a new object of the state after the modifications, and I'm wondering how I should do that for a semi-large obj. It's a plain js obj, can I extend it easily somehow to create a new obj?
 
@MadaraUchiha sorry to disappoint you, i often face to Java code. But i won't bring that filthy thing here.
 
grrr need to rant now
boss asks me about some errors appearing in logs
i tell him i've found which script it is and i'ev disabled the script
a week later, no come back, so I re-enable it, same errors occur. he's not around so I ask the dev's if they know what's causing the errors
boss turns up later and moans... :/
 
errors are meant to be solved ...
 
2:31 PM
^
Something a bit similar happened on my job
 
We were working on this big-ass client, with performance requirement
Our widget was no where near performant enough, so we worked for about a week nonstop to make it just barely performant enough to pass their tests.
We passed the tests, got the client, and I told my team members (and leader), that was a good run, we should keep this up and get these changes to everyone, and keep improving it.
This client isn't stupid, and they will test us again, if we continue to add wasteful features, they will moan again
Got no meaningful response, went on vacation, open work mail client today just for giggles, new client moans about performance again
 
I just entered reddit's secret santa :)
 
@KendallFrey ISS Expedition 45 just released their crew poster.
XD
 
ahhhh sweeet
so I set the has-error in the html when the page is loaded
then the validator still removes it once the correct info has been entered
 
2:37 PM
 
@KarelG this is a day after the meeting telling us to be brave in facing adversity and stuff
if people can't fix things when they know about it, I'll try and fix it myself instead, that IS my job after all.
 
> Shia LaBeouf is live streaming Shia LaBeouf watching Shia LaBeouf movies for 3 days straight
 
slight aspergers means I don't get the whole 'don't tread on toes' thing.
 
I think we broke Shia LaBeouf
 
2:39 PM
I think he was already broken.
 
chauvinists
bastards
 
@SterlingArcher I've been watching all morning
he got up and slept in the isles 3 hours ago
woke back up like 20 minutes ago and got a coffee
 
just yawned
 
Is VB dead?
 
2:44 PM
no
as much as we try...
VB.NET is still used
 
imgur.com/gallery/XAR1sC0 guys! guys! pickles are back on the FP!
 
yey my validation of the form is working \o/
 
@KendallFrey rejoice!
 
Progress!!
 
@SterlingArcher Hahaha
 
2:50 PM
@rlemon I'm mad at my brother because he dragged me home from the gym before I was done to tell me they want to move to another city, after we all agreed that staying where we are is awesome bc close to work
Double whammy. I think I'm going to be 2/3 vote steamrolled here
 
0
Q: AJAX Submit form even when invalid

djsmiley2kTrying to only submit a form when it's valid according to validator.min.js I've tried to keep things as simple as possible [EDIT] - This is updated as I've changed a few simple errors I noticed upon posting. $('#submit').on('click', function (e) { $('#datafixForm').validator();...

 
How much of a bad idea is it for me to use React in a redux-like way where I simply clone the state before running a reducer to simplify the way you change the state?
 
@RoelvanUden 7
 
@FlorianMargaine On a scale of? :P
 
7 to 7
 
2:59 PM
hey does anyone here have experience using Gitolite on their GIT repository. I recently implemented it and made a clone of the gitolite-admin.git repo i then configured the conf/gitolite.conf file. I added my public keys in the keydir and then did a git add, and git commit. Now when i test it the permissions are not working users can still do anything in the repo. Any idea to help me
 

« first day (1852 days earlier)      last day (3099 days later) »