406 karma · joined Aug 3, 2009 (17y ago) · 84 submissions
comment 12y ago · link · parent
Incidentally, I find this sidebar extremely distracting; maybe it's time for a plugin/script to fix it.
comment 12y ago · link · parent
comment 12y ago · link · parent
http://www.reddit.com/r/haskell/comments/1rpte3/explanation_...
comment 13y ago · link · parent
comment 13y ago · link · parent
Is Scheme really decreasing in usage? Sure, in recent years there have been high-profile moves to Python at MIT and UCB, but I don't know of any hard stats on worldwide Scheme usage. Not that it matters.
comment 13y ago · link · parent
Also, the garbage collector will often move lists into contiguous region(s) of memory.
More to the point, though, sometimes a list is the appropriate data structure for a problem (like returning all intermediate results from the Collatz call, where you don't know how many there will be). Sure, you could use an array and double its size every now and then, but you're doing an awful lot of violence to your program just to handle something the runtime could take care of for you :)
And yes, I know there will be a slight performance penalty under many circumstances.
comment 13y ago · link · parent
$ wc -l /usr/share/dict/words
119095
$ python -c 'print(119095 ** 4)'
201175048646341950625
$ python -c 'print(85 ** 10)'
19687440434072265625
So, even if your target is known to be using this scheme in pure form, this has more entropy than a completely random 10-digit password (assuming ~85 characters) -- and who would actually be using such a thing, except someone using a password management program - who could just as easily be using a 20-character random password?So even if it becomes known, it's an improvement on what users are doing now.
comment 13y ago · link · parent
There's currently an attempt to formalize a subset of C, with an axiomatic semantics, all the way from specification down to machine language: http://vst.cs.princeton.edu/
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
Some students were probably 'sucking up'. But nearly every student?
comment 13y ago · link · parent
comment 13y ago · link · parent
18.
Online draft of "Parallel and Concurrent Programming in Haskell"(ofps.oreilly.com ↗)
2 points · by Fixnum · 13y ago · discuss
comment 13y ago · link · parent
I strongly agree -- and the Lisp/REPL combination is extremely helpful. Specifically, I believe a Scheme-based approach is the best way to learn programming, even if you eventually decide to migrate to something less fortunate like Javascript or Python ... in under an hour from your first exposure you can be thinking about stuff rather than the syntax of loops. I won't attempt to justify the pedagogical reasons for this choice here.
Specifically, I'd recommend (1) using Racket, a "batteries-included" Scheme derivative with a simple IDE/debugger, and either (2) Concrete Abstractions (free at https://gustavus.edu/+max/concrete-abstractions-annotated-to...), or (3) the upcoming book Realm of Racket (coming in May), which will cover some of the same CS 101 material as well as GUI and distributed programming via writing games in Racket. (There is an earlier book called Land of Lisp but I feel its environment (CLISP) and coding practices are rather baroque.)
Depending on your student's interests you could simultaneously look at some web programming (plenty of HTML/CSS material is available from Mozilla, Google, etc.; there's an upcoming Udacity course on HTML5 game programming), lower-level stuff like assembly, arduino, or whatever.
Hope this helps.
comment 13y ago · link · parent
I don't know how one could argue that, e.g., releasing cables showing the Afghanistan war is "unwinnable" (a la Daniel Ellsberg), showing the deep hypocrisy and corruption of many governments (e.g., the Saudi rulership), and the bullying of all sorts of governments into falling in line with American military and economic interests isn't a "good".
If there haven't been any visible policy changes by the US government, then perhaps it's because such a change is not easily to connect directly to Wikileaks. Of course, it could be that Robert Gates is correct in saying claiming that consequences for US foreign policy (from the leaked diplomatic cables) have been "modest". If true, that is unfortunate, but surely not the fault of Wikileaks?
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 14y ago · link · parent
I'm not sure Cloud Haskell is ready to dethrone Erlang (and the OTP framework, and tooling for debugging distributed processes, and special VM features, ...) for high-reliability distributed computing today, but Haskell and its libraries are evolving with absurd speed and the Cloud Haskell ecosystem could certainly be competitive with Erlang in the near future. Haskell can certainly be used to write high-performance network applications (e.g., Mighttpd, Warp), so it's surely only a matter of time ...
comment 14y ago · link · parent
As inetsee says, Scheme is this. It will provide you with a firm basis for actually understanding how programs execute. (Theoretically, learning C will also do this, but if you want to come from that direction I recommend learning some assembly language instead, since the semantics of C are surprisingly complex). Stretching the analogy rather dangerously, Scheme is as relevant to the past, present and future of other languages as Latin (though this is a conceptual rather than historical truth), as pedagogical/minimalist as Esperanto, and as expressive as English.
Also, if you find HtDP too tame or SICP too challenging (certainly possible unless you have a science/math background, though most parts requiring specific knowledge are optional), try Concrete Abstractions (http://gustavus.edu/+max/concrete-abstractions.html).
comment 14y ago · link · parent
(define memo-fib (memoize fib)) ;; example from SICP (memo-fib 40) ;; long wait
I would love to see a good general-purpose 'memoize but rather doubt it's possible, though I think I remember seeing one in Common Lisp in "Paradigms of Artificial Intelligence Programming" that exploited CL's weird namespacing rules for functions to make recursive functions like 'fib run fast.
28.
Pharmaceutical research routinely suppressed: BMJ study(mcclatchydc.com ↗)
4 points · by Fixnum · 14y ago · discuss
comment 14y ago · link · parent
On the other hand, she's not arguing for limiting ourselves to video lectures. Her point (see page 2) is that class time is precious and shouldn't be wasted on lecturing but on problem solving, critical thinking, and discussion, and this I totally agree with. (Why is it taking institutions so long to figure this out?)
comment 15y ago · link · parent
That said, the Dirac equation (or relativistic QM more generally) as well as the Feynman path integral (the idea of which originated from a 1933 paper of Dirac) are pretty indispensable in modern condensed matter physics.
[1] https://secure.wikimedia.org/wikipedia/en/wiki/Fermi%E2%80%9...