Re: [Zotonic-Dev] Using Elixir to Develop

2017-10-10 Thread Allen Wyma
I'm more than happy to help convert some pieces. I left some messages on 
gitter. I just couldn't get zotonic to run by itself. It would be great if 
there was a way I could just add them as plugs, like David was saying.

On Tuesday, October 10, 2017 at 8:21:05 PM UTC+8, da...@ddeboer.nl wrote:
>
> I have converted larger Erlang codebases to Elixir incrementally
>
>
> Jake, can you explain the rationale behind this? Why did you want to run 
> your apps in Elixir instead of Erlang?
>  
>
>> The most interesting thing is probably an example combining Zotonic with 
>> Phoenix. 
>
>
> This is something I’ve been thinking about for a while now. Going one step 
> further: what about porting Zotonic to Elixir? There are a many reasons why 
> Zotonic and Phoenix (= Photonic ;) are a great match:
>
> 1. As of yet, there’s no fully-fledged CMS available for Phoenix/Elixir. 
> Having *a stable CMS for Phoenix* will enable developers to be more 
> productive in Elixir and attract more of them to start doing Elixir in the 
> first place. There’s definitely a demand for a Phoenix CMS: as Allen and 
> others write in this thread and again others have told me.
>
> 2. This is also a great chance for Zotonic. As most web developers on the 
> Beam VM are doing Elixir, it will be much easier for them to submit 
> improvements to an Elixir CMS than an Erlang one. So by porting Zotonic to 
> Elixir we will hopefully find *more contributors*.
>
> 3. The number of Zotonic contributors is rather small for such a large 
> product. One way to solve this problem is by *reducing the scope of 
> Zotonic*. Currently it has custom logic for HTTP (Cowmachine), templates 
> (template compiler), routes (dispatch compiler) and so on. All these belong 
> to *web applications in general, not a CMS specifically*. Let’s use 
> Phoenix to take care of these. Phoenix has a (much) larger community, so it 
> can do these fundamentals better and more efficiently than we can. Worst 
> case, we would have to build something on top of what Phoenix ships with 
> out of the box, such as adding adding dynamic routing 
> . Let’s stick 
> to *what makes Zotonic unique*: its flexible datamodel, performant 
> depcache, (possibly) ErlyDTL template language. 
> (As a side-note, let’s not forget Zotonic is much older than Phoenix, and 
> Zotonic has been doing things such as real-time client/server communication 
> before Phoenix existed, let alone added Channels.)
>
> 4. Phoenix is well-designed and properly *decoupled* (Plug for HTTP, Ecto 
> for databases and Contexts for domain logic). The same cannot not always be 
> said of Zotonic. So switching over to Phoenix will result in smaller 
> Zotonic components written in higher-quality code.
>
> 5. Most web development on the Beam VM is happening in Elixir: if you need 
> authentication, JSON-LD parsing etc., there are much more likely to be 
> up-to-date, well-maintained and documented Elixir *packages available* on 
> Hex.pm than a single Erlang one. It therefore makes sense to integrate with 
> the Elixir ecosystem.
>
> Cheers,
>
> David
>
>
> Op dinsdag 3 oktober 2017 04:23:11 UTC+2 schreef Jake Morrison:
>>
>> On Mon, Oct 02, 2017 at 10:39:04AM +, Marc Worrell wrote: 
>> > 
>> > > On 2 Oct 2017, at 02:19, Jake Morrison  wrote: 
>> > > 
>> > > Marc, 
>> > > 
>> > > On Fri, Sep 29, 2017 at 09:40:07AM +, Marc Worrell wrote: 
>> > >> Can mix build rebar3 based apps? 
>> > > 
>> > > Mix is more or less a replacement for rebar3, so they are mutually 
>> > > exclusive, though largely compatible. 
>> > > 
>> > >> If so then we can just provide a mix based project. 
>> > > 
>> > > For Elixir users, the easiest thing is if Zotonic can be used 
>> > > as a library which can be pulled in by mix/rebar from https://hex.pm/, 
>>
>> > > i.e. it's a well behaved OTP application. It might make sense 
>> > > to have some mix tasks which e.g. create template modules. 
>> > 
>> > The master is being split in OTP apps, with the specific goal of 
>> > being reusable. 
>> > 
>> > Actually, there is not much left in the ‘zotonic.app’, almost 
>> everything 
>> > is moved to the other (OTP) apps. 
>> > 
>> > So I guess having a Mix (/Elixir) project that people can clone could 
>> > be a good starting point for Elixir devs. 
>>
>> The most interesting thing is probably an example combining Zotonic with 
>> Phoenix. 
>>
>> > >> I am also thinking of using the introspection (we are using that for 
>> > >> notify observers) to discover if a module, filter, action or other 
>> > >> type of Zotonic callback module is an Elixir module. 
>> > >> And if so we could generate or use some glue code to call directly 
>> > >> into the Elixir modules from Zotonic. 
>> > > 
>> > > Generally speaking, Elixir code is functionally the same as Erlang 
>> > > code, the module atoms just start with 'Elixir.', so that may not be 
>> > > necessary. 
>> > 
>> > So if an 

Re: [Zotonic-Dev] Using Elixir to Develop

2017-09-29 Thread Allen Wyma
Ganz geil! How to connect?
On Fri, Sep 29, 2017 at 4:13 PM Marc Worrell <mworr...@me.com> wrote:

> On 29 Sep 2017, at 10:11, Allen Wyma <allen.w...@gmail.com> wrote:
>
> I’m more than willing to help out in exchange for some Dutch help?
> Language 4 language exchange? :)
>
>
> LOL,  quite some people in the core team are quite proficient in Dutch.
> So that won’t be problematic :)
>
> - M
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Zotonic developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/zotonic-developers/iOOAFZ8Uq1Y/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

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


Re: [Zotonic-Dev] Using Elixir to Develop

2017-09-29 Thread Allen Wyma
I’m more than willing to help out in exchange for some Dutch help? Language
4 language exchange? :)
On Fri, Sep 29, 2017 at 4:10 PM Kai Janson <kot...@gmail.com> wrote:

> Some of the things in the hrl file could be replaced by Elixir macros or
> functions?
>
> Sent from my non-google-device
>
> On Sep 29, 2017, at 02:51, Marc Worrell <mworr...@me.com> wrote:
>
> Hi Allen,
>
> Two weeks ago David de Boer and I had a look at how Elixir and
> Erlang could be mixed.
>
> We concluded that it all should be possible to do with the master.
> But also that we didn’t know enough of Elixir to make it frictionless.
> So we need some help with this.
>
> The master is split in applications, and those will all be pushed to Hex.
> That is a good start for any Elixir setup, I guess.
>
> The main zotonic.hrl is mainly included because we like to poke around in
> #context{} (which we shouldn’t) and to use the ?DEBUG/1 macro.
>
> There are some other macros in there, but they are not essential.
> So it is not really needed for building modules etc.
>
> We welcome help to make Zotonic work with Elixir!
>
> Arjan could probably help as well - though he is very busy right now.
>
> Cheers, Marc
>
>
> On 29 Sep 2017, at 03:17, Allen Wyma <allen.w...@gmail.com> wrote:
>
> Hi,
>
> Does anyone have a guide with how to use elixir with Zotonic? We're a ruby
> house that's looking to switch to elixir, but sometimes we get projects
> that seem to work better for a CMS. When I saw this project, I was quite
> amazed and we'd like to start to experiment a bit with it.
>
> Is it possible to have a guide of how to use elixir with Zotonic? I've
> tried looking a bit at the code for erlang, and it includes references to
> hrl (erlang macro/header files) which are not supported in elixir. This is
> probably my biggest question of how to translate over the code.
>
> Thanks
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Zotonic developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Zotonic developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/zotonic-developers/iOOAFZ8Uq1Y/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> zotonic-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

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


[Zotonic-Dev] Using Elixir to Develop

2017-09-28 Thread Allen Wyma
Hi,

Does anyone have a guide with how to use elixir with Zotonic? We're a ruby 
house that's looking to switch to elixir, but sometimes we get projects 
that seem to work better for a CMS. When I saw this project, I was quite 
amazed and we'd like to start to experiment a bit with it.

Is it possible to have a guide of how to use elixir with Zotonic? I've 
tried looking a bit at the code for erlang, and it includes references to 
hrl (erlang macro/header files) which are not supported in elixir. This is 
probably my biggest question of how to translate over the code.

Thanks

-- 

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