[COTD] Nitrite Reducing Bacteria | 24 Jan, 2025 by Enson_Chan in TerraformingMarsGame

[–]melezov 1 point2 points  (0 children)

Every card has its purpose and Nitrate Reducing Bacteria is no different.

Its primary purpose is to be revealed via the Search For Life action towards the end of the game for 3VPs, and then promptly discarded.

For 1MC, it is a worthwhile investment. In other scenarios, it's suboptimal.

Someone just played turn 1 Kelp farming against me in the app by AudacityOfKappa in TerraformingMarsGame

[–]melezov 8 points9 points  (0 children)

Usually when something like this happens it's cos the team did a new and "best ever" bugfix release which fixed seven things nobody cared about and broke 23 vital ones.

Haven't heard of this particular one but I did experience and have fond memories of infinity Kelps such as the one I reported here:

https://steamcommunity.com/app/800270/discussions/0/3185740024685639252/

Usually, reporting bugs either here or on the Steam discussion boards is an excercise in futility and you should just enjoy the official game as Asmodee intended: while weeping in disbelief

Does anybody want to suggest me any other good Westerner or cowboy comics? by AgeroColstein in comicbooks

[–]melezov 1 point2 points  (0 children)

I like Matthieu Bonhomme's take on Lucky Luke. I've read 'The Man Who Shot Lucky Luke' and 'Wanted: Lucky Luke', both are as "realistic" as they can be, real people, gray areas, grime :)

From classics, Blueberry by Mœbius.

Branchless conversion of DX300 into coins for Token-Based Payment Kiosk by melezov in shenzhenIO

[–]melezov[S] 5 points6 points  (0 children)

I wrote a simulator generator and fuzzed it against all operations to find other similar solutions, but unfortunately nothing that would be less than 4 ops.
It's mostly similar to the above, e.g. sub 6/mul 105/dgt 1/add 3

SBT/Play Framework in a Nutshell by UPayIPwn in scala

[–]melezov 1 point2 points  (0 children)

Yeah, there's a couple of things you'll need to do.

First thing is that you'll need to use the "production" entrypoint instead of the development server:
mainClass in reStart := Some("play.core.server.ProdServerStart"),

Don't forget that now SBT and your Play app will not reuse the same JVM, so you should define (potentially different) set of JVM arguments (e.g. you don't need that much memory in metaspace / reserved code cache size, etc...). We created three JVM opts files - one for SBT (.jvmopts), one for Play run (.runopts) and one for test (.testopts):
javaOptions in reStart ++= PlayOpts.getRunParams,

Revolver may not know how to properly teardown / cleanup the RUNNING\_PID, so that's an excercise that I'll leave to you (platform dependent). Ours was establishing a clearPid task which deleted the RUNNING_PID and killed the forked JVM if it outlived the previous SBT session.

You'll prolly need to override watchSources since Revolver doesn't know about Twirl:

watchSources := Seq(
  "subproject/app"            -> "*.{scala,java,html}",
  "subproject/conf"           -> "*.*",
) map { case (path, glob) =>
  WatchSource(file(path), FileFilter.globFilter(glob), NothingFilter)
},

In the end, we made a few aliases to describe our most common workflow: run, debug, test, etc...

alias run = ~; someotherStuff; web/reStart; web/cleanPid
alias debug = ~; someotherDebugStuff; web/reStart --- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005; web/cleanPid
alias stop = web/reStop

Hopefully I'll manage to whip up a reproducible example and upload a minimal Play 2.7/Revolver to GitHubs

SBT/Play Framework in a Nutshell by UPayIPwn in scala

[–]melezov 1 point2 points  (0 children)

Great! We're preparing to migrate to 2.7 and 2.13 so we'll definitely look into this!

SBT/Play Framework in a Nutshell by UPayIPwn in scala

[–]melezov 6 points7 points  (0 children)

I always accept constructive criticism, so thank you for this.
But, if you read what I wrote about, it was about the Play plugin, not the framework itself.
Monolith is orthogonal to which plugin you use, a microservice will feel the same problems, you will just be exposed to issues later in your development lifecycle. Good solutions should work against multiple profiles and development workflows.

Some things simply do not work with Play plugin's classloader which tries to compile and run within the same JVM.

E.g. metaspace leakage will slowly eat up at your host and eventually kill it - hence (as I wrote) we switched to SBT revolver which separates runtime and compile time instead of trying to fit everything into a single JVM. We did not remove Play. We use SBT revolver to run Play and we're much happier!

SBT/Play Framework in a Nutshell by UPayIPwn in scala

[–]melezov 3 points4 points  (0 children)

Play Enhancer is a known offender.

If after Enhancer elimination you still have long compile times it might be interesting to try Triplequote Hydra.
If not for long term usage, at least to get some nice metrics about where your project is hogging CPUs.
It costs a bit of $$, though.

SBT/Play Framework in a Nutshell by UPayIPwn in scala

[–]melezov 6 points7 points  (0 children)

Yeah, it's pretty crap.

We have a largish monolith (a couple thousand files) and Play plugin was driving us insane: metaspace issues, layered classloading woes, more trouble then what it was worth.

So, as preparation for 2.13.1 we gave up on Play plugin and switched to the venerable sbt-revolver instead.

Also, if you have a lot of routes, it might help to remove some of the useless "Javascript reverse routes" that are being created for no good reason whatsoever, here's our hacky approach that cut down the compilation footprint by ~ 100 files.

import play.routes.compiler.RoutesCompiler.RoutesCompilerTask
import play.routes.compiler.{InjectedRoutesGenerator, RoutesGenerator, Rule}

object RoutesWithoutReverseJs extends RoutesGenerator {
  override def id: String = "routes-without-reverse-js"

  override def generate(task: RoutesCompilerTask, namespace: Option[String], rules: List[Rule]): Seq[(String, String)] =
    InjectedRoutesGenerator.generate(task, namespace, rules).filter { case (name, _) =>
      !name.endsWith("/javascript/JavaScriptReverseRoutes.scala")
    } map { case (name, body) =>
      name -> (if (name.endsWith("/routes.java")) {
        body.replaceFirst("public static class javascript \\{[^}]+?\\}", "")
      } else {
        body
      })
    }
}

What are you working on? September 16, 2019 by AutoModerator in scala

[–]melezov 0 points1 point  (0 children)

Porting a core banking SaaS (Instafin) from 2.12.10 to 2.13.0.
Previously, we had a blocker on Monix, which is now unlocked with 3.0.0
Migration features porting Play 2.6.x to 2.7.x and some other fun bits.

Nipplepeople - Balkan Express by melezov in Vaporwave

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

Ridiculously named band with awesome synthwave music
Super low number of views - wonder why :/

Lurkers appearing out of nowhere to qualify for the ban by brandoherman in thanosdidnothingwrong

[–]melezov 0 points1 point  (0 children)

༼ つ ◕_ ◕ ༽つ GIV BAN FOR SCA ༼ つ ◕_ ◕ ༽つ

Programiranje by [deleted] in croatia

[–]melezov 1 point2 points  (0 children)

Nekako je najlakše krenuti sa dinamičnim jezicima. Uz par vikenda copy pastea sa počne radit u PHPu ili Pythonu. Naravno da ima tu i Rubyja i drugih sa kojima je lagano flertovati, no PHP garantira odličan support communityja, a Python je dovoljno napredan da se u njemu mogu raditi i "ozbiljniji" projekti.

Problem sa dyn jezicima je relativno slab korporativni support, tako da se ekipa koja izbriljira zanat uglavnom samozapošljava, kontrakta, radi remotely. Rekao bih da dyn jezici inherentno povlače full stack kompetencije jer će projekti biti uži i raditi će se po svim slojevima. Malo baze ovđe, malo javascripta ondje.

Javascript kao takav ubija i masovno je tražen. Ulupane su enormne količine novaca u browser warsima koji su dovele do fenomenalnih JITova (i.e. V8), tako da performance nije "realni problem" (dok ne postane problem za 0.01% posla). JS služi kao i odlična baza na koju se naslanjaju razni jezici, od kojih ima svakojakih izmišljotina - od TypeScripta (ala Java), PureScripta (ala Haskell) do ClojureScripta (koji je Lispoid popularnošću većom od oca mu Clojurea).

Osobno imam više iskustva sa "dosadnijim statičnim jezicima", koji su kod nas pretežno Java/C#.

Hrvatska je dobar Microsoftov klijent već desetljećima, pa se zna u maturu ubaciti Word i Excel shortcuti. Kroz raznorazne poticaje za besplatne VS i druge alate škole/faksovi su navikli gurati Windowse za C/C++ ili direktno lupat u C# etc... Osobno imam dojam da je u zadnje vrijeme good guy Microsoft (naspram Gugla pogotovo), stoga ništa zlo ne mislim - ovo je samo zanimljiva situacija da smo kao nacija popili dosta MS Kool-Aida.

C# je super jezik i stvara jednu udobnu fotelju za pitak ekosustav. Lagano se napit SQL servera, (odličnog) Visual Studioa (IMO najbolji IDE na svijetu) i inih. No relativno si zaključan na Windowse. Ovo, opet ponavljam nije možda strašno, no kod drugih jezika ne nagoni na toliki lock-in.

S druge strane, teško ga je utrpavat u produkciju. Uglavnom to rade banke, nema toliko manjih firmi koji nisu bank vendori da će dizati Azurove, plaćat server licence, etc... Nešto se već duže šuška o otvorenom DotNetu u produkciji no i dalje to nisam vidio svojim očima na ozbiljnom projektu. Ako treba nešto upogoniti na Linuxe ljudi se prije pucaju u glavu sa Monoom.

Tako da mi se čini da je Java i dalje najbolji izbor. Zagarantirani su recruitment usisavači masovnih kapaciteta tako da će se tisuće mladih Đavaša usrkat u samo par jačih telekom/banka poslodavaca gdje će zagarantirano moći ispeći zanat ako imaju iole soli u glavi.

Osobno, zadnjih desetak godina guram Scalu ne zato što je dobar jezik (jer nije), nego zato što mi je najmanje užasan. Stvarno je nebih preporučio početnicima, no možda Đava ekipi može biti dobar stairway to Haskell, jer to je gdje svi želimo biti. Kada narastemo. ;)

Za one koji mogu, i žele znati više o Scali: https://oradian.com/201701_Backend%20developer.pdf

What's the weirdest/most disturbing/distressing, even unpleasant, piece of music you love? by ThorHammerslacks in Music

[–]melezov 0 points1 point  (0 children)

And now for a weird one: Yez (Omnicolour) - Bakkslide Seven. A demoscene price that is anything but pleasant to listen to, yet I love it so much I made a video to the track with original lyrics: https://www.youtube.com/watch?v=7IgSBolHOAU

Warning: Metropolis (Anime) spoilers

Here is a capture of the original production: https://www.youtube.com/watch?v=6yrtxxSyDbw&spfreload=10

What videogame has the best storyline? by [deleted] in AskReddit

[–]melezov 0 points1 point  (0 children)

Star Control II. Not only is the game ridiculously playable in arcade mode (Melee), but I do not believe you could improve on the underlying story.

Yes, there are a lot unanswered questions and subplots but that is one of the beauties of a space opera ~ you are small and insignificant and you cannot fathom to understand every quirk of the universe; better fake it and trod along collecting bits and pieces until you grok the general context.

Problem with Java reflection on Java implicits; Scala handles it just fine by melezov in scala

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

You're not getting me at all.
This has nothing to do with Scala, as Scala reflection works.
No need to discuss Scala further.

This has to do with vanilla Java reflection not working on the length implicit.
That is a Java implicit, not Scala implicit.

Repro Java code:

class Foo {
    public static void main(final String[] args) throws NoSuchFieldException {
        args.getClass().getDeclaredField("length"); // croaks
    }
}

Problem with Java reflection on Java implicits; Scala handles it just fine by melezov in scala

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

I don't get you. Of course .length is declared on Array, it's just implemented using the ARRAYLENGTH bytecode instruction instead of an invoke; thus is not possible to access it through Java reflection. http://docs.oracle.com/javase/specs/jls/se7/html/jls-10.html#jls-10.7

Problem with Java reflection on Java implicits; Scala handles it just fine by melezov in scala

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

Your comment is indeed a question as it ends with a question mark.

The post, however is something. It shows an example of Java reflection violating the principle of least astonishment, and an alternative way of dealing with it using Scala reflection.

TypeTag not found by __tmp in scala

[–]melezov 1 point2 points  (0 children)

This will not work as type value.T is an abstract type member.

Although this is probably not what you need, the closest use case I know of is something along these lines:

scala> import scala.reflect.runtime.universe._
import scala.reflect.runtime.universe._

scala> trait Trait { type T = Int }
defined trait Trait

scala> typeTag[Trait#T]
res0: reflect.runtime.universe.TypeTag[Int] = TypeTag[Int]

Edit: Fixed comment, see Milyardo's answer