318 karma · joined Jan 5, 2019 (7y ago) · 168 submissions
comment 6y ago · link · parent
A talk introducing the issues with git and how gitless improves upon them https://www.youtube.com/watch?v=31XZYMjg93o
comment 6y ago · link · parent
Conversely, Scala has the expectation of (partial) type erasure as is done on JVM, and that's probably why the .NET port didn't get very far.
comment 6y ago · link · parent
How could you have not mentioned OCaml? The original Rust compiler was implemented in it. By this, Rust has a very clear (OCa)ML heritage.
It's meaningless to argue, whether Rust got ADTs from Haskell or OCaml, because the author (Graydon Hoare) had been clearly familiar with both and both got ADTs from ML, which is much older than either of them.
On the other hand, traits are a different story, those just Type classes with a different name, and that is a Haskell thing.
comment 6y ago · link · parent
Give it a try.
https://wiki.openjdk.java.net/display/shenandoah/Main
https://www.slideshare.net/jelastic/choosing-right-garbage-c...
comment 6y ago · link · parent
I'm asking, because this would allow for sharing of big files across swarms, even though the files might be slightly different.
comment 6y ago · link · parent
Btw, this is a problem that the "Selective applicative functor" too aims to alleviate.
You can read more about the inspectability problem (and Selective) at http://eed3si9n.com/selective-functor-in-sbt
The context there is sbt, which is a build tool, but I'm sure the inspectability plays role in many other areas. Note, how he contrasts "Applicative composition" and "Monadic composition".
comment 6y ago · link · parent
https://github.com/zio/zio-prelude
It's a brand new library for Scala that contains reusable mathematical structures. Still based on algebra and category theory, but it expresses them more or less differently than how they've been expressed in Haskell (and similar languages). For example, unlike Haskell (and Scala's own cats and ScalaZ), it doesn't present the "traditional" Functor -> Applicative -> Monad hierarchy. Instead, it presents the mathematical concepts in a more orthogonal and composable way.
One example out of many, you don't have a Monad. You have two distinct structures:
* Covariant functor, with typical map operation `map[A, B](f: A => B): F[A] => F[B]`
* IdentityFlatten which has a flatten operation `flatten[A](ffa: F[F[A]]): F[A]` and an identity element `any: F[Any]`
When combined together (Scala has intersection types), you get something equivalent to the traditional Monad.
The project is in its infancy, so it may still change significantly, though. Look here for more detailed explanation:
https://www.slideshare.net/jdegoes/refactoring-functional-ty...
comment 6y ago · link · parent
https://scalameta.org/docs/semanticdb/guide.html
It is a queryable database of semantic information about the program which is generated by the compiler (compiler plugin, to be precise). Once generated, other tools which need semantic information, like linters or language servers, can consume it without having to worry about how to actually generate it.
You might enjoy a talk about it: How We Built Tools That Scale to Millions of Lines of Code by Eugene Burmako
https://www.youtube.com/watch?v=C770WpI_odM
Kythe by Google is also a similar thing: https://kythe.io/
comment 6y ago · link · parent
Whether state(s) should be in the business of "producing things" is for another debate, but it's not controversial to claim that they should be in the business of taxing things.
Now, you can go about taxation the stupid way, collecting unreasonable amount of money from the wrong people/companies for the wrong things. Or you can do it the smart way. CCCTB is the smart way.
I'm not that I'm against making money. But making money should be taxed, preferably the smart way.
comment 6y ago · link · parent
https://en.wikipedia.org/wiki/Common_Consolidated_Corporate_...
Companies should have never been taxed based on a virtual, and fundamentally nonsensical, figure as the location of their headquarters. They should be taxed based on substantial things, like (the location of) capital, labour and sales. This is what CCCTB establishes. States are still free to set the tax rate as they wish. It's just that then the companies can't escape with the turnover money to another state, essentially robbing the state where the profit was generated.
This is the most important tax legislation of this day. No other debate about taxes, like the rate itself, or harmonisation of the rates across states, makes sense before this gets implemented. The reason is that now the tax rate is evadable and only stifles local/small businesses who don't/can't cheat. Sadly, there are few states that are successfully blocking this: Netherlands, Ireland, Malta, etc. But I hope to see this one day.
comment 6y ago · link · parent
comment 6y ago · link · parent
https://build-server-protocol.github.io/
If not currently, is it planned?
comment 6y ago · link · parent
https://www.lihaoyi.com/post/WhatsFunctionalProgrammingAllAb...
comment 6y ago · link · parent
> No Scalaz or any other FP-crusader stuff ever
That stuff which some people might consider FP-crusader vanity is something which can make concurrency manageable, maybe even joy.
I encourage you to open your mind, at least for a bit, and have a look at ZIO or Monix.
> Enforce coding rules with linters
Absolutely! Scalafmt and Scalafix for the win!
comment 6y ago · link · parent
I would expect Clojure programmers (while still functional) don't use these abstractions either.
On the other hand, typed languages, like Haskell, Scala, OCaml, F#, do employ these abstract concepts. Their type system makes these worthwhile endeavour with great payoff.
comment 6y ago · link · parent
Features I care about:
* Type classes: Haskell, Scala
* Module system: OCaml, Scala
* structural subtyping / row polymorphism: OCaml
* Higher-kinded types: Haskell, Scala
Other important features, but not related to the type system:
* Powerful runtime system (multicore support, green threads, ...): Haskel, Scala (kinda, with the TypeLevel libraries, but still not 1st class)
* pure functional programming focus: Haskell, Scala (kinda, with the TypeLevel libraries, but still not 1st class)
* compiling to JavaScript (so that you can use 1 language for both backend and frontend): Scala, OCaml
... maybe PureScript would tick the most boxes ¯\_(ツ)_/¯
comment 6y ago · link · parent
If you like books, this should be a good intro: https://underscore.io/books/essential-scala/ (you should use IntelliJ IDEA instead of Eclipse, though)
And you can also use it for frontend development: https://www.scala-js.org/doc/sjs-for-js/es6-to-scala-part1.h... (having one language for both backend and frontend leads to great synergy)
comment 6y ago · link · parent
* Java/C# generics
* sealed interfaces and record classes
* pattern matching
* first-class functions with closures
* even type system itself (eg Python is gaining a type system)
* ...
The world of programming languages is converging, no matter how slowly, towards ML
comment 6y ago · link · parent
Couldn't agree more, Scala with Monix/cats-effect/fs2 excels at writing highly efficient parallel and concurrent programs