[erlang-questions] (not) packing code to PDF [was: What problem are we trying to solve here? [was Erland users group [was re: languages in use? [was: Time for OTP to be Renamed?]]]]

Joe Armstrong <>
Tue Feb 18 13:38:09 CET 2014


On Tue, Feb 18, 2014 at 10:39 AM, Motiejus Jakštys <>wrote:

> On Tue, Feb 18, 2014 at 9:34 AM, Joe Armstrong <> wrote:
> > Here's a radical proposal. The top level package should be a PDF file.
> >
> > In 2001 ago I wrote this
> >
> > http://www.sics.se/~joe/erlpdf.pdf - Read it, download it, try it, think
> > about it.
>
> Does not render correctly in my document viewer (evince) and does not
> render at all in Iceweasel 25 embedded pdf viewer.
>

That's strange It displays correctly in my evince (vsn 3.4.0)  and also in
adobe reader 9.
I follow the PDF standard (At least I hope I do) so it should be ok.


>
> > This a simple program that packs a file inside a PDF container. It still
> > works.
> <...>
> > Q: Why should the top level package be a PDF file?
> > A: Because the *first* thing I want to do is read the documentation.
> >    I won't even look at a program that has no documentation - it's a
> waste
> > of time.
>
> I could agree if I really needed to*. But:
> 1. Not everything can be pre-compiled (nifs and port drivers come to mind)
>

I was thinking of having pre-compiled binaries for different OSs here


> 2. This severely limits the documentation representation. What if my
> documentation is a rich Web Page which requires html5 to tickle my
> fancy? In PDF we are sort of limited to... PDF.
>

You could put all the beam code/whatever in a

<script type="text/javascript"><!--//--><![CDATA[//><!--
    My Beam code here ... ()ore erlang)
//--><!]]></script>


>
> A quick fix for 2014 onwards: we have OpenDocument and Office Open XML
> which are just zip files with many more tools to manipulate. Loading
> stuff from zip archives is something we already do (except nifs, yes).
> We just need a file extension.
>
>
Indeed - I just wanted the top level to be the documentation since that's
what's I wanted to see first.
You could put inside a  jpeg file as an exif comment I guess and have
pictures of earwigs for all I care.
The point is that it's in a container that should not be unpacked.

/Joe



> :: EAR ::
>
> Motiejus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140218/6db8a72d/attachment.html>


More information about the erlang-questions mailing list