« first day (959 days earlier)      last day (4214 days later) » 

user1743637
@MissileMoose, That's still jQuery
jQuery is the best query.
user1743637
@phenomnomnominal History API is a jQuery plugin, right?
@MissileMoose no, absolutely not
It's the thing I've been linking you to about 10 times
(hint: read it)
14:04
(@MissileMoose this isn't at you) Oh so it's ASM.js like Chasm.js
JavaScript is a jQuery plugin, Good ol' jQuery.eval()
user1743637
/headDesk
user1743637
Wait, what? Mind == Blown
@BenjaminGruenbaum, that's probably serious damage haha
Good ol' jQuery.eval()
14:06
@MissileMoose, ignore @BenjaminGruenbaum, he's being a n00b
@phenomnomnominal did you know the SO chat includes both jQuery and jQuery.min because they're pro?
user1743637
I'm not too sure what's worse, the fact that he tried to confuse me, or that I actually Googled that... -.-
(made you look)
the History API is part of HTML5, it lets you directly manipulate the History of a browser at a lower level than JavaScript, through an api which is the window.history object
user1743637
Ah okay. Would it let me link to jQuery changes in my HTML though? Example: domain.com/#contact (See 109.145.236.120:82 to understand my context). This is what I need most, yet don't fully understand if History API is capable of.
user1125394
14:10
jquery has a plugin javascript.min.js I think
jQuery is just a DOM manipulation library that has an AJAX shim..
@MissileMoose, yes, you would simply call history.pushState(...your args)when you change a page, and then run the rest of your update code (e.g. loading it with jquery)
user1743637
Duh, I answered my own question with nix.lv/history/demo.html#1.
user1743637
Thank you very much. I'll grab some food and have a think about it, then try to sort it out. Back later! Take care all.
This guy is hopeless -_-'
0
A: Confusion on how to use functions in javascript

EdwardThis is some idea of code. function StackHandler(){ var stack = new Array(); this.push = function(obj){ return stack.push(obj); }; this.pop = function(){ return stack.pop(); }; this.getJSON = function(){ return JSON.stringify(stack); }; }; var...

14:14
Winner of most useless code I've seen in the last year goes to...
function StackHandler(){
    var stack = new Array();
    this.push = function(obj){
        return stack.push(obj);
    };
    this.pop = function(){
        return stack.pop();
    };
    this.getJSON = function(){
        return JSON.stringify(stack);
    };
};
I'm going to edit it...
This is his code, also, he still doesn't need this sort of thing
Don't edit it, his answer is bad, if you want to add an answer do so
delete all of it, then use JSON.strinfigy(globalVar)
Awww. don't downvote, now he'll think it's me
> PS, I'm not the down-voter, that's @phenomnomnominal
14:17
Hahahaha
It deserves it
!!> var D = 8; /* hehehehehehehehe */ 8===D;
@rlemon true
@rlemon, you've, ah, got an extra semi-colon there... :)
user1125394
a boy hacked rlemon's account
user1125394
or it's him..
14:19
!!> 5318008
@phenomnomnominal 5318008
@xcx definitely him
:D
!!game or code
@rlemon game
user1125394
14:20
@rlemon always twice for confirmation
I'm happy with the original outcome
user1125394
!!/tell rlemon !!game or code
Awesome question
user1125394
wont't work
14:21
You can do it, with code! One approach would be to use JavaScript and the DOM API! — Benjamin Gruenbaum 6 secs ago
@xcx Command !!game does not exist.
user1125394
can be done with new command though
@BenjaminGruenbaum I can't agree more. Thanks your code. — Edward 49 secs ago
So delete your answer or edit it into a proper one, sheesh
Haha,
@BenjaminGruenbaum An other way could be to hire a developper. I'm surprised you didn't mention it?! — roasted 20 secs ago
phone y u so stpid?
hah
> PS, I did not down-vote.
Ew I just had the worst ever idea
14:30
@phenomnomnominal Mango with milk?
If so, I've tried that already.
Nope, that's an awesome idea
Nah, not awesome at all.
I have seen this. I have done this. You don't want this.
Mango lassi???
Fresh mango with milk?
14:32
Give me ten minutes, I could act as a spray can after drinking it.
@user1768615 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.
they are so damn good, are you lactose intolerant?
Yea, and most likely fructose too. :(
sad Octavian is sad
how can i add to cases " <- start of string and end of string ->" using regular expression?
example : "-?\\d+" this is for all numbers , + and -
"$" this is for end of line
but what about "?
@user1768615 You don't want regex for that.
14:36
why not?
Because it's slow.
var blah = Object.defineProperty({}, 'blah', { get: function () { return (function () { console.log('blah'); })(); }})
okay, but im using switch cases and i need to read file and if in file is "string" then i want do smth to it
Basically you just '-' + string + '+'
@user1768615 you want to regex for a string? /\"[\w+\-]+\"/
14:38
but im not sure yup
ya, but i cant find on orale documentation syntax of it
Wait, do you want to check if it is a string or do you already know it is a string?
@OctavianDamiean he wants programming-style string (text delimited by double-quotes)
i just read each line of file and then i split it to single tokens after what im making controll of each token
so i dont know if token is string or not
you want to find a text like this: "tralalala"
right?
or "blahblah1258++!@40"
(with double-quotes included?)
programming-style string, uh huh ... I understand ... not
14:41
uhm... let me write an example of line of file
@OctavianDamiean i meant... oh, forget it.
@OctavianDamiean :D
@OctavianDamiean ?
So he just has some text chucks he wants to wrap in double quotes.
file can contain smth like this:
"luis" 50 + 20 + 50 - 100
@OctavianDamiean he wants a regex for that.
@user1768615 and you want "luis"
14:42
... but that's stupid.
@OctavianDamiean why is that?
I want a narwhal as a vehicle to get to work but that ain't smart.
yes i do, i want check that first token and if its string (is in between " blah") then i will take an action
le sigh what is it you want to to now? Do you want to determine if the first character is a double quote?
so /\"[\w]+\"/
14:45
so [\w] is "?
no, \" is "
ah, okay, i do understand
thanks =)
/ beggining, \" first double-quote, [\w] is from a-z, A-Z, 0-9 and _, + one or more times, \" second double-quote, / end.
reddit is down :(
thanks @AreWojciechowski
14:48
Eh, why not just if( string.indexOf('"') === 0 ) { // do something special }?
user1125394
I like this guy too much
case /\"[\w]+\"/: <- eclipse is marking it as an errror
@OctavianDamiean eh... he do not want to find a double-quote.
@user1768615 XD you have to rest it. /\"[\w]+\"/.test(string)
14:49
@OctavianDamiean or if (string[0] === '"')
@FlorianMargaine No, mine contains the word index.
it returns true, if regexp finds a match.
@AreWojciechowski Okay, so what does he want then? I'm seriously not getting it, every time I think I got it he keeps writing something that invalidates what I thought.
@OctavianDamiean, welcome to the developer world, nobody understand any1 hehe
I usually do.
14:52
@OctavianDamiean he wants to check, if the file begans with a string-styled (xd) string, like "abc" or "ag124"
right? because now I'm not sure.
alright, I just wrote a full-blown css parser github.com/Ralt/cssminify/blob/master/Block.go
We don't understand people who don't explain themselves properly.
@AreWojciechowski So, why not just if (string[0] === '"') then?
because file can contain "asfasgfasgasg
well, "full-blown"
14:53
or """""asfasgasgasga
And on that note, has anyone really been far even as decided to use even go want to do look more like?
@FlorianMargaine Neat
@AreWojciechowski Ah, it must be a full double-quoted string. Got it now, finally ...
it was time I wrote a language parser..
@OctavianDamiean hooray! : D
14:54
@FlorianMargaine Cool.
@AreWojciechowski Did you account for escaping?
and now I can say I kinda know Go.
monring
@Zirak Did I?
14:55
@FlorianMargaine well... you start to know Go... maybe wait a few days before you say you know Go :)
@FlorianMargaine consider writing something that does recursive descent :)
@AreWojciechowski ...why are you asking me?
like, create goroutines, servers, and so on...
@dystroy which is why I said "kinda" :P
@Zirak Because I'm not sure what are you asking me. : P
14:55
@Zirak because he is not sure of whether he accounted for escaping or not :P
"blah \" blah" is a valid string
Stop asking hard questions!
And "blah " blah" is not
@phenomnomnominal Do you remember the site I linked you to, the github profile data thing?
@Zirak because " is not in [\w]
@Zirak so I don't know.
You should accept that, and you should know
14:58
@user1768615 what kind of file is that? I mean what alternative patterns can you encounter?
text file which contain instruction which i should reproduce
in reality it look like:
10 PRINT "Hello World"
20 PRINT 2+ 10
aahh, a step into the future taking you 10 steps into the past.
@Zirak : / I'm going to hang myself on a door handle
Have fun. Wear safety goggles
@Zirak I don't have any, should I go without?
15:01
@user1768615 but that doesn't start with a double-quote wrapped string.
Welp you're screwed anyway, so do whatever you want.
@Zirak well : (
@OctavianDamiean, no its not, i need read each token of that line and then make controll if it start with "
@OctavianDamiean, im reading line by line and then i make split after what i get tokens so i can make controll if it start with "
15:02
I need your help people. Either I'm trying to do something stupid or I'm doing it just plain wrong.
Consider the following:
var Foo = {};

Foo.Bar = function() {
};

Foo.Bar.prototype.baz = function() {
  alert('yo');
};
How do I check whether Bar has a baz()?
@user1768615 In that case I still think if (string[0] === '"')
Tried:
console.log(Foo['Bar'].hasOwnProperty('baz'));
console.log(typeof Foo['Bar']['baz']);
both return false
@PeeHaa埽 What do you mean Bar has a bar ?
baz that is
@BenjaminGruenbaum i think he meant baz()
15:04
@PeeHaa埽 Because baz is on Foo.Bar.prototype, as you defined it?
@PeeHaa埽 You want to check if an instance of Bar has a baz or if the method has one?
So why would it also be on Foo.Bar?
fak
tnx :)
@PeeHaa埽 baz in Foo.Bar , there's an operator for checking if something is in something you know :P
@OctavianDamiean, but I'm already using switch case;
switch (word) { // word is token
// All bool term
case "+": // if token is dim then it will make smth
im not sure can i add if action to cases
15:05
nvm. In my defense it was late yesterday and early this morning
:D
@FlorianMargaine You know...I just realized I did something insanely stupid in SEN
I had a lot of hiccups because of comments. For some reason, I had the notion that I have to ignore them during parsing. And didn't think that it's okay for me to tokenize them as a token...and on conversion, simply skip past them.
@OctavianDamiean, /\"+\"/ <- this verificate only first and last char without considering what is in the middle, am i right?
or its better to specificate that in middle can be an alphanumeric word?
@Zirak One simple approach is to run a state-machine pre-parser that cleans all comments
A simpler approach is to treat them as a normal token
@user1768615 your regexp will match for """"""""""""""""""""""""" but not for "abc"
@user1768615 so its better to specificate
15:14
@user1768615 why are you insisting on a regex solution if that's confusing to you? Just use a while loop
alright, thanks for advice
ugh I hate comments
Corner-cases, like "it's valid to have a comment between a key and its value"
Just pre-parse with another simple state machine that has only four states- in string, in comment, normal and done
15:26
That's definitely cheating
It's not a big problem. Just annoying.
Oh, interesting Octokit
The really interesting part is this one:
> Today, we're making our first two libraries available.
@Zirak well, the 1st issue you had was trying to do this in a recursive way. It's way simpler using a simple state machine
damn today i'ma a beast!
my friend bringed up openlayers.js from 700kb to 120kb compiling that, all i can say is WOW
15:41
is it normal that my chat window is 'jumping'?
@AreWojciechowski Sorry, that was me.
@OctavianDamiean i mean, it's shaking a bit.
@OctavianDamiean like an pixel down and up once every second.
I had the hiccups.
That is a (known?) bug
@copy Hiccups are a feature, not a bug.
15:43
oh, it stopped.
i want it back :C
@Świstak35 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.
cześć @Świstak35 : D
I wish we'd use torrent for every download on the internet.
i wish torrent will be replaced by something smarter really
What aspect of it isn't smart?
that you can't upload file and share
What in the name of god are you talking about?
can you upload a file to torrent to share it ?
Torrent is a protocol ...
15:56
ehm... ok my mistake sorry :D
@OctavianDamiean which music you listen to usually?
Music that I like.
yeah that is the way ;)
music you do not share with me i guess too right? :D
Swing House and Acid Jazz

« first day (959 days earlier)      last day (4214 days later) »