Camelia, the Perl 6 bug

IRC log for #mojo, 2013-09-19

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

All times shown according to UTC.

Time Nick Message
00:48 zeep joined #mojo
01:03 laouji joined #mojo
01:12 zeep joined #mojo
01:12 Mad_Dud joined #mojo
01:56 d4rkie joined #mojo
01:57 d4rkie joined #mojo
02:00 duncanthrax joined #mojo
02:07 zeep joined #mojo
03:05 preflex_ joined #mojo
03:22 good_news_everyone joined #mojo
03:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/QVeiRA
03:22 good_news_everyone mojo/master 8b324fa Sebastian Riedel: fixed typo in Mojo::DOM::HTML
03:22 good_news_everyone left #mojo
03:40 * sri wonders what's the most efficient way to merge successive text elements in a structure like [[text => 'foo'], [text => 'bar'], [tag => div => ...], [text => 'baz'], [text => 'yada']]
03:41 sri to get [[text => 'foobar'], [tag => div => ...], [text => 'bazyada']]
03:43 sri perl -Mojo -E 'say r x("<p>test</p>")->at("p")->a​ppend_content("123")->tree'
03:44 sri those can happen when you modify content, and mess a bit with the text extraction algorithm
03:44 sri perl -Mojo -E 'say x("<p>test</p>")->at("p")->a​ppend_content("123")->text'
03:45 sri the space is there because we end up with two text nodes
03:45 sri perl -Mojo -E 'say x(x("<p>test</p>")->at("p")->appen​d_content("123"))->at("p")->text'
03:46 sri different outcome when we reparse
03:46 sri not sure if it's worth fixing
03:47 sri turns out teaching ->text to handle successive text nodes is really hard
04:07 crab you can't teach an old ->text new tricks?
04:36 good_news_everyone joined #mojo
04:36 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/NP9S4g
04:36 good_news_everyone mojo/master 1f82baa Sebastian Riedel: fixed smart whitespace trimming bug in Mojo::DOM
04:36 good_news_everyone left #mojo
04:36 sri crab: I CAN!
04:37 sri and the parser gets a little more efficient since text nodes don't have to be merged from the start
04:42 sri ok... challenge
04:42 sri https://github.com/kraih/mojo/commit/1f82b​aa7b48c67426e845626c73684f1b7334df7#L1R332
04:42 sri who can golf that down?!
04:50 good_news_everyone joined #mojo
04:50 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/lsYNHA
04:50 good_news_everyone mojo/master 173b21c Sebastian Riedel: more tests for smart whitespace trimming
04:50 good_news_everyone left #mojo
05:04 basic6_ joined #mojo
05:41 dod joined #mojo
05:47 dod joined #mojo
05:50 denisboyun joined #mojo
06:10 basiliscos joined #mojo
06:20 gtodd joined #mojo
06:20 yakudza joined #mojo
06:26 dotandimet joined #mojo
06:27 Vandal joined #mojo
07:07 dod joined #mojo
07:17 espent joined #mojo
07:31 hrupp joined #mojo
07:32 trone joined #mojo
07:34 dotandimet1 joined #mojo
07:34 zeep joined #mojo
07:35 zeep hi, how's it goin'
07:35 zeep is there a neat way for the mojo to abort a file upload?
07:39 batman zeep: yes. it can already do that in Mojo::Message. Look at max_message_size
07:40 batman so if you need to do custom stuff, then i would suppose you can do that in a modified version of https://metacpan.org/module/SRI/Mojoli​cious-4.39/lib/Mojolicious/Guides/Cook​book.pod#Streaming-multipart-uploads
07:42 zeep thks batman; saw that event stuff, but couldn't figure out if there were return values from those events that will "abort" a transaction... docs did not hint at any, either
07:47 batman zeep: not sure if you can stop the client from dumping data on the webserver, but you can at least signal "stop doing that to the ua" by doing $self->render(text => 'Yikes!', status => 400); # or some other status
07:48 themage joined #mojo
07:48 batman like: app->hook(before_dispatch => sub { shift->render(text => 'Yikes', status => 400) }); # this will stop any requests unless static files
07:51 zeep heh, so if we're grabbing already the content body data, i suppose that will not work
07:53 dotandimet joined #mojo
07:59 themage joined #mojo
07:59 zeep joined #mojo
07:59 trone joined #mojo
07:59 hrupp joined #mojo
07:59 espent joined #mojo
07:59 dod joined #mojo
07:59 Vandal joined #mojo
07:59 gtodd joined #mojo
07:59 preflex joined #mojo
07:59 d4rkie joined #mojo
07:59 Mad_Dud joined #mojo
07:59 laouji joined #mojo
07:59 marty joined #mojo
07:59 tianon joined #mojo
07:59 HtbaaPi joined #mojo
07:59 Adura joined #mojo
07:59 zivester joined #mojo
07:59 icjs joined #mojo
07:59 howitdo joined #mojo
07:59 jwang joined #mojo
07:59 perlite joined #mojo
07:59 alnewkirk joined #mojo
07:59 KindOne joined #mojo
07:59 bjoernfan joined #mojo
07:59 heytrav joined #mojo
07:59 __mkrull joined #mojo
07:59 Liam`` joined #mojo
07:59 marcus joined #mojo
07:59 wsri joined #mojo
07:59 drift joined #mojo
07:59 inokenty joined #mojo
07:59 hesperaux__ joined #mojo
07:59 jamesw joined #mojo
07:59 Dandre joined #mojo
07:59 Gedge joined #mojo
07:59 nicomen joined #mojo
07:59 dabudabu joined #mojo
07:59 yko joined #mojo
07:59 batman joined #mojo
07:59 omega joined #mojo
07:59 bowtie joined #mojo
07:59 tholen42 joined #mojo
07:59 mtths joined #mojo
07:59 jmmills joined #mojo
07:59 mattp joined #mojo
07:59 Jonis joined #mojo
07:59 BinGOs joined #mojo
07:59 augensalat joined #mojo
07:59 bc547_ joined #mojo
07:59 crab joined #mojo
07:59 keedi joined #mojo
07:59 plu joined #mojo
07:59 mst joined #mojo
07:59 jan joined #mojo
07:59 bzero joined #mojo
07:59 go|dfish joined #mojo
07:59 xtetsuji joined #mojo
07:59 ivan joined #mojo
07:59 cottoo joined #mojo
07:59 al joined #mojo
07:59 sjn joined #mojo
07:59 sawtooth joined #mojo
07:59 Mikey joined #mojo
07:59 d^_^b joined #mojo
07:59 cstamas joined #mojo
07:59 migo joined #mojo
07:59 dwiereng1 joined #mojo
07:59 robinsmidsrod joined #mojo
07:59 salparadise joined #mojo
07:59 Andreas joined #mojo
07:59 sri joined #mojo
07:59 bobkare joined #mojo
07:59 jzawodn joined #mojo
07:59 dec_ joined #mojo
07:59 Bender joined #mojo
07:59 phips joined #mojo
07:59 mfontani joined #mojo
07:59 Kundun joined #mojo
07:59 Zx3 joined #mojo
07:59 dr joined #mojo
07:59 garu joined #mojo
07:59 Phil21 joined #mojo
07:59 ruz joined #mojo
07:59 tardisx joined #mojo
07:59 sivoais joined #mojo
07:59 andrefs joined #mojo
07:59 avenj joined #mojo
07:59 espen joined #mojo
07:59 stephanj joined #mojo
07:59 caeles joined #mojo
07:59 mikegrb joined #mojo
07:59 allison joined #mojo
07:59 ralesk_ joined #mojo
07:59 tokuhirom joined #mojo
07:59 cosimo joined #mojo
07:59 bayashi joined #mojo
07:59 nic joined #mojo
07:59 fhelmber_ joined #mojo
08:00 rem_lex|pivo joined #mojo
08:04 batman zeep: that would probably be too late. that's why you need to read the streaming example i postet
08:04 batman that will trigger the action before -all- the content is read
08:07 zeep batman: yeah, the streaming event-based code was what i was hacking; if the FS got full my stuff simply doesn't write to disk but allows the rest of the streaming to happen. I think if i tried to render error halfway thru, I'm afraid the transaction states will just get screwed up. so wondering if there's a neat way to cancel halfway thru
08:08 batman i'm pretty sure mojo already handle full disk and other i/o errors
08:09 zeep max message causes plenty of GET / (Anonymojo) when the limit gets hit :) not sure really how harmless it is
08:10 batman i'm not talking about max_message_size. i'm just talking about "normal" i/o/filehandle/stuff errors
08:15 zeep in my case, the "normal" situation (when i'm not using the streaming), mojo feeds the chunks into asset; sometimes dies with "Out of memory" on my system which is a memory-constrained one :) so i was wondering if there was another way out
08:15 zeep it's ok, appreciate your thoughts anyway, thks batman
08:17 batman another way out? yes, there is.
08:17 batman buy more memory
08:18 zeep ah, that.
08:25 zeep joined #mojo
08:26 ver joined #mojo
08:39 bayashi joined #mojo
08:43 dotandimet joined #mojo
08:50 bowtie_ joined #mojo
08:53 mire__ joined #mojo
09:14 dpetrov_ joined #mojo
09:14 maxhq joined #mojo
09:19 dpetrov_ joined #mojo
09:51 dpetrov_ joined #mojo
10:40 mire__ joined #mojo
11:02 D4RK-PH0ENiX joined #mojo
11:04 batman oh yeah! http://grumpify.com <-- now available in app store :)
11:04 batman and i've added "powered by" to the footer :)
11:06 Adura Mojo has an app store?
11:06 batman Adura: mojo != grumpify
11:07 Adura Oh, your site has an app store...
11:08 icjs batman, is the site a demo/laugh. or is there really an app that makes cat photos grumpy.
11:08 batman no. sorry. i meant "appstore". ever heard of apple? iphone..?
11:08 batman icjs: it's live.
11:08 icjs batman, seems like a niche thats not been filled. where can i invest money into this idea?
11:09 batman haha :)
11:09 batman you can't invest. or maybe we can make a deal if you can make an android app :)
11:11 Adura Oh, Apple Store.
11:12 Adura Grumpy Cat is US-based, right?
11:12 Adura Prepare to be sued.
11:12 batman yeah. but we're not using "grumpy cat".
11:12 batman we've already been in touch with the grumpy cat lawyer :P
11:13 Adura Aw lawds.
11:13 batman what does that mean?
11:13 Adura http://grumpify.cat/ Get it, and pretend you're from Cata...lan I think it is.
11:14 batman hehe
11:15 Adura As for "Aw lawds", It's "Oh Lord", but... with ebonic undertones.
11:15 batman ok.
11:16 Adura Hmm, nyan.cat is still around.
11:16 Adura They get by with that "Pick a language" dropdown having Catalan, i guess.
11:20 icjs batman, best of luck with it. you lose cool points for not using "grumpifyc.at" tho ;P
11:20 Adura My suggestion be better.
11:20 d4rkie joined #mojo
11:21 batman icjs: the thing is that we might also have a giraffe later on. http://grumpifygiraf.fe .....? :P
11:21 Adura Then, also get or.cat
11:23 icjs batma, ok, then take a elaf out of flickr, rebrand and something generic like grumpr.net ?
11:29 batman icjs: we'll probably just make a new webpage :)
11:29 batman anyhow. thanks for the feedback. even so, i'm not going to buy .cat .at or any other domain atm
11:40 yakudza joined #mojo
11:57 n0n joined #mojo
12:18 sixBB joined #mojo
12:51 dqw2 joined #mojo
13:04 basiliscos joined #mojo
13:15 shmuel joined #mojo
13:24 judioo joined #mojo
13:25 maxhq1 joined #mojo
13:25 abhishekisnot joined #mojo
13:34 dqw joined #mojo
13:43 marcus_ joined #mojo
13:51 asarch joined #mojo
13:55 yko Yko
13:55 zeep joined #mojo
14:01 maxhq joined #mojo
14:14 sh4 joined #mojo
14:22 ryozi joined #mojo
14:22 denis_boyun joined #mojo
14:24 dqw2 joined #mojo
14:27 gryphon joined #mojo
14:32 maxhq1 joined #mojo
14:32 crab Crab
14:38 mire__ joined #mojo
14:43 sri Sri
14:47 trone is it possible to generate a Mojo::Url with empty fragment? I'm using url_for('')->fragment('') but it returns just the current page url without fragment.
14:48 crab that's exceedingly weird
14:48 sri is empty fragment valid? what use case is there for it?
14:49 trone sri: a useless placeholder to a javascript function
14:49 trone I'd like to have an "harmless" url there.
14:50 trone so <a href="#">
14:52 sri oh, my question is moot... we already support empty fragment
14:52 sri perl -Mojo -E 'say Mojo::URL->new->fragment("")'
14:55 good_news_everyone joined #mojo
14:55 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Z2j2ig
14:55 good_news_everyone mojo/master 3e89db4 Sebastian Riedel: added tests for empty fragment
14:55 good_news_everyone left #mojo
14:57 sri btw. it is valid according to the url spec
15:04 sh3 joined #mojo
15:07 trone Indeed I believe it parse url really well, but I don't understand how to provide the string: perl -Mojo -E 'say Mojo::URL->new("http://www.test.com")->fragment("")->to_string' give http://www.test.com
15:07 zackiv31 joined #mojo
15:08 maxhq joined #mojo
15:14 shmuel joined #mojo
15:14 crab don't provide an argument to ->new
15:19 trone my version 4.39 return "" by terminal.
15:20 crab report a bug ;-)
15:22 trone crab: :-) ok. I would ask here to understand if it was wanted or not.  I'll do.
15:27 crab prints a # for me though
15:28 trone crab: the perl -Mojo -E 'say Mojo::URL->new->fragment("")' onliner?
15:28 crab y
15:29 tianon trone: mojo version ?
15:29 trone oh... shit
15:29 trone tianon: 4.39
15:30 trone you are right! right!
15:31 trone here Mojo::URL manage the undef/empty fragment https://github.com/kraih/mojo/b​lob/master/lib/Mojo/URL.pm#L208
15:33 trone in dev-box I'm 3.91... sic
15:34 trone And indeed I have different code in Mojo::URL
15:34 trone sorry guys
15:34 tianon ouch, 3.91 is old :)
15:34 trone sri++ # or who fixed that code! :D
15:34 TitanOfOld joined #mojo
15:37 trone :-) https://github.com/kraih/mojo/commit/48​5fa33bdbeb60c2bdbdf30fcaf199d44b7c7240
15:44 maxhq1 joined #mojo
15:50 zeep left #mojo
15:58 maxhq joined #mojo
16:07 marty joined #mojo
16:08 basiliscos joined #mojo
16:12 maxhq1 joined #mojo
16:19 maxhq joined #mojo
16:26 KindOne joined #mojo
16:36 denis_boyun__ joined #mojo
16:36 sri https://github.com/kraih/mojo/blob​/master/lib/Mojo/DOM.pm#L332-L337
16:36 sri still looking for someone to golf that down a bit :)
16:45 dod joined #mojo
17:05 Adura I can put it all on one line.
17:13 lammel2 joined #mojo
17:22 lammel2 joined #mojo
17:23 dvinciguerra joined #mojo
17:32 * sri sets Adura on fire
17:34 tianon sri: https://twitter.com/icculus​/status/376780135996723201 :)
18:05 dotandimet joined #mojo
18:20 basiliscos joined #mojo
18:21 maxhq joined #mojo
18:37 denis_boyun joined #mojo
18:44 Mad_Dud- joined #mojo
19:51 denisboyun joined #mojo
19:56 lammel2 left #mojo
20:28 punter joined #mojo
20:29 rem_lex joined #mojo
20:29 mire__ joined #mojo
20:38 rem_lex|pivo joined #mojo
20:42 punter In a pre-forking server, is it possible that the parent process calls rand (which calls srand) and then whenever the child processes call rand thereafter, they will generate the same random numbers? (since srand has already been called once before the children were born)?
20:57 batman yes.
20:57 batman at least i think so.
20:57 batman you can fix it with Mojo::IOLoop->timer(0, sub { srand }); or something like that...
22:23 KindOne joined #mojo
22:27 maxhq joined #mojo
22:56 marty does anyone know how to suppress the set-cookie header before rending data?
23:02 howitdo joined #mojo
23:19 zivester joined #mojo
23:55 wsri marcus: getting a new iphone or sticking with android?

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