1,874 karma · joined Jun 12, 2019 (7y ago) · 701 submissions
[ my public key: https://keybase.io/thinkharder; my proof: https://keybase.io/thinkharder/sigs/Ibpz0COsvz2qYl2K8YfzrhucHf2rcZIxityh5WvYC_k ]
comment 5y ago · link · parent
comment 5y ago · link · parent
What is the ETA on getting back online? Well, about 5 minutes longer than it would have been now that you pulled me away from what I was doing....
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
Our bodies seem to be good at calibrating hunger and calorie intake to maintain balance between calories in and calories out, but there is something about being completely sedentary which causes that mechanism to malfunction.
comment 5y ago · link · parent
comment 5y ago · link · parent
1. JSON prettifying
2. JWT decoding/verification (bonus for "paste your signing key and we will generate JWTs for you too!")
3. PEM <-> DER conversion
comment 5y ago · link · parent
comment 5y ago · link · parent
But the short answer is probably not. Unless you are running Qubes or something, if someone can exploit an RCE then they can probably own your system.
comment 5y ago · link · parent
comment 5y ago · link · parent
In general I think the future is not "fully remote" or "fully colocated" teams but teams were everyone is to some degree remote based on their preferences. So you may have some people who come into the office every day because they don't have a good workspace at home (or just like to get out of the house every day) but everyone else will come into the office somewhere between a few days a week and never.
comment 5y ago · link · parent
I think a lot of people who have worked remotely for the first time due to COVID have a misleading impression of what remote work is. In normal times you have ample options to be able to work in an environment with other people if that's what you want. You also have the option to spend the time you save on commuting doing other non-work social activities.
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
For example, there is a typeclass Foldable[F[_]] which provides the ability to "fold" (i.e. recurse over) some type F[_] which takes a type parameter. Then you have typeclass definitions for Foldable[Set], Foldable[List], Foldable[Tree], Foldable[Option], etc.
Then if you have an operation and you want it to work on any collection that can be folded, then you can just define it in terms of a generic type that has a Foldable typeclass. For instance to generically sum a collection of ints, you might do
def sum[F[_] : Foldable](ints: F[Int]): Int = ...
Now you can call sum(List(1,2,3)), sum(Set(1,2,3)), sum(Option(1)), etc...
comment 5y ago · link · parent
For example, the most common thing people point to when talking about Scala's complexity is implicits. And that's fair because implicits can be hard to understand and can be used in wildly inappropriate ways. But I have found that what implicits are mostly doing (at least when used correctly) is taking stuff that would be implemented in Java with some crazy runtime reflection scheme and making it a compile-time construct. So then the question is not "are implicits complex?" but "are they MORE complex than the equivalent implementation using reflection?" And on that question I would say absolutely not! Runtime reflection is (to me at least) much more opaque, error prone and difficult to debug.
comment 5y ago · link · parent
On the other hand, I've seen my fair share of too-clever uses of runtime reflection (Java) or weird metaprogramming (Python/JS) techniques, except they were not only too-clever but actually just didn't work and would fail miserably at inopportune times.
comment 5y ago · link · parent
comment 5y ago · link · parent
In practice though it is not a major issue. It is easy for library authors to cross-compile for different versions and SBT handles fetching to correct binary dependency for your project. And in general, binary incompatibility doesn't mean source incompatibility. So generally uprgrading your projects scala version is as simple as changing the scalaVersion in your build.sbt. The exceptions are:
1. If you have a dependency that hasn't been cross-compiled for the new Scala version yet. So if you are trying to upgrade as soon as a new Scala minor version comes out then you may have issues if you have a lot of dependencies.
2. If you are trying to publish a library compiled for multiple older Scala versions then you can run into source compatibility issues. For instance, if you are using a method/interface that is new as of Scala 2.13 you won't be able to cross-compile to Scala 2.12.