Hi,<div><br></div><div>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).</div>
<div><br></div><div>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: <a href="http://yaws.hyber.org/download/">http://yaws.hyber.org/download/</a>). 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 - <a href="https://bitbucket.org/etc/lhttpc/src">https://bitbucket.org/etc/lhttpc/src</a> - 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).</div>
<div><br></div><div>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).</div>
<div><br></div><div>CGS</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 12:30 AM, Ian <span dir="ltr"><<a href="mailto:hobson42@gmail.com" target="_blank">hobson42@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 11/07/2012 11:47, Thomas Lindgren wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
<br>
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.<br>
</blockquote></div>
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.<br>
<br>
1) Found cowboy needs rebar - and rebar documentation is thin/non-existent/hiding.<br>
<br>
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.<br>
<br>
3) I discover that the install of rebar into an apt-get install of Erlang will cause all sort of problems.<br>
<br>
In my book that means that at least one of those installs is not simple minded, or had inadequate checking.<br>
It is simply wrong. Maybe both. No matter, decide to install from source.<br>
<br>
4) Screw up courage and download and compile Erlang 15B - all goes well. Woo-Hoo on a roll here!<br>
<br>
5) Download, and compile rebar from source. That appears to work and it tells me to put it on the path.<br>
<br>
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.<br>
<br>
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.<br>
<br>
7) Now I can start the instructions at <a href="http://blog.pqsdk.org/from-zero-to-deployment-with-cowboy-in-5-minu" target="_blank">http://blog.pqsdk.org/from-<u></u>zero-to-deployment-with-<u></u>cowboy-in-5-minu</a><br>
<br>
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).<br>
<br>
8) Issue first command and find hg is not an installed command. Apt-get install hg can't find the package.<br>
<br>
It wasn't the start position! Google turns up that hg is actually called mercurial and gives me the magic incantation to install it.<br>
<br>
9) hg installs and I get to clone woody from bitbucket. Step 1 complete.<br>
<br>
10) Next command is ./app.sh cowgirl . I think that create the app (or at least its framework). It reports no errors.<br>
<br>
11) Then ./build-compile.sh - OK, build and compile. NO errors. Great.<br>
<br>
12) Next comes ./build-release.sh<br>
<br>
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.<br>
<br>
13) When I do I get this.<br>
<br>
ian@anake:~/projects/cowgirl$ ./build-release.sh force=1<br>
==> rel (create-node)<br>
ERROR: One or more files already exist on disk and were not generated:<br>
* "reltool.config"<br>
* "files/erl"<br>
* "files/nodetool"<br>
* "files/cowgirl"<br>
* "files/app.config"<br>
* "files/vm.args"<br>
To force overwriting, specify force=1 on the command line.<br>
==> rel (generate)<br>
ERROR: generate failed while processing /home/ian/projects/cowgirl/<u></u>rel: {'EXIT',{{badmatch,{error,"<u></u>Release \"cowgirl\" uses non existing application cowgirl"}},<br>
[{rebar_reltool,generate,2,[]}<u></u>,<br>
{rebar_core,run_modules,4,[]},<br>
{rebar_core,execute,4,[]},<br>
{rebar_core,process_dir,4,[]},<br>
{rebar_core,process_each,5,[]}<u></u>,<br>
{rebar_core,process_dir,4,[]},<br>
{rebar_core,process_commands,<u></u>1,[]},<br>
{rebar,main,1,[]}]}}<br>
ian@anake:~/projects/cowgirl$<br>
<br>
This is copy/pasted from the log, so I can see I did indeed spell force correctly.<br>
<br>
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?<br>
<br>
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.<br>
<br>
The talk is right. Erlang is just too damn difficult to do the easy stuff.<br>
<br>
It may have been humorously presented (I wasn't there), but the take-away it so true.<br>
<br>
Early difficulties are putting off many would-be adopters.<br>
<br>
(And I'm stuck! Help appreciated! )<br>
<br>
Regards<span class="HOEnZb"><font color="#888888"><br>
<br>
Ian</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>