દયા અને વિષાદ
ચાલતી ટ્રેને ચડ્યો. બારણાંને ચાવી હતી એટલે મહામુસીબતે બારી વાટે અંદર
ગયો. થોડી વારમાં ગાર્ડ આવ્યો. નમ્રપણે મેં બચાવ કર્યો. જતી વેળા તેણે
જણાવ્યું કે ધીસ ઇઝ પ્રોસિક્યુશન. બોલ્યા પ્રમાણે કરશે એવી બીક પેઠી. વડાળ
આવ્યું. ગાર્ડે મને બોલાવ્યો અને જૂનાગઢની ટિકિટ લેવરાવી. ન તો
પ્રોસિક્યુશન, ન ડબલ ચાર્જ. રેલવેના સહવાસથી ક્રૂર અને કઠોર બનેલો પુરુષ
આટલો દયાળુ બની ગયો! આવા બનાવો અનુભવી હું દિગ્મૂઢ બનું છું, વિસ્મય પામું
છું અને વારંવાર એ ગૂઢ શક્તિને વિચારું છું.
સંકટ વેઠી ચાલતી ગાડીએ
ચડી જવાની મૂર્ખાઈ મેં ન કરી હોત તો સારું થાત એ વિચાર આખો દિવસ ડંખતો
રહ્યો, પરંતુ સંસારની સંપત્તિઓ અને લાભોનું દબાણ નબળા હૃદયને કેવું
નિર્માલ્ય બનાવી દે છે! આંહીની આશાઓ, ધાસ્તીઓ અને વિકટ સંજોગો મારી નાની
પાંખોને કેવી ઘાતકી રીતે છેદી નાખે છે એ તો મારું મન જાણે છે.
આપણને
ઘણી વાર સ્વપ્નાં આવે જાણે આપણું વહાલામાં વહાલું સદાને માટે આપણાથી જુદું
પડ્યું હોય. એ સ્વપ્નની વેદના કેવી તીક્ષ્ણ હોય છે! જાગૃતિમાં પણ મને એવાં
સ્વપ્નાં નજરે પડયાં છે. આવી સ્વપ્નવતી ઘડીઓની અંદર જ મને મારી અનાથતાનું
ભાન થાય છે. અસંખ્ય આશા, સુખ અને આનંદથી ભરેલી આ દુનિયાની વચ્ચે પણ હું
અરણ્યમાં એકલો આક્રંદ કરતો હોઉં એવી કલ્પના મને આ સમયે થઈ આવે છે. એવું થાય
તો મારું કોણ, મારા પ્રભુ!
~ ઝવેરચંદ મેઘાણી, અંતર-છબિ પુસ્તકમાંથી
---
Fonts Rendering on GNU/Linux System - Pt. 0
People think that computers are smart. So smart that they take their life-affecting decision based on computer’s response. They have this perception because of the AI, because the intelligence they’re seeing now with computer software. But, don’t forget that computers are still dumb like they were 50 years ago. Certainly they now know more words (machine instructions) than they were knowing 50 years ago. But, that doesn’t make them such a intelligent.
The reason why we are seeing intelligence in computer is because of the layer of abstractions. Someone created something so that computer can react on 0 and 1. As computer now know how to react on 0 and 1, someone else created something on top of it on how to react on 00, 01, 10, 11. That means computer can react on now four things (00, 01, 10, 11) instead of two because computer already know how to react on two values (0 and 1). They come and build something on top of something as layer of abstractions. And here we are, computer reacting on our life-impacting questions!
One of the layer that is accepted by people is font rendering. They assume that displaying the text on screen is fundamental to computer that computer has this native ability. No! tens of thousand if not million lines of code is written to display the text on screen. Displaying the text on screen or font rendering is tedious, boring thing, and under-reputed thing that nobody is talking about. Under-reputed - yes, tell someone that as programmer, I’m working on software the display text on screen and they say like, what’s new that is already a computer is doing.
With this series of the articles, I’m planning to shed a light on topic - “fonts rendering on GNU/Linux system”. Yes, GNU/Linux system because these articles are created and tested against GNU/Linux system (Debian, if you care)! These articles are not in depth article but exposure to the topic so that you can deep dive further because font rendering is not something simple covered within few articles. It requires extensive technical and background knowledge from multiple domains - linguistic, computer science, art, mathematics are few.
---
એ કેવી સુંદર હતી?
ઉત્સવમાંથી એકલા પડેલા લવણપ્રસાદે વસ્તુપાલને પોતાની પાસે બેસારી,
પોતાનો વૃદ્ધ હાથ એના ખભા પર મૂક્યો. એ હાથમાં વિલક્ષણ ધ્રુજારી હતી. એ
કાંઈક કહેવા જતો હતો પણ કહી ન શક્યો.
"બાપુ !” મંત્રીએ કહ્યું, “મૂંઝાઓ છો? શી વેદના ભરી છે હૈયે?”
"છોકરા!"
રાણાએ મહાપ્રયત્ને કહ્યું, “અઢારેક વર્ષ પૂર્વેનું એક પ્રભાત યાદ આવે છે?
મેં તમને ત્રણ ભાઈઓને – પાટણ ભણવા જતાને – મહેણાં મારેલાં. આજ છાનોમાનો એની
ક્ષમા યાચુ છું.” કહેતે કહેતે એણે વસ્તુપાલનો ખભો વધુ જોરથી દબાવ્યો, “ને
તને તારી બાએ કહ્યું હશે કે નહીં, પણ મેં, તારા બાપુના એક સ્નેહી તરીકે,
તારી માને ને બહેનોને થીગડાં દીધેલ વસ્ત્રે મંડલિકપુરની ભાગોળે તે દિવસ
દીઠાં તોય હું ચાલ્યો ગયેલો. પણ બેટા ! હું તે દિવસે આગલી રાતનો અસ્વસ્થ
હતો.”
“મારી બાને ને બાપુને આપ ઓળખતા?” "એ વાત લાંબી છે. તમને તો કોણે કહી હોય? કહું?"
“આજ નહીં, બાપુ, અમે સૌ સપરિવાર ભેળા બેસીને સાંભળીએ તે દિવસ કહેજો.”
“તારી મા... વસ્તુપાલ! તારી માતા સુંદર હતી."
“બાપુ ! ફરી એક વાર કહો. એ કેવી સુંદર હતી?” વસ્તુપાલે આંખો મીંચી દીધી. એ ધ્યાનમગ્ન બન્યો. લવણપ્રસાદની વાણીને એ પીવા લાગ્યો.
“એવી
સુંદર હતી ! - કેમ કહીને વર્ણવું? મને લડવૈયાને એવું શીલવંતું રૂપ
વર્ણવતાં ન આવડે. એ સુંદર હતી – પેટ અવતાર લેવા જેવી સુંદર. અમે ક્ષત્રિયો
સ્ત્રીની સુંદરતાને એ એક જ રીતે વર્ણવી શકીએ.”
જીવનમાં વસ્તુપાલ એક વાર રડ્યો હતો – લુણિગના અંત સમયે. આંસુ એને આવતાં નહીં. પણ માને સુંદર સાંભળી એની આંખોની પાંપણો પટ પટ થઈ રહી.
~ ગુજરાતનો જય, ઝવેરચંદ મેઘાણી
---
દ્વિતીય વિશ્વયુદ્ધ પાછું હડસેલી દીધું
હવે આપણે કટોકટી ભર્યા ૧૯૩૮ના વર્ષને ફરી યાદ કરીએ. યુદ્ધનાં ઘેરાં વાદળો આકાશમાં છવાઈ રહ્યા હતાં અને આખા યુરોપમાં યુદ્ધની ભારે ગર્જના સંભળાઈ રહી હતી. ડિસેમ્બર મહિનામાં યુદ્ધ ફાટી નીકળશે તેવી દહેશત અનુભવાઈ રહી હતી, નવેમ્બર મહીનાની ૨૩મી તારીખની રાત્રિએ શ્રી અરવિંદને પગે અકસ્માત નડયો હતો. તેમને અકસ્માત નડયો તેના બે અઠવાડિયાં બાદ યુદ્ધ ફાટી નીકળવાની શક્યતા સ્પષ્ટ પણે દેખાઈ રહી હતી. પણ શ્રી અરવિંદના જણાવ્યા પ્રમાણે એમની દિવ્ય આધ્યાત્મિક શક્તિની મદદથી યુદ્ધ પાછુ હડસેલાઈ ગયું હતું; કારણ કે તે સમયે જો યુદ્ધ ફાટી નીકળ્યું હોત તો એમના આધ્યાત્મિક કાર્યમાં ભારે અવરોધ ઊભો થયો હોત. શ્રી અરવિંદે યુદ્ધને પાછું હડસેલી દીધું તેથી સ્વાભાવિક રીતે એવું માની શકાય કે, યુદ્ધ નિર્માણ કરનારાં સઘળા દુઃસાધ્ય બળાએ પોતાનો બધોજ રોષ શ્રી અરવિંદ ઉપર ઠાલવી દીધો, અને એના પરિણામે શ્રી અરવિંદને પગે અકસ્માત નડયો. હિટલરે પોલેન્ડ પર હુમલો કર્યો તેના ઘણા સમય પહેલાં, કોઈપણ વ્યક્તિ જાણી શકે તે પહેલાં, શ્રી અરવિંદને જર્મનીમાં અંધકારગ્રસ્ત આસુરી સત્તાના ઉદય અને આખા યુરોપ ઉપર તેના આકરા આક્રમણની જાણ થઈ ચુકી હતી.
~ શ્રી અરવિંદના સાંનિધ્યમાં બાર વર્ષ, નીરોદબરન
---
Themes
Part of freedom in selection article series.
- Gruvbox
- Solarized
- Tomorrow
- Nord
- Dracula
- Material
- Monokai
- Everforest
---
Editors
Part of freedom in selection article series.
- Leafpad
- Mousepad
- FeatherPad
- Pluma
- KWrite
- Kate
- GNOME Text Editor
- gEdit
- Nano
- Emacs (Emacs is not a weekend project. It is a commitment)
- Vim
- Bluefish
- jEdit
---
Desktop Environments
Part of freedom in selection article series.
- GNOME by default it is available on Fedora Workstation and Debian.
- KDE by default it is available on Neon and Manjaro.
- Xfce
- LXDE
- LXQt
- Enlightenment
- Budgie
- Cinnamon by default it is available on Mint.
- MATE
- COSMIC
- Cutefish
- Deepin
- Pantheon by default it is available on Elementary OS.
- Sugar
- Moksha by default it is available on Bodhi Linux.
- Trinity
- Unity
---
જગત એક રમતનું મેદાન
આ જગત એક રમતનું મેદાન છે. જ્યારે અસુરી તત્વોનો ત્રાસ અસહ્ય બને છે, ત્યારે માં આ મેદાનમાં ઉતરે છે. પણ ક્યારે? જ્યારે એને અંતઃકરણની પુકાર સંભળાય છે, જ્યારે એને એના દયાળુ, નિર્મળ, અને પ્રિય બાળકો બોલાવે છે. વળી, માં એકલાં નથી આવતાં. સાથે પોતાના સખા, બાળકો, પોતાના અંશોને પણ આહવાન આપે છે, સાથે આવવા.
અહીં માં એટલે ફક્ત માતાજી નહીં પણ પરમ દિવ્ય શક્તિ.
ભગવાન રામ સાથે લક્ષ્મણ, ભરત, રિપુદમન, વીર હનુમાન, સુગ્રીવ, જાંબુવાન, નલ-નીલ, અંગદ, અને બીજા અનેકનો વિશાળ વૃંદ આવ્યો હતો. ભગવાન કૃષ્ણ સાથે બલરામ, અર્જુન અને ભીમ સહિત પાંચે પાંડવો, સુદામા, ઉદ્ધવ સહિત વિશાળ વૃંદ આવ્યો હતો.
ક્યારેક બધાં અલગ અલગ આવે છે, જેમકે અઢાર અને ઓગણીસમી સદીનું સંત વૃંદ જેમાં રામકૃષ્ણ પરમહંસ, સ્વામી વિવેકાનંદ થી માંડીને રમણ મહર્ષિ, તૈલંગ સ્વામી, સ્વામી દયાનંદ સરસ્વતી, શ્રી અરવિંદ, શ્રી માં, પંડિત ગોપીનાથ કવિરાજ, માં આનંદમયી, અને બીજા ઘણાં સંતો અને પરમ આત્માઓ આવ્યા હતાં, જ્યોતને ચાલુ રાખવાં અને વધુ સુવાસથી ફેલાવા.
શું લાગે છે તમને? અત્યારે એ વૃંદ રમત મેદાનમાં હશે? તો હશે તો માં પણ આવશે?
---
Freedom to Choose From in GNU/Linux
One of the reason why I like love GNU/Linux is freedom to choose (other things I like love are privacy and no bloatware). At almost every level you have freedom to choose.
If you don’t like Ubuntu, fine try Fedora. If you don’t like Fedora, fine try Arch. If you don’t like Arch, fine try Nix. Finally, let’s say you choose Debian. But, if you don’t like GNOME in Debian, fine try KDE. If you don’t like KDE, fine try XFCE. If you don’t like XFCE, fine try COSMIC. Finally, let’s say you choose LXQt.
Going forward, you don’t like FeatherPad in LXQt, fine try Mousepad. If you don’t like Mousepad, fine try Pluma. If you don’t like Pluma, fine try gEdit. Finally, let’s say you choose KWrite. Here, as an example I selected text-editor category. But, same is true for other applications as well.
You have freedom to theme the desktop environment, window managers, applications, and what not! I know there are some movements where developers are asking not to theme their applications which I personally don’t like.
With this article being an index of the other linked articles to collect such a freedom to choose from items in GNU/Linux system. The plan is to not only list available options but also to touch point those area where customization is the options or using tool is a option or writing a code is an option.
Note: I’ll convert the following bullet points into links once I add the associated article/page.
- Distro
- Desktop Environments
- Window Managers
- File Managers
- Editors
- Browsers
- Email Clients
- Office Suites
- Image Viewers
- Media Players
- System Monitors
- Themes
- Icons
- Panels
- Docks
- Wallpapers
- Fonts
- Toolkits
- Terminals
- RC
- Panels
- Launcher Menus
- Applets
---
ભગવાનની કરુણાદૃષ્ટિ
એટલામાં એક બીજો માણસ ગામમાંથી ત્યાં આવ્યો. તેના એક હાથમાં એક પોટલી
અને લોટો હતો અને બીજા હાથમાં એક સાદડી અને પાણીનો ઘડો હતો. તેણે
પોલીસવાળાને કશુંક કહીને સાદડીને એક સ્વચ્છ અને છાયાવાળી જગ્યામાં પથારી.
તેના ઉપર હાથમાંની સઘળી વસ્તુઓ મૂકી અને દોડતો તે સ્વામીજી(સ્વામી
વિવેકાનંદ)ની પાસે આવી લાગ્યો "પધારો બાબાજી1 મેં તમારે માટે ભોજન આણ્યું
છે, એનો અંગીકાર કરો" પોલો મારવાડી તો સ્તબ્ધજ બની ગયો. પેલો નવો માણસ
ફરીથી કહેવા લાગ્યો "બાબાજી! એ પ્રસાદ તમારે લેવોજ પડશે!" સ્વામીજી બોલ્યા
"ભાઈ, તમે ભૂલતા હશો. કોઈને બદલ કોઈને ધરતા હશો. હું તમને કદી મળ્યો હોઉં
એવું મને યાદ નથી" તેને જવાબ આપ્યો "હું એક હલવાઈ છું. બપોરે હું જરા સૂતો
હતો, ત્યારે સ્વપ્નમાં મને એવું પ્રેરણા થઈ આવી કે સ્ટેશન ઉપર કોઈ મહાત્મા
પુરુષ ભૂખ્યા છે, તેમને માટે ભોજન, પાણી, અને બિછાનું લઈને જા. હું જાગી
ઊઠયો, પણ તે માત્ર ખાલી સ્વપ્ન હશે એમ ધારીને પાછો સૂઈ ગયો. પણ ફરીથી પાછી
એવી ને એવીજ પ્રેરણા બહુજ જોરથી મનમાં થઈ આવી અને મારાથી વધારે વાર સૂઈ
રહેવાયું નહિ. ઊઠીને મેં જલદીથી પુરી અને શાક બનાવ્યા અને કેટલીક મીઠાઈ,
પાણીનો ઘડો તથા સાદડી લઈને હું દોડતો આવ્યો છું. આપ હવે પધારો અને કૃપા
કરીને ભોજન અંગીકાર કરો આપને બહુ ભૂખ લાગી હશે" પછી સ્વામીજીએ ભોજન કર્યું
અને જમતે જમતે પ્રભુની અગાધ કૃપાનો વિચાર કરતાં સ્વામીજી ઘણાજ ઉલ્લાસથી
શ્રીમદ્ભગવદ્દગીતાનો શ્લોક મનમાં બોલી રહ્યા -
अनन्याश्चिन्तयन्तो मां ये जना: पर्युपासते |
तेषां नित्याभियुक्तानां योगक्षेमं वहाम्यहम्
~ સ્વામી વિવેકાનંદ, ભાગ ૯,વિસ્તૃત જીવનચરિત્ર
---
જીવનચરિત્ર ઉપર ઝવેરચંદ મેઘાણીનો વિચાર
સંવેદનશીલ હૃદય હોય, અને એ હૃદુયમાં શુદ્ધ પ્રતિબિંબો પડે તેવી નિર્મળતા હોય અને જેનું સાધારણીકરણ થઈ શકે તેવા નાના છતાં સાચા અને નિર્દભી અનુભવો હોય તે સર્વનો આત્મચરિત્ર લખવાનો અધિકાર છે. પણ આવાં લક્ષણોનો સપ્રમાણ સુયોગ કેટલા થોડા સાધી શકે છે! ટાયલાંમાં, ફિશિયારીમાં, પોતાની ઊજળી બાજુને અત્યુક્તિથી રંગવામાં અને ઘેરી બાજુને છુપાવવામાં સરી પડવાનો મોટો ભય પગલે પગલે છે. અંગત ઘટનાઓ દેખીતી રીતે અલ્પતામાં ખપી જાય તેને આત્મસ્પર્શ સુવર્ણમય બનાવે છે. અપરિચિત અને અમહત્ત્વના ભાસે તેવા આત્મવૃત્તાંતનો ભોક્તાવર્ગ નાનો જ હશે; સમસંવેદનશીલને જ એ રસપ્રદ બની રહેશે. આત્મકથાનો કસબ બહુ અઘરો છે. નાની વાતોને નાની રાખી કેટલાક કહી શકશે?
મારી
જીવનસ્મૃતિ લખું તો parody જેવું બને. જીવનનું ઘણું ઘણું સ્મરવાને બદલે
વીસરવા યોગ્ય હોય છે. જાહેર પાસે ધરવા જેટલું રતીભાર. નબળાં જીવનતત્ત્વોને
હિંમતભેર તેમ જ આત્મશ્રદ્ધાભેર મૂકવાની શર્તને આત્મસ્મૃતિનું સાહિત્ય અવલ
દરજ્જે માગી લ્યે છે. એમાં ૯૯.૯ પાલવે નહિ. પૂરા સો ટકા ખપે. જીવનકથા
લખવાની મારી હામ નથી. એવી છેડતી સાંખી લેવા આત્મજીવન તૈયાર નથી.
~ ઝવેરચંદ મેઘાણી, અંતર-છબિ પુસ્તકમાંથી
---
Meson Tutorial for Beginners Pt. 3
Next, we are interested to pass some options to compilation process such as -Wall and -Wextra to show the possible code warnings. Apart from this, we are also interested in to set the C standard such as std17.
We can use add_project_arguments() function as,
project('hello-meson', 'c') sources = [ 'main.c', 'greetings.c' ] add_project_arguments('-Wall', '-Wextra',language: 'c') executable('main', sources)
This will add these compilation options directly to the compile
command. If you want to see if these flags are passed to compilation or
not, you can use -v or --verbose to see the exact command meson will run. For example, in my case while running the following command,
meson compile -v -C builddir
I get the following output.
# ... Host machine cpu: x86_64 ../meson.build:9: WARNING: Consider using the built-in warning_level option instead of using "-Wall". ../meson.build:9: WARNING: Consider using the built-in warning_level option instead of using "-Wextra". Build targets in project: 1 Found ninja-1.12.1 at /usr/bin/ninja Cleaning... 0 files. [1/4] ccache cc -Imain.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -Wall -Wextra -MD -MQ main.p/main.c.o -MF main.p/main.c.o.d -o main.p/main.c.o -c ../main.c [2/4] ccache cc -Imain.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -Wall -Wextra -MD -MQ main.p/greetings.c.o -MF main.p/greetings.c.o.d -o main.p/greetings.c.o -c ../greetings.c [3/4] cc -o main main.p/main.c.o main.p/greetings.c.o -Wl,--as-needed -Wl,--no-undefined
Notice the line that starts with [1/4] or [2/4] we have those -Wall and -Wextra options in command line. But, it also give us warnings as well. Warning says, instead of passing -Wall and -Wextra use warning_level option. We can use this option by passing default_options to project() function instead of add_project_arguments().
project( 'hello-meson', 'c', default_options: [ 'warning_level=2' ] ) sources = [ 'main.c', 'greetings.c' ] executable('main', sources)
Note: If you sometime won’t see the output in terminal, you might need to delete buiddir folder and setup and compile again.
default_options is clean way to define the properties that you’re interested to pass in compilation process. warning_level=2 will be translated into -Wall and -Wextra for GCC and Clang compilers. This is same as to pass -Wall and -Wextra using add_project_arguments(). But, default_options is more portable and pass command options based on compiler than plain -Wall and -Wextra as it might possible Windows C/C++ compiler might have different options and Meson will take care of it.
Finally, let’s also select the C standard version with default_options only.
project( 'hello-meson', 'c', default_options: [ 'warning_level=2', 'c_std=c17' ] ) sources = [ 'main.c', 'greetings.c' ] executable('main', sources)
Let’s compile the project again.
meson compile -v -C builddir
And we should see the output like this.
[1/3] ccache cc -Imain.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c17 -O0 -g -MD -MQ main.p/main.c.o -MF main.p/main.c.o.d -o main.p/main.c.o -c ../main.c [2/3] ccache cc -Imain.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c17 -O0 -g -MD -MQ main.p/greetings.c.o -MF main.p/greetings.c.o.d -o main.p/greetings.c.o -c ../greetings.c [3/3] cc -o main main.p/main.c.o main.p/greetings.c.o -Wl,--as-needed -Wl,--no-undefined
As you can see in the above output we are seeing -std=c17 is passed in [1/3] and [2/3] commands.
Yay!
---
Think Like Functional Programmer Pt. 1
You often heard from the functional programmers that if you are coming from object-oriented or procedural programming background, then you need to shift the way you write the function programs. Of course, as you know one programming language, you can write programs in other programming language by using what you know. But, often times, programs written in this way are not efficient or effective.
The plan with this series is to literally show you some shift in how you can write programs in functional way. The language we will use are JavaScript and Elixir.
Consider the example, where you will get a text of few words and you need to print the caps of first word from the text. So, for example, if you get “Lorem ipsum delor sit” then you need to print LOREM as the result.
In JavaScript you can do it by,
// save text in variable const text = "Lorem ipsum delor sit"; // split by space const words = text.split(" "); // get the first word const word = words[0]; // and caps it console.log(word.toUpperCase());
As we know have working solution, we can better write it as,
const text = "Lorem ipsum delor sit"; console.log(text.split(" ")[0].toUpperCase());
If we need to do the same thing in Elixir then we can map our JavaScript knowledge to Elixir and write similar code.
# save text in variable text = "Lorem ipsum delor sit" # split by space words = String.split(text, " ") # get the first word word = Enum.at(words, 0) # and caps it IO.puts(String.upcase(word))
As we know have working solution, we can probably better write it as,
text = "Lorem ipsum delor sit" IO.puts(String.upcase(Enum.at(String.split(text, " "), 0)))
As Elixir is functional programming language, we need to call functions! So, we calling functions within functions within functions that makes our code functional! No.
Functions are not just a syntax but they transform the input to generate the needed output. You need to think about input and output and output as input to other function. Nice thing about Elixir is that it has syntax that support such type of thinking. For example, here is Elixir way to write the same program but in actual function way.
"Lorem ipsum delor sit" |> String.split(" ") |> Enum.at(0) |> String.upcase |> IO.puts
Yay!
---
જીવનનો આધાર
શ્રીમોટા: માણસ જરૂર કરતાં ઘણું વધારે ખાય છે. સ્વાદને કારણે હોય કે
ટેવને કારણે હોય કે ગમે તે કારણે હોય. તેને જીવવાને માટે જેટલી કવૉન્ટીટી
(જથ્થો) જોઈએ એના કરતાં ઘણું વધારે ખાય છે. એટલે આયુષ્ય પણ ઘટે છે.
સ્વજન: વધારે ખાય એટલે?
શ્રીમોટા:
બધી શક્તિ ખોરાક પચાવવામાં જાય છે. શરીરને ઘટાડવાનું હોય તો પોતાનો ખોરાક
ઓછો જોઈશે. હરિને ભજવાવાળાને તો ખોરાક ઓછો જોઈએ. ખોરાક ઓછો કરતાં કરતાં તો
સાહેબ, મને બહુ પંચાત પડેલી. નાનપણમાં ભારે મજૂરી ને ખડતલ શરીર. સાડા સાત
વર્ષની ઉમરે ઘણી મજૂરી કરવાની એટલે આટલા આટલા મોટા રોટલા હોય તો દોઢ રોટલો
ખાતો હતો. આટલો મોટો રોટલો. એકવીસ બાવીસમે વર્ષે આ સાધના શરૂ કરી ત્યારે
સમજતો થયો કે ખોરાક ઓછો કરવો જોઈએ. તે અડધો કરતાં કરતાં બહુ પંચાત પડેલી.
કારણકે પેટને ટેવ પડી ગયેલી હોય એટલે ધરાવો થાય જ નહિ. એટલે મન એમાં ને
એમાં જ રહ્યા કરે - ખોરાકમાં જ, - પેટમાં જ. એ ટેવ છોડતાં છોડતાં મને વર્ષ -
દોઢ વર્ષ લાગ્યું હશે.
~ પૂજ્ય શ્રીમોટા સાથે સત્સંગ અગ્રતા - એકાગ્રતા
---
Meson Tutorial for Beginners Pt. 2
Now, let’s move on and add more C files in this project. Because you will have many files in the normal project, otherwise you can manage the compilation of a single file via a command and you don’t need the build system!
Go ahead and create a new file with name greetings.h and write the following code.
#ifndef GREETINGS_H #define GREETINGS_H void greet(void); #endif
We have defined a greet() function prototype in this header file. Let’s create a corresponding greetings.c file where we’re going to actually define this greet() function.
#include "greetings.h" #include <stdio.h> void greet(void) { printf("hello, world\n"); }
The new file is ready to be consumed! Go back to the main.c file, and let’s use the greetings.h header file and the greet() function. Also, we can remove the use of the stdio.h header file because we are no longer using any function from this header file.
#include "greetings.h" int main(void) { greet(); return 0; }
Finally, we need to add this greetings.c file in meson.build and within the executable() function as the next argument. Note: you don’t have to list the header files here.
project('hello-meson', 'c') executable('main', 'main.c', 'greetings.c')
executable() function takes any numbers of source files.
Go back to the terminal and run.
meson compile -C builddir
Meson will notice the changes, automatically reconfigure if needed, and compile both main.c and greeting.c files. We can run our program as,
./builddir/main hello, world
Let’s do some refactor now.
As of now, we have two files — main.c and greetings.c files. But, as the project grows, we will have 10 or 20 files or maybe 100+ files. Listing every single file inside the executable() function can become messy. Let’s use variables instead! Create a variable with name srcs, that will hold the list of source files. As it is a list, it needs to be defined with [] as,
project('hello-meson', 'c') srcs = [ 'main.c', 'greetings.c' ] executable('main', srcs)
Let’s compile and re-run to confirm that our changes work as expected.
meson compile -C builddir ./builddir/main hello, world
Yay!
---
Meson Tutorial for Beginners Pt. 1
Meson is a user friendly build system. It uses the Ninja build system under the hood. We need to install a couple of software.
- Meson: The subject of this tutorial. For Debian/Ubuntu type
sudo apt install mesonand it will install Meson for you. - Ninja: When you install Meson, it will also install Ninja for you.
- GCC: A C compiler. You can install via
sudo apt install gccor as part of build essential assudo apt install build-essential. The tutorial uses the C language as an example. That is why we need GCC.
Go ahead and create a folder with the name hello_meson. Inside this folder, create two files - main.c and meson.build.
mkdir hello_meson cd hello_meson touch main.c touch meson.build
Open the main.c file and write the following C code.
#include <stdio.h> int main(void) { printf("hello from meson\n"); return 0; }
Open the meson.build file and write the following code.
project('hello-meson', 'c') executable('hello', 'main.c')
The meson.build file is the manifest file for the Meson build system.
This first line must be the project() function. The first argument to the function is, name of the project.
It is different from the executable of the program. It is like the
distribution name of the project. Consider that you want to distribute
this project as tarball. What name should you give to that tarball?
That’s the project name as the first argument of project() function. The second argument is the language of the project which is c in our case. Don’t forget that you need to use single quotes and not double quotes.
Next we used the executable() function. The first argument is the name of the output or the executable e.g. hello and the second argument is the name of the file used to compile the output e.g. main.c.
We are now ready to run the project.
Open the terminal, go inside the hello_meson folder and run the following command.
meson setup builddir
This command sets up the project and creates a builddir
folder with necessary files and folders needed for the Ninja build
system. You need to run this command only once at the start of the
project (think of it as npm init in Node). You should see some output that verifies that set up is ready to compile your project.
Next, run the following command to compile the project.
meson compile -C builddir
This command compiles the project and places the compiled output within builddir. Now, we can run the executable as,
./builddir/hello hello from meson
If we change the name of the executable in meson.build to main from hello, Meson will generate main as an executable after successful compilation.
project('hello-meson', 'c') executable('main', 'main.c')
As you can notice from the above commands, we’re not running the meson setup builddir command. As I mentioned previously, you don’t have to run it again.
Let’s now print “hello, world” text instead of “hello from meson”.
#include <stdio.h> int main(void) { printf("hello world\n"); return 0; }
You know the commands to see print the “hello, world” text, right?
meson compile -C builddir ./builddir/main hello world
Yay!
---
જુઠ્ઠાણું
(પોંડિચેરી) આશ્રમના પુસ્તકાલયના જે ખંડમાં, સામાન્ય વાંચન માટે સમાચારપત્રો રાખવામાં આવતાં, એ ખંડનું નામ એમણે (શ્રીમાં) "False hood" (જુઠ્ઠાણું) રાખ્યું હતું.
~ શ્રી અરવિંદના સાંનિધ્યમાં બાર વર્ષ, નીરોદબરન
---