- 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.
lunes, 29 de julio de 2013
TIL: 2013-07-29
martes, 23 de julio de 2013
TIL: 2013-07-23
Today I Learnt:
Nginx lua path refering to the nginx -p flag
- Push a local git branch to a remote with different name:
git push origin local_branch:remote_branch
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.
"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)
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.
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.
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.
jueves, 27 de junio de 2013
github + emacs + conkeror = m-x github-clone-repo
Well, after a month of no activity in this blog (too many real life
issues to attend like european lisp symposium, european CL meeting or Barcelona Music HackDay and Sonar2013 itself), Whatever, I'm back to blogging.
it for most of the tasks, and trying to configure it properly for all
my needs.
It feels really nice when the same shortcuts you'd use in emacs work
in your browser, and in fact, it has a very emacsy approach also on
the code. The browser is written in javascript, and it also has
page-modes, interactive functions, minibuffer, etc...
movements. I had that feeling and wrote org-protocol-github-lines to
add links in github pages that pointed to emacs.
Another feature of org-protocol-github-lines is that you have a new
button on top of github urls where you can clone a repo to your machine.
tasks (the same I'd do with emacs). So I wrote this little snippet
that you can put in your .conkerorrc and m-x github-clone-repo to get the repo on your box
. provided you have emacs-server running and
org-protocol-github-lines.el evaluated .
If you want to give it a try, you just have to get conkeror, org-protocol-github-lines, and this snippet. And configure them Probably I'll add the snippet to the repo. Pull Requests are also very welcome.
issues to attend like european lisp symposium, european CL meeting or Barcelona Music HackDay and Sonar2013 itself), Whatever, I'm back to blogging.
Conkeror
Lately I started to use conkeror as my main browser. That means usingit for most of the tasks, and trying to configure it properly for all
my needs.
It feels really nice when the same shortcuts you'd use in emacs work
in your browser, and in fact, it has a very emacsy approach also on
the code. The browser is written in javascript, and it also has
page-modes, interactive functions, minibuffer, etc...
Awareness
When you use an extensible software you start becomming aware of yourmovements. I had that feeling and wrote org-protocol-github-lines to
add links in github pages that pointed to emacs.
Another feature of org-protocol-github-lines is that you have a new
button on top of github urls where you can clone a repo to your machine.
So what?
Since I have m-x in my browser, I try to write commands for repetitivetasks (the same I'd do with emacs). So I wrote this little snippet
that you can put in your .conkerorrc and m-x github-clone-repo to get the repo on your box
. provided you have emacs-server running and
org-protocol-github-lines.el evaluated .
If you want to give it a try, you just have to get conkeror, org-protocol-github-lines, and this snippet. And configure them Probably I'll add the snippet to the repo. Pull Requests are also very welcome.
lunes, 27 de mayo de 2013
yet another git reset cheatsheet
After some time since my last git post, here I come again with a link to an explanation of wtf git reset is doing.
It's mostly the same as I pointed in a post 2 years ago, but just explained in a different way, shorter, and probably easier to print in a small paper and stick it in your table.
Enjoy :)
PS: There's a poll running on reddit about git clients. No matter what you're using, vote for magit :)
It's mostly the same as I pointed in a post 2 years ago, but just explained in a different way, shorter, and probably easier to print in a small paper and stick it in your table.
Enjoy :)
PS: There's a poll running on reddit about git clients. No matter what you're using, vote for magit :)
Suscribirse a:
Entradas (Atom)