Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-03

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 sri hmm, looks like the official perl client doesn't expose millisecond precision for datetime values
00:08 sri think i'll allow full precision for now
00:09 sri requires bson_time(time * 1000) for normal epoch time though
00:14 Molaf__ joined #mojo
00:21 ka2u joined #mojo
00:26 mire joined #mojo
00:29 jberger srI: did you get a satisfactory answer for your pack 64 problem?
00:30 sri jberger: nope, i've decided to require a 64bit perl
00:30 jberger if not I see another module (admittedly non-core and XS, but perhaps the mechanism is useful?)
00:30 jberger https://metacpan.org/module/Math%3a%3aInt64
00:31 jberger are 64 bit compiles of Perl common? I'm assuming this means no 32 bit computers then right?
00:31 jberger no mongo-ing for me yet then
00:31 sri right
00:32 jberger I probably wasn't going to jump in right away anyway
00:32 sri if someone cares enough i'm sure i'll get a patch ;p
00:32 jberger and its only my one box
00:32 jberger in that case, state clearly the reason for the restriction and I'm sure someone will (submit a patch)
00:33 jberger see also: http://stackoverflow.com/questions/9715169/​efficient-pre-perl-5-10-equivalent-of-packq
00:35 sri i'm not particularly worried about support for legacy perl this time
00:35 sri might even require perl 5.16
00:42 * jberger would kinda love that, in a "screw backward compatibility" kinda way
00:43 sri that's exactly how it will be, experimental for a long time, i want to play with all the latest perl and mongodb features (hello fulltext search!)
00:44 jberger I do often feel liberated when writing Mojo-ish code, because I can without hesitation use 5.10 things like //
00:44 sri :)
00:44 jberger because you have already forced that on me, so I don't have to feel constrained by supporting that extra 12 people
00:44 sri <3 //
00:44 jberger me too
00:44 jberger and say
00:45 jberger actually say for
00:45 sri would be nice if note() had also made it into perl5
00:45 jberger what would note() be?
00:45 sri say equivalent for warn
00:45 Miked joined #mojo
00:46 jberger oh, ok
00:46 jberger hmmm, the wife is puttin on the coat
00:46 jberger gtg
00:46 jberger o/
00:46 sri \o
00:47 jzawodn joined #mojo
01:46 marty sri++ on "might even require perl 5.16"
01:46 marty all the cool things
02:13 ObseLeTe joined #mojo
02:57 komodo joined #mojo
03:15 xaka joined #mojo
03:15 ObseLeTe joined #mojo
04:11 mattastrophe joined #mojo
05:14 rem_lex|pivo joined #mojo
06:28 ComLock joined #mojo
06:46 Vandal joined #mojo
07:09 Mike-PerlRecruiter_ joined #mojo
07:43 dotan joined #mojo
08:05 dotan joined #mojo
08:08 dod joined #mojo
08:09 ObseLeTe joined #mojo
08:10 ObseLeTe joined #mojo
08:12 Miked joined #mojo
08:30 dod joined #mojo
08:51 Mike-PerlRecruiter_ joined #mojo
09:07 d4rkie joined #mojo
09:07 d4rkie joined #mojo
09:29 ObseLeTe joined #mojo
10:17 toreau joined #mojo
10:23 dpetrov_ joined #mojo
11:01 Miked joined #mojo
11:16 Molaf_ joined #mojo
11:26 mire joined #mojo
11:42 mire joined #mojo
11:52 prasad joined #mojo
11:56 ryozi joined #mojo
11:58 lukep joined #mojo
12:34 jontaylor joined #mojo
13:26 ComLock joined #mojo
13:48 ryozi joined #mojo
13:49 Britzel_ joined #mojo
14:00 mire_ joined #mojo
14:33 Vandal joined #mojo
14:43 gryphon joined #mojo
14:48 toreau left #mojo
14:49 toreau joined #mojo
14:52 mire_ joined #mojo
14:59 TristinColby joined #mojo
15:01 Miked joined #mojo
15:13 d4rkie joined #mojo
15:15 mire_ joined #mojo
15:18 toreau joined #mojo
15:18 toreau Anyone here using Mojo::DOM for scraping news sites?
15:22 sri the probability seems pretty high
15:26 toreau Would think so, but the feedback isn't that good. :)
15:29 inokenty joined #mojo
15:29 toreau Just rewrote some old code I have, which looks at news articles and extracts title, ingress, body (and potentially author(s) and publication date) into using Mojo::DOM instead of old-style HTML::Parser.
15:30 toreau 70% match rate still, and I was hoping to hear from people who has done the same type of work.
15:44 jberger toreau, I can't imagine that you should see much difference between similar implementation of such a scraper
15:45 jberger brb
15:50 toreau jberger: My point is  that 70% isn't good enough. :) I'm looking for people who has worked on the same problem and have some input.
15:51 jberger_ joined #mojo
15:52 basic6 joined #mojo
16:01 GabrielVieira joined #mojo
16:14 dabudabu joined #mojo
17:09 jberger sri: I'm going to give a talk on Mojolicious at Chicago.pm this month and I'm working up some examples
17:09 jberger I thought a fun one might be a websocket chat app
17:10 jberger but I cannot figure out how to subscribe multiple clients to the same websocket send
17:10 jberger is there a good example somewhere?
17:17 jberger I found this: http://d.hatena.ne.jp/yuki​kimoto/20100418/1271601822
17:17 jberger and yeah, I could just send to all clients, but is there something more like multiple subscribed websocket? maybe I am thinking about something that doesn't exist
17:45 sri jberger: i do not understand the question
17:46 sri websockets are just transport, if you want a message bus you use a backend like Redis
17:46 jberger here's another way to phrase it, can more than one websocket client subscribe to the same send event
17:46 jberger ok, I think that's my answer
17:47 jberger here's where I'm at right now: https://gist.github.com/4702783
17:51 sri i see an encoding bug
17:51 jberger probably
17:51 sri the text messages you receive are bytes
17:52 sri you never decode them
17:52 jberger I've done this in about 20 minutes
17:52 sri and send them as characters
17:52 jberger oh right, I want to be on the message event
17:52 jberger I'm not sending JSON over the text event in this case
17:54 jberger what are your thoughts on storing the controller objects for all the "subscribers"
17:54 sri all those "for values %$clients" would look better with a redis backend i think
17:54 jberger true, and I can mention that, but this is an introduction ( the last and largest )
17:55 jberger *(last and largest example)
17:55 sri it's a very unrealistic example, but i guess it brings the point across
17:55 sri it doesn't work with preforking servers after all
17:55 sri (since each worker has their own pool of clients)
17:56 jberger sri: would that be fixed with attribute/helper recipe?
17:56 sri no
17:56 jberger I'm not sure I care for this example
17:56 sri unfixable without a message bus backend
17:56 jberger all of that is things I can (and will mention)
17:56 sri you pretty much always want redis
17:57 sri for pubsub
17:57 jberger my question was, "what is interesting that I can do with websockets in an hour talk"
17:57 sri and scale to multiple workers and servers easily
17:57 sri a mongodb capped collection should also work as a message bus
17:58 sri maybe i'll make an example for that in the enxt few weeks :)
17:58 ka2u joined #mojo
17:59 jberger I will do echo first
17:59 jberger and probably some kind of data find
17:59 jberger this is just for the cute of it
18:00 sri would actually be a very good example for a non-blocking client, since tailable cursors suck pretty bad when used blocking :)
18:01 sri i'm actually starting to wonder if i really want a connection pool as part of the driver, it may give better performance in some cases... but most of the time you want multiple instances of the client... like for tailable cursors
18:02 * sri moves connection pools to the end of the todo list
18:29 toreau left #mojo
18:36 dpetrov_ joined #mojo
18:38 xaka joined #mojo
18:54 jberger sri: I'd be interested to see that example, btw
18:54 jberger also I think I will amend my example to have the icky bits in helpers, saying "when you do this in a better way, you can change these"
19:07 Mike-PerlRecruiter_ joined #mojo
19:08 _xaka_ joined #mojo
19:30 BeDa joined #mojo
19:43 ComLock joined #mojo
19:46 xaka joined #mojo
20:01 _xaka_ joined #mojo
20:24 marty When encoding/decoding JSON with Mojo::JSON I need to avoid converting true|false to 0|1 boolean.   Is that possible?
20:31 BeDa joined #mojo
20:40 basic6 joined #mojo
20:51 ObseLeTe joined #mojo
20:58 gryphon joined #mojo
21:12 mire_ joined #mojo
21:25 wircus marty: my $FALSE = bless \(my $false = 0), 'Mojo::JSON::_Bool';
21:26 wircus marty: https://github.com/kraih/mojo/​blob/master/t/mojo/json.t#L55
21:29 jberger you can also use \0 and \1
22:30 * sri just added support for TO_JSON and 0 1 to his BSON implementation
22:32 * sri ponders TO_BSON
22:36 * sri completely forgot to add support for stringified objects as well... and just crashed instead... oops
22:44 KindTwo joined #mojo
23:30 mattastrophe joined #mojo
23:32 * sri is very confused by mongodb errors
23:33 sri there are 3 ways error messages can be returned :S
23:33 sri $err, err and errmsg
23:39 Averna joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary