« first day (1609 days earlier)      last day (3353 days later) » 

12:00 AM
Function.prototype points to an empty object in Chrome console - Team {}
 
Time to finally go home
asdfgasdfgqsfgrgrgrgsrgsrgSRG
 
@StevensHaen huh?
Decide what you're talking about!
 
@Zirak I just pasted you what my console puts out
Team.prototype
Team {}
 
You've pasted what Team.prototype is, NOT Function.prototype
 
I don't care about function.prototype. I'd like to know the difference between .prototype and Object.getPrototypeOf(something). Maybe I've been unclear, sorry
 
12:02 AM
12 hour work day
why
 
@StevensHaen oh, why didn't you say so then? Object.getPrototypeOf(new func) === func.prototype
func.prototype is the worst name ever: It's the prototype of what you get back from new
 
Now I'm confused beyond anything
 
@Zirak ok, got to bind this time and now I'm lost
Why use bind? What does it signify?
 
Basically, prototypes are the origin of an object - the object's parents. But on functions, the special property prototype is the basic of newed objects.
 
prototypes are prolly the most interesting thing about JS
 
12:06 AM
hi guys, I'm trying to get the canvas not be blurry at retina screens, which seems fixed, but I don't know how it looks now at normal screens. Could someone have a look?

https://dartpad.dartlang.org/f85dfa4f6a6bd6af5c25
 
@Pjotr Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Pjotr It does not appear blurry to me
 
cool thanks
 
12:08 AM
@Zirak Ok, a question arises then
var dog = {};
var pointer = Object.create(dog);
undefined
Object.getPrototypeOf(pointer);
-> Object {}
pointer.prototype;
 
Only functions have the prototype property
That prototype property is only used in new
 
@Zirak Ok, I see
So, the 3rd line is simply telling me that this object is inheriting from the grandfather of al l objects or what?
 
@SomeKittens It's like then, but for any monad. Basically, you take the signature of then and parametrise the Deferred
@StevensHaen No. Object.getPrototypeOf(pointer) === dog
 
@Zirak Look at what mine returned
 
@Zirak you so smurt. how u get so smurt?
 
12:10 AM
But Object.getPrototypeOf(Object.getPrototypeOf(pointer)) === Object.prototype
 
Object.getPrototypeOf(pointer);
-> Object {}
 
@StevensHaen It returned dog, which is an empty object
Put some properties on it and you'll see
 
@Zirak I see now
 
!!> var dog = {}; var pointer = Object.create(dog); Object.getPrototypeOf(pointer) === dog;
 
@rlemon true
 
12:11 AM
@rlemon Exchanging fluids with your female relatives
 
OJ is a slut
 
wow Dart
 
@Zirak Why not return dog {}, instead of Object {}, JS doesn't make sense sometimes.
 
They make me chocolate milk, I buy their lemonade.
 
Thought it was dead4good
 
12:12 AM
@StevensHaen That's just how the console displays it, nothing to do with js...and why would it show that the object's type is dog? That's just the variable name.
 
@StevensHaen dog is the variable name, Object {} is the value
 
What if you did var anotherDog = dog ?
 
anotherdog is Dog :~D
 
!!> var dog = {}; dog.prototype = {constructor:function Dog() {}}; var pointer = Object.create(dog); Object.getPrototypeOf(pointer);
 
@rlemon {"prototype":{"constructor":"function Dog() {\n\"use strict\";\n}"}}
 
12:14 AM
ofc it looks better in the console. but it is probably stupid
 
Also, in case you were wondering, this is what happens when you call new es5.github.io/#x13.2.2
 
Dart
 
12:28 AM
So I Read this: http://stackoverflow.com/questions/18325025/how-to-detect-window-print-finish

I'm trying to figure out, if there's a way to bind an event for when the print dialog is closed
 
@Apoph1s Why would dart be dead ?
 
@Pjotr I tried it a while back then sort of abandoned it for Ruby and never heard of it since
 
google is not really promoting it
 
I'm using window.print(); to open the print window, and I'm trying to fire an event AFTER said window is closed
 
Either that
 
12:31 AM
but I thought dart is more like javascript, can you use dart in a simlar way as ruby ?
 
or IE FireFox and Safari just dont want it
Im sure it can
I just like Ruby for its syntax, speed of dev, and Performance
 
I don't think it will even end up in chrome actually. But dartium is fine for debugging. And it compiles to fast javascript.
 
God you sound like Seth ladd
 
I only hate that there are no tutorials like at treehouse
or codeschool
or codeacademy
I like learning that way.
Is Seth Ladd saying it won't end up in chrome ?
 
no
i mean the "Compile to fast JavaScript"
 
12:34 AM
haha, probably have that part from seth ladd indeed :p
 
but it is true i guess, only when I use polymer it sometimes get slow
 
Yeah Dart is fast
 
@Hybridwebdev note the support :/
 
but I personally Like Lotus + volt + JRuby
 
12:35 AM
@Pjotr Please don't feed the trolls.
 
== programming heaven
 
@Apoph1s I don't know that command. o_O
 
wat command
 
@OakBot GET. OUT.
 
@SomeKittens Type =help to see all my commands.
 
12:36 AM
@SomeKittens not sure which trolls I'm feeding, polymer trolls ?
 
YOU AND YOUR JAVA
 
@rlemon dang, I need something cross-browser. I mean, not talking >ie10, but at least modern browser compatible
 
Lots+ Volt + JRuby never heard of any of them :p
 
@SomeKittens Im a trol? :(
 
@Pjotr Apoph1s says things just to get a reaction. Low-level trolling.
 
12:36 AM
I am not :(
 
@Hybridwebdev problem is the print api isn't part of any standard
that will be a hard task
there may be a flash way?
 
LotusScript is a dialect of the BASIC programming language used by Lotus Notes and other IBM Lotus Software products. LotusScript is very similar to Visual Basic.
 
var onPrintFinished=function(printed){alert('aaaa');}

//print command
onPrintFinished(window.print());
 
I dont know how I'm being a troll, if you think I am, tell me so I can see tf i'm doing to be a troll :S
 
seems to work hmm
 
12:37 AM
nice. if that works roll with it. hacky and neat
 
@Pjotr lotusrb.org
Its new so not so known
 
it is some kind of ruby on rails ?
sorry I'm noob with server side languages
 
=help
 
Commands=====================
=about     Displays information about this bot.
=help      Displays this help message.
=http      Displays information about HTTP status codes and methods.
=javadoc   Displays class documentation from the Javadocs.
=shutdown  Terminates the bot (admins only).

Listeners====================
mention   Sends a reply message when someone mentions the bot's name.
 
I once knew php 10 years ago
 
12:38 AM
=shutdown
 
@rlemon Only admins can shut me down.
 
...noob with server side languages? So then what languages do you know?
 
I kicked @OakBot
 
html/css/dart
 
just to avoid mistaken command entries
 
12:39 AM
I skipped javascript which was a big mistake, so now I'm screwed with dart.
 
html and css are server side?
 
@Pjotr Yeah its like RoR but only much faster
 
@Hybridwebdev no
they are client
 
okay, but they are still, technically, delivered from a server
 
@Zirak "((zirak: throw in a link to the article you showed us earlier this week?))"
 
12:40 AM
but interpreted on the client, which is all that counts
 
which article were you referring to?
 
That doesnt mean they are server-side
server-side means running on the server,
cant see it from the client side
 
ah
true
 
@Apoph1s so what is Volt ?
and jruby ?
 
php is server side because the server components interpret it (e.g. php installed with apache). js is client side (in those applications) because the browser (client) interprets it
 
12:41 AM
JRuby is Ruby running ontop the JVM(Java Virutal Machine)
 
@Hybridwebdev if that makes sense
 
the default platform is MRI, not really fast though, like JRuby
 
@SomeKittens The one about hiring
 
no, I was totally wrong :)
 
and there are other but the best I see is JRuby
 
12:42 AM
Written by someone who worked at a company which does cryptography IIRC
 
Volt is basically the Dart + Polymer of Rby
Server and client side
 
@Hybridwebdev so like, if you had a apache+php server. php interprets the php files, apache serves your static html/css/js files
apache is the server, php is the server language, the rest is all client
 
but this is al server side now ?
 
used to, rather. He/his wife/another internet guy launched starfighters.io
 
12:43 AM
what do you use client side ?
 
nonono I understand
 
kk
 
I would use Lotus for Server, Volt for client
and JRuby for platform
 
sounds really hipster, but too hipster for me
:p
 
We all have our interests
 
12:45 AM
@Zirak what would you personally use on the server? node/io? python? something else?
for, say, a generic web dashboard
 
I was learning polymer dart, which is totally hipster in dart circles. But now they completely changed the language for 0.8 ...
 
@SomeKittens Yes, that one
 
sounds good, thanks
 
node/io are really the same thing
kind of
 
yes and no
 
12:46 AM
Now I try to learn things that are already heavily used and >1.x (where x is int)
 
@rlemon Depends. Is it for fun? Work? Short deadline? Other technology involved? Other people are involved? What do they know?
 
I know, but Generically
 
If it's for fun, then I pick what I want to learn
 
@Zirak personal project. for fun, but you will have to maintain it
 
@Pjotr Rails is heavily used, so is the MEAN stack
 
12:46 AM
and you will want it to be open source, for contributor help
 
hell ya
 
@rlemon oh, then much less fun
 
:P
 
4 hours later, I can now reliably call content, append it to the dom, fire the print event, and then delete the content when the windows closed :)
 
@Apoph1s i'm now going for treehouse courses
 
12:47 AM
Then whichever environment you're comfortable in, but push boundaries (try different libraries, coding styles, environments, etc)
 
so they learn ruby there as well
 
@Pjotr I'm also learning Ruby as well
still not done :P
 
@Zirak yea but i'm asking you what those are for you :P
you know the scope of rafflemon?
the basic scope at least?
12 days as a service basically.
 
@rlemon I'd be interested in doing something in clojurescript
 
any particular reason?
 
12:49 AM
I really want to use clojurescript
 
lol, sounds reasonable
 
I've done some Rust in webdev before :/
 
My brother told me dart was the future ... in 10 years maybe, but for some reason, ruby seems the past to me.
 
@Pjotr I think Js has a better chance than Dart
 
I feel like typescript + nodejs is going to be the golden combination for the next 5 years.
 
12:50 AM
Fascinating. And I feel sick.
 
Ruby's hype had def died to nodejs
but all from misconceptions
well some were actaully true
 
FWIW I feel like all compile to js languages will probably stick around for a while, but will all die. JS and ECMA will cherry pick from them and grow as a language/spec
 
@rlemon Coffeescript is already taking a major hit
 
Idk a language that has a compile to x language thats used more than the language itself
 
@SomeKittens and didn't it impact the es6 spec?
 
12:51 AM
blegh, bad english
 
@rlemon Exactly.
 
yeah, I guess that is true, but typescript is basicly ecma6 right, plus some types ?
 
crl
Bit less ugly now jsbin.com/bapuwi/4/edit?js
 
@Apoph1s the only reason compile to works well is when a language is behind on the living spec. ES6 hasn't officially landed. transpilers and compile to languages will still be prevalent until it is
... and probably for a good while after
 
Dart + TS + CS is used more than Js itself?
 
12:53 AM
no
 
uuuuuuh noooo
 
Thats what I thought
 
I wouldn't be suprised if some day ECMA will include optional types though.
 
Not likely
imo
 
@Pjotr esdiscuss.org/topic/optional-strong-typing a discussion on the topic from a little back
also, fwiw while you are reading that, Brendan Eich is the author of js
not that he is the decision maker
but it is interesting to know
 
12:59 AM
It's planned for es7 (2016)
 
ahh, I couldn't find a definitive decision on that
was looking
 
more like 2019
 
the spec !== the implementation rate
 
@rlemon interesting
 
1:02 AM
but I guess it doesn't matter that much. I mean typescript is almost like using things like jsdoc, but then it's just cleaner.
 
but it is still a compile to js
coffee script used to be all the rage
not saying don't use it, just pointing that out
coffee is still used a lot today, just not as hyped
 
I would say compile to ES6 yes, but after that it is just stripping out comments basicly, typing comments
 
@rlemon That's just memory representation, lemme see if I can find it
@Pjotr It's not like jsdoc at all...it's a different language
Different semantics, different structures, different way to spin and weave it
 
currently have whale noises played in 4 different offices
 
@Zirak Are we taling about typescript ?
 
1:06 AM
hahahahaha
 
@Pjotr yeah
@phenomnomnominal Cheevo unlocked
 
Rails is still #1 framework in the webdev market, but its hyper has dropped immensely
 
@Zirak and you say that typescript is very different from ES6 ?
 
@Zirak phenomboy360 in da house!
 
connecting to Coffee being all the rage
 
1:07 AM
@Pjotr I'll just say that if people start using js like they use ts, I'll be very sad
 
@Pjotr es6 isn't strong typed
afaik ts is
but I could be wrong
 
I see those types just as comments, just like jsdoc, but then with other syntax basicly. The rest is just ES6.
 
it all compiles back to es5
 
are classes part of ES5 ?
 
(see edit)
 
1:11 AM
yeah, it compiles to es5
but you write es6 + types, so I don't see it really as something different than js(es6) + type comments such as jsdoc
 
@rlemon Okay I was confusing things, thought about Value Objects which Eich demonstrated here along with lots of make-believe syntax, part of which is typing
 
I'm too drunk to taste this chicken.
luls
also, that is a physical picture of a screen
o.O
 
Oh I see typescript is also going to support async/await stuff, which is not es6 but maybe es7. But in general I think you can't really compare it with coffeescript or dart.
 
only in the sense that they all compile to js
 
i like typescript
this has changed recently
 
1:20 AM
I still need to develop jabbascript
 
let me guess, it compiles to javascript ?
 
a compile to js language based on Huttese
 
the only thing about typescript, it is created by microsoft which is bit akward
and there is no visual studio for mac....
 
Che 1..10 Bsha $i
    Choy $i Be 5
        Bolla foo

Bota foo ($a) ->
    Chalya $a*$a
ohh yea
that could be,
for( var $i = 1, $l = 10; $i < $l; $i++ ) {
  if( $i === 5 ) foo.call(this);
}
function foo($a) {
    return $a * $a;
}
just imagine it
beautiful right?
 
Looks like a CoffeeScript hack waiting to happen. :-)
 
1:23 AM
pretty much
 
VS doesn't support TS i think
 
I think vs supports typescript the best of all ide's.
 
well
 
microsoft loves typescript
it is the first great thing they have build since age of empires 2
 
1:25 AM
ms always loves ms products
c# is pretty good
 
apple does the same
 
Java is good :p
 
bah
 
c#>java
 
except google, google hates their own products
 
1:26 AM
by leaps and bounds
 
sadly that google is using Java for their andriod
 
I haven't done so much java, but when I did it, I actually kind of liked it ^^
 
is that why u chose the Dart way?
 
i prefer C# over java. I found myself sometimes typing C# snippets in java
 
I've done java for embedded, and c# (mostly winforms) which is pretty much the worst of both
I like c# much better
 
1:27 AM
I think I liked Java, because I knew dart. So it was easy to grasp the syntax.
 
c# and java have very similar syntaxes
 
but maybe I just liked java because I resolved some webstorm bugs, and I was so frustrated about the webstorm bugs, and so suprised that I could fix them without having to read anything about java (only dart).
So I was like, this is a cool language, if I don't have to read books, and can work with it immediately
 
Why is having to read books a bad thing?
 
because blog posts are free?
 
s/books/something/ :-)
 
1:33 AM
@mintsauce Not a bad thing, but I thought it saves time, if you can use a language succesfully without having to read anything at all
 
@mintsauce because jQuery.fuckLearning()
2
 
:-D
That pretty much encapsulates my response.
 
note: that was a bash at people who just jump in and refuse to learn, and not jQuery itself.
 
was that a bash to me :P ?
 
no
 
1:35 AM
okay good, because I bash back
 
that is okay. I have scripts to deal with such users ;)
 
what type of scripts?
 
@ahitt6345 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
lol
 
XD
 
1:37 AM
well that was mostly in jest, but I've written scripts to auto migrate messages from users to the bin room
that usually is effective without kicking them
XD
(not that i've ever done that)
 
hehehe
 
btw @rl
 
I recently wrote one to listen to @NickDugger and wait for him to say 'css class' and then bin the message
he knows why.... o.o
 
typescript is written by the c# creator i read now
 
yea i'm not against ts
or compile to js in general
 
1:40 AM
have you used typescript ?
 
nope
I still prefer vanilla
but I haven't given any compile to js lang a real chance.
meaning I've use the 'try me' a bit, but never for a project
 
and es6to5 kind of things ?
 
played with them, haven't used them for a project, like mentioned above.
 
ok
 
but that doesn't mean I don't understand what they are about. I just looked at them, demo'd them, found no need, and moved on.
interestingly, without knowing them... I've still been able to help people use them.
 
1:43 AM
that's called insight
 
:p
 
@KarelG google-fu is sometimes > actual knowledge.
 
but if you can respond directly
why would you use g-fu then ?
 
well in other cases, I feel like knowing js before a compile to lang gives me an edge over people who just know the compile to lang
 
but some es6 synthatic sugar won't hurt right, like "this ${string} and that ${string2+string3}!!"; kind of stuff ?
 
1:45 AM
and you wouldn't believe how many of those there are.
@Pjotr I admit I don't know as much about es6 as I would like.
I haven't transitioned into it fully.
I plan on doing so soon
 
do it do it
you guys see google code is closing down?
 
I hope to do rafflemon in es6 with babeljs to transpile it
yea :(
I got that email
I blame github
 
yeah
 
so all those google code projects will merge into github ?
 
no reason google couldnt have destroyed them though
 
1:48 AM
I ":(" but I like github better
 
google just gets lazy
 
@Loktar I think it is more of a pure business decision
and it makes sense
 
but you can't star at github right ?
 
github cornered the market
 
I mean starring issues
 
1:50 AM
why fight it when you can kill you own and begin thinking of buying out the competition ;)
google 101
 
I have a method that verifies URLs as legit URLs when they don't begin with http:// or https://. Should I make the user enter it in http:// or https:// form? Would this cause a security issue of some sort?
 
@DonLarynx Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@DonLarynx I would assume if they entered just a example.com or www.example.com I would accept it
most people don't think about protocols
 
Thanks, yeah that's why I had to ask.
 
you could pre enter http:// into the input
if they know enough to change it to https then you have that ;)
 
1:58 AM
@rlemon That's what i'm going to do since my method will only work for URLs with http:// or https://
 
but I would still accept the other inputs and add http:// myself if it doesn't exist
if you can work it*
 
@rlemon That's actually a better idea.
 
332
Q: What is the best regular expression to check if a string is a valid URL?

Vitor SilvaHow can I check if a given string is a valid URL address? My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.

 

« first day (1609 days earlier)      last day (3353 days later) »