Camelia, the Perl 6 bug

IRC log for #mojo, 2012-01-22

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

All times shown according to UTC.

Time Nick Message
00:22 bvierra joined #mojo
00:22 d4rkie joined #mojo
00:22 briang joined #mojo
00:22 auggy joined #mojo
00:22 jzawodn joined #mojo
00:22 mattp joined #mojo
00:22 plu joined #mojo
00:22 marty joined #mojo
00:22 Debolaz joined #mojo
00:22 mmcleric joined #mojo
00:22 marcus joined #mojo
00:22 foomator joined #mojo
00:22 sherr joined #mojo
00:22 tty234 joined #mojo
00:22 junkpiano joined #mojo
00:22 rafl joined #mojo
00:22 janus joined #mojo
00:22 gabiruh joined #mojo
00:22 [R] joined #mojo
00:22 Quai joined #mojo
00:22 spacebat joined #mojo
00:22 kthakore joined #mojo
00:22 reyjrar joined #mojo
00:22 omega joined #mojo
00:22 mikegrb joined #mojo
00:22 diegok joined #mojo
00:22 robinsmidsrod joined #mojo
01:07 blabos joined #mojo
01:11 GabrielVieira joined #mojo
01:18 c joined #mojo
01:22 xaka joined #mojo
01:24 c I'm attempting to use "has dbh" as documented on https://github.com/kraih/mojo/wi​ki/Hypnotoad-prefork-web-server. When using this method, how can I access dbh from a model?
01:48 c joined #mojo
02:22 blabos joined #mojo
02:23 mire joined #mojo
03:38 Psyche^ joined #mojo
03:44 j3nnn1 joined #mojo
03:52 metaperl joined #mojo
05:16 Foxcool joined #mojo
06:25 ryanc joined #mojo
07:15 Vandal joined #mojo
07:16 d4rkie joined #mojo
07:31 d4rkie joined #mojo
07:43 d4rkie joined #mojo
08:24 alnewkirk joined #mojo
08:36 kaare__ joined #mojo
08:54 kaare joined #mojo
09:24 d4rkie joined #mojo
09:24 kaare_ joined #mojo
10:16 memowe Hellomojo!
10:26 kaare joined #mojo
10:42 alnewkirk could I use a bridge and response_to() different requests when the chain breaks? (instead of the standard 404)
10:53 alnewkirk i suppose a better way to phrase it would be ...
10:54 alnewkirk how can i create a "bridge" where I can control the output if the chain is broken
10:56 alnewkirk im such a douche bag
10:57 alnewkirk docs set me straight
11:00 memowe don't say that! :) You're a great person for using Mojolicious! :)
11:18 briang joined #mojo
11:46 mire joined #mojo
13:41 jnap joined #mojo
14:10 jnap joined #mojo
14:11 c joined #mojo
14:41 fibo joined #mojo
14:57 abra joined #mojo
15:21 noganex joined #mojo
15:39 GabrielVieira joined #mojo
16:03 jnap joined #mojo
16:19 batman joined #mojo
17:29 yko joined #mojo
18:03 mire joined #mojo
18:13 c joined #mojo
18:20 jnap joined #mojo
18:51 briang joined #mojo
18:58 jnap joined #mojo
19:04 Netfeed what's the best way to send a file to Mojo::JSON? File::Slurp?
19:23 GabrielVieira joined #mojo
19:38 jnap joined #mojo
19:50 batman Netfeed: your question doesn't make much sense...
19:50 batman what are you trying to do?
19:52 Netfeed i know, i'm trying to get parse a file with json-data in it, works fine with the JSONConfig plugin, but i get "Malformed JSON: Expected string while parsing object before end of data." when i try to slurp it and decode it
19:52 Netfeed nice english
19:53 batman a file? on disk?
19:53 batman you could use Mojo::Asset::File
19:54 sri don't
19:54 sri Mojo::Asset::File is *not* a general purpose module for interacting with files
19:54 batman $data = Mojo::JSON->decode( Mojo::Asset::File->new(path => "some/file.json")->slurp )
19:54 batman sri: ok
19:55 batman then i guess File::Slurp or some other module is ok
19:55 batman Netfeed: if the file i huge, then you may want to consider using JSON::XS.
19:56 batman Netfeed: have you written the file?
19:56 Netfeed i'm trying to config my Rose::DB::Object with the same config-file as mojo, and the best way i came up with was to use Mojo::JSON
19:56 briang joined #mojo
19:56 batman Netfeed: it probably is more than fast enough
19:57 Netfeed batman: it's like 10 rows and jsonlint.com validates the file
19:57 batman ok:)
19:57 Netfeed or rather, it validates the data in the file at least
19:57 batman can you pastebin the code reading the file?
19:57 Netfeed suure
19:58 Netfeed http://pastebin.com/YWaNs0XD
19:58 elb0w joined #mojo
19:58 sri umm, why do you break the json?
19:59 batman sri: what do you mean?
19:59 sri json is a binary format, not text
20:00 batman Netfeed: why do you use binmode => ":utf8" ?
20:01 Netfeed because i had no idea that json was a binary format
20:01 Netfeed thought it was text
20:02 batman Netfeed: try just slurping it in, without arguments
20:02 batman i ofte do use autodie; $bytes = do { open my $FH, '<', $file; <$FH> }; :P
20:04 batman does it work now?
20:06 Netfeed same thing, but i guess that reads the file as a string?
20:07 batman what it the same, and what reads the file as a string?
20:07 Netfeed same error
20:08 batman ok
20:08 batman can i see the json file as well?
20:08 batman you might want to replace the password :)
20:09 Netfeed http://pastebin.com/Zcsx5cBG
20:11 batman strange... works for me :/
20:12 sri he prolly still has encoding issues
20:12 batman could there be some strange invisible characters?
20:13 Netfeed i guess it's still an encoding issue yeah, i'm reading it with $bytes = do { open my $FH, '<', $file; <$FH> } now though
20:13 batman crap. forgot local $/; in that code :P
20:14 batman local $/; open my $FH, '<', $file; <$FH>
20:16 Netfeed that worked, thank you!
20:16 batman
20:16 batman np
20:16 Netfeed could give you a kiss :)
20:16 batman hehe
20:16 batman too bad i'm so far away then :P
20:16 sri Oo
20:17 Netfeed heh, norway is kinda close :)
20:17 batman oh?
20:18 Netfeed well, everything is close to the grand metropolis gothenburg :P
20:18 batman ;)
20:45 elb0w man so annoying, every job I do consulting for that I try to get to use Mojo won't just because they use rdbms
20:46 elb0w they just want apache
20:46 elb0w :x
20:57 gabriel joined #mojo
21:01 briang joined #mojo
21:18 tempire elb0w: you mean hypnotoad?
21:18 elb0w yeah sorry
21:18 elb0w sick of apache
21:18 tempire apache will eventually die
21:18 tempire but it will take 100 years
21:18 tempire what does rdbms have to do with it?
21:18 elb0w because they block
21:18 elb0w need to make a pool module
21:19 elb0w for dbi
21:19 elb0w like apache has
21:19 tempire blocking!
21:19 purl blocking is probably worse than non-blocking
21:19 elb0w I read awhile back some python guys modified mysql to be non blocking
21:20 elb0w should go dig that up and see how they did it
21:21 batman elb0w: wouldn't it be easier to make a non-blocking proxy server for mysql?
21:21 elb0w not a huge fan of mysql-proxy
21:21 elb0w if thats what you are referring to
21:21 elb0w We have a lot of memory issues with it at work
21:21 batman what about making sure all the sql statements are fast as hell, so they seem non-blocking? ;)
21:21 elb0w yeah, for me thats fine
21:21 batman :D
21:21 elb0w My boss is very set in his ways
21:22 elb0w He would probably say, "We shouldn't have that limitation"
21:22 tempire where do you work?
21:22 elb0w at a finance firm
21:22 elb0w But thats another story
21:22 elb0w he's brilliant with math and everything
21:22 tempire that's ironic, considering the choice to use blocking
21:22 elb0w but I disagree with the way he designs software
21:22 batman elb0w: which limitation? not being able to use rdbms?
21:23 elb0w batman: no if I say we just have to write all queries to be fast, he would say yes but if we need to run massive queries we shouldn't be limited. IE: Find a way to make it non-blocking and slow
21:23 elb0w he doesn't really accept that theres no way
21:23 elb0w I guess its a good thing, we often create some cool shit because of this
21:23 elb0w just frustrating
21:23 batman elb0w: that was a joke... you have no such guaranty :/
21:24 batman but blocking/non-blocking...isn't that a client issue?
21:24 elb0w batman: Well I mean the idea behind a reactor pattern is just that, things exciting and returning fast outside of the event loop right?
21:24 elb0w Yeah, well then you have to spawn a ton of workers
21:25 elb0w Its not a big deal, its just hard to get firms to swap their system and change this many things
21:25 batman but that's because of DBI.pm, not the mysql server..?
21:25 batman oh.
21:25 batman i see
21:25 elb0w batman: I don't know that
21:25 elb0w I haven't worked on DBI
21:25 batman libmysql-something evil?
21:25 elb0w I just know what I've tested and sri said, it could just be DBI maybe thats what he meant
21:25 elb0w Personally I want to swap to all memory db's
21:25 batman it could be that libmysql is blocking, so there's no way around it... don't know that though
21:26 elb0w My boss would rather write complex mysql queries than handle it in code though
21:26 batman that's a -big- move :/
21:26 elb0w so that tends to be an issue
21:26 elb0w im reverse
21:26 bvierra joined #mojo
21:26 elb0w I like to manipulate the data outside of mysql
21:26 elb0w aside from basic things
21:26 batman but that was my proxy-idea: hypnotoad -> [cache] -> some-blocking-web-server-that-talks-with-mysql -> mysql
21:27 elb0w yeah that would be cool
21:27 elb0w Web sockets will be nice
21:27 elb0w Then you can just send data to the client when its ready
21:27 elb0w and pass it off to some process
21:34 tempire marcus: suggestions for giving a presentation on yapc?
21:34 tempire things you've learned, etc
21:35 tempire @yapc, I mean
21:35 tempire elb0w: going to yapc?
21:35 purl i guess going to yapc is EU
21:35 elb0w where is it
21:35 purl it's it!
21:35 tempire the booming metropolis of madison, wisconson
21:35 elb0w rofl
21:36 elb0w doubt my boss would give me off
21:36 tempire http://blog.yapcna.org/
21:36 elb0w haha don't think thats what my girl has in mind for a vacation
21:36 elb0w shed probably kill me if I take her there
21:36 tempire they have a spouses/partners program
21:36 tempire and it's only a couple of days
21:36 tempire point being, you should go and give an intro to mojolicious talk
21:37 elb0w I don't think anyone would want to hear me talk rofl
21:37 elb0w Mojo usage is in my personal startups and as a hobby
21:37 elb0w Haven't had a chance to dive into the guys too much
21:37 elb0w other than now playing with Mojo::Base
21:37 tempire it's not about you, it's about the content
21:38 tempire and you understand everything in the mojocasts
21:38 tempire so that's enough to give an intro talk
21:38 tempire and it's good for exposure
21:38 elb0w yeah
21:38 tempire think about it
21:38 elb0w Ok, will have to see if I can get off
21:38 elb0w Im a consultant so its hard to take off
21:39 elb0w I don't get pto
21:40 elb0w heh, were hiring a perl dev
21:40 elb0w maybe I can get them to send me here and put up a job fair booth
22:53 jnap joined #mojo
23:28 c joined #mojo
23:55 wjh joined #mojo

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