by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 16 09:15
    weihsiu commented #31
  • Jan 16 09:15

    weihsiu on master

    Add Scala Through Lenses resour… Merge pull request #31 from jir… (compare)

  • Jan 16 09:15
    weihsiu closed #31
  • Jan 16 08:49
    jirijakes opened #31
  • Jan 15 06:33
    weihsiu commented #30
  • Jan 15 06:32

    weihsiu on master

    add purely functional redis dri… Merge pull request #30 from yar… (compare)

  • Jan 15 06:32
    weihsiu closed #30
  • Jan 15 04:33
    yaroot synchronize #30
  • Jan 15 04:22
    yaroot opened #30
  • Dec 18 2019 03:51

    weihsiu on master

    add FrameworkChoice finagle vs … Merge pull request #29 from che… (compare)

  • Dec 18 2019 03:51
    weihsiu closed #29
  • Dec 18 2019 03:51
    weihsiu commented #29
  • Dec 17 2019 23:55
    chenghsienwen opened #29
  • Nov 08 2019 01:01

    weihsiu on master

    Add slides of How to contribute… Add slides of Scala & Spark(1.6… Merge pull request #28 from jim… (compare)

  • Nov 08 2019 01:01
    weihsiu closed #28
  • Nov 07 2019 09:28
    jiminhsieh opened #28
  • Nov 07 2019 03:48
    weihsiu commented #27
  • Nov 07 2019 03:48

    weihsiu on master

    Move 2016's slides to folder 20… Move 2017's slides to folder 20… Move 2018's slides to folder 20… and 3 more (compare)

  • Nov 07 2019 03:48
    weihsiu closed #27
  • Nov 07 2019 02:48
    jiminhsieh opened #27
Yan
@yaroot
there's something in shapeless which caches typeclass derivation
any watch party for haskell.love like last time? @weihsiu
Walter Chang
@weihsiu
@yaroot the shapeless solution is using it's own implicitly which is only good if you need the cached implicit value explicitly (if that make any sense). the solution i have for dotty gives you the summoned once instance implicitly as well.
Yan
@yaroot
and Cached is global (per ClassLoader)
in simple case the derivation would probably be optimized away
ps using context arrow with significant indentation the code looks funny
Walter Chang
@weihsiu
@yaroot i like it though, makes the code cleaner. the colon after summonOnce is allowed after turning on the "-Yindent-colons" compiler flag.
Walter Chang
@weihsiu
:thumbsup:
jirijakes
@jirijakes

Ha, seems like somebody had the need to make Haskell with braces :-)

https://github.com/serras/hinc

See in action: https://serras.github.io/hinc/

data Maybe<a> {
  Nothing,
  Just(value: a)
} : Show, Eq

let f(xs: List<Int>, p: (Int) => Bool): List<a>
  = effect {
      let x = await xs
      guard(p(x))
      x.add(1).pure
    }
Walter Chang
@weihsiu
What an eyesore!
jirijakes
@jirijakes
Indeed.
Walter Chang
@weihsiu
i just tried a simple example of http4s on the latest dotty (0.26-RC1) with the magical .withDottyCompat() and it worked!!! i have done this for a number of past dotty releases and this is the first time it worked (i might have skip a release or two, not sure). time to celebrate!!
jirijakes
@jirijakes
What does it do?
Walter Chang
@weihsiu
Just a simple endpoint that returns static text but since http4s has dependencies on cats, cats-effect, fs2, etc., I think that's a big step forward, backward compatibility-wise.
Vito Jeng
@vitojeng
目前才注意到, 似乎 sbt 無法自行指定另一個 build file?
gradle -b another-build.gradle 那樣. --help 裡面好像沒有提到.
Pishen Tsai
@pishen
好像是在同一個 folder 的 .sbt 檔都會一起吃進來?
Vito Jeng
@vitojeng

好像是在同一個 folder 的 .sbt 檔都會一起吃進來?

不確定. 我是想做到能像 gradle -b FILE 那樣, 可以吃不同的 build file.
原本以為應該會有...不過竟然找不到 ^^

Yan
@yaroot
nix seems to be the hot thing right now
jirijakes
@jirijakes
Have you tried?
Yan
@yaroot
yes, it's better than anything else (except maybe guix)
Walter Chang
@weihsiu
i am not seeing the "target" directories in my sbt projects when using metals in vscode on my ubuntu notebook but i do see them in mbp. anyone experiencing this?
Walter Chang
@weihsiu
nvm, i found the cause: somehow **/target got added to the explorer's file exclude list
Walter Chang
@weihsiu
how do you do react.js ssr(server-side rendering) in scala? graalvm of course! learn the ins and outs here by the author of scalajs-react. https://blog.shipreq.com/post/scala_react_and_ssr_part_1
Yan
@yaroot
Does it hog the CPU for hundreds of milliseconds to render one page?
Walter Chang
@weihsiu
@yaroot this is something the author alluded to at the end of the article. it might take 100ms to render a page initially, but when the jit kicks in, the time it takes to render a page should decrease by an order of magnitude or more. the author will have more to say about it in part 2 of the article.
Yan
@yaroot
@weihsiu I'm interested in graal vs v8 benchmark (I have sites waste huge amount of cpu time, ~500ms per single page on this crap)
(seeing this kind of things everyday is very frustrating, though this is infinitely better than rendering through chrome on server)
Walter Chang
@weihsiu
@yaroot that's horrendous! r u sure it's all cpu-bound? i know v8 does a lot of optimization under the hood but being an runtime of an untyped language, there is only so much it can do.
Walter Chang
@weihsiu
A very nice article on concurrency in cats effect. it finally answered my long unanswered question of how to yield in fiber. well worth a read. and it also has summarized what will change in ce3. https://github.com/slouc/concurrency-in-scala-with-ce
Yan
@yaroot
lifting impure code is hard (cancellation, race condition, etc)
I would rather have mask/unmask from haskell
Walter Chang
@weihsiu
but exception handling in haskell is another can of worms all together
Yan
@yaroot
whole different story
Walter Chang
@weihsiu
Walter Chang
@weihsiu
looks like dotty.js is on its way :clap: :clap: :clap: https://github.com/lampepfl/dotty/pull/9653#pullrequestreview-476735595
Yan
@yaroot
I don't think js is the right target for the future
Walter Chang
@weihsiu
Why not? What do you have in mind?
Yan
@yaroot
It looks like wasm will be the universal bytecode for the foreseeable future
Walter Chang
@weihsiu
I don't know how relevant wasm is for gc type languages though. I think the author of scalajs, Sébastien Doeraene, gave a talk on wasm a while back detailing the reason why wasm is not such a good idea for scala.
Yan
@yaroot
This talks focuses on scala.js and js interop, what if scala-native could produce wasm through llvm and wasm gets gc, it's still useful for certain things (not web related)
Walter Chang
@weihsiu
Vito Jeng
@vitojeng

https://github.com/cdr/code-server

有人用過這個嗎?用這個不知道是不是就可以在 iPad 上寫 Scala 了 XD

Jimin Hsieh
@jiminhsieh
以前有 survey 過
但只印象當時有看到這個 issue
cdr/code-server#843
Walter Chang
@weihsiu
@vitojeng I thought you can do it with gitpod already
@vitojeng but it's not free though
Vito Jeng
@vitojeng
@jiminhsieh, @weihsiu Thanks for the information.
I know gitpod, but I would like to try to install code-server in my own server if possible. :)
TzeKei Lee
@chikei
gitpod has fairly unlimited self-hosted option for free tier now, but it requires k8s :weary:
Walter Chang
@weihsiu
:thumbsup:
Vito Jeng
@vitojeng
@chikei I think I should try to install, thanks!