14 May 2018

webkit

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: geoclue-0.12.99.tar.gz, webkit-1.8.3.tar.xz

This entry will look at a browser written in Haskell.

http://slackbuilds.org/repository/14.0/system/geoclue/
geoclue-0.12.99.tar.gz

http://slackbuilds.org/repository/14.0/libraries/webkitgtk/
webkit-1.8.3.tar.xz
webkitgtk.tar.gz

http://hackage.haskell.org/package/Cabal-1.24.0.0
Cabal-1.24.0.0.tar.gz

sh-4.2$ cd Cabal-1.24.0.0
sh-4.2$ ghc -threaded --make Setup

...
sh-4.2$ ./Setup configure --user
Configuring Cabal-1.24.0.0...
sh-4.2$
sh-4.2$ ./Setup build

...
sh-4.2$ ./Setup haddock

...
sh-4.2$ find -print0 | xargs -0 file | grep -e "shared object" | grep ELF \
> | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
sh-4.2$ ./Setup install

...
sh-4.2$

http://hackage.haskell.org/package/Cabal-1.24.0.0
gtk2hs-buildtools-0.13.1.0.tar.gz

sh-4.2$ runghc Setup configure --user
Configuring gtk2hs-buildtools-0.13.1.0...
sh-4.2$ runghc Setup build

...
sh-4.2$ runghc Setup haddock

...
sh-4.2$ find -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
> | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
sh-4.2$ runghc Setup install

...
sh-4.2$

http://hackage.haskell.org/package/webkit
webkit-0.14.2.1.tar.gz

sh-4.2$ runghc Setup configure --user
Configuring webkit-0.14.2.1...
sh-4.2$ runghc Setup build

...
sh-4.2$ runghc Setup haddock

...
sh-4.2$ find -print0 | xargs -0 file | grep -e "shared object" | grep ELF \
> | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
sh-4.2$ runghc Setup install

...
sh-4.2$

running webkit-0.14.2.1/demo/Webkit.hs connected to a URL, but
I noticed that the unicode codepoint 0x25E5 failed to render  

web-browser-in-haskell-1.0.tar.gz

sh-4.2$ runghc Setup configure --user
Configuring web-browser-in-haskell-1.0...
sh-4.2$ runghc Setup build
Building web-browser-in-haskell-1.0...
Preprocessing library web-browser-in-haskell-1.0...
[1 of 1] Compiling WebBrowser.Browser ( WebBrowser/Browser.hs,
 dist/build/WebBrowser/Browser.o )

WebBrowser/Browser.hs:137:3:
    Could not deduce (glib-0.13.2.2:System.Glib.UTFString.GlibString
                        string0)
      arising from a use of `toolbarAppendNewWidget'
    from the context (NotebookClass self, Show a)
      bound by the inferred type of
               repeating :: (NotebookClass self, Show a) =>
                            self -> IORef a -> IO WebView
               browserViewNewTab :: (NotebookClass self, Show a) =>
                                    self -> IORef a -> WebFrame -> IO WebView
      at WebBrowser/Browser.hs:(86,1)-(192,16)
    The type variable `string0' is ambiguous
    Note: there are several potential instances:
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString
                 text-1.2.0.3:Data.Text.Internal.Text
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString [Char]
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
    In a stmt of a 'do' block: toolbarAppendNewWidget tool h Nothing
    In the expression:
      do { widgetShowAll ntbk;
           tab2 <- tableNew 1 5 False;
           button2 <- buttonNew;
           buttonSetFocusOnClick button2 False;
           .... }
    In an equation for `repeating':
        repeating ntbk cnt
          = do { widgetShowAll ntbk;
                 tab2 <- tableNew 1 5 False;
                 button2 <- buttonNew;
                 .... }

WebBrowser/Browser.hs:153:5:
    Could not deduce (glib-0.13.2.2:System.Glib.UTFString.GlibString
                        string1)
      arising from a use of `webFrameGetUri'
    from the context (NotebookClass self, Show a)
      bound by the inferred type of
               repeating :: (NotebookClass self, Show a) =>
                            self -> IORef a -> IO WebView
               browserViewNewTab :: (NotebookClass self, Show a) =>
                                    self -> IORef a -> WebFrame -> IO WebView
      at WebBrowser/Browser.hs:(86,1)-(192,16)
    The type variable `string1' is ambiguous
    Note: there are several potential instances:
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString
                 text-1.2.0.3:Data.Text.Internal.Text
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString [Char]
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
    In the first argument of `(>>=)', namely `webFrameGetUri frame'
    In a stmt of a 'do' block:
      webFrameGetUri frame
      >>=
        \ uri
          -> do { ch <- webViewGetTitle wv;
                  let ...;
                  .... }
    In the expression:
      do { webFrameGetUri frame >>= \ uri -> do { ... } }
sh-4.2$

There is also the newer hbro using webkitgtk3, though
the author reported some problems/limitations with the
webkitgtk3 and gtk3 code.

NB: Cabal-1.22.0.0 was the first release that used a binary format setup-config file.

08 May 2018

Wily

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz

Compilation of wily-0.13.42.

eric@darkstar:~$ git clone git://github.com/9wm/wily.git
Cloning into 'wily'...
remote: Counting objects: 448, done.
remote: Total 448 (delta 0), reused 0 (delta 0), pack-reused 448
Receiving objects: 100% (448/448), 497.06 KiB, done.
Resolving deltas: 100% (96/96), done.
eric@darkstar:~$ cd wily
eric@darkstar:~/wily$ autoheader
autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a template without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader:                       [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see the
autoheader: WARNING: documentation.
eric@darkstar:~/wily$ autoconf
eric@darkstar:~/wily$ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
eric@darkstar:~/wily$ CFLAGS="$SLKCFLAGS" ./configure

...
eric@darkstar:~/wily$ make

...
eric@darkstar:~/wily$ find -print0 | xargs -0 file | grep -e "executable" | grep ELF \
> | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
eric@darkstar:~/wily$ mkdir -p $HOME/bin
eric@darkstar:~/wily$ cp wily/wily $HOME/bin
eric@darkstar:~/wily$

04 May 2018

xs

System: Slackware Linux (version 14.2)
Deps: xs-master.zip

We'll see if boost-1.59 can work, as 1.60 is stated in the INSTALL file as the minimum version number.

https://github.com/TieDyedDevil/XS
xs-master.zip

13 April 2018

9vx

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: 9vx-0.12.tar.bz2

Running Plan 9 in a 32 bit sandbox.

https://swtch.com/9vx/
9vx-0.12.tar.bz2

Extract the above download into /usr/local.

sh-4.2$ cd /usr/local/9vx-0.12
sh-4.2$ ./9vx.Linux -u glenda &

When finished with your session run 'ps x' to find the PID
of 9vx.Linux, and run the 'kill' command on that PID.

NB: An incomplete project was pursued in 2008 porting vx32 to
Windows XP using a MinGW cross-compiler from a Linux host.

9wm

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz

9wm has a new release, a .SlackBuild is located in the sidebar.

9wm can be used together with 9menu; see earlier Post.

06 April 2018

Arabic footnotes

An example of an RTL footnote.

في أكتوبر 2006 بلغ عدد الحزم التي يستضيفها موقع جنو للاستضافة 307 حزمة [1] ، أما الباقي فموجود في أماكن أخرى.


  1. قائمة بالمشاريع المستضافة في savannah.gnu.org

Code

<br />
<div dir="RTL" style="direction: rtl; text-align: justify; unicode-bidi: embed;">
<a href="http://nurmi-labs.blogspot.com/2018/04/ara-fn.html" name="gnu"></a>
في أكتوبر 2006 بلغ عدد الحزم التي يستضيفها موقع جنو للاستضافة 307 حزمة
<a href="http://nurmi-labs.blogspot.com/2018/04/ara-fn.html#savannah">[1]</a>
، أما الباقي فموجود في أماكن أخرى.<br />
<br />
<hr />
<ol><a href="http://nurmi-labs.blogspot.com/2018/04/ara-fn.html" name="savannah"></a>
<li>
<a href="http://nurmi-labs.blogspot.com/2018/04/ara-fn.html#gnu" title="تعدى إلى الأعلى ل">◥</a>
<a href="http://savanah.gnu.org/search/?type_of_search=soft&amp;words=%%%&amp;type=1">
 قائمة بالمشاريع المستضافة في savannah.gnu.org</a></li>
</ol>
</div>

Additional code needs to be implemented in order to get the text on the right margin when viewing
such content in GNU Emacs 24.2.1 with emacs-w3m; the Emacs interface to w3m; possibly also
a selection of certain fonts for the Arabic ligatures to render.

Running in Emacs 24.3.1 (on a Windows box) w3 did not seem to result in the text's shift to the
left margin, though it's noted that a 'set-face-attribute' error occurs when attempting to load some
webpages.

01 April 2018

Autotools

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: 9menu-master.zip

This entry will look at using GNU autotools.

https://github.com/arnoldrobbins/9menu
9menu-master.zip

Download a copy of the above .zip file, extract it, remove the Imakefile, Makefile, and Makefile.noimake, files, and then run autoscan.

sh-4.2$ cd 9menu-master
sh-4.2$ rm Imakefile Makefile*
sh-4.2$ autoscan
sh-4.2$ cat configure.scan
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([9menu.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Checks for header files.
AC_PATH_X
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/param.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_CHECK_FUNCS([getcwd putenv strchr strrchr])

AC_OUTPUT
sh-4.2$

Modify configure.scan as follows.

  AC_PREREQ([2.69])
- AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
+ AC_INIT([9menu], [1.9])
  AC_CONFIG_SRCDIR([9menu.c])
+ AM_INIT_AUTOMAKE([1.11.5 -Wall -Werror foreign])
  AC_CONFIG_HEADERS([config.h])
+
+ # Add variable and value.
+ LIBS="-lX11"

  # Checks for programs.

  AC_CHECK_FUNCS([getcwd putenv strchr strrchr])

+ AC_CONFIG_FILES([Makefile])
  AC_OUTPUT

sh-4.2$ cp configure.scan configure.ac
sh-4.2$ autoheader
sh-4.2$ aclocal
/usr/share/aclocal/imlib.m4:9: warning: underquoted definition of AM_PATH_IMLIB
/usr/share/aclocal/imlib.m4:9:   run info '(automake)Extending aclocal'
/usr/share/aclocal/imlib.m4:9:   or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
sh-4.2$ cat << 'EOF-Makefile.am' > 'Makefile.am'
> bin_PROGRAMS = 9menu
> 9menu_SOURCES = 9menu.c
> dist_man_MANS = 9menu.1
> EOF-Makefile.am
sh-4.2$ pushd /usr/share/automake-1.11
/usr/share/automake-1.11 ~/9menu-master
sh-4.2$ cp COPYING INSTALL depcomp install-sh missing $HOME/9menu-master
sh-4.2$ popd
~/9menu-master
sh-4.2$ touch AUTHORS NEWS
sh-4.2$ autoconf
sh-4.2$ automake
sh-4.2$ ./configure --prefix=/usr --mandir=/usr/man
checking for a BSD-compatible install... /bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for getcwd... yes
checking for putenv... yes
checking for strchr... yes
checking for strrchr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
sh-4.2$ make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/eric/9menu-master/missing --run autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
make  all-am
make[1]: Entering directory `/home/eric/9menu-master'
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT 9menu.o -MD -MP -MF .deps/9menu.Tpo -c -o 9menu.o 9menu.c
mv -f .deps/9menu.Tpo .deps/9menu.Po
gcc  -g -O2   -o 9menu 9menu.o  -lX11
make[1]: Leaving directory `/home/eric/9menu-master'
sh-4.2$ exit

I wrote this Post when faced with the xmkmf output as adding an 'x' to the man
page file extension.

A.D. Robbins on 25 April 2018 pushed my suggestions to delete the @(#) SCCS
marker in 9menu.c, and modify the 2nd example in 9menu.1 to use gv instead of
ghostview; also changing the remote example to use ssh instead of rsh.

NB: The 9menu '-label' argument obviously will not work with window managers
which do not render 'window decorations'.

Last updated: 26-04-2018