Going evented with Node.js - Naked JavaScript ↪
I like Javascript, but I dislike DOM and HTTP.
Talks of a very cool project and the more general issue of separating JS from the browser.
Going evented with Node.js - Naked JavaScript ↪
I like Javascript, but I dislike DOM and HTTP.
Talks of a very cool project and the more general issue of separating JS from the browser.
I don’t understand why IDAPython does not do this out of the box. But I love this, bring on the RPC server.
Best AV ad I have seen.
I wonder how much it sucks?
The major feature of a dynamic language is interactivity. With Smalltalk you may run the program and inspect/change it at runtime. This implies some GUI for VM with built-in crappy text editor: you don’t edit files, you edit objects now.
This does not sound very comfortable for many reasons. First, you would always want to have a “canonical” state of your application which is not affected by runtime mutations: that is, plain text files stored under some version control. Next, you would like to use a different text editor or GUI and it is much simpler to achieve when you operate with plain files instead of fancy VM/language-specific API.
How do we combine interactivity of Smalltalk with text file editing? Let’s take the puriest OO language ever designed: Io.
1. Each file contains an expression.
2. The only way to load the file is to evaluate it in context of some object:
object doFile("file.io"). The return value would be a result of the expression in the file.3. We may have a convention that some files return a prototype object: the object which is used as a prototype for other objects created in runtime.
4. To load “prototype object” we use a special loader object which would track the file-to-object mapping:
Article := Loader load("article.io")5.
Loadermonitors the filesystem and when some file is changed, it loads it into another object and replaces the prototype with that object:Article become(load("article.io"))6. At that point, all articles in the system suddenly have another version of Article proto.
You have to follow some safety rules. For instance, proto’s descendants should not modify the proto and rely on such modifications.
Of course, this method still does not allow you to change/inspect
any object in the system. For this to work you may put a breakpointmessage somewhere and use a debugger after the proto is reloaded and VM stepped on that message. Or wire some Smalltalk-like GUI to your app.Simple proto-based reloading helps development a lot and in contrast to class loading methods with full app reload, works faster and for full range of source code including all libraries. Rails dependency system does not reload gems, but does a pretty good job with constant reloading. All ruby/rails issues with global data applied.
1. Some GCs do pointer recognition in the arbitrary data array (e.g. Boehm-Demers-Weiser GC); this is not necessary if GC should track objects of the known structure (e.g. Steve Dekorte’s GC)
2. If we track object references only, there’s no need to fight fragmentation of the GC-managed heap: all entries are of the same size.
3. After coding Obj-C for a while, I’ve noticed that the only issue which should be resolved by some kind of garbage collector is circular references. Retained properties and autorelease pools already help to avoid manual retain/release calls. That is: allocation should be always succeeded by autorelease and all the properties should be nullified on deallocation (this could be done automatically).I wonder if it is possible to use a simple reference-counting mechanism with a simple referential cycles resolution, thinking that way we can imagine a very simple and efficient garbage collector.
References:
1. Minimizing Reference Count Updating with Deferred and
Anchored Pointers for Functional Data Structures by Henry Baker
2. Concurrent Cycle Collection in Reference Counted Systems by David F. Bacon and V.T. Rajan
Paper: sRuby - A Ruby dialect for low-level programming ↪
This is an evolving document describing sRuby, a subset of Ruby that can be easily compiled to fast low-level code. The purpose of developing sRuby is to use it to implement a Ruby virtual machine. However, we anticipate that it can be used to write Ruby extensions that needs to bridge the gap between Ruby and a low-level language (C) in an easy and portable way.
Robert Feldt
April 4, 2001
Code documentation has an aging component to it, and artifacts like design documents are rarely representative of the code. Comments are ‘younger’ in some sense, but we’ve all seen tons of comments that make no sense. So read the comments and such, but think of them as archeological hints at best. They tell you what the code might have been trying to do, sometime in the past.
― How to Read Other People’s Code (via inky)
Speaking of coding, meet BulletML. In the creator’s broken English:
BulletML is the Bullet Markup Language. BulletML can describe the barrage of bullets in shooting games.
You guys have proven again and again that shmups are boring, but BulletML is a rather inventive use of XML that turns something like this:
<bulletml type="vertical" xmlns="http://www.asahi-net.or.jp/~cs8k-cyu/bulletml"> <action label="top"> <fire> <direction>50</direction> <bullet/> </fire> <wait>32-$rank*16</wait> <fire> <direction>-50</direction> <bullet/> </fire> <wait>32-$rank*16</wait> </action> </bulletml>Into what you see in the above video. (Not exactly: the above code is a very simplistic example, and what the video demonstrates is not.)
The above video, by the way, is of rRootage, a shmup made by the guy that made BulletML, that generates all its bullet patterns with BulletML. (Thanks to it being open source, it’s also been ported to OSX and the iPhone, though I hear the iPhone port sucks.) It even includes all the XML files loaded up with the necessary code, which means you could just edit them and make your own rRootage bullet patterns quite easily.
There’s a demo applet loaded with plenty of examples, including bullet patterns from
yourmy favourite shmups recreated in BulletML.
Now it’s seven o’clock and I’m still just sitting here. I can’t even work up the energy to get high. At some point I’m going to have to go home. But right now I just need to sit here for a while more and do some thinking.
We let them know when we’re coming to visit, and they give us a tour and put on a little show of how great things are, and how wonderful the dorm life is, and afterward we pretend to keep an eye on them — but it’s all theater. It is. We know it. What’s more, you know it. Everyone knows it.
George Carlin - Saving the Planet (via comraderussian)