hhandoko
Joined 14 years ago
Joined 14 years ago
IMO, there are a few key things lacking with the Vue + Brunch combo:
- The `vue-brunch` plugin seems to be no longer in active development? (https://github.com/theocodes/vue-brunch)
- The `sass-loader` plugin allows me to use Sass dialect in SFC-style Vue (Single File Component). I'm using plain CSS with Vue + Brunch SFC as I cannot find a Brunch plugin offering similar functionality.
- There are some Brunch idiosyncracies. For one, the processing pipeline is executed as per `package.json` (dev)Dependencies ordering. I spent quite a bit of time before figuring this out.
To expand a bit more, it's not like Scala's `Either[T, U]` where we're limited to a pair of types, I think you can return other atom values (but use :ok and :error) as a convention.
Also, there is an Elixir library I'm using that's a closer in spirit to Scala's for-comprehension called `monadex`. Example below:
result = success(comment_params)
~>> fn p -> link_reply_to_id(p) end
~>> fn p -> create_changeset(p) end
~>> fn cs -> assert_changeset(cs) end
~>> fn cs -> insert_changeset(cs) endHere's a similar construct in Scala:
(for {
user <- currentUser(...)
group <- groups.fetchForUser(...)
friend <- friendships.fetchFriend(...)
member <- groups.addMember(...)
} yield {
render(...)
}).recover {
case e: Exception -> ...
}They are very useful. With the two you mentioned (:: and +:) they can be used for pattern matching in addition to concatenation (of a list / sequence), for example:
scala> val list = 1 :: 2 :: Nil
list: List[Int] = List(1, 2)
scala> val x = list match {
| case head :: _ => head
| case _ => 0
| }
x: Int = 1
scala> val seq = 1 +: Seq(2, 3) :+ 4
seq: Seq[Int] = List(1, 2, 3, 4)
scala> val y = seq match {
| case a +: _ :+ b => a + b
| case _ => 0
| }
y: Int = 5
It can be a bit confusing at first, especially for mutable vs immutable collection operators. But you end up remembering some, if not most of it, after using them a number of times.I'm still getting used to dynamic typing in Elixir. Most of the time I feel like just matching against Map data structure or records.
While Dialyzer is great, writing the typespecs is a bit of a maintenance overhead. I suppose it's a tradeoff...
> I came to Elixir from Scala, [..] now I don't have to deal with the half of the Scala community that tries to make Scala into Haskell.
IMO Scala will continue to be a multi-paradigm lang. On pure-FP and libs, it's a choice and really depends on the problem domain. It might not be a good solution to everyone, but I'm glad it exists.
The announcement shows Google making a commitment to make Kotlin successful in Android, rather than leaving the effort all to the community and JetBrains.
> I suspect that Google's adoption of Kotlin is just politics: [...] Google could acknowledge Scala years ago, but didn't [...]
I think this post explains it best: https://medium.com/@ScalaWilliam/why-scala-didnt-miss-the-an... .
In regards with the Scala evolution, there's a lot of things to be excited about. In the near term, 2.13 should see various optimisation to core libraries and faster compilation.
> Also, I don't understand the point of Kotlin. [...] Kotlin is just a subset of Scala. [...]
Kotlin is a better Java, whereas Scala is much, much more.
Scala is still my go-to JVM languages, but one Kotlin use case for me is to write libraries that will be called from Java [1]. Its biggest advantage is that it's succinct, has useful functional features (e.g. Scala-like collections), while producing code signatures that's very close to Java.
Notes:
Besides the benefits the new JIT provides, Zing will help you if your workload runs with / consumes over 8GB of RAM. At this point, HotSpot GC pauses [1] starts becoming noticeable (i.e. jitter).
Notes:
[1] - http://www.azul.com/resources/azul-technology/zing-consisten...
In the end, I went with one of the Phanteks Enthoo [1] cases. Decent quality without breaking the bank :)
Notes:
I'm running a dual Xeon as you mentioned, through buying ex-fleet parts at less than half price of new ones. Several issues I experienced:
- Lack of motherboard options. I had to purchase new motherboard at a high price since the ones that support dual Xeons are either in an incompatible form factor or simply out-of-stock. I settled with Asus Z9PE-D8 WS with an SSI-EEB form factor.
- Outdated BIOS. I had to order a new, pre-flashed, BIOS chip since the BIOS that came with the motherboard refused to boot with the CPU and memory combo.
- Hard to find suitable ECC RAM. The motherboard only supports limited RAM (speed + latency) configs, and finding those is becoming harder. Availability looks seasonal at times.
- Needs capable power supply. One thing that people often look past is the need of a proper PSU. I had to upgrade to one which support two CPU power connectors.
Coincidentally, `Buku` translates to `Book` in Indonesian...
> The "functional" part determines the architecture by which the code is structured opposed to the style (vanity) by which the structure comes together.
I think it means a code can be functional but looks imperative. One example is the for-comprehension in Scala:
val aFuture = future(a)
val bFuture = future(b)
(for {
a <- aFuture
b <- bFuture
c <- futureC(a, b)
} yield c)
This is just a contrived example for working with `Future[T]`, but it can be applied to other monadic types.For an example library that can be used with a few different styles, have a look at this: http://jsuereth.com/scala-arm/usage.html
https://www.motorist.sg/coe-results https://bydcars.sg/wp-content/uploads/2025/01/BYD-Pricelist-...