08 July 2018

boat race

This Post is not yet finished.

 crews.tsv
 Weight       School       Rowers      
 188.5 Cambridge 1
 183 Cambridge 1
 194.5 Cambridge 1
 185 Cambridge 1
 214 Cambridge 1
 203.5 Cambridge 1
 186 Cambridge 1
 178.5 Cambridge 1
 109 Cambridge 0
 186 Oxford 1
 184.5 Oxford 1
 204 Oxford 1
 184.5 Oxford 1
 195.5 Oxford 1
 202.5 Oxford 1
 174 Oxford 1
 183 Oxford 1
 109.5 Oxford 0
crews.tsv



Source: http://lib.stat.cmu.edu/DASL/Datafiles/Crews.html

J.B. Miller's code uses pylab, a procedural interface to the
matplotlib object-oriented plotting library.

See also: SciPy

sh-2.4$ cat test.hs
import Statistics.Sample
import Data.Vector
cambridge = fromList [188.5, 183, 194.5, 185, 214, 203.5, 186, 178.5, 109]
main = do
    print $ mean cambridge
sh-2.4$ runghc test.hs
182.44444444444446
sh-2.4$ exit

See also: bootstrapping ghc

sh-4.2$ pdl2
Perldl2 Shell v0.008
      PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
      'COPYING' in the PDL distribution. This is free software and you
      are welcome to redistribute it under certain conditions, see
      the same file for details.

Loaded plugins:

  CleanErrors
  Commands
  Completion
  CompletionDriver::INC
  CompletionDriver::Keywords
  CompletionDriver::LexEnv
  CompletionDriver::Methods
  DDS
  FindVariable
  History
  Interrupt
  LexEnv
  MultiLine::PPI
  NiceSlice
  PDLCommands
  Packages
  PrintControl
  ReadLineHistory


Type 'help' for online help

Type Ctrl-D or quit to exit

Loaded PDL v2.019

load_rcfile: got $HOME = /home/eric
load_rcfile: loading PDL/default.perldlrc
pdl> @cambridge = (188.5, 183, 194.5, 185, 214, 203.5, 186, 178.5, 109);

pdl> $piddle = pdl @cambridge;

pdl> do_print
1
pdl> ($mean) = statsover $piddle;
182.444444444444
pdl> do_print

pdl> quit
sh-4.2$ exit

sh-4.2$ R

R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i486-slackware-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> oxford <- c(186, 184.5, 204, 184.5, 195.5, 202.5, 174, 183, 109.5)
> oxford.mean <- mean(oxford)
> print(oxford.mean)
[1] 180.3889
> q()
Save workspace image? [y/n/c]: n
sh-4.2$ exit

sh-4.2$ tclsh
% set cambridge [list 188.5 183 194.5 185 214 203.5 186 178.5 109]
188.5 183 194.5 185 214 203.5 186 178.5 109
% package require math::statistics
0.9.3
% puts [::math::statistics::mean $cambridge]
182.44444444444446
% exit
sh-4.2$ exit

sh-4.2$ cd /usr/local/bin
sh-4.2$ ./xlispstat
XLISP-PLUS version 3.04
Portions Copyright (c) 1988, by David Betz.
Modified by Thomas Almy and others.
XLISP-STAT Release 3.52.20 (Beta).
Copyright (c) 1989-1999, by Luke Tierney.

> (def cambridge (list 188.5 183 194.5 185 214 203.5 186 178.5 109))
CAMBRIDGE
> (def oxford (list 186 184.5 204 184.5 195.5 202.5 174 183 109.5))
OXFORD
> (mean (append cambridge oxford))
181.41666666666666
> (exit)
sh-4.2$ exit

xlispstat

removing the pertinent lines in lowess.c allocates for
an xlispstat-3-52-20 compile on Slackware-14.0

- #ifdef MACINTOSH
  # undef fmax
  # define fmax Fmaxx
- #endif

excel gsheets

23 June 2018

css

Some css code to create 16x16 circles.
(based on GitHub's colour codes)

.circle{height:16px;width:16px;border-radius:50%;display:inline-block}.ada{background-color:#02f88c}.awk{background-color:#ccc}.bat{background-color:#c1f12e}.c{background-color:#555}.clj{background-color:#db5855}.cs{background-color:#178600}.css{background-color:#563d7c}.cxx{background-color:#f34b7d}.el{background-color:#c065db}.erl{background-color:#b83998}.f{background-color:#4d41b1}.go{background-color:#375eab}.hs{background-color:#5e5086}.htm{background-color:#e34c26}.java{background-color:#b07219}.js{background-color:#f1e05a}.jl{background-color:#a270ba}.lua{background-color:navy}.m4{background-color:#ccc}.mak{background-color:#427819}.pas{background-color:#e3f171}.pl{background-color:#0298c3}.php{background-color:#4f5d95}.ps{background-color:#da291c}.ps1{background-color:#012456}.py{background-color:#3572a5}.r{background-color:#198ce7}.rb{background-color:#701516}.rs{background-color:#dea584}.sas{background-color:#b34936}.scala{background-color:#c22d40}.scm{background-color:#1e4aec}.sed{background-color:#64b970}.sh{background-color:#89e051}.sql{background-color:#ccc}.tcl{background-color:#e4cc98}.tex{background-color:#3d6117}.vb{background-color:#945db7}.vim{background-color:#199f4b}.xml{background-color:#ccc}

Neither CSS geometric shapes nor table layout render in Blogger's editor, only as viewed in Preview mode, for that reason I primarily utilise indexed .gif icons, and html 4.1 coding for the few tables found on this log; it goes without saying that terminal-based browsers, as links-2.7 and w3m-0.5.3, which include rudimentary table support, do not however support CSS.

As an example I appended the above CSS code with

'.black{background-color:#000}', and this now renders
the mobile version's "homepage" icon.

    <b:widget id='HTML2' locked='false' mobile='only' title='' type='HTML'>
      <b:widget-settings>
        <b:widget-setting name='content'><![CDATA[<div style="padding: 10px; text-align: right;"><a href="http://nurmi-labs.blogspot.com/p/homepage.html?m=1" target="_blank" title="homepage"><span class="circle black"></span></a>     </div>]]></b:widget-setting>
      </b:widget-settings>
      <b:includable id='main'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>

  <b:include name='quickedit'/>
</b:includable>
    </b:widget>
  </b:section>

06 June 2018

tags

I infrequently add new content to this log - RSS and Atom Feed
being generated in real-time - I've changed the homepage head
element, to not load the former's link; commenting also on this
log being disabled, the OpenID server and delegate links seemed
superfluous.

  <head>
    <meta expr:content='data:blog.isMobile        ? &quot;width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0&quot;        : &quot;width=1100&quot;' name='viewport'/>
    <b:include data='blog' name='all-head-content'/>
    <title><data:blog.pageTitle/></title>

the above theme code was modified as follows

  <head>
    <meta expr:content='data:blog.isMobile        ? &quot;width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0&quot;        : &quot;width=1100&quot;' name='viewport'/>
    <meta expr:content='&quot;text/html; charset=&quot; + data:blog.encoding' http-equiv='Content-Type'/>
    <meta content='true' name='MSSmartTagsPreventParsing'/>
    <meta content='blogger' name='generator'/>
    <link expr:href='data:blog.homepageUrl + &quot;favicon.ico&quot;' rel='icon' type='image/x-icon'/>
    <link expr:href='data:blog.url' rel='canonical'/>
    <data:blog.feedLinks/>  
    <b:if cond='data:blog.url == data:blog.homepageUrl'>
      <link href='http://www.blogger.com/openid-server.g' rel='openid.server'/>
    </b:if>
    <title><data:blog.pageTitle/></title>

with modification

sh-4.2$ perl -MLWP::Simple -e 'getprint "http://nurmi-labs.blogspot.com/"' > b.html

sh-4.2$ head -n 15 b.html | tail -n +7
<meta content='true' name='MSSmartTagsPreventParsing'/>
<meta content='blogger' name='generator'/>
<link href='http://nurmi-labs.blogspot.com/favicon.ico' rel='icon' type='image/x-icon'/>
<link href='http://nurmi-labs.blogspot.com/' rel='canonical'/>
<link rel="alternate" type="application/atom+xml" title="Nurmi Labs - Atom" href="http://nurmi-labs.blogspot.com/feeds/posts/default" />
<link rel="alternate" type="application/rss+xml" title="Nurmi Labs - RSS" href="http://nurmi-labs.blogspot.com/feeds/posts/default?alt=rss" />
<link rel="service.post" type="application/atom+xml" title="Nurmi Labs - Atom" href="https://www.blogger.com/feeds/8577868372695856080/posts/default" />
<link href='http://www.blogger.com/openid-server.g' rel='openid.server'/>
<title>Nurmi Labs</title>
sh-4.2$ 

without modification

sh-4.2$ perl -MLWP::Simple -e 'getprint "http://nurmi-labs.blogspot.com/"' > d.html

sh-4.2$ head -n 21 d.html | tail -n +8
<link href='http://nurmi-labs.blogspot.com/favicon.ico' rel='icon' type='image/x-icon'/>
<link href='http://nurmi-labs.blogspot.com/' rel='canonical'/>
<link rel="alternate" type="application/atom+xml" title="Nurmi Labs - Atom" href="http://nurmi-labs.blogspot.com/feeds/posts/default" />
<link rel="alternate" type="application/rss+xml" title="Nurmi Labs - RSS" href="http://nurmi-labs.blogspot.com/feeds/posts/default?alt=rss" />
<link rel="service.post" type="application/atom+xml" title="Nurmi Labs - Atom" href="https://www.blogger.com/feeds/8577868372695856080/posts/default" />
<link rel="openid.server" href="https://www.blogger.com/openid-server.g" />
<link rel="openid.delegate" href="http://nurmi-labs.blogspot.com/" />
<!--[if IE]><script type="text/javascript" src="https://www.blogger.com/static/v1/jsbin/3658603751-ieretrofit.js"></script>
<![endif]-->
<meta content='http://nurmi-labs.blogspot.com/' property='og:url'/>
<meta content='Nurmi Labs' property='og:title'/>
<meta content='' property='og:description'/>
<!--[if IE]> <script> (function() { var html5 = ("abbr,article,aside,audio,canvas,datalist,details," + "figure,footer,header,hgroup,mark,menu,meter,nav,output," + "progress,section,time,video").split(','); for (var i = 0; i < html5.length; i++) { document.createElement(html5[i]); } try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {} })(); </script> <![endif]-->
<title>Nurmi Labs</title>
sh-4.2$

some additional adjustments

  <head>
    <meta expr:content='&quot;text/html; charset=&quot; + data:blog.encoding' http-equiv='Content-Type'/>
    <meta content='Regneark, database, Statistik, Netværk' name='keywords'/>
    <meta content='IE=edge' http-equiv='X-UA-Compatible'/>
    <meta expr:content='data:blog.isMobile         ? &quot;width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0&quot;         : &quot;width=1100&quot;' name='viewport'/>
    <meta content='blogger' name='generator'/>
    <link expr:href='data:blog.homepageUrl + &quot;favicon.ico&quot;' rel='icon' type='image/x-icon'/>
    <link expr:href='data:blog.url' rel='canonical'/>
    <link href='https://nurmi-labs.blogspot.com/feeds/posts/default' rel='alternate' title='nurmi-labs.blogspot.com - Atom Feed' type='application/atom+xml'/>
    <meta content='true' name='MSSmartTagsPreventParsing'/>
    <title><data:blog.pageTitle/></title>

which results in the following output

<head>
<link href='https://www.blogger.com/static/v1/widgets/2437439463-css_bundle_v2.css' rel='stylesheet' type='text/css'/>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<meta content='Regneark, database, Statistik, Netværk' name='keywords'/>
<meta content='IE=edge' http-equiv='X-UA-Compatible'/>
<meta content='width=1100' name='viewport'/>
<meta content='blogger' name='generator'/>
<link href='https://nurmi-labs.blogspot.com/favicon.ico' rel='icon' type='image/x-icon'/>
<link href='https://nurmi-labs.blogspot.com/' rel='canonical'/>
<link href='https://nurmi-labs.blogspot.com/feeds/posts/default' rel='alternate' title='nurmi-labs.blogspot.com - Atom Feed' type='application/atom+xml'/>
<meta content='true' name='MSSmartTagsPreventParsing'/>
<title>Nurmi Labs</title>

NB: You can still use the folllowing URLs but they will no longer be
included in the webpage source code.

http://nurmi-labs.blogspot.com/feeds/posts/default?alt=rss

https://www.blogger.com/feeds/8577868372695856080/posts/default

For all the Pages and Posts (there are <300) use this instead.

http://nurmi-labs.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=300

24 May 2018

quadcode

There is a package for compiling Tcl bytecode into LLVM IR.

This depends on the wrapper for the C interface written by J. Decoster.

Slackware-14.2 contains adequate clang, LLVM, and Tcl versions.

On MS using VS the minimum version of VS2015 (MSVC140) should
be adequate for, e.g., LLVM 3.8.0 installation, where I cite that release
as pertains to its availability also via the mentioned Slackware version;
if one is inclined to compare code generation from two different OSes.

A search on Hackage reveals various authors have implemented both
ffi and pure Haskell bindings for the LLVM; also analysis, pretty printer
and tools' packages

Wiki Page: https://wiki.tcl.tk/40985

Presently I'm running Slackware-14.0 and do not have access to a
recent MS release adequate for a VS2015 or newer installation, so
I won't be pursuing any testing, but I thought the development was
interesting enough to Post a log entry on the work.

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)

Slackware-14.2 comes with sufficiently recent libffi and readline packages, and the remaining dependencies as gcninja (optional re2c), python3, and meson, can be created as packages
from the scripts available at SlackBuilds.org.

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

Open uxterm to run the following. 

sh-4.2$ git clone git://github.com/TieDyedDevil/XS.git
Cloning into 'XS'...
remote: Counting objects: 8138, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 8138 (delta 11), reused 19 (delta 9), pack-reused 8115
Receiving objects: 100% (8138/8138), 1.62 MiB | 171 KiB/s, done.
Resolving deltas: 100% (5555/5555), done.

sh-4.2$ cd XS
sh-4.2$ ./build.sh --gcc

...

sh-4.2$

A. Kažukauskas' python3.SlackBuild creates the following zero length files.

pydoc_data/__init__.py
lib2to3/tests/data/fixers/myfixes/__init__.py
email/mime/__init__.py
test/test_importlib/namespace_pkgs/not_a_namespace_pkg/foo/__init__.py
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test/empty
test/test_import/data/package/submodule.py
test/test_import/data/package2/submodule2.py
test/nullcert.pem
urllib/__init__.py
sqlite3/test/__init__.py
site-packages/pybench/package/__init__.py
site-packages/pybench/package/submodule.py
site-packages/setuptools/_vendor/__init__.py
site-packages/pkg_resources/_vendor/__init__.py
site-packages/pip/operations/__init__.py
site-packages/pip/_vendor/html5lib/filters/__init__.py
site-packages/pip/_vendor/urllib3/packages/backports/__init__.py
site-packages/pip/_vendor/urllib3/contrib/__init__.py
site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py
tkinter/test/__init__.py
tkinter/test/test_tkinter/__init__.py
tkinter/test/test_ttk/__init__.py

And J. Hansen's meson.SlackBuild creates these zero length files.

site-packages/mesonbuild/backend/__init__.py
site-packages/mesonbuild/__init__.py