[Mojolicious] Re: Mojolicious application to show markdown as slides

2017-01-07 Thread mimosinnet
Thanks a lot Jan!

I have enjoyed your code, discovering I have a lot to learn ;-) It has been 
very useful seeing your use of Mojo::Path and the way you read files and 
directories. I will try this in my code. I will also try to understand the 
more idiomatic parts of your code :D

Cheers! 

El dissabte, 7 gener de 2017 15:28:55 UTC+1, Jan Henning Thorsen va 
escriure:
>
> Hi,
>
> Not sure if this is interesting, but I have a competing project for 
> rendering markdown files. Haven't gotten around to complete it...
>
> https://github.com/jhthorsen/app-mdweb
>
>
> On Tuesday, January 3, 2017 at 2:22:21 AM UTC+1, mimosinnet wrote:
>>
>> I have been working this Christmas in an application to show markdown 
>> files as slides:
>>
>>- Code in github 
>>- Slides outline 
>>- Slides 
>>
>> The markdown is stored public/md/*number_of_presentation*, and the media 
>> for the presentation in public/*number_of_presentation. *Each slide is 
>> saved in a sqlite database, and the first line of the slide is used as the 
>> slide background if it is an image. I will happily add more documentation 
>> and include suggestions if considered relevant. 
>>
>> Long story:
>> I have been using *pinpoint*  for 
>> my presentations in my work as teacher on psychology. For different reasons 
>> (lack of development, availability,...) I started to seek for alternatives, 
>> and it seems that html/css/javascript 
>>  is the 
>> way forward. Unfortunately, as I do not have any javascript/jquery/ajax 
>> skills, I have used my limited Perl knowledge to build something with 
>> Mojolicious. I have spend this Christmas having fun (an addiction) with web 
>> development ;-). I hope this can be useful for other Mojolicious beginners. 
>>
>> Cheers! 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: [RFC] Mojo::File

2017-01-07 Thread sri
Putting it up for a vote, everybody is welcome to participate.

https://github.com/kraih/mojo/pull/1028

--
sebastian

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


Re: [Mojolicious] Re: [RFC] Mojo::File

2017-01-07 Thread Stefan Adams
On Sat, Jan 7, 2017 at 12:41 PM, sri  wrote:

> Even though i'm still not sure if it should be added to Mojolicious.


Well I think it's fantastic and I know I'll use it all the time!

I certainly cannot speak to the impact it will have on Mojo core.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: [RFC] Mojo::File

2017-01-07 Thread sri

>
> I know, there's no documentation, so it might be a bit hard to judge.
>

There is now also some documentation.


https://github.com/kraih/mojo/commit/e25c05814a80aad838c60a4a5f4d4d7474c3cffb

Even though i'm still not sure if it should be added to Mojolicious.

--
sebastian 

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Mojolicious application to show markdown as slides

2017-01-07 Thread Jan Henning Thorsen
Hi,

Not sure if this is interesting, but I have a competing project for 
rendering markdown files. Haven't gotten around to complete it...

https://github.com/jhthorsen/app-mdweb


On Tuesday, January 3, 2017 at 2:22:21 AM UTC+1, mimosinnet wrote:
>
> I have been working this Christmas in an application to show markdown 
> files as slides:
>
>- Code in github 
>- Slides outline 
>- Slides 
>
> The markdown is stored public/md/*number_of_presentation*, and the media 
> for the presentation in public/*number_of_presentation. *Each slide is 
> saved in a sqlite database, and the first line of the slide is used as the 
> slide background if it is an image. I will happily add more documentation 
> and include suggestions if considered relevant. 
>
> Long story:
> I have been using *pinpoint*  for 
> my presentations in my work as teacher on psychology. For different reasons 
> (lack of development, availability,...) I started to seek for alternatives, 
> and it seems that html/css/javascript 
>  is the 
> way forward. Unfortunately, as I do not have any javascript/jquery/ajax 
> skills, I have used my limited Perl knowledge to build something with 
> Mojolicious. I have spend this Christmas having fun (an addiction) with web 
> development ;-). I hope this can be useful for other Mojolicious beginners. 
>
> Cheers! 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Mojo performance

2017-01-07 Thread 'Andrey Khozov' via Mojolicious
Hello there,

I noticed with strace that a simple Hello World mojo lite app (perl -Ilib/
-Mojo -E 'a("/" => {text => "test\n"})->start' daemon) has one of the most
common syscall is gettimeofday.

% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 39.950.000614   0  5610   write
 22.120.000340   0 11238   gettimeofday
 15.350.000236   0 22720   clock_gettime
  5.920.91   0 11220   epoll_wait
  5.660.87   0  5666   read
  5.530.85   0 11220   epoll_ctl
  5.470.84   0 11220   getsockname
  0.000.00   056   close
  0.000.00   0   112   112 lseek
  0.000.00   0   112   112 ioctl
  0.000.00   0   11256 accept
  0.000.00   056   getpeername
  0.000.00   056   setsockopt
  0.000.00   0   168   fcntl
-- --- --- - - 
100.000.001537 79566   280 total
​

These calls are used here:
https://github.com/kraih/mojo/blob/bbc6e0c21480d2594f518e85ad331bfa795eb430/lib/Mojolicious.pm#L119
and
https://github.com/kraih/mojo/blob/bbc6e0c21480d2594f518e85ad331bfa795eb430/lib/Mojolicious/Controller.pm#L207.
And
they are needed only in the debug mode, but used even in production mode,
where log level is info and above.

Without this extra Time::HiRes::gettimeofday calls performance of this app
can be increased to 10% (from 1100rps to 1230rps on my laptop).

I can't create a PR because a simple check for $log->is_level('debug')
breaks the tests t/mojolicious/app.t and other, where app->log->level is
debug, but $log->is_level('debug') return false. (I think this is due
HARNESS_IS_VERBOSE environment variable)

So if anyone can help with PR it would be nice.

-- 
Andrey Khozov

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.