:dev profile by default in nrepl.el
To activate :dev profile when doing M-x nrepl-jack-in:
(add-hook 'nrepl-mode-hook
'(lambda ()
(set-variable 'nrepl-server-command
"lein with-profile dev repl")))
To activate :dev profile when doing M-x nrepl-jack-in:
(add-hook 'nrepl-mode-hook
'(lambda ()
(set-variable 'nrepl-server-command
"lein with-profile dev repl")))
— http://nataly-hill.livejournal.com/1777392.html
— http://krylov.livejournal.com/2866284.html
When listening to music, however, we are not just listening to a series of disconnected instants. Instead, the way things sound depends on the notes we have heard. In other words, we integrate over time
Some song name — generated by SoundHelix 0.5 (r665), build on 2012-10-07. Default XML configuration (SoundHelix-Piano.xml).
midiFilename tag (to save results in midifiles/)mkdir midifilesjava -jar SoundHelix.jar examples/SoundHelix-Piano.xml -s 'Some song name'. Song name seeds the random number generator. A MIDI file is saved to midifiles/.timidity midifiles/Some_song_name-device1.mid -Ow.lame --preset medium midifiles/Some_song_name-device1.{wav,mp3}.id3v2 -a "$(java -jar SoundHelix.jar --version)" -t 'Some song name' -y $(date +%Y) -g 'Algorithmic Composition' midifiles/Some_song_name-device1.mp3A recent post by Mike Anderson motivated me to write down my own ideas about an ideal multi-dimensional array API in Clojure:
https://gist.github.com/4477420
Tl;dr:
numpy.ndarray is a success, we need something similar: a homogeneous, fixed-size, multi-dimensional array,get (random access), shape (=> vector), slice (=> arrays as views), reshape and index-map (index space transforms), map (lifting scalar functions), stack (composing arrays => arrays as views), apply-dim (dimensionality reduction), copy (force views, make contiguous mutable copies), to-ndarray (conversion from other collections, no-op conversion from another array); I suppose the core API to be a protocol (except for copy and to-ndarray),argmin, argmax, etc), zero-copying sorting (argsort), partial and complete reductions,transpose, flatten, cyclic-shift, etc), input-output functions (loadtxt,savetxt, imread, imwrite),The proposed core API is not orthogonal. Strictly speaking, reshape is not orthogonal to index-map, but it’s easier to implement as a separate function; apply-dim is redundant if we have slice and map, but I suppose some implementations may optimize it; slice can be merged with get; copy and to-ndarray can be merged too, no-op conversion may be moved to utilities.
Open questions:
copy and to-ndarray _usually_ produce?); ideally it should be able to accomodate any Clojure number as well as user-defined types like Complex.transpose implemented via index-map), how do optimized array implementations overload them?I analyzed my recent Python scripts, and it appears that the most used NumPy/SciPy symbols are:
asarray by a large marginlinspace, three times less often than asarraymeandotsqrtrollhstackfloat32 (that’s not a function, but a type)loadtxtlinalg.normarange (I use it four times less often than linspace)array (copy-by-default, much less used than asarray)wherediffcumsumsavetxt (two times less often than loadtxt)maxcrosssinonesOverall, the most used functions
loadtxt, savetxt)hstack, roll…) and default arrays (ones, zeros, linspace, arange…)dot, cross, norm)mean, cumsum, max, …)sqrt, sin, …)roll, diff)This may be useful to know when designing a custom array-like API (I still wish I had time to write a Clojure wrapper around Commons Math).
I counted only qualified and explicit imports (“import numpy as np”, “from nump import foo”). I didn’t count scripts which use from ... import *. That’s too much work for grep and sed. I also didn’t count use of array object’s methods. This would require static analysis of Python code.
Do you know tools for such an analysis?
I watched this video probably 10 times already.
Silbergeier - Nina Caprez & Cedric Lachat (barakafilms38)