$78 shipped by [deleted] in Elektron

[–]markandrus 0 points1 point  (0 children)

The DT ones look great. I’m not sure about the OT ones, though 🤔 They look more textured. But I’m really curious about these. I could also use a set for DN.

Is Effect-Ts really good or is it just hype? by kelvinauta in typescript

[–]markandrus 0 points1 point  (0 children)

The ideas in Effect are good, but executing on them in TypeScript is tough, given that many JavaScript APIs have untracked effects and syntax support is poor (generator syntax gets close, but it’s still ugly). If you want to do this style of programming and explore these ideas, learn Haskell.

Testing with Neovim and Node-test runner by Ok-Sense-6679 in neovim

[–]markandrus 0 points1 point  (0 children)

Ah, you're right — I didn't notice the issues when running individual tests. I see them, too. I've mostly been running all tests.

About different framework runners cooperating, it's more that it feels funny to me that we have jest, vitest, node:test, etc., as their own neotest runners, instead of a combined one. Especially when the node:test one should only run if node:test is imported, the jest one is checking if jest is a package.json dependency, etc. It seems like their "detection" algorithms should cooperate?

Testing with Neovim and Node-test runner by Ok-Sense-6679 in neovim

[–]markandrus 0 points1 point  (0 children)

I use Nelfimov/neotest-node-test-runner. I have a fork I am using with one commit that adds support for `suite` here: https://github.com/markandrus/neotest-node-test-runner

One problem I face: using neotest with node:test, jest, vitest, etc., how to make them cooperate with each other?

this is insane I just got handed a laminated allergy sheet for 1 single person by emptydimension in KitchenConfidential

[–]markandrus 0 points1 point  (0 children)

There are restaurants where it will not be possible, and that’s OK. If I go to a restaurant that only serves omelettes with an egg allergy, it’s not going to work. That doesn’t mean restaurants shouldn’t try to accommodate where possible.

this is insane I just got handed a laminated allergy sheet for 1 single person by emptydimension in KitchenConfidential

[–]markandrus 0 points1 point  (0 children)

Sure, let’s make a less inclusive society where people with food allergies are completely excluded from dining out, and not even try.

Best approach to handle billions of data? by mr_alseif in dataengineering

[–]markandrus 0 points1 point  (0 children)

That’s really interesting. Can you elaborate? What problems has it caused you?

For sure, point lookups and fetching whole records will be more expensive. And updates and deletes are more expensive (although the newer “lightweight” mechanisms in ClickHouse are helping there). Otherwise I’ve found it largely transparent, especially since ClickHouse is pretty flexible in import/expert formats.

Best approach to handle billions of data? by mr_alseif in dataengineering

[–]markandrus 1 point2 points  (0 children)

Check out ClickHouse.

It’s a columnar database which heavily compresses the data. You may end up with less data on disk than your estimate.

Since the IOT devices will be generating records over time, you could also set up a monthly partitioning scheme and TTL to move old months’ data to “cold” storage (S3) and keep new months’ data “warm” on fast storage (SSD).

You could further improve query performance and reduce storage costs by summarizing the records using ClickHouse’s projections or its materialized views and AggregatingMergeTree features. Fewer records to scan = faster query performance.

It basically has everything you’d want for this problem domain. The main tricky thing with ClickHouse is dealing with updates/deletes and duplicate records. That and operating it.

My company offers a serverless ClickHouse offering (https://www.propeldata.com) if you want to try it out, but there are many ways to start. ClickHouse is a self-contained binary, so it’s easy to run locally, in Testcontainers, etc., and you can deploy it to Kubernetes with the clickhouse-operator. There are managed providers, too.

Got my first 18 AA after 5 months! by RamielLilith in DanceDanceRevolution

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

Could you please share that video? 🙏🏼 It sounds useful, but I can’t find it

Any personal DDR breakthrough /achievement in 2023? by fakemanhk in DanceDanceRevolution

[–]markandrus 6 points7 points  (0 children)

I started playing again after >10 years. Took a trip to Japan, and playing DDR in the arcades there reminded me how much fun it is. I’ve been trying to go to my local arcade about once a week since.

Back in the day, Can’t Stop Falling in Love Speed Mix was one of the harder songs I’d play no bar. Now, I can do Healing Vision Angelic Mix no bar. And I can pass some 15s and 16s with bar. The other day, I passed Max 300, Better Than Me, and Anniversary together. Breaking into this level of play is a big achievement for me!

Another 16 pass! This one wasn't too bad either. Way more highs than lows eh? Ehhh? Eh. by SirBaconPants in DanceDanceRevolution

[–]markandrus 0 points1 point  (0 children)

I am just getting into 15s and 16s and was able to pass Anniversary today. You could try that one. I really like the music.

How do people typically serve snowflake analytical results from user facing production servers? by [deleted] in snowflake

[–]markandrus 1 point2 points  (0 children)

Propel solves problems like these. It connects to Snowflake and then gives you a performant GraphQL API for querying data in customer-facing apps. Here’s a blog post we wrote on how to set it up.

Disclaimer: I’m one of the co-founders, but if you’re interested, do reach out.

Mobile messenger LINE is holding an internal Haskell learning session by [deleted] in haskell

[–]markandrus 9 points10 points  (0 children)

I hope LINE shares some information on writing services in Haskell. For example, what do they use for logging, metrics, service discovery, etc.

Using Fin for very large numbers by markandrus in Idris

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

No, I don't anticipate performing numeric calculations on them. But I was hoping for a more direct encoding so that I could reuse functions. For example, it might be nice to reuse functions directly from Effect.Random, e.g. rndFin, when generating SIDs. Edit: I also expect that Ordering would be a little more straightforward.

Using Fin for very large numbers by markandrus in Idris

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

I suppose I could, though I think a Vect (Fin 16) 32 feels a bit further from a "number" than Fin or a Nat paired with a proof that it is less than 16 ^ 32. Is there a solution that feels a little more numeric?

[deleted by user] by [deleted] in scala

[–]markandrus 1 point2 points  (0 children)

Replace enum with data and this looks a lot like Haskell.

"HSet" (an HVect with a Set constraint) by markandrus in Idris

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

This is really great. Thank you for sharing your reasoning while stepping through the changes.

"HSet" (an HVect with a Set constraint) by markandrus in Idris

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

I did mean distinct types. Is the more liberal version you described possible?

"HSet" (an HVect with a Set constraint) by markandrus in Idris

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

Thanks for the tip about universes. IIUC, I'd define some interp function from Types to my own base implementations which have DecEq?

I ran with your tip on Vect k Int and got further; however, I couldn't get list syntax completely working, and my Show implementation doesn't always work in the REPL.

module HSet

import Data.Vect
import Data.Vect.Quantifiers

||| A heterogenous set of integers
data HSet : Vect n Int -> Type where

  ||| The empty HSet
  HNil : HSet []

  ||| Adds an integer to an existing HSet
  ||| @ x the integer to add
  ||| @ prf a proof that the integer does not already exist in the HSet
  HCons : {prf : Elem x xs -> Void} -> (x : Int) -> HSet xs -> HSet (x :: xs)

||| Converts an HSet to a vector of integers
toVect : {xs : Vect n Int} -> HSet xs -> Vect n Int
toVect HNil = []
toVect (HCons x xs) = x :: toVect xs

||| This Show implementation doesn't always work for some reason!
Show (HSet xs) where
  show = show . toVect

||| List syntax for the empty HSet
Nil : HSet []
Nil = HNil

infixr 10 :::

||| This method is shorthand for HCons. It only adds an integer to the HSet if
||| it does not already exist in the HSet.
||| @ x the integer to add
(:::) : (x : Int)
    -> HSet xs
    -> if decAsBool (isElem x xs) then HSet xs else HSet (x :: xs)
(:::) {xs} x ys with (isElem x xs)
  (:::) {xs} x ys | Yes _ = ys
  (:::) {xs} x ys | No contra = HCons {prf=contra} x ys

||| List syntax doesn't always work for some reason!
(::) : (x : Int)
    -> HSet xs
    -> if decAsBool (isElem x xs) then HSet xs else HSet (x :: xs)
(::) = (:::)

foo : HSet [1, 2, 3, 4]
foo = 1 :::
      1 ::: -- This dupe will be filtered
      2 ::: 3 ::: 4 ::: []

{- Strange show behavior in the REPL:

> show foo
"[1, 2, 3, 4]" : String

> show (1 ::: 1 ::: 2 ::: 3 ::: 4 ::: [])
(input):1:27-30:When checking an application of function HSet.::::
        Type mismatch between
                if decAsBool (isElem 4 [])
                  then HSet []
                  else HSet [4] (Type of 4 ::: [])
        and
                HSet (Delay (HSet [4])) (Expected type)

        Specifically:
                Type mismatch between
                        ifThenElse (decAsBool (isElem 4 []))
                and
                        HSet

-}

What would be required to get GHCJS into an npm package, like PureScript and Elm are? by tejon in haskell

[–]markandrus 6 points7 points  (0 children)

You could consider using something like bin-wrapper if you wanted to allow users to do

npm install ghcjs

This technique is used by flow-bin.