news

2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 FOSS conference devops documentation emacs fedora foss freedom gnome haskell install laptop lisp photo ruby travel verilog vhdl vlsi workshop xmonad


dotgen provides a a simple interface for generating .dot graph files. It is now available in Fedora. Install it along with graphviz using:

 $ sudo yum install ghc-dotgen-devel graphviz

A binary search tree example is shown below:

module Main where

import Text.Dot

box label = node $ [ ("shape","record"),("height",".1"),("label",label) ]

main = putStrLn $ showDot $ do
     c0 <- box "<f0> |<f1> G|<f2> "
     c1 <- box "<f0> |<f1> E|<f2> "
     c2 <- box "<f0> |<f1> B|<f2> "
     c3 <- box "<f0> |<f1> F|<f2> "
     c4 <- box "<f0> |<f1> R|<f2> "
     c5 <- box "<f0> |<f1> H|<f2> "
     c6 <- box "<f0> |<f1> Y|<f2> "
     c7 <- box "<f0> |<f1> A|<f2> "
     c8 <- box "<f0> |<f1> C|<f2> "

     c0 .->. c4
     c0 .->. c1
     c1 .->. c2
     c1 .->. c3
     c2 .->. c8
     c2 .->. c7
     c4 .->. c6
     c4 .->. c5

     return ()

Compile, and run it using:

$ ghc --make Test.hs
[1 of 1] Compiling Main             ( Test.hs, Test.o )
Linking Test ...

$ ./Test > test.dot

You can convert the generated .dot graph file into .png using:

$ dot -Tpng test.dot -o test.png

A screenshot of the generated png:

binary search tree screenshot

I was looking for a tiling window manager to use, and found xmonad. It is written in Haskell, and is quite extensible. You can install it on Fedora using:

$ sudo yum install xmonad-gnome

Here is a screenshot of the same (click image):

xmonad screenshot

The left ALT key is used by default as the “mod” key in xmonad. Since I use it with GNU Emacs, the Windows key has been reconfigured now to be used as the “mod” key. I also use xmonad with GNOME 3 in fallback mode, which actually looks like GNOME 2. The configuration file ~/.xmonad/xmonad.hs:

import XMonad
import XMonad.Config.Gnome
import qualified XMonad.StackSet as W
import XMonad.Util.EZConfig

main = do
     xmonad $ gnomeConfig {
            workspaces = myWorkspaces
            , modMask = mod4Mask
     } `additionalKeysP` myKeys

myWorkspaces = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]

myKeys = [
 
    -- other additional keys
 
    ] ++ -- (++) is needed here because the following list comprehension
         -- is a list, not a single key binding. Simply adding it to the
         -- list of key bindings would result in something like [ b1, b2,
         -- [ b3, b4, b5 ] ] resulting in a type error. (Lists must
         -- contain items all of the same type.)
 
    [ (otherModMasks ++ "M-" ++ [key], action tag)
      | (tag, key)  <- zip myWorkspaces "123456789"
      , (otherModMasks, action) <- [ ("", windows . W.view) -- was W.greedyView
                                      , ("S-", windows . W.shift)]
    ]

I presented Publican at the Document Freedom Workshop 2012 at the Computer and Statistical Service Centre (CSSC), S N Bose Bhavan, Indian Statistical Institute, Kolkata, West Bengal, India held between March 28-29, 2012.

Poster at registration desk

Day I

A Mani started the day’s proceedings with an introduction to Free/Libre/Open Source Software, and basic shell commands. We had a computer lab with Fedora installed where the participants used the terminal to try out the hands-on exercises.

I then introduced Publican to the audience comprising mostly of students and faculty. Jared Smith had presented Publican during FUDCon Pune 2011, and, with his permission, I added more content and a lab section. The participants were able to use Publican to create and build documents with Bengali content!

Lab session

After lunch, Sourav Sen Gupta gave an introduction to LaTeX and Beamer with his “‘Golden Ratio’ for Typesetting - A quick and random introduction to LaTeX and Beamer” presentation. He used the Kile editor to demonstrate LaTeX markups and for generating PDF files. I helped the students with the lab session in writing, and troubleshooting warnings and errors when using Kile with pdflatex.

I also met and spoke with two physicists, John Smolin and Damian Markham, who had come to present at another workshop on “Information and Security in Quantum World”. John Smolin is an avid Fedora user!

Day II

The first session on the second day was by Jit Ray Chowdhury on Moodle CMS. He started with the basics of installing Apache, MySQL and PHP on Fedora, followed by creating a simple HTML, and PHP page. Participants then learnt how to install Drupal, Moodle and configure the same.

Prof. Nagarjuna then started his session on why document freedom is essential, and gave an introduction to Emacs org-mode, with examples. I also met Krishnakant Mane but couldn’t attend his (post-lunch) session on “LibreOffice and Screen Readers” as I had to leave early to catch a flight.

Thanks to the organizing committee: Prof. Mandar Mitra, A Mani, Partha Pratim Kundu, Malay Bhattacharya, and Tanmay Basu for the wonderful hospitality, and to Red Hat for sponsoring my travel.

The publican presentation is available. Few photos taken during the event are available in my /gallery.

I attended and also gave a lightning talk at RubyConf India 2012 at the Hyatt Regency, Pune, Maharashtra, India between March 24-25, 2012.

RubyConf India 2012

Day I

The keynote was delivered by Charles Oliver Nutter on JRuby, and Ruby virtual machines. This was followed by the recorded video keynote by Yukihiro Matsumoto on Ruby, its history, and his focus on Ruby for embedded and scientific computing for the next couple of years. mruby for embedded systems will be an interesting project to look forward to this summer.

I then attended the talk on “Using Ruby to Craft and Test Beautiful Command Line Applications” by Nikhil Mungel and Shishir Das, who gave useful examples on how to construct meaningful and helpful command line tools. Abhishek Parolkar, founder of BigData.sg, spoke on available Ruby tools, and architectures for processing large volumes of data in the “Ruby for the soul of Big Data nerds” talk.

Post lunch, I attended the session on “Responsive Design: now 90% easier with SASS!” by Arpan CJ, who also designed the RubyConf India 2012 website. He explained how Sass is useful in creating websites that can be quickly made to fit different display dimensions and resolutions across phones, tablets, and PCs.

Steven Deobald presented on “Clojure is my favourite ruby”. He gave wonderful programming construct examples for Ruby and Clojure, and why he enjoyed Clojure more than Ruby. For the last talk of the day, I attended Sandip Ransing and Shailesh Patil’s talk on “VoIP on Rails in India” where they had developed a call centre Rails front-end application that uses Adhearsion. They have an internal LAN setup for call centres: Rails application -> Adhearsion -> Asterisk -> PRI (Primary Rate Interface) -> PSTN (Public Switched Telephone Network).

There were quite a number of lightning talks at the end of the day. One from flipkart.com, where they mentioned that they use a service oriented architecture with JSON over HTTP, along with RabbitMQ, Padrino and JRuby.

Day II

The second day began with a keynote by Mikel Lindsaar on “How to win”, where he emphasized on defining a purpose/reason to do anything and everything. Chang Sau Sheong presented on using Ruby and R tools for doing population simulation in his “Sex, Money and Evolution - Simulation and Data Analysis with Ruby and R” talk. Niranjan Prabhakar Sarade gave an overview of the internal data structures present in the Ruby MRI virtual machine source code in the “What lies beneath the beautiful code?” talk.

After lunch, I attended the “Smells and patterns in test/spec code” talk by Sidu Ponnappa and Aninda Kundu where they discussed the different patterns and smells of test driven code, and their implications. Karunakar presented on “Large scale Ruby project, challenges and Pitfalls”, sharing his experience on managing and maintaining large scale Ruby projects. For the last talk of the day, I attended Matthew Kirk’s talk on “‘method_missing’ Should be Missing” where he talked about the overuse of method_missing, “monkey patching”, and eval from his experience.

Lightning talks were scheduled for the second day as well, and I was happy to present nursery_rhymes.rb. Few photos taken during the event are available in my /gallery.

I had presented the (in)famous “i-want-2-do-project.tell-me-wat-2-do-fedora” presentation as a guest lecturer at “Pragyan 2012”, NIT, Trichy, Tamil Nadu, India on Sunday, February 26, 2012.

NIT Trichy

Most of the student participants were familiar with the the *nix desktop. I explained to them the various project, communication guidelines, and best practices that they need to follow when working on free/open source software projects. I had also introduced them to the various Fedora sub-projects that they can participate and learn from.

Audience

Four years ago, I was invited by the Pengufest team of Pragyan, but, I couldn’t make it then. Apparently, my presentation has been circulating among them for quite some time, and they now got to hear it from the horse’s mouth.

On Saturday, as part of the Pengufest track there were sessions held by Dr. Viswanath Poosala on “Engineering Innovation - A recipe for coming up with disruptive ideas”, and sessions on “How to be a Hacker?”, “Functional Programming and why it matters”, and “Lisp - God’s own programming language” by Vivek Shangari.

I also attended Suraj Kumar’s talk on “GNU/Linux in large scale Internet based businesses”, where he addressed the different concepts, terminologies and F/OSS tools that people use for large scale web deployments.

I would like to thank Red Hat for sponsoring my travel, and the organizing team of Pragyan 2012 for the wonderful hospitality.

Twilight

More photos taken during the trip are available in my /gallery.

Few photos taken on a trip to Karaikudi, Tamil Nadu, India. More photos in my /gallery.

Street view Inside courtyard Chettinad palace

Netlist is a simplified and generic netlist designed to be compatible with Hardware Description Languages (HDLs) like Verilog and VHDL. It is now available in Fedora. Install it using:

 $ sudo yum install ghc-netlist-devel

An example usage from the sources is given below:

import Language.Netlist.AST
import Language.Netlist.Util

t :: Module
t = Module "foo" (f ins) (f outs) [] ds
  where
    f xs = [ (x, makeRange Down sz) | (x, sz) <- xs ]
    ins = [("clk", 1), ("reset", 1), ("enable", 1), ("x", 16)]
    outs = [("z", 16)]

ds :: [Decl]
ds = [ NetDecl "a" (makeRange Down 16) (Just (ExprVar "x"))
     , NetDecl "b" (makeRange Down 16) (Just (sizedInteger 16 10))
     , MemDecl "c" Nothing (makeRange Down 16) Nothing
     , ProcessDecl (Event (ExprVar "clk") PosEdge)
                   (Just (Event (ExprVar "reset") PosEdge, (Assign (ExprVar "c") (sizedInteger 16 0))))
                   (If (ExprVar "enable")
                         (Assign (ExprVar "c") (ExprVar "x"))
                         Nothing)
     ]

Load it using ghci version 7.0.2 gives:

$ ghci Test.hs 
GHCi, version 7.0.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main             ( Test.hs, interpreted )
Ok, modules loaded: Main.

You can check the value of ‘ds’ using:

~~~~ {.haskell} Main> ds Loading package array-0.3.0.2 … linking … done. Loading package bytestring-0.9.1.10 … linking … done. Loading package containers-0.4.0.0 … linking … done. Loading package binary-0.5.0.2 … linking … done. Loading package syb-0.3 … linking … done. Loading package netlist-0.3.1 … linking … done. [NetDecl “a” (Just (Range (ExprLit Nothing (ExprNum 15)) (ExprLit Nothing (ExprNum 0)))) (Just (ExprVar “x”)),NetDecl “b” (Just (Range (ExprLit Nothing (ExprNum 15)) (ExprLit Nothing (ExprNum 0)))) (Just (ExprLit (Just 16) (ExprNum 10))),MemDecl “c” Nothing (Just (Range (ExprLit Nothing (ExprNum 15)) (ExprLit Nothing (ExprNum 0)))) Nothing,ProcessDecl (Event (ExprVar “clk”) PosEdge) (Just (Event (ExprVar “reset”) PosEdge,Assign (ExprVar “c”) (ExprLit (Just 16) (ExprNum 0)))) (If (ExprVar “enable”) (Assign (ExprVar “c”) (ExprVar “x”)) Nothing)]Main> ~~~~

I attended GNUnify 2012 on February 10-11, 2012 at Symbiosis Institute of Computer Studies and Research, Pune, India.

Day I

The first day first session that I attended was on “Build your own cloud computing infrastructure” by Arun Khan. He addressed the different concepts and tools available for setting up a private computing infrastructure. After the first session, I moved to listen to Saleem Ansari’s talk on “Torque Box - Ruby App Server”. TorqueBox is small adaptation layer on top of JBoss’s Java application server. I then attended Srikant Patnaik’s talk on “Web based embedded project design”. He demonstrated a simple example of using an LED with Arduino and controlling it with a Python CGI webserver. He also demonstrated the use of Fritzing to build the demoed circuit. All the tools are available on Fedora:

 $ sudo yum install fritzing arduino

After lunch, I attended the talk on “Btrfs - The next Generation Filesystem on Linux” by Neependra Khare. He addressed the different problems in the current filesystems, and how Btrfs tries to solve them. For the last talk of the day I attended Dr. Abhijat Vichare’s (from Computational Research Laboratories Pune) session on “Portability concepts in GCC”. It was a detailed session on the internals of GCC.

Day II

I attended Suchakra Sharma’s session on “Developing QT Apps on Android”. I then went to assist with the system programming contest organized by Neependra Khare. The participants were given a written test on the first day, and based on the results, few were selected to compete in the programming contest (sponsored by STEC). For the contest, few programming problems were given to the participants to be solved in C within couple of hours time. The first, second and third prices were worth INR 5000, 3000 and 2000 respectively. Kiran Divekar (from Marvell) joined us, and we reviewed the code and chose the winners. After lunch, we announced the winners and the organizers and PLUG members helped with the prize distribution.

Programming contest

I then went to attend Arun Khan’s session on “Convert your old laptop to an useful network device”. He had illustrated with numerous examples on how he had used old hardware into functional, useful network devices. It is extremely useful for beginners who are interested in getting started in working with inexpensive hardware. I then had a chance to meet and talk with Gen Kanai and Rakesh “Arky” Ambati from Mozilla. It was also good to catch up with lot of Wikimedia folks, with whom I went for dinner at the Vaishali restaurant. Few pictures taken during the event are available in my /gallery.

Wikimedia dinner at Vaishali

I attended the 25th International Conference on VLSI Design and 11th International Conference on Embedded Systems between January 7-11, 2012 at the Hyderabad International Convention Centre, Hyderabad, India. The first two days consisted of tutorial sessions, and the next three days had the conference presentations. There were also exhibit stalls from different companies.

25th VLSID 2012

On the first day I attended the tutorial session on SystemC AMS extensions by Markus Damm, Sumit Adhikari, and François Pecheux. Chitlesh Goorah had earlier tried to get SystemC into Fedora and Fedora Electronic Lab, but, due to licensing issues it could not be included. SystemC-AMS is now released under Apache license. Open SystemC Initiative and Accellera Unite have now integrated to become Accellera Systems Initiative. We hope to work with them to get their sources under a single free/open source software license. François Pecheux is from Laboratoire d’Informatique de Paris 6, Pierre & Marie Curie University (UPMC), Paris, France, and we already ship their free/open source EDA tools in Fedora.

On day two, I attended the tutorial session by Sridhar Arvind on 3D-ICE, a free/open source interlayer cooling emulator from Embedded System Laboratory, Ecole polytechnique fédérale de Lausanne, Switzerland. I have already been working with Sridhar, Prof. David Atienza and Alessandro Vincenzi on testing 3D-ICE on Fedora. I had built and tested the dependency SuperLU library and the 3D-ICE package before the tutorial session. Their software has already been downloaded by over 70 research labs around the world. I will push our tested changes to them. On the later half of the day, I attended a session on verification constraint complexity. Teal is a useful verification utility and connection library that has support for constraints and parameter control. The authors of the tool had agreed to release it as free/open source software, and we also ship it in Fedora.

On the following three days of the conference, I attended various paper presentations from different tracks from reconfigurable architectures to methods in AMS optimization. I met Prof. Susmita Sur-Kolay from the Indian Statistical Institute, Kolkata, India where they run Fedora in their labs. They also wished to use the 3D-ICE tool and GPU tools in their labs. I also visited the exhibit stalls meeting different people from the industry and academia. There are quite a few interesting free/open source tools that users can benefit from, and we will work in making them available in Fedora. In 2013, the conference will be held in Pune. Thanks to Red Hat for sponsoring my travel and participation at the conference.

I had conducted an introductory session on Fedora as part of the Tux workshop, MindSpark 2011 at College of Engineering, Pune, Maharashtra, India on Tuesday, December 27, 2011.

Tux workshop

There were hundred participants distributed between the morning and repeat sessions in the afternoon. I explained about hardware architecture, system boot sequence, and discussed basic installation concepts to the participants. I then gave a demo of installing Fedora using Virtual Machine Manager. I showed them the plethora of F/OSS software that they can use, and also discussed about Fedora sub-projects, and basic project/communication guidelines. I have given them F16 ISO DVD images.

Thanks to Sanket Mehta for working with me for a month in organizing this workshop. Few photos taken at the event are available in my /gallery.

« OLDER POSTSNEWER POSTS »