Re: [Haskell-cafe] Re: ANN: bitspeak 0.0.1

2010-06-24 Thread Henning Thielemann


On Mon, 21 Jun 2010, Maurí­cio CA wrote:


bitspeak is a small proof of concept application that allows
writing text using only two commands (yes/no, 1/2, top/down etc.).


Looks cool! Did you forget any dependencies tho? I get the following error:



Oops... Three modules ended up missing in .cabal file. Just
uploaded 0.0.2 to hackage, it should work.


Two this end, before uploading a package to Hackage I run a script in 
order to check whether the package can build:


$ cat cabal-test

package=`basename $1 .tar.gz`

tar xfz ./dist/$package.tar.gz --directory=/tmp/
cd /tmp/$package/
runhaskell Setup configure --user
runhaskell Setup build
runhaskell Setup haddock

echo
echo 'cabal check' says
cabal check

echo
echo After running tests you may want to call:
echo rm -r /tmp/$package/




Run it like

$ cabal-test dist/bitspeak-0.0.1.tar.gz___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANN: bitspeak 0.0.1

2010-06-23 Thread Richard O'Keefe


On Jun 22, 2010, at 1:26 PM, Maurí cio CA wrote:

Sure, Huffman was actually my first tought. But I couldn't think
of a pratical display for the result of Huffman encoding that
could be easily followed by a human looking at the screen. Since
it's an optimal code, letters would not be grouped in alphabetical
order.


There is a compromise.
There is such a thing as an ORDERED Huffman code.
Consider a set of strings.
If they call begin with the same first letter,
assume that letter and consider the suffixes instead.
Otherwise, choose a letter L such that
as close as possible to half of the strings begin
with a letter preceding L in the alphabet
as close as possible to half of the strings begin
with the letter L or a later letter.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: ANN: bitspeak 0.0.1

2010-06-23 Thread Maurí­cio CA

Sure, Huffman was actually my first tought. But I couldn't think
of a pratical display for the result of Huffman encoding that
could be easily followed by a human looking at the screen. Since
it's an optimal code, letters would not be grouped in alphabetical
order.


There is a compromise.
There is such a thing as an ORDERED Huffman code.
Consider a set of strings.
If they call begin with the same first letter,
assume that letter and consider the suffixes instead.
Otherwise, choose a letter L such that
as close as possible to half of the strings begin
with a letter preceding L in the alphabet
as close as possible to half of the strings begin
with the letter L or a later letter.


I believe that's what I've done. I use this file to give weight
to letters:

  http://bitbucket.org/mauricio/bitspeak/src/tip/src/Corpora.hs

After each letter is selected I keep only sufixes after that
letter, and then I use 'splitData' to find the point where
I'll separate both halves:

  http://bitbucket.org/mauricio/bitspeak/src/tip/src/Main.hs

Best,

Maurício

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: ANN: bitspeak 0.0.1

2010-06-22 Thread Tony Finch
On Mon, 21 Jun 2010, Maurí­cio CA wrote:

   bitspeak is a small proof of concept application that allows
   writing text using only two commands (yes/no, 1/2, top/down etc.).
 
  There is a parallel between data compression algorithms and this sort of
  task, expressing a sentence in the minimal number of bits via
  compression also minimized the number of yes/no questions that need to
  be asked.
 
  In particular, a Huffman coding:

 Sure, Huffman was actually my first tought. But I couldn't think
 of a pratical display for the result of Huffman encoding that
 could be easily followed by a human looking at the screen.

http://www.inference.phy.cam.ac.uk/dasher/

Tony.
-- 
f.anthony.n.finch  d...@dotat.at  http://dotat.at/
SOUTH BISCAY: EASTERLY OR NORTHEASTERLY 4 OR 5, OCCASIONALLY 6 IN SOUTHWEST.
SLIGHT OR MODERATE. FAIR. GOOD.___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: ANN: bitspeak 0.0.1

2010-06-21 Thread Maurí­cio CA

bitspeak is a small proof of concept application that allows
writing text using only two commands (yes/no, 1/2, top/down etc.).


Looks cool! Did you forget any dependencies tho? I get the following error:



Oops... Three modules ended up missing in .cabal file. Just
uploaded 0.0.2 to hackage, it should work.

Thanks!

Maurício

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: ANN: bitspeak 0.0.1

2010-06-21 Thread Maurí­cio CA

bitspeak is a small proof of concept application that allows
writing text using only two commands (yes/no, 1/2, top/down etc.).


There is a parallel between data compression algorithms and this sort of
task, expressing a sentence in the minimal number of bits via
compression also minimized the number of yes/no questions that need to
be asked.

In particular, a Huffman coding:


Sure, Huffman was actually my first tought. But I couldn't think
of a pratical display for the result of Huffman encoding that
could be easily followed by a human looking at the screen. Since
it's an optimal code, letters would not be grouped in alphabetical
order.

Thinking again, this could be easily accomplished... I could just
list the alphabet and the next bit to be choosed below each letter.
TODO for 0.1.

Thanks!

Maurício

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe