Better HN
topnewbestaskshowjobs
Log inSign up

nihils

23 karma · joined Nov 30, 2015 (11y ago) · 10 submissions

Submissions

comment 9y ago · link · parent

I don't think there is significant overlap between Python's ideal use cases and Haskells. For one, Haskell's advanced static type system lends itself nicely to formal verification and the handling of domain specific languages. Both domains are important in safety-critical software. It also has much better ways of dealing with concurrency (STM and linear types). On the other hand, Python's ecosystem seems to be centred around backend web development, data science, and machine learning.

comment 9y ago · link · parent

For example, this problem of modifying the diagonal of a matrix can be solved quite easily:

  type Zipper a = ([a],[a])
  
  cursorOnDiagonal :: [[Int]] -> [Zipper Int]
  cursorOnDiagonal matrix = map (\(n,x) -> splitAt n x) (zip [0..(length matrix)-1] matrix) 

  flipToOneAtCursor :: [Zipper Int] -> [Zipper Int]
  flipToOneAtCursor = map (\(ys,x:xs) -> (ys,1:xs))   

  backToList :: [Zipper Int] -> [[Int]] 
  backToList = map (\(ys,xs) -> ys ++ xs)
If matrix == [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]], then:

  backToList . flipToOneAtCursor . cursorOnDiagonal $ matrix == [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]

comment 9y ago · link · parent

If you want immutable data structures that simulate the behavior of mutable data structures look into Zippers. In this case, a list zipper.

comment 10y ago · link · parent

It's Python mail server, that tries to be like Django for Mail. https://github.com/zedshaw/lamson/blob/master/README.md

comment 10y ago · link · parent

I wonder if this can be linked in to Lamson

comment 10y ago · link · parent

This is a fair point, in the that conventional definition of post-structuralism as representation being bound to an interpretative context can be difficult see in daily life. However, such a view's application in Foucault's work I see manifest in my life all the time. For example, the concept of governmentality explains how we come to internalize the mandates of the state or capitalist power structure to say obey traffic laws (even when a cop is not there to observe and violating the law would not lead to harm). I should augment my list to say critical theory and Marxism as well. Such schools could explain a great deal about increasing income inequality, patent law, the insufficiency of 'nation' as a unit of analysis in a globalized economy...

comment 10y ago · link · parent

The author's conception of philosophy seems to be heavily biased towards Western analytic philosophy whose pretension towards logically underpinning sciences and reliance on formal methods means that is more of a theoretical computer science or physics. Plenty of Continental philosophy: post-structuralism, deconstruction, post-colonialism, and non-Western philosophy (such as decolonial thought) speaks to and about daily life.

comment 10y ago · link · parent

This is actually perfect for a library on algebraic structures I've been trying to make in Haskell. For example, how does one distinguish between elements in the Dihedral group of order 10 vs. Dihedral group on order 16 when obstensibly, they have the same representation. For now, I think Haskell programmers use type-level arithmetic libraries, but this is a much better solution.

comment 11y ago · link · parent

Abstract Algebra by Benedict Gross from the Harvard Extension School.