Friday, May 01, 2015
I thought I was burnout, but after a week of doing nothing with computer, felt bored, super bored.
Try to pick up reading again, and do some little programming when I'm free. still stay away from news.
Sunday, May 03, 2015
this time is easier, maybe I still remember what I read from those lisp books...
Thursday, May 07, 2015
almost finish Living Clojure, will probably read the macro chapter later. it's a nice book, can start working on real world project after reading it.
Thinking about upgrade to http2, in java world, jetty and undertow both implemented http2. however, TLS is one problem (no browser is willing to support non-TLS http2). anyways, wait for nginx probably.
Orgzly, org-mode on android. Tried, pretty good. Still need to find a better way to sync files (it supports dropbox, git repo is coming).
Saturday, May 09, 2015
quite a few posts about "old programmers" recently
- Why Lisp? | Hacker News
- 4 Reasons to Employ Older Developers : programming
- "7 timeless lessons of programming ‘graybeards’" - This was a good read. : programming
tried Facebook PathPicker, quite nice.
Monday, May 11, 2015
reading this long thread: What is the appeal of dynamically-typed languages? : programming
one thing I was wondering is why clojure is dynamically typed? (surely Rich Hickey has his reason for this decision). clojure has been mentioned quite a lot in this thread.
lein new reagent my-app cd my-app lein ring server // server started and browser opened // in a different terminal lein figwheel // start clojurescript compiler and watch for changes
then change to
src/cljs/my_app/core.cljs will instantly reflected in the browser autometically. (cool ~)
Tuesday, May 12, 2015
there is a ring wrapper for clojure: metosin/ring-swagger
also found some tools for my clojure stack:
other things just use java, pretty much what I need for now.
The Clojure Toolbox has more links.
Wednesday, May 13, 2015
for a long time I use jackrabbit webdav clinet, today I just tried lookfirst/sardine, and it's a lot cleaner and easy.
String baseUrl = "https://webdav.example.com/folder"; Sardine sardine = SardineFactory.begin("username", "password"); List<DavResource> resources = sardine.list(baseUrl); resources.stream().forEach(System.out::println); String filename = "file.txt"; InputStream is = sardine.get(baseUrl + filename); Files.copy(is, Paths.get(filename));
(note, for a simple GET, use
curl is easier)
Friday, May 15, 2015
Javaslang is a component that brings more functional to java, interesting.
but i'm already very satisfied with java 8. more and more of my scripting tasks have been moved to java 8 and clojure. now it's more simple to write, runs everywhere and standalone (all in one jar), it can also give you concurrency anytime you want.
Sunday, May 17, 2015
the big news of course is Announcing Rust 1.0, it's funny that everything is positive before a language hits 1.0, then people start complaining, suddenly everybody hates it. just like ruby, nodejs, go. I don't have time for rust right now, and still too soon to jump in.
for clojure descjop is a quick way to setup a electron (atom-shell) project, just follow the steps I can have a hello world desktop app up and running, how nice.
continuing adding tools to my website stack, will add a redis as cache and message queue. I can setup a rabbitmq / kafka / nsq, but redis is simple and good enough. ptaoussanis/carmine · GitHub is a redis client for clojure.
Thursday, May 21, 2015
my thrid attempt on reading Clojure Programming, still find it challenging. anyways, keep trying.
Friday, May 22, 2015
there's an article (Advantages of monolithic version control) talks about putting all stuffs in a big repo, which I found makes sense to my projects.
got confused about the usage of
comp, but found a good explaination here:
they all do the same:
(reduce + (filter odd? (map #(+ 2 %) (range 0 10))))
(def xform (comp (partial filter odd?) (partial map #(+ 2 %)))) (reduce + (xform (range 0 10)))
(defn xform [xs] (->> xs (map #(+ 2 %)) (filter odd?))) (reduce + (xform (range 0 10)))
(def xform (comp (map #(+ 2 %)) (filter odd?))) (transduce xform + (range 0 10))
and another explaination of "why":
As a rule, when a function works on a singular subject, that subject is the first argument (e.g., conj, assoc). When a function works on a sequence subject, that subject is the last argument (e.g., map, filter).
->>are documented as threading the first and last arguments respectively, but it is also useful to think of them as applying to singular or sequential arguments respectively.
For example, we can consider a vector as a singular object:
(-> [1 2 3] (conj 4) ; (conj [1 2 3] 4) (conj 5) ; (conj [1 2 3 4] 5) (assoc 0 0)) ; (assoc [1 2 3 4 5] 0 0) => [0 2 3 4 5]
Or we can consider it as a sequence:
(->> [1 2 3] (map inc) ; (map inc [1 2 3]) (map inc) ; (map inc (2 3 4)) (concat [0 2])) ; (concat [0 2] (3 4 5)) => (0 2 3 4 5)
Monday, May 25, 2015
for a new created compojure app, its standalone jar file is about 7M, smaller than I expected.
will put it in a docker container - I didn't think container is good for jvm app, since it is already running in a vm. but now I think maybe it's not a bad idea, the architecture is different now, things are decoupled to many small standalone components, use docker to manage them is easy and clean.
Tuesday, May 26, 2015
I don't quite understand transducer yet, even after some readings:
- Transducers are Coming — Cognitect Blog
- Transducers are coming to Clojure | Hacker News
- Clojure's Transducers are Perverse Lenses
- Understanding Clojure transducers through types
- Some trivial examples of using Clojure Transducers
I think there will be more on transducers when clojure 1.7 releases, just skip it for now.
There's a super cool firefox add-on: Window Master, very useful when you have more than one monitors.
Wednesday, May 27, 2015
lispy is a paredit-like emacs package for editing lisp codes, but using vi key bindings. however, I found it doesn't work well with evil-mode.
evil-lisp-state is another one, but extra keystrokes for the leader comination prefix.
Thursday, May 28, 2015
reading Read Lisp Hackers, I really like it, especially Pascal Costanza's chapter.
one of the interviewer, Edi Weitz, is writing a book: Common LISP Recipes: A Problem-Solution Approach
Friday, May 29, 2015
the other article on using ssh-agent to store authentication keys and allowing normal users
sudo to a special account then they can access remote servers, also an interesting one.
Saturday, May 30, 2015
lein is slow, I tried drip but seems not helping, may try something simular later.
- Older Entries
- 2015 April
- 2015 March
- 2015 February
- 2015 January
- 2014 December
- 2014 November
- 2014 October
- 2014 September
- 2014 August
- 2014 March
- 2014 February
- 2014 January
- 2013 December
- 2013 October
- 2013 July
- 2013 June
- 2013 May
- 2013 March
- 2013 February
- 2013 January
- 2012 December
- 2012 November
- 2012 October
- 2012 September
- 2012 August
- Newer Entries
- 2015 June
- 2015 July
- 2015 August
- 2015 September
- 2015 October
- 2015 November
- 2015 December
- 2016 January
- 2016 February
- 2016 March
- 2016 April
- 2016 May
- 2016 June
- 2016 July
- 2016 August
- 2016 September
- 2016 October
- 2016 November
- 2016 December
- 2017 January
- 2017 February
- 2017 March
- 2017 April
- 2017 May
- 2017 June
- 2017 July
- 2017 August
- 2017 September
- 2017 October
- 2017 November
- 2017 December
- 2018 January
- 2018 February
- 2018 March
- 2018 April
- 2018 May
- 2018 June
- 2018 July
- 2018 August
- 2018 September
- 2018 October
- 2018 November
- 2018 December
- 2019 January
- 2019 February
- 2019 March
- 2019 April
- 2019 May
- 2019 July
- 2019 October
- 2019 November
- 2019 December
- 2020 August
- 2020 September
- 2020 October
- 2020 November