Camelia, the Perl 6 bug

IRC log for #mojo, 2012-12-12

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

All times shown according to UTC.

Time Nick Message
00:09 noganex joined #mojo
00:11 Britzel joined #mojo
00:12 ObseLeTe joined #mojo
00:15 Molaf_ joined #mojo
00:17 rem_lex joined #mojo
00:33 egopro joined #mojo
00:58 hlin joined #mojo
01:02 laouji joined #mojo
01:14 jberger joined #mojo
01:14 Mike-PerlRecruiter_ joined #mojo
01:18 sinkovsky joined #mojo
01:34 perlite_ joined #mojo
01:35 mattastrophe joined #mojo
01:37 jberger as I said earlier I use state most often for keeping state inside map/grep instances
01:37 jberger my @unique = grep { state %seen; !$seen{$_}++ } ( 1,2,3,1,2,4 );
01:38 jberger no variable pollution outside!
01:38 jberger but the other uses are often more cool
01:39 jberger the concept of contained persistence inside a sub is really cool
01:40 jberger of course when I write modules, I target 5.8 still, but I'm REALLY close to going to 5.10 always
01:40 jberger for as much as I like state, I really want //=
01:53 d4rkie joined #mojo
02:30 sinkovsky joined #mojo
02:59 ObseLeTe joined #mojo
03:07 sri jberger: //= is fantastic, has prevented more bugs than i can count
03:08 jberger sri: agreed
03:19 sri i'd like to target 5.14 to get rid of @{} and %{}
03:23 sri who am i kidding... what i really want to target is perl6
03:32 rwstauner joined #mojo
03:43 Foxcool joined #mojo
03:43 sinkovsky joined #mojo
03:56 amirite joined #mojo
04:02 jberger I think the implicit @{} and %{} are kinda cool, but I've hit oddities with it enough that I don't use it anymore
04:03 Miked joined #mojo
04:04 jberger I personally think that if a working perl6 came out today it wouldn't catch on
04:04 jberger there are too many operators, too much syntax, too many features
04:04 jberger no one could keep all that in their head
04:05 jberger and those who would think "here is perl6, I never much liked perl5 but now 6 is here ..." will see more line noise and not less and go back to python
04:08 sri i think perl6 is much simpler than perl5
04:08 jberger have you seen all those operators?
04:09 sri i don't particularly care about operators, they are all just methods in perl6
04:09 jberger ok so the sigils dont change, people get over that pretty quick
04:09 Nom- I haven't been keeping up with Perl6 much... about 18 months ago I saw how slow and incomplete the implementations were and just dismissed it as too early in the development process.  What the state like now?
04:09 sri what matters is that references are gone and everything is an object
04:11 sri still pretty much unusable for anything serious, i think parrot is holding back rakudo now
04:11 Nom- That's unfortunate...
04:12 Nom- Although working where I do, I suspect even if it was production ready today we'd still have a hard sell to get it used ... it seems to be foreign enough that you can't just drop Perl 5 developers into it
04:13 jberger I think that one of perl5's greatest strengths is that it is a single implementation in a single underlying language
04:13 sri i think i could sell a production ready perl6
04:13 jberger all perl5 is perl5
04:13 jberger yes it makes it a beast to maintain, ask the guys who are paid by tpf to fix those aweful bugs
04:13 sri it just needs decent support for concurrency and people will give it a try
04:14 Nom- It'd be good to see some solid frameworks on Perl6 once it's ready ... I'd love to see a DataMapper or ActiveRecord with Mojo on Perl6
04:15 Nom- That's drive adoption heavily I think
04:15 sri well, perl5 language development is pretty much dead though
04:15 sri just look at the awful p5p discussion about subroutine signatures
04:15 jberger thats going to wrap up sometime
04:16 jberger the syntax is settled, CPAN settled it
04:16 jberger all the devel::declare implementations use the same syntax, now its just internal
04:16 sri muhahahahaha
04:16 sri you have no idea!
04:16 jberger put a mop in and the language has come a long way
04:16 sri look at the p5p archive
04:16 jberger yes it needs concurrancy
04:17 jberger I've seen it
04:17 sri peter martini offered to write the code
04:17 jberger it sucks
04:17 jberger (the discussion I mean)
04:17 sri he even delivered code
04:18 sri then a few jackasses derailed the discussion and he gave up
04:18 jberger itll come back
04:19 sri i very much doubt that
04:19 jberger the syntax is settled
04:19 sri the feature was planned since the 90s, so far nothing
04:20 sri the syntax is not settled
04:20 jberger the big problem was aliasing or not right
04:20 jberger should it setup @_ or not
04:20 sri aliasing, arity and whatnot
04:21 jberger it'll get done, yes slowly
04:21 sri should @_ be initialized or not, what should die, what should warn
04:21 jberger given/when scared people
04:21 sri nobody is working on it anymore
04:21 sri peter is gone
04:22 jberger the new keyword stuff helps devel::declare
04:22 sri heck, even the p5-mop folks got demotivated by the discussion
04:22 jberger its not a far leap from there to signatures in a core module
04:22 jberger I know
04:22 jberger it sucked, I watched it
04:22 jberger from afar, I want nothing to do with p5p
04:23 jberger but it'll get there either way
04:23 jberger it soaks in
04:23 jberger thats the way it works
04:25 sri the problem is that there's no dictator to end arguments
04:25 jberger true
04:25 jberger very true
04:25 sri and no process for rough concensus
04:26 sri s/c/s/
04:27 jberger still CPAN is settling some things
04:28 sri it's the same for the IO::Socket::IP discussion, it's a nobrainer that it needs to be in core, but people who don't understand the problem deadlock it with pointless discussions
04:29 jberger Moose begat Mouse which begat Any::Moose which begat Moo which unseated Mouse and Any::Moose, an eventual object system for Perl is going to look like that
04:29 jberger same for Method::Signatures
04:30 jberger CPAN comes to the consensus, but you're right, someone needs to be able to get the obvious final say in when theres an obvious final say
04:31 Nom- Biggest thing I like from Ruby that I'd love Perl to have... def something=
04:31 Nom- I'm surprised lvalue is still marked as experimental in the docs... you'd think by now they would have settled it
04:32 jberger Nom-, yeah that is odd
04:32 sri lvalue is rather awkward though
04:32 jberger but PDL uses it a lot, so theres a good test base
04:32 Nom- Yeah, it's a way to do the Ruby equivalent of `def something=(value)` though
04:33 sri well... everything that uses attributes is rather awkward
04:34 sri the fact that they are plain text really needs to be fixed
04:34 sri (and all the other quirks)
04:36 jberger brian d foy claims that the best proof that you know a language well is that you can name 5 things you hate about that language
04:36 jberger no language is perfect
04:36 jberger perl's flexibility lets us get most of it, thought it may look odd
04:37 sri i don't mind flaws, just the lack of progress is unnerving
04:38 hesperaux joined #mojo
04:38 jberger perhaps, but its not dead
04:39 jberger best unicode support of any non-new language
04:39 sri perl starts to feel a little like c when it comes to that
04:39 sri ansic4life!
04:39 jberger feature pragma allows new keywords without breaking
04:40 jberger perl is a little like c :-)
04:40 sri of course there are also very good parts, perl is still defining the regex features in other languages as well
04:41 jberger then again, you make a spec-only language like perl6, suddenly not only do you have fights over the spec, but the implementations diverge and support is patchy and extensions don't work on all implementations
04:41 jberger I kinda like that there is only one perl implementation
04:41 sri it works for ruby
04:42 jberger ruby breaks on every point release, just saying
04:42 sri it's not so bad anymore
04:44 jberger I want to like go
04:44 sri hehe
04:44 jberger but I can't get the hang of interfaces
04:44 * sri likes go a lot
04:44 jberger I like the concept, but how do I know that a certain class implements the interface
04:44 jberger the definition is on the wrong side
04:45 jberger I can introspect ISA, but not satisfies without knowing the interface first
04:46 sri i've not looked much into interfaces yet
04:47 jberger at least the last time I looked, interfaces was the only "OO" that go had
04:47 jberger does it have proper classes yet?
04:48 sri i don't see go as an oo language
04:48 jberger its not, but the thing that it has is interfaces
04:48 jberger which again is a cool concept, but something my mind doesn't fully grok
04:53 jberger anyway, its been an interesting day chatting on all things
04:53 jberger bed time
04:53 sri well, it's not really oo, you're just passing around a bunch of related functions
04:53 jberger o/
04:53 sri \o
04:55 sri imo the lack of exceptions might be worse
04:56 sinkovsky joined #mojo
05:34 asarch joined #mojo
05:40 Foxcool joined #mojo
06:09 sinkovsky joined #mojo
06:14 Miked joined #mojo
06:25 spleenjack joined #mojo
06:57 Vandal joined #mojo
07:21 sinkovsky joined #mojo
07:35 yakudza joined #mojo
08:15 judofyr joined #mojo
08:25 bpmedley joined #mojo
08:29 alnewkirk joined #mojo
08:30 suy joined #mojo
08:34 sinkovsky joined #mojo
08:39 dod joined #mojo
08:41 Foxcool joined #mojo
08:43 mire__ joined #mojo
08:44 wudofyr joined #mojo
08:45 ver joined #mojo
08:47 marcus Think I will have to learn japanese.
08:47 wudofyr joined #mojo
08:48 marcus so I can read that pocket.io on mojolicious article
08:54 wudofyr joined #mojo
08:56 dod joined #mojo
08:56 marcus forgot that heroku doesn't support web sockets, so I'm gonna need a fallback solution :-/
08:58 omega socket.io? :)
08:59 marcus omega: yes, but then I'd need pocket.io
09:00 marcus omega: am thinking I might just as well just do a simple fallback to eventsource and posting new messages
09:02 alexeiras joined #mojo
09:02 omega marcus: aha
09:03 marcus omega: judofyr points out that there might be sharp edge cases I would cut myself on tho.
09:04 zivester joined #mojo
09:04 omega which is why I prefer something like socket.io :)
09:06 wudofyr joined #mojo
09:10 wudofyr joined #mojo
09:13 dod joined #mojo
09:13 dabudabu joined #mojo
09:13 wudofyr joined #mojo
09:17 wudofyr joined #mojo
09:20 wudofyr joined #mojo
09:21 dpetrov_ joined #mojo
09:23 wudofyr joined #mojo
09:24 zivester joined #mojo
09:27 wudofyr joined #mojo
09:30 wudofyr joined #mojo
09:33 wudofyr joined #mojo
09:34 laouji joined #mojo
09:37 wudofyr joined #mojo
09:44 zivester joined #mojo
09:45 dotan joined #mojo
09:51 Averna joined #mojo
09:53 fhelmber_ joined #mojo
10:03 ObseLeTe joined #mojo
10:05 ObseLeTe joined #mojo
10:29 cosmincx joined #mojo
10:35 tempire new gist is hot
10:36 tempire also, we're all doomed: http://news.ycombinator.com/item?id=4908672
10:36 judofyr btw, Perloku is now running on Perl 5.16.2: https://github.com/judofyr/perloku
10:39 ispy_ joined #mojo
10:49 suy I tried to understand all this "cloud" offerings linked from the deployment page on the wiki, and my poor mind still aches... :)
10:59 tempire suy: heroku is all you need
10:59 judofyr tempire: unless you want websockets
11:00 tempire suy: heroku and dotcloud are all you need
11:02 suy tempire: let's say I want to host my blog there... What about the space of the files (mostly images)? Dotcloud says they support static files, but I could not understand the pricing at all...
11:03 tempire heroku is free for small usage
11:03 tempire http://tempi.re/deploy-a-web-app-in-one-step
11:03 tempire done
11:04 tempire if you want to understand how it works, https://github.com/judofyr/perloku
11:04 suy And how much is small? :-)
11:05 tempire depends on what performance you need
11:05 tempire if it's a blog, it's unlikely you need much at all
11:08 suy tempire: after watching your talk at yapc, I registered with heroku. I will definetely try it, but I'm so old school and control freak that I don't see that kind of things that easy.
11:09 suy E.g., to install the heroku programs, I had to add a repository if I recall properly. I don't ever do that unless I really trust the people who are going to run arbitrary root commands on my computer. :)
11:16 nic suy: Do you know about "chroot jail"
11:17 nic If you have access to some flavour of *nix then they're fast and easy to set up (prob avail on mac too)
11:17 nic on Windows I guess you'd use a vm
11:17 esskar joined #mojo
11:17 esskar hello there
11:17 esskar i am back to mojo :)
11:18 nic Inside there you can install all sorts of apps and either keep them in there (wot I do) or once you're happy you can put them in your real space
11:18 suy Yes, but is a bit inconvenient. Well, actually, I've just inspected the other installation method, and it seems I can manually fetch the tarball, and inside there is a bunch of ruby that I guess I can run from my home directory... That's much better for my taste.
11:19 suy I did the same for mojolicious, btw. Just fetch the git repo, and run ./mojo/script/morbo foo.pl (or add that dir to the path).
11:20 nic eg I wouldn't install stuff via 'curl' (cpanminus, perlbrew, ...) without looking at them first and having an idea where they were going to plant themselves
11:20 suy nic: exactly :)
11:22 esskar anyone knows a plugin to act as an oauth provider?
11:23 nic esskar: The google flavour of OAuth2?
11:24 esskar nic: would be enough, yes!
11:25 esskar vti: has one on github, but it looks not finsihed. but haven't tried it yet
11:25 nic I'm sure there's something on cpan; I was only looking at the client end though
11:26 nic (I have a module for the client end that I'll upload early next year)
11:29 esskar yes, client is there, server i did not find one for mojo. one could wrap net::oauth i guess
11:37 esskar joined #mojo
11:48 Foxcool joined #mojo
12:08 esskar joined #mojo
12:17 ladnaV joined #mojo
12:22 egopro joined #mojo
12:36 Molaf__ joined #mojo
12:38 Vandal joined #mojo
12:40 bpmedley left #mojo
13:06 memowe \o/
13:10 mire joined #mojo
13:14 Mike-PerlRecruiter_ joined #mojo
13:23 ObseLeTe joined #mojo
13:33 egopro joined #mojo
13:33 Adura joined #mojo
13:36 d4rkie joined #mojo
13:37 hesperaux joined #mojo
14:09 sri marcus: make an engine.io plugin for mojolicious :)
14:10 sri transports shouldn't be hard to port, mojolicious has primitives for everything already, no breaking out of a jail
14:10 marcus sri: engine.io is all js, how is that even feasible?
14:10 marcus sri: oh, you mean a port, not a plugin.
14:12 sri engine.io is also the new foundation for socket.io, and closer to the websocket api
14:14 sri porting should be pretty simple
14:15 sri guess all you really need are websocket and xhr/jsonp polling
14:17 inokenty joined #mojo
14:18 marcus ok, will investigate when $kids sleep()
14:21 memowe Sounds mysterious.
14:23 bluescreen joined #mojo
14:29 Vandal joined #mojo
14:30 labrown joined #mojo
14:32 ispy_ joined #mojo
15:16 Britzel_ joined #mojo
15:17 alexeiras joined #mojo
15:37 knshaum joined #mojo
15:39 mire joined #mojo
16:21 yakudza joined #mojo
16:44 b2b joined #mojo
16:47 dvinciguerra joined #mojo
16:52 noganex joined #mojo
16:57 sri interesting how the number of new github issues went down since i started ignoring them :)
16:59 nic :D
17:02 xaka joined #mojo
17:03 sri could be coincidence, but i suspect having a few open tickets discourages the more frivolous requests we usually got there
17:18 buu joined #mojo
17:19 buu Is there anyway to make Mojo::UA perform keepalive transactions?
17:20 tempire coincidence?
17:20 * tempire twirls mustache
17:21 buu tempire: I have something essentially doing: for( @array_of_100_items ) { $ua->get("$url/$_"); } and it takes a few seconds ot run, I'd like to speed it up without modifying the for loop...
17:25 buu Anyone have any brilliances?
17:26 tempire as I understand it, keep alives work by default
17:26 tempire http://mojolicio.us/perldoc/M​ojo/UserAgent#max_connections
17:26 buu Hrm.
17:26 buu I'm reusing the same object each time
17:27 buu And it's talking to the same uri with different query string each time
17:27 sri is the issue raw performance or latency?
17:30 buu sri: I'm not entirely certain, I was assuming latency, but I should note that the systems are running on the same machine..
17:30 buu On the other hand the request is extremely simple
17:30 sri if it's latency you should go non-blocking and do parallel requests
17:31 sri if it's raw performance, you might want to use some heavy xs module
17:31 buu sri: For the requests you mean?
17:32 sri perhaps nytprof your script to see if it's a bug in Mojo::UserAgent (very unlikely, but always a possibility)
17:32 sri yes i do
17:32 buu Ok, I'll keep that in mind. It's unfortunately a tiny part of a giant system.
17:32 buu I'll run some basic benchmarks and see if I can narro wit down
17:33 buu sri: But can you confirm that it should re-use the same socket for each request?
17:33 sri Mojo::UserAgent is optimized for dealing with latency (being non-blocking and all), not raw performance
17:33 sri i can confirm what tempire said
17:34 anewkirk buu, you might want to consider using a message queue
17:34 anewkirk ... then you can scale as much as you want
17:34 sri see $tx->kept_alive
17:34 anewkirk ... but also be respectful of the server you're hitting
17:34 buu anewkirk: I'm writing code that sits behind a Curses interface =[
17:34 buu And old crufty and clunky one.
17:35 sri it's rather unusual for raw performance to matter though
17:35 sri but if it's the same box, who knows
17:36 buu sri: It's mattering in the sense that I'm making 100+ requests and the interface lags
17:36 buu I'd think I should be able to eliminate any perceived lag
17:36 sri go non-blocking
17:36 anewkirk I'm not sure what curses has to do with what you're talking about?
17:36 buu And I'm trying to cheat so I can handle lazy coding processes
17:37 buu anewkirk: Building a message queue into the system would be.. hard.
17:37 anewkirk buu, it would be?
17:37 anewkirk it's really no different
17:37 anewkirk http -> transaction, request/response
17:37 buu Making 100 requests takes 12.7 seconds =[
17:37 anewkirk MQ -> transaction, request/response
17:38 anewkirk .. and there are plenty of libraries on the CPAN
17:40 sri or just use a websocket, if the server supports it
17:40 buu I control both sides, so..
17:40 sri of course that's still assuming transport is the problem... not backend latency
17:40 buu Hrm, my processing code is taking roughly 0.050921
17:41 buu Check my math please but that's around 18 requests a second?
17:41 yakudza joined #mojo
17:41 buu The rest of mojo takes: 200 OK (0.173184s, 5.774/s).
17:42 buu I'm using morbo, would this make any difference with a different server?
17:42 sri those times are without transport, so your backend is slow
17:42 buu right
17:42 sri so no user agent tuning could help you
17:43 * sri suspects slow database queries
17:43 sri might want to upgrade to redis or so if it really matters
17:44 buu sri: If I'm reading that, mojo handling takes .12 seconds, my actual handler takes .05
17:44 sri the theoretical limit for local requests is much much higher, on my little macbook air i can easily do 3000/s
17:45 mire joined #mojo
17:46 buu Huh.
17:46 buu I'm running it through a bridge but that takes 0.002
17:49 buu Ah.. there's part of it.
18:02 buu So that was a giant waste of time
18:02 buu =[
18:03 sri oh, that new html5 canvas book looks fun, anyone read it yet? http://www.amazon.com/Core-HTML5-Canva​s-Animation-Development/dp/0132761610/
18:36 b2b joined #mojo
18:47 mire joined #mojo
18:53 kongelaks joined #mojo
18:54 kongelaks hi all. is there a recommended way to manually upgrade a Mojo::Asset::Memory to a Mojo::Asset::File?
19:40 b2b joined #mojo
20:10 mire joined #mojo
20:21 Caelum any recommendations for tieing into an existing Apache::Session::MySQL ?
20:26 sinkovsky joined #mojo
20:37 Caelum or CGI::Session rather
21:23 xaka joined #mojo
21:44 bpmedley joined #mojo
21:59 sinkovsky joined #mojo
22:18 jpn joined #mojo
23:01 bpmedley left #mojo
23:16 bpmedley joined #mojo
23:21 user_2134 joined #mojo
23:21 user_2134 hello, why not move this channel to Freenode ?
23:23 kongelaks sri: i have another multipart test for you. http://pastebin.com/RHrvEbf4
23:23 kongelaks as far as i can tell, the response format is valid
23:23 jzawodn joined #mojo
23:25 kongelaks this case is multipart and chunked, like the last, however there is only 1 chunk for all of the parts in the response
23:26 sri kongelaks: if you want me to take a look please give me a test case like we have in t/mojo/response.t
23:27 sri a script generating a response is a huge waste of time for me, since i have to first check that the script actually works
23:28 sri if you can't do that please open a ticket with what you have, maybe someone else will take a look
23:28 kongelaks i can change it
23:29 kongelaks i wrote it as a script because the real response it is modeled after had 10 parts
23:35 sri https://github.com/kraih/mojo/bl​ob/master/t/mojo/response.t#L460
23:35 sri that format
23:40 sinkovsky joined #mojo
23:41 user_2134 hello, why not move this channel to Freenode ?
23:48 tempire user_2134: perl channels are on irc.perl.org
23:48 tempire it is the way of things.
23:50 buu It is a relic from the distant past! A sad story.
23:55 jpn left #mojo
23:57 sri this channel actually started on freenode :)
23:58 sri we moved it here by popular demand

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