Camelia, the Perl 6 bug

IRC log for #mojo, 2012-06-12

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

All times shown according to UTC.

Time Nick Message
00:00 kthakore you has sooo much money dontcha
00:08 JerJer joined #mojo
00:08 sri it's not that expensive
00:17 jnap joined #mojo
00:32 sri but it doesn't matter anyway, i want a macbook air
00:51 russum joined #mojo
00:53 laouji joined #mojo
01:02 JerJer joined #mojo
01:10 scott joined #mojo
01:40 tempire I don't care about the macbook air now that the pro is thinner
01:41 tempire I vote to keep json pointers for 3.0
01:41 tempire especially since I'm referencing them in the yapc talk
01:46 sri tempire: i guess that's you and marcus in favor of keeping everything
01:47 tempire json pointers are too awesome not to include
01:47 sri with me on the edge, it seems like a done deal
01:47 sri tempire: well, the spec can still change
01:47 tempire just like websockets.  changes will happen as necessary
01:48 sri websockets had the browser breakage advantage
01:48 sri hope change won't be more painful with json pointers
01:48 sri they could go all bonkers and switch / for \ :o
01:59 rem_lex|pivo joined #mojo
02:00 d4rkie joined #mojo
02:02 tempire I'm amazed that people come to yapc to learn perl
02:22 sri LEARN ALL THE THINGS
02:30 rwstauner joined #mojo
02:53 mire joined #mojo
03:20 russum1 joined #mojo
04:51 balazs joined #mojo
04:58 russum1 Hi, in order to get rid of the "mysql server has gone away" message that showed every once in a while I wrapped my db connection into a sub {} so it looks something like sub dbi { return DBIx::Custom->connect(host, username, pass, etc…); } and now when I need it I call it via &dbi->select/insert/update/etc, is that the right way to do it or is there a better way? It looks like it will create a new connection to mysq server every time it
05:08 ispyhumanfly joined #mojo
05:27 inokenty russum1: This is my solution. Works for me. http://pastebin.com/EDemE7HM
05:27 laouji joined #mojo
05:28 inokenty I use DBIx::Simple, but you can replace it with DBI or DBIx::Custom
05:30 inokenty And when you need $dbh, you can get it by typing my $dbh = $self->app->dbh;
05:56 hugh joined #mojo
05:58 rem_lex|pivo joined #mojo
06:00 russum joined #mojo
06:02 russum inokenty, thanks for sharing! I get the idea now...
06:09 fhelmber_ joined #mojo
07:15 pau4o joined #mojo
07:15 inokenty joined #mojo
07:28 Vandal joined #mojo
07:35 cosmincx joined #mojo
07:36 Foxcool joined #mojo
07:44 cosmincx joined #mojo
07:52 azawawi joined #mojo
07:53 azawawi hi
07:54 azawawi one question is  IO::Socket::SSL needed for Mojo::UserAgent HTTPS?
07:59 Foxcool joined #mojo
08:46 nic azawawi: My reading is HTTPS => TLS => IO::Socket::SSL
08:46 azawawi good
08:46 azawawi and thanks for the reply :)
08:47 nic for what it's worth :)
08:47 azawawi so why doesnt Mojo::UserAgent->new->get($https_url)->res->body; die?
08:47 azawawi when IO::Socket::SSL is not installed
08:48 nic So "perl -MIO::Socket::SSL -E'say 1'" gives a fail?
08:49 azawawi yup
08:49 azawawi it is a new perlbrew-ed perl-5.16
08:49 marcus sri: I have not heard either way.
08:49 nic I'm afraid I know v little about UserAgent, so we'll need to wait for someone who does
08:50 azawawi thx
08:50 azawawi it should croak though
08:50 azawawi or die
08:50 azawawi or at least warn :)
08:50 azawawi atm it is silent
08:50 azawawi but not deadly :)
08:50 marcus sri: have a browser for test now.
08:52 sri marcus: "morbo examples/websocket.pl"!
08:52 * azawawi takes a look again at Mojo::UserAgent docs
08:52 marcus sri: but www.websocket.org says the current iphone supports websocket
08:52 sri it did support legacy websockets forever
08:53 sri i want to know if it supports rfc 6455
08:53 marcus it works!
08:53 sri \o/
08:53 marcus tested with websocket.pl now
08:53 marcus no message on my phone, working on ios6
08:54 sri that's cool
08:54 sri websockets are finally getting stable across the board
08:56 sri pretty safe to assume it will be in snow leopard safari too
08:56 azawawi sri: Hi. http://paste.scsys.co.uk/200654 does not die when IO::Socket::SSL is not installed. Is that the correct behavior?
08:57 sri azawawi: not a bug
08:57 marcus sri: yepp
08:58 marcus sri: mountain lion even.
08:58 sri ops, of course :)
08:58 azawawi sri: but the error handler does not trigger anything...
08:59 marcus sri: there will be a safari update with support for lion as well tho
08:59 sri really wonder if apple will add SPDY
09:01 marcus magic eightball says no
09:01 marcus unless they have to
09:01 sri it would save google millions ;p
09:02 sri you won't ever "have to"
09:04 sri on the other hand, they do enable pipelining by default
09:06 diegok Hi!, I was invited to give a mojolicious talk to a ruby local group. What mojo features I shouldn't left off, what do you think I should remark?
09:07 marcus sri: most of the keynote yesterday was a FU to google
09:07 marcus sri: don't think apple is too concerned with saving them money.
09:07 sri diegok: talk to tempire!
09:07 marcus diegok: or look at his podcast :)
09:07 diegok tempire: ^^^
09:07 sri oh right, just watch his talk :D
09:08 sri live on the interwebs on thursday
09:08 sri marcus: yea, i like that
09:08 diegok well, I gave some talks to local perl groups. I was wondering if there should be something more important for ruby/ror/sinatra guys :)
09:08 sri google has a little too much influence on web standards atm
09:08 diegok but yes, I'll follow tempire on the interwebs
09:09 sri i think websockets is a very important topic
09:09 sri the way we mix them in is pretty unique
09:09 diegok sure, websockets is in with a proxy example (and then I'll show marcus plugin)
09:11 diegok s/with/and/
09:12 diegok I want to talk about the non blocking thingy a lot :)
09:14 sri sounds good
09:17 azawawi sri: i get it now... check for tx->success and print out tx->error... Though i didnt get that from the documentation though (i.e. IO::Socket::SSL)
09:33 GitHub138 joined #mojo
09:33 GitHub138 [mojo] kraih pushed 1 new commit to master: http://git.io/qT5Pig
09:33 GitHub138 [mojo/master] better exception handling examples - Sebastian Riedel
09:33 GitHub138 left #mojo
09:34 azawawi sri++
09:35 sri let me know if there's another place where it should be mentioned
09:36 azawawi sure
09:46 daxim joined #mojo
09:49 andrefs joined #mojo
09:55 GitHub32 joined #mojo
09:55 GitHub32 [mojo] kraih pushed 1 new commit to master: http://git.io/o6ppog
09:55 GitHub32 [mojo/master] small optimizations - Sebastian Riedel
09:55 GitHub32 left #mojo
10:40 pau4o joined #mojo
10:45 dominik joined #mojo
11:01 osprey joined #mojo
11:14 GitHub117 joined #mojo
11:14 GitHub117 [mojo] kraih pushed 1 new commit to master: http://git.io/7tVtqw
11:14 GitHub117 [mojo/master] simplified rearranging routes example - Sebastian Riedel
11:14 GitHub117 left #mojo
11:22 osprey left #mojo
11:42 andrefs joined #mojo
12:18 mire joined #mojo
12:22 osprey joined #mojo
12:51 inokenty Does anyone know how to render static xlsx document from non-public directory?
12:59 azawawi inokenty: like the xlsx in the lib/ folder?
13:00 inokenty Yep
13:00 inokenty Or from /tmp
13:01 azawawi give me a sec... i think i did that somewhere... :)
13:03 azawawi http://code.google.com/p/mojoliciou​s-plugin-pedro/source/browse/trunk/​lib/Mojolicious/Plugin/Pedro.pm#10        # Maybe this is what you need?
13:04 azawawi http://mojolicio.us/perldoc/Mojolicious/Gui​des/Rendering#Bundling_assets_with_plugins
13:07 inokenty No, I mean generate an xlsx file with Excel::Writer::XLSX and output it to user
13:08 azawawi so generate it and render the output...?
13:08 Psyche^ joined #mojo
13:09 inokenty Yes. With Content-Disposition: attachment
13:10 azawawi http://mojolicio.us/perldoc/Moj​olicious/Controller#render_data  ?
13:10 osprey left #mojo
13:11 Leandr joined #mojo
13:14 jnap joined #mojo
13:14 azawawi inokenty: im trying it right now :)
13:16 jnap joined #mojo
13:19 inokenty azawawi: Okay, it works
13:19 inokenty Thanks
13:20 inokenty But what about big files? 100Mb and higher?
13:22 azawawi what about them?
13:23 inokenty They will not fit in RAM I think
13:23 azawawi sure
13:24 azawawi write to temporary filehandle?
13:24 azawawi or write in chunks?
13:25 inokenty Do you have an example?
13:26 sri https://metacpan.org/module/Mo​jolicious::Plugin::RenderFile
13:26 andrefs joined #mojo
13:28 inokenty Wow, nice. Thank you sri
13:30 azawawi inokenty: btw, any particular requirement to use XLSX?
13:30 azawawi sri++
13:30 azawawi inokenty: XLSX = zipped XML files in the end.
13:31 azawawi inokenty: so generating them = more CPU power...
13:32 inokenty This is not for my own use. I'm making an app that should generate reports in xlsx format
13:33 azawawi xls will do the job...
13:33 inokenty Does it use less CPU?
13:33 azawawi i encountered the same situation last month, but XLSX generation is really slower...
13:33 inokenty Hmm
13:33 azawawi XLS = straight binary format
13:34 azawawi XLSX = zipped XML...
13:34 azawawi you can rename an XLSX as .zip and see for yourself
13:34 inokenty Yeah, I did this )
13:35 azawawi so to generate ::XLSX needs to write the XML and then zip the stream...
13:35 azawawi inherently slower in my opinion
13:35 azawawi on big datasets that is
13:36 azawawi if your generated XLSX is all about images, you wont benefit much from the compression
13:36 azawawi XLSX is smaller in size once you get lots of text-based worksheets...
13:37 inokenty I don't use images in worksheets, just text data
13:38 azawawi so basically it is size downloaded vs CPU power to generate them
13:38 azawawi choose :)
13:38 inokenty I'll compare them )
13:38 inokenty On my reports
13:39 azawawi use Benchmark;  # :)
13:42 balazs joined #mojo
13:55 tempire live on the internets!
13:55 * tempire awaits the flying machine at the airport
13:57 azawawi inokenty: http://paste.scsys.co.uk/200662
13:57 gryphon joined #mojo
13:58 azawawi inokenty: not an accurate performance benchmark but it shows that $worksheet->write on XLS is faster that XLSX
13:58 azawawi inokenty: but the XLS size is like 2-3 times bigger than XLSX
14:06 inokenty azawawi: Thanks. I will use xls )
14:07 inokenty And it opens faster than xlsx (in OpenOffice)
14:09 tempire hmm
14:09 tempire seems like sublime2 has some sensible and vim-like shortcuts
14:12 azawawi inokenty: have fun.. :)
14:13 azawawi inokenty: it will open slower because of the unzipping and the XML parsing stage...
14:16 inokenty azawawi: But the same document in ODS opens in one second
14:16 inokenty ODS is a zip archive too
14:17 azawawi what library are using for ODS generation?
14:17 inokenty Not a library. OpenOffice Calc
14:18 azawawi i meant Perl library...
14:18 inokenty I make test.ods in open office, not in perl
14:19 azawawi hmmm https://metacpan.org/module/Spreadsheet::Wright
14:19 russum joined #mojo
14:25 JiYu joined #mojo
14:27 azawawi inokenty: opencalc is optimized towards *inux, on win32 it is slower to load than MS Excel
14:27 azawawi inokenty: but the size is impressive...
14:27 azawawi inokenty: same test, 220 KB
14:28 azawawi inokenty: 220KB ODS, 1800KB XLS, 801KB XLSX
14:28 stephan48 oops
14:28 xaka joined #mojo
14:29 azawawi http://paste.scsys.co.uk/200673
14:30 azawawi inokenty: speedwise ODS worksheet perl generation is the worst...
14:33 inokenty azawawi: My customer uses Windows with MS Office 2010, so I don't need ODS for now )
14:35 azawawi inokenty: http://paste.scsys.co.uk/200677
14:51 russum joined #mojo
14:55 pointer joined #mojo
14:55 vel joined #mojo
15:21 pau4o left #mojo
15:24 burk joined #mojo
15:47 batman joined #mojo
15:52 GitHub85 joined #mojo
15:52 GitHub85 [mojo] kraih pushed 1 new commit to master: http://git.io/BuKJBA
15:52 GitHub85 [mojo/master] added support for 451 status code - Sebastian Riedel
15:52 GitHub85 left #mojo
16:05 JerJer joined #mojo
16:18 xaka joined #mojo
16:23 noganex joined #mojo
16:42 ispy_ joined #mojo
17:04 Foxcool joined #mojo
17:28 d4rkie joined #mojo
17:37 JerJer joined #mojo
18:07 asarch joined #mojo
18:28 ilbot2 joined #mojo
18:28 Topic for #mojo is now Mojolicious real-time web framework  🌊🌊🌊 http://mojolicio.us 🌊🌊🌊 http://irclog.perlgeek.de/mojo/today
18:29 batman joined #mojo
18:56 mateu joined #mojo
19:35 batman joined #mojo
19:44 dominik joined #mojo
19:48 batman joined #mojo
19:50 batman joined #mojo
20:03 BlueT_ joined #mojo
20:18 JerJer joined #mojo
20:26 JerJer whew - I finally sorted out my broken perl install issues   :/
20:27 JerJer now i have a behavior change when using hypnotoad…   I presume now each worker fires their own startup
20:48 andrefs joined #mojo
21:29 noganex joined #mojo
21:36 xaka1 joined #mojo
21:47 lukep joined #mojo
21:52 azawawi joined #mojo
22:14 asarch joined #mojo
22:33 pau4o joined #mojo
22:35 pau4o left #mojo
22:48 JerJer joined #mojo
22:48 pau4o joined #mojo
22:58 pau4o left #mojo
23:01 rwstauner joined #mojo
23:21 ispy_ joined #mojo

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