Planet SMC

October 27, 2014

Santhosh Thottingal

New handwriting style font for Malayalam: Chilanka

A new handwriting style font for Malayalam is in development. The font is named as “Chilanka”(ചിലങ്ക).

This is a alpha version release. Following is a sample rendering.

More samples here.

You may try the font using this edtiable page http://smc.org.in/downloads/fonts/chilanka/tests/ -It has the font embedded

Download the latest version: http://smc.org.in/downloads/fonts/chilanka/Chilanka.ttf

Chilanka/ചിലങ്ക is a musical anklet

A brief note on the workflow I used for font development is as follows

  1. Prepared a template svg in Inkscape that has all guidelines and grid setup.
  2. Draw the glyphs. This is the hardest part. For this font, I used bezier tool of inkscape. SVG with stroke alone is saved. Did not prepare outline in Inkscape, this helped me to rework on the drawing several times easily. To visualize how the stroke will look like in outlined version, I set stroke width as 130, with rounded end points. All SVGs are version tracked. SVGs are saved as inkscape svgs so that I can retain my guidelines and grids.
  3. In fontforge, import this svgs and create the outline using expand stroke, with stroke width 130, stroke height 130,  pen angle 45 degree, line cap and line join as round.
  4. Simplify the glyph automatically and manually to reduce the impact of conversion of Cubic bezier to quadratic bezier.
  5. Metrics tuning. Set both left and right bearings as 100 units(In general, there are glyph specfic tuning)
  6. The opentype tables are the complex part. But for this font, it did not take much time since I used SMC’s already existing well maintained feature tables. I could just focus on design part.
  7. Test using test scripts

Some more details:

  • Design: Santhosh Thottingal
  • Technology: Santhosh Thottingal and Kavya Manohar
  • Total number of glyphs: 676. Includes basic latin glyphs.
  • Project started on September 15, 2014
  • Number of svgs prepared: 271
  • Em size: 2048. Ascend: 1434. Descend: 614
  • 242 commits so far.
  • Latest version: 1.0.0-alpha.20141027
  • All drawings are in inkscape. No paper involved, no tracing.

Thanks for all my friends who are helping me testing and for their encouragement.
Stay tuned for first version announcement :)

(Cross posted from http://blog.smc.org.in/new-handwriting-style-font-for-malayalam-chilanka/ )

by Santhosh Thottingal at October 27, 2014 06:18 AM

October 26, 2014

Santhosh Thottingal

HOWTO: Wacom Bamboo CTH301K in Debian

This is a short documentation on getting Wacom Bamboo CTH301K working in Debian. I use Debian Sid with Linux kernel 3.16 at the time of writing this. But this should work with latest Ubuntu(14.04 or 14.10) and new kernels.

Wacom Bamboo CTH301K is an entry level touch pad with stylus – you can use it as a mouse, or drawing pad with stylus. It has multitouch features like pinch zoom and all. I got all working.

Eventhough wacom has drivers for their many models in linux kernel, this particular model with device id: 056a:0318 does not have a driver in kernel. When you connect it, you will see it is listed in the lsusb output as
Bus 003 Device 016: ID 056a:0318 Wacom Co., Ltd

But touch or stylus wont work because of missing driver. First step to get stylus working is adding usbhid.quirks=0x056a:0x0318:0x40000000 to the grub boot cmdline. For this, edit /etc/default/grub. Append the above string to GRUB_CMDLINE_LINUX_DEFAULT. In my system it looked like as follows:

GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/bin/systemd usbhid.quirks=0x056a:0x0318:0x40000000"

You need to save this file and run update-grub command to get this updated in grub. There are alternate ways to pass this string to modprob, but this method make sure it works always in every system restart. Once done, you will see the stylus getting detected and working. Touch will not work still-This is because the default wacom driver picked up does not know about this device.

To get touch working, open /usr/share/X11/xorg.conf.d/50-wacom.conf and add MatchIsTablet "on" to the first section of that file. In my machine it looked like

Section "InputClass"
        Identifier "Wacom USB device class"
        MatchUSBID "056a:*"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "wacom"
EndSection

With this the “evdev” driver will be managing the device’s touch part. Restart your X – like restrarting KDM or GDM. Or just restart the machine.

You will see stylus and touch working now. You may need to use xsetwacom command to adjust the preferences, but you can find documentation of that elsewhere.

The above method also works with wireless model, just replace the device id 0x056a:0x0318 with 0x056a:0x0319

 

by Santhosh Thottingal at October 26, 2014 01:53 PM

October 23, 2014

Pirate Praveen

DebUtsav 14 at Amrita — a rewarding experience

I have been organizing and attending many Free Software events in various campuses across the country, what sets DebUtsav@Amrita apart from all of them is the passion and enthusiasm shown by the students. It is pleasure talking to students who are already contributing to Free Software. It is a delightful break from having to explain what Free Software is about and why students should contribute to Free Software. We could just share our expereinces and listen to what they have been doing. We could discuss the challenges and how to tackle them. It is a model we want to emulate in other campuses. I could feel the inspiration in the participants when they saw the girls at the registration desk talking about contributing to the linux kernel, git for humans and zsh. So many women participating in Free Software is a rare scene for any community.

We have been organizing MinDebConfs and DebUtsav(am)s for many years with the idea of introducing debian to students and guiding them to start contributing. This time we had some passionate debates over name and content of the event. Some members of the community insisted we focus on debian only if we call it a mini debconf, because all mini debconfs have been organized like that. But Amrita was different because they already had a big and passionate community of Free Software contributors and not giving them an opportunity to share their work was not an option for us. So we renamed the event to DebUtsav, since it is a new brand we are creating, we are not constrained by the content of the previous editions. DebUtsav is the meeting point of Debian and the wider Free Software community. It is a place to exchange experiences and collaborate.

The gang

We wanted to bring some debian contributers outside India but it did not work out. Hopefully in future events we will be able to do that. Harish (I have been interacting with him most of the time) and the entire FOSS team at Amrita gets the credit of organizing this event so nicely aganst all odds. Due to the unexpected closing down of the college there was a big drop in participants than we anticipated. The FOSS team refused to leave the college and made sure the event is organized as expected. Since we had a small crowd we could do it informally and give attention to everyone.

the crowd

I was taking ruby packaging sessions and hope to get a few more contributors to the ruby packaging team. I’m hoping to see more campuses becoming active in Free Software like Amrita and we’d like to organize more debutsavs and minidebconfs. We are hoping to bring main DebConf to India if we are successful in creating a strong community across India in the next two years. Contact me if you’d like to organize on event at your college or you want to help out in organizing more events.

We ran a hacknight to setup diaspora and hoping to see them join us in running more diaspora pods to strengthen the network. We also certified some laptops for h-node.org 100% Free Software compatible hardware database.

Read Balu’s blog at http://balasankarc.in/tech/celebrating-deepavali-differently-debutsav-14/

Photos of the event https://poddery.com/posts/1407655

 

by Pirate Praveen at October 23, 2014 11:21 AM

October 21, 2014

Rajeesh K Nambiar

Malayalam opentype specification – part 1

This post is a promised followup from last November documenting intricacies of opentype specification for Indic languages, specifically for Malayalam. There is an initiative to document similar details in the IndicFontbook, this series might make its way into it. A Malayalam unicode font supporting traditional orthography is required to correctly display most of the examples described in this article, some can be obtained from here.

Malayalam has a complex script, which in general means the shape and position of glyphs are determined in relation with other surrounding glyphs, for example a single glyph can be formed out of a combination of independent glyphs in a specific sequence forming a conjunct. Take an example: ക + ്‌ ‌+ ത + ്‌ + ര => ക്ത്ര in traditional orthography. Note that in almost all the cases glyph shaping and positioning change such as this example is due to the involvement of Virama diacritic ” ്‌ “. The important rules on glyph forming are:

  1. When Virama is used to combine two Consonants, it usually forms a Conjunct, such as ക + ്‌ ‌+ ത => ക്ത. This is known as C₁ conjoining as a half form of first consonant is joined with second consonant.
  2. The notable exceptions to point 1 are when the followed Consonants are either of യ, ര, ല, വ. In those cases, they form the ‘Mark’ shapes of യ, ര, ല, വ =>  ്യ, ്ര,  ്ല,  ്വ. This is known as C₂ conjoining as a modified form of second consonant is attached to the first consonant.
  3. When Virama is used to combine a Consonant with Vowel, the Vowel forms a Vowel Mark => such as ാ, ി, ീ.

Opentype organizes these glyph forming and shaping logic by a sequence of ‘Lookup tables (or rules)’ to be defined in the font. The first part gives an overview of the relevant lookup rules used for glyph processing by shaping engine such as Harfbuzz or Uniscribe.

Only those opentype features applicable for Malayalam are discussed. The features (or lookups) are applied in the following order:

  1. akhn (Akhand – used for conjuncts like ക്ക, ക്ഷ, ല്ക്ക, യ്യ, വ്വ, ല്ല etc)
  2. pref (Pre-base form – used for pre base form of Ra –  ്‌ + ര =   ്ര)
  3. blwf (Below base form – used for below base form of La – virama+La – ്‌ + ല =  ്ല)
  4. half (Half form – Not used in mlm2 spec by Rachana and Meera, but used in mlym spec and might be useful later. For now, ignore)
  5. pstf (Post base form – used for post base forms of Ya and Va – ്‌ +യ =  ്യ, ്‌ + വ = ്വ. Note that  യ്യ & വ്വ are under akhn rule)
  6. pres (Pre-base substitution – mostly used for ligatures involving pref Ra – like ക്ര, പ്ര, ക്ത്ര, ഗ്ദ്ധ്ര  etc)
  7. blws (Below base substitution – used for ligatures involving blwf La – like ക്ല, പ്ല, ത്സ്ല etc. Note that  ല്ല is under akhn rule)
  8. psts (Post base substitution – used for ligatures involving post base Matras – like കു, ക്കൂ, മൃ etc)
  9. abvm (Above base Mark  positioning – used for dot Reph – ൎ)

Last 3 forms (pres, blws, psts) are presentation forms, they have lower priority in the glyph formation. They usually form the large number of secondary glyphs. The final one (abvm) is not a GSUB (glyph substitution lookup) but a GPOS (glyph position lookup) – this is used to position dotreph correctly above the glyphs.

  • akhn: Use this for conjuncts (കൂട്ടക്ഷരങ്ങള്‍) like ക്ക, ട്ട, ണ്ണ, ക്ഷ, യ്യ, വ്വ, ല്ല, മ്പ. This rule has the highest priority, so akhn glyphs won’t be broken by the shaping engine.
  • pref: Used only for pre-base form of Ra ര –  ്ര
  • blwf: Used only for below base form of La ല –  ്ല
  • pstf: Used for the post base forms of Ya, Va യ, വ – ്യ, ്വ
  • pres: One of the presentation forms, mostly used for ligatures/glyphs with pref Ra ര – like ക്ര, പ്ര, ക്ത്ര, ഗ്ദ്ധ്ര etc. This could also used together with the ‘half’ forms in certain situations, but that is for later.
  • blws: Used for ligatures/glyphs with blwf La ല – like ക്ല, പ്ല, ത്സ്ല etc.
  • psts: Used by a large number of ligatures/glyphs due to the post base Matras (ു,ൂ,ൃ etc) – like  കു, ക്കൂ, മൃ etc. Other Matras (ാ,ി,ീ,േ,ൈ,ൈ,ൊ,ോ,ൌ,ൗ) are implicitly handled by the shaping engine based on their Unicode properties (pre-base, post-base etc) as they don’t form a different glyph together with a consonant – there is no need to define lookup rules for those matras in the font.

I will discuss these lookup rules and how they fit in the glyph shaping sequence with detailed examples in next episodes.

(P.S: WordPress tells me I started this blog 7 years ago on this day. How time flies.)


Tagged: fonts, opentype

by Rajeesh at October 21, 2014 10:03 AM

October 02, 2014

Hrishi

ചങ്ങലയ്ക്കിട്ട അറിവിനെ സ്വതന്ത്രമാക്കാനുള്ള ഒളിപ്പോരിന്റെ പ്രകടന പത്രിക

Aaron Swartz

അറിവു് അധികാരമാണു്. എന്നാല്‍ എല്ലാ അധികാരങ്ങളേയും പോലെ മറ്റാര്‍ക്കും കൊടുക്കാതെ സ്വന്തമാക്കി വയ്ക്കുന്നവരുണ്ടു്. നൂറ്റാണ്ടുകളായി പുസ്തകങ്ങളിലൂടേയും മറ്റു് പത്രികകളിലൂടെയും പ്രസിദ്ധീകരിച്ച ലോകത്തിലെ എല്ലാ ശാസ്ത്രീയ സാംസ്കാരിക പാരമ്പര്യങ്ങളും ഒരു കൂട്ടം സ്വകാര്യ കോര്‍പ്പറേറ്റുകള്‍ ഡിജിറ്റല്‍ രൂപത്തിലാക്കി അടച്ചുപൂട്ടി വച്ചുകൊണ്ടിരിയ്ക്കുകയാണു്. ശാസ്ത്രങ്ങളുടെ ഏറ്റവും പ്രസിദ്ധങ്ങളായ ഫലങ്ങളുള്ള പ്രസിദ്ധീകരണങ്ങള്‍ വായിയ്ക്കാനാഗ്രഹിയ്ക്കുന്നോ? റീഡ് എല്‍സെവിയര്‍ പോലത്തെ പ്രസാധകര്‍ക്കു് നിങ്ങള്‍ വലിയ തുക അയച്ചുകൊടുക്കേണ്ടി വരും.

ഇതിനു് ഒരു മാറ്റം വരുത്താന്‍ പലരും ശ്രമിക്കുന്നുണ്ട്. ശാസ്ത്രജ്ഞന്മാര്‍ പകര്‍പ്പവകാശം ഒപ്പിട്ടു കൊടുക്കാതെ ഇരിക്കുവാനും പകരം അവരുടെ രചനകള്‍ ആര്‍ക്കും ലഭ്യമാവുമെന്ന നിബന്ധനകളോടെ ഇന്റര്‍നെറ്റില്‍ പ്രസിദ്ധീകരിക്കപ്പെടുവാനും സ്വതന്ത്ര ലഭ്യതാ പ്രസ്ഥാനം ധീരതയോടെ പോരാടിയിട്ടുണ്ട്. പക്ഷെ ഉത്തമ സാഹചര്യങ്ങളില്‍ പോലും, ഇതു് ഭാവിയില്‍ പ്രസിദ്ധീകരിക്കപ്പെടുന്നവയ്ക്കേ ബാധകമാവുകയുള്ളൂ. അതുവരെയുള്ള എല്ലാം അപ്പോഴേക്കും നമുക്കു് നഷ്ടപെട്ടിരിക്കും.

അതു് വളരെ ഉയര്‍ന്ന തുകയാണ്.

അക്കാദമിക്കുകളെ അവരുടെ സഹപ്രവര്‍ത്തകരുടെ രചനകള്‍ വായിക്കുന്നതിനായി പണം നല്‍കാന്‍ നിര്‍ബന്ധിക്കുകയോ? ലൈബ്രറികളിലുള്ള സകലതും സ്കാന്‍ ചെയ്യുകയും പക്ഷേ ഗൂഗിളുമായി ബന്ധപ്പെട്ടവരെ മാത്രം അവ വായിക്കാനനുവദിക്കുകയും ചെയ്യുകയോ? ശാസ്ത്രലേഖനങ്ങള്‍ ഒന്നാം ലോകരാഷ്ട്രങ്ങളിലെ വരേണ്യ സര്‍വ്വകലാശാലകളിലുള്ളവര്‍ക്കു് മാത്രം ലഭ്യമാക്കുകയും വികസ്വര രാജ്യങ്ങളിലുള്ള കുട്ടികള്‍ക്കു് കിട്ടാതാക്കുകയും ചെയ്യുകയോ? തീര്‍ച്ചയായും ഇതു് അക്രമവും അസ്വീകാര്യവുമാണു്.

“ഞാന്‍ സമ്മതിക്കുന്നു” എന്നു പലരും പറയും, “പക്ഷെ നമുക്കെന്തു് ചെയ്യാനാകും? പകര്‍പ്പവകാശം കമ്പനികളുടെ കയ്യിലാണു്, അവര്‍ അവ ലഭ്യമാക്കുന്നതിനു് പണം ഈടാക്കുന്നതിലൂടെ ഭീമമായ തുകകള്‍ സമ്പാദിക്കുന്നു, അതാണെങ്കില്‍ സമ്പൂര്‍ണമായും നിയമ വിധേയവുമാണു് – അവരെ തടയാന്‍ നമുക്കൊന്നും ചെയ്യാനും കഴിയില്ല.” പക്ഷേ നമുക്കു് സാധിക്കുന്ന ചിലതുണ്ടു്, നമ്മള്‍ ചെയ്തു കൊണ്ടിരിക്കുന്ന ചിലതു്: നമുക്കു് തിരിച്ചു് പൊരുതാം.

ഈ വിഭവശേഖരങ്ങള്‍ ലഭ്യമായവര്‍ – വിദ്യാര്‍ത്ഥികള്‍, ഗ്രന്ഥശാലാധികാരികള്‍, ശാസ്ത്രജ്ഞര്‍ – നിങ്ങള്‍ക്കെല്ലാം ഒരു വിശേഷാനുകൂല്യം കിട്ടിയിട്ടുണ്ടു്. ലോകത്തിന്റെ ശേഷിച്ച ഭാഗങ്ങള്‍ അടച്ചുപൂട്ടപ്പെടുമ്പോഴും ഈ വിജ്ഞാനവിരുന്നു് നിങ്ങള്‍ക്കു് പോഷിപ്പിക്കാം. പക്ഷേ നിങ്ങള്‍ ഈ വിശേഷാനുകൂല്യം സ്വന്തമാക്കി സൂക്ഷിച്ചു വയ്ക്കേണ്ടതില്ല – ധാര്‍മ്മികമായി, തീര്‍ച്ചയായും നിങ്ങള്‍ക്കതിനു് സാധിക്കില്ല. നിങ്ങള്‍ക്കു് അതു് ലോകത്തോടു് പങ്കു വയ്ക്കേണ്ട ചുമതലയുണ്ടു്. നിങ്ങള്‍ സഹപ്രവര്‍ത്തകരുമായി പാസ്‌വേര്‍ഡുകള്‍ (അടയാളവാക്കുകള്‍?) കൈമാറേണ്ടതും, സുഹൃത്തുക്കള്‍ക്കു വേണ്ടി ഡൌണ്‍ലോഡ് അപേക്ഷകള്‍ പൂരിപ്പിക്കേണ്ടതുമുണ്ടു്.

അതിനിടെ, പ്രവേശിക്കപ്പെടാതെ മാറ്റിനിര‍ത്തപ്പെട്ടവര്‍ നിഷ്ക്രിയരായിരുന്നില്ല. അവര്‍ ദ്വാരങ്ങളിലൂടെ ഇഴഞ്ഞും വേലികള്‍ കടന്നും പ്രസാദകര്‍ പൂട്ടിവച്ച വിവരങ്ങള്‍ സ്വതന്ത്രമാക്കി സുഹൃത്തുക്കളുമായി പങ്കുവെച്ചുകൊണ്ടിരിക്കുന്നു.

പക്ഷേ ഈ പ്രവൃത്തികളെല്ലാം പുറത്തറിയാതെയാണു് നടക്കുന്നതു്. അറിവിന്റെ സമ്പത്തു് പങ്കുവെയ്ക്കുന്നതു് കപ്പലുകളെ ആക്രമിച്ചു് കൊള്ളയടിക്കുന്നതിനും അതിലെ യാത്രക്കാരെ കൊല ചെയ്യുന്നതിനും തുല്ല്യമാണെന്ന മട്ടില്‍ കൊള്ളയെന്നോ പൈറസിയെന്നോ ഒക്കെയാണു് ഇതിനെ വിളിക്കുന്നതു്. പക്ഷേ പങ്കുവെയ്ക്കുന്നതു് അധാര്‍മ്മികമല്ല – ധാര്‍മ്മികമായ കടമയാണു്. അത്യാഗ്രഹം കൊണ്ടു് അന്ധരായവര്‍ മാത്രമേ ഒരു സഹൃത്തിനുൊരു പകര്‍പ്പു് കൊടുക്കാതിരിക്കുകയുള്ളൂ.

വലിയ കമ്പനികള്‍ അത്യാര്‍ത്തി കൊണ്ടുള്ള അന്ധതയിലാണു്. അവര്‍ പ്രവര്‍ത്തിക്കുന്ന നിയമങ്ങള്‍ അവരെ അതിനു് നിര്‍ബന്ധിക്കുന്നു – അവരുടെ ഓഹരിയുടമകള്‍ അതില്‍കുറഞ്ഞതൊന്നും സ്വീകരിക്കുകയില്ല. അവര്‍ പണം കൊടുത്തു് വാങ്ങിയ രാഷ്ട്രീയക്കാര്‍ ആര്‍ക്കൊക്കെ പകര്‍പ്പെടുക്കാമെന്നു് തീരുമാനിക്കാനുള്ള പരമാധികാരം അവര്‍ക്കു് നല്‍കുന്ന നിയമങ്ങളുണ്ടാക്കിയിട്ടുണ്ടു്.

അന്യായമായ നിയമങ്ങള്‍ പാലിക്കുന്നതില്‍ ഒരു നീതിയും ഇല്ല. പുറത്തേക്ക് വരാന്‍ സമയാമായി; നിസ്സഹകരണത്തിന്റെ മഹത്തായ പാരമ്പര്യത്തെ പിന്തുടര്‍ന്ന്, നമ്മുക്ക് പൊതു സംസ്കാരത്തിന്‍റെ സ്വകാര്യ പൂഴ്ത്തിവയ്പ്പിനെതിരെ എതിരേ പ്രതിഷേധം രേഖപ്പെടുത്താം.

വിവരം എവിടെ സൂക്ഷിച്ചിട്ടുണ്ടെങ്കിലും നമ്മള്‍ അവ എടുക്കണം, നമ്മുടെ പകര്‍പ്പുകള്‍ ഉണ്ടാക്കുകയും എല്ലാവര്‍ക്കുമായി പങ്കുവെയ്ക്കുകയും വേണം. പകര്‍പ്പവകാശ കാലാവധി കഴിഞ്ഞ വസ്തുക്കള്‍ നമ്മള്‍ എടുത്തു് നമ്മുടെ പൊതുശേഖരത്തില്‍ ചേര്‍ക്കണം. രഹസ്യ വിവരശേഖരങ്ങള്‍ വാങ്ങി വെബ് വഴി ലഭ്യമാക്കണം. ശാസ്ത്ര പ്രസിദ്ധീകരണങ്ങള്‍ ഡൌണ്‍ലോഡ് ചെയ്ത് ഫയല്‍ ഷെയറിങ്ങ് സൈറ്റുകളില്‍ ലഭ്യമാക്കണം. നമ്മളെല്ലാവരും സ്വതന്ത്ര വിവരത്തിനായി ഒളിപ്പോരിനിറങ്ങണം.

ലോകമെമ്പാടുമുള്ള നമ്മളോരോരുത്തരും ഇതിനിറങ്ങിയാല്‍ അറിവിന്റെ കുത്തകവത്കരണത്തിനിറങ്ങുന്നവര്‍ക്കെതിരെ ശക്തമായൊരു സന്ദേശം മാത്രമല്ല – നമ്മളതു് കഴിഞ്ഞുപോയ കാലത്തെ സംഭവമാക്കും. നിങ്ങള്‍ ഞങ്ങളോടൊപ്പം ചേരുമോ?

ആരണ്‍ സ്വാര്‍ട്സ്

ജൂലൈ 2008, എറീമോ, ഇറ്റലി

 

by Hrishi at October 02, 2014 01:59 PM

September 22, 2014

Pirate Praveen

ഇന്റര്‍നെറ്റില്‍ പങ്കുവയ്ക്കുന്ന വിവരങ്ങള്‍ സ്വകാര്യമാണോ?

അമേരിക്കയടക്കമുള്ള പല ഭരണകൂടങ്ങളും ഗൂഗിള്‍,ഫേസ്‌ബുക്ക് തുടങ്ങിയ കുത്തക കമ്പനികളും ലോകത്തെ കിട്ടാവുന്ന എല്ലാവരുടേയും സ്വകാര്യ വിവരങ്ങള്‍ ശേഖരിക്കുന്നുവെന്നു് എഡ്വേര്‍ഡ് സ്നോഡന്റെ വെളിപ്പെടുത്തലുകളോടെ ഇന്നു് നമുക്കു്  ഉറപ്പിച്ചു് പറയാന്‍കഴിയും. തങ്ങള്‍ക്കെതിരായ നീക്കങ്ങളെ തടയാനും  ജനങ്ങളെ നിയന്ത്രിക്കാനും ബ്ലാക്ക്മെയില്‍ ചെയ്യാനുമാണു് ഈ വിവരങ്ങള്‍ ഭരണകൂടങ്ങള്‍ ശേഖരിക്കുന്നത്.

ങ്ങളെ വല്ലോരും ട്രാക്ക്ണ്

ങ്ങളെ വല്ലോരും ട്രാക്ക്ണ്

തീവ്രവാദ പ്രവര്‍ത്തനം അമര്‍ച്ച ചെയ്യുന്നതിനാണ്, രാഷ്ട്രസുരക്ഷയ്കാണ് ഈ നിരീക്ഷണം എന്നാണ് വാദം. ഇതിന്റെ മറ്റൊരു വശം നോക്കൂ. നെല്‍സണ്‍ മണ്ടേല, മാര്‍ട്ടിന്‍ ലൂഥര്‍ കിങ്, മഹാത്മാ ഗാന്ധി തുടങ്ങി ഇന്നു് നാം ബഹുമാനിക്കുന്ന പലരേയും അന്നത്തെ ഭരണകൂടങ്ങള്‍ അവരുടെ അധികാരത്തിനു് വെല്ലുവിളിയായി കാണുകയും അടിച്ചമര്‍ത്താന്‍ ശ്രമിക്കുകയും ചെയ്തു. നെല്‍സണ്‍ മണ്ടേലയെ അമേരിക്ക ഭീകരവാദികളുടെ പട്ടികയില്‍ നിന്നും നീക്കം ചെയ്തതു് ജോര്‍ജ്ജ് ബൂഷ് ഭരിക്കുന്ന സമയത്താണു്. ബ്രിട്ടീഷുകാര്‍ രാഷ്ടവിരുദ്ധ കുറ്റം ചുമത്തിയാണു് ഗാന്ധിജിയെ  ജയിലിലടച്ചതു്. മാര്‍ട്ടിന്‍ ലൂഥര്‍ കിങിനെ അമേരിക്കന്‍ ചാരസംഘടന തീവ്രവാദിയായി നിരീക്ഷിച്ചിരുന്നു. അടുത്ത കാലത്തു് ഇന്ത്യയില്‍ കാര്‍ട്ടൂണിസ്റ്റ് അസീം ത്രിവേദിയെ അഴിമതിക്കെതിരായ കാര്‍ട്ടൂണുകള്‍ വരച്ചതിനു് ജയിലടച്ചിരുന്നു. ചുരുക്കത്തില്‍, തീവ്രവാദികളെ പിടിക്കാനാണു്എല്ലാവരേയും നിരീക്ഷിക്കുന്നതു് എന്നു് നിങ്ങള്‍ ഇപ്പോഴും വിശ്വസിക്കുന്നതെങ്കില്‍ നിങ്ങളോടു്ചരിത്രം പഠിക്കാന്‍ മാത്രമാണു് എനിക്കോര്‍മ്മിപ്പിക്കാനുള്ളതു്.

ആടുജീവിതം

ആടുജീവിതം

ഭരണകൂടം അവരവകാശപ്പെടുന്ന ഈ തീവ്രവാദി വേട്ട സുഗമമായി നടത്തുന്നത് നിങ്ങളുടെ ഇന്റര്‍നെറ്റ് ഇടപാടുകള്‍ വഴിയാണെന്നത് ഇതുവരെ ബോദ്ധ്യപ്പെട്ടിട്ടുണ്ടോ? വാട്ട്സ്ആപ്പ്, ഫേസ്‌ബുക്ക് ചാറ്റ്, ഗൂഗിള്‍ ഹാങ്ഔട്ട്സ് തുടങ്ങിയവ വഴി നിങ്ങള്‍ പങ്കുവെയ്ക്കുന്ന വിവരങ്ങള്‍ അവരുടെ വലിയ കമ്പ്യൂട്ടര്‍ നിലവറകളില്‍ ശേഖരിച്ചു് വയ്ക്കുന്നതു് നിങ്ങള്‍ക്കറിയാമോ? ഇവരുടെയെല്ലാം നിലനില്‍പ്പ്, പ്രധാന വരുമാനം നിങ്ങള്‍ വിചാരിക്കുന്നതുപോലെ പരസ്യങ്ങളല്ല. നിങ്ങള്‍ പങ്കുവയ്ക്കുന്ന വിവരങ്ങള്‍ പണമാക്കി മാറ്റുന്നതു് വഴിയാണെന്നതാണ് ഇവ്ര‍ ഒളിച്ചുവെച്ചിരിക്കുന്ന രഹസ്യം. ഇത്തരമൊരു കച്ചവടത്തിലെ ഉത്പന്നമാകുന്നതിനൊപ്പം നിങ്ങളുടെ വിവരങ്ങള്‍ മറ്റുപല താല്‍പ്പര്യങ്ങളോടെ ആരെങ്കിലുമൊക്കെ അടിച്ചുമാറ്റിയെന്നുമിരിക്കാം.

അതുകൊണ്ടുതന്നെ ആശയവിനിമയത്തിന്റെ സ്വകാര്യത ഉറപ്പുവരുത്താന്‍  ഇന്നത്തെ സാഹചര്യത്തില്‍ ന്‍ക്രിപ്ഷന്‍ (ക്രിപ്റ്റോഗ്രഫി, ക്രിപ്റ്റോ) അത്യാവശ്യമായിവരുന്നു. അതായത് നിങ്ങള്‍ അടുത്തറിയുന്നവരുമായി സംസാരിക്കാന്‍ ഇന്റര്‍നെറ്റ് സേവന ദാതാക്കള്‍ക്ക് നിങ്ങളുടെ വിവരങ്ങള്‍ ഏതുവിധത്തിലും പരിശോധിക്കാനായുള്ള ഒരു അന്യായ കരാറിലേര്‍പ്പെടേണ്ട ആവശ്യമില്ല. നിങ്ങളുടെ ഫോട്ടോകള്‍, ഫയലുകള്‍, അല്ലെങ്കില്‍ സന്ദേശങ്ങള്‍ ഓഫ് ദ റെക്കോര്‍ഡ് സംവിധാനം വഴി സ്വകാര്യമായി പങ്കുവെയ്കാം.

എന്‍ക്രിപ്ഷന്‍ എന്നാല്‍ നമ്മളുദ്ദേശിക്കുന്ന ആളുകള്‍ക്കു് മാത്രം മനസ്സിലാകുന്ന തരത്തിലുള്ള കോഡ് ഭാഷ ഉപയോഗിക്കുക എന്നതാണു്. ചൊറിച്ചു് മല്ലു് പോലെ പ്രാദേശികമായി ഇതിന്റെ പല വകഭേദങ്ങളും നിങ്ങള്‍ക്കു് പരിചയമുണ്ടാകുമല്ലോ. എറ്റവും എളുപ്പത്തില്‍ ചെയ്യാവുന്ന എന്ക്രിപ്ഷന്‍ ഒരു രഹസ്യവാക്കുപയോഗിച്ച് (passphrase/password) വിവരത്തെ കോഡ് ഭാഷയിലേക്കു് മാറ്റുക എന്നതാണു്. ഇതിനു് പല അല്‍ഗോരിതങ്ങളും ഉപയോഗിക്കാം. ആ രഹസ്യവാക്ക് അറിയാവുന്ന ആര്‍ക്കും അതേ അല്‍ഗേരിതം ഉപയോഗിച്ചു് യഥാര്‍ത്ഥ സന്ദേശം വായിച്ചെടുക്കാം. ഇതിനുള്ള പ്രധാന പ്രശ്നം എങ്ങനെ രഹസ്യവാക്ക് കൈമാറും എന്നതാണു്. അതുകൊണ്ടു്തന്നെ അടയ്ക്കാനും തുറക്കാനും രണ്ടു് വ്യത്യസ്ത ചാവികളുപയോഗിക്കുന്ന (key pair) എന്ക്രിപ്ഷനാണു് (asymmetric cryptography) ഇന്നു് വ്യാപകമായി ഉപയോഗിക്കുന്നതു്. സ്വയം പൂട്ടുന്ന വാതിലുകള്‍ പല ഫ്ലാറ്റുകളിലും നിങ്ങള്‍ ശ്രദ്ധിച്ചുകാണും, പൂട്ടാനായി വാതില്‍ വലിച്ചടച്ചാല്‍ മതി, ആര്‍ക്കും ഇങ്ങനെ വാതില്‍ പൂട്ടാവുന്നതാണു് (public key എല്ലാവര്‍ക്കും ലഭ്യമാണെന്ന പോലെ). പക്ഷേ പൂട്ടിയ വാതില്‍ തുറക്കണമെങ്കില്‍ താക്കോല്‍ കയ്യിലുണ്ടെങ്കില്‍ മാത്രമേ നടക്കൂ (private key ആരുമായും പങ്കുവെയ്ക്കുന്നില്ല).

നിങ്ങള്‍ ഒരു ഇരട്ടച്ചാവി (key pair) ഉണ്ടാക്കുന്നു, അതിലെ ഒരു ചാവി നിങ്ങളുടെ കയ്യില്‍ വയ്ക്കുന്നു (private key), ഇണച്ചാവി ആര്‍ക്കും കൊടുക്കാം (public key). ഒരു ചാവി കൊണ്ടു് പൂട്ടുന്ന വിവരങ്ങള്‍ (encrypted) അതിന്റെ ഇണച്ചാവി കൊണ്ടു് മാത്രമേ തുറക്കാനാവൂ (decrypt). അതു് പോലെ തന്നെ ഒപ്പ് ശരിയാണോ എന്നു് പരിശോധിക്കാനും ഈ സംവിധാനം ഉറപ്പാക്കാം. നിങ്ങള്‍ കൈയില്‍ വച്ച ചാവി ഉപയോഗിച്ചു് ഒപ്പിടുന്ന (signed)വിവരങ്ങള്‍ നിങ്ങള്‍ തന്നെയാണയച്ചതെന്നു് ഏതൊരാള്‍ക്കും നിങ്ങള്‍ പങ്കു് വെച്ച ചാവി (public key) ഉപയോഗിച്ചു് ഒത്തു് നോക്കാവുന്നതാണു്. നിങ്ങളുടെ സ്വകാര്യസംഭാഷണങ്ങള്‍ ഇപ്രകാരം പൂട്ടി വേറാരും ചോര്‍ത്താതെ സംരക്ഷിക്കാനുള്ള  ഒരു സംവിധാനമാണു് ഓഫ് ദ റെക്കോര്‍ഡ് (ഓട്ടിആര്‍ എന്നു് ചുരുക്കം).

Public key cryptography

ഇണച്ചാവികളുപയോഗിച്ചു് വിവരങ്ങള്‍ സ്വകാര്യമാക്കാം

ഇവിടെ നിങ്ങള്‍ക്കു് വിവരങ്ങള്‍ അയയ്ക്കുന്നതു് നിങ്ങള്‍ക്കു് മാത്രം തുറക്കാവുന്നൊരു പൂട്ടിട്ടാണു്. നിങ്ങള്‍ കൊടുക്കുന്ന ചാവി ഉപയോഗിച്ച് ആര്‍ക്കും നിങ്ങളുമായി പങ്കിടുന്ന വിവരങ്ങള്‍ പൂട്ടാവുന്നതാണു്. അതിന്റെ ഇണച്ചാവി നിങ്ങളുടെ കമ്പ്യൂട്ടറിലോ മൊബൈല്‍ ഫോണിലോ മാത്രമുള്ളതിനാല്‍ വേറാര്‍ക്കും അതു് തുറക്കാനാവില്ല. ഈ പൂട്ട് പൊളിക്കണമെങ്കില്‍ ഇന്നുള്ള എല്ലാ കമ്പ്യൂട്ടറുകളും ഒരുമിച്ചുപയോഗിച്ചാലും വര്‍ഷങ്ങളെടുക്കും.  ഒളിഞ്ഞു് കേള്‍ക്കുന്നവരോ, സൂക്ഷിച്ച് വയ്ക്കുന്നവരോ, അടിച്ചുമാറ്റുന്നവരോ കാണുന്നതു് മുകളിലെ ചിത്രത്തില്‍ കാണുന്ന പോലെ പൂട്ടിയ പെട്ടി മാത്രമായിരിക്കും (അര്‍ത്ഥമില്ലാത്ത കൂറേ അക്ഷരങ്ങള്‍).

ഏതൊരാള്‍ക്കും ഇങ്ങനെ ഏതു് പേരിലും രണ്ടു് ചാവികളുണ്ടാക്കാം എന്നിരിക്കേ വേറൊരാള്‍ക്കു് നിങ്ങളുടെ പേരില്‍ ചാവികളുണ്ടാക്കിക്കൂടെ? ഇതിനെ മറികടക്കാനായി അന്യോന്യം ചാവികളില്‍തന്നെ ഒപ്പിടാവുന്നതാണു് (key signing). ഓരോ ഇണച്ചാവികള്‍ക്കും (key pair) അനന്യമായ ഒരുതിരിച്ചറിയല്‍ നമ്പര്‍ (unique key id) കാണും. ഉദാഹരണത്തിനു് എന്റെ ജിപിജി കീയുടെ (GNU Privacy Guard എന്ന സോഫ്റ്റ്‌വെയര്‍ ഉപയോഗിച്ച് Pretty Good Privacy എന്ന രീതിയിലുള്ള കീ ആണിതു്. SSH, SSL തുടങ്ങിയ രീതികള്‍ക്കും ഇതുപോലെ തന്നെ ചാവികളുണ്ടാക്കാം) pgp.mit.edu പോലുള്ള public key server കളില്‍ നമ്മുടെ പൊതുചാവി ചേര്‍ക്കാവുന്നതാണു്. നമ്മുടെ കീ ഐഡി കൊടുത്താല്‍ ആര്‍ക്കും നമ്മുടെ പൊതു കീ അവിടെനിന്നും എടുക്കാവുന്നതാണ്.   ഈ ലേഖകന്റെ പൊതുചാവി 0x4512c22a എന്നതാണു്. അത് http://pgp.mit.edu/pks/lookup?op=vindex&search=0xCE1F9C674512C22A എന്നവിലാസത്തില്‍ ലഭ്യമാണു്. ചാവികളുടെ ഉറവിടം ഉറപ്പാക്കാനുള്ള മറ്റൊരു വഴി സോഷ്യലിസ്റ്റ് കോടീശ്വരന്‍ പ്രോട്ടോകോളാണു് (https://en.wikipedia.org/wiki/Socialist_millionaire). നമ്മള്‍ സംസാരിക്കുന്നയാള്‍ക്കു് മാത്രം ഉത്തരം അറിയുന്ന ഒരു ചോദ്യം ചോദിക്കുക, നമ്മള്‍ പ്രതീക്ഷിക്കുന്ന ഉത്തരമാണു് കിട്ടുന്നതെങ്കില്‍ നമ്മള്‍ വിചാരിക്കുന്ന ആളുടെ ചാവി തന്നെയാണിതെന്നു് ഉറപ്പാക്കാം. മലയാള സിനിമയിലെ നിത്യഹരിത കഥാപാത്രങ്ങളായ സിഐഡി ദാസനും വിജയനും സാധനം കയ്യിലുണ്ടോ എന്നു് ചോദിക്കുന്നതും ഒരു നോട്ടിന്റെ കീറിയ പകുതി ഒത്തുനോക്കുന്നതു് നമുക്കു് പരിചിതമാണല്ലോ.  ജിപിജി കൂടുതലായും ഫയലുകളും ഈമെയിലുകളും സുരക്ഷിതമാക്കാനും ഒടിആര്‍ ഇന്‍സ്റ്റന്റ് മെസേജുകള്‍ സുരക്ഷിതമാക്കാനുമാണുപയോഗിക്കുന്നതു്. ജിപിജിയില്‍ കൂടുതലായും അന്യോന്യം ചാവികളുടെ ഉറവിടം ഉറപ്പുവരുത്തുന്ന രീതിയാണുപയോഗിക്കുന്നതെങ്കില്‍ ഒടിആറില്‍ സോഷ്യലിസ്റ്റ് കോടീശ്വവരന്‍ രീതിയാണു് കൂടുതല്‍ സൌകര്യം.

 

സാധനം കയ്യിലുണ്ടോ?

സാധനം കയ്യിലുണ്ടോ?

വാട്ട്സ്ആപ്പ്, ഗൂഗിള്‍ ഹാങ്ഔട്ട്സ്, ഫേസ്‌ബുക്ക് ചാറ്റ്, ജാബര്‍ തുടങ്ങിയ നിങ്ങളിപ്പോഴുപയോഗിക്കുന്ന സേവനങ്ങളിലെല്ലാം ഓട്ടിആര്‍ ഉപയോഗിക്കാവുന്നതാണു്. ഇതു് വേറൊരു സേവനമല്ല, നിലവിലെ സേവനങ്ങളെ സുരക്ഷിതമാക്കുന്നൊരു സംവിധാനം മാത്രമാണു്. ഈ സൌകര്യം ഉപയോഗിക്കാന്‍ ഓട്ടിആര്‍ പിന്തുണയുള്ള സോഫ്റ്റ്‌വെയര്‍ ഉപയോഗിച്ചാല്‍ മാത്രം മതി. ഉദാഹരണത്തിനു് ജിറ്റ്സി, പിഡ്ജിന്‍ അല്ലെങ്കില്‍ ഓട്ടിആര്‍ പിന്തുണയുള്ള മറ്റേതൊരു സോഫ്റ്റ്‌വെയറും ഉപയോഗിച്ച് ഫേസ്‌ബുക്ക് ചാറ്റില്‍ ചേര്‍ന്നാല്‍  ഓട്ടിആര്‍ പിന്തുണയുള്ള സോഫ്റ്റ്‌വെയര്‍ ഉപയോഗിക്കുന്ന സുഹൃത്തുക്കളുമായി സ്വകാര്യ സംഭാഷണം തുടങ്ങാം. ഫേസ്‌ബുക്കിനു് അര്‍ത്ഥമില്ലാത്ത അക്ഷരങ്ങള്‍ മാത്രമേ കാണാനാവൂ, നിങ്ങള്‍ എന്താണു് സംസാരിക്കുന്നതെന്നു് മനസ്സിലാക്കാനാവില്ല.‌

പ്രൈവസി എന്നാല്‍ പ്രധാനമായും നമ്മുടെ ആശയവിനിമയം നമ്മള്‍ ഉദ്ദേശിക്കുന്ന ആളുമായി മാത്രം  നടത്താന്‍ കഴിയുക എന്നതാണ്. ഞാന്‍ എന്റെ കൂട്ടകാരിയോടു് സംസാരിക്കുന്നതു്  അത് രാഷ്ടീയമായാലും സല്ലാപമായാലും സുക്കന്‍ബര്‍ഗോ, മോഡിയോ, ഒബാമയോ കേള്‍ക്കാന്നതില്‍ എനിയ്ക്കു് താത്പര്യമില്ല. നമ്മുടെ ഭരണഘടനയുടെ ശില്പികള്‍ നമുക്കു് ഉറപ്പു് തന്നിട്ടുള്ള അവകാശമാണതു്. എത്രയോ ആളുകള്‍ സ്വന്തം ജിവന്‍ കൊടുത്തും നമുക്കു് തന്ന സ്വാതന്ത്ര്യമാണതു്. നമ്മുടെ അടുത്ത തലമുറകള്‍ക്കും ഈ സ്വാതന്ത്ര്യങ്ങള്‍ പകര്‍ന്നു കൊടുക്കേണ്ടതു് നമ്മുടെ ഓരോരുത്തരുടേയും കടമയാണു്. സ്വകാര്യത നഷ്ടപ്പെടുക എന്നാല്‍ നിലവിലെ ചട്ടങ്ങള്‍ക്കെതിരായ ചിന്തകള്‍ പോലും ഇല്ലാതാക്കുക എന്നതാണു്. മെട്രിക്സ് സിനിമയില്‍ ന്യൂക്ലിയര്‍ മേഘങ്ങള്‍ സൂര്യനെ മറയ്ക്കുമ്പോള്‍ യന്ത്രങ്ങള്‍ മനുഷ്യരെ ഊര്‍ജ്ജസ്രോതസ്സായി ഉപയോഗിക്കുന്നതു് പോലെ, കോര്‍പ്പറേറ്റുകള്‍ ഉത്പന്നങ്ങള്‍ വില്‍ക്കാനുള്ള ചന്ത മാത്രമായി മനുഷ്യനെ മാറ്റുന്ന അവസ്ഥയും ദൂരെയാവില്ല.

മനുഷ്യോര്‍ജ്ജ ബാറ്ററി

മനുഷ്യോര്‍ജ്ജ ബാറ്ററി

സ്വകാര്യ സംഭാഷണങ്ങള്‍ ഇത്ര എളുപ്പമാണെന്നു് നിങ്ങള്‍ക്കറിയാമായിരുന്നോ? ഇന്നു തന്നെ ഇതു് പരീക്ഷിച്ചു് നോക്കാം, സ്വകാര്യത നിങ്ങളുടെ അവകാശമാണു്. നിങ്ങളുടെ അനുഭവങ്ങളും അഭിപ്രായങ്ങളും അറിയിക്കുമല്ലോ. എന്തെങ്കിലും പ്രയാസം നേരിടുന്നെങ്കില്‍ സഹായം ചോദിക്കാന്‍ മടിക്കേണ്ട. ഓട്ടിആറിനെപ്പറ്റി കൂടുതലറിയാനും നിങ്ങളുടെ ഉപകരണത്തിനു് അനുയോജ്യമായ സോഫ്റ്റ്‌വെയറുകളെക്കുറിച്ചറിയാനും http://otr.works എന്ന വെബ്‌സൈറ്റ് കാണുക (നിങ്ങള്‍ക്കും‌ അവിടെ കൂടുതല്‍ വിവരങ്ങള്‍ ചേര്‍ക്കാവുന്നതാണു്).

കുറിപ്പ്: നേരത്തെ സ്വതന്ത്രത്തിലും ലൂക്കയിലും പ്രസിദ്ധീകരിച്ച ലേഖനത്തില്‍ ചെറിയ മാറ്റങ്ങളോടെ…

 

by Pirate Praveen at September 22, 2014 01:06 PM

September 18, 2014

Rajeesh K Nambiar

KDE Touchpad configuration ported to Frameworks 5

Fedora 20 with KDE SC 4.14 has been very stable, and after a while it gets…boring – especially when Plasma 5 is already released and you see screenshots everywhere. If you cannot hold the urge and feel sufficiently adventurous, Dan Vratil has built the Fedora 20 and 21 rpms here. If you install i386 versions, beware that baloo-widgets cannot be installed due to unmet dependencies. So, once you install dvratil’s copr repo, just do:

dnf copr enable dvratil/kde-frameworks dvratil/kde-frameworks-unstable dvratil/plasma5
dnf remove kde\* && dnf install kf5\* plasma5\* --exclude=kf5-baloo-widgets\*

I had to manually edit /usr/share/xsessions/plasma.desktop to change "/usr//usr/bin" to "/usr/bin” so that “Plasma 5″ appears in gdm list. After logging in, the desktop runs smooth, but you notice the lack of many applications because they are not yet fully ported to KF5/Plasma5.

KDE Plasma 5 desktop

KDE Plasma 5 desktop

Once I had the Qt5/KF5/Plasma5 based workstation fully operational, I could also develop, build and test KF5 based applications. Most of the KDE apps are ported or being ported to KF5 under 'frameworks' git branch. As the OpenSuSe team already have started building KF5 based apps in an unstable repository, I could leverage the spec files to build rpms.

The first itch I scratched was unavailability of touchpad configuration kcm. Not being able to enable touch-to-tap, vertical and horizontal scrolling is no fun. Looking at the git repo for kcm-touchpad showed that it is not yet ported to KF5. Checked out the git repo and started porting. There are quite some references, blogposts and tools available online to guide and ease the porting effort. As it is a kcm that is being ported, the first place to go is Frameworks Porting Notes. The subtopic of ECM (extended cmake modules) source incompatible changes is also handy updating CMakeLists.txt files. The next thing is reference to Martin Graesslin’s post on porting kcontrol module. And the final tool that is quite useful to port API changes is the kde-dev-scripts. Run the source files through relevant script – like "find -iname "*.cpp" -o -iname "*.h" -o -iname "*.ui" | xargs ~/Programs/Projects/kde-dev-scripts/kf5/<porting-script.pl>". When you hit an API change that cannot be automatically converted by the script, check frameworks at api.kde.org. Then port away, setup a build directory, compile, note the build failure, fix the build – repeat.

Alexander Mezin and Hrvoje Senjan reviewed the patches and after 6 revisions the patch is committed in kcm-touchpad frameworks branch.

KCM Touchpad on KF5

KCM Touchpad on KF5

RPMs for Fedora 20 and 21 (i386, x86_64) are built and available in my copr repo. It contains builds of kmix and konsole as well. More to build and I’ll make them available in the same repo once build completed. You are welcome to try at your own risk :-)


Tagged: kde, rpm

by Rajeesh at September 18, 2014 05:57 PM

September 14, 2014

Jishnu Mohan

Yet Another 2048!

This is a really long overdue post. When 2048 became popular in the web, all the 2048 clones available for Android at that time were HTML embedded in a native wrapper (PhoneGap). So i started writing one for myself.

I took some time to re-write 2048 from scratch, worked on the UI and color scheme. But by the time everything was ready, Play store had a plethora of apps. If you have some spare time and want to try a different take on 2048, go ahead and try this.

Screenshot_2014-05-16-21-35-21 Screenshot_2014-04-28-14-49-45 Screenshot_2014-05-16-21-35-30 Screenshot_2014-05-16-21-35-41 Screenshot_2014-04-28-14-49-58 Screenshot_2014-08-24-20-08-22 Screenshot_2014-08-24-20-18-33 Screenshot_2014-05-16-21-35-53 Screenshot_2014-08-24-20-18-49 Screenshot_2014-08-24-20-18-58

Play Store: https://play.google.com/store/apps/details?id=in.androidtweak.twozerofoureight
Source: https://github.com/jishnu7/Yet-Another-2048

by Jishnu at September 14, 2014 12:45 PM

August 24, 2014

Jishnu Mohan

Indic Keyboard featured on Deccan Chronicle

Deccan Chronicle featured Indic Keyboard in an article about mobile app boom in Kerala.

Link: Deccan Chronicle e-Paper, Interner Archive

Deccan Chronicle

by Jishnu at August 24, 2014 03:17 PM

August 18, 2014

Santhosh Thottingal

August 17, 2014

Santhosh Thottingal

Updated Swanalekha JavaScript Library

Six years back I wrote a javascript version of popular Swanalekha input method. Friends were requesting web based version that they can use in Windows platforms too. Swanalekha was initially written as a SCIM input method and later m17n input method, readily available in GNU/Linux platform. I had provided a bookmarklet version too. Later Rajiv Nair and Nishan Nasir wrote Chrome and Firefox extensions.

Yesterday I noticed that the updated Marunadan Malayali news portal using my javascript library to power Malayalam input method in their search boxes. I don’t track who else or how many use these libraries and tools. But I quickly realized how bad the code is. Or in other words, How better I can write them today. 6 years is a long span of time anyway.

So I did some cleanup and rewrite, added documentation, example and here it is: http://thottingal.in/projects/swanalekha/swanalekha-ml.html

Code: https://github.com/smc/input-methods/tree/master/swanalekha-js

Enjoy.

by Santhosh Thottingal at August 17, 2014 08:45 AM

August 16, 2014

Santhosh Thottingal

Video of our presentation from 7th Multilingual Workshop by W3C

Video of our presentation from 7th Multilingual Workshop by W3C, Madrid, Spain, May 7-8


Best Practices on the Design of Translation- Pau Giner, David Chan and Santhosh Thottingal.

Abstract: Wikipedia is one of the most multilingual projects on the web today. In order to provide access to knowledge to everyone, Wikipedia is available in more than 280 languages. However, the coverage of topics and detail varies from language to language. The Language Engineering team from the Wikimedia Foundation is building open source tools to facilitate the translation of content when creating new articles to facilitate the diffusion of quality content across languages. The translation process in Wikipedia presents many different challenges. Translation tools are aimed at making the translation processes more fluent by integrating different tools such as translation services, dictionaries, and information from semantic databases as Wikidata.org. In addition to the technical challenges, ensuring content quality is one of the most important aspects considered during the design of the tool since any translation that does not read natural is not acceptable for a community focused on content quality. This talk will cover the design (from both technical and user experience perspectives) of the translation tools, and their expected impact on Wikipedia and the Web as a whole.

by Santhosh Thottingal at August 16, 2014 03:19 PM

August 08, 2014

Pirate Praveen

What do you think about this ? (Google scanning your inbox)

Aashik asked me this question today pointing me to this article on The Verge – Google scans everyone’s email for child porn, and it just got a man arreste

This was my response, (attachment mentioned in the mail is given below)

censorship and free speech

The attached drawing illustrates the situation well. There is always bad guys as a justification of taking away our rights. It changes depending on place and time. When you take examples of bad guys, people stop thinking and emotion takes its place, once you are controlled by emotion, usually fear, you would accept anything that comes in the name of protection. These are nothing new, it is successfully used over the years, only details vary. Old wine in new bottle.

It is only cultural who is bad. Once being a communist was enough to torture you. Another time it was just being a Jew. Now living in Gaza is enough to get you killed.

You’ll need to blindly trust google not to misuse their powers. I don’t think that is a good thing.

When US made a nuclear bomb, no one thought it would be dropped on humans.

Power corrupts and absolute power corrupts absolutely.

Now it is only child porn, when conditions are favourable, it can be terrorism, any crime, dissent… You cannot expect a profit making company to stand up for your rights. They may do it as long as it is profitable for them.

So in short, it does not make me satisfied it is just child porn.

by Pirate Praveen at August 08, 2014 10:00 AM

July 25, 2014

Jishnu Mohan

Tutorial Design and Implementation for Games

I recently posted on medium under Hashcube Engineering about a module I implemented for Sudoku Quest. You can read it here.

by Jishnu at July 25, 2014 05:18 AM

July 20, 2014

Pirate Praveen

കേരളീയത്തില്‍ വന്ന ശ്യാം ബാലകൃഷ്ണനുമായുള്ള അഭിമുഖം

സൂരജ് കേണോത്താണു് ആദ്യമായി ജൈവ കര്‍ഷകനായ ശ്യാമിനെ മാവോയിസ്റ്റെന്ന പേരില്‍ അറസ്റ്റ് ചെയ്തതായി എന്നോടു് പറഞ്ഞതു്. നമുക്കെന്തു് ചെയ്യാനാകും എന്ന ചര്‍ച്ചയില്‍ നിന്നാണു് ശ്യാമിനെ നേരിട്ടു് കാണാനും കുറച്ചു് ദിവസം അവരോടൊപ്പം വയനാട്ടില്‍ പോയി താമസിക്കാനും തീരുമാനിച്ചതു്.

ഏകലോക സര്‍വ്വകലാശാല

ശ്യാമും ഗീഥിയും താമസിക്കുന്ന വയനാട്ടിലെ നിരവില്‍പ്പുഴയിലെ വീടു്.

ഒരാഴ്ച അവിടെ താമസിക്കുകയും വളരെ രസകരമായ പല ചര്‍ച്ചകളും അന്വേഷണങ്ങളും നടന്നു. കാടും വിറകും വെട്ടുന്നതു് മുതല്‍ സ്റ്റീല്‍ വേലി അഴിച്ചു് വയ്ക്കുന്നതടക്കമുള്ള പല പണികളിലും ചെറുതായി സഹായിച്ചു. സ്വന്തം പാടത്തു് കൊയ്തെടുത്ത ഓണോട്ടന്‍ അരിയുടെ കഞ്ഞിയും പുട്ടും ഇഷ്ടം പോലെ തേങ്ങയിട്ട കടല-ചക്ക കറികളും മാങ്ങയും തുടങ്ങി ഭക്ഷണം കേമമായിരുന്നു.

ശ്യാമിന്റെ മുറിവു് കെട്ടുന്ന ഗീഥി

ശ്യാമിന്റെ മുറിവു് കെട്ടുന്ന ഗീഥി

അടുത്തുള്ള പുഴയിലെ കുളിയും വെനല്‍ക്കാലത്തും പുതച്ചു്കിടന്നുറങ്ങാന്‍ പറ്റിയ തണുപ്പും സൌരോര്‍ജ്ജം ഉപയോഗിച്ചു് ഊര്‍ജ്ജസ്വയംപര്യാപ്തതതയും നവലോകസൃഷ്ടിയുടെ സ്വപ്നങ്ങളും വീണ്ടും അവിടെ ചെല്ലാനായി മടി വിളിക്കുന്നു.

അഭിമുഖത്തിനു് ആമുഖമായി ശ്യാം അയച്ച ഈമെയില്‍ താഴെ.

പ്രിയ മിത്രമേ,

കഴിഞ്ഞ മെയ്മാസം 20നു, വടക്കേ വയനാട് താമസിക്കുന്ന എന്നെ
മാവോയിസ്റ്റാണെന്ന പേരില്‍ പോലീസ് നടുറോഡില്‍ വെച്ചു കസ്റ്റഡിയില്‍
എടുത്തിരുന്നു. തുടര്‍ന്ന് അന്ന് അര്‍ദ്ധരാത്രിവരെ മുപ്പതോളം പോലീസുകാരും
തണ്ടര്‍ ബോള്‍ട്ട് സൈനീകരും ചേര്‍ന്ന് ഞാന്‍ താമസിക്കുന്ന വീട്
പരിശോധിക്കുകയും അകാരണമായി എന്റെ മൊബൈലും ലാപ്ടോപ്പും കസ്റ്റഡിയില്‍
എടുക്കുകയും ചെയ്തു. അതിനടുത്ത ദിവസവും രണ്ടു ഡി.വൈ.എസ്.പി.മാര്‍ തുടര്‍
അന്വേഷണത്തിനായി വീട്ടില്‍ വന്നിരുന്നു. ഒരു പക്ഷെ, ഈ വിവരങ്ങള്‍
സുഹൃത്ത് ഇതിനോടകം അറിഞ്ഞിട്ടുണ്ടാകാം.

ഇന്ത്യയില്‍ ഒട്ടാകെ അരങ്ങേറുന്ന പല പോലീസ്-സൈനീക നടപടികളുടെ ഭീകരതയുമായി
താരതമ്യം ചെയ്യുമ്പോള്‍ മേല്‍വിവരിച്ചത് അങ്ങേയറ്റം നിസ്സാരമായ സംഭവമാണ്;
എങ്കിലും വല്ലാതെ രൂക്ഷമാകുന്ന ഒരു പ്രതിസന്ധിയുടെ ലക്ഷണവുമാണത്. ഈ
സാഹചര്യത്തെ മാറ്റിത്തീര്‍ക്കുവാനുള്ള ഒരുപാട് പരിശ്രമങ്ങള്‍
നടക്കുന്നുണ്ട്; മുഖ്യധാരയിലും അല്ലാതെയും. എങ്കിലും, വൈവിധ്യമാര്‍ന്ന
പശ്ചാത്തലമുള്ള മനുഷ്യരാശിയുടെ ജീവിതഭാവനകളെ സ്വാധിനിക്കാനും
പ്രചോദിപ്പിക്കാനും കഴിയുന്ന, ചിന്നിച്ചിതറിയ പ്രവര്‍ത്തനമേഖലകളിലുള്ള
നമ്മെ കൂട്ടിയിണക്കി ഒരൊറ്റ മുന്നേറ്റമാക്കാന്‍ കരുത്തുള്ള സമഗ്രമായ
വീക്ഷണത്തിന്റെ അഭാവം നാം നേരിടുന്നുണ്ട്. വാള്‍സ്ട്രീറ്റ്
പ്രക്ഷോഭത്തില്‍ തുടങ്ങി ഇന്ത്യയില്‍ത്തന്നെ നടക്കുന്ന ഇറോം
ശര്‍മ്മിളയുടെ സമരത്തിലും ആം ആദ്മി പാര്‍ട്ടിയുടെ ഇടപെടലുകളിലുമെല്ലാം,
എന്തിനധികം മാവോയിസ്റ്റ് യുദ്ധങ്ങളിലടക്കം ഈ ദാര്‍ശനിക ശൂന്യത
നിഴലിക്കുന്നുണ്ട്. മറുവശമാകട്ടെ, വികസനദര്‍ശനം തരുന്ന അച്ചടക്കത്താല്‍
എണ്ണയിട്ട യന്ത്രം പോലെ പ്രയത്നിക്കുന്നു; അവിടെ മുതലാളിത്തവും ഫാസിസവും
ഭരണകൂടവുമെല്ലാം ഒരേ ലക്ഷ്യത്തില്‍ ഒരുമിക്കുന്നു.

ഈ സാഹചര്യങ്ങളെ അഭിസംബോധന ചെയ്യുവാനുള്ള എളിയ ശ്രമം എന്ന നിലയ്ക്കാണ്
കേരളീയവുമായുള്ള ഈ അഭിമുഖ സംഭാഷണം സംഭവിച്ചത്. ഭരണകൂടത്തെ
നമ്മളോരോരുത്തരില്‍നിന്നും ഒട്ടും ഭിന്നമല്ലാതെയും കുടുംബം, മതം തുടങ്ങിയ
സ്ഥാപനങ്ങളുടെ ഉള്ളടക്കത്തോടു ചേര്‍ത്തുവെച്ചും മനസ്സിലാക്കുന്ന
സമീപനമാണ് ഇതിലുള്ളത്.

വളരെ വിശദമായി നടക്കേണ്ട സംവാദങ്ങളുടെ ആമുഖം മാത്രമായി ഈ
അഭിമുഖത്തെക്കണ്ട് കൂടുതല്‍ പഠനങ്ങളും ചര്‍ച്ചകളും രൂപപ്പെടുത്താമോ?
സുഹൃത്തിന്റെ പ്രതികരണങ്ങള്‍ ദയവായി സുഹൃത്തിനൊപ്പം ഈ കത്ത്
അയച്ചിരിക്കുന്ന എല്ലാവര്‍ക്കുമായി അയക്കണേ..

സ്നേഹം
ശ്യാം ബാലകൃഷ്ണന്‍

അഭിമുഖത്തിന്റെ പൂര്‍ണ്ണരൂപം ഇവിടെ Keraleeyam Interview of Shyam Balakrishnan

പിന്നീടു് ചേര്‍ത്തതു്: ഡയാസ്പൊറയില്‍ നടക്കുന്ന ചര്‍ച്ച

by Pirate Praveen at July 20, 2014 03:48 PM

Santhosh Thottingal

Typesetting Malayalam using XeTeX

XeTeX is an extension of TeX with built-in support for Unicode and OpenType. In this tutorial, we are going to learn how to typeset Malayalam using XeTeX. With some learning effort, we can produce high quality typesetting using XeTeX. 

Installing XeTeX

XeTeX is packaged for all famous GNU/Linux distros. The installation method depends your distro. For ease of installation and configuration, we suggest to use a TeXLive version 2012 or above – either standalone TeXLive distribution or install from your distribution’s package manager. Windows and OSX versions are also available.

Following packages are required to install to get a working xetex environment in your computer. Note that these packages are relatively large in size and will take time and bandwidth.

  1. texlive-xetex
  2. texlive-latex-extra
  3. texlive-lang-indic

You also need reasonably good unicode compatible Malayalam fonts. These fonts also comes with GNU/Linux distros. Search for malayalam fonts in your package manager and install if not already installed. Eg fonts: Meera, Rachana etc.

Creating documents using XeTeX

A simple document to learn usage of xetex is given below.

Using a text editor like gedit or kate, create a new file with .tex as file extension. Eg: example.tex. Copy the following content as the content for that file and save.

<noscript><pre><code class="language-tex tex">\documentclass[11pt]{article} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{malayalam} \setmainfont[Script=Malayalam, HyphenChar=&quot;0000]{Rachana} % In the above line we customized Hyphenation characters since % visbile hyphen, aka Soft Hyphen is not used for Malayalam \lefthyphenmin=3 \righthyphenmin=4 \title{\textbf{സ്വർണം}} \author{മലയാളം വിക്കിപീഡിയ} \date{} \begin{document} \maketitle \section{സ്വർണം} മൃദുവും തിളക്കമുള്ളതുമായ മഞ്ഞലോഹമാണ് സ്വർണം. വിലയേറിയ ലോഹമായ സ്വർണം, നാണയമായും, ആഭരണങ്ങളുടെ രൂപത്തിലും നൂറ്റാണ്ടുകളായി മനുഷ്യൻ ഉപയോഗിച്ചു പോരുന്നു. ചെറിയ കഷണങ്ങളും തരികളുമായി സ്വതന്ത്രാവസ്ഥയിൽത്തന്നെ പ്രകൃതിയിൽ ഈ ലോഹം കണ്ടുവരുന്നു. ലോഹങ്ങളിൽ വച്ച് ഏറ്റവും നന്നായി രൂപഭേദം വരുത്താവുന്ന ലോഹമാണിത്. \footnote{http://www.webelements.com/webelements/elements/text/Au/key.html &quot;Key properties of gold&quot; (in ഇംഗ്ലീഷ്). ശേഖരിച്ചത് 2007-06-18.} \section{ഗുണങ്ങൾ} സ്വർണത്തിന്റെ അണുസംഖ്യ 79-ഉം പ്രതീകം Au എന്നുമാണ്. ഔറം എന്ന ലത്തീൻ വാക്കിൽ നിന്നാണ് Au എന്ന പ്രതീകം ഉണ്ടായത്. ഏറ്റവും നന്നായി രൂപഭേദം വരുത്താൻ സാധിക്കുന്ന ലോഹമാണ് സ്വർണ്ണം. ഒരു ഗ്രാം സ്വർണ്ണം അടിച്ചു പരത്തി ഒരു ചതുരശ്രമീറ്റർ വിസ്തീർണ്ണമുള്ള ഒരു തകിടാക്കി മാറ്റാൻ സാധിക്കും. അതായത് 0.000013 സെന്റീമീറ്റർ വരെ ഇതിന്റെ കനം കുറക്കാൻ കഴിയും. അതു പോലെ വെറും 29 ഗ്രാം സ്വർണ്ണം ഉപയോഗിച്ച് 100 കിലോ മീറ്റർ നീളമുള്ള കമ്പിയുണ്ടാക്കാനും സാധിക്കും. \section{ചരിത്രം} ചരിത്രാതീത കാലം മുതൽക്കേ അറിയപ്പെട്ടിരുന്ന അമൂല്യലോഹമാണ്&zwnj; സ്വർണ്ണം. ഒരുപക്ഷേ മനുഷ്യൻ ആദ്യമായി ഉപയോഗിച്ച ലോഹവും ഇതുതന്നെയായിരിക്കണം. ബി.സി.ഇ. 2600 ലെ ഈജിപ്ഷ്യൻ ഹീറോഗ്ലിഫിക്സ് ലിഖിതങ്ങളിൽ ഈജിപ്തിൽ സ്വർണ്ണം സുലഭമായിരുന്നെന്ന് പരാമർശിക്കുന്നുണ്ട്. ചരിത്രം പരിശോധിച്ചാൽ ഈജിപ്തും നുബിയയുമാണ്&zwnj; ലോകത്തിൽ ഏറ്റവുമധികം സ്വർണ്ണം ഉല്പ്പാദിപ്പിച്ചിരുന്ന മേഖലകൾ. ബൈബിളിലെ പഴയ നിയമത്തിൽ സ്വർണ്ണത്തെപ്പറ്റി പലവട്ടം പരാമർശിക്കുന്നുണ്ട്. \end{document}</code></pre></noscript>

Now you need to compile this document to generate PDF.

xelatex example.tex

Output of the above content can be seen here.

The above tutorial is a very basic tutorial on using XeTeX with Malayalam. For detailed tutorial, please refer any tutorial available freely in internet. Example: https://en.wikibooks.org/wiki/LaTeX

by Santhosh Thottingal at July 20, 2014 06:05 AM

June 28, 2014

Santhosh Thottingal

June 24, 2014

Pirate Praveen

Microsoft Tax Refund

Last Sunday evening marked starting of an important campaign when a casual search for a good laptop for a friend turned into tussle with HP for a refund of unused software bundled with their hardware.

Ishan about to make a phone call

Most laptop vendors ship their hardware with a version of Microsoft Windows preinstalled. Microsoft says we can get a refund for the windows version if we don’t want to use their software (we cannot use it unless we agree to their end user license agreement or eula and their eula denies many rights that we in the Free Software community hold dear).

So we sent this email to HP support asking for a refund.

Hi,

I just brought a new hp pavilion 15 Notebook PC (model number: 15-n259TX) with serial no: 5CDxxxxxx7 and product no: G2H01PA#ACJ. It came pre-loaded with Windows 8 but I don’t agree with the End User License Agreement. There was no option provided without any operating system or with a Free Software Operating System for this model at the HP world shop in Kandivali West (Amgee Computers PVT. LTD).

Microsoft EULA (http://download.microsoft.com/Documents/UseTerms/Windows_8_English_ca383862-45cf-467e-97d3-386e0e0260a6.pdf) states that I can get a refund for the unused license by contacting the manufacturer.

It states “If you do not accept and comply with these terms, you may not use
the software or features. Instead, you should return it to the retailer or other place where you purchased the software license, for a refund or credit.”

How do I collect the refund money?

Thanks

We immediately formatted the machine and installed Ubuntu 14.04 on the machine.
Format entire disk

We called them up the next day and registered an official complaint with HP but they refused to give a refund. When they said they offer other models with Free Dos installed Ishan gave a brilliant analogy. If you go to buy a shirt and you like a Yellow shirt, they tell you have to buy a pants along with it, but you can buy a black shirt without pants, would that be acceptable to you?

HP says they will offer only a refund of the entire product (hardware and software) and not a partial Windows only refund. In France and Italy there is already rulings that forced HP and Acer to refund the Windows license fee. Indian courts have ruled set-top boxes allowing only one particular service provider are illegal.

Prasanth Sugathan from Software Freedom Law Center India has promised to send a legal notice to HP within 2 days.

This is going to be a landmark struggle for Free Software in India.

If you have recently bought a laptop or planning to buy a new laptop, contact us and we can fight this together.

Update 1 (25/06/2014): HP has closed the case without a resolution. Prasanth needs a copy of the invoice to go ahead, we’ll send it by tonight.

Update 2 (25/06/2014): There is a good discussion about this issue on reddit.

The relevant law which HP violates is Competition Act 2002.

“Any agreement amongst enterprises or persons at different stages or levels of
the production chain in different markets, in respect of production, supply,
distribution, storage, sale or price of, or trade in goods or provision of services,
including—
(a) tie-in arrangement;

shall be an agreement in contravention of sub-section ( 1 ) if such agreement
causes or is likely to cause an appreciable adverse effect on competition in
India.
Explanation.—For the purposes of this sub-section,—
(a) “tie-in arrangement” includes any agreement requiring a purchaser of
goods, as a condition of such purchase, to purchase some other goods; ”

Update 3 (25/06/2014): There is precedent in Europe where companies are ordered a refund.

  1. HP must reimburse Italian PC buyer the amount paid for Microsoft software
  2. Lenovo ordered to pay €1920 for making French laptop buyer pay for Windows too

Update 4 (25/06/2014): Acer America has policy of giving refund on unused Windows license.

Update 5 (26/06/2014): Prasanth would need 2-3 days more to complete research on this topic.

Update 6 (11/09/2014): Prasanth has sent the legal notice to HP. This case is covered by Economic Times now. You can get a copy of the notice from mediacru.sh. (MediaCrush is Free Software media sharing platform).

Update 7 (13/09/2014): This is a fresh development, Italy: High Court shoots down Windows tax

by Pirate Praveen at June 24, 2014 08:22 AM

May 31, 2014

Santhosh Thottingal

Frequency modulation in gnu-octave : square wave carrier and sinusoidal message

Frequency modulation is a common analog modulation technique. Here the instantaneous frequency of the carrier wave is varied with the instantaneous amplitude of the message signal. That is the information regarding the message is available in the frequency of the carrier. It is a kind of more generic technique called angle modulation.

fmsquare

Sinusoidal frequency modulation of square wave carrier

Gnu-octave has built-in function fmmod() available in octave-communications package for implementing frequency modulation. But this function modulates the given message signal with a sinusoidal carrier of specified frequency. If we want the carrier to be a square wave as shown in the figure, the built-in function would not help.

Let us see how this can be done. The carrier is a square wave. It may be represented as $$A_c square(\theta_c)$$.  The angle modulated wave has the information content available in the angle part ($$\theta_c$$) of the carrier. When the carrier is angle modulated, the instantaneous value of $$\theta$$ depends on the message signal.

$$FM=A_c square(\theta_{i}(t))$$

The angle is not a constant. It varies with time depending on the message signal. In case of frequency modulation, the instantaneous value of that angle is the integral of instantaneous frequency of the modulated signal. Assume $$\omega_i(\tau)$$ is the frequency in radians per second and $$f_i(\tau)$$ is the frequency in Hz.

$$FM=A_c square(\int_0^t\omega_i(\tau)d\tau)$$

$$FM=A_c square(2\pi \int_0^t f_i(\tau) d\tau)$$

The instantaneous value of this frequency $$f_i(\tau)$$ is the sum of the carrier frequency $$f_c$$ and the frequency change due to the message signal amplitude. Assuming $$x(\tau)$$ is the unit normalized message and $$f_{dev}$$ is the maximum possible deviation from carrier frequency $$f_c$$.

$$FM=A_c square(2\pi \int_0^t(f_c+f_{dev}x(\tau) d\tau)$$

$$FM=A_c square(2\pi f_ct+2\pi f_{dev}\int_0^tx(\tau)d\tau)$$

To code the same in octave, each continuous time signal is assumed to be sampled at high sampling rate to obtain corresponding discrete time signal. The sampling frequency $$F_s$$ is kept high to avoid improper interpolation of signals while plotting them. Built-in functions can be used to define sine and square waves. The key step is in defining the modulated signal. As per the above equation the message signal has to be integrated with respect to time. For discrete time signals the integration can be replaced by using cumulative sum cumsum() function. The integration is along time axis. This effect can be implemented in the code by dividing cumsum() by $$F_s$$.  The plot() function can be used to display the result of modulation. See the code snippet below.

<noscript><pre><code class="language-matlab matlab">%script to make a square-wave carrier modulated with a sinusoidal message fmsg=1; %Message signal frequency. 1 Hz fc=25; %carrier frequency, 25 Hz Fs=500; %sampling frequency, 500 Hz t=[0:1/Fs:1/fmsg]; % Time duaration defined %To make the amplitude vector in the same size as the duration of t Amsg=1*ones(size(t)); Ac=5*ones(size(t)); %The message signal x=Amsg.*sin(2*pi*fmsg*t); subplot(3,1,1); plot(t,x); title('Message');xlabel('time(s)');ylabel('amplitude(V)'); %The carrier signal y=Ac+Ac.*square(2*pi*fc*t); y=y/2; subplot(3,1,2);plot(t,y); title('Carrier');axis([0 1 0 6]);xlabel('time(s)');ylabel('amplitude(V)'); %steps for FM modulation x_modulating=x./max(x); %unit normalized modulating signal fdev=fc/1.5; %frequency deviation limited to a maximum of 2/3 deviation from the carrier frequency z =Ac+Ac.* square (2*pi*fc*t + 2*pi*fdev*(cumsum(x_modulating)/Fs));%Generating FM signal z=z/2; subplot(3,1,3);plot(t,z);title('FM');axis([0 1 0 6]);xlabel('time(s)');ylabel('amplitude(V)'); print('fmsquare.png');</code></pre></noscript>

by Kavya Manohar at May 31, 2014 10:18 AM

May 25, 2014

Santhosh Thottingal

GSOC 2014 – Mentoring for SMC

I am a mentor for Google Summer of Code 2014 for SMC. I will be helping Praveen Sridhar to port input methods from jquery.ime to the Firefox OS.

We started the project and Praveen already has a proof of concept ready.

Tim Chien and Rudy Lu from Mozilla is co-mentoring the same project

by Santhosh Thottingal at May 25, 2014 05:17 AM

May 24, 2014

Santhosh Thottingal

Parsing CLDR plural rules in javascript

English and many other languages have only 2 plural forms. Singular if the count is one and anything else is plural including zero.

But for some other languages, the plural forms are more than 2. Arabic, for example has 6 plural forms, sometimes referred as ‘zero’, ‘one’, ‘two’, ‘few’, ‘many’, ‘other’ forms. Integers 11-26, 111, 1011 are of ‘many’ form, while 3,4,..10 are ‘few’ form.

While preparing the interface messages for application user interfaces, grammatically correct sentences are must. “Found 1 results” or “Found 1 result(s)” are bad interface messages. For a developer, if the language in the context is English or languages having similar plural forms, it may be a matter of an if condition to conditionally choose one of the messages.

But that approach is not scalable if we want to deal with lot of languages. Some applications come with their own plural handling mechanism, probably by a module that tells you the plural form, given a number, and language. The plural forms per language and the rules to determine it is defined in CLDR. CLDR defines the plural rules in a markup language named LDML and releases the collections frequently.

If you look at the CLDR plural rules table you can easily understand this. The rules are defined in a particular syntax. For example, the Russian plural rules are given below.

<noscript><pre><code class="language-xml xml"> &lt;pluralRules locales=&quot;ru uk&quot;&gt; &lt;pluralRule count=&quot;one&quot;&gt;v = 0 and i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, &hellip;&lt;/pluralRule&gt; &lt;pluralRule count=&quot;few&quot;&gt;v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, &hellip;&lt;/pluralRule&gt; &lt;pluralRule count=&quot;many&quot;&gt;v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, &hellip;&lt;/pluralRule&gt; &lt;pluralRule count=&quot;other&quot;&gt; @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, &hellip;&lt;/pluralRule&gt; &lt;/pluralRules&gt;</code></pre></noscript>

One need to pass the value of the number to the variable in the above expressions and evaluate. If the expression evaluates to a boolean true, then the corresponding plural form should be used.

So, an expression like  n = 0 or n != 1 and n mod 100 = 1..19 mapped to ‘many’ holds true if the value of n=0,119, 219, 319. So we say that they are of ‘few’ plural form.

But in the Russian example given above, we don’t see n, but we see variables v, i etc. The meaning of these variables are defined in the standard as:

Symbol Value
n absolute value of the source number (integer and decimals).
i integer digits of n.
v number of visible fraction digits in n, with trailing zeros.
w number of visible fraction digits in n, without trailing zeros.
f visible fractional digits in n, with trailing zeros.
t visible fractional digits in n, without trailing zeros.

Keeping these definitions in mind, the expression v = 0 and i % 10 = 1 and i % 100 != 11 evaluates true for 1,21,31, 41 etc and false for 11. In other words, number 1,21,31 are of plural form “one” in Russian.

A module to support the plural forms for any language can manually(or semi automatically) convert this expressions to programming language one time and use it. Twitter-cldr a CLDR abstraction library by twitter follows this method. It converted the above given plural rules to the following javascript expression using a compiler.

<noscript><pre><code class="language-javascript javascript">PluralRules.rules = { &quot;keys&quot;: [&quot;one&quot;, &quot;few&quot;, &quot;many&quot;, &quot;other&quot;], &quot;rule&quot;: function (n) { return (function () { if (n % 10 == 1 &amp;&amp; !(n % 100 == 11)) { return &quot;one&quot; } else { return (function () { if ([2, 3, 4].indexOf(n % 10) &gt;= 0 &amp;&amp; !([12, 13, 14].indexOf(n % 100) &gt;= 0)) { return &quot;few&quot; } else { return (function () { if (n % 10 == 0 || [5, 6, 7, 8, 9].indexOf(n % 10) &gt;= 0 || [11, 12, 13, 14].indexOf(n % 100) &gt;= 0) { return &quot;many&quot; } else { return &quot;other&quot; } })(); } })(); } })(); } };</code></pre></noscript>

This works. But CLDR updates the plural rules in every releases. Most of the time, it contains additional language support. Sometimes the rules are changed or improved too. The maintainer of the module need to recompile them to javascript expression in such cases.

If we can write a compiler to generate javascript from this expressions, can’t we write a parser-evaluator for the expressions? So that we just need to pass the rule and the number to that evaluator  and it returns the plural form?

CLDRPluralRuleParser

 CLDR Plural Rule Evaluator

CLDR Plural Rule Evaluator

CLDRPluralRuleParser is that evaluator. I wrote this parser when we at Wikimedia foundation wanted a data driven plural rule evaluation for the 300+ languages we support. It started as a free time project in June 2012. Later it became part of MediaWiki core to support front-end internationalization. We wanted a PHP version also to support interface messages constructed at server side. Tim Starling wrote a PHP CLDR plural rule evaluator.

It is javascript library that takes the standardized plural rule and an integer and returning true or false depending on whether the rule pass for the given integer. It is written with UMD/common.js pattern and available as a node module too.

The node module comes with command line interface, just to experiment with rules.

$ cldrpluralruleparser 'n is 1' 0

false

The module does not self contain the plural rules collection or data. Developers need to have that collection as an xml or json inside the application and need to pass to the module. In that sense, one cannot offload the whole i18n message processing task to this module. For a more handy internationalization with javascript, that takes care of plural, gender, grammar etc, you may consider jquery.i18n which contains CLDRPluralRuleParser.

An example showing how to use the CLDR supplied plural rule data and this library is included in the repository. You can play with that application here.

<noscript><pre><code class="language-javascript javascript">var parser = require(__dirname + '/CLDRPluralRuleParser.js'); var rule = 'v = 0 and n != 0..10 and n % 10 = 0'; var result = parser(rule, 20); console.log(result); //outputs true</code></pre></noscript>

License: Initially the license of the module was GPL, but as per some of the collaboration discussion between Wikimedia, cldrjs, jQuery.globalize, moment.js, it was decided to change the license to MIT.

by Santhosh Thottingal at May 24, 2014 11:26 AM

April 17, 2014

Jishnu Mohan

Indic Keyboard re-release

A few weeks back, SMC with the support of ICFOSS re-released my long time hobby project, Indic Keyboard. On its first day itself the new app got more than double the number of downloads my app got over the last one and a half years. Here is how I started that project.
Indic Keyboard India rankings

I am a long time android user, I got my first android phone in Gingerbread (2.3) days. I always wanted to do something related to android but Java was a barrier for that.
There are many reasons why Java has never interested me. Most of the programs written in Java I used were very slow on my computer and the UI doesn’t feel like native.
I still need to meet someone who develops Java programs without using an IDE. My understanding is that writing java with a text editor is a PITA mostly because it needs a lot of boilerplate code (correct me if I’m wrong).

From early days itself, I was quite impressed with the features and performance improvements CyanogenMod made to AOSP base. CM was my daily driver most of the time. When Android 4.2 jelly bean was released, I thought of adding recently introduced Rupee symbol to CM keyboard.
Cloned LatinIME repo and gone through the code to find out how to do this. Later I founded that I need the entire AOSP code base to compile native part of the code. I always wanted to compile ROM my own, When ICS code was released, I read somewhere that SSD and at least 16gb of RAM is recommended to compile AOSP. What I had was a really slow machine. Somehow my machine was able to handle the load. But I decided to give it a try anyway. With my 256kps BSNL connection, it took almost a month to clone the entire AOSP source code.

After contributing rupee symbol to CM keyboard, I thought of adding Malayalam layout to the same. At that time, support for malayalam was only recently added (there was other methods to add Malayalam fonts, but it wasn’t possible for all devices.)
Since Keyboard is a much bigger task, I thought of releasing it as a separate app, which will help me to iterate more on layout before pushing to CM.

The first task was to port LatinIME to a user app. At that time, there were many system level dependencies which made it difficult to compile as an independent app (it is easier now, from 4.3).
After porting to user app, I added layouts for Malayalam and tamil. There were only few devices which run 4.1 version at that time, so it was difficult to get users.

I was quite slow on developing this, mostly because of the number of devices running latest version of Android in India. But I knew the potential of the project after one or two years.

Six months back, SMC with the support of ICFOSS, came to support the development of this project. Over the past few months, I was able to implement transliteration using jquery.ime java port (from Wikimedia team), support for 15 languages, and around 35 layouts.

Creating the layout was more time consuming, when I started. It used to take almost a day to create a layout for a particular language. With some scripts I wrote, I was able to reduce this considerable amount of time.

When SMC released the app under their account, the response was mind blowing. The app got around 20,000 downloads in first 4 days, reached #1 in India, Saudi Arabia in the top new free list of its category.
Indic keyboard global ranking
top new free tools
I never expected this for an app which was there in store for last 1.5 years. I believe that the tweet by Pranav Mistry on the first day helped a lot.


Many popular blogs, newspapers reported about it few days after the release.

The app which released under my account is still live in play store, I renamed it to Indic Keyboard Prime to avoid confusion. It has some additional features such as word suggestion and Gesture typing.

One thing I have learned in the last few months is, if you are accepting funding for a project, think well about the conditions they put forward. Also, you might have to see people stealing your credits (I have seen many, I don’t want to mention anyone though).

Happy hacking.

by Jishnu at April 17, 2014 03:11 PM

March 30, 2014

Santhosh Thottingal

Brackets, my favorite javascript IDE

I use Brackets for web development. I had tried several other IDEs but Brackets is my current favorite IDE. A few things I liked is listed below

Some extensions I use with Brackets are:

  1. Markdown Preview for easy editing of markdown
  2. Brackets Git for git integration
  3. Themes for Brackets For Monokai Darksoda theme I use
  4. Brackets Linux UI
  5. Interactive Linter realtime JSHint/JSLint/CoffeeLint reports into brackets as you work on your code
  6. WD Minimap for SublimeText like code overview
  7. Beautify for automatic code formatting as you save using jsbeautify

Beautify extension helps me a lot because most of the MediaWiki related code I write needs be as MediaWiki javascript coding convention. I never get it right if I format manually. The convention is a bit different from usual js code formatting. In general you need to use a lot of whitespaces. This extension was using a default jsbeautify formatting configuration and I wanted it to be customizable per project so that I can write my own .jsbeautifyrc file to get my code formatted as per conventions.

There was an enhancement bug for this. I wrote a patch for handling project specific jsbeautifyrc and Martin Zagora merged it to the repo. Here is my .jsbeautifyrc for MediaWiki https://gist.github.com/santhoshtr/9867861

Brackets is in active development and I look forward for more features. The most important bug I would like to get fixed, that all code editors I tried suffer including brackets is support of pain free complex script editing and rendering. Brackers uses CodeMirror for the code editor and I had reported this issue . It is not trivial to fix and root cause is related to the core design. Along with js,css,html, php etc I have to work with files containing all kind of natural language text and this feature is important to me.

by Santhosh at March 30, 2014 05:18 AM

March 22, 2014

Santhosh Thottingal

NotoSansMalayalam and nta

NotoSansMalayalam has the following ligature rules for ന്റ (nta)- All uses Akhand Opentype featurenotosansml-nta1

  1. uni0D7B(ൻ) + uni0D4D(്) + uni0D31(റ) => ൻ + ് + റ
  2. uni0D28(ന) + uni0D4D(്) + uni200D(ZWNJ) +uni0D31(റ) => ന്‍ + റ
  3. uni0D28(ന) + uni0D4D(്) + uni0D31(റ) => ന് +റ

notosansml-nta

The first one is what is defined in Unicode chapter 09 section 9.9[pdf]. The second is what Microsoft Kartika used to use for /nta/ as a bug. The last one is what all other fonts follows. If this is what standards can achieve, what can I say?

by Santhosh at March 22, 2014 09:22 AM

Spurious glyphs in NotoSansMalayalam

NotoSansMalayalam is a font released by Google internationalization team under noto project. I was checking the glyphs of Malayalam and noted a number of spurious glyphs in the font

notosansml-unwantedglyphs

It is interesting because the font attempted to provide a minimal Malayalam font with reduced glyph set. While attempting that about 10% of the glyphs are either non-existing Malayalam glyphs(Glyphs with dot under consonants) or rarely used glyphs(Glyphs with U+0D62 MALAYALAM VOWEL SIGN VOCALIC L)

by Santhosh at March 22, 2014 08:50 AM

March 05, 2014

Pirate Praveen

Sharing files between gnu/linux and Windows using samba

Install Samba package

# apt-get install samba

Samba configuration file is /etc/samba/smb.conf

You can add directories for sharing at the end like this

[debian]
comment = Debian Cache
read only = yes
locking = no
path = /mirrors/debian
guest ok = yes

If you want to be able to share directories from nautilus file manager install nautilus-share and add your user to sambashare group

# apt-get install nautilus-share
# gpasswd -a <user> sambashare

Log out and login back for group change to take effect.

For mounting a samba share you have to install cifs-utils

# apt-get install cifs-utils

To mount a samba share now run

# mount -t cifs -o guest //<server>/<share> /<mount point>
# mount -t cifs -o guest //192.168.1.3/debian /mnt

by Pirate Praveen at March 05, 2014 06:01 AM

March 04, 2014

Pirate Praveen

Setting up a local package repository with apt-move

apt-move can be used to create a repository layout from /var/cache/apt/archives (which contains all packages downloaded by apt).

1. Install apt-move:

# apt-get install apt-move

2. Setup apt-move:

# apt-move get

3. Create repository layout:

# apt-move move

4. Generate packages list:

# apt-move packages

5. Setup apache2:

apt-move will create repository in /mirrors/debian by default (this can be changed in /etc/apt-move.conf)

5.1 Install apache web server:

# apt-get install apache2

5.2 Create a virtual host:
copy ‘default” in /etc/apache2/sites-available to “repo”

# cd /etc/apache2/sites-available
# cp default repo

Edit repo and change DocumentRoot from /var/www to /mirrors/debian
Also change to

Enable the new site.

# a2ensite repo

# /etc/init.d/apache2 restart

This will give you a repository in your machine.

If you have more than one site in your server you can configure NameVirtualHost.

Add “NameVirtualHost *:80″ in /etc/apache2/ports.conf

and add ServerName for each virtual hosts in sites-available/<site>

If you just want to test your setup without a proper dns server you can edit /etc/hosts file to point your desired domains to repository’s ip address.

If you want to sign your repository follow these steps

1. Create a gpg key:

# gpg --gen-key

(choose RSA RSA, no expiration) or follow these more detailed steps

2: Sign the Release file (apt-move has an option to sign automatically, but it seems to be broken)

# gpg -o /mirrors/debian/dists/stable/Release.gpg -a -b -s /mirrors/debian/dists/stable/Release

3. Export your public key

# gpg --export --armour <key id or pattern> > repo.key.sc
# cp repo.key.asc /mirrors/debian

In client systems download the key with wget and run

# apt-key add repo.key.asc

by Pirate Praveen at March 04, 2014 07:08 AM

March 01, 2014

Rajeesh K Nambiar

SMC mentoring for GSoC 2014 too

Swathanthra Malayalam Computing is a free software collective engaged in language computing, development, localization, standardization and popularization of various Free and Open Source Softwares in Malayalam language. SMC developers have contributed to various Indian language computing efforts including fonts, spell checkers, hyphenation patterns (used by TeX, Libreoffice, Firefox), input methods etc. Last year, SMC was selected as a mentor for Google Summer of Code program and we successfully mentored 3 student projects – a web application to store and process bibliography data of books with i8n support, port SILPA into Flask application and restructure into standalone modules and Automated Shaping&Rendering testing, primarily for HarfBuzz.

Together with Santhosh, I have mentored the Automated Shaping&Rendering testing framework which we use to test Malayalam font changes against HarfBuzz. It can also be used to test Uniscribe shaping engine if compiled in Windows, or used against HarfBuzz with Uniscribe backend.

SMC is selected as an organization to mentor for GSoC again this year. If you are a student who wants to work on interesting problems, look at our project ideas. One of the problems I am particularly interested and to mentor is adding Indic shaping support to ConTeXt. Apart from the listed ideas, you can propose other ideas as well. Read the FAQ, you can reach us by mailing list or via IRC #smc-project on freenode.net.


Tagged: gsoc, smc

by Rajeesh at March 01, 2014 02:45 PM

February 25, 2014

Jishnu Mohan

Google Indic Android hackathon

When I heard Google is organizing an Indic Android hackathon at their Bangalore office, I got thrilled. I always wanted to work for google, so going to their office itself was tremendous for me (this might be the closest I can ever get). It was an invite only event, some how I got an invitation.

First day, the event started with some talks by Google’s partners. Even though it was an android related event, most people talked about common Indic problems or common mobile related Indic problems rather than focusing on android platform.

Lunch was awesome. One of the best mutton I ever had in Bangalore. Surprisingly they even had Kerala rice. Google knows how to make their employees happy.

Real event, hackathon started at 5pm, Google’s partners came up with a few topics, and gave us time to form groups and select any of those. I was interested to work on either UI/UX for any of the project or work on IME. Since I have already worked on keyboard, I knew I won’t need to start from scratch. I talked to few people and met Satya and Narasimha and they liked the keyboard idea. We decided to form a team. We started by planning what to do in the next 24 hours we got.
Our plan was to
* Port XKB keyboard layouts, at least one per language
* Generate dictionary for word suggestion, for all the ported languages
* Write a script to filter words in dictionary
* Use jquery.ime java port and find a method to suggest words from dictionary for transliteration
* Fix character going outside the button in keyboard (this is a long time bug in my keyboard)

After helping my team members to configure and setup their machine, we moved to google’s food court and started work at around 10’o clock. Satya started working on Kannada layout, Narasimha on Telugu and I started with dictionaries.

I downloaded database dumps of Wikipedia and created a script to get words, gave priority and normalized those. All words were given a priority between 15 and 254 based on number of occurrences in Wikipedia. Script had some additional check to skip 1 character words and numbers. I faced some problem here because of the length calculation in Perl, Unicode wasn’t considered by default. So a single character Unicode words were getting a length of more than 1. After fixing it I moved on to fixing button issue. Narasimha was already asleep. Sathya completed Kannada and he also went to sleep. I was prepared not to sleep, thanks to google’s free snacks, coffee, juices, and packaged coconut water.

I figured out a way to fix layout issues. Word suggestions was not working in transliteration, So I started debugging it, it was around 4 or 5’o clock, I spent a lot of time on this. Couldn’t figure out what was going wrong. After trying few more times, I dropped it and moved to porting Bengali layout.

When my team mates woke up we had dictionary for all languages we planned, layout issue fixed, and a Bengali layout. They started porting layouts and I fixed few bugs related to new languages. After lunch, we were almost complete with all AOSP supported languages. We still had time, so we decided to port few languages which are supported in some Samsung devices. We started with Gujarati. We ported one more, but decided not to have it because we didn’t have time to correct layouts and create dictionary.

We were really proud of what we did. App was working fine, suggestions were working, and even we had a gesture typing, which even though works only with google’s proprietary library, was the first of its kind for Indic languages. We didn’t prepare much because app was no brainer, anyone who has an android phone will know about keyboards, switching between them etc.

Every team got 4 minutes to present their app, 4 minutes wasn’t enough for us to go through all languages in out keyboard, So I rushed through our presentation. I had an expectation that judges will have good experience with android, So we didn’t explain what difference a keyboard makes than an app developers using some api to transliterate inside their app.

One of the question I faced from judges was about words in dictionary, while demonstration suggestion, one of the suggested word was an english word which was typed as it is in Malayalam. That might have affected our scores negatively. One judge was asking about validity of words from Wikipedia. Another question was about gesture typing. I thought I was able to answer all questions considerably well. Some people from other teams also said that they liked the presentation. But we didn’t win.

3 participated teams got a Nexus 5 and a Nexus 7 tablet each.

About other apps, I really liked a news app (I forgot the name), may be that is the only app presented which tried to follow android UI design guidelines (that also had a minor issue). App had a card based layout with smooth animations. This might be one of the 3 if someone from Google was in judging team to check with Android UI guidelines for submitted apps.

At the end of the day, event was really good. Really looking forward to attend events like this.

This might be the longest blog post I have ever written.

by Jishnu at February 25, 2014 01:43 PM

February 08, 2014

Hrishi

How to neutralize the escape key (keycode 9), without spending any XM

I bought my laptop in 2009. And I am using it (overusing it) ever since. When I joined Sixdee Telecoms in 2012, they gave me another laptop. For the next six months I was using (overusing) the new one, and I kept my old buddy in a blue HP bag – without touching it. In August 2013 I left Sixdee. and my laptop came out of the blue bag. And after two – three months the keyboard started to misbehave. some keys like Escape, Backspace & Enter stopped working. The only option I had, was to buy a usb-keyboard. and I did it. I bought a small usb-keyboard for Rs 250/-. ans started using it.

After one month – when I visited Jithinettan, he was also facing the same issue – almost all keys of his laptop were not working. So he bought a usb-keyboard and some of the keys in the usb-keyboard also stopped working. And he was using on-screen keyboard for typing those keys. I stayed with him for a few weeks.

On a not-so-special morning when I woke up , my laptop keys started working. I don’t know how, but they started working. all keys – at the same time. For a  moment I thought about spreading the news.I imagined about the hundreds of curiosity-seekers, attracted by the resounding news of the miracle. But after considering the fact that I had only one laptop, I changed my mind.

I gave my usb-keyboard to Jithinettan and after a few days I came back to Ernakulam. Life was better without a usb-keyboard. Months flew like days. One day I was chatting with someone and suddenly the chat-window got closed. I opened it again and it got closed again within no seconds. After sometime when I opened the Gmail compose window,  the same thing happened. I restarted my machine and everything was fine. I heard the voice of Morpheus -“It must be a glitch in the matrix“.

The Escape key after my attack

The Escape key after my attack

 

Similar incidents started to occur for the next few days. And it was  VIM,  who showed me the culprit. It was ‘the escape key’. the escape key was being pressed for no reason. I tried cleaning the keyboard. I tried almost everything – without any luck.  And one day I got angry and I attacked the escape key with all my force. I caught the key with my nails and I pulled with complete energy – and I won.  They key was in my hand, a white round thing was all that remained in the position of the escape key. I restarted the machine and tried using it. Now the unwanted escape key press was not happening. Whenever I needed the escape key I pressed on the white spot – and the escape key press event got triggered. I smiled. – That was a big victory.

 

The keycode9 press event  shown in xev console

The keycode9 press event shown in xev console

Exactly after two days, the glitch happened again. the escape key was being pressed   again. And there was nothing left on the position of escape key. I considered firing an XMP-Burstor. But there were no portals on that position. So instead of using the ingress app I tried to scan the position using the ‘xev‘ command. – and yess!! – the escape key was being pressed. To be exact, the key with keycode 9 was being pressed. “Why don’t you remap the keys?” – it was Morpheus again. “Why don’t you remap the keys?”  I asked myself.

For remapping the keys I should find out a key which I don’t use. After spending a couple of minutes, I found the key – the menu key (right click key). This is the only key which I can live without. So the game is ON.

Step 1: Disable keycode 9 

xmodmap -e ‘keycode 9 = NoSymbol’

I used this commend for disabling the usual escape key. After running this command, I tried pressing the white spot. nothing is happening. I again used xev to confirm this. Yes – the key is being pressed and nothing is happening because it is mapped to NoSymbol. All is clear and we are ready to move to the next step.

Step 2: Remap the menu key into escape key 

xmodmap -e ‘keycode 135 = Escape’

The keycode of the menu key is 135. We just mapped the key with keycode 135 into Escape action. I tried pressing it. It works in VIM , chat windows are getting closed when I press the menu key. and I confirmed it using the xev command.

YESS!! I did it. I neutralized the escape key ( keycode9). And life is beautiful again..But if this happens again with a new key – I don’t have any spare keys :(

 

br,

Hrishi

by Hrishi at February 08, 2014 09:49 AM

January 31, 2014

Rajeesh K Nambiar

Going to FOSDEM ’14

I’m attending FOSDEM 2014 at the Université Libre de Bruxelles this weekend. Hope to meet some of the hackers, especially Fedora and KDE folks.


Tagged: hacking

by Rajeesh at January 31, 2014 07:08 PM

January 11, 2014

Santhosh Thottingal

Collaboratively edited documentation for Indic font developers

One of the integral building blocks for providing multilingual support for digital content are fonts. In current times, OpenType fonts are the choice. With the increasing need for supporting languages beyond the Latin script, the TrueType font specification was extended to include elements for the more elaborate writing systems that exist. This effort was jointly undertaken in the 1990s by Microsoft and Adobe. The outcome of this effort was the OpenType Specification – a successor to the TrueType font specification.

JanaSanskritSans_ddhrya

The Devanagari ddhrya-ligature, as displayed in the
JanaSanskritSans font.

Fonts for Indic languages had traditionally been created for the printing industry. The TrueType specification provided the baseline for the digital fonts that were largely used in desktop publishing. These fonts however suffered from inconsistencies arising from technical shortcomings like non-uniform character codes. These shortcomings made the fonts highly unreliable for digital content and their use across platforms. The problems with character codes were largely alleviated with the gradual standardization through modification and adoption of Unicode character codes. The OpenType Specification additionally extended the styling and behavior for the typography.

The availability of the specification eased the process of creating Indic language fonts with consistent typographic behaviour as per the script’s requirement. However, disconnects between the styling and technical implementation hampered the font creation process. Several well-stylized fonts were upgraded to the new specification through complicated adjustments, which at times compromised on their aesthetic quality. On the other hand, the technical adoption of the specification details was a comparatively new know-how for the font designers. To strike a balance, an initiative was undertaken by the a group of font developers and designers to document the knowledge acquired from the hands own experience for the benefit of upcoming developers and designers in this field.

glyph-fontforge-meera

Glyphs inside Meera font

The outcome of the project will be an elaborate, illustrated guideline for font designers. A chapter will be dedicated to each of the Indic scripts – Bengali, Devanagari, Gujarati, Kannada, Malayalam, Odia, Punjabi, Tamil and Telugu. The guidelines will outline the technical representation of the canonical aspects of these complex scripts. This is especially important when designing for complex scripts where the shape or positioning of a character depends on its relation to other characters.

This project is open for participation and contributors can commit directly on the project repository.

by Santhosh at January 11, 2014 08:26 AM

November 23, 2013

Rajeesh K Nambiar

SMC Malayalam fonts updated versions released

The Unicode fonts for Malayalam maintained by Swathanthra Malayalam Computing were last updated almost 2 years ago. They all were supporting just the v1 Indic opentype spec. But there were rendering problems with the fonts under Harfbuzz.

I was fortunate to attend the Open Source Language Summit 2012 (last year!) organized by Wikimedia Foundation and Red Hat (thank you, guys!) where many of the Indic language experts came together to work on issues at hand. The 2-days workshop helped me greatly to get much more insight into fonts, opentype spec and Harfbuzz in general. Since then I have been spending a lot of effort in updating and fixing the Malayalam fonts and also testing git snapshots of Harfbuzz and reporting issues to harfbuzz development list.

In the meantime, Harfbuzz matured enough and fixed many rendering issues. Thanks to the last Udupi hackfest by Behdad and Jonathan Kew, all known issues with Malayalam shaping has been addressed. And we were busy updating the fonts, opentype lookup rules and fixing bugs to work with old shapers (old pango, Qt, ICU Layout Engine, Windows XP) as well as the new ones (Harfbuzz, Uniscribe, Adobe). The v1 Indic opentype spec was a mess due to ‘undesirable’ Halant reordering (Consonant+Halant forms were ligated while it should have been Halant+Consonant). It has caused a lot of grief on the font developers and shaping engine developers side. With the v2 spec (mlm2 script tag for Malayalam), this has been changed and there is no need to perform Halant shifting anymore by shaping engines. I was leading the effort of porting to mlm2 spec of Malayalam fonts. We could port only Meera and Rachana for now, and RaghuMalayalam taken care by a few sed scripts.

During the 12th anniversary celebrations of Swathanthra Malayalam Computing group, the new version of fonts (5.1 supporting old shapers and 6.0 supporting new shapers) were released. See the email to smc-discuss for details. Remaining fonts also need to be updated, there is interest from community to collaborate on that. The new release will show up in Fedora 20.

In the process, I have learned quite some intricacies of the Indic opentype spec and would try to document them in a series of posts.


Tagged: fonts

by Rajeesh at November 23, 2013 06:07 PM

October 03, 2013

Hrishi

Malayalam Page Numbers using XeLatex

I was typesetting a book in Malayalam using XeLatex. and I was wondering if it is possible to use Malayalam numerals for page numbers.

By referring a stackexchange answer I wrote the following macro.

%%%———–Malayalam Page Number—————%%%%

\makeatletter
\def\@malnumber#1{\expandafter\@@malnumber\number#1\@nil}
\def\@@malnumber#1{%
\ifx#1\@nil
\else
\char\numexpr#1+”0D66\relax
\expandafter\@@malnumber\fi}
\def\malcounter#1{\expandafter\@malnumber\csname c@#1\endcsname}
\def\malnumeral#1{\@@malnumber#1\@nil}
\makeatother

\def\MalpageNum{\malcounter{page}}

 

Now the \MalpageNum command will give you the current page number using the Malayalam numerals.

 

br,

Hrishi

by Hrishi at October 03, 2013 09:04 AM

August 26, 2013

Nandaja Varma

GSoC – Weekly status update #9

The work of mine has been correcting the reference glyph files and developing a web interface for the proposed framework. I had tried and made the reference files least buggy as possible. I have gone through the glyph names of almost all the 243 words in 4 fonts. I had to invest a lot of time on this especially due to one minor misunderstanding of mine on the multiple correct renderings of the words. And I hope it will get much refined after Rajeeshettan proof read it for 2 fonts as he has suggested.
(I have changed the renderings of words with repham in Rachana such that the dotreph comes first. So words like these http://troll.ws/image/2e3a872e, http://troll.ws/image/469dd87a, http://troll.ws/image/5838dbec although looks correct, will be in the wrongly rendered words list by harfbuzz.)

The next part of this weeks work was developing the web interface (Excuse my poor design, I am cleaning it up as I write). It doesn’t actually spits output to the user now or doesn’t make it easier for the user to open files. I am hoping to make it run the script well in a week’s time and don’t think it is ready yet for the review. So I would like another week to make it ready for reviewing.

And finally about the C code I have added to the repo. I will start working on a new code in C++ once I am done with the webpage as I find the present code massively buggy and really inefficient. I hope I’ll be able to update it the week after next.

My code here: https://github.com/nandajavarma/Automated-Rendering-Testing


by Nandaja at August 26, 2013 12:30 AM

August 25, 2013

Ershad K

GSoC 2013: Week 10 of Grandham project

Last week I’ve been working on admin review feature to incorporate the new changes happened in the user end.

Screen Shot 2013-08-26 at 1.56.09 AM

With the addition of in-place editing feature, admins can now approve minor edits by actually looking the difference. They also have options to replace author/publisher if the previously set author was different.

Along with that, we now have an option to upload book cover. It can be found in ‘Add new book’ form. In the long run, it will be also appearing under each book cover(in book page) where user can upload a cover just like they edit other information.

Screen Shot 2013-08-26 at 2.03.44 AM

by ershad at August 25, 2013 08:35 PM

GSoC 2013: Week 9 of Grandham project

In Week 9, I rewrote the complete crowdsourcing functionality of Grandham from a submission based approach to micro-edits based approach. Earlier we used to store the entire snapshot while recording modifications but now we store only the ‘edit’ (similar to diff, but in a structured database table) and pass it to admins for reviewing. This approach has some significant advantages including the easy generation of history of book pages.

In-place editing was integrated during the same week. Now participants can click on a field and edit it.

by ershad at August 25, 2013 08:20 PM

August 17, 2013

Nandaja Varma

GSoC Weekly status update #8

I have changed the framework interface from its previous form, although the previous front end automated_rendering_testing.py is still present in the repo. Now the new interface, rendering_testing.py, need all the file names to be provided as command line arguments. The user gets the convenience  of using the tab completion this way. The user will have to give as command line arguments 6 files (font  file, test cases file, reference file, rendering output and files to store output) and an optional directory name(if the engine is harfbuzz).
 If the rendering engine is harfbuzz, user can run the script generate_hb_rendering.py  along with the test cases file and font file as parameters, to create the rendered output file. If that is not the case, the user will have to create this file as well in the prescribed form.

Now, the algorithm that actually test the rendering was a bit buggy and was giving certain wrong outputs for words with multiple rendering engines and I have cleared this error. This feature gives correct output now for the files I tried it with.
The next thing I am working on is the web interface and I am using Flask framework. Will make this code public as soon as I get the script running from the page.

by Nandaja at August 17, 2013 01:14 PM

August 11, 2013

Ershad K

GSoC 2013: Week 8 of Grandham project

Last weekly I mainly worked on Search feature and admin interfaces. Here’s a quick review:

  • Experimented with various search engines like Sphinx, Ferret, etc and finally decided to use Solr with sunspot gem as it worked well with unicorn data without any configuration.
  • Wrote a general search backend interface for Grandham. We can plugin other search engines anytime as long as it communicated the way Grandham needs it.
  • Added Admin interfaces managing Authors and Publishers.

by ershad at August 11, 2013 06:47 PM

GSoC 2013: Week 7 of Grandham project

I couldn’t post the weekly updates regularly for the last two times since I was kept more busy than I had expected and the festive holiday that came in between. Here’s a quick review of what happened during the 7th week of GSoC.

  • Grandham got an UI revamp!
  • Integrated new theme.
  • Separate books / authors / publishers lists were implemented
  • Updated user sign in / sign up pages
  • Integrated database clear and fixed failing specs (It’s green now, yay!)

by ershad at August 11, 2013 06:40 PM

Nandaja Varma

GSoC Weekly update #6 & #7

The past two weeks has been a blur with a lot of travelling and minimal Internet access. The following are the works I have been doing so far:

The following modifications were asked to be made on the existing framework by my mentor after a Hangout session as part of the evaluations:
1. Modify the comparison algorithm so as to show positive results for the words with multiple correct renderings – This modification is made. Now, the user can give multiple glyph names separated by comma in the reference file and if the rendering matches any one of these, the framework will return a positive response.
2. Modify the reference glyph file, adding the glyph names of words with multiple correct renderings. Also some corrections were asked to be made in the existing reference file.
3. Modify the framework such that the user can even test by giving the file names as parameters. This one needs a little more work as I didn’t give options in argument parser for all the necessary file inputs. Will update this soon.
Along with these some minor fixes were asked to be done on the script and all those are taken care of.
As for the further developments, planned to create a web interface for this framework. I am trying to create this interface using Flask and I am currently working on it.
After that, the framework will be implemented in C. I have added a partially working implementation of this in the repo.
After the completion of all these, if time permits, references for other fonts are also planned to be made.
Will keep posted on further developments.
Thanks!

by Nandaja at August 11, 2013 10:42 AM

July 28, 2013

Ershad K

GSoC 2013: Week 6 of Grandham project

This week I’ve been mostly fixing bugs, refactoring code and building admin features. Grandham has built in checks to avoid duplication in Authors/Publishers now.

Submission Review Interface Grandham review page

We have a new interface this week –  A screen to review crowdsourced information submissions. Administrators can use this feature to control the information displayed to user. Currently every review item has 3 actions – Approve, Archive or Comment. Out of these, ‘Comment’ is a new feature which needs to be implemented. It will be helpful for the task force to generate discussions around specific submissions.

Miscellaneous

After a couple of rounds of refactoring, Grandham got a Code Climate score of 4.0 from 1.61! :)

by ershad at July 28, 2013 07:53 PM

Nandaja Varma

GSoC weekly update #5

The works this week has been a little slow with college exams and assignments. This is what I have done so far this week.

I have completed the list of reference files containing glyph names of 243 words from four fonts each. Fonts being: Rachana, Meera, Suruma and Lohit-Malayalaam.

The code has been modified to equip not only harfbuzz renderings but renderings from other engines line Uniscribe, provided the user will produce the output of the rendering engine herself/himself. I have created a Python package containing 2 modules each for testing and creating output. The main script automated_rendering_testing.py  will make use of this package to test and give the final result. To test the framework, one can just run ./automated_rendering_testing and then provide the necessary  information, when asked.

Coming to the tester, first it will compare the reference file and the rendering output. The it will create a file named result.txt containing the wrongly rendered words along with the number corresponding to the word in test cases’ file. This file is used only to create the png file of the wrongly rendered words, if the engine is harfbuzz. Other wise this file is ignored. Now the actual output is a file test_result.txt with the format:

Sl.No Word Rendering status(correct/wrong)

User can view this file, see the status and see the wrongly rendered word.

The framework works this way now: Image

And this would be the output.png file. (As I chose harfbuzz here)

Image

And the test_result.txt file would look like this:

Image

The agenda for this week is to re-write the whole code in C.

My code is available here: https://github.com/nandajavarma/Automated-Rendering-Testing


by Nandaja at July 28, 2013 10:33 AM

July 26, 2013

Jishnu Mohan

Bookmarklet to solve math captcha on Calicut university results page

With last update on pareeksha bhavan page of Calicut university website, they introduced a simple math captcha, which I am tired of typing for last few days. I don’t know why they introduced this. After looking at the source code of the page, within 1-2 minutes, I found a method to overcome captcha and view result without even entering the sum value. Anyone with basic knowledge about html and js can easily do the same. So this doesn’t prevent any bots from collectting information.
Calicut university catpcha

To help everyone who tired of solving captcha every time/every register number they enter, I created a small bookmarklet script which will solve the captcha in a click. All you need to do is, drag following link to your bookmark bar of your browser. and click on it while results page is open.

UNICAL CAPTCHA

If you want to see un-minified code, check my github gist.

Howto videos

Adding bookmarklet

Using bookmarklet

by Jishnu at July 26, 2013 02:28 PM

July 21, 2013

Ershad K

GSoC 2013: Week 5 of Grandham project

Last week, I implemented different parts of the application including the basics of user authorization. Also did a work on refactoring the code base, our tests are clean now.

New features

We now have a page to display information of a specific book, which can be navigated from the books list. This page will eventually contain all the information, including location information and links to download the entire MARC data.

User authorization has been added to Grandham using the gem ‘devise’. Devise provides beautiful forms required for various user-authorization needs, I customized them to work with the look and feel for Grandham. Some of them are here:

Grandham sign in 2Grandham registration

 

 

 

(Social login needs to be implemented in coming weeks)

Our test suite was starting to clutter and due to a problem in factories the CI has been failing randomly. I’ve refactored the test suite and now it all works fine.

Miscellaneous 

In other news, we have switched the browser to run tests from selenium – firefox to poltergeist - phantomjs. It helps us to run tests faster. Also I’ve updated our API and data import script.

by ershad at July 21, 2013 02:11 PM

July 20, 2013

Nandaja Varma

GSoC Weekly report #4

This week my main task was to migrate my code to Python. As of now I have implemented my algorithm in Python. Here is the link to the repo : https://github.com/nandajavarma/Automated-Rendering-Testing

I have expanded my test cases’ list a bit. Now it has 243 Malayalam words. I have manually created files with glyph names of these test cases in four fonts: Rachana, Meera, Suruma and Lohith-Malayalam in files names rachana-glyph.txt,  meera-glyph.txt etc. (It is still a bit buggy, so haven’t pushed the latest commit of this yet).

What the code basically does is, it will ask the tester which font she/he wants to test in. Say it is Meera. The code will look for the reference file which we manually create and the file with harfbuzz rendering of the test cases, names as hb_meera_rendering.txt. This file can be created by running harfbuzzrendering.py script with proper font files in the current directory. The main script rendering_testing.py will scan both these files and compare the glyph name corresponding to each word and stores the wrongly rendered words to a new list. Finally hb-view will be executed on the words inside this list and a file named output.png will be generated in the same directory that contains all the wrongly rendered words.

The baseline glyph names’ files aren’t ready yet with complete glyph names of all the 243 words. Will be able to complete it within 1-2 days.


by Nandaja at July 20, 2013 08:09 PM

July 14, 2013

Ershad K

GSoC 2013: Week 4 of Grandham project

Last week, I worked on edit book feature and design mockups.

Edit book feature

As you know from previous posts, we have Submission model to store every contribution from users. When an user submits a correction or an edit, it gets stored as a new Submission in submissions table which needs approval from task force to live. ‘Edit’ component of this feature was implented last week.

We have a few routes associated with this feature.

The following route is to post details for adding a new book. It requires language_id (language short code such as ML or EN) to associate the book to that language. Grandham creates new Submission and a new Book instance (with auto generated grandham_id) if submission to this route was successful.

 POST language_submissions_path - /language/:language_id/submissions

Next route is the edit book feature’s route. It requires book_id (grandham_id of the book) to accept information. It creates just a new Submission for the exising book. This submission will be available for task force to approve.

 POST book_submissions_path - /books/:book_id/submissions

Design mockups

Like I mentioned in one of my previous posts, I had drawn the design mockups for basic features of Grandham. The application will be in a state to go live when the features in design mockups are done.

Miscellaneous

We now have a live instance of app running in Heroku – grandham.herokuapp.com.

by ershad at July 14, 2013 11:16 PM

GSoC 2013: Week 3 of Grandham project

In Week 3, I was mostly designing routes and developing the submission interface for Grandham.

Submission Interface

Grandham

Grandham should have two interfaces for data submission.

  1. Interface for normal users
  2. Interface for advanced users

The first interface, the form to input basic details of a book has been implemented. All the information entered through this form directly goes to ‘Submission’ model with ‘approved’ = false. Later when the task force changes ‘approved’ value to true, all other submission will get disapproved and this submission details would get featured in Book page.

We are storing Author and Publisher information in different models connected to Submission using a has_many :through association and we use the rails feature accepts_nested_attributes_for to input them in the same Submission#new interface.

Miscellaneous

We now have language based navbar in which the links would change according to the language selected. This would help users to quickly navigate to Book, Authors, Publishers and Libraries. It will be an UX enhancement to show selected Language in navbar, will do that.

We have a very basic 2 column books listing now, it’s mainly for development purposes and testing. We will have a proper books listing on the way.

In other news, I got Travis working with selenium integration specs. It required some additional bits of configuration like this -

before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"

by ershad at July 14, 2013 10:49 PM

GSoC 2013: Week 2 of Grandham project

Week 2 of Grandham was filled with more architecture decisions and implementations.

Solving the versioning problem

It’s quite essential to store different user contributions on the same subject separately if the application supports crowdsourcing. We cannot let the user to overwrite the existing data without any moderation. Hence in Grandham, we have a ‘Book’ model with many ‘Submissions’ out of which one will be an approved submission. A book’s individual page basically has the detail from this approved submission.

Book has many submissions

It will be task force (a set of users with advanced privileges) who would approve submissions. They will have options to comment or even edit a submission.

Miscellaneous

Thanks to Travis CI, Grandham project now has a Continuous Integration server. We also use Gemnasium to track dependency packages.

by ershad at July 14, 2013 10:11 PM

GSoC 2013: Week 1 of Grandham project

The first week of development which started on 17th of June essentially comprises requirement analysis, planning and API implementation.

Requirement Analysis

Though the basic requirements for Grandham were discussed a month before, it was necessary to have more clarity on the subject. I had a series of discussions with mentors on various aspects of application, especially on how this project would attract information from contributors of different competency. It was sorted out that normal user could provide just the basic information such as Title, Author(s), Publisher(s), Year, Pages, Edition and Description. Advanced users, who are competent with MARC21 format could contribute advanced bibliographic information through a specially designed interface.

As mentioned in the previous post, we had a meeting with Sri K. H. Hussain. Apart from inspiring and guiding us, he made us aware about the importance of having an API and integration with various library systems in existence. I especially remember seeing a live instance of Koha and its super complex MARC21 data input form. It will be really great if it could consume Grandham API and vice versa so that we would have proper data sharing between two information resources.

Planning

I had little confusions around how to store information. I was thinking of extracting basic information from complex MARC21 data to display in individual books page. But since it was decided that users feed them differently, we could easily store basic information separately and use them. Separate data models to store information as Key/Value pair were written, but I removed them all for the sake of readability and easiness. It was this period when we decided to integrate Bootswatch for front end CSS framework.

API Implementation

Books and Fields API were written during period using jbuilder. The data importer script was updated to meet the changes in the application.

by ershad at July 14, 2013 09:32 PM

Nandaja Varma

GSoC Weekly update #3

This week I’ve been working on generating a baseline glyphs file for 4 fonts: Rachana, Meera, Suruma and Lohith-Malayalam. I have selected some malayalam words from harfbuzz tree and Santhosh Thottingal’s test cases which I thought would be enough to test rendering problems. Then I started listing the glyph names of these files for each fonts in separate text files. To get the corresponding Unicode code point of each word, I wrote a small Java code. So I executed the script on each word, found all the code points and made 4 text files that contains the corresponding glyph names of the four fonts I mentioned earlier. 

Although my mentor did tell me that it is not possible to generate glyph names automatically, I wasted more than a couple of days on a Font Forge script to make it automatically output the glyph names. But that gives the glyph name only if we click on each character, which became terribly disappointing. So instead I used it to make the baseline glyphs file in the structure I want if I click on the necessary characters. But this code is trivial as far as rendering testing is concerned and will leave it out from now (Just noting it down as it wasted a very non-trivial amount of my time ;-) ).

I have modified the main C code such that it will ask the tester which font she wants and after choosing the one she needs it will output the result based on the words I have given.

But my mentor pointed out that it looks quite messy looking at codes in 3 different languages for a single framework so I’ll be re-writing my code in Python this week.

You can find my code here: https://github.com/nandajavarma/Automated-Rendering-Testing (although the README is not up-to-date)


by Nandaja at July 14, 2013 11:52 AM

June 29, 2013

Nandaja Varma

GSoC Weekly update #2

Coding period for GSoC has started the past week and I have been working on a very simple implementation of the proposal in C and two tiny bash scripts. My code is available here: https://github.com/nandajavarma/Automated-Rendering-Testing

The first thing to be done to test using these scripts is create a file that contains a set of words to be tested to see if their rendering is correct. Here I have taken a sample test data file created by SMC a while ago (ml-harfbuzz-testdata,txt). Now pass this file through the script render_test.sh along with the necessary font file. That is:

./render_test.sh ml-harfbuzz-testdata.txt /path/to/fontfile

This will create a file named rendered_glyphs.txt that contains the output of hb-shape function of harfbuzz, i.e. the glyph name followed by some additional numbers (which will be ignored for now).

Now create a file that contains the actual glyph names of the words in the the test data wordfile. I got the data from font forge. This has to be created manually and, as of now, obeying the following structure:

[glyph11,glyph12,glyph13,...,glyph1n]

[glyph21,glyph22,glyph33,....,glyph2n]

.

.

.

Also make sure that glyph names of each word is in the same order as that of the corresponding words in the test data file. I have named it orig_glyphs.txt Once this is done, we can pass the above two files through the executable of the script rendering_testing.c, say rendering_testing. That is:

./rendering_testing orig_glyphs.txt rendered_glyphs.txt

This script will compare the glyphs in order and if it find any pairs that doesn’t match, it will write to a file, result.txt, the line number in which the word appears in the test data file. Otherwise it will tell you the renderings are perfect.

Once this is done, to see the words with wrong renderings we will have to run the third script show_rendering.sh. It takes as input the result.txt file, the test data file and also the font file. That is:

./show_rendering.sh result.txt ml-harfbuzz-testdata.txt /path/to/fontfile

This script will create png images of the wrongly rendered words in the current directory.

That is all about my scripts. But the C code is very much inefficient. It even spits segmentation faults with some files. Once I make sure that I am on the right path after discussing with my mentor, I will be working on improving my algorithm and making this code better. That would be my next week’s work.


by Nandaja at June 29, 2013 10:15 PM

June 10, 2013

Nandaja Varma

GSoC – Community engagement period

GSoC 2013 approved project list was published on May 27th and the community engagement period was started from May 29th onwards. During this period the students are supposed to bond with their mentors, read the documentations and finalize your plans so you can have a head start with your project. The project topic for which I have got accepted for is “Automated rendering testing” and I will be completing that project under Swathanthra Malayalam Computing. I could learn a lot a new stuff so far during this community bonding period with a heavy deal of help from my mentor Rajeesh K Nambiar, although I haven’t started actual coding yet. I will try to explain my proposal status and further steps here, in detail.

Basically, my project idea is to create an automated way to test the rendering of Indic fonts by rendering engines like harfbuzz. The procedure I wish to follow here is quite simple. Create a test file that contains a set of words, mostly characters with ligatures that will be used for testing the rendering. Along with that I will be maintaining a file that contain the glyph infos of the words/characters in the test file for a particular font, say Malayalam font Rachana. As of now I am preparing it manually, can switch to font forge scripts if required.

Once I have got all the test data, my main script will accept the entries in the test file and render it using Harfbuzz for the font Rachana. The words will be rendered using hb-shape and the output glyph values will be compared with the original glyph indices of these words that I have collected manually. If the glyph indices doesn’t match, an error flag will be set for that particular word. At the end of the comparisons, the words with error flag set can be rendered using hb-view and stored in another html file. This file can be looked up to see for rendering issues.

This is what I will be implementing first. Depending on its efficiency, will move to any other solutions. In the above procedure, the most inefficient step, I think, is collecting the test file step and collecting the glyph index step. We can resolve the latter by, may be, using a scripts for extraction or using the .ttx file of the font (which is quite complex). But the former is a real issue. If the user wants to check for rendering issues in a font, she will have to create this file with a set of words manually. Will have to think of a way to overcome this issue.

That’s it for now!


by Nandaja at June 10, 2013 02:31 PM

April 29, 2013

Nandaja Varma

Bangalore Diaries

I remember times when I used to eagerly wait for my school final exams to get through with, so that I can enjoy the long summer holidays that follows. I have been missing that feeling for a while now. But this year I was impatiently waiting for summer to arrive because I knew what was waiting for me this summer season. A long month ahead filled with knowledge, fun and freedom. An internship in Bangalore! But once  I reached Bangalore city, I could feel that my all my excitement was turning into ashes. My nerves started kicking in (As it always does) and I started wondering ‘What the heck am I doing here?’. I am joining as a temp intern in this cool Australian Software company called Bang the table . I don’t know Ruby on Rails or even Ruby without which basically all I am eligible to apply for is probably the post of an office boy/girl (Which is already taken, FYI). I got a small place (very small) to live which I knew I would love from the first sight of it and got three amazing roommates, who have been trying so hard to make my Hindi speaking skills better till date.

So I joined my office exactly on April 1st ( Which date could be more appropriate than this, eh? ). All the faces were extremely welcoming and warm, and some of which quite familiar too, most of them being mallu faces. I had great fun shooting people with laser guns on my first day itself. Thanks to Ershad for his awesome birthday treat. My timing was just perfect.

Image

My internship started off pretty smoothly. Although I didn’t know Ruby I managed to understand their code base to a very small extend and started poking around with it. Office has been just awesome. To add to the fun, there is a refrigerator for you to raid whenever you are hungry and a coffeemaker which refreshes you with lattes and cappachinos (which I’ll miss very badly) :-(

I completed my first week pretty smoothly and was wondering what to do during weekends in this anjaana shehar.  Luckily for me, as two of my friends Hrishi and Adhil were free those days, I did hang out with them and it was great fun. We just did roam around  Bangalore city (Not to mention, got lost at many points), ate good Kerala  food and happily wasted a whole day. :-D

The following weekend also I met with my friends here (more of online friends) like Jishnu, Praveen, Anivar, Joshina and many others which was basically a Swathanthra Malayalam Computing meet-up and had fun then as well.

On the week next to it, We had our Australian directors visiting us (Again perfect timing of mine). The whole bang the table team went out, played paintball (which again involves shooting people) and had an awesome party at the end of the day. I consider myselves quite lucky that I got the chance to meet all those amazing people. That day will definitely stay in my memory for a long time to come.

That was about my office. Now coming to my hostel, it is an entirely different scene here. I have been living in hostel for the past 3 years but the hostel life here was quite different. The thing I loved the most is, the level of intimacy is really high here. I am not used to roomies who take so much care of each other just like sisters do. I am really going to miss these guys.

So what I achieved within this one month period. Difficult to answer. Definitely would have regretted if I missed this opportunity my entire life. So now gratitude time. :-) Thanks to Vamsee who offered me the internship in the first place. Thanks to my parents for letting me go, although they were a little hesitant in the beginning. Thanks to my senior from college Haris, who gave me the courage to go for it (He has been doing it for a while now and my biggest regret is that I couldn’t meet with him in person). Thanks to my friends Hrishi, Adhil, Jishnu and all the others who didn’t make me feel alone at all in this new place.

(Does that sound like a pageant show winner’s speech? Ugh! To all those who keep nagging me to write, In your face! :-P)

Anyway, I have packed my bags and am about to leave this place tomorrow and Boy, Am I sad going back home? :-P

(Hope the title is creative commons)


by Nandaja at April 29, 2013 09:59 PM

March 17, 2013

Santhosh Thottingal

Hyphenation in web

This is a follow up of a 4 year old blog post about hyphenation. Hyphenation allows the controlled splitting of words to improve the layout of paragraphs, typically splitting words at syllabic or morphemic boundaries and visually indicating the split (usually with a hyphen).

I wrote about how a webpage can use Hyphenator javascript library to achieve hyphenation for a text with ‘justify‘ style. Along with the hyphenation rules I wrote for many Indian languages, this solution works and some websites already use it. The Hyphenator library helps to insert Soft hyphens in appropriate positions inside the text.

Example showing the difference between Malayalam text hyphenated and not hyphenated. You can see lot of line space wasted with white space in non-hyphenated text

Example showing the difference between Malayalam text hyphenated and not hyphenated. You can see lot of line space wasted with white space in non-hyphenated text

 

More recently browsers such as Firefox, Safari and Chrome have begun to support the CSS3 hyphens property, with hyphenation dictionaries for a range of languages, to support automatic hyphenation.

For hyphenation to work correctly, the text must be marked up with language information, using the language tags described earlier. This is because hyphenation rules vary by language, not by script. The description of the hyphens property in CSS says “Correct automatic hyphenation requires a hyphenation resource appropriate to the language of the text being broken. The user agents is therefore only required to automatically hyphenate text for which the author has declared a language (e.g. via HTML lang or XML xml:lang) and for which it has an appropriate hyphenation resource.”

CSS Example

-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
-o-hyphens: auto;
hyphens: auto;

Browser Compatibility

  • Chrome 13+ with -webkit prefix
  • Firefox 6.0+ with -moz prefix
  • IE 10+ with -ms prefix.

Hyphenation rules

CSS Text Level 3 does not define the exact rules for hyphenation, however user agents are strongly encouraged to optimize their line-breaking implementation to choose good break points and appropriate hyphenation points.

Firefox has hyphenation rules for about 40 languages. A complete list of languages supported in FF and IE is available at Mozilla wiki

You can see that none of the Indian languages are listed there. Hyphenation rules can be reused from the TeX hyphenation rules.  Jonathan Kew was importing the hyphenation rules from TeX and I had requested importing the hyphenation rules for Indian languages too.  But that was more than a year back, not much progress in that. Apparently there was a licensing issue with derived work but looks like it is resolved already.

CSS4 Text

While this is all well and good, it doesn’t provide the fine grain control you may require to get professional results. For this CSS4 Text introduce more features.

  • Limiting the number of hyphens in a row using hyphenate-limit-lines. This property is currently supported by IE10 and Safari, using the -ms- and -webkit- prefix respectively.
  • Limiting the word length, and number of characters before and after the hyphen using hyphenate-limit-chars
  • Setting the hyphenation character using hyphenate-character. Helps to override the default soft hyphen character

More reading

PS: Sometimes hyphenation can be very challenging. For example hyphenating the 746 letter long name of Wolfe+585, Senior.

by Santhosh at March 17, 2013 03:38 PM

March 11, 2013

Nandaja Varma

MiniDebConf at NIT-C

Ever since I started loving FOSS, I really wanted to attend a FOSSMeet. And last month I got extremely lucky and could attend FOSSMeet at NIT-C. This year along with FOSSMeet a MiniDebConf was also arranged. A month prior to it, I was asked to give a Ruby gem packaging session at this MiniDebConf. I was quite nervous because this was the first FOSS event I ever attended and I was asked to give a session. But I knew it would be a great experience, So I decided to go with it.

FOSSMeet was conducted from 22nd to 24th of February and my session was scheduled for 24th. I reached Calicut town on 23rd morning (Obviously unprepared) and when I was just about to hop into a bus to NIT, one of the MiniDebConf organizers, Vipin called me and said that my session was preponed to that day afternoon. I started freaking out because I still had to prepare slides and decide what all to include in my session. As soon as I reached NIT, I had to go to my relatives’ place at the NIT apartments, where I was supposed to stay for the next two days ( I preferred hostel, but whatever!). After that I rushed to NIT campus, got my speaker’s ID card from the registration counter and started roaming around the campus searching for the MiniDebConf venue. Finally I found that it was going on at the networks lab and got there. When I entered Pavi and Shirish were giving talks on debian releases and stuff and I quite honestly didn’t know how to introduce myself. ‘Hey, I am Nandaja. I am a speaker here’ didn’t sound polite enough. So I followed a guy, who assigned me a system in the lab thinking I am a delegate there. So I sat there and started preparing slides for my session until the lunch break.  Once I reached the hall were lunch was being served, I decided to socialize. I met some cool SMC people who were really easy going and friendly and then I met Praveen, whom I was more than happy to meet. After the lunch, we went back to the NSL lab and there Praveen introduced me to Shirish and Pavi, two Debian gurus. It was the time for Debian installation workshop. Pavi asked me to help the delegates with the partitioning and stuff, which I tried doing and I don’t think the students who listened understood much. We clapped for the teams who successfully completed the installation. The session lasted till evening and it was supper time soon after. So my packaging session was again rescheduled for the next day. I again met some cool geeks there. There was a really nice Aaron Swartz memorial talk by Vishnu later that night. Following that was hack night and a talk by Praveen on open source contributions. It was getting too late and had to get back to the relatives’ place. So I missed it (The reason why I preferred hostel).

So it was day-2 and my session was scheduled as the first event at MiniDebConf, that day. I got into NSL and heard all of them had real fun last night, albeit it wasn’t that much of a ‘hack’ night. It was supposed to be a full day packaging session at MiniDebConf, which me and Praveen decided to do together. But as many other interesting events were happening simultaneously, only very few came. So we decided we’ll start packaging session once all other interesting events are over. But unfortunately, the students who showed up started leaving one by one. Luckily for me, a very enthusiastic girl showed up, who missed first day’s session and wanted to learn more about Debian. I started giving a private session for her. But around half an hour later, she said she has got a farewell party to attend and left (Yeah! She literally ran away :-P ). Till the lunch time we sat there chit-chatting. We even went to the 3D-Blender workshop but as soon as the speaker’s lap screen showed a windows desktop we left (Come on, It’s FOSSMeet, man!). After lunch, we exactly had 6 people at the packaging session and we decided to do it anyway. Hrishi started off the session with an introduction to diaspora. Then me and Praveen together started explaining packaging. There were some really cool people there, like, Vamsee Kanakala, the Executive developer at Bang The Table, a government employee, whose sole intention was to attend the packaging event and four other enthusiastic students. The session proceeded pretty well and they were picking it up pretty fast. Almost by the end of the session, Vamsee asked me if I would like to do an internship at Bang The Table and I accepted the offer right away. :-) We couldn’t cover the whole packaging process because it was time for the closing ceremony. Anish, Praveen Vamsee and many others gave the feedback. Vamsee was really kind and he even mentioned my name at the feedback session. I was also asked to give the feedback and honestly I don’t remember what the heck I said there. All of us speakers got a beautiful momento. I bought a FOSSMeet t-shirt and was about to leave.

Just then, Vipin, Jaseem, Pavi, Praveen, Shirish, Akshat, Jishnu and Anish were planning to have a group dinner and invited me as well. It was pretty cool. I never though I would have so much fun hanging out with such uber geeks. After that, it was time for us to bid farewell and all of us went on our own ways.

As it was late, I couldn’t go back home that day. I left Calicut the day after. Quite frankly, I was pretty sad that the FOSSMeet was over. But I was really happy too at the same time, because I made some new geeky friends, got an internship offer at Bangalore and had a lot of fun. Plans for the next MiniDebConf were going on. I am so looking forward to attend that one and hope it happens soon. :-)


by Nandaja at March 11, 2013 07:48 AM

January 26, 2013

Hrishi

Brightness issue in Linux mint 14

I recently installed linux mint 14 (Nadia)   in my office laptop (HP Notebook 450 ). after installation when I booted into the os , the screen brightness was set very very low which I was able to adjust using the brightness function key.  Later I had the same problem when Ubuntu 12.10  was installed on the same laptop.  after little  duckduckgoing
I found this stackexchange question.  by following the accepted answer , I fixed the issue.

Solution

  • Current brightness value  was stored in  /sys/class/backlight/acpi_video0/brightness  file.
  • Maximum brightness value was  stored in  /sys/class/backlight/acpi_video0/max_brightness file.
  • I added the following line to /etc/rc.local init script.

    cat /sys/class/backlight/acpi_video0/max_brightness > /sys/class/backlight/acpi_video0/brightness 

in the end my /etc/rc.local init script was

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0″ on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

cat /sys/class/backlight/acpi_video0/max_brightness > /sys/class/backlight/acpi_video0/brightness
exit 0

After rebooting everything was fine..

br,

Hrishi

 
 

 

by Hrishi at January 26, 2013 07:37 AM

December 24, 2012

Pirate Praveen

Everyday rape

I took a while to mark a first reaction to the gang rape of 23 year old paramedical student in Delhi. I watched people screaming for death penalty and the sudden indignation and outrage people felt. First post I shared was Akshi Singh’s post in Sify titled “We are all part of the rape culture“. What amused me is how easily people jump up to taste blood of someone without realising their part in creating and sustaining the rape culture.

Everyday people are exploited, humiliated and violated and they had to wait till they saw the height of this rape culture to wake up. It would have been okay for many if it weren’t this brutal and right in the middle of the city. If you are outraged at least now of the injustice happening around us and want to see this culture end, I have a suggestion and that is not blood of these animals as sacrifice to quench the thirst of revenge, but it included every one, including you and me. Repeat after me.

If you are a male, “I will treat every women with respect and I will not let them be treated like an object or anything less than how I want to be treated”

If you are female, “I will not accept any one treating me anything less than equal and I will fight till every woman can live in respect”.

Take this pledge with me and take this to everyone you know. It is not an easy solution as it means we have to change our ways and not just scream for blood, but it is the only lasting solution I see.

Now this is not a short cut, but an intent of where we should go, ie, not a blood thirsty society but a civilized one.

Another interesting post series was by Vivek Kaul in First Post “Why women would continue to be raped in India” part 1 and part 2.

Update:

by Pirate Praveen at December 24, 2012 02:50 AM

November 21, 2012

Pirate Praveen

To write or to riot?

Sajan Venniyoor wrote in an email discussion list yesterday,

Times of India (21 Nov) lists the charges levelled by Palghar police against those who vandalized Dr. Dhada’s hospital:

IPC 143: Unlawful assembly – imprisonment up to six months, or fine, or both.
IPC 147: Rioting – imprisonment up to two years, or fine, or both.
IPC 336: Act endangering life or personal safety of others – imprisonment up to three months, or with fine up to Rs 250, or both.
IPC 427: Mischief causing damage to the amount of Rs 50 – imprisonment up to two years, or fine, or both.
IPC 451: House-trespass to commit any offence punishable with imprisonment – imprisonment for 2 years and fine.

66A of the IT Act (“causing annoyance”) could get us jailed up to three years with fine. Couldn’t we just assemble unlawfully, riot, break into people’s homes and endanger the life and personal safety of others? It seems so much safer.

I think it is a very important comparison on the quantum of punishment. It also reveals the fear of the people in power – what they fear the most. And it won’t be a surprise if most people would agree to it – we are an intolerant country and we are more worried about how other people say and live than our own situation. And this trend is only increasing. We need more efforts to fight intolerance and also teach people to value freedom over getting offended on their believes.

Another important thing for the netizens to do is reach out to the people who are not on the internet and teach them the virtues of it, tell them that they now have a voice that can reach anyone on the world with a fraction of the cost of any traditional media out there.

Some ideas: Help more people write blogs, teach them about tools of anonymity like tor, understand their fears – I think most of it is the fear of technology itself. We have to make posters, cartoons, videos and use any opportunity to debunk the myths of internet if we want to make a broad movement to protect the internet.

And here is the update about PIL in Madras High Court challenging 66A

Mr. Justice Basha told the petitioner’s counsel A. Rajini “You must remember that even you would not be able to invoke the provision in case you are genuinely aggrieved against some communication made by another individual,” the judge said before ordering notices.

I think this is the common response from anyone who is not using the internet already to speak up. How can we protect ourselves? This is a much tougher struggle to win, something we need a cultural campaign for.

There are many ways your can join the campaign today and make a difference.

One idea we are currently working on in the campaign is a survey on the Internet – how people use internet, how they perceive it, what are their fears etc

Share your thoughts and ideas here or on the campaign page.

by Pirate Praveen at November 21, 2012 04:49 PM