Integrate sTeam-shell into Vi and Indentation of output

(ˢᵒᶜⁱᵉᵗʸserver) aims to be a platform for developing collaborative applications.
sTeam server project repository: sTeam.

Indentation of sTeam-shell output

The Indentation of the output in the look command in steam-shell is formatted to be displayed in the way the output is displayed when the ls command is executed in a terminal window.

The module reference provided by the pike language is used for formatting.
The pike reference module can be found at Pike Ref module

The screen-width of the the user is calculated using the command tput rows.
This value is then passed as an argument to the write function to display it in the form of output of an ls command.
The example of this can be seen in the modref by Pike.

Issue. Github Issue Github PR
Indentation of output in steal-shell. Issue-24 PR-42

Example:

write("%-$*s\n", screen_width,"Given a\nlist of\nslosh-n\nseparated\n'words',\nthis option\n"+ "creates a\ntable out\nof them\nthe number of\ncolumns\n"+"be forced\nby specifying a\npresision.\nThe most obvious\n"+"use is for\nformatted\nls output.");

Output:

 Given a          list of          slosh-n
 separated        'words',         this option
 creates a        table out        of them
 the number of    columns          be forced
 by specifying a  precision.       The most obvious
 use is for       formatted        ls output.

The following changes have been made in order to incorporate the changes:

IndentationCodeChange

Integration of sTeam-shell into Vi

For integration of sTeam-shell.pike into the Vi, the steam-shell is made compatible to be run when a command is passed as an argument to it. The changes have been made in steam-shell.pike and the applauncher.pike. Also a new file called as VisTeam.pike is created. When this is executed it validates the user and opens two vi buffers. One for typing the command and the other to display the log/ output of the executed command.

A steam-shell.vim vi plugin is created so as to be able to run the Steam function in vi. Whenever this function is executed the selected text in the vi visual mode will be executed.

The results are displayed in the log buffer in a new tab. Since the already existing vim scripts Goldenratio.vim and watchforchanges.vim divide the command buffer and the log buffer in the ration 2:1, the output is not visible in the logs. Thus a newtab consisting of the logs is opened.

Issue. Github Issue Github PR
Integrate sTeam-shell into Vi. Issue-37 PR-41

InsertIntoVIExecute the command:

ExecuteCommandsTeam

Display the output:

DisplayTheOutput

Checkout the FOSSASIA Idea’s page for more information on projects supported by FOSSASIA.

Continue ReadingIntegrate sTeam-shell into Vi and Indentation of output

Google Summer of Code: A new beginning

I am working on sTeam under FOSSASIA for GSoC 2016. sTeam is collaboration platform. It allows users to form groups and share various kinds of documents. It provides a virtual knowledge space where users can meet and interact. These spaces are called rooms, these can contain various containers to store documents in an organized manner. The rooms are connected by gates to allow the movement of users and documents from one room to another. The most interesting thing about the project is that it is in pike programming language. This is not very commonly used and I will get to learn new things and myriad of experiences.



Now moving into the technical details of my project I will be talking about the first step in my project that is implementing TLS (Transfer Layer Security) Protocol, also known as SSL. Currently all the communication between the server and the command line client is over COAL protocol. COAL is a home grown protocol developed by the original developers of sTeam. Currently COAL does not use any kind of encryption. My first task will be to integrate SSL into COAL, so just like http becomes https COAL will become COALS. After this I will be working on the improving the client interface, which I will talk about in the coming weeks.


For now in the community bonding period I have been actively participating in the discussions on the IRC and working on stash, discovering bugs in the project and getting used to the interface and the code. Recently we received the guidelines for the summer from our mentors Martin and Trilok. The guidelines include clearly mentioned milestones and the tasks we need to complete. We will also be having a team meeting everyday discussing our day’s work and issues.



I would like to thank FOSSASIA for giving me this wonderful oppurtunity to show my skills. All the discussion during this period is just making me feel more professional and getting me excited for the summers. In programmers term

printf(“let the fun begin !”);

Continue ReadingGoogle Summer of Code: A new beginning

Participate in FOSSASIA Summit 2016 in Science Center Singapore, March 18th-20th

Please join us at FOSSASIA 2016 in Singapore, the premier Open Technology event in Asia.

The event will take place from March 18-20 at the Singapore Science Center and already on 17th March the pgDay Asia conference is part of the pre-event activities.

The FOSSASIA weekend from Friday to Sunday is dedicated to the “Internet of Things and Me” covering open technologies and software that make todays connected devices run. In workshops kids can start learning with the Pocket Science Lab. In the Science Hack track attendees will learn how to participate in the Citizen Science community. Please:

More than 120 speakers from Asia and around the world will join the event from communities and companies such as Google, RedHat, and Github. There will be talks and hands on workshops on topics including:

  • Open Hardware, Makers, Internet of Things
  • Open Source Software, Data and Free Knowledge
  • DevOps, Docker, Programming languages, Python, Go, and more
  • Science Hacks and Open Design
  • Tech and Science for Kids

Info on the FOSSASIA Summit 2016 at the Event Website

Read the Call for Speakers here.

Join the FOSSASIA Meetup Group in Singapore and reserve your spot in workshops as soon as they are announced.

Follow us on Twitter.

Check out the photos from last year on Flickr.

Continue ReadingParticipate in FOSSASIA Summit 2016 in Science Center Singapore, March 18th-20th

Being a mentor ! #GoogleCodeIn

Google Code-In 2015/2016 just concluded and it was an enriching experience to be a prime segment of this cool initiative.

It feels great to have worked as a Mentor for Google Code-In 2015/2016 under FOSSASIA organization 🙂gci-vertical-1142x994dp

I strongly believe that helping people steer their careers in the right direction is a key element in developing. The esteemed task of mentoring is an essential leadership skill. In addition to managing and motivating people, it’s also important that one can help others learn, grow and become more effective in their lives.

My experience with mentoring Google Code-In tells me that mentoring is a rewarding experience, both personally and professionally. It not only aids in improving communication skills but also brings about a a great sense of personal satisfaction. One gains a new perspective of thinking and gets to advance technical skills by learning together with the mentee.

The mentor-ship experience was a surreal one. I never knew my answers and feedback to simple questions could be the cause of someone’s high spirits. It made me realize the impact one’s guidance could have on a budding developer. My feeling of immense contentment was augmented by the innocent tweets and blog posts of the mentees expressing their gratitude and happiness. (refer a few screenshots attached 😀 )

CZaBPEnUAAA5zOP (1)

Screenshot from 2016-01-08 22:12:40

Screenshot from 2016-02-12 00:18:58
The journey in this field will urge to shed all inhibitions, keep pride aside and dive into this worthy mission of building a powerful community. The small interesting conversations and tasks will sometimes leave a deep impact on the mentor as a person, after-all not everyday one comes across a student submitting “Peace Pledge: No ! To war and distrust” to his/her mentor where both belong to two countries supposedly at ‘cold war’ 😉

I am also of the view that by being a mentor to a newbie, we pay our regards to the entire computing sphere and its fraternity.

Helping the mentee have a smooth transition into the tech world helps make long lasting associations and ensure a better future.

A season of mentoring gone by, excited for another already !

Continue ReadingBeing a mentor ! #GoogleCodeIn

Updates on FOSSASIA Activities – GSoC, Science Hack and Meshcon

FOSSASIA Participation in Google Summer of Code

An exciting summer is behind us, where we had lots of students coding on summer of code projects. Check out some of the outcome on our project repositories. For example the Open Event project, our twitter harvester and search engine loklak.net [repo] or the activities at our FashionTec knitapps project with lots of interesting blog articles.

FOSSASIA Science Hack

What else happened? FOSSASIA’s Hong Phuc is working on organizing Science Hack events across Asia in cooperation with Science Hack Day. She is now an official Ambassador. Congratulations! You can meet her in the US at the San Francisco Science Hack Day on October 24-25, 2015 at GitHub HQ.

FOSSASIA Participants Present at Meshcon @Maker Faire Berlin + Free Tickets

FOSSASIA participants are present at Meshcon@Maker Faire Berlin on Saturday, October 3rd. Meshcon brings together Mozilla’s Firefox Open Web makers, IoT experts, industry representatives, fashion designers, local producers, knitters, textile manipulators, software developers and DIY hardware makers. We will have a stand in the club area. So if you are there, please come over and talk to us.

And, if you are in Berlin and still need a ticket, we might be able to help you out. FOSSASIA is an official partner and we got free tickets. Please go to http://meshcon.net, choose your ticket and enter the code FLDUXH on the next page.

The event starts at 10am (until 6pm) on Sat. 3rd Oct. 2015 at Postbahnhof Club at Berlin Ostbahnhof. On top of topics around Fashion and technology, we are coding, doing usability tests and hack for refugees. The schedule of talks is available here: http://meshcon.net/schedule.pdf

130 projects will showcase their work at the Maker Faire. Workshops include FOSSASIA’s machine knitting project, 3D printing, and Arduino tinkering:

* http://www.meetup.com/FashionTec-Meetup-Berlin/

* http://www.meetup.com/OpenXLab/

* http://www.meetup.com/opentechschool-berlin/events/225532149/

Additional Info: http://meshcon.net | http://makerfaire.berlin

Location: Postbahnhof, Strasse der Pariser Kommune 8, 10243 Berlin

Continue ReadingUpdates on FOSSASIA Activities – GSoC, Science Hack and Meshcon

searchQuick Apprise: EIGHT #GoogleSummerOfCode #FOSSASIA

banner-gsoc2015.png.pagespeed.ce.1-XG35qq3R8SQJ5DGgL9

The intended searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.

header


Bringing up to the rear of the summers, the project was brought to a penultimate stage by achieving the following tasks:

    • Handling empty string searches by raising error pop ups.
      searchButtonClicked
      searchBar accept .
      (myString isEmptyOrNil  ) 
      ifTrue: [self errorPopUp ] 
      ifFalse: [ 
           myString := searchBar getText asString .
                self printSearchResults
                     ] .
    • Adding Help, About and Feedback sections to give an authentic application look and required details to an interested developer.
    • Inserting ScrollPane for BrowseFile list menu
      browseScroll := ScrollPane new.
      browseScroll scroller addMorph: browse.
    • Truncating BrowseFile list menu file titles to have their extent within the #MenuMorph: boundary
      title := anObject truncateWithElipsisTo: 25. 
    • Removal of OK/CANCEL buttons from the Search results accordion widget
      dialog buttons: {}.
    • Implementation of a Search Bar for searching via Search results accordion widget.
    • Categorizing methods as: accessing, initializationsubmorphsadd/remove etc.
    • Removal of unwanted/redundant/commented code lines i.e. scrubbing dead-code.

UPCOMING: Wrap Up.


Continue ReadingsearchQuick Apprise: EIGHT #GoogleSummerOfCode #FOSSASIA

[Tutorial] Continuous Integration Automated Build for your Pharo Application

reposted from jigyasagrover.wordpress.com/ci-automated-build-for-your-pharo-application

Hello Fellas !

This post aims to put forward the basics of Build Automation and also brief the steps required to put up a Pharo application on Continuous Integration, Inria which is a platform for Scheduled Automated Build.
For simplicity, Build automation is the act of scripting or automating a wide variety of tasks that software developers do in their day-to-day activities including things like:
  • compiling computer source code into binary code
  • packaging binary code
  • running automated tests
  • deploying to production systems
  • creating documentation and/or release notes

Various types of automation are as:

  • On-Demand automation such as a user running a script at the command line
  • Scheduled automation such as a continuous integration server running a nightly build
  • Triggered automation such as a continuous integration server running a build on every commit to a version control system.
In recent years, build management tools have provided relief when it comes to automating the build process.
The dominant benefits of continuous integration include:
  • Improvement of product quality
  • Acceleration of compile and link processing
  • Elimination of redundant tasks
  • Minimization of ‘bad builds’
  • Have history of builds and releases in order to investigate issues
  • Save time and money – because of above listed reasons.

A build system should fulfill certain requirements.

Basic requirements:

  1. Frequent or overnight builds to catch problems early.
  2. Support for Source Code Dependency Management
  3. Incremental build processing
  4. Reporting that traces source to binary matching
  5. Build acceleration
  6. Extraction and reporting on build compile and link usage

Optional requirements:

  1. Generate release notes and other documentation such as help pages
  2. Build status reporting
  3. Test pass or fail reporting
  4. Summary of the features added/modified/deleted with each new build

Considering the above mentioned advantages of automated build, the below enlisted steps will help to put up your own Pharo application hosted on github on the CI server for continuous integration/scheduled build.
 1. Log on to Continuous Integration, Inria website (https://ci.inria.fr/).

Screenshot from 2015-08-08 15:53:49
2. Click on ‘Sign Up‘ at the top-right corner, enter the required details and register for CI.

Screenshot from 2015-08-08 15:54:02
3. From the ‘Dashboard‘ option located at the top most of the screen click on ‘Join an existing project‘ blue button as shown .

Screenshot from 2015-08-08 15:59:22
4. Search ‘pharo-contribution‘ in the enlisted public projects and click on ‘Join

5. On clicking the ‘Join‘ button, a message stating: “Request to join the project ‘pharo-contribution’ sent.” appears.

6. It might take a day or two for the request approval mail to deliver at your registered Email ID.

The E-Mail content is as follows:
        Your request to join pharo-contribution has been accepted
        Hi _ _ _,
        Your request to join the project pharo-contribution has been accepted !
        Regards,
        Support team.

7. Click on ‘My Account‘ option and under ‘My Projects‘ check the status of pharo-contribution project. It should state ‘member‘.

Screenshot from 2015-08-08 16:17:55
8. Now, visit the LINK: https://ci.inria.fr/pharo-contribution/job/JobTemplate/  to create a ‘New Job

Screenshot from 2015-08-08 16:21:06
9. Read all the steps mentioned carefully. After going through all the points, click on the ‘New Job‘ mentioned in point 2 on the Project Job Template web page.

10. Enter the ‘Project Name‘ in the ‘Item Name: ‘ box and choose ‘Copy from existing item‘ option and fill ‘JobTemplate

Screenshot from 2015-08-08 16:30:01
11. After clicking OK, You will be directed to your project configuration.

12. Fill in the description of the project in the desired box.

Screenshot from 2015-08-08 16:32:31
13. Fill int the configuration details of your project like:

* Maximum number of builds
*  Link to GitHub Project
*  Source Code Manager
* Build Triggers
*  Schedule of build (@hourly, @daily, @weekly, @fortnightly, @monthly, @yearly etc.)
*  Configuration Matrix (User Defined Axis: Name && Version Values- stable, development etc.)
* Build environment options
* Post-build actions
*  Report regressed tests

14. The main task is to carefully write the commands in the ‘Execute Shell
The default commands are as:

Screenshot from 2015-08-08 16:39:06
15. After saving and applying the changes, the application is all set for automated build.

16. Each build’s ‘Console Output‘ can be used to analyse the steps and highlight the weak areas of the project.
For instance: The below output is of a project whose stable version build was successful.

Screenshot from 2015-08-08 16:49:05

TIP: Keep a regular tab on the build results and analyze each line of the Console Output with utmost care.

Hope this post was able to help you start with the automation build process of Pharo Application.

Do like if it was worth a read !
Post queries/suggestions as comments 🙂 Looking forward to them.


UPCOMING: Next, I plan to share experience of putting up my Pharo application searchQuick on CI Inria for automated build. I intend to detail about the various configuration settings applied along with the Execute Shell commands utilized for a GitHub project 🙂


Introduction Accredits: Wikipedia 
Resources:  Build Automation and Continuous Integration .


Continue Reading[Tutorial] Continuous Integration Automated Build for your Pharo Application

A low-cost laboratory for everyone: Sensor Plug-ins for ExpEYES to measure temperature, pressure, humidity, wind speed, acceleration, tilt angle and magnetic field

Working on ExpEYES in the last few months has been an amazing journey and I am gratful of the support of Mario Behling, Hong Phuc Dang and Andre Rebentisch at FOSSASIA. I had a lot of learning adventures with experimenting and exploring with new ideas to build sensor plug-ins for ExpEYES. There were some moments which were disappointing and there were some other moments which brought the joy of creating sensor plug-ins, add-on devices and GUI improvements for ExpEYES.

My GSoC Gallery of Sensors and Devices: Here are all the sensors I played with for PSLab..

The complete list of sensor plug-ins developed is available at http://gnovi.edublogs.org/2015/08/21/gsoc-2015-with-fossasia-list-of-sensor-plug-ins-developed-for-expeyes/

Sensor Plugins for ExpEYES

The aim of my project is to develop new Sensor Plug-ins for ExpEYES to measure a variety of parameters like temperature, pressure, humidity, wind speed, acceleration, tilt angle, magnetic field etc. and to provide low-cost open source laboratory equipment for students and citizien scientists all over the world.

We are enhancing the scope of ExpEYES for using it to perform several new experiments. Developing a low-cost stand alone data acquisition system that can be used for weather monitoring or environmental studies is another objective of our project.

I am happy to see that the things have taken good shape with additional gas sensors added which were not included in the initial plan and we have almost achieved all the objectives of the project, except for some difficulties in calibrating sensor outputs and documentation. This issue will be solved in a couple of days.

Experimenting with different sensors in my kitchen laboratory

I started exploring and experimenting with different sensors. After doing preliminary studies I procured analog and a few digital sensors for measuring weather parameters like temperature, relative humidity and barometric pressure. A few other sensors like low cost piezoelectric sensor, accelerometer ADXL-335, Hall effect magnetic sensor, Gyro-module etc were also added to my kitchen laboratory. We then decided to add gas sensors for detecting Carbon Monoxide, LPG and Methane.

With this development ExpEYES can now be used for pollution monitoring and also in safety systems in Physics/chemistry laboratory. The work on the low-cost Dust Sensor is under progress.

Challenges, Data Sheet, GUI programs

I had to spend a lot of time in getting the sensor components, studying their data sheets, soldering and setting them up with ExpEYES. And then little time in writing GUI Programs. I started working almost 8 to 10 hours every evening after college hours (sometimes whole night) and now things have taken good shape.

Thanks to my mentor at FOSSASIA for pushing me, sometimes with strict words. I could add many new sensor plug-ins to ExpEYES and now I will also be working on Light sensors so that the Pocket Science Lab can be used in optics. With these new sensor plug-ins one can replace many costly devices from Physics, Chemistry, Biology and also Geology Lab.

What’s next? My Plan for next steps

  • Calibration of sensor data

  • Prototyping stand-alone weather station

  • Pushing data to Loklak server

  • Work on PSLab@Fossasia website

  • Fossasia Live Cd based on Lubuntu with ExpEYES and other educational softwares

  • Set-up Documentation for possible science experiments with the sensor plug-ins and low-cost, open source apparatus

Continue ReadingA low-cost laboratory for everyone: Sensor Plug-ins for ExpEYES to measure temperature, pressure, humidity, wind speed, acceleration, tilt angle and magnetic field

searchQuick Apprise: SEVEN #GoogleSummerOfCode #FOSSASIA

banner-gsoc2015.png.pagespeed.ce.1-XG35qq3R8SQJ5DGgL9

The intended searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.

header


After the chief tasks of search functionality and automated build were done with, the next undertaking included working on finer details and embellishments.

  • Embedding Jenkins automated build status icon in GitHub markdown file
  • Relative widget re-sizing by using ‘World extent x‘ and ‘World extent y‘ co-ordinates instead of hard coded co-ordinates
  • Modifying the Accordion Widget by addition of ‘Search Bar‘ at the top
  • Checking for duplicates in the ‘Browse Files‘ menu, thus reducing the CPU consumption
  • Equalizing the sizes of all the windows to bring uniformity
  • Addition of ‘Scroll Pane‘ in accordion search result display list
  • Multi-line search result display by extending the Expander Title Morph and use of new line character in labels (otherwise not supported by default)
  • Truncating file content to first n characters for neater look in Expander Title

Latest Screenshot of Accordion Widget:
Screenshot from 2015-08-18 18:38:06
UPCOMING:

  • Removal of OK & CANCEL buttons (present by default in Pluggable Dialog Window) from Accordion Widget
  • Implementing of Search via the result window as well
  • Relative re-sizing of background images (Image Morphs)

Continue ReadingsearchQuick Apprise: SEVEN #GoogleSummerOfCode #FOSSASIA

searchQuick Apprise: SIX #GoogleSummerOfCode #FOSSASIA

banner-gsoc2015.png.pagespeed.ce.1-XG35qq3R8SQJ5DGgL9

The intended searchQuick” (sQuick) is an application to enable a user to search a set of books or texts, like an encyclopedia, or some other topical book collection offline built in the open source platform Pharo 4.0.

header



The main task achieved was putting up the application up on Continuous Integration, Inria for automated build. It was indeed a beneficial idea as it helped me keep a check on the builds and work on issues.
Being a newbie, this work was cumbersome initially but with the help of my mentors and the #pharo community, I was able to accomplish it. To assist fellow Pharo-ers, I have compiled all the information regarding CI Automated Build for yout Pharo Application and published the same on my blog-spot. Kindly go through it for a complete understanding 🙂

Other tasks completed as of now include:

  • Putting up the project for automated build on https://ci.inria.fr/
  • Successful ‘stable’ and ‘development’ version builds
  • Accessing resource folder via MCGitHubRepository, Removal of manual download option
  • By default full screen system window open
  • Removing redundant code by creating open argument methods
  • Abolishment of hard-coded font family and font point size
  • Categorization of methods & classes
  • GUI Embellishment with background colors, borders etc.

Upcoming: 

  • Dynamic widget re-sizing
  • Multi-line search result title
  • Putting up Help and About sections
  • Removal of old configurations

Continue ReadingsearchQuick Apprise: SIX #GoogleSummerOfCode #FOSSASIA