Always define the language and the direction of your HTML documents, part 02: Backwards English

In part 01 of these series, I showed why is it important to always define the language and the direction of all HTML content and not rely on the defaults: The content may get embedded in a document with different direction and be displayed incorrectly.

This issue is laughably easy to avoid: If you are writing the content, you are supposed to know in what language it is written, so if it’s English, just write <html lang=”en” dir=”ltr”> even though these seem to be the defaults. Nineteen or so characters that ensure your content is readable and not displayed backwards. Please do it always and tell all your friends to do it.

The problem is that you don’t only have to explicitly set the language and the direction, but, as silly as it sounds, you have to set them correctly, too. A more subtle, but nevertheless quite frequent and disruptive bug is displaying presumably, but not actually, translated content in a different direction. This happens quite frequently when a website supports the browser language detection feature, known as Accept-Language:

  1. The web server sees that the browser requests content in Hebrew.
  2. The web server sends a response with <html lang=”he” dir=”rtl”>, but because the website is not actually translated, the text is shown in the fallback language, which is usually English.
  3. The user sees the content just like this numbered list, which I intentionally set to dir=”rtl”: with the numbers and the punctuation on the wrong side, and possibly invisible, because English is not a right-to-left language.

Of course, it can go even worse. Arrows can point the wrong way and buttons and images can overlap and hide each other, rendering the page not just hard to read, but totally unusable.

This bug is also an example of the Software Localization Paradox: It manifests itself when Accept-Language is not English, but most developers install English operating systems and don’t bother to change the preferred language settings in the browser, so they never see how this bug manifests itself. The site developers don’t bother to test for it either.

The solution, of course, is to set a different language and direction only if the site is actually translated, and not to pretend that it is if it’s not translated.

Here are two examples of such brokenness. Both sites are important and useful, but hard to use for people whose Accept-Language is Hebrew, Persian or Arabic.

Here’s how the Mozilla Developer Network website looks in fake Hebrew:

Mozilla Developer Network website, in English, but right-to-left

Mozilla Developer Network website, in English, but right-to-left

Notice how the full stops are on the left end and how the text overlaps the images in the tiles on the right-hand side. This is how it is supposed to look, more or less:

Mozilla Developer Network home page in English, left-to-right

Mozilla Developer Network home page in English, left-to-right

I manually changed dir=”rtl” to dir=”ltr” using the element inspector from Firefox’s developer tools and I also had to tweak a CSS class to move the “mozilla” tab at the top.

The above troubles are reported as bug 816443 – lang and dir attributes must be used only if the page is actually translated.

After showing an example of a web development bug from a site for, ahem, web developers, here is an even funnier example: The home page Unicode’s CLDR. That’s right: Unicode’s own website shows text with incorrect direction:

The Unicode CLDR website, in English but right-to-left

The Unicode CLDR website, in English but right-to-left

The only words translated here are “Contents” (תוכן) and “Search this site” (חיפוש באתר זה), which is not so useful. The rest is shown in English, and the direction is broken: Notice the strange alignment of the content and the schedule table. A few months ago that table was so broken that its content wasn’t visible at all, but that was probably patched.

Here’s how it is supposed to look:

The CLDR home page in English, appropriately left-to-right

The CLDR home page in English, appropriately left-to-right

I tried reporting the CLDR home page direction bug, but it was closed as “out-of-scope”: The CLDR developers say that the Google Sites infrastructure is to blame. This is frustrating, because as far as I know Google Sites doesn’t have a proper bug reporting system and all I can do is write a question about that direction problem in the Google Sites forum and hope that somebody notices it or poke my Googler friends.

One thing that I will not do is switch my Accept-Language to English. Whenever I can, I don’t just want to see the website correctly, but to try to help my neighbor: see the possible problems that can affect other users who use different language. Somebody has to break the Software Localization Paradox.


Filed under: Firefox, Free Software, localization
סגור לתגובות

spass-3.1 Secure Password Generator Released

Usually release announcements go together with the actual release. Somehow, I’ve postponed writing about the new release for quite some time, but better late than never.

spass is a tool that creates cryptographically strong passwords and passphrases by generating random bits from your sound card. It works by passing noise from the sound card through a Von Neumann process to remove bias and then uses MD5 to “distill” a truly random bit from every 4 bits of input.

The new version of spass, version 3.1, was released two months ago. The code should now compile easily on both Linux (ALSA, OSS and PortAudio backends) and Windows (only PortAudio is supported). There is some minor tweaks to the CLI, but the main part is a new Qt interface, screenshots of it available on the project’s SourceForge page. I’ve also migrated the build system to CMake (from automake) which should make it easier to build.

You can download the sources, 64bit Debian package and binaries for windows from here. If you use spass and create binary packages for more platforms, it will be great.

BTW as you can see I’ve migrated the code to SourceForge from GitHub. I know it not a popular move, but their lack of binary downloads is really frustrating.

סגור לתגובות

הזמנה לסדנת ניתוח מידע, יום שני, ה-20.5.2013 בקמפוס גוגל בתל-אביב

הזמנה לסדנת לניתוח מידע.שתערך קמפוס גוגל, קומה 26, מגדל אלקטרה, יגאל אלון 98, ת"א. ביום ב', ה-20.5. בשעה 21:00.

במסדרת הסדנא יציג נמרוד קרת כלים לניתוח והצגת נתונים המאוחסנים בבסיסי נתונים גדולים לא טבלייים (להלן, big data). חלק מהכלים מבוססים על java script ומאפשרים גישות חדשניות להצגת מידע מורכב. כל הכלים הינם חופשיים. הסדנא תתבסס על ניתוח מידע שנאגר במסגרת פרויקט wiki leaks והאקו סיסטים שלו.

סגור לתגובות

כשהמספרים משתנים: מדוע צריך להשקיע בתאימות.

בחודשים האחרונים פרסם TheMarker מספר כתבות על מגזר טכנולוגיות המידע בישראל; האח החורג של ההיי-טק; לפי הכתבות, המגזר שמספק שירותי מחשוב, אירוח, תשתית וכדומה, לוקה בחוסר חדשנות, קבעון וחוסר רצון לעבור לשירותים מתקדמים יותר. חלק מכך, לפחות על פי כתבות אחרות, נובע מכך שישראל היא מדינה שמתנגדת, בבסיסה, לקוד פתוח. בזמן שישראל מייצאת את הטכנולוגיות המתקדמות ביותר, הארגונים הישראלים משתמשים בטכנולוגיות שהיו מיושנות כבר לפני עשור; כך, לדוגמא, חלק ניכר מהאתרים הישראלים כלל אינם מותאמים לצפיה במכשירים ניידים (שלא לדבר על ביצוע פעולות), ואתרי הממשלה, בעניין של עקרון, אינם מותאמים לעבודה עם מכשירים ניידים, מערכות הפעלה שהן לא Windows או אנשים עם מוגבלויות.

ב2007, לפני שש שנים, כאשר נערך דיון על כך בכנסת, המספרים היו אחרים; מספר המשתמשים שלא עבדו עם מערכות הפעלה של חלונות היו אפסיים, והגלישה ממכשירים ניידים כמעט ולא היתה רלוונטית. היום, ב2013, חלקים משמעותיים מהשימוש באתרי אינטרנט מבוצע באמצעות טלפונים סלולריים (ב2010 היו 2.5 מיליון גולשים בסלולרי). כיום, כאשר מיליוני מכשירים סלולריים בשנה נמכרים, והם בפועל המכשיר העיקרי של רוב האנשים, יש להתחיל בקצת חשיבה מחדש.

במקביל לעליה של השימושים במערכות קוד פתוח כמו מערכת ההפעלה Android שיושבת על החלק הארי של הטלפונים הסלולריים, מערכת ההפעלה החדשה של מיקרוסופט, Windows 8, לא ממש תופסת תאוצה; כך שישנם שני תהליכים במקביל בעולם (שיבלטו יותר בקרוב): מעבר יותר גדול לטכנולוגיות קוד פתוח והפסקת שימוש בשירותים מיקוסופטיים. כיום, שיעור החדירה של אינטרנט אקספלורר, הדפדפן של מיקרוסופט, עומד על באיזור ה50% בישראל, מה שאומר שאתר שמותאם רק לטכנולוגיות מיקרוסופטיות, לא מספק שירות ל50% מהאוכלוסיה.

ומדוע כל ההקדמה הארוכה הזו דרושה? כי לאחרונה מדינת ישראל חתמה על (עוד) הסכם שיתוף פעולה ארוך טווח עם חברת Microsoft; אני אתחיל בלומר דבר אחד: לא מפריע לי שחברת Microsoft תרוויח כסף, וכדאי שהיא תרוויח כסף. הבעיה שלי היא עם הממשלה כאן. בארבע השנים  האחרונות, הרבה בעידוד השר (לשעבר) מיכאל איתן, פיתחה הממשלה (או תמכה ב) כמויות עצומות של תוכנות בקוד פתוח ששוחררו לציבור. תוכנות שניתנו בחינם, לציבור, לשימוש, ואפשרו לשוק העסקי ולמגזר הלא-ממשלתי להנות מעבודת הממשלה.

התרומה הזו, של פרויקטים שנבעו משקיפות ופתיחות, הם בדיוק מה שצריך כדי להוציא את מדינת ישראל מהקבעון בתעשיות המסורתיות יותר, של טכנולוגיות מידע, ולקדם אותה לכיוון של שימוש במשאבים משותפים, בהם מפתחים את התוכנה פעם אחת ואז כולם נהנים ממנה. המודל הקנייני, בו הממשלה משלמת על רכישת רשיון לתוכנה, ולא פיתוח של תוכנה עבור הציבור, צריך לחלוף מן העולם למעט מקרים חריגים במיוחד.

וזו הבעיה:  במדינת ישראל, שבה משקיעים עשרות מיליוני שקלים בתחזוקה של אתרי אינטרנט ממשלתיים, עדיין אי אפשר לשלם ביטוח לאומי באמצעות אתר סלולרי או באמצעות מחשב שאינו מפעיל את מערכת ההפעלה Windows; כל עוד המגזר הממשלתי לא יעבור לפתיחות, לא יעבוד לפי תקנים, לא יפעל בצורה שונה, השוק האחר לא יזוז איתו.

[בהערת אגב, אני יודע שאפשר לפתח על בסיס טכנולוגיות של Microsoft גם אתרים שעומדים בתקנים, ואפילו אפשר לעשות זאת בקלות; לכן, אין לי בעיה עם שימוש בטכנולוגיה הזו מבחינה עקרונית. הבעיה שלי היא העצלנות של הממשלה כאן, שלא מוכנה לעבוד כדי להתאים את המערכת].

וכאן הבעיה: רוצים לדעת למה המגזר כל כך מיושן? כל כך לא חדשני? הסיבה היא פשוטה: המגזר הזה עסוק בלעשות כל הזמן את אותן פעולות, במקום לקחת את מה שאחרים עשו ולהעתיק.

סגור לתגובות

GIMP GSoC 2011 – Seamless Cloning Project – Technical Overview & Status

Recently, I was asked by email to help with the status of my GSoC (2011!) project. So before I say anything about that, let me explain a few things about my current situation.

For those of you who didn't figure it out already from the lack of activity on this website (and the lack of my activity on the web in general), due to my current real-life situation, I barely have any free time except for those few precious hours in the weekend in which I try to run my own life.

This means that my open-source activity went to a level which is not enough to do anything which requires long sessions (*cough* coding new stuff *cough*), and only translations of open source software are being kept in progress (very slowly, but they are being worked on and I'll commit them when I have enough material).

Now that I said that, and now that you know why I'm rather unresponsive by email/comments to this site, let us begin a technical overview of the project status. Note that this was originally written as an email, so I'll sometimes write as if I'm addressing someone specific in a conversation, and sometimes I talk in general (3rd person). Please ignore this inconsistency...

Technical Overview & Status

Proposal
Unfortunately, I failed to find the original proposal. However, you can find the proposal which I recorded in the GIMP wiki. The proposal is located here.

Papers
I'm listing them here, it will become clearer once you see the modules listing.

Modules
The project is divided into 3 main modules
  • A library for creating fine triangular meshes - poly2tri-c
    • The first part of this library is a C port of a library for creating Constrained Delaunay Triangulations, which are basically "nice" triangulations of existing outlines with/without holes.
      The original library is poly2tri, and the C port I wrote can be found in poly2tri-c's repository under the poly2tri-c/p2t folder
    • The second part of this library is an implementation of the Delaunay Terminator algorithm for what we call a Delaunay Refinement.
      • Delaunay Triangulations are triangulations which are considered "nice", meaning that most triangles are more or less of equal size, without too big or too small angles.
      • Delaunay refinement is the process of taking a Constrained Delaunay Triangulation (which is not exactly Delaunay due to constraints such as outline that must be respected) and refining it by inserting more and more points. The process terminates when the resulting triangulation is almost Delaunay.
      • The implementation of the algorithm above was made from scratch and in fact was the biggest part of the GSoC project (the assumption was that there was an existing open source library to do this. Apparently it wasn't so...)
      • My implementation can be found in poly2tri-c's repository under the poly2tri-c/refine folder
    • The third and final part of this library is an implementation of a triangular mesh render. The render basically takes a mesh created from the refinement process, a buffer to fill and a vertex-to-color function, and creates an image of the mesh in the specified resolution and size.
      • This is another implementation from zero, although quite trivial and could probably be made more efficient
      • The original article used OpenGL to do this rendering, resulting an ultra-fast renderer. Since the project was done when GIMP/GEGL were in an unclear state regarding usage of graphics hardware acceleration, it was done on the CPU purely which is much slower (yet still almost interactive - less than a second for rendering regular objects)
      • My implementation can be found in poly2tri-c's repository under the poly2tri-c/render folder

  • The second part of the project is a GEGL operation for doing the actual seamless-cloning operation.
    • In brief, here is a description of the process (needed to understand the state of the code):
      • Do a heavy preprocessing step for creating a fine triangular mesh from the outline of the pasted area
      • Now, for each render attempt, compute the color differences between the edges of the paste and the background image, and use the previously created mesh to interpolate the differences in the colors along the entire area of the pasted image. Add the interpolated color differences on-top of the paste and you get a seamless pasting!
    • The GEGL implementation of the operation can be found under gegl/operations/common/seamless-clone (in the soc-2011-seamless-clone branch):
      • Files beginning with sc-* are part of a "shared library" with the code required to do seamless cloning
        • This library is used using the GeglScContext object (sc-context.h) which manages a seamless cloning operation for a specified buffer to use as a paste.
        • GeglScContext implements smart logic to notice when a paste doesn't change between rendering sessions (i.e. calls to the process function) in order to avoid re-doing the heavy preprocessing step
        • Ideally, GIMP would use this "seamless cloning library" to implement seamless cloning with an internal op that does not need to do this check over and over, since the paste can't change when moving it on the canvas in the GIMP UI. However, currently gimp uses the GEGL op which is described below in a rather dumb way...
        • This library even exposes a pkg-config file to be easily linked against later...
      • seamless-clone.c implements gegl:seamless-clone - A simple seamless cloning operation using the above library.
      • seamless-clone-compose.c implements gegl:seamless-clone-compose - A simple meta-op for GEGL that composes the seamless paste above a given background...
    • Finally, in order to have the triangulation algorithm included, a copy of poly2tri-c is included under the libs directory of GEGL. This is since poly2tri-c has no package that can be installed and it was asked for so that developers won't need to download additional source code from more locations. This is not a desired situation, yet I'm unaware of any package owners for various Linux distributions which would be willing to help with distributing poly2tri-c as it's own package. If any such developer would be found, send them to me and I'll give them any access/help to the repositories (and I'll do any code modifications needed)

  • A GIMP tool using the seamless cloning GEGL op
    • The tool is a bit buggy in terms of refreshing the canvas (sometimes, artifacts are left when dragging the paste)
    • Additionally, it is inefficient since it doesn't use the library directly and so it does the check of whether the paste buffer changes each time
    • I'm not sure whether the errors regarding non-continuous pastes (with holes and/or composed of several unconnected parts) do find themselves into the GIMP UI in a proper way...

GIMP/GEGL TODO
  • Make GIMP check for the presence of the seamless cloning operation on the startup of the tool
  • Make GIMP use the library directly (and check for it's presence on compilation time)
  • Conditional OpenGL for doing the rendering of the triangular mesh!
    • Implementing the OpenGL rendering in poly2tri-c should be very easy for anyone knowing OpenGL. I'll do it if GIMP/GEGL accepts OpenGL (not OpenCL! That's different!) into the pipeline
  • Fix the described bugs in the GIMP tool UI

Poly2tri-C TODO
  • Code cleanup, prepare for distribution (I'll do that - it requires less coding then the GIMP stuff and does not require a long coding session - so I can do it on my short available time periods)
סגור לתגובות

ניוד צרות

אז אתם יכולים לנייד את מספר הטלפון שלכם 20 פעם ביום תודות למשרד התקשורת. אממה, עם הניוד באו הצרות.

כיום אין קשר בין מספר חד חד ערכי כדוגמת קידומת, לספק טלפון. על מנת להתמודד עם הבעיה, כל ספק טלפוניה הקים לעצמו מערך מסדי נתונים, במקום להקים מערך אחד לכולם, אשר תפקיד מסדי הנתונים הוא לקבל את המספר שחויג, לבדוק לאן הוא שייך ולפנות לאותו ספק עם המספר הלאה.

אבל יש כמה בעיות עם זה. למשל לא כל מסדי הנתונים מעודכנים כמו שצריך, לפעמים יש מידע שלא מגיע מספק אחד לספק שני, או מגיע באיחור של מספר שעות (אפילו יום או יומיים).

לפעמים מרכזייה מסויימת של ספק אחד שאתם מגיעים אליה מקבלת עותק ישן של המידע, בעוד שמרכזייה אחרת של אותו ספק מקבלת את העותק העדכני, והרשימה של הבעיות עם מסדי הנתונים עוד ממשיכה.

בנוסף לכך, אם זה לא הספיק, הסטטוסים שהתחלנו לקבל על שיחות, מאוד בעייתיות. למשל קורה לי שעל המספר טלפון האישי שלי (אשר נמצא ברשותי  מ2003 בערך), כבר ראיתי כי אני מקבל עליו במרכזיה שטיפלתי כאילו המספק איננו מחובר, רק בשביל לגלות כי היתה בעיה נקודתית אצל ספק סלולרי, שלקח שעה לפתור.

כלומר, אינני יכול לדעת בכלל האם מספר כלשהו הוא כיום מחובר או שייך למישהו, ולפעמים אני מקבל סטטוס לא נכון על המספר עצמו. רק ה"תקליט" (הודעה על חשבון הצלצול במקרה הזה), היא הדבר היחיד שמסביר מה קורה, אבל המערכות האלקטרוניות ממש לא יודעות לפענך את זה.

יותר מזה אם תעשו בדקה אחת 10 חיוגים לאותו מספר, קורה מצב בו תקבלו 10 סטטוסים שונים על אותו מספר (בהנחה כאמור שהוא מחובר ומסוגל לקבל אותם).

על כל בעיות הניוד, נוספו גם ספקים חדשים, אשר רוכבים על ציוד של חברות קיימות. חברה כדוגמת גולן טלקום, בנוסף גם פורסת אנטנות וציוד משלה, וכעמט כל יום יש תקלה כזו או אחרת שם. חלקם אפילו תקלה ארצית לפרק זמן של מספר שעות.

יוצא לי לראות עם גולן טלקום כי לפעמים הם מדווחים שיש בעיה בציוד שלהם, לפעמים יש בעיה במספר השייך אליהם, לפעמים מדווחים כי מספר אינו שייך אליהם (למרות שהוא כן מופיע במסדי הנתונים של הניוד ככזה) וכיוב'… ואני מדבר על מספר בודד שאני מנסה לחייג אליו, ובכל חיוג אני מקבל סטטוס שונה (כמו שהזכרתי למעלה).

אז מצטער לאחר שנה להרוס לכם את השמחה, אבל המפכה הזו היא בעיקר כאב ראש טכני, אשר פוגע גם במשתמשים הרגילים, ולא, אי אפשר באמת להתנייד 20 פעם ביום. אפילו פעם אחת בשנה היא לפעמים בעייתית בראש ובראשונה עבורכם.


Filed under: אירגונים וחברות, חברה, חוק, טכנולוגיה, טלפוניה, כלכלה, עסקים, קוד פתוח, תקנים, תקשורת
קטגוריות: אירגונים וחברות, חברה, חוק, טכנולוגיה, טלפוניה, כלכלה, עסקים, קוד פתוח, תקנים, תקשורת | סגור לתגובות

כנסת פתוחה: תודה על הדגים

התחלתי לעבוד עבור פרוייקט כנסת פתוחה בדצמבר 2012. זו הייתה חוויה מעניינת, שונה במשהו מפרוייקטי קוד פתוח אחרים שהייתי מעורב בהם בעבר.

בניגוד לרוב הפרוייקטים אשר כוללים צוות מפתחים, ואם יש להם מזל, מעצב אחד או שניים, בכנסת הפתוחה יש מתנדבים עבור צוותי:

  • פיתוח
  • עיצוב וחווית משתמש
  • תוכן
  • שיווק

צפיה בתהליכי העבודה, הכלים והצרכים השונים של הצוותים ובניסיון לתת להם מענה הייתה חוויה מעניינת ולימודית, כך שלא דובר רק בעבודה של פיתוח.

אך החוזה בן 5 החודשים פג והבטחות יש לקיים, חזרתי לעולם הקפיטליסטי הקר והאכזר.

השגנו דברים יפים בתקופה הזו, ביניהם:

  • שינוי עיצוב כל האתר לתשתית bootstrap, יישום UX חדש
  • הצעות והשלמות אוטומטיות לחיפוש
  • מודלי ""הידעת?" והצעות משתמשים לטיוב המידע
  • שינוי סביבת הפיתוח ותהליך התקנתה עבור מפתחים חדשים על לינוקס, MS חלונות ומק OS X
  • תיעוד חדש למפתחים
  • הנחת התשתית לתמיכה במספר מרובה של כנסות
  • שיפורים ב-API

כל שנותר לומר הוא: תודה על הדגים כנסת פתוחה :-)

נ.ב.

להבדיל מהדולפינים אני נשאר בסביבה, חובש את כובע המתנדב.

סגור לתגובות

קינמון 1.8 שוחררה!

שולחן העבודה בלינוקס עבר טלטלה קשה בשנים האחרונות מאז שגנום 3 יצא ומפתחיו החליטו לייעד אותו רק למתכנת האוטופי. הפורק שעשו לו החברה ממינט השתפר במשך השנים ועכשיו הוא רץ טוב, ולא כבד כמו שהיה וגם הוספו לו תוספות מגניבות כמו דסקלטים על הדסקטופ ועוד פיצרים שימושיים טובים.

 

קטגוריות: אובונטו, מחשבים | סגור לתגובות

דביאן: יאללה לשבור

אז דביאן 7 שוחרר בסופ"ש האחרון ואיתו נגמרה תקופת הקיפאון של העברת חבילות מ-unstable ל-testing, שבפועל אומר שגם כמעט ולא מעלים שינויים משמעותיים ל-unstable (זה לא כלל כתוב, אבל הגיוני/נוח יותר טכנית).

היום סנכרתי את המערכת, פעם ראשונה מאז תחילת סיום ההקפאה וקיבלתי לינוקס 3.8 (הקודם: 3.2), Firefox 17 (הקודם: 10) וליברה אופיס 4.0.3 (הקודם: 3.5.4). איזה כיף…

עכשיו רק נשאר לקוות שעם כל העלאות של החבילות החדשות לא ישברו את המערכת. מנסיוני זה קורה פעם בחצי שנה שבערך, וגם אז זה לא נורא.


Filed under: Debian GNU/Linux
סגור לתגובות

My first ruby framework part 1

I'ved tested many static web page generators, and I found a very horrifying conclusion: They are either too big and overwhelming, or they are very small, compact, and written mostly for generating static blogs.

I'ved started to invest a day with a friend static generator, that he wrote for his blog, and even opened 11 bug reports for it, however, the generator he created is also very blog specific solution, and I want to create static web site, not a blog. The difference is in the way routing works, and the whole stat of mind when using such thing. And if I wish to make his generator do what I'm looking for, it will require from me a lot of work.

So, I'ved started yet another static web site generator (more like a framework for it imho :) ), after I'ved tried not to go there in any possible way.

At the first day I'ved started planning how the skeleton of the static content will be, and started looking for libraries that can convert markup languages (markdown, reStracturedText etc…) to html, and I've chosen something that is written in Haskell, with a lot of power named Pandoc. It even has a Ruby wrapper for it, that I'm using for the project. So I jumped to the water of reinventing the wheel and creating yet another generator.

In the beginning, of writing my code, I'ved encountered several problems that needed to be solved. For example: How do I execute my executable without installing it as a Gem ? In default behaviour, if it's not installed, then Ruby does not know how to locate the files. But at the end I found an interesting solution for it:

$BASE_PATH = File.expand_path(File.dirname(__FILE__) + '/..')

I found additional problems to be solved. For example I needed to make Bundler find the Gemfile, but the executable is not part of the Gemfile path. After a lot of research and grep in the source code of Bundler, I found the answer:
It uses an environment variable named BUNDLER_GEMFILE, and it is needed to be set to the Gemfile path like so:

require 'bundler'
ENV["BUNDLE_GEMFILE"] = $BASE_PATH + '/Gemfile'
Bundler.require(:default)

Another problem that I found was in the way of parsing the cli parameters.
Ruby has it's own default library for it, but it was not built for what I was looking for.
So later on, I found a library named slop that is very nice, and works well, but not 100% of what I was looking for.
When I read the Bundler source code, I found Thor, and finally found the proper parser for me, but I will not use it in this version.

I find it very interesting how writing something like a framework takes different way of thinking then normal program.

It is very important to emphasize that at the time of writing this post, my code is still not ready, and many basic things are not implemented, and the core is constantly rewritten. But the next post will be about v0.1 that is ready :)


Filed under: Ruby, אינטרנט, אתרי אינטרנט, טכנולוגיה, פיתוח, קוד פתוח, תוכנה, תכנות Tagged: markup languages, page generators, static generator, static web
קטגוריות: Ruby, markup languages, page generators, static generator, static web, אינטרנט, אתרי אינטרנט, טכנולוגיה, פיתוח, קוד פתוח, תוכנה, תכנות | סגור לתגובות

A Complete PyGTK CD Ripper Tutorial

Most tutorials on GTK, create partial UIs, and thus leave the reader to connect the rest by himself. Some others create an almost complete application, but usually, this application is useless. This tutorial, will lead (eventually, I hope...) to a functional application, that rips CD and converts them to MP3 using cdparanoia and lame. In addition to writing this tutorial in blog posts with code, the code will be highly verbose and commented thoroughly ... ... continue reading...
סגור לתגובות

Enable UFS Write support under Debian

A short memo on enabling UFS write support on Debian ... continue reading...
סגור לתגובות

PyGTK CD Ripper Tutorial – Part 2

In part 1 of this tutorial, the most basic GUI form of a CD ripper application, was created. This part will expand this GUI and will add some more functionality ... ... continue reading...
סגור לתגובות

Releasing PWMAN3 v.0.2.1

pwman3 is a command line password manager written in Python. Pwman3 was originally started by Ivan Kelly, and published on github. I recenty became the maintainer, and now version 0.2 is released. Read more about it ... ... continue reading...
סגור לתגובות

PyGTK CD Ripper Tutorial – Part 3

In part 1 of this tutorial, the most basic GUI form of a CD ripper application, was created. Part 2 then continued and expanded this tutorial with GTK ListView to create the song list. This part will add some polish and varnish to the UI as well as some more functionality... ... continue reading...
סגור לתגובות

Back to blogging

Well, I am back to actively writing ... look inside if you want to know why and how ... continue reading...
סגור לתגובות

PyGTK CD Ripper Tutorial – Part 4

The last part of this tutorial added the complete song list. However, the UI is still not complete. This part will add the polish to the UI. ... continue reading...
סגור לתגובות

PyGTK CD Ripper Tutorial – Part 6

Part 5 of this tutorial added a gtk.Notebook and other widgets to the Preferences dialog. This part of the tutorial introduces the gtk.Frame and gtk.Expander widgets and completes the Preferences dialog. ... continue reading...
סגור לתגובות

PyGTK CD Ripper Tutorial – Part 5

The last part of this tutorial added some polish to the main window of the CD Ripper, and showed how to create an empty Preferences dialog. This part of the tutorial will complete the Presences exploring gtk.Notebook and other widgets. ... continue reading...
סגור לתגובות

Extending Python's Popen

I use Python's Popen quite often, and sometimes, I need to debug scripts using it. Here is how I extended Popen, to include a verbose debug mode ... ... continue reading...
סגור לתגובות

ליצור פריימוורק ברובי חלק ראשון

עברתי על הרבה מאוד מחוללי אתרים סטטיים, והגעתי להבנה מאוד רעה: או שהם מפלצתיים מסובכים ומסורבלים מאוד, או שהם פשוטים מאוד אבל נכתבו למטרה מאוד ספציפית, לרוב עבור יצירת בלוג.

השקעתי יום וקצת למשל במה שמאיר כתב עבור הבלוג שלו, ואפילו פתחתי לו 11 באגים, שמספר מהם כבר סודרו (המשך כך מאיר), אבל גם המחולל שלו, שמאוד פשוט (מקדימה, לא מאחורה), בנוי להיות בלוג. אבל אני רוצה להיות אתר עם דפים סטטיים, ולא בלוג. זה אומר כי כל הטיפול ב routing ובגישה בכללותה של איך עובדים עם התוכן מושפעת מזה. ובשביל לגרום למחולל שלו להיות כללי יותר נדרש יותר עבודה.

אז בצער רב וביגון קודר, התחלתי ליצור עוד מחולל סטטי משל עצמי. משהו שמאוד לא רציתי לעשות. השקעתי כמעט שבוע במחקר רק בשביל להימנע מזה. ובכל זאת :(

ביום הראשון להתחלתי, תכננתי איך השלד נראה, כתבתי ספסיפיקציה (עדיין לא שלמה) איך התוכן יראה לפני היצירה שלו כדף html, מצאתי המון ספריות שיודעות להמיר markup זה או אחר לhtml ובחרתי דווקא משהו שכתוב ב haskell (שימוש ראשון שלי למשהו שכתוב בשפה) אבל עם המון פוטנציאל וכוח שנקרא Pandoc . יש לו אפילו wrapper ברובי שאני משתמש לפרוייקט, וקפצתי למים העכורים של משהו שכל כך שנוא עלי – להמציא את הגלגל מחדש בפעם המליארד.

ואז נתקלתי במספר בעיות. איך אני מריץ קוד רובי שצריך להשתמש בספרייה שתגיע בתור gem ? בברירת מחדל, אם זה לא מותקן, אז אין לי דרך להגיד לרובי את המיקום של הקבצים. בסוף מצאתי לזה פתרון די פשוט, אבל לקח זמן להגיע אליו:

$BASE_PATH = File.expand_path(File.dirname(__FILE__) + '/..')

לאחר מכן, נתקלתי בעוד בעיות.
למשל היתה בעיה איך אני גורם לקובץ הריצה למצוא את Gemfile כאשר אני לא רץ בספרייה שהוא נמצא בה.
חיפוש וחפירה בהרבה מאוד קוד, גילה שיש רק דרך אחת לעשות זאת, וזה להשתמש ב environment variable של bundler בשם BUNDLE_GEMFILE :

require 'bundler'
ENV["BUNDLE_GEMFILE"] = $BASE_PATH + '/Gemfile'
Bundler.require(:default)

ועכשיו הוא יכול לעבוד כמו שצריך.

בעיה נוספת שנתקלתי בה, היא ניתוח של הפרמטרים לcli שרציתי.
יש לרובי ספרייה ממש נחמדה שמגיעה כחלק ממנו, אבל היא לא בנויה למה שחיפשתי.
אז חיפשתי משהו אחר, ומצאתי את slop. די נחמד. עדיין עובד קשה קצת, אבל פחות ממה שמגיע עם רובי עבור הצורך שלי.
יותר מאוחר גיליתי ספרייה טובה יותר, אבל רק בגרסה הבאה של מה שאני יוצר אעבור אליו, וזה נקרא Thor. היא נבנתה באמת למה שאני צריך, אבל גיליתי אותה בשלב שהחלטתי כבר להתמקד בעיקר קודם כל.

נכון לכתיבת הפוסט, היו עוד כמה בעיות שנתקלתי בהן, אבל פתרתי אותן די בקלות. בנתיים.
זה מאוד מעניין לראות כמה תכנות פריימוורק כזה דורש גישה וחשיבה שונה.
אני לומד מזה המון, אבל חבל שעם פרוייקט כזה.

חשוב לי עוד להדגיש כי נכון לכתיבת הפוסט, עדיין המערכת לא בנויה לשימוש נרחב, הקרנל אפילו עדיין לא מומש, ובנוסף היא ועוברת המון שינויים כולל בתכנון שלה, ובדרכי העבודה, כך שעד שלא אפרסם כאן שזה מוכן, תהיו צריכים לחכות בסבלנות.


Filed under: Ruby, אתרי אינטרנט, טכנולוגיה, פיתוח, קוד פתוח, תוכנה, תכנות
קטגוריות: Ruby, אתרי אינטרנט, טכנולוגיה, פיתוח, קוד פתוח, תוכנה, תכנות | סגור לתגובות

Debian in space

One more step at being the universal operating system: getting Debian to space:

Specifically, the International Space Station astronauts will be using computers running Debian 6.


Filed under: Debian GNU/Linux
סגור לתגובות

The social price of redirection

10 days ago I was wondering if I should merge the 3 Perl Maven sites. The recommendation by everyone was to merge the perl5maven.com site into the perlmaven.com site. As I had the same feeling too, I did it on May 1, just 8 days ago. It went quite smooth, but there was a price!

For the full article visit The social price of redirection

סגור לתגובות

The social price of redirection

10 days ago I was wondering if I should merge the 3 Perl Maven sites. The recommendation by everyone was to merge the perl5maven.com site into the perlmaven.com site. As I had the same feeling too, I did it on May 1, just 8 days ago. It went quite smooth, but there was a price!

For the full article visit The social price of redirection

קטגוריות: Perl, Google+, Reddit, Twitter, Social proof, Perl Maven | סגור לתגובות

The Social price of redirection

10 days ago I was wondering if I should merge the 3 Perl Maven sites. The recommendation by everyone was to merge the perl5maven.com site into the perlmaven.com site. As I had the same feeling too, I did it on May 1, just 8 days ago. It went quite smooth, but there was a price!

For the full article visit The Social price of redirection

קטגוריות: Perl, Google+, Reddit, Twitter, Social proof, Perl Maven | סגור לתגובות

opeark-kit revision 196 released

This is a long due maintenance release of openark-kit. This release includes bugfixes and some enhancements, mainly to oak-online-alter-table.

oak-online-alter-table Changes / bug fixes include:

  • Support for keyword-named columns
  • Use of FORCE INDEX due to lack of MySQL's ability for figure out the chunking key at all times
  • --sleep-ratio option added; allows for sleep time proportional to execution time (as opposed to constant sleep time with --sleep)
  • Support for chunk-retry (in case of deadlock) via --max-lock-retries)
  • Fixed order of cleanup
  • Fixed bug with verbose messages with non-integer chunking key
  • Fixed bug with single-row tables (people, no need for this tool for single row tables :) )
  • Friendly verbose messages to remind you what's being executed

oak-chunk-update changes includes:

  • Verbosing query comment if exists (friendly printing of what's being executed)

(Do check out QueryScript's split(); it's a simple, server side solution which works almost same way as oak-chunk-update)

More issues and changes not listed here.

Download

openark-kit is released under the new BSD license, and is freely available.

סגור לתגובות

הפצת לינוקס מול תוכנה

לפני מספר חודשים היה ויכוח גדול בwhatsup בו הועלו הרבה נושאים מדוע גישה מסויימת היא לא נכונה והגישה הנכונה היא כי יש לחשוב לפי הפצת לינוקס, ולא לפי צרכי התוכנה שלך.

אבל יש מספר בעיות שאנשי תוכנה אשר אינם מתמקדים בהפצה זו או אחרת נתקלו בהם, ופתאום אנו רואים כי נכתבים מערכות ניהול לשפות תכנות. ואם זה לא אומר דרשני, אז כמעט כל סביבת ניהול שפת תכנות מודרנית כיום מנסה לספק לבעיות שהפצות הלינוקס הולידו מענה.

אז מה הן הבעיות ? הנה רשימה חלקית:

  • עדכון דחוף מידי של ספריות שזקוקים להם
  • חוסר עדכון של ספריות שזקוקים להם
  • תיקוני באגים של הפצה, השוברים אפליקציה
  • צורך בלשמור גרסאות כלים מסויימת
  • שימוש במספר גרסאות שונות של ספריות לביצוע עבודה (למשל שרת המחזיק מספר אתרים)
  • שוני בין הפצות שונות, קצב ההתקדמות שלהם, ניהול הקבצים בתוכם וכיוב' …
  • שינוי ABI/API בספריות שונות תלוי בגרסאות הספריה.

הבעיות האלו (ללא חשיבות בסדר) וגם אחרות, גורמות לכך שיצירת תוכנות הפכה לסיוט בעולם הלינוקס.

בעוד שמיקרוסופט מעדכנת בד"כ אחת לשנתיים את הסביבה וגם כשהיא עושה את זה, היא כמעט ולא שוברת תאימות אחורה (למרות כי גם זה קורה, ולרוב בשל חשיבה עסקית מאחורי זה), לינוקס כל חצי שנה בממוצע משתנה בצורה הרבה יותר דרסטית.

זו הסיבה שהפצות כדוגמת דביאן ו redhat (ונגזרותיהן) המבוססות לשרתים מתעדכנות לעיתים רחוקות יותר ורק מזרימות תיקוני בעיות אבטחה בין לבין.

אבל גם כאן יש בעיה. כי אם היום יצאה גרסה חדשה של דביאן, מתי תצא הגרסה הבאה ?
יותר מזה, מה יהיה בגרסה הבאה ?
האם היא תתמוך בתוכנה הנוכחית שלי, או האם ידרשו שינויים ? אם ידרשו השינויים מה הם ?

כמו שאפשר להתחיל להבין, קשה מאוד להסתמך על הפצה כלשהי בכל מה שקשור בפיתוח תוכנה, היות והן לא נוצרו עבור התוכנה שלי. רק אם התוכנה שלי נוצרהcode preview ספציפית להפצה מסויימת, הבעיות האלו לא מעניינות אותי. אבל מרבית המערכות לא נכתבות עבור הפצה, כך שהסיכוי שהיא תתנגש בלפחות הפצה אחת ובצורת העבודה שלה מאוד גדולה ובאמת מתרחשת.

על קצה המזל, נוצרו כאמור מנהלים לכל שפה, אשר יודעים להתמודד עם הצרכים שלה.
כל מערכת ניהול כזו, מנהלת ספריות של הרבה כלים בצורה עצמאית, ועובדת בעיקר עם משתני סביבה, או קבצי הגדרות.
המנהלים האלו, מנהלים בעצמם מיקומי קבצים, וחלקם אף יודעים לעבוד עם גרסאות שונות של אותן הספריות, ולאפשר לטעון את זו שזקוקים לה.

שפות מהודרות וחדישות/מתחדשות (+-) כדוגמת פסקל (לא, לא חזרתי לשפה) וgo של גוגל מהדרות עצמן לגרסה סטטית בברירת המחדל (אלא אם המהדר שלהם משתמש ב gcc), ויוצא כי אין יותר התבססות בשום צורה על הפצת הלינוקס. וזאת בנוסף למנהלים שנוצרו עבורם בנוסף, לספריות הסטטיות שמהודרות פנימה.

עכשיו במידת הצורך, הפצה יכולה לקחת את קוד המקור, ולשנות אותו שתתאים להפצה, אך במקום לדרוש זאת מהמפתח או מפתחים, המפתחים בעצם משאירים את העבודה הזו להפצה זו או אחרת.

חשוב להבין כי הרבה תוכנות כיום לא נכתבות עבור שולחן העבודה אלא לעולם השרתים – מכלי ניהול ופריסה אוטומטיים, ועד תוכנות מבוססות "עננים" (לפחות בשיווק שלהם).

ובכך כל מערכת הניהול שהפצות מספקות אינו מתחדש מספיק מהר או בצורה המתאימה לצורות העבודה המקובלות כיום (משהו שהתפתח רק בשנים האחרונות ועוד ימשיך להתפתח).


Filed under: Operating Systems, אירגונים וחברות, אתרי אינטרנט, חברה, טכנולוגיה, לינוקס, פיתוח, קהילה, קוד פתוח, שולחן עבודה, תוכנה, תכנות, תקשורת
קטגוריות: Operating Systems, אירגונים וחברות, אתרי אינטרנט, חברה, טכנולוגיה, לינוקס, פיתוח, קהילה, קוד פתוח, שולחן עבודה, תוכנה, תכנות, תקשורת | סגור לתגובות

Blog Entry for my 36th Birthday

Being born on 5 May 1977, I turn 36 (= thirty six) on 5 May 2013. 36 is a special number for me in part because it is the square of 6, but more importantly because it is two times of 18. The age of 18 is considered the start of maturity in Israel when Israeli boys and girls gain the right to vote, and are supposed to enroll into the Israeli military, and normally hit sexual maturity at that point. The time I was 18, 19, 20 in 1995-1997, was very influential for me, and now I feel that I have achieved a second maturity.

I feel I have finally reached peace of mind, am enjoying all the little things in life, and can honestly see reality as it is, and see through many lies. Part of my problem was that for a long time I was playing the “Invisible”, which is something I decided to avoid from now on and work on better publicity. A different issue was me thinking of myself as The Eternal Jew, i.e: a profile, or a “god” in the stock exchange of the gods, which was an unhealthy tendency that I finally put to rest in a scene of my screenplay, Selina Mandrake - The Slayer (thanks to the wonderful protagonist there). Finally, yet another problem was that I have not accepted who I am, which is also something that I decided to avoid from now.

If I were ever going to visit Fantastica, the land of imagination, I would need to be very careful from the wrath of the characters of my stories and screenplays, whom I have put to much suffering (but at least all of them, with an exception in The Enemy and How I Helped to Fight it, ended up alive at the end of the stories and happier than ever. However, all this suffering was secondary to my own which involved hypomanias, and even some Manias, which caused some deteriorated health, and unhappiness to my surrounding.

I have decided that from now on, I would like to socialise more. I was told and understood that the lack of socialisation was part of what is causing hypomanias, and the underlying reason behind Bipolar disorder. I have already attended one Science Fiction and Fantasy Conference in Tel Aviv, and it was a wonderful and colourful experience, and also proved a catalyst for coming up with the idea of a screenplay I have written. I want to do stuff like that more often which will hopefully mitigate my hypomanias problem.

On this occasion, I would like to thank the people who helped me and guided me throughout my journey to maturity: my psychotherapist (whom I won't mention by name, but who provided a lot of solid advice), and Dr. David Burns for his excellent book Feeling Good: The New Mood Therapy; my friends from the Technion, the Haifa Linux Club, and the Tel Aviv Open Source Club; my friends from the Internet, and my family members for being there when I needed them.

I would also like to thank my characters, who provided a window into my soul and my innermost desires:

  • The ex-Member of the Organisation from my first real novella The Enemy, who was full of mathematical logic and was practically inhuman.

  • The Friends in “The One with the Fountainhead” who were happy to play the characters from Ayn Rand’s novel The Fountainhead while parodying and modernising it along the way. They signified what I was unhappy about the Fountainhead and also my growing interest in romantic relationships.

  • The Human Hacking Field Guide brings us Erisa→Eve, the sexy, mysterious, insurgent, and typical “bad girl” antagonist, who after becoming less of a rebel without a cause, and at the age of 18 felt like she can write her own replacement for In Search of Lost Time, and publish it, and it would be better than the original. Eve, I wish I knew I was reflecting on myself in this respect!

  • From Star Trek: “We, the Living Dead”, we find such characters as Q, my own Q2, Jadzia Dax, and my own Katie Jacobson, who face a mishmash of Star Trek: Deep Space Nine, Judaism, Julian Jaynes’ Bicameral Mind theory and other Near East history, open source hackerdom, and various Elders of Zion and Illuminati conspiracy theory, and survive to tell the tale, reflecting upon some of the farfetched stuff I thought to be true, during my “Great Mania”.

  • Finally, Selina from Selina Mandrake - The Slayer, handled the various vampires and demons she ran into in a graceful and natural way, and finally put my whole obsession with “The Eternal Jew”/“The Invisible”/“The Slayer”/ “The Dispeller”/“The Free”/etc. to rest. Selina, you are great - I love you!

During this period, I have also started writing Humanity - The Movie, which aims to be a parody of Humanity and modern life in particular, and which I originally imagined as being written and filmed by a Bajoran extraterrestrial who arrived at Earth, also during my “Great Mania”. I also began writing The Pope Died on Sunday, which tells the story of an atheist female graphic designer (and a software developer by training) in Milwaukee, during the summer of the year 2000, reflecting on an old mentality, and finally The Blue Rabbit Log, which is a Crazy Comedy parodying Role-Playing Games, and is based on an old idea of mine.


Anyway, right now, I feel like I have reached some greater and greater enlightenment and am more capable of handling life’s problems as I run into them. I have been realised more that the gods help them that help themselves, that I should be happy of what I am and proud of it, and that the people around me can often be dicks. I also realise now that my relentless policy for honesty and sincerity got me in a lot of trouble, because people don't want to face the Elephants in the room, but that I should still try to be more tactful in the future I also realised many people can often be jerks, and try to hurt you on purpose.

Cheers, and have a great 5 May day.



comment count unavailable comments
קטגוריות: birthday, humor, maturity | סגור לתגובות

Blog Entry for my 36th Birthday

Being born on 5 May 1977, I turn 36 (= thirty six) on 5 May 2013. 36 is a special number for me in part because it is the square of 6, but more importantly because it is two times of 18. The age of 18 is considered the start of maturity in Israel when Israeli boys and girls gain the right to vote, and are supposed to enroll into the Israeli military, and normally hit sexual maturity at that point. The time I was 18, 19, 20 in 1995-1997, was very influential for me, and now I feel that I have achieved a second maturity.

I feel I have finally reached peace of mind, am enjoying all the little things in life, and can honestly see reality as it is, and see through many lies. Part of my problem was that for a long time I was playing the “Invisible”, which is something I decided to avoid from now on and work on better publicity. A different issue was me thinking of myself as The Eternal Jew, i.e: a profile, or a “god” in the stock exchange of the gods, which was an unhealthy tendency that I finally put to rest in a scene of my screenplay, Selina Mandrake - The Slayer (thanks to the wonderful protagonist there). Finally, yet another problem was that I have not accepted who I am, which is also something that I decided to avoid from now.

If I were ever going to visit Fantastica, the land of imagination, I would need to be very careful from the wrath of the characters of my stories and screenplays, whom I have put to much suffering (but at least all of them, with an exception in The Enemy and How I Helped to Fight it, ended up alive at the end of the stories and happier than ever. However, all this suffering was secondary to my own which involved hypomanias, and even some Manias, which caused some deteriorated health, and unhappiness to my surrounding.

I have decided that from now on, I would like to socialise more. I was told and understood that the lack of socialisation was part of what is causing hypomanias, and the underlying reason behind Bipolar disorder. I have already attended one Science Fiction and Fantasy Conference in Tel Aviv, and it was a wonderful and colourful experience, and also proved a catalyst for coming up with the idea of a screenplay I have written. I want to do stuff like that more often which will hopefully mitigate my hypomanias problem.

On this occasion, I would like to thank the people who helped me and guided me throughout my journey to maturity: my psychotherapist (whom I won't mention by name, but who provided a lot of solid advice), and Dr. David Burns for his excellent book Feeling Good: The New Mood Therapy; my friends from the Technion, the Haifa Linux Club, and the Tel Aviv Open Source Club; my friends from the Internet, and my family members for being there when I needed them.

I would also like to thank my characters, who provided a window into my soul and my innermost desires:

  • The ex-Member of the Organisation from my first real novella The Enemy, who was full of mathematical logic and was practically inhuman.

  • The Friends in “The One with the Fountainhead” who were happy to play the characters from Ayn Rand’s novel The Fountainhead while parodying and modernising it along the way. They signified what I was unhappy about the Fountainhead and also my growing interest in romantic relationships.

  • The Human Hacking Field Guide brings us Erisa→Eve, the sexy, mysterious, insurgent, and typical “bad girl” antagonist, who after becoming less of a rebel without a cause, and at the age of 18 felt like she can write her own replacement for In Search of Lost Time, and publish it, and it would be better than the original. Eve, I wish I knew I was reflecting on myself in this respect!

  • From Star Trek: “We, the Living Dead”, we find such characters as Q, my own Q2, Jadzia Dax, and my own Katie Jacobson, who face a mishmash of Star Trek: Deep Space Nine, Judaism, Julian Jaynes’ Bicameral Mind theory and other Near East history, open source hackerdom, and various Elders of Zion and Illuminati conspiracy theory, and survive to tell the tale, reflecting upon some of the farfetched stuff I thought to be true, during my “Great Mania”.

  • Finally, Selina from Selina Mandrake - The Slayer, handled the various vampires and demons she ran into in a graceful and natural way, and finally put my whole obsession with “The Eternal Jew”/“The Invisible”/“The Slayer”/ “The Dispeller”/“The Free”/etc. to rest. Selina, you are great - I love you!

During this period, I have also started writing Humanity - The Movie, which aims to be a parody of Humanity and modern life in particular, and which I originally imagined as being written and filmed by a Bajoran extraterrestrial who arrived at Earth, also during my “Great Mania”. I also began writing The Pope Died on Sunday, which tells the story of an atheist female graphic designer (and a software developer by training) in Milwaukee, during the summer of the year 2000, reflecting on an old mentality, and finally The Blue Rabbit Log, which is a Crazy Comedy parodying Role-Playing Games, and is based on an old idea of mine.


Anyway, right now, I feel like I have reached some greater and greater enlightenment and am more capable of handling life’s problems as I run into them. I have been realised more that the gods help them that help themselves, that I should be happy of what I am and proud of it, and that the people around me can often be dicks. I also realise now that my relentless policy for honesty and sincerity got me in a lot of trouble, because people don't want to face the Elephants in the room, but that I should still try to be more tactful in the future I also realised many people can often be jerks, and try to hurt you on purpose.

Cheers, and have a great 5 May day.

קטגוריות: birthday | סגור לתגובות

להתנהל נכון עם תאורה ולחסוך בזמני רנדר.

למה לנוח? בעקבות דיון מסוים עם כמה חברים נפל לי האסימון שלא על כל דבר צריך לרנדר מחדש, אפשר לעבוד נכון ולחסוך זמן רנדר, למה אני מתכון אתם שואלים? בבלנדר קיימת אפשרות לייצא Pass כמעט לכל דבר, הכיף הגדול מתחיל כשמבינים שלא צריך לרנדר שוב כי האור לא ממש מוצא חן בעינייך פשוט אפשר לייצא Pass של תאורה ויש לך שליטה מלאה עליו כמו צבע, Glow, טקסטורה וכו' צעד קטן לאדם אפשר לקחת את זה קדימה יותר
סגור לתגובות

שיווק לא יזיק לפרוייקט שלך

הפרוייקט שלך החל מצורך אשר הצלחת לענות עליו. הוא גדל בצורה בריאה. רגע, אמנם פיתוח הוא המשאב החשוב ביותר של פרוייקטי קוד פתוח ותכנה חפשית, אך לא מומלץ להזניח את מאמצי השיווק, מאמץ קטן עשוי להניב פירות רבים.

התחנה הראשונה היא האתר של הפרוייקט. אתר עשוי בטעם ימשוך את המתעניינים, בעוד אחד מוזנח יבריח אותם. בתחום שיש בו מגוון פרוייקטים אשר עונים על צרכים דומים הדבר עשוי להוות את ההבדל בין פרוייקט מצליח לפרוייקט שנשאר "צעצוע" של קהל קטן.

אתמקד בשפות וכלי פיתוח. ראו את האתרים של GCC, Free Pascal, Lazarus, Vim ו- LLVM לדוגמא:

  • GCC
  • Free Pascal
  • Lazarus
  • Vim
  • LLVM

רובם גושי טקסט וחדשות. לזרוס, סביבת פיתוח, אינה כוללת אפילו תצלום מסך אחד של הסביבה בדף הבית.

כאשר יש לך קהל משתמשים גדול או גיבוי פיננסי, כמו GCC, LLVM ו-Vim, הדבר אינו מהווה בעיה. אך האתרים של Free Pacal ולזרוס אינם מזמינים, וחבל, מדובר בשני פרוייקטים ששווים השקעה ותשומת לב יותר ממה שהם מקבלים.

הבה נשווה זאת לפרוייקטים אחרים, מזמינים יותר, פעם נוספת נתמקד במספר שפות וסביבות פיתוח.

הביטו באתרים של Rust, Qt Creator, NetBeans, Ruby, Go ו- Ninja IDE. בתור בונוס נכלול גם את עמוד קרנל הלינוקס.

  • Rust
  • Qt Creator
  • NetBeans
  • NetBeans
  • Go
  • Ninja IDE
  • Linux Kernel

העיצובים משתנים, חלקם נוצצים, חלקם פשוטים ונקיים, אך האתרים האלו עושים הכל כדי לעניין אותך, ולאחר שנתפסת, להתחיל להשתמש בהם.

בעוד חלק מהם נהנים מגיבוי של חברות או גיבוי פיננסי, אפילו פרוייקט קטן כמו Ninja IDE מציג אתר מושקע. לדעתי אם הם יכולים לעשות עבודה טובה שכזו, אחרים יכולים ללכת בעקבותיהם.

גם שפה פופולרית (והחביבה עלי) כמו פייתון אינה שוקטת על שמריה ומשקיעה משאבים ב עיצוב מחדש של האתר ו חוברת שיווק שנראית נהדר [קישור ישיר ל-PDF המקדים].

  • האתר הנוכחי של פייתון
  • הצצה לעיצוב המחודש של האתר
  • הצצה לחוברת השיווק

קדימה, עשו את היום למבקרים באתר הפרוייקט שלכם.

סגור לתגובות

חדשות אתר המראה (04-2013)

הצטברו מספר עדכונים לגבי אתר המראה של איגוד האינטרנט בחודש אפריל:

  1. תקלה זמנית באתר המראה של פדורה לאור מחיקת המידע וסנכרונו מחדש
  2. הוספת גרסאות לקראת שחרור של פדורה (אלפא, בטא וכו')
  3. עומס חריג למשך כשבוע בעקבות שחרור אובונטו 13.04 (רוב הבקשות הם עבור עדכוני חבילות).
  4. פתיחת אתרי מראה למאגרי git, כך שניתן לבצע משיכת קבצים (pull) מהם ללא גישה לשרתים איטיים יותר בחו"ל. כרגע קיימים המאגרים של: לינוקס, PHP, ליברה אופיס ואתר כנסת פתוחה. אשמח לשמוע בקשות לפרוייקטים נוספים. עדכון הכתובת לשם push אפשר לבצע באמצעות הפקודה  git remote set-url --push <name> <newurl>
  5. הוספת אתר מראה לפרוייקט VideoLAN, כולל נגן הוידאו VLC.

Filed under: ISOC-IL
סגור לתגובות

התקנת FreeBSD-9.0 על וירטואלבוקס (חלק שני)

עכשיו, כשיש לנו שולחן עבודה KDE 4.8.4 מתפקד ברזולוציה מלאה, הגיע הזמן להוסיף תוכנות ושירותים שונים. בחרתי להתחיל עם RhythmBox – הנגן החביב עלי. לצערי סבל הנגן הזה מרגרסיה באופן-סוזה 12.1 – רוב הפלאגינים לא פועלים עקב אי-התאמה בגרסאות פייתון (שוב מחלת הגרסת) - ונאלצתי לעבור ל Banshee 2.4.1 הפועלת בה היטב.
סגור לתגובות

מחשב נייד חדש וקובונטו חדשה

המחשב הנייד שלי, מתוצרת HP, ששימש אותי (לא בנאמנה יש לציין) במשך 3 שנים הלך לעולמו אחרי שלוח האם נהרס בפעם השניה תוך פחות משנה. בעקבות זאת, החלטתי לרכוש מחשב נייד חדש, הפעם תוצרת לנובו ועם 3 שנות אחריות במקום אחת. הדגם שנבחר הוא ThinkPad Edge E320 עם 4 גיגה RAM ומעבד i3. לאחר קניית המחשב ניסיתי להתקין עליו את גרסה 11.04 של אובונטו ללא הצלחה – גרסת ה־64 ביט אפילו לא הצליחה לעלות. במשך הזמן
סגור לתגובות

דרושה חשיבה חדשה לחקיקת מזיקים

אחת מהבעיות הגדולות שרובינו חווים, היא ספאם אלקטרוני.

ישנו "חוק הספאם", אך הוא לוקה בחסר, היות והוא דורש ממני בכל זאת לעבוד קשה ולהתמודד עם התופעה באופן פרטני. כלומר כל מטריד צריך לקבל ממני פעולה שתסיר אותי ממנו, ובמידה וזה לא עוזר להגיש תביעה משפטית.

אבל אז מגיעים גופים למשל כמו קבר רחל, ומתחילים להספים בצורה שהיא חסרת גבולות,
אני חושב כי הפתרון לכך יכול להיות די פשוט – רשימה כחלק ממשרד ממשלתי (למשל משרד התקשורת) בה מספרי טלפון ודוא"ל יכולים להרשם בצורה שאומרת כי אסור לפנות אליהם בהצעות שיווקיות, תרומות ועוד (לפי אפשרויות שונות). במידה ותהיה פניה שכזו, העונש יהיה תשלום גבוה של מינימום כ10,000 ש"ח ועד 30,000 ש"ח (אם היתה יותר מפניה אחת) ללא הוכחת נזק כלשהו, או דרישה ממקבל הפניה להסיר עצמו קודם לכן.

ויותר מזה, גוף אשר מטריד באופן סדרתי אחרים, יועמד לדין על ידי משרד התקשורת, ויקבל קנסות יותר גבוהים אשר יכנסו כהוצאות לאכיפה הזו, וכן עם אפשרות לשלם פיצויים לנפגעים השונים, גם אם הם לא הגישו תביעה בנושא.

כך בראש ובראשונה יהיה כלכלי יותר לתבוע את המטרידים, ומצד שני למנוע הטרדות מאלו שלא רוצים לקבל מהם הטרדה.

כל מה שצריך זה לנסח בצורה ברורה את הרשימה של מה רוצים למנוע.


Filed under: אינטרנט, אירגונים וחברות, דואר אלקטרוני, חברה, חוק, טכנולוגיה, טלפוניה, כלכלה, ממשל, משטרה, משפט, עסקים, קהילה, קוד פתוח, שיווק, תלונות, תקשורת
קטגוריות: אינטרנט, אירגונים וחברות, דואר אלקטרוני, חברה, חוק, טכנולוגיה, טלפוניה, כלכלה, ממשל, משטרה, משפט, עסקים, קהילה, קוד פתוח, שיווק, תלונות, תקשורת | סגור לתגובות

Upgrading CyanogenMod on an encrypted device

This is a quick tip post.

The first thing I noticed after enabling full-disk encryption on my Android device is that the CyanogenMod updater stopped working. That makes sense, the recovery UI is too simplistic to be able to mount encrypted storage on which the update file is stored.
TL;DR? Upgrading Android is not for those who fear command line.

Still, updating your phone is useful, so if you want to do it on your encrypted device, here’s how:

  1. Connect the phone to your computer using a USB cable
  2. If you haven’t already, install the “android-tools” package
  3. Download the CyanogenMod archive you want to install, from get.cm.
  4. Reboot your phone into recovery mode.
  5. Once recovery is up, open a terminal on your computer and type “adb shell”
  6. In the adb shell, you need to mount /sdcard as a tmpfs: mount -t tmpfs -o size=500m tmpfs /sdcard
  7. Now close the shell by typing “exit”, and then move your downloaded archive into the phone like this: adb push cm-10.1-20130430-NIGHTLY-i9100.zip /sdcard/update.zip
  8. Navigate to “install update from sdcard” (note: navigating through recovery differs between devices. on my Galaxy S2 it is done by moving the cursor up and down with the volume button, and selecting an item with the power button).
  9. Select “apply /sdcard/update.zip”
  10. Reboot your phone when this process is complete
סגור לתגובות

Hebrew Keyboard Layout In Linux

Since I got this question from way too many people, I wanted to just share my “cross distribution” and “cross desktop environment” way of doing that very simple thing of enabling a Hebrew keyboard layout under Linux.

Easy As

After logging into your desktop environment, type this:

setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,il

Alt+Shift will get you between Hebrew and English. Easy as.

Sustainability

Making it permanent is just as easy:

mkdir -p ~/.config/autostart && cat <<EOF > ~/.config/autostart/hebrew.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Hebrew
Comment=Enable a Hebrew keyboard layout
Exec=setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,il
EOF

Should sustain logout/login, reboots, reinstalls (as long as you keep /home on a different partition), distribution changes and choosing a different desktop environment (KDE, GNOME, LXDE, etc.).


סגור לתגובות

On compiling TokuDB from source

Sharing my experience of compiling TokuDB + MariaDB 5.5. Why? Because I must have this patch to Sphinx 2.0.4.

Note: I was using what seems to be the "old" method of compiling; quoting Leif Walsh:

... We are looking at deprecating that method of building (MariaDB source plus binary fractal tree handlerton).  It only really needed to be that complex when we were closed source.

I also tried the "new" method of compiling, which I couldn't work out.

Here's how it goes: TokuDB is newly released as open source. As such, it got a lot of attention, many downloads and I hope it will succeed.

However as stable as the product may be, it's new to open source, which means anyone compiling it from source is an early adopter (at least for the compilation process).

Installation process

This is an unorthodox, and actually weird process. See section 6 on the Tokutek docs. In order to compile the project you must download:

  • The source code tar.gz
  • And the binary (?!) tar.gz
  • And the binary checksum
  • And the Tokutek patches
  • And the patches checksum

You extract the source tarball. But instead of doing the standard "./configure && make && sudo make install" you need to copy a shell script called tokudb.build.bash one directory level up, and run it from there.

tokudb.build.bash lists gcc47 and g++47 on rows 3, 4. Modify "gcc47" to "gcc", modify "g++47" to  "g++". I'm assuming you don't have a binary called gcc47. Why would you?

Dependencies

You will need CMake >= 2.8

This means Ubuntu LTS 10.04 users are unable to compile out of the box; will need to manually install later version of CMake.

Also needed is zlib1g-dev, rpmbuild.

While compiling

I ran out of disk space. What? I was using a 10G partition I use for my compilations. Looking at "df -h" I get that:

  • The source tarball is extracted (I did it)
  • The binary tarball is also extracted (someone has to explain this for me)
  • And inside the source directory we have:
bash$ df -h
...
1484    build.RelWithDebInfo.rpms
5540    build.RelWithDebInfo

At about 7GB (and counting) of build... stuff?.

UPDATE: just ran out on disk space again. Is this an incremental thing? Like every time my compilation fails and I recompile some files are not cleaned up? If so, put them on /tmp! OK, moving everything to a 300GB partition and starting all over.

More while compiling

I got errors on missing libraries. Like I was missing libssl, rpmbuild. This is what the "configure" script is for -- to test for dependencies. It's really a bummer to have to recompile 4-5 times (and it's a long compilation), only to find out there's another missing package.

After compiling

What is the result of the compilation? Not a "make install" prepared binary. The result is a MySQL-binary package. Se need to extract and put on /usr/local/somewhere etc.

Conclusions

The compilation process is unexpected and non-standard. The output is unexpected.

The correct way of doing this is a "./configure && make && sudo make install". I don't understand the need for a binary package while compiling from source. Isn't this the chicken and the egg?

A source distribution is no different from a binary distribution. You must have a testing environment to verify the source distribution actually works. This test environment is typically a bare-new-RedHat or a bare-new-Ubuntu etc. The machines at Tokutek are already installed with needed packages. Not so on my compilation machine. I suggest that apt-gets and yum installs for dependencies are added to the source distribution testing. This is the only reliable way for you guys at Tokutek to know that clients will actually be able to install via source.

סגור לתגובות

לא רק על וורדפרס

מתחשק לי להתחיל לכתוב על דברים נוספים מלבד וורדפרס, גם בעברית (כי בלוג באנגלית כבר יש). מאחר ולפתוח בלוג נוסף יהיה קצת חסר משמעות (למרות שאצלינו הבלוגים הם בחינם), הבלוג הזה משנה כיוון. אם כל מה שמעניין אתכם זה וורדפרס, אתם יכולים להרשם לרסס של קטגורית וורדפרס בלבד.


סגור לתגובות

Distributed – הרצאה שלי מכנס רברסים

בפברואר האחרון הרצאתי בכנס רברסים על מודל החברה המבוזרת, ועל איך אנחנו עובדים ב-Automattic. למי שפספס, הנה ההקלטה והמצגת:

http://www.slideshare.net/yoavf/distributed-reinventing-the-workplace

מספר שבועות לפני ההרצאה גם התארחתי בפודקאסט המצוין, ואת הפרק ניתן למצוא בבלוג של הפודקאסט.

נשמע לכם מעוניין? אנחנו כל הזמן מגייסים עובדים!

(ושוב תודה למארגני הכנס על ההזדמנות להופיע בו!)


סגור לתגובות

אז איך זה לעבוד מהבית – כתבות על אוטומטיק

שתי כתבות מהיום על אוטומטיק, החברה בה אני עובד:

Step Into the Office-Less Company – בוול סטריט ג'ורנל
Why Some Company Offices Are Virtual – ב-Businessweek


סגור לתגובות

ממשלת ישראל ומיקרוסופט, סיבוב 234098492084

לפני מספר דקות נתקלתי בלינק הזה, והכותרת הצליחה לעצבן אותי: "מיקרוסופט והממשלה ישתפו פעולה בתחומי ממשל זמין וסייבר". מדוע זה מעצבן אותי? הסיבה פשוטה: כרגיל בממשלת ישראל יעדיפו ללכת עם מיקרוסופט מאשר להשקיע פה בארץ ולהתעניין/להטמיע טכנולוגיות ישראליות או קוד פתוח … להמשיך לקרוא
סגור לתגובות

ממשלת ישראל ומיקרוסופט, סיבוב 234098492084

לפני מספר דקות נתקלתי בלינק הזה, והכותרת הצליחה לעצבן אותי: "מיקרוסופט והממשלה ישתפו פעולה בתחומי ממשל זמין וסייבר". מדוע זה מעצבן אותי? הסיבה פשוטה: כרגיל בממשלת ישראל יעדיפו ללכת עם מיקרוסופט מאשר להשקיע פה בארץ ולהתעניין/להטמיע טכנולוגיות ישראליות או קוד פתוח … להמשיך לקרוא
סגור לתגובות

ביי ביי סיסטם, שלום Devops

כותב שורות אלו מחפש זה מספר חודשים עבודה בתחום הסיסטם לינוקס. לא חשוב כמה אתה טוב בתחום, למצוא עבודה בו זה לא קל ומה שיותר מתסכל – זה תהליך ארוך, מאוד. אתה מתראיין אצל מישהו אחד, הוא מראיין עוד כמה מועמדים, … להמשיך לקרוא
סגור לתגובות

כמה מילים על ההתנתקות של נטויז'ן מה-IIX

עדכון: נראה כי השפיות חזרה לנטויז'ן בסופו של יום (לינק לגרפים מעודכנים) היום בבוקר ביצעה נטויז'ן 013 התנתקות חד צדדית מרשת ה-IIX. הסיבה הרשמית? המחיר היקר, וכך ש"אין צורך" בהתחברות ל-IIX מצד נטויז'ן.  מי אלו שנדפקים מכך? לא הספקים הגדולים … להמשיך לקרוא
סגור לתגובות

RTL (Right to Left) Text Editing: Comparison of Implementations

Recently I had a very productive talk with GNOME designers and developers in relation to RTL (Right to Left) text editing in GTK.

For those of you who don’t know, RTL languages such as Hebrew, Arabic, Farsi and others are different than most languages in a very simple way: the line of text starts from the right side of the page, and goes to the left. You read it from the right (first letter is the rightmost) and finish it on the left (last letter is leftmost) On Roman (or other LTR – Left to Right) languages,   it goes the other way around. This concept is hard to grasp for most people, especially if they don’t read any RTL language but want to develop software that supports it.

So how well does RTL text editing and displaying works on our platform? I’d say “pretty well”, but there’s some room for improvement. We’ll get to it in a second, but first let’s look on how RTL editing is done on other platforms.

On Windows, RTL support works in the “dumb” way, I’m not trying to say it’s stupid (although it kinda is), I’m just trying to say they have no smart text directions algorithm at all. When you write software for Windows, you get to decide the default text direction of every widget. But what’s if it’s a user-editable entry?

On most text inputs, the user might type in any language they choose to, and altough the default text direction is the one of the app’s UI, it usually isn’t what the user wants when they type. So what does Windows do to solve this problem? Nothing. Instead, they make the users pick the direction themselves. This is sometimes better than most “smart” text direction algorithms, but isn’t optimal. To switch directions in windows, you use lctrl+lshift for LTR or rctrl+rshift for RTL, (relevant note: if you use Firefox, ctrl+shift+x toggles the direction of the text input across all platforms). And if you are editing a multi-line file you are in trouble, because there’s one direction setting for the entire file, instead of one per line.

In GTK, things are done a bit differently. For starters, every line gets its own direction, which is great when you write a multi-line message or text document. GTK also tries to be smart about the text direction, and sets the direction of the line according to the first “strong” characters in the line. “strong” characters are characters which has a defined direction in the unicode specification, so a latin/roman character (like the ones you are reading now) are “strong” left, and Hebrew and Arabic characters are “strong” right. Numbers are “weak”, meaning they don’t have any explicit direction defined (in most RTL languages numbers are read from left to right, yes, I know, this is confusing for those of you who don’t speak any RTL language).

While smart direction guessing is useful and a nice thing to have, GTK’s method does have few flaws, for example, if I highlight someone on IRC (IRC nicknames are always made of latin characters, which are LTR) when I chat in Hebrew, the line will be aligned to the wrong direction. There are many other (more common) cases in which you might want to start your sentence with an English word but continue in an RTL language – this is simply the first one I could think of (the other one that pops to my mind is instant messaging communication, but I can’t explain how this could happen outside IRC without boring you with rules of Hebrew grammar).

So how do others deal with this problem? to answer this question, I’m going to look away from desktop platforms and look at websites. Facebook does exactly what GTK does, apparently, so I’m going to go ahead and ignore it. Twitter and Google (across various products, including gmail, Google Talk and Google+) do things a bit differently and (in my opinion) it’s better: They appear to count the amount of strong characters in the line, and decide whether it will be RTL or LTR according to which number is higher. Sounds simple, right? closer examination shows that they do a bit more than just character counting, because “aaaa אאא” aligns the line to the right instead of the left.

According to their github repository where they host the code that does that (yay FOSS), they set the direction to RTL if the number of RTL characters in a line divided by the total number of characters (after stripping hashtags, URLs and mentions) is bigger than a set threshold (currently 0.3).  I do think that makes sense. Google, unfortunately, did not release the code that they use to do that, so we can’t see how they implemented it.

If I already mentioned Google, it’ll be interesting to add that on Google Talk, the input field does all these fancy auto alignment things, but then the messages are displayed as LTR. Sucks.

So what should we do in GTK? Our BiDi (bi-directional text) support is pretty good, in my opinion, but we can make it better. I have two simple suggestions: first, we should do what twitter does (and it’s open source, so we also know how they do it), and use character threshold instead of the first strong character. The second thing is doing what Windows and Firefox do: sometimes even the smartest automatic direction guessing algorithm fails, and it would be extremely useful to be able to manually toggle the line’s direction, especially when writing code.

One final word, for those of you who never touched BiDi before: I mentioned RTL text displayed as LTR. This (in most cases) doesn’t mean the text is mirrored and impossible to read. It does, however, means that the text is left aligned and the position of “weak” characters (punctuation and numbers, mostly) in the text is wrong. You might notice the same thing if you read LTR text displayed as RTL:

(this bit is in the brackets) and this one isn’t, and ends with a question mark?

Ugly and confusing (also try selecting parts of that line as well). Especially when the text is longer than just one line.

So what do you think? Is my suggestion for GTK seems reasonable?

סגור לתגובות

Comparing Perl, Python, Ruby and PHP

You know I like useless statistics, right? So here are some: Comparing the ranking of Perl, Python, Ruby, and PHP related web sites. Once every few months I check the Alexa ranking of a bunch of sites that interest me on some level. Actually I track more than what you can see here, but this will be interesting to you. I promise.

For the full article visit Comparing Perl, Python, Ruby and PHP

סגור לתגובות

Comparing Perl, Python, Ruby and PHP

You know I like useless statistics, right? So here are some: Comparing the ranking of Perl, Python, Ruby, and PHP related web sites. Once every few months I check the Alexa ranking of a bunch of sites that interest me on some level. Actually I track more than what you can see here, but this will be interesting to you. I promise.

For the full article visit Comparing Perl, Python, Ruby and PHP

קטגוריות: Perl, Python, Ruby, PHP, Alexa | סגור לתגובות

To merge or not to merge?

I have a problem: Should I keep the 3 Perl Maven sites ( Perl 5 Maven, Perl 6 Maven, and Perl Maven) separate, or should I merge them together? Or maybe I should merge P5M into PM and leave P6M separate.

For the full article visit To merge or not to merge?

סגור לתגובות

To merge or not to merge?

I have a problem: Should I keep the 3 Perl Maven sites ( Perl 5 Maven, Perl 6 Maven, and Perl Maven) separate, or should I merge them together? Or maybe I should merge P5M into PM and leave P6M separate.

For the full article visit To merge or not to merge?

קטגוריות: Perl, Perl 5, Perl 6 | סגור לתגובות