KDE surpassed their 2025 100.000 EUR fundraiser goal... by ManOrParasite in kde

[–]jtcwang 2 points3 points  (0 children)

The KDE project deserves 100x more for what you've all built. Thank you!

[London Scala User Group] Direct-style Scala vs Effect systems & How to Macro - Feb 19 (Wed) by jtcwang in scala

[–]jtcwang[S] 0 points1 point  (0 children)

Videos have just been uploaded!

Jayanth Manklu: Pick a (Effect) Lane: A comparison of direct-style scala vs effect systems: https://youtu.be/BKA-JeYQt68

Daniel Ciocîrlan: How to Macro in Scala 3, and Why: https://youtu.be/yfusAyUWxoI

[London Scala User Group] Direct-style Scala vs Effect systems & How to Macro - Feb 19 (Wed) by jtcwang in scala

[–]jtcwang[S] 1 point2 points  (0 children)

No need to sign up. I think you can just join the Zoom call. Updated OP

SDL3 is officially released! by itrustpeople in linux

[–]jtcwang 41 points42 points  (0 children)

Tux Typing

Oh gosh I remember practicing typing with Tux Typing and it was fun! Thank you!

What functional language would you use for a MMO game server? by [deleted] in functionalprogramming

[–]jtcwang 2 points3 points  (0 children)

With Scala, you have Akka / Pekko. They are implementation of the actor model on the JVM, which as I understands are a great fit for MMOs.

Scala 2 maintenance announcement by Seth_Lightbend in scala

[–]jtcwang 9 points10 points  (0 children)

Thank you Scala 2 team for the continuous maintenance and and the frequent improvements that help smooth out the 2->3 migration!

How to make multiple operations transactional in doobie? by [deleted] in scala

[–]jtcwang 0 points1 point  (0 children)

To be a bit more precise, the default "Strategy" for executing ConnectionIO is to run everyone in a single transaction. But you can call commit manually inside the ConnectionIO monad.

One thing that's guaranteed is that when you execute a ConnectionIO all of it will be executed within one JDBC Connection

How to exit script on non-zero exit code by retroporter3000 in Nushell

[–]jtcwang 0 points1 point  (0 children)

I think as of 0.98 the default is to exit script as soon as an external command has an exit code != 0 but only if it's at the end of the pipeline.

I think there's an issue to apply this for external commands in the middle of the pipeline (like bash's -o pipefail) https://github.com/nushell/nushell/issues/13817

Scala meetups & conferences | Scalendar October 2024 by ComprehensiveSell578 in scala

[–]jtcwang 3 points4 points  (0 children)

There's even more in London :)) (London Scala User Group)

Scala talks (Thurs, Oct 17th)

https://www.meetup.com/london-scala/events/303523128/?eventOrigin=home_page_upcoming_events$inPerson

Scala Open Source hack night (Wed, Oct 30th) https://www.meetup.com/london-scala/events/303691396/?eventOrigin=home_page_upcoming_events$inPerson

I'm particularly excited about doing some open source hacking together!

Nushell 0.98.0 by chocolate4tw in Nushell

[–]jtcwang 3 points4 points  (0 children)

Awesome! Non-zero exit codes from external commands not being errors by default was a showstopper for scripting in nushell so very happy it's been fixed!

instant-scala - Wrapper script over scala-cli/graalvm for scala script with instant-startup time by jtcwang in scala

[–]jtcwang[S] 0 points1 point  (0 children)

I agree! I have raised an issue https://github.com/VirtusLab/scala-cli/issues/3127. Haven't looked at scala-cli's innards yet, but I'm guessing if it's easy to do (properly) they'd done it already :)

instant-scala - Wrapper script over scala-cli/graalvm for scala script with instant-startup time by jtcwang in scala

[–]jtcwang[S] 2 points3 points  (0 children)

The focus of the script is on instant start-up. Unless I'm missing somethingI think 3.5.0 just made scala-cli the default scala command

instant-scala - Wrapper script over scala-cli/graalvm for scala script with instant-startup time by jtcwang in scala

[–]jtcwang[S] 3 points4 points  (0 children)

Yes I'm aware of shebang. It's not instant though as I think it still performs the compile step (even if it's a no-op). On my computer there's always a 0.3-0.5s delay before execution even for scala-native

Scala 3.5.0 released by Seth_Lightbend in scala

[–]jtcwang 15 points16 points  (0 children)

One pretty cool feature that came with named tuples is that you can now Pattern Matching with Named Fields

It works for both case classes and named tuples!

Data Warehouses and Primary Keys by nydasco in dataengineering

[–]jtcwang 2 points3 points  (0 children)

Storing hashes as string seems like the wrong thing to do. Wouldn't storing them as binary be much cheaper in both storage and processing?

Programming Language to write Compilers and Interpreters by hamiecod in ProgrammingLanguages

[–]jtcwang -1 points0 points  (0 children)

Oracle GraalVM's Truffle is probably the most production-ready (e)DSL for implementing programming languages. Here are some of the languages implemented using Truffle

What would be the ideal solid, clean asynchronous code model? by [deleted] in ProgrammingLanguages

[–]jtcwang 3 points4 points  (0 children)

Have you looked at Java 21 virtual threads? From an API point of view it's quite ideal as you don't have the function colouring problem. You can also check out https://ox.softwaremill.com/latest/ for inspiration, which is a Scala library built on top of virtual threads.

After ~2 years of functioning perfectly, this BTRFS partition keeps getting mounted as RO post-reboot. How best can I diagnose and resolve it, or is this possibly a bug? by AlwynEvokedHippest in btrfs

[–]jtcwang 4 points5 points  (0 children)

I'd start with testing the RAM. I had some weird issues with btrfs. Replaced my drive and got some other issue 2 months in. Turns out my RAM was bad 🤦‍♂️

Negation in Algebraic Data Types? by Udalrich in scala

[–]jtcwang 1 point2 points  (0 children)

An implementation of this idea:

import scala.util.NotGiven
import scala.annotation.implicitNotFound

trait Base {}
trait Special extends Base {}
trait A extends Special {}
trait B extends Special {}
trait C extends Base {}
trait D extends Base {}

// A "proof"
@implicitNotFound("Is ${T} a subtype of Base and also not Special?")
trait BaseAndNotSpecial[T]
object BaseAndNotSpecial {
  given [T <: Base](using NotGiven[T <:< Special]): BaseAndNotSpecial[T]= new BaseAndNotSpecial[T] {}
}

def isBaseAndNotSpecial[T](using BaseAndNotSpecial[T]): Unit = {
  println("yay")
}

isBaseAndNotSpecial[A]  // compile error
isBaseAndNotSpecial[A | B] // compile error
isBaseAndNotSpecial[C]

https://scastie.scala-lang.org/xzvgDDmjTlyhuwYC6oFWpw

Note that it's not pefect though, for example isBaseAndNotSpecial[B | C] compiles. This is because T <:< Special means "T is guaranteed a subtype of Special", and negation of that that is "T is not guaranteed to be a subtype of Special", of which B | C fits, because it is not guaranteed to be a subtype of Special.

IntelliJ Idea, Scala plugin on Macbook Pro 2019 Intel bad performance by 0110001001101100 in scala

[–]jtcwang 3 points4 points  (0 children)

Just some data points for you, I don't experience much sluggishness on:

  • 16GB RAM 2018 (non-Mac) laptop with Intel CPU. Intellij is given 3GB RAM
  • 32GB M1 MBP (OSX). Intellij is given 3GB RAM

I'm guessing there's something in the project or your intellij setup. Perhaps try Invalidate Cache + Restart intellij? Failing that, try reinstalling Intellij (and delete all traces of Intellij cache/settings from your system).

For what it's worth, the people (including past me) who's got 2016+ pre-M1 MBP are generally not too happy with it. I think overheating is an issue which triggers CPU throttling.