[erlang-questions] Looking for slides of a lightning talk

CGS cgsmcmlxxv@REDACTED
Thu Jul 12 13:49:47 CEST 2012


Hi,

You blame Erlang for an application written in it which doesn't support MS
Windows... Well, that reminds me of a case of saying noSQL databases are
not good just because that person/team misunderstood the usage of a
particular noSQL database. Interesting how people try to generalize their
impressions to a category from a wrongly chosen example. Don't get me
wrong, I am not that good in Erlang to mock you, but I think you should ask
someone more knowledgeable before you to say something like "Erlang is just
too damn difficult to do the easy stuff." I do easy stuff in Erlang. It
would probably be more difficult to write a proper C code to do those
simple things (like proper threading, distributed applications and so on).

Now, the problem is what do you need cowboy for? If you need an webserver
for MS Windows which is written in Erlang, you can try Yaws (you have
installers here: http://yaws.hyber.org/download/). If you need a
Erlang-based webserver which you can integrate it in your application, you
will need either a Linux or Cygwin (for most of the open source projects,
but you can do it without if you use, for example, lhttpc -
https://bitbucket.org/etc/lhttpc/src - where you can modify the Makefile to
be compatible with MS VS or, for even less, a .bat file). I would avoid
installing Linux in a MS Windows box (I'd rather do it oppositely).

Erlang under MS Windows works as nice as under Linux (as far as I could
play with it under MS Windows), but the installation under MS Windows is
much simpler (I would suggest for Linux to compile it from source with the
options you need rather than installing it from repositories). I don't know
what is your background in programming (and I don't want to know), but
there are nice tutorials on web for all the categories of programmers
(coming from OOP, functional or whatever else languages). Just get
familiarized with Erlang and after that make an impression of your own
about the language itself. I am also relatively new in Erlang and I
consider I cannot afford to make any statement about how good or not is
Erlang. I know only that are some nice things and some not so nice things
in Erlang (I leave finding examples to your experience).

CGS




On Thu, Jul 12, 2012 at 12:30 AM, Ian <hobson42@REDACTED> wrote:

> On 11/07/2012 11:47, Thomas Lindgren wrote:
>
>> 1. Too few dedicated erlang web programmers, so still a lot of DIY. This
>> may be a bootstrapping/community issue. Which is nontrivial, by the way.
>>
>> 2. Packages: Let me gripe a bit. At work, we've had endless trouble with
>> Ruby gems, some hair tearing with CPAN, and have spent a couple of man
>> years on packaging for RH and Debian. The whole process is still pretty
>> clunky and hacky. So not a solved problem in the rest of the world either
>> IMO and the erlang way has some advantages. But I agree that more love is
>> needed to catch up, especially on usability.
>>
> Things need A LOT more love. I want to use cowboy to write some web
> software. Looks easy enough. There are Erlang drivers for the database I
> need to use, so all looks OK to proceed.  I have just started with Erlang
> so not too familiar with things yet. This is my experience.
>
> 1) Found cowboy needs rebar - and rebar documentation is
> thin/non-existent/hiding.
>
> 2) Find rebar is not available on windows.  OK. I'll upgrade a VM I have
> to Unbuntu 12:04. (which takes 3 hours, fails and needs nursing back to
> health.  After removing and re-installing some packages things are now OK,
> apart from the occasional crash.  Aside - virtual box provides a rather
> standard environment, so should not be a problem. And I though Linux was
> supposed not to crash like Windows. Not my experience.  Oh well - press on.
>
> 3) I discover that the install of rebar into an apt-get install of Erlang
> will cause all sort of problems.
>
> In my book that means that at least one of those installs is not simple
> minded, or had inadequate checking.
> It is simply wrong. Maybe both. No matter, decide to install from source.
>
> 4) Screw up courage and download and compile Erlang 15B - all goes well.
>  Woo-Hoo on a roll here!
>
> 5) Download, and compile rebar from source. That appears to work and it
> tells me to put it on the path.
>
> 6) Eh? Type "path" - gets "not installed" error message. Back to Google.
> Eventually find the command I need is env.  See path is a whole slew of
> directories.
>
> Which should I use? Will the next upgrade to Ubuntu wipe some of them?
> Don't know. Don't know how to find out. Look in each one and decide that
> /usr/local/bin is probably a fair choice, because it contains erl. Copy
> rebar in.
>
> 7) Now I can start the instructions at http://blog.pqsdk.org/from-**
> zero-to-deployment-with-**cowboy-in-5-minu<http://blog.pqsdk.org/from-zero-to-deployment-with-cowboy-in-5-minu>
>
> Note the title includes the sales pitch "In 5 minutes".  I have already
> spent many hours getting the the start position. (At least I hope its the
> start position).
>
> 8) Issue first command and find hg is not an installed command. Apt-get
> install hg can't find the package.
>
> It wasn't the start position!  Google turns up that hg is actually called
> mercurial and gives me the magic incantation to install it.
>
> 9) hg installs and I get to clone woody from bitbucket.  Step 1 complete.
>
> 10) Next command is ./app.sh cowgirl .   I think that create the app (or
> at least its framework). It reports no errors.
>
> 11) Then ./build-compile.sh  - OK, build and compile.  NO errors. Great.
>
> 12) Next comes  ./build-release.sh
>
> This fails saying files exist and were not generated. It adds that I need
> force=1 on the command line to force it. Why? If forcing is a good idea,
> the software should just do it. Heck, its only to learn. I can delete and
> start over if necessary - just press on. Add force=1 to the command line.
>
> 13) When I do I get this.
>
> ian@REDACTED:~/projects/cowgirl$ ./build-release.sh force=1
> ==> rel (create-node)
> ERROR: One or more files already exist on disk and were not generated:
>     * "reltool.config"
>     * "files/erl"
>     * "files/nodetool"
>     * "files/cowgirl"
>     * "files/app.config"
>     * "files/vm.args"
> To force overwriting, specify force=1 on the command line.
> ==> rel (generate)
> ERROR: generate failed while processing /home/ian/projects/cowgirl/**rel:
> {'EXIT',{{badmatch,{error,"**Release \"cowgirl\" uses non existing
> application cowgirl"}},
>          [{rebar_reltool,generate,2,[]}**,
>           {rebar_core,run_modules,4,[]},
>           {rebar_core,execute,4,[]},
>           {rebar_core,process_dir,4,[]},
>           {rebar_core,process_each,5,[]}**,
>           {rebar_core,process_dir,4,[]},
>           {rebar_core,process_commands,**1,[]},
>           {rebar,main,1,[]}]}}
> ian@REDACTED:~/projects/cowgirl$
>
> This is copy/pasted from the log, so I can see I did indeed spell force
> correctly.
>
> Where now? Is the pre-existence of those files a problem? I have no idea,
> and no idea how to find out. However experience tells me to make a real
> effort to fix the first error, even if later ones can be ignored. Should I
> delete them all and try again?
>
> What does the error in the generate mean? It can't mean the application
> cowgirl does not exist because hg/mercurial  brought it down without errors
> and app.sh created it without errors.
>
> The talk is right. Erlang is just too damn difficult to do the easy stuff.
>
> It may have been humorously presented (I wasn't there), but the take-away
> it so true.
>
> Early difficulties are putting off many would-be adopters.
>
> (And I'm stuck!  Help appreciated! )
>
> Regards
>
> Ian
>
>
> ______________________________**_________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120712/c040869c/attachment.htm>


More information about the erlang-questions mailing list