« first day (145 days earlier)      last day (2619 days later) » 

10:05
@yojimbo87 gratz on 3rd ;)
thanks ^^
start that. It sgood :)
 
2 hours later…
12:40
Hi there!
Val
Val
I find node.js very confusing and all over the place, especially the founder, I found that he had wild ideas [good times] but he can't express himself very well, they need to be more organised and more prepared
I find it pretty easy to get an overview, but at the same time difficult to master
Oh hello
Val
Val
same with me, I guess it's because it's so alike javascript that gives you that familiar feel, but the luck of docs, [poor docs] make it impossible
@Val what do you mean?
The docs are ok
node.js docs aren't that bad
I mean fs docs are a joke
12:45
I think there are quite o lot of stuff
Use stackoverflow for questsions
or ask us
the problem to me is understanding in a better way this blocking/nonblocking issue, which is more relate to JS itself
Val
Val
I am just discussing about it
blocking nonblocking is easy to understand ;)
dont block. ever.
of course
but using callbacks doesn't solve the problem
Val
Val
12:47
I think they should make it clear and not assume people would know it, like on PHP, you go there tells you how to install it,
There's a good video about this
Callbacks are a solution
there other solution is message passing
or using an async language
@Val it tells you how to install
download the source, build it
cool where can I find the video?
cheers :)
Val
Val
I am a web developer, I don't know most of them stuff, tcp, DNS, etc... i have a little knowledge of them, but I don't need to know. also. nodejs.org/docs/v0.5.4/api/https.html here, the params/attr should be clear and properly structured
12:50
watching it now
@Val they are clear enough
Val
Val
Raynos, are you the founder ? of node js ?
You dont need to know tcp, DNS
No of course not :\
I agree with raynos, the documentation is there, the problem comes when you rush too much
and I KNOW that I rushed and jumped a lot of plain JS stuff!
Oh you need solid js understanding
or js enlightment
Go read the good parts
Alternatively the javascript garden & eloquent javascript are solid free resources
The MDN learn js section is also of value.
Val
Val
12:52
I really like what he has done, and it has alot of potential, it just they should grab us if that makes sense, no one has time to learn something from scratch and
node.js is more low level and doesn't hold your hand. If you want hand holding go look at rails
@Val no I disagree
the people that dont make the time are going to fuck up anyway
They aren't welcome.
Ok that's harsh.
Val
Val
only if php thought like this lol :)
php is a language and doesn't think
in JavaScript, 2 days ago, by Ivo Wetzel
> "[...] you don't want people that aren't really programmers programming, you'll suffer for it! - John Carmack
and if you are using all those php frameworks.. well somebody wrote them
Val
Val
12:54
thats my point
If you want some help with node. use express
I recommend that.
php i 16 years old tho!
Follow the nodetuts series. It should be basic enough
yeah is pretty good
my only problem is that because all the mysql calls are synchronous, when I query the db it stops all other connections
(or when I do any expensive operation)
any idea what should I look for?
...
the mysql code should be async
node-mysql is async right?
I use couch
13:00
mhhh If I do a SLEEP for example, it stops me all other request (even though they should just return nothing)
but I'm sure is me missing some steps
Yes but thats why you never sleep
All my database code is asynchronous
what would be an example of a query to the database on a app.get (in express)
gist: 1149017, 2011-08-16 13:01:45Z
"create": function _create(data, cb) {
    data._id = uuid();

    request({
        "uri": this._base_url + "/" + data._id,
        "json": data,
        "method": "PUT"
    }, this._error(cb));
},
13:02
wonderful, I'll play with this today
thanks!
gist: 1149020, 2011-08-16 13:02:37Z
// create new post
app.post("/blog", function _create(req, res) {
    var post = {
        "content": req.body.content,
        "title": req.body.title,
        "datetime": Date.now(),
        "type": "post"
    }

    model.get(function _get(err, rows) {
        // get highest id and make the new id one higher.
        var id = rows.map(function _pluckId(v) {
            return v.value.id;
        }).reduce(function _findMaxId(prev, curr) {
            return prev < curr ? curr : prev;
        }, 0);

        post.id = ++id;

        model.create(post, function _save() {
            res.redirect("blog/" + view.url(post));
        });
    });
});
So the application handles a POST request to blog to create a new post
It takes the data out of the req.body and create a post object.
It then gets all existing posts and finds the highest current id
It creates a new id one higher (ids need to be unique) and then calls create with that data
mhh you are using a model module there
Once the create succeeds it redirects to blog/id
maybe that's what I need to do
Yes model.create is that create function above
create simply sets a uuid to ._id because couch needs a unique _id
13:04
yep yep gotit
then sends a HTTP PUT request to couchdb for raynos/uuid and puts a new document (which is the post) in the database with the json data
I will try later on thanks :)
model is just an object I wrote myself, I'm only using express and a hand written micro framework
so you basically wrote a blog engine, cool!
Well it's not done yet
13:08
Still is a good start
I am barely taking stuff out from the terminal :D
Anyone should be able to create a blog engine in a few days
Thats what being a web developer means
I've been working on it for 10 days or so
I'm not a web developer, I'm a UX Architect, far from me claiming to be a developer just because I can hack wordpress
Ah
Well then your in a different position
you need to become a developer to grog node ;)
well I'm getting there slowly
I'm also kinda of a perfectionist and I want to do the things the right way even if I don't need it
13:26
@Davide perfectionism is the enemy of completion
Oh I do that too
I have had big problems with that
Ive been doing node for a year or so
and by "doing" I mean reading about it
Also claiming to be knowledgable by having almost 500 upvotes on
whenver I finally clear my "have to watch" list, the stuff shows up
14:23
I may or may not be here today. I am having a bit of an existential debate with my self.
ok
try not to die
I should think I won't die so much as just cease to be.
topic of this room should now change to: 2B || !2B
short circuit pre-programming proves that collapses. Compiler optimizes the case to true, discards the else branch
 
1 hour later…
16:03
@yojimbo87 do you have any example code of interaction with the _users database?
 
1 hour later…
17:29
nope
 
1 hour later…
19:09
are you guys on geeklist?
Don't even know what that is
 
3 hours later…
22:19
Yes
im on geeklist
Mother of god node-inspector

« first day (145 days earlier)      last day (2619 days later) »