Results 1 -
3 of
3
The Bits Between The Lambdas: Binary Data in a Lazy Functional Language
- Proceedings of ACM International Symposium on Memory Management
, 1998
"... For the programmer, storage media are usually assumed to have a minimum atomic unit of transfer of one byte. However, sometimes it is useful to have an even finer storage granularity of one bit, for instance in order to compress data. This paper describes an API in the lazy functional language Haske ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
For the programmer, storage media are usually assumed to have a minimum atomic unit of transfer of one byte. However, sometimes it is useful to have an even finer storage granularity of one bit, for instance in order to compress data. This paper describes an API in the lazy functional language Haskell for treating storage media as arbitrary-length streams of bits, without byte-alignment constraints. So far as possible, storage media are treated uniformly. In particular, bit-stream memory and binary files share the same API -- a new and useful abstraction over memory management and file management. This uniformity of access leads to a novel technique for lazy random-access to files in a purely functional manner. We also describe a technique for automatically deriving compressed binary representations of user-defined data structures, whose operations provide both in-heap data compression and convenient high-level binary I/O. Of many possible applications, we illustrate the processing of...
Lambada, Haskell as a better Java
, 2001
"... The Lambada framework provides facilities for fluid interoperation between Haskell (currently both Hugs and GHC using non-Haskell98 extensions) and Java. Using Lambada, we can call Java methods from Haskell, and have Java methods invoke Haskell functions. The framework rests on the Java Native Inter ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
The Lambada framework provides facilities for fluid interoperation between Haskell (currently both Hugs and GHC using non-Haskell98 extensions) and Java. Using Lambada, we can call Java methods from Haskell, and have Java methods invoke Haskell functions. The framework rests on the Java Native Interface (JNI). The Lambada release includes a tool for generating IDL from Java .class files (using reflection), which is fed into our existing HDirect to generate Haskell-callable stubs. 1
Handling Exceptions in Haskell
- In submitted to Practial Applications of Declarative Languages (PADL'99
, 1999
"... Using a language without exception handling is like driving a car with no brakes and no seatbelt --- things work fine until something goes wrong. You also learn to drive rather carefully. This paper describes an exception handling extension to the Haskell lazy functional language. The implementation ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
Using a language without exception handling is like driving a car with no brakes and no seatbelt --- things work fine until something goes wrong. You also learn to drive rather carefully. This paper describes an exception handling extension to the Haskell lazy functional language. The implementation turned out to be very easy but we had problems finding a viable semantics for our system. The resulting semantics is a compromise between theoretical beauty and practical utility. 1 Introduction Haskell is an ivory tower language: full of lofty ideas, built on solid semantic foundations, praised by grey-bearded professors and about as much use in the real world as a chocolate teapot. For Haskell to emerge from the ivory tower, it must be possible to write the kinds of programs that less idealistic programmers can write in C, Java, Ada and other useful languages: programs that interact with the real world in interesting ways (using graphics, GUIs, databases, etc) and which are robust enough...

