I'm creating an IPv4/IPv6 OpenLaszlo widget that can bind to a datapath. I spent hours trying to find out why this.datapath.getNodeText() doesn't work inside <handler name="oninit">, although it works fine inside <method>. I kept getting an error of "p is null in Datapath."
For developers experiencing a similar problem, you might want to check out Laszlonia's entry on his blog. It turns out that I simply had to use <handler name="ondata">.
Friday, March 14, 2008
Tuesday, March 11, 2008
map methods execute*() methods in Agavi
Agavi is architecturally beautiful. I can really appreciate the way they designed this thing. One fundamental problem with this framework, however, is that it lacks good documentation. You need to read the code, or ask others who already did, for you to answer some very simple questions.
In my case, I was looking for a way to change the HTTP verb mappings with AgaviWebRequest methods.
Agavi maps executeCreate() with HTTP PUT and executeWrite() with HTTP POST. If I use these functions in the context of REST architecture, it makes more sense if they are mapped the other way around. Although I understand that there is no single way to implement REST, there seems to be a general agreement that update operations should be mapped to HTTP PUT while create operations should be mapped to HTTP POST.
Fortunately, Agavi provides a simple (undocumented) way to change the mappings. In config/factories.xml, simply add:
In my case, I was looking for a way to change the HTTP verb mappings with AgaviWebRequest methods.
Agavi maps executeCreate() with HTTP PUT and executeWrite() with HTTP POST. If I use these functions in the context of REST architecture, it makes more sense if they are mapped the other way around. Although I understand that there is no single way to implement REST, there seems to be a general agreement that update operations should be mapped to HTTP PUT while create operations should be mapped to HTTP POST.
Fortunately, Agavi provides a simple (undocumented) way to change the mappings. In config/factories.xml, simply add:
<request class="AgaviWebRequest">Thanks to the crazy guy, MikeSeth. =)
<parameter name="method_names">
<parameter name="POST">create<parameter>
<parameter name="GET">read<parameter>
<parameter name="PUT">write<parameter>
<parameter name="DELETE">delete<parameter>
<parameter>
<request>
Friday, March 07, 2008
confused on implementing REST using HTTP PUT
I'm implementing a REST web service using PHP5 right now. I'm a bit confused on how to implement a write operation using HTTP PUT verb.
In PHP, data that are sent via HTTP POST are in the following format:
So far, I used curl for testing my web app. I haven't tried sending data via <form> using a web browser, and I don't know whether <form method="put"> works. If it does, then the browser would probably send the data similar to POST's format, with only a different header (UPDATE - 2008/03/11: yepp, it indeed works that way). Blah, possibilities, possibilities.
I'm using Agavi framework, by the way. It's a kick-ass lightweight framework. Agavi is beautiful, but the documentation is sparse. Documentation effort is underway, and I hope to see more of it in the coming weeks. Without it, Agavi is considered "fringe" at the moment (I like fringe software; I even use fringe operating systems such as *BSD hehe).
In PHP, data that are sent via HTTP POST are in the following format:
variable1=data&variable2=dataThe data is immediately available via $_POST. Data that is sent via HTTP PUT is uploaded as a file to the server and must be parsed before reading. There's nothing wrong with it per se, except that writing data is inconsistent. There's no problem requiring my REST clients to upload a file using HTTP PUT, except that it's inconsistent.
So far, I used curl for testing my web app. I haven't tried sending data via <form> using a web browser, and I don't know whether <form method="put"> works. If it does, then the browser would probably send the data similar to POST's format, with only a different header (UPDATE - 2008/03/11: yepp, it indeed works that way). Blah, possibilities, possibilities.
I'm using Agavi framework, by the way. It's a kick-ass lightweight framework. Agavi is beautiful, but the documentation is sparse. Documentation effort is underway, and I hope to see more of it in the coming weeks. Without it, Agavi is considered "fringe" at the moment (I like fringe software; I even use fringe operating systems such as *BSD hehe).
cvsmode in csup
Nice, there are now patches for CVSMode support in csup: http://people.freebsd.org/~lulf/patches/csup/cvsmode/. This means that csup can now fetch complete CVS repositories. Thank you Ulf, whoever you are!
Tuesday, February 26, 2008
pfSense 1.2
It's official! pfSense 1.2 has now been released.
pfSense is a free, open source customized distribution of FreeBSD tailored for use as a firewall and router. In addition to being a powerful, flexible firewalling and routing platform, it includes a long list of related features and a package system allowing further expandability without adding bloat and potential security vulnerabilities to the base distribution. pfSense is a popular project with more than 1 million downloads since its inception, and proven in countless installations ranging from small home networks protecting a PC and an Xbox to large corporations, universities and other organizations protecting thousands of network devices.
This project started in 2004 as a fork of the m0n0wall project, but focused towards full PC installations rather than the embedded hardware focus of m0n0wall.
Tuesday, February 19, 2008
Live DVD for Linux Games
I'm currently researching for information on how to build BSD systems that are small enough to fit inside a CF card with enough space left for user data. This is for an embedded application project that would magically transform packets through some magical incantation.
As I was googling, however, I came across a Linux project for Linux games. The project is live.linuX-gamers.net, "a collection of games [that would run directly] from DVD without the user in need to know about Linux or care about his system." Its motto is "boot 'n play."
Very cool. I might try it some time.
As I was googling, however, I came across a Linux project for Linux games. The project is live.linuX-gamers.net, "a collection of games [that would run directly] from DVD without the user in need to know about Linux or care about his system." Its motto is "boot 'n play."
Very cool. I might try it some time.
Wednesday, February 13, 2008
Xen on NetBSD amd64
I'm trying to install Xen hypervisor on our amd64 box with NetBSD-4.0. I'm getting a couple of errors on getting it to run. The friendly folks at #netbsd told me that I either need to use i386 kernel or use the bleeding edge NetBSD-CURRENT. They suggested that I setup a wiki page to document my progress. I've created an account at http://wiki.netbsd.se/ and I'll see how it goes. I hope this small contribution would benefit others who need to use Xen/NetBSD on x86_64 hardware.
UPDATE: Here's the wiki page-- http://wiki.netbsd.se/Xen_3.1_on_x86_64
UPDATE: Here's the wiki page-- http://wiki.netbsd.se/Xen_3.1_on_x86_64
Saturday, February 02, 2008
NetBSD 4.0
Okidoki, I finally had time to install NetBSD 4.0. As expected, NetBSD was able to support a box with ICH9 chipset. Impressive. I was about to assign almost 250GB to my / partition (I hate having to assign fixed space among multiple partitions, and I don't find dangerously-dedicated partitions particularly dangerous anyway), but I've stumbled upon an online discussion stating that Xen has some issues with a large root partition (yeah, yeah... I often find myself stumbling upon something that I wasn't looking for pretty lately. I seem to have this thing with serendipity). It also has a few issues on non FFSv1-formatted partitions as well. Oh well, I guess I just have to take their word for it. The box is humming steadily as it downloads the necessary packages.
Wednesday, January 30, 2008
Firefox 3 beta 3 screenshot
Firefox 3
I've switched to Firefox 3.0 beta 2 a couple of weeks ago because I've been frustrated by the constant lockups the browser gave me. Firefox was fine when I first started using it around version 0.x - 1.x. Sure, it did have some security issues, but the development team would quickly fix it up as soon as they were discovered.
Much (virtual) ink have already been spent discussing this issue on other forums, so there's no need to enumerate my problems here.
Firefox 3 beta 2 is cool, and I no longer experienced constant lockups unlike before. It would crash, yes, but only rarely. Too bad the Web Developer extension isn't available yet on Firefox 3.
Anyway, I'll be trying the nightly Firefox 3 build (is it on beta 3 yet?) for Mac OS X. It apparently has a new look, but I don't know if it already has native Mac controls. They promised that the final version would have one. Oh well, I'll wait and see.
Much (virtual) ink have already been spent discussing this issue on other forums, so there's no need to enumerate my problems here.
Firefox 3 beta 2 is cool, and I no longer experienced constant lockups unlike before. It would crash, yes, but only rarely. Too bad the Web Developer extension isn't available yet on Firefox 3.
Anyway, I'll be trying the nightly Firefox 3 build (is it on beta 3 yet?) for Mac OS X. It apparently has a new look, but I don't know if it already has native Mac controls. They promised that the final version would have one. Oh well, I'll wait and see.
Tuesday, January 29, 2008
Lazy geek
I'm lazy. I'm often satisfied of simply knowing that I can do something if I want to, even if I don't actually do it.
I'll try to blog at least 1 post per 2 days. This will be an exercise in organizing my thoughts in a manner that is understandable by other people. Contrary to common misconception, my internal thoughts are very organized; it's just that it's structured quite differently (I've learned this the hard way as I grew old), and some of my internal thoughts don't seem to exist in verbal and numeric form. They exist as symbols.
Many of them exist as ideas that are not really ideas; they have this certain qualities that cannot be described with mere words. They are blah, blah, blah, and I think I have to stop introspecting now because this won't make sense anyway and I need to go home now.
Typing my thoughts impromptu makes some very weird post.
I'll try to blog at least 1 post per 2 days. This will be an exercise in organizing my thoughts in a manner that is understandable by other people. Contrary to common misconception, my internal thoughts are very organized; it's just that it's structured quite differently (I've learned this the hard way as I grew old), and some of my internal thoughts don't seem to exist in verbal and numeric form. They exist as symbols.
Many of them exist as ideas that are not really ideas; they have this certain qualities that cannot be described with mere words. They are blah, blah, blah, and I think I have to stop introspecting now because this won't make sense anyway and I need to go home now.
Typing my thoughts impromptu makes some very weird post.
Monday, January 28, 2008
Free legal music at Qtrax
Qtrax is launching a legal ad-funded peer-to-per (P2P) music service. Their software doesn't seem to be available at the moment though. As of Jan 28, 2008 6:45PM (I'm here in a +8 GMT zone), Qtrax' website says that their Windows client will be available on midnight, EST. Their Mac OS X client will be available on March 18, 2008. Hmmm... this looks interesting
Tuesday, January 22, 2008
Xen on FreeBSD-8.0
Oooh, there are updates on www.fsmware.com! Finally! :) Check out the FreeBSD/Xen wiki as well.
BSD on a box with ICH9 chipset
I've been trying to install FreeBSD on a box with an ICH9 chipset to no avail. FreeBSD-CURRENT (the soon to be 8.0) doesn't seem to work either. There has been discussions in the mailing list that it works with FreeBSD-CURRENT, but it really doesn't work on my box.
NetBSD seems to support ICH9 on 4.0, but I prefer FreeBSD over NetBSD. Oh well, I'll just download the ISO and see how it goes. If it works, then I'll try to replace the kernel with a Xen hypervisor. Our box has a whooping 250GB of hard disk space, and it's more than enough to run a few domU Linux systems. Hmmm... It'll also be an opportunity to run Plan 9 domU as well. I haven't tried that yet. I'm wetting my pants with nerdish delight now.
NetBSD seems to support ICH9 on 4.0, but I prefer FreeBSD over NetBSD. Oh well, I'll just download the ISO and see how it goes. If it works, then I'll try to replace the kernel with a Xen hypervisor. Our box has a whooping 250GB of hard disk space, and it's more than enough to run a few domU Linux systems. Hmmm... It'll also be an opportunity to run Plan 9 domU as well. I haven't tried that yet. I'm wetting my pants with nerdish delight now.
Thursday, December 20, 2007
Anti-aliasing in MacOS X
I thought I'd get used to MacOS X font-aliasing. I've always turned this off in Windows, because it makes me unable to read small text. My favorite fonts such as Verdana and Tahoma look gorgeous in 8pt and 10pt, but they look like shit when they're smoothed. :)
I hope I can find a way to completely turn off anti-aliasing in Mac OS X. I'm planning to use ProFont for editing codes, but anti-aliasing blurs the difference between 0 and O; 1, I and l, and other similar-looking characters.
/me googles for solutions
I hope I can find a way to completely turn off anti-aliasing in Mac OS X. I'm planning to use ProFont for editing codes, but anti-aliasing blurs the difference between 0 and O; 1, I and l, and other similar-looking characters.
/me googles for solutions
Friday, December 14, 2007
Christmas party
Genuine laughter, genuine fun; these are the moments when working here have its meaning...
Thursday, December 13, 2007
thoughts
To resign or not to resign? Hmmm... I sometimes feel stupid for holding on to a dream that may not come true. I wanted to work in a startup because I thought that working here would let me innovate and program with passion without all those bureaucratic stuff that plague large companies. Never mind the low salary. Never mind the long working hours without adequate OT compensation.
Oh well, I'll see how it goes. I'll keep my options open while staying loyal to my current company. Working for another company that would give me twice my present salary is quite tempting.
Oh well, I'll see how it goes. I'll keep my options open while staying loyal to my current company. Working for another company that would give me twice my present salary is quite tempting.
Cisco opens up too
Good job, Cisco. This is a step in the right direction. Like Juniper, you are wise in opening up your network appliances to third-party developers. If only management in our company would wake up too...
Wednesday, December 12, 2007
Mac OS X mouse acceleration curve
Aaaargh... Mac OS X' mouse acceleration curve is getting on my nerves. I am unable to have precise mouse control for playing DOTA (i.e., without getting myself killed) because the pointer movement is just too unpredictable. Every second in this game counts, and I don't want the mouse getting on my way. If Windows did something right, its superior mouse feel would be it. Aaaargh... !$$^@#&*(!! Lina Inverse at level 10 killed my Faceless Void that was at level 11. #$%238(&387!!!
Tuesday, December 11, 2007
API/SDK for network appliances
I feel so sad that my vision for creating an API/SDK for our network appliances has been implemented by our competitor. I have been proposing this for more than a year now, going as far as to create a draft architecture for our network appliances-- but it fell on deaf ears. Juniper has implemented it on their products, and I honestly envy them because I know that this will make them sell like pancakes to big corporations. I wish them the best of luck.
Subscribe to:
Posts (Atom)
