jason.dusek:
I have an awkward programming problem -- I need to take a
dictionary, parse it, build a bunch of intermediate lists and
then make maps and tries out of the list. A programming
problem because it's taken me a fair amount of effort to pull
together the parser and list
Jason Dusek [EMAIL PROTECTED]:
Bryan O'Sullivan [EMAIL PROTECTED] wrote:
The trick I usually use in cases like this is to compile the
data as C code and link against it, then access it from
Haskell via a Ptr.
For my particular application, I really need to ship a single
static binary that
On Sat, Mar 1, 2008 at 12:24 PM, Jay Scott [EMAIL PROTECTED] wrote:
Jason Dusek [EMAIL PROTECTED]:
unsafePerformIO should be safe on constants, right? It has worked for
me, at least.
Unfortunately, reading in the list does not allow me to ship a
single binary. It's not file reading,
Simon Peyton-Jones [EMAIL PROTECTED] wrote:
It's not quite as stupid as it sounds...have another go when
you see that #2002 is fixed.
Thanks for pointing me to that -- in the meantime, I'd still
rather write C and Haskell than plain C++!
--
_jsn
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases the irritation somewhat.
Did you try
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases the irritation somewhat.
Did you try bytestring literals
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases the irritation somewhat.
Did you try bytestring literals
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases the irritation
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases
Bryan O'Sullivan [EMAIL PROTECTED] wrote:
The trick I usually use in cases like this is to compile the
data as C code and link against it, then access it from
Haskell via a Ptr.
For my particular application, I really need to ship a single
static binary that has it all -- data as well as
Is it _possible_ to use Template Haskell to take the name of the external binary
file and produce such a bytestring literal?
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
| On another note, I am extremely curious about the difference
| between statically compiling a list and building it at
| runtime. I find it hard to wrap my head around the fact that I
| can build the list at runtime in a short time, but can not
| compile it without eating all of my
jason.dusek:
I have an awkward programming problem -- I need to take a
dictionary, parse it, build a bunch of intermediate lists and
then make maps and tries out of the list. A programming
problem because it's taken me a fair amount of effort to pull
together the parser and list
Don Stewart [EMAIL PROTECTED] wrote:
You can build large constant bytestrings, fwiw. They turn into
an Addr#, and GHC will leave them alone.
Well, for my particular problem -- I guess I could align all
the elements of the lists, and then build the trie and maps
from the ByteStrings at
jason.dusek:
Don Stewart [EMAIL PROTECTED] wrote:
You can build large constant bytestrings, fwiw. They turn into
an Addr#, and GHC will leave them alone.
Well, for my particular problem -- I guess I could align all
the elements of the lists, and then build the trie and maps
from
Jason Dusek [EMAIL PROTECTED]:
I have an awkward programming problem -- I need to take a
dictionary, parse it, build a bunch of intermediate lists and
then make maps and tries out of the list. A programming
problem because it's taken me a fair amount of effort to pull
together the parser
jay:
Jason Dusek [EMAIL PROTECTED]:
I have an awkward programming problem -- I need to take a
dictionary, parse it, build a bunch of intermediate lists and
then make maps and tries out of the list. A programming
problem because it's taken me a fair amount of effort to pull
together
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases the irritation somewhat.
Did you try bytestring literals (and maybe parsing them in-memory with
Jay Scott wrote:
That didn't occur to me, since neither of my large constants includes
strings
The trick I usually use in cases like this is to compile the data as C
code and link against it, then access it from Haskell via a Ptr.
b
___
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases the irritation somewhat.
Did you try bytestring literals (and maybe parsing them in-memory
I have an awkward programming problem -- I need to take a
dictionary, parse it, build a bunch of intermediate lists and
then make maps and tries out of the list. A programming
problem because it's taken me a fair amount of effort to pull
together the parser and list generator -- and
21 matches
Mail list logo