http://izumi.plan99.net/blog/index.php/2008/01/14/making-ruby%E2%80%99s-garbage-collector-copy-on-write-friendly-part-7/
Has what i would consider the 'best' for its current incantation--which is mark and sweep everything every time. I would recommend against going for it and instead recommend for a generational one.
Thoughts and tutorials on programming
Monday, March 24, 2008
Friday, June 29, 2007
ruby err
driver.rb:270:in `startServerAndGoAndStop': private method `doAllPeersWithDelta' called for # (NoMethodError)
means "you have an extra end in driver class!"
means "you have an extra end in driver class!"
Thursday, June 28, 2007
ruby-debug ctrl-c
So...you run your ruby app with ruby-debug rdebug and it doesn't catch ctrl-c interrupts anymore? Do not fear. Just run rdebug scriptname then 'catch Interrupt' and it will always catch them from then on.
.bashrc doesn't work
find that ~/.bashrc isn't getting loaded on login? Try renaming it ~/.profile (or creating such page and having it do '. ~/.bashrc'.
Wednesday, June 27, 2007
how to install rmagick to a custom directory (gem)
So..you install rmagick as a gem and it goes to the right gemrepository, but that still doesn't work? I search for RMagick.rb and then added that path to the RUBYLIB path, thus
export RUBYLIB=$RUBYLIB:/home/rdp/i386/gemrepository/gems/rmagick-1.15.7/lib/
(in ~/.bashrc). Voila
export RUBYLIB=$RUBYLIB:/home/rdp/i386/gemrepository/gems/rmagick-1.15.7/lib/
(in ~/.bashrc). Voila
Tuesday, June 26, 2007
how to convert you putty key to linux
So...you use putty agent to login to your linux box, and now you wish you could use the same key within linux? Not a problem. right click on the private key, choose edit, then choose "export" save the file somewhere (anywhere), then eventually copy it over to your ~/.ssh/identity file [may need to change permissions on said file so that it's not readable by anyone]. Voila.
Monday, June 25, 2007
installing rubygems as non root
so...install it and it does this?
rdp@ilab4 ~/downloads/rubygems-0.9.4 $ ruby setup.rb --verbose install
rm -f InstalledFiles
---> bin
mkdir -p /home/rdp/i386/bin
install gem /home/rdp/i386/bin/
install gem_mirror /home/rdp/i386/bin/
install gem_server /home/rdp/i386/bin/
install gemlock /home/rdp/i386/bin/
install gemri /home/rdp/i386/bin/
install gemwhich /home/rdp/i386/bin/
install index_gem_repository.rb /home/rdp/i386/bin/
install update_rubygems /home/rdp/i386/bin/
<--- bin
---> lib
mkdir -p /usr/lib/ruby/site_ruby/1.8
install gemconfigure.rb /usr/lib/ruby/site_ruby/1.8/
setup.rb:633:in `initialize': Permission denied - /usr/lib/ruby/site_ruby/1.8/gemconfigure.r b (Errno::EACCES)
from setup.rb:633:in `open'
from setup.rb:633:in `install'
from setup.rb:1377:in `install_files'
from setup.rb:1376:in `each'
from setup.rb:1376:in `install_files'
from setup.rb:1350:in `install_dir_lib'
from setup.rb:1532:in `__send__'
from setup.rb:1532:in `traverse'
... 7 levels...
from setup.rb:826:in `__send__'
from setup.rb:826:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578
try runing ruby setup.rb install --prefix=/path [though it doesn't say this]
rdp@ilab4 ~/downloads/rubygems-0.9.4 $ ruby setup.rb --verbose install
rm -f InstalledFiles
---> bin
mkdir -p /home/rdp/i386/bin
install gem /home/rdp/i386/bin/
install gem_mirror /home/rdp/i386/bin/
install gem_server /home/rdp/i386/bin/
install gemlock /home/rdp/i386/bin/
install gemri /home/rdp/i386/bin/
install gemwhich /home/rdp/i386/bin/
install index_gem_repository.rb /home/rdp/i386/bin/
install update_rubygems /home/rdp/i386/bin/
<--- bin
---> lib
mkdir -p /usr/lib/ruby/site_ruby/1.8
install gemconfigure.rb /usr/lib/ruby/site_ruby/1.8/
setup.rb:633:in `initialize': Permission denied - /usr/lib/ruby/site_ruby/1.8/gemconfigure.r b (Errno::EACCES)
from setup.rb:633:in `open'
from setup.rb:633:in `install'
from setup.rb:1377:in `install_files'
from setup.rb:1376:in `each'
from setup.rb:1376:in `install_files'
from setup.rb:1350:in `install_dir_lib'
from setup.rb:1532:in `__send__'
from setup.rb:1532:in `traverse'
... 7 levels...
from setup.rb:826:in `__send__'
from setup.rb:826:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578
try runing ruby setup.rb install --prefix=/path [though it doesn't say this]
Tuesday, June 19, 2007
parameters in django templates
It seems that it may be possible to have parameters within called functions in a django template. {% url path.to.some_view arg1,arg2,name1=value1 %} (see http://www.djangoproject.com/documentation/templates/). GL!
Thursday, June 07, 2007
how to host static files in a django app for development
add the following to urls.py (first line optional :)
Then you can access /static_files/filename.jpg and it should work. See the other post for production setup :)
As a side note, "how to change your django app from development to production" is you go to settings.py and change
if settings.DEBUG: # then serve static files here :)
urlpatterns += patterns('',
(r'^static_files/(?P.*)$', 'django.views.static.serve', {'document_root': 'C:/office_in_out/oliver/drb/static_files', 'show_indexes': True}),
Then you can access /static_files/filename.jpg and it should work. See the other post for production setup :)
As a side note, "how to change your django app from development to production" is you go to settings.py and change
DEBUG = True
to DEBUG = False
. I'm not sure what to do with TEMPLATE_DEBUG after that :)
Wednesday, June 06, 2007
Django static files, using fcgi
On blue host we use fcgi. So here is how to make static subdirectories work.
Django wants to host static files, for example the admin interface uses static files (hosted at /media/) for its css.
To create these what you will want to do is create create some sym links within your public_html/whatever sub-directory, then instruct apache, in .htaccess, to follow those links.
Here's an example for my admin media setup.
media is the same name as the directory, above.
Repeat for other static files desired. Should work!
Django wants to host static files, for example the admin interface uses static files (hosted at /media/) for its css.
To create these what you will want to do is create create some sym links within your public_html/whatever sub-directory, then instruct apache, in .htaccess, to follow those links.
Here's an example for my admin media setup.
cd public_html/subdomain
ln -s media /home/wilkboar/checked_out_svn_all/edited_django_repository_files/django/contrib/admin/media
(media being where ADMIN_MEDIA_PREFIX is set to in settings.py -- defaults to media)
Then edit .htaccess, add
Options +FollowSymLinks
RewriteRule ^(media/.*)$ - [L]
media is the same name as the directory, above.
Repeat for other static files desired. Should work!
django strange error
so...ever get one of these?
It may be because you add to your urlpatterns, in settings.py, but forget to name it urlpatterns. Why this sometimes works, and sometimes doesn't, I have no idea :)
This is bad. it should be patterns('',...
GL!
Request Method: GET
Request URL: http://localhost:8000/generic_html/traffic_color_definitions.html
Exception Type: AttributeError
Exception Value: 'str' object has no attribute 'resolve'
Exception Location: C:\office_in_out\oliver\edited_django_repository_files\django\core\urlresolvers.py in resolve, line 163
It may be because you add to your urlpatterns, in settings.py, but forget to name it urlpatterns. Why this sometimes works, and sometimes doesn't, I have no idea :)
urlpatterns += ('',
(r'^static_files/(?P.*)$', 'django.views.static.serve', {'document_root': 'C:/office_in_out/oliver/drb/static_files', 'show_indexes': True}),
)
This is bad. it should be patterns('',...
GL!
Monday, June 04, 2007
D&C thought
Well it appears there was some confusion about D&C 89 on teh internet, thought I'd put in my $.02...
Noticed an article of yours at http://www.johnankerberg.org/Articles/apologetics/AP0501W1.htm and I thank you for your respectful comments (I am LDS). As a contemplative addition (something to think about), the reference in v. 7 to "strong drinks" may also be 'pointing back' to v. 5 "wine or strong drinks" which is why it is typically construed to mean alcoholic beverages. Some people get confused and it's easy to do so. Keep up the good work!
--
-Roger Pack
"Men are that they might have joy." (2 ne 2:25)
Noticed an article of yours at http://www.johnankerberg.org
--
-Roger Pack
"Men are that they might have joy." (2 ne 2:25)
Friday, January 19, 2007
throttling with apache
So it appears that there is no "good" throttler for apache 2.x -- mod_cband only allows a max of 123 KB/s or something like that--at least on the LAN, so I think this probably means that it is just too slow for large loads, and I cannot see another good throttler for apache 2.x
So we go ahead and use apache 1.3.x
Unfortunately this means that when you install apacche 1.3.x you need to install ./configure --enable-module=so (installs mod_so) so that you can THEN compile/use mod_throttle (found at http://www.ivor.it/throttle/)
So we go ahead and use apache 1.3.x
Unfortunately this means that when you install apacche 1.3.x you need to install ./configure --enable-module=so (installs mod_so) so that you can THEN compile/use mod_throttle (found at http://www.ivor.it/throttle/)
how to setup ssh to not prompt with planetlab
so with planetlab typically it has these 600 hosts and for each one, the first time you ssh into it, it prompts you if you want to accept that one's identification key.
To get rid of this:
to ~/.ssh/config
add
stricthostkeychecking=no
see the docs at "man ssh_config" which was were it was found.
To get rid of this:
to ~/.ssh/config
add
stricthostkeychecking=no
see the docs at "man ssh_config" which was were it was found.
Friday, December 15, 2006
off-center?
so...it appears that if your object is "off center" from its center, then its physics are messed up--meaning that edges of your objects might poke right through other objects, etc.--things you wouldn't anticipate. Courious, but overcome-able thankfully--center your objects [edit mode, "object" menu, :) transform, obData to center].
errors off by one
If you get an error message in blender, it says six, but error's on five, so subtract one. Thanks!
Tuesday, December 12, 2006
ipo's and parenting
I believe the best way to get the "dynamic 3d avatar" is to have a "fake person" that is attached to a real (invisible) parent, which parent has dynamics associated with it.
Also, it appears that you CAN set object arbitrarily in Blender (see the addObject2.blend example) by using "instantaddobject" and that instantreplacemesh also exists, BTW. Then you can change it more easily on the fly. (call "getlastcreated object" [?] immediately after calling that).
Also, it appears that you CAN set object arbitrarily in Blender (see the addObject2.blend example) by using "instantaddobject" and that instantreplacemesh also exists, BTW. Then you can change it more easily on the fly. (call "getlastcreated object" [?] immediately after calling that).
Thursday, December 07, 2006
ipo's versus frames
It appears that sometimes frames are "dropped" for whatever reason (the "framedout" message, perhaps?) and when it does not show the frame IPO's don't advance. So this throws off timing a little if you rely on IPO's finishing on time, but hey :-) Now we know.
Wednesday, December 06, 2006
Tuesday, December 05, 2006
how to do buttons in blender, and also how to set object property names
So--the mouse left guy fires TWICE--once when you click down, once wuen you click up. To check for this in the script run "sensor.isPositive()" or something like that.
You CAN add things to objects on the fly "getOwner().abc = 3" BUT these are reset if the scene is reset (or hard changed, I presume). With scene freezes I'm not sure what happens (!)
So life is good.
You CAN add things to objects on the fly "getOwner().abc = 3" BUT these are reset if the scene is reset (or hard changed, I presume). With scene freezes I'm not sure what happens (!)
So life is good.
Subscribe to:
Posts (Atom)