« first day (609 days earlier)      last day (4353 days later) » 
00:00 - 18:0018:00 - 00:00

12:50 AM
posted on June 15, 2012

I don’t often toot my own horn on this blog, but I thought this was worth a mention.  Over at Official.fm Labs, we just released FLAC.js our JavaScript FLAC audio decoder, and Aurora.js, our framework to make building JS audio decoders easier.  Check out our blog post over there for more detailed info and the demo here, but the quick story is that we think the Web Audio API is a really im

 
 
1 hour later…
1:56 AM
<-- this is a pen.
 
2:35 AM
0
Q: Small auto scrolling window

Faith In Unseen ThingsI'd like to apply a global site-wide little javascript window on the very bottom right of the site that will display a window about 40 x 80 wide, just a book icon and the word "Bible", where when a person clicks it, it will open a pop-up window, centered and pull whatever page I give it to displa...

 
 
2 hours later…
5:01 AM
Good Evening/Morning brothers and brothers :D
 
5:16 AM
:LOL:
 
user1385191
5:27 AM
Opera 12 has some nice visual changes
 
user1385191
prettiest browser by far
 
6:09 AM
yeap
Checked it out
 
0
Q: How to call a Javascript function having return value in c# codebehind

VinodI am having a page where i need to confirm whether to show updated grid or not I am calling a javascript function using ScriptManager.RegisterStartupScript(this, typeof(string), "Error", "confirm('Are u sure');", true); What I want to know is how to get the return value of confirm in C# code...

 
please understand how http works, maybe switch to php
or c
 
6:25 AM
the main problem i am facing here is while updating values in js its not reflecting in c# code
 
the main problem is that you think this is how the web works :(
 
@Esailija o/
 
the .net platform creates a lot of people that think server and client is one program
they are complete separate entities that can only communicate by sending messages
thus anything you do in javascript, won't be reflected in c#
unless you first send a message about it and the c# receives the message and changes its state
but it doesn't have to
does this make any sense to you @Vinod ?
 
@Esailija i am changing hiddenfield value from js
 
I see you are not listening :)
yes you can easily do that, and it will change value, on the client side
that doesn't change value at server side
 
6:31 AM
it is but in second attempt
 
do you know how to view source in your browser
why don't you do that, and see that there is no C# in there. That is all the browser knows about.
 
7:00 AM
0
Q: AutoComplete with context key in a Textbox based on two parameters?

Prince Antony G Refer the Image, having 2 TextBox(tbxAttribute and tbxAttributeDesc). Value will be loaded when page is loaded in tbxAttribute TextBox.In tbxAttributeDesc TextBox the end user will Fill that Data. I have already Completed the Autocomplete Text in tbxAttributeDesc. We are maintaining these Va...

 
 
2 hours later…
8:50 AM
0
Q: HTML5 Canvas A* Star Path finding

VeyhaI am trying to learn A* Star Path finding. Library I am using this - https://github.com/qiao/PathFinding.js But I am don't understand one thing how to do. I am need find path from player.x/player.y (player.x and player.y is both 0) to 10/10 This code return array of where I am need to move - v...

 
9:03 AM
@FlorianMargaine o/
 
@Sam That's one of the most pointless questions I've heard
function fromMillisecondsToSecondsToHoursToSecondsToMilliseconds ( milli ) {
    return milli;
}
 
Sam
@Zirak Would you believe someone upvoted that question. I downvoted it back to 0
 
There wasn't even a question. He just stated a fact in a very weird way.
 
Sam
 
9:24 AM
lol
 
Now that there's a logical explanation, we can all sleep peacefully, knowing that the Imperial soldiers are all well and good.
 
My new gf is a CS student
Lottery!!!!!!!!!!!!!!!!!!!!!!! atleast my gf wont say that i am just sitting in the front of my computer wasting time when all computers do is run facebook :-x
 
And I'm sure that's the summation of your entire relationship :P
 
nah lol
its like 1 day old relationship :-|
she likes trekking , clubs , music , code // same as me lol
 
It's weird how people say "I like music". It's like saying "I like hearing things", or "I like movies". Of course you do, but it's the type that matters.
 
9:35 AM
same type :P
 
I've met people who liked music which made me want to throw up and curl up in the corner of a room filled with despair and agony.
 
Sam
Do you two like this song? youtube.com/watch?v=VTT6picaCoQ
 
smells a Rick Roll
 
Sam
Tis not!
 
[Abhii@localhost src]$ node bench2.js 4000 Cpp
Now Starting
Engine :: C++ Async.
Done  Id3-Parsing 4000 files in 180ms
[Abhii@localhost src]$ node bench2.js 4000 js
Now Starting
Engine :: JavaScript Async
Done  Id3-Parsing 4000 files in 9800ms
 
9:36 AM
Well, since you said it isn't...
 
wtf really that fast ? or is that possible that my JS code sucks ?
 
It could be a combination
 
I showed the JS code here a while back (hmm)
lemme re-show ;D
wanna see sir ?
 
There's a 99% chance I won't be able to help in the slightest bit
Pun unintended, yet of amusing nature
 
lol
made sense ?
 
10:28 AM
 
10:55 AM
Sir John Harington KCB (also spelled Harrington) (4 August 1561 â€“ 20 November 1612), of Kelston, was a courtier, author and master of art, popularly known as the inventor of the flush toilet. He became a prominent member of Queen Elizabeth I's court, and was known as her 'saucy Godson'. But because of his poetry and other writings, he fell in and out of favour with the Queen, as well as with her successor, James I. The work for which he is best known today, A New Discourse of a Stale Subject, called the Metamorphosis of Ajax (1596) is a political allegory. It is a coded attack, a...
 
11:51 AM
@IvoWetzel you there bro ?
 
 
1 hour later…
12:59 PM
@ThiefMaster Best of luck with the elections!
 
Thanks :)
 
1:14 PM
offtopic I am losing my mind
 
@Abhishek Whom?
 
My girl :-)
we had a nice lil 1 second kiss :3 lol
 
And you are losing your mind why?
 
cause shes the girl exactly as i wanted :D :D
 
That's cool
 
1:16 PM
dude i am gone :-|
 
Why?
 
she is pbbly joining SO soon :-x
 
Change your name, simple
 
nobody shows her the porn Screen.Shot
 
You wish :p
 
1:17 PM
Hahaha, congrats to your very own overly-attached-girlfriend
 
overly attached ?
 
I don't think she's joining to spy on him
 
don't you know the 9gag meme?
 
shes like the CSS of My Lifes HTML
 
She codes, right?
 
1:18 PM
yes
 
@ThiefMaster 9gag meme?
 
shes a Computer Science student aww i am so in love
 
It isn't 9gag specific, man
 
I get to teach her javascript oh my god
 
1:19 PM
ah well, that's where i saw it mainly :P
"OMG YOU USED EVAL, NO SECKS FOR YOU"
 
@ThiefMaster Go to reddit.com
You'll thank me eventually
Maybe not
@Abhishek What's her name?
 
Yasha
@Amaan u have got 1850 rep.. aaila merko to ab rep banani padegi re LOL
I am dead homies ...
 
1:42 PM
I haven't been active on SO recently
Been 1800ish for months, I think
 
I just saw it (XD)
i cant spend time upping rep :-(
i am too busy with my full 3d animatable morphable css skeleton and job projects
 
You live with a friend, right?
 
I live alone ;-D
 
You pay for yourself?
 
of course , why the hell do i earn then ? lol
 
1:45 PM
How do you manage to pay for yourself?
 
I got a job bro , and i am migrating to meet rLemon , Incognito and all those who live in Republic of canada ;D ;D
 
Oh, like a full time employee?
 
yes
 
Where?
 
Canada
 
1:47 PM
I meant where do you work?
 
// Confidential Information .
i will show u something soon though :-)
 
You sell drugs then. :p
 
nope i sell Artificially Intelligent war-heads , stolen from when USSR broke . Wanna buy a tsar bumba ?
LOL
@Amaan voscast.com they found me on freelancer :-) wrote HTML 5 player for em now writing something really kickass for em
 
You work from home?
 
@Abhishek Seems like you missed me by a few minutes
 
1:54 PM
@IvoWetzel yeah :-) a friend of mine wants tips in python
i am a total noob with python .. so can u help him ?
 
@Abhishek Can he post on the SO? :D
 
I asked him.
havent yet but i will drag him to StackOverflow don't worry :-)
I read on ur interview that you love python other then JS :-D
 
gosh, that thing is old :D
but yeah, I like python a lot, maybe that's why my own language will end up looking a lot like it :D
 
:-D
 
just finished support for list comprehensions
list[int] tens = [i * 10 for int i in 0...10]
 
1:58 PM
cool :D
 
turns out type resolving is quite easy...
 
i still have to start learning python & java :-x , i am stuck with C++ and JS
@Amaan Yes i work from home till i can get to canada , for that reason they consider me "outside-inside developer" lol
 
then java is irrelevant
go with python (for some syntax differences and a touch of functional stuff)
and then learn haskell/erlang
 
:-)
 
(still have to get around doing something useful with one of the latters)
 
2:00 PM
Time to push my first native module on node.js // its ugly C++
 
:D
or spend your time learning a good editor
 
:-)
 
@IvoWetzel Strongly typed? Then why not consider adding something like var in C#?
list[int] tens = [i * 10 for i in 0...10]
Since 0...10 will only contain ints for obvious reasons the compiler/interpreter knows the type of i
 
@ThiefMaster Design is still in flux, I'll most likley end up adding something like a mixed type
 
Ah well, what I meant wasn't a type where you can assign anything but simply syntactic sugar for cases where the type can be inferred from the context
 
2:03 PM
Point is, I'm experimenting around and wanted to do some type analysis
I see
But then again, I focusing on having nearly zero ambiguities in the language, I think that consistency is very important to have :)
Also, this stuff currently is planned to be generated out into JS
so again, it's one big experiment
thus far I've built a lexer, parser and parts of the compiler/validator from scratch, with little to no help from the internets
there's still a ton of stuff missing
It's a sandbox to extend my own horizon
 
How are you doing this?
 
@Amaan What do you mean by "how"?
 
I don't know how you make a language at all
Do you use a lower level language?
 
2:18 PM
Right now I'm using JS to parse the source, generate an AST and compile that
 
AST is what?
 
Abstract Syntax Tree
 
Recommended reading?
 
uh... wikipedia, google some stuff, I've built most of it from scratch (you can read the source of my project, lexer/parser have fairly good docs)
but this one from Crockford is really good: javascript.crockford.com/tdop/tdop.html
(still takes some time go get into the matter though)
 
2:54 PM
@Amaan yes recommended
 
3:24 PM
@Incognito o/ hey there
 
Howdy.
 
3:35 PM
Do someone know how you can use stylesheet when you are restrict for not using html element for selector. suppose you can't use .dropdown ul for select ul inside dropdown.
someone have idea for rewrite .dropdown dd ul li a
 
user1385191
wat
 
I means "I can't use html element as a selector" means .dropdown dd ul li a is invalid because it's have dd , ul li a which is html element. @MattMcDonald Do you know how to rewrite it.
 
You don't have control over html, but want to create a dropdown list?
 
why would someone restrict this?
 
rules to follow
 
user1385191
3:49 PM
so no tag selectors in your CSS?
 
you'd basically need a classname on anything
to use a catchphrase: that's insanely stupid
 
HTML MUST NOT contain any ‘id’ attributes.
All style must be driven by ‘class’ attribute and NOT by e.g. HTML attributes
like ‘li’ or ‘h6’ and not be id attribute.
 
user1385191

CSS

Questions and discussions about Cascading Style Sheets (CSS) a...
 
user1385191
can someone move these posts to that room?
 
@AnkitGupta tell the guy that set up this rules, that he's an idiot
hey @MattMcDonald, long time no see. how are all the ancient browsers doing? ;)
 
user1385191
3:55 PM
Utils is about two days from release (Beta on HN)
 
user1385191
it's kind of hard to do QA on a project where nobody wants to test the API, but I'm doing my best
 
github link?
 
user1385191
6362 lines that passes JS(Lint || Hint)
 
user1385191
3:59 PM
mine's all duck typing
 
var type = nodeTypes.ELEMENT_NODE; that works in IE?
 
user1385191
nodeTypes is a custom object
 
user1385191
(via Utils.types)
 
user1385191
the biggest unit test scores 53/53 (60 tests) in IE 5
 
@Oleg yucky
Why do people feel the need to enforce types in a duck-typed environment?
 
4:13 PM
hmm?
 
Why do you need it? How is it useful?
Why would you check for a type?
 
It could be necessary to do different stuff depending on the type.
 
user1385191
yeah I don't agree with primitive sniffing either
 
I would like to know what I'm dealing with huh
besides
 
user1385191
then write Java
 
4:14 PM
if (typeof obj === "object" && obj) {} < wtf
 
user1385191
guards against null
 
Ever heard of duck-typing, the foundation of js "typing"?
 
user1385191
typeof null; // "object"
 
why not just if (is.Object(obj))
 
user1385191
I don't sniff for primitives
 
user1385191
4:15 PM
or natives
 
user1385191
the duck typing is for host objects
 
user1385191
whose "types" have no specification
 
user1385191
so the toString hack goes out the window
 
The only time I check for a "type" is for overloading, which I heavily dislike as well.
Find another instance where I do that and punch me. I'll fix it. Java infected my brain already...
 
user1385191
half a decade has been spent on sniffing native types
 
user1385191
4:17 PM
first it was obj.constructor
 
user1385191
then instanceof
 
user1385191
and now Object.prototype.toString.call(obj);
 
oh ok, happy something[3] with something being a string when you think you're dealing with an array
 
user1385191
sift through incrementing versions of jQuery and you'll see what I mean
 
user1385191
I specify expected types in the docs
 
user1385191
4:18 PM
if the user passes an unexpected type, it's user error
 
user1385191
but I try to keep the definition vague enough
 
@Oleg Why would I do that? If I expect an array and someone gives me a string, it's their fault. It should fail. It's not my job to babysit anyone.
 
Don't do that. It's simple.
 
user1385191
as developers, we coddle each other far too much
 
user1385191
how can we learn if code does not err?
 
4:21 PM
Type enforcement is about being scared of ghosts. "Oh no! What if someone passes List<uint32> instead of List<int>! Civilisation as we now it will crumble!" No, it won't. If you make a mistake, why do you expect me to fix it?
 
isn't this about increasing the re-use of code? Your plugin (or whatever) can live in a bigger world if it can do something reasonable when passed a string
 
Overloading. And when I do that, I don't check for type, I check for functionality.
 
user1385191
my API is modular and highly re-usable
 
user1385191
and not "modular' as $ sees it (split files), but real, encapsulated modules
 
Besides, overloading is a poor mechanism anyway. It increases code confusion by 9000 (usually; not every time. some cases are moderate.)
 
4:23 PM
@MattMcDonald what do you mean by that?
 
user1385191
$ 1.8 is going to have a "builder"
 
user1385191
wherein you specify "modules" to include
 
user1385191
but there's only a few "modules"
 
user1385191
and they're actually just one file split into pieces
 
like jquery.ui?
 
user1385191
4:24 PM
kind of
 
they thinking of mobile contexts? (size constraints)
 
So, your API is modular?
 
user1385191
yep
 
user1385191
there's the required core and three optional modules
 
user1385191
 
4:26 PM
Alright, I'd like to see what happens when you remove that "types.js" and build it.
 
user1385191
(Resig on modules; note the irony)
 
user1385191
that's part of the core
 
user1385191
the README has the details
 
@Matt interesting. I am going to go read up on DOM Utils. Thx
 
user1385191
classes, traverse and select are optional
 
user1385191
4:28 PM
I list the dependencies in each module, so one could remove more if they chose
 
Okay, so basically we don't need "typeof" in JavaScript?
 
in CSS, 41 mins ago, by Ankit Gupta
HTML MUST NOT contain any ‘id’ attributes.
All style must be driven by ‘class’ attribute and NOT by e.g. HTML attributes
like ‘li’ or ‘h6’ and not be id attribute.
and not a single shit was given that day ...
 
user1385191
typeof is quite necessary as part of duck typing
 
user1385191
only the basics are covered
 
user1385191
one cannot wrangle host objects without it
 
user1385191
4:37 PM
the most robust feature detection method ever written relies on it
 
I'm actually quite pleased. The only instances of typeof in the bot is in url serialization and checking whether the bot exists yet. The latter can be removed easily
 
Why is it necessary in duck typing? I don't really get it.
Besides, I strongly disagree on the unimportance of type checking.
Here's an example:
I build graphs displayed to customers. The data I use comes to me in real time from multiple sources over which I have virtually no control. It is my responsibility to display correct information to the customer or inform him of an issue if something wrong comes down the drain.
If an issue arises I cannot just point at the other guy and say: "fu! it's all his fault!! he gave me a string while I was expecting a number"
 
user1385191
in other words, you build an API
 
It's also my fault for accepting that string while expecting a number.
It is also my duty to provide useful information about something that's going on in the system.
 
user1385191
4:48 PM
so you would accept Number(obj)?
 
So that the other guy doesn't spend three days figuring out some cryptic message.
 
user1385191
type conversion will implode on host objects
 
@MattMcDonald Of course not. Why should I?
 
user1385191
you should provide great documentation so the user can follow your intentions
 
But the other guy can read my documentation and still send me wrong data.
It happens. Bugs happen. Omissions happen.
And in the end the customer sees perfectly displayed but incorrect data.
And predictions are being made basing on that data.
People are being charged basing on that data.
People are being fired basing on that data.
In the end of the day, was it just so damn difficult to write a couple of lines of code that throw one stupid exception?
 
user1385191
4:52 PM
yep; that's when people complain about IE 5/6 not working
 
user1385191
because they use hacks to detect types
 
user1385191
people complain about IE when they use Array.prototype.slice.call
 
user1385191
when they should have used a loop
 
What has this to do with type checking?
 
user1385191
I'm trying to say that strict type checking in a dynamic language is a hack
 
4:56 PM
I'm saying that's a wrong assumption.
 
user1385191
and has never worked reliably, especially when host objects are involved
 
user1385191
there is one given type check in ECMAScript
 
user1385191
Array.prototype.isArray
 
there's "typeof"
And it's buggy as hell.
isNaN is buggy too
In every browser.
 
user1385191
typeof is not buggy
 
user1385191
4:58 PM
its results are well defined
 
It's buggy by spec.
 
user1385191
note that the spec does not cover the "type" of host objects
 
user1385191
that's where the "bugs" enter
 
user1385191
so when typeof xhr.open is "unknown" in IE 7, that could be considered "buggy"
 
user1385191
even though it's a defined behavior
 
user1385191
5:02 PM
as xhr is an ActiveXObject
 
Hi.
 
@Oleg No. You should always check input. But that doesn't have to do with types.
 
^ how do I check input without checking type? :)
 
You transform 3rd party input into something you can recognize. Inside your API, stupidity is to be blamed on the user of that API.
 
5:08 PM
No, I don't transform anything.
I simply reject things I don't accept.
 
And of course you should display errors. But what does any of this have to do with types? If something fails, what difference does it make if it's because of typing or because of a perfectly ordinary logical error?
 
...
 
You don't give me pounds when I ask for dollars.
 
So if you get some XML, you don't turn that into something you recognize, and instead just happily hack away at the string?
Exactly. And if I do give you pounds, then fuck me.
 
Exactly.
I ask for a number and you give me a string? Go away and return with a number. I'm not going to do magical type conversion of your string with rainbow assumptions while riding a unicorn.
 
5:29 PM
meh, chatbot room still frozen.
 
5:41 PM
SO moves so slow on the weekends..
 
//send output to all the good boys and girls
//no messages for naughty kids
//...what's red and sits in the corner?
//a naughty strawberry
lol, when did I write that?
 
00:00 - 18:0018:00 - 00:00

« first day (609 days earlier)      last day (4353 days later) »