« first day (1752 days earlier)      last day (3179 days later) » 

10:00 AM
@JanDvorak sarcasm? :-P
 
@AwalGarg yes
 
@RoelvanUden the relations could still be made server side and sent to the client along with results, btw
 
ttj
@KarelG i load all external js before closing the body tag, and my scripts go after the external js
 
var myScript = document.createElement("very long scirpt!");
document.head.append(myScript);
 
nono
var myScript = document.createElement("script")
the parameter of createElement is the tag name
script, div, a, h1, etc.
then myScript.text = "very long script!"
 
10:02 AM
!!afk @Neoares would like to answer all your questions. special attention to jquery and php questions btw. offer valid for limited period only. hurry!
 
document.createElement('script')` <-- creates <script></script> Element object
document.createElement('div')` <-- creates <div></div> Element object
 
ahaaa I understand now. Thanks @Neoares and @KarelG :)
I'm new to JS land :P a C#/C++ programmer myself
everybody gotta be hating me now, for stating that xD
 
Not at all.
 
like
var myText = document.createElement('p');
myText.id = 'foo'; // set id
myText.className = 'bar'; // set class name
myText.html = 'hey there !';
document.body.appendChild(myText); // insert the object to the HTML structure, that it becomes visible.
 
hehe
 
10:05 AM
well "visible" ... if you add css style that it's not visible, that p element won't be visible
 
many thanks @KarelG ^^
 
I never learned C++, :|
 
that baby is going to be encapsulated inside an anonymous function and sent form C# through C++ xD
@cswl it could be quite fun if ya like it :)
 
@Major0 most of the programmers here aren't doing only JavaScript. They are using other languages too, like Java, C#, C (++), Haskell, Lisp ...
 
Nice! I am looking forward to learning Lisp or F#
 
10:07 AM
PHP...
xD
 
php of course haha
it's similar to C++ btw
 
expressjs users: do you app.use('/subroute', function...) or app.use('/', routerObjectWithSubRoutes)?
 
1st
 
reason?
 
the first tutorial I've read did it that way
 
10:09 AM
I have to learn C too :|
 
C is funny
 
Yeah C has more syntax, and you gotta separate interface from implementation of every function lol
 
also, lots of references to ASM
 
C has less syntax than C++ right?
 
10:12 AM
no lol, you gotta write more to achieve the same thing you would achieve in C++
 
That is not called Syntax :|
 
that's userland code...
 
@AwalGarg Yes. C++ just slapped on new syntax and features to make cumbersome stuff easier.
 
yeah by more syntax I mean code lol
 
that... surely doesn't make sense
 
10:14 AM
@Major0 You don't have to do that at all. You can make a single file definition+implementation ;-)
Is it pretty? No. But C++ never is.
 
100 lines of C code = 3 lines of Python code
 
@Neoares just shows how much is abstracted by python runtime.
 
@Neoares That's completely unreasonable. If you have the same libraries with the same APIs as you have in Python, it doesn't take 100 lines in C. Besides, Python is lord and master in making long unreadable lines of wtf-just-happend-there.
 
Yeah you can @RoelvanUden in C++ (either split them or make them in the same file) but I am talking about the functions themselves. AFAIK you gotta do two blocks of code for defining a function
 
Hi all ! Is there a specific way to trigger form submit event breakpoint in chrome dev tools ? Because, even the simplest form doesn't trigger it (see: jsfiddle.net/xsuuatrL) Thanks !
 
10:15 AM
^(in plain C)
 
@Major0 you don't.
 
@RoelvanUden but you don't have same libraries with same APIs
and I was talking about raw language, without libraries and APIs :P
for example, random.shuffle(array)
 
Really? well I musta been wrong lol. After all I don't write C. But can understand it when I read it. And every C snippet I seen before have the function defined using two separate blocks of code
 
@Neoares But your argument is completely irrelevant. "You can in MATLAB in one line what you need 100 lines in Python for!". See? MATLAB just happened to have that wonderful API to do that complex math-thing that Python didn't. That makes your argument extremely pointless..
 
well ofc you can consider random as a library
@RoelvanUden you didn't get the point
I said so because the "C has more syntax" thing
 
10:18 AM
Excuse me guys Ima go complete this "Around the World in 80 Days" code trip to get a new tab to open lol gonna post back the result
 
@Neoares unless you come with a proof, that statement is false
if line is defined with ending points ofc
 
> random.shuffle(array)
 
@Neoares There is really very little difference in raw syntax of most languages. You have conditions, functions, perhaps classes, etc. Maybe some concepts like pointers. But if you take away the BCL and APIs the differences in languages are almost completely irrelevant. Writing 'If ... Then' is by no means worse than 'if (...) {', for example.
 
to be fair, these condition things are just defined by JMP internally, no matter how it's called in high level languages
 
@FlorianMargaine I think he is referring to code using top-down function definition style... moot point anyways
 
10:46 AM
Yeah. Language features and syntax does help to trim line count, but not to order of magnitude, much less two orders of magnitude. Library is another matter.
 
I got a problem
I want jquery datepicker to show above it's image, not below
 
I got 99 problems and your code ain't one
 
@Learner Check CSS z-order
 
1
 
10:48 AM
@Sheepy Shaun!!
 
what i meant by above is that, I want it to show above the image
not in sense of z-index
i mean in sense on height
@JohnSnow take this, and you will have century problems then
 
Sooo, go edit the datepicker css?
 
@Neoares Bah~ Just back from Russia.
 
@Sheepy so much vodka?
 
xD
 
10:50 AM
@Learner You lost me there. Above the image on height? Or do you mean y-position?
 
vodka and battlefield
 
@Sheepy Yes, Yes , thats the correce word
 
Neo, if I want to add a previously defined JS function to onmouseover event would I use something like:
object.onmouseover="functionName()";
is that correct?
 
oh thought there was any easier way there
 
10:51 AM
@Neoares Too much green pastures. Russia is big :p
 
without () @Major0
btw, is your name from Metal Gear?
 
I see, thanks again ^^
I made it up lol
 
61
Q: How to change the pop-up position of the jQuery DatePicker control

gfrizzleAny idea how to get the DatePicker to appear at the end of the associated text box instead of directly below it? What tends to happen is that the text box is towards the bottom of the page and the DatePicker shifts up to account for it and totally covers the text box. If the user wants to type th...

 
as in Major Orgasm xD
but I didn't mean it like that
People think O stands for Orgasm
 
but it's a zero
 
10:53 AM
O stands for yomama
 
!!google metal gear solid major zero
 
haha
 
oh shit, Caprica is sleping
 
nope :p
yeah well it should be an O
but .. somebody already had that name
duckduckgo
 
I thought it is as simple as programmers count from zero.
 
10:54 AM
JESUS I can't type that fast here xD
yeah that too Sheepy :P
it can be whatever you like lol
 
Thank you guys
everyone who helped
 
Major Orgasm
 
yes you too :)
 
Major Zero
 
@Sheepy Not if you do lua ;p
 
10:55 AM
@Callum Well, or SQL. Which many programmers do. But still...
 
I didn't really help Learner but thanks anyways :P
 
@Major0 not you at all, sorry
 
np lol
 
Lol
 
10:57 AM
@Neoares OH CRAP I forgot... I can't just pass the method name! I wanna pass a param as well (the href of the current object i.e. this.href)
 
sec
 
@Major0 bind
 
onmouseover.bind?
 
var add = function(a, b) {
    return a + b;
}
var add5 = add.bind(null, 5);
console.log(add5(7)); // 12
func.bind() creates a new function with some of the parameters locked in.
 
I see
 
10:59 AM
(First parameter is this, which is bound to null in the example, and rest of parameters are parameters passed to the function)
 
ahaa
 
Hello everybody
 
first param this... reminds me of C# extension methods :P you pass this as the first param
thanks madara :)
 
Beware that bind is relatively slow. You are usually better off with closure.
e.g. var add5 = b => add( 5, b );
 
?
@Sheepy so you suggest doing something like:
onmouseover = function(){ myGlobalJSVar = this.href};
holy shit
in JS?
is that lambda? :o
 
11:03 AM
 
Yes. JS. And yes. Lambda.
 
whoa
Thanks Neo
:D
Also thank y'all @Sheepy and @MadaraUchiha ! :)
 
P.S. The spec calls it "Arrow function".
 
am so bored
 
@Sheepy You can't always do that as cleanly
But yeah, when possible, that's what you should do.
@Major0 Also, no. Use addEventListener
 
11:06 AM
@MadaraUchiha Concur. On all statements.
 
@MadaraUchiha why is better to use addEventListener?
 
el.onclick = func1;
el.onclick = func2; // func1 is dead

el.addEventListener('click', func1);
el.addEventListener('click', func2); // func1 still alive
 
it has sense
 
Ahaa
 
document.addEventListener(queryFilter('.class')(func1));
 
11:09 AM
Yeah i was concerned about that madara
like it's not +=
 
That is beautiful ^
 
oh right
can I use e1.onclick += func2?
 
@Major0 Noep.
 
@Major0 This ain't C#. :P
 
haha
i took it too far i suppose :P
 
11:10 AM
is queryFilter like querySelector?
 
JS does have Lambda but not binded operators for concatenating events
 
@Major0 ... binded operators? Explain?
 
But just use addEventListener :D
@Major0 JS has no operator overloading of any kind.
+ only works for numbers and (sadly) strings.
 
@RoelvanUden AFAIK when you do:
myEvent += awesomeFunction(); then it's like you're using myEvent.Subscribe()
lol Madara
 
function aggregate(func1, func2) {
    return function(...args) {
        func1(...args);
        func2(...args);
    };
}
This is better ^
 
11:13 AM
haha this is getting hacky and interesting :p
 
It's not really hacky, that's the power of functional programming
 
but you are calling both functions async, so care with that
 
Yes ^
 
I'm not used to Functional programming, fixing to learn F# or something someday
I feel incomplete without that lol, a good programmer should be comfortable with multiple paradigms
 
@Major0 That's invalid C#. You can make a lamda like (s, e) => awesomeFunction() or you need awesomeFunction(object sender, EventArgs e). What you did can only happen if the awesomeFunction method returns a new function. (which is equivalent of JS () => (o, e) => ..., which is weird).
 
11:15 AM
let aggregate => (fn1, fn2) => (...args) => { fn1(...args); fn2(...args); };
With lambda syntax ^ :D
 
@RoelvanUden i believe that lambda should be (s,e) => awesomeFunction(s,e)
the event args, yep that too :p
 
@Major0 That depends on the signature of awewsomeFunction, and whether or not you needed the sender/args. Point being, your example was weird, and there is no such thing as 'binded operators' afaik
 
there is :o I am using them
 
... Show an example then of what your 'binded operator' is?
 
First of all, binded is not a word. bound is.
 
11:18 AM
public event OnFinishLoadingFrame FinishLoadingFrame;

FinishLoadingFrame += THIS_IS_SPARTAA_method;
 
That's just an event with an event handler.
 
Yeah it's operator overloading @MadaraUchiha as you said :P
What's an event handler?
 
Event is in the spec of C#; operator overloading is defining a static method that overloads an operator on a class.
 
it's a method you call
that's the handler
 
@Major0 Event handler is any function that you binds to a DOM event using addEventListener.
 
11:20 AM
@Major0 Your C# terminology is severely lacking. :-P
 
I know @RoelvanUden XD I need to brush up on that :P
 
:o
 
@RoelvanUden I don't get it, the handler IS the method you call when you invoke the event
it seems you're thinking that handler != method to execute
 
the handler is the method you use to handle events
 
@Major0 for starters, there are no "methods" in JavaScript
There are properties of an object which are also functions.
 
11:23 AM
callback = event = delegate
listener = subscriber = handler method
raise = invoke = execute
 
callback is a function P:
 
When you pass obj.method you pass the function it contains, without the context of obj.
@Major0 Callback is not an event.
 
callbacks exist because of async
 
@Major0 (C# talk here) Yes, internally event merely creates an implementation of the publish–subscribe pattern (which is why events in C# have strong references and cause objects to not be garbage collected when pointed to by such an implementation). Your reasoning is correct, an event handler is the method that handles the event. However, it is not called 'operator overloading' or 'binded operators' or anything like that.
 
if you want to execute func1 and then func2, you do func1(func2)
and at the end of func1, you do func2()
 
11:25 AM
That said, we don't use the same terminology in JS.
 
@Madara Wait callback is not an event? and when you pass the method it is true as you said; you pass the function without the context
 
@Major0 Unlearn C# terminology when you deal with JS. It's not the same.
 
@Major0 Callback is a function to be called back when an asynchronous operation has been finished.
 
I think Major0's brain is being fried...
 
@RoelvanUden shouldn't "binded" be "bound"?
 
11:25 AM
@RoelvanUden I KNOW! :P But the += is the operator that is overloaded to mean .Subscribe
 
8 mins ago, by Madara Uchiha
First of all, binded is not a word. bound is.
 
@Sheepy it is quite interesting :actually p xD
:P *
 
@FlorianMargaine Yes, but bound operators don't even exist in C# (or JS) afaik. He called it that, so I'm continuing with it :P
 
@RoelvanUden i agree I should not mix C# terms with jS
 
@Major0 To be technical, I don't think += on events is even an operator.
Just like + on strings isn't an operator
 
11:27 AM
@RoelvanUden WHOA :o
 
`element.addEventListener( 'click', clickEventHandler )` // This is *binding* an *event handler*.
`element.click()` // This is *triggering* an *event*.
 
correct, my fault :d
 
@RoelvanUden there is operator overloading
 
@Major0 ... but not bound operators.
 
yeah I might have mixed the two :P
Like for example you can't overload "=" i suppose
only logical and arithmetic ops
 
11:28 AM
You can't overload anything in JavaScript, really.
 
ima stop CSharping XD this is JS lol
 
Well, JavaScript overloads lots of things. But none of them is in your control.
 
Room 7 if you want to get technical about C#. :P
 
Yep :P
I'm being given the boot xD YOU JS LOUNGE GUyS ARE MONSTERS :P
jk jk :P
 
Is this a lounge?
 
11:30 AM
I think?
you're a terminology-nazi @RoelvanUden :P that's not something bad though haha
 
Heh... You should see @KendallFrey on his bad days...
 
I suppose that's your mentor on being a terminology-Nazi? xD
 
Pretty much. He screwed up my brain for good.
 
Lol
 
My TRPG fellows joked that I am so inhuman, my Sanity score must be a complex number. (Instead of being negative, which is when you go insane)
 
11:32 AM
As you will one day join the hordes of terminology zombies.
 
@RoelvanUden You're lucky I just woke up :P
 
@Sheepy what's a TRPG?
 
Tabletop role playing game. I'm an hard core D&D-er.
Anyone play D&D here?
Well. Silence. Perhaps I should talk XCOM 2...
 
you'd rather be kicked than ignored?
 
QAQ
 
11:39 AM
Sheepy was sharing something s/he likes :p give em a break lol
 
I get it I get it. I love JavaScript! :p
 
xD
 
@Sheepy oh, cool. I played DSA (a german P&P RPG) for a long time. never played tabletop though
wait a sec, is tabletop and pen&paper the same thing?
 
@GNi33 Yes. For RPG they are the same.
 
11:42 AM
ah, okay, i was thinking about something else then
 
Idk why this came to mind @Sheepy, maybe cuz those guys are using a browser in their game which is what I am using as well haha
 
How can I make the red label display the value from first controller ? ( without inheritance) JSBIN
 
what's that stuff called where they play with miniature figures?
like Warhammer?
 
I really have no idea :P ^
 
oh, it seems to be just Tabletop, without the RPG
 
11:44 AM
@Sheepy meh, js is so-so
 
Yeah apparently it's just Tabletop
@Sheepy the name goes well with the cute profile pic xD
Anybody seen Shawn The Sheep?
 
@FlorianMargaine Yeah. I love Java better. (Would I be kicked?)
@Major0 Yes!!!
 
xD
it's awesome
 
@Major0 yeah... was watchable, but not really a fan
 
Better than Minion in my opinion.
 
11:47 AM
haven't watched it
 
haha
Banana!
 
user3119231
did nearly all the work today which was planned for works. and now? go home?
 
@Sheepy I have such high hopes for XCOM 2 I'm worried I'll be disappointed
 
speaking of work, GOD DANG IT! Gotta get back to my C# JS soup
if this doesn't work ima kill myself xD
 
@ivarni Do worry. The E3 demo video is the intro mission. Subsequence missions should be more boilerplate...
 
11:49 AM
I've played Long War enough to be able to cope with repetitive missions
 
Ah. Long War is good. Except that I have no time for it :p
 
!!hi
 

« first day (1752 days earlier)      last day (3179 days later) »