Max Cantor | 1 Mar 01:05 2012
Picon

Re: Status of Yesod Admin; Or, Suggestion for Scaffolding Based, Rails-Style CRUD

Well, one big difference with these generators vs rails is that if the generated code gets bit rotted, the
compiler will catch a lot of problems.  

another thing I really like about generators is how they are self-documenting and become very effective
cookbooks in a way. makes it very easy to promote best practices, etc etc.  

--  
Max Cantor
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Thursday, March 1, 2012 at 1:30 AM, Greg Weber wrote:

> Have you tried the admin being developed?
> We would love to see an admin brought to full fruition.
> If it is too cumbersome to create an admin and we can do something in
> Yesod core to make it easier, let us know.
>  
> Generators don't adapt to changes. A configuration approach to taming
> reflection can be difficult to learn and customize (rails_admin). I
> prefer the admins that are a middle ground: reflective but easy to
> configure and override everything going on in the controller and view.
> admin_assistant, puffer, and I think ActiveScaffold fall into that
> category.
>  
> Anything is much better than nothing though!
>  
> On Wed, Feb 29, 2012 at 2:54 PM, Max Cantor <mxcantor <at> gmail.com (mailto:mxcantor <at> gmail.com)> wrote:
> > It seems like yesod-admin is kind of dead and I'm thinking about taking the ball and running with it.
> >  
> > Rather than a instancing ToForm for models, I was thinking of taking a rails scaffolding approach with a a
(Continue reading)

Lambda | 1 Mar 03:05 2012

shakespeare-js seems to produce empty js files

I'm sorry I'm a bit fuzzy on this one, because I don't understand
enough about the workings of julius to explain the problem properly.

I have in my templates folder the files "default-layout.hamlet",
"default-layout.lucius" and "default-layout.coffee". I want them all
three in my standard base template. There is no trouble with the
hamlet or lucius file, however.

But the generated .js file included to the website remains empty. I
wrote my own widgetFile to handle .coffee automatically, cf.
https://gist.github.com/1922803

So I thought, there'd be an error in there, and I compiled the .coffee
to a .julius and used the standard widgetFile from yesod-default.
The .js file in the website remained empty.

Last, I added a line "addJulius $(juliusFile "templates/default-
layout.julius")" to the defaultLayout in the Foundation.hs. This works
and gives me the right .js file. When I then change it to "addJulius $
(coffeeFile "templates/default-layout.coffee")", the .js file empty
again, even though everything compiles fine.

Am I right with my assumption that the coffee support is plainly not
producing any output?

Piyush P Kurur | 1 Mar 05:26 2012
Picon

Re: Status of Yesod Admin; Or, Suggestion for Scaffolding Based, Rails-Style CRUD

On Thu, Mar 01, 2012 at 12:54:27AM +0200, Max Cantor wrote:
> It seems like yesod-admin is kind of dead and I'm thinking about
> taking the ball and running with it.
> 

I am updating the yesod-admin code. As before I am pausing to bring it
up to date with changes in Persistent in 0.10. Sorry it will take a
bit of time because of (1) my day job pressures (2) I am begining to
see symptoms of RSI so have to go slow.

As I said before I think the underlying class structure is okey but I
have not yet taken a crack on forms. It is really lack of ideas on my
part.

Regards

ppk

Greg Weber | 1 Mar 07:35 2012

Re: Status of Yesod Admin; Or, Suggestion for Scaffolding Based, Rails-Style CRUD

That is an interesting concept how a generator with strong-types can
help to catch bit-rotting.
Perhaps it is possible to start with yesod-admin and generate what it
is missing.
A generator could use the same technique from Yesod scaffolding, but
it might be a lot nicer to have a full hamlet syntax - I think that
could be accomplished now by escaping the beginning of every line in a
hamlet file.

Piyush, for forms we should always be able to resort to Template
Haskell if need be. I made a simple change that got rid of my wrist
pain - I stretch my fingers and wrists to relieve their tension.

On Wed, Feb 29, 2012 at 8:26 PM, Piyush P Kurur <ppk@...> wrote:
> On Thu, Mar 01, 2012 at 12:54:27AM +0200, Max Cantor wrote:
>> It seems like yesod-admin is kind of dead and I'm thinking about
>> taking the ball and running with it.
>>
>
> I am updating the yesod-admin code. As before I am pausing to bring it
> up to date with changes in Persistent in 0.10. Sorry it will take a
> bit of time because of (1) my day job pressures (2) I am begining to
> see symptoms of RSI so have to go slow.
>
> As I said before I think the underlying class structure is okey but I
> have not yet taken a crack on forms. It is really lack of ideas on my
> part.
>
> Regards
>
(Continue reading)

Greg Weber | 1 Mar 07:45 2012

Re: shakespeare-js seems to produce empty js files

I am using coffeescript in about the same way. You aren't operating on
much information here. You should start by putting a debug print in
your whenExists function if the file is not found.

The next release of yesod-default will make it a little easier to use
coffeescript.

On Wed, Feb 29, 2012 at 6:05 PM, Lambda <lambdadusk@...> wrote:
> I'm sorry I'm a bit fuzzy on this one, because I don't understand
> enough about the workings of julius to explain the problem properly.
>
> I have in my templates folder the files "default-layout.hamlet",
> "default-layout.lucius" and "default-layout.coffee". I want them all
> three in my standard base template. There is no trouble with the
> hamlet or lucius file, however.
>
> But the generated .js file included to the website remains empty. I
> wrote my own widgetFile to handle .coffee automatically, cf.
> https://gist.github.com/1922803
>
> So I thought, there'd be an error in there, and I compiled the .coffee
> to a .julius and used the standard widgetFile from yesod-default.
> The .js file in the website remained empty.
>
> Last, I added a line "addJulius $(juliusFile "templates/default-
> layout.julius")" to the defaultLayout in the Foundation.hs. This works
> and gives me the right .js file. When I then change it to "addJulius $
> (coffeeFile "templates/default-layout.coffee")", the .js file empty
> again, even though everything compiles fine.
>
(Continue reading)

Max Cantor | 1 Mar 09:39 2012
Picon

Re: Status of Yesod Admin; Or, Suggestion for Scaffolding Based, Rails-Style CRUD

Are there big changes from whats on github now? should I hold off hacking around until you make a commit?

-- 
Max Cantor
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Thursday, March 1, 2012 at 6:26 AM, Piyush P Kurur wrote:

> On Thu, Mar 01, 2012 at 12:54:27AM +0200, Max Cantor wrote:
> > It seems like yesod-admin is kind of dead and I'm thinking about
> > taking the ball and running with it.
> 
> 
> 
> I am updating the yesod-admin code. As before I am pausing to bring it
> up to date with changes in Persistent in 0.10. Sorry it will take a
> bit of time because of (1) my day job pressures (2) I am begining to
> see symptoms of RSI so have to go slow.
> 
> As I said before I think the underlying class structure is okey but I
> have not yet taken a crack on forms. It is really lack of ideas on my
> part.
> 
> Regards
> 
> ppk 

Piyush P Kurur | 1 Mar 10:23 2012
Picon

Re: Status of Yesod Admin; Or, Suggestion for Scaffolding Based, Rails-Style CRUD

On Thu, Mar 01, 2012 at 10:39:20AM +0200, Max Cantor wrote:
> Are there big changes from whats on github now?

Yes. The biggest change is the spliting of the admin site into Crud
and Selection subsites. This is because the old PersistEntity type has
been split into two PersistStore and PersistQuery where the
PersistStore supports only basic insert/delete/update patterns and the
PersistQuery supports a richer set of select operations.

There are some changes in the Access control as well. So just wait for
a commit from me.

Regards

ppk

Lambda | 1 Mar 11:01 2012

Re: shakespeare-js seems to produce empty js files

I've put a debug message in my whenExists, like this:


whenExists :: String -> String -> (FilePath -> Q Exp) -> Q Exp
whenExists x glob f = do
let fn = DU.globFile glob x
e <- qRunIO $ doesFileExist fn
qRunIO $ putStrLn $ fn ++ ": " ++ show e
if e then f fn else [|mempty|]

The output is:

templates/default-layout.hamlet: True
templates/default-layout.coffee: True
templates/default-layout.lucius: True

So the coffee file is found properly.

Am Donnerstag, 1. März 2012 07:45:33 UTC+1 schrieb Greg Weber:
I am using coffeescript in about the same way. You aren't operating on
much information here. You should start by putting a debug print in
your whenExists function if the file is not found.

The next release of yesod-default will make it a little easier to use
coffeescript.

On Wed, Feb 29, 2012 at 6:05 PM, Lambda <lambdadusk-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
> I'm sorry I'm a bit fuzzy on this one, because I don't understand
> enough about the workings of julius to explain the problem properly.
>
> I have in my templates folder the files "default-layout.hamlet",
> "default-layout.lucius" and "default-layout.coffee". I want them all
> three in my standard base template. There is no trouble with the
> hamlet or lucius file, however.
>
> But the generated .js file included to the website remains empty. I
> wrote my own widgetFile to handle .coffee automatically, cf.
> https://gist.github.com/1922803
>
> So I thought, there'd be an error in there, and I compiled the .coffee
> to a .julius and used the standard widgetFile from yesod-default.
> The .js file in the website remained empty.
>
> Last, I added a line "addJulius $(juliusFile "templates/default-
> layout.julius")" to the defaultLayout in the Foundation.hs. This works
> and gives me the right .js file. When I then change it to "addJulius $
> (coffeeFile "templates/default-layout.coffee")", the .js file empty
> again, even though everything compiles fine.
>
> Am I right with my assumption that the coffee support is plainly not
> producing any output?

Piyush P Kurur | 1 Mar 12:09 2012
Picon

Re: Status of Yesod Admin; Or, Suggestion for Scaffolding Based, Rails-Style CRUD

On Thu, Mar 01, 2012 at 02:53:56PM +0530, Piyush P Kurur wrote:
> On Thu, Mar 01, 2012 at 10:39:20AM +0200, Max Cantor wrote:
> > Are there big changes from whats on github now?
> 
> Yes. The biggest change is the spliting of the admin site into Crud
> and Selection subsites. This is because the old PersistEntity type has
> been split into two PersistStore and PersistQuery where the
> PersistStore supports only basic insert/delete/update patterns and the
> PersistQuery supports a richer set of select operations.

Sorry I meant PersistBackend has been split into two PersistStore and
PersistQuery. So depending on the YesodPersistBackend of your site it
can support only certain admin operations.

Regards

ppk

Greg Weber | 1 Mar 14:50 2012

Re: shakespeare-js seems to produce empty js files

is there any error output in the console? Do you have the coffee
binary installed?

On Thu, Mar 1, 2012 at 2:01 AM, Lambda <lambdadusk@...> wrote:
> I've put a debug message in my whenExists, like this:
>
> whenExists :: String -> String -> (FilePath -> Q Exp) -> Q Exp
> whenExists x glob f = do
> let fn = DU.globFile glob x
> e <- qRunIO $ doesFileExist fn
> qRunIO $ putStrLn $ fn ++ ": " ++ show e
> if e then f fn else [|mempty|]
>
> The output is:
>
> templates/default-layout.hamlet: True
> templates/default-layout.coffee: True
> templates/default-layout.lucius: True
>
> So the coffee file is found properly.
>
> Am Donnerstag, 1. März 2012 07:45:33 UTC+1 schrieb Greg Weber:
>>
>> I am using coffeescript in about the same way. You aren't operating on
>> much information here. You should start by putting a debug print in
>> your whenExists function if the file is not found.
>>
>> The next release of yesod-default will make it a little easier to use
>> coffeescript.
>>
>> On Wed, Feb 29, 2012 at 6:05 PM, Lambda <lambdadusk@...> wrote:
>> > I'm sorry I'm a bit fuzzy on this one, because I don't understand
>> > enough about the workings of julius to explain the problem properly.
>> >
>> > I have in my templates folder the files "default-layout.hamlet",
>> > "default-layout.lucius" and "default-layout.coffee". I want them all
>> > three in my standard base template. There is no trouble with the
>> > hamlet or lucius file, however.
>> >
>> > But the generated .js file included to the website remains empty. I
>> > wrote my own widgetFile to handle .coffee automatically, cf.
>> > https://gist.github.com/1922803
>> >
>> > So I thought, there'd be an error in there, and I compiled the .coffee
>> > to a .julius and used the standard widgetFile from yesod-default.
>> > The .js file in the website remained empty.
>> >
>> > Last, I added a line "addJulius $(juliusFile "templates/default-
>> > layout.julius")" to the defaultLayout in the Foundation.hs. This works
>> > and gives me the right .js file. When I then change it to "addJulius $
>> > (coffeeFile "templates/default-layout.coffee")", the .js file empty
>> > again, even though everything compiles fine.
>> >
>> > Am I right with my assumption that the coffee support is plainly not
>> > producing any output?


Gmane