« first day (2916 days earlier)   

12:00 AM
"A quitter never wins and a winner never quits" -Napoleon Hill (source)
 
 
3 hours later…
2:48 AM
reads a book
 
3:41 AM
@Wietlol good morning
I need some help in regex, are you free to discuss?
 
 
2 hours later…
5:50 AM
Morning
 
Morning.
 
o/
 
\o
 
this.room.silent();
 
6:01 AM
posted on October 17, 2018

 
hey @Zoe :)
 
6:21 AM
Morning
 
Morning.
 
\o
 
o/
 
Zoe
6:34 AM
@Simmant hiya
 
just saw a photo in fb saying that in js, [6,-2,2,-7].sort() ouputs (4) [-2,-7,2,6].... dafuq... nice sorting :D
 
6:49 AM
morn
 
morn
 
in JavaScript, 26 secs ago, by Caprica Six
@Neil [-2,-7,2,6]
confirmed
 
@Neil im crying my eyes out......
 
I'm guessing it treats it like a string
it is in proper order lexographically
 
well yeah. but what sort of sort method is that :D
 
6:59 AM
meh
I don't know if I can ever fully trust a sort method accepting no parameters to be efficient nor accurate
also you wouldn't know if it is stable or not
 
true true
 
7:22 AM
Good mornink
 
mornings
 
@Sir.Hedgehog Default sort method is by string
Try naming your files -2.txt, etc and see that they sort the same./
 
why would someone choose to do that....
 
@Sir.Hedgehog It's the comparator vs comperable debate.
The sorting function is determined by what you pass to .sort(), a comparator
And not on what's in the array, (i.e. a number)
Because you can't reasonably determine what types are the elements in the array in JavaScript.
It isn't like Java, where you have List<Integer> and you're assured that the list will only have integers, so you can use the Integer's compare() method
They could have went with a different sorting function, but then sorting strings would have been awkward by default, and we'd have the same discussion about strings :)
 
7:44 AM
javascript arrays are just awkward in general, IMO ;)
2
 
8:14 AM
ok im really confused right now. i was trying to fix sth for someone and i came up with this. can you see the code and freakin tell me, why once in 50 results or so there is a number generated which is less than min? codeshare.io/5XnR9E
the params are always the same, i chekced. but still it occurs that a num with one less digit is generated. could it be a flaw of the Random class?
i know the example is stupid, point was to help him make a random number with a given range of numbers.
 
You are not going to be the one to find a flaw in the Random class, let that go.
 
^
define "less than min"
what is min for you?
 
@SpringLearner ohai
you shouldnt ask such meaningless questions
 
A wild wietlol wakes up
 
just ask the question you have
 
8:20 AM
@neil min, is the minimum number that i want it to generate
 
I see what you mean
 
for example, what im trying to do is, if the input is 7, i want to generate a random number between 1000000 and 9999999
so that the random number had 7 digits
 
@Gimby I did
 
@neil 30 occurances on 1000 results..... dafaq?
@Gimby @gimby then explain this dear :D
 
I don't have to, the chance is simply greater that it is a result of misunderstanding rathe than a bug in an ancient class used by the entire world of Java programmers.
 
8:23 AM
@Sir.Hedgehog split your method into several methods
 
@Sir.Hedgehog though it doesn't happen for me
Every number is greater than 777777
 
int getRandomNumberInRange(int min, int max)
 
I'm running a loop as we speak and it will stop once a number occurs which is less than 777777, and it's still going
 
and int getMininumNumberWithNDigits(int n)
 
@neil its shouldnt be greater than 777.777
 
8:24 AM
it's a range from 7777777 and 777777, right?
 
its should be greater than 1.000.000 which is the min number with 7 digits
no
 
ok, well your "min" is 777777
so that's the reason
should be 1000000, right?
 
@Sir.Hedgehog what does System.out.println(maxInt+"----------"+minInt); print?
 
you should be tacking 0's on the end, not 7's
 
if given 7, (7777777 - 777777)
 
8:27 AM
so, you will get a number between 777777 and 7777777
 
@Sir.Hedgehog that's why I was confused.. because it seems to be doing what you wanted
until you told me you expected it to be greater than 1000000 :)
hint: 777777 is less than 1000000
 
i have a feeling i messed up my head with those variable names he added -_-
 
if it is any 7 digit number, then it's from 1,000,000 to 10,000,000 (exclusive)
@Sir.Hedgehog Also: BigDecimal.ONE.scaleByPowerOfTen(range).intValue()
 
@Neil thanks mate anyhow. i changed the var names and it all made sense m:D
 
k
 
8:39 AM
Math.pow(10, digits = (7)) = 10,000,000
izi pizi
 
@Wietlol what is meaning less here?
 
> are you free to discuss?
the same as "can I ask a question?" or "Is there anyone having knowledge in NLP?"
 
"Are you free to discuss?" at least doesn't defeat it's own purpose like "can I ask a question?" does.
 
i dont think anything wrong in asking
if you are free then we can discuss is what I meant
I did not want to disturb a person busy in his work
its like taking appointment
 
@Gimby but I would have been able to answer the question without SL being online
which I couldnt now
 
Zoe
8:48 AM
@Wietlol The first one defeats itself because you already asked something, the second one is actually useful, and are you free to discuss means do you have time to discuss this in more detail?. So actually, neither of those three are the same
 
well... the third one was just for lolz
 
Regardless, it pretty much avoids the main problem: singling out specific people. That defeats the purpose of this chat room. You don't have to, if someone is willing and able to answer a question they will. Whether it is the majestic Wietlol or the lowly peon sir Gimpalot.
 
Majestic > Almighty
 
Pardon, m'lord.
 
:D
 
8:51 AM
I have seen many times @Wietlol helping others in regex problems
 
I invented Regex :D
 
so I thought if he is free then we can discuss
 
at least... a regex
this is a marvelous read
 
@Wietlol congratulations
I did not know that
 
@Wietlol The regex that successfully validates an email address?
 
8:57 AM
@Gimby oh no, I am not that idiotic :D
my level of idiocy has its boundaries
 
That's why I didn't ask "the regex that parses XML?"
 
oh... but that is fine
all you need is a regex engine that allows recursion
html on the other hand....
ew
also, xml has no nested character issues
so its fairly simple
 
For HTML you'd need a regex engine that eats souls.
 
9:11 AM
@Wietlol actually the output is 1.0E7
maybe u missed sth?
to this that u said Math.pow(10, digits = (7)) = 10,000,000
oh it just needed a cast to int
 
the output being 1.0E7 is because you used toString()
and 1.0E7 IS 10,000,000
 
@Gimby You could just use PCRE
It'd be much safer than trying to use a regex engine that eats souls without losing your own soul.
It is possible to parse HTML using a regex, but it's not very practical.
 
@Wietlol as it was it apparently by default returns a string, it needs to be casted to int or double or whatever neeed
 
no, you printed it
or something
how did you know it was 1.0E7?
 
sys
output on the console
 
9:26 AM
@JennaSloan its not practical to parse any tree structured data with regex
the capturing groups arent powerful enough to give you a good response
@Sir.Hedgehog and there is only one thing that can be outputted to the console: a character
(or a string, which is a sequence of characters)
so, the value (double) needs to be converted to a string
and your local settings say that for such a double, it is very nice to output in the mathematical format of #E#
1.0E7
 
I love to see the regex that could parse an HTML document
I'm sure the number of pages required to print it all down on paper would be enough to start a nice toasty fire
 
depends on the font size
 
I don't think it matters, assuming the font size is big enough to be able to read
 
Have you ever tried typing a regex like <[^>] into the chat?
 
That's not a regex, it's a birdy!
 
9:34 AM
Just sending that text alone is enough to trigger the zalgo
 
@Wietlol i just thought that you know, cause its Math. it would dby default be int, forgot how stupid it is :p
 
You could also enter this into your browser's console: Eggs.Cthulu("<[^>]")
2
 
its double for a very specific reason
 
@JennaSloan hahahahahahah
 
its not particularly stupid
especially because you just dont know reasons
 
9:43 AM
@Wietlol ehmm its Math. i would expect a default int
 
other than that... yes, it is stupid
 
@Sir.Hedgehog why int?
wie... what? no!
/wietloldamnit
 
its not weitlol, wietbol, weitol, wetlal, wietnam, wietlawl, wietrofl, wietroll, wietlmao, waldoil, walido, wiedol, right or wrong, its Wietlol damnit
 
@Wietlol i would guess cause i have it in my mind as the default thing you would use when managing numbers etc
i am very sorry Sir. @Wietlol but until you mentioned it, i was reading wietHol.......
i feel ashamed
 
9:45 AM
how about 0.5?
would that be an int?
 
Too late now, tomorrow you wake up with a horse's head in your bed.
 
well yeah ok, if you want that you will use double.
@Gimby ahhahahhahhahahhahaha can it be a goats? so i can at least cook it later?
 
and what about 1,000,000,000,000 ?
would that be an int?
 
that would be a long
 
@Sir.Hedgehog ew
 
9:46 AM
so "default" is more complex
I like Wietlang in that perspective
you get something similar to BigDecimal by default
and BigInteger
 
@Gimby first try it, then tell me... lemon on the brain, and the tongue, magnificent piece of meat. also dont forget the chickbones :p
 
(and some int operations return you a decimal... like division)
 
well yeah but for most?? operations which are simple, you would use int i guess
 
@Wietlol What, like 1/2? That returns an int.
 
subtly
@JennaSloan that returns a DecimalNumber
(which is... an interface)
1/2 will most probably return a base10 32bit decimal
 
9:49 AM
@Wietlol Not in Java
 
I said Wietlang
3 mins ago, by Wietlol
I like Wietlang in that perspective
 
@Wietlol "Wietlang"? I thought you were all "its Wietlol damnit"
 
Wietlol is me
Wietlang is not me
you shouldnt call me Wietlang, nor Wietlang Wietlol
 
Wietlang is not your Korean name?
 
nope
why would it be?
 
9:54 AM
Chinese, then?
 
Wiet Long-un ?
I do want to take over Vietnam one day and rename it to Wietnam
that'll teach em
 
How about "魏罗"?
 
meh
 
The second character means "talkative" or "fussy"
Sounds a lot like you
 
you what?
I dont even...
 
10:47 AM
@Wietlol how come you make everyone dissapear one by one? :p
 
:p
 
11:45 AM
posted on October 17, 2018

archive - contact - sexy exciting merchandise - search - about ← previousOctober 17th, 2018nextOctober 17th, 2018: I am actually kinda sorry.– Ryan

 
@Sir.Hedgehog It's the quiet before the storm, enjoy it while it lasts.
 
How anonymous class works internally???
 
A box jellyfish sting can kill a person by stopping his or her heart in about two minutes. (source)
 
very good
 
12:00 PM
@Gimby oh boy. good thing im leaving work soon. :p
 

« first day (2916 days earlier)