פלאנט תוכנה חופשית בישראל (Planet FOSS-IL)

17 March, 2024

Boris Shtrasman

Apperntly rk2aw is not opensource in the terms I'm used to, while the binaries themselvs are distributed under the MIT license, the code is not #pinephone

בפוסט קודם לא הייתי בטוח האם rk2aw הוא קוד פתוח או לא, מצד אחד היה קובץ license שאמר שזה MIT אבל מצד שני לא הצלחתי לאתר את קוד המקור, מצד שלישי pine64 בחרו בו להיות מנהל האיתחול שלהם, ככה שכן היה הגיון שמדובר במוצר קוד פתוח.

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

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

הייתרונות העיקריים של tow boot הם שזה קוד פתוח GPLי , ואין את ממשק העזרה בעלייה של המכשיר , אז האיתחולים עצמם מהירים יותר מאשר ב rk2aw.
 
הייתרון העיקרי של rk2aw הוא שמדובר במערכת שיכולה לעבוד טוב יותר אם פוגעים ב spi.

17 March, 2024 01:18 PM

15 March, 2024

Boris Shtrasman

it is possible to run mobian without tow-boot on a pinephone pro, you just need to reinstall rk2aw after you flush mobian, and remember, when you flush a new image on the pinephone pro that had rk2aw you must have a bootable uSD

אתמול סייעתי להתקין מובייאן על אורן משובח מתת הזן מטייל (Pinephone Pro Explorer Edition), התהליך דרש די הרבה מאמצים בהשוואה לאורן המצויי, אבל האמת זה יותר מפחיד מאשר שזה באמת, האורן המשובח בשונה מהאורן מצויי מכיל את rk2aw במערכת השורשים שלו,והrk2aw מגיע במקום ה tow-boot שהיה מותקן על ה spi flash של המכשיר, באורן המצויי בשונה מהאורן המטייל היה לנו tow-boot מותקן על ה eMMC ישירות. למה המשכתי עם ה rk2aw ולא חזרנו ל tow-boot כי בעל המכשיר לא לקחת סיכון נוסף.

ה rk2aw בשונה מה tow-boot מצפה שיהיה שורש יונק (das u-boot) מותכן בבסיס השורשים, ואם לא יהיה אחד אחלנו אותה, לא יהיה ניתן לבצע איתחול. בהתחלה ניסיתי לכתוב קובץ איתחול בצורה ידנית (באמצעות dd ) בשביל לבצע טעינה, אבל זה לא הצליח לאחר מכן מצאתי את ההסבר שהיה במדריך להתקנת מספר הפצות שניתן להתקין את rk2aw מחדש שהוא כבר יכיל את השורש היונק. זה היה קצת מלחיץ , כי אם הייתי  שובר את ה rk2aw אז ייתכן והייתה למישהוא משקולת נייר במקום טלפון פתוח. אבל זה הצליח. 
 
נקודה חשובה שבעוד אין בעייה למצוא את קוד המקור של tow-boot המבוסס על u-boot,  לא הצלחתי למצוא את קוד המקור של rk2aw! אבל רישיון השימוש של rk2aw הוא MIT אז אני מניח שיש איפשהוא גישה לקוד המקור.
 
והאמת מדובר במשהוא די מלחיץ כי מדובר בסופו של יום במשהוא שנראה סגור לחלוטין בשבילי (כי אין קוד מקור ואין דרך לבנות אותו מקוד המקור).

את התהליך ביצעתי בצורה הבאה: 

לאחר כיבוי המכשיר והוצעת ה μsd  ובדקתי שהמכשיר עולה ומצליח.

15 March, 2024 08:44 AM

25 February, 2024

Guy Rutenberg

Nginx: Block access to sensitive files

As more websites and applications are being hosted on the web, the necessity for securing these resources is skyrocketing. Among various web servers, Nginx has gained substantial popularity due to its performance, flexibility, and stability. Despite its many merits, securing your applications can always be a tricky business. But fret not, securing sensitive files in Nginx is achievable by configuring the Nginx server to block attempts directed at accessing specific files or file types.

This blog post will guide you through a way to enhance the Nginx server’s security by blocking access to sensitive files. As seen in the code snippet in the block_bad.conf file, we will deny access to all dotfiles, files ending with ~ or .bak, and the dump.sql file which often contains database dumps.

Start by saving the following code snippet in the /etc/nginx/snippets/block_bad.conf:

# deny access to all dotfiles
location ~ /\. {
	deny all;
	log_not_found off;
	access_log off;
	return 404;
}

# Allow access to the ".well-known" directory
location ^~ /.well-known {
        allow all;
}

# deny access to files ending with ~ or .bak
location ~ ~$ {
	deny all;
	log_not_found off;
	access_log off;
	return 404;
}
location ~ \.bak$ {
	deny all;
	log_not_found off;
	access_log off;
	return 404;
}

location ~ /dump.sql$ {
	deny all;
	log_not_found off;
	access_log off;
	return 404;
}

By using the deny all; directive within the location blocks, Nginx will disallow access to the specified locations. The access_log off; and log_not_found off; directives prevent logging access to these blocked file types, and the return 404; directive makes Nginx return a 404 error when an attempt is made to access these files.

Specifically, the location ~ /\. clause will block access to all dotfiles. These files usually store configuration for individual programs, revealing them might cause security vulnerabilities. The next location block with the pattern ~ ^/.well-known overrides the previous one by specifically allowing access to URIs startings with .well-known (which is used by certbot).

The next set of directives beginning with location ~ ~$ and location ~ \.bak$ blocks access to files ending with ~ or .bak. These files are often temporary files or backup copies which may accidentally leak sensitive information if accessed by malicious actors.

Lastly, the location ~ /dump.sql$ rule denies access to dump.sql files. These files may contain database dumps, which can expose sensitive database information.

After saving this file, you need to include it in your server block configuration using the include directive. Open the Nginx server block configuration. Then, to load the block_bad.conf, add include snippets/block_bad.conf; in each server block that you want to apply these security rules. Restart the Nginx service after including this rule to apply the changes.

By taking the steps outlined in this guide, you can enhance the security of your Nginx server by preventing unauthorized access to sensitive files and thus reducing potentials for information breach. Remember, securing your servers is a continual process, and consistently updating your configurations to counter evolving threats is a good practice.

25 February, 2024 07:50 AM

03 February, 2024

Guy Rutenberg

Split DNS using systemd-resolved

Many corporate environments have internal DNS servers that are required to resolve internal resources. However, you might prefer a different DNS server for external resources, for example 1.1.1.1 or 8.8.8.8. This allows you to use more secure DNS features like DNS over TLS (DoT). The solution is to set up systemd-resolved as your DNS resolver, and configure it for split DNS resolving.

Starting with systemd 251, Debian ships systemd-resolved as a separate package. If it isn’t installed, go ahead and install it.

$ sudo apt install systemd-resolved
$ sudo systemctl enable --now systemd-resolved.service

Create the following configuration file under /etc/systemd/resolved.conf.d/99-split.conf:

[Resolve]
DNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com

Domains=~.
DNSOverTLS=opportunistic

Domains=~. gives priority to the global DNS (1.1.1.1 in our case) over the link-local DNS configurations which are pushed through DHCP (like internal DNS servers).

DNSOverTLS=opportunistic defaults to DNS over TLS but allows fallback to regular DNS. This is useful when corporate DNS doesn’t support DNS over TLS and you still want to resolve corporate internal domains.

Restart systemd-resolved to reload the configuration:

$ sudo systemctl restart systemd-resolved

The final step is to redirect programs relying on /etc/resolv.conf (possibly through the glibc API) to the systemd-resolved resolver. The recommended way according to the systemd-resolved man page is to symlink it to /run/systemd/resolv/stup-resolv.conf.

$ sudo ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

F5 VPN

F5 VPN doesn’t play well with the above configuration. First, F5 VPN tries to overwrite the DNS configuration in /etc/resolv.conf, by removing the existing file and replacing it with its own (pushing corporate DNS server configuration through it). The solution is to prevent F5 VPN from deleting the /etc/resolv.conf, by setting it to immutable. However, we cannot chattr +i a symlink. We have to resort to copying the configuration statically, and then protect it.

$ sudo cp /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
$ sudo chattr +i /etc/resolv.conf

Finally, because now F5 VPN can’t update the DNS configuration, we would have to manually configure the corporate DNS servers and the search domains.

$ sudo resolvectl dns tun0 192.168.100.20 192.168.100.22
$ sudo resolvectl domain tun0 ~example.corp ~example.local

Update: See Automating DNS Configurations for F5 VPN Tunnel using Systemd-resolved and NetworkManager-dispatcher for a script that automates the configuration.

03 February, 2024 04:32 PM

04 January, 2024

Gabor Szabo

Meet-OS, the first public version

For the full article visit Meet-OS, the first public version

04 January, 2024 08:58 AM

🎂 The first 100 articles on Rust Maven 🦀

For the full article visit 🎂 The first 100 articles on Rust Maven 🦀

04 January, 2024 07:23 AM

14 December, 2023

Artyom Beilis

למה אני לא מרוויח כסף מאפליקציות שאני מפתח?

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

אנשים רבים שלא באים מתחום קוד פתוח שואלים אותי. למה אתה לא מוכר את האפליקציה? יכולת להרוויח מזה כסף! האומנם?

אז בוא נעשה ניתוח עסקי קצר בדיעבד

ניתוח הכנסות פוטנציאליות

נכנסתי ל־google analytics לעקוב אחר מספר המשתמשים בשנה האחרונה, הנה המספרים:

  • סה"כ כ־24,500 מתשמשים
  • בישראל 250 משתמשים בשנה האחרונה

אז אם הייתי גובה מכל אחד נגיד $5 (שזה מחיר מוגזם) אז על הנייר זה $122500. האם זה חישוב נכון?

ניכנס לניתוח לפי מערכת ההפעלה:

  • אנדרואיד זה כ־10,500 משתמשים
  • iOS זה כ־10,000 משתמשים
  • שאר זה משתמשים של מחשבים - לא רלוונטי לתחשיב

כבר הורדני כ־1/5 משתמשים וירדנו לכ־$100K שזה מספר מכובד.

אבל אם נסתכל על משתמשים בישראל - 250. במקרה קהילה של האסטרונומיה בארץ היא קטנה ורובינו מכירים זה את זה. לכן, היא מהווה מדגם נהדר. יש לי קבוצת ווטסאפ בשם "קבוצת התמיכה ב־AstroHopper" בה 15 חברים מהקהילה ישראלית (חלקם היו מעורבים בשלבי בטא מוקדמים)... כמי שיורד לתצפיות באופן (כמעט) קבוע ונפגש עם אנשים אני יכול להגיד שמספר המשתמשים ברשימת ווטסאפ הוא די מייצג - כי אני די מכיר את רובם. אז אולי פספסתי ואני נותן הערכת חסר אז נגיד יש לא 15 אלא 50 משתמשים (ומההכרות שלי עם הקהילה זה מספר מוגזם)

אז אם ניקח את זה כמדגם מייצר - כנראה בהערכה האופטימית ביותר, מתוך 20 אלף משתמשים ב־google analytics בפועל זה אולי 4000 משתמשים פעילים אמתיים. האם זה מספר קרוב מציאות?

אם נסתכל על מידע ב־google play של SkySafari Pro גרסה 6 ו־7 - יש להם כ־10 אלף הורדות. וזו אפליקציה הרבה יותר פופולרית מאסטרוהופר והרבה יותר מושקעת כי יש בה עוד המון פיצ'רים נוספים.

אז כנראה הערכה של 4000 משתמשים היא הערכת נכונה מבחינת סדר גודל. הייתי אומר אפילו הערכה אופטימית ביותר. אז לאיזה סכום הגענו (במקרה הטוב) של כ־$20K...

ניתוח הוצאות והשקעה

אני לא מחזיק ב־iOS ולא ב־Mac. לכן, כדי לתמוך בבניית אפליקציית ל־AppStore הייתי צריך לרכוש אותם. וגם להשקיע בפיתוח של אותה האפליקציה פעמיים - פעם עבור iOS ופעם לאנדרואיד. מחשב אפל הזול ביותר שאשפר למצוא היום הוא כ־3000₪ ונגיד לקנות טלפון יד שניה זה עוד 1000₪ שזה מביא למשהו כמו $1000 הוצאות עוד לפני שהרווחתי פרוטה. או להפסיד 1/2 מהכנסות או אופילו יותר.

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

פיתוח נוסף

אני משתמש במספר בסיסי נתונים זמינים:

  • OpenNGC זמין תחת CC By SA
  • בסיסי נתונים של קבוצות כוכבים שזמינות תחת GPL

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

  • לבנות בסיסי נתונים בעצמי ע"י הצלבה של מספר רב של מקורות עם רישיונות יותר נוחים
  • לרכוש כאלה

הפיל שבחדר - אם האפליקציה לא הייתה חופשית האם היא הייתה מצליחה?

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

היום גיליתי עוד אחת ל־iOS שעושה משהו מאוד דומה (לא בחינם) ומסתבר שקיימת מ־2016! רק שלא שמעתי עליה וכמעט ואף אחד לא הזכיר אותה (וכבר שכחתי את שמה).

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

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

נגיד היא הייתה בכל זאת מצליחה האם זה רווחי?

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

אז למה בכל זאת עשיתי את זה?

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

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

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

הטקסט המלא

14 December, 2023 09:45 AM

23 November, 2023

Ilya Sher

Type Casting in TypeScript

( During code review, looking at TypeScript code. )

Colleague: … type casting …

Me: hold a sec, I don’t remember about anything called type casting in TypeScript

Colleague: you know, “as”

Me: yep, there is “as”, I just don’t think it was called type casting when I last re-read the official documentation a couple of months ago.

Colleague: hold a sec, here (shows me Google search results)

Search Results

My suspicion that something is off just grew when no result came from the official documentation.

TypeScript’s “as”

Clicked on few of this articles. They are talking about “as”. What does official TypeScript documentation tell us about “as”? It’s found under the heading Type Assertions. I didn’t see anything about type casting in the documentation.

Type Assertion vs Type Casting

Same thing, you are just showing off by being pedantic about naming!

Statistically probable response

What if I told you there is a practical difference between type assertion and type casting which confused my colleague?

Sometimes you will have information about the type of a value that TypeScript can’t know about… Like a type annotation, type assertions are removed by the compiler and won’t affect the runtime behavior of your code.

Official TypeScript documentation

You are letting TS know which type the value is. This information is used at compile time. Nothing happens at runtime. “cast” to the wrong object and no exception is thrown. That’s type assertion in TS.

In other languages casting has runtime implications.

Reality Check 1

Googled “type assertion vs casting typescript”. First result is What are the difference between these type assertion or casting methods in TypeScript (Stack Overflow). Oops. People are using “casting” all over, even on Stack Overflow… except that one comment at the end of the page:

(myStr as string) isn’t a cast, it’s a type assertion. So you are telling the compiler that even though it doesn’t know for sure that myStr is a string you know better and it should believe you. It doesn’t actually affect the object itself.

Duncan, Apr 13, 2018 at 14:26

… which is countered by

Coming from C# and since Typescript has many C# features, I’d say it is

user2347763, Apr 13, 2018 at 15:17

I’ll have to disagree on the grounds that cast expression in C# “At run time, … might throw an exception.”

Reality Check 2

… whether the underlying data representation is converted from one representation into another, or a given representation is merely reinterpreted as the representation of another data type …

https://en.wikipedia.org/wiki/Type_conversion

So, apparently, type assertion is a specific case of type casting.

Conclusion

I was wrong thinking that “type assertion” is not “type casting”. Apparently, it is. It’s just a specific case. The phrase “In other languages casting has runtime implications.” (that I wrote above) is apparently not correct in the general sense despite Java and C# popping up immediately.

What I’m still having hard time to understand is why those articles choose to use the generic wording. I think we should always strive for precise wording.

If you want to be part of search results, fine, I get it. What’s preventing you from “In TypeScript, type casting is implemented using type assertions (a special case of type casting) that only have compile time implications” (or something similar) though?

Takeaways


Can we make this article more precise? Let me know 🙂

23 November, 2023 07:35 AM

06 November, 2023

Ilya Sher

Feedback Essentials

This is a concise post, summarizing Manager Tools podcasts about feedback. Examples are mine, I couldn’t remember specific examples.

Manager Tools recommendations are based on data about what’s effective gathered from companies from different industries and of different sizes.

Purpose of Feedback

The only purpose of feedback is to encourage productive behavior and to discourage unproductive behavior in the future.

Why Give Feedback?

As a manager, you are measured by results and retention. Results are achievable through behaviors. Your job as a manager is to adjust the behaviors, mostly through feedback, in order to improve results.

Prerequisites

For a feedback to be effective, there must be established relationship. In a professional context, the way to establish and maintain a relationship between a manager and their directs are weekly one-on-one meetings (which deserve a separate post). Without established relationship, feedback will most likely be ineffective. After having one-on-ones for some time, you can start with positive feedback, then add negative.

Be calm when giving feedback. If you are angry, wait until you are calm to give feedback.

Frequency

Overwhelming majority of directs want more feedback. Therefore, the feedback must be short. If it’s not short, it won’t be frequent.

Length

One feedback instance should take 30-90 seconds. (Don’t remember the exact numbers but something close to this).

Timing

The more adjacent in time the feedback is to the discussed behavior, the more effective it is.

Positive to Negative Ratio

Positive feedback is when you encourage productive behavior. Negative feedback is when you discourage unproductive behavior.

Ideally, for 10 positive pieces of feedback there would be one negative piece.

What’s Worthy of Feedback?

Pretty much any behavior, positive or negative.

Note that the amorphous “culture” is just a set of accepted behaviors. Maintaining “culture” can only be done through continuous feedback (by managers on all levels) and can not be done by producing the famous “our culture” style documents alone.

Delivery

Deliver in private. In order of decreasing effectiveness, as for any other communication:

Procedure and Content

Giving feedback consists of the following steps.

Ask

Ask if the recipient is ready: “Can I give you some feedback?”

Do not proceed with feedback if the answer is no. In general, don’t ask questions when the response is irrelevant.

Describe the Situation

Example: “yesterday during the meeting”.

Describe the Behavior

Example: “you were talking over other people “

Describe the Effect

Example: “it made the discussion less effective” (TODO: better phrasing)

Ask to do More or Less

Example: “please don’t talk over other people in future meetings”

This part is left out if the person you are talking to is not under your management. You can’t ask of more or less of a particular behavior in this case. You operate under assumption that the person was not aware of the effect of their behavior and providing the insight can help. If you omit this part, the conversation is not called feedback (according to this model) anymore.

Positive Example

– Can I give you some feedback?

– Sure

– You had deliverable X. You had delivered it on time and the quality met the expectations. This unblocked team Y on time and we are on schedule to finish the whole project, which is important for the client. Please continue delivering on time and to the expected quality.

– Good. Thanks!

Notes:

Common Mistakes

Discussing Attitudes

Do not discuss attitudes, only behaviors. “You have a shitty attitude” is too amorphous and will cause “no, I don’t”. That’s an argument that you can’t possibly win. You should only give feedback about behaviors.

Root Cause Analysis

Don’t try to do root cause analysis with the direct. You are not well equipped to analyze what’s going on inside a head of another person.

More generally, don’t slip into digging into the past. The focus of feedback is future behavior.

Accumulating

Don’t wait for several instances of behavior to occur before giving feedback. Common mistake is to wait “to make sure we have a real issue here”.

Ignoring “Normal” Behavior

The excuse “this is the expected behavior of a person in this role” is invalid. Do give positive feedback for any behavior you want to continue in the future.

Asymmetric Delivery

Making positive and negative feedback items delivery asymmetrical is a mistake. They should be delivered in an identical manner except for the last section when you ask to do more or less of the behavior.


I intend to update this post for better phrasing and possibly more content (still keeping it concise).

Ideally, each point should have a link to the original podcast for deeper understanding. Hope I’ll get to do this some day.

06 November, 2023 11:31 AM

28 October, 2023

3 years of work on Pipenv in Gentoo come to a happy end

3 years and 3 months ago, I signed up for maintaining Pipenv in Gentoo. This work made me co-maintainer of pipenv. I finally closed a long standing bug in Gentoo's pipenv. Due to this work, pipenv now ships less vendored packages, and is about 20% smaller in size. continue reading...

28 October, 2023 02:15 PM

28 September, 2023

ik

מה אני פחות אוהב ב golang

בשנים האחרונות אני רואה המון "תלונות" על שפת golang וכמה התחביר שלה נוראי.

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

הסיבה ל"קושי" הזה, היא שהתלונות אינן ענייניות, אלא תלונות בסגנון של "אני רגיל לבצע לולאת while ובשפת go יש רק לולאת for המחליפה הכל".

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

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

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

עבודה עם channels

כאשר חושבים על coroutines (ב go השם או המונח הוא goroutines) יש יכולות לקבל יכולת לתקשר בצורה מאובטחת (מבחינת threads) עם משתנה מסוג channel שעליו מרכיבים טיפוס נתונים כלשהו.

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

ניתן "לסגור" את ה channel ואז ההקצאה שלו למעשה משוחררת וניסיון לעבוד איתו יגרום ל runtime error.

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

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

שימוש ב Interface

בשפת Go יש משהו הנקרא interface. למונח של interface מספר שימושים שונים, אלו הם העיקריים שבהם:

  1. יצוג טיפוס נתונים משתנה- לפעמים מוכר בשם variant בעולם התכנות.
  2. ליצור מבנה המייצג פונקציות למבנה נתונים או במילים אחרות ABI.
  3. יצירת הגדרה של Generics.

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

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

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

בעיה שנייה אני לוקח כערבון מוגבל, כי יכול להיות שאני מפספס משהו בהבנה שלי של המימוש של Generics (שהוא חדש מאוד בשפת Go) בשפה.

יש מצב שבו ניתן לקבל JSON שהוא מחרוזת בודדת, או רשימה של מחרוזות (אל תשאלו למה – משהו שנכפה עלי להתמודד איתו).
לא ניתן ליצור מערכת כזו עם Generics. כלומר ניתן ליצור הכרזה של תמיכה לזה, אבל הכרזה של Struct לא תדע להתמודד עם הנושא, ולכן צריך לממש struct אחד לכל סוג המקרים ולבצע המון "עיקומים" להתמודדות עם הנושא.
כלומר לא ניתן לדעת מראש מה ה JSON שיתקבל ואיך הוא יגיע אותו, ולמעשה ה generics לא פתר את הבעיה.

מה שניתן לעשות זה עדיין צריך להשתמש ב interface גנרי ולא ב Generics אשר תומך בשני המקרים, ואז צריך לעבוד המון עם reflection (התמיכה שיש ב Go היא מדהימה) בזמן ריצה ולבצע משחקים ולהחליט איך לתרגם את המצב הזה.

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

ביצוע Binding

אסיים את הפוסט בנושא הזה.

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

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

אבל הנה מספר רשימות קטנות:

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

סיכום ביניים

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

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

תכנות נעים 🙂

28 September, 2023 10:41 AM

10 September, 2023

Guy Sheffer

Truss violin – I deigned, 3D printed and built a violin and I am releasing it open source

Hey all,

In the past years I have had an ongoing project – I wanted an ultra-light modifiable electric violin. And finally I can share it with you.
This violin, weighs with all the parts on just 500 grams, which is the same as my acoustic violin. Moreover, the center of mass is close to the player making the violin feel lighter than an acoustic when playing.
This is made possible by an innovation I came up with, and have not seen anyone else do – The violin uses a truss like the one in a guitar neck, letting you balance the weight of the strings and tune the neck. This means that the violin can be printed with just a 15% infill making it ultra light (pegboard box at 20%).
I am not planning to start a violin-building business, so I see no reason to keep this to myself and I am releasing it. I ask you to give me some attribution, and consider releasing your design too. And perhaps a violin 🙂

This is the end result

Violin fully assembled

The design

Design cross-section in Soldworks showing the truss (in blue) that goes along the violin.

I made the design with the help of several mechanical engineers that I want to thank – Tal Reindel, Michael Lev-Ari Layoush, Itai Meshorer, and Don Corson. Also want to take the opportunity to thank Yair Grinberg, Oleh Shevchuk. It’s also based on the ElVioin v2 which is under the Creative Commons – Attribution – Share Alike license. So you can use it, share it, modify it and even sell it. But our particular design must also be released under the same license.

You can download the design files here.

The Pickup

You could use other pickups, however I found Oleg’s magnetic pickup l sounding just amazing, and clear. I think it was worth the money and transforms this instrument to one with a professional quality of sound.

Oleg’s pickup mounted on the violin

The parts

You will need the following parts. I tried adding links so you know what to get, but it does not have to be from these sources.

  1. 3D printed parts – I recommend using ABS because it means your violin is heat resistant. Print the body parts at 15% infill with the peg-box at 20%.
  2. A ukulele truss 330mm in length – the link is to the exact one I used.
  3. Guitar tuning keys
  4. 6 Pin Toggle Switch
  5. 1/4 inch audio jack
  6. ACRIFIX 1R 0192 glue (it’s a reactive cement really) – which is amazing and means you need no screws for the body. I found it here for sale and not online.
  7. Electric wire to fit in the tunnel
  8. Copper paper to sit on the string
  9. Double Sided Conduct Copper Foil Tape
  10. Oleg’s pickup (contact)
  11. Shoulder rest
  12. Screw and nuts for chin-rest
  13. screws for shareholder rest attachment
  14. Smooth-on XTC-3D for smoothing
  15. Metal-core violin strings (cheap ones seemed to do fine, but you could use D’Addario Hellicore too).

The Build

  1. Sand any parts you want smooth, or use smooth-on XTC-3D.
  2. Thread the truss along the body
  3. Thread the electrical wire along the body and make sure to have slack on both sides
Electrical wire going along the neck, and grounding the strings at the head
Side view of the neck, the grounding wire of the strings is serviceable
  1. Glue the parts together using the glue. Do this outside.
  2. At this point it’s a good time to smooth the neck using the Smooth-on XTC-3D for smoothing., although I only did that later in the build.
  3. Add the tuning keys and screw them in to place. You might need to drill the hole for the screws to go in smoothly.
  4. Add in the chin rest and shoulder rest attachment.
  5. I’d recommend a test run with the strings to see that the tension holds at this point –
    • thread in the strings and see that it holds together. Make sure to add some nylon or paper under the E and A strings so they don’t cut though the bridge.
    • You also need to file a groove in the nut for the strings to keep in place, otherwise you get a buzzing sound. You could use a file, but I found nail scissors also work.
    • I personally like placing the lower G string on the tuning key closest to the player and then D, A and E. I know it’s not the normal way but I find it comfortable. You can pick any order you like
  6. This is the cool part about this violin – you can now adjust the truss to compensate for the strings warping the neck.
View of the pegbox, with an allen key in the truss adjusting the neck
  1. Electronics – electric shield the box, install the pickup and solder the components using this diagram:
Diagram how to wire the pickup
Electronic box with copper shielding
Audio jack from the outside
Switch for parallel or serial pickup configuration
Electronics box closed

At this point, you can re-install the strings and you should have a functioning electric violin that is light, sounds good and is customizable. I really like how silent it is, and that I get only the signal of the violin when it’s plugged in.

How does it sound?

3D parts

Here is a link to the 3D parts on printables and (soon on thingiverse).

I would really appreciate any input to the design. Here is a list of things that I know could be done better

Things to improve

In memory of Yair Grinberg

I also want to note that the violin tuning keys were donated from Yair Grinberg’s workshop. I never met Yair, but I was invited by his family to take parts from his workshop after he passed away. There were a lot of cool things and half-made inventions there. Among the parts where the tuning keys which are part of this violin. I only wish I could have met him exchange ideas and show the violin to him.

Contributions are welcome

As always, if you have any input, suggestions or want help to build a violin like this you are welcome to comment.

Full text

10 September, 2023 11:31 AM

03 September, 2023

ik

על SIM ו eSIM

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

אז החלטתי לנסות ולעשות קצת סדר בנושא.

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

מהו SIM בפשטות?

ובכן SIM הוא כרטיס "חכם" הנקרא גם java-card ומכיל מספר יכולות – כדוגמת מידע "צרוב" קבוע, ומידע צרוב שיכול להשתנות וכתוב בשפת Java עם ספריות יעודיות עבורה המיוצרות על ידי חברת אורקל והחומרה מיוצרת על ידי מספר קטן של חברות.

גם כרטיס אשראי הוא סוג של java-card ברעיון דומה, אך עם מידע שונה (אין לי ידע בנושא הזה ולכן לא יכול להרחיב).

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

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

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

לאחר העליה המתאימה, ניתן לבצע פעולות כדוגמת Provisioning על ידי שימוש בהודעות SMS אשר המכשיר יודע לקרוא, ורובן לא מגיעות לבני האדם לקריאה. פעולה זו של שליחת המידע נקראת OTA – Over The Air.

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

השימוש ב OTA זו הסיבה מדוע הודעות SMS כל כך חשובות ברשת סלולרית, והסיבה לבקשת אתחול טלפון לאחר מכן, היא לפתוח מחדש את כל המידע – דבר אשר אינו מתבצע עם Flight-mode.

מהו eSIM בפשטות?

המונח eSIM הוא מונח לכרטיס פיזי היושב על מודם סלולרי (לרבות טלפונים). האות E בנושא היא עבור המילה Embedded.

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

ישנן שני "מסלולים" עבור מערכת ה eSIM:

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

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

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

בד"כ ה OTA מתבצע על ידי קריאה של מחרוזת המסופקת על ידי QR-Code.

המחרוזת היא URI של פרופיל הנקרא LPA – Local Profile Assistants.
הדבר הבא במידע יהיה כתובת מערכת ה provisioning עם איזשהו מפתח שהמערכת (SM-DP+‎) תזהה את הבקשה.

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

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

iSIM

עבור מערכת IoT קטנות במיוחד הדורשות System On a Chip, נוצר תת מעבד של eSIM בשם iSIM שהוא למעשה eSIM לכל דבר, אבל עבור סביבה מוגדרת. האות i מייצגת את המילה Integrated.

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


זהו בקצרה ובפשטות על הנושא.

03 September, 2023 09:14 AM

15 August, 2023

Meir Kriheli

מצב התרגום לעברית של Django אוגוסט 2023

לאחר הפסקה די ארוכה, חזרתי לתרגם העברי של Django. נכון להיום התרגום העברי של django-core, django-formtools, django-contrib-comments ו־django-people עומד על 100%. נשארו שוב בחוץ: django-localflavor, ־django-docs ו־djangoproject.com.

15 August, 2023 08:46 AM

07 August, 2023

Guy Sheffer

Fedigroup – group system for the Fediverse

Hey all,

Fedigroup logo

The past year I’ve been playing pretty active on federated social networks. This led me to try and write a federated social network group system. Although this group system is far from being complete since Fedigroup is currently in pre-alpha level. I think it is worth sharing what I have learned, and also explain a bit why, if you met me during the past three years. I’ve been going about federated social networks.

You are also welcome to join a server I maintain here, Hayu.sh is the second largest Hebrew-speaking instance.

What is a federated social network?

A federation in servers means everyone can run their own server which is autonomous. And it can communicate with other servers too. Creating a large network. The first protocol on the internet is actually federated too – email.

There is no one central email server, or single email software. In social networks this means that you join a server, and follow and interact with everyone else. Even though your server could be, like in my case, hosted in your own home, with you owning all the data. You can also join a any other server, and switch between them.
For Hebrew speakers, I gave a small TED lecture about it, which is hosted on a federated video server. You can watch it here (Hebrew).

The Fediverse is the servers using the a W3C Standard that does just that

What made the Fediverse possible is the standard that was passed to describe it. The protocol is called ActivityPub 2.0. And it lets social networks share status messages (notes), shares (boosts) and favorites across different servers. It was created by a group of people who cared, not large companies. Despite some of them being members of the W3C. Its also worth mentioning that one of the major adopters of the ActivityPub 2.0 protocol was Mastodon, a type of social network server, which resembles twitter. And that really help gain critical mass.

Why didn’t I hear about this?

I was asked this by other developers and power users. It makes people dismiss the Fediverse as a passing or niche thing.

Unlike Facebook, Twitter even if you’re been avoiding social networks, their marketing will reach you, your news channel, municipality and country are likely using them. Their existence depends on it that you use and browse on their site. However, in the Fediverse does not have a business model that demands it. Or a marketing team. Its just people. You are welcome to join, but no ones income depends on it.

The Fediverse is growing though, by word-of-mouth, or text-in-blog. Recently even celebrities and others. The latest are the BBC, PNAS, George Takei, Neil Gaiman, Stephen Fry and the European Commission.

Not to be confused with crypto – Which lacks moderation

I think one of the strength of the Fediverse is that it’s actually not going with the blockchain trend now, which is where a lot of effort is going to distribute things.

The Fediverse does not run using the now trendy crypto stuff. The advantage of it is that it costs far less to run. A small server for a few tens of people + a domain and you are good to go.

Another thing is that having an admin means you have a moderator, which is becoming critical for social networks. Large companies today are unable to moderate the volumes of messages on their social networks, resulting in many bad decisions, people getting blocked by algorithms and others who should roam freely. Many social networks today still don’t have moderation-by-design in mind. Even less in a trust-less network that uses crypto.

What is Fedigroup

Fedigroup is a server type that allows users to create a group and share it across the Fediverse. When a user creates a group, they can specify the topics they want to discuss, and the group, when mentioned, will automatically boost their posts related to those topics. This helps increase visibility for posts within the group and attract more members. Additionally, Fedigroup stores the contents of the group for future reference, making it easier for members to find and access previous discussions. Currently, there is also a web interface available that allows users to search through the contents of groups they belong to (the search button though is not implemented yet). Overall, Fedigroup provides a convenient way for users to create and participate in specialized communities within the Fediverse with group memory.

Features

Unimplemented (roadmap in theory)

Ui of Fedigroup as seen on https://fedigroup.party

I stopped developing it because it was far too much work only for me. It might pick up if someone joins me, but alone I will not manage to make it as good as others out there. It has potential as being a place to search for history on the Fediverse which is a little challenging today.

Also I think the recent migration of Reddit users show that the Fediverse is handling groups pretty well.

Still, Fedigroup was a good learning experience on how the technology works, and I think its worth sharing if you want to build a Federated instance that uses python, FastAPI and PostgreSQL.

If anyone wants to pick up where I left they are welcome. The source code is available on GitHub.

There is a running instance at: https://fedigroup.party
You welcome to try it out and as always – code contributions are welcome

Full text

07 August, 2023 10:25 AM

26 July, 2023

Amir Aharoni

Average Lengths of MediaWiki Translations

I was wondering: In which languages, user interface translations tend to be longer, and in which ones they are shorter?

The intuitive answers to these questions are that Chinese and Japanese are very short, English tends to be shorter than the average, Hebrew is shorter than English, and the longest ones are Turkish, Finnish, German, and Tamil. But what if I try to find a more precise answer?

So I made a super-simplistic calculation: I checked the average length of a core MediaWiki user interface message for English and the 150 languages with the highest number of translations.

I sorted them from the shortest average length to the longest. The table is at the end of the post.

Here’s a verbal summary of some interesting points that I found:

  1. The shortest messages are found, unsurprisingly, in Chinese, Japanese, and Korean.
  2. Another group of languages that surprised me by having very short translations are some Arabic-script languages of South Asia: Saraiki, Punjabi, Sindhi, Pashto, Balochi.
  3. Three more languages surprised me by being at the shoter end of the list: Hill Mari (mhr) and Northern Sami (se), which are Finno-Ugric, a family known for agglutinative grammar that tends to make words longer; and Armenian, about which I, for no particular reason, had the impression that its words are longish.
  4. English is at #22 out of 151, with an average length of 38.
  5. Hebrew is slightly above English at #21, with 37.9. This surprised me: I was always under the impression that Hebrew tends to be much shorter.
  6. The longest languages are not quite the ones I thought! The longest ones tend to be the Romance languages: Lombard, French, Portuguese, Spanish, Galician, Arpitan, Romanian, Catalan.
  7. Three Germanic languages, namely Colognian, German and Dutch, are on the longer end of the list, but not all of them. (Colognian is the longest in my list. The reason for this is not so natural, though: The most prolific translator into it, User:Purodha, liked writing out abbreviations in full, so it made many strings longer than they could be. He passed away in 2016. May he rest in peace.)
  8. Other language groups that tend to be longer are Slavic (Belarusian, Russian, Bulgarian, Polish, Ukrainian) and Austronesian (Sakizaya, Ilokano, Tagalog, Bikol, Indonesian).
  9. Other notable, but not easily grouped languages that tend to be longer are Irish, Greek, Shan, Quechua, Finnish, Hungarian, Basque, and Malayalam. All of them have an average length between 45 and 53 characters.
  10. Turkish is only slightly above average with 44.1, at #88.
  11. Tamil is a bit longer, with an average length of 44.6, at #94. Strings in its sister language Malayalam are considerably longer, 49.1.
  12. The median length is 43, and the average for everyone is 42. Notable languages at these lengths are Mongolian, Serbian, Welsh, Norwegian, Malaysian, Esperanto, Georgian, Balinese, Tatar, Estonian, and Bashkir. (Esperantistoj, ĉu vi ĝojas aŭdi, ke via lingvo aperas preskaŭ ĝuste en la mezo de ĉi tiu listo?)

One important factor that I didn’t take into account is that, for various reasons, translators to different languages may select to translate different messages, and one of those reasons may be that people choose to translate shorter messages first because they are usually easier. I addressed this in a very quick and dirty way, by ignoring strings longer than 300 characters. Some time in the (hopefully near) future, I’ll try to make a smarter way to calculate it.

And here are the full results. Please don’t take them too seriously, and feel free to write your own, better, calculation code!

#Language codeAverage translation length
1zh-hans17.67324825
2zh-hant18.52284388
3skr-arab21.81899964
4ja24.67007612
5ko25.8110372
6sd27.71960396
7mhr28.95451413
8ps32.73647059
9pnb33.03592163
10bgn34.39934667
11se34.69274476
12hy35.02317597
13su35.37706967
14th35.52957892
15ce35.6969602
16mai36.02093909
17lv36.14100906
18gu36.59380971
19bcc36.64866033
20fy37.60139287
21nqo37.94138834
22he37.95259865
23en38.04300371
24ar38.18569036
25ckb38.66867672
26min38.71156958
27ses38.87941712
28jv38.94753377
29is39.0652467
30alt39.39977435
31az39.4337931
32kab39.50967506
33tk39.54990758
34mr39.72049689
35as39.72080166
36sw39.73986071
37km39.77591036
38azb39.92411642
39nn39.96771069
40yo40.00503291
41io40.0528125
42af40.1640678
43blk40.2813059
44sco40.33289474
45diq40.33887373
46yi40.34033476
47ur40.39857651
48ug-arab40.53965184
49da40.55894826
50my40.67551519
51kk-cyrl40.87443182
52guw41.07080182
53mg41.08369028
54sq41.23219241
55fa41.27007299
56or41.27020202
57ne41.33971151
58rue41.40219378
59lfn41.54527278
60lrc41.61281337
61sah41.63293173
62vi41.74578313
63awa41.84093291
64hi41.9257885
65si41.93065693
66te41.99780915
67mn42.18728223
68lki42.21091396
69bjn42.57961538
70sr-ec42.67730151
71cy42.75020408
72frr42.92761394
73vec43.00573682
74sr-el43.13764389
75nb43.34987835
76krc43.54919554
77ms43.5553814
78hr43.55564807
79eo43.57477789
80nds-nl43.59060895
81ka43.60108696
82ban43.64178033
83bs43.681094
84tt-cyrl43.78230132
85xmf43.80860161
86et43.96494239
87ba43.99432099
88tr44.17996604
89bn44.28768449
90bew44.44706174
91sv44.49027333
92sa44.58670931
93cs44.59026764
94ta44.62803055
95mt44.70207417
96lt44.7615
97roa-tara44.79812466
98fit44.79824561
99dsb44.9151957
100hsb44.96197228
101br44.98873461
102sh-latn45.00976709
103fi45.1222031
104hu45.17139303
105sk45.35804702
106lb45.39073034
107li45.5539548
108id45.56471159
109gsw45.63605209
110sl45.75350606
111be45.80325
112oc45.85709988
113mk45.90943939
114bcl45.97070064
115scn46.11905532
116an46.14892665
117uk46.22955524
118qu46.30301842
119eu46.33589404
120lij46.660536
121pl46.76863316
122hrx46.79802761
123ast46.87204161
124nap46.93783147
125ru47.02326139
126bg47.03590259
127be-tarask47.28525242
128hif-latn47.41652614
129tl47.51263001
130rm47.60741067
131pms47.69805527
132pt-br47.84063647
133ca47.92468307
134ro48.22437186
135nl48.4175636
136ia48.48612816
137it48.52347014
138frp48.54542755
139gl48.57820482
140ml49.12108224
141es49.21062944
142pt49.63085602
143de49.77225067
144szy49.84650877
145shn49.92356241
146fr50.15585031
147lmo50.85627837
148ilo50.9798995
149el51.14834894
150gd51.72994269
151ksh53.36332609

The Python 3 code I’ve used to create the table. You can run in the root directory of the core MediaWiki source tree. It’s horrible, please improve it!

import json
import os
import re

languages = {}
code_re = re.compile(r"(?P<code>[^/]+)\.json$")


def process_file(filename):
    code_search = code_re.search(filename)
    code = code_search.group("code")
    if code in ('qqq', 'ti', 'lzh', 'yue-hant'):
        return

    with open(filename, "r", encoding="utf-8") as file:
        data = json.load(file)
        del(data['@metadata'])
        average_unicode_length(code, data)


def average_unicode_length(language, translations):
    total_translations = len(translations)
    if total_translations < 2200:
        print('Language ' + language + ' has fewer than 2200 translations')
        return

    total_length = 0

    for translation in translations.values():
        if len(translation) < 300:
            total_length += len(translation)

    # Calculate the average length
    average_length = total_length / total_translations
    languages[language] = average_length

root = "./languages/i18n/"
for file in os.listdir(root):
    if file.endswith(".json"):
        path = os.path.join(root, file)
        process_file(path)

sorted_languages = sorted(
    languages.items(),
    key=lambda item: item[1]
)

# Print the sorted items
for code, length in sorted_languages:
    print(code, '\t', length)

26 July, 2023 03:09 PM

01 June, 2023

Hamakor

הסתיימה חלוקת כרטיסים חינם מעמותת "המקור" לכנס Core C++ 2023!

תודה לכל מי שנרשם לקבלת כרטיסים, וברכות לזוכים המאושרים!

אם לא זכיתם בכרטיס חינם, מוזמנים לרכוש כרטיס ב-10% הנחה, כאן:
https://ti.to/hamakor/core-cpp-2023/discount/last-minute

השנה הכנס בהשתתפות ממציא שפת ++C, ביארנה סטרוסטרופ, בנוסף לשורה ארוכה של מרצים מעולים. לתוכניה המלאה: https://corecpp.org/schedule/
(הכנס מתקיים ביוני, 5-7 בסנימטק תל אביב, רחוב הארבעה 5)

מומלץ למהר ולרכוש, כי נותרו כרטיסים אחרונים בהחלט!

The post הסתיימה חלוקת כרטיסים חינם מעמותת "המקור" לכנס Core C++ 2023! first appeared on המקור.

01 June, 2023 01:20 PM

28 May, 2023

Hamakor

הזמנה לאסיפה כללית של העמותה – 28.5.23

שלום לחברי וחברות עמותת המקור, ידידים וידידות, ושותפים ושותפות לדרך,

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

שימו לב: האסיפה פתוחה לכלל חברי העמותה, ולא רק למשתתפי המיטאפ

האסיפה תתקיים:

  1. בחלל Brain Embassy (רחוב השלושה 2) בתל אביב, בשעה 18:00 ביום ראשון ה-28.5
    (מגדל Adgar360, קומת קרקע מגדל A, אולם כנסים)
  2. אונליין דרך זום – קישור להתחברות לזום

לוח זמנים:

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

פרטים טכניים:

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

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

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

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

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

לנוחיותכם קישור להצטרפות כידידי/חברי העמותה ולשדרוג מעמד מידיד/ת לחבר/ת העמותה.

בברכה,

ועד עמותת המקור

The post הזמנה לאסיפה כללית של העמותה – 28.5.23 first appeared on המקור.

28 May, 2023 01:04 PM

02 May, 2023

Shlomi Noach

Things that don’t work well with MySQL’s FOREIGN KEY implementation

Foreign keys are an important database construct, that let you keep an aspect of data integrity within your relational model. Data integrity has many faces, most of which are application-specific. Foreign keys let you maintain an association integrity between rows in two tables, one being the parent, the other being the child. I’ve personally mostly avoided using foreign keys in MySQL for many years in my professional work, for several reasons. I’d like to now highlight things I find to be wrong/broken with the MySQL implementation.

But, first, as in the past this caused some confusion: when I say I’m not using foreign keys, that does not mean I don’t JOIN tables. I still JOIN tables. I still have some id column in one table and some parent_id in another. I still use the benefit of the relational model. In a sense, I do use foreign keys. What I don’t normally is the foreign key CONSTRAINT, i.e. the declaration of a CONSTRAINT some_fk FOREIGN KEY ... in a table’s definition.

So here are things I consider to be broken, either specific to the MySQL implementation, or in the general concept. Some are outright deal breakers for environments I’ve worked with. Others are things to work around. In no particular order:

No binary log entries for cascaded writes

I think there are many people unaware of this. In a way, MySQL doesn’t really support foreign keys. The InnoDB engine does. This is old history, from before InnoDB was even officially a MySQL technology, and was developed independently as a 3rd party product. There was a time when MySQL sought alternative engines. There was a time when there was a plan to implement foreign keys in MySQL, above the storage engine level. But as history goes, MySQL and InnoDB both became one with Oracle acquiring both, and I’m only guessing implementing foreign keys in MySQL became lower priority, to be eventually abandoned.

Alas, the fact foreign keys are implemented in the storage engine level has dire consequences. The engine does not have direct access to the binary log. If you create a foreign key constraint with ON DELETE|UPDATE of SET NULL or CASCADE, you should be aware that cascaded operations are never written to the binary log. Consider these two tables:

CREATE TABLE `parent_table` (
  `id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

CREATE TABLE `child_table` (
  `id` int NOT NULL,
  `parent_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `parent_id_idx` (`parent_id`),
  CONSTRAINT `child_parent_fk` FOREIGN KEY (`parent_id`) REFERENCES `parent_table` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;

insert into parent_table values (1);
insert into child_table values (1, 1);
insert into child_table values (2, 1);

If you were to DELETE FROM parent_table WHERE id=1, then the two rows in child_table are also deleted, due to the CASCADE rule. However, only the parent_table deleted row is written in the binary log. The two child_table rows are deleted internally by the InnoDB engine. The assumption is that when a replica applies the DELETE on parent_table the replica’s own InnoDB engine will likewise delete the two relevant child_table rows.

Fair assumption. But we lose information along the way. As Change Data Captures are becoming more and more common, and as we stream changes from MySQL to other data stores, the DELETEs on child_table are never reflected and cannot be captured.

Online DDL, aka online schema changes

I’ve written about this at length in the past. But even that write up is incomplete!

MySQL is pushing towards INSTANT DDL, which is a wonderful thing. With 8.0.29, even more schema change operations are supported by ALGORITHM=INSTANT. But, there’s still quite a lot of operations unsupported yet, and until such time that INSTANT DDL supports all (or at least all common) schema changes, Online Schema Change tools like gh-ost, pt-online-schema-change, and Vitess (disclaimer: I’m a Vitess maintainer and actively developing Vitess's Online DDL), are essential when it comes to production changes.

Both Vitess and gh-ost tail the binary logs to capture changes to the table. In light of the previous section, it is impossible to run such an Online Schema Change operation on a foreign key child table that has either SET NULL or CASCADE rule. The changes to the table are never reflected in the binary log. pt-online-schema-change is also unable to detect those changes as there’s nothing to invoke the triggers.

Then, please do go ahead and read The problem with MySQL foreign key constraints in Online Schema Changes, as it goes deep into what it otherwise means to deal with FK constraints in Online DDL, as it cannot fit in this post.

Locked data types

In the above table definitions, id and parent_id are int. As data grows, I might realize the choice of data type was wrong. I really should have used bigint unsigned.

Alas, it is impossible to change the data type in either parent_table or child_table:

> alter table parent_table modify column id bigint unsigned;
ERROR 3780 (HY000): Referencing column 'parent_id' and referenced column 'id' in foreign key constraint 'child_parent_fk' are incompatible.

> alter table child_table modify column parent_id bigint unsigned;
ERROR 3780 (HY000): Referencing column 'parent_id' and referenced column 'id' in foreign key constraint 'child_parent_fk' are incompatible.

It’s impossible to do that with straight-DDL (never mind INSTANT), and it’s impossible to do that with Online DDL. InnoDB (not MySQL) flatly refuses to accept any change in the related columns’s data type. Well, it’s not really about changing them as it is about having an incompatibility. But then, we can’t change either. The column type changes are only made possible if we modify the child table to remove the foreign key constraint, then alter both parent and child to modify the respective columns types, then re-add the foreign key constraint. There are four different ALTER TABLE statements. Neither removing nor adding a foreign key constraint is supported in INSTANT algorithm, so you can expect a long time in which the foreign key relationship simply does not exist!

CREATE TABLE … LIKE

One of those quirks that come with InnoDB owning the foreign key definition, is that CREATE TABLE ... LIKE does not generate foreign keys. I think this is mostly an oversight. A SHOW CREATE TABLE statement does produce foreign key output, so I’m not sure why CREATE TABLE ... LIKE doesn’t. Continuing our above child_table example:

> create table child_table_copy like child_table;
Query OK, 0 rows affected (0.06 sec)

> show create table child_table_copy \G
*************************** 1. row ***************************
       Table: child_table_copy
Create Table: CREATE TABLE `child_table_copy` (
  `id` int NOT NULL,
  `parent_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `parent_id_idx` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci

Unique constraint names

I know this is ANSI SQL, and so I won’t fault MySQL for this. I do think this is one of those scenarios where deviating from ANSI SQL would be beneficial. A foreign key constraint has a name (if you don’t provide one, one is auto-generated for you). And, that name, according to ANSI SQL, has to be unique across your schema. It means the following table conflicts with our original child_table:

CREATE TABLE `another_child_table` (
  `id` int NOT NULL,
  `parent_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `parent_id_idx` (`parent_id`),
  CONSTRAINT `child_parent_fk` FOREIGN KEY (`parent_id`) REFERENCES `parent_table` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;

You can’t have two foreign key constraints both named child_parent_fk.

I never understood that limitation. See, it’s just fine the tables both have a key named parent_id_idx. No conflict about that. Why do foreign keys have to have unique names?

Maybe, in ANSI SQL, foreign keys can be independent constructs, living outside the table scope. Meh, even so this could be technically solved using some sort of namespace. But, in MySQL this isn’t the case in the first place. Foreign keys are part of the table definition.

This is again just painful for Online DDL, or for any automation that tries to duplicate tables on the fly.

Lack of declarative-only definitions

This is more of a “I wish this existed” rather than “this is wrong”. One of the greatest benefits of foreign keys is the graph. Given a schema with foreign keys, you can formally analyze the relationships between tables. You can draw the dependency graph. It’s really educating.

What I wish for is to have a declarative-only foreign key definition. One that does not actually enforce anything. Merely indicates an association. Something like so:

CREATE TABLE `child_table` (
  `id` int NOT NULL,
  `parent_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `parent_id_idx` (`parent_id`),
  DECLARATIVE FOREIGN KEY (`parent_id`) REFERENCES `parent_table` (`id`)
)

The declarative foreign key could still enforce the existence of the parent table and referenced column, definition-wise, but do nothing at all to enforce relationship of data.

Anyway, just a wish.

SET FOREIGN_KEY_CHECKS

I love that we have set foreign_key_checks. But it’s a bit inconsistent. Basically, set foreign_key_checks=0 lets you override foreign key constraints. You can do any of the following:

But, why oh why, will set foreign_key_checks=0 not let me:

Limited to server scope

This one becomes obvious as your data grows. If you use foreign keys and you rely on their behavior (e.g. your app relies on a DELETE to fail if there’s dependent rows in children tables), and your data set grows such that a single server does not have the write capacity, you’re in trouble.

You may attempt to do functional sharding. You will hopefully find two subsets of your schema’s tables, that are not connected in the foreign key graph. If so, you win the day. But if it’s all connected, then you have to break some relationships. You’d have to audit your app. It previously assume the database would take care of data integrity, and now, for some relationships, it wouldn’t.

Or you may want to have horizontal sharding. If you mean to keep foreign key constraints, that means you need to find a way to co-locate data across the entire dependency graph. Unless this was pre-designed, you will probably find this to be impossible without a major refactor.

Vitess is looking into FOREIGN KEY implementation. It will attempt to address some of the above limitations. See https://github.com/vitessio/vitess/issues/11975 and https://github.com/vitessio/vitess/issues/12967 for some preliminary write ups and tracking.

02 May, 2023 04:01 AM

12 April, 2023

Artyom Beilis

לחבר שני תחביבים

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

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

אמרנו לינוקס?

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

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

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

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

אבל לרובינו יש כבר מחשב די חזק ונייד: טלפון או טאבלט! לו רק יכולתי לחבר את המצלמה ישירות לאליהם...

אז הרמתי את דגל

בניתי פתרון ל־EAA עבור לינוקס ואנדרואיד ושמו OpenLiveStacker. והוא בנוי בצורה הבאה:

  • הקוד כתוב ב־C++‎ עם שימוש ב־OpenCV לצורך עיבוד תמונה
  • הממשק בנוי כ־web interface שמדבר ב־REST עם השרת - מה שמאפשר בניית ממשק בלינוקס ואנדרואיד באותה צורה וגם מקל על גישה מרחוק במקרה והתוכנה רצה על pi. כמובן שהשרת מבוסס CppCMS. מה שמאפשר חיבור קל ונוח בין הקוד שדורש ביצועים הגובהים לממשק משתמש.
  • הדרייברים נטענים דינאמית:
    • אחד עבור מצלמה גנרית עם פרוטוקול UVC על בסיס libusb/libuvc- שתומך במצלמות רשת או במצלמות כמו SVBony sv105 - אבל הוא מוגבל לצורכים אסטרונומיים
    • דרייבר של ASI ZWO - החברה המובילה בתחום, שעובד מול SDK שלהם. לצערי הדרייבר עצמו הוא קוד סגור, אבל יש להם גרסה לאנדרואיד.
    • דרייבר גנרי שיודע לקרוא קבצים מהספרייה איך שהם מגיעים - מה שמאפשר חיבור לכל מצלמה אחרת דרך כלים קיימים כמו indi/ekos.
  • לצורך תמיכה באנדרואיד יש אפליקציה קטנה שעוטפת את השרת ומנהלת גישה ל־USB (כי באנדרואיד הכל צריך להיות מסובך)
  • לצורך הקלה על התמצאות יש חיבור לתוכנה פופולרית מאוד בתחום אסטרונומיה: ASTAP שיש לה גם גרסה (קובץ ריצה) לאנדרואיד. הדבר המעניין בתוכנה הזו שהיא כתובה בפסקל! לא חשבתי שאתקל בדבר כזה בימינו.

מה למדתי?

  • בניית אפליקציות אנדרואיד זה די סיוט וזה לא בגלל השפה אלא בגלל שצריך ללמוד פחות או יותר הכל מ־0. מזל שרוב הקוד ניתן לכתוב ב־C++‎.
  • כמעט כל דבר באנדרואיד עובד "קצת שונה". למשל: אין לך ‎/tmp, להריץ exe חיצוני זה סיפור שעלה לי בלילה לבן, להביא קבצים עם אפליקציה זה גם לא משהו טריוויאלי. בקיצור. זה לינוקס, אבל לא בדיוק.
  • אני שונא לעבוד עם קוד סגור. אומנם ASI ZWO משחררים דרייברים לאנדרואיד, אבל הם גם הכניסו באג מעצבן שגורם ל־RTTI לא לעבוד! למעשה כל תכנת החיבור ל־SDK שלהם כתבתי ב־C+-‎ בגלל אי זמינות של RTTI. וזה לא היה משהו מסובך אם הייתי יכול לקמפל את הדרייבר מחדש הבעיה הייתה פשוט נעלמת.

שורה תחתונה

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

הטקסט המלא

12 April, 2023 09:45 PM

04 April, 2023

Meir Kriheli

היכרות עם Rusmux

Tmuxinator הוא כלי אשר שימש אותי זמן רב. rusmux הוא תחליף שכתבתי ב־Rust.

04 April, 2023 01:35 PM

18 February, 2023

Diego Iastrubni

שידרגתי את השרת הזה

לפני

root@cucomania:~# cat /etc/debian_version  
10.13

אחרי:

root@cucomania:~# cat /etc/debian_version  
11.6

השרת Next cloud אצלי גם שודרג מגרסה 23 אל 25 – וזה היה האתגר לשינוי. אני צריך את האפליקציה הזאת ב־next cloud והיא לא הייתה זמינה. גם לא קיבלתי עדכונים – כי גרסת php שלי הייתה נמוכה מדי..

השידרוג של דביאן היה פשוט. רק עדכנתי את /etc/apt/sources.list ואז עשיתי

apt dist-upgrade --auto-remove --purge

הבעייה היחידה שלי הייתה בהגדרות של nginx שבה הייתי צריך לשנות מיקום של php-fcm socket (היה טריויאלי).

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

הטקסט המלא

18 February, 2023 03:12 PM

29 January, 2023

Ira Abramov

הפידרציה הגיעה לבלוג

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

אז אם אתם מחפשים אותי כי לטוויטר אני נכנס פחות ופחות, אני @I

שרתי אקטיביטיפאב בעברית (מתוך אלפים שהוקמו) הם נכון להיום בעיקר על בסיס מסטודון אבל לא רק:

ועוקב אחרי כולם אתר פיד עברי.

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

29 January, 2023 04:52 PM

19 December, 2022

Omer Zak

Convert Apache2.4 configuration and rewrite rules into Nginx configuration

Those days I am moving my website from Apache2.4 to Nginx.

So I googled for “convert apache rewrite to nginx”. I found the folllowing articles:

In addition to the aforementioned articles, I found the following SaaS services for converting Apache2.4 configuration files into Nginx configuration files.

I recommend that you run your conversion in both winginx.com and getpagespeed.com, review and edit the resulting Nginx configuration file.

19 December, 2022 12:44 PM

13 December, 2022

Hetz Ben Hemo

סידורים אחרונים – וסוגרת את הבסטה הזו

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

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

ערוצי יוטיוב

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

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

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

הטקסט המלא

13 December, 2022 12:17 PM

11 December, 2022

Omer Zak

Cheatsheet for doing rsync for archiving

# -avHAX:
# -a = archive (equivalent to -rlptgoD)
#      -r = recurse into directories
#      -l = copy symlinks as symlinks
#      -p = preserve permissions
#      -t = preserve modification times
#      -g = preserve group
#      -o = preserve owner (requires sudo)
#      -D = --devices --specials
#           --devices = preserve device files (requires sudo)
#           --specials = preserve special files
# -v = verbose
# -H = preserve hard links
# -A = preserve ACLs
# -X = preserve xattrs
#
# Before actual work, you may want to use --dry-run.
sudo rsync -avHAX --progress --exclude-from=- $SRCDIR $DESTDIR <<EOF
- /temp/***
- /trash_script.sh
EOF

11 December, 2022 08:13 PM

Diego Iastrubni

שעונים חכמים חופשיים

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

אז יש בחור שהתחיל לעשות מכשיר חכם מאפס מאפס. קוראים לו פאול.

המיזם זמין בכתובת https://open-smartwatch.github.io . יש תרשימים סכימטים, קוד למערכת ההפעלה, קבצים למדפסות תלת מימד ועוד. יש גם חנות שבה אפשר לקנות את החומרה מוכנה – https://www.makerfabs.com/open-smartwatch.html . אני לא ממליץ – זאת הגרסה הראשונה שנראית מגעילה. הגרסה השקופה, בצבע שחור נראית לי הכי יפה, אבל גם הגרסה הלבנה (הדקיקה עם המסך ה”רגיל”) נראית משהו בהחלט שמיש.

רב התיעוד שמצאתי נמצא בווידאו הזה: https://www.youtube.com/watch?v=a6kkrQ26h_4 . נראה שפשוט צריך לבנות את הדבר הזה בעצמך נכון לעכשיו, זה מצריך גישה למדפסת תלת מימד בשביל המארז עצמו, להזמין כמה חלקים מדוד עלי, כלי הלחמה וסבלנות. חומרי הגלם עולים בערך 300₪. אם מישהו קונה ורוצה לבנות לי אחד – צרו קשר!

הטקסט המלא

11 December, 2022 08:02 PM

02 November, 2022

Kaplan Open Source Consulting

כנס GIS בקוד פתוח למגזר הציבורי

כנס GIS בקוד פתוח 2022 למגזר הציבורי, נובמבר 2022

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

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

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

מתי: רביעי, 9.11.22 9:00-13:00

מיקום: תל-אביב  או בזום (לבחירתכם)

הרשמה בקישור: https://forms.gle/b18bbnKm8xbUKdxJ6

ההשתתפות ללא תשלום, אך יש להירשם מראש.

עדכונים על כנסים וארועים נוספים הרשמה לניוזלטר 

02 November, 2022 03:08 AM

28 September, 2022

Hetz Ben Hemo

הטעות של רד-האט בנושא תמיכה במקודדי וידאו

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

דיון מעניין שחל אתמול קשור להפצת Fedora ולהחלטה לבטל כל האצה של קידוד או פריסת וידאו בהפצת הלינוקס ברמת תשתית כברירת מחדל. במילים אחרות: אם מאן דהוא יפעיל מצלמת Webcam ברזולוציית 1080P והוא ינסה להקליט את הוידאו (לדוגמא עם תוכנה כמו OBS Studio) – סביר להניח שהוא ימצא את התוצאות בלתי מספקות. אם הוא ינסה לנגן וידאו שמקודד ב-H.264 או HEVC או VC1, סביר להניח שבקטעי האקשן, הוא יקבל דילוגים ו"נפילות" (Dropped) בפריימים כך שהתוצאה לא תיראה טוב.

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

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

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

כפי שתוכלו לראות בכל מיני אתרים – ארגון ה-MPEG LA (שהוא בעצם "ארגון" שדואג למכירת רשיונות למקודדי וידאו ואודיו שונים, גביית תמלוגים, תביעת מפירים וכו') לא ממש "רודף" אחרי נגנים מבוססי קוד פתוח. הארגון מעולם לא תבע את KODI (תבעו את KODI על דברים אחרים, לא על Codecs), או את VLC או את FFMPEG או OBS Studio או כל תוכנת ניגון ו/או עריכת אודיו וידאו מהסיבה הפשוטה שזה לא שווה להם – הן מבחינת יח"צ, הן מבחינת גביה ממשית והן מבחינת רווח סופי כלשהו. (חריגה אחת היתה, למיטב זכרוני, כאשר Dolby Labs ביקשו ממפתחי החבילה ac3dec להפסיק להשתמש במינוח "AC3" מכיוון שמדובר בסימן רשום. מאז פג תוקף למושג, כך שדולבי ירדו מהעניין).

הארגון כן "רודף" אחרי יצרנים של מוצרים סופיים (בין אם הם משתמשים בפתרונות מבוססי קוד פתוח או סגור). אם לדוגמא חברה מייצרת טלפונים או טאבלטים, והיצרן רוצה לכלול קידוד או פריסה (Encode/Decode) של אודיו או וידאו עם מקודדים מסויימים, אז אותה חברה תסגור רשיון עם MPEG-LA שבו יפורטו סוגי הרשיונות (יש כמה, לא רק סוגי codecs), האם זה יכלול רק פריסה, רק קידוד או גם וגם, וכמובן סוגי Codecs. דוגמא פשוטה: חברת Lenovo מייצרת טאבלטים וטלפונים זולים, רוב המכשירים מהסוגים הנ"ל כוללים תמיכה של פריסה וקידוד במקודד H.264 אך רובם אינם כוללים תמיכה בפריסה וקידוד במקודד HEVC (זה סגור ברמת חומרה), כך שלנובו משלמת רק על H.264, לא על השאר.

אם נתרגם את זה למציאות: אם מחר אבנה נגן מבוסס Raspberry Pi שיריץ KODI ואמכור זאת כמוצר סופי, סביר להניח ש-MPEG LA יצרו קשר ויבקשו תמלוגים (ואם לא אשלם – אתבע).

בתחום מערכות ההפעלה השונות, המצב שונה. מיקרוסופט מבקשת בחלק מהמקרים מהמשתמש לרכוש לדוגמא רשיון HEVC במחיר של $1. הסיבה? מיקרוסופט נותנת מספר כלים לתצוגה ועריכת וידאו עם תמיכה ל-HEVC ורשיון Windows אינו כולל רשיון ל-encode (קידוד) בכלים שמיקרוסופט נותנת, ולפיכך דרישת התשלום (לא תופיע דרישת תשלום אם מדובר רק בניגון וידאו, לדוגמא).

בכל הקשור לניגון וידאו – יש כבר מי שמשלם את רשיון ה-Codec והוא – יצרן ה-GPU במחשב, ובדרך כלל אותו יצרן גם כותב את התמיכה להאצת ה-codec ברמת הדרייבר גם בלינוקס, כך שאין כאן צורך תשלום כפול כלשהו לניגון הוידאו, ורד-האט יכולה להתנהג בדיוק כמו מיקרוסופט (שגם היא לא משלמת על מקודדים לצרכי ניגון מדיה), אולם לצערי רד-האט לוקחת צעד אחד רחוק-מדי, ועוצרת את תמיכת הקידוד/פריסה עוד ברמת התשתית (Mesa), אפילו לא ברמת הנגן, דבר שאף אחד לא עושה ואינו נדרש מצד שום גוף רשמי כלשהו, למיטב ידיעתי.

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

הטקסט המלא

28 September, 2022 05:03 PM

14 June, 2022

Arie Skliarouk

O GTalk team, where were thou? (part IV: The END)

It is finally happened:


Google Talk is surprisingly still operational, but that ends on Thursday

Took 12 years to die:

O GTalk team, where were thou? (part III) (AKA: The other shoe dropped). (2017)

O GTalk team, where were thou? (part II) (2014)

O GTalk team, where were thou? (2010)

14 June, 2022 05:09 AM

01 June, 2022

backup and restore with duplicity

Duplicity backup utility is the old workhorse in all recent Ubuntu versions. I use the GUI called Deja-Dup for quite a while now. But until now I never bothered to check how to restore my files. I did decide to check how to restore file, because backup is only half the job! It turns out, that the GUI does a disservice for duplicity users. Restoring an encrypted backup turned out to not work. I didn't bother to research why, and turned to the CLI. This is a reminder on how to restore the files. continue reading...

01 June, 2022 01:49 PM

I am on Github sponsors now

This already happend a while ago. I am on Github Sponsors and you can support my opensource work. continue reading...

01 June, 2022 01:49 PM

Announce - CoreDNS Netbox Plugin v0.2, now with IPv6

I just released the 2nd version of my CoreDNS plugin for getting DNS records from Netbox. This release adds IPv6. continue reading...

01 June, 2022 01:49 PM

Announce - Wolkenbrot v0.3 - now with OpenStack support

I have just released WolkenBrot v0.3 with OpenStack support. WolkenBrot is my own little program to bake cloud images. The name means "Cloud Bread" in German. continue reading...

01 June, 2022 01:49 PM

Using IPython Notebook on Linux Machines in the Enterprise Corp.

A short guide for using IPython and Jupyter Notebook on remote Linux machine in the Enterprise Corp, where you don't have root rights. continue reading...

01 June, 2022 01:49 PM

blogit - new release

After a long development hiatus I am releasing a new version of blogit continue reading...

01 June, 2022 01:49 PM

Visualize almost anything with Grafana and Python

This is a short tutorial on how to build a data source for Grafana using Python Bottle micro-framework. Eventually, you can use this code to connect to any database (including SQLite). continue reading...

01 June, 2022 01:49 PM

Fooling around with JavaScript and OpenPGP

Fooling around with JavaScript and OpenPGP, as the title says. I needed to create a page in which I can encrypt files with OpenPGP. Doing this with JavaScript turned out to be possible. These are the results of my experiment. continue reading...

01 June, 2022 01:49 PM

Thoughts after leaving noris network after two years

After two years at noris network AG, yesterday was my last day with this company. It has been a long time since it felt so hard leaving a company. In my two years I worked with really great people on some of the most cutting edge technologies. All these things were not possible without the help of so many great people with whom I worked with. Some of them might read this post, so here is a big thanks. I wanted to summerize my two years and gather all the lessons I learned in one place for my future self and others too. It's quite hard summerize such an eclectic post. It's been a wild ride in noris network with lots of new technologies and ideas. We have had a lot of success. I would like to think that a great part was because we opted to work in an open source matter, even thougah not all our projects where open source. This blog post is a summary of the good things we did, and the positive leasons we learned. I hope reading through these will inspire you to choose a similar path. continue reading...

01 June, 2022 01:49 PM

15 January, 2022

Ira Abramov

התדמית של עולם התכנה החופשית על פרשת דרכים

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

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

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

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

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

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

15 January, 2022 04:44 PM

24 September, 2021

Lev Meirovitch

What is Ventoy, and why you should always have one!

TL;DR; Before I get to ranting, here is the quick answer: Ventoy is a Free Software multi-platform tool that lets you boot ISO files from a USB drive. Key features that make it different from other tools like Etcher or Unetbootin are: You don’t need to “flash” the ISO to the drive – just copy […]

24 September, 2021 11:20 AM

20 July, 2021

Shlomi Noach

Reducing my OSS involvement, and how it affects orchestrator & gh-ost

I’m going to bring down my work volume around OSS to a minimum, specifically when it comes to orchestrator and gh-ost. This is to explain the whats and hows so that users are as informed as possible. TL;DR a period of time I will not respond to issues, will not review pull requests, will not produce releases, will not answer on mailing lists. That period of time is undefined. Could be as short as a few weeks, could be months, more, an unknown.

The “What”

Both orchestrator and gh-ost are popular tools in the MySQL ecosystem. They enjoy widespread adoption and are known to be used at prominent companies. Time and again I learn of more users of these projects. I used to keep a show-off list, I lost track since.

With wide adoption comes community engagement. This comes in the form of questions (“How do I…”, “Why does this not work…”, “Is it possible to…”), issues (crashing or data integrity bugs, locking issues, performance issues, etc.), suggestions (support this or that) and finally pull requests.

At this time, there’s multiple engagements per day. Between these two projects I estimate more than a full time job addressing those user interactions. That’s a full time job volume on top of an already existing full time job.

Much of this work went on employer’s time, but I have other responsibilities at work, too, and there is no room for a full-time-plus work on these projects. Responding to all community requests is unsustainable and futile. Some issues are left unanswered. Some pull requests are left open.

Even more demanding than time is context. To address a user’s bug report I’d need to re-familiarize myself with 5-year old code. That takes the toll of time but also memory and context switch. As community interaction goes, a simple discussion on an Issue can span multiple days. During those days I’d jump in and out of context. With multiple daily engagements this would mean re-familiarizing myself with different areas of the code, being able to justify a certain behavior; or have good arguments to why we should or should not change it; being able to simulate a scenario in my brain (I don’t have access to users’ environments); comprehend potential scenarios and understand what could break as result of what change — I don’t have and can’t practically have the tests to cover the myriad of scenarios, deployments, software, network and overall infrastructure in all users environments.

Even if I set designated time for community work, this still takes a toll on my daily tasks. The need to have a mental projection in your brain for all that’s open and all that’s to come makes it harder to free my mind and work on a new problem, to really immerse myself in thought, to create something new.

When? For how long?

Effective immediately. I made some promises, and there’s a bunch of open issues and pull requests I intend to pursue, but going forward I’m going to disengage from further questions/requests/suggestions. I’m gonna turn off repo notifications and not get anything in my mailbox.

My intention is to step back, truly disengage, and see what happens. There’s a good chance (this happened before) that after some time I feel the itch to come back to working on these projects. Absolutely no commitments made here.

What does this mean for orchestrator?

After 7 years of maintaining this project, first at Outbrain, then Booking.com, then GitHub and now at PlanetScale, I’m gonna step back and refrain from new developments, from responding to issues, from answering questions, from reviewing pull requests.

I should mention that in the past year or so, I’ve merged more community contributions than my own. That’s staggering! There are very capable contributors to this project.

In essence, the core of orchestrator hasn’t changed in a while. The main logic remains the same. I suspect orchestratorwill remain effective for time to come. I am sure some users will be alarmed at this post, and wonder whether they should keep using orchestrator or search for other solutions. I am in no position to make a suggestion. Users should carefully evaluate what’s in their best interests, what they deem to be stable and reliable software, what they deem to be supported or repairable, etc.

What does this mean for gh-ost?

I co-designed and co-authored gh-ost at GitHub (announcement) as part of the database infrastructure team. We wrote gh-ost to solve a pressing issue of schema changes at GitHub, and were happy to open source it. This led to, frankly, an overwhelming response from the community, with very fast adoption. Within the first few months we received invaluable feedback, bug reports, suggestions, all of which had direct and positive impact to gh-ost.

I’m not working at GitHub anymore, and I’m not an official maintainer of the upstream repo anymore. I do not have the authority to merge PRs or close issues. It is as it should be, the project is owned by GitHub.

I use gh-ost as part of my current job at PlanetScale working on OSS Vitess. Vitess utilizes gh-ost for online DDL. I therefore am an interested party in gh-ost, most specifically to ensure it is correct and sound. For this reason, I selectively engage with users on GitHub’s repo, especially when it comes to issues I consider important for Vitess.

I do maintain a fork, where I either interact with users, or push my own changes. I collaborate with the GitHub team, contribute upstream changes I make on my fork, and pull changes downstream. The GitHub team is kind enough to accept my contributions and invest time in testing and evaluating what might be risky changes. The upstream and downstream code is mostly in sync.

Going forward I will continue to work on things critical to my current job, but otherwise I’ll be stepping away and reduce interactions. This means I will not accept pull requests or answer questions. The upstream gh-ost repo remains under GitHub’s ownership and maintained by GitHub’s engineers. It is not in my authority to say how the upstream project will engage with the community and I do not presume to make suggestions.

On community interaction

I must say that I’m thoroughly humbled and grateful for the interactions on these projects. I hear of other OSS projects suffering abuse, but my work has seen respectful, thoughtful, empowering and inspiring user interactions. The majority of users invest time and thought in articulating an issue, or engage in respectful discussion while suggesting changes. I’ve actually “met” people through these interactions. I can only hope I payed back in same coin.

On community assistance

Community also provides assistance in several forms. The simplest and truly most helpful is by answering questions. Some community members will respond on issues, or on mailing lists, in chat rooms. Some users will identify similar issues to their own, opened by other users, will discuss and help each other, and share information.

Some companies and users are consistent contributors, working on issues that are both specific to their particular needs, as well as ultimately useful for the greater community.

At a previous time where I was overwhelmed with OSS/community work, two prominent companies, let’s call them S and P, stepped forward to offer actual development time; assign their own engineers part-time for a limited period to help pushing forward. I’m forever grateful for their kindness! I didn’t take those offers back then, because I didn’t have a good plan (I still don’t) for coordinating that kind of work; it felt like it would take even more efforts to set it up.

Can we jump in as contributors?

I don’t have a good plan for making this work, or for ensuring that this works well. I prefer that users fork orchestrator, and to not bring in contributors to this repo. If a contributor does have a solid plan, you probably know where to find me.

20 July, 2021 12:14 PM

23 April, 2021

Ilan Shavit

רכישת מחשב חדש, כל מה שצריך לדעת: לוח אם (חלק 4)

מה תפקידו של לוח האם?
לוח האם מחבר בין כל חלקי המחשב, אליו מתחברים הרכיבים ודרכו הם "מדברים".
באיור 1 פירטתי את המחברים השונים שקיימים בלוח אם טיפוסי: ניתן לראות את שקע המעבד, את שקעי הזיכרון (RAM), שקע לכרטיס מסך, שקעי SATA (אליהם מחברים דיסק הקשיח / צורב).
אם אמשיל את המחשב למכונית אז לוח האם מהווה את השלדה של הרכב. כשם שלשלדת רכב מחברים את כל רכיבי המכונית כך ללוח האם מחברים את כל רכיבי המחשב. כשם שבמכונית ספורט עם מנוע פרארי לא תשימו שילדה של פיאט 850 כך גם בלוח האם: אם השקעתם במעבד יקר מן הסתם שתשקיעו גם בלוח אם איכותי (למרות שניתן להרכיב גם לוח אם פשוט).

בוחרים לוח אם מיד לאחר שקונים מעבד. אם קניתם מעבד של Intel תצטרכו לבחור בלוח אם שתומך במעבדי Intel (מהדגם הספציפי שקניתם), כנ"ל אם תקנו מעבד AMD.
אם ברשותכם מעבד ישן רוב הסיכויים שתתקשו למצוא לו לוח אם מתאים (כך שאם ברשותכם לוח מקולקל תתקשו למצוא לו תחליף: תוכלו לרכוש באתרים כגון Ebay, עם כל הסיכון הכרוך בכך, פחות בחנויות מחשבים רגילות)
בלוח האם מיושמת אלקטרוניקה "כבדה" שמאפשרת את עבודת המחשב. האלקטרוניקה הזאת מיושמת באמצעות ערכות שבבים הנקראים Chipset. יש Chipset זולים, שמתאימים למחשבים פשוטים, ויש יקרים יותר.
כל המעבדים החדשים של אינטל (דורות 8 ו- 9) מחייבים שימוש בציפסט מסדרה 300. ניתן לדרג את איכות הציפסט כך:
H310 < B360, B365 < H370 < Z370 < Z390
למה אני מייחס איכות?
  • מספר חריצי הרחבת זכרון (2 או 4)
  • יכולות המהרה
  • איכות כרטיס הקול
  • כמות יציאות USB
  • אפשרות לחבר SSD מסוג M2 ישירות ללוח האם
  • איכות הרכיבים (קבלים בעיקר) ואיכות הבניה כללית
כללי האצבע לבחירת לוח אם:
  • לוח מבוסס ציפסט H310 הוא הלוח הפשוט והזול ביותר. תבחר בו אם בחרת במעבד Intel Pentium
  • תבחר בלוח מבוסס ציפסט B360 או B365 אם בחרת במעבד Intel Core i3
  • תבחר בלוח מבוסס ציפסט H370 אם בחרת במעבד Intel Core i5
  • תבחר בלוח מבוסס ציפסט Z370 אם בחרת במעבד Intel Core i7
  • תבחר בלוח מבוסס ציפסט Z390 אם בחרת במעבד Intel Core i9
    ההיגיון בבחירה הוא זה: אם שילמת 1500 ש"ח על מעבד אז בבקשה אל תקנה לוח אם שעולה 200 ש"ח… זה יעבוד, אבל כדאי מאוד להשקיע יותר ולהתאים את איכות הלוח לאיכות המעבד…
ל- AMD יש כמובן סדרות אחרות של ציפסטים אבל הרעיון דומה…

23 April, 2021 05:43 PM

רכישת מחשב חדש, כל מה שצריך לדעת: זכרון (חלק 3)

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

כפי שניתן להבין, לזיכרון תפקיד קריטי בעבודת המחשב. תקלה ברכיב לא תאפשר עבודה שוטפת במחשב (הוא יקרוס, תראו מסכים כחולים והדבר היחידי שניתן יהיה לעשות זה לכבות אותו בכוח)
דרישת המינימום של חלונות 10 היא 2 גיגה בייט (2GB) זכרון.
מה זה גיגה בייט? גיגה זה מיליארד. אז 2 גיגה בייט זה 2 מיליארד תאי זכרון. בדרך כלל רוכשים 4 גיגה בייט זכרון (כשיש מגבלה תקציבית מאוד גדולה), 8, 16 או 32 גיגה בייט (למשתמשים הכבדים ביותר).
באיור 1 ניתן לראות כיצד נראה התקן זכרון של מחשב נייד. זכרון של מחשב נייח נראה דומה (רק הוא קצת יותר ארוך – איור 2).
קניית זכרון הוא תהליך פשוט יחסית. תפעלו לפי הכללים הבא:
1. "כמה שיותר הרי זה משובח…"
2. “קנו תמיד את הדגם האחרון"
היסטוריה: פעם השתמשו בהתקן זכרון שנקרא SDRAM. עם הזמן הוא שודרג ונקרא DDR. השנים חלפו, המהירויות גדלו וככה נוספו ספרות שונות לרכיב: DDR3, DDR2 ועכשיו מוכרים DDR4. אם תקראו את המאמר בעוד מספר שנים בטח יהיה DDR5 או DDR6. אתם תקנו תמיד את הדגם האחרון (DDR4 בזמן כתיבת המאמר).
בסעיף קודם כתבתי לקנות כמה שיותר זכרון אבל בכל זאת לא צריך להשתגע… מס' כללי אצבע לרכישת זכרון:
  • נפח 4GB: כשהתקציב מאוד לוחץ. מתאים לאדם שכל רצונו לגלוש מעת לעת במחשב (בלי הרבה לשוניות פתוחות), לערוך מסמכים ולשחק במשחקים פשוטים
  • נפח 8GB: נפח שמתאים לרוב האוכלוסיה ולרוב השימושים
  • נפח 16GB: מתאים לגיימרים, עורכי וידאו ופוטושופ
  • נפח 32GB: מתאים לגיימרים כבדים ועורכי וידאו מיקצועיים.
הערה:
הזיכרון עליו כתבתי הוא זכרון נדיף. זה אומר שהמידע שעליו נמחק ברגע שאתחלתם או כיביתם את המחשב (מידע קבוע נשמר רק בדיסק הקשיח)

23 April, 2021 05:43 PM

07 March, 2021

Lev Meirovitch

How “undefined” is undefined behavior?

I was browsing StackOverflow yesterday, and encountered an interesting question.Unfortunately, that question was closed almost immediately, with comments stating: “this is undefined behavior” as if there was no explanation to what was happening. But here is the twist: the author of the question knew already it was “undefined behavior”, but he was getting consistent results, […]

07 March, 2021 12:45 AM

20 February, 2021

Amir Aharoni

Amir Aharoni’s Quasi-Pro Tips for Translating the Software That Powers Wikipedia, 2020 Edition

This is a new version of a post that was originally published in 2015. Much of it is the same, but there are several updates that justified publishing a new version.

Introduction

As you probably already know, Wikipedia is a website. A website has two components: the content and the user interface. The content of Wikipedia is the articles, as well as various discussion and help pages. The user interface is the menus around the articles and the various screens that let editors edit the articles and communicate to each other.

Another thing that you probably already know is that Wikipedia is massively multilingual, so both the content and the user interface must be translated.

Translation of articles is a topic for another post. This post is about getting all the user interface translated to your language, and doing it as quickly, easily, and efficiently as possible.

The most important piece of software that powers Wikipedia and its sister projects is called MediaWiki. As of today, there are more than 3,800 messages to translate in MediaWiki, and the number grows frequently. “Messages” in the MediaWiki jargon are strings that are shown in the user interface. Every message can and should be translated.

In addition to core MediaWiki, Wikipedia also uses many MediaWiki extensions. Some of them are very important because they are frequently seen by a lot of readers and editors. For example, these are extensions for displaying citations and mathematical formulas, uploading files, receiving notifications, mobile browsing, different editing environments, etc. There are more than 5,000 messages to translate in the main extensions, and over 18,000 messages to translate if you want to have all the extensions translated, including the most technical ones. There are also the Wikipedia mobile apps and additional tools for making automated edits (bots) and monitoring vandalism, with several hundreds of messages each.

Translating all of it probably sounds like an impossibly enormous job. It indeed takes time and effort, but the good news are that there are languages into which all of this was translated completely, and it can also be completely translated into yours. You can do it. In this post I’ll show you how.

A personal story

In early 2011 I completed the translation of all the messages that are needed for Wikipedia and projects related to it into Hebrew. All. The total, complete, no-excuses, premium Wikipedia experience, in Hebrew. Every single part of the MediaWiki software, extensions and additional tools was translated to Hebrew. Since then, if you can read Hebrew, you don’t need to know a single English word to use it.

I didn’t do it alone, of course. There were plenty of other people who did this before I joined the effort, and plenty of others who helped along the way: Rotem Dan, Ofra Hod, Yaron Shahrabani, Rotem Liss, Or Shapiro, Shani Evenshtein, Dagesh Hazak, Guycn2 and Inkbug (I don’t know the real names of the last three), and many others. But back then in 2011 it was I who made a conscious effort to get to 100%. It took me quite a few weeks, but I made it.

However, the software that powers Wikipedia changes every single day. So the day after the translations statistics got to 100%, they went down to 99%, because new messages to translate were added. But there were just a few of them, and it took me only a few minutes to translate them and get back to 100%.

I’ve been doing this almost every day since then, keeping Hebrew at 100%. Sometimes it slips because I am traveling or because I am ill. It slipped for quite a few months in 2014 because my first child was born and a lot of new messages happened to be added at about the same time, but Hebrew got back to 100%. It happened again in 2018 for the same happy reason, and went back to 100% after a few months. And I keep doing this.

With the sincere hope that this will be useful for helping you translate the software that powers Wikipedia completely to your language, let me tell you how.

Preparation

First, let’s do some work to set you up.

If you haven’t already, create a translatewiki.net account at the translatewiki.net main page. First, select the languages you know by clicking the “Choose another language” button (if the language into which you want to translate doesn’t appear in the list, choose some other language you know, or contact me). After selecting your language, enter your account details. This account is separate from your Wikipedia account, so if you already have a Wikipedia account, you need to create a new one. It may be a good idea to give it the same username.

After creating the account you have to make several test translations to get full translator permissions. This may take a few hours. Everybody except vandals and spammers gets full translator permissions, so if for some reason you aren’t getting them or if it appears to take too much time, please contact me.

Make sure you know your ISO 639 language code. You can easily find it on Wikipedia.

Go to your preferences, to the Editing tab, and add languages that you know to Assistant languages. For example, if you speak one of the native languages of South America like Aymara (ay) or Quechua (qu), then you probably also know Spanish (es) or Portuguese (pt), and if you speak one of the languages of Indonesia like Javanese (jv) or Balinese (ban), then you probably also know Indonesian (id). When available, translations to these languages will be shown in addition to English.

Familiarize yourself with the Support page and with the general localization guidelines for MediaWiki.

Add yourself to the portal for your language. The page name is Portal:Xyz, where Xyz is your language code.

Priorities, part 1

The translatewiki.net website hosts many projects to translate beyond stuff related to Wikipedia. It hosts such respectable Free Software projects as OpenStreetMap, Etherpad, MathJax, Blockly, and others. Also, not all the MediaWiki extensions are used on Wikimedia projects. There are plenty of extensions, with thousands of translatable messages, that are not used by Wikimedia, but only on other sites, but they use translatewiki.net as the platform for translation of their user interface.

It would be nice to translate all of it, but because I don’t have time for that, I have to prioritize.

On my translatewiki.net user page I have a list of direct links to the translation interface of the projects that are the most important:

I usually don’t work on translating other projects unless all the above projects are 100% translated to Hebrew. I occasionally make an exception for OpenStreetMap or Etherpad, but only if there’s little to translate there and the untranslated MediaWiki-related projects are not very important.

Priorities, part 2

So how can you know what is important among more than 18,000 messages from the Wikimedia universe?

Start from MediaWiki most important messages. If your language is not at 100% in this list, it absolutely must be. This list is automatically created periodically by counting which 600 or so messages are actually shown most frequently to Wikipedia users. This list includes messages from MediaWiki core and a bunch of extensions, so when you’re done with it, you’ll see that the statistics for several groups improved by themselves.

Now, if the translation of MediaWiki core to your language is not yet at 18%, get it there. Why 18%? Because that’s the threshold for exporting your language to the source code. This is essential for making it possible to use your language in your Wikipedia (or Incubator). It will be quite easy to find short and simple messages to translate (of course, you still have to do it carefully and correctly).

Some technical notes

Have you read the general localization guide for Mediawiki? Read it again, and make sure you understand it. If you don’t, ask for help! The most important section, especially for new translators, is “Translation notes”.

A super-brief list of things that you should know:

Learn to use the project selector at the top of the translation interface. Projects are also known as “Message groups”. For example, each extension is a message group, and some larger extension, such as Visual Editor, are further divided into several smaller message groups. Using the selector is very simple: Just click “All” next to “Message group”, and use the search box to find the component that you want to translate, such as “Visual Editor” or “Wikibase”. Clicking on a message group will load the untranslated messages for that group.

The “Extensions used by Wikimedia” group is divided into several more subgroups. The important one is “Extensions used by Wikimedia – Main”, which includes the most commonly used extensions. Other subgroups are:

There is also a group called “EXIF Tags”. It’s an advanced part of core MediaWiki. It mostly includes advanced photography terminology, and it shows information about photographs on Wikimedia Commons. If you are not sure how to translate these messages, ask a professional photographer. In any case, it’s OK to do it later, after you completed more important components.

Getting things done, one by one

Once you have the most important MediaWiki messages 100% and at least 18% of MediaWiki core is translated to your language, where do you go next?

I have surprising advice.

You need to get everything to 100% eventually. There are several ways to get there. Your mileage may vary, but I’m going to suggest the way that worked for me: Complete the easiest piece that will get your language closer to 100%! For me this is an easy way to remove an item off my list and feel that I accomplished something.

But still, there are so many items at which you could start looking! So here’s my selection of components that are more user-visible and less technical. The list is ordered not by importance, but by the number of messages to translate (as of October 2020):

I put MediaWiki core last intentionally. It’s a very large message group, with over 3000 messages. It’s hard to get it completed quickly, and actually, some of its features are not seen very frequently by users who aren’t site administrators or very advanced editors. By all means, do complete it, try to do it as early as possible, and get your friends to help you, but it’s also OK if it takes some time.

Getting all the things done

OK, so if you translate all the items above, you’ll make Wikipedia in your language mostly usable for most readers and editors. But let’s go further.

Let’s go further not just for the sake of seeing pure 100% in the statistics everywhere. There’s more.

As I wrote above, the software changes every single day. So do the translatable messages. You need to get your language to 100% not just once; you need to keep doing it continuously.

Once you make the effort of getting to 100%, it will be much easier to keep it there. This means translating some things that are used rarely (but used nevertheless; otherwise they’d be removed). This means investing a few more days or weeks into translating-translating-translating.

You’ll be able to congratulate yourself not only upon the big accomplishment of getting everything to 100%, but also upon the accomplishments along the way.

One strategy to accomplish this is translating extension by extension. This means, going to your translatewiki.net language statistics: here’s an example with Albanian, but choose your own language. Click “expand” on MediaWiki, then again “expand” on “MediaWiki Extensions” (this may take a few seconds—there are lots of them!), then on “Extensions used by Wikimedia” and finally, on “Extensions used by Wikimedia – Main”. Similarly to what I described above, find the smaller extensions first and translate them. Once you’re done with all the Main extensions, do all the extensions used by Wikimedia. This strategy can work well if you have several people translating to your language, because it’s easy to divide work by topic. (Going to all extensions, beyond Extensions used by Wikimedia, helps users of these extensions, but doesn’t help Wikipedia very much.)

Another fun strategy is quiet and friendly competition with other languages. Open the statistics for Extensions Used by Wikimedia – Main and sort the table by the “Completion” column. Find your language. Now translate as many messages as needed to pass the language above you in the list. Then translate as many messages as needed to pass the next language above you in the list. Repeat until you get to 100%.

For example, here’s an excerpt from the statistics for today:

Let’s say that you are translating to Georgian. You only need to translate 37 messages to pass Marathi and go up a notch (2555 – 2519 + 1 = 37). Then 56 messages more to pass Hindi and go up one more notch (2518 – 2463 + 1 = 56). And so on.

Once you’re done, you will have translated over 5600 messages, but it’s much easier to do it in small steps.

Once you get to 100% in the main extensions, do the same with all the Extensions Used by Wikimedia. It’s way over 10,000 messages, but the same strategies work.

Good stuff to do along the way

Invite your friends! You don’t have to do it alone. Friends will help you work more quickly and find translations to difficult words.

Never assume that the English message is perfect. Never. Do what you can to improve the English messages. Developers are people just like you are. There are developers who know their code very well, but who are not the best writers. And though some messages are written by professional user experience designers, many are written by the developers themselves. Developers are developers; they are not necessarily very good writers or designers, and the messages that they write in English may not be perfect. Also, keep in mind that many, many MediaWiki developers are not native English speakers; a lot of them are from Russia, Netherlands, India, Spain, Germany, Norway, China, France and many other countries. English is foreign to them, and they may make mistakes.

So if anything is hard to translate, of if there are any other problems with the English messages to the translatewiki Support page. While you are there, use the opportunity to help other translators who are asking questions there, if you can.

Another good thing is to do your best to try using the software that you are translating. If there are thousands of messages that are not translated to your language, then chances are that it’s already deployed in Wikipedia and you can try it. Actually trying to use it will help you translate it better.

Whenever relevant, fix the documentation displayed near the translation area. Strange as it may sound, it is possible that you understand the message better than the developer who wrote it!

Before translating a component, review the messages that were already translated. To do this, click the “All” tab at the top of the translation area. It’s useful for learning the current terminology, and you can also improve them and make them more consistent.

After you gain some experience, create or improve a localization guide in your language. There are very few of them at the moment, and there should be more. Here’s the localization guide for French, for example. Create your own with the title “Localisation guidelines/xyz” where “xyz” is your language code.

As in Wikipedia itself, Be Bold.

OK, so I got to 100%, what now?

Well done and congratulations.

Now check the statistics for your language every day. I can’t emphasize enough how important it is to do this every day. If not every day, then as frequently as you can.

The way I do this is having a list of links on my translatewiki.net user page. I click them every day, and if there’s anything new to translate, I immediately translate it. Usually there are just a few new messages to translate; I didn’t measure precisely, but usually it’s fewer than 20. Quite often you won’t have to translate from scratch, but to update the translation of a message that changed in English, which is usually even faster.

But what if you suddenly see 200 new messages to translate or more? It happens occasionally. Maybe several times a year, when a major new feature is added or an existing feature is changed. Basically, handle it the same way you got to 100% before: step by step, part by part, day by day, week by week, notch by notch, and get back to 100%.

But you can also try to anticipate it. Follow the discussions about new features, check out new extensions that appear before they are added to the Extensions Used by Wikimedia group, consider translating them when you have a few spare minutes. At the worst case, they will never be used by Wikimedia, but they may be used by somebody else who speaks your language, and your translations will definitely feed the translation memory database that helps you and other people translate more efficiently and easily.

Consider also translating other useful projects: OpenStreetMap, Etherpad, Blockly, Encyclopedia of Life, etc. Up to you. The same techniques apply everywhere.

What do I get for doing all this work?

The knowledge that thanks to you, people who read in your language can use Wikipedia without having to learn English. Awesome, isn’t it? Some people call it “Good karma”. Also, the knowledge that you are responsible for creating and spreading the terminology in your language for one of the most important and popular websites in the world.

Oh, and you also get enormous experience with software localization, which is a rather useful and demanded job skill these days.

Is there any other way in which I can help?

Yes!

If you find this post useful, please translate it to other languages and publish it in your blog. No copyright restrictions, public domain (but it would be nice if you credit me and send me a link to your translation). Make any adaptations you need for your language. It took me years of experience to learn all of this, and it took me about four hours to write it. Translating it will take you much less than four hours, and it will help people be more efficient translators.

Thanks!

20 February, 2021 05:19 PM

02 October, 2020

Gilad Ben-Yossef

תלות גומלין

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

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

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

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

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

"Sic Semper Tyrannis"

02 October, 2020 08:11 AM

10 June, 2020

hatul

המדריך של חתול להתקנת ארץ׳ לינוקס

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

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

בהתקנה התבססתי על שני מדריכים עיקריים:

בתור התחלה, הורדתי את תקליטור ההתקנה של ארץ׳, „צרבתי” אותו על החסן נייד והעליתי את המחשב ממנו.

התחברות לרשת האלחוטית

wifi-menu

או שמתחברים עם כבל לרשת קווית

בדיקה שמחובר:

ping -c3 google.com

עדכון שעון מערכת

timedatectl set-ntp true

חלוקת מחיצות עם fdisk

אצלי כבר היה מותקן אובונטו מהיצרן ולכן השארתי את שתי המחיצות הראשונות של uefi ומחיצת שחזור ומחקתי את המחיצה של אובונטו

fdisk /dev/nvme0n1

יצרתי מחיצה ל־swap של 24G, מחיצת שורש של 30G ומחיצת בית של 175G שנשארו (לפי הסדר הזה)

mkswap /dev/nvme0n1p3
swapon /dev/nvme0n1p3
mkfs.ext4 /dev/nvme0n1p4
mkfs.ext4 /dev/nvme0n1p5

הגדרת מקורות

pacman -Sy reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector -c "IL" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist

עיגון

mount /dev/nvme0n1p4 /mnt
mount /dev/nvme0n1p5 /mnt/home

התקנה

pacstrap /mnt base linux linux-firmware nano intel-ucode

הגדרת fstab

genfstab -U /mnt >> /mnt/etc/fstab

ביצוע chroot

arch-chroot /mnt

הגדרת אזור זמן

ln -sf /usr/share/zoneinfo/Asia/Jerusalem /etc/localtime
hwclock --systohc

הגדרת locale

nano /etc/locale.gen
en_US.UTF-8 UTF-8
he_IL.UTF-8 UTF-8
locale-gen

הגדרת רשת

echo myname > /etc/hostname
nano /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 myname.localdomain myname

הגדרת סיסמה

passwd

התקנת grub

pacman -S grub efibootmgr
mkdir /boot/efi
mount /dev/nvme0n1p1 /boot/efi
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg

יצירת משתמש

useradd -s /bin/bash -g users -G sys,adm,wheel -m user
passwd user

התקנת ממשק גרפי

pacman -S xorg-server xf86-video-intel
pacman -S eog evince file-roller gdm gedit gnome-calculator gnome-color-manager gnome-control-center gnome-disk-utility gnome-font-viewer gnome-keyring gnome-logs gnome-menus gnome-screenshot gnome-session gnome-settings-daemon gnome-shell gnome-shell-extensions gnome-system-monitor gnome-terminal gvfs gvfs-gphoto2 gvfs-mtp mutter nautilus networkmanager simple-scan totem xdg-user-dirs-gtk

לא כל גנום חובה, חלק אני רציתי

להפעיל את השירותים

systemctl enable gdm NetworkManager

הרשאות ניהול

pacman -S sudo
nano /etc/sudoers
%wheel ALL=(ALL) ALL

התקנת yay

pacman -S base-devel wget
wget https://aur.archlinux.org/cgit/aur.git/snapshot/yay-bin.tar.gz
tar -xzf yay-bin.tar.gz
cd yay-bin
makepkg -si

התקנת גופנים לעברית

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

pacman -U ttf-ms-win10-10.0.18362.116-2-any.pkg.tar.xz
yay -S culmus culmus-fancy-ttf ttf-alef

התקנת דפדפנים

pacman -S firefox-i18n-he chromium

התקנת ליברה אופיס

pacman -S libreoffice-fresh-he

עוד כמה תוכנות חשובות בעיני (חלק צריך להגדיר)

libhdate-glib vlc mlocate reflector zsh zsh zsh-completions zoom parcellite

וזהו

reboot

אם התקנתם הכול נכון אז המערכת תעלה ותוכלו להינות ממנה. בהצלחה!

10 June, 2020 10:03 AM

26 May, 2020

Kaplan Open Source Consulting

סדנאות QGIS ביוני 2020

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

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

  1. מה זה QGIS ופלאגאין עבור מידע ישראלי פתוח (17 ביוני, דרך Zoom)
  2. סדנת מבוא ל-QGIS (14 ביוני, דרך Zoom)
  3. סדנת QGIS למתכנני ערים (15 ביוני, דרך Zoom)

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

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

26 May, 2020 10:15 AM

12 April, 2020

Gilad Ben-Yossef

זכרונות מגלגול קודם בגלקסיה רחוקה

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

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

מעבר לכך בסוף ההרצאה יש קטע בונוס מיוחד – גילוי של גלגולו הנוכחי של יודה, כאן ועכשיו!

תהנו!

12 April, 2020 03:08 PM

15 March, 2020

Rabin Yasharzadeh

Hot To Generate a Custom Color Palette For Cacti Aggregated Graphs

I had a use case where I wanted to colorizes an aggregated graph with a nice gradient color, so I looked to see how to add a new color template to Cacti, but the process is not usable when one need to add a lot of colors, in my case I was looking to add 110 different colors, and using the webUI was not a options. So I looked on the database schema and found that the color template is managed by 3 tables. One manage the template names plugin_aggregate_color_templates, and the other plugin_aggregate_color_template_items is a pivot table which manage the colors per template by referencing the colors table and the plugin_aggregate_color_template table.

cacti-color-template-tables

Cacti Database Tables Related To Colors

Create a color Palette

First thing first we need to add our new colors to the colors table, so I looked a bit and found this nice website which allow you to set few colors and define the number of steps between the colors, and I used another site to find a nice palette for “fire” colors. The cool thing for was that the site will auto generate an PHP array snippet which you can copy and use.

strangeplanet.fr

The Code

Now we can write a small script which will take the array and generate a new color templates for us

15 March, 2020 11:17 PM

06 December, 2019

Itzik Kotler

Don't Let Your Fear Of Nation-State Hackers Blind You

Mr. Magoo is an old cartoon character famous for his inflated sense of status and an extreme case of myopia, made worse by his refusal to wear corrective glasses. As a result of his poor vision and ego, Magoo would find himself in precarious — and hilarious — situations because he was unable to see the danger right in front of him. Typically, the oblivious Magoo would leave a trail of destruction behind him..

Enterprises today approach security a lot like Mr. Magoo, operating with the idea that they are more important than they really are and therefore are unable to see the real risks that beset them. The result? A lot of unnecessary damage.

Read the full article at Forbes here

Full text

06 December, 2019 09:24 PM

19 November, 2019

Rabin Yasharzadeh

Using Ansible To Manage Trust-Point Certificates In Cisco ASA

For some time now, I was looking for a way to Integrate Let’s Encrypt (LE) with My Cisco ASA, and use LE to issue the certificates for the VPN. And now Ansible is in a good place with its Network Modules to allow this without much of a problem.

I won’t go over the procedure of how I issue/renew the certificates, I will just mention that I use the DNS alias option, as I find it the most useful option, as it doesn’t require me to punch holes in my firewall to allow incoming connection to validate the requests.

My Playbook looks like this,

---
# see:
# - https://docs.ansible.com/ansible/latest/modules/asa_config_module.html
# - https://docs.ansible.com/ansible/latest/modules/asa_command_module.html

- name: Config CiscoASA
  hosts: CiscoASA
  connection: network_cli
  gather_facts: false
  become: true
  become_method: enable
  vars:
    ansible_user: ansible
    ansible_password: "in line or use vault!"
    cert_file: "vpn.pfx"
    cert_pass: "in line or use vault!"
    config_file: "asa.conf"

  tasks:

    - name: Get Certificate
      set_fact:
        cert: >
          {{ (lookup('file', cert_file) | b64encode | regex_replace('(.{1,64})', '\1|')).split('|') | list + [ 'quit' ] }}
      tags: [ cert ]

    - name: Create A TrustPoint
      asa_config:
        lines:
          - crypto ca trustpoint SSL-Trustpoint-Ansible
        after:
          - enrollment terminal

    - name: Import A New Certificate Into The TrustPoint
      asa_config:
        replace: block
        parents: "crypto ca import SSL-Trustpoint-Ansible pkcs12 {{ cert_pass }} nointeractive"
        lines: "{{ cert }}"
      notify:
        - Set SSL Trust-Point

  handlers:

    - name: Set SSL Trust-Point
      asa_config:
        save: true
        lines:
          - ssl trust-point SSL-Trustpoint-Ansible inside
          - ssl trust-point SSL-Trustpoint-Ansible outside

Extra

Generate PFX from Cert and Key

#!/bin/bash

CA=ca.cer
#fullchain.cer
CER=vpn.cer
KEY=vpn.key
OUT=vpn.pfx

openssl pkcs12 -export \
-inkey ${KEY} \
-in ${CER} \
-certfile ${CA} \
-out ${OUT}

19 November, 2019 09:52 AM

24 October, 2019

Arie Skliarouk

MYSQL/BTRFS/NVME failure

It is a very bad idea to run database (especially production one with lots of I/O) on BTRFS because the filesystem at any random time might become readonly:

Oct 24 12:30:22 db02 kernel: BTRFS: error (device nvme0n1) in btrfs_run_delayed_refs:2936: errno=-28 No space left
Oct 24 12:30:22 db02 kernel: BTRFS info (device nvme0n1): forced readonly
And then you find that you need to do rebalance. You try and find out that rebalance can not be done because - you guessed it - there is no space left. They suggest to delete couple of snapshots though. You delete them, start rebalance and now the whole filesystem is stuck completely.

If you need HA mysql db with snapshots, then you should go with mysq/LVM/DRBD path, see this link for insight: https://rarforge.com/w/index.php/2_Node_Cluster:_Dual_Primary_DRBD_%2B_CLVM_%2B_KVM_%2B_Live_Migrations

24 October, 2019 03:02 PM

23 September, 2019

Itzik Kotler

Demystifying Criminal Hackers

As I write these pieces for Forbes Tech Council, I’ve tried to chip away at the Hollywood reputation that hackers have been given over the years. That reputation often keeps people from making good decisions about how to protect their networks and data, keeps people focused on the wrong security priorities, and causes people to give up before the game is over.

It’s important to keep in mind, however, that while criminal hackers may be smart and devious, they are also, in a sense, entrepreneurs who are in the game to make a quick buck. As such, they realize that hacking costs money and so they will do what they can to keep their operating costs low. Why, then, would you expect a criminal hacker to expend time and money developing specialized tools when there are easier ways to get to what they want?

Read the full article at Forbes here

Full text

23 September, 2019 11:38 PM

31 July, 2018

Lior Kaplan

Debconf18 – יום ראשון

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

לצערי הכנסים של דביאן נפתחים מאוד בעצלתיים מבחינת תוכן – יש הרצאת/טקס פתיחת ואחרי אין ישר רצף גדול של הרצאות אלא טפטוף קטן של נושאים והרצאות. קצת מאכזב מבחינתי. ומצד שני, אפשר לי להתחיל לעבוד על החבילות של עברית בדביאן בלי לדאוג לפספס תוכן כלשהו. אבל לפני שאפשר לעבוד על החבילות, צריך לייצר סביבה מתאימה. לקח לי זמן להוריד חלודה לגבי מה צריך, ואיך לייצר משהו שיודע לבנות בתוך chroot (גם כדי שהבניה תהיה נקייה, וגם כי אני משתמש ב-testing בעוד שהבניה נעשית ב-unstable). בעזרת כמה תזכורות מ-Bálint הכל הסתדר, ויש סביבה עובדת עם sbuild.

השלב השני היה להתחיל להמיר את ההיסטוריה של הצוות מ-SVN ל-GIT ואז לדחוף את זה לשרת ה-GitLab החדש של דביאן. עשיתי את זה בנפרד עבור כל חבילה, כאשר הראשונה בתור היא Hspell כי צפריר הספיק להכין את הרוב מראש. ואחר כך עבדתי על המרת Culmus כי לא הייתי רוצה שהגרסה הבאה תצא בלי פונטים בעברית (על הדרך כבר הועלתה גרסה 0.132). כל המאגרים זמינים תחת Debian Hebrew Packagers בכתובת https://salsa.debian.org/hebrew-team . למי שצריך לעשות משהו דומה, הכלי להמרה היא git svn clone ואפשר להשתמש בהוראות שיש באתר git-scm.com בכתובת https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git . על בסיס הפקודות שלהם עוד עשיתי כמה שינויים קלים, אבל החלקים החשובים נמצאים שם.

בין לבין שמעתי את הדיווח השנתי של Chris Lamb במסגרת תפקידו כ-Debian Project Leader. בין השאר גיליתי שם כי דביאן תחגוג השנה יום הולדת 25 באמצע אוגוסט, וישר החלטתי לפתוח event כדי לחגוג עם עוד אנשים. נתראה שם בקרוב (: בנוסף, גיליתי כי המעבר של דביאן ל-GitLab נובע בין השאר גם מהשינוי שלהם בנושא ה-Content License Agreement ושינוי ל-Developer Certificate of Origin מה שמאפשר ליותר אנשים לתרום קוד בלי לוותר על הזכויות שלהם או לקרוא מסמך משפטי כבד. שאפו ל-GitLab, ואיזה כיף לעבור לעבוד במערכת מתקדמת.

31 July, 2018 02:40 PM

29 July, 2018

Lior Kaplan

Debconf18 – קדם כנס

הכנס השנתי של דביאן, Debconf, מתקיים השנה בפעם הראשונה באסיה (Hsinchu, Taiwan). הישג מכובד לאחר שנים של אירופה / ארה"ב ולפעמים דרום אמריקה. וגיוון מבורך בהמשך לכנס בדרום אפריקה לפני שנתיים. כלומר הפעם טסים לכנס מזרחה ולכן גם כולם סובלים מג'ט לג חמור יותר. לצערי זה גם גרם לי לתרום הרבה פחות בדוכן הרשמה (front desk) למרות שזה אחת ההתנדבויות הקבועות שלי.

היום הפתוח התנהל בחלקו בסינית, כך שאפילו לא ניסיתי ללכת להרצאות (גם לבודדות שהיו באנגלית), ובמקום זה התמקדתי בקצת שיחות עם אנשים (למרות העייפות). הספקתי לדבר עם Bálint Réczey שעובד עבור Canonical בצוות Ubuntu Foundation שאחראי על הסנכרון עם דביאן והתרומה של שינויים לקהילה. גם ניצלתי את ההזדמנות כדי לשמוע באיזה כלים הם משתמשים בפעילות, כדי לתזכר את עצמי. אחרי כמעט שנה שלא נגעתי בחבילות, אני בהחלט חלוד (וגם צריך לסדר את סביבת העבודה על המחשב). אגב, קנוניקל מחפשים אנשים עובדים, אם מישהו מתעניין, צרו קשר בפרטי (יש אפשרות לעבוד מרחוק, ואוכל לעזור בסידורים הנדרשים).

בהמשך הערב ישבתי על באג שדיווח לקוח על פיצ'ר של PHP שלא עובד לו מול OpenSSL. תפסתי את Kurt Roeckx שאחראי על החבילה בדביאן וגם עושה עבודת upstream בכמה שנים האחרונות כדי לבדוק את הנושא. אחרי קצת שאלות מולו ובדיקות שלי הסתבר שהבעיה היא לא ב-OpenSSL אלא ב-PHP, ואחרי מספיק חיטוטים בקוד נפתח באג #76676.

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

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

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

מי שרוצה לעקוב אחרי הכנס מרחוק, אז הלוח זמנים נמצא בכתובת https://debconf18.debconf.org/schedule, רק לא לשכוח שהכנס מתקיים באזור זמן +8, כלומר 5 שעות לפני ישראל (ריאלית, אפשר לצפות בהרצאות של אחרי ארוחת הצהריים כאן, שזה 9 בבוקר בישראל).

29 July, 2018 04:17 PM

05 March, 2018

Lior Kaplan

Running for OSI board

After serving in the board of a few technological Israeli associations, I decided to run as an individual candidate in the OSI board elections which starts today. Hoping to add representation outside of North America and Europe. While my main interest is the licensing work, another goal I wish to achieve is to make OSI more relevant for Open Source people on a daily basis, making it more central for communities.

This year there are 12 candidates from 2 individual seats and 5 candidate for 2 affiliate seats (full list at OSI elections wiki page). Wish me luck (:

Full text

05 March, 2018 09:37 AM

28 November, 2017

Lior Kaplan

AGPL enforced: The Israeli ICT authority releases code

Data.gov.il was created in 2011 after the Israeli social justice protests as part of the the public participation initiative and started to offer data held by the government. Back then the website was based on Drupal. In 2016 it was changed to CKAN, a designated system for releasing data. This system is licensed under the AGPLv3 requiring source code availability for anyone who can access the the system over a network, de facto for every user.

Since the change to CKAN, open source people asked the state to release the code according to the license but didn’t get a clear answer. All this time when it’s clear it’s violation.  This led Gai Zomer to file a formal complaint in March 2017 with the Israeli State Comptroller. Absurdly, that same month the ICT authority mentioned a policy to release source code it owns, while failing to release code it has taken from others and adapted.

With the end of the summer break and Jew holidays, and after I wasn’t able to get the source, I decided to switch to legal channels, and with the help of Jonathan Klinger and my company, Kaplan Open Source Consulting, we notified they should provide the source code or we’ll address the court.

Well, it worked. In 3 days time the CKAN extensions where available on the website, but in a problematic way, so users weren’t able to download easily. This is why we decided not to publish this code release and let them fix it first. In addition we made it clear all the source code should be available, not only the extensions. Further more, if they already release it’s recommended to use git format instead of just “dumping” a tarball. So we told them if they aren’t going to make a git repository we’ll do that ourselves, but in any case, would prefer them to do that .

While this issue is still pending, the ICT authority had a conference called “the citizen 360” about e-gov and open government in which they reaffirmed their open source plans.

A slide about open source from the Israeli ICT authority presentation

A slide about open source from the Israeli ICT authority presentation

Now, a month later, after our second letter to them, the about page in data.gov.il was updated with links to the ICT authority GitHub account which has the sources for the website and the extensions. A big improvement, and an important mark point as the commit to the repository was done by an official (gov.il) email address.

Beyond congratulating the Israeli ICT authority for their steps forward and the satisfaction of our insisting on them became fruitful, we would like to see the repository get updated on a regular basis, the code being given back to the various CKAN extensions (e.g. Hebrew translation). In general, we hope they would to get inspired by how the how data.gov.uk is doing technical transparency. If we allow ourselves to dream, we would like to see Israel becoming a dominate member in the CKAN community and among the other governments who use it.

We’re happy to be the catalyst for open source in the Israeli government, and we promise to keep insisted where needed. We know that due to other requests and notifications more organizations are on their way to release code.

(This post is a translation from Hebrew of a post in Kaplan Open Source Consulting at https://kaplanopensource.co.il/2017/11/20/data-gov-il-code-release/)

Full text

28 November, 2017 09:07 AM

18 June, 2017

Amir Aharoni

סיסמה

אז לפתע פתאום האקדמיה ללשון שינתה את כללי הכתיב.

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

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

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

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

אני מרוצה מהשינוי של „תכנה” ו„יזמה” ל„תוכנה” ו„יוזמה”. אני גם מרוצה למדי מהשינוי של מילות היחס „אתי, אתך” ל„איתי, איתך”, ושל „עתים” ל„עיתים”, אבל מוזר לי ביותר שלא נוספה בהזדמנות הזאת האות יו״ד למילים כמו „אִגרוף” ו„מִחזור”, כדי לא להתבלבל עם „אֶגרוף” ו„מַחזור”. זה היה יכול להיות כלל פשוט ושימושי, והוא ממש לא היה אמור להיות שנוי במחלוקת. חבל שזה התפספס.

עוד משעשעים אותי ה„אישורים” שנינתו למילה „אומנם” וליו״ד בצורת הגוף הראשון בזמן עתיד בבניין נפעל, למשל „איכנס” במקום „אכנס”. אני תמיד כתבתי אותם בכתיב מלא. את „אומנם” כתבתי בווי״ו כי גם „אֻמנם” הוא ניקוד תקני ולא רק „אָמנם”, וצליל u תמיד אמור להיכתב בווי״ו (אם כי עכשיו גיליתי לראשונה שהניקוד „אֻמנם” מיועד לשאלות, לפחות לפי אבן־שושן). ובבניין נפעל כתבתי תמיד „איכנס”, „איזהר”, וכו׳, כי הניקוד בחיריק תקין כמו בניקוד בסגול (ר׳ למשל גזניוס 51p).

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

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

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

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

18 June, 2017 11:03 AM