Thinking until the 2147483648'th second

About This

I think all of the files I linked to in some of my older posts are gone now. I am working on fixing them.

Tuesday, October 30, 2007

shift/reset with correct dynamic environment for Gambit

I think there's a lot of potential for delimited continuations in graphics engines, and I plan on using them in what I'm working on. I am using Gambit Scheme however, which does not have a full shift/reset implementation. For the past couple weeks I looked into implementing shift/reset for Gambit (with a fixed dynamic environment), and I got it to work! I posted the following message on the Gambit list earlier today:


"Hello everyone,

I have been studying delimited continuations recently. After being
blissfully enlightened, I really wanted to have them in Gambit (with a
*correct* dynamic environment). I wasn't sure if this was possible
non-natively though (at least safely), because Gambit's dynamic
environment is somewhat complex, and I have to be able to
destructively manipulate the dynamic environment to make sure the
delimited continuation truly has its own dynamic environment 'slice'.

However, I figured out how to (hopefully safely) manipulate Gambit's
dynamic environment, and I have a full implementation of shift/reset
running in Gambit. This implementation is based off Oleg Kiselyov's
work; his paper is here:

http://okmij.org/ftp/Computation/dynamic-binding.html#DDBinding

I am not sure of the performance implications of the Gambit version of
shift/reset. I am unhappy with how much has to happen per reset or
shift, but such is the cost of a non-native implementation.
Unfortunately it goes against the grain of Gambit; after looking at
some of Gambit's internals, Marc obviously has fine-tuned the code to
be very efficient, and each reset or shift call is quite heavy
compared to call/cc. Marc... what are thoughts on a native
implementation of shift/reset?

I included some tests which show that the dynamic environment does
act the way we expect. [see 'tests.scm', snipped the tests out for the sake of this post]

If you are a zipped tar kind of guy:
http://james.tech.coptix.com/files/shift-reset-gambit/shift-reset-gambit.tar.gz

Or you just want the files:
http://james.tech.coptix.com/files/shift-reset-gambit/shift-reset-fixed.scm
http://james.tech.coptix.com/files/shift-reset-gambit/shift-reset-broken.scm
http://james.tech.coptix.com/files/shift-reset-gambit/tests.scm

'shift-reset-fixed.scm' contains the full shift/reset implementation.
'shift-reset-broken.scm' contains a naive implementation with a broken
dynamic environment.
'tests.scm' has some tests to show how the dynamic env is fixed. Note
that at the top you can include 'shift-reset-broken.scm' instead of
the fixed version to see how the dynamic env would normally be broken.

James"

14 comments:

Anonymous said...

酒店打工

酒店兼職

台北酒店

打工兼差

酒店工作

酒店經紀

禮服酒店

酒店兼差

酒店上班

酒店PT

酒店

酒店喝酒

酒店消費

喝花酒

粉味

喝酒

Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.

Anonymous said...

Validate Our Dim Prices at www.Pharmashack.com, The Firstly [b][url=http://www.pharmashack.com]Online Dispensary [/url][/b] To [url=http://www.pharmashack.com]Buy Viagra[/url] Online ! You Can also Espy Bounds Deals When You [url=http://www.pharmashack.com/en/item/cialis.html]Buy Cialis[/url] and When You You [url=http://www.pharmashack.com/en/item/levitra.html]Buy Levitra[/url] Online. We Also Up astray a Signal Generic [url=http://www.pharmashack.com/en/item/phentermine.html]Phentermine[/url] On account of Your Regimen ! We Hawk Catch apex take it for granted [url=http://www.pharmashack.com/en/item/viagra.html]Viagra[/url] and Also [url=http://www.pharmashack.com/en/item/generic_viagra.html]Generic Viagra[/url] !

Anonymous said...

Make the animalistic with two backs casinos? experimentation this late-model [url=http://www.realcazinoz.com]casino[/url] advisor and accomplish displeasing up online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also into our untrained [url=http://freecasinogames2010.webs.com]casino[/url] sustain at http://freecasinogames2010.webs.com and subsist crap tangled currency !
another late-model [url=http://www.ttittancasino.com]casino spiele[/url] fetter of events is www.ttittancasino.com , pro german gamblers, break into uphill during strewn online casino bonus.

Anonymous said...

I read this forum since 2 weeks and now i have decided to register to share with you my ideas. [url=http://inglourious-seo.com]:)[/url]

Anonymous said...

Making money on the internet is easy in the underground world of [URL=http://www.www.blackhatmoneymaker.com]blackhat cpa[/URL], It's not a big surprise if you have no clue about blackhat marketing. Blackhat marketing uses little-known or little-understood ways to produce an income online.

ally said...

Apart from these military fashion tops and ripped and torn jeans are also hip and happening this seasonwholesale LV handbags
monclerdiscount moncler jacketsmoncler coatsmoncler vestmoncler outletmoncler t-shirtmonclermoncler jacketsnew moncler coats
moncler vestmoncler outletmoncler polo t-shirtCoach handbags outletCoach TotesCheap Coach handbag 2010Discount Coach hand bagAuthentic Coach handbagNewest Coach handbags outletcoach outletLouis Vuitton TotesLouis Vuitton handbagsLV handbags 2010Discount LV handbagsCheap Louis Vuitton Outletnewest Louis Vuitton handbagscheap rain weardiscount rainweardog rain jacketscolorful rain bootsrainboots outletCheap Ture Religion Jeans outletDiesel JeansLevis JeansWholesale Ed Hardy JeansDiscount Dior Jeans outlet
cheap abercrombie fitch clothingdiscount abercrombie fitch T-shirtsdiscount abercrombie and fitch hoodiesabercrombie fitch outletwholesale abercrombie fitched hardy wholesaleLeather jackets are a must in the wardrobe this season.

ally said...

In the casual attire category tracksuits and tank tops rule for men.discount ed hardy wholesalewholesale ed hardyed hardy outletugg bootscheap ugg bootsdiscount ugg bootsclassic ugg bootsugg classic tall bootsdiscount abercrombie and fitch outletdiscount abercrombie outletdiscount abercrombie clothingdiscount abercrombie jacketdiscount abercrombie shirtdiscount abercrombie and fitch outletdiscount bercrombie and fitch clothesdiscount abercrombie and fitch hoodiediscount abercrombie and fitch shirtsdiscount abercrombie fitch jacketBesides, the urban trend, vintage clothing will also rule this season.

Microsoft Office 2007 said...

Office 2010
Microsoft Office 2010
Microsoft word
Office 2007
Microsoft Office
Microsoft Office 2007
Office 2007 key
Office 2007 download
Office 2007 Professional
Outlook 2010
Microsoft outlook
Microsoft outlook 2010
Windows 7

Anonymous said...

I do not doubt it.

weddingdresses said...

Scam, fraud, and a hoax are just a few words that can be used to describe, the international phenomena known as Power Balance . Many students around the quad can be seen wearing these colorful power balance bracelet is very popular all over the world. which are believed to help balance; however, they are more or less a simple silicon bracelet with a hologram sticker and winter boots .

Anonymous said...

I've got an .mpg file, which was made from an .avi by what I don't know, and though it plays okay Virtual Dub, which I was trying to use to brighten up the picture a bit, won't process it because it says an audio frame is incomplete.

An audio frame! I'm pretty sure that's what it said.

How can i fix it or work with Virtual dub so's it can fix it?

regards,

ab :)
[url=http://www.topvideoconverter.com/ipad-video-converter/]ipad video converter[/url]

Health Blog said...

Unfortunately it goes against the grain of Gambit; after looking...

Generic Viagra said...

Very interesting points in your blog it sure cleared many questions that I may have had. I loved it because I did learn a lot from it because of it.

Random Notes

I work at Coptix

Ideas / To-do

  • Research .Mac style photo gallery for screenshots