Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Deploying a haskell application (not a webapp) (Alan Buxton)
2. Re: Deploying a haskell application (not a webapp)
(Christopher Reichert)
3. Re: Doubts regarding the "read" function. (Kim-Ee Yeoh)
4. Re: Deploying a haskell application (not a webapp) (Kim-Ee Yeoh)
5. Re: Deploying a haskell application (not a webapp) (Alan Buxton)
----------------------------------------------------------------------
Message: 1
Date: Sat, 13 Dec 2014 13:54:40 -0000
From: "Alan Buxton" <[email protected]>
To: <[email protected]>
Subject: [Haskell-beginners] Deploying a haskell application (not a
webapp)
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
Hi
I have created an application using cabal that now installs fine and runs
fine on my dev machine.
I now want to deploy this application onto a separate server. This is not a
webapp.
Try as I might, Google will not point me in the direction of how to do this,
apart from loads of links to Keter which is not what I want (there is no
nginx or any other web server involved).
Any advice on the neatest way to do this?
Thanks
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20141213/1d41a532/attachment-0001.html>
------------------------------
Message: 2
Date: Sat, 13 Dec 2014 08:51:41 -0600
From: Christopher Reichert <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Deploying a haskell application (not
a webapp)
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
On Sat, Dec 13 2014, "Alan Buxton" <[email protected]> wrote:
> Hi
>
>
>
> I have created an application using cabal that now installs fine and runs
> fine on my dev machine.
>
>
>
> I now want to deploy this application onto a separate server. This is not a
> webapp.
>
So, what kind of application is it? What are your requirements? It would
certainly help to know a bit more about what you are trying to do.
>
> Try as I might, Google will not point me in the direction of how to do this,
> apart from loads of links to Keter which is not what I want (there is no
> nginx or any other web server involved).
>
What have you tried searching for?
>
>
> Any advice on the neatest way to do this?
>
It all depends. Do you want to share your app with others? Are you
researching how you might deploy a Haskell app to some production
scenario?
GHC compiled binaries statically link haskell libraries and link against
some dynamic libraries (primarily C libs). The binary can be copied
between machines of the same architecture (assuming dynamically linked
libraries are satisfied on the target machine).
You can see runtime dependencies of your app:
$ ghc --make ./Main.hs
not a dynamic executable
$ ldd ./Main
linux-vdso.so.1 (0x00007fff201fc000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10
(0x00007fcc42fe6000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcc42ce5000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fcc42adc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcc428d8000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007fcc426c2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcc42318000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fcc420fb000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcc43296000)
For the most simple case you can just copy your app to a target machine:
$ scp ./app me@host:
Regards,
--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376 FFA5 6BFC A992 9955 929B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20141213/4f91bbcc/attachment-0001.sig>
------------------------------
Message: 3
Date: Sat, 13 Dec 2014 23:49:26 +0700
From: Kim-Ee Yeoh <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Doubts regarding the "read" function.
Message-ID:
<capy+zdr318qhyzjozefwv+hscn5yfxd3jmiqvjh50oavy8w...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Sat, Dec 13, 2014 at 2:44 PM, Venu Chakravorty <[email protected]> wrote:
>
> Prelude> read "hello " ++ "world"
> "*** Exception: Prelude.read: no parse
>
Yes, as Bob said, first take a look at: show "hello"
Then redo your expression as: read (show "hello") ++ "world"
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20141213/27997493/attachment-0001.html>
------------------------------
Message: 4
Date: Sat, 13 Dec 2014 23:52:43 +0700
From: Kim-Ee Yeoh <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Deploying a haskell application (not
a webapp)
Message-ID:
<capy+zdqotwlc6d+jtywuz3y7skh0xvih3-zyxfzj2nodfzk...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Sat, Dec 13, 2014 at 8:54 PM, Alan Buxton <[email protected]> wrote:
>
> I now want to deploy this application onto a separate server. This is not
> a webapp.
>
>
>
> Try as I might, Google will not point me in the direction of how to do
> this, apart from loads of links to Keter which is not what I want (there is
> no nginx or any other web server involved).
>
Looks like there are some assumptions probably based on familiarity with
some other language + toolchain.
Of what is the haskell analogue you're looking for?
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20141213/cd03ba31/attachment-0001.html>
------------------------------
Message: 5
Date: Sat, 13 Dec 2014 17:33:54 -0000
From: "Alan Buxton" <[email protected]>
To: "'The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell'" <[email protected]>
Subject: Re: [Haskell-beginners] Deploying a haskell application (not
a webapp)
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Hi thanks for the input so far.
See attached a zipfile of a simplified version of the app. It runs locally on
my dev machine and I want to be able to run it on a separate server. I don?t
want to share the app with anyone else.
If I do ?cabal install? with this particular application then it creates an
executable at ~/.cabal/bin/app1
If I copy that file onto the target server then I get the following output:
$ ./app1 fred
Hi fred
Time now is 2014-12-13 17:27:21.764048 UTC
app1: /home/alan/.cabal/share/app1-0.1.0.0/data/file1.txt: openFile: does not
exist (No such file or directory)
So sort of works but in particular the file attachment piece doesn?t work.
From: Beginners [mailto:[email protected]] On Behalf Of Kim-Ee Yeoh
Sent: 13 December 2014 16:53
To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level
topics related to Haskell
Subject: Re: [Haskell-beginners] Deploying a haskell application (not a webapp)
On Sat, Dec 13, 2014 at 8:54 PM, Alan Buxton <[email protected]> wrote:
I now want to deploy this application onto a separate server. This is not a
webapp.
Try as I might, Google will not point me in the direction of how to do this,
apart from loads of links to Keter which is not what I want (there is no nginx
or any other web server involved).
Looks like there are some assumptions probably based on familiarity with some
other language + toolchain.
Of what is the haskell analogue you're looking for?
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20141213/3d5bf1c3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: app1.zip
Type: application/x-zip-compressed
Size: 372658 bytes
Desc: not available
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20141213/3d5bf1c3/attachment.bin>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 78, Issue 8
****************************************