[nodejs] Getting Text Summary, Image or Video from link

2013-04-13 Thread nikkubhai
In facebook ,twitter and google+ , when you paste a link : you get a summary is its a blog, a picture if its a picture and a video if its youtube linkHow do they do it? Is there a nodejs module for it? -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] C/C++ Addon: Is argument a Buffer instance?

2013-04-13 Thread Bodo Kaiser
Hello, I want to move my bit operations parser from Js to C(++). My current problem is that I do not know how to check if the argument is a buffer instance. GetIndexedPropertiesExternalArrayDataType() returns an enum with the types but I am not sure what to do with it... LocalObject obj =

[nodejs] Re: C/C++ Addon: Is argument a Buffer instance?

2013-04-13 Thread mscdex
On Apr 13, 8:27 am, Bodo Kaiser bodo.kai...@enabre.com wrote: My current problem is that I do not know how to check if the argument is a buffer instance. Use Buffer::HasInstance: https://github.com/joyent/node/blob/v0.10/src/node_buffer.h#L73 -- -- Job Board: http://jobs.nodejs.org/ Posting

Re: [nodejs] Re: C/C++ Addon: Is argument a Buffer instance?

2013-04-13 Thread Bodo Kaiser
Thank you. This worked. https://gist.github.com/bodokaiser/5378187 Am 13.04.2013 um 14:40 schrieb mscdex msc...@gmail.com: On Apr 13, 8:27 am, Bodo Kaiser bodo.kai...@enabre.com wrote: My current problem is that I do not know how to check if the argument is a buffer instance. Use

[nodejs] Re: Preparation for wayland bindings

2013-04-13 Thread Henri Tuhola
There are some rough edges left, but it seems the wayland/client is otherwise ready for action. There's the first screenshot about a client that's written entirely in coffeescript. It draws a checkerboard into a shared memory buffer:

[nodejs] Re: Simple Node/Redis Taskqueue

2013-04-13 Thread Tom Dunn
I've updated the code to use BLPOP as Thomas suggested. I've also created an npm package for it. Lingering concerns: 1. How can I be sure that a task wont crash the worker process if it produces an exception? 1. Try/catch works if the task is synchronous, what if it does some

Re: [nodejs] Re: Should I use asynchronous callbacks for non-I/O tasks?

2013-04-13 Thread Isaac Schlueter
There are plenty of examples of people calling things callbacks that are just a function you pass to another function that gets called zero or more times. *In Node.js*, callback typically refers to an asynchronous callback as Jake explained, but not quite 100% of the time. It is critically (and

[nodejs] C/C++ Addon: v8 does not accept node::Buffer::New()

2013-04-13 Thread Bodo Kaiser
Hello, I want to create a Buffer instance in a C++ Addon and export it. See: https://gist.github.com/bodokaiser/5379132 Somehow v8 does not want to except the returned value of Buffer::New because of: CXX(target) Release/obj.target/test/src/test.o ../src/test.cc:17:11: error: no matching

Re: [nodejs] Re: Should I use asynchronous callbacks for non-I/O tasks?

2013-04-13 Thread Mark Hahn
you should always be prepared to sync returns. +1 I've always done this. However, one time when I was arguing this someone came back with an usage example where this was impossible. I don't remember it off the top of my head but it had something to do with a function both having a return

[nodejs] Re: C/C++ Addon: v8 does not accept node::Buffer::New()

2013-04-13 Thread mscdex
On Apr 13, 12:44 pm, Bodo Kaiser bodo.kai...@enabre.com wrote:     scope.Close(node::Buffer::New(chunk, 4)); Try this: scope.Close(node::Buffer::New(chunk, 4)-handle_); -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

[nodejs] stream.Transform events

2013-04-13 Thread Ruud
Hey, I'm trying to create a streaming parser/transformer for a special web proxy project. The 'streams2' stream.Transform base class makes this quite easy, but trying to benchmark some thing I've hit a problem: it seems no (end) events are emitted. The docs don't list any events under this

[nodejs] possible data loss with q.js

2013-04-13 Thread marc . coupar
I'm attempting to use Node.js and Q.js to handle promises but appear to be losing the first chunk(s) of data from http requests. My code is based on Q.js sample code so I can't see what I'm doing wrong. Sample code below. Any pointers to what I'm doing wrong? var http = require('http');

Re: [nodejs] stream.Transform events

2013-04-13 Thread Dan Milon
You're explicitly asking it not to emit an end event by passing end: false to pipe. On 14 Απρ 2013, at 12:01 π.μ., Ruud r.bij...@gmail.com wrote: Hey, I'm trying to create a streaming parser/transformer for a special web proxy project. The 'streams2' stream.Transform base class makes

Re: [nodejs] stream.Transform events

2013-04-13 Thread Ruud
Okay, now I feel stupid. Thank you for your response. I was able to test and confirm that the stream.Transform and Passtrough DO emit an end event (and all other relevant events). Not sure yet what is wrong with my application code, but I'll find out tomorrow. I think that the code in the SO