lunes, 29 de julio de 2013

TIL: 2013-07-29


  • There are many different ways to completely remove a file from a git repo
  • A CLOS user can change the method combination algorithm for a given function.

martes, 23 de julio de 2013

TIL: 2013-07-23

Today I Learnt:

  • Push a local git branch to a remote with different name:
  • git push origin local_branch:remote_branch 
  • Nginx lua path refering to the nginx -p flag
  •   lua_package_path ";;$prefix/?.lua;";

New section: TIL

With my friend and coworker Mikz, the other day something came out:

"We could do a 'Today I Learnt' daily/weekly meeting, where everyone would tell the others in one sentence something that he/she (unfortunately 100% chances of he) learnt that day/week. That would be a nice starting point for ideas/brainstorms/discussions or just sharing knowledge.

I liked the idea so much that I'll start a section here, where I'll put this kind of stupid things you learn that you normally wouldn't share because "it's just in the docs", or "it's simple, you just have to use it once and that's it" .

We'll see how it turns out.

miércoles, 10 de julio de 2013

Iterating through closures

At 3scale we're developing a product using lua.

It's kind of fun to work in a new project and even more to work with a small and malleable language (and even *more* working with a top-notch lua guy).

Part of the fun working with lua is that the language is so minimal that you have to build your own helpers for some functions that you'd have in other languages, but lua makes it really easy and straighforward.

Here's an example that just appeared when I was writing some tests (using busted, of course)


                
                local f = function()
                  local c = false
                  return function()
                    c = not c
                    return c
                  end
                end
                local l = f()

It's a plain simple closure, I know, but maybe it'll be ilustrative to some ppl not used to this approach.

It's just an iterator that returns true/false as you keep calling it.

You know, closures are the poor-man's objects, and objects are the poor-man's closures.

miércoles, 3 de julio de 2013

Farewell Mr Engelbart

So another of the great guys in CS passed away today.

The visionary man that conceived and brought to life many many things that we give for granted today.

Mouse and other input devices (I recall the one-hand keyboard), the first interactive systems, remote connections,.... all that during the fifties and sixties. A truly impressive amount of leaps from what existed at that time.

I haven't read anywhere explicitly about the relation between Engelbart and Smalltalk, but I'm more than sure that Douglas heavily influenced Kay, and probably the reverse is also true.  Probably one of the 5 most innovative guys in our field. Ever.

For those who don't know about Mr. Engelbart, you have to check "The mother of all demos". Look for the videos yourself. And try to imagine that in the sixties.

Here's a spanish link that talks about innovation, where Kay and Engelbart are mentioned lots of times. a good read also.

And another link about Aaron Schwartz, which links also to Douglas Engelbart. The image in that post and the post itself hit me hard when I saw them the first time. also, recommended read.