23 June 2018

css

Some css code to create 16x16 circles.

.circle{height:16px;width:16px;border-radius:50%;display:inline-block}.ada{background-color:#02f88c}.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}.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}.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}

<br /><div style="text-align: right;"><a href="https://nurmi-labs.blogspot.com/search/label/html/" target="_blank" title="Html"><span class="circle htm"></span></a>&nbsp;&emsp;</div>

  

13 June 2018

eww

EWW is based on the work of L.W. Ingebrigtsen on a Simple HTML Renderer (shr) which had
had been included in Emacs 24, e.g., in an emacs-24.2 compiled with libxml2 one can render
short un-complicated pages.

M-x load-library RET
Load library: gnus/shr.el RET

M-x shr-visit-file RET
HTML file name: /usr/share/emacs/site-lisp/ess/doc/html RET

I had a look recently the EWW from Emacs 26.1, the latter of which was released on 28-05-2018.

M-x eww RET
Enter URL or keywords: http://nurmi-labs.blogspot.com RET

I only tried this running Windows 10 (64-bit) with http connections.

NB: If you are writing html code for testing in
EWW, remember to add in the img element
an alt="" value for links.

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.

I might write something in this Post on programmatically obtaining
meta and link tags from webpage head elements, whether I would
use for example purposes a particular language, or languages, I've
not determined yet.

  <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' http-equiv='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' http-equiv='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