Notes I typed live for the class, typically with their input. Tuesday, 3/1/16 Some post-Haskell points: Not having state is a pain. Higher order functions are saving grace. Restriction breeds creativity. Solve the small problems first. Something about Haskell makes you think more about decomp. Does knowing functional programming influence prog. in NFL? Debugger sucks. Sort of like showing up at crime scene. If you look hard enough, you can find a function for it. Haskell is a visually appealing language. yes: 5:1 Type system determines least restrictive typing. Hard to reason about time complexity. Tuesday, 04/19/16 append.pl contains(List,Sublist) :- ..., N < M, ... % Not allowed! '<' is a predicate! :- (append(...) | length(...))+ Examples of combining the various append predicates ?- last(L,10), head(L, 1). ?- last(L,10), head(L, 1), contains(L, [30,40]). ?- last(L,10), head(L, 1), contains(L, [30,40]), contains(L,[1,2,3]). From slide 312: (reordered) What do you like (or not?) about Ruby? • Dynamic typing? • Everything is an object? • Substring/subarray access with x[...] notation? • Negative indexing to access from right end of strings and arrays? • if modifiers? (puts x if x > y) • Iterators and blocks? • Ruby's support for regular expressions? • -Monkey patching?- Adding methods to existing classes? • Programmer-defined operator overloading? • Is programming more fun with Ruby? • If you know Python, do you prefer Python or Ruby? • Is Ruby a good choice for this class? What if you knew Python? Groovy { it * it } { x -> x * x } Thursday, 04/21/16 head(L,H) :- append([H],_,L). repl: slide 172 sumsegs Tuesday, 05/03/16 Prolog thoughts... Seems like programming in the past tense. -- Taylor You can't will yourself to get a solution; you have to know where you're going. -- Romero Can't brute-force it with Prolog. -- Tallis Simulates non-determinism. Doesn't seem like I'm trying each one. --Frank Relates to quantum computing With structures, what you see is what you get. Difficult with iterative problems but excels at problem solving. -- Steinbach Does well with satisfying constraints. A.Smith Everything is very implicit. -- LaChance Hard to see where Prolog might be used in practice. -- Melzer Hard to get lucky with Prolog. Forces understanding.