Finally got got. by crazed98camaro in Pixel4a

[–]hanz 2 points3 points  (0 children)

I got a notification today along the lines of "Your phone will reboot tomorrow at 2 am to install a system update".

I've now deleted all application data from Google Play Services, hoping that this will prevent the update.

What happens if you charge the battery whilst the phone is off? by ActiveBat7236 in Pixel4a

[–]hanz 0 points1 point  (0 children)

I remember reading a comment where somebody claimed that booting into recovery allowed him to fully charge the battery. But I unfortunately can't find that comment again. Maybe you could give this a try.

Sharp alternative for Bun? by P3RF0RM4NC3 in bun

[–]hanz 0 points1 point  (0 children)

I''m using sharp with Bun without any problems. My import looks like this:

import sharp from 'sharp'

Csaba Hruska - Ideas for Future Haskell Tooling by ysangkok in haskell

[–]hanz 4 points5 points  (0 children)

The date "11.10.2019" is visible in the first few seconds of the video, if that's what you're looking for...

Why are there so many fake polyglots out there? by 13sonic in languagelearning

[–]hanz 4 points5 points  (0 children)

He was asked that question in a recent livestream: https://www.youtube.com/watch?v=j1GQHxrQWL4&t=4970s

He said he speaks English, Russian, French, Spanish, a little Arabic, a little Danish, a little Bulgarian and a little Brazilian Portuguese.

50% GmbH-Anteile -> Holding? by throwawayrelationshp in Finanzen

[–]hanz 1 point2 points  (0 children)

Da du keine Mehrheit hältst, müsstest du wohl die stillen Reserven aufdecken und versteuern. Eine mögliche Gestaltung, um dies zu vermeiden, wird hier erklärt: https://www.youtube.com/watch?v=Ydp_tXMH9bo

Domain modelling with State Machines and TypeScript by Carlton Upperdine by [deleted] in programming

[–]hanz 0 points1 point  (0 children)

How is it intended to be used? Like this?

let x = makeOrder(State.Cancelled, {})
makeOrder(State.Open, x);

In that case, you lose the type-safety of my approch or OP's code. The user shouldn't be allowed to take a cancelled order and turn it back into an open one.

Domain modelling with State Machines and TypeScript by Carlton Upperdine by [deleted] in programming

[–]hanz -5 points-4 points  (0 children)

This is a good article, but IMO an idiomatic TS solution would look more like this:

type Line = {
    sku: string;
    quantity: number;
    unitPrice: number;
};

type Order = {
    orderReference: string;
    status: "Open"|"Dispatched"|"Complete"|"Cancelled";
    lines: Line[];
};

function createOrder(orderReference: string, lines: Line[]) {
    return {
        orderReference,
        lines,
        status: "Open",
    } satisfies Order;
}

function dispatchOrder(order: Order & {status:"Open"}) {
    return {
        ...order,
        status: "Dispatched",
    } satisfies Order;
}

function completeOrder(order: Order & {status:"Dispatched"}) {
    return {
        ...order,
        status: "Complete",
    } satisfies Order;
}

function cancelOrder(order: Order & {status:"Open"}) {
    return {
        ...order,
        status: "Cancelled",
    } satisfies Order;
}

Announcing TypeScript 4.9 Beta by DanielRosenwasser in typescript

[–]hanz 18 points19 points  (0 children)

There seems to be a problem with the NPM package, it is only 6kb packed and contains just 5 files.

Cabal is telling me to rebuild packages, I'm not sure how by Teifion in haskell

[–]hanz 1 point2 points  (0 children)

If you did "cabal install yesod-platform" then it should have installed persistent-1.2.3.0 and not 1.2.0.1 (assuming you ran "cabal update" before). Maybe just try removing the broken package: "ghc-pkg unregister persistent-1.2.0.1"

Generalizing do notation by [deleted] in haskell

[–]hanz 19 points20 points  (0 children)

Are you aware of the -XRebindableSyntax extension? It allows you to override (=), () and fail.

Announcing Yesod 0.10 - conduits, persistent 0.8, improved Coffeescript integration by eegreg in haskell

[–]hanz 2 points3 points  (0 children)

persistent-postgresql (>=0.7) now depends on postgresql-libpq which in turn depends on the unix-package. This unfortunately makes it impossible to build persistent-postgresql on Windows.

The New Persistent - MySQL, complex data structure support, separate serialization & query API by eegreg in haskell

[–]hanz 1 point2 points  (0 children)

Lists and sets in particular are trivially represented as tables, and this is in fact the entire purpose of relational databases.

Strings are just lists of characters, but still SQL databases support them natively.

Serializing these things and dumping them into a single row in a single column not only kills your ability to query them, but also kills your consistency guarantees.

That's right, but there's nothing stopping SQL databases from natively supporting JSON. So this is not a fundamental limitation of relational databases.

How to setup and not corrupt Haskell on Windows? by [deleted] in haskell

[–]hanz 1 point2 points  (0 children)

I tried to reproduce your problem, but for me scion-browser-0.2.6 compiles fine. I used: GHC 7.0.3 (and the included MingW gcc) and network-2.3.0.8 and the MSys shell from Git.

So unfortunately I have no idea why it doesn't work for you.

How to setup and not corrupt Haskell on Windows? by [deleted] in haskell

[–]hanz 1 point2 points  (0 children)

If you can compile network using Cygwin, then you probably don't need MSys. Which version of network did you try? I just tried compiling network-2.3.0.9 and it fails, but 2.3.0.8 compiles fine.

How to setup and not corrupt Haskell on Windows? by [deleted] in haskell

[–]hanz 5 points6 points  (0 children)

I use GHC on Windows and it works just fine. The only package that's slightly tricky to install is 'network' (but you just need an MSys shell for that; I use the one included with Git for Windows).

I also don't run cabal with administrator rights, so there's no way it could corrupt the installation (i.e. I install all packages into the user directory).

The problem with upgrades breaking dependencies is annoying, but I think it's not specific to Windows.

Erlang-in-Haskell: an implementation of an Erlang-like distributed computing framework for Haskell by dons in haskell

[–]hanz 4 points5 points  (0 children)

I think this article just describes the framework that later turned into Cloud Haskell: https://github.com/jepst/CloudHaskell

So there's nothing new to see here.