Camelia, the Perl 6 bug

IRC log for #mojo, 2013-03-18

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

All times shown according to UTC.

Time Nick Message
00:00 jberger ok I think my vote is for VOLCANO or FIREWORKS with a dark-horse candidate FACE SCREAMING IN FEAR
00:00 jberger time for corned beef, that was gun
00:00 jberger fun
00:00 jberger hahaha
00:15 xaka joined #mojo
00:18 basic6 joined #mojo
00:23 MeierM joined #mojo
00:35 shmuel joined #mojo
00:36 marty joined #mojo
00:55 * sri likes FIREWORKS
01:06 ka2u joined #mojo
01:18 ka2u joined #mojo
01:24 egopro joined #mojo
01:30 hlin joined #mojo
01:34 egopro joined #mojo
01:53 duncanthrax joined #mojo
01:56 d4rkie joined #mojo
02:00 duncanthrax joined #mojo
02:23 marty joined #mojo
02:45 zacts joined #mojo
02:46 zacts lo
02:57 marty joined #mojo
03:04 sri monotonic clock support is now a planned feature https://github.com/kraih/mojo/pull/469
03:05 sri o/
03:42 sh4 joined #mojo
04:19 marty joined #mojo
04:42 preflex_ joined #mojo
05:06 ka2u joined #mojo
05:48 basiliscos joined #mojo
06:02 duncanthrax joined #mojo
06:11 human39 joined #mojo
06:33 coff joined #mojo
06:34 yakudza joined #mojo
07:00 Vandal joined #mojo
07:01 bpmedley joined #mojo
07:03 Fremean joined #mojo
07:27 dpetrov_ joined #mojo
07:27 Admin joined #mojo
07:56 arthas joined #mojo
08:02 Kulag joined #mojo
08:08 dod joined #mojo
08:35 dod joined #mojo
08:37 suy joined #mojo
08:41 marcus IF YOU LIKED IT THEN YOU SHOULD HAVE PUT A BENZENE RING ON IT / OH OH OH OH OH OH
08:52 plu :)
08:56 crab ...what?
08:58 coff marcus: Been sniffing glue lately? :)
08:59 coff ..or eating it?
09:03 maxhq joined #mojo
09:05 crab i suppose glue contains some benzene rings
09:09 maxhq joined #mojo
09:11 hrupp joined #mojo
09:16 fhelmber_ joined #mojo
09:26 wk joined #mojo
09:56 Averna joined #mojo
09:58 jpn joined #mojo
10:04 nelio joined #mojo
10:22 perlite joined #mojo
10:38 Britzel_ joined #mojo
11:03 bowtie joined #mojo
11:03 mire joined #mojo
11:19 malikai async::dbi seems to work pretty good.. nice interface at least.. haven't tried out anyevent::pg yet but that one looks just like salva's other node.js pg driver (which is awesome)
11:20 malikai s/async::dbi/anyevent::dbi/
11:46 rhaen joined #mojo
11:47 d4rkie joined #mojo
11:59 moltar joined #mojo
12:08 Admin_ joined #mojo
12:19 ver joined #mojo
12:26 caleb joined #mojo
12:26 caleb left #mojo
12:34 SmokeMachine joined #mojo
12:38 Fremean pondering trying to get multiple threads and sqlite working
12:44 mire joined #mojo
12:56 Kulag joined #mojo
13:04 vervain joined #mojo
13:05 lucs Um, I tried commenting out a block of lines in a template by prefixing each line with "%# ", but some of the block's code appears to be leaking through (the block contains  <%  stuff).
13:05 lucs Is there an easy, clean way to comment out a block?
13:26 bluescreen joined #mojo
13:29 SmokeMachine joined #mojo
13:36 gryphon joined #mojo
13:49 arthas_ joined #mojo
13:53 shmuel joined #mojo
13:55 marty lucs:  You are commenting correctly.  If blocks are "leaking through" it probably means you using blocks incorrectly.  My guess is that you are not terminating one block before beginning another.
13:56 lucs Hmm... Strange. I believe that the commented out stuff stands on its own.
13:57 btyler joined #mojo
14:03 sri lucs: mojo version?
14:04 amirite_ joined #mojo
14:06 lucs sri: 3.85
14:06 sri always try the latest version first
14:06 lucs Makes sense.
14:06 lucs I'm using that version to match the customer's installed one.
14:06 sri ironically it's been fixed in 3.86
14:07 lucs Aha :)
14:07 lucs Thanks.
14:08 dod joined #mojo
14:08 marty sorry, lucs.  I did not think any changes had been made to rendering in quite a while.   Guess I missed that.   :O
14:09 lucs marty: Hey, no problem.
14:11 marty wow, ironically I am running 3.85 also.   think I'll upgrade...
14:14 mire joined #mojo
14:15 sh4 joined #mojo
14:28 sri there have been quite a few bugs fixed since then ;) https://github.com/kraih/mojo/blob/master/Changes
14:58 newbie joined #mojo
15:15 dod joined #mojo
15:18 Molaf__ joined #mojo
15:45 mire joined #mojo
16:04 xaka joined #mojo
16:07 btyler joined #mojo
16:09 nelio_ joined #mojo
16:12 gtodd joined #mojo
16:13 yakudza joined #mojo
16:19 gtodd I'm trying to make a RESTful web application for "browsing" data by keys (much like archikey.com)  - have been experimenting with various combinations of mojolicious couch ... redis ... anyone else doing anything similar?
16:21 gtodd I've been told I can practially do everything I want with javascript and couch but ... I don't know that I want to do that much writing of javascript
16:29 basiliscos joined #mojo
16:32 nelio joined #mojo
16:37 malikai if a useragent websocket client can get an open tcp socket to the server, but then onerrors "Event "timeout" failed: Can't locate object method "send" via package "Mojo::Transaction::HTTP"", it means that the websocket upgrade failed or the host is accepting connections but not doing anything, correct?
16:40 malikai gtodd, javascript is nice because you can do both client and server in the same codebase.. but also because it's fast.. node.js is very fast
16:41 malikai perl is what you use when you need very flexible tools.. mojo is bridging the gap between node.js type stuff and perl.. which gives access to perl's much greater power.. just my opinion
16:43 amirite_ joined #mojo
16:50 malikai nevermind about the earlier question.. i was using $tx->send before the $ua->on(connect
16:53 gtodd malikai: I agree.  But I'm finding I end up doing more using mojo and routing requests to redis to fetch "data" possibly because of my background (CGI, RDBMS etc) moreso than on technical merits.
16:59 gtodd malikai: in couch land for example they have the idea of "tooling" e.g. couchapp is a python tool for managing couch instances; then there's node.js "tooling" for using couch with node.couchapp.js (http://vimeo.com/26147136 is a great short video showing how this is done) ... Mojo::UserAgent is so well done that I found myself using mojo as a sort of perl "tooling" for couch
17:09 malikai redis is real nice.. i love the publish/subscribe feature
17:13 malikai i'm currently torn between redis and mongo for my data move out of sql
17:14 malikai going to have to keep config and ops stuff in sql for ever, but the data would be perfect for something like mongo
17:15 gtodd malikai:  the couchapp.org discussion of filesystem mapping http://couchapp.org/page/filesystem-mapping got me musing about a Mojolicious plugin that would deploy bits of a mojo app into couchapp design documents ... but that seemed pointless :)
17:18 gtodd malikai: SQL is the best place for certain kinds of data but yeah -- there's every reason to move away from it if it's just storing bits and pieces of your application that aren't strictly the content data
17:23 mire joined #mojo
17:30 btyler joined #mojo
17:42 wk joined #mojo
17:58 labrown joined #mojo
17:59 Britzel joined #mojo
18:03 gtodd left #mojo
18:21 gtodd joined #mojo
18:21 mire joined #mojo
18:27 amirite_ joined #mojo
18:37 malikai does anyone know under what conditions $ua->websocket invokes its callback? i have it invoking on what i think is an upgrade timeout.. do i need to check for an error before i can call ->send? it bombs with the above error..
18:38 sri it gets invoked *always*, you're responsible for checking
18:38 malikai right on..
18:39 malikai what do i need to check? i haven't been able to find it yet
18:39 malikai i have onerror defined and that's what's catching the above error
18:39 malikai but i don't check $tx or $ua
18:49 good_news_everyone joined #mojo
18:49 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/xmdmaA
18:49 good_news_everyone mojo/master 0030257 Sebastian Riedel: mention how to detect a failed WebSocket handshake
18:49 good_news_everyone left #mojo
18:50 malikai awesome, thanks sri
18:51 sri that API is not used much directly, so it's still a little rough around the edges
18:52 sri most people just use it through Test::Mojo, which is friendlier
18:58 coff I'm not claiming to be a gifted developer, but I cringe looking at the source for ZenCart.
18:59 coff It looks like something someone wrote while being raped, wishing the world would burn around them.
18:59 good_news_everyone joined #mojo
18:59 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/HK-VLA
18:59 good_news_everyone mojo/master aaef945 Sebastian Riedel: documentation tweaks
18:59 good_news_everyone left #mojo
19:04 SmokeMachine joined #mojo
19:05 malikai sri i'm going to give it a good using.. mojo is perfect for json messaging
19:21 good_news_everyone joined #mojo
19:21 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/hnK2yg
19:21 good_news_everyone mojo/master a1d870b Sebastian Riedel: better WebSocket example for Mojo::UserAgent
19:21 good_news_everyone left #mojo
19:21 sri not entirely sure about the JSON example yet, but it should be a step in the right direction
19:22 sri http://mojolicio.us/perldo​c/Mojo/UserAgent#SYNOPSIS
19:22 sri maybe too much for a synopsis example that last one
19:27 newbie joined #mojo
19:31 malikai i think it looks good
19:38 jpn joined #mojo
19:40 mire joined #mojo
19:41 lammel2 joined #mojo
19:53 gryphon joined #mojo
19:57 BeDa joined #mojo
20:05 jberger_ joined #mojo
20:06 jberger_ sri: here is a proposal for 4.0: "content generators" for $ws->send
20:07 jberger_ change the send interface to require a key like "text" "message" "binary" to which we could add "json"
20:08 jberger_ essentially I think this means deprecating $ws->send("string") require instread $ws->send(text => "string")
20:08 jberger_ but then it gets less messy to do say $ws->send( json => { ... } )
20:08 jberger_ and make it pluggable the same way that build_tx is
20:09 sri jberger_: different layers, don't think it could work
20:10 wk joined #mojo
20:10 jberger_ ok, so not pluggable, how about the rest of the idea?
20:11 jberger_ another reason is that I think that message should not be the default
20:11 sri can't really comment as long as there is so much information missing
20:12 * jberger_ wishes he had more time before the 4.0 release
20:12 sri you have more time before the 5.0 release ;)
20:13 jberger_ sadly if I have to choose between a good thesis and better websocket api, I think I know which way I have to choose right now
20:13 sri anyway, if it can be deprecated it doesn't require a major release
20:13 jberger_ I'm proposing deprecating $ws->send("string") or changing the default to the "text" handler rather than "message"
20:13 sri $ws->send(json => { ... }) makes no sense to me for example
20:14 sri what does it generate, a text or binary message?
20:14 jberger_ text
20:14 sri why?
20:14 jberger_ because json is a text protocol if nothing else, yes its a rather arbitrary choice
20:14 sri best practices have not been established yet, we don't know how JSON will be sent in the real world
20:14 sri ohohoh
20:15 jberger_ I just find myself writing $ws->send({ text => j({ ... }) }) so often
20:15 sri json is *not* a text format
20:15 sri JSON is always binary
20:16 jberger_ true I guess
20:16 jberger_ but the websocket text expects utf8
20:16 jberger_ text opcode
20:16 sri UTF-8, UTF-16LE/BE, UTF-32LE/BE are all valid JSON encodings
20:16 * jberger_ looks at websocket spec
20:17 sri websocket text messages need to be utf-8
20:17 jberger_ right
20:17 jberger_ ok, I guess I see your point
20:18 sri as long as no best practices have been established i'm very -1 on breaking changes
20:19 jberger_ so far the "best practices" on sending json over websocket for mojo has been pretty clearly stated as my earlier example
20:19 jberger_ otherwise your unicode characters break
20:19 sri and as you discovered, mixing binary and text messages can be used for protocol design
20:19 jberger_ yes, I don't want to kill that
20:19 sri jberger_: please elaborate
20:19 sri "otherwise your unicode characters break"
20:19 nelio joined #mojo
20:19 jberger_ I think new users should (a) be encouraged to use the { text => "" } construction
20:20 jberger_ rather than defaulting to the "message" send type
20:20 sri we mostly do that in examples now
20:20 newbie41 joined #mojo
20:20 jberger_ and (b) having a "pseudo-opcode" json that uses the text opcode and converts the json feels nice and mojo-y to me
20:21 sri however
20:21 sri send('lalala') is a good default imo
20:21 sri it sends a text message and encodes the characters for you
20:22 sri maybe JSON via websockets will be the one true way, we don't know that yet though
20:22 jberger_ oh, and I didn't want to do that for json because it is encoded again in that case
20:22 jberger_ ok, maybe I'm (as usual) losing the forest for the trees
20:23 sri then you end up with ->send(encode 'UTF-8', 'lalala') for simple message passing examples
20:23 sri perhaps we are discussing this way too early
20:24 jberger_ I was proposing using the an explicit key "message" to get that behavior
20:24 jberger_ yeah, I agree
20:24 * sri should just step back and let you think it through first
20:24 jberger_ I thought I had :-) but you point out the flaw in my thinking
20:25 jberger_ malikai's earlier comment brought it to the front of my mind, and the thought that 4.0 was coming made me think it was worth mentioning
20:25 sri i should let you reach the "start hacking" stage more often again :)
20:25 * jberger_ could probably hack out what I'm thinking in just a few minutes
20:25 sri oh, another problem
20:26 * jberger_ doesn't get to "just hack" much this month :-(
20:26 sri serializing outgoing messages is a lot easier than deserializing incoming ones
20:26 sri but we want both sides to be pelasant
20:27 sri like ->send({text => ...}) and ->on(text => sub {...})
20:27 malikai the easiest way in my mind is just ->send(hashref) :)
20:27 jberger_ yeah, thats a better argument, a nice receive symmetry would be good
20:27 sri malikai: already taken
20:27 jberger_ malikai, can't
20:27 suy joined #mojo
20:27 sri you also have the message type problem again
20:28 sri i'm certain binary and text will be used, even if one becomes the standard
20:28 sri so we need to support both anyway somehow
20:28 malikai binary is best, imo..
20:28 sri lol!
20:28 sri jberger_: see!
20:28 jberger_ :-)
20:29 jberger_ malikai, I'm curious why you say that?
20:30 * sri actually doesn't know much about binary buffers in javascript yet
20:32 malikai binary is easier on proxies if you're not ssl and you can manage encoding, iirc
20:32 btyler joined #mojo
20:33 malikai i hear it's also faster, but i haven't seen it compared..
20:34 jberger_ binary file sending seem to work fine for GalileoSend
20:34 jberger_ malikai, can't say I've thought too much about affect of websocket on proxies
20:34 jberger_ wouldn't the frame just get passed though?
20:35 malikai it gets pretty bad at some large corporates..
20:36 malikai it's not the effect of the socket on the proxy, it's the effect of the proxy on the socket
20:38 malikai but that should go away over time
20:39 lukep joined #mojo
20:43 rem_lex| joined #mojo
20:47 jberger_ sri: you're right, there is no good way to say "expect json response" that I can think of
20:48 jberger_ not one that isn't just a wish and a prayer
20:48 jberger_ ok I'm gonna take this one back to the drawing board
20:53 nelio joined #mojo
21:01 basiliscos1 joined #mojo
21:10 bluescreen joined #mojo
21:14 nicomen joined #mojo
21:19 bluescreen joined #mojo
21:34 bluescreen joined #mojo
21:58 btyler joined #mojo
22:14 ka2u joined #mojo
22:39 jpn joined #mojo
22:47 Gedge joined #mojo
22:56 Meiermann joined #mojo
23:02 jberger joined #mojo
23:16 amirite_ joined #mojo
23:19 btyler joined #mojo
23:25 human39 joined #mojo
23:30 riche joined #mojo
23:44 jmmills joined #mojo
23:44 ka2u joined #mojo
23:51 gtodd hmm a running mojo app could be an auto html5 duct tape  generator :)
23:51 gtodd http://www.publish5.com/
23:52 gtodd what should one bear in mind when writing a Mojolicious::Command::deploy::whatever command
23:53 gtodd are generic things like Mojolicious::Command:: deploy:: scp | svn | git
23:55 gtodd useful?
23:55 gtodd or are those things that the user should handle on their own with Command:: deploy::<whatever> focusing on cloud services etc.
23:55 riche for non critical systems maybe
23:56 riche i know none of my customers would ever consider that
23:57 sri pretty sure it's meant for cloud services
23:58 riche sri: so you mean cloud disregards itil?  great, another way to create process variance...
23:58 sri wat?
23:59 gtodd riche: ha
23:59 riche yah unfortunately thats the answer from too many people
23:59 riche no wonder operations folks get older faster
23:59 gtodd hard to follow documented processes (ITIL) for example

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