Camelia, the Perl 6 bug

IRC log for #mojo, 2013-02-10

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

All times shown according to UTC.

Time Nick Message
00:04 sri and $collection->save() is also working
00:14 jberger I think I have a real-life use for the new __SUB__ token
00:14 jberger unsubscribe from an event from in the event
00:14 * sri likes __SUB__ a lot
00:15 sri also recursion without leaks
00:15 jberger but unlike ->once it may be after several
00:15 jberger exactly
00:15 jberger is that 5.16?
00:15 sri ye
00:15 * jberger ponders requiring 5.16 for Galileo
00:16 Molaf__ joined #mojo
00:16 jberger do the events belong to the transactions? meaning when the transaction is over any events go away?
00:16 sri yes, events belong to the instance
00:16 * jberger is probably prematurely optimizing
00:17 jberger so its safe to leave an event lying around
00:17 sri you can look for HEAD1 EVENTS blocks to see which classes which events belong to
00:17 sri yes it is
00:17 jberger cool
00:17 jberger thanks
00:17 sri unless you leak of course ;p
00:17 jberger right
00:17 * jberger is is sieve
00:24 jberger sri: do you know if a browser will always send JSON with a TEXT opcode?
00:24 jberger if so I can use it as a "I'm done sending file chunks"
00:24 jberger more as a sanity check, since I also will be keeping tab of file size
00:24 sri *you* decide what opcode it uses
00:24 jberger hmmmmmmmmmmm
00:25 jberger oh right, I've seen that
00:25 sri it uses binary only for binary buffers
00:25 jberger so it should do what I mean
00:28 sri i guess
00:49 moltar joined #mojo
00:54 jzawodn joined #mojo
00:55 mire joined #mojo
00:59 sri time to start adding features the official mongodb driver doesn't have :)
01:15 zivester joined #mojo
01:17 Topic for #mojo is now Mangolicious! | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
01:17 * sri just added $cursor->distinct
01:17 sri $collection->find({})->distinct('foo')
01:22 crab is there a function named scrub?
01:23 sri not that i know of
01:23 crab i don't know what it would do, but having just woken up, i feel a desire to have a function like that.
01:23 sri $collection->find({crab => 1})->scrub
01:24 crab yay
01:37 zivester joined #mojo
01:44 mire joined #mojo
01:50 zivester joined #mojo
01:50 sri interesting, parrot is dead
01:51 sri that should put some pressure on nqp-jvm
02:12 * jberger just sent a 35Mb mp3 file over websocket
02:12 jberger sri: wow, they sure better keep that 6 warm and ready and that 7 tucked away in a sealed box
02:13 * jberger is sorry
02:13 * jberger is a little bitter
02:13 * jberger remembers his recent success
02:13 * jberger moves on
02:14 jberger http://www.youtube.com/watch?v=4vuW6tQ0218
02:14 jberger LET THE MONTY PYTHON JOKES BEGIN
02:19 mattastrophe joined #mojo
02:34 sri \o/
03:07 zivester joined #mojo
03:19 jberger https://gist.github.com/jberger/4744482
03:23 sri jberger: prettu clean
03:23 sri s/u/y/
03:23 jberger I'm working on a "file is finished" signal now, rather than relying on the file size
03:23 jberger and actually I might have found some JS that can incrementally calculate an MD5
03:24 jberger so the end message could contain that to compare
03:25 jberger I can't decide if thats overkill
03:25 jberger it might depend on what it ends up looking like
04:12 zivester joined #mojo
04:24 duncanthrax2 joined #mojo
04:30 duncanthrax joined #mojo
05:08 zivester joined #mojo
05:20 tagg joined #mojo
05:20 kitt_vl joined #mojo
05:33 xaka joined #mojo
05:40 marty sri:  I think I might have one for you.   $self->mango->collection('foo')->remove({foo => 'bar'}, bson_true);
05:43 jberger night all, it was a fun day
05:43 jberger o/
05:44 jberger marty, if you haven't looked lately, check the gist again
05:44 jberger large-file uploads via websocket [check]
05:44 jberger :-)
06:58 Vandal joined #mojo
07:00 marty jberger:  thanks, I think I can use that.  :)
07:01 marty sri:  sorry, my previous message was not very descriptive.  here is what I mean to say. :)
07:02 marty ->collection('foo')->remove({foo => 'bar'}, bson_true);        That command fails with the bson_true flag
07:09 Mike-PerlRecruiter_ joined #mojo
07:34 ladnaV joined #mojo
07:42 tempire joined #mojo
08:03 vishwanathms joined #mojo
08:28 bluescreen_ joined #mojo
08:32 marty parrot is dead?
08:33 dod joined #mojo
08:50 dod joined #mojo
09:12 d4rkie joined #mojo
09:27 ObseLeTe joined #mojo
09:35 hmepas joined #mojo
09:36 ObseLeTe joined #mojo
09:39 ObseLeTe joined #mojo
09:45 ObseLeTe joined #mojo
10:20 rihegher joined #mojo
10:42 maxhq joined #mojo
10:44 dhg joined #mojo
11:01 basic6 joined #mojo
11:23 rihegher left #mojo
11:26 Leandr joined #mojo
12:30 dhg joined #mojo
13:03 KindTwo joined #mojo
13:32 mire joined #mojo
13:36 sri marty: nowhere in the documentation does it say you can just append bson_true
13:49 Britzel_ joined #mojo
14:04 dvinciguerra joined #mojo
14:38 marty sri:  http://docs.mongodb.org/manual/refe​rence/method/db.collection.remove/
14:38 sri marty: that's the javascript api documentation
14:40 marty uhhhg.  :(   sowwy.      Interesting hower, the old driver allowed it.
14:40 sri none of the other drivers allowed that
14:40 marty Or problem more correctly, ignored it and did nothing.
14:40 marty s/problem/probably/
14:40 sri if the official perl driver does it it's a reason not to support it ;p
14:40 marty \o/
14:41 sri i follow the ruby and python drivers more closely
14:43 sri the javascript api has many many special cases the real drivers don't allow, don't make assumptions based on it
14:43 marty So now i realize I was incorrect on how to limit removals to a single doc.   Is there a way to do it?
14:44 marty thanks sri.   I did'nt even realize I was on the javascipt api.  :(
14:44 sri marty: it's documented ;p
14:44 marty Not I found a juicy bug for you.  :)
14:44 * marty is checking docs
14:44 marty s/not/thought/
14:44 sri http://mojolicio.us/perldo​c/Mango/Collection#remove
14:44 marty uhhhg
14:45 sri i don't like those appended options much, but that's how all drivers do it
14:45 marty Agree, it always looked out of place to me
14:46 sri two days ago i belive you said you like it -.-
14:47 marty Not those,  I must have been talking about something else.   I'm confused easily.
14:47 marty Ahhh {single => 1}, much nicer
14:47 sri but that reminds me to revisit the remove return value
14:48 sri guess update and remove could just remove the number of affected documents
14:48 marty I don't like single booleans appended, but I don't mind things like {single => 1}
14:49 sri s/remove/return/
14:49 sri ah
14:50 sri i don't mind booleans if it" just foo(1), but not in a list of arguments
14:51 marty To me that looks better, but I'm not a good indication of what is best.  I'll just use whatever if in front of me, and probably use it the wrong way.  :)
14:52 marty s/if/is/
15:06 gryphon joined #mojo
15:10 Molaf_ joined #mojo
15:22 lammel2 joined #mojo
15:55 Miked joined #mojo
16:00 sri ok, remove and update now just return the number of documents affected
16:01 * marty will test it
16:03 sri still unsure what to return (if anything) for ->drop
16:04 sri the resulting document has a few things like number of indexes removed
16:04 marty the only thing I could think of would be boolean for success or failure
16:04 sri it dies on failure or sets $err
16:05 marty I ran into ->drop compalining.  A good thing. I tried to drop a collection that did not exists and it complained.
16:05 sri the perl driver doesn't do that i believe, but ruby and python do
16:05 * marty nods
16:05 marty I know the perl driver did not complain, not sure about the others
16:05 * sri is not even looking at the perl driver anymore... it's so bad
16:06 marty \o/
16:14 * sri didn't like $err as first argument very much, but it works pretty well
16:23 * sri is mostly out of features to add now :o
16:24 marty :(
16:24 sri just gridfs and map_reduce on my shortlist, and i'm need to learn more about both first
16:24 marty and moar features
16:24 marty Congradulations, sri.  You cranked that out fast
16:24 marty like a machine
16:25 sri after that it's basically just connection pooling and the replica set stuff (which i might not add at all)
16:25 sri \o/
16:26 marty I think mango might also expose Mojolicious to some people.
16:26 sri hard to say
16:26 marty If that meta driver takes hold, that would be a good thing.
16:27 marty It will be interesting to see what kind of plugins or helpers evolve for mango.
17:02 inokenty http://plasmon.rghost.ru/43701171/image.png
17:07 marty inokenty: \o/
17:13 * tempire sees about removing mojo.static from a plugin
17:15 sri \o/
17:16 tempire dernit
17:21 BeDa joined #mojo
17:23 moltar joined #mojo
17:34 zivester joined #mojo
17:35 azawawi joined #mojo
17:35 azawawi I like Mango
17:35 azawawi :)
17:35 azawawi Mangolicious :)
17:35 azawawi jberger: ping
17:36 zivester joined #mojo
17:36 jberger azawawi, pong
17:36 azawawi finally some competition with Farabi :)
17:37 azawawi i just read your blog post
17:37 jberger the difference between Farabi and tryperl is that it is hosted
17:38 jberger yes they provide a similar service, but for a very different end
17:38 azawawi And open source... i didnt see any source (maybe im sleepy though)
17:38 jberger I did think about adding Farabi to the blog post, I probably should
17:38 jberger since I added perltuts which I have known about for longer than a week too
17:41 azawawi i switched to websockets and it was a really difference
17:42 jberger updated
17:42 jberger azawawi, cool
17:42 azawawi http://feather.perl6.nl:4040/
17:43 * sri starts to understand map/reduce
17:43 jberger I will take another look soon
17:43 jberger azawawi, recently I've been working on websocket file uploads
17:43 * jberger <3 websockets
17:43 * jberger <3 mojolicious
17:43 azawawi hmm i forget to install deps...
17:45 * azawawi runs 'cpan-outdated | cpanm'
17:46 azawawi jberger: it would be great if you can provide me with feedback about Farabi
17:46 azawawi jberger: besides ... tryperl is dancer :)
17:46 azawawi jberger: me mojo... :)
17:46 jberger from the point of showing off perl, I don't care what framework someone uses
17:47 jberger personally I think mojo is the shiz-dizzy
17:47 azawawi actually dancer has some advantages...
17:47 jberger partly because it gives me websockets
17:47 jberger I know very little about dancer
17:47 sri azawawi: do tell
17:48 jberger agreed
17:48 azawawi like https://metacpan.org/modul​e/Dancer::Session::Simple
17:48 azawawi https://metacpan.org/module/Dancer::Session::DBI
17:48 * sri considers that a disadvantage
17:48 azawawi basically mojo is limited to 4k storage
17:49 sri if you need more than 4k you're most likely using sessions wrong
17:49 azawawi suppose i want to store a user object in the session
17:49 sri don't
17:49 azawawi will the 4k suffice?
17:49 sri user objects belong to the model layer
17:50 azawawi Java has spoiled me... :)
17:50 sri you store a unique identifier, that's it
17:51 azawawi in Java you can store whatever you want and it is really useful for view/controller object passing
17:51 sri anyway, if you really really want it you're welcome to make a plugin for it
17:52 azawawi sure
17:52 azawawi once i get Farabi polished...
17:52 azawawi i evaluated Dancer btw for Farabi
17:52 azawawi the thing that kept me back is dependencies
17:53 azawawi and websockets is not integrated
17:53 azawawi in the core
17:53 jberger I love that it has the full stack
17:53 jberger Mojo::Asset has become very useful to me in uploads
17:53 jberger and its right there for me
17:53 sri these days, not storing session data in cookies is pretty much old school
17:54 azawawi Java is old-school but it is a $$$ maker :)
17:56 * sri has built his first map_reduce test o/
17:56 azawawi http://feather.perl6.nl:4040/  # is working again... syntax check and everything
17:57 azawawi i fixed a websocket to retry connectiions also
17:57 azawawi once i get the session and db up & running. Whole sessions will be saved.
17:58 azawawi so basically  no data loss
18:00 Kulag joined #mojo
18:02 moltar joined #mojo
18:03 jberger azawawi, I can say right away that its impressively responsive
18:03 jberger almost too much so
18:04 jberger as I type 'use stric' its warning me
18:05 jberger overall though, I like it!
18:05 jberger does it still use perlito, or is it evaling?
18:05 jberger for the run output?
18:05 buu How do I make it print things?
18:06 azawawi ALT-A and Run...
18:07 jberger oh its both!
18:07 jberger very cool
18:08 azawawi sri: imagine when i tried writing farabi6, the Modern Perl 6 editor :) rakudo would kill itself every 5 or so minutes of normal usage..
18:08 azawawi jberger: once open project is complete, we could tie a project to a runtime
18:09 azawawi and ofcourse tie it to 'perl Makefile.PL && make && make test'... build process
18:09 azawawi or dzil
18:10 azawawi interesting mojo::json dump
18:10 azawawi Use of uninitialized value $_ in pattern match (m//) at /home/azawawi/perl5/perlbrew/perls/perl-​5.16.2/lib/site_perl/5.16.2/Mojo/JSON.pm line 69. Use of uninitialized value $_ in pattern match (m//) at /home/azawawi/perl5/perlbrew/perls/perl-​5.16.2/lib/site_perl/5.16.2/Mojo/JSON.pm line 73. Use of uninitialized value $_ in pattern match (m//) at /home/azawawi
18:12 stephan48 joined #mojo
18:12 sri and $collection->map_reduce works \o/ https://github.com/kraih/mango/commit/2​8d6b3e5c18391677f6c38697716e87fdfc291a2
18:12 jberger azawawi, have you considered making the actions appear more like a regular "across the top" menu bar?
18:13 marty sri++
18:13 jberger pro: more intuitive, con: no associated information like in your pop-ip
18:13 azawawi jberger: yeah it gets annoying... the pure thinking of everything is in one place... :)
18:13 jberger pop-up
18:14 jberger or else add more keyboard shortcuts, C-r for run, C-s for save etc
18:14 sri maybe i'll change the return value for map_reduce though
18:14 sri it could return a Mango::Collection instance for the result collection
18:15 sri (if one is generated)
18:15 azawawi jberger: shortcuts = different keymaps for each browser...
18:15 jberger oh, understood
18:15 jberger on another matter, the lack of a PerlWeekly issue this week is starting to get to be conspicuous
18:16 azawawi jberger: not every browser gives you control on all shortcuts... e.g. Ctrl + N
18:18 Polarn joined #mojo
18:18 jberger is there a cross-browser library for this perhaps?
18:19 rem_lex| joined #mojo
18:19 azawawi unmaintained
18:19 azawawi jquery hotkeys i think
18:19 jberger yeah, something like this would need active maintenance
18:20 buu azawawi: We need a command mode
18:20 azawawi buu: what does that do?
18:20 buu azawawi: It allows you to enter hotkey like commands without requiring ctrl or alt or similar to be held as well
18:21 * azawawi farabi server is down.. until i can figure out ulimit and secure hosting options... since it is a Perl 6 community server...
18:21 azawawi vim command line?
18:21 azawawi mode...
18:21 buu YES
18:22 buu Yay vim!
18:22 azawawi actually codemirror (the js component im using) has support for vim and emacs...
18:22 azawawi http://codemirror.net/demo/vim.html
18:23 buu Cool
18:23 azawawi I chose it just for http://codemirror.net/demo/buffers.html :)
18:30 dvinciguerra_ joined #mojo
18:30 d4rkie joined #mojo
18:33 dvinciguerra__ joined #mojo
18:34 ObseLeTe joined #mojo
18:42 dvinciguerra_ joined #mojo
18:42 HtbaaPi_ joined #mojo
18:54 * sri finally figured out the difference beterrn $err, err and errmsg o/
18:57 sri $err is a query error (prefix because a successful reply with user data can contain an "err" field), errmsg is a normal error when a command fails (with "ok" set to false), and err only happens for getLastError, since the actual command was successful ("ok" set to true)
19:00 xaka joined #mojo
19:06 Skylos joined #mojo
19:09 Mike-PerlRecruiter_ joined #mojo
19:14 jberger now with live progress bars
19:14 jberger https://gist.github.com/jberger/4744482
19:18 sri one of the advantages of knowing the length in advance :)
20:09 wikkit joined #mojo
20:34 moltar joined #mojo
20:35 lukep joined #mojo
20:57 sri ok, map_reduce now has the exact same semantics as the ruby version https://github.com/kraih/mango/commit/7bb69​78c021352181ebef4e07aad7b3361b18be1#L1R311
20:58 mire joined #mojo
21:29 sri http://www.xray.mpe.mpg.de/mailing-lis​ts/perl5-porters/2013-02/msg00418.html # signatures again
21:31 dbr joined #mojo
21:47 vervain joined #mojo
21:48 vervain joined #mojo
21:50 vervain joined #mojo
22:02 dbr joined #mojo
22:10 mattastrophe joined #mojo
22:21 mire joined #mojo
22:32 Kulag joined #mojo
22:34 * sri releases Mango 0.04
22:35 sri need to figure out a good GridFS api now
22:38 Kulag joined #mojo
22:42 mattastrophe joined #mojo
22:42 mire joined #mojo
23:11 alester joined #mojo
23:24 mire joined #mojo
23:36 ka2u joined #mojo

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