« first day (126 days earlier)      last day (4815 days later) » 

12:15 AM
@MylesGray dont post dead links!
 
@Raynos Works for me git-tower.com
 
@MylesGray that one does
@YiJiang o/
 
@Raynos Yes?
 
@YiJiang thought i'd say hi. It's always difficult to figure out your time zone. Swear you sleep too little
 
@Raynos GMT+8. And half a rchern \o/ isn't really a greeting isn't it? ;)
 
12:28 AM
o/ Is a waving hand. it's a hi there
 
12:48 AM
@Ivo In the last update to the site generator you broke the md links
 
 
2 hours later…
2:43 AM
(I just fixed that by rerunning the generator code)
 
Neo
3:30 AM
I'm using ajax to load pages by preventing default behavior of anchor tag but I want it so that when the page refreshes it loads the last content loaded not the one that was originally loaded not via ajax. so I'm thinking of using the new html5 feature to replaceState of url through the window.history to be the url of the new page. Is this a good idea?
 
 
5 hours later…
8:24 AM
Hi! :)
function str_obj(str) {
    str = str.split(', ');
    var result = {};
    for (var i = 0; i < str.length; i++) {
        var cur = str[i].split('=');
        result[cur[0]] = cur[1];
    }
    return result;
}
 
8:34 AM
@IvoWetzel There's something wrong with how the markdown parser processes external URLs
Look at the last few paragraph in the Prototype section
 
I reran node garden.js, but it didn't fix anything
 
hmmm ah
fixed
had something to do with the insertion of the div wrappers (which replace the old section wrappers so that the aside position still works)
hm, you changed the way how the menu works?
 
@IvoWetzel Yeah, experimenting with the best way of doing this
 
ok :)
 
8:46 AM
@IvoWetzel Core and Other are hidden on the sidebar without JS (no collapsing).
 
uh well... get a bigger screen? Or, enable JS?
Come on! The whole site is about JS!
;)
 
@Nyuszika7H Get a bigger screen
 
@IvoWetzel @YiJiang np, I don't want to disable JS :P
 
@Nyuszika7H rapache.net
 
hm
anyone is else's inbox broken?
 
8:50 AM
@IvoWetzel on SO?
 
yep
 
@IvoWetzel no, mine works fine
 
@IvoWetzel Can't tell
It worked, but I can't tell if I missed anything
 
request worked, but returns an empty array
therefore: no inbox entries at all
 
@IvoWetzel Ah yes, that sometimes happens
Pretty sure it's a known issue
2
A: The SO global inbox is empty sometimes.

Kevin MontroseThis is [status-bydesign-but-will-probably-be-improving]. Basically, when we haven't seen you for a while we drop your inbox out of memory*. The instant we see you on any site we start rebuilding it, but that can take some time (generally, less than 5 minutes). If you come to the site (after a...

 
8:53 AM
so for "a while" is around 8 hours?
 
Hmmm, he says it's resolved now, maybe ask on Meta?
 
I gonna open up a question
0
Q: Inbox not working, no results being returned by the XHR.

Ivo WetzelThe title pretty much says all. Opened up the page for the first time today, had a shiny red "Oh you got 3 new somethings" indicator, clicked it, and then... emptiness. First time this happened to me, I found this question but it's marked as resolved. Also my last visit to the site was < 10 h...

 
var myObj = {
	unsetOnNextCall: function(fn) {
		fn = function() { myObj[fn] = undefined; }
	},
	foo: function() {
		alert('bar');
	},
	bar: function() {
		alert('foo');
	}
}
 
unsetOnNextCall: function(fn) {
    fn = ... ?!?!?!?!
},
 
@IvoWetzel huh?
 
9:08 AM
uh, it's just, that this won't have any effect
 
I see… :/
Then let's try another thing.
var myObj = {
	selfDeletingProperty: function() {
		myObj.selfDeletingProperty = undefined;
	}
}
 
you should use delete instead of setting it to undefined
setting to undefined will still have hasOwnProperty() return true
 
@IvoWetzel can I do that? no [[DontDelete]] on object properties?
 
well if it reads selfDeleting, I'd expect it to delete myObj.selfDeletingProperty
 
yeah it works :)
> It is too late to edit this message
 
9:45 AM
hey I made a regex that actually matches arguments like text in JS!
It even handles escaping in strings :)
 
@IvoWetzel what? :)
 
hold on, need to fix the double escaped \'s
var numberExp = /^\-?\d{1,}$/,
    argumentsExp = /^,\s*?((true|false|(-?\d+))|('|")(.*?([^\\]|\4))\4)/;

function getArguments(str) {
    var m = '', args = [];
    str = ',' + str;
    while (m = str.match(argumentsExp)) {
        // number, bool, string
        args.push(m[3] ? +m[3]
                       : (m[2] ? m[2] === 'true'
                               : m[5].replace('\\' + m[4], m[4])));

        str = str.substring(m[0].length);
    }
    return args;
}
awful I know, but hey it's regexp
 
10:13 AM
but hey it replaced something that was 3x the size
so the thing is back down to 2,2k minified
gosh
the thing is completely broken
 
I've made some regex for BBCode… and it works!!
I've found some problems:
– It adds a line break at the very top of the page, too.
– Images don't seem to work inside links.
Todo:
– Add protection for links and images: only allow URLs starting with http:// or https://
 
10:31 AM
hm
 
updated to demonstrate that images don't work inside links jsfiddle.net/Nyuszika7H/Ahb4B/1
 
you can use back references to reduce the number of replaces
'[b]foo[/b][i]test[/i]'.replace(/\[(b|u|i)\](.+)\[\/\1\]/gi, '<$1>$2</$1>')
 
nice, thanks :) I'll try that after lunch
@IvoWetzel \1? I didn't even know about that :) only about $1
Hmm, is it OK to use the old <b> <i> <u> <s> tags or classes would be better? (there's no tag for overline anyway, AFAIK)
 
hm I'd use strong, em and spans
 
yeah but jsFiddle normalizes them
wait, now I can turn it off
Hmm, if I have this CSS:
.ul {
	text-decoration: underline;
}
.ol {
	text-decoration: overline;
}
wouldn't they override each other when nested?
I guess I need a .ul.ol rule, too
 
10:57 AM
hmm, nesting doesn't work properly
 
Maybe I need a UI.SE post. This menu is infuriating
 
that would be a good idea I think :)
 
11:20 AM
 
I love it when the green check mark indicates passing tests... I always want to add even more tests :D
 
\o/ Need to keep this somewhere for future references
 
@YiJiang Kitten could remember it... if it would work
or just star it
star and sticky
And don't tell me we can't use the stars as a todo list
 
Jotted down on my chat clipboard
(Yeah, the feature I took several hundred lines to implement that nobody else uses)
 
tests: 311 lines, lib: 214 lines!
 
11:22 AM
@IvoWetzel when will it work? :/
 
kitten?
 
@IvoWetzel yeah
 
when I get the myopenID login to work again
always love it when browser get HTML which a plain request does not get
 
finally getting rid of Windows from my life
 
@Greg and what about doors? :P
 
11:36 AM
haha
I like the Microsoft Windows slogan
"Windows - life without walls" ... if you don't have walls, why do you need windows??? Next you can say life without fences, so you don't need Gates
 
@Greg So you break the walls instead of using Windows? :P
 
I've got both netbook and desktop versions of ubuntu, which should I install on my 14" screen laptop?
 
@Greg I've installed the desktop version on my 17" screen laptop.
 
I'm thinking that the netbook version would be better for me
but will that limit what I can do with it?
I guess just try it and see?
 
uh
don't use the crappy netbook interface
just install the normal one, if you're doing any real work on the thing the netbook version will drive you nuts
 
11:50 AM
@IvoWetzel ah, thanks for the heads up ... I was wondering what limitations the netbook version had
 
a horrible desktop. well you can turn it off, but that's rather buggy
 
hi all
 
@IvoWetzel ok, you think the desktop version is ok on a 14" screen?
 
i need help of js guru
 
what's a js?
 
11:51 AM
@Greg Well I have it on my 11" Netbook so yes
 
@IvoWetzel excellent! Thanks for the tip, I'll get installing
 
javascript = js
 
SO LONG WINDOWS! YOU CAN NO LONGER LIMIT MY PRODUCTIVITY.
5
 
is there way to unodfuscate or uncompress js code?
example:
(function(g,b){var o="object",t="set_",l="#",n="$",k="string",j=".",h=" ",s="onreadystatechange",m="load",y="_readyQueue",x="_domReadyQueue",r="error",d=false,q="on",a=null,c
 
@Mirgorod what's it been obfusticated with?
 
it's bigger problem
i don't know
 
@Mirgorod jsBeautifier produces this:
(function (g, b) {
    var o = "object",
        t = "set_",
        l = "#",
        n = "$",
        k = "string",
        j = ".",
        h = " ",
        s = "onreadystatechange",
        m = "load",
        y = "_readyQueue",
        x = "_domReadyQueue",
        r = "error",
        d = false,
        q = "on",
        a = null,
        c
 
you can use a notepad++ plugin to format the code nicely
but you'll never get it human readable, because what's to say what each variable's name was - that's just guessing
 
but it is impossible to read :(
is there way to make this code normal looking?
 
11:56 AM
1 min ago, by Greg
but you'll never get it human readable, because what's to say what each variable's name was - that's just guessing
 
(this code is using in asp.net)
 
Look, they could be anything…
 
Where should the original names come from?
Out of thin air? There's no way to turn the code back into its original form.
 
you can work out what each variable is used for, then put in your own descriptive names
 
11:58 AM
if you're thinking of how .NET obfuscates code, it's totally different in JS because it's not compiled
what's with the spam?
 
it's js, not .NET languages
 
I can't understand why are there spam filters… it's so yummy!
Anyone wants to help? jsfiddle.net/Nyuszika7H/Ahb4B/2 [u] [o] [s] can't be nested, maybe because I combined the regex for them.
 
@Nyuszika7H That maybe the case, if I were to write such a thing I'd rather write a parser instead of using regex
 
@IvoWetzel parser?
 
In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens (for example, words), to determine its grammatical structure with respect to a given (more or less) formal grammar. Parsing can also be used as a linguistic term, especially in reference to how phrases are divided up in garden path sentences. Parsing is also an earlier term for the diagramming of sentences of natural languages, and is still used for the diagramming of inflected languages, such as the Romance languages or Latin. The term...
 
12:08 PM
I've made separate regexes for these… it's ugly, but it works! :P jsfiddle.net/Nyuszika7H/Ahb4B/3
Images still don't work inside links, though. :/ Any ideas?
Here's the generated markup: <a href="http://jsfiddle.net][img=http://jsfiddle.net/favicon.ico]js[/img"> jsFiddle</a>
It should be: <a href="http://jsfiddle.net"><img src="http://jsfiddle.net/favicon.ico" alt="js" /> jsFiddle</a>
 
12:37 PM
anybody here?
 
@Mirgorod me, but only for 1 min
 
it takes more time
 
I'll be back in about a hour.
 
ok
i'll wait here
 
1:02 PM
hi
i need a small help to call an external webservice with javascript
is it possible..?
 
crossdomain?
 
yap...
 
ahh
maybe better way is js ajax to page on your server than request from your server to other server?
 
usually JSONP is used instead of a serverside proxy
the webservice has to offer it though
 
who can help me with ajax?
Here is site: http://nakolesah.ru/
Middle form (without button, only selects)
There is post ajax query when first select is onchange.

Question: Where js takes value of __EVENTVALIDATION, when send ajax query?
 
1:23 PM
@Mirgorod What is your question? What do you mean by where?
 
if you can look at site html code, there is already hidden fields with id __EVENTVALIDATION but when js sends ajax post query to server, variable __EVENTVALIDATION value != to value of hidden field
so my question is where js generate new value?
 
It doesn't, do you have more than one element with that id?
 
тщ
no
on the page is only one element with such id
firebug shows
 
Hi again! :)
 
Here is site: nakolesah.ru
Middle form (without button, only selects)
There is post ajax query when first select is onchange.

Question: Where js takes value of __EVENTVALIDATION, when send ajax query?
 
1:36 PM
lol
 
why?
hidden field has different value
you can see it with help of firebug
 
@Mirgorod Never pass a string to setTimeout, use an anonymous function instead:
setTimeout(function() {
	// code goes here
}, timeout);
@Mirogorod Apparently jQuery has failed to load.
 
@Nyuszika7H: I misunderstood your question last night (it was kind of late and I was rushing), so I updated my answer today. I realize you already accepted an answer but I didn't want to leave my answer in the state it was in :-p
1
A: Converting strings like document.cookie to objects

Andy EI'm a fan of John Resig's "Search and don't replace" method for this sort of thing: var str = 'foo=bar, baz=quux', arr = [], res = '{'; str.replace(/([^\s,=]+)=([^,]+)(?=,|$)/g, function ($0, key, value) { arr.push('"' + key + '":"' + value + '"'); }); res += arr.join(",") + "}"; ...

 
such easy regex...
 
hi again
 
1:49 PM
why has regex to be so complicated -.-
    var replaceExp = /([^\\]|^)\{([^\{\}]*[^\\^\}]|)\}/g,
        accessExp = /^\.?([^\.\[]+)|\[((-?\d+)|('|")(.*?[^\\])\4)\]/,
        formatExp = /\:([a-zA-Z]+)(\((.*?)\))?$/,
        argumentsExp = /^(,|^)\s*?((true|false|(-?\d+))|('|")(.*?([^\\]|\5))\5)/;
at least they work! And I'm done with adding features
 
@IvoWetzel what's your job?
 
@Greg atm? Nothing
Although I'm currently applying for a JavaScript Developer position at Zynga Germany
 
cool
so you have been studying?
or just being lazy :P
 
uh no, I'm a school drop out
it's quite hard to get a job here in Ger without a degree
Spent all the years teaching myself
 
cool well at least that shows dedication!
your work on the bonsai tree will hopefully get you any javascript job you want :)
 
2:15 PM
@IvoWetzel are you there?
 
3:07 PM
Anyone knows which unit does <font size='…'> use?
 
good question, I'm interested to know too
but you know not to use that, right?
 
@Nyuszika7H @Greg It is relational
-2 = x-small in CSS
-1 = small
0 = normal
 
ahh
 
1 = large
2 = x-large :)
 
no sarcasm: thanks Yi Jiang, for the reminder of how to correctly spell JavaScript
 
3:18 PM
@Greg right, but I want sizes like that
 
@Nyuszika7H do it in css to keep the markup as markup
 
@Nyuszika7H Meh, why bother with such cross-browser inconsistency?
If you want relative font sizes just use a relative unit
 
Morning
 
@Raynos Its the afternoon :P
 
@MylesGray LIES. Vicious lies
 
3:25 PM
esp in germany its 4:30 :O
 
@MylesGray Evening. 11pm here.
Vicious lies indeed.
 
@YiJiang solved it :) and not with <font> jsfiddle.net/Nyuszika7H/Ahb4B/5
 
@Nyuszika7H That is VERY cool
now do it in reverse :D
 
“@Pilky's first law of regexes: any non-trivial regex is indistinguishable from a cat having walked over a keyboard.” via @kevinlabs #dev
3
 
that input/textarea style is a copy-paste but everything else is mine
 
3:29 PM
@Nyuszika7H HTML to BB ;)
 
@MylesGray :)
 
@MylesGray With regex's :D
 
There are still some bugs, i.e. images don't show up inside links, and [size] can be used only once, otherwise it won't work. Anyone knows why?
 
So the other day I was parsing HTML with a regex, And all of a sudden I got murdered by raptors!
7
 
@Raynos I hate it when that happens
 
3:34 PM
Ah, got it, the size regex was missing the global flag.
 
@Nyuszika7H If i do -> [size="5"] it breaks
doesnt like quotes
 
@MylesGray no quotes
 
some forums allow you to use quotes surely?
 
@MylesGray I'll try it.
 
@Nyuszika7H just write a parser
 
3:36 PM
@Raynos aww but I don't know how :P
 
@Nyuszika7H cool :) -> check out @IvoWetzel 's regexp matcher
 
@MylesGray Fomatto? yeah, I've seen that, very nice
 
Thats the one
okay onwards with the stack overflow widget :D
anyone on android here to test on real hardware?
 
good luck
Yeah got an android
Need an URL though
 
> var format = new Formatter();
> format('Hello, Sir {name:upper}!', {name: 'Lancelot'});
"Hello, Sir LANCELOT!"
 
3:41 PM
Idealy you want to use something like game closure
 
was that at me or Nyusz?
 
@MylesGray @ you
 
Is & a special character in regex?
 
Might be
nope.
 
testing it
 
3:46 PM
It's not, AFAIK
 
when in doubt
Admittedly it might mean something in IE :D Hell's know what their regexp engine oes
 
@Raynos Meh, the most they'll do is implement a subset of what the real specs call for
I don't think they have the tenacity to eff up their regex implementation too, after what they did to the DOM...
 
iirc, there are some IE only regexp things
 
@Raynos Game Closure?
 
@IvoWetzel Really? Must check, could be interesting
 
3:49 PM
I think I've seen a compatibility chart once
 
@MylesGray google is your friend. Alternatively read the JS weekly again
 
@Raynos Will do - tried googling but got a load of gaming sites
 
First hit for "game closure javascript". Oh man I love search localization
 
@IvoWetzel Better idea for the menu for desktop browsers: expand as many of the categories as possible, give each cat a priority
 
so expand the first N categories sorted by priority
and on click/open, close the N ones with least prority
 
3:56 PM
Yup, seems sensible.
 
@MylesGray done, but there are still some problems with images inside links jsfiddle.net/Nyuszika7H/Ahb4B/6
 
Hack hack hack hack!
How do i refactor my code so its not a hacking piece of **?
@Nyuszika7H [url=www.google.com][/url] doesn't work
@Nyuszika7H also your algorithm is greedy. So it eats anything between [url & [/url]
 
@Raynos yeah I'm going to do something similiar
 

« first day (126 days earlier)      last day (4815 days later) »