October 2011
3 posts
A short introduction to... →
Learning about lisp/scheme continuations .. wow .. what a mind twisting concept!
And there I thought lisp lacked structured exit points like “break” and “continue” and “return” ..
This is just brilliant .. I’m so humbled.
When I finally understood how the coroutine implementation works on top of call/cc (it wasn’t obvious how that worked), I...
Sketching helped me avoid getting stuck
For the past couple months, I’ve been feeling stuck. Every time I sit down and try to get something done, I can’t. I find myself “dreading” the thought of going through all the troubles involved (working out some minor low level details, etc). So instead of doing work, I’d procrastinate on youtube or facebook or what have you.
I tried to pin down why I was having...
SuperAgent: ajax library without the suck (by... →
September 2011
1 post
LiveReload: automatically reload browser page when... →
The official site doesn’t make it clear, but it works on linux too
August 2011
1 post
Fix for when mongodb won't start on Ubuntu →
Kinda lame ..
July 2011
1 post
A different kind of writing platform
I’ve been thinking for a long time about building a “writing” platform. But when I try to put it into simple words, it sounds like “oh, yet another blog”. In fact I’ve even written a post before titled “yet another blog engine”. It’s been probably over a year, and the thing is still only in my head.
Most current blog engines are like...
May 2011
2 posts
Webpage titles
I just had this idea. The title of a wepage should try to be as short as possible. Perhaps a 5-letter word.
Titles (along with icons) are used to recognize tabs in a multi-tabbed browser. Keep that in mind. For the title to be useful, it has to be short, otherwise the browser will cut it.
Titles are also used when creating bookmarks; long titles force the user to do the useless task of editing...
PySide + QtQuick Tutorial →
I’m just looking around for tutorials, and just found this (haven’t even read it yet, but seeing as its in the official wiki, it’s gotta be good).
April 2011
7 posts
bash: mkdir + cd with one command
codedump:
function mkcd() {
[ -n "$1" ] && mkdir -p "$@" && cd "$1";
}
Example:
user@host:~$ cd work
user@host:~/work$ mkcd website.com/{html,src,stuff}
user@host:~/work/website.com/html$
Synthesizing music
Please be warned again that this is not my area of expertise. Don’t take anything I say too seriously. At best anything I say it just a reasonable approximation that happens to work for me.
I’m assuming you’re trying to generate musical tones, so I’ll talk about frequencies as if you already know what frequency you want to produce. I will also be using coffee-script and...
3 tags
Very simple implementation of Karplus-Strong...
I’m a bit over excited as I just managed to successfully implement Karplus-Strong’s guitar string algorithm.
http://en.wikipedia.org/wiki/Karplus-Strong_string_synthesis
The Wikipedia description was too complicated for me. I had to get the original paper and try to study it. It’s rather old and the terminology was a bit weird, so it took me a while to really understand it.
...
Quick notes on generating sine waves
A few notes based on my experiments the past couple of days.
First, when you manage to generate a sine wave, you’ll notice there’s a “clicking” sound at the end. Where does it come from and how to deal with it? I think it comes from having the volume suddenly drop to 0. So to make it go away, you gotta make the wave form fade away slowly and gradually.
The graph of...
Defining mimetypes for express
Express, the node.js framework, uses mime to automatically find the mime-type of any statically served file.
If you have a text file with a certain extension and it’s being served as binary, you can serve it as text by defining its mime-type within mine.
For example, I had a .coffee file and I wanted express to serve it as a text file, so here’s what I did:
# let .coffee files be...
1 tag
What you need to know about music to write a music...
I only do music as a small hobby on the side. I know almost nothing about western music theory, and I know only very very little tiny bit of middle eastern music theory.
But, I think I know enough to start making a music keyboard application, so I’ll try to pass what I know for anybody who is interested in this kind of thing.
I’ll try to be brief as much as I can.
A really...
Generating Sound in Firefox 4 →
A 2 minute video tutorial included!
March 2011
3 posts
Stylus: expressive, dynamic, robust css →
This is the sweetest css language I’ve ever seen, too sexy! Definitely check it out!
1 tag
Blog names ..
Choosing a blog name is the most annoying part of setting up a blog. I think most people don’t care to have a blog name. In all honesty, the only name that makes sense for most blogs is the blogger’s own name (or alias/nickname).
3 tags
Things that need fixing in Ubuntu's package system
Debian’s APT system is great for installing and updating system tools.
It’s not so great for installing and updating “apps”.
Most of the user-centric “apps” don’t do anything that requires root permissions. Why does it require root privileges to install them? Because APT packages get installed to system directories.
Solution? It shouldn’t be...
February 2011
8 posts
3 tags
Why Unity is a win
The introduction of Unity as a desktop environment is a great win for Ubuntu and the Linux Desktop.
Unlike gnome, which is designed by a committe of techies, Unity is designed by a small group of designers and techies. And unlike gnome, the goal is not to just offer a “free” desktop (that may or may not offer a good user experience); the goal of unity is to offer a great user...
2 tags
IBM and its minions ...
From a tech talk about the history of JSON
http://developer.yahoo.com/yui/theater/video.php?v=crockford-json
(Note: Douglas Crockford put the following clause in the JSON license “The Software should be used for Good, not Evil.”)
About once a year, I get a letter from a lawyer, every year a different lawyer, at a company – I don’t want to embarrass the company by saying...
3 tags
Why Java sucks →
تخطيط العود →
وضعت الصفحة هذه المرة على النت .. المصدر مفتوح حيث ان الصفحة مجرد صفحة html عادية و ليس فيها اي obfuscation او غيره يعني مجرد روح view source و راح يطلع كود الصفحة
1 tag
Douglas Crockford on server-side javascript →
2 tags
تخطيط العود
الطريقة مأخوذة من هذا المنتدى: http://www.saudimusicians.com/vb/showthread.php?t=5475
لتخطيط العود نأخذ اولا طول العود و نقسمه على الرسم السحري 1.059463094 و هو جذر 2 للقوة 12
>>> pow(2, 1/12.0)
1.0594630943592953
انظر: http://en.wikipedia.org/wiki/Twelfth_root_of_two
نتيجة القسمة هي مكان الخط الاول.
ناخذ النتيجة و نقسمها على نفس الرقم .. و نحصل على الخط الثاني.
و لتسهيل...
2 tags
How I hack on node apps
splitw
First, there’s my ‘splitw’ command, which I use to run long-running process in a split screen.
Code on github
XRefresh
Then, there’s the XRefresh extension for Firefox. It requires a separate server. Check it out from github: https://github.com/YouWoTMA/xrefresh-server then create a symlink to the xrefresh-server (an executable python script).
I run it like...
January 2011
10 posts
2 tags
Confused on startup advice ..? →
Just stick to the basic principle: build something people want.
1 tag
A brief explanation of what lisp macros are
A lisp program looks something like this:
(a b c d)
(m o (p k))
(a b c (d e f g (h i j k) l m)
n
(o p q (r s t (u v) (w x y))
z))
The only form of syntax in lisp is the (a b c ..) form.
The if statement looks like this:
(if a b)
A function call also looks like this:
(foo a b)
A function definition looks sorta like this:
(def foo (a b) body)
Contrast...
http://thinkery.me/ →
List of langauges that compile to javascript →
SibilantJS: Javascript in lisp syntax →
منصة نشر محترمة
منصة النشر المحترمة يجب ان يتوفر فيها على الاقل:
دعم كامل للغة العربية بكل معنى الكلمة، من اكتشاف تلقائي لاتجاه الكلام، و ادخال كلمات اجنبية داخل النص العربي (و العكس)، و محرر يدعم هذه الاشياء (كما تحدثت في السابق).
لغة ترميز خفيفة مثل markdown او reStructured text، و ما اعنيه بكونها “خفيفة” اي ان اغلب الكلام سيكون شكله عادي بدون اي علامات ترميز، و ان وجدت علامات الترميز فهي بأقل...
2 tags
الخط العربي في الانترنت
ملاحظة صغيرة احببت ان ابديها، الخطوط العربية في الانترنت (خط النسخ المبني على اريل Ariel من وندوز) لا يمكن قرائتها بحجم صغير، بعكس الخطوط الانكليزية.
الخط الوحيد الذي يمكن قرائته بحجم صغير هو خط تاهوما Tahoma،
اما خط النسخ فيجب ان يكون على الاقل بحجم 12 بكسل، و يمكن ايضا في هذه الحال جعله ثخينا bold لكي يصبح افضل.
لهذا يرجى ان ينتبه اصحاب المنتديات و المدونات لهذا الأمر و ان يجعلوا الحجم...
3 tags
html5 music notes (firefox4) →
Note to self:
For note number n:
frequency = 440 * 2^(n/12)
where n is the distance from “A” on the forth octave
3 tags
Html engine for arc
I was looking at the coffekup html engine, and as I was trying to use it, I realized something: it’s not really extensible. The same thing is true for Haml, and probably some other html DSLs out there.
While it’s interesting that:
.book
.title = "Something"
compiles into:
<div class="book"><div class="title">Something</div></div>
It’s not...
Awesomeness everywhere
I’m getting kinda overwhelmed. When did all this happen?.
http://expressjs.com/
URL routing (and more) for Node.js
http://lesscss.org/
Better css
https://github.com/mauricemach/coffeekup
Great looking template engine that’s actually a DSL on top of coffee
https://github.com/mauricemach/zappa
Zappa: Razor-sharp DSL for modern web apps
This one (zappa) is possibly the...
December 2010
6 posts
3 tags
A sketch of a maqam app (oud simulator)
This is a rough idea of what would make for an awesome web app to play maqamat on.
It’s derived from my very little (and limited) experience in trying to learn playing the oud.
For those who don’t know, the oud is a middle eastern stringed non-fretted musical instrument.
Here’s a youtube video showing what it looks like and what it sounds like:...
Generating sound in pure Javascript in Firefox4 →
I actually tried the sample script, and it works!
Now, I just need to figure out how to synthesize ‘oud’ notes and my web-based oud-simulator will be ready :P
Node.js
I’ve heard about Node.js before, but I didn’t understand what it was about. The website says “Evented I/O in javascript”. What does that mean? I had no clue. And if you scroll down, there’s an example of a webserver in javascript. What does that have to do with evented i/o? Why doesn’t the site say “server side javascript” instead of “evented...
الحرف العربي في خط ubuntu
هناك قفزات كبيرة تقوم بها Canonical (كنونيكل) في تطوير ubuntu من ناحية الجمالية و الروعة في الاستخدام. من ضمن هذه القفزات خط جديد يحمل نفس اسم النظام ubuntu و الحروف اللاتينية فيه في غاية الروعة و يضاهي خطوط Apple. و من ضمن هذه التغييرات ايضا ثيمات جديدة، اضافة الـ indicators، و تغيير سطح المكتب الى unity و العمل على تطويرها بما يناسب شاشات اللابتوب و الدسكتوب. و في المستقبل التخلي عن X و...
لماذا تخاف من سطر الأوامر؟
اوامر النظام لا تختلف كثيرا عن لغات البرمجة، اذا كنت مبرمجا فأنت تكتب العديد من الاوامر النصية طول الوقت في لغتك البرمجية المفضلة،
أولا هناك مفردات و تعابير لها معانى محددة، و يمكن ان تجمع هذه التعابير بعدة طرق لتحصل على تعابير مركبة
مثلا، يمكن ان ننظر لبعض الاوامر على انها لغة للتعامل مع نظام الملفات: ls, mv, cp, cat, rm, ln
و كل امر من هذه الاوامر له لغة خاصة به، مثلا ln -s تقوم بعمل...
هدف wikileaks من نشر الوثائق السرية
بالأمس قرات مقالا يحاول تحليل الدوافع وراء نشر wikileaks لوثائق سرية للحكومة الامريكية.
الفكرة باختصار هي ان اي منظمة سرية (“مؤامرة”) تحتاج الى قنوات لنقل المعلومات، و هذه القنوات تمثل دماغ المنظمة، فهي مثل الخلايا العصبية اللتي تتنقال المعلومات و تتخذ القرارات.
المعلومات التي تمر عبر هذه القنوات يجب ان تبقى مخفية عن العالم الخارجي و الا لن تكون منظمة تآمرية.
و يجب ان تستمر...
November 2010
6 posts
2 tags
First hack with Arc
At the end of the arc tutorial there’s an example of a webapp:
(defop hello req (pr "hello world"))
(asv)
(asv) starts the http server (on port 8080 by default). defop defines a request handler (apparently).
You can save this file as “web.arc” for example, and run it from the command line with:
$ arc web.arc
Note: arc here is a symlink to arc.sh from the Anarki...
Anonymous asked: نسيت أقول أنا مين D:
أحمد أبوزيد
www.aabouzaid.com
أحمد أبوزيد
www.aabouzaid.com
Anonymous asked: كيف حالك؟ ^_^
اعتقد هذا يعتبر سؤال D:
لي فترة لم أرى مشاركاتك قلت اطمن عليك ^_^ ( جيت مرة من فترة لكن كان في مشكلة في المدونة :/ )
اعتقد هذا يعتبر سؤال D:
لي فترة لم أرى مشاركاتك قلت اطمن عليك ^_^ ( جيت مرة من فترة لكن كان في مشكلة في المدونة :/ )
eFirefox: the best firefox theme for linux →
Direct link: http://seahorsepip.deviantart.com/art/eFirefox-181926233
clean and elegant design
tools menu instead of the menu-bar
refresh and stop are merged at the end of the address bar
page button is besides tabs
2 tags
Firesheep: login as anyone else using wireless... →
This firefox extension demonstrates just how easy it is to sneak into somebody’s account when using insecure http on a wireless connection.
The concept is rather scary, but this tool is meant to aid thieves, rather it’s meant to raise awareness of the issue.
October 2010
7 posts
2 tags
Why you shouldn't have a sign up form
Sign up forms suck, not only because they ask useless information, but because their very existence is an annoyance most of the time.
They usually exist on websites because it’s the “default” thing to do.
So you want people to post comments on your blog? Why should they register? Just give them a field that says “name”, and a field that says “comment”,...
2 tags
html template engines
OK, here’s what sucks about all html template engines.
They all focus on the wrong thing! They all focus on how to access variables from the application, and doing things like loops and things like that.
This is all good and great, but I think we’re now past that, there are new requirements of html templates:
Sane syntax
Do you see what’s wrong with this?
{% for item in...