Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
@skuro
skuro / sample.get.clj
Created May 10, 2011 18:04
Clojure WebScript sample
;; ns forms are currently useless
;; Import the protocol
(import '[spring.surf.webscript WebScript])
;; Let's make use of some utility functions
(require '[spring.surf.webscript :as w])
;; Concrete WebScript implementation
(deftype SampleWebScript
;; diegopacheco's solution to Compress a Sequence
;; https://4clojure.com/problem/30
#(reduce (fn[r n]
(if (= n (last r)) r (conj r n)))
(cons [] %1))
@diegopacheco
diegopacheco / ps3-wishlist.markdown
Created November 28, 2011 01:39
PS3 Games Wishlist
anonymous
anonymous / gist:1406238
Created November 29, 2011 20:09
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
@diegopacheco
diegopacheco / 1-meetup-functional-society.md
Created December 16, 2011 19:31
Functional Society #1 meetup 14/01/2012

First Meetup 14/01/2012

It's time!!! Let's meet each other on kick ass event at Porto Alegre.
Our very first meetup will be 14/01/2012(saturday) at 671, Jari st - Passo da Areia - Porto Alegre
Google Maps Adress => http://g.co/maps/frjub

Schedulle

@headius
headius / results
Created January 10, 2012 20:05
Compare Nokogiri on JRuby (Apache Xerces) with 1.9.3 (libxml2)
system ~/projects/nokogiri $ pickjdk 1
New JDK: 1.6.0.jdk
system ~/projects/nokogiri $ jruby -v xmlbench.rb
jruby 1.7.0.dev (ruby-1.8.7-p357) (2012-01-10 bd4cc62) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
11.331000 0.000000 11.331000 ( 11.331000)
10.239000 0.000000 10.239000 ( 10.239000)
10.185000 0.000000 10.185000 ( 10.185000)
10.113000 0.000000 10.113000 ( 10.113000)
10.120000 0.000000 10.120000 ( 10.120000)
;
; Monads
; ======
;
; * Without monads "pure" functional programming could be very impractical, Hack!
; * You can build environments that support exactly the features that you want
; * Functional able todo IO
; * Function Composition: LINQ, Unix Pipes
; * Good for control tracking of things
; * Encapsulating two things:
@diegopacheco
diegopacheco / fp_concepts_1.md
Created January 15, 2012 18:50
Functional Society - FP Concepts: Higher Order Functions, Currying and Lambda

This gist and a Functional Society Gist to talk about FP concepts, so people can share links and help each other to get the concepts right and make questions, get you question answered and so on and on...

3 FP Concepts

  • Higher Order Functions
  • Lambda
  • Currying

Some useful resources

@diegopacheco
diegopacheco / 2-meetup-functional-society.md
Created January 15, 2012 19:16
Functional Society #2 meetup 25/02/2012

Meetup 25/02/2012

It's time!!! Let's do another kick ass event at Porto Alegre.

Where?

671, Jari st - Passo da Areia - Porto Alegre | Google Maps Adress => http://g.co/maps/frjub
Ask for "Functional Society" or "Alexandre Poletto"

@diegopacheco
diegopacheco / bash_profile_tips.sh
Created January 22, 2012 17:33
How to Create a .bash_profile in Cygwin
cd /
mkdir /home/diegopacheco
echo "export HOME=/home/diegopacheco" >>.bashrc
echo "export HOME=/home/diegopacheco" >>.bash_profile
cp .bashrc .bash_profile /home/diegopacheco
echo "cd" >>.bashrc