« first day (973 days earlier)      last day (3968 days later) » 

2:01 PM
@Suja Regretfully, no. They're all of varying degree of bad. There was a Google one which was decent (I'll try and find it), CodeSchool seemed recommended (I haven't personally tried). HTMLDog is a nice all-rounder
Also, don't listen to BenjaminGruenbaum
 
@BenjaminGruenbaum nice try, but we can see it's not really a chat feature, unfortunately.
 
@Zirak Click the link.
 
@Zirak did you see that link? It's not all that bad
 
I've seen it, yes
 
@Zirak what do you think about that page?
 
2:04 PM
@Zirak how about codeacademy?
 
They have html stuff?
 
yes.
 
Codecademy wasn't really bad, but it also wasn't really good.
 
i am still learning JS from there... :-\
 
So...I dunno. Do whatever you want. Just remember to learn from several places and let people yell at you when you do wrong things.
 
2:06 PM
We love yelling :-)
 
I mean, if it's your first dabble in programming. If you already know stuff, bad resources can take you really far without destroying you forever.
But teaching first-time programmers is hard. I have no idea when I had that click, and bam, I knew stuff.
 
and upto what extent will yelling help me??
 
you can fix the things they yell for
 
i think i know that.. i have faced my brother, Darkyen :-D
 
:-)
 
2:10 PM
:P
@Suja you havent met raynos yet :D
show him bad js code he will output a bad bad bad rant
 
who is raynos?
 
@Zirak I have a syntax suggestion
 
A good javascript pro and a very perfectionist developer... he used to be regular in this room now hes rare
 
!!tell zirak about yourself
 
btw @Suja
 
if you are wondering Caprica Six is a chatbot
so she can do some stuff
!!/tell suja choose "I am a bot" "I am human"
 
@suja Neither
 
well that was pretty intresting response :D
 
@JanDvorak The suggestion being?
 
2:13 PM
1 min ago, by Jan Dvorak
!!tell zirak about yourself
 
...elaborate
 
@Zirak we really need a bot programming language
 
!!tell darkyen help learn
 
@darkyen learn: Teaches me a command. /learn cmdName outputPattern [inputRegex [description]]
 
@JanDvorak not that
its too mere
 
2:14 PM
@Darkyen make a pull request
 
I've thought about it, but it won't work in this medium. I'd love for the bot to be very extensible, but the chat doesn't make it easy.
 
yeah too tidious @JanDvorak
how about pasteies @Zirak ?
!!/learnNewCommand Command "path/to/file.js"
 
@Darkyen That didn't make much sense. Use the help command to learn more.
@Darkyen That didn't make much sense. Use the help command to learn more.
 
That's not far from just making a pull request
 
Hello :-)
 
2:17 PM
@Darkyen what would be the API?
 
@Zirak pull requests are major changes
u will have to restart the bot
everytime its pulled
this can be added removed in runtime, dont u see that zirak ?
 
Question please : how do you check browser version etc - now -with JQ where it has removed the $.browser func ? ( do you use the other js library for old code support) ?
 
@RoyiNamir you shouldn't need that
 
So how do you check ?
 
you should check for features, not browsers
 
2:19 PM
navigator.userAgent
modernizr
 
You don't check for browsers. That's one of the reasons the web is broken now.
 
@Nile I will NOT install this package of modernizer only to get browser ver.
(with all the respect to modernizer)
 
@Darkyen I think it'll be simpler to try and include eval in learned commands.
 
@RoyiNamir for what reason are you trying to get the browser version, though?
 
If you only care about IE, there are those IE-only conditional HTML thingies
 
2:21 PM
@JanDvorak not for IE10 =/
 
*oldIE
 
IE10 does not support ---[IF LT IE9] ? etc ...?
 
Nah.
It treats like any reasonable browser would
 
@RoyiNamir well, it wouldn't be bothered by that comment anyways (less than ie 9), but no.
 
(didnt know that)
 
2:23 PM
@RoyiNamir can you tell us why you need browser version now
 
maybe it's not supported because IE10 is actually a browser. Bad, but still a browser.
 
@Nile to tell the client that "this site is best shown under ver x"
 
don't do that
 
@JanDvorak it's not actually that bad, from what I've heard
@RoyiNamir Yeah, probably a bad idea...
Make it compatible
 
@RoyiNamir we only show users a warning footer on IE8&<
 
2:25 PM
ok
 
also, on disabled javascript
 
A person who disable - JS - I will let him suffer.
I dont care about those . ( also for those who disable cookies)
the last thing I need right now is to transfer the cookie information via QS ....hahaha
 
<noscript><style>#content{display:none} #ns-warning{display:block}</style></noscript>
 
@Zirak maybe
but using js we can do much more then just that
 
@JanDvorak Thank you.
 
2:30 PM
@JanDvorak I copy and pasted it and got a SyntaxError: Unexpected token < you suck :((((
 
// since i know you are going to [reduce the power of eval]
 
@Zirak that's not javascript
 
@Darkyen /eval is executing js. And I shudder from just thinking about the security of allowing people to add scripting commands arbitrarily.
/eval is a decent sandbox
@JanDvorak thx I just did document.write("<noscript><style>#content{display:none} #ns-warning{display:block}</style></noscript>")
 
You guys wanna play a fun game? It's called compared my original version with my client's desired updates
 
2:38 PM
The body has a different class
 
> //uncomment the following line if the boss changes her mind again
 
@JanDvorak u smrt ne wai 2 tell if client haz html dsabld???
@JanDvorak u here?
 
@Zirak no wai, sozzz
 
:((((
@BenjaminGruenbaum @BenjaminGruenbaum @BenjaminGruenbaum hlp me
 
@Zirak Accept an eval flag in learn
@Zirak ok I hlp u now.
 
2:49 PM
@BenjaminGruenbaum If only it were that simple. /eval is asynchronous, /learn and its dependencies are synchronous. That bridge is not easy to cross.
@BenjaminGruenbaum i ask @JanDvorak bt he lme. ne wai 2 tell if client haz html dsabld?
@BenjaminGruenbaum What I can do is split /learn into two. Accepting an input regexp in an interpreted command is silly anyway.
 
@Zirak nay you dont understand
but well you have a point
 
@Zirak Let the bot accept unfiltered eval from room owners for !!/learn , run it first in a filtered eval environment, have the bot delete commands who don't terminate in 20 miliseconds
 
@Zirak make /learnEval invoke /eval
 
aahhh ping ping ping
 
@Zirak ok u use jQery k?
 
2:51 PM
@JanDvorak her ?
 
@JanDvorak yeah, that'll probably be the way. And I'll pass in some important data
 
@Darkyen in 50% cases of all bosses, yeah
 
@BenjaminGruenbaum yah evry vrsion frm 0.8 2 1.10
 
@Zirak No, that would be silly. Only the freshest and most succulent version of jQuery. Now do you have a sacrificial alter ready?
 
@Zirak U need 2.0 & 2.0-min 2
 
2:54 PM
@BenjaminGruenbaum Sacorificed mai spling 4 bbl gum
nd sacorificed mah goat 4 jqueryUI
 
@Zirak K now u use PHP, u chck (!strrpos($_SERVER['HTTP_ACCEPT'],"text/html")) or if u uz node u do ~req.headers.accept.indexOf("text/html") that tell u HTML on. Also, scarifice jQuerik?
 
hw 2 use php in jquery?
 
$("<php ur_leik_php_hear ?>")
 
k thx <33333
i maek btr twitter
 
@JanDvorak Never had a femae boss , yet
 
3:11 PM
Hey, can I brag here ? I think I should have got more love for solving this problem :
0
Q: How can I markup some text spanning multiple tags in HTML using Javascript?

SeanI would like to use a regexp to markup some text that may span any number of tags in HTML. Ex. given the regex "brown\ fox.*lazy\ dog" <div>The quick brown <a href="fox.html">fox</a></div> <div>jumps over</div> <div>the lazy <a href="dog.html">dog</a></div> would be transformed to <div>The q...

 
@dystroy sure
 
@BenjaminGruenbaum Thanks, now I feel better, like a little less ignored... I would have expected at least someone pointing how stupid that was to use a regex with HTML, or something... but it's dead... :)
 
Even OP don't care :P
I can break it if you'd like :P
 
you mean you can demonstrate how stupid my answer is ?
 
I can provide a counter example, pretty much anything with a < inside ""
 
3:19 PM
Noob question : Shouldn't a < be escaped in HTML ?
 
In HTML yes, in a string? Probably not no
> doesn't BTW
 
Well, the example really looks like HTML. But it would fail with all not visible element text, like a script for example.
 
@BenjaminGruenbaum hi, im blown away by meteor, since you mentioned it yesterday i watched some videos and read some stuff, its pretty awesome, i wanted to ask u if u ever tried to implement it in a mysql DB already working, the native support is only for Mongo from what I read?
 
No, I never made an actual large scale Meteor application.
 
@BenjaminGruenbaum forget about large sclae, have u ever implemented meteor with msql
 
3:28 PM
Hi, i need to handle mouse events (like click) on everything except for body (or document). is it possible?
 
@sebas No, sorry
!!/tell Kikaimaru mdn event.stoppropagation
 
!!/tell suja mdn Doctype
 
@BenjaminGruenbaum im goign to be making an app from scratch, you already know some of the features I need, and dont worry i wont be doing the actual coding, the question is, what would u suggest me to do? would u suggest using meteor and Mongo ? and maybe some server side language for some other features?
 
3:30 PM
!!/tell suja help mdn
 
@suja mdn: Fetches mdn documentation. /mdn what
 
@BenjaminGruenbaum i dont think that would help, i need to add handler that would write something to console - if someone clicked on body, but didnt click on anything else. i cant possible write event.stoppropagation to all mouse events on all elements
 
Check event.target
 
@Zirak thats it, thanks
 
@Darkyen thanks, but what does document type actually refers to?
 
3:35 PM
@Suja html and xhtml parse differently from each other.
 
can anyone explain me what does
<!DOCTYPE html>
means?
i am not getting it..
 
Means 'the type of the current document is HTML5'
Speaking of which:
Doctypes are a stupid idea. It's exactly the sort of thing that can be passed unambigously in the HTTP header.
 
Which doesn't mean you can avoid them now. @Suja, until you really get them, always use <!DOCTYPE html>, you'll avoid problems especially with IE.
 
@Suja since there are multiple version of HTML a doctype tells the browser that the following document is of the doctype x
for example if you mention <!Doctype html> it tells the browser that the document type is html5 and the most latest
other possible doctype
 
@Darkyen That's not really true. You can't tell most browsers that your document is HTML3 or HTML4.
 
3:41 PM
In HTML, <img> an unpaired tag, so it needs no closing and shouldn't be closed. XHTML says "what makes you think it's a self-closing tag? I see no /> there".
 
@dystroy can we count a modern browser ? and the soul of why its there which it shouldnt but oh well
 
and how do we specify the other versions?
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <- for HTML 4.01 strict
 
You don't want to use another version
 
that too
 
3:42 PM
Those old doctypes are pretty ugly
HTML5 is revolutional in that
 
@JanDvorak hey the write the new doctype as feature!
 
@JanDvorak ugly as in?
 
1 min ago, by Darkyen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <- for HTML 4.01 strict
 
compare the 4.01 doctype with 5
 
I dare you to remember that by heart
 
3:43 PM
@Zirak dude shes indian... she might! jk jk
 
@Zirak eh. Copy&paste
 
There was this stupid idea that HTML should be easier to read by programs and should be more like XML. hence XHTML and other stupid DTD fantasies.
 
@dystroy it was a good idea
 
But now the W3.org got his things together and buried that.
 
except that <![CDATA[ thingie was pretty ugly
 
3:45 PM
@Suja telling the <!Doctype html> tells internet explorer to give best possible and most up-to-date support for the page, other wise the browser can end up giving u a lot of broken stuff ( quirks mode and shit that you dont want to talk about right now ) .. you will understand the use once u get used to of the language
 
how and why is the latest version of html better than all the remaining ones??
 
:D good question
 
Let's say that that's the point of there being a newer version :-)
 
:-D
 
Well... I can do applications now that 6 years better weren't possible without Flash or a desktop application.
 
3:48 PM
More features. But they're being stupid about it.
 
@Suja HTML5 adds a lot of support to the bare html
for example we can now process audio create 3d rendering use threads in HTML/JS/CSS
 
They're adding a lot of shit without addressing key issues, like the fact that security is hard to get.
 
HTML5 makes it more fun sementically and by adding more API's
ECMASCRIPT6 makes javascript much more fun
and well
 
bah, Harmony is full of shit
 
CSS 3 makes animations , and layouts much more easy to create
 
3:49 PM
canvas rocks
 
@Zirak not that much
 
It's a cacophony of "durr I like Python and Ruby and Java and Haskell let's just dump all that into js"
3
 
0
A: css width: calc(100% -100px); alternative using jquery

DarkyenIts not that hard to replicate in javascript :-) , though it will only work for width and height the best but you can expand it as per your expectations :-) function calcShim(element,property,expression){ var calculated = 0; var freed_expression = expression.replace(/ /gi,'').replace("(...

 
"ECMASCRIPT6 makes javascript much more fun" ? More fun ? I'm not sure... More like other languages, rather...
 
<language that reminds you of functional programming> ?
 
3:52 PM
!!s/<.*>/Ruby/
 
@JanDvorak Ruby ? (source)
 
Where is Cthulu?
 
!!s/Ruby/Javabython/
 
@Darkyen @JanDvorak Javabython ? (source) (source)
 
!!google javabython
 
I don't see the point in those questions...
0
Q: Javascript find and replace (customized)

maniootekvar MyAddress = " Google Ireland Ltd.<br> Barrow Street<br> Dublin 4<br> Dublin<br> Ireland "; Here I can split each line to array: var pieces = MyAddress.split("<br>"); now, how to make a loop now which check if there is "dublin" word duplicated, if YES then lea...

With array functions, we can write a prettier code than a noob but what coder can't achieve that by himself ?
 
// rare answer by me :-( no rep
 
4:24 PM
@copy is there anything similar to .apply in python?
 
@DuffyDolan 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.
 
@BenjaminGruenbaum There was a splat operator, something like that
 
splat operator ?
wow whats next ? Repellant operator ?
 
Perl 6 coined the name, IIRC
 
@Zirak I meant setting the this value, not kargs
(well, self value but whatever)
 
4:28 PM
oh. Then probably not.
Well, you can try
 
Hmm, the problem is this:
I have a list of animals, each with a value method and I want to get the value of each animal.
I know I can do [animal.value() for animal in animals]
However, being the little shit I am, what I want to do is:
map(Animal.value,animals)
methodcaller
got it
 
How do I exclude a directory for being used by .htaccess ?
 
ok that's it...i am absolutely done with codeproject
fuck this website
 
I have site.com/domains/anewdomain, but the anewdomain has its own .htaccess.
 
@BenjaminGruenbaum you were totally right...i'm done
 
4:33 PM
@redline ?
 
@BenjaminGruenbaum idiots edited my article thinking they know better
 
@BenjaminGruenbaum No idea, probably not
 
Lol, where?
 
such of waste of taking the time to do it right and organize it
 
Please some one help?
 
4:33 PM
on codeproject
 
@copy Oh, the python room helped me already, it's possible with methodcaller
@redline They're a pretty shitty site tbh
 
Oh, cool
 
Please?
 
i specifically put <code> tags around words that are referred to in a certain context, you know, when strictly referring to the keyword...i specifically didn't highlight other words that are the same words as keywords because they have different meaning in that context: when i say "the public instance", that doesn't mean public in that context
 
lol, they edited THAT?
They're just a bunch of incompetents.
 
4:36 PM
they took every single word in the article
and put code tags around it
so now any word that matches a keyword in my paragraphs is highlighted as code
when i specifically took the time to NOT do that
because i am not a fucking moron
now it looks like such shit
 
Pretty much like most of the stuff on codeproject ^_^
 
Did you also use swear words in the article like that?
 
anyone can help me for this question wordpress.stackexchange.com/questions/103068/…
 
@BenjaminGruenbaum there is a rollback feature...thank god i found that
 
@CoolBoy Check the PHP room
@redline You don't want to hear what I have to say about that article though.
 
4:44 PM
@copy no i write high quality articles, i just prefer to swear when i am angry because i'm a normal fucking person in their 20s, and it's also useful for comebacks to condescending questions such as yours
@BenjaminGruenbaum yes i know >_<
but you could say something like, "nice graphics" and get a much better response output from me ;)
 
@redline A serious web site would not let you write a review on your own library.
 
@BenjaminGruenbaum well it's not a review...it's a technical breakdown
 
@redline Shhh, we have minors in this room :P
 
lol
 
I just wrote 900 lines of python. I'm pretty satisfied ^^
 
4:46 PM
nice
i had a roommate who wrote a lot of python...pretty condensed stuff
too much so for my taste
so 900 lines must be a lot
 
condensed?
 
like, 1 line can write A LOT of code
right?
 
In C# one line can write a lot of code too, doesn't mean that it should :P
 
yes but i mean the language is designed that way
like coffeescript to javascript
am i right?
i could be wrong, i dunno, i don't know python
 
Python isn't more implicit than languages like Java, it's more expressive. That's different.
 
4:48 PM
A LOT in caps? APL!
 
Same goes for coffeescript
 
You can minify 1mb scripts to one line
 
@minitech I seriously doubt anyone here ever used APL, and I feel sorry for you that you have :P
 
ok good, that's what i thought
 
@BenjaminGruenbaum I haven't, I actually use J for that particular flavour of code golf. But I’d love to learn, because catpad.net/michael/apl, of course.
 
4:50 PM
woah, i just glanced at the APL wiki... O_O
like WTF mate
that's INSANE
 
APL looks amazing
 
No, it really doesn't look amazing :P Maybe for golfing but that's it :P
 
Just for the sheer joy of really understanding even 2 of its operators
 
lol
 
I bet @copy learned it, or attempted to at a point :P
 
4:52 PM
Nah, only Golfscript
 
If it was one line of code and you could say "Ah, I understand why that does 'game of life' that would be amazing". Now I just look at it and thing "I don't understand ancient Egyptian"
 
i found another genius edit she made...instead of having my source code download say the version and build number, she changed it to "download source" ...oh man, so much more descriptive and technical...that's what REAL coders want to see
@BenjaminGruenbaum it does look egyptian
haha
 
The use of Greek letters is a good indication of its Egyptian origin
 
Egyptians definitely used Greek letters
 
9 mins ago, by Benjamin Gruenbaum
@redline You don't want to hear what I have to say about that article though.
 
4:53 PM
ok ok fair enough
 
Linear A developed from Egyptian alphabet
 
@redline Where is this article?
 
no where and every where
 
> Its lightweight yet powerful design
This makes me cry tears of joy
 
4:59 PM
lmfao
 

« first day (973 days earlier)      last day (3968 days later) »