|
A memory allocator's responsibility is to manage free blocks of memory. If you've never read a malloc implementation, you may have assumed that calling free simply causes memory to be released to the operating system. But acquiring memory from the OS has a cost, so allocators tend to keep free chunks around for a while for possible re-use before deciding to release them. Inside a very basic malloc implementation.
|
|
|
|
|
Today I got caught up reading a back and forth in twitter about a proposed assertion syntax for Ruby testing frameworks. It was interesting, but yet again it was about how to make tests 'read well.' It's hard to disagree with that, right? Well, I don't in principle, I just think about the amount of time we spend trying to warp programming syntax into English and I wonder whether it is really worth it.... The thing I wanted to blog about is the clash between this natural language style of programming and the other sorts of programming we do. The code should tell a story. Often, it's a tale of woe.
|
|
|
|
|
In this post, I’m going to show you how I made a Lisp to Javascript compiler. I really enjoy programming in Clojure but have often thought that the JVM isn’t always the best platform for scripts due to the slow JVM start-up. So, I decided to implement a simple version of Clojure that compiles to Javascript and can be run on top of nodejs. Compilers are notoriously hard to understand and therefore make for great mind-bending exercises. Exactly my idea of weekend fun. Let's compile all the things to JavaScript... the language everyone claims to hate.
|
|
|
|
|
As a die hard refactorer, but also pragmatic programmer, I often have a tough time articulating to other developers when a refactor is important and when it is gratuitous. I can imagine many people look at decisions I've made about when it is and isn't appropriate and think it's simply a whim or "when I feel like it". To clarify this for both myself and any future victims/co workers involved with refactoring decisions I may make, I submit this 10 item checklist. Note, writing test cases is a form of refactoring.
|
|
|
|
|
You should only ever refactor when you look at your code and think: that stinks.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
Google delivered some news for users of its Cloud Platform stable of services at its I/O event on Wednesday. Its Compute Engine service — which competes with Amazon Web Services — will now be available to all users, not just those willing to shell out $400 for support. But it also announced the addition of the most commonly requested feature for its App Engine platform cloud: support for the PHP programming language. I was really hoping for a COBOL to JavaScript compiler.
|
|
|
|
|
Open source software simply wouldn’t exist without the countless volunteers who give of their time to contribute to projects. These volunteers are the maintainers, contributors and advocates that make the OSS world go round.... While it may appear that its up to these contributors to take the initiative to put themselves out there, it’s important to remember that its also up to the project creators and maintainers to help pave the way. If an open source project has no contributors, how open is it?
|
|
|
|
|
The plans for Strongbox started nearly two years ago. Kevin Poulsen, investigations editor at Wired magazine, described how he built the tool with Aaron Swartz, who took on the coding for the project. Strongbox runs on the open-source DeadDrop. Through Strongbox, sources can securely and anonymously contact the New Yorker by accessing the New Yorker’s network on the Tor Project. Aaron Swartz's parting gift: safety for wistleblowers.
|
|
|
|
|
I find Google’s evolution quite intriguing. While I think there’s always a danger to judge Google (or Apple) in terms of rumors, I think it fair to try and infer their product strategy from their actions and announcements.... Here are a few thoughts from the announcements at Google IO so far. Note that I’m just going by the announcements. It may be that when these are released as actual products to the public some of my concerns may already be addressed. What do you think of Google's announcements this week?
|
|
|
|
|
Google used its biggest event of the year to reveal a major overhaul to Google Maps, an ambitious messaging initiative called Hangouts, and a redesigned Google+ filled with new features. The three-day long developer event is taking place between Wednesday, May 15th and Friday the 17th for 2013. Google has a lot in store for the event, and you can follow along here for the latest. Not even Google provides a one-stop source for all their I/O announcements.
|
|
|
|
|
CodeProject.TV interviews Zeeshan Syed, Founder of Hak Studio and one of the recent winners of AngelHack Global in San Francisco. Our coder interviews are going video! Tune in and meet Zeeshan Syed.
|
|
|
|
|
GIT works great with the new Team Foundation Service (TFSvc?). I’m an old school Tortoise guy (SVN, Hg, GIT), but I had to laugh at the little branding touch they through in when doing a pull. Notice the Visual Studio logo in ASCII art. I’ve actually been using it for some time, but I hadn’t notice that until today. The good news is that this is just GIT.
|
|
|
|
|
And the Git extensions crash VS2012. Go figure. I tried with all extensions disabled, but only uninstalling the Git extensions stopped the crashes. I like Git, but I will stick to the command line for now, thank you very much.
Gryphons Are Awesome! Gryphons Are Awesome!
|
|
|
|
|
Your signature there had me trying to read your name backwards for a second!
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Heh. I figured out how to do that from XKCD. Love that webcomic.
Gryphons Are Awesome! Gryphons Are Awesome!
|
|
|
|
|
I watched the dotNetConf .NET Open Source Panel last week. It was a bit disappointing to hear defeatism in the voices of OSS project leaders, because .NET’s future appears to rely entirely on the success of open source software for .NET. Here are a couple reasons... It feels as if Microsoft has shifted focus away from .NET, and with the focus goes resources and innovation.
|
|
|
|
|
Terrence Dorsey wrote: It feels as if Microsoft has shifted focus away from .NET, and with the focus goes resources and innovation.
And we're surprised how???
Marc
|
|
|
|
|
WinRT only applies to store apps running in full screen (without addons) in the new Win8 interface. So it doesn't replace anything since it doesn't service the desktop app needs. And everything is not a web app, so it would seem there's still plenty need for desktop apps and nothing new seems to be replacing that. Yet you hear these cries that X, Y, or Z are "dead"... Its a bit confusing to figure out where they're headed with this. Maybe they're not even sure themselves
|
|
|
|
|
In order to understand Asm.js and where it fits into the browser you need to know where it came from and why it exists. Asm.js comes from a new category of JavaScript application: C/C++ applications that’ve been compiled into JavaScript. It’s a whole new genre of JavaScript application that’s been spawned by Mozilla’s Emscripten project. Emscripten takes in C/C++ code, passes it through LLVM, and converts the LLVM-generated bytecode into JavaScript (specifically, Asm.js, a subset of JavaScript). This is how we get the Unreal engine running in a browser.
|
|
|
|
|
I have had a love/hate relationship with regular expressions in the past. Reading or writing a regular expression typically made me feel like I was toying with a broken Rubiks Cube. However, after I would fiddle an expression into submission, almost by accident, and it did its job, I would become enamored with its brevity and power. It wasn't until I re-adjusted my thoughts on the nature of regular expressions that my fear of them turned into pleasure. After you read this long tutorial on regex, you could probably summarize it using regex.
|
|
|
|
|
|
Terrence Dorsey wrote: After you read this long tutorial on regex, you could probably summarize it using regex.
What I want to see are the unit tests for validating a regex parser.
Marc
|
|
|
|
|
At the end of a CMS collection its possible for some objects to not have been deleted - this is called Floating Garbage. This happens when objects become de-referenced since the initial mark. The concurrent preclean and the remark phase ensure that all live objects are marked by looking at objects which have been created, mutated or promoted. If an object has become dereferenced between the initial mark and the remark phase then it would require a complete retrace of the entire object graph in order to find all dead objects. This is obviously very expensive, and the remark phase must be kept short since its a pausing phase. This isn't necessarily a problem for users of CMS since the next run of the CMS collector will clean up this garbage. Part of a series on implementing GC in a Java app.
|
|
|
|
|
A few month back, Apple quietly slipped a very nice Objective-C to Javascript bridge into WebKit.... This new API supports straightforward embedding of the JavaScriptCore interpreter into native Objective-C projects, including reading and writing variables and object members with appropriate type coercion, calling methods on JavaScript objects, and directly binding Objective-C objects into JavaScript. It seems likely that this API is going to become public in Mac OS X 10.9 (where JavaScriptCore is already a public framework), and it might be a hint of an eventual public API on iOS. Either way, a new option for building hybrid JavaScript apps is here. The start of Apple’s evolution away from Objective-C?
|
|
|
|
|
It's often said that the web needs a bytecode.... basically the point is that people want to use various languages on the web, and they want those languages to run fast. Bytecode VMs have been very popular since Java in the 90's, and they show that multiple languages can run in a single VM while maintaining good performance, so asking for a bytecode for the web seems to make sense at first glance. JavaScript is already very close to providing what a bytecode VM is supposed to offer.
|
|
|
|